// Code generated by sdkgen. DO NOT EDIT.

//nolint
package metering

import (
	"context"

	"google.golang.org/grpc"

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

//revive:disable

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

// Write implements metering.ImageProductUsageServiceClient
func (c *ImageProductUsageServiceClient) Write(ctx context.Context, in *metering.WriteImageProductUsageRequest, opts ...grpc.CallOption) (*metering.WriteImageProductUsageResponse, error) {
	conn, err := c.getConn(ctx)
	if err != nil {
		return nil, err
	}
	return metering.NewImageProductUsageServiceClient(conn).Write(ctx, in, opts...)
}
