// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.6.1
// - protoc             v3.21.12
// source: yandex/cloud/organizationmanager/v1/os_login_service.proto

package organizationmanager

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 (
	OsLoginService_GetSettings_FullMethodName       = "/yandex.cloud.organizationmanager.v1.OsLoginService/GetSettings"
	OsLoginService_UpdateSettings_FullMethodName    = "/yandex.cloud.organizationmanager.v1.OsLoginService/UpdateSettings"
	OsLoginService_GetProfile_FullMethodName        = "/yandex.cloud.organizationmanager.v1.OsLoginService/GetProfile"
	OsLoginService_ListProfiles_FullMethodName      = "/yandex.cloud.organizationmanager.v1.OsLoginService/ListProfiles"
	OsLoginService_CreateProfile_FullMethodName     = "/yandex.cloud.organizationmanager.v1.OsLoginService/CreateProfile"
	OsLoginService_UpdateProfile_FullMethodName     = "/yandex.cloud.organizationmanager.v1.OsLoginService/UpdateProfile"
	OsLoginService_SetDefaultProfile_FullMethodName = "/yandex.cloud.organizationmanager.v1.OsLoginService/SetDefaultProfile"
	OsLoginService_DeleteProfile_FullMethodName     = "/yandex.cloud.organizationmanager.v1.OsLoginService/DeleteProfile"
)

// OsLoginServiceClient is the client API for OsLoginService 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 OsLoginServiceClient interface {
	// OsLogin settings
	GetSettings(ctx context.Context, in *GetOsLoginSettingsRequest, opts ...grpc.CallOption) (*OsLoginSettings, error)
	UpdateSettings(ctx context.Context, in *UpdateOsLoginSettingsRequest, opts ...grpc.CallOption) (*operation.Operation, error)
	// OsLogin Profiles
	GetProfile(ctx context.Context, in *GetOsLoginProfileRequest, opts ...grpc.CallOption) (*OsLoginProfile, error)
	ListProfiles(ctx context.Context, in *ListOsLoginProfilesRequest, opts ...grpc.CallOption) (*ListOsLoginProfilesResponse, error)
	CreateProfile(ctx context.Context, in *CreateOsLoginProfileRequest, opts ...grpc.CallOption) (*operation.Operation, error)
	UpdateProfile(ctx context.Context, in *UpdateOsLoginProfileRequest, opts ...grpc.CallOption) (*operation.Operation, error)
	// Sets a profile as a default for the subject assigned to this profile
	SetDefaultProfile(ctx context.Context, in *SetDefaultOsLoginProfileRequest, opts ...grpc.CallOption) (*operation.Operation, error)
	DeleteProfile(ctx context.Context, in *DeleteOsLoginProfileRequest, opts ...grpc.CallOption) (*operation.Operation, error)
}

type osLoginServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewOsLoginServiceClient(cc grpc.ClientConnInterface) OsLoginServiceClient {
	return &osLoginServiceClient{cc}
}

func (c *osLoginServiceClient) GetSettings(ctx context.Context, in *GetOsLoginSettingsRequest, opts ...grpc.CallOption) (*OsLoginSettings, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(OsLoginSettings)
	err := c.cc.Invoke(ctx, OsLoginService_GetSettings_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

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

func (c *osLoginServiceClient) GetProfile(ctx context.Context, in *GetOsLoginProfileRequest, opts ...grpc.CallOption) (*OsLoginProfile, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(OsLoginProfile)
	err := c.cc.Invoke(ctx, OsLoginService_GetProfile_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *osLoginServiceClient) ListProfiles(ctx context.Context, in *ListOsLoginProfilesRequest, opts ...grpc.CallOption) (*ListOsLoginProfilesResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(ListOsLoginProfilesResponse)
	err := c.cc.Invoke(ctx, OsLoginService_ListProfiles_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

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

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

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

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

// OsLoginServiceServer is the server API for OsLoginService service.
// All implementations should embed UnimplementedOsLoginServiceServer
// for forward compatibility.
type OsLoginServiceServer interface {
	// OsLogin settings
	GetSettings(context.Context, *GetOsLoginSettingsRequest) (*OsLoginSettings, error)
	UpdateSettings(context.Context, *UpdateOsLoginSettingsRequest) (*operation.Operation, error)
	// OsLogin Profiles
	GetProfile(context.Context, *GetOsLoginProfileRequest) (*OsLoginProfile, error)
	ListProfiles(context.Context, *ListOsLoginProfilesRequest) (*ListOsLoginProfilesResponse, error)
	CreateProfile(context.Context, *CreateOsLoginProfileRequest) (*operation.Operation, error)
	UpdateProfile(context.Context, *UpdateOsLoginProfileRequest) (*operation.Operation, error)
	// Sets a profile as a default for the subject assigned to this profile
	SetDefaultProfile(context.Context, *SetDefaultOsLoginProfileRequest) (*operation.Operation, error)
	DeleteProfile(context.Context, *DeleteOsLoginProfileRequest) (*operation.Operation, error)
}

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

func (UnimplementedOsLoginServiceServer) GetSettings(context.Context, *GetOsLoginSettingsRequest) (*OsLoginSettings, error) {
	return nil, status.Error(codes.Unimplemented, "method GetSettings not implemented")
}
func (UnimplementedOsLoginServiceServer) UpdateSettings(context.Context, *UpdateOsLoginSettingsRequest) (*operation.Operation, error) {
	return nil, status.Error(codes.Unimplemented, "method UpdateSettings not implemented")
}
func (UnimplementedOsLoginServiceServer) GetProfile(context.Context, *GetOsLoginProfileRequest) (*OsLoginProfile, error) {
	return nil, status.Error(codes.Unimplemented, "method GetProfile not implemented")
}
func (UnimplementedOsLoginServiceServer) ListProfiles(context.Context, *ListOsLoginProfilesRequest) (*ListOsLoginProfilesResponse, error) {
	return nil, status.Error(codes.Unimplemented, "method ListProfiles not implemented")
}
func (UnimplementedOsLoginServiceServer) CreateProfile(context.Context, *CreateOsLoginProfileRequest) (*operation.Operation, error) {
	return nil, status.Error(codes.Unimplemented, "method CreateProfile not implemented")
}
func (UnimplementedOsLoginServiceServer) UpdateProfile(context.Context, *UpdateOsLoginProfileRequest) (*operation.Operation, error) {
	return nil, status.Error(codes.Unimplemented, "method UpdateProfile not implemented")
}
func (UnimplementedOsLoginServiceServer) SetDefaultProfile(context.Context, *SetDefaultOsLoginProfileRequest) (*operation.Operation, error) {
	return nil, status.Error(codes.Unimplemented, "method SetDefaultProfile not implemented")
}
func (UnimplementedOsLoginServiceServer) DeleteProfile(context.Context, *DeleteOsLoginProfileRequest) (*operation.Operation, error) {
	return nil, status.Error(codes.Unimplemented, "method DeleteProfile not implemented")
}
func (UnimplementedOsLoginServiceServer) testEmbeddedByValue() {}

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

func RegisterOsLoginServiceServer(s grpc.ServiceRegistrar, srv OsLoginServiceServer) {
	// If the following call panics, it indicates UnimplementedOsLoginServiceServer 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(&OsLoginService_ServiceDesc, srv)
}

func _OsLoginService_GetSettings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetOsLoginSettingsRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(OsLoginServiceServer).GetSettings(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: OsLoginService_GetSettings_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(OsLoginServiceServer).GetSettings(ctx, req.(*GetOsLoginSettingsRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _OsLoginService_UpdateSettings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(UpdateOsLoginSettingsRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(OsLoginServiceServer).UpdateSettings(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: OsLoginService_UpdateSettings_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(OsLoginServiceServer).UpdateSettings(ctx, req.(*UpdateOsLoginSettingsRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _OsLoginService_GetProfile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetOsLoginProfileRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(OsLoginServiceServer).GetProfile(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: OsLoginService_GetProfile_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(OsLoginServiceServer).GetProfile(ctx, req.(*GetOsLoginProfileRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _OsLoginService_ListProfiles_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ListOsLoginProfilesRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(OsLoginServiceServer).ListProfiles(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: OsLoginService_ListProfiles_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(OsLoginServiceServer).ListProfiles(ctx, req.(*ListOsLoginProfilesRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _OsLoginService_CreateProfile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(CreateOsLoginProfileRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(OsLoginServiceServer).CreateProfile(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: OsLoginService_CreateProfile_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(OsLoginServiceServer).CreateProfile(ctx, req.(*CreateOsLoginProfileRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _OsLoginService_UpdateProfile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(UpdateOsLoginProfileRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(OsLoginServiceServer).UpdateProfile(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: OsLoginService_UpdateProfile_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(OsLoginServiceServer).UpdateProfile(ctx, req.(*UpdateOsLoginProfileRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _OsLoginService_SetDefaultProfile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(SetDefaultOsLoginProfileRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(OsLoginServiceServer).SetDefaultProfile(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: OsLoginService_SetDefaultProfile_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(OsLoginServiceServer).SetDefaultProfile(ctx, req.(*SetDefaultOsLoginProfileRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _OsLoginService_DeleteProfile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(DeleteOsLoginProfileRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(OsLoginServiceServer).DeleteProfile(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: OsLoginService_DeleteProfile_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(OsLoginServiceServer).DeleteProfile(ctx, req.(*DeleteOsLoginProfileRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// OsLoginService_ServiceDesc is the grpc.ServiceDesc for OsLoginService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var OsLoginService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "yandex.cloud.organizationmanager.v1.OsLoginService",
	HandlerType: (*OsLoginServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetSettings",
			Handler:    _OsLoginService_GetSettings_Handler,
		},
		{
			MethodName: "UpdateSettings",
			Handler:    _OsLoginService_UpdateSettings_Handler,
		},
		{
			MethodName: "GetProfile",
			Handler:    _OsLoginService_GetProfile_Handler,
		},
		{
			MethodName: "ListProfiles",
			Handler:    _OsLoginService_ListProfiles_Handler,
		},
		{
			MethodName: "CreateProfile",
			Handler:    _OsLoginService_CreateProfile_Handler,
		},
		{
			MethodName: "UpdateProfile",
			Handler:    _OsLoginService_UpdateProfile_Handler,
		},
		{
			MethodName: "SetDefaultProfile",
			Handler:    _OsLoginService_SetDefaultProfile_Handler,
		},
		{
			MethodName: "DeleteProfile",
			Handler:    _OsLoginService_DeleteProfile_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "yandex/cloud/organizationmanager/v1/os_login_service.proto",
}
