| 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/essentialcontacts/v1/service.proto |
| 20 |
|
| 21 |
package essentialcontactspb |
| 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 |
emptypb "google.golang.org/protobuf/types/known/emptypb" |
| 29 |
) |
| 30 |
|
| 31 |
// This is a compile-time assertion to ensure that this generated file |
| 32 |
// is compatible with the grpc package it is being compiled against. |
| 33 |
// Requires gRPC-Go v1.32.0 or later. |
| 34 |
const _ = grpc.SupportPackageIsVersion7 |
| 35 |
|
| 36 |
const ( |
| 37 |
EssentialContactsService_CreateContact_FullMethodName = "/google.cloud.essentialcontacts.v1.EssentialContactsService/CreateContact" |
| 38 |
EssentialContactsService_UpdateContact_FullMethodName = "/google.cloud.essentialcontacts.v1.EssentialContactsService/UpdateContact" |
| 39 |
EssentialContactsService_ListContacts_FullMethodName = "/google.cloud.essentialcontacts.v1.EssentialContactsService/ListContacts" |
| 40 |
EssentialContactsService_GetContact_FullMethodName = "/google.cloud.essentialcontacts.v1.EssentialContactsService/GetContact" |
| 41 |
EssentialContactsService_DeleteContact_FullMethodName = "/google.cloud.essentialcontacts.v1.EssentialContactsService/DeleteContact" |
| 42 |
EssentialContactsService_ComputeContacts_FullMethodName = "/google.cloud.essentialcontacts.v1.EssentialContactsService/ComputeContacts" |
| 43 |
EssentialContactsService_SendTestMessage_FullMethodName = "/google.cloud.essentialcontacts.v1.EssentialContactsService/SendTestMessage" |
| 44 |
) |
| 45 |
|
| 46 |
// EssentialContactsServiceClient is the client API for EssentialContactsService service. |
| 47 |
// |
| 48 |
// 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. |
| 49 |
type EssentialContactsServiceClient interface { |
| 50 |
// Adds a new contact for a resource. |
| 51 |
CreateContact(ctx context.Context, in *CreateContactRequest, opts ...grpc.CallOption) (*Contact, error) |
| 52 |
// Updates a contact. |
| 53 |
// Note: A contact's email address cannot be changed. |
| 54 |
UpdateContact(ctx context.Context, in *UpdateContactRequest, opts ...grpc.CallOption) (*Contact, error) |
| 55 |
// Lists the contacts that have been set on a resource. |
| 56 |
ListContacts(ctx context.Context, in *ListContactsRequest, opts ...grpc.CallOption) (*ListContactsResponse, error) |
| 57 |
// Gets a single contact. |
| 58 |
GetContact(ctx context.Context, in *GetContactRequest, opts ...grpc.CallOption) (*Contact, error) |
| 59 |
// Deletes a contact. |
| 60 |
DeleteContact(ctx context.Context, in *DeleteContactRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) |
| 61 |
// Lists all contacts for the resource that are subscribed to the |
| 62 |
// specified notification categories, including contacts inherited from |
| 63 |
// any parent resources. |
| 64 |
ComputeContacts(ctx context.Context, in *ComputeContactsRequest, opts ...grpc.CallOption) (*ComputeContactsResponse, error) |
| 65 |
// Allows a contact admin to send a test message to contact to verify that it |
| 66 |
// has been configured correctly. |
| 67 |
SendTestMessage(ctx context.Context, in *SendTestMessageRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) |
| 68 |
} |
| 69 |
|
| 70 |
type essentialContactsServiceClient struct { |
| 71 |
cc grpc.ClientConnInterface |
| 72 |
} |
| 73 |
|
| 74 |
func NewEssentialContactsServiceClient(cc grpc.ClientConnInterface) EssentialContactsServiceClient { |
| 75 |
return &essentialContactsServiceClient{cc} |
| 76 |
} |
| 77 |
|
| 78 |
func (c *essentialContactsServiceClient) CreateContact(ctx context.Context, in *CreateContactRequest, opts ...grpc.CallOption) (*Contact, error) { |
| 79 |
out := new(Contact) |
| 80 |
err := c.cc.Invoke(ctx, EssentialContactsService_CreateContact_FullMethodName, in, out, opts...) |
| 81 |
if err != nil { |
| 82 |
return nil, err |
| 83 |
} |
| 84 |
return out, nil |
| 85 |
} |
| 86 |
|
| 87 |
func (c *essentialContactsServiceClient) UpdateContact(ctx context.Context, in *UpdateContactRequest, opts ...grpc.CallOption) (*Contact, error) { |
| 88 |
out := new(Contact) |
| 89 |
err := c.cc.Invoke(ctx, EssentialContactsService_UpdateContact_FullMethodName, in, out, opts...) |
| 90 |
if err != nil { |
| 91 |
return nil, err |
| 92 |
} |
| 93 |
return out, nil |
| 94 |
} |
| 95 |
|
| 96 |
func (c *essentialContactsServiceClient) ListContacts(ctx context.Context, in *ListContactsRequest, opts ...grpc.CallOption) (*ListContactsResponse, error) { |
| 97 |
out := new(ListContactsResponse) |
| 98 |
err := c.cc.Invoke(ctx, EssentialContactsService_ListContacts_FullMethodName, in, out, opts...) |
| 99 |
if err != nil { |
| 100 |
return nil, err |
| 101 |
} |
| 102 |
return out, nil |
| 103 |
} |
| 104 |
|
| 105 |
func (c *essentialContactsServiceClient) GetContact(ctx context.Context, in *GetContactRequest, opts ...grpc.CallOption) (*Contact, error) { |
| 106 |
out := new(Contact) |
| 107 |
err := c.cc.Invoke(ctx, EssentialContactsService_GetContact_FullMethodName, in, out, opts...) |
| 108 |
if err != nil { |
| 109 |
return nil, err |
| 110 |
} |
| 111 |
return out, nil |
| 112 |
} |
| 113 |
|
| 114 |
func (c *essentialContactsServiceClient) DeleteContact(ctx context.Context, in *DeleteContactRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { |
| 115 |
out := new(emptypb.Empty) |
| 116 |
err := c.cc.Invoke(ctx, EssentialContactsService_DeleteContact_FullMethodName, in, out, opts...) |
| 117 |
if err != nil { |
| 118 |
return nil, err |
| 119 |
} |
| 120 |
return out, nil |
| 121 |
} |
| 122 |
|
| 123 |
func (c *essentialContactsServiceClient) ComputeContacts(ctx context.Context, in *ComputeContactsRequest, opts ...grpc.CallOption) (*ComputeContactsResponse, error) { |
| 124 |
out := new(ComputeContactsResponse) |
| 125 |
err := c.cc.Invoke(ctx, EssentialContactsService_ComputeContacts_FullMethodName, in, out, opts...) |
| 126 |
if err != nil { |
| 127 |
return nil, err |
| 128 |
} |
| 129 |
return out, nil |
| 130 |
} |
| 131 |
|
| 132 |
func (c *essentialContactsServiceClient) SendTestMessage(ctx context.Context, in *SendTestMessageRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { |
| 133 |
out := new(emptypb.Empty) |
| 134 |
err := c.cc.Invoke(ctx, EssentialContactsService_SendTestMessage_FullMethodName, in, out, opts...) |
| 135 |
if err != nil { |
| 136 |
return nil, err |
| 137 |
} |
| 138 |
return out, nil |
| 139 |
} |
| 140 |
|
| 141 |
// EssentialContactsServiceServer is the server API for EssentialContactsService service. |
| 142 |
// All implementations should embed UnimplementedEssentialContactsServiceServer |
| 143 |
// for forward compatibility |
| 144 |
type EssentialContactsServiceServer interface { |
| 145 |
// Adds a new contact for a resource. |
| 146 |
CreateContact(context.Context, *CreateContactRequest) (*Contact, error) |
| 147 |
// Updates a contact. |
| 148 |
// Note: A contact's email address cannot be changed. |
| 149 |
UpdateContact(context.Context, *UpdateContactRequest) (*Contact, error) |
| 150 |
// Lists the contacts that have been set on a resource. |
| 151 |
ListContacts(context.Context, *ListContactsRequest) (*ListContactsResponse, error) |
| 152 |
// Gets a single contact. |
| 153 |
GetContact(context.Context, *GetContactRequest) (*Contact, error) |
| 154 |
// Deletes a contact. |
| 155 |
DeleteContact(context.Context, *DeleteContactRequest) (*emptypb.Empty, error) |
| 156 |
// Lists all contacts for the resource that are subscribed to the |
| 157 |
// specified notification categories, including contacts inherited from |
| 158 |
// any parent resources. |
| 159 |
ComputeContacts(context.Context, *ComputeContactsRequest) (*ComputeContactsResponse, error) |
| 160 |
// Allows a contact admin to send a test message to contact to verify that it |
| 161 |
// has been configured correctly. |
| 162 |
SendTestMessage(context.Context, *SendTestMessageRequest) (*emptypb.Empty, error) |
| 163 |
} |
| 164 |
|
| 165 |
// UnimplementedEssentialContactsServiceServer should be embedded to have forward compatible implementations. |
| 166 |
type UnimplementedEssentialContactsServiceServer struct { |
| 167 |
} |
| 168 |
|
| 169 |
func (UnimplementedEssentialContactsServiceServer) CreateContact(context.Context, *CreateContactRequest) (*Contact, error) { |
| 170 |
return nil, status.Errorf(codes.Unimplemented, "method CreateContact not implemented") |
| 171 |
} |
| 172 |
func (UnimplementedEssentialContactsServiceServer) UpdateContact(context.Context, *UpdateContactRequest) (*Contact, error) { |
| 173 |
return nil, status.Errorf(codes.Unimplemented, "method UpdateContact not implemented") |
| 174 |
} |
| 175 |
func (UnimplementedEssentialContactsServiceServer) ListContacts(context.Context, *ListContactsRequest) (*ListContactsResponse, error) { |
| 176 |
return nil, status.Errorf(codes.Unimplemented, "method ListContacts not implemented") |
| 177 |
} |
| 178 |
func (UnimplementedEssentialContactsServiceServer) GetContact(context.Context, *GetContactRequest) (*Contact, error) { |
| 179 |
return nil, status.Errorf(codes.Unimplemented, "method GetContact not implemented") |
| 180 |
} |
| 181 |
func (UnimplementedEssentialContactsServiceServer) DeleteContact(context.Context, *DeleteContactRequest) (*emptypb.Empty, error) { |
| 182 |
return nil, status.Errorf(codes.Unimplemented, "method DeleteContact not implemented") |
| 183 |
} |
| 184 |
func (UnimplementedEssentialContactsServiceServer) ComputeContacts(context.Context, *ComputeContactsRequest) (*ComputeContactsResponse, error) { |
| 185 |
return nil, status.Errorf(codes.Unimplemented, "method ComputeContacts not implemented") |
| 186 |
} |
| 187 |
func (UnimplementedEssentialContactsServiceServer) SendTestMessage(context.Context, *SendTestMessageRequest) (*emptypb.Empty, error) { |
| 188 |
return nil, status.Errorf(codes.Unimplemented, "method SendTestMessage not implemented") |
| 189 |
} |
| 190 |
|
| 191 |
// UnsafeEssentialContactsServiceServer may be embedded to opt out of forward compatibility for this service. |
| 192 |
// Use of this interface is not recommended, as added methods to EssentialContactsServiceServer will |
| 193 |
// result in compilation errors. |
| 194 |
type UnsafeEssentialContactsServiceServer interface { |
| 195 |
mustEmbedUnimplementedEssentialContactsServiceServer() |
| 196 |
} |
| 197 |
|
| 198 |
func RegisterEssentialContactsServiceServer(s grpc.ServiceRegistrar, srv EssentialContactsServiceServer) { |
| 199 |
s.RegisterService(&EssentialContactsService_ServiceDesc, srv) |
| 200 |
} |
| 201 |
|
| 202 |
func _EssentialContactsService_CreateContact_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 203 |
in := new(CreateContactRequest) |
| 204 |
if err := dec(in); err != nil { |
| 205 |
return nil, err |
| 206 |
} |
| 207 |
if interceptor == nil { |
| 208 |
return srv.(EssentialContactsServiceServer).CreateContact(ctx, in) |
| 209 |
} |
| 210 |
info := &grpc.UnaryServerInfo{ |
| 211 |
Server: srv, |
| 212 |
FullMethod: EssentialContactsService_CreateContact_FullMethodName, |
| 213 |
} |
| 214 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 215 |
return srv.(EssentialContactsServiceServer).CreateContact(ctx, req.(*CreateContactRequest)) |
| 216 |
} |
| 217 |
return interceptor(ctx, in, info, handler) |
| 218 |
} |
| 219 |
|
| 220 |
func _EssentialContactsService_UpdateContact_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 221 |
in := new(UpdateContactRequest) |
| 222 |
if err := dec(in); err != nil { |
| 223 |
return nil, err |
| 224 |
} |
| 225 |
if interceptor == nil { |
| 226 |
return srv.(EssentialContactsServiceServer).UpdateContact(ctx, in) |
| 227 |
} |
| 228 |
info := &grpc.UnaryServerInfo{ |
| 229 |
Server: srv, |
| 230 |
FullMethod: EssentialContactsService_UpdateContact_FullMethodName, |
| 231 |
} |
| 232 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 233 |
return srv.(EssentialContactsServiceServer).UpdateContact(ctx, req.(*UpdateContactRequest)) |
| 234 |
} |
| 235 |
return interceptor(ctx, in, info, handler) |
| 236 |
} |
| 237 |
|
| 238 |
func _EssentialContactsService_ListContacts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 239 |
in := new(ListContactsRequest) |
| 240 |
if err := dec(in); err != nil { |
| 241 |
return nil, err |
| 242 |
} |
| 243 |
if interceptor == nil { |
| 244 |
return srv.(EssentialContactsServiceServer).ListContacts(ctx, in) |
| 245 |
} |
| 246 |
info := &grpc.UnaryServerInfo{ |
| 247 |
Server: srv, |
| 248 |
FullMethod: EssentialContactsService_ListContacts_FullMethodName, |
| 249 |
} |
| 250 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 251 |
return srv.(EssentialContactsServiceServer).ListContacts(ctx, req.(*ListContactsRequest)) |
| 252 |
} |
| 253 |
return interceptor(ctx, in, info, handler) |
| 254 |
} |
| 255 |
|
| 256 |
func _EssentialContactsService_GetContact_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 257 |
in := new(GetContactRequest) |
| 258 |
if err := dec(in); err != nil { |
| 259 |
return nil, err |
| 260 |
} |
| 261 |
if interceptor == nil { |
| 262 |
return srv.(EssentialContactsServiceServer).GetContact(ctx, in) |
| 263 |
} |
| 264 |
info := &grpc.UnaryServerInfo{ |
| 265 |
Server: srv, |
| 266 |
FullMethod: EssentialContactsService_GetContact_FullMethodName, |
| 267 |
} |
| 268 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 269 |
return srv.(EssentialContactsServiceServer).GetContact(ctx, req.(*GetContactRequest)) |
| 270 |
} |
| 271 |
return interceptor(ctx, in, info, handler) |
| 272 |
} |
| 273 |
|
| 274 |
func _EssentialContactsService_DeleteContact_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 275 |
in := new(DeleteContactRequest) |
| 276 |
if err := dec(in); err != nil { |
| 277 |
return nil, err |
| 278 |
} |
| 279 |
if interceptor == nil { |
| 280 |
return srv.(EssentialContactsServiceServer).DeleteContact(ctx, in) |
| 281 |
} |
| 282 |
info := &grpc.UnaryServerInfo{ |
| 283 |
Server: srv, |
| 284 |
FullMethod: EssentialContactsService_DeleteContact_FullMethodName, |
| 285 |
} |
| 286 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 287 |
return srv.(EssentialContactsServiceServer).DeleteContact(ctx, req.(*DeleteContactRequest)) |
| 288 |
} |
| 289 |
return interceptor(ctx, in, info, handler) |
| 290 |
} |
| 291 |
|
| 292 |
func _EssentialContactsService_ComputeContacts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 293 |
in := new(ComputeContactsRequest) |
| 294 |
if err := dec(in); err != nil { |
| 295 |
return nil, err |
| 296 |
} |
| 297 |
if interceptor == nil { |
| 298 |
return srv.(EssentialContactsServiceServer).ComputeContacts(ctx, in) |
| 299 |
} |
| 300 |
info := &grpc.UnaryServerInfo{ |
| 301 |
Server: srv, |
| 302 |
FullMethod: EssentialContactsService_ComputeContacts_FullMethodName, |
| 303 |
} |
| 304 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 305 |
return srv.(EssentialContactsServiceServer).ComputeContacts(ctx, req.(*ComputeContactsRequest)) |
| 306 |
} |
| 307 |
return interceptor(ctx, in, info, handler) |
| 308 |
} |
| 309 |
|
| 310 |
func _EssentialContactsService_SendTestMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 311 |
in := new(SendTestMessageRequest) |
| 312 |
if err := dec(in); err != nil { |
| 313 |
return nil, err |
| 314 |
} |
| 315 |
if interceptor == nil { |
| 316 |
return srv.(EssentialContactsServiceServer).SendTestMessage(ctx, in) |
| 317 |
} |
| 318 |
info := &grpc.UnaryServerInfo{ |
| 319 |
Server: srv, |
| 320 |
FullMethod: EssentialContactsService_SendTestMessage_FullMethodName, |
| 321 |
} |
| 322 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 323 |
return srv.(EssentialContactsServiceServer).SendTestMessage(ctx, req.(*SendTestMessageRequest)) |
| 324 |
} |
| 325 |
return interceptor(ctx, in, info, handler) |
| 326 |
} |
| 327 |
|
| 328 |
// EssentialContactsService_ServiceDesc is the grpc.ServiceDesc for EssentialContactsService service. |
| 329 |
// It's only intended for direct use with grpc.RegisterService, |
| 330 |
// and not to be introspected or modified (even as a copy) |
| 331 |
var EssentialContactsService_ServiceDesc = grpc.ServiceDesc{ |
| 332 |
ServiceName: "google.cloud.essentialcontacts.v1.EssentialContactsService", |
| 333 |
HandlerType: (*EssentialContactsServiceServer)(nil), |
| 334 |
Methods: []grpc.MethodDesc{ |
| 335 |
{ |
| 336 |
MethodName: "CreateContact", |
| 337 |
Handler: _EssentialContactsService_CreateContact_Handler, |
| 338 |
}, |
| 339 |
{ |
| 340 |
MethodName: "UpdateContact", |
| 341 |
Handler: _EssentialContactsService_UpdateContact_Handler, |
| 342 |
}, |
| 343 |
{ |
| 344 |
MethodName: "ListContacts", |
| 345 |
Handler: _EssentialContactsService_ListContacts_Handler, |
| 346 |
}, |
| 347 |
{ |
| 348 |
MethodName: "GetContact", |
| 349 |
Handler: _EssentialContactsService_GetContact_Handler, |
| 350 |
}, |
| 351 |
{ |
| 352 |
MethodName: "DeleteContact", |
| 353 |
Handler: _EssentialContactsService_DeleteContact_Handler, |
| 354 |
}, |
| 355 |
{ |
| 356 |
MethodName: "ComputeContacts", |
| 357 |
Handler: _EssentialContactsService_ComputeContacts_Handler, |
| 358 |
}, |
| 359 |
{ |
| 360 |
MethodName: "SendTestMessage", |
| 361 |
Handler: _EssentialContactsService_SendTestMessage_Handler, |
| 362 |
}, |
| 363 |
}, |
| 364 |
Streams: []grpc.StreamDesc{}, |
| 365 |
Metadata: "google/cloud/essentialcontacts/v1/service.proto", |
| 366 |
} |