// 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"
)

// UserAccountClient provides methods for managing UserAccount resources of Yandex.Cloud IAM.
type UserAccountClient interface {
	UserAccountClientIterator
	Get(context.Context, *iam.GetUserAccountRequest, ...grpc.CallOption) (*iam.UserAccount, error)
}

var _ UserAccountClient = userAccountClient{}

type userAccountClient struct {
	connector transport.Connector
}

// NewUserAccountClient returns UserAccountClient implementation.
func NewUserAccountClient(connector transport.Connector) UserAccountClient {
	return userAccountClient{connector}
}

// Get is an operation of Yandex.Cloud IAM UserAccount service.
func (c userAccountClient) Get(ctx context.Context, in *iam.GetUserAccountRequest, opts ...grpc.CallOption) (*iam.UserAccount, error) {
	connection, err := c.connector.GetConnection(ctx, UserAccountGet, opts...)
	if err != nil {
		return nil, err
	}
	return iam.NewUserAccountServiceClient(connection).Get(ctx, in, opts...)
}

var (
	UserAccountGet = protoreflect.FullName("yandex.cloud.iam.v1.UserAccountService.Get")
)
