Initial commit

This commit is contained in:
Local Administrator
2025-04-18 10:32:42 +02:00
commit b83134aca3
29643 changed files with 3045897 additions and 0 deletions

View File

@@ -0,0 +1,89 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudMachineLearningEngine\Resource;
use Google\Service\CloudMachineLearningEngine\GoogleApiHttpBody;
use Google\Service\CloudMachineLearningEngine\GoogleCloudMlV1ExplainRequest;
use Google\Service\CloudMachineLearningEngine\GoogleCloudMlV1GetConfigResponse;
use Google\Service\CloudMachineLearningEngine\GoogleCloudMlV1PredictRequest;
/**
* The "projects" collection of methods.
* Typical usage is:
* <code>
* $mlService = new Google\Service\CloudMachineLearningEngine(...);
* $projects = $mlService->projects;
* </code>
*/
class Projects extends \Google\Service\Resource
{
/**
* Performs explanation on the data in the request. {% dynamic include "/ai-
* platform/includes/___explain-request" %} (projects.explain)
*
* @param string $name Required. The resource name of a model or a version.
* Authorization: requires the `predict` permission on the specified resource.
* @param GoogleCloudMlV1ExplainRequest $postBody
* @param array $optParams Optional parameters.
* @return GoogleApiHttpBody
* @throws \Google\Service\Exception
*/
public function explain($name, GoogleCloudMlV1ExplainRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('explain', [$params], GoogleApiHttpBody::class);
}
/**
* Get the service account information associated with your project. You need
* this information in order to grant the service account permissions for the
* Google Cloud Storage location where you put your model training code for
* training the model with Google Cloud Machine Learning. (projects.getConfig)
*
* @param string $name Required. The project name.
* @param array $optParams Optional parameters.
* @return GoogleCloudMlV1GetConfigResponse
* @throws \Google\Service\Exception
*/
public function getConfig($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('getConfig', [$params], GoogleCloudMlV1GetConfigResponse::class);
}
/**
* Performs online prediction on the data in the request. {% dynamic include
* "/ai-platform/includes/___predict-request" %} (projects.predict)
*
* @param string $name Required. The resource name of a model or a version.
* Authorization: requires the `predict` permission on the specified resource.
* @param GoogleCloudMlV1PredictRequest $postBody
* @param array $optParams Optional parameters.
* @return GoogleApiHttpBody
* @throws \Google\Service\Exception
*/
public function predict($name, GoogleCloudMlV1PredictRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('predict', [$params], GoogleApiHttpBody::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Projects::class, 'Google_Service_CloudMachineLearningEngine_Resource_Projects');

View File

@@ -0,0 +1,218 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudMachineLearningEngine\Resource;
use Google\Service\CloudMachineLearningEngine\GoogleCloudMlV1CancelJobRequest;
use Google\Service\CloudMachineLearningEngine\GoogleCloudMlV1Job;
use Google\Service\CloudMachineLearningEngine\GoogleCloudMlV1ListJobsResponse;
use Google\Service\CloudMachineLearningEngine\GoogleIamV1Policy;
use Google\Service\CloudMachineLearningEngine\GoogleIamV1SetIamPolicyRequest;
use Google\Service\CloudMachineLearningEngine\GoogleIamV1TestIamPermissionsRequest;
use Google\Service\CloudMachineLearningEngine\GoogleIamV1TestIamPermissionsResponse;
use Google\Service\CloudMachineLearningEngine\GoogleProtobufEmpty;
/**
* The "jobs" collection of methods.
* Typical usage is:
* <code>
* $mlService = new Google\Service\CloudMachineLearningEngine(...);
* $jobs = $mlService->projects_jobs;
* </code>
*/
class ProjectsJobs extends \Google\Service\Resource
{
/**
* Cancels a running job. (jobs.cancel)
*
* @param string $name Required. The name of the job to cancel.
* @param GoogleCloudMlV1CancelJobRequest $postBody
* @param array $optParams Optional parameters.
* @return GoogleProtobufEmpty
* @throws \Google\Service\Exception
*/
public function cancel($name, GoogleCloudMlV1CancelJobRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('cancel', [$params], GoogleProtobufEmpty::class);
}
/**
* Creates a training or a batch prediction job. (jobs.create)
*
* @param string $parent Required. The project name.
* @param GoogleCloudMlV1Job $postBody
* @param array $optParams Optional parameters.
* @return GoogleCloudMlV1Job
* @throws \Google\Service\Exception
*/
public function create($parent, GoogleCloudMlV1Job $postBody, $optParams = [])
{
$params = ['parent' => $parent, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], GoogleCloudMlV1Job::class);
}
/**
* Describes a job. (jobs.get)
*
* @param string $name Required. The name of the job to get the description of.
* @param array $optParams Optional parameters.
* @return GoogleCloudMlV1Job
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], GoogleCloudMlV1Job::class);
}
/**
* Gets the access control policy for a resource. Returns an empty policy if the
* resource exists and does not have a policy set. (jobs.getIamPolicy)
*
* @param string $resource REQUIRED: The resource for which the policy is being
* requested. See [Resource
* names](https://cloud.google.com/apis/design/resource_names) for the
* appropriate value for this field.
* @param array $optParams Optional parameters.
*
* @opt_param int options.requestedPolicyVersion Optional. The maximum policy
* version that will be used to format the policy. Valid values are 0, 1, and 3.
* Requests specifying an invalid value will be rejected. Requests for policies
* with any conditional role bindings must specify version 3. Policies with no
* conditional role bindings may specify any valid value or leave the field
* unset. The policy in the response might use the policy version that you
* specified, or it might use a lower policy version. For example, if you
* specify version 3, but the policy has no conditional role bindings, the
* response uses version 1. To learn which resources support conditions in their
* IAM policies, see the [IAM
* documentation](https://cloud.google.com/iam/help/conditions/resource-
* policies).
* @return GoogleIamV1Policy
* @throws \Google\Service\Exception
*/
public function getIamPolicy($resource, $optParams = [])
{
$params = ['resource' => $resource];
$params = array_merge($params, $optParams);
return $this->call('getIamPolicy', [$params], GoogleIamV1Policy::class);
}
/**
* Lists the jobs in the project. If there are no jobs that match the request
* parameters, the list request returns an empty response body: {}.
* (jobs.listProjectsJobs)
*
* @param string $parent Required. The name of the project for which to list
* jobs.
* @param array $optParams Optional parameters.
*
* @opt_param string filter Optional. Specifies the subset of jobs to retrieve.
* You can filter on the value of one or more attributes of the job object. For
* example, retrieve jobs with a job identifier that starts with 'census':
* gcloud ai-platform jobs list --filter='jobId:census*' List all failed jobs
* with names that start with 'rnn': gcloud ai-platform jobs list
* --filter='jobId:rnn* AND state:FAILED' For more examples, see the guide to
* monitoring jobs.
* @opt_param int pageSize Optional. The number of jobs to retrieve per "page"
* of results. If there are more remaining results than this number, the
* response message will contain a valid value in the `next_page_token` field.
* The default value is 20, and the maximum page size is 100.
* @opt_param string pageToken Optional. A page token to request the next page
* of results. You get the token from the `next_page_token` field of the
* response from the previous call.
* @return GoogleCloudMlV1ListJobsResponse
* @throws \Google\Service\Exception
*/
public function listProjectsJobs($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], GoogleCloudMlV1ListJobsResponse::class);
}
/**
* Updates a specific job resource. Currently the only supported fields to
* update are `labels`. (jobs.patch)
*
* @param string $name Required. The job name.
* @param GoogleCloudMlV1Job $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string updateMask Required. Specifies the path, relative to `Job`,
* of the field to update. To adopt etag mechanism, include `etag` field in the
* mask, and include the `etag` value in your job resource. For example, to
* change the labels of a job, the `update_mask` parameter would be specified as
* `labels`, `etag`, and the `PATCH` request body would specify the new value,
* as follows: { "labels": { "owner": "Google", "color": "Blue" } "etag":
* "33a64df551425fcc55e4d42a148795d9f25f89d4" } If `etag` matches the one on the
* server, the labels of the job will be replaced with the given ones, and the
* server end `etag` will be recalculated. Currently the only supported update
* masks are `labels` and `etag`.
* @return GoogleCloudMlV1Job
* @throws \Google\Service\Exception
*/
public function patch($name, GoogleCloudMlV1Job $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('patch', [$params], GoogleCloudMlV1Job::class);
}
/**
* Sets the access control policy on the specified resource. Replaces any
* existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and
* `PERMISSION_DENIED` errors. (jobs.setIamPolicy)
*
* @param string $resource REQUIRED: The resource for which the policy is being
* specified. See [Resource
* names](https://cloud.google.com/apis/design/resource_names) for the
* appropriate value for this field.
* @param GoogleIamV1SetIamPolicyRequest $postBody
* @param array $optParams Optional parameters.
* @return GoogleIamV1Policy
* @throws \Google\Service\Exception
*/
public function setIamPolicy($resource, GoogleIamV1SetIamPolicyRequest $postBody, $optParams = [])
{
$params = ['resource' => $resource, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('setIamPolicy', [$params], GoogleIamV1Policy::class);
}
/**
* 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. (jobs.testIamPermissions)
*
* @param string $resource REQUIRED: The resource for which the policy detail is
* being requested. See [Resource
* names](https://cloud.google.com/apis/design/resource_names) for the
* appropriate value for this field.
* @param GoogleIamV1TestIamPermissionsRequest $postBody
* @param array $optParams Optional parameters.
* @return GoogleIamV1TestIamPermissionsResponse
* @throws \Google\Service\Exception
*/
public function testIamPermissions($resource, GoogleIamV1TestIamPermissionsRequest $postBody, $optParams = [])
{
$params = ['resource' => $resource, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('testIamPermissions', [$params], GoogleIamV1TestIamPermissionsResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsJobs::class, 'Google_Service_CloudMachineLearningEngine_Resource_ProjectsJobs');

View File

@@ -0,0 +1,76 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudMachineLearningEngine\Resource;
use Google\Service\CloudMachineLearningEngine\GoogleCloudMlV1ListLocationsResponse;
use Google\Service\CloudMachineLearningEngine\GoogleCloudMlV1Location;
/**
* The "locations" collection of methods.
* Typical usage is:
* <code>
* $mlService = new Google\Service\CloudMachineLearningEngine(...);
* $locations = $mlService->projects_locations;
* </code>
*/
class ProjectsLocations extends \Google\Service\Resource
{
/**
* Get the complete list of CMLE capabilities in a location, along with their
* location-specific properties. (locations.get)
*
* @param string $name Required. The name of the location.
* @param array $optParams Optional parameters.
* @return GoogleCloudMlV1Location
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], GoogleCloudMlV1Location::class);
}
/**
* List all locations that provides at least one type of CMLE capability.
* (locations.listProjectsLocations)
*
* @param string $parent Required. The name of the project for which available
* locations are to be listed (since some locations might be whitelisted for
* specific projects).
* @param array $optParams Optional parameters.
*
* @opt_param int pageSize Optional. The number of locations to retrieve per
* "page" of results. If there are more remaining results than this number, the
* response message will contain a valid value in the `next_page_token` field.
* The default value is 20, and the maximum page size is 100.
* @opt_param string pageToken Optional. A page token to request the next page
* of results. You get the token from the `next_page_token` field of the
* response from the previous call.
* @return GoogleCloudMlV1ListLocationsResponse
* @throws \Google\Service\Exception
*/
public function listProjectsLocations($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], GoogleCloudMlV1ListLocationsResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsLocations::class, 'Google_Service_CloudMachineLearningEngine_Resource_ProjectsLocations');

View File

@@ -0,0 +1,74 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudMachineLearningEngine\Resource;
use Google\Service\CloudMachineLearningEngine\GoogleLongrunningOperation;
use Google\Service\CloudMachineLearningEngine\GoogleProtobufEmpty;
/**
* The "operations" collection of methods.
* Typical usage is:
* <code>
* $mlService = new Google\Service\CloudMachineLearningEngine(...);
* $operations = $mlService->projects_locations_operations;
* </code>
*/
class ProjectsLocationsOperations extends \Google\Service\Resource
{
/**
* Starts asynchronous cancellation on a long-running operation. The server
* makes a best effort to cancel the operation, but success is not guaranteed.
* If the server doesn't support this method, it returns
* `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or
* other methods to check whether the cancellation succeeded or whether the
* operation completed despite cancellation. On successful cancellation, the
* operation is not deleted; instead, it becomes an operation with an
* Operation.error value with a google.rpc.Status.code of `1`, corresponding to
* `Code.CANCELLED`. (operations.cancel)
*
* @param string $name The name of the operation resource to be cancelled.
* @param array $optParams Optional parameters.
* @return GoogleProtobufEmpty
* @throws \Google\Service\Exception
*/
public function cancel($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('cancel', [$params], GoogleProtobufEmpty::class);
}
/**
* Gets the latest state of a long-running operation. Clients can use this
* method to poll the operation result at intervals as recommended by the API
* service. (operations.get)
*
* @param string $name The name of the operation resource.
* @param array $optParams Optional parameters.
* @return GoogleLongrunningOperation
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], GoogleLongrunningOperation::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsLocationsOperations::class, 'Google_Service_CloudMachineLearningEngine_Resource_ProjectsLocationsOperations');

View File

@@ -0,0 +1,100 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudMachineLearningEngine\Resource;
use Google\Service\CloudMachineLearningEngine\GoogleCloudMlV1ListStudiesResponse;
use Google\Service\CloudMachineLearningEngine\GoogleCloudMlV1Study;
use Google\Service\CloudMachineLearningEngine\GoogleProtobufEmpty;
/**
* The "studies" collection of methods.
* Typical usage is:
* <code>
* $mlService = new Google\Service\CloudMachineLearningEngine(...);
* $studies = $mlService->projects_locations_studies;
* </code>
*/
class ProjectsLocationsStudies extends \Google\Service\Resource
{
/**
* Creates a study. (studies.create)
*
* @param string $parent Required. The project and location that the study
* belongs to. Format: projects/{project}/locations/{location}
* @param GoogleCloudMlV1Study $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string studyId Required. The ID to use for the study, which will
* become the final component of the study's resource name.
* @return GoogleCloudMlV1Study
* @throws \Google\Service\Exception
*/
public function create($parent, GoogleCloudMlV1Study $postBody, $optParams = [])
{
$params = ['parent' => $parent, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], GoogleCloudMlV1Study::class);
}
/**
* Deletes a study. (studies.delete)
*
* @param string $name Required. The study name.
* @param array $optParams Optional parameters.
* @return GoogleProtobufEmpty
* @throws \Google\Service\Exception
*/
public function delete($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('delete', [$params], GoogleProtobufEmpty::class);
}
/**
* Gets a study. (studies.get)
*
* @param string $name Required. The study name.
* @param array $optParams Optional parameters.
* @return GoogleCloudMlV1Study
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], GoogleCloudMlV1Study::class);
}
/**
* Lists all the studies in a region for an associated project.
* (studies.listProjectsLocationsStudies)
*
* @param string $parent Required. The project and location that the study
* belongs to. Format: projects/{project}/locations/{location}
* @param array $optParams Optional parameters.
* @return GoogleCloudMlV1ListStudiesResponse
* @throws \Google\Service\Exception
*/
public function listProjectsLocationsStudies($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], GoogleCloudMlV1ListStudiesResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsLocationsStudies::class, 'Google_Service_CloudMachineLearningEngine_Resource_ProjectsLocationsStudies');

View File

@@ -0,0 +1,207 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudMachineLearningEngine\Resource;
use Google\Service\CloudMachineLearningEngine\GoogleCloudMlV1AddTrialMeasurementRequest;
use Google\Service\CloudMachineLearningEngine\GoogleCloudMlV1CheckTrialEarlyStoppingStateRequest;
use Google\Service\CloudMachineLearningEngine\GoogleCloudMlV1CompleteTrialRequest;
use Google\Service\CloudMachineLearningEngine\GoogleCloudMlV1ListOptimalTrialsRequest;
use Google\Service\CloudMachineLearningEngine\GoogleCloudMlV1ListOptimalTrialsResponse;
use Google\Service\CloudMachineLearningEngine\GoogleCloudMlV1ListTrialsResponse;
use Google\Service\CloudMachineLearningEngine\GoogleCloudMlV1StopTrialRequest;
use Google\Service\CloudMachineLearningEngine\GoogleCloudMlV1SuggestTrialsRequest;
use Google\Service\CloudMachineLearningEngine\GoogleCloudMlV1Trial;
use Google\Service\CloudMachineLearningEngine\GoogleLongrunningOperation;
use Google\Service\CloudMachineLearningEngine\GoogleProtobufEmpty;
/**
* The "trials" collection of methods.
* Typical usage is:
* <code>
* $mlService = new Google\Service\CloudMachineLearningEngine(...);
* $trials = $mlService->projects_locations_studies_trials;
* </code>
*/
class ProjectsLocationsStudiesTrials extends \Google\Service\Resource
{
/**
* Adds a measurement of the objective metrics to a trial. This measurement is
* assumed to have been taken before the trial is complete.
* (trials.addMeasurement)
*
* @param string $name Required. The trial name.
* @param GoogleCloudMlV1AddTrialMeasurementRequest $postBody
* @param array $optParams Optional parameters.
* @return GoogleCloudMlV1Trial
* @throws \Google\Service\Exception
*/
public function addMeasurement($name, GoogleCloudMlV1AddTrialMeasurementRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('addMeasurement', [$params], GoogleCloudMlV1Trial::class);
}
/**
* Checks whether a trial should stop or not. Returns a long-running operation.
* When the operation is successful, it will contain a
* CheckTrialEarlyStoppingStateResponse. (trials.checkEarlyStoppingState)
*
* @param string $name Required. The trial name.
* @param GoogleCloudMlV1CheckTrialEarlyStoppingStateRequest $postBody
* @param array $optParams Optional parameters.
* @return GoogleLongrunningOperation
* @throws \Google\Service\Exception
*/
public function checkEarlyStoppingState($name, GoogleCloudMlV1CheckTrialEarlyStoppingStateRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('checkEarlyStoppingState', [$params], GoogleLongrunningOperation::class);
}
/**
* Marks a trial as complete. (trials.complete)
*
* @param string $name Required. The trial name.metat
* @param GoogleCloudMlV1CompleteTrialRequest $postBody
* @param array $optParams Optional parameters.
* @return GoogleCloudMlV1Trial
* @throws \Google\Service\Exception
*/
public function complete($name, GoogleCloudMlV1CompleteTrialRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('complete', [$params], GoogleCloudMlV1Trial::class);
}
/**
* Adds a user provided trial to a study. (trials.create)
*
* @param string $parent Required. The name of the study that the trial belongs
* to.
* @param GoogleCloudMlV1Trial $postBody
* @param array $optParams Optional parameters.
* @return GoogleCloudMlV1Trial
* @throws \Google\Service\Exception
*/
public function create($parent, GoogleCloudMlV1Trial $postBody, $optParams = [])
{
$params = ['parent' => $parent, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], GoogleCloudMlV1Trial::class);
}
/**
* Deletes a trial. (trials.delete)
*
* @param string $name Required. The trial name.
* @param array $optParams Optional parameters.
* @return GoogleProtobufEmpty
* @throws \Google\Service\Exception
*/
public function delete($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('delete', [$params], GoogleProtobufEmpty::class);
}
/**
* Gets a trial. (trials.get)
*
* @param string $name Required. The trial name.
* @param array $optParams Optional parameters.
* @return GoogleCloudMlV1Trial
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], GoogleCloudMlV1Trial::class);
}
/**
* Lists the trials associated with a study.
* (trials.listProjectsLocationsStudiesTrials)
*
* @param string $parent Required. The name of the study that the trial belongs
* to.
* @param array $optParams Optional parameters.
* @return GoogleCloudMlV1ListTrialsResponse
* @throws \Google\Service\Exception
*/
public function listProjectsLocationsStudiesTrials($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], GoogleCloudMlV1ListTrialsResponse::class);
}
/**
* Lists the pareto-optimal trials for multi-objective study or the optimal
* trials for single-objective study. The definition of pareto-optimal can be
* checked in wiki page. https://en.wikipedia.org/wiki/Pareto_efficiency
* (trials.listOptimalTrials)
*
* @param string $parent Required. The name of the study that the pareto-optimal
* trial belongs to.
* @param GoogleCloudMlV1ListOptimalTrialsRequest $postBody
* @param array $optParams Optional parameters.
* @return GoogleCloudMlV1ListOptimalTrialsResponse
* @throws \Google\Service\Exception
*/
public function listOptimalTrials($parent, GoogleCloudMlV1ListOptimalTrialsRequest $postBody, $optParams = [])
{
$params = ['parent' => $parent, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('listOptimalTrials', [$params], GoogleCloudMlV1ListOptimalTrialsResponse::class);
}
/**
* Stops a trial. (trials.stop)
*
* @param string $name Required. The trial name.
* @param GoogleCloudMlV1StopTrialRequest $postBody
* @param array $optParams Optional parameters.
* @return GoogleCloudMlV1Trial
* @throws \Google\Service\Exception
*/
public function stop($name, GoogleCloudMlV1StopTrialRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('stop', [$params], GoogleCloudMlV1Trial::class);
}
/**
* Adds one or more trials to a study, with parameter values suggested by AI
* Platform Vizier. Returns a long-running operation associated with the
* generation of trial suggestions. When this long-running operation succeeds,
* it will contain a SuggestTrialsResponse. (trials.suggest)
*
* @param string $parent Required. The name of the study that the trial belongs
* to.
* @param GoogleCloudMlV1SuggestTrialsRequest $postBody
* @param array $optParams Optional parameters.
* @return GoogleLongrunningOperation
* @throws \Google\Service\Exception
*/
public function suggest($parent, GoogleCloudMlV1SuggestTrialsRequest $postBody, $optParams = [])
{
$params = ['parent' => $parent, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('suggest', [$params], GoogleLongrunningOperation::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsLocationsStudiesTrials::class, 'Google_Service_CloudMachineLearningEngine_Resource_ProjectsLocationsStudiesTrials');

View File

@@ -0,0 +1,215 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudMachineLearningEngine\Resource;
use Google\Service\CloudMachineLearningEngine\GoogleCloudMlV1ListModelsResponse;
use Google\Service\CloudMachineLearningEngine\GoogleCloudMlV1Model;
use Google\Service\CloudMachineLearningEngine\GoogleIamV1Policy;
use Google\Service\CloudMachineLearningEngine\GoogleIamV1SetIamPolicyRequest;
use Google\Service\CloudMachineLearningEngine\GoogleIamV1TestIamPermissionsRequest;
use Google\Service\CloudMachineLearningEngine\GoogleIamV1TestIamPermissionsResponse;
use Google\Service\CloudMachineLearningEngine\GoogleLongrunningOperation;
/**
* The "models" collection of methods.
* Typical usage is:
* <code>
* $mlService = new Google\Service\CloudMachineLearningEngine(...);
* $models = $mlService->projects_models;
* </code>
*/
class ProjectsModels extends \Google\Service\Resource
{
/**
* 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)
*
* @param string $parent Required. The project name.
* @param GoogleCloudMlV1Model $postBody
* @param array $optParams Optional parameters.
* @return GoogleCloudMlV1Model
* @throws \Google\Service\Exception
*/
public function create($parent, GoogleCloudMlV1Model $postBody, $optParams = [])
{
$params = ['parent' => $parent, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], GoogleCloudMlV1Model::class);
}
/**
* 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)
*
* @param string $name Required. The name of the model.
* @param array $optParams Optional parameters.
* @return GoogleLongrunningOperation
* @throws \Google\Service\Exception
*/
public function delete($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('delete', [$params], GoogleLongrunningOperation::class);
}
/**
* 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)
*
* @param string $name Required. The name of the model.
* @param array $optParams Optional parameters.
* @return GoogleCloudMlV1Model
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], GoogleCloudMlV1Model::class);
}
/**
* 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)
*
* @param string $resource REQUIRED: The resource for which the policy is being
* requested. See [Resource
* names](https://cloud.google.com/apis/design/resource_names) for the
* appropriate value for this field.
* @param array $optParams Optional parameters.
*
* @opt_param int options.requestedPolicyVersion Optional. The maximum policy
* version that will be used to format the policy. Valid values are 0, 1, and 3.
* Requests specifying an invalid value will be rejected. Requests for policies
* with any conditional role bindings must specify version 3. Policies with no
* conditional role bindings may specify any valid value or leave the field
* unset. The policy in the response might use the policy version that you
* specified, or it might use a lower policy version. For example, if you
* specify version 3, but the policy has no conditional role bindings, the
* response uses version 1. To learn which resources support conditions in their
* IAM policies, see the [IAM
* documentation](https://cloud.google.com/iam/help/conditions/resource-
* policies).
* @return GoogleIamV1Policy
* @throws \Google\Service\Exception
*/
public function getIamPolicy($resource, $optParams = [])
{
$params = ['resource' => $resource];
$params = array_merge($params, $optParams);
return $this->call('getIamPolicy', [$params], GoogleIamV1Policy::class);
}
/**
* 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)
*
* @param string $parent Required. The name of the project whose models are to
* be listed.
* @param array $optParams Optional parameters.
*
* @opt_param string filter Optional. Specifies the subset of models to
* retrieve.
* @opt_param int pageSize Optional. The number of models to retrieve per "page"
* of results. If there are more remaining results than this number, the
* response message will contain a valid value in the `next_page_token` field.
* The default value is 20, and the maximum page size is 100.
* @opt_param string pageToken Optional. A page token to request the next page
* of results. You get the token from the `next_page_token` field of the
* response from the previous call.
* @return GoogleCloudMlV1ListModelsResponse
* @throws \Google\Service\Exception
*/
public function listProjectsModels($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], GoogleCloudMlV1ListModelsResponse::class);
}
/**
* Updates a specific model resource. Currently the only supported fields to
* update are `description` and `default_version.name`. (models.patch)
*
* @param string $name Required. The project name.
* @param GoogleCloudMlV1Model $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string updateMask Required. Specifies the path, relative to
* `Model`, of the field to update. For example, to change the description of a
* model to "foo" and set its default version to "version_1", the `update_mask`
* parameter would be specified as `description`, `default_version.name`, and
* the `PATCH` request body would specify the new value, as follows: {
* "description": "foo", "defaultVersion": { "name":"version_1" } } Currently
* the supported update masks are `description` and `default_version.name`.
* @return GoogleLongrunningOperation
* @throws \Google\Service\Exception
*/
public function patch($name, GoogleCloudMlV1Model $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('patch', [$params], GoogleLongrunningOperation::class);
}
/**
* 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)
*
* @param string $resource REQUIRED: The resource for which the policy is being
* specified. See [Resource
* names](https://cloud.google.com/apis/design/resource_names) for the
* appropriate value for this field.
* @param GoogleIamV1SetIamPolicyRequest $postBody
* @param array $optParams Optional parameters.
* @return GoogleIamV1Policy
* @throws \Google\Service\Exception
*/
public function setIamPolicy($resource, GoogleIamV1SetIamPolicyRequest $postBody, $optParams = [])
{
$params = ['resource' => $resource, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('setIamPolicy', [$params], GoogleIamV1Policy::class);
}
/**
* 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)
*
* @param string $resource REQUIRED: The resource for which the policy detail is
* being requested. See [Resource
* names](https://cloud.google.com/apis/design/resource_names) for the
* appropriate value for this field.
* @param GoogleIamV1TestIamPermissionsRequest $postBody
* @param array $optParams Optional parameters.
* @return GoogleIamV1TestIamPermissionsResponse
* @throws \Google\Service\Exception
*/
public function testIamPermissions($resource, GoogleIamV1TestIamPermissionsRequest $postBody, $optParams = [])
{
$params = ['resource' => $resource, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('testIamPermissions', [$params], GoogleIamV1TestIamPermissionsResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsModels::class, 'Google_Service_CloudMachineLearningEngine_Resource_ProjectsModels');

View File

@@ -0,0 +1,172 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudMachineLearningEngine\Resource;
use Google\Service\CloudMachineLearningEngine\GoogleCloudMlV1ListVersionsResponse;
use Google\Service\CloudMachineLearningEngine\GoogleCloudMlV1SetDefaultVersionRequest;
use Google\Service\CloudMachineLearningEngine\GoogleCloudMlV1Version;
use Google\Service\CloudMachineLearningEngine\GoogleLongrunningOperation;
/**
* The "versions" collection of methods.
* Typical usage is:
* <code>
* $mlService = new Google\Service\CloudMachineLearningEngine(...);
* $versions = $mlService->projects_models_versions;
* </code>
*/
class ProjectsModelsVersions extends \Google\Service\Resource
{
/**
* Creates a new version of a model from a trained TensorFlow model. 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.setDefault.
* (versions.create)
*
* @param string $parent Required. The name of the model.
* @param GoogleCloudMlV1Version $postBody
* @param array $optParams Optional parameters.
* @return GoogleLongrunningOperation
* @throws \Google\Service\Exception
*/
public function create($parent, GoogleCloudMlV1Version $postBody, $optParams = [])
{
$params = ['parent' => $parent, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], GoogleLongrunningOperation::class);
}
/**
* Deletes a model version. 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)
*
* @param string $name Required. The name of the version. You can get the names
* of all the versions of a model by calling projects.models.versions.list.
* @param array $optParams Optional parameters.
* @return GoogleLongrunningOperation
* @throws \Google\Service\Exception
*/
public function delete($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('delete', [$params], GoogleLongrunningOperation::class);
}
/**
* Gets information about a model version. Models can have multiple versions.
* You can call projects.models.versions.list to get the same information that
* this method returns for all of the versions of a model. (versions.get)
*
* @param string $name Required. The name of the version.
* @param array $optParams Optional parameters.
* @return GoogleCloudMlV1Version
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], GoogleCloudMlV1Version::class);
}
/**
* Gets basic information about all the versions of a model. If you expect that
* a model has many 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). If there are no versions that match the request parameters,
* the list request returns an empty response body: {}.
* (versions.listProjectsModelsVersions)
*
* @param string $parent Required. The name of the model for which to list the
* version.
* @param array $optParams Optional parameters.
*
* @opt_param string filter Optional. Specifies the subset of versions to
* retrieve.
* @opt_param int pageSize Optional. The number of versions to retrieve per
* "page" of results. If there are more remaining results than this number, the
* response message will contain a valid value in the `next_page_token` field.
* The default value is 20, and the maximum page size is 100.
* @opt_param string pageToken Optional. A page token to request the next page
* of results. You get the token from the `next_page_token` field of the
* response from the previous call.
* @return GoogleCloudMlV1ListVersionsResponse
* @throws \Google\Service\Exception
*/
public function listProjectsModelsVersions($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], GoogleCloudMlV1ListVersionsResponse::class);
}
/**
* Updates the specified Version resource. Currently the only update-able fields
* are `description`, `requestLoggingConfig`, `autoScaling.minNodes`, and
* `manualScaling.nodes`. (versions.patch)
*
* @param string $name Required. The name of the model.
* @param GoogleCloudMlV1Version $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string updateMask Required. Specifies the path, relative to
* `Version`, of the field to update. Must be present and non-empty. For
* example, to change the description of a version to "foo", the `update_mask`
* parameter would be specified as `description`, and the `PATCH` request body
* would specify the new value, as follows: ``` { "description": "foo" } ```
* Currently the only supported update mask fields are `description`,
* `requestLoggingConfig`, `autoScaling.minNodes`, and `manualScaling.nodes`.
* However, you can only update `manualScaling.nodes` if the version uses a
* [Compute Engine (N1) machine type](/ml-engine/docs/machine-types-online-
* prediction).
* @return GoogleLongrunningOperation
* @throws \Google\Service\Exception
*/
public function patch($name, GoogleCloudMlV1Version $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('patch', [$params], GoogleLongrunningOperation::class);
}
/**
* Designates a version to be the default for the model. 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)
*
* @param string $name 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
* projects.models.versions.list.
* @param GoogleCloudMlV1SetDefaultVersionRequest $postBody
* @param array $optParams Optional parameters.
* @return GoogleCloudMlV1Version
* @throws \Google\Service\Exception
*/
public function setDefault($name, GoogleCloudMlV1SetDefaultVersionRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('setDefault', [$params], GoogleCloudMlV1Version::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsModelsVersions::class, 'Google_Service_CloudMachineLearningEngine_Resource_ProjectsModelsVersions');

View File

@@ -0,0 +1,95 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudMachineLearningEngine\Resource;
use Google\Service\CloudMachineLearningEngine\GoogleLongrunningListOperationsResponse;
use Google\Service\CloudMachineLearningEngine\GoogleLongrunningOperation;
use Google\Service\CloudMachineLearningEngine\GoogleProtobufEmpty;
/**
* The "operations" collection of methods.
* Typical usage is:
* <code>
* $mlService = new Google\Service\CloudMachineLearningEngine(...);
* $operations = $mlService->projects_operations;
* </code>
*/
class ProjectsOperations extends \Google\Service\Resource
{
/**
* Starts asynchronous cancellation on a long-running operation. The server
* makes a best effort to cancel the operation, but success is not guaranteed.
* If the server doesn't support this method, it returns
* `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or
* other methods to check whether the cancellation succeeded or whether the
* operation completed despite cancellation. On successful cancellation, the
* operation is not deleted; instead, it becomes an operation with an
* Operation.error value with a google.rpc.Status.code of `1`, corresponding to
* `Code.CANCELLED`. (operations.cancel)
*
* @param string $name The name of the operation resource to be cancelled.
* @param array $optParams Optional parameters.
* @return GoogleProtobufEmpty
* @throws \Google\Service\Exception
*/
public function cancel($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('cancel', [$params], GoogleProtobufEmpty::class);
}
/**
* Gets the latest state of a long-running operation. Clients can use this
* method to poll the operation result at intervals as recommended by the API
* service. (operations.get)
*
* @param string $name The name of the operation resource.
* @param array $optParams Optional parameters.
* @return GoogleLongrunningOperation
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], GoogleLongrunningOperation::class);
}
/**
* Lists operations that match the specified filter in the request. If the
* server doesn't support this method, it returns `UNIMPLEMENTED`.
* (operations.listProjectsOperations)
*
* @param string $name The name of the operation's parent resource.
* @param array $optParams Optional parameters.
*
* @opt_param string filter The standard list filter.
* @opt_param int pageSize The standard list page size.
* @opt_param string pageToken The standard list page token.
* @return GoogleLongrunningListOperationsResponse
* @throws \Google\Service\Exception
*/
public function listProjectsOperations($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], GoogleLongrunningListOperationsResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsOperations::class, 'Google_Service_CloudMachineLearningEngine_Resource_ProjectsOperations');