// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc             v3.21.12
// source: yandex/cloud/cic/v1/trunk_connection_service.proto

package cic

import (
	context "context"
	operation "github.com/yandex-cloud/go-genproto/yandex/cloud/operation"
	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.64.0 or later.
const _ = grpc.SupportPackageIsVersion9

const (
	TrunkConnectionService_Get_FullMethodName            = "/yandex.cloud.cic.v1.TrunkConnectionService/Get"
	TrunkConnectionService_List_FullMethodName           = "/yandex.cloud.cic.v1.TrunkConnectionService/List"
	TrunkConnectionService_Create_FullMethodName         = "/yandex.cloud.cic.v1.TrunkConnectionService/Create"
	TrunkConnectionService_Update_FullMethodName         = "/yandex.cloud.cic.v1.TrunkConnectionService/Update"
	TrunkConnectionService_Delete_FullMethodName         = "/yandex.cloud.cic.v1.TrunkConnectionService/Delete"
	TrunkConnectionService_Move_FullMethodName           = "/yandex.cloud.cic.v1.TrunkConnectionService/Move"
	TrunkConnectionService_ListOperations_FullMethodName = "/yandex.cloud.cic.v1.TrunkConnectionService/ListOperations"
)

// TrunkConnectionServiceClient is the client API for TrunkConnectionService 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.
//
// A set of methods for managing TrunkConnection resources.
type TrunkConnectionServiceClient interface {
	// Returns the specified TrunkConnection resource.
	//
	// To get the list of available TrunkConnection resources, make a [List] request.
	Get(ctx context.Context, in *GetTrunkConnectionRequest, opts ...grpc.CallOption) (*TrunkConnection, error)
	// Retrieves the list of TrunkConnection resources in the specified folder.
	List(ctx context.Context, in *ListTrunkConnectionsRequest, opts ...grpc.CallOption) (*ListTrunkConnectionsResponse, error)
	// Creates a TrunkConnection resource in the specified folder using the data specified in the request.
	// Method starts an asynchronous operation that can be cancelled while it is in progress.
	Create(ctx context.Context, in *CreateTrunkConnectionRequest, opts ...grpc.CallOption) (*operation.Operation, error)
	// Updates a TrunkConnection resource using the data specified in the request.
	// Method starts an asynchronous operation that can be cancelled while it is in progress.
	Update(ctx context.Context, in *UpdateTrunkConnectionRequest, opts ...grpc.CallOption) (*operation.Operation, error)
	// Deletes a TrunkConnection resource.
	// Method starts an asynchronous operation that can be cancelled while it is in progress.
	Delete(ctx context.Context, in *DeleteTrunkConnectionRequest, opts ...grpc.CallOption) (*operation.Operation, error)
	// Moves the specified TrunkConnection to another folder.
	Move(ctx context.Context, in *MoveTrunkConnectionRequest, opts ...grpc.CallOption) (*operation.Operation, error)
	// Lists operations for the specified TrunkConnection.
	ListOperations(ctx context.Context, in *ListTrunkConnectionOperationsRequest, opts ...grpc.CallOption) (*ListTrunkConnectionOperationsResponse, error)
}

type trunkConnectionServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewTrunkConnectionServiceClient(cc grpc.ClientConnInterface) TrunkConnectionServiceClient {
	return &trunkConnectionServiceClient{cc}
}

func (c *trunkConnectionServiceClient) Get(ctx context.Context, in *GetTrunkConnectionRequest, opts ...grpc.CallOption) (*TrunkConnection, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(TrunkConnection)
	err := c.cc.Invoke(ctx, TrunkConnectionService_Get_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *trunkConnectionServiceClient) List(ctx context.Context, in *ListTrunkConnectionsRequest, opts ...grpc.CallOption) (*ListTrunkConnectionsResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(ListTrunkConnectionsResponse)
	err := c.cc.Invoke(ctx, TrunkConnectionService_List_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *trunkConnectionServiceClient) Create(ctx context.Context, in *CreateTrunkConnectionRequest, opts ...grpc.CallOption) (*operation.Operation, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(operation.Operation)
	err := c.cc.Invoke(ctx, TrunkConnectionService_Create_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *trunkConnectionServiceClient) Update(ctx context.Context, in *UpdateTrunkConnectionRequest, opts ...grpc.CallOption) (*operation.Operation, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(operation.Operation)
	err := c.cc.Invoke(ctx, TrunkConnectionService_Update_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *trunkConnectionServiceClient) Delete(ctx context.Context, in *DeleteTrunkConnectionRequest, opts ...grpc.CallOption) (*operation.Operation, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(operation.Operation)
	err := c.cc.Invoke(ctx, TrunkConnectionService_Delete_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *trunkConnectionServiceClient) Move(ctx context.Context, in *MoveTrunkConnectionRequest, opts ...grpc.CallOption) (*operation.Operation, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(operation.Operation)
	err := c.cc.Invoke(ctx, TrunkConnectionService_Move_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *trunkConnectionServiceClient) ListOperations(ctx context.Context, in *ListTrunkConnectionOperationsRequest, opts ...grpc.CallOption) (*ListTrunkConnectionOperationsResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(ListTrunkConnectionOperationsResponse)
	err := c.cc.Invoke(ctx, TrunkConnectionService_ListOperations_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// TrunkConnectionServiceServer is the server API for TrunkConnectionService service.
// All implementations should embed UnimplementedTrunkConnectionServiceServer
// for forward compatibility.
//
// A set of methods for managing TrunkConnection resources.
type TrunkConnectionServiceServer interface {
	// Returns the specified TrunkConnection resource.
	//
	// To get the list of available TrunkConnection resources, make a [List] request.
	Get(context.Context, *GetTrunkConnectionRequest) (*TrunkConnection, error)
	// Retrieves the list of TrunkConnection resources in the specified folder.
	List(context.Context, *ListTrunkConnectionsRequest) (*ListTrunkConnectionsResponse, error)
	// Creates a TrunkConnection resource in the specified folder using the data specified in the request.
	// Method starts an asynchronous operation that can be cancelled while it is in progress.
	Create(context.Context, *CreateTrunkConnectionRequest) (*operation.Operation, error)
	// Updates a TrunkConnection resource using the data specified in the request.
	// Method starts an asynchronous operation that can be cancelled while it is in progress.
	Update(context.Context, *UpdateTrunkConnectionRequest) (*operation.Operation, error)
	// Deletes a TrunkConnection resource.
	// Method starts an asynchronous operation that can be cancelled while it is in progress.
	Delete(context.Context, *DeleteTrunkConnectionRequest) (*operation.Operation, error)
	// Moves the specified TrunkConnection to another folder.
	Move(context.Context, *MoveTrunkConnectionRequest) (*operation.Operation, error)
	// Lists operations for the specified TrunkConnection.
	ListOperations(context.Context, *ListTrunkConnectionOperationsRequest) (*ListTrunkConnectionOperationsResponse, error)
}

// UnimplementedTrunkConnectionServiceServer should be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedTrunkConnectionServiceServer struct{}

func (UnimplementedTrunkConnectionServiceServer) Get(context.Context, *GetTrunkConnectionRequest) (*TrunkConnection, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
}
func (UnimplementedTrunkConnectionServiceServer) List(context.Context, *ListTrunkConnectionsRequest) (*ListTrunkConnectionsResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method List not implemented")
}
func (UnimplementedTrunkConnectionServiceServer) Create(context.Context, *CreateTrunkConnectionRequest) (*operation.Operation, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Create not implemented")
}
func (UnimplementedTrunkConnectionServiceServer) Update(context.Context, *UpdateTrunkConnectionRequest) (*operation.Operation, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Update not implemented")
}
func (UnimplementedTrunkConnectionServiceServer) Delete(context.Context, *DeleteTrunkConnectionRequest) (*operation.Operation, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented")
}
func (UnimplementedTrunkConnectionServiceServer) Move(context.Context, *MoveTrunkConnectionRequest) (*operation.Operation, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Move not implemented")
}
func (UnimplementedTrunkConnectionServiceServer) ListOperations(context.Context, *ListTrunkConnectionOperationsRequest) (*ListTrunkConnectionOperationsResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ListOperations not implemented")
}
func (UnimplementedTrunkConnectionServiceServer) testEmbeddedByValue() {}

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

func RegisterTrunkConnectionServiceServer(s grpc.ServiceRegistrar, srv TrunkConnectionServiceServer) {
	// If the following call pancis, it indicates UnimplementedTrunkConnectionServiceServer was
	// embedded by pointer and is nil.  This will cause panics if an
	// unimplemented method is ever invoked, so we test this at initialization
	// time to prevent it from happening at runtime later due to I/O.
	if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
		t.testEmbeddedByValue()
	}
	s.RegisterService(&TrunkConnectionService_ServiceDesc, srv)
}

func _TrunkConnectionService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetTrunkConnectionRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(TrunkConnectionServiceServer).Get(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: TrunkConnectionService_Get_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(TrunkConnectionServiceServer).Get(ctx, req.(*GetTrunkConnectionRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _TrunkConnectionService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ListTrunkConnectionsRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(TrunkConnectionServiceServer).List(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: TrunkConnectionService_List_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(TrunkConnectionServiceServer).List(ctx, req.(*ListTrunkConnectionsRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _TrunkConnectionService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(CreateTrunkConnectionRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(TrunkConnectionServiceServer).Create(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: TrunkConnectionService_Create_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(TrunkConnectionServiceServer).Create(ctx, req.(*CreateTrunkConnectionRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _TrunkConnectionService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(UpdateTrunkConnectionRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(TrunkConnectionServiceServer).Update(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: TrunkConnectionService_Update_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(TrunkConnectionServiceServer).Update(ctx, req.(*UpdateTrunkConnectionRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _TrunkConnectionService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(DeleteTrunkConnectionRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(TrunkConnectionServiceServer).Delete(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: TrunkConnectionService_Delete_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(TrunkConnectionServiceServer).Delete(ctx, req.(*DeleteTrunkConnectionRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _TrunkConnectionService_Move_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(MoveTrunkConnectionRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(TrunkConnectionServiceServer).Move(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: TrunkConnectionService_Move_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(TrunkConnectionServiceServer).Move(ctx, req.(*MoveTrunkConnectionRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _TrunkConnectionService_ListOperations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ListTrunkConnectionOperationsRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(TrunkConnectionServiceServer).ListOperations(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: TrunkConnectionService_ListOperations_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(TrunkConnectionServiceServer).ListOperations(ctx, req.(*ListTrunkConnectionOperationsRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// TrunkConnectionService_ServiceDesc is the grpc.ServiceDesc for TrunkConnectionService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var TrunkConnectionService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "yandex.cloud.cic.v1.TrunkConnectionService",
	HandlerType: (*TrunkConnectionServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Get",
			Handler:    _TrunkConnectionService_Get_Handler,
		},
		{
			MethodName: "List",
			Handler:    _TrunkConnectionService_List_Handler,
		},
		{
			MethodName: "Create",
			Handler:    _TrunkConnectionService_Create_Handler,
		},
		{
			MethodName: "Update",
			Handler:    _TrunkConnectionService_Update_Handler,
		},
		{
			MethodName: "Delete",
			Handler:    _TrunkConnectionService_Delete_Handler,
		},
		{
			MethodName: "Move",
			Handler:    _TrunkConnectionService_Move_Handler,
		},
		{
			MethodName: "ListOperations",
			Handler:    _TrunkConnectionService_ListOperations_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "yandex/cloud/cic/v1/trunk_connection_service.proto",
}
