// Code generated by sdkgen. DO NOT EDIT.

// nolint
package iam

import (
	"context"

	"google.golang.org/grpc"

	iam "github.com/yandex-cloud/go-genproto/yandex/cloud/iam/v1"
)

//revive:disable

// IamTokenServiceClient is a iam.IamTokenServiceClient with
// lazy GRPC connection initialization.
type IamTokenServiceClient struct {
	getConn func(ctx context.Context) (*grpc.ClientConn, error)
}

// Create implements iam.IamTokenServiceClient
func (c *IamTokenServiceClient) Create(ctx context.Context, in *iam.CreateIamTokenRequest, opts ...grpc.CallOption) (*iam.CreateIamTokenResponse, error) {
	conn, err := c.getConn(ctx)
	if err != nil {
		return nil, err
	}
	return iam.NewIamTokenServiceClient(conn).Create(ctx, in, opts...)
}

// CreateForServiceAccount implements iam.IamTokenServiceClient
func (c *IamTokenServiceClient) CreateForServiceAccount(ctx context.Context, in *iam.CreateIamTokenForServiceAccountRequest, opts ...grpc.CallOption) (*iam.CreateIamTokenResponse, error) {
	conn, err := c.getConn(ctx)
	if err != nil {
		return nil, err
	}
	return iam.NewIamTokenServiceClient(conn).CreateForServiceAccount(ctx, in, opts...)
}

// Revoke implements iam.IamTokenServiceClient
func (c *IamTokenServiceClient) Revoke(ctx context.Context, in *iam.RevokeIamTokenRequest, opts ...grpc.CallOption) (*iam.RevokeIamTokenResponse, error) {
	conn, err := c.getConn(ctx)
	if err != nil {
		return nil, err
	}
	return iam.NewIamTokenServiceClient(conn).Revoke(ctx, in, opts...)
}
