// 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/shopping/merchant/notifications/v1beta/notificationsapi.proto package notificationspb import ( context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" emptypb "google.golang.org/protobuf/types/known/emptypb" ) // 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 ( NotificationsApiService_GetNotificationSubscription_FullMethodName = "/google.shopping.merchant.notifications.v1beta.NotificationsApiService/GetNotificationSubscription" NotificationsApiService_CreateNotificationSubscription_FullMethodName = "/google.shopping.merchant.notifications.v1beta.NotificationsApiService/CreateNotificationSubscription" NotificationsApiService_UpdateNotificationSubscription_FullMethodName = "/google.shopping.merchant.notifications.v1beta.NotificationsApiService/UpdateNotificationSubscription" NotificationsApiService_DeleteNotificationSubscription_FullMethodName = "/google.shopping.merchant.notifications.v1beta.NotificationsApiService/DeleteNotificationSubscription" NotificationsApiService_ListNotificationSubscriptions_FullMethodName = "/google.shopping.merchant.notifications.v1beta.NotificationsApiService/ListNotificationSubscriptions" ) // NotificationsApiServiceClient is the client API for NotificationsApiService 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 NotificationsApiServiceClient interface { // Gets notification subscriptions for an account. GetNotificationSubscription(ctx context.Context, in *GetNotificationSubscriptionRequest, opts ...grpc.CallOption) (*NotificationSubscription, error) // Creates a notification subscription for a merchant. We will allow the // following types of notification subscriptions to exist together (per // merchant as a subscriber per event type): // 1. Subscription for all managed accounts + subscription for self // 2. Multiple "partial" subscriptions for managed accounts + subscription // for self // // we will not allow (per merchant as a subscriber per event type): // 1. multiple self subscriptions. // 2. multiple "all managed accounts" subscriptions. // 3. all and partial subscriptions at the same time. // 4. multiple partial subscriptions for the same target account CreateNotificationSubscription(ctx context.Context, in *CreateNotificationSubscriptionRequest, opts ...grpc.CallOption) (*NotificationSubscription, error) // Updates an existing notification subscription for a merchant. UpdateNotificationSubscription(ctx context.Context, in *UpdateNotificationSubscriptionRequest, opts ...grpc.CallOption) (*NotificationSubscription, error) // Deletes a notification subscription for a merchant. DeleteNotificationSubscription(ctx context.Context, in *DeleteNotificationSubscriptionRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // Gets all the notification subscriptions for a merchant. ListNotificationSubscriptions(ctx context.Context, in *ListNotificationSubscriptionsRequest, opts ...grpc.CallOption) (*ListNotificationSubscriptionsResponse, error) } type notificationsApiServiceClient struct { cc grpc.ClientConnInterface } func NewNotificationsApiServiceClient(cc grpc.ClientConnInterface) NotificationsApiServiceClient { return ¬ificationsApiServiceClient{cc} } func (c *notificationsApiServiceClient) GetNotificationSubscription(ctx context.Context, in *GetNotificationSubscriptionRequest, opts ...grpc.CallOption) (*NotificationSubscription, error) { out := new(NotificationSubscription) err := c.cc.Invoke(ctx, NotificationsApiService_GetNotificationSubscription_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *notificationsApiServiceClient) CreateNotificationSubscription(ctx context.Context, in *CreateNotificationSubscriptionRequest, opts ...grpc.CallOption) (*NotificationSubscription, error) { out := new(NotificationSubscription) err := c.cc.Invoke(ctx, NotificationsApiService_CreateNotificationSubscription_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *notificationsApiServiceClient) UpdateNotificationSubscription(ctx context.Context, in *UpdateNotificationSubscriptionRequest, opts ...grpc.CallOption) (*NotificationSubscription, error) { out := new(NotificationSubscription) err := c.cc.Invoke(ctx, NotificationsApiService_UpdateNotificationSubscription_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *notificationsApiServiceClient) DeleteNotificationSubscription(ctx context.Context, in *DeleteNotificationSubscriptionRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) err := c.cc.Invoke(ctx, NotificationsApiService_DeleteNotificationSubscription_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *notificationsApiServiceClient) ListNotificationSubscriptions(ctx context.Context, in *ListNotificationSubscriptionsRequest, opts ...grpc.CallOption) (*ListNotificationSubscriptionsResponse, error) { out := new(ListNotificationSubscriptionsResponse) err := c.cc.Invoke(ctx, NotificationsApiService_ListNotificationSubscriptions_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } // NotificationsApiServiceServer is the server API for NotificationsApiService service. // All implementations should embed UnimplementedNotificationsApiServiceServer // for forward compatibility type NotificationsApiServiceServer interface { // Gets notification subscriptions for an account. GetNotificationSubscription(context.Context, *GetNotificationSubscriptionRequest) (*NotificationSubscription, error) // Creates a notification subscription for a merchant. We will allow the // following types of notification subscriptions to exist together (per // merchant as a subscriber per event type): // 1. Subscription for all managed accounts + subscription for self // 2. Multiple "partial" subscriptions for managed accounts + subscription // for self // // we will not allow (per merchant as a subscriber per event type): // 1. multiple self subscriptions. // 2. multiple "all managed accounts" subscriptions. // 3. all and partial subscriptions at the same time. // 4. multiple partial subscriptions for the same target account CreateNotificationSubscription(context.Context, *CreateNotificationSubscriptionRequest) (*NotificationSubscription, error) // Updates an existing notification subscription for a merchant. UpdateNotificationSubscription(context.Context, *UpdateNotificationSubscriptionRequest) (*NotificationSubscription, error) // Deletes a notification subscription for a merchant. DeleteNotificationSubscription(context.Context, *DeleteNotificationSubscriptionRequest) (*emptypb.Empty, error) // Gets all the notification subscriptions for a merchant. ListNotificationSubscriptions(context.Context, *ListNotificationSubscriptionsRequest) (*ListNotificationSubscriptionsResponse, error) } // UnimplementedNotificationsApiServiceServer should be embedded to have forward compatible implementations. type UnimplementedNotificationsApiServiceServer struct { } func (UnimplementedNotificationsApiServiceServer) GetNotificationSubscription(context.Context, *GetNotificationSubscriptionRequest) (*NotificationSubscription, error) { return nil, status.Errorf(codes.Unimplemented, "method GetNotificationSubscription not implemented") } func (UnimplementedNotificationsApiServiceServer) CreateNotificationSubscription(context.Context, *CreateNotificationSubscriptionRequest) (*NotificationSubscription, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateNotificationSubscription not implemented") } func (UnimplementedNotificationsApiServiceServer) UpdateNotificationSubscription(context.Context, *UpdateNotificationSubscriptionRequest) (*NotificationSubscription, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateNotificationSubscription not implemented") } func (UnimplementedNotificationsApiServiceServer) DeleteNotificationSubscription(context.Context, *DeleteNotificationSubscriptionRequest) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteNotificationSubscription not implemented") } func (UnimplementedNotificationsApiServiceServer) ListNotificationSubscriptions(context.Context, *ListNotificationSubscriptionsRequest) (*ListNotificationSubscriptionsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListNotificationSubscriptions not implemented") } // UnsafeNotificationsApiServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to NotificationsApiServiceServer will // result in compilation errors. type UnsafeNotificationsApiServiceServer interface { mustEmbedUnimplementedNotificationsApiServiceServer() } func RegisterNotificationsApiServiceServer(s grpc.ServiceRegistrar, srv NotificationsApiServiceServer) { s.RegisterService(&NotificationsApiService_ServiceDesc, srv) } func _NotificationsApiService_GetNotificationSubscription_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetNotificationSubscriptionRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(NotificationsApiServiceServer).GetNotificationSubscription(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: NotificationsApiService_GetNotificationSubscription_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(NotificationsApiServiceServer).GetNotificationSubscription(ctx, req.(*GetNotificationSubscriptionRequest)) } return interceptor(ctx, in, info, handler) } func _NotificationsApiService_CreateNotificationSubscription_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(CreateNotificationSubscriptionRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(NotificationsApiServiceServer).CreateNotificationSubscription(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: NotificationsApiService_CreateNotificationSubscription_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(NotificationsApiServiceServer).CreateNotificationSubscription(ctx, req.(*CreateNotificationSubscriptionRequest)) } return interceptor(ctx, in, info, handler) } func _NotificationsApiService_UpdateNotificationSubscription_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(UpdateNotificationSubscriptionRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(NotificationsApiServiceServer).UpdateNotificationSubscription(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: NotificationsApiService_UpdateNotificationSubscription_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(NotificationsApiServiceServer).UpdateNotificationSubscription(ctx, req.(*UpdateNotificationSubscriptionRequest)) } return interceptor(ctx, in, info, handler) } func _NotificationsApiService_DeleteNotificationSubscription_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(DeleteNotificationSubscriptionRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(NotificationsApiServiceServer).DeleteNotificationSubscription(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: NotificationsApiService_DeleteNotificationSubscription_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(NotificationsApiServiceServer).DeleteNotificationSubscription(ctx, req.(*DeleteNotificationSubscriptionRequest)) } return interceptor(ctx, in, info, handler) } func _NotificationsApiService_ListNotificationSubscriptions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ListNotificationSubscriptionsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(NotificationsApiServiceServer).ListNotificationSubscriptions(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: NotificationsApiService_ListNotificationSubscriptions_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(NotificationsApiServiceServer).ListNotificationSubscriptions(ctx, req.(*ListNotificationSubscriptionsRequest)) } return interceptor(ctx, in, info, handler) } // NotificationsApiService_ServiceDesc is the grpc.ServiceDesc for NotificationsApiService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var NotificationsApiService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "google.shopping.merchant.notifications.v1beta.NotificationsApiService", HandlerType: (*NotificationsApiServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetNotificationSubscription", Handler: _NotificationsApiService_GetNotificationSubscription_Handler, }, { MethodName: "CreateNotificationSubscription", Handler: _NotificationsApiService_CreateNotificationSubscription_Handler, }, { MethodName: "UpdateNotificationSubscription", Handler: _NotificationsApiService_UpdateNotificationSubscription_Handler, }, { MethodName: "DeleteNotificationSubscription", Handler: _NotificationsApiService_DeleteNotificationSubscription_Handler, }, { MethodName: "ListNotificationSubscriptions", Handler: _NotificationsApiService_ListNotificationSubscriptions_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "google/shopping/merchant/notifications/v1beta/notificationsapi.proto", }