Initial commit: Complete WooCommerce Smart Google Pricing plugin with vendor dependencies

This commit is contained in:
2025-12-23 07:48:45 +01:00
commit 9b66109ca1
32472 changed files with 4065017 additions and 0 deletions

View File

@@ -0,0 +1,127 @@
<?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\Batch;
class Accelerator extends \Google\Model
{
/**
* The number of accelerators of this type.
*
* @var string
*/
public $count;
/**
* Optional. The NVIDIA GPU driver version that should be installed for this
* type. You can define the specific driver version such as "470.103.01",
* following the driver version requirements in
* https://cloud.google.com/compute/docs/gpus/install-drivers-gpu#minimum-
* driver. Batch will install the specific accelerator driver if qualified.
*
* @var string
*/
public $driverVersion;
/**
* Deprecated: please use instances[0].install_gpu_drivers instead.
*
* @deprecated
* @var bool
*/
public $installGpuDrivers;
/**
* The accelerator type. For example, "nvidia-tesla-t4". See `gcloud compute
* accelerator-types list`.
*
* @var string
*/
public $type;
/**
* The number of accelerators of this type.
*
* @param string $count
*/
public function setCount($count)
{
$this->count = $count;
}
/**
* @return string
*/
public function getCount()
{
return $this->count;
}
/**
* Optional. The NVIDIA GPU driver version that should be installed for this
* type. You can define the specific driver version such as "470.103.01",
* following the driver version requirements in
* https://cloud.google.com/compute/docs/gpus/install-drivers-gpu#minimum-
* driver. Batch will install the specific accelerator driver if qualified.
*
* @param string $driverVersion
*/
public function setDriverVersion($driverVersion)
{
$this->driverVersion = $driverVersion;
}
/**
* @return string
*/
public function getDriverVersion()
{
return $this->driverVersion;
}
/**
* Deprecated: please use instances[0].install_gpu_drivers instead.
*
* @deprecated
* @param bool $installGpuDrivers
*/
public function setInstallGpuDrivers($installGpuDrivers)
{
$this->installGpuDrivers = $installGpuDrivers;
}
/**
* @deprecated
* @return bool
*/
public function getInstallGpuDrivers()
{
return $this->installGpuDrivers;
}
/**
* The accelerator type. For example, "nvidia-tesla-t4". See `gcloud compute
* accelerator-types list`.
*
* @param string $type
*/
public function setType($type)
{
$this->type = $type;
}
/**
* @return string
*/
public function getType()
{
return $this->type;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Accelerator::class, 'Google_Service_Batch_Accelerator');

View File

@@ -0,0 +1,53 @@
<?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\Batch;
class ActionCondition extends \Google\Collection
{
protected $collection_key = 'exitCodes';
/**
* Exit codes of a task execution. If there are more than 1 exit codes, when
* task executes with any of the exit code in the list, the condition is met
* and the action will be executed.
*
* @var int[]
*/
public $exitCodes;
/**
* Exit codes of a task execution. If there are more than 1 exit codes, when
* task executes with any of the exit code in the list, the condition is met
* and the action will be executed.
*
* @param int[] $exitCodes
*/
public function setExitCodes($exitCodes)
{
$this->exitCodes = $exitCodes;
}
/**
* @return int[]
*/
public function getExitCodes()
{
return $this->exitCodes;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ActionCondition::class, 'Google_Service_Batch_ActionCondition');

View File

@@ -0,0 +1,147 @@
<?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\Batch;
class AgentContainer extends \Google\Collection
{
protected $collection_key = 'volumes';
/**
* Overrides the `CMD` specified in the container. If there is an ENTRYPOINT
* (either in the container image or with the entrypoint field below) then
* commands are appended as arguments to the ENTRYPOINT.
*
* @var string[]
*/
public $commands;
/**
* Overrides the `ENTRYPOINT` specified in the container.
*
* @var string
*/
public $entrypoint;
/**
* The URI to pull the container image from.
*
* @var string
*/
public $imageUri;
/**
* Arbitrary additional options to include in the "docker run" command when
* running this container, e.g. "--network host".
*
* @var string
*/
public $options;
/**
* Volumes to mount (bind mount) from the host machine files or directories
* into the container, formatted to match docker run's --volume option, e.g.
* /foo:/bar, or /foo:/bar:ro
*
* @var string[]
*/
public $volumes;
/**
* Overrides the `CMD` specified in the container. If there is an ENTRYPOINT
* (either in the container image or with the entrypoint field below) then
* commands are appended as arguments to the ENTRYPOINT.
*
* @param string[] $commands
*/
public function setCommands($commands)
{
$this->commands = $commands;
}
/**
* @return string[]
*/
public function getCommands()
{
return $this->commands;
}
/**
* Overrides the `ENTRYPOINT` specified in the container.
*
* @param string $entrypoint
*/
public function setEntrypoint($entrypoint)
{
$this->entrypoint = $entrypoint;
}
/**
* @return string
*/
public function getEntrypoint()
{
return $this->entrypoint;
}
/**
* The URI to pull the container image from.
*
* @param string $imageUri
*/
public function setImageUri($imageUri)
{
$this->imageUri = $imageUri;
}
/**
* @return string
*/
public function getImageUri()
{
return $this->imageUri;
}
/**
* Arbitrary additional options to include in the "docker run" command when
* running this container, e.g. "--network host".
*
* @param string $options
*/
public function setOptions($options)
{
$this->options = $options;
}
/**
* @return string
*/
public function getOptions()
{
return $this->options;
}
/**
* Volumes to mount (bind mount) from the host machine files or directories
* into the container, formatted to match docker run's --volume option, e.g.
* /foo:/bar, or /foo:/bar:ro
*
* @param string[] $volumes
*/
public function setVolumes($volumes)
{
$this->volumes = $volumes;
}
/**
* @return string[]
*/
public function getVolumes()
{
return $this->volumes;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(AgentContainer::class, 'Google_Service_Batch_AgentContainer');

View File

@@ -0,0 +1,93 @@
<?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\Batch;
class AgentEnvironment extends \Google\Model
{
protected $encryptedVariablesType = AgentKMSEnvMap::class;
protected $encryptedVariablesDataType = '';
/**
* A map of environment variable names to Secret Manager secret names. The VM
* will access the named secrets to set the value of each environment
* variable.
*
* @var string[]
*/
public $secretVariables;
/**
* A map of environment variable names to values.
*
* @var string[]
*/
public $variables;
/**
* An encrypted JSON dictionary where the key/value pairs correspond to
* environment variable names and their values.
*
* @param AgentKMSEnvMap $encryptedVariables
*/
public function setEncryptedVariables(AgentKMSEnvMap $encryptedVariables)
{
$this->encryptedVariables = $encryptedVariables;
}
/**
* @return AgentKMSEnvMap
*/
public function getEncryptedVariables()
{
return $this->encryptedVariables;
}
/**
* A map of environment variable names to Secret Manager secret names. The VM
* will access the named secrets to set the value of each environment
* variable.
*
* @param string[] $secretVariables
*/
public function setSecretVariables($secretVariables)
{
$this->secretVariables = $secretVariables;
}
/**
* @return string[]
*/
public function getSecretVariables()
{
return $this->secretVariables;
}
/**
* A map of environment variable names to values.
*
* @param string[] $variables
*/
public function setVariables($variables)
{
$this->variables = $variables;
}
/**
* @return string[]
*/
public function getVariables()
{
return $this->variables;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(AgentEnvironment::class, 'Google_Service_Batch_AgentEnvironment');

View File

@@ -0,0 +1,153 @@
<?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\Batch;
class AgentInfo extends \Google\Collection
{
/**
* Unspecified state.
*/
public const STATE_AGENT_STATE_UNSPECIFIED = 'AGENT_STATE_UNSPECIFIED';
/**
* The agent is starting on the VM instance.
*/
public const STATE_AGENT_STARTING = 'AGENT_STARTING';
/**
* The agent is running. The agent in the RUNNING state can never go back to
* the STARTING state.
*/
public const STATE_AGENT_RUNNING = 'AGENT_RUNNING';
/**
* The agent has stopped, either on request or due to a failure.
*/
public const STATE_AGENT_STOPPED = 'AGENT_STOPPED';
protected $collection_key = 'tasks';
/**
* Optional. The assigned Job ID
*
* @var string
*/
public $jobId;
/**
* When the AgentInfo is generated.
*
* @var string
*/
public $reportTime;
/**
* Agent state.
*
* @var string
*/
public $state;
/**
* The assigned task group ID.
*
* @var string
*/
public $taskGroupId;
protected $tasksType = AgentTaskInfo::class;
protected $tasksDataType = 'array';
/**
* Optional. The assigned Job ID
*
* @param string $jobId
*/
public function setJobId($jobId)
{
$this->jobId = $jobId;
}
/**
* @return string
*/
public function getJobId()
{
return $this->jobId;
}
/**
* When the AgentInfo is generated.
*
* @param string $reportTime
*/
public function setReportTime($reportTime)
{
$this->reportTime = $reportTime;
}
/**
* @return string
*/
public function getReportTime()
{
return $this->reportTime;
}
/**
* Agent state.
*
* Accepted values: AGENT_STATE_UNSPECIFIED, AGENT_STARTING, AGENT_RUNNING,
* AGENT_STOPPED
*
* @param self::STATE_* $state
*/
public function setState($state)
{
$this->state = $state;
}
/**
* @return self::STATE_*
*/
public function getState()
{
return $this->state;
}
/**
* The assigned task group ID.
*
* @param string $taskGroupId
*/
public function setTaskGroupId($taskGroupId)
{
$this->taskGroupId = $taskGroupId;
}
/**
* @return string
*/
public function getTaskGroupId()
{
return $this->taskGroupId;
}
/**
* Task Info.
*
* @param AgentTaskInfo[] $tasks
*/
public function setTasks($tasks)
{
$this->tasks = $tasks;
}
/**
* @return AgentTaskInfo[]
*/
public function getTasks()
{
return $this->tasks;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(AgentInfo::class, 'Google_Service_Batch_AgentInfo');

View File

@@ -0,0 +1,70 @@
<?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\Batch;
class AgentKMSEnvMap extends \Google\Model
{
/**
* The value of the cipherText response from the `encrypt` method.
*
* @var string
*/
public $cipherText;
/**
* The name of the KMS key that will be used to decrypt the cipher text.
*
* @var string
*/
public $keyName;
/**
* The value of the cipherText response from the `encrypt` method.
*
* @param string $cipherText
*/
public function setCipherText($cipherText)
{
$this->cipherText = $cipherText;
}
/**
* @return string
*/
public function getCipherText()
{
return $this->cipherText;
}
/**
* The name of the KMS key that will be used to decrypt the cipher text.
*
* @param string $keyName
*/
public function setKeyName($keyName)
{
$this->keyName = $keyName;
}
/**
* @return string
*/
public function getKeyName()
{
return $this->keyName;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(AgentKMSEnvMap::class, 'Google_Service_Batch_AgentKMSEnvMap');

View File

@@ -0,0 +1,253 @@
<?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\Batch;
class AgentMetadata extends \Google\Model
{
/**
* When the VM agent started. Use agent_startup_time instead.
*
* @deprecated
* @var string
*/
public $creationTime;
/**
* Full name of the entity that created this vm. For MIG, this path is:
* projects/{project}/regions/{region}/InstanceGroupManagers/{igm} The value
* is retrieved from the vm metadata key of "created-by".
*
* @var string
*/
public $creator;
/**
* image version for the VM that this agent is installed on.
*
* @var string
*/
public $imageVersion;
/**
* GCP instance name (go/instance-name).
*
* @var string
*/
public $instance;
/**
* GCP instance ID (go/instance-id).
*
* @var string
*/
public $instanceId;
/**
* If the GCP instance has received preemption notice.
*
* @var bool
*/
public $instancePreemptionNoticeReceived;
/**
* Optional. machine type of the VM
*
* @var string
*/
public $machineType;
/**
* parsed contents of /etc/os-release
*
* @var string[]
*/
public $osRelease;
/**
* agent binary version running on VM
*
* @var string
*/
public $version;
/**
* Agent zone.
*
* @var string
*/
public $zone;
/**
* When the VM agent started. Use agent_startup_time instead.
*
* @deprecated
* @param string $creationTime
*/
public function setCreationTime($creationTime)
{
$this->creationTime = $creationTime;
}
/**
* @deprecated
* @return string
*/
public function getCreationTime()
{
return $this->creationTime;
}
/**
* Full name of the entity that created this vm. For MIG, this path is:
* projects/{project}/regions/{region}/InstanceGroupManagers/{igm} The value
* is retrieved from the vm metadata key of "created-by".
*
* @param string $creator
*/
public function setCreator($creator)
{
$this->creator = $creator;
}
/**
* @return string
*/
public function getCreator()
{
return $this->creator;
}
/**
* image version for the VM that this agent is installed on.
*
* @param string $imageVersion
*/
public function setImageVersion($imageVersion)
{
$this->imageVersion = $imageVersion;
}
/**
* @return string
*/
public function getImageVersion()
{
return $this->imageVersion;
}
/**
* GCP instance name (go/instance-name).
*
* @param string $instance
*/
public function setInstance($instance)
{
$this->instance = $instance;
}
/**
* @return string
*/
public function getInstance()
{
return $this->instance;
}
/**
* GCP instance ID (go/instance-id).
*
* @param string $instanceId
*/
public function setInstanceId($instanceId)
{
$this->instanceId = $instanceId;
}
/**
* @return string
*/
public function getInstanceId()
{
return $this->instanceId;
}
/**
* If the GCP instance has received preemption notice.
*
* @param bool $instancePreemptionNoticeReceived
*/
public function setInstancePreemptionNoticeReceived($instancePreemptionNoticeReceived)
{
$this->instancePreemptionNoticeReceived = $instancePreemptionNoticeReceived;
}
/**
* @return bool
*/
public function getInstancePreemptionNoticeReceived()
{
return $this->instancePreemptionNoticeReceived;
}
/**
* Optional. machine type of the VM
*
* @param string $machineType
*/
public function setMachineType($machineType)
{
$this->machineType = $machineType;
}
/**
* @return string
*/
public function getMachineType()
{
return $this->machineType;
}
/**
* parsed contents of /etc/os-release
*
* @param string[] $osRelease
*/
public function setOsRelease($osRelease)
{
$this->osRelease = $osRelease;
}
/**
* @return string[]
*/
public function getOsRelease()
{
return $this->osRelease;
}
/**
* agent binary version running on VM
*
* @param string $version
*/
public function setVersion($version)
{
$this->version = $version;
}
/**
* @return string
*/
public function getVersion()
{
return $this->version;
}
/**
* Agent zone.
*
* @param string $zone
*/
public function setZone($zone)
{
$this->zone = $zone;
}
/**
* @return string
*/
public function getZone()
{
return $this->zone;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(AgentMetadata::class, 'Google_Service_Batch_AgentMetadata');

View File

@@ -0,0 +1,90 @@
<?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\Batch;
class AgentScript extends \Google\Model
{
/**
* Script file path on the host VM. To specify an interpreter, please add a
* `#!`(also known as [shebang
* line](https://en.wikipedia.org/wiki/Shebang_(Unix))) as the first line of
* the file.(For example, to execute the script using bash, `#!/bin/bash`
* should be the first line of the file. To execute the script using`Python3`,
* `#!/usr/bin/env python3` should be the first line of the file.) Otherwise,
* the file will by default be executed by `/bin/sh`.
*
* @var string
*/
public $path;
/**
* Shell script text. To specify an interpreter, please add a `#!\n` at the
* beginning of the text.(For example, to execute the script using bash,
* `#!/bin/bash\n` should be added. To execute the script using`Python3`,
* `#!/usr/bin/env python3\n` should be added.) Otherwise, the script will by
* default be executed by `/bin/sh`.
*
* @var string
*/
public $text;
/**
* Script file path on the host VM. To specify an interpreter, please add a
* `#!`(also known as [shebang
* line](https://en.wikipedia.org/wiki/Shebang_(Unix))) as the first line of
* the file.(For example, to execute the script using bash, `#!/bin/bash`
* should be the first line of the file. To execute the script using`Python3`,
* `#!/usr/bin/env python3` should be the first line of the file.) Otherwise,
* the file will by default be executed by `/bin/sh`.
*
* @param string $path
*/
public function setPath($path)
{
$this->path = $path;
}
/**
* @return string
*/
public function getPath()
{
return $this->path;
}
/**
* Shell script text. To specify an interpreter, please add a `#!\n` at the
* beginning of the text.(For example, to execute the script using bash,
* `#!/bin/bash\n` should be added. To execute the script using`Python3`,
* `#!/usr/bin/env python3\n` should be added.) Otherwise, the script will by
* default be executed by `/bin/sh`.
*
* @param string $text
*/
public function setText($text)
{
$this->text = $text;
}
/**
* @return string
*/
public function getText()
{
return $this->text;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(AgentScript::class, 'Google_Service_Batch_AgentScript');

View File

@@ -0,0 +1,206 @@
<?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\Batch;
class AgentTask extends \Google\Model
{
/**
* Unspecified state.
*/
public const INTENDED_STATE_INTENDED_STATE_UNSPECIFIED = 'INTENDED_STATE_UNSPECIFIED';
/**
* Assigned state (includes running and finished).
*/
public const INTENDED_STATE_ASSIGNED = 'ASSIGNED';
/**
* The agent should cancel the execution of this task.
*/
public const INTENDED_STATE_CANCELLED = 'CANCELLED';
/**
* Delete task from agent storage, stop reporting its state.
*/
public const INTENDED_STATE_DELETED = 'DELETED';
/**
* Unspecified task source.
*/
public const TASK_SOURCE_TASK_SOURCE_UNSPECIFIED = 'TASK_SOURCE_UNSPECIFIED';
/**
* The AgentTask from this source is generated by Batch server. E.g. all the
* VMActions are from this source. When Batch Agent execute AgentTask from
* BATCH_INTERNAL, it will log stdout/err with "batch_agent_logs" log name.
*/
public const TASK_SOURCE_BATCH_INTERNAL = 'BATCH_INTERNAL';
/**
* The AgentTask from this source is provided by Batch users. When Batch Agent
* execute AgentTask from USER, it will log stdout/err with "batch_task_logs"
* log name.
*/
public const TASK_SOURCE_USER = 'USER';
protected $agentTaskSpecType = AgentTaskSpec::class;
protected $agentTaskSpecDataType = '';
/**
* The intended state of the task.
*
* @var string
*/
public $intendedState;
/**
* The highest barrier reached by all tasks in the task's TaskGroup.
*
* @var string
*/
public $reachedBarrier;
protected $specType = TaskSpec::class;
protected $specDataType = '';
protected $statusType = TaskStatus::class;
protected $statusDataType = '';
/**
* Task name.
*
* @var string
*/
public $task;
/**
* TaskSource represents the source of the task.
*
* @var string
*/
public $taskSource;
/**
* AgentTaskSpec is the taskSpec representation between Agent and CLH
* communication. This field will replace the TaskSpec field above in future
* to have a better separation between user-facaing API and internal API.
*
* @param AgentTaskSpec $agentTaskSpec
*/
public function setAgentTaskSpec(AgentTaskSpec $agentTaskSpec)
{
$this->agentTaskSpec = $agentTaskSpec;
}
/**
* @return AgentTaskSpec
*/
public function getAgentTaskSpec()
{
return $this->agentTaskSpec;
}
/**
* The intended state of the task.
*
* Accepted values: INTENDED_STATE_UNSPECIFIED, ASSIGNED, CANCELLED, DELETED
*
* @param self::INTENDED_STATE_* $intendedState
*/
public function setIntendedState($intendedState)
{
$this->intendedState = $intendedState;
}
/**
* @return self::INTENDED_STATE_*
*/
public function getIntendedState()
{
return $this->intendedState;
}
/**
* The highest barrier reached by all tasks in the task's TaskGroup.
*
* @param string $reachedBarrier
*/
public function setReachedBarrier($reachedBarrier)
{
$this->reachedBarrier = $reachedBarrier;
}
/**
* @return string
*/
public function getReachedBarrier()
{
return $this->reachedBarrier;
}
/**
* Task Spec. This field will be replaced by agent_task_spec below in future.
*
* @param TaskSpec $spec
*/
public function setSpec(TaskSpec $spec)
{
$this->spec = $spec;
}
/**
* @return TaskSpec
*/
public function getSpec()
{
return $this->spec;
}
/**
* Task status.
*
* @param TaskStatus $status
*/
public function setStatus(TaskStatus $status)
{
$this->status = $status;
}
/**
* @return TaskStatus
*/
public function getStatus()
{
return $this->status;
}
/**
* Task name.
*
* @param string $task
*/
public function setTask($task)
{
$this->task = $task;
}
/**
* @return string
*/
public function getTask()
{
return $this->task;
}
/**
* TaskSource represents the source of the task.
*
* Accepted values: TASK_SOURCE_UNSPECIFIED, BATCH_INTERNAL, USER
*
* @param self::TASK_SOURCE_* $taskSource
*/
public function setTaskSource($taskSource)
{
$this->taskSource = $taskSource;
}
/**
* @return self::TASK_SOURCE_*
*/
public function getTaskSource()
{
return $this->taskSource;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(AgentTask::class, 'Google_Service_Batch_AgentTask');

View File

@@ -0,0 +1,91 @@
<?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\Batch;
class AgentTaskInfo extends \Google\Model
{
/**
* The highest index of a runnable started by the agent for this task. The
* runnables are indexed from 1. Value 0 is undefined.
*
* @var string
*/
public $runnable;
/**
* ID of the Task
*
* @var string
*/
public $taskId;
protected $taskStatusType = TaskStatus::class;
protected $taskStatusDataType = '';
/**
* The highest index of a runnable started by the agent for this task. The
* runnables are indexed from 1. Value 0 is undefined.
*
* @param string $runnable
*/
public function setRunnable($runnable)
{
$this->runnable = $runnable;
}
/**
* @return string
*/
public function getRunnable()
{
return $this->runnable;
}
/**
* ID of the Task
*
* @param string $taskId
*/
public function setTaskId($taskId)
{
$this->taskId = $taskId;
}
/**
* @return string
*/
public function getTaskId()
{
return $this->taskId;
}
/**
* The status of the Task. If we need agent specific fields we should fork the
* public TaskStatus into an agent specific one. Or add them below.
*
* @param TaskStatus $taskStatus
*/
public function setTaskStatus(TaskStatus $taskStatus)
{
$this->taskStatus = $taskStatus;
}
/**
* @return TaskStatus
*/
public function getTaskStatus()
{
return $this->taskStatus;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(AgentTaskInfo::class, 'Google_Service_Batch_AgentTaskInfo');

View File

@@ -0,0 +1,48 @@
<?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\Batch;
class AgentTaskLoggingOption extends \Google\Model
{
/**
* Labels to be added to the log entry. Now only cloud logging is supported.
*
* @var string[]
*/
public $labels;
/**
* Labels to be added to the log entry. Now only cloud logging is supported.
*
* @param string[] $labels
*/
public function setLabels($labels)
{
$this->labels = $labels;
}
/**
* @return string[]
*/
public function getLabels()
{
return $this->labels;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(AgentTaskLoggingOption::class, 'Google_Service_Batch_AgentTaskLoggingOption');

View File

@@ -0,0 +1,185 @@
<?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\Batch;
class AgentTaskRunnable extends \Google\Model
{
/**
* By default, after a Runnable fails, no further Runnable are executed. This
* flag indicates that this Runnable must be run even if the Task has already
* failed. This is useful for Runnables that copy output files off of the VM
* or for debugging. The always_run flag does not override the Task's overall
* max_run_duration. If the max_run_duration has expired then no further
* Runnables will execute, not even always_run Runnables.
*
* @var bool
*/
public $alwaysRun;
/**
* This flag allows a Runnable to continue running in the background while the
* Task executes subsequent Runnables. This is useful to provide services to
* other Runnables (or to provide debugging support tools like SSH servers).
*
* @var bool
*/
public $background;
protected $containerType = AgentContainer::class;
protected $containerDataType = '';
protected $environmentType = AgentEnvironment::class;
protected $environmentDataType = '';
/**
* Normally, a non-zero exit status causes the Task to fail. This flag allows
* execution of other Runnables to continue instead.
*
* @var bool
*/
public $ignoreExitStatus;
protected $scriptType = AgentScript::class;
protected $scriptDataType = '';
/**
* Timeout for this Runnable.
*
* @var string
*/
public $timeout;
/**
* By default, after a Runnable fails, no further Runnable are executed. This
* flag indicates that this Runnable must be run even if the Task has already
* failed. This is useful for Runnables that copy output files off of the VM
* or for debugging. The always_run flag does not override the Task's overall
* max_run_duration. If the max_run_duration has expired then no further
* Runnables will execute, not even always_run Runnables.
*
* @param bool $alwaysRun
*/
public function setAlwaysRun($alwaysRun)
{
$this->alwaysRun = $alwaysRun;
}
/**
* @return bool
*/
public function getAlwaysRun()
{
return $this->alwaysRun;
}
/**
* This flag allows a Runnable to continue running in the background while the
* Task executes subsequent Runnables. This is useful to provide services to
* other Runnables (or to provide debugging support tools like SSH servers).
*
* @param bool $background
*/
public function setBackground($background)
{
$this->background = $background;
}
/**
* @return bool
*/
public function getBackground()
{
return $this->background;
}
/**
* Container runnable.
*
* @param AgentContainer $container
*/
public function setContainer(AgentContainer $container)
{
$this->container = $container;
}
/**
* @return AgentContainer
*/
public function getContainer()
{
return $this->container;
}
/**
* Environment variables for this Runnable (overrides variables set for the
* whole Task or TaskGroup).
*
* @param AgentEnvironment $environment
*/
public function setEnvironment(AgentEnvironment $environment)
{
$this->environment = $environment;
}
/**
* @return AgentEnvironment
*/
public function getEnvironment()
{
return $this->environment;
}
/**
* Normally, a non-zero exit status causes the Task to fail. This flag allows
* execution of other Runnables to continue instead.
*
* @param bool $ignoreExitStatus
*/
public function setIgnoreExitStatus($ignoreExitStatus)
{
$this->ignoreExitStatus = $ignoreExitStatus;
}
/**
* @return bool
*/
public function getIgnoreExitStatus()
{
return $this->ignoreExitStatus;
}
/**
* Script runnable.
*
* @param AgentScript $script
*/
public function setScript(AgentScript $script)
{
$this->script = $script;
}
/**
* @return AgentScript
*/
public function getScript()
{
return $this->script;
}
/**
* Timeout for this Runnable.
*
* @param string $timeout
*/
public function setTimeout($timeout)
{
$this->timeout = $timeout;
}
/**
* @return string
*/
public function getTimeout()
{
return $this->timeout;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(AgentTaskRunnable::class, 'Google_Service_Batch_AgentTaskRunnable');

View File

@@ -0,0 +1,136 @@
<?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\Batch;
class AgentTaskSpec extends \Google\Collection
{
protected $collection_key = 'runnables';
protected $environmentType = AgentEnvironment::class;
protected $environmentDataType = '';
protected $loggingOptionType = AgentTaskLoggingOption::class;
protected $loggingOptionDataType = '';
/**
* Maximum duration the task should run before being automatically retried (if
* enabled) or automatically failed. Format the value of this field as a time
* limit in seconds followed by `s`—for example, `3600s` for 1 hour. The field
* accepts any value between 0 and the maximum listed for the `Duration` field
* type at https://protobuf.dev/reference/protobuf/google.protobuf/#duration;
* however, the actual maximum run time for a job will be limited to the
* maximum run time for a job listed at
* https://cloud.google.com/batch/quotas#max-job-duration.
*
* @var string
*/
public $maxRunDuration;
protected $runnablesType = AgentTaskRunnable::class;
protected $runnablesDataType = 'array';
protected $userAccountType = AgentTaskUserAccount::class;
protected $userAccountDataType = '';
/**
* Environment variables to set before running the Task.
*
* @param AgentEnvironment $environment
*/
public function setEnvironment(AgentEnvironment $environment)
{
$this->environment = $environment;
}
/**
* @return AgentEnvironment
*/
public function getEnvironment()
{
return $this->environment;
}
/**
* Logging option for the task.
*
* @param AgentTaskLoggingOption $loggingOption
*/
public function setLoggingOption(AgentTaskLoggingOption $loggingOption)
{
$this->loggingOption = $loggingOption;
}
/**
* @return AgentTaskLoggingOption
*/
public function getLoggingOption()
{
return $this->loggingOption;
}
/**
* Maximum duration the task should run before being automatically retried (if
* enabled) or automatically failed. Format the value of this field as a time
* limit in seconds followed by `s`—for example, `3600s` for 1 hour. The field
* accepts any value between 0 and the maximum listed for the `Duration` field
* type at https://protobuf.dev/reference/protobuf/google.protobuf/#duration;
* however, the actual maximum run time for a job will be limited to the
* maximum run time for a job listed at
* https://cloud.google.com/batch/quotas#max-job-duration.
*
* @param string $maxRunDuration
*/
public function setMaxRunDuration($maxRunDuration)
{
$this->maxRunDuration = $maxRunDuration;
}
/**
* @return string
*/
public function getMaxRunDuration()
{
return $this->maxRunDuration;
}
/**
* AgentTaskRunnable is runanbles that will be executed on the agent.
*
* @param AgentTaskRunnable[] $runnables
*/
public function setRunnables($runnables)
{
$this->runnables = $runnables;
}
/**
* @return AgentTaskRunnable[]
*/
public function getRunnables()
{
return $this->runnables;
}
/**
* User account on the VM to run the runnables in the agentTaskSpec. If not
* set, the runnable will be run under root user.
*
* @param AgentTaskUserAccount $userAccount
*/
public function setUserAccount(AgentTaskUserAccount $userAccount)
{
$this->userAccount = $userAccount;
}
/**
* @return AgentTaskUserAccount
*/
public function getUserAccount()
{
return $this->userAccount;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(AgentTaskSpec::class, 'Google_Service_Batch_AgentTaskSpec');

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\Batch;
class AgentTaskUserAccount extends \Google\Model
{
/**
* gid id an unique identifier of the POSIX account group corresponding to the
* user account.
*
* @var string
*/
public $gid;
/**
* uid is an unique identifier of the POSIX account corresponding to the user
* account.
*
* @var string
*/
public $uid;
/**
* gid id an unique identifier of the POSIX account group corresponding to the
* user account.
*
* @param string $gid
*/
public function setGid($gid)
{
$this->gid = $gid;
}
/**
* @return string
*/
public function getGid()
{
return $this->gid;
}
/**
* uid is an unique identifier of the POSIX account corresponding to the user
* account.
*
* @param string $uid
*/
public function setUid($uid)
{
$this->uid = $uid;
}
/**
* @return string
*/
public function getUid()
{
return $this->uid;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(AgentTaskUserAccount::class, 'Google_Service_Batch_AgentTaskUserAccount');

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\Batch;
class AgentTimingInfo extends \Google\Model
{
/**
* Agent startup time
*
* @var string
*/
public $agentStartupTime;
/**
* Boot timestamp of the VM OS
*
* @var string
*/
public $bootTime;
/**
* Startup time of the Batch VM script.
*
* @var string
*/
public $scriptStartupTime;
/**
* Agent startup time
*
* @param string $agentStartupTime
*/
public function setAgentStartupTime($agentStartupTime)
{
$this->agentStartupTime = $agentStartupTime;
}
/**
* @return string
*/
public function getAgentStartupTime()
{
return $this->agentStartupTime;
}
/**
* Boot timestamp of the VM OS
*
* @param string $bootTime
*/
public function setBootTime($bootTime)
{
$this->bootTime = $bootTime;
}
/**
* @return string
*/
public function getBootTime()
{
return $this->bootTime;
}
/**
* Startup time of the Batch VM script.
*
* @param string $scriptStartupTime
*/
public function setScriptStartupTime($scriptStartupTime)
{
$this->scriptStartupTime = $scriptStartupTime;
}
/**
* @return string
*/
public function getScriptStartupTime()
{
return $this->scriptStartupTime;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(AgentTimingInfo::class, 'Google_Service_Batch_AgentTimingInfo');

View File

@@ -0,0 +1,194 @@
<?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\Batch;
class AllocationPolicy extends \Google\Collection
{
protected $collection_key = 'tags';
protected $instancesType = InstancePolicyOrTemplate::class;
protected $instancesDataType = 'array';
/**
* Custom labels to apply to the job and all the Compute Engine resources that
* both are created by this allocation policy and support labels. Use labels
* to group and describe the resources they are applied to. Batch
* automatically applies predefined labels and supports multiple `labels`
* fields for each job, which each let you apply custom labels to various
* resources. Label names that start with "goog-" or "google-" are reserved
* for predefined labels. For more information about labels with Batch, see
* [Organize resources using
* labels](https://cloud.google.com/batch/docs/organize-resources-using-
* labels).
*
* @var string[]
*/
public $labels;
protected $locationType = LocationPolicy::class;
protected $locationDataType = '';
protected $networkType = NetworkPolicy::class;
protected $networkDataType = '';
protected $placementType = PlacementPolicy::class;
protected $placementDataType = '';
protected $serviceAccountType = ServiceAccount::class;
protected $serviceAccountDataType = '';
/**
* Optional. Tags applied to the VM instances. The tags identify valid sources
* or targets for network firewalls. Each tag must be 1-63 characters long,
* and comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt).
*
* @var string[]
*/
public $tags;
/**
* Describe instances that can be created by this AllocationPolicy. Only
* instances[0] is supported now.
*
* @param InstancePolicyOrTemplate[] $instances
*/
public function setInstances($instances)
{
$this->instances = $instances;
}
/**
* @return InstancePolicyOrTemplate[]
*/
public function getInstances()
{
return $this->instances;
}
/**
* Custom labels to apply to the job and all the Compute Engine resources that
* both are created by this allocation policy and support labels. Use labels
* to group and describe the resources they are applied to. Batch
* automatically applies predefined labels and supports multiple `labels`
* fields for each job, which each let you apply custom labels to various
* resources. Label names that start with "goog-" or "google-" are reserved
* for predefined labels. For more information about labels with Batch, see
* [Organize resources using
* labels](https://cloud.google.com/batch/docs/organize-resources-using-
* labels).
*
* @param string[] $labels
*/
public function setLabels($labels)
{
$this->labels = $labels;
}
/**
* @return string[]
*/
public function getLabels()
{
return $this->labels;
}
/**
* Location where compute resources should be allocated for the Job.
*
* @param LocationPolicy $location
*/
public function setLocation(LocationPolicy $location)
{
$this->location = $location;
}
/**
* @return LocationPolicy
*/
public function getLocation()
{
return $this->location;
}
/**
* The network policy. If you define an instance template in the
* `InstancePolicyOrTemplate` field, Batch will use the network settings in
* the instance template instead of this field.
*
* @param NetworkPolicy $network
*/
public function setNetwork(NetworkPolicy $network)
{
$this->network = $network;
}
/**
* @return NetworkPolicy
*/
public function getNetwork()
{
return $this->network;
}
/**
* The placement policy.
*
* @param PlacementPolicy $placement
*/
public function setPlacement(PlacementPolicy $placement)
{
$this->placement = $placement;
}
/**
* @return PlacementPolicy
*/
public function getPlacement()
{
return $this->placement;
}
/**
* Defines the service account for Batch-created VMs. If omitted, the [default
* Compute Engine service
* account](https://cloud.google.com/compute/docs/access/service-
* accounts#default_service_account) is used. Must match the service account
* specified in any used instance template configured in the Batch job.
* Includes the following fields: * email: The service account's email
* address. If not set, the default Compute Engine service account is used. *
* scopes: Additional OAuth scopes to grant the service account, beyond the
* default cloud-platform scope. (list of strings)
*
* @param ServiceAccount $serviceAccount
*/
public function setServiceAccount(ServiceAccount $serviceAccount)
{
$this->serviceAccount = $serviceAccount;
}
/**
* @return ServiceAccount
*/
public function getServiceAccount()
{
return $this->serviceAccount;
}
/**
* Optional. Tags applied to the VM instances. The tags identify valid sources
* or targets for network firewalls. Each tag must be 1-63 characters long,
* and comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt).
*
* @param string[] $tags
*/
public function setTags($tags)
{
$this->tags = $tags;
}
/**
* @return string[]
*/
public function getTags()
{
return $this->tags;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(AllocationPolicy::class, 'Google_Service_Batch_AllocationPolicy');

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\Batch;
class AttachedDisk extends \Google\Model
{
/**
* Device name that the guest operating system will see. It is used by
* Runnable.volumes field to mount disks. So please specify the device_name if
* you want Batch to help mount the disk, and it should match the device_name
* field in volumes.
*
* @var string
*/
public $deviceName;
/**
* Name of an existing PD.
*
* @var string
*/
public $existingDisk;
protected $newDiskType = Disk::class;
protected $newDiskDataType = '';
/**
* Device name that the guest operating system will see. It is used by
* Runnable.volumes field to mount disks. So please specify the device_name if
* you want Batch to help mount the disk, and it should match the device_name
* field in volumes.
*
* @param string $deviceName
*/
public function setDeviceName($deviceName)
{
$this->deviceName = $deviceName;
}
/**
* @return string
*/
public function getDeviceName()
{
return $this->deviceName;
}
/**
* Name of an existing PD.
*
* @param string $existingDisk
*/
public function setExistingDisk($existingDisk)
{
$this->existingDisk = $existingDisk;
}
/**
* @return string
*/
public function getExistingDisk()
{
return $this->existingDisk;
}
/**
* @param Disk $newDisk
*/
public function setNewDisk(Disk $newDisk)
{
$this->newDisk = $newDisk;
}
/**
* @return Disk
*/
public function getNewDisk()
{
return $this->newDisk;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(AttachedDisk::class, 'Google_Service_Batch_AttachedDisk');

View File

@@ -0,0 +1,62 @@
<?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\Batch;
class AuditConfig extends \Google\Collection
{
protected $collection_key = 'auditLogConfigs';
protected $auditLogConfigsType = AuditLogConfig::class;
protected $auditLogConfigsDataType = 'array';
public $auditLogConfigs;
/**
* @var string
*/
public $service;
/**
* @param AuditLogConfig[]
*/
public function setAuditLogConfigs($auditLogConfigs)
{
$this->auditLogConfigs = $auditLogConfigs;
}
/**
* @return AuditLogConfig[]
*/
public function getAuditLogConfigs()
{
return $this->auditLogConfigs;
}
/**
* @param string
*/
public function setService($service)
{
$this->service = $service;
}
/**
* @return string
*/
public function getService()
{
return $this->service;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(AuditConfig::class, 'Google_Service_Batch_AuditConfig');

View File

@@ -0,0 +1,63 @@
<?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\Batch;
class AuditLogConfig extends \Google\Collection
{
protected $collection_key = 'exemptedMembers';
/**
* @var string[]
*/
public $exemptedMembers;
/**
* @var string
*/
public $logType;
/**
* @param string[]
*/
public function setExemptedMembers($exemptedMembers)
{
$this->exemptedMembers = $exemptedMembers;
}
/**
* @return string[]
*/
public function getExemptedMembers()
{
return $this->exemptedMembers;
}
/**
* @param string
*/
public function setLogType($logType)
{
$this->logType = $logType;
}
/**
* @return string
*/
public function getLogType()
{
return $this->logType;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(AuditLogConfig::class, 'Google_Service_Batch_AuditLogConfig');

View File

@@ -0,0 +1,50 @@
<?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\Batch;
class Barrier extends \Google\Model
{
/**
* Barriers are identified by their index in runnable list. Names are not
* required, but if present should be an identifier.
*
* @var string
*/
public $name;
/**
* Barriers are identified by their index in runnable list. Names are not
* required, but if present should be an identifier.
*
* @param string $name
*/
public function setName($name)
{
$this->name = $name;
}
/**
* @return string
*/
public function getName()
{
return $this->name;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Barrier::class, 'Google_Service_Batch_Barrier');

View File

@@ -0,0 +1,25 @@
<?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\Batch;
class BatchEmpty extends \Google\Model
{
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(BatchEmpty::class, 'Google_Service_Batch_BatchEmpty');

View File

@@ -0,0 +1,80 @@
<?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\Batch;
class Binding extends \Google\Collection
{
protected $collection_key = 'members';
protected $conditionType = Expr::class;
protected $conditionDataType = '';
public $condition;
/**
* @var string[]
*/
public $members;
/**
* @var string
*/
public $role;
/**
* @param Expr
*/
public function setCondition(Expr $condition)
{
$this->condition = $condition;
}
/**
* @return Expr
*/
public function getCondition()
{
return $this->condition;
}
/**
* @param string[]
*/
public function setMembers($members)
{
$this->members = $members;
}
/**
* @return string[]
*/
public function getMembers()
{
return $this->members;
}
/**
* @param string
*/
public function setRole($role)
{
$this->role = $role;
}
/**
* @return string
*/
public function getRole()
{
return $this->role;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Binding::class, 'Google_Service_Batch_Binding');

View File

@@ -0,0 +1,68 @@
<?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\Batch;
class CancelJobRequest extends \Google\Model
{
/**
* Optional. An optional request ID to identify requests. Specify a unique
* request ID so that if you must retry your request, the server will know to
* ignore the request if it has already been completed. The server will
* guarantee that for at least 60 minutes after the first request. For
* example, consider a situation where you make an initial request and the
* request times out. If you make the request again with the same request ID,
* the server can check if original operation with the same request ID was
* received, and if so, will ignore the second request. This prevents clients
* from accidentally creating duplicate commitments. The request ID must be a
* valid UUID with the exception that zero UUID is not supported
* (00000000-0000-0000-0000-000000000000).
*
* @var string
*/
public $requestId;
/**
* Optional. An optional request ID to identify requests. Specify a unique
* request ID so that if you must retry your request, the server will know to
* ignore the request if it has already been completed. The server will
* guarantee that for at least 60 minutes after the first request. For
* example, consider a situation where you make an initial request and the
* request times out. If you make the request again with the same request ID,
* the server can check if original operation with the same request ID was
* received, and if so, will ignore the second request. This prevents clients
* from accidentally creating duplicate commitments. The request ID must be a
* valid UUID with the exception that zero UUID is not supported
* (00000000-0000-0000-0000-000000000000).
*
* @param string $requestId
*/
public function setRequestId($requestId)
{
$this->requestId = $requestId;
}
/**
* @return string
*/
public function getRequestId()
{
return $this->requestId;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(CancelJobRequest::class, 'Google_Service_Batch_CancelJobRequest');

View File

@@ -0,0 +1,25 @@
<?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\Batch;
class CancelOperationRequest extends \Google\Model
{
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(CancelOperationRequest::class, 'Google_Service_Batch_CancelOperationRequest');

View File

@@ -0,0 +1,58 @@
<?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\Batch;
class CloudLoggingOption extends \Google\Model
{
/**
* Optional. Set this field to `true` to change the [monitored resource
* type](https://cloud.google.com/monitoring/api/resources) for Cloud Logging
* logs generated by this Batch job from the [`batch.googleapis.com/Job`](http
* s://cloud.google.com/monitoring/api/resources#tag_batch.googleapis.com/Job)
* type to the formerly used [`generic_task`](https://cloud.google.com/monitor
* ing/api/resources#tag_generic_task) type.
*
* @var bool
*/
public $useGenericTaskMonitoredResource;
/**
* Optional. Set this field to `true` to change the [monitored resource
* type](https://cloud.google.com/monitoring/api/resources) for Cloud Logging
* logs generated by this Batch job from the [`batch.googleapis.com/Job`](http
* s://cloud.google.com/monitoring/api/resources#tag_batch.googleapis.com/Job)
* type to the formerly used [`generic_task`](https://cloud.google.com/monitor
* ing/api/resources#tag_generic_task) type.
*
* @param bool $useGenericTaskMonitoredResource
*/
public function setUseGenericTaskMonitoredResource($useGenericTaskMonitoredResource)
{
$this->useGenericTaskMonitoredResource = $useGenericTaskMonitoredResource;
}
/**
* @return bool
*/
public function getUseGenericTaskMonitoredResource()
{
return $this->useGenericTaskMonitoredResource;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(CloudLoggingOption::class, 'Google_Service_Batch_CloudLoggingOption');

View File

@@ -0,0 +1,140 @@
<?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\Batch;
class ComputeResource extends \Google\Model
{
/**
* Extra boot disk size in MiB for each task.
*
* @var string
*/
public $bootDiskMib;
/**
* The milliCPU count. `cpuMilli` defines the amount of CPU resources per task
* in milliCPU units. For example, `1000` corresponds to 1 vCPU per task. If
* undefined, the default value is `2000`. If you also define the VM's machine
* type using the `machineType` in [InstancePolicy](https://cloud.google.com/b
* atch/docs/reference/rest/v1/projects.locations.jobs#instancepolicy) field
* or inside the `instanceTemplate` in the [InstancePolicyOrTemplate](https://
* cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#insta
* ncepolicyortemplate) field, make sure the CPU resources for both fields are
* compatible with each other and with how many tasks you want to allow to run
* on the same VM at the same time. For example, if you specify the
* `n2-standard-2` machine type, which has 2 vCPUs each, you are recommended
* to set `cpuMilli` no more than `2000`, or you are recommended to run two
* tasks on the same VM if you set `cpuMilli` to `1000` or less.
*
* @var string
*/
public $cpuMilli;
/**
* Memory in MiB. `memoryMib` defines the amount of memory per task in MiB
* units. If undefined, the default value is `2000`. If you also define the
* VM's machine type using the `machineType` in [InstancePolicy](https://cloud
* .google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepo
* licy) field or inside the `instanceTemplate` in the [InstancePolicyOrTempla
* te](https://cloud.google.com/batch/docs/reference/rest/v1/projects.location
* s.jobs#instancepolicyortemplate) field, make sure the memory resources for
* both fields are compatible with each other and with how many tasks you want
* to allow to run on the same VM at the same time. For example, if you
* specify the `n2-standard-2` machine type, which has 8 GiB each, you are
* recommended to set `memoryMib` to no more than `8192`, or you are
* recommended to run two tasks on the same VM if you set `memoryMib` to
* `4096` or less.
*
* @var string
*/
public $memoryMib;
/**
* Extra boot disk size in MiB for each task.
*
* @param string $bootDiskMib
*/
public function setBootDiskMib($bootDiskMib)
{
$this->bootDiskMib = $bootDiskMib;
}
/**
* @return string
*/
public function getBootDiskMib()
{
return $this->bootDiskMib;
}
/**
* The milliCPU count. `cpuMilli` defines the amount of CPU resources per task
* in milliCPU units. For example, `1000` corresponds to 1 vCPU per task. If
* undefined, the default value is `2000`. If you also define the VM's machine
* type using the `machineType` in [InstancePolicy](https://cloud.google.com/b
* atch/docs/reference/rest/v1/projects.locations.jobs#instancepolicy) field
* or inside the `instanceTemplate` in the [InstancePolicyOrTemplate](https://
* cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#insta
* ncepolicyortemplate) field, make sure the CPU resources for both fields are
* compatible with each other and with how many tasks you want to allow to run
* on the same VM at the same time. For example, if you specify the
* `n2-standard-2` machine type, which has 2 vCPUs each, you are recommended
* to set `cpuMilli` no more than `2000`, or you are recommended to run two
* tasks on the same VM if you set `cpuMilli` to `1000` or less.
*
* @param string $cpuMilli
*/
public function setCpuMilli($cpuMilli)
{
$this->cpuMilli = $cpuMilli;
}
/**
* @return string
*/
public function getCpuMilli()
{
return $this->cpuMilli;
}
/**
* Memory in MiB. `memoryMib` defines the amount of memory per task in MiB
* units. If undefined, the default value is `2000`. If you also define the
* VM's machine type using the `machineType` in [InstancePolicy](https://cloud
* .google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepo
* licy) field or inside the `instanceTemplate` in the [InstancePolicyOrTempla
* te](https://cloud.google.com/batch/docs/reference/rest/v1/projects.location
* s.jobs#instancepolicyortemplate) field, make sure the memory resources for
* both fields are compatible with each other and with how many tasks you want
* to allow to run on the same VM at the same time. For example, if you
* specify the `n2-standard-2` machine type, which has 8 GiB each, you are
* recommended to set `memoryMib` to no more than `8192`, or you are
* recommended to run two tasks on the same VM if you set `memoryMib` to
* `4096` or less.
*
* @param string $memoryMib
*/
public function setMemoryMib($memoryMib)
{
$this->memoryMib = $memoryMib;
}
/**
* @return string
*/
public function getMemoryMib()
{
return $this->memoryMib;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ComputeResource::class, 'Google_Service_Batch_ComputeResource');

View File

@@ -0,0 +1,323 @@
<?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\Batch;
class Container extends \Google\Collection
{
protected $collection_key = 'volumes';
/**
* If set to true, external network access to and from container will be
* blocked, containers that are with block_external_network as true can still
* communicate with each other, network cannot be specified in the
* `container.options` field.
*
* @var bool
*/
public $blockExternalNetwork;
/**
* Required for some container images. Overrides the `CMD` specified in the
* container. If there is an `ENTRYPOINT` (either in the container image or
* with the `entrypoint` field below) then these commands are appended as
* arguments to the `ENTRYPOINT`.
*
* @var string[]
*/
public $commands;
/**
* Optional. If set to true, this container runnable uses Image streaming. Use
* Image streaming to allow the runnable to initialize without waiting for the
* entire container image to download, which can significantly reduce startup
* time for large container images. When `enableImageStreaming` is set to
* true, the container runtime is [containerd](https://containerd.io/) instead
* of Docker. Additionally, this container runnable only supports the
* following `container` subfields: `imageUri`, `commands[]`, `entrypoint`,
* and `volumes[]`; any other `container` subfields are ignored. For more
* information about the requirements and limitations for using Image
* streaming with Batch, see the [`image-streaming` sample on
* GitHub](https://github.com/GoogleCloudPlatform/batch-samples/tree/main/api-
* samples/image-streaming).
*
* @var bool
*/
public $enableImageStreaming;
/**
* Required for some container images. Overrides the `ENTRYPOINT` specified in
* the container.
*
* @var string
*/
public $entrypoint;
/**
* Required. The URI to pull the container image from.
*
* @var string
*/
public $imageUri;
/**
* Required for some container images. Arbitrary additional options to include
* in the `docker run` command when running this container—for example,
* `--network host`. For the `--volume` option, use the `volumes` field for
* the container.
*
* @var string
*/
public $options;
/**
* Required if the container image is from a private Docker registry. The
* password to login to the Docker registry that contains the image. For
* security, it is strongly recommended to specify an encrypted password by
* using a Secret Manager secret: `projects/secrets/versions`. Warning: If you
* specify the password using plain text, you risk the password being exposed
* to any users who can view the job or its logs. To avoid this risk, specify
* a secret that contains the password instead. Learn more about [Secret
* Manager](https://cloud.google.com/secret-manager/docs/) and [using Secret
* Manager with Batch](https://cloud.google.com/batch/docs/create-run-job-
* secret-manager).
*
* @var string
*/
public $password;
/**
* Required if the container image is from a private Docker registry. The
* username to login to the Docker registry that contains the image. You can
* either specify the username directly by using plain text or specify an
* encrypted username by using a Secret Manager secret:
* `projects/secrets/versions`. However, using a secret is recommended for
* enhanced security. Caution: If you specify the username using plain text,
* you risk the username being exposed to any users who can view the job or
* its logs. To avoid this risk, specify a secret that contains the username
* instead. Learn more about [Secret Manager](https://cloud.google.com/secret-
* manager/docs/) and [using Secret Manager with
* Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager).
*
* @var string
*/
public $username;
/**
* Volumes to mount (bind mount) from the host machine files or directories
* into the container, formatted to match `--volume` option for the `docker
* run` command—for example, `/foo:/bar` or `/foo:/bar:ro`. If the
* `TaskSpec.Volumes` field is specified but this field is not, Batch will
* mount each volume from the host machine to the container with the same
* mount path by default. In this case, the default mount option for
* containers will be read-only (`ro`) for existing persistent disks and read-
* write (`rw`) for other volume types, regardless of the original mount
* options specified in `TaskSpec.Volumes`. If you need different mount
* settings, you can explicitly configure them in this field.
*
* @var string[]
*/
public $volumes;
/**
* If set to true, external network access to and from container will be
* blocked, containers that are with block_external_network as true can still
* communicate with each other, network cannot be specified in the
* `container.options` field.
*
* @param bool $blockExternalNetwork
*/
public function setBlockExternalNetwork($blockExternalNetwork)
{
$this->blockExternalNetwork = $blockExternalNetwork;
}
/**
* @return bool
*/
public function getBlockExternalNetwork()
{
return $this->blockExternalNetwork;
}
/**
* Required for some container images. Overrides the `CMD` specified in the
* container. If there is an `ENTRYPOINT` (either in the container image or
* with the `entrypoint` field below) then these commands are appended as
* arguments to the `ENTRYPOINT`.
*
* @param string[] $commands
*/
public function setCommands($commands)
{
$this->commands = $commands;
}
/**
* @return string[]
*/
public function getCommands()
{
return $this->commands;
}
/**
* Optional. If set to true, this container runnable uses Image streaming. Use
* Image streaming to allow the runnable to initialize without waiting for the
* entire container image to download, which can significantly reduce startup
* time for large container images. When `enableImageStreaming` is set to
* true, the container runtime is [containerd](https://containerd.io/) instead
* of Docker. Additionally, this container runnable only supports the
* following `container` subfields: `imageUri`, `commands[]`, `entrypoint`,
* and `volumes[]`; any other `container` subfields are ignored. For more
* information about the requirements and limitations for using Image
* streaming with Batch, see the [`image-streaming` sample on
* GitHub](https://github.com/GoogleCloudPlatform/batch-samples/tree/main/api-
* samples/image-streaming).
*
* @param bool $enableImageStreaming
*/
public function setEnableImageStreaming($enableImageStreaming)
{
$this->enableImageStreaming = $enableImageStreaming;
}
/**
* @return bool
*/
public function getEnableImageStreaming()
{
return $this->enableImageStreaming;
}
/**
* Required for some container images. Overrides the `ENTRYPOINT` specified in
* the container.
*
* @param string $entrypoint
*/
public function setEntrypoint($entrypoint)
{
$this->entrypoint = $entrypoint;
}
/**
* @return string
*/
public function getEntrypoint()
{
return $this->entrypoint;
}
/**
* Required. The URI to pull the container image from.
*
* @param string $imageUri
*/
public function setImageUri($imageUri)
{
$this->imageUri = $imageUri;
}
/**
* @return string
*/
public function getImageUri()
{
return $this->imageUri;
}
/**
* Required for some container images. Arbitrary additional options to include
* in the `docker run` command when running this container—for example,
* `--network host`. For the `--volume` option, use the `volumes` field for
* the container.
*
* @param string $options
*/
public function setOptions($options)
{
$this->options = $options;
}
/**
* @return string
*/
public function getOptions()
{
return $this->options;
}
/**
* Required if the container image is from a private Docker registry. The
* password to login to the Docker registry that contains the image. For
* security, it is strongly recommended to specify an encrypted password by
* using a Secret Manager secret: `projects/secrets/versions`. Warning: If you
* specify the password using plain text, you risk the password being exposed
* to any users who can view the job or its logs. To avoid this risk, specify
* a secret that contains the password instead. Learn more about [Secret
* Manager](https://cloud.google.com/secret-manager/docs/) and [using Secret
* Manager with Batch](https://cloud.google.com/batch/docs/create-run-job-
* secret-manager).
*
* @param string $password
*/
public function setPassword($password)
{
$this->password = $password;
}
/**
* @return string
*/
public function getPassword()
{
return $this->password;
}
/**
* Required if the container image is from a private Docker registry. The
* username to login to the Docker registry that contains the image. You can
* either specify the username directly by using plain text or specify an
* encrypted username by using a Secret Manager secret:
* `projects/secrets/versions`. However, using a secret is recommended for
* enhanced security. Caution: If you specify the username using plain text,
* you risk the username being exposed to any users who can view the job or
* its logs. To avoid this risk, specify a secret that contains the username
* instead. Learn more about [Secret Manager](https://cloud.google.com/secret-
* manager/docs/) and [using Secret Manager with
* Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager).
*
* @param string $username
*/
public function setUsername($username)
{
$this->username = $username;
}
/**
* @return string
*/
public function getUsername()
{
return $this->username;
}
/**
* Volumes to mount (bind mount) from the host machine files or directories
* into the container, formatted to match `--volume` option for the `docker
* run` command—for example, `/foo:/bar` or `/foo:/bar:ro`. If the
* `TaskSpec.Volumes` field is specified but this field is not, Batch will
* mount each volume from the host machine to the container with the same
* mount path by default. In this case, the default mount option for
* containers will be read-only (`ro`) for existing persistent disks and read-
* write (`rw`) for other volume types, regardless of the original mount
* options specified in `TaskSpec.Volumes`. If you need different mount
* settings, you can explicitly configure them in this field.
*
* @param string[] $volumes
*/
public function setVolumes($volumes)
{
$this->volumes = $volumes;
}
/**
* @return string[]
*/
public function getVolumes()
{
return $this->volumes;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Container::class, 'Google_Service_Batch_Container');

View File

@@ -0,0 +1,190 @@
<?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\Batch;
class Disk extends \Google\Model
{
/**
* Local SSDs are available through both "SCSI" and "NVMe" interfaces. If not
* indicated, "NVMe" will be the default one for local ssds. This field is
* ignored for persistent disks as the interface is chosen automatically. See
* https://cloud.google.com/compute/docs/disks/persistent-
* disks#choose_an_interface.
*
* @var string
*/
public $diskInterface;
/**
* URL for a VM image to use as the data source for this disk. For example,
* the following are all valid URLs: * Specify the image by its family name:
* projects/{project}/global/images/family/{image_family} * Specify the image
* version: projects/{project}/global/images/{image_version} You can also use
* Batch customized image in short names. The following image values are
* supported for a boot disk: * `batch-debian`: use Batch Debian images. *
* `batch-cos`: use Batch Container-Optimized images. * `batch-hpc-rocky`: use
* Batch HPC Rocky Linux images.
*
* @var string
*/
public $image;
/**
* Disk size in GB. **Non-Boot Disk**: If the `type` specifies a persistent
* disk, this field is ignored if `data_source` is set as `image` or
* `snapshot`. If the `type` specifies a local SSD, this field should be a
* multiple of 375 GB, otherwise, the final size will be the next greater
* multiple of 375 GB. **Boot Disk**: Batch will calculate the boot disk size
* based on source image and task requirements if you do not speicify the
* size. If both this field and the `boot_disk_mib` field in task spec's
* `compute_resource` are defined, Batch will only honor this field. Also,
* this field should be no smaller than the source disk's size when the
* `data_source` is set as `snapshot` or `image`. For example, if you set an
* image as the `data_source` field and the image's default disk size 30 GB,
* you can only use this field to make the disk larger or equal to 30 GB.
*
* @var string
*/
public $sizeGb;
/**
* Name of a snapshot used as the data source. Snapshot is not supported as
* boot disk now.
*
* @var string
*/
public $snapshot;
/**
* Disk type as shown in `gcloud compute disk-types list`. For example, local
* SSD uses type "local-ssd". Persistent disks and boot disks use "pd-
* balanced", "pd-extreme", "pd-ssd" or "pd-standard". If not specified, "pd-
* standard" will be used as the default type for non-boot disks, "pd-
* balanced" will be used as the default type for boot disks.
*
* @var string
*/
public $type;
/**
* Local SSDs are available through both "SCSI" and "NVMe" interfaces. If not
* indicated, "NVMe" will be the default one for local ssds. This field is
* ignored for persistent disks as the interface is chosen automatically. See
* https://cloud.google.com/compute/docs/disks/persistent-
* disks#choose_an_interface.
*
* @param string $diskInterface
*/
public function setDiskInterface($diskInterface)
{
$this->diskInterface = $diskInterface;
}
/**
* @return string
*/
public function getDiskInterface()
{
return $this->diskInterface;
}
/**
* URL for a VM image to use as the data source for this disk. For example,
* the following are all valid URLs: * Specify the image by its family name:
* projects/{project}/global/images/family/{image_family} * Specify the image
* version: projects/{project}/global/images/{image_version} You can also use
* Batch customized image in short names. The following image values are
* supported for a boot disk: * `batch-debian`: use Batch Debian images. *
* `batch-cos`: use Batch Container-Optimized images. * `batch-hpc-rocky`: use
* Batch HPC Rocky Linux images.
*
* @param string $image
*/
public function setImage($image)
{
$this->image = $image;
}
/**
* @return string
*/
public function getImage()
{
return $this->image;
}
/**
* Disk size in GB. **Non-Boot Disk**: If the `type` specifies a persistent
* disk, this field is ignored if `data_source` is set as `image` or
* `snapshot`. If the `type` specifies a local SSD, this field should be a
* multiple of 375 GB, otherwise, the final size will be the next greater
* multiple of 375 GB. **Boot Disk**: Batch will calculate the boot disk size
* based on source image and task requirements if you do not speicify the
* size. If both this field and the `boot_disk_mib` field in task spec's
* `compute_resource` are defined, Batch will only honor this field. Also,
* this field should be no smaller than the source disk's size when the
* `data_source` is set as `snapshot` or `image`. For example, if you set an
* image as the `data_source` field and the image's default disk size 30 GB,
* you can only use this field to make the disk larger or equal to 30 GB.
*
* @param string $sizeGb
*/
public function setSizeGb($sizeGb)
{
$this->sizeGb = $sizeGb;
}
/**
* @return string
*/
public function getSizeGb()
{
return $this->sizeGb;
}
/**
* Name of a snapshot used as the data source. Snapshot is not supported as
* boot disk now.
*
* @param string $snapshot
*/
public function setSnapshot($snapshot)
{
$this->snapshot = $snapshot;
}
/**
* @return string
*/
public function getSnapshot()
{
return $this->snapshot;
}
/**
* Disk type as shown in `gcloud compute disk-types list`. For example, local
* SSD uses type "local-ssd". Persistent disks and boot disks use "pd-
* balanced", "pd-extreme", "pd-ssd" or "pd-standard". If not specified, "pd-
* standard" will be used as the default type for non-boot disks, "pd-
* balanced" will be used as the default type for boot disks.
*
* @param string $type
*/
public function setType($type)
{
$this->type = $type;
}
/**
* @return string
*/
public function getType()
{
return $this->type;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Disk::class, 'Google_Service_Batch_Disk');

View File

@@ -0,0 +1,93 @@
<?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\Batch;
class Environment extends \Google\Model
{
protected $encryptedVariablesType = KMSEnvMap::class;
protected $encryptedVariablesDataType = '';
/**
* A map of environment variable names to Secret Manager secret names. The VM
* will access the named secrets to set the value of each environment
* variable.
*
* @var string[]
*/
public $secretVariables;
/**
* A map of environment variable names to values.
*
* @var string[]
*/
public $variables;
/**
* An encrypted JSON dictionary where the key/value pairs correspond to
* environment variable names and their values.
*
* @param KMSEnvMap $encryptedVariables
*/
public function setEncryptedVariables(KMSEnvMap $encryptedVariables)
{
$this->encryptedVariables = $encryptedVariables;
}
/**
* @return KMSEnvMap
*/
public function getEncryptedVariables()
{
return $this->encryptedVariables;
}
/**
* A map of environment variable names to Secret Manager secret names. The VM
* will access the named secrets to set the value of each environment
* variable.
*
* @param string[] $secretVariables
*/
public function setSecretVariables($secretVariables)
{
$this->secretVariables = $secretVariables;
}
/**
* @return string[]
*/
public function getSecretVariables()
{
return $this->secretVariables;
}
/**
* A map of environment variable names to values.
*
* @param string[] $variables
*/
public function setVariables($variables)
{
$this->variables = $variables;
}
/**
* @return string[]
*/
public function getVariables()
{
return $this->variables;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Environment::class, 'Google_Service_Batch_Environment');

View File

@@ -0,0 +1,98 @@
<?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\Batch;
class Expr extends \Google\Model
{
/**
* @var string
*/
public $description;
/**
* @var string
*/
public $expression;
/**
* @var string
*/
public $location;
/**
* @var string
*/
public $title;
/**
* @param string
*/
public function setDescription($description)
{
$this->description = $description;
}
/**
* @return string
*/
public function getDescription()
{
return $this->description;
}
/**
* @param string
*/
public function setExpression($expression)
{
$this->expression = $expression;
}
/**
* @return string
*/
public function getExpression()
{
return $this->expression;
}
/**
* @param string
*/
public function setLocation($location)
{
$this->location = $location;
}
/**
* @return string
*/
public function getLocation()
{
return $this->location;
}
/**
* @param string
*/
public function setTitle($title)
{
$this->title = $title;
}
/**
* @return string
*/
public function getTitle()
{
return $this->title;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Expr::class, 'Google_Service_Batch_Expr');

View File

@@ -0,0 +1,50 @@
<?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\Batch;
class GCS extends \Google\Model
{
/**
* Remote path, either a bucket name or a subdirectory of a bucket, e.g.:
* bucket_name, bucket_name/subdirectory/
*
* @var string
*/
public $remotePath;
/**
* Remote path, either a bucket name or a subdirectory of a bucket, e.g.:
* bucket_name, bucket_name/subdirectory/
*
* @param string $remotePath
*/
public function setRemotePath($remotePath)
{
$this->remotePath = $remotePath;
}
/**
* @return string
*/
public function getRemotePath()
{
return $this->remotePath;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GCS::class, 'Google_Service_Batch_GCS');

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\Batch;
class InstancePolicy extends \Google\Collection
{
/**
* Unspecified.
*/
public const PROVISIONING_MODEL_PROVISIONING_MODEL_UNSPECIFIED = 'PROVISIONING_MODEL_UNSPECIFIED';
/**
* Standard VM.
*/
public const PROVISIONING_MODEL_STANDARD = 'STANDARD';
/**
* SPOT VM.
*/
public const PROVISIONING_MODEL_SPOT = 'SPOT';
/**
* Preemptible VM (PVM). Above SPOT VM is the preferable model for preemptible
* VM instances: the old preemptible VM model (indicated by this field) is the
* older model, and has been migrated to use the SPOT model as the underlying
* technology. This old model will still be supported.
*
* @deprecated
*/
public const PROVISIONING_MODEL_PREEMPTIBLE = 'PREEMPTIBLE';
/**
* Bound to the lifecycle of the reservation in which it is provisioned.
*/
public const PROVISIONING_MODEL_RESERVATION_BOUND = 'RESERVATION_BOUND';
/**
* Instance is provisioned with DWS Flex Start and has limited max run
* duration.
*/
public const PROVISIONING_MODEL_FLEX_START = 'FLEX_START';
protected $collection_key = 'disks';
protected $acceleratorsType = Accelerator::class;
protected $acceleratorsDataType = 'array';
protected $bootDiskType = Disk::class;
protected $bootDiskDataType = '';
protected $disksType = AttachedDisk::class;
protected $disksDataType = 'array';
/**
* The Compute Engine machine type.
*
* @var string
*/
public $machineType;
/**
* The minimum CPU platform. See
* https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform.
*
* @var string
*/
public $minCpuPlatform;
/**
* The provisioning model.
*
* @var string
*/
public $provisioningModel;
/**
* Optional. If not specified (default), VMs will consume any applicable
* reservation. If "NO_RESERVATION" is specified, VMs will not consume any
* reservation. Otherwise, if specified, VMs will consume only the specified
* reservation.
*
* @var string
*/
public $reservation;
/**
* The accelerators attached to each VM instance.
*
* @param Accelerator[] $accelerators
*/
public function setAccelerators($accelerators)
{
$this->accelerators = $accelerators;
}
/**
* @return Accelerator[]
*/
public function getAccelerators()
{
return $this->accelerators;
}
/**
* Boot disk to be created and attached to each VM by this InstancePolicy.
* Boot disk will be deleted when the VM is deleted. Batch API now only
* supports booting from image.
*
* @param Disk $bootDisk
*/
public function setBootDisk(Disk $bootDisk)
{
$this->bootDisk = $bootDisk;
}
/**
* @return Disk
*/
public function getBootDisk()
{
return $this->bootDisk;
}
/**
* Non-boot disks to be attached for each VM created by this InstancePolicy.
* New disks will be deleted when the VM is deleted. A non-boot disk is a disk
* that can be of a device with a file system or a raw storage drive that is
* not ready for data storage and accessing.
*
* @param AttachedDisk[] $disks
*/
public function setDisks($disks)
{
$this->disks = $disks;
}
/**
* @return AttachedDisk[]
*/
public function getDisks()
{
return $this->disks;
}
/**
* The Compute Engine machine type.
*
* @param string $machineType
*/
public function setMachineType($machineType)
{
$this->machineType = $machineType;
}
/**
* @return string
*/
public function getMachineType()
{
return $this->machineType;
}
/**
* The minimum CPU platform. See
* https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform.
*
* @param string $minCpuPlatform
*/
public function setMinCpuPlatform($minCpuPlatform)
{
$this->minCpuPlatform = $minCpuPlatform;
}
/**
* @return string
*/
public function getMinCpuPlatform()
{
return $this->minCpuPlatform;
}
/**
* The provisioning model.
*
* Accepted values: PROVISIONING_MODEL_UNSPECIFIED, STANDARD, SPOT,
* PREEMPTIBLE, RESERVATION_BOUND, FLEX_START
*
* @param self::PROVISIONING_MODEL_* $provisioningModel
*/
public function setProvisioningModel($provisioningModel)
{
$this->provisioningModel = $provisioningModel;
}
/**
* @return self::PROVISIONING_MODEL_*
*/
public function getProvisioningModel()
{
return $this->provisioningModel;
}
/**
* Optional. If not specified (default), VMs will consume any applicable
* reservation. If "NO_RESERVATION" is specified, VMs will not consume any
* reservation. Otherwise, if specified, VMs will consume only the specified
* reservation.
*
* @param string $reservation
*/
public function setReservation($reservation)
{
$this->reservation = $reservation;
}
/**
* @return string
*/
public function getReservation()
{
return $this->reservation;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(InstancePolicy::class, 'Google_Service_Batch_InstancePolicy');

View File

@@ -0,0 +1,176 @@
<?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\Batch;
class InstancePolicyOrTemplate extends \Google\Model
{
/**
* Optional. Set this field to `true` if you want Batch to block project-level
* SSH keys from accessing this job's VMs. Alternatively, you can configure
* the job to specify a VM instance template that blocks project-level SSH
* keys. In either case, Batch blocks project-level SSH keys while creating
* the VMs for this job. Batch allows project-level SSH keys for a job's VMs
* only if all the following are true: + This field is undefined or set to
* `false`. + The job's VM instance template (if any) doesn't block project-
* level SSH keys. Notably, you can override this behavior by manually
* updating a VM to block or allow project-level SSH keys. For more
* information about blocking project-level SSH keys, see the Compute Engine
* documentation: https://cloud.google.com/compute/docs/connect/restrict-ssh-
* keys#block-keys
*
* @var bool
*/
public $blockProjectSshKeys;
/**
* Set this field true if you want Batch to help fetch drivers from a third
* party location and install them for GPUs specified in `policy.accelerators`
* or `instance_template` on your behalf. Default is false. For Container-
* Optimized Image cases, Batch will install the accelerator driver following
* milestones of https://cloud.google.com/container-optimized-os/docs/release-
* notes. For non Container-Optimized Image cases, following
* https://github.com/GoogleCloudPlatform/compute-gpu-
* installation/blob/main/linux/install_gpu_driver.py.
*
* @var bool
*/
public $installGpuDrivers;
/**
* Optional. Set this field true if you want Batch to install Ops Agent on
* your behalf. Default is false.
*
* @var bool
*/
public $installOpsAgent;
/**
* Name of an instance template used to create VMs. Named the field as
* 'instance_template' instead of 'template' to avoid C++ keyword conflict.
* Batch only supports global instance templates from the same project as the
* job. You can specify the global instance template as a full or partial URL.
*
* @var string
*/
public $instanceTemplate;
protected $policyType = InstancePolicy::class;
protected $policyDataType = '';
/**
* Optional. Set this field to `true` if you want Batch to block project-level
* SSH keys from accessing this job's VMs. Alternatively, you can configure
* the job to specify a VM instance template that blocks project-level SSH
* keys. In either case, Batch blocks project-level SSH keys while creating
* the VMs for this job. Batch allows project-level SSH keys for a job's VMs
* only if all the following are true: + This field is undefined or set to
* `false`. + The job's VM instance template (if any) doesn't block project-
* level SSH keys. Notably, you can override this behavior by manually
* updating a VM to block or allow project-level SSH keys. For more
* information about blocking project-level SSH keys, see the Compute Engine
* documentation: https://cloud.google.com/compute/docs/connect/restrict-ssh-
* keys#block-keys
*
* @param bool $blockProjectSshKeys
*/
public function setBlockProjectSshKeys($blockProjectSshKeys)
{
$this->blockProjectSshKeys = $blockProjectSshKeys;
}
/**
* @return bool
*/
public function getBlockProjectSshKeys()
{
return $this->blockProjectSshKeys;
}
/**
* Set this field true if you want Batch to help fetch drivers from a third
* party location and install them for GPUs specified in `policy.accelerators`
* or `instance_template` on your behalf. Default is false. For Container-
* Optimized Image cases, Batch will install the accelerator driver following
* milestones of https://cloud.google.com/container-optimized-os/docs/release-
* notes. For non Container-Optimized Image cases, following
* https://github.com/GoogleCloudPlatform/compute-gpu-
* installation/blob/main/linux/install_gpu_driver.py.
*
* @param bool $installGpuDrivers
*/
public function setInstallGpuDrivers($installGpuDrivers)
{
$this->installGpuDrivers = $installGpuDrivers;
}
/**
* @return bool
*/
public function getInstallGpuDrivers()
{
return $this->installGpuDrivers;
}
/**
* Optional. Set this field true if you want Batch to install Ops Agent on
* your behalf. Default is false.
*
* @param bool $installOpsAgent
*/
public function setInstallOpsAgent($installOpsAgent)
{
$this->installOpsAgent = $installOpsAgent;
}
/**
* @return bool
*/
public function getInstallOpsAgent()
{
return $this->installOpsAgent;
}
/**
* Name of an instance template used to create VMs. Named the field as
* 'instance_template' instead of 'template' to avoid C++ keyword conflict.
* Batch only supports global instance templates from the same project as the
* job. You can specify the global instance template as a full or partial URL.
*
* @param string $instanceTemplate
*/
public function setInstanceTemplate($instanceTemplate)
{
$this->instanceTemplate = $instanceTemplate;
}
/**
* @return string
*/
public function getInstanceTemplate()
{
return $this->instanceTemplate;
}
/**
* InstancePolicy.
*
* @param InstancePolicy $policy
*/
public function setPolicy(InstancePolicy $policy)
{
$this->policy = $policy;
}
/**
* @return InstancePolicy
*/
public function getPolicy()
{
return $this->policy;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(InstancePolicyOrTemplate::class, 'Google_Service_Batch_InstancePolicyOrTemplate');

View File

@@ -0,0 +1,143 @@
<?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\Batch;
class InstanceStatus extends \Google\Model
{
/**
* Unspecified.
*/
public const PROVISIONING_MODEL_PROVISIONING_MODEL_UNSPECIFIED = 'PROVISIONING_MODEL_UNSPECIFIED';
/**
* Standard VM.
*/
public const PROVISIONING_MODEL_STANDARD = 'STANDARD';
/**
* SPOT VM.
*/
public const PROVISIONING_MODEL_SPOT = 'SPOT';
/**
* Preemptible VM (PVM). Above SPOT VM is the preferable model for preemptible
* VM instances: the old preemptible VM model (indicated by this field) is the
* older model, and has been migrated to use the SPOT model as the underlying
* technology. This old model will still be supported.
*
* @deprecated
*/
public const PROVISIONING_MODEL_PREEMPTIBLE = 'PREEMPTIBLE';
/**
* Bound to the lifecycle of the reservation in which it is provisioned.
*/
public const PROVISIONING_MODEL_RESERVATION_BOUND = 'RESERVATION_BOUND';
/**
* Instance is provisioned with DWS Flex Start and has limited max run
* duration.
*/
public const PROVISIONING_MODEL_FLEX_START = 'FLEX_START';
protected $bootDiskType = Disk::class;
protected $bootDiskDataType = '';
/**
* The Compute Engine machine type.
*
* @var string
*/
public $machineType;
/**
* The VM instance provisioning model.
*
* @var string
*/
public $provisioningModel;
/**
* The max number of tasks can be assigned to this instance type.
*
* @var string
*/
public $taskPack;
/**
* The VM boot disk.
*
* @param Disk $bootDisk
*/
public function setBootDisk(Disk $bootDisk)
{
$this->bootDisk = $bootDisk;
}
/**
* @return Disk
*/
public function getBootDisk()
{
return $this->bootDisk;
}
/**
* The Compute Engine machine type.
*
* @param string $machineType
*/
public function setMachineType($machineType)
{
$this->machineType = $machineType;
}
/**
* @return string
*/
public function getMachineType()
{
return $this->machineType;
}
/**
* The VM instance provisioning model.
*
* Accepted values: PROVISIONING_MODEL_UNSPECIFIED, STANDARD, SPOT,
* PREEMPTIBLE, RESERVATION_BOUND, FLEX_START
*
* @param self::PROVISIONING_MODEL_* $provisioningModel
*/
public function setProvisioningModel($provisioningModel)
{
$this->provisioningModel = $provisioningModel;
}
/**
* @return self::PROVISIONING_MODEL_*
*/
public function getProvisioningModel()
{
return $this->provisioningModel;
}
/**
* The max number of tasks can be assigned to this instance type.
*
* @param string $taskPack
*/
public function setTaskPack($taskPack)
{
$this->taskPack = $taskPack;
}
/**
* @return string
*/
public function getTaskPack()
{
return $this->taskPack;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(InstanceStatus::class, 'Google_Service_Batch_InstanceStatus');

View File

@@ -0,0 +1,273 @@
<?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\Batch;
class Job extends \Google\Collection
{
protected $collection_key = 'taskGroups';
protected $allocationPolicyType = AllocationPolicy::class;
protected $allocationPolicyDataType = '';
/**
* Output only. When the Job was created.
*
* @var string
*/
public $createTime;
/**
* Custom labels to apply to the job and any Cloud Logging [LogEntry](https://
* cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry) that it
* generates. Use labels to group and describe the resources they are applied
* to. Batch automatically applies predefined labels and supports multiple
* `labels` fields for each job, which each let you apply custom labels to
* various resources. Label names that start with "goog-" or "google-" are
* reserved for predefined labels. For more information about labels with
* Batch, see [Organize resources using
* labels](https://cloud.google.com/batch/docs/organize-resources-using-
* labels).
*
* @var string[]
*/
public $labels;
protected $logsPolicyType = LogsPolicy::class;
protected $logsPolicyDataType = '';
/**
* Output only. Job name. For example: "projects/123456/locations/us-
* central1/jobs/job01".
*
* @var string
*/
public $name;
protected $notificationsType = JobNotification::class;
protected $notificationsDataType = 'array';
/**
* Priority of the Job. The valid value range is [0, 100). Default value is 0.
* Higher value indicates higher priority. A job with higher priority value is
* more likely to run earlier if all other requirements are satisfied.
*
* @var string
*/
public $priority;
protected $statusType = JobStatus::class;
protected $statusDataType = '';
protected $taskGroupsType = TaskGroup::class;
protected $taskGroupsDataType = 'array';
/**
* Output only. A system generated unique ID for the Job.
*
* @var string
*/
public $uid;
/**
* Output only. The last time the Job was updated.
*
* @var string
*/
public $updateTime;
/**
* Compute resource allocation for all TaskGroups in the Job.
*
* @param AllocationPolicy $allocationPolicy
*/
public function setAllocationPolicy(AllocationPolicy $allocationPolicy)
{
$this->allocationPolicy = $allocationPolicy;
}
/**
* @return AllocationPolicy
*/
public function getAllocationPolicy()
{
return $this->allocationPolicy;
}
/**
* Output only. When the Job was created.
*
* @param string $createTime
*/
public function setCreateTime($createTime)
{
$this->createTime = $createTime;
}
/**
* @return string
*/
public function getCreateTime()
{
return $this->createTime;
}
/**
* Custom labels to apply to the job and any Cloud Logging [LogEntry](https://
* cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry) that it
* generates. Use labels to group and describe the resources they are applied
* to. Batch automatically applies predefined labels and supports multiple
* `labels` fields for each job, which each let you apply custom labels to
* various resources. Label names that start with "goog-" or "google-" are
* reserved for predefined labels. For more information about labels with
* Batch, see [Organize resources using
* labels](https://cloud.google.com/batch/docs/organize-resources-using-
* labels).
*
* @param string[] $labels
*/
public function setLabels($labels)
{
$this->labels = $labels;
}
/**
* @return string[]
*/
public function getLabels()
{
return $this->labels;
}
/**
* Log preservation policy for the Job.
*
* @param LogsPolicy $logsPolicy
*/
public function setLogsPolicy(LogsPolicy $logsPolicy)
{
$this->logsPolicy = $logsPolicy;
}
/**
* @return LogsPolicy
*/
public function getLogsPolicy()
{
return $this->logsPolicy;
}
/**
* Output only. Job name. For example: "projects/123456/locations/us-
* central1/jobs/job01".
*
* @param string $name
*/
public function setName($name)
{
$this->name = $name;
}
/**
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* Notification configurations.
*
* @param JobNotification[] $notifications
*/
public function setNotifications($notifications)
{
$this->notifications = $notifications;
}
/**
* @return JobNotification[]
*/
public function getNotifications()
{
return $this->notifications;
}
/**
* Priority of the Job. The valid value range is [0, 100). Default value is 0.
* Higher value indicates higher priority. A job with higher priority value is
* more likely to run earlier if all other requirements are satisfied.
*
* @param string $priority
*/
public function setPriority($priority)
{
$this->priority = $priority;
}
/**
* @return string
*/
public function getPriority()
{
return $this->priority;
}
/**
* Output only. Job status. It is read only for users.
*
* @param JobStatus $status
*/
public function setStatus(JobStatus $status)
{
$this->status = $status;
}
/**
* @return JobStatus
*/
public function getStatus()
{
return $this->status;
}
/**
* Required. TaskGroups in the Job. Only one TaskGroup is supported now.
*
* @param TaskGroup[] $taskGroups
*/
public function setTaskGroups($taskGroups)
{
$this->taskGroups = $taskGroups;
}
/**
* @return TaskGroup[]
*/
public function getTaskGroups()
{
return $this->taskGroups;
}
/**
* Output only. A system generated unique ID for the Job.
*
* @param string $uid
*/
public function setUid($uid)
{
$this->uid = $uid;
}
/**
* @return string
*/
public function getUid()
{
return $this->uid;
}
/**
* Output only. The last time the Job was updated.
*
* @param string $updateTime
*/
public function setUpdateTime($updateTime)
{
$this->updateTime = $updateTime;
}
/**
* @return string
*/
public function getUpdateTime()
{
return $this->updateTime;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Job::class, 'Google_Service_Batch_Job');

View File

@@ -0,0 +1,83 @@
<?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\Batch;
class JobNotification extends \Google\Model
{
protected $messageType = Message::class;
protected $messageDataType = '';
/**
* The Pub/Sub topic where notifications for the job, like state changes, will
* be published. If undefined, no Pub/Sub notifications are sent for this job.
* Specify the topic using the following format:
* `projects/{project}/topics/{topic}`. Notably, if you want to specify a
* Pub/Sub topic that is in a different project than the job, your
* administrator must grant your project's Batch service agent permission to
* publish to that topic. For more information about configuring Pub/Sub
* notifications for a job, see https://cloud.google.com/batch/docs/enable-
* notifications.
*
* @var string
*/
public $pubsubTopic;
/**
* The attribute requirements of messages to be sent to this Pub/Sub topic.
* Without this field, no message will be sent.
*
* @param Message $message
*/
public function setMessage(Message $message)
{
$this->message = $message;
}
/**
* @return Message
*/
public function getMessage()
{
return $this->message;
}
/**
* The Pub/Sub topic where notifications for the job, like state changes, will
* be published. If undefined, no Pub/Sub notifications are sent for this job.
* Specify the topic using the following format:
* `projects/{project}/topics/{topic}`. Notably, if you want to specify a
* Pub/Sub topic that is in a different project than the job, your
* administrator must grant your project's Batch service agent permission to
* publish to that topic. For more information about configuring Pub/Sub
* notifications for a job, see https://cloud.google.com/batch/docs/enable-
* notifications.
*
* @param string $pubsubTopic
*/
public function setPubsubTopic($pubsubTopic)
{
$this->pubsubTopic = $pubsubTopic;
}
/**
* @return string
*/
public function getPubsubTopic()
{
return $this->pubsubTopic;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(JobNotification::class, 'Google_Service_Batch_JobNotification');

View File

@@ -0,0 +1,153 @@
<?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\Batch;
class JobStatus extends \Google\Collection
{
/**
* Job state unspecified.
*/
public const STATE_STATE_UNSPECIFIED = 'STATE_UNSPECIFIED';
/**
* Job is admitted (validated and persisted) and waiting for resources.
*/
public const STATE_QUEUED = 'QUEUED';
/**
* Job is scheduled to run as soon as resource allocation is ready. The
* resource allocation may happen at a later time but with a high chance to
* succeed.
*/
public const STATE_SCHEDULED = 'SCHEDULED';
/**
* Resource allocation has been successful. At least one Task in the Job is
* RUNNING.
*/
public const STATE_RUNNING = 'RUNNING';
/**
* All Tasks in the Job have finished successfully.
*/
public const STATE_SUCCEEDED = 'SUCCEEDED';
/**
* At least one Task in the Job has failed.
*/
public const STATE_FAILED = 'FAILED';
/**
* The Job will be deleted, but has not been deleted yet. Typically this is
* because resources used by the Job are still being cleaned up.
*/
public const STATE_DELETION_IN_PROGRESS = 'DELETION_IN_PROGRESS';
/**
* The Job cancellation is in progress, this is because the resources used by
* the Job are still being cleaned up.
*/
public const STATE_CANCELLATION_IN_PROGRESS = 'CANCELLATION_IN_PROGRESS';
/**
* The Job has been cancelled, the task executions were stopped and the
* resources were cleaned up.
*/
public const STATE_CANCELLED = 'CANCELLED';
protected $collection_key = 'statusEvents';
/**
* The duration of time that the Job spent in status RUNNING.
*
* @var string
*/
public $runDuration;
/**
* Job state
*
* @var string
*/
public $state;
protected $statusEventsType = StatusEvent::class;
protected $statusEventsDataType = 'array';
protected $taskGroupsType = TaskGroupStatus::class;
protected $taskGroupsDataType = 'map';
/**
* The duration of time that the Job spent in status RUNNING.
*
* @param string $runDuration
*/
public function setRunDuration($runDuration)
{
$this->runDuration = $runDuration;
}
/**
* @return string
*/
public function getRunDuration()
{
return $this->runDuration;
}
/**
* Job state
*
* Accepted values: STATE_UNSPECIFIED, QUEUED, SCHEDULED, RUNNING, SUCCEEDED,
* FAILED, DELETION_IN_PROGRESS, CANCELLATION_IN_PROGRESS, CANCELLED
*
* @param self::STATE_* $state
*/
public function setState($state)
{
$this->state = $state;
}
/**
* @return self::STATE_*
*/
public function getState()
{
return $this->state;
}
/**
* Job status events
*
* @param StatusEvent[] $statusEvents
*/
public function setStatusEvents($statusEvents)
{
$this->statusEvents = $statusEvents;
}
/**
* @return StatusEvent[]
*/
public function getStatusEvents()
{
return $this->statusEvents;
}
/**
* Aggregated task status for each TaskGroup in the Job. The map key is
* TaskGroup ID.
*
* @param TaskGroupStatus[] $taskGroups
*/
public function setTaskGroups($taskGroups)
{
$this->taskGroups = $taskGroups;
}
/**
* @return TaskGroupStatus[]
*/
public function getTaskGroups()
{
return $this->taskGroups;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(JobStatus::class, 'Google_Service_Batch_JobStatus');

View File

@@ -0,0 +1,70 @@
<?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\Batch;
class KMSEnvMap extends \Google\Model
{
/**
* The value of the cipherText response from the `encrypt` method.
*
* @var string
*/
public $cipherText;
/**
* The name of the KMS key that will be used to decrypt the cipher text.
*
* @var string
*/
public $keyName;
/**
* The value of the cipherText response from the `encrypt` method.
*
* @param string $cipherText
*/
public function setCipherText($cipherText)
{
$this->cipherText = $cipherText;
}
/**
* @return string
*/
public function getCipherText()
{
return $this->cipherText;
}
/**
* The name of the KMS key that will be used to decrypt the cipher text.
*
* @param string $keyName
*/
public function setKeyName($keyName)
{
$this->keyName = $keyName;
}
/**
* @return string
*/
public function getKeyName()
{
return $this->keyName;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(KMSEnvMap::class, 'Google_Service_Batch_KMSEnvMap');

View File

@@ -0,0 +1,88 @@
<?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\Batch;
class LifecyclePolicy extends \Google\Model
{
/**
* Action unspecified.
*/
public const ACTION_ACTION_UNSPECIFIED = 'ACTION_UNSPECIFIED';
/**
* Action that tasks in the group will be scheduled to re-execute.
*/
public const ACTION_RETRY_TASK = 'RETRY_TASK';
/**
* Action that tasks in the group will be stopped immediately.
*/
public const ACTION_FAIL_TASK = 'FAIL_TASK';
/**
* Action to execute when ActionCondition is true. When RETRY_TASK is
* specified, we will retry failed tasks if we notice any exit code match and
* fail tasks if no match is found. Likewise, when FAIL_TASK is specified, we
* will fail tasks if we notice any exit code match and retry tasks if no
* match is found.
*
* @var string
*/
public $action;
protected $actionConditionType = ActionCondition::class;
protected $actionConditionDataType = '';
/**
* Action to execute when ActionCondition is true. When RETRY_TASK is
* specified, we will retry failed tasks if we notice any exit code match and
* fail tasks if no match is found. Likewise, when FAIL_TASK is specified, we
* will fail tasks if we notice any exit code match and retry tasks if no
* match is found.
*
* Accepted values: ACTION_UNSPECIFIED, RETRY_TASK, FAIL_TASK
*
* @param self::ACTION_* $action
*/
public function setAction($action)
{
$this->action = $action;
}
/**
* @return self::ACTION_*
*/
public function getAction()
{
return $this->action;
}
/**
* Conditions that decide why a task failure is dealt with a specific action.
*
* @param ActionCondition $actionCondition
*/
public function setActionCondition(ActionCondition $actionCondition)
{
$this->actionCondition = $actionCondition;
}
/**
* @return ActionCondition
*/
public function getActionCondition()
{
return $this->actionCondition;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(LifecyclePolicy::class, 'Google_Service_Batch_LifecyclePolicy');

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\Batch;
class ListJobsResponse extends \Google\Collection
{
protected $collection_key = 'unreachable';
protected $jobsType = Job::class;
protected $jobsDataType = 'array';
/**
* Next page token.
*
* @var string
*/
public $nextPageToken;
/**
* Locations that could not be reached.
*
* @var string[]
*/
public $unreachable;
/**
* Jobs.
*
* @param Job[] $jobs
*/
public function setJobs($jobs)
{
$this->jobs = $jobs;
}
/**
* @return Job[]
*/
public function getJobs()
{
return $this->jobs;
}
/**
* Next page token.
*
* @param string $nextPageToken
*/
public function setNextPageToken($nextPageToken)
{
$this->nextPageToken = $nextPageToken;
}
/**
* @return string
*/
public function getNextPageToken()
{
return $this->nextPageToken;
}
/**
* Locations that could not be reached.
*
* @param string[] $unreachable
*/
public function setUnreachable($unreachable)
{
$this->unreachable = $unreachable;
}
/**
* @return string[]
*/
public function getUnreachable()
{
return $this->unreachable;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ListJobsResponse::class, 'Google_Service_Batch_ListJobsResponse');

View File

@@ -0,0 +1,67 @@
<?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\Batch;
class ListLocationsResponse extends \Google\Collection
{
protected $collection_key = 'locations';
protected $locationsType = Location::class;
protected $locationsDataType = 'array';
/**
* The standard List next-page token.
*
* @var string
*/
public $nextPageToken;
/**
* A list of locations that matches the specified filter in the request.
*
* @param Location[] $locations
*/
public function setLocations($locations)
{
$this->locations = $locations;
}
/**
* @return Location[]
*/
public function getLocations()
{
return $this->locations;
}
/**
* The standard List next-page token.
*
* @param string $nextPageToken
*/
public function setNextPageToken($nextPageToken)
{
$this->nextPageToken = $nextPageToken;
}
/**
* @return string
*/
public function getNextPageToken()
{
return $this->nextPageToken;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ListLocationsResponse::class, 'Google_Service_Batch_ListLocationsResponse');

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\Batch;
class ListOperationsResponse extends \Google\Collection
{
protected $collection_key = 'unreachable';
/**
* The standard List next-page token.
*
* @var string
*/
public $nextPageToken;
protected $operationsType = Operation::class;
protected $operationsDataType = 'array';
/**
* Unordered list. Unreachable resources. Populated when the request sets
* `ListOperationsRequest.return_partial_success` and reads across
* collections. For example, when attempting to list all resources across all
* supported locations.
*
* @var string[]
*/
public $unreachable;
/**
* The standard List next-page token.
*
* @param string $nextPageToken
*/
public function setNextPageToken($nextPageToken)
{
$this->nextPageToken = $nextPageToken;
}
/**
* @return string
*/
public function getNextPageToken()
{
return $this->nextPageToken;
}
/**
* A list of operations that matches the specified filter in the request.
*
* @param Operation[] $operations
*/
public function setOperations($operations)
{
$this->operations = $operations;
}
/**
* @return Operation[]
*/
public function getOperations()
{
return $this->operations;
}
/**
* Unordered list. Unreachable resources. Populated when the request sets
* `ListOperationsRequest.return_partial_success` and reads across
* collections. For example, when attempting to list all resources across all
* supported locations.
*
* @param string[] $unreachable
*/
public function setUnreachable($unreachable)
{
$this->unreachable = $unreachable;
}
/**
* @return string[]
*/
public function getUnreachable()
{
return $this->unreachable;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ListOperationsResponse::class, 'Google_Service_Batch_ListOperationsResponse');

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\Batch;
class ListTasksResponse extends \Google\Collection
{
protected $collection_key = 'unreachable';
/**
* Next page token.
*
* @var string
*/
public $nextPageToken;
protected $tasksType = Task::class;
protected $tasksDataType = 'array';
/**
* Locations that could not be reached.
*
* @var string[]
*/
public $unreachable;
/**
* Next page token.
*
* @param string $nextPageToken
*/
public function setNextPageToken($nextPageToken)
{
$this->nextPageToken = $nextPageToken;
}
/**
* @return string
*/
public function getNextPageToken()
{
return $this->nextPageToken;
}
/**
* Tasks.
*
* @param Task[] $tasks
*/
public function setTasks($tasks)
{
$this->tasks = $tasks;
}
/**
* @return Task[]
*/
public function getTasks()
{
return $this->tasks;
}
/**
* Locations that could not be reached.
*
* @param string[] $unreachable
*/
public function setUnreachable($unreachable)
{
$this->unreachable = $unreachable;
}
/**
* @return string[]
*/
public function getUnreachable()
{
return $this->unreachable;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ListTasksResponse::class, 'Google_Service_Batch_ListTasksResponse');

View File

@@ -0,0 +1,144 @@
<?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\Batch;
class Location extends \Google\Model
{
/**
* The friendly name for this location, typically a nearby city name. For
* example, "Tokyo".
*
* @var string
*/
public $displayName;
/**
* Cross-service attributes for the location. For example
* {"cloud.googleapis.com/region": "us-east1"}
*
* @var string[]
*/
public $labels;
/**
* The canonical id for this location. For example: `"us-east1"`.
*
* @var string
*/
public $locationId;
/**
* Service-specific metadata. For example the available capacity at the given
* location.
*
* @var array[]
*/
public $metadata;
/**
* Resource name for the location, which may vary between implementations. For
* example: `"projects/example-project/locations/us-east1"`
*
* @var string
*/
public $name;
/**
* The friendly name for this location, typically a nearby city name. For
* example, "Tokyo".
*
* @param string $displayName
*/
public function setDisplayName($displayName)
{
$this->displayName = $displayName;
}
/**
* @return string
*/
public function getDisplayName()
{
return $this->displayName;
}
/**
* Cross-service attributes for the location. For example
* {"cloud.googleapis.com/region": "us-east1"}
*
* @param string[] $labels
*/
public function setLabels($labels)
{
$this->labels = $labels;
}
/**
* @return string[]
*/
public function getLabels()
{
return $this->labels;
}
/**
* The canonical id for this location. For example: `"us-east1"`.
*
* @param string $locationId
*/
public function setLocationId($locationId)
{
$this->locationId = $locationId;
}
/**
* @return string
*/
public function getLocationId()
{
return $this->locationId;
}
/**
* Service-specific metadata. For example the available capacity at the given
* location.
*
* @param array[] $metadata
*/
public function setMetadata($metadata)
{
$this->metadata = $metadata;
}
/**
* @return array[]
*/
public function getMetadata()
{
return $this->metadata;
}
/**
* Resource name for the location, which may vary between implementations. For
* example: `"projects/example-project/locations/us-east1"`
*
* @param string $name
*/
public function setName($name)
{
$this->name = $name;
}
/**
* @return string
*/
public function getName()
{
return $this->name;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Location::class, 'Google_Service_Batch_Location');

View File

@@ -0,0 +1,65 @@
<?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\Batch;
class LocationPolicy extends \Google\Collection
{
protected $collection_key = 'allowedLocations';
/**
* A list of allowed location names represented by internal URLs. Each
* location can be a region or a zone. Only one region or multiple zones in
* one region is supported now. For example, ["regions/us-central1"] allow VMs
* in any zones in region us-central1. ["zones/us-central1-a", "zones/us-
* central1-c"] only allow VMs in zones us-central1-a and us-central1-c.
* Mixing locations from different regions would cause errors. For example,
* ["regions/us-central1", "zones/us-central1-a", "zones/us-central1-b",
* "zones/us-west1-a"] contains locations from two distinct regions: us-
* central1 and us-west1. This combination will trigger an error.
*
* @var string[]
*/
public $allowedLocations;
/**
* A list of allowed location names represented by internal URLs. Each
* location can be a region or a zone. Only one region or multiple zones in
* one region is supported now. For example, ["regions/us-central1"] allow VMs
* in any zones in region us-central1. ["zones/us-central1-a", "zones/us-
* central1-c"] only allow VMs in zones us-central1-a and us-central1-c.
* Mixing locations from different regions would cause errors. For example,
* ["regions/us-central1", "zones/us-central1-a", "zones/us-central1-b",
* "zones/us-west1-a"] contains locations from two distinct regions: us-
* central1 and us-west1. This combination will trigger an error.
*
* @param string[] $allowedLocations
*/
public function setAllowedLocations($allowedLocations)
{
$this->allowedLocations = $allowedLocations;
}
/**
* @return string[]
*/
public function getAllowedLocations()
{
return $this->allowedLocations;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(LocationPolicy::class, 'Google_Service_Batch_LocationPolicy');

View File

@@ -0,0 +1,118 @@
<?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\Batch;
class LogsPolicy extends \Google\Model
{
/**
* (Default) Logs are not preserved.
*/
public const DESTINATION_DESTINATION_UNSPECIFIED = 'DESTINATION_UNSPECIFIED';
/**
* Logs are streamed to Cloud Logging. Optionally, you can configure
* additional settings in the `cloudLoggingOption` field.
*/
public const DESTINATION_CLOUD_LOGGING = 'CLOUD_LOGGING';
/**
* Logs are saved to the file path specified in the `logsPath` field.
*/
public const DESTINATION_PATH = 'PATH';
protected $cloudLoggingOptionType = CloudLoggingOption::class;
protected $cloudLoggingOptionDataType = '';
/**
* If and where logs should be saved.
*
* @var string
*/
public $destination;
/**
* When `destination` is set to `PATH`, you must set this field to the path
* where you want logs to be saved. This path can point to a local directory
* on the VM or (if congifured) a directory under the mount path of any Cloud
* Storage bucket, network file system (NFS), or writable persistent disk that
* is mounted to the job. For example, if the job has a bucket with
* `mountPath` set to `/mnt/disks/my-bucket`, you can write logs to the root
* directory of the `remotePath` of that bucket by setting this field to
* `/mnt/disks/my-bucket/`.
*
* @var string
*/
public $logsPath;
/**
* Optional. When `destination` is set to `CLOUD_LOGGING`, you can optionally
* set this field to configure additional settings for Cloud Logging.
*
* @param CloudLoggingOption $cloudLoggingOption
*/
public function setCloudLoggingOption(CloudLoggingOption $cloudLoggingOption)
{
$this->cloudLoggingOption = $cloudLoggingOption;
}
/**
* @return CloudLoggingOption
*/
public function getCloudLoggingOption()
{
return $this->cloudLoggingOption;
}
/**
* If and where logs should be saved.
*
* Accepted values: DESTINATION_UNSPECIFIED, CLOUD_LOGGING, PATH
*
* @param self::DESTINATION_* $destination
*/
public function setDestination($destination)
{
$this->destination = $destination;
}
/**
* @return self::DESTINATION_*
*/
public function getDestination()
{
return $this->destination;
}
/**
* When `destination` is set to `PATH`, you must set this field to the path
* where you want logs to be saved. This path can point to a local directory
* on the VM or (if congifured) a directory under the mount path of any Cloud
* Storage bucket, network file system (NFS), or writable persistent disk that
* is mounted to the job. For example, if the job has a bucket with
* `mountPath` set to `/mnt/disks/my-bucket`, you can write logs to the root
* directory of the `remotePath` of that bucket by setting this field to
* `/mnt/disks/my-bucket/`.
*
* @param string $logsPath
*/
public function setLogsPath($logsPath)
{
$this->logsPath = $logsPath;
}
/**
* @return string
*/
public function getLogsPath()
{
return $this->logsPath;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(LogsPolicy::class, 'Google_Service_Batch_LogsPolicy');

View File

@@ -0,0 +1,182 @@
<?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\Batch;
class Message extends \Google\Model
{
/**
* Job state unspecified.
*/
public const NEW_JOB_STATE_STATE_UNSPECIFIED = 'STATE_UNSPECIFIED';
/**
* Job is admitted (validated and persisted) and waiting for resources.
*/
public const NEW_JOB_STATE_QUEUED = 'QUEUED';
/**
* Job is scheduled to run as soon as resource allocation is ready. The
* resource allocation may happen at a later time but with a high chance to
* succeed.
*/
public const NEW_JOB_STATE_SCHEDULED = 'SCHEDULED';
/**
* Resource allocation has been successful. At least one Task in the Job is
* RUNNING.
*/
public const NEW_JOB_STATE_RUNNING = 'RUNNING';
/**
* All Tasks in the Job have finished successfully.
*/
public const NEW_JOB_STATE_SUCCEEDED = 'SUCCEEDED';
/**
* At least one Task in the Job has failed.
*/
public const NEW_JOB_STATE_FAILED = 'FAILED';
/**
* The Job will be deleted, but has not been deleted yet. Typically this is
* because resources used by the Job are still being cleaned up.
*/
public const NEW_JOB_STATE_DELETION_IN_PROGRESS = 'DELETION_IN_PROGRESS';
/**
* The Job cancellation is in progress, this is because the resources used by
* the Job are still being cleaned up.
*/
public const NEW_JOB_STATE_CANCELLATION_IN_PROGRESS = 'CANCELLATION_IN_PROGRESS';
/**
* The Job has been cancelled, the task executions were stopped and the
* resources were cleaned up.
*/
public const NEW_JOB_STATE_CANCELLED = 'CANCELLED';
/**
* Unknown state.
*/
public const NEW_TASK_STATE_STATE_UNSPECIFIED = 'STATE_UNSPECIFIED';
/**
* The Task is created and waiting for resources.
*/
public const NEW_TASK_STATE_PENDING = 'PENDING';
/**
* The Task is assigned to at least one VM.
*/
public const NEW_TASK_STATE_ASSIGNED = 'ASSIGNED';
/**
* The Task is running.
*/
public const NEW_TASK_STATE_RUNNING = 'RUNNING';
/**
* The Task has failed.
*/
public const NEW_TASK_STATE_FAILED = 'FAILED';
/**
* The Task has succeeded.
*/
public const NEW_TASK_STATE_SUCCEEDED = 'SUCCEEDED';
/**
* The Task has not been executed when the Job finishes.
*/
public const NEW_TASK_STATE_UNEXECUTED = 'UNEXECUTED';
/**
* Unspecified.
*/
public const TYPE_TYPE_UNSPECIFIED = 'TYPE_UNSPECIFIED';
/**
* Notify users that the job state has changed.
*/
public const TYPE_JOB_STATE_CHANGED = 'JOB_STATE_CHANGED';
/**
* Notify users that the task state has changed.
*/
public const TYPE_TASK_STATE_CHANGED = 'TASK_STATE_CHANGED';
/**
* The new job state.
*
* @var string
*/
public $newJobState;
/**
* The new task state.
*
* @var string
*/
public $newTaskState;
/**
* The message type.
*
* @var string
*/
public $type;
/**
* The new job state.
*
* Accepted values: STATE_UNSPECIFIED, QUEUED, SCHEDULED, RUNNING, SUCCEEDED,
* FAILED, DELETION_IN_PROGRESS, CANCELLATION_IN_PROGRESS, CANCELLED
*
* @param self::NEW_JOB_STATE_* $newJobState
*/
public function setNewJobState($newJobState)
{
$this->newJobState = $newJobState;
}
/**
* @return self::NEW_JOB_STATE_*
*/
public function getNewJobState()
{
return $this->newJobState;
}
/**
* The new task state.
*
* Accepted values: STATE_UNSPECIFIED, PENDING, ASSIGNED, RUNNING, FAILED,
* SUCCEEDED, UNEXECUTED
*
* @param self::NEW_TASK_STATE_* $newTaskState
*/
public function setNewTaskState($newTaskState)
{
$this->newTaskState = $newTaskState;
}
/**
* @return self::NEW_TASK_STATE_*
*/
public function getNewTaskState()
{
return $this->newTaskState;
}
/**
* The message type.
*
* Accepted values: TYPE_UNSPECIFIED, JOB_STATE_CHANGED, TASK_STATE_CHANGED
*
* @param self::TYPE_* $type
*/
public function setType($type)
{
$this->type = $type;
}
/**
* @return self::TYPE_*
*/
public function getType()
{
return $this->type;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Message::class, 'Google_Service_Batch_Message');

View File

@@ -0,0 +1,70 @@
<?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\Batch;
class NFS extends \Google\Model
{
/**
* Remote source path exported from the NFS, e.g., "/share".
*
* @var string
*/
public $remotePath;
/**
* The IP address of the NFS.
*
* @var string
*/
public $server;
/**
* Remote source path exported from the NFS, e.g., "/share".
*
* @param string $remotePath
*/
public function setRemotePath($remotePath)
{
$this->remotePath = $remotePath;
}
/**
* @return string
*/
public function getRemotePath()
{
return $this->remotePath;
}
/**
* The IP address of the NFS.
*
* @param string $server
*/
public function setServer($server)
{
$this->server = $server;
}
/**
* @return string
*/
public function getServer()
{
return $this->server;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(NFS::class, 'Google_Service_Batch_NFS');

View File

@@ -0,0 +1,120 @@
<?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\Batch;
class NetworkInterface extends \Google\Model
{
/**
* The URL of an existing network resource. You can specify the network as a
* full or partial URL. For example, the following are all valid URLs: * https
* ://www.googleapis.com/compute/v1/projects/{project}/global/networks/{networ
* k} * projects/{project}/global/networks/{network} *
* global/networks/{network}
*
* @var string
*/
public $network;
/**
* Default is false (with an external IP address). Required if no external
* public IP address is attached to the VM. If no external public IP address,
* additional configuration is required to allow the VM to access Google
* Services. See https://cloud.google.com/vpc/docs/configure-private-google-
* access and https://cloud.google.com/nat/docs/gce-example#create-nat for
* more information.
*
* @var bool
*/
public $noExternalIpAddress;
/**
* The URL of an existing subnetwork resource in the network. You can specify
* the subnetwork as a full or partial URL. For example, the following are all
* valid URLs: * https://www.googleapis.com/compute/v1/projects/{project}/regi
* ons/{region}/subnetworks/{subnetwork} *
* projects/{project}/regions/{region}/subnetworks/{subnetwork} *
* regions/{region}/subnetworks/{subnetwork}
*
* @var string
*/
public $subnetwork;
/**
* The URL of an existing network resource. You can specify the network as a
* full or partial URL. For example, the following are all valid URLs: * https
* ://www.googleapis.com/compute/v1/projects/{project}/global/networks/{networ
* k} * projects/{project}/global/networks/{network} *
* global/networks/{network}
*
* @param string $network
*/
public function setNetwork($network)
{
$this->network = $network;
}
/**
* @return string
*/
public function getNetwork()
{
return $this->network;
}
/**
* Default is false (with an external IP address). Required if no external
* public IP address is attached to the VM. If no external public IP address,
* additional configuration is required to allow the VM to access Google
* Services. See https://cloud.google.com/vpc/docs/configure-private-google-
* access and https://cloud.google.com/nat/docs/gce-example#create-nat for
* more information.
*
* @param bool $noExternalIpAddress
*/
public function setNoExternalIpAddress($noExternalIpAddress)
{
$this->noExternalIpAddress = $noExternalIpAddress;
}
/**
* @return bool
*/
public function getNoExternalIpAddress()
{
return $this->noExternalIpAddress;
}
/**
* The URL of an existing subnetwork resource in the network. You can specify
* the subnetwork as a full or partial URL. For example, the following are all
* valid URLs: * https://www.googleapis.com/compute/v1/projects/{project}/regi
* ons/{region}/subnetworks/{subnetwork} *
* projects/{project}/regions/{region}/subnetworks/{subnetwork} *
* regions/{region}/subnetworks/{subnetwork}
*
* @param string $subnetwork
*/
public function setSubnetwork($subnetwork)
{
$this->subnetwork = $subnetwork;
}
/**
* @return string
*/
public function getSubnetwork()
{
return $this->subnetwork;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(NetworkInterface::class, 'Google_Service_Batch_NetworkInterface');

View File

@@ -0,0 +1,45 @@
<?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\Batch;
class NetworkPolicy extends \Google\Collection
{
protected $collection_key = 'networkInterfaces';
protected $networkInterfacesType = NetworkInterface::class;
protected $networkInterfacesDataType = 'array';
/**
* Network configurations.
*
* @param NetworkInterface[] $networkInterfaces
*/
public function setNetworkInterfaces($networkInterfaces)
{
$this->networkInterfaces = $networkInterfaces;
}
/**
* @return NetworkInterface[]
*/
public function getNetworkInterfaces()
{
return $this->networkInterfaces;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(NetworkPolicy::class, 'Google_Service_Batch_NetworkPolicy');

View File

@@ -0,0 +1,158 @@
<?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\Batch;
class Operation extends \Google\Model
{
/**
* If the value is `false`, it means the operation is still in progress. If
* `true`, the operation is completed, and either `error` or `response` is
* available.
*
* @var bool
*/
public $done;
protected $errorType = Status::class;
protected $errorDataType = '';
/**
* Service-specific metadata associated with the operation. It typically
* contains progress information and common metadata such as create time. Some
* services might not provide such metadata. Any method that returns a long-
* running operation should document the metadata type, if any.
*
* @var array[]
*/
public $metadata;
/**
* The server-assigned name, which is only unique within the same service that
* originally returns it. If you use the default HTTP mapping, the `name`
* should be a resource name ending with `operations/{unique_id}`.
*
* @var string
*/
public $name;
/**
* The normal, successful response of the operation. If the original method
* returns no data on success, such as `Delete`, the response is
* `google.protobuf.Empty`. If the original method is standard
* `Get`/`Create`/`Update`, the response should be the resource. For other
* methods, the response should have the type `XxxResponse`, where `Xxx` is
* the original method name. For example, if the original method name is
* `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
*
* @var array[]
*/
public $response;
/**
* If the value is `false`, it means the operation is still in progress. If
* `true`, the operation is completed, and either `error` or `response` is
* available.
*
* @param bool $done
*/
public function setDone($done)
{
$this->done = $done;
}
/**
* @return bool
*/
public function getDone()
{
return $this->done;
}
/**
* The error result of the operation in case of failure or cancellation.
*
* @param Status $error
*/
public function setError(Status $error)
{
$this->error = $error;
}
/**
* @return Status
*/
public function getError()
{
return $this->error;
}
/**
* Service-specific metadata associated with the operation. It typically
* contains progress information and common metadata such as create time. Some
* services might not provide such metadata. Any method that returns a long-
* running operation should document the metadata type, if any.
*
* @param array[] $metadata
*/
public function setMetadata($metadata)
{
$this->metadata = $metadata;
}
/**
* @return array[]
*/
public function getMetadata()
{
return $this->metadata;
}
/**
* The server-assigned name, which is only unique within the same service that
* originally returns it. If you use the default HTTP mapping, the `name`
* should be a resource name ending with `operations/{unique_id}`.
*
* @param string $name
*/
public function setName($name)
{
$this->name = $name;
}
/**
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* The normal, successful response of the operation. If the original method
* returns no data on success, such as `Delete`, the response is
* `google.protobuf.Empty`. If the original method is standard
* `Get`/`Create`/`Update`, the response should be the resource. For other
* methods, the response should have the type `XxxResponse`, where `Xxx` is
* the original method name. For example, if the original method name is
* `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
*
* @param array[] $response
*/
public function setResponse($response)
{
$this->response = $response;
}
/**
* @return array[]
*/
public function getResponse()
{
return $this->response;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Operation::class, 'Google_Service_Batch_Operation');

View File

@@ -0,0 +1,186 @@
<?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\Batch;
class OperationMetadata extends \Google\Model
{
/**
* Output only. API version used to start the operation.
*
* @var string
*/
public $apiVersion;
/**
* Output only. The time the operation was created.
*
* @var string
*/
public $createTime;
/**
* Output only. The time the operation finished running.
*
* @var string
*/
public $endTime;
/**
* Output only. Identifies whether the user has requested cancellation of the
* operation. Operations that have successfully been cancelled have
* google.longrunning.Operation.error value with a google.rpc.Status.code of
* 1, corresponding to `Code.CANCELLED`.
*
* @var bool
*/
public $requestedCancellation;
/**
* Output only. Human-readable status of the operation, if any.
*
* @var string
*/
public $statusMessage;
/**
* Output only. Server-defined resource path for the target of the operation.
*
* @var string
*/
public $target;
/**
* Output only. Name of the verb executed by the operation.
*
* @var string
*/
public $verb;
/**
* Output only. API version used to start the operation.
*
* @param string $apiVersion
*/
public function setApiVersion($apiVersion)
{
$this->apiVersion = $apiVersion;
}
/**
* @return string
*/
public function getApiVersion()
{
return $this->apiVersion;
}
/**
* Output only. The time the operation was created.
*
* @param string $createTime
*/
public function setCreateTime($createTime)
{
$this->createTime = $createTime;
}
/**
* @return string
*/
public function getCreateTime()
{
return $this->createTime;
}
/**
* Output only. The time the operation finished running.
*
* @param string $endTime
*/
public function setEndTime($endTime)
{
$this->endTime = $endTime;
}
/**
* @return string
*/
public function getEndTime()
{
return $this->endTime;
}
/**
* Output only. Identifies whether the user has requested cancellation of the
* operation. Operations that have successfully been cancelled have
* google.longrunning.Operation.error value with a google.rpc.Status.code of
* 1, corresponding to `Code.CANCELLED`.
*
* @param bool $requestedCancellation
*/
public function setRequestedCancellation($requestedCancellation)
{
$this->requestedCancellation = $requestedCancellation;
}
/**
* @return bool
*/
public function getRequestedCancellation()
{
return $this->requestedCancellation;
}
/**
* Output only. Human-readable status of the operation, if any.
*
* @param string $statusMessage
*/
public function setStatusMessage($statusMessage)
{
$this->statusMessage = $statusMessage;
}
/**
* @return string
*/
public function getStatusMessage()
{
return $this->statusMessage;
}
/**
* Output only. Server-defined resource path for the target of the operation.
*
* @param string $target
*/
public function setTarget($target)
{
$this->target = $target;
}
/**
* @return string
*/
public function getTarget()
{
return $this->target;
}
/**
* Output only. Name of the verb executed by the operation.
*
* @param string $verb
*/
public function setVerb($verb)
{
$this->verb = $verb;
}
/**
* @return string
*/
public function getVerb()
{
return $this->verb;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(OperationMetadata::class, 'Google_Service_Batch_OperationMetadata');

View File

@@ -0,0 +1,84 @@
<?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\Batch;
class PlacementPolicy extends \Google\Model
{
/**
* UNSPECIFIED vs. COLLOCATED (default UNSPECIFIED). Use COLLOCATED when you
* want VMs to be located close to each other for low network latency between
* the VMs. No placement policy will be generated when collocation is
* UNSPECIFIED.
*
* @var string
*/
public $collocation;
/**
* When specified, causes the job to fail if more than max_distance logical
* switches are required between VMs. Batch uses the most compact possible
* placement of VMs even when max_distance is not specified. An explicit
* max_distance makes that level of compactness a strict requirement. Not yet
* implemented
*
* @var string
*/
public $maxDistance;
/**
* UNSPECIFIED vs. COLLOCATED (default UNSPECIFIED). Use COLLOCATED when you
* want VMs to be located close to each other for low network latency between
* the VMs. No placement policy will be generated when collocation is
* UNSPECIFIED.
*
* @param string $collocation
*/
public function setCollocation($collocation)
{
$this->collocation = $collocation;
}
/**
* @return string
*/
public function getCollocation()
{
return $this->collocation;
}
/**
* When specified, causes the job to fail if more than max_distance logical
* switches are required between VMs. Batch uses the most compact possible
* placement of VMs even when max_distance is not specified. An explicit
* max_distance makes that level of compactness a strict requirement. Not yet
* implemented
*
* @param string $maxDistance
*/
public function setMaxDistance($maxDistance)
{
$this->maxDistance = $maxDistance;
}
/**
* @return string
*/
public function getMaxDistance()
{
return $this->maxDistance;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(PlacementPolicy::class, 'Google_Service_Batch_PlacementPolicy');

View File

@@ -0,0 +1,97 @@
<?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\Batch;
class Policy extends \Google\Collection
{
protected $collection_key = 'bindings';
protected $auditConfigsType = AuditConfig::class;
protected $auditConfigsDataType = 'array';
public $auditConfigs;
protected $bindingsType = Binding::class;
protected $bindingsDataType = 'array';
public $bindings;
/**
* @var string
*/
public $etag;
/**
* @var int
*/
public $version;
/**
* @param AuditConfig[]
*/
public function setAuditConfigs($auditConfigs)
{
$this->auditConfigs = $auditConfigs;
}
/**
* @return AuditConfig[]
*/
public function getAuditConfigs()
{
return $this->auditConfigs;
}
/**
* @param Binding[]
*/
public function setBindings($bindings)
{
$this->bindings = $bindings;
}
/**
* @return Binding[]
*/
public function getBindings()
{
return $this->bindings;
}
/**
* @param string
*/
public function setEtag($etag)
{
$this->etag = $etag;
}
/**
* @return string
*/
public function getEtag()
{
return $this->etag;
}
/**
* @param int
*/
public function setVersion($version)
{
$this->version = $version;
}
/**
* @return int
*/
public function getVersion()
{
return $this->version;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Policy::class, 'Google_Service_Batch_Policy');

View File

@@ -0,0 +1,80 @@
<?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\Batch;
class ReportAgentStateRequest extends \Google\Model
{
protected $agentInfoType = AgentInfo::class;
protected $agentInfoDataType = '';
protected $agentTimingInfoType = AgentTimingInfo::class;
protected $agentTimingInfoDataType = '';
protected $metadataType = AgentMetadata::class;
protected $metadataDataType = '';
/**
* Agent info.
*
* @param AgentInfo $agentInfo
*/
public function setAgentInfo(AgentInfo $agentInfo)
{
$this->agentInfo = $agentInfo;
}
/**
* @return AgentInfo
*/
public function getAgentInfo()
{
return $this->agentInfo;
}
/**
* Agent timing info.
*
* @param AgentTimingInfo $agentTimingInfo
*/
public function setAgentTimingInfo(AgentTimingInfo $agentTimingInfo)
{
$this->agentTimingInfo = $agentTimingInfo;
}
/**
* @return AgentTimingInfo
*/
public function getAgentTimingInfo()
{
return $this->agentTimingInfo;
}
/**
* Agent metadata.
*
* @param AgentMetadata $metadata
*/
public function setMetadata(AgentMetadata $metadata)
{
$this->metadata = $metadata;
}
/**
* @return AgentMetadata
*/
public function getMetadata()
{
return $this->metadata;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ReportAgentStateRequest::class, 'Google_Service_Batch_ReportAgentStateRequest');

View File

@@ -0,0 +1,115 @@
<?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\Batch;
class ReportAgentStateResponse extends \Google\Collection
{
protected $collection_key = 'tasks';
/**
* Default report interval override
*
* @var string
*/
public $defaultReportInterval;
/**
* Minimum report interval override
*
* @var string
*/
public $minReportInterval;
protected $tasksType = AgentTask::class;
protected $tasksDataType = 'array';
/**
* If true, the cloud logging for batch agent will use
* batch.googleapis.com/Job as monitored resource for Batch job related
* logging.
*
* @var bool
*/
public $useBatchMonitoredResource;
/**
* Default report interval override
*
* @param string $defaultReportInterval
*/
public function setDefaultReportInterval($defaultReportInterval)
{
$this->defaultReportInterval = $defaultReportInterval;
}
/**
* @return string
*/
public function getDefaultReportInterval()
{
return $this->defaultReportInterval;
}
/**
* Minimum report interval override
*
* @param string $minReportInterval
*/
public function setMinReportInterval($minReportInterval)
{
$this->minReportInterval = $minReportInterval;
}
/**
* @return string
*/
public function getMinReportInterval()
{
return $this->minReportInterval;
}
/**
* Tasks assigned to the agent
*
* @param AgentTask[] $tasks
*/
public function setTasks($tasks)
{
$this->tasks = $tasks;
}
/**
* @return AgentTask[]
*/
public function getTasks()
{
return $this->tasks;
}
/**
* If true, the cloud logging for batch agent will use
* batch.googleapis.com/Job as monitored resource for Batch job related
* logging.
*
* @param bool $useBatchMonitoredResource
*/
public function setUseBatchMonitoredResource($useBatchMonitoredResource)
{
$this->useBatchMonitoredResource = $useBatchMonitoredResource;
}
/**
* @return bool
*/
public function getUseBatchMonitoredResource()
{
return $this->useBatchMonitoredResource;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ReportAgentStateResponse::class, 'Google_Service_Batch_ReportAgentStateResponse');

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\Batch\Resource;
/**
* The "projects" collection of methods.
* Typical usage is:
* <code>
* $batchService = new Google\Service\Batch(...);
* $projects = $batchService->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_Batch_Resource_Projects');

View File

@@ -0,0 +1,77 @@
<?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\Batch\Resource;
use Google\Service\Batch\ListLocationsResponse;
use Google\Service\Batch\Location;
/**
* The "locations" collection of methods.
* Typical usage is:
* <code>
* $batchService = new Google\Service\Batch(...);
* $locations = $batchService->projects_locations;
* </code>
*/
class ProjectsLocations extends \Google\Service\Resource
{
/**
* 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 extraLocationTypes Optional. Do not use this field. It is
* unsupported and is ignored unless explicitly documented otherwise. This is
* primarily for internal usage.
* @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_Batch_Resource_ProjectsLocations');

View File

@@ -0,0 +1,149 @@
<?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\Batch\Resource;
use Google\Service\Batch\CancelJobRequest;
use Google\Service\Batch\Job;
use Google\Service\Batch\ListJobsResponse;
use Google\Service\Batch\Operation;
/**
* The "jobs" collection of methods.
* Typical usage is:
* <code>
* $batchService = new Google\Service\Batch(...);
* $jobs = $batchService->projects_locations_jobs;
* </code>
*/
class ProjectsLocationsJobs extends \Google\Service\Resource
{
/**
* Cancel a Job. (jobs.cancel)
*
* @param string $name Required. Job name.
* @param CancelJobRequest $postBody
* @param array $optParams Optional parameters.
* @return Operation
* @throws \Google\Service\Exception
*/
public function cancel($name, CancelJobRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('cancel', [$params], Operation::class);
}
/**
* Create a Job. (jobs.create)
*
* @param string $parent Required. The parent resource name where the Job will
* be created. Pattern: "projects/{project}/locations/{location}"
* @param Job $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string jobId ID used to uniquely identify the Job within its
* parent scope. This field should contain at most 63 characters and must start
* with lowercase characters. Only lowercase characters, numbers and '-' are
* accepted. The '-' character cannot be the first or the last one. A system
* generated ID will be used if the field is not set. The job.name field in the
* request will be ignored and the created resource name of the Job will be
* "{parent}/jobs/{job_id}".
* @opt_param string requestId Optional. An optional request ID to identify
* requests. Specify a unique request ID so that if you must retry your request,
* the server will know to ignore the request if it has already been completed.
* The server will guarantee that for at least 60 minutes since the first
* request. For example, consider a situation where you make an initial request
* and the request times out. If you make the request again with the same
* request ID, the server can check if original operation with the same request
* ID was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments. The request ID must
* be a valid UUID with the exception that zero UUID is not supported
* (00000000-0000-0000-0000-000000000000).
* @return Job
* @throws \Google\Service\Exception
*/
public function create($parent, Job $postBody, $optParams = [])
{
$params = ['parent' => $parent, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], Job::class);
}
/**
* Delete a Job. (jobs.delete)
*
* @param string $name Job name.
* @param array $optParams Optional parameters.
*
* @opt_param string reason Optional. Reason for this deletion.
* @opt_param string requestId Optional. An optional request ID to identify
* requests. Specify a unique request ID so that if you must retry your request,
* the server will know to ignore the request if it has already been completed.
* The server will guarantee that for at least 60 minutes after the first
* request. For example, consider a situation where you make an initial request
* and the request times out. If you make the request again with the same
* request ID, the server can check if original operation with the same request
* ID was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments. The request ID must
* be a valid UUID with the exception that zero UUID is not supported
* (00000000-0000-0000-0000-000000000000).
* @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);
}
/**
* Get a Job specified by its resource name. (jobs.get)
*
* @param string $name Required. Job name.
* @param array $optParams Optional parameters.
* @return Job
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], Job::class);
}
/**
* List all Jobs for a project within a region. (jobs.listProjectsLocationsJobs)
*
* @param string $parent Parent path.
* @param array $optParams Optional parameters.
*
* @opt_param string filter List filter.
* @opt_param string orderBy Optional. Sort results. Supported are "name", "name
* desc", "create_time", and "create_time desc".
* @opt_param int pageSize Page size.
* @opt_param string pageToken Page token.
* @return ListJobsResponse
* @throws \Google\Service\Exception
*/
public function listProjectsLocationsJobs($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], ListJobsResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsLocationsJobs::class, 'Google_Service_Batch_Resource_ProjectsLocationsJobs');

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\Batch\Resource;
/**
* The "taskGroups" collection of methods.
* Typical usage is:
* <code>
* $batchService = new Google\Service\Batch(...);
* $taskGroups = $batchService->projects_locations_jobs_taskGroups;
* </code>
*/
class ProjectsLocationsJobsTaskGroups extends \Google\Service\Resource
{
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsLocationsJobsTaskGroups::class, 'Google_Service_Batch_Resource_ProjectsLocationsJobsTaskGroups');

View File

@@ -0,0 +1,72 @@
<?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\Batch\Resource;
use Google\Service\Batch\ListTasksResponse;
use Google\Service\Batch\Task;
/**
* The "tasks" collection of methods.
* Typical usage is:
* <code>
* $batchService = new Google\Service\Batch(...);
* $tasks = $batchService->projects_locations_jobs_taskGroups_tasks;
* </code>
*/
class ProjectsLocationsJobsTaskGroupsTasks extends \Google\Service\Resource
{
/**
* Return a single Task. (tasks.get)
*
* @param string $name Required. Task name.
* @param array $optParams Optional parameters.
* @return Task
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], Task::class);
}
/**
* List Tasks associated with a job.
* (tasks.listProjectsLocationsJobsTaskGroupsTasks)
*
* @param string $parent Required. Name of a TaskGroup from which Tasks are
* being requested. Pattern:
* "projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}"
* @param array $optParams Optional parameters.
*
* @opt_param string filter Task filter, null filter matches all Tasks. Filter
* string should be of the format State=TaskStatus.State e.g. State=RUNNING
* @opt_param int pageSize Page size.
* @opt_param string pageToken Page token.
* @return ListTasksResponse
* @throws \Google\Service\Exception
*/
public function listProjectsLocationsJobsTaskGroupsTasks($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], ListTasksResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsLocationsJobsTaskGroupsTasks::class, 'Google_Service_Batch_Resource_ProjectsLocationsJobsTaskGroupsTasks');

View File

@@ -0,0 +1,108 @@
<?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\Batch\Resource;
use Google\Service\Batch\Policy;
use Google\Service\Batch\SetIamPolicyRequest;
use Google\Service\Batch\TestIamPermissionsRequest;
use Google\Service\Batch\TestIamPermissionsResponse;
/**
* The "nodes" collection of methods.
* Typical usage is:
* <code>
* $batchService = new Google\Service\Batch(...);
* $nodes = $batchService->nodes;
* </code>
*/
class ProjectsLocationsNodes extends \Google\Service\Resource
{
/**
* Gets the access control policy for a resource. Returns an empty policy if the
* resource exists and does not have a policy set. (nodes.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 Policy
*/
public function getIamPolicy($resource, $optParams = [])
{
$params = ['resource' => $resource];
$params = array_merge($params, $optParams);
return $this->call('getIamPolicy', [$params], Policy::class);
}
/**
* Sets the access control policy on the specified resource. Replaces any
* existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and
* `PERMISSION_DENIED` errors. (nodes.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 SetIamPolicyRequest $postBody
* @param array $optParams Optional parameters.
* @return Policy
*/
public function setIamPolicy($resource, SetIamPolicyRequest $postBody, $optParams = [])
{
$params = ['resource' => $resource, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('setIamPolicy', [$params], Policy::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. (nodes.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 TestIamPermissionsRequest $postBody
* @param array $optParams Optional parameters.
* @return TestIamPermissionsResponse
*/
public function testIamPermissions($resource, TestIamPermissionsRequest $postBody, $optParams = [])
{
$params = ['resource' => $resource, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('testIamPermissions', [$params], TestIamPermissionsResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsLocationsNodes::class, 'Google_Service_Batch_Resource_ProjectsLocationsNodes');

View File

@@ -0,0 +1,121 @@
<?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\Batch\Resource;
use Google\Service\Batch\BatchEmpty;
use Google\Service\Batch\CancelOperationRequest;
use Google\Service\Batch\ListOperationsResponse;
use Google\Service\Batch\Operation;
/**
* The "operations" collection of methods.
* Typical usage is:
* <code>
* $batchService = new Google\Service\Batch(...);
* $operations = $batchService->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 CancelOperationRequest $postBody
* @param array $optParams Optional parameters.
* @return BatchEmpty
* @throws \Google\Service\Exception
*/
public function cancel($name, CancelOperationRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('cancel', [$params], BatchEmpty::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 BatchEmpty
* @throws \Google\Service\Exception
*/
public function delete($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('delete', [$params], BatchEmpty::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.
* @opt_param bool returnPartialSuccess When set to `true`, operations that are
* reachable are returned as normal, and those that are unreachable are returned
* in the ListOperationsResponse.unreachable field. This can only be `true` when
* reading across collections. For example, when `parent` is set to
* `"projects/example/locations/-"`. This field is not supported by default and
* will result in an `UNIMPLEMENTED` error if set unless explicitly documented
* otherwise in service or product specific documentation.
* @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_Batch_Resource_ProjectsLocationsOperations');

View File

@@ -0,0 +1,52 @@
<?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\Batch\Resource;
use Google\Service\Batch\ReportAgentStateRequest;
use Google\Service\Batch\ReportAgentStateResponse;
/**
* The "state" collection of methods.
* Typical usage is:
* <code>
* $batchService = new Google\Service\Batch(...);
* $state = $batchService->projects_locations_state;
* </code>
*/
class ProjectsLocationsState extends \Google\Service\Resource
{
/**
* Report agent's state, e.g. agent status and tasks information (state.report)
*
* @param string $parent Required. Format:
* projects/{project}/locations/{location} {project} should be a project number.
* @param ReportAgentStateRequest $postBody
* @param array $optParams Optional parameters.
* @return ReportAgentStateResponse
* @throws \Google\Service\Exception
*/
public function report($parent, ReportAgentStateRequest $postBody, $optParams = [])
{
$params = ['parent' => $parent, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('report', [$params], ReportAgentStateResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsLocationsState::class, 'Google_Service_Batch_Resource_ProjectsLocationsState');

View File

@@ -0,0 +1,108 @@
<?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\Batch\Resource;
use Google\Service\Batch\Policy;
use Google\Service\Batch\SetIamPolicyRequest;
use Google\Service\Batch\TestIamPermissionsRequest;
use Google\Service\Batch\TestIamPermissionsResponse;
/**
* The "tasks" collection of methods.
* Typical usage is:
* <code>
* $batchService = new Google\Service\Batch(...);
* $tasks = $batchService->tasks;
* </code>
*/
class ProjectsLocationsTasks extends \Google\Service\Resource
{
/**
* Gets the access control policy for a resource. Returns an empty policy if the
* resource exists and does not have a policy set. (tasks.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 Policy
*/
public function getIamPolicy($resource, $optParams = [])
{
$params = ['resource' => $resource];
$params = array_merge($params, $optParams);
return $this->call('getIamPolicy', [$params], Policy::class);
}
/**
* Sets the access control policy on the specified resource. Replaces any
* existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and
* `PERMISSION_DENIED` errors. (tasks.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 SetIamPolicyRequest $postBody
* @param array $optParams Optional parameters.
* @return Policy
*/
public function setIamPolicy($resource, SetIamPolicyRequest $postBody, $optParams = [])
{
$params = ['resource' => $resource, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('setIamPolicy', [$params], Policy::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. (tasks.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 TestIamPermissionsRequest $postBody
* @param array $optParams Optional parameters.
* @return TestIamPermissionsResponse
*/
public function testIamPermissions($resource, TestIamPermissionsRequest $postBody, $optParams = [])
{
$params = ['resource' => $resource, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('testIamPermissions', [$params], TestIamPermissionsResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsLocationsTasks::class, 'Google_Service_Batch_Resource_ProjectsLocationsTasks');

View File

@@ -0,0 +1,269 @@
<?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\Batch;
class Runnable extends \Google\Model
{
/**
* By default, after a Runnable fails, no further Runnable are executed. This
* flag indicates that this Runnable must be run even if the Task has already
* failed. This is useful for Runnables that copy output files off of the VM
* or for debugging. The always_run flag does not override the Task's overall
* max_run_duration. If the max_run_duration has expired then no further
* Runnables will execute, not even always_run Runnables.
*
* @var bool
*/
public $alwaysRun;
/**
* Normally, a runnable that doesn't exit causes its task to fail. However,
* you can set this field to `true` to configure a background runnable.
* Background runnables are allowed continue running in the background while
* the task executes subsequent runnables. For example, background runnables
* are useful for providing services to other runnables or providing
* debugging-support tools like SSH servers. Specifically, background
* runnables are killed automatically (if they have not already exited) a
* short time after all foreground runnables have completed. Even though this
* is likely to result in a non-zero exit status for the background runnable,
* these automatic kills are not treated as task failures.
*
* @var bool
*/
public $background;
protected $barrierType = Barrier::class;
protected $barrierDataType = '';
protected $containerType = Container::class;
protected $containerDataType = '';
/**
* Optional. DisplayName is an optional field that can be provided by the
* caller. If provided, it will be used in logs and other outputs to identify
* the script, making it easier for users to understand the logs. If not
* provided the index of the runnable will be used for outputs.
*
* @var string
*/
public $displayName;
protected $environmentType = Environment::class;
protected $environmentDataType = '';
/**
* Normally, a runnable that returns a non-zero exit status fails and causes
* the task to fail. However, you can set this field to `true` to allow the
* task to continue executing its other runnables even if this runnable fails.
*
* @var bool
*/
public $ignoreExitStatus;
/**
* Labels for this Runnable.
*
* @var string[]
*/
public $labels;
protected $scriptType = Script::class;
protected $scriptDataType = '';
/**
* Timeout for this Runnable.
*
* @var string
*/
public $timeout;
/**
* By default, after a Runnable fails, no further Runnable are executed. This
* flag indicates that this Runnable must be run even if the Task has already
* failed. This is useful for Runnables that copy output files off of the VM
* or for debugging. The always_run flag does not override the Task's overall
* max_run_duration. If the max_run_duration has expired then no further
* Runnables will execute, not even always_run Runnables.
*
* @param bool $alwaysRun
*/
public function setAlwaysRun($alwaysRun)
{
$this->alwaysRun = $alwaysRun;
}
/**
* @return bool
*/
public function getAlwaysRun()
{
return $this->alwaysRun;
}
/**
* Normally, a runnable that doesn't exit causes its task to fail. However,
* you can set this field to `true` to configure a background runnable.
* Background runnables are allowed continue running in the background while
* the task executes subsequent runnables. For example, background runnables
* are useful for providing services to other runnables or providing
* debugging-support tools like SSH servers. Specifically, background
* runnables are killed automatically (if they have not already exited) a
* short time after all foreground runnables have completed. Even though this
* is likely to result in a non-zero exit status for the background runnable,
* these automatic kills are not treated as task failures.
*
* @param bool $background
*/
public function setBackground($background)
{
$this->background = $background;
}
/**
* @return bool
*/
public function getBackground()
{
return $this->background;
}
/**
* Barrier runnable.
*
* @param Barrier $barrier
*/
public function setBarrier(Barrier $barrier)
{
$this->barrier = $barrier;
}
/**
* @return Barrier
*/
public function getBarrier()
{
return $this->barrier;
}
/**
* Container runnable.
*
* @param Container $container
*/
public function setContainer(Container $container)
{
$this->container = $container;
}
/**
* @return Container
*/
public function getContainer()
{
return $this->container;
}
/**
* Optional. DisplayName is an optional field that can be provided by the
* caller. If provided, it will be used in logs and other outputs to identify
* the script, making it easier for users to understand the logs. If not
* provided the index of the runnable will be used for outputs.
*
* @param string $displayName
*/
public function setDisplayName($displayName)
{
$this->displayName = $displayName;
}
/**
* @return string
*/
public function getDisplayName()
{
return $this->displayName;
}
/**
* Environment variables for this Runnable (overrides variables set for the
* whole Task or TaskGroup).
*
* @param Environment $environment
*/
public function setEnvironment(Environment $environment)
{
$this->environment = $environment;
}
/**
* @return Environment
*/
public function getEnvironment()
{
return $this->environment;
}
/**
* Normally, a runnable that returns a non-zero exit status fails and causes
* the task to fail. However, you can set this field to `true` to allow the
* task to continue executing its other runnables even if this runnable fails.
*
* @param bool $ignoreExitStatus
*/
public function setIgnoreExitStatus($ignoreExitStatus)
{
$this->ignoreExitStatus = $ignoreExitStatus;
}
/**
* @return bool
*/
public function getIgnoreExitStatus()
{
return $this->ignoreExitStatus;
}
/**
* Labels for this Runnable.
*
* @param string[] $labels
*/
public function setLabels($labels)
{
$this->labels = $labels;
}
/**
* @return string[]
*/
public function getLabels()
{
return $this->labels;
}
/**
* Script runnable.
*
* @param Script $script
*/
public function setScript(Script $script)
{
$this->script = $script;
}
/**
* @return Script
*/
public function getScript()
{
return $this->script;
}
/**
* Timeout for this Runnable.
*
* @param string $timeout
*/
public function setTimeout($timeout)
{
$this->timeout = $timeout;
}
/**
* @return string
*/
public function getTimeout()
{
return $this->timeout;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Runnable::class, 'Google_Service_Batch_Runnable');

View File

@@ -0,0 +1,94 @@
<?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\Batch;
class Script extends \Google\Model
{
/**
* The path to a script file that is accessible from the host VM(s). Unless
* the script file supports the default `#!/bin/sh` shell interpreter, you
* must specify an interpreter by including a [shebang
* line](https://en.wikipedia.org/wiki/Shebang_(Unix) as the first line of the
* file. For example, to execute the script using bash, include `#!/bin/bash`
* as the first line of the file. Alternatively, to execute the script using
* Python3, include `#!/usr/bin/env python3` as the first line of the file.
*
* @var string
*/
public $path;
/**
* The text for a script. Unless the script text supports the default
* `#!/bin/sh` shell interpreter, you must specify an interpreter by including
* a [shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix) at the
* beginning of the text. For example, to execute the script using bash,
* include `#!/bin/bash\n` at the beginning of the text. Alternatively, to
* execute the script using Python3, include `#!/usr/bin/env python3\n` at the
* beginning of the text.
*
* @var string
*/
public $text;
/**
* The path to a script file that is accessible from the host VM(s). Unless
* the script file supports the default `#!/bin/sh` shell interpreter, you
* must specify an interpreter by including a [shebang
* line](https://en.wikipedia.org/wiki/Shebang_(Unix) as the first line of the
* file. For example, to execute the script using bash, include `#!/bin/bash`
* as the first line of the file. Alternatively, to execute the script using
* Python3, include `#!/usr/bin/env python3` as the first line of the file.
*
* @param string $path
*/
public function setPath($path)
{
$this->path = $path;
}
/**
* @return string
*/
public function getPath()
{
return $this->path;
}
/**
* The text for a script. Unless the script text supports the default
* `#!/bin/sh` shell interpreter, you must specify an interpreter by including
* a [shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix) at the
* beginning of the text. For example, to execute the script using bash,
* include `#!/bin/bash\n` at the beginning of the text. Alternatively, to
* execute the script using Python3, include `#!/usr/bin/env python3\n` at the
* beginning of the text.
*
* @param string $text
*/
public function setText($text)
{
$this->text = $text;
}
/**
* @return string
*/
public function getText()
{
return $this->text;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Script::class, 'Google_Service_Batch_Script');

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\Batch;
class ServiceAccount extends \Google\Collection
{
protected $collection_key = 'scopes';
/**
* Email address of the service account.
*
* @var string
*/
public $email;
/**
* List of scopes to be enabled for this service account.
*
* @var string[]
*/
public $scopes;
/**
* Email address of the service account.
*
* @param string $email
*/
public function setEmail($email)
{
$this->email = $email;
}
/**
* @return string
*/
public function getEmail()
{
return $this->email;
}
/**
* List of scopes to be enabled for this service account.
*
* @param string[] $scopes
*/
public function setScopes($scopes)
{
$this->scopes = $scopes;
}
/**
* @return string[]
*/
public function getScopes()
{
return $this->scopes;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ServiceAccount::class, 'Google_Service_Batch_ServiceAccount');

View File

@@ -0,0 +1,61 @@
<?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\Batch;
class SetIamPolicyRequest extends \Google\Model
{
protected $policyType = Policy::class;
protected $policyDataType = '';
public $policy;
/**
* @var string
*/
public $updateMask;
/**
* @param Policy
*/
public function setPolicy(Policy $policy)
{
$this->policy = $policy;
}
/**
* @return Policy
*/
public function getPolicy()
{
return $this->policy;
}
/**
* @param string
*/
public function setUpdateMask($updateMask)
{
$this->updateMask = $updateMask;
}
/**
* @return string
*/
public function getUpdateMask()
{
return $this->updateMask;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(SetIamPolicyRequest::class, 'Google_Service_Batch_SetIamPolicyRequest');

View File

@@ -0,0 +1,99 @@
<?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\Batch;
class Status extends \Google\Collection
{
protected $collection_key = 'details';
/**
* The status code, which should be an enum value of google.rpc.Code.
*
* @var int
*/
public $code;
/**
* A list of messages that carry the error details. There is a common set of
* message types for APIs to use.
*
* @var array[]
*/
public $details;
/**
* A developer-facing error message, which should be in English. Any user-
* facing error message should be localized and sent in the
* google.rpc.Status.details field, or localized by the client.
*
* @var string
*/
public $message;
/**
* The status code, which should be an enum value of google.rpc.Code.
*
* @param int $code
*/
public function setCode($code)
{
$this->code = $code;
}
/**
* @return int
*/
public function getCode()
{
return $this->code;
}
/**
* A list of messages that carry the error details. There is a common set of
* message types for APIs to use.
*
* @param array[] $details
*/
public function setDetails($details)
{
$this->details = $details;
}
/**
* @return array[]
*/
public function getDetails()
{
return $this->details;
}
/**
* A developer-facing error message, which should be in English. Any user-
* facing error message should be localized and sent in the
* google.rpc.Status.details field, or localized by the client.
*
* @param string $message
*/
public function setMessage($message)
{
$this->message = $message;
}
/**
* @return string
*/
public function getMessage()
{
return $this->message;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Status::class, 'Google_Service_Batch_Status');

View File

@@ -0,0 +1,164 @@
<?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\Batch;
class StatusEvent extends \Google\Model
{
/**
* Unknown state.
*/
public const TASK_STATE_STATE_UNSPECIFIED = 'STATE_UNSPECIFIED';
/**
* The Task is created and waiting for resources.
*/
public const TASK_STATE_PENDING = 'PENDING';
/**
* The Task is assigned to at least one VM.
*/
public const TASK_STATE_ASSIGNED = 'ASSIGNED';
/**
* The Task is running.
*/
public const TASK_STATE_RUNNING = 'RUNNING';
/**
* The Task has failed.
*/
public const TASK_STATE_FAILED = 'FAILED';
/**
* The Task has succeeded.
*/
public const TASK_STATE_SUCCEEDED = 'SUCCEEDED';
/**
* The Task has not been executed when the Job finishes.
*/
public const TASK_STATE_UNEXECUTED = 'UNEXECUTED';
/**
* Description of the event.
*
* @var string
*/
public $description;
/**
* The time this event occurred.
*
* @var string
*/
public $eventTime;
protected $taskExecutionType = TaskExecution::class;
protected $taskExecutionDataType = '';
/**
* Task State. This field is only defined for task-level status events.
*
* @var string
*/
public $taskState;
/**
* Type of the event.
*
* @var string
*/
public $type;
/**
* Description of the event.
*
* @param string $description
*/
public function setDescription($description)
{
$this->description = $description;
}
/**
* @return string
*/
public function getDescription()
{
return $this->description;
}
/**
* The time this event occurred.
*
* @param string $eventTime
*/
public function setEventTime($eventTime)
{
$this->eventTime = $eventTime;
}
/**
* @return string
*/
public function getEventTime()
{
return $this->eventTime;
}
/**
* Task Execution. This field is only defined for task-level status events
* where the task fails.
*
* @param TaskExecution $taskExecution
*/
public function setTaskExecution(TaskExecution $taskExecution)
{
$this->taskExecution = $taskExecution;
}
/**
* @return TaskExecution
*/
public function getTaskExecution()
{
return $this->taskExecution;
}
/**
* Task State. This field is only defined for task-level status events.
*
* Accepted values: STATE_UNSPECIFIED, PENDING, ASSIGNED, RUNNING, FAILED,
* SUCCEEDED, UNEXECUTED
*
* @param self::TASK_STATE_* $taskState
*/
public function setTaskState($taskState)
{
$this->taskState = $taskState;
}
/**
* @return self::TASK_STATE_*
*/
public function getTaskState()
{
return $this->taskState;
}
/**
* Type of the event.
*
* @param string $type
*/
public function setType($type)
{
$this->type = $type;
}
/**
* @return string
*/
public function getType()
{
return $this->type;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(StatusEvent::class, 'Google_Service_Batch_StatusEvent');

View File

@@ -0,0 +1,70 @@
<?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\Batch;
class Task extends \Google\Model
{
/**
* Task name. The name is generated from the parent TaskGroup name and 'id'
* field. For example: "projects/123456/locations/us-
* west1/jobs/job01/taskGroups/group01/tasks/task01".
*
* @var string
*/
public $name;
protected $statusType = TaskStatus::class;
protected $statusDataType = '';
/**
* Task name. The name is generated from the parent TaskGroup name and 'id'
* field. For example: "projects/123456/locations/us-
* west1/jobs/job01/taskGroups/group01/tasks/task01".
*
* @param string $name
*/
public function setName($name)
{
$this->name = $name;
}
/**
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* Task Status.
*
* @param TaskStatus $status
*/
public function setStatus(TaskStatus $status)
{
$this->status = $status;
}
/**
* @return TaskStatus
*/
public function getStatus()
{
return $this->status;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Task::class, 'Google_Service_Batch_Task');

View File

@@ -0,0 +1,62 @@
<?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\Batch;
class TaskExecution extends \Google\Model
{
/**
* The exit code of a finished task. If the task succeeded, the exit code will
* be 0. If the task failed but not due to the following reasons, the exit
* code will be 50000. Otherwise, it can be from different sources: * Batch
* known failures:
* https://cloud.google.com/batch/docs/troubleshooting#reserved-exit-codes. *
* Batch runnable execution failures; you can rely on Batch logs to further
* diagnose: https://cloud.google.com/batch/docs/analyze-job-using-logs. If
* there are multiple runnables failures, Batch only exposes the first error.
*
* @var int
*/
public $exitCode;
/**
* The exit code of a finished task. If the task succeeded, the exit code will
* be 0. If the task failed but not due to the following reasons, the exit
* code will be 50000. Otherwise, it can be from different sources: * Batch
* known failures:
* https://cloud.google.com/batch/docs/troubleshooting#reserved-exit-codes. *
* Batch runnable execution failures; you can rely on Batch logs to further
* diagnose: https://cloud.google.com/batch/docs/analyze-job-using-logs. If
* there are multiple runnables failures, Batch only exposes the first error.
*
* @param int $exitCode
*/
public function setExitCode($exitCode)
{
$this->exitCode = $exitCode;
}
/**
* @return int
*/
public function getExitCode()
{
return $this->exitCode;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(TaskExecution::class, 'Google_Service_Batch_TaskExecution');

View File

@@ -0,0 +1,292 @@
<?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\Batch;
class TaskGroup extends \Google\Collection
{
/**
* Unspecified.
*/
public const SCHEDULING_POLICY_SCHEDULING_POLICY_UNSPECIFIED = 'SCHEDULING_POLICY_UNSPECIFIED';
/**
* Run Tasks as soon as resources are available. Tasks might be executed in
* parallel depending on parallelism and task_count values.
*/
public const SCHEDULING_POLICY_AS_SOON_AS_POSSIBLE = 'AS_SOON_AS_POSSIBLE';
/**
* Run Tasks sequentially with increased task index.
*/
public const SCHEDULING_POLICY_IN_ORDER = 'IN_ORDER';
protected $collection_key = 'taskEnvironments';
/**
* Output only. TaskGroup name. The system generates this field based on
* parent Job name. For example: "projects/123456/locations/us-
* west1/jobs/job01/taskGroups/group01".
*
* @var string
*/
public $name;
/**
* Max number of tasks that can run in parallel. Default to min(task_count,
* parallel tasks per job limit). See: [Job
* Limits](https://cloud.google.com/batch/quotas#job_limits). Field
* parallelism must be 1 if the scheduling_policy is IN_ORDER.
*
* @var string
*/
public $parallelism;
/**
* When true, Batch will configure SSH to allow passwordless login between VMs
* running the Batch tasks in the same TaskGroup.
*
* @var bool
*/
public $permissiveSsh;
/**
* When true, Batch will populate a file with a list of all VMs assigned to
* the TaskGroup and set the BATCH_HOSTS_FILE environment variable to the path
* of that file. Defaults to false. The host file supports up to 1000 VMs.
*
* @var bool
*/
public $requireHostsFile;
/**
* Optional. If not set or set to false, Batch uses the root user to execute
* runnables. If set to true, Batch runs the runnables using a non-root user.
* Currently, the non-root user Batch used is generated by OS Login. For more
* information, see [About OS
* Login](https://cloud.google.com/compute/docs/oslogin).
*
* @var bool
*/
public $runAsNonRoot;
/**
* Scheduling policy for Tasks in the TaskGroup. The default value is
* AS_SOON_AS_POSSIBLE.
*
* @var string
*/
public $schedulingPolicy;
/**
* Number of Tasks in the TaskGroup. Default is 1.
*
* @var string
*/
public $taskCount;
/**
* Max number of tasks that can be run on a VM at the same time. If not
* specified, the system will decide a value based on available compute
* resources on a VM and task requirements.
*
* @var string
*/
public $taskCountPerNode;
protected $taskEnvironmentsType = Environment::class;
protected $taskEnvironmentsDataType = 'array';
protected $taskSpecType = TaskSpec::class;
protected $taskSpecDataType = '';
/**
* Output only. TaskGroup name. The system generates this field based on
* parent Job name. For example: "projects/123456/locations/us-
* west1/jobs/job01/taskGroups/group01".
*
* @param string $name
*/
public function setName($name)
{
$this->name = $name;
}
/**
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* Max number of tasks that can run in parallel. Default to min(task_count,
* parallel tasks per job limit). See: [Job
* Limits](https://cloud.google.com/batch/quotas#job_limits). Field
* parallelism must be 1 if the scheduling_policy is IN_ORDER.
*
* @param string $parallelism
*/
public function setParallelism($parallelism)
{
$this->parallelism = $parallelism;
}
/**
* @return string
*/
public function getParallelism()
{
return $this->parallelism;
}
/**
* When true, Batch will configure SSH to allow passwordless login between VMs
* running the Batch tasks in the same TaskGroup.
*
* @param bool $permissiveSsh
*/
public function setPermissiveSsh($permissiveSsh)
{
$this->permissiveSsh = $permissiveSsh;
}
/**
* @return bool
*/
public function getPermissiveSsh()
{
return $this->permissiveSsh;
}
/**
* When true, Batch will populate a file with a list of all VMs assigned to
* the TaskGroup and set the BATCH_HOSTS_FILE environment variable to the path
* of that file. Defaults to false. The host file supports up to 1000 VMs.
*
* @param bool $requireHostsFile
*/
public function setRequireHostsFile($requireHostsFile)
{
$this->requireHostsFile = $requireHostsFile;
}
/**
* @return bool
*/
public function getRequireHostsFile()
{
return $this->requireHostsFile;
}
/**
* Optional. If not set or set to false, Batch uses the root user to execute
* runnables. If set to true, Batch runs the runnables using a non-root user.
* Currently, the non-root user Batch used is generated by OS Login. For more
* information, see [About OS
* Login](https://cloud.google.com/compute/docs/oslogin).
*
* @param bool $runAsNonRoot
*/
public function setRunAsNonRoot($runAsNonRoot)
{
$this->runAsNonRoot = $runAsNonRoot;
}
/**
* @return bool
*/
public function getRunAsNonRoot()
{
return $this->runAsNonRoot;
}
/**
* Scheduling policy for Tasks in the TaskGroup. The default value is
* AS_SOON_AS_POSSIBLE.
*
* Accepted values: SCHEDULING_POLICY_UNSPECIFIED, AS_SOON_AS_POSSIBLE,
* IN_ORDER
*
* @param self::SCHEDULING_POLICY_* $schedulingPolicy
*/
public function setSchedulingPolicy($schedulingPolicy)
{
$this->schedulingPolicy = $schedulingPolicy;
}
/**
* @return self::SCHEDULING_POLICY_*
*/
public function getSchedulingPolicy()
{
return $this->schedulingPolicy;
}
/**
* Number of Tasks in the TaskGroup. Default is 1.
*
* @param string $taskCount
*/
public function setTaskCount($taskCount)
{
$this->taskCount = $taskCount;
}
/**
* @return string
*/
public function getTaskCount()
{
return $this->taskCount;
}
/**
* Max number of tasks that can be run on a VM at the same time. If not
* specified, the system will decide a value based on available compute
* resources on a VM and task requirements.
*
* @param string $taskCountPerNode
*/
public function setTaskCountPerNode($taskCountPerNode)
{
$this->taskCountPerNode = $taskCountPerNode;
}
/**
* @return string
*/
public function getTaskCountPerNode()
{
return $this->taskCountPerNode;
}
/**
* An array of environment variable mappings, which are passed to Tasks with
* matching indices. If task_environments is used then task_count should not
* be specified in the request (and will be ignored). Task count will be the
* length of task_environments. Tasks get a BATCH_TASK_INDEX and
* BATCH_TASK_COUNT environment variable, in addition to any environment
* variables set in task_environments, specifying the number of Tasks in the
* Task's parent TaskGroup, and the specific Task's index in the TaskGroup (0
* through BATCH_TASK_COUNT - 1).
*
* @param Environment[] $taskEnvironments
*/
public function setTaskEnvironments($taskEnvironments)
{
$this->taskEnvironments = $taskEnvironments;
}
/**
* @return Environment[]
*/
public function getTaskEnvironments()
{
return $this->taskEnvironments;
}
/**
* Required. Tasks in the group share the same task spec.
*
* @param TaskSpec $taskSpec
*/
public function setTaskSpec(TaskSpec $taskSpec)
{
$this->taskSpec = $taskSpec;
}
/**
* @return TaskSpec
*/
public function getTaskSpec()
{
return $this->taskSpec;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(TaskGroup::class, 'Google_Service_Batch_TaskGroup');

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\Batch;
class TaskGroupStatus extends \Google\Collection
{
protected $collection_key = 'instances';
/**
* Count of task in each state in the TaskGroup. The map key is task state
* name.
*
* @var string[]
*/
public $counts;
protected $instancesType = InstanceStatus::class;
protected $instancesDataType = 'array';
/**
* Count of task in each state in the TaskGroup. The map key is task state
* name.
*
* @param string[] $counts
*/
public function setCounts($counts)
{
$this->counts = $counts;
}
/**
* @return string[]
*/
public function getCounts()
{
return $this->counts;
}
/**
* Status of instances allocated for the TaskGroup.
*
* @param InstanceStatus[] $instances
*/
public function setInstances($instances)
{
$this->instances = $instances;
}
/**
* @return InstanceStatus[]
*/
public function getInstances()
{
return $this->instances;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(TaskGroupStatus::class, 'Google_Service_Batch_TaskGroupStatus');

View File

@@ -0,0 +1,214 @@
<?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\Batch;
class TaskSpec extends \Google\Collection
{
protected $collection_key = 'volumes';
protected $computeResourceType = ComputeResource::class;
protected $computeResourceDataType = '';
protected $environmentType = Environment::class;
protected $environmentDataType = '';
/**
* Deprecated: please use environment(non-plural) instead.
*
* @deprecated
* @var string[]
*/
public $environments;
protected $lifecyclePoliciesType = LifecyclePolicy::class;
protected $lifecyclePoliciesDataType = 'array';
/**
* Maximum number of retries on failures. The default, 0, which means never
* retry. The valid value range is [0, 10].
*
* @var int
*/
public $maxRetryCount;
/**
* Maximum duration the task should run before being automatically retried (if
* enabled) or automatically failed. Format the value of this field as a time
* limit in seconds followed by `s`—for example, `3600s` for 1 hour. The field
* accepts any value between 0 and the maximum listed for the `Duration` field
* type at https://protobuf.dev/reference/protobuf/google.protobuf/#duration;
* however, the actual maximum run time for a job will be limited to the
* maximum run time for a job listed at
* https://cloud.google.com/batch/quotas#max-job-duration.
*
* @var string
*/
public $maxRunDuration;
protected $runnablesType = Runnable::class;
protected $runnablesDataType = 'array';
protected $volumesType = Volume::class;
protected $volumesDataType = 'array';
/**
* ComputeResource requirements.
*
* @param ComputeResource $computeResource
*/
public function setComputeResource(ComputeResource $computeResource)
{
$this->computeResource = $computeResource;
}
/**
* @return ComputeResource
*/
public function getComputeResource()
{
return $this->computeResource;
}
/**
* Environment variables to set before running the Task.
*
* @param Environment $environment
*/
public function setEnvironment(Environment $environment)
{
$this->environment = $environment;
}
/**
* @return Environment
*/
public function getEnvironment()
{
return $this->environment;
}
/**
* Deprecated: please use environment(non-plural) instead.
*
* @deprecated
* @param string[] $environments
*/
public function setEnvironments($environments)
{
$this->environments = $environments;
}
/**
* @deprecated
* @return string[]
*/
public function getEnvironments()
{
return $this->environments;
}
/**
* Lifecycle management schema when any task in a task group is failed.
* Currently we only support one lifecycle policy. When the lifecycle policy
* condition is met, the action in the policy will execute. If task execution
* result does not meet with the defined lifecycle policy, we consider it as
* the default policy. Default policy means if the exit code is 0, exit task.
* If task ends with non-zero exit code, retry the task with max_retry_count.
*
* @param LifecyclePolicy[] $lifecyclePolicies
*/
public function setLifecyclePolicies($lifecyclePolicies)
{
$this->lifecyclePolicies = $lifecyclePolicies;
}
/**
* @return LifecyclePolicy[]
*/
public function getLifecyclePolicies()
{
return $this->lifecyclePolicies;
}
/**
* Maximum number of retries on failures. The default, 0, which means never
* retry. The valid value range is [0, 10].
*
* @param int $maxRetryCount
*/
public function setMaxRetryCount($maxRetryCount)
{
$this->maxRetryCount = $maxRetryCount;
}
/**
* @return int
*/
public function getMaxRetryCount()
{
return $this->maxRetryCount;
}
/**
* Maximum duration the task should run before being automatically retried (if
* enabled) or automatically failed. Format the value of this field as a time
* limit in seconds followed by `s`—for example, `3600s` for 1 hour. The field
* accepts any value between 0 and the maximum listed for the `Duration` field
* type at https://protobuf.dev/reference/protobuf/google.protobuf/#duration;
* however, the actual maximum run time for a job will be limited to the
* maximum run time for a job listed at
* https://cloud.google.com/batch/quotas#max-job-duration.
*
* @param string $maxRunDuration
*/
public function setMaxRunDuration($maxRunDuration)
{
$this->maxRunDuration = $maxRunDuration;
}
/**
* @return string
*/
public function getMaxRunDuration()
{
return $this->maxRunDuration;
}
/**
* Required. The sequence of one or more runnables (executable scripts,
* executable containers, and/or barriers) for each task in this task group to
* run. Each task runs this list of runnables in order. For a task to succeed,
* all of its script and container runnables each must meet at least one of
* the following conditions: + The runnable exited with a zero status. + The
* runnable didn't finish, but you enabled its `background` subfield. + The
* runnable exited with a non-zero status, but you enabled its
* `ignore_exit_status` subfield.
*
* @param Runnable[] $runnables
*/
public function setRunnables($runnables)
{
$this->runnables = $runnables;
}
/**
* @return Runnable[]
*/
public function getRunnables()
{
return $this->runnables;
}
/**
* Volumes to mount before running Tasks using this TaskSpec.
*
* @param Volume[] $volumes
*/
public function setVolumes($volumes)
{
$this->volumes = $volumes;
}
/**
* @return Volume[]
*/
public function getVolumes()
{
return $this->volumes;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(TaskSpec::class, 'Google_Service_Batch_TaskSpec');

View File

@@ -0,0 +1,98 @@
<?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\Batch;
class TaskStatus extends \Google\Collection
{
/**
* Unknown state.
*/
public const STATE_STATE_UNSPECIFIED = 'STATE_UNSPECIFIED';
/**
* The Task is created and waiting for resources.
*/
public const STATE_PENDING = 'PENDING';
/**
* The Task is assigned to at least one VM.
*/
public const STATE_ASSIGNED = 'ASSIGNED';
/**
* The Task is running.
*/
public const STATE_RUNNING = 'RUNNING';
/**
* The Task has failed.
*/
public const STATE_FAILED = 'FAILED';
/**
* The Task has succeeded.
*/
public const STATE_SUCCEEDED = 'SUCCEEDED';
/**
* The Task has not been executed when the Job finishes.
*/
public const STATE_UNEXECUTED = 'UNEXECUTED';
protected $collection_key = 'statusEvents';
/**
* Task state.
*
* @var string
*/
public $state;
protected $statusEventsType = StatusEvent::class;
protected $statusEventsDataType = 'array';
/**
* Task state.
*
* Accepted values: STATE_UNSPECIFIED, PENDING, ASSIGNED, RUNNING, FAILED,
* SUCCEEDED, UNEXECUTED
*
* @param self::STATE_* $state
*/
public function setState($state)
{
$this->state = $state;
}
/**
* @return self::STATE_*
*/
public function getState()
{
return $this->state;
}
/**
* Detailed info about why the state is reached.
*
* @param StatusEvent[] $statusEvents
*/
public function setStatusEvents($statusEvents)
{
$this->statusEvents = $statusEvents;
}
/**
* @return StatusEvent[]
*/
public function getStatusEvents()
{
return $this->statusEvents;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(TaskStatus::class, 'Google_Service_Batch_TaskStatus');

View File

@@ -0,0 +1,45 @@
<?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\Batch;
class TestIamPermissionsRequest extends \Google\Collection
{
protected $collection_key = 'permissions';
/**
* @var string[]
*/
public $permissions;
/**
* @param string[]
*/
public function setPermissions($permissions)
{
$this->permissions = $permissions;
}
/**
* @return string[]
*/
public function getPermissions()
{
return $this->permissions;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(TestIamPermissionsRequest::class, 'Google_Service_Batch_TestIamPermissionsRequest');

View File

@@ -0,0 +1,45 @@
<?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\Batch;
class TestIamPermissionsResponse extends \Google\Collection
{
protected $collection_key = 'permissions';
/**
* @var string[]
*/
public $permissions;
/**
* @param string[]
*/
public function setPermissions($permissions)
{
$this->permissions = $permissions;
}
/**
* @return string[]
*/
public function getPermissions()
{
return $this->permissions;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(TestIamPermissionsResponse::class, 'Google_Service_Batch_TestIamPermissionsResponse');

View File

@@ -0,0 +1,153 @@
<?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\Batch;
class Volume extends \Google\Collection
{
protected $collection_key = 'mountOptions';
/**
* Device name of an attached disk volume, which should align with a
* device_name specified by
* job.allocation_policy.instances[0].policy.disks[i].device_name or defined
* by the given instance template in
* job.allocation_policy.instances[0].instance_template.
*
* @var string
*/
public $deviceName;
protected $gcsType = GCS::class;
protected $gcsDataType = '';
/**
* Mount options vary based on the type of storage volume: * For a Cloud
* Storage bucket, all the mount options provided by the [`gcsfuse`
* tool](https://cloud.google.com/storage/docs/gcsfuse-cli) are supported. *
* For an existing persistent disk, all mount options provided by the [`mount`
* command](https://man7.org/linux/man-pages/man8/mount.8.html) except writing
* are supported. This is due to restrictions of [multi-writer
* mode](https://cloud.google.com/compute/docs/disks/sharing-disks-between-
* vms). * For any other disk or a Network File System (NFS), all the mount
* options provided by the `mount` command are supported.
*
* @var string[]
*/
public $mountOptions;
/**
* The mount path for the volume, e.g. /mnt/disks/share.
*
* @var string
*/
public $mountPath;
protected $nfsType = NFS::class;
protected $nfsDataType = '';
/**
* Device name of an attached disk volume, which should align with a
* device_name specified by
* job.allocation_policy.instances[0].policy.disks[i].device_name or defined
* by the given instance template in
* job.allocation_policy.instances[0].instance_template.
*
* @param string $deviceName
*/
public function setDeviceName($deviceName)
{
$this->deviceName = $deviceName;
}
/**
* @return string
*/
public function getDeviceName()
{
return $this->deviceName;
}
/**
* A Google Cloud Storage (GCS) volume.
*
* @param GCS $gcs
*/
public function setGcs(GCS $gcs)
{
$this->gcs = $gcs;
}
/**
* @return GCS
*/
public function getGcs()
{
return $this->gcs;
}
/**
* Mount options vary based on the type of storage volume: * For a Cloud
* Storage bucket, all the mount options provided by the [`gcsfuse`
* tool](https://cloud.google.com/storage/docs/gcsfuse-cli) are supported. *
* For an existing persistent disk, all mount options provided by the [`mount`
* command](https://man7.org/linux/man-pages/man8/mount.8.html) except writing
* are supported. This is due to restrictions of [multi-writer
* mode](https://cloud.google.com/compute/docs/disks/sharing-disks-between-
* vms). * For any other disk or a Network File System (NFS), all the mount
* options provided by the `mount` command are supported.
*
* @param string[] $mountOptions
*/
public function setMountOptions($mountOptions)
{
$this->mountOptions = $mountOptions;
}
/**
* @return string[]
*/
public function getMountOptions()
{
return $this->mountOptions;
}
/**
* The mount path for the volume, e.g. /mnt/disks/share.
*
* @param string $mountPath
*/
public function setMountPath($mountPath)
{
$this->mountPath = $mountPath;
}
/**
* @return string
*/
public function getMountPath()
{
return $this->mountPath;
}
/**
* A Network File System (NFS) volume. For example, a Filestore file share.
*
* @param NFS $nfs
*/
public function setNfs(NFS $nfs)
{
$this->nfs = $nfs;
}
/**
* @return NFS
*/
public function getNfs()
{
return $this->nfs;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Volume::class, 'Google_Service_Batch_Volume');