class ProjectsModels extends Resource (View source)

The "models" collection of methods.

Typical usage is:

 $mlService = new Google\Service\CloudMachineLearningEngine(...);
 $models = $mlService->projects_models;

Methods

create(string $parent, GoogleCloudMlV1Model $postBody, array $optParams = [])

Creates a model which will later contain one or more versions. You must add at least one version before you can request predictions from the model. Add versions by calling projects.models.versions.create. (models.create)

delete(string $name, array $optParams = [])

Deletes a model. You can only delete a model if there are no versions in it.

get(string $name, array $optParams = [])

Gets information about a model, including its name, the description (if set), and the default version (if at least one version of the model has been deployed). (models.get)

getIamPolicy(string $resource, array $optParams = [])

Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. (models.getIamPolicy)

listProjectsModels(string $parent, array $optParams = [])

Lists the models in a project. Each project can contain multiple models, and each model can have multiple versions. If there are no models that match the request parameters, the list request returns an empty response body: {}.

patch(string $name, GoogleCloudMlV1Model $postBody, array $optParams = [])

Updates a specific model resource. Currently the only supported fields to update are description and default_version.name. (models.patch)

setIamPolicy(string $resource, GoogleIamV1SetIamPolicyRequest $postBody, array $optParams = [])

Sets the access control policy on the specified resource. Replaces any existing policy. Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors. (models.setIamPolicy)

testIamPermissions(string $resource, GoogleIamV1TestIamPermissionsRequest $postBody, array $optParams = [])

Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking.

Details

GoogleCloudMlV1Model create(string $parent, GoogleCloudMlV1Model $postBody, array $optParams = [])

Creates a model which will later contain one or more versions. You must add at least one version before you can request predictions from the model. Add versions by calling projects.models.versions.create. (models.create)

Parameters

string $parent

Required. The project name.

GoogleCloudMlV1Model $postBody
array $optParams

Optional parameters.

Return Value

GoogleCloudMlV1Model

Exceptions

Exception

GoogleLongrunningOperation delete(string $name, array $optParams = [])

Deletes a model. You can only delete a model if there are no versions in it.

You can delete versions by calling projects.models.versions.delete. (models.delete)

Parameters

string $name

Required. The name of the model.

array $optParams

Optional parameters.

Return Value

GoogleLongrunningOperation

Exceptions

Exception

GoogleCloudMlV1Model get(string $name, array $optParams = [])

Gets information about a model, including its name, the description (if set), and the default version (if at least one version of the model has been deployed). (models.get)

Parameters

string $name

Required. The name of the model.

array $optParams

Optional parameters.

Return Value

GoogleCloudMlV1Model

Exceptions

Exception

GoogleIamV1Policy getIamPolicy(string $resource, array $optParams = [])

Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. (models.getIamPolicy)

Parameters

string $resource

REQUIRED: The resource for which the policy is being requested. See Resource names for the appropriate value for this field.

array $optParams

Optional parameters.

Return Value

GoogleIamV1Policy

Exceptions

Exception

GoogleCloudMlV1ListModelsResponse listProjectsModels(string $parent, array $optParams = [])

Lists the models in a project. Each project can contain multiple models, and each model can have multiple versions. If there are no models that match the request parameters, the list request returns an empty response body: {}.

(models.listProjectsModels)

Parameters

string $parent

Required. The name of the project whose models are to be listed.

array $optParams

Optional parameters.

Return Value

GoogleCloudMlV1ListModelsResponse

Exceptions

Exception

GoogleLongrunningOperation patch(string $name, GoogleCloudMlV1Model $postBody, array $optParams = [])

Updates a specific model resource. Currently the only supported fields to update are description and default_version.name. (models.patch)

Parameters

string $name

Required. The project name.

GoogleCloudMlV1Model $postBody
array $optParams

Optional parameters.

Return Value

GoogleLongrunningOperation

Exceptions

Exception

GoogleIamV1Policy setIamPolicy(string $resource, GoogleIamV1SetIamPolicyRequest $postBody, array $optParams = [])

Sets the access control policy on the specified resource. Replaces any existing policy. Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors. (models.setIamPolicy)

Parameters

string $resource

REQUIRED: The resource for which the policy is being specified. See Resource names for the appropriate value for this field.

GoogleIamV1SetIamPolicyRequest $postBody
array $optParams

Optional parameters.

Return Value

GoogleIamV1Policy

Exceptions

Exception

GoogleIamV1TestIamPermissionsResponse testIamPermissions(string $resource, GoogleIamV1TestIamPermissionsRequest $postBody, array $optParams = [])

Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking.

This operation may "fail open" without warning. (models.testIamPermissions)

Parameters

string $resource

REQUIRED: The resource for which the policy detail is being requested. See Resource names for the appropriate value for this field.

GoogleIamV1TestIamPermissionsRequest $postBody
array $optParams

Optional parameters.

Return Value

GoogleIamV1TestIamPermissionsResponse

Exceptions

Exception