user_account.go raw

   1  // Code generated by sdkgen-v2. DO NOT EDIT.
   2  package iamsdk
   3  
   4  import (
   5  	"context"
   6  
   7  	iam "github.com/yandex-cloud/go-genproto/yandex/cloud/iam/v1"
   8  	"github.com/yandex-cloud/go-sdk/v2/pkg/transport"
   9  	"google.golang.org/grpc"
  10  	"google.golang.org/protobuf/reflect/protoreflect"
  11  )
  12  
  13  // UserAccountClient provides methods for managing UserAccount resources of Yandex.Cloud IAM.
  14  type UserAccountClient interface {
  15  	Get(context.Context, *iam.GetUserAccountRequest, ...grpc.CallOption) (*iam.UserAccount, error)
  16  }
  17  
  18  var _ UserAccountClient = userAccountClient{}
  19  
  20  type userAccountClient struct {
  21  	connector transport.Connector
  22  }
  23  
  24  // NewUserAccountClient returns UserAccountClient implementation.
  25  func NewUserAccountClient(connector transport.Connector) UserAccountClient {
  26  	return userAccountClient{connector}
  27  }
  28  
  29  // Get is an operation of Yandex.Cloud IAM UserAccount service.
  30  func (c userAccountClient) Get(ctx context.Context, in *iam.GetUserAccountRequest, opts ...grpc.CallOption) (*iam.UserAccount, error) {
  31  	connection, err := c.connector.GetConnection(ctx, UserAccountGet, opts...)
  32  	if err != nil {
  33  		return nil, err
  34  	}
  35  	return iam.NewUserAccountServiceClient(connection).Get(ctx, in, opts...)
  36  }
  37  
  38  var (
  39  	UserAccountGet = protoreflect.FullName("yandex.cloud.iam.v1.UserAccountService.Get")
  40  )
  41