Googly. CloudVision. Projects. Locations. Products. ReferenceImages
(googly_cloud_vision v0.1.0)
Copy Markdown
View Source
Endpoints for the Projects.Locations.Products.ReferenceImages resource.
Summary
Functions
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.
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.
Gets information associated with a ReferenceImage. Possible errors: * Returns NOT_FOUND if the specified image does not exist.
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.
Functions
@spec create( String.t(), keyword() ) :: {:ok, Googly.CloudVision.Model.ReferenceImage.t()} | {:error, term()}
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.
Parameters
-
parent(type:String.t()) - Required. Resource name of the product in which to create the reference image. Format isprojects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID. -
opts(type:keyword()) - Query and call options (:token, plus any of the below)-
access_token(type:String.t()) - OAuth access token. -
alt(type:String.t()) - Data format for response. -
callback(type:String.t()) - JSONP -
fields(type:String.t()) - Selector specifying which fields to include in a partial response. -
key(type:String.t()) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. -
oauth_token(type:String.t()) - OAuth 2.0 token for the current user. -
pretty_print(type:boolean()) - Returns response with indentations and line breaks. -
quota_user(type:String.t()) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. -
upload_protocol(type:String.t()) - Upload protocol for media (e.g. "raw", "multipart"). -
upload_type(type:String.t()) - Legacy upload protocol for media (e.g. "media", "multipart"). -
xgafv(type:String.t()) - V1 error format. -
reference_image_id(type:String.t()) - A user-supplied resource id for the ReferenceImage to be added. If set, the server will attempt to use this value as the resource id. If it is already in use, an error is returned with code ALREADY_EXISTS. Must be at most 128 characters long. It cannot contain the character/. -
body(type:Googly.CloudVision.Model.ReferenceImage.t()) -
-
Returns
-
{:ok, %Googly.CloudVision.Model.ReferenceImage{}}on success -
{:error, %Googly.CloudVision.Error{}}on failure
@spec delete( String.t(), keyword() ) :: {:ok, Googly.CloudVision.Model.Empty.t()} | {:error, term()}
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.
Parameters
-
name(type:String.t()) - Required. The resource name of the reference image to delete. Format is:projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID -
opts(type:keyword()) - Query and call options (:token, plus any of the below)-
access_token(type:String.t()) - OAuth access token. -
alt(type:String.t()) - Data format for response. -
callback(type:String.t()) - JSONP -
fields(type:String.t()) - Selector specifying which fields to include in a partial response. -
key(type:String.t()) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. -
oauth_token(type:String.t()) - OAuth 2.0 token for the current user. -
pretty_print(type:boolean()) - Returns response with indentations and line breaks. -
quota_user(type:String.t()) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. -
upload_protocol(type:String.t()) - Upload protocol for media (e.g. "raw", "multipart"). -
upload_type(type:String.t()) - Legacy upload protocol for media (e.g. "media", "multipart"). -
xgafv(type:String.t()) - V1 error format.
-
Returns
-
{:ok, %Googly.CloudVision.Model.Empty{}}on success -
{:error, %Googly.CloudVision.Error{}}on failure
@spec get( String.t(), keyword() ) :: {:ok, Googly.CloudVision.Model.ReferenceImage.t()} | {:error, term()}
Gets information associated with a ReferenceImage. Possible errors: * Returns NOT_FOUND if the specified image does not exist.
Parameters
-
name(type:String.t()) - Required. The resource name of the ReferenceImage to get. Format is:projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID. -
opts(type:keyword()) - Query and call options (:token, plus any of the below)-
access_token(type:String.t()) - OAuth access token. -
alt(type:String.t()) - Data format for response. -
callback(type:String.t()) - JSONP -
fields(type:String.t()) - Selector specifying which fields to include in a partial response. -
key(type:String.t()) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. -
oauth_token(type:String.t()) - OAuth 2.0 token for the current user. -
pretty_print(type:boolean()) - Returns response with indentations and line breaks. -
quota_user(type:String.t()) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. -
upload_protocol(type:String.t()) - Upload protocol for media (e.g. "raw", "multipart"). -
upload_type(type:String.t()) - Legacy upload protocol for media (e.g. "media", "multipart"). -
xgafv(type:String.t()) - V1 error format.
-
Returns
-
{:ok, %Googly.CloudVision.Model.ReferenceImage{}}on success -
{:error, %Googly.CloudVision.Error{}}on failure
@spec list( String.t(), keyword() ) :: {:ok, Googly.CloudVision.Model.ListReferenceImagesResponse.t()} | {:error, term()}
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.
Parameters
-
parent(type:String.t()) - Required. Resource name of the product containing the reference images. Format isprojects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID. -
opts(type:keyword()) - Query and call options (:token, plus any of the below)-
access_token(type:String.t()) - OAuth access token. -
alt(type:String.t()) - Data format for response. -
callback(type:String.t()) - JSONP -
fields(type:String.t()) - Selector specifying which fields to include in a partial response. -
key(type:String.t()) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. -
oauth_token(type:String.t()) - OAuth 2.0 token for the current user. -
pretty_print(type:boolean()) - Returns response with indentations and line breaks. -
quota_user(type:String.t()) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. -
upload_protocol(type:String.t()) - Upload protocol for media (e.g. "raw", "multipart"). -
upload_type(type:String.t()) - Legacy upload protocol for media (e.g. "media", "multipart"). -
xgafv(type:String.t()) - V1 error format. -
page_size(type:integer()) - The maximum number of items to return. Default 10, maximum 100. -
page_token(type:String.t()) - A token identifying a page of results to be returned. This is the value ofnextPageTokenreturned in a previous reference image list request. Defaults to the first page if not specified.
-
Returns
-
{:ok, %Googly.CloudVision.Model.ListReferenceImagesResponse{}}on success -
{:error, %Googly.CloudVision.Error{}}on failure