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,33 @@
<?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\TPU\Resource;
/**
* The "projects" collection of methods.
* Typical usage is:
* <code>
* $tpuService = new Google\Service\TPU(...);
* $projects = $tpuService->projects;
* </code>
*/
class Projects extends \Google\Service\Resource
{
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Projects::class, 'Google_Service_TPU_Resource_Projects');

View File

@@ -0,0 +1,92 @@
<?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\TPU\Resource;
use Google\Service\TPU\GenerateServiceIdentityRequest;
use Google\Service\TPU\GenerateServiceIdentityResponse;
use Google\Service\TPU\ListLocationsResponse;
use Google\Service\TPU\Location;
/**
* The "locations" collection of methods.
* Typical usage is:
* <code>
* $tpuService = new Google\Service\TPU(...);
* $locations = $tpuService->projects_locations;
* </code>
*/
class ProjectsLocations extends \Google\Service\Resource
{
/**
* Generates the Cloud TPU service identity for the project.
* (locations.generateServiceIdentity)
*
* @param string $parent Required. The parent resource name.
* @param GenerateServiceIdentityRequest $postBody
* @param array $optParams Optional parameters.
* @return GenerateServiceIdentityResponse
* @throws \Google\Service\Exception
*/
public function generateServiceIdentity($parent, GenerateServiceIdentityRequest $postBody, $optParams = [])
{
$params = ['parent' => $parent, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('generateServiceIdentity', [$params], GenerateServiceIdentityResponse::class);
}
/**
* Gets information about a location. (locations.get)
*
* @param string $name Resource name for the location.
* @param array $optParams Optional parameters.
* @return Location
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], Location::class);
}
/**
* Lists information about the supported locations for this service.
* (locations.listProjectsLocations)
*
* @param string $name The resource that owns the locations collection, if
* applicable.
* @param array $optParams Optional parameters.
*
* @opt_param string filter A filter to narrow down results to a preferred
* subset. The filtering language accepts strings like `"displayName=tokyo"`,
* and is documented in more detail in [AIP-160](https://google.aip.dev/160).
* @opt_param int pageSize The maximum number of results to return. If not set,
* the service selects a default.
* @opt_param string pageToken A page token received from the `next_page_token`
* field in the response. Send that page token to receive the subsequent page.
* @return ListLocationsResponse
* @throws \Google\Service\Exception
*/
public function listProjectsLocations($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], ListLocationsResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsLocations::class, 'Google_Service_TPU_Resource_ProjectsLocations');

View File

@@ -0,0 +1,71 @@
<?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\TPU\Resource;
use Google\Service\TPU\AcceleratorType;
use Google\Service\TPU\ListAcceleratorTypesResponse;
/**
* The "acceleratorTypes" collection of methods.
* Typical usage is:
* <code>
* $tpuService = new Google\Service\TPU(...);
* $acceleratorTypes = $tpuService->projects_locations_acceleratorTypes;
* </code>
*/
class ProjectsLocationsAcceleratorTypes extends \Google\Service\Resource
{
/**
* Gets AcceleratorType. (acceleratorTypes.get)
*
* @param string $name Required. The resource name.
* @param array $optParams Optional parameters.
* @return AcceleratorType
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], AcceleratorType::class);
}
/**
* Lists accelerator types supported by this API.
* (acceleratorTypes.listProjectsLocationsAcceleratorTypes)
*
* @param string $parent Required. The parent resource name.
* @param array $optParams Optional parameters.
*
* @opt_param string filter List filter.
* @opt_param string orderBy Sort results.
* @opt_param int pageSize The maximum number of items to return.
* @opt_param string pageToken The next_page_token value returned from a
* previous List request, if any.
* @return ListAcceleratorTypesResponse
* @throws \Google\Service\Exception
*/
public function listProjectsLocationsAcceleratorTypes($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], ListAcceleratorTypesResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsLocationsAcceleratorTypes::class, 'Google_Service_TPU_Resource_ProjectsLocationsAcceleratorTypes');

View File

@@ -0,0 +1,169 @@
<?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\TPU\Resource;
use Google\Service\TPU\GetGuestAttributesRequest;
use Google\Service\TPU\GetGuestAttributesResponse;
use Google\Service\TPU\ListNodesResponse;
use Google\Service\TPU\Node;
use Google\Service\TPU\Operation;
use Google\Service\TPU\StartNodeRequest;
use Google\Service\TPU\StopNodeRequest;
/**
* The "nodes" collection of methods.
* Typical usage is:
* <code>
* $tpuService = new Google\Service\TPU(...);
* $nodes = $tpuService->projects_locations_nodes;
* </code>
*/
class ProjectsLocationsNodes extends \Google\Service\Resource
{
/**
* Creates a node. (nodes.create)
*
* @param string $parent Required. The parent resource name.
* @param Node $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string nodeId The unqualified resource name.
* @return Operation
* @throws \Google\Service\Exception
*/
public function create($parent, Node $postBody, $optParams = [])
{
$params = ['parent' => $parent, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], Operation::class);
}
/**
* Deletes a node. (nodes.delete)
*
* @param string $name Required. The resource name.
* @param array $optParams Optional parameters.
* @return Operation
* @throws \Google\Service\Exception
*/
public function delete($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('delete', [$params], Operation::class);
}
/**
* Gets the details of a node. (nodes.get)
*
* @param string $name Required. The resource name.
* @param array $optParams Optional parameters.
* @return Node
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], Node::class);
}
/**
* Retrieves the guest attributes for the node. (nodes.getGuestAttributes)
*
* @param string $name Required. The resource name.
* @param GetGuestAttributesRequest $postBody
* @param array $optParams Optional parameters.
* @return GetGuestAttributesResponse
* @throws \Google\Service\Exception
*/
public function getGuestAttributes($name, GetGuestAttributesRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('getGuestAttributes', [$params], GetGuestAttributesResponse::class);
}
/**
* Lists nodes. (nodes.listProjectsLocationsNodes)
*
* @param string $parent Required. The parent resource name.
* @param array $optParams Optional parameters.
*
* @opt_param int pageSize The maximum number of items to return.
* @opt_param string pageToken The next_page_token value returned from a
* previous List request, if any.
* @return ListNodesResponse
* @throws \Google\Service\Exception
*/
public function listProjectsLocationsNodes($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], ListNodesResponse::class);
}
/**
* Updates the configurations of a node. (nodes.patch)
*
* @param string $name Output only. Immutable. The name of the TPU.
* @param Node $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string updateMask Required. Mask of fields from Node to update.
* Supported fields: [description, tags, labels, metadata,
* network_config.enable_external_ips].
* @return Operation
* @throws \Google\Service\Exception
*/
public function patch($name, Node $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('patch', [$params], Operation::class);
}
/**
* Starts a node. (nodes.start)
*
* @param string $name Required. The resource name.
* @param StartNodeRequest $postBody
* @param array $optParams Optional parameters.
* @return Operation
* @throws \Google\Service\Exception
*/
public function start($name, StartNodeRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('start', [$params], Operation::class);
}
/**
* Stops a node. This operation is only available with single TPU nodes.
* (nodes.stop)
*
* @param string $name Required. The resource name.
* @param StopNodeRequest $postBody
* @param array $optParams Optional parameters.
* @return Operation
* @throws \Google\Service\Exception
*/
public function stop($name, StopNodeRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('stop', [$params], Operation::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsLocationsNodes::class, 'Google_Service_TPU_Resource_ProjectsLocationsNodes');

View File

@@ -0,0 +1,112 @@
<?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\TPU\Resource;
use Google\Service\TPU\ListOperationsResponse;
use Google\Service\TPU\Operation;
use Google\Service\TPU\TpuEmpty;
/**
* The "operations" collection of methods.
* Typical usage is:
* <code>
* $tpuService = new Google\Service\TPU(...);
* $operations = $tpuService->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 TpuEmpty
* @throws \Google\Service\Exception
*/
public function cancel($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('cancel', [$params], TpuEmpty::class);
}
/**
* Deletes a long-running operation. This method indicates that the client is no
* longer interested in the operation result. It does not cancel the operation.
* If the server doesn't support this method, it returns
* `google.rpc.Code.UNIMPLEMENTED`. (operations.delete)
*
* @param string $name The name of the operation resource to be deleted.
* @param array $optParams Optional parameters.
* @return TpuEmpty
* @throws \Google\Service\Exception
*/
public function delete($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('delete', [$params], TpuEmpty::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 Operation
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], Operation::class);
}
/**
* Lists operations that match the specified filter in the request. If the
* server doesn't support this method, it returns `UNIMPLEMENTED`.
* (operations.listProjectsLocationsOperations)
*
* @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 ListOperationsResponse
* @throws \Google\Service\Exception
*/
public function listProjectsLocationsOperations($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], ListOperationsResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsLocationsOperations::class, 'Google_Service_TPU_Resource_ProjectsLocationsOperations');

View File

@@ -0,0 +1,126 @@
<?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\TPU\Resource;
use Google\Service\TPU\ListQueuedResourcesResponse;
use Google\Service\TPU\Operation;
use Google\Service\TPU\QueuedResource;
use Google\Service\TPU\ResetQueuedResourceRequest;
/**
* The "queuedResources" collection of methods.
* Typical usage is:
* <code>
* $tpuService = new Google\Service\TPU(...);
* $queuedResources = $tpuService->projects_locations_queuedResources;
* </code>
*/
class ProjectsLocationsQueuedResources extends \Google\Service\Resource
{
/**
* Creates a QueuedResource TPU instance. (queuedResources.create)
*
* @param string $parent Required. The parent resource name.
* @param QueuedResource $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string queuedResourceId Optional. The unqualified resource name.
* Should follow the `^[A-Za-z0-9_.~+%-]+$` regex format.
* @opt_param string requestId Optional. Idempotent request UUID.
* @return Operation
* @throws \Google\Service\Exception
*/
public function create($parent, QueuedResource $postBody, $optParams = [])
{
$params = ['parent' => $parent, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], Operation::class);
}
/**
* Deletes a QueuedResource TPU instance. (queuedResources.delete)
*
* @param string $name Required. The resource name.
* @param array $optParams Optional parameters.
*
* @opt_param bool force Optional. If set to true, all running nodes belonging
* to this queued resource will be deleted first and then the queued resource
* will be deleted. Otherwise (i.e. force=false), the queued resource will only
* be deleted if its nodes have already been deleted or the queued resource is
* in the ACCEPTED, FAILED, or SUSPENDED state.
* @opt_param string requestId Optional. Idempotent request UUID.
* @return Operation
* @throws \Google\Service\Exception
*/
public function delete($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('delete', [$params], Operation::class);
}
/**
* Gets details of a queued resource. (queuedResources.get)
*
* @param string $name Required. The resource name.
* @param array $optParams Optional parameters.
* @return QueuedResource
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], QueuedResource::class);
}
/**
* Lists queued resources.
* (queuedResources.listProjectsLocationsQueuedResources)
*
* @param string $parent Required. The parent resource name.
* @param array $optParams Optional parameters.
*
* @opt_param int pageSize Optional. The maximum number of items to return.
* @opt_param string pageToken Optional. The next_page_token value returned from
* a previous List request, if any.
* @return ListQueuedResourcesResponse
* @throws \Google\Service\Exception
*/
public function listProjectsLocationsQueuedResources($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], ListQueuedResourcesResponse::class);
}
/**
* Resets a QueuedResource TPU instance (queuedResources.reset)
*
* @param string $name Required. The name of the queued resource.
* @param ResetQueuedResourceRequest $postBody
* @param array $optParams Optional parameters.
* @return Operation
* @throws \Google\Service\Exception
*/
public function reset($name, ResetQueuedResourceRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('reset', [$params], Operation::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsLocationsQueuedResources::class, 'Google_Service_TPU_Resource_ProjectsLocationsQueuedResources');

View File

@@ -0,0 +1,71 @@
<?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\TPU\Resource;
use Google\Service\TPU\ListRuntimeVersionsResponse;
use Google\Service\TPU\RuntimeVersion;
/**
* The "runtimeVersions" collection of methods.
* Typical usage is:
* <code>
* $tpuService = new Google\Service\TPU(...);
* $runtimeVersions = $tpuService->projects_locations_runtimeVersions;
* </code>
*/
class ProjectsLocationsRuntimeVersions extends \Google\Service\Resource
{
/**
* Gets a runtime version. (runtimeVersions.get)
*
* @param string $name Required. The resource name.
* @param array $optParams Optional parameters.
* @return RuntimeVersion
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], RuntimeVersion::class);
}
/**
* Lists runtime versions supported by this API.
* (runtimeVersions.listProjectsLocationsRuntimeVersions)
*
* @param string $parent Required. The parent resource name.
* @param array $optParams Optional parameters.
*
* @opt_param string filter List filter.
* @opt_param string orderBy Sort results.
* @opt_param int pageSize The maximum number of items to return.
* @opt_param string pageToken The next_page_token value returned from a
* previous List request, if any.
* @return ListRuntimeVersionsResponse
* @throws \Google\Service\Exception
*/
public function listProjectsLocationsRuntimeVersions($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], ListRuntimeVersionsResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsLocationsRuntimeVersions::class, 'Google_Service_TPU_Resource_ProjectsLocationsRuntimeVersions');

View File

@@ -0,0 +1,69 @@
<?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\TPU\Resource;
use Google\Service\TPU\ListTensorFlowVersionsResponse;
use Google\Service\TPU\TensorFlowVersion;
/**
* The "tensorflowVersions" collection of methods.
* Typical usage is:
* <code>
* $tpuService = new Google\Service\TPU(...);
* $tensorflowVersions = $tpuService->tensorflowVersions;
* </code>
*/
class ProjectsLocationsTensorflowVersions extends \Google\Service\Resource
{
/**
* Gets TensorFlow Version. (tensorflowVersions.get)
*
* @param string $name Required. The resource name.
* @param array $optParams Optional parameters.
* @return TensorFlowVersion
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], TensorFlowVersion::class);
}
/**
* List TensorFlow versions supported by this API.
* (tensorflowVersions.listProjectsLocationsTensorflowVersions)
*
* @param string $parent Required. The parent resource name.
* @param array $optParams Optional parameters.
*
* @opt_param string filter List filter.
* @opt_param string orderBy Sort results.
* @opt_param int pageSize The maximum number of items to return.
* @opt_param string pageToken The next_page_token value returned from a
* previous List request, if any.
* @return ListTensorFlowVersionsResponse
*/
public function listProjectsLocationsTensorflowVersions($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], ListTensorFlowVersionsResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsLocationsTensorflowVersions::class, 'Google_Service_TPU_Resource_ProjectsLocationsTensorflowVersions');