// Code generated by sdkgen. DO NOT EDIT.

// nolint
package logging

import (
	"context"

	"google.golang.org/grpc"

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

//revive:disable

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

// Write implements logging.LogIngestionServiceClient
func (c *LogIngestionServiceClient) Write(ctx context.Context, in *logging.WriteRequest, opts ...grpc.CallOption) (*logging.WriteResponse, error) {
	conn, err := c.getConn(ctx)
	if err != nil {
		return nil, err
	}
	return logging.NewLogIngestionServiceClient(conn).Write(ctx, in, opts...)
}
