// Code generated by sdkgen. DO NOT EDIT.

// nolint
package ocr

import (
	"context"

	"google.golang.org/grpc"

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

//revive:disable

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

// Recognize implements ocr.TextRecognitionServiceClient
func (c *TextRecognitionServiceClient) Recognize(ctx context.Context, in *ocr.RecognizeTextRequest, opts ...grpc.CallOption) (ocr.TextRecognitionService_RecognizeClient, error) {
	conn, err := c.getConn(ctx)
	if err != nil {
		return nil, err
	}
	return ocr.NewTextRecognitionServiceClient(conn).Recognize(ctx, in, opts...)
}
