// 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/compute/v1/placement_group_service.proto

package compute

import (
	context "context"
	access "github.com/yandex-cloud/go-genproto/yandex/cloud/access"
	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 (
	PlacementGroupService_Get_FullMethodName                  = "/yandex.cloud.compute.v1.PlacementGroupService/Get"
	PlacementGroupService_List_FullMethodName                 = "/yandex.cloud.compute.v1.PlacementGroupService/List"
	PlacementGroupService_Create_FullMethodName               = "/yandex.cloud.compute.v1.PlacementGroupService/Create"
	PlacementGroupService_Update_FullMethodName               = "/yandex.cloud.compute.v1.PlacementGroupService/Update"
	PlacementGroupService_Delete_FullMethodName               = "/yandex.cloud.compute.v1.PlacementGroupService/Delete"
	PlacementGroupService_ListInstances_FullMethodName        = "/yandex.cloud.compute.v1.PlacementGroupService/ListInstances"
	PlacementGroupService_ListOperations_FullMethodName       = "/yandex.cloud.compute.v1.PlacementGroupService/ListOperations"
	PlacementGroupService_ListAccessBindings_FullMethodName   = "/yandex.cloud.compute.v1.PlacementGroupService/ListAccessBindings"
	PlacementGroupService_SetAccessBindings_FullMethodName    = "/yandex.cloud.compute.v1.PlacementGroupService/SetAccessBindings"
	PlacementGroupService_UpdateAccessBindings_FullMethodName = "/yandex.cloud.compute.v1.PlacementGroupService/UpdateAccessBindings"
)

// PlacementGroupServiceClient is the client API for PlacementGroupService 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 placement groups.
type PlacementGroupServiceClient interface {
	// Returns the specified placement group.
	//
	// To get the list of all available placement groups, make a [List] request.
	Get(ctx context.Context, in *GetPlacementGroupRequest, opts ...grpc.CallOption) (*PlacementGroup, error)
	// Retrieves the list of placement groups in the specified folder.
	List(ctx context.Context, in *ListPlacementGroupsRequest, opts ...grpc.CallOption) (*ListPlacementGroupsResponse, error)
	// Creates a placement group in the specified folder.
	Create(ctx context.Context, in *CreatePlacementGroupRequest, opts ...grpc.CallOption) (*operation.Operation, error)
	// Updates the specified placement group.
	Update(ctx context.Context, in *UpdatePlacementGroupRequest, opts ...grpc.CallOption) (*operation.Operation, error)
	// Deletes the specified placement group.
	Delete(ctx context.Context, in *DeletePlacementGroupRequest, opts ...grpc.CallOption) (*operation.Operation, error)
	// Lists instances for the specified placement group.
	ListInstances(ctx context.Context, in *ListPlacementGroupInstancesRequest, opts ...grpc.CallOption) (*ListPlacementGroupInstancesResponse, error)
	// Lists operations for the specified placement group.
	ListOperations(ctx context.Context, in *ListPlacementGroupOperationsRequest, opts ...grpc.CallOption) (*ListPlacementGroupOperationsResponse, error)
	// Lists access bindings for the placement group.
	ListAccessBindings(ctx context.Context, in *access.ListAccessBindingsRequest, opts ...grpc.CallOption) (*access.ListAccessBindingsResponse, error)
	// Sets access bindings for the placement group.
	SetAccessBindings(ctx context.Context, in *access.SetAccessBindingsRequest, opts ...grpc.CallOption) (*operation.Operation, error)
	// Updates access bindings for the placement group.
	UpdateAccessBindings(ctx context.Context, in *access.UpdateAccessBindingsRequest, opts ...grpc.CallOption) (*operation.Operation, error)
}

type placementGroupServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewPlacementGroupServiceClient(cc grpc.ClientConnInterface) PlacementGroupServiceClient {
	return &placementGroupServiceClient{cc}
}

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

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

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

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

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

func (c *placementGroupServiceClient) ListInstances(ctx context.Context, in *ListPlacementGroupInstancesRequest, opts ...grpc.CallOption) (*ListPlacementGroupInstancesResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(ListPlacementGroupInstancesResponse)
	err := c.cc.Invoke(ctx, PlacementGroupService_ListInstances_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

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

func (c *placementGroupServiceClient) ListAccessBindings(ctx context.Context, in *access.ListAccessBindingsRequest, opts ...grpc.CallOption) (*access.ListAccessBindingsResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(access.ListAccessBindingsResponse)
	err := c.cc.Invoke(ctx, PlacementGroupService_ListAccessBindings_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *placementGroupServiceClient) SetAccessBindings(ctx context.Context, in *access.SetAccessBindingsRequest, opts ...grpc.CallOption) (*operation.Operation, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(operation.Operation)
	err := c.cc.Invoke(ctx, PlacementGroupService_SetAccessBindings_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *placementGroupServiceClient) UpdateAccessBindings(ctx context.Context, in *access.UpdateAccessBindingsRequest, opts ...grpc.CallOption) (*operation.Operation, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(operation.Operation)
	err := c.cc.Invoke(ctx, PlacementGroupService_UpdateAccessBindings_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// PlacementGroupServiceServer is the server API for PlacementGroupService service.
// All implementations should embed UnimplementedPlacementGroupServiceServer
// for forward compatibility.
//
// A set of methods for managing placement groups.
type PlacementGroupServiceServer interface {
	// Returns the specified placement group.
	//
	// To get the list of all available placement groups, make a [List] request.
	Get(context.Context, *GetPlacementGroupRequest) (*PlacementGroup, error)
	// Retrieves the list of placement groups in the specified folder.
	List(context.Context, *ListPlacementGroupsRequest) (*ListPlacementGroupsResponse, error)
	// Creates a placement group in the specified folder.
	Create(context.Context, *CreatePlacementGroupRequest) (*operation.Operation, error)
	// Updates the specified placement group.
	Update(context.Context, *UpdatePlacementGroupRequest) (*operation.Operation, error)
	// Deletes the specified placement group.
	Delete(context.Context, *DeletePlacementGroupRequest) (*operation.Operation, error)
	// Lists instances for the specified placement group.
	ListInstances(context.Context, *ListPlacementGroupInstancesRequest) (*ListPlacementGroupInstancesResponse, error)
	// Lists operations for the specified placement group.
	ListOperations(context.Context, *ListPlacementGroupOperationsRequest) (*ListPlacementGroupOperationsResponse, error)
	// Lists access bindings for the placement group.
	ListAccessBindings(context.Context, *access.ListAccessBindingsRequest) (*access.ListAccessBindingsResponse, error)
	// Sets access bindings for the placement group.
	SetAccessBindings(context.Context, *access.SetAccessBindingsRequest) (*operation.Operation, error)
	// Updates access bindings for the placement group.
	UpdateAccessBindings(context.Context, *access.UpdateAccessBindingsRequest) (*operation.Operation, error)
}

// UnimplementedPlacementGroupServiceServer 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 UnimplementedPlacementGroupServiceServer struct{}

func (UnimplementedPlacementGroupServiceServer) Get(context.Context, *GetPlacementGroupRequest) (*PlacementGroup, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
}
func (UnimplementedPlacementGroupServiceServer) List(context.Context, *ListPlacementGroupsRequest) (*ListPlacementGroupsResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method List not implemented")
}
func (UnimplementedPlacementGroupServiceServer) Create(context.Context, *CreatePlacementGroupRequest) (*operation.Operation, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Create not implemented")
}
func (UnimplementedPlacementGroupServiceServer) Update(context.Context, *UpdatePlacementGroupRequest) (*operation.Operation, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Update not implemented")
}
func (UnimplementedPlacementGroupServiceServer) Delete(context.Context, *DeletePlacementGroupRequest) (*operation.Operation, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented")
}
func (UnimplementedPlacementGroupServiceServer) ListInstances(context.Context, *ListPlacementGroupInstancesRequest) (*ListPlacementGroupInstancesResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ListInstances not implemented")
}
func (UnimplementedPlacementGroupServiceServer) ListOperations(context.Context, *ListPlacementGroupOperationsRequest) (*ListPlacementGroupOperationsResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ListOperations not implemented")
}
func (UnimplementedPlacementGroupServiceServer) ListAccessBindings(context.Context, *access.ListAccessBindingsRequest) (*access.ListAccessBindingsResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ListAccessBindings not implemented")
}
func (UnimplementedPlacementGroupServiceServer) SetAccessBindings(context.Context, *access.SetAccessBindingsRequest) (*operation.Operation, error) {
	return nil, status.Errorf(codes.Unimplemented, "method SetAccessBindings not implemented")
}
func (UnimplementedPlacementGroupServiceServer) UpdateAccessBindings(context.Context, *access.UpdateAccessBindingsRequest) (*operation.Operation, error) {
	return nil, status.Errorf(codes.Unimplemented, "method UpdateAccessBindings not implemented")
}
func (UnimplementedPlacementGroupServiceServer) testEmbeddedByValue() {}

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

func RegisterPlacementGroupServiceServer(s grpc.ServiceRegistrar, srv PlacementGroupServiceServer) {
	// If the following call pancis, it indicates UnimplementedPlacementGroupServiceServer 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(&PlacementGroupService_ServiceDesc, srv)
}

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

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

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

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

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

func _PlacementGroupService_ListInstances_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ListPlacementGroupInstancesRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(PlacementGroupServiceServer).ListInstances(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: PlacementGroupService_ListInstances_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(PlacementGroupServiceServer).ListInstances(ctx, req.(*ListPlacementGroupInstancesRequest))
	}
	return interceptor(ctx, in, info, handler)
}

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

func _PlacementGroupService_ListAccessBindings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(access.ListAccessBindingsRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(PlacementGroupServiceServer).ListAccessBindings(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: PlacementGroupService_ListAccessBindings_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(PlacementGroupServiceServer).ListAccessBindings(ctx, req.(*access.ListAccessBindingsRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _PlacementGroupService_SetAccessBindings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(access.SetAccessBindingsRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(PlacementGroupServiceServer).SetAccessBindings(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: PlacementGroupService_SetAccessBindings_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(PlacementGroupServiceServer).SetAccessBindings(ctx, req.(*access.SetAccessBindingsRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _PlacementGroupService_UpdateAccessBindings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(access.UpdateAccessBindingsRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(PlacementGroupServiceServer).UpdateAccessBindings(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: PlacementGroupService_UpdateAccessBindings_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(PlacementGroupServiceServer).UpdateAccessBindings(ctx, req.(*access.UpdateAccessBindingsRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// PlacementGroupService_ServiceDesc is the grpc.ServiceDesc for PlacementGroupService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var PlacementGroupService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "yandex.cloud.compute.v1.PlacementGroupService",
	HandlerType: (*PlacementGroupServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Get",
			Handler:    _PlacementGroupService_Get_Handler,
		},
		{
			MethodName: "List",
			Handler:    _PlacementGroupService_List_Handler,
		},
		{
			MethodName: "Create",
			Handler:    _PlacementGroupService_Create_Handler,
		},
		{
			MethodName: "Update",
			Handler:    _PlacementGroupService_Update_Handler,
		},
		{
			MethodName: "Delete",
			Handler:    _PlacementGroupService_Delete_Handler,
		},
		{
			MethodName: "ListInstances",
			Handler:    _PlacementGroupService_ListInstances_Handler,
		},
		{
			MethodName: "ListOperations",
			Handler:    _PlacementGroupService_ListOperations_Handler,
		},
		{
			MethodName: "ListAccessBindings",
			Handler:    _PlacementGroupService_ListAccessBindings_Handler,
		},
		{
			MethodName: "SetAccessBindings",
			Handler:    _PlacementGroupService_SetAccessBindings_Handler,
		},
		{
			MethodName: "UpdateAccessBindings",
			Handler:    _PlacementGroupService_UpdateAccessBindings_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "yandex/cloud/compute/v1/placement_group_service.proto",
}
