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

// YandexPassportUserAccountClient provides methods for managing YandexPassportUserAccount resources of Yandex.Cloud IAM.
type YandexPassportUserAccountClient interface {
	YandexPassportUserAccountClientIterator
	GetByLogin(context.Context, *iam.GetUserAccountByLoginRequest, ...grpc.CallOption) (*iam.UserAccount, error)
}

var _ YandexPassportUserAccountClient = yandexPassportUserAccountClient{}

type yandexPassportUserAccountClient struct {
	connector transport.Connector
}

// NewYandexPassportUserAccountClient returns YandexPassportUserAccountClient implementation.
func NewYandexPassportUserAccountClient(connector transport.Connector) YandexPassportUserAccountClient {
	return yandexPassportUserAccountClient{connector}
}

// GetByLogin is an operation of Yandex.Cloud IAM YandexPassportUserAccount service.
func (c yandexPassportUserAccountClient) GetByLogin(ctx context.Context, in *iam.GetUserAccountByLoginRequest, opts ...grpc.CallOption) (*iam.UserAccount, error) {
	connection, err := c.connector.GetConnection(ctx, YandexPassportUserAccountGetByLogin, opts...)
	if err != nil {
		return nil, err
	}
	return iam.NewYandexPassportUserAccountServiceClient(connection).GetByLogin(ctx, in, opts...)
}

var (
	YandexPassportUserAccountGetByLogin = protoreflect.FullName("yandex.cloud.iam.v1.YandexPassportUserAccountService.GetByLogin")
)
