// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 // - protoc v4.25.7 // source: google/cloud/advisorynotifications/v1/service.proto package advisorynotificationspb import ( context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" ) // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 const ( AdvisoryNotificationsService_ListNotifications_FullMethodName = "/google.cloud.advisorynotifications.v1.AdvisoryNotificationsService/ListNotifications" AdvisoryNotificationsService_GetNotification_FullMethodName = "/google.cloud.advisorynotifications.v1.AdvisoryNotificationsService/GetNotification" AdvisoryNotificationsService_GetSettings_FullMethodName = "/google.cloud.advisorynotifications.v1.AdvisoryNotificationsService/GetSettings" AdvisoryNotificationsService_UpdateSettings_FullMethodName = "/google.cloud.advisorynotifications.v1.AdvisoryNotificationsService/UpdateSettings" ) // AdvisoryNotificationsServiceClient is the client API for AdvisoryNotificationsService service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type AdvisoryNotificationsServiceClient interface { // Lists notifications under a given parent. ListNotifications(ctx context.Context, in *ListNotificationsRequest, opts ...grpc.CallOption) (*ListNotificationsResponse, error) // Gets a notification. GetNotification(ctx context.Context, in *GetNotificationRequest, opts ...grpc.CallOption) (*Notification, error) // Get notification settings. GetSettings(ctx context.Context, in *GetSettingsRequest, opts ...grpc.CallOption) (*Settings, error) // Update notification settings. UpdateSettings(ctx context.Context, in *UpdateSettingsRequest, opts ...grpc.CallOption) (*Settings, error) } type advisoryNotificationsServiceClient struct { cc grpc.ClientConnInterface } func NewAdvisoryNotificationsServiceClient(cc grpc.ClientConnInterface) AdvisoryNotificationsServiceClient { return &advisoryNotificationsServiceClient{cc} } func (c *advisoryNotificationsServiceClient) ListNotifications(ctx context.Context, in *ListNotificationsRequest, opts ...grpc.CallOption) (*ListNotificationsResponse, error) { out := new(ListNotificationsResponse) err := c.cc.Invoke(ctx, AdvisoryNotificationsService_ListNotifications_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *advisoryNotificationsServiceClient) GetNotification(ctx context.Context, in *GetNotificationRequest, opts ...grpc.CallOption) (*Notification, error) { out := new(Notification) err := c.cc.Invoke(ctx, AdvisoryNotificationsService_GetNotification_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *advisoryNotificationsServiceClient) GetSettings(ctx context.Context, in *GetSettingsRequest, opts ...grpc.CallOption) (*Settings, error) { out := new(Settings) err := c.cc.Invoke(ctx, AdvisoryNotificationsService_GetSettings_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *advisoryNotificationsServiceClient) UpdateSettings(ctx context.Context, in *UpdateSettingsRequest, opts ...grpc.CallOption) (*Settings, error) { out := new(Settings) err := c.cc.Invoke(ctx, AdvisoryNotificationsService_UpdateSettings_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } // AdvisoryNotificationsServiceServer is the server API for AdvisoryNotificationsService service. // All implementations should embed UnimplementedAdvisoryNotificationsServiceServer // for forward compatibility type AdvisoryNotificationsServiceServer interface { // Lists notifications under a given parent. ListNotifications(context.Context, *ListNotificationsRequest) (*ListNotificationsResponse, error) // Gets a notification. GetNotification(context.Context, *GetNotificationRequest) (*Notification, error) // Get notification settings. GetSettings(context.Context, *GetSettingsRequest) (*Settings, error) // Update notification settings. UpdateSettings(context.Context, *UpdateSettingsRequest) (*Settings, error) } // UnimplementedAdvisoryNotificationsServiceServer should be embedded to have forward compatible implementations. type UnimplementedAdvisoryNotificationsServiceServer struct { } func (UnimplementedAdvisoryNotificationsServiceServer) ListNotifications(context.Context, *ListNotificationsRequest) (*ListNotificationsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListNotifications not implemented") } func (UnimplementedAdvisoryNotificationsServiceServer) GetNotification(context.Context, *GetNotificationRequest) (*Notification, error) { return nil, status.Errorf(codes.Unimplemented, "method GetNotification not implemented") } func (UnimplementedAdvisoryNotificationsServiceServer) GetSettings(context.Context, *GetSettingsRequest) (*Settings, error) { return nil, status.Errorf(codes.Unimplemented, "method GetSettings not implemented") } func (UnimplementedAdvisoryNotificationsServiceServer) UpdateSettings(context.Context, *UpdateSettingsRequest) (*Settings, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateSettings not implemented") } // UnsafeAdvisoryNotificationsServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to AdvisoryNotificationsServiceServer will // result in compilation errors. type UnsafeAdvisoryNotificationsServiceServer interface { mustEmbedUnimplementedAdvisoryNotificationsServiceServer() } func RegisterAdvisoryNotificationsServiceServer(s grpc.ServiceRegistrar, srv AdvisoryNotificationsServiceServer) { s.RegisterService(&AdvisoryNotificationsService_ServiceDesc, srv) } func _AdvisoryNotificationsService_ListNotifications_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ListNotificationsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(AdvisoryNotificationsServiceServer).ListNotifications(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: AdvisoryNotificationsService_ListNotifications_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(AdvisoryNotificationsServiceServer).ListNotifications(ctx, req.(*ListNotificationsRequest)) } return interceptor(ctx, in, info, handler) } func _AdvisoryNotificationsService_GetNotification_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetNotificationRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(AdvisoryNotificationsServiceServer).GetNotification(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: AdvisoryNotificationsService_GetNotification_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(AdvisoryNotificationsServiceServer).GetNotification(ctx, req.(*GetNotificationRequest)) } return interceptor(ctx, in, info, handler) } func _AdvisoryNotificationsService_GetSettings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetSettingsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(AdvisoryNotificationsServiceServer).GetSettings(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: AdvisoryNotificationsService_GetSettings_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(AdvisoryNotificationsServiceServer).GetSettings(ctx, req.(*GetSettingsRequest)) } return interceptor(ctx, in, info, handler) } func _AdvisoryNotificationsService_UpdateSettings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(UpdateSettingsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(AdvisoryNotificationsServiceServer).UpdateSettings(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: AdvisoryNotificationsService_UpdateSettings_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(AdvisoryNotificationsServiceServer).UpdateSettings(ctx, req.(*UpdateSettingsRequest)) } return interceptor(ctx, in, info, handler) } // AdvisoryNotificationsService_ServiceDesc is the grpc.ServiceDesc for AdvisoryNotificationsService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var AdvisoryNotificationsService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "google.cloud.advisorynotifications.v1.AdvisoryNotificationsService", HandlerType: (*AdvisoryNotificationsServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "ListNotifications", Handler: _AdvisoryNotificationsService_ListNotifications_Handler, }, { MethodName: "GetNotification", Handler: _AdvisoryNotificationsService_GetNotification_Handler, }, { MethodName: "GetSettings", Handler: _AdvisoryNotificationsService_GetSettings_Handler, }, { MethodName: "UpdateSettings", Handler: _AdvisoryNotificationsService_UpdateSettings_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "google/cloud/advisorynotifications/v1/service.proto", }