// Code generated by sdkgen-v2. DO NOT EDIT.
package iamsdk

import (
	"context"

	iam "github.com/yandex-cloud/go-genproto/yandex/cloud/iam/v1"
	"github.com/yandex-cloud/go-sdk/v2/pkg/transport"
	"google.golang.org/grpc"
	"google.golang.org/protobuf/reflect/protoreflect"
)

// SubjectDetailsClient provides methods for managing SubjectDetails resources of Yandex.Cloud IAM.
type SubjectDetailsClient interface {
	SubjectDetailsClientIterator
	Get(context.Context, *iam.GetSubjectRequest, ...grpc.CallOption) (*iam.GetSubjectResponse, error)
	List(context.Context, *iam.ListSubjectsRequest, ...grpc.CallOption) (*iam.ListSubjectsResponse, error)
	BatchGet(context.Context, *iam.BatchGetSubjectsRequest, ...grpc.CallOption) (*iam.BatchGetSubjectsResponse, error)
}

var _ SubjectDetailsClient = subjectDetailsClient{}

type subjectDetailsClient struct {
	connector transport.Connector
}

// NewSubjectDetailsClient returns SubjectDetailsClient implementation.
func NewSubjectDetailsClient(connector transport.Connector) SubjectDetailsClient {
	return subjectDetailsClient{connector}
}

// Get is an operation of Yandex.Cloud IAM SubjectDetails service.
func (c subjectDetailsClient) Get(ctx context.Context, in *iam.GetSubjectRequest, opts ...grpc.CallOption) (*iam.GetSubjectResponse, error) {
	connection, err := c.connector.GetConnection(ctx, SubjectDetailsGet, opts...)
	if err != nil {
		return nil, err
	}
	return iam.NewSubjectDetailsServiceClient(connection).Get(ctx, in, opts...)
}

// List is an operation of Yandex.Cloud IAM SubjectDetails service.
func (c subjectDetailsClient) List(ctx context.Context, in *iam.ListSubjectsRequest, opts ...grpc.CallOption) (*iam.ListSubjectsResponse, error) {
	connection, err := c.connector.GetConnection(ctx, SubjectDetailsList, opts...)
	if err != nil {
		return nil, err
	}
	return iam.NewSubjectDetailsServiceClient(connection).List(ctx, in, opts...)
}

// BatchGet is an operation of Yandex.Cloud IAM SubjectDetails service.
func (c subjectDetailsClient) BatchGet(ctx context.Context, in *iam.BatchGetSubjectsRequest, opts ...grpc.CallOption) (*iam.BatchGetSubjectsResponse, error) {
	connection, err := c.connector.GetConnection(ctx, SubjectDetailsBatchGet, opts...)
	if err != nil {
		return nil, err
	}
	return iam.NewSubjectDetailsServiceClient(connection).BatchGet(ctx, in, opts...)
}

var (
	SubjectDetailsGet      = protoreflect.FullName("yandex.cloud.iam.v1.SubjectDetailsService.Get")
	SubjectDetailsList     = protoreflect.FullName("yandex.cloud.iam.v1.SubjectDetailsService.List")
	SubjectDetailsBatchGet = protoreflect.FullName("yandex.cloud.iam.v1.SubjectDetailsService.BatchGet")
)
