// Code generated by sdkgen. DO NOT EDIT.

// nolint
package devices

import (
	"context"

	"google.golang.org/grpc"

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

//revive:disable

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

// Publish implements devices.RegistryDataServiceClient
func (c *RegistryDataServiceClient) Publish(ctx context.Context, in *devices.PublishRegistryDataRequest, opts ...grpc.CallOption) (*devices.PublishRegistryDataResponse, error) {
	conn, err := c.getConn(ctx)
	if err != nil {
		return nil, err
	}
	return devices.NewRegistryDataServiceClient(conn).Publish(ctx, in, opts...)
}
