// Code generated by sdkgen. DO NOT EDIT.

// nolint
package agent

import (
	"context"

	"google.golang.org/grpc"

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

//revive:disable

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

// Create implements agent.TrailServiceClient
func (c *TrailServiceClient) Create(ctx context.Context, in *agent.CreateTrailRequest, opts ...grpc.CallOption) (*agent.CreateTrailResponse, error) {
	conn, err := c.getConn(ctx)
	if err != nil {
		return nil, err
	}
	return agent.NewTrailServiceClient(conn).Create(ctx, in, opts...)
}
