Documentation

Google_Service_Vision_Resource_ProjectsLocationsProductSets extends Google_Service_Resource
in package

The "productSets" collection of methods.

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

Table of Contents

$client  : Google_Client
$methods  : array<string|int, mixed>
$resourceName  : string
$rootUrl  : string
$serviceName  : string
$servicePath  : string
$stackParameters  : mixed
__construct()  : mixed
addProduct()  : Google_Service_Vision_VisionEmpty
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. (productSets.addProduct)
call()  : Google_Http_Request|expectedClass
TODO: This function needs simplifying.
create()  : Google_Service_Vision_ProductSet
Creates and returns a new ProductSet resource. Possible errors: * Returns INVALID_ARGUMENT if display_name is missing, or is longer than 4096 characters. (productSets.create)
createRequestUri()  : string
Parse/expand request parameters and create a fully qualified request uri.
delete()  : Google_Service_Vision_VisionEmpty
Permanently deletes a ProductSet. Products and ReferenceImages in the ProductSet are not deleted. The actual image files are not deleted from Google Cloud Storage. (productSets.delete)
get()  : Google_Service_Vision_ProductSet
Gets information associated with a ProductSet. Possible errors: * Returns NOT_FOUND if the ProductSet does not exist. (productSets.get)
import()  : Google_Service_Vision_Operation
Asynchronous API that imports a list of reference images to specified product sets based on a list of image information. The google.longrunning.Operation API can be used to keep track of the progress and results of the request.
listProjectsLocationsProductSets()  : Google_Service_Vision_ListProductSetsResponse
Lists ProductSets in an unspecified order. Possible errors: * Returns INVALID_ARGUMENT if page_size is greater than 100, or less than 1.
patch()  : Google_Service_Vision_ProductSet
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.
removeProduct()  : Google_Service_Vision_VisionEmpty
Removes a Product from the specified ProductSet. (productSets.removeProduct)
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

addProduct()

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. (productSets.addProduct)

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

Required. The resource name for the ProductSet to modify. Format is: projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID

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

Optional parameters.

Return values
Google_Service_Vision_VisionEmpty

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 ProductSet resource. Possible errors: * Returns INVALID_ARGUMENT if display_name is missing, or is longer than 4096 characters. (productSets.create)

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

Required. The project in which the ProductSet should be created. Format is projects/PROJECT_ID/locations/LOC_ID.

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

Optional parameters.

Tags
opt_param

string productSetId A user-supplied resource id for this ProductSet. 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_ProductSet

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 ProductSet. Products and ReferenceImages in the ProductSet are not deleted. The actual image files are not deleted from Google Cloud Storage. (productSets.delete)

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

Required. Resource name of the ProductSet to delete. Format is: projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID

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

Optional parameters.

Return values
Google_Service_Vision_VisionEmpty

get()

Gets information associated with a ProductSet. Possible errors: * Returns NOT_FOUND if the ProductSet does not exist. (productSets.get)

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

Required. Resource name of the ProductSet to get. Format is: projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID

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

Optional parameters.

Return values
Google_Service_Vision_ProductSet

import()

Asynchronous API that imports a list of reference images to specified product sets based on a list of image information. The google.longrunning.Operation API can be used to keep track of the progress and results of the request.

public import(string $parent, Google_Service_Vision_ImportProductSetsRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Vision_Operation

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. (productSets.import)

Parameters
$parent : string

Required. The project in which the ProductSets should be imported. Format is projects/PROJECT_ID/locations/LOC_ID.

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

Optional parameters.

Return values
Google_Service_Vision_Operation

listProjectsLocationsProductSets()

Lists ProductSets in an unspecified order. Possible errors: * Returns INVALID_ARGUMENT if page_size is greater than 100, or less than 1.

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

(productSets.listProjectsLocationsProductSets)

Parameters
$parent : string

Required. The project from which ProductSets should be listed. Format is projects/PROJECT_ID/locations/LOC_ID.

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

Optional parameters.

Tags
opt_param

string pageToken The next_page_token returned from a previous List request, if any.

opt_param

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

Return values
Google_Service_Vision_ListProductSetsResponse

patch()

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.

public patch(string $name, Google_Service_Vision_ProductSet $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Vision_ProductSet

(productSets.patch)

Parameters
$name : string

The resource name of the ProductSet. Format is: projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID. This field is ignored when creating a ProductSet.

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

Optional parameters.

Tags
opt_param

string updateMask The FieldMask that specifies which fields to update. If update_mask isn't specified, all mutable fields are to be updated. Valid mask path is display_name.

Return values
Google_Service_Vision_ProductSet

removeProduct()

Removes a Product from the specified ProductSet. (productSets.removeProduct)

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

Required. The resource name for the ProductSet to modify. Format is: projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID

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

Optional parameters.

Return values
Google_Service_Vision_VisionEmpty

convertToArrayAndStripNulls()

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

Search results