README

Auto-generated vision v1 clients

This package includes auto-generated clients for the vision v1 API.

Use the handwritten client (in the parent directory, cloud.google.com/go/vision) in preference to this.

This code is EXPERIMENTAL and subject to CHANGE AT ANY TIME.

Expand ▾ Collapse ▴

Documentation

Overview

    Integrates Google Vision features, including image labeling, face, logo, and landmark detection, optical character recognition (OCR), and detection of explicit content, into applications.

    Index

    Examples

    Constants

    This section is empty.

    Variables

    This section is empty.

    Functions

    func DefaultAuthScopes

    func DefaultAuthScopes() []string

      DefaultAuthScopes reports the default set of authentication scopes to use with this package.

      func NewImageFromReader

      func NewImageFromReader(r io.Reader) (*pb.Image, error)

        NewImageFromReader reads the bytes of an image from r.

        func NewImageFromURI

        func NewImageFromURI(uri string) *pb.Image

          NewImageFromURI returns an image that refers to an object in Google Cloud Storage (when the uri is of the form "gs://BUCKET/OBJECT") or at a public URL.

          Types

          type AsyncBatchAnnotateFilesOperation

          type AsyncBatchAnnotateFilesOperation struct {
          	// contains filtered or unexported fields
          }

            AsyncBatchAnnotateFilesOperation manages a long-running operation from AsyncBatchAnnotateFiles.

            func (*AsyncBatchAnnotateFilesOperation) Done

              Done reports whether the long-running operation has completed.

              func (*AsyncBatchAnnotateFilesOperation) Metadata

                Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.

                func (*AsyncBatchAnnotateFilesOperation) Name

                  Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.

                  func (*AsyncBatchAnnotateFilesOperation) Poll

                    Poll fetches the latest state of the long-running operation.

                    Poll also fetches the latest metadata, which can be retrieved by Metadata.

                    If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.

                    func (*AsyncBatchAnnotateFilesOperation) Wait

                      Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

                      See documentation of Poll for error-handling information.

                      type Chin

                      type Chin struct {
                      	Left, Center, Right *pb.Position
                      }

                        Chin represents a face's chin.

                        type Ears

                        type Ears struct {
                        	Left, Right *pb.Position
                        }

                          Ears represents a face's ears.

                          type Eye

                          type Eye struct {
                          	Left, Right, Top, Bottom, Center, Pupil *pb.Position
                          }

                            Eye represents a face's eye.

                            type Eyebrow

                            type Eyebrow struct {
                            	Top, Left, Right *pb.Position
                            }

                              Eyebrow represents a face's eyebrow.

                              type Eyebrows

                              type Eyebrows struct {
                              	Left, Right Eyebrow
                              }

                                Eyebrows represents a face's eyebrows.

                                type Eyes

                                type Eyes struct {
                                	Left, Right Eye
                                }

                                  Eyes represents a face's eyes.

                                  type FaceLandmarks

                                  type FaceLandmarks struct {
                                  	Eyebrows Eyebrows
                                  	Eyes     Eyes
                                  	Ears     Ears
                                  	Nose     Nose
                                  	Mouth    Mouth
                                  	Chin     Chin
                                  	Forehead *pb.Position
                                  }

                                    FaceLandmarks contains the positions of facial features detected by the service.

                                    func FaceFromLandmarks

                                    func FaceFromLandmarks(landmarks []*pb.FaceAnnotation_Landmark) *FaceLandmarks

                                      FaceFromLandmarks converts the list of face landmarks returned by the service to a FaceLandmarks struct.

                                      type ImageAnnotatorCallOptions

                                      type ImageAnnotatorCallOptions struct {
                                      	BatchAnnotateImages     []gax.CallOption
                                      	AsyncBatchAnnotateFiles []gax.CallOption
                                      }

                                        ImageAnnotatorCallOptions contains the retry settings for each method of ImageAnnotatorClient.

                                        type ImageAnnotatorClient

                                        type ImageAnnotatorClient struct {
                                        
                                        	// LROClient is used internally to handle longrunning operations.
                                        	// It is exposed so that its CallOptions can be modified if required.
                                        	// Users should not Close this client.
                                        	LROClient *lroauto.OperationsClient
                                        
                                        	// The call options for this service.
                                        	CallOptions *ImageAnnotatorCallOptions
                                        	// contains filtered or unexported fields
                                        }

                                          ImageAnnotatorClient is a client for interacting with Cloud Vision API.

                                          Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

                                          func NewImageAnnotatorClient

                                          func NewImageAnnotatorClient(ctx context.Context, opts ...option.ClientOption) (*ImageAnnotatorClient, error)

                                            NewImageAnnotatorClient creates a new image annotator client.

                                            Service that performs Google Cloud Vision API detection tasks over client images, such as face, landmark, logo, label, and text detection. The ImageAnnotator service returns detected entities from the images.

                                            Example
                                            Output:
                                            
                                            

                                            func (*ImageAnnotatorClient) AnnotateImage

                                              AnnotateImage runs image detection and annotation for a single image.

                                              Example
                                              Output:
                                              
                                              

                                              func (*ImageAnnotatorClient) AsyncBatchAnnotateFiles

                                                AsyncBatchAnnotateFiles run asynchronous image detection and annotation for a list of generic files, such as PDF files, which may contain multiple pages and multiple images per page. Progress and results can be retrieved through the google.longrunning.Operations interface. Operation.metadata contains OperationMetadata (metadata). Operation.response contains AsyncBatchAnnotateFilesResponse (results).

                                                Example
                                                Output:
                                                
                                                

                                                func (*ImageAnnotatorClient) AsyncBatchAnnotateFilesOperation

                                                func (c *ImageAnnotatorClient) AsyncBatchAnnotateFilesOperation(name string) *AsyncBatchAnnotateFilesOperation

                                                  AsyncBatchAnnotateFilesOperation returns a new AsyncBatchAnnotateFilesOperation from a given name. The name must be that of a previously created AsyncBatchAnnotateFilesOperation, possibly from a different process.

                                                  func (*ImageAnnotatorClient) BatchAnnotateImages

                                                    BatchAnnotateImages run image detection and annotation for a batch of images.

                                                    Example
                                                    Output:
                                                    
                                                    

                                                    func (*ImageAnnotatorClient) Close

                                                    func (c *ImageAnnotatorClient) Close() error

                                                      Close closes the connection to the API service. The user should invoke this when the client is no longer required.

                                                      func (*ImageAnnotatorClient) Connection

                                                      func (c *ImageAnnotatorClient) Connection() *grpc.ClientConn

                                                        Connection returns the client's connection to the API service.

                                                        func (*ImageAnnotatorClient) CropHints

                                                        func (c *ImageAnnotatorClient) CropHints(ctx context.Context, img *pb.Image, ictx *pb.ImageContext, opts ...gax.CallOption) (*pb.CropHintsAnnotation, error)

                                                          CropHints computes crop hints for the image.

                                                          func (*ImageAnnotatorClient) DetectDocumentText

                                                          func (c *ImageAnnotatorClient) DetectDocumentText(ctx context.Context, img *pb.Image, ictx *pb.ImageContext, opts ...gax.CallOption) (*pb.TextAnnotation, error)

                                                            DetectDocumentText performs full text (OCR) detection on the image.

                                                            func (*ImageAnnotatorClient) DetectFaces

                                                            func (c *ImageAnnotatorClient) DetectFaces(ctx context.Context, img *pb.Image, ictx *pb.ImageContext, maxResults int, opts ...gax.CallOption) ([]*pb.FaceAnnotation, error)

                                                              DetectFaces performs face detection on the image. At most maxResults results are returned.

                                                              func (*ImageAnnotatorClient) DetectImageProperties

                                                              func (c *ImageAnnotatorClient) DetectImageProperties(ctx context.Context, img *pb.Image, ictx *pb.ImageContext, opts ...gax.CallOption) (*pb.ImageProperties, error)

                                                                DetectImageProperties computes properties of the image.

                                                                func (*ImageAnnotatorClient) DetectLabels

                                                                func (c *ImageAnnotatorClient) DetectLabels(ctx context.Context, img *pb.Image, ictx *pb.ImageContext, maxResults int, opts ...gax.CallOption) ([]*pb.EntityAnnotation, error)

                                                                  DetectLabels performs label detection on the image. At most maxResults results are returned.

                                                                  func (*ImageAnnotatorClient) DetectLandmarks

                                                                  func (c *ImageAnnotatorClient) DetectLandmarks(ctx context.Context, img *pb.Image, ictx *pb.ImageContext, maxResults int, opts ...gax.CallOption) ([]*pb.EntityAnnotation, error)

                                                                    DetectLandmarks performs landmark detection on the image. At most maxResults results are returned.

                                                                    func (*ImageAnnotatorClient) DetectLogos

                                                                    func (c *ImageAnnotatorClient) DetectLogos(ctx context.Context, img *pb.Image, ictx *pb.ImageContext, maxResults int, opts ...gax.CallOption) ([]*pb.EntityAnnotation, error)

                                                                      DetectLogos performs logo detection on the image. At most maxResults results are returned.

                                                                      func (*ImageAnnotatorClient) DetectSafeSearch

                                                                      func (c *ImageAnnotatorClient) DetectSafeSearch(ctx context.Context, img *pb.Image, ictx *pb.ImageContext, opts ...gax.CallOption) (*pb.SafeSearchAnnotation, error)

                                                                        DetectSafeSearch performs safe-search detection on the image.

                                                                        func (*ImageAnnotatorClient) DetectTexts

                                                                        func (c *ImageAnnotatorClient) DetectTexts(ctx context.Context, img *pb.Image, ictx *pb.ImageContext, maxResults int, opts ...gax.CallOption) ([]*pb.EntityAnnotation, error)

                                                                          DetectTexts performs text detection on the image. At most maxResults results are returned.

                                                                          func (*ImageAnnotatorClient) DetectWeb

                                                                          func (c *ImageAnnotatorClient) DetectWeb(ctx context.Context, img *pb.Image, ictx *pb.ImageContext, opts ...gax.CallOption) (*pb.WebDetection, error)

                                                                            DetectWeb computes a web annotation on the image.

                                                                            func (*ImageAnnotatorClient) LocalizeObjects

                                                                            func (c *ImageAnnotatorClient) LocalizeObjects(ctx context.Context, img *pb.Image, ictx *pb.ImageContext, opts ...gax.CallOption) ([]*pb.LocalizedObjectAnnotation, error)

                                                                              LocalizeObject runs the localizer for object detection.

                                                                              func (*ImageAnnotatorClient) ProductSearch

                                                                              func (c *ImageAnnotatorClient) ProductSearch(ctx context.Context, img *pb.Image, ictx *pb.ImageContext, opts ...gax.CallOption) (*pb.ProductSearchResults, error)

                                                                                ProductSearch searches the image for products.

                                                                                type ImportProductSetsOperation

                                                                                type ImportProductSetsOperation struct {
                                                                                	// contains filtered or unexported fields
                                                                                }

                                                                                  ImportProductSetsOperation manages a long-running operation from ImportProductSets.

                                                                                  func (*ImportProductSetsOperation) Done

                                                                                  func (op *ImportProductSetsOperation) Done() bool

                                                                                    Done reports whether the long-running operation has completed.

                                                                                    func (*ImportProductSetsOperation) Metadata

                                                                                      Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.

                                                                                      func (*ImportProductSetsOperation) Name

                                                                                        Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.

                                                                                        func (*ImportProductSetsOperation) Poll

                                                                                          Poll fetches the latest state of the long-running operation.

                                                                                          Poll also fetches the latest metadata, which can be retrieved by Metadata.

                                                                                          If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.

                                                                                          func (*ImportProductSetsOperation) Wait

                                                                                            Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

                                                                                            See documentation of Poll for error-handling information.

                                                                                            type Mouth

                                                                                            type Mouth struct {
                                                                                            	Left, Center, Right, UpperLip, LowerLip *pb.Position
                                                                                            }

                                                                                              Mouth represents a face's mouth.

                                                                                              type Nose

                                                                                              type Nose struct {
                                                                                              	Left, Right, Top, Bottom, Tip *pb.Position
                                                                                              }

                                                                                                Nose represents a face's nose.

                                                                                                type ProductIterator

                                                                                                type ProductIterator struct {
                                                                                                
                                                                                                	// InternalFetch is for use by the Google Cloud Libraries only.
                                                                                                	// It is not part of the stable interface of this package.
                                                                                                	//
                                                                                                	// InternalFetch returns results from a single call to the underlying RPC.
                                                                                                	// The number of results is no greater than pageSize.
                                                                                                	// If there are no more results, nextPageToken is empty and err is nil.
                                                                                                	InternalFetch func(pageSize int, pageToken string) (results []*visionpb.Product, nextPageToken string, err error)
                                                                                                	// contains filtered or unexported fields
                                                                                                }

                                                                                                  ProductIterator manages a stream of *visionpb.Product.

                                                                                                  func (*ProductIterator) Next

                                                                                                  func (it *ProductIterator) Next() (*visionpb.Product, error)

                                                                                                    Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

                                                                                                    func (*ProductIterator) PageInfo

                                                                                                    func (it *ProductIterator) PageInfo() *iterator.PageInfo

                                                                                                      PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

                                                                                                      type ProductSearchCallOptions

                                                                                                      type ProductSearchCallOptions struct {
                                                                                                      	CreateProduct               []gax.CallOption
                                                                                                      	ListProducts                []gax.CallOption
                                                                                                      	GetProduct                  []gax.CallOption
                                                                                                      	UpdateProduct               []gax.CallOption
                                                                                                      	DeleteProduct               []gax.CallOption
                                                                                                      	ListReferenceImages         []gax.CallOption
                                                                                                      	GetReferenceImage           []gax.CallOption
                                                                                                      	DeleteReferenceImage        []gax.CallOption
                                                                                                      	CreateReferenceImage        []gax.CallOption
                                                                                                      	CreateProductSet            []gax.CallOption
                                                                                                      	ListProductSets             []gax.CallOption
                                                                                                      	GetProductSet               []gax.CallOption
                                                                                                      	UpdateProductSet            []gax.CallOption
                                                                                                      	DeleteProductSet            []gax.CallOption
                                                                                                      	AddProductToProductSet      []gax.CallOption
                                                                                                      	RemoveProductFromProductSet []gax.CallOption
                                                                                                      	ListProductsInProductSet    []gax.CallOption
                                                                                                      	ImportProductSets           []gax.CallOption
                                                                                                      }

                                                                                                        ProductSearchCallOptions contains the retry settings for each method of ProductSearchClient.

                                                                                                        type ProductSearchClient

                                                                                                        type ProductSearchClient struct {
                                                                                                        
                                                                                                        	// LROClient is used internally to handle longrunning operations.
                                                                                                        	// It is exposed so that its CallOptions can be modified if required.
                                                                                                        	// Users should not Close this client.
                                                                                                        	LROClient *lroauto.OperationsClient
                                                                                                        
                                                                                                        	// The call options for this service.
                                                                                                        	CallOptions *ProductSearchCallOptions
                                                                                                        	// contains filtered or unexported fields
                                                                                                        }

                                                                                                          ProductSearchClient is a client for interacting with Cloud Vision API.

                                                                                                          Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

                                                                                                          func NewProductSearchClient

                                                                                                          func NewProductSearchClient(ctx context.Context, opts ...option.ClientOption) (*ProductSearchClient, error)

                                                                                                            NewProductSearchClient creates a new product search client.

                                                                                                            Manages Products and ProductSets of reference images for use in product search. It uses the following resource model:

                                                                                                            The API has a collection of [ProductSet][google.cloud.vision.v1.ProductSet] resources, named
                                                                                                            projects/*/locations/*/productSets/*, which acts as a way to put different
                                                                                                            products into groups to limit identification.
                                                                                                            

                                                                                                            In parallel,

                                                                                                            The API has a collection of [Product][google.cloud.vision.v1.Product] resources, named
                                                                                                            projects/*/locations/*/products/*
                                                                                                            
                                                                                                            Each [Product][google.cloud.vision.v1.Product] has a collection of [ReferenceImage][google.cloud.vision.v1.ReferenceImage] resources, named
                                                                                                            projects/*/locations/*/products/*/referenceImages/*
                                                                                                            
                                                                                                            Example
                                                                                                            Output:
                                                                                                            
                                                                                                            

                                                                                                            func (*ProductSearchClient) AddProductToProductSet

                                                                                                            func (c *ProductSearchClient) AddProductToProductSet(ctx context.Context, req *visionpb.AddProductToProductSetRequest, opts ...gax.CallOption) error

                                                                                                              AddProductToProductSet adds a Product to the specified ProductSet. If the Product is already present, no change is made.

                                                                                                              One Product can be added to at most 100 ProductSets.

                                                                                                              Possible errors:

                                                                                                              Returns NOT_FOUND if the Product or the ProductSet doesn't exist.
                                                                                                              
                                                                                                              Example
                                                                                                              Output:
                                                                                                              
                                                                                                              

                                                                                                              func (*ProductSearchClient) Close

                                                                                                              func (c *ProductSearchClient) Close() error

                                                                                                                Close closes the connection to the API service. The user should invoke this when the client is no longer required.

                                                                                                                func (*ProductSearchClient) Connection

                                                                                                                func (c *ProductSearchClient) Connection() *grpc.ClientConn

                                                                                                                  Connection returns the client's connection to the API service.

                                                                                                                  func (*ProductSearchClient) CreateProduct

                                                                                                                    CreateProduct creates and returns a new product resource.

                                                                                                                    Possible errors:

                                                                                                                    Returns INVALID_ARGUMENT if display_name is missing or longer than 4096
                                                                                                                    characters.
                                                                                                                    
                                                                                                                    Returns INVALID_ARGUMENT if description is longer than 4096 characters.
                                                                                                                    
                                                                                                                    Returns INVALID_ARGUMENT if product_category is missing or invalid.
                                                                                                                    
                                                                                                                    Example
                                                                                                                    Output:
                                                                                                                    
                                                                                                                    

                                                                                                                    func (*ProductSearchClient) CreateProductSet

                                                                                                                      CreateProductSet creates and returns a new ProductSet resource.

                                                                                                                      Possible errors:

                                                                                                                      Returns INVALID_ARGUMENT if display_name is missing, or is longer than
                                                                                                                      4096 characters.
                                                                                                                      
                                                                                                                      Example
                                                                                                                      Output:
                                                                                                                      
                                                                                                                      

                                                                                                                      func (*ProductSearchClient) CreateReferenceImage

                                                                                                                        CreateReferenceImage creates and returns a new ReferenceImage resource.

                                                                                                                        The bounding_poly field is optional. If bounding_poly is not specified, the system will try to detect regions of interest in the image that are compatible with the product_category on the parent product. If it is specified, detection is ALWAYS skipped. The system converts polygons into non-rotated rectangles.

                                                                                                                        Note that the pipeline will resize the image if the image resolution is too large to process (above 50MP).

                                                                                                                        Possible errors:

                                                                                                                        Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096
                                                                                                                        characters.
                                                                                                                        
                                                                                                                        Returns INVALID_ARGUMENT if the product does not exist.
                                                                                                                        
                                                                                                                        Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing
                                                                                                                        compatible with the parent product's product_category is detected.
                                                                                                                        
                                                                                                                        Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons.
                                                                                                                        
                                                                                                                        Example
                                                                                                                        Output:
                                                                                                                        
                                                                                                                        

                                                                                                                        func (*ProductSearchClient) DeleteProduct

                                                                                                                        func (c *ProductSearchClient) DeleteProduct(ctx context.Context, req *visionpb.DeleteProductRequest, opts ...gax.CallOption) error

                                                                                                                          DeleteProduct permanently deletes a product and its reference images.

                                                                                                                          Metadata of the product and all its images will be deleted right away, but search queries against ProductSets containing the product may still work until all related caches are refreshed.

                                                                                                                          Possible errors:

                                                                                                                          Returns NOT_FOUND if the product does not exist.
                                                                                                                          
                                                                                                                          Example
                                                                                                                          Output:
                                                                                                                          
                                                                                                                          

                                                                                                                          func (*ProductSearchClient) DeleteProductSet

                                                                                                                          func (c *ProductSearchClient) DeleteProductSet(ctx context.Context, req *visionpb.DeleteProductSetRequest, opts ...gax.CallOption) error

                                                                                                                            DeleteProductSet permanently deletes a ProductSet. Products and ReferenceImages in the ProductSet are not deleted.

                                                                                                                            The actual image files are not deleted from Google Cloud Storage.

                                                                                                                            Possible errors:

                                                                                                                            Returns NOT_FOUND if the ProductSet does not exist.
                                                                                                                            
                                                                                                                            Example
                                                                                                                            Output:
                                                                                                                            
                                                                                                                            

                                                                                                                            func (*ProductSearchClient) DeleteReferenceImage

                                                                                                                            func (c *ProductSearchClient) DeleteReferenceImage(ctx context.Context, req *visionpb.DeleteReferenceImageRequest, opts ...gax.CallOption) error

                                                                                                                              DeleteReferenceImage permanently deletes a reference image.

                                                                                                                              The image metadata will be deleted right away, but search queries against ProductSets containing the image may still work until all related caches are refreshed.

                                                                                                                              The actual image files are not deleted from Google Cloud Storage.

                                                                                                                              Possible errors:

                                                                                                                              Returns NOT_FOUND if the reference image does not exist.
                                                                                                                              
                                                                                                                              Example
                                                                                                                              Output:
                                                                                                                              
                                                                                                                              

                                                                                                                              func (*ProductSearchClient) GetProduct

                                                                                                                                GetProduct gets information associated with a Product.

                                                                                                                                Possible errors:

                                                                                                                                Returns NOT_FOUND if the Product does not exist.
                                                                                                                                
                                                                                                                                Example
                                                                                                                                Output:
                                                                                                                                
                                                                                                                                

                                                                                                                                func (*ProductSearchClient) GetProductSet

                                                                                                                                  GetProductSet gets information associated with a ProductSet.

                                                                                                                                  Possible errors:

                                                                                                                                  Returns NOT_FOUND if the ProductSet does not exist.
                                                                                                                                  
                                                                                                                                  Example
                                                                                                                                  Output:
                                                                                                                                  
                                                                                                                                  

                                                                                                                                  func (*ProductSearchClient) GetReferenceImage

                                                                                                                                    GetReferenceImage gets information associated with a ReferenceImage.

                                                                                                                                    Possible errors:

                                                                                                                                    Returns NOT_FOUND if the specified image does not exist.
                                                                                                                                    
                                                                                                                                    Example
                                                                                                                                    Output:
                                                                                                                                    
                                                                                                                                    

                                                                                                                                    func (*ProductSearchClient) ImportProductSets

                                                                                                                                      ImportProductSets asynchronous API that imports a list of reference images to specified product sets based on a list of image information.

                                                                                                                                      The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep track of the progress and results of the request. Operation.metadata contains BatchOperationMetadata. (progress) Operation.response contains ImportProductSetsResponse. (results)

                                                                                                                                      The input source of this method is a csv file on Google Cloud Storage. For the format of the csv file please see [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1.ImportProductSetsGcsSource.csv_file_uri].

                                                                                                                                      Example
                                                                                                                                      Output:
                                                                                                                                      
                                                                                                                                      

                                                                                                                                      func (*ProductSearchClient) ImportProductSetsOperation

                                                                                                                                      func (c *ProductSearchClient) ImportProductSetsOperation(name string) *ImportProductSetsOperation

                                                                                                                                        ImportProductSetsOperation returns a new ImportProductSetsOperation from a given name. The name must be that of a previously created ImportProductSetsOperation, possibly from a different process.

                                                                                                                                        func (*ProductSearchClient) ListProductSets

                                                                                                                                          ListProductSets lists ProductSets in an unspecified order.

                                                                                                                                          Possible errors:

                                                                                                                                          Returns INVALID_ARGUMENT if page_size is greater than 100, or less
                                                                                                                                          than 1.
                                                                                                                                          
                                                                                                                                          Example
                                                                                                                                          Output:
                                                                                                                                          
                                                                                                                                          

                                                                                                                                          func (*ProductSearchClient) ListProducts

                                                                                                                                            ListProducts lists products in an unspecified order.

                                                                                                                                            Possible errors:

                                                                                                                                            Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.
                                                                                                                                            
                                                                                                                                            Example
                                                                                                                                            Output:
                                                                                                                                            
                                                                                                                                            

                                                                                                                                            func (*ProductSearchClient) ListProductsInProductSet

                                                                                                                                              ListProductsInProductSet lists the Products in a ProductSet, in an unspecified order. If the ProductSet does not exist, the products field of the response will be empty.

                                                                                                                                              Possible errors:

                                                                                                                                              Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.
                                                                                                                                              
                                                                                                                                              Example
                                                                                                                                              Output:
                                                                                                                                              
                                                                                                                                              

                                                                                                                                              func (*ProductSearchClient) ListReferenceImages

                                                                                                                                                ListReferenceImages lists reference images.

                                                                                                                                                Possible errors:

                                                                                                                                                Returns NOT_FOUND if the parent product does not exist.
                                                                                                                                                
                                                                                                                                                Returns INVALID_ARGUMENT if the page_size is greater than 100, or less
                                                                                                                                                than 1.
                                                                                                                                                
                                                                                                                                                Example
                                                                                                                                                Output:
                                                                                                                                                
                                                                                                                                                

                                                                                                                                                func (*ProductSearchClient) RemoveProductFromProductSet

                                                                                                                                                func (c *ProductSearchClient) RemoveProductFromProductSet(ctx context.Context, req *visionpb.RemoveProductFromProductSetRequest, opts ...gax.CallOption) error

                                                                                                                                                  RemoveProductFromProductSet removes a Product from the specified ProductSet.

                                                                                                                                                  Possible errors:

                                                                                                                                                  Returns NOT_FOUND If the Product is not found under the ProductSet.
                                                                                                                                                  
                                                                                                                                                  Example
                                                                                                                                                  Output:
                                                                                                                                                  
                                                                                                                                                  

                                                                                                                                                  func (*ProductSearchClient) UpdateProduct

                                                                                                                                                    UpdateProduct makes changes to a Product resource. Only the display_name, description, and labels fields can be updated right now.

                                                                                                                                                    If labels are updated, the change will not be reflected in queries until the next index time.

                                                                                                                                                    Possible errors:

                                                                                                                                                    Returns NOT_FOUND if the Product does not exist.
                                                                                                                                                    
                                                                                                                                                    Returns INVALID_ARGUMENT if display_name is present in update_mask but is
                                                                                                                                                    missing from the request or longer than 4096 characters.
                                                                                                                                                    
                                                                                                                                                    Returns INVALID_ARGUMENT if description is present in update_mask but is
                                                                                                                                                    longer than 4096 characters.
                                                                                                                                                    
                                                                                                                                                    Returns INVALID_ARGUMENT if product_category is present in update_mask.
                                                                                                                                                    
                                                                                                                                                    Example
                                                                                                                                                    Output:
                                                                                                                                                    
                                                                                                                                                    

                                                                                                                                                    func (*ProductSearchClient) UpdateProductSet

                                                                                                                                                      UpdateProductSet makes changes to a ProductSet resource. Only display_name can be updated currently.

                                                                                                                                                      Possible errors:

                                                                                                                                                      Returns NOT_FOUND if the ProductSet does not exist.
                                                                                                                                                      
                                                                                                                                                      Returns INVALID_ARGUMENT if display_name is present in update_mask but
                                                                                                                                                      missing from the request or longer than 4096 characters.
                                                                                                                                                      
                                                                                                                                                      Example
                                                                                                                                                      Output:
                                                                                                                                                      
                                                                                                                                                      

                                                                                                                                                      type ProductSetIterator

                                                                                                                                                      type ProductSetIterator struct {
                                                                                                                                                      
                                                                                                                                                      	// InternalFetch is for use by the Google Cloud Libraries only.
                                                                                                                                                      	// It is not part of the stable interface of this package.
                                                                                                                                                      	//
                                                                                                                                                      	// InternalFetch returns results from a single call to the underlying RPC.
                                                                                                                                                      	// The number of results is no greater than pageSize.
                                                                                                                                                      	// If there are no more results, nextPageToken is empty and err is nil.
                                                                                                                                                      	InternalFetch func(pageSize int, pageToken string) (results []*visionpb.ProductSet, nextPageToken string, err error)
                                                                                                                                                      	// contains filtered or unexported fields
                                                                                                                                                      }

                                                                                                                                                        ProductSetIterator manages a stream of *visionpb.ProductSet.

                                                                                                                                                        func (*ProductSetIterator) Next

                                                                                                                                                          Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

                                                                                                                                                          func (*ProductSetIterator) PageInfo

                                                                                                                                                          func (it *ProductSetIterator) PageInfo() *iterator.PageInfo

                                                                                                                                                            PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

                                                                                                                                                            type ReferenceImageIterator

                                                                                                                                                            type ReferenceImageIterator struct {
                                                                                                                                                            
                                                                                                                                                            	// InternalFetch is for use by the Google Cloud Libraries only.
                                                                                                                                                            	// It is not part of the stable interface of this package.
                                                                                                                                                            	//
                                                                                                                                                            	// InternalFetch returns results from a single call to the underlying RPC.
                                                                                                                                                            	// The number of results is no greater than pageSize.
                                                                                                                                                            	// If there are no more results, nextPageToken is empty and err is nil.
                                                                                                                                                            	InternalFetch func(pageSize int, pageToken string) (results []*visionpb.ReferenceImage, nextPageToken string, err error)
                                                                                                                                                            	// contains filtered or unexported fields
                                                                                                                                                            }

                                                                                                                                                              ReferenceImageIterator manages a stream of *visionpb.ReferenceImage.

                                                                                                                                                              func (*ReferenceImageIterator) Next

                                                                                                                                                                Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

                                                                                                                                                                func (*ReferenceImageIterator) PageInfo

                                                                                                                                                                func (it *ReferenceImageIterator) PageInfo() *iterator.PageInfo

                                                                                                                                                                  PageInfo supports pagination. See the google.golang.org/api/iterator package for details.