Google_Service_CloudMachineLearning_Resource_ProjectsModelsVersions
extends Google_Service_Resource
in package
The "versions" collection of methods.
Typical usage is:
$mlService = new Google_Service_CloudMachineLearning(...);
$versions = $mlService->versions;
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_CloudMachineLearning_GoogleLongrunningOperation
- Creates a new version of a model from a trained TensorFlow model.
- createRequestUri() : string
- Parse/expand request parameters and create a fully qualified request uri.
- delete() : Google_Service_CloudMachineLearning_GoogleLongrunningOperation
- Deletes a model version.
- get() : Google_Service_CloudMachineLearning_GoogleCloudMlV1beta1Version
- Gets information about a model version.
- listProjectsModelsVersions() : Google_Service_CloudMachineLearning_GoogleCloudMlV1beta1ListVersionsResponse
- Gets basic information about all the versions of a model.
- setDefault() : Google_Service_CloudMachineLearning_GoogleCloudMlV1beta1Version
- Designates a version to be the default for the model.
- 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 a new version of a model from a trained TensorFlow model.
public
create(string $parent, Google_Service_CloudMachineLearning_GoogleCloudMlV1beta1Version $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_CloudMachineLearning_GoogleLongrunningOperation
If the version created in the cloud by this call is the first deployed version of the specified model, it will be made the default version of the model. When you add a version to a model that already has one or more versions, the default version does not automatically change. If you want a new version to be the default, you must call projects.models.versions.setDef ault. (versions.create)
Parameters
- $parent : string
-
Required. The name of the model.
Authorization: requires
Editorrole on the parent project. - $postBody : Google_Service_CloudMachineLearning_GoogleCloudMlV1beta1Version
- $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Return values
Google_Service_CloudMachineLearning_GoogleLongrunningOperation —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()
Deletes a model version.
public
delete(string $name[, array<string|int, mixed> $optParams = array() ]) : Google_Service_CloudMachineLearning_GoogleLongrunningOperation
Each model can have multiple versions deployed and in use at any given time. Use this method to remove a single version.
Note: You cannot delete the version that is set as the default version of the model unless it is the only remaining version. (versions.delete)
Parameters
- $name : string
-
Required. The name of the version. You can get the names of all the versions of a model by calling [projects.models.versions.list](/ml /reference/rest/v1beta1/projects.models.versions/list).
Authorization: requires
Editorrole on the parent project. - $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Return values
Google_Service_CloudMachineLearning_GoogleLongrunningOperation —get()
Gets information about a model version.
public
get(string $name[, array<string|int, mixed> $optParams = array() ]) : Google_Service_CloudMachineLearning_GoogleCloudMlV1beta1Version
Models can have multiple versions. You can call projects.models.versions.lis t to get the same information that this method returns for all of the versions of a model. (versions.get)
Parameters
- $name : string
-
Required. The name of the version.
Authorization: requires
Viewerrole on the parent project. - $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Return values
Google_Service_CloudMachineLearning_GoogleCloudMlV1beta1Version —listProjectsModelsVersions()
Gets basic information about all the versions of a model.
public
listProjectsModelsVersions(string $parent[, array<string|int, mixed> $optParams = array() ]) : Google_Service_CloudMachineLearning_GoogleCloudMlV1beta1ListVersionsResponse
If you expect that a model has a lot of versions, or if you need to handle only a limited number of results at a time, you can request that the list be retrieved in batches (called pages): (versions.listProjectsModelsVersions)
Parameters
- $parent : string
-
Required. The name of the model for which to list the version.
Authorization: requires
Viewerrole on the parent project. - $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Tags
Return values
Google_Service_CloudMachineLearning_GoogleCloudMlV1beta1ListVersionsResponse —setDefault()
Designates a version to be the default for the model.
public
setDefault(string $name, Google_Service_CloudMachineLearning_GoogleCloudMlV1beta1SetDefaultVersionRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_CloudMachineLearning_GoogleCloudMlV1beta1Version
The default version is used for prediction requests made against the model that don't specify a version.
The first version to be created for a model is automatically set as the default. You must make any subsequent changes to the default version setting manually using this method. (versions.setDefault)
Parameters
- $name : string
-
Required. The name of the version to make the default for the model. You can get the names of all the versions of a model by calling [p rojects.models.versions.list](/ml/reference/rest/v1beta1/projects.models.vers ions/list).
Authorization: requires
Editorrole on the parent project. - $postBody : Google_Service_CloudMachineLearning_GoogleCloudMlV1beta1SetDefaultVersionRequest
- $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Return values
Google_Service_CloudMachineLearning_GoogleCloudMlV1beta1Version —convertToArrayAndStripNulls()
protected
convertToArrayAndStripNulls(mixed $o) : mixed
Parameters
- $o : mixed