Debian Codegraph @

advisorynotifications/apiv1/advisorynotificationspb/service_grpc.pb.go

raw
1 // Copyright 2025 Google LLC
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14
15 // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
16 // versions:
17 // - protoc-gen-go-grpc v1.3.0
18 // - protoc v4.25.7
19 // source: google/cloud/advisorynotifications/v1/service.proto
20
21 package advisorynotificationspb
22
23 import (
24 context "context"
25 grpc "google.golang.org/grpc"
26 codes "google.golang.org/grpc/codes"
27 status "google.golang.org/grpc/status"
28 )
29
30 // This is a compile-time assertion to ensure that this generated file
31 // is compatible with the grpc package it is being compiled against.
32 // Requires gRPC-Go v1.32.0 or later.
33 const _ = grpc.SupportPackageIsVersion7
34
35 const (
36 AdvisoryNotificationsService_ListNotifications_FullMethodName = "/google.cloud.advisorynotifications.v1.AdvisoryNotificationsService/ListNotifications"
37 AdvisoryNotificationsService_GetNotification_FullMethodName = "/google.cloud.advisorynotifications.v1.AdvisoryNotificationsService/GetNotification"
38 AdvisoryNotificationsService_GetSettings_FullMethodName = "/google.cloud.advisorynotifications.v1.AdvisoryNotificationsService/GetSettings"
39 AdvisoryNotificationsService_UpdateSettings_FullMethodName = "/google.cloud.advisorynotifications.v1.AdvisoryNotificationsService/UpdateSettings"
40 )
41
42 // AdvisoryNotificationsServiceClient is the client API for AdvisoryNotificationsService service.
43 //
44 // 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.
45 type AdvisoryNotificationsServiceClient interface {
46 // Lists notifications under a given parent.
47 ListNotifications(ctx context.Context, in *ListNotificationsRequest, opts ...grpc.CallOption) (*ListNotificationsResponse, error)
48 // Gets a notification.
49 GetNotification(ctx context.Context, in *GetNotificationRequest, opts ...grpc.CallOption) (*Notification, error)
50 // Get notification settings.
51 GetSettings(ctx context.Context, in *GetSettingsRequest, opts ...grpc.CallOption) (*Settings, error)
52 // Update notification settings.
53 UpdateSettings(ctx context.Context, in *UpdateSettingsRequest, opts ...grpc.CallOption) (*Settings, error)
54 }
55
56 type advisoryNotificationsServiceClient struct {
57 cc grpc.ClientConnInterface
58 }
59
60 func NewAdvisoryNotificationsServiceClient(cc grpc.ClientConnInterface) AdvisoryNotificationsServiceClient {
61 return &advisoryNotificationsServiceClient{cc}
62 }
63
64 func (c *advisoryNotificationsServiceClient) ListNotifications(ctx context.Context, in *ListNotificationsRequest, opts ...grpc.CallOption) (*ListNotificationsResponse, error) {
65 out := new(ListNotificationsResponse)
66 err := c.cc.Invoke(ctx, AdvisoryNotificationsService_ListNotifications_FullMethodName, in, out, opts...)
67 if err != nil {
68 return nil, err
69 }
70 return out, nil
71 }
72
73 func (c *advisoryNotificationsServiceClient) GetNotification(ctx context.Context, in *GetNotificationRequest, opts ...grpc.CallOption) (*Notification, error) {
74 out := new(Notification)
75 err := c.cc.Invoke(ctx, AdvisoryNotificationsService_GetNotification_FullMethodName, in, out, opts...)
76 if err != nil {
77 return nil, err
78 }
79 return out, nil
80 }
81
82 func (c *advisoryNotificationsServiceClient) GetSettings(ctx context.Context, in *GetSettingsRequest, opts ...grpc.CallOption) (*Settings, error) {
83 out := new(Settings)
84 err := c.cc.Invoke(ctx, AdvisoryNotificationsService_GetSettings_FullMethodName, in, out, opts...)
85 if err != nil {
86 return nil, err
87 }
88 return out, nil
89 }
90
91 func (c *advisoryNotificationsServiceClient) UpdateSettings(ctx context.Context, in *UpdateSettingsRequest, opts ...grpc.CallOption) (*Settings, error) {
92 out := new(Settings)
93 err := c.cc.Invoke(ctx, AdvisoryNotificationsService_UpdateSettings_FullMethodName, in, out, opts...)
94 if err != nil {
95 return nil, err
96 }
97 return out, nil
98 }
99
100 // AdvisoryNotificationsServiceServer is the server API for AdvisoryNotificationsService service.
101 // All implementations should embed UnimplementedAdvisoryNotificationsServiceServer
102 // for forward compatibility
103 type AdvisoryNotificationsServiceServer interface {
104 // Lists notifications under a given parent.
105 ListNotifications(context.Context, *ListNotificationsRequest) (*ListNotificationsResponse, error)
106 // Gets a notification.
107 GetNotification(context.Context, *GetNotificationRequest) (*Notification, error)
108 // Get notification settings.
109 GetSettings(context.Context, *GetSettingsRequest) (*Settings, error)
110 // Update notification settings.
111 UpdateSettings(context.Context, *UpdateSettingsRequest) (*Settings, error)
112 }
113
114 // UnimplementedAdvisoryNotificationsServiceServer should be embedded to have forward compatible implementations.
115 type UnimplementedAdvisoryNotificationsServiceServer struct {
116 }
117
118 func (UnimplementedAdvisoryNotificationsServiceServer) ListNotifications(context.Context, *ListNotificationsRequest) (*ListNotificationsResponse, error) {
119 return nil, status.Errorf(codes.Unimplemented, "method ListNotifications not implemented")
120 }
121 func (UnimplementedAdvisoryNotificationsServiceServer) GetNotification(context.Context, *GetNotificationRequest) (*Notification, error) {
122 return nil, status.Errorf(codes.Unimplemented, "method GetNotification not implemented")
123 }
124 func (UnimplementedAdvisoryNotificationsServiceServer) GetSettings(context.Context, *GetSettingsRequest) (*Settings, error) {
125 return nil, status.Errorf(codes.Unimplemented, "method GetSettings not implemented")
126 }
127 func (UnimplementedAdvisoryNotificationsServiceServer) UpdateSettings(context.Context, *UpdateSettingsRequest) (*Settings, error) {
128 return nil, status.Errorf(codes.Unimplemented, "method UpdateSettings not implemented")
129 }
130
131 // UnsafeAdvisoryNotificationsServiceServer may be embedded to opt out of forward compatibility for this service.
132 // Use of this interface is not recommended, as added methods to AdvisoryNotificationsServiceServer will
133 // result in compilation errors.
134 type UnsafeAdvisoryNotificationsServiceServer interface {
135 mustEmbedUnimplementedAdvisoryNotificationsServiceServer()
136 }
137
138 func RegisterAdvisoryNotificationsServiceServer(s grpc.ServiceRegistrar, srv AdvisoryNotificationsServiceServer) {
139 s.RegisterService(&AdvisoryNotificationsService_ServiceDesc, srv)
140 }
141
142 func _AdvisoryNotificationsService_ListNotifications_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
143 in := new(ListNotificationsRequest)
144 if err := dec(in); err != nil {
145 return nil, err
146 }
147 if interceptor == nil {
148 return srv.(AdvisoryNotificationsServiceServer).ListNotifications(ctx, in)
149 }
150 info := &grpc.UnaryServerInfo{
151 Server: srv,
152 FullMethod: AdvisoryNotificationsService_ListNotifications_FullMethodName,
153 }
154 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
155 return srv.(AdvisoryNotificationsServiceServer).ListNotifications(ctx, req.(*ListNotificationsRequest))
156 }
157 return interceptor(ctx, in, info, handler)
158 }
159
160 func _AdvisoryNotificationsService_GetNotification_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
161 in := new(GetNotificationRequest)
162 if err := dec(in); err != nil {
163 return nil, err
164 }
165 if interceptor == nil {
166 return srv.(AdvisoryNotificationsServiceServer).GetNotification(ctx, in)
167 }
168 info := &grpc.UnaryServerInfo{
169 Server: srv,
170 FullMethod: AdvisoryNotificationsService_GetNotification_FullMethodName,
171 }
172 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
173 return srv.(AdvisoryNotificationsServiceServer).GetNotification(ctx, req.(*GetNotificationRequest))
174 }
175 return interceptor(ctx, in, info, handler)
176 }
177
178 func _AdvisoryNotificationsService_GetSettings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
179 in := new(GetSettingsRequest)
180 if err := dec(in); err != nil {
181 return nil, err
182 }
183 if interceptor == nil {
184 return srv.(AdvisoryNotificationsServiceServer).GetSettings(ctx, in)
185 }
186 info := &grpc.UnaryServerInfo{
187 Server: srv,
188 FullMethod: AdvisoryNotificationsService_GetSettings_FullMethodName,
189 }
190 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
191 return srv.(AdvisoryNotificationsServiceServer).GetSettings(ctx, req.(*GetSettingsRequest))
192 }
193 return interceptor(ctx, in, info, handler)
194 }
195
196 func _AdvisoryNotificationsService_UpdateSettings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
197 in := new(UpdateSettingsRequest)
198 if err := dec(in); err != nil {
199 return nil, err
200 }
201 if interceptor == nil {
202 return srv.(AdvisoryNotificationsServiceServer).UpdateSettings(ctx, in)
203 }
204 info := &grpc.UnaryServerInfo{
205 Server: srv,
206 FullMethod: AdvisoryNotificationsService_UpdateSettings_FullMethodName,
207 }
208 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
209 return srv.(AdvisoryNotificationsServiceServer).UpdateSettings(ctx, req.(*UpdateSettingsRequest))
210 }
211 return interceptor(ctx, in, info, handler)
212 }
213
214 // AdvisoryNotificationsService_ServiceDesc is the grpc.ServiceDesc for AdvisoryNotificationsService service.
215 // It's only intended for direct use with grpc.RegisterService,
216 // and not to be introspected or modified (even as a copy)
217 var AdvisoryNotificationsService_ServiceDesc = grpc.ServiceDesc{
218 ServiceName: "google.cloud.advisorynotifications.v1.AdvisoryNotificationsService",
219 HandlerType: (*AdvisoryNotificationsServiceServer)(nil),
220 Methods: []grpc.MethodDesc{
221 {
222 MethodName: "ListNotifications",
223 Handler: _AdvisoryNotificationsService_ListNotifications_Handler,
224 },
225 {
226 MethodName: "GetNotification",
227 Handler: _AdvisoryNotificationsService_GetNotification_Handler,
228 },
229 {
230 MethodName: "GetSettings",
231 Handler: _AdvisoryNotificationsService_GetSettings_Handler,
232 },
233 {
234 MethodName: "UpdateSettings",
235 Handler: _AdvisoryNotificationsService_UpdateSettings_Handler,
236 },
237 },
238 Streams: []grpc.StreamDesc{},
239 Metadata: "google/cloud/advisorynotifications/v1/service.proto",
240 }