// Code generated by sdkgen. DO NOT EDIT.

// nolint
package asymmetricsignature

import (
	"context"

	"google.golang.org/grpc"

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

//revive:disable

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

// GetPublicKey implements asymmetricsignature.AsymmetricSignatureCryptoServiceClient
func (c *AsymmetricSignatureCryptoServiceClient) GetPublicKey(ctx context.Context, in *asymmetricsignature.AsymmetricGetPublicKeyRequest, opts ...grpc.CallOption) (*asymmetricsignature.AsymmetricGetPublicKeyResponse, error) {
	conn, err := c.getConn(ctx)
	if err != nil {
		return nil, err
	}
	return asymmetricsignature.NewAsymmetricSignatureCryptoServiceClient(conn).GetPublicKey(ctx, in, opts...)
}

// Sign implements asymmetricsignature.AsymmetricSignatureCryptoServiceClient
func (c *AsymmetricSignatureCryptoServiceClient) Sign(ctx context.Context, in *asymmetricsignature.AsymmetricSignRequest, opts ...grpc.CallOption) (*asymmetricsignature.AsymmetricSignResponse, error) {
	conn, err := c.getConn(ctx)
	if err != nil {
		return nil, err
	}
	return asymmetricsignature.NewAsymmetricSignatureCryptoServiceClient(conn).Sign(ctx, in, opts...)
}

// SignHash implements asymmetricsignature.AsymmetricSignatureCryptoServiceClient
func (c *AsymmetricSignatureCryptoServiceClient) SignHash(ctx context.Context, in *asymmetricsignature.AsymmetricSignHashRequest, opts ...grpc.CallOption) (*asymmetricsignature.AsymmetricSignHashResponse, error) {
	conn, err := c.getConn(ctx)
	if err != nil {
		return nil, err
	}
	return asymmetricsignature.NewAsymmetricSignatureCryptoServiceClient(conn).SignHash(ctx, in, opts...)
}
