Documentation

Google_Service_Vision_Resource_ProjectsLocationsProductsReferenceImages extends Google_Service_Resource
in package

The "referenceImages" collection of methods.

Typical usage is: $visionService = new Google_Service_Vision(...); $referenceImages = $visionService->referenceImages;

Table of Contents

$client  : Google_Client
$methods  : array<string|int, mixed>
$resourceName  : string
$rootUrl  : string
$serviceName  : string
$servicePath  : string
$stackParameters  : mixed
__construct()  : mixed
call()  : Google_Http_Request|expectedClass
TODO: This function needs simplifying.
create()  : Google_Service_Vision_ReferenceImage
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.
createRequestUri()  : string
Parse/expand request parameters and create a fully qualified request uri.
delete()  : Google_Service_Vision_VisionEmpty
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. (referenceImages.delete)
get()  : Google_Service_Vision_ReferenceImage
Gets information associated with a ReferenceImage. Possible errors: * Returns NOT_FOUND if the specified image does not exist. (referenceImages.get)
listProjectsLocationsProductsReferenceImages()  : Google_Service_Vision_ListReferenceImagesResponse
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.
convertToArrayAndStripNulls()  : mixed

Properties

$methods

private array<string|int, mixed> $methods

$resourceName

private string $resourceName

$serviceName

private string $serviceName

$servicePath

private string $servicePath

$stackParameters

private mixed $stackParameters = array('alt' => array('type' => 'string', 'location' => 'query'), 'fields' => array('type' => 'string', 'location' => 'query'), 'trace' => array('type' => 'string', 'location' => 'query'), 'userIp' => array('type' => 'string', 'location' => 'query'), 'quotaUser' => array('type' => 'string', 'location' => 'query'), 'data' => array('type' => 'string', 'location' => 'body'), 'mimeType' => array('type' => 'string', 'location' => 'header'), 'uploadType' => array('type' => 'string', 'location' => 'query'), 'mediaUpload' => array('type' => 'complex', 'location' => 'query'), 'prettyPrint' => array('type' => 'string', 'location' => 'query'))

Methods

__construct()

public __construct(mixed $service, mixed $serviceName, mixed $resourceName, mixed $resource) : mixed
Parameters
$service : mixed
$serviceName : mixed
$resourceName : mixed
$resource : mixed
Return values
mixed

call()

TODO: This function needs simplifying.

public call( $name,  $arguments[,  $expectedClass = null ]) : Google_Http_Request|expectedClass
Parameters
$name :
$arguments :
$expectedClass : = null
  • optional, the expected class name
Tags
throws
Google_Exception
Return values
Google_Http_Request|expectedClass

create()

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.

public create(string $parent, Google_Service_Vision_ReferenceImage $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Vision_ReferenceImage

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. (referenceImages.create)

Parameters
$parent : string

Required. Resource name of the product in which to create the reference image. Format is projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID.

$postBody : Google_Service_Vision_ReferenceImage
$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
opt_param

string referenceImageId 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 /.

Return values
Google_Service_Vision_ReferenceImage

createRequestUri()

Parse/expand request parameters and create a fully qualified request uri.

public createRequestUri(string $restPath, array<string|int, mixed> $params) : string
Parameters
$restPath : string
$params : array<string|int, mixed>
Tags
static
Return values
string

$requestUrl

delete()

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. (referenceImages.delete)

public delete(string $name[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Vision_VisionEmpty
Parameters
$name : string

Required. The resource name of the reference image to delete. Format is: projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/ referenceImages/IMAGE_ID

$optParams : array<string|int, mixed> = array()

Optional parameters.

Return values
Google_Service_Vision_VisionEmpty

get()

Gets information associated with a ReferenceImage. Possible errors: * Returns NOT_FOUND if the specified image does not exist. (referenceImages.get)

public get(string $name[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Vision_ReferenceImage
Parameters
$name : string

Required. The resource name of the ReferenceImage to get. Format is: projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenc eImages/IMAGE_ID.

$optParams : array<string|int, mixed> = array()

Optional parameters.

Return values
Google_Service_Vision_ReferenceImage

listProjectsLocationsProductsReferenceImages()

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.

public listProjectsLocationsProductsReferenceImages(string $parent[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Vision_ListReferenceImagesResponse

(referenceImages.listProjectsLocationsProductsReferenceImages)

Parameters
$parent : string

Required. Resource name of the product containing the reference images. Format is projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID.

$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
opt_param

string pageToken A token identifying a page of results to be returned. This is the value of nextPageToken returned in a previous reference image list request. Defaults to the first page if not specified.

opt_param

int pageSize The maximum number of items to return. Default 10, maximum 100.

Return values
Google_Service_Vision_ListReferenceImagesResponse

convertToArrayAndStripNulls()

protected convertToArrayAndStripNulls(mixed $o) : mixed
Parameters
$o : mixed
Return values
mixed

Search results