// 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/apps/events/subscriptions/v1/subscriptions_service.proto

package subscriptionspb

import (
	longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
	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 (
	SubscriptionsService_CreateSubscription_FullMethodName     = "/google.apps.events.subscriptions.v1.SubscriptionsService/CreateSubscription"
	SubscriptionsService_DeleteSubscription_FullMethodName     = "/google.apps.events.subscriptions.v1.SubscriptionsService/DeleteSubscription"
	SubscriptionsService_GetSubscription_FullMethodName        = "/google.apps.events.subscriptions.v1.SubscriptionsService/GetSubscription"
	SubscriptionsService_ListSubscriptions_FullMethodName      = "/google.apps.events.subscriptions.v1.SubscriptionsService/ListSubscriptions"
	SubscriptionsService_UpdateSubscription_FullMethodName     = "/google.apps.events.subscriptions.v1.SubscriptionsService/UpdateSubscription"
	SubscriptionsService_ReactivateSubscription_FullMethodName = "/google.apps.events.subscriptions.v1.SubscriptionsService/ReactivateSubscription"
)

// SubscriptionsServiceClient is the client API for SubscriptionsService 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 SubscriptionsServiceClient interface {
	// Creates a Google Workspace subscription. To learn how to use this
	// method, see [Create a Google Workspace
	// subscription](https://developers.google.com/workspace/events/guides/create-subscription).
	CreateSubscription(ctx context.Context, in *CreateSubscriptionRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error)
	// Deletes a Google Workspace subscription.
	// To learn how to use this method, see [Delete a Google Workspace
	// subscription](https://developers.google.com/workspace/events/guides/delete-subscription).
	DeleteSubscription(ctx context.Context, in *DeleteSubscriptionRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error)
	// Gets details about a Google Workspace subscription. To learn how to use
	// this method, see [Get details about a Google Workspace
	// subscription](https://developers.google.com/workspace/events/guides/get-subscription).
	GetSubscription(ctx context.Context, in *GetSubscriptionRequest, opts ...grpc.CallOption) (*Subscription, error)
	// Lists Google Workspace subscriptions. To learn how to use this method, see
	// [List Google Workspace
	// subscriptions](https://developers.google.com/workspace/events/guides/list-subscriptions).
	ListSubscriptions(ctx context.Context, in *ListSubscriptionsRequest, opts ...grpc.CallOption) (*ListSubscriptionsResponse, error)
	// Updates or renews a Google Workspace subscription. To learn how to use this
	// method, see [Update or renew a Google Workspace
	// subscription](https://developers.google.com/workspace/events/guides/update-subscription).
	UpdateSubscription(ctx context.Context, in *UpdateSubscriptionRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error)
	// Reactivates a suspended Google Workspace subscription.
	//
	// This method resets your subscription's `State` field to `ACTIVE`. Before
	// you use this method, you must fix the error that suspended the
	// subscription. To learn how to use this method, see [Reactivate a Google
	// Workspace
	// subscription](https://developers.google.com/workspace/events/guides/reactivate-subscription).
	ReactivateSubscription(ctx context.Context, in *ReactivateSubscriptionRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error)
}

type subscriptionsServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewSubscriptionsServiceClient(cc grpc.ClientConnInterface) SubscriptionsServiceClient {
	return &subscriptionsServiceClient{cc}
}

func (c *subscriptionsServiceClient) CreateSubscription(ctx context.Context, in *CreateSubscriptionRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) {
	out := new(longrunningpb.Operation)
	err := c.cc.Invoke(ctx, SubscriptionsService_CreateSubscription_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *subscriptionsServiceClient) DeleteSubscription(ctx context.Context, in *DeleteSubscriptionRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) {
	out := new(longrunningpb.Operation)
	err := c.cc.Invoke(ctx, SubscriptionsService_DeleteSubscription_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *subscriptionsServiceClient) GetSubscription(ctx context.Context, in *GetSubscriptionRequest, opts ...grpc.CallOption) (*Subscription, error) {
	out := new(Subscription)
	err := c.cc.Invoke(ctx, SubscriptionsService_GetSubscription_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *subscriptionsServiceClient) ListSubscriptions(ctx context.Context, in *ListSubscriptionsRequest, opts ...grpc.CallOption) (*ListSubscriptionsResponse, error) {
	out := new(ListSubscriptionsResponse)
	err := c.cc.Invoke(ctx, SubscriptionsService_ListSubscriptions_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *subscriptionsServiceClient) UpdateSubscription(ctx context.Context, in *UpdateSubscriptionRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) {
	out := new(longrunningpb.Operation)
	err := c.cc.Invoke(ctx, SubscriptionsService_UpdateSubscription_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *subscriptionsServiceClient) ReactivateSubscription(ctx context.Context, in *ReactivateSubscriptionRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) {
	out := new(longrunningpb.Operation)
	err := c.cc.Invoke(ctx, SubscriptionsService_ReactivateSubscription_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// SubscriptionsServiceServer is the server API for SubscriptionsService service.
// All implementations should embed UnimplementedSubscriptionsServiceServer
// for forward compatibility
type SubscriptionsServiceServer interface {
	// Creates a Google Workspace subscription. To learn how to use this
	// method, see [Create a Google Workspace
	// subscription](https://developers.google.com/workspace/events/guides/create-subscription).
	CreateSubscription(context.Context, *CreateSubscriptionRequest) (*longrunningpb.Operation, error)
	// Deletes a Google Workspace subscription.
	// To learn how to use this method, see [Delete a Google Workspace
	// subscription](https://developers.google.com/workspace/events/guides/delete-subscription).
	DeleteSubscription(context.Context, *DeleteSubscriptionRequest) (*longrunningpb.Operation, error)
	// Gets details about a Google Workspace subscription. To learn how to use
	// this method, see [Get details about a Google Workspace
	// subscription](https://developers.google.com/workspace/events/guides/get-subscription).
	GetSubscription(context.Context, *GetSubscriptionRequest) (*Subscription, error)
	// Lists Google Workspace subscriptions. To learn how to use this method, see
	// [List Google Workspace
	// subscriptions](https://developers.google.com/workspace/events/guides/list-subscriptions).
	ListSubscriptions(context.Context, *ListSubscriptionsRequest) (*ListSubscriptionsResponse, error)
	// Updates or renews a Google Workspace subscription. To learn how to use this
	// method, see [Update or renew a Google Workspace
	// subscription](https://developers.google.com/workspace/events/guides/update-subscription).
	UpdateSubscription(context.Context, *UpdateSubscriptionRequest) (*longrunningpb.Operation, error)
	// Reactivates a suspended Google Workspace subscription.
	//
	// This method resets your subscription's `State` field to `ACTIVE`. Before
	// you use this method, you must fix the error that suspended the
	// subscription. To learn how to use this method, see [Reactivate a Google
	// Workspace
	// subscription](https://developers.google.com/workspace/events/guides/reactivate-subscription).
	ReactivateSubscription(context.Context, *ReactivateSubscriptionRequest) (*longrunningpb.Operation, error)
}

// UnimplementedSubscriptionsServiceServer should be embedded to have forward compatible implementations.
type UnimplementedSubscriptionsServiceServer struct {
}

func (UnimplementedSubscriptionsServiceServer) CreateSubscription(context.Context, *CreateSubscriptionRequest) (*longrunningpb.Operation, error) {
	return nil, status.Errorf(codes.Unimplemented, "method CreateSubscription not implemented")
}
func (UnimplementedSubscriptionsServiceServer) DeleteSubscription(context.Context, *DeleteSubscriptionRequest) (*longrunningpb.Operation, error) {
	return nil, status.Errorf(codes.Unimplemented, "method DeleteSubscription not implemented")
}
func (UnimplementedSubscriptionsServiceServer) GetSubscription(context.Context, *GetSubscriptionRequest) (*Subscription, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetSubscription not implemented")
}
func (UnimplementedSubscriptionsServiceServer) ListSubscriptions(context.Context, *ListSubscriptionsRequest) (*ListSubscriptionsResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ListSubscriptions not implemented")
}
func (UnimplementedSubscriptionsServiceServer) UpdateSubscription(context.Context, *UpdateSubscriptionRequest) (*longrunningpb.Operation, error) {
	return nil, status.Errorf(codes.Unimplemented, "method UpdateSubscription not implemented")
}
func (UnimplementedSubscriptionsServiceServer) ReactivateSubscription(context.Context, *ReactivateSubscriptionRequest) (*longrunningpb.Operation, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ReactivateSubscription not implemented")
}

// UnsafeSubscriptionsServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to SubscriptionsServiceServer will
// result in compilation errors.
type UnsafeSubscriptionsServiceServer interface {
	mustEmbedUnimplementedSubscriptionsServiceServer()
}

func RegisterSubscriptionsServiceServer(s grpc.ServiceRegistrar, srv SubscriptionsServiceServer) {
	s.RegisterService(&SubscriptionsService_ServiceDesc, srv)
}

func _SubscriptionsService_CreateSubscription_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(CreateSubscriptionRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(SubscriptionsServiceServer).CreateSubscription(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: SubscriptionsService_CreateSubscription_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(SubscriptionsServiceServer).CreateSubscription(ctx, req.(*CreateSubscriptionRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _SubscriptionsService_DeleteSubscription_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(DeleteSubscriptionRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(SubscriptionsServiceServer).DeleteSubscription(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: SubscriptionsService_DeleteSubscription_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(SubscriptionsServiceServer).DeleteSubscription(ctx, req.(*DeleteSubscriptionRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _SubscriptionsService_GetSubscription_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetSubscriptionRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(SubscriptionsServiceServer).GetSubscription(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: SubscriptionsService_GetSubscription_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(SubscriptionsServiceServer).GetSubscription(ctx, req.(*GetSubscriptionRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _SubscriptionsService_ListSubscriptions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ListSubscriptionsRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(SubscriptionsServiceServer).ListSubscriptions(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: SubscriptionsService_ListSubscriptions_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(SubscriptionsServiceServer).ListSubscriptions(ctx, req.(*ListSubscriptionsRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _SubscriptionsService_UpdateSubscription_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(UpdateSubscriptionRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(SubscriptionsServiceServer).UpdateSubscription(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: SubscriptionsService_UpdateSubscription_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(SubscriptionsServiceServer).UpdateSubscription(ctx, req.(*UpdateSubscriptionRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _SubscriptionsService_ReactivateSubscription_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ReactivateSubscriptionRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(SubscriptionsServiceServer).ReactivateSubscription(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: SubscriptionsService_ReactivateSubscription_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(SubscriptionsServiceServer).ReactivateSubscription(ctx, req.(*ReactivateSubscriptionRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// SubscriptionsService_ServiceDesc is the grpc.ServiceDesc for SubscriptionsService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var SubscriptionsService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "google.apps.events.subscriptions.v1.SubscriptionsService",
	HandlerType: (*SubscriptionsServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateSubscription",
			Handler:    _SubscriptionsService_CreateSubscription_Handler,
		},
		{
			MethodName: "DeleteSubscription",
			Handler:    _SubscriptionsService_DeleteSubscription_Handler,
		},
		{
			MethodName: "GetSubscription",
			Handler:    _SubscriptionsService_GetSubscription_Handler,
		},
		{
			MethodName: "ListSubscriptions",
			Handler:    _SubscriptionsService_ListSubscriptions_Handler,
		},
		{
			MethodName: "UpdateSubscription",
			Handler:    _SubscriptionsService_UpdateSubscription_Handler,
		},
		{
			MethodName: "ReactivateSubscription",
			Handler:    _SubscriptionsService_ReactivateSubscription_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "google/apps/events/subscriptions/v1/subscriptions_service.proto",
}
