Google_Service_Vision_Resource_ProjectsLocationsProducts
extends Google_Service_Resource
in package
The "products" collection of methods.
Typical usage is:
$visionService = new Google_Service_Vision(...);
$products = $visionService->products;
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_Product
- 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.
- createRequestUri() : string
- Parse/expand request parameters and create a fully qualified request uri.
- delete() : Google_Service_Vision_VisionEmpty
- 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. (products.delete)
- get() : Google_Service_Vision_Product
- Gets information associated with a Product. Possible errors: * Returns NOT_FOUND if the Product does not exist. (products.get)
- listProjectsLocationsProducts() : Google_Service_Vision_ListProductsResponse
- Lists products in an unspecified order. Possible errors: * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.
- patch() : Google_Service_Vision_Product
- 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.
- purge() : Google_Service_Vision_Operation
- Asynchronous API to delete all Products in a ProductSet or all Products that are in no ProductSet. If a Product is a member of the specified ProductSet in addition to other ProductSets, the Product will still be deleted. It is recommended to not delete the specified ProductSet until after this operation has completed. It is also recommended to not add any of the Products involved in the batch delete to a new ProductSet while this operation is running because those Products may still end up deleted. It's not possible to undo the PurgeProducts operation. Therefore, it is recommended to keep the csv files used in ImportProductSets (if that was how you originally built the Product Set) before starting PurgeProducts, in case you need to re-import the data after deletion. If the plan is to purge all of the Products from a ProductSet and then re-use the empty ProductSet to re-import new Products into the empty ProductSet, you must wait until the PurgeProducts operation has finished for that ProductSet. The google.longrunning.Operation API can be used to keep track of the progress and results of the request.
- convertToArrayAndStripNulls() : mixed
Properties
$client
private
Google_Client
$client
$methods
private
array<string|int, mixed>
$methods
$resourceName
private
string
$resourceName
$rootUrl
private
string
$rootUrl
$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
Tags
Return values
Google_Http_Request|expectedClass —create()
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.
public
create(string $parent, Google_Service_Vision_Product $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Vision_Product
(products.create)
Parameters
- $parent : string
-
Required. The project in which the Product should be created. Format is
projects/PROJECT_ID/locations/LOC_ID. - $postBody : Google_Service_Vision_Product
- $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Tags
Return values
Google_Service_Vision_Product —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
Return values
string —$requestUrl
delete()
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. (products.delete)
public
delete(string $name[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Vision_VisionEmpty
Parameters
- $name : string
-
Required. Resource name of product to delete. Format is:
projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID - $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Return values
Google_Service_Vision_VisionEmpty —get()
Gets information associated with a Product. Possible errors: * Returns NOT_FOUND if the Product does not exist. (products.get)
public
get(string $name[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Vision_Product
Parameters
- $name : string
-
Required. Resource name of the Product to get. Format is:
projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID - $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Return values
Google_Service_Vision_Product —listProjectsLocationsProducts()
Lists products in an unspecified order. Possible errors: * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.
public
listProjectsLocationsProducts(string $parent[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Vision_ListProductsResponse
(products.listProjectsLocationsProducts)
Parameters
- $parent : string
-
Required. The project OR ProductSet from which Products should be listed. Format:
projects/PROJECT_ID/locations/LOC_ID - $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Tags
Return values
Google_Service_Vision_ListProductsResponse —patch()
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.
public
patch(string $name, Google_Service_Vision_Product $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Vision_Product
- Returns INVALID_ARGUMENT if product_category is present in update_mask. (products.patch)
Parameters
- $name : string
-
The resource name of the product. Format is:
projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID. This field is ignored when creating a product. - $postBody : Google_Service_Vision_Product
- $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Tags
Return values
Google_Service_Vision_Product —purge()
Asynchronous API to delete all Products in a ProductSet or all Products that are in no ProductSet. If a Product is a member of the specified ProductSet in addition to other ProductSets, the Product will still be deleted. It is recommended to not delete the specified ProductSet until after this operation has completed. It is also recommended to not add any of the Products involved in the batch delete to a new ProductSet while this operation is running because those Products may still end up deleted. It's not possible to undo the PurgeProducts operation. Therefore, it is recommended to keep the csv files used in ImportProductSets (if that was how you originally built the Product Set) before starting PurgeProducts, in case you need to re-import the data after deletion. If the plan is to purge all of the Products from a ProductSet and then re-use the empty ProductSet to re-import new Products into the empty ProductSet, you must wait until the PurgeProducts operation has finished for that ProductSet. The google.longrunning.Operation API can be used to keep track of the progress and results of the request.
public
purge(string $parent, Google_Service_Vision_PurgeProductsRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Vision_Operation
Operation.metadata contains BatchOperationMetadata. (progress)
(products.purge)
Parameters
- $parent : string
-
Required. The project and location in which the Products should be deleted. Format is
projects/PROJECT_ID/locations/LOC_ID. - $postBody : Google_Service_Vision_PurgeProductsRequest
- $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Return values
Google_Service_Vision_Operation —convertToArrayAndStripNulls()
protected
convertToArrayAndStripNulls(mixed $o) : mixed
Parameters
- $o : mixed