* Creates and manages builds on Google Cloud Platform.

* *

* For more information about this service, see the API * Documentation *

* * @author Google, Inc. */ class CloudBuild extends \Google\Service { /** See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.. */ const CLOUD_PLATFORM = "https://www.googleapis.com/auth/cloud-platform"; public $locations; public $operations; public $projects_builds; public $projects_githubEnterpriseConfigs; public $projects_locations_bitbucketServerConfigs; public $projects_locations_bitbucketServerConfigs_connectedRepositories; public $projects_locations_bitbucketServerConfigs_repos; public $projects_locations_builds; public $projects_locations_githubEnterpriseConfigs; public $projects_locations_operations; public $projects_locations_triggers; public $projects_locations_workerPools; public $projects_triggers; public $v1; /** * Constructs the internal representation of the CloudBuild service. * * @param Client|array $clientOrConfig The client used to deliver requests, or a * config array to pass to a new Client instance. * @param string $rootUrl The root URL used for requests to the service. */ public function __construct($clientOrConfig = [], $rootUrl = null) { parent::__construct($clientOrConfig); $this->rootUrl = $rootUrl ?: 'https://cloudbuild.googleapis.com/'; $this->servicePath = ''; $this->batchPath = 'batch'; $this->version = 'v1'; $this->serviceName = 'cloudbuild'; $this->locations = new CloudBuild\Resource\Locations( $this, $this->serviceName, 'locations', [ 'methods' => [ 'regionalWebhook' => [ 'path' => 'v1/{+location}/regionalWebhook', 'httpMethod' => 'POST', 'parameters' => [ 'location' => [ 'location' => 'path', 'type' => 'string', 'required' => true, ], 'webhookKey' => [ 'location' => 'query', 'type' => 'string', ], ], ], ] ] ); $this->operations = new CloudBuild\Resource\Operations( $this, $this->serviceName, 'operations', [ 'methods' => [ 'cancel' => [ 'path' => 'v1/{+name}:cancel', 'httpMethod' => 'POST', 'parameters' => [ 'name' => [ 'location' => 'path', 'type' => 'string', 'required' => true, ], ], ],'get' => [ 'path' => 'v1/{+name}', 'httpMethod' => 'GET', 'parameters' => [ 'name' => [ 'location' => 'path', 'type' => 'string', 'required' => true, ], ], ], ] ] ); $this->projects_builds = new CloudBuild\Resource\ProjectsBuilds( $this, $this->serviceName, 'builds', [ 'methods' => [ 'approve' => [ 'path' => 'v1/{+name}:approve', 'httpMethod' => 'POST', 'parameters' => [ 'name' => [ 'location' => 'path', 'type' => 'string', 'required' => true, ], ], ],'cancel' => [ 'path' => 'v1/projects/{projectId}/builds/{id}:cancel', 'httpMethod' => 'POST', 'parameters' => [ 'projectId' => [ 'location' => 'path', 'type' => 'string', 'required' => true, ], 'id' => [ 'location' => 'path', 'type' => 'string', 'required' => true, ], ], ],'create' => [ 'path' => 'v1/projects/{projectId}/builds', 'httpMethod' => 'POST', 'parameters' => [ 'projectId' => [ 'location' => 'path', 'type' => 'string', 'required' => true, ], 'parent' => [ 'location' => 'query', 'type' => 'string', ], ], ],'get' => [ 'path' => 'v1/projects/{projectId}/builds/{id}', 'httpMethod' => 'GET', 'parameters' => [ 'projectId' => [ 'location' => 'path', 'type' => 'string', 'required' => true, ], 'id' => [ 'location' => 'path', 'type' => 'string', 'required' => true, ], 'name' => [ 'location' => 'query', 'type' => 'string', ], ], ],'list' => [ 'path' => 'v1/projects/{projectId}/builds', 'httpMethod' => 'GET', 'parameters' => [ 'projectId' => [ 'location' => 'path', 'type' => 'string', 'required' => true, ], 'filter' => [ 'location' => 'query', 'type' => 'string', ], 'pageSize' => [ 'location' => 'query', 'type' => 'integer', ], 'pageToken' => [ 'location' => 'query', 'type' => 'string', ], 'parent' => [ 'location' => 'query', 'type' => 'string', ], ], ],'retry' => [ 'path' => 'v1/projects/{projectId}/builds/{id}:retry', 'httpMethod' => 'POST', 'parameters' => [ 'projectId' => [ 'location' => 'path', 'type' => 'string', 'required' => true, ], 'id' => [ 'location' => 'path', 'type' => 'string', 'required' => true, ], ], ], ] ] ); $this->projects_githubEnterpriseConfigs = new CloudBuild\Resource\ProjectsGithubEnterpriseConfigs( $this, $this->serviceName, 'githubEnterpriseConfigs', [ 'methods' => [ 'create' => [ 'path' => 'v1/{+parent}/githubEnterpriseConfigs', 'httpMethod' => 'POST', 'parameters' => [ 'parent' => [ 'location' => 'path', 'type' => 'string', 'required' => true, ], 'gheConfigId' => [ 'location' => 'query', 'type' => 'string', ], 'projectId' => [ 'location' => 'query', 'type' => 'string', ], ], ],'delete' => [ 'path' => 'v1/{+name}', 'httpMethod' => 'DELETE', 'parameters' => [ 'name' => [ 'location' => 'path', 'type' => 'string', 'required' => true, ], 'configId' => [ 'location' => 'query', 'type' => 'string', ], 'projectId' => [ 'location' => 'query', 'type' => 'string', ], ], ],'get' => [ 'path' => 'v1/{+name}', 'httpMethod' => 'GET', 'parameters' => [ 'name' => [ 'location' => 'path', 'type' => 'string', 'required' => true, ], 'configId' => [ 'location' => 'query', 'type' => 'string', ], 'projectId' => [ 'location' => 'query', 'type' => 'string', ], ], ],'list' => [ 'path' => 'v1/{+parent}/githubEnterpriseConfigs', 'httpMethod' => 'GET', 'parameters' => [ 'parent' => [ 'location' => 'path', 'type' => 'string', 'required' => true, ], 'projectId' => [ 'location' => 'query', 'type' => 'string', ], ], ],'patch' => [ 'path' => 'v1/{+name}', 'httpMethod' => 'PATCH', 'parameters' => [ 'name' => [ 'location' => 'path', 'type' => 'string', 'required' => true, ], 'updateMask' => [ 'location' => 'query', 'type' => 'string', ], ], ], ] ] ); $this->projects_locations_bitbucketServerConfigs = new CloudBuild\Resource\ProjectsLocationsBitbucketServerConfigs( $this, $this->serviceName, 'bitbucketServerConfigs', [ 'methods' => [ 'create' => [ 'path' => 'v1/{+parent}/bitbucketServerConfigs', 'httpMethod' => 'POST', 'parameters' => [ 'parent' => [ 'location' => 'path', 'type' => 'string', 'required' => true, ], 'bitbucketServerConfigId' => [ 'location' => 'query', 'type' => 'string', ], ], ],'delete' => [ 'path' => 'v1/{+name}', 'httpMethod' => 'DELETE', 'parameters' => [ 'name' => [ 'location' => 'path', 'type' => 'string', 'required' => true, ], ], ],'get' => [ 'path' => 'v1/{+name}', 'httpMethod' => 'GET', 'parameters' => [ 'name' => [ 'location' => 'path', 'type' => 'string', 'required' => true, ], ], ],'list' => [ 'path' => 'v1/{+parent}/bitbucketServerConfigs', 'httpMethod' => 'GET', 'parameters' => [ 'parent' => [ 'location' => 'path', 'type' => 'string', 'required' => true, ], 'pageSize' => [ 'location' => 'query', 'type' => 'integer', ], 'pageToken' => [ 'location' => 'query', 'type' => 'string', ], ], ],'patch' => [ 'path' => 'v1/{+name}', 'httpMethod' => 'PATCH', 'parameters' => [ 'name' => [ 'location' => 'path', 'type' => 'string', 'required' => true, ], 'updateMask' => [ 'location' => 'query', 'type' => 'string', ], ], ],'removeBitbucketServerConnectedRepository' => [ 'path' => 'v1/{+config}:removeBitbucketServerConnectedRepository', 'httpMethod' => 'POST', 'parameters' => [ 'config' => [ 'location' => 'path', 'type' => 'string', 'required' => true, ], ], ], ] ] ); $this->projects_locations_bitbucketServerConfigs_connectedRepositories = new CloudBuild\Resource\ProjectsLocationsBitbucketServerConfigsConnectedRepositories( $this, $this->serviceName, 'connectedRepositories', [ 'methods' => [ 'batchCreate' => [ 'path' => 'v1/{+parent}/connectedRepositories:batchCreate', 'httpMethod' => 'POST', 'parameters' => [ 'parent' => [ 'location' => 'path', 'type' => 'string', 'required' => true, ], ], ], ] ] ); $this->projects_locations_bitbucketServerConfigs_repos = new CloudBuild\Resource\ProjectsLocationsBitbucketServerConfigsRepos( $this, $this->serviceName, 'repos', [ 'methods' => [ 'list' => [ 'path' => 'v1/{+parent}/repos', 'httpMethod' => 'GET', 'parameters' => [ 'parent' => [ 'location' => 'path', 'type' => 'string', 'required' => true, ], 'pageSize' => [ 'location' => 'query', 'type' => 'integer', ], 'pageToken' => [ 'location' => 'query', 'type' => 'string', ], ], ], ] ] ); $this->projects_locations_builds = new CloudBuild\Resource\ProjectsLocationsBuilds( $this, $this->serviceName, 'builds', [ 'methods' => [ 'approve' => [ 'path' => 'v1/{+name}:approve', 'httpMethod' => 'POST', 'parameters' => [ 'name' => [ 'location' => 'path', 'type' => 'string', 'required' => true, ], ], ],'cancel' => [ 'path' => 'v1/{+name}:cancel', 'httpMethod' => 'POST', 'parameters' => [ 'name' => [ 'location' => 'path', 'type' => 'string', 'required' => true, ], ], ],'create' => [ 'path' => 'v1/{+parent}/builds', 'httpMethod' => 'POST', 'parameters' => [ 'parent' => [ 'location' => 'path', 'type' => 'string', 'required' => true, ], 'projectId' => [ 'location' => 'query', 'type' => 'string', ], ], ],'get' => [ 'path' => 'v1/{+name}', 'httpMethod' => 'GET', 'parameters' => [ 'name' => [ 'location' => 'path', 'type' => 'string', 'required' => true, ], 'id' => [ 'location' => 'query', 'type' => 'string', ], 'projectId' => [ 'location' => 'query', 'type' => 'string', ], ], ],'list' => [ 'path' => 'v1/{+parent}/builds', 'httpMethod' => 'GET', 'parameters' => [ 'parent' => [ 'location' => 'path', 'type' => 'string', 'required' => true, ], 'filter' => [ 'location' => 'query', 'type' => 'string', ], 'pageSize' => [ 'location' => 'query', 'type' => 'integer', ], 'pageToken' => [ 'location' => 'query', 'type' => 'string', ], 'projectId' => [ 'location' => 'query', 'type' => 'string', ], ], ],'retry' => [ 'path' => 'v1/{+name}:retry', 'httpMethod' => 'POST', 'parameters' => [ 'name' => [ 'location' => 'path', 'type' => 'string', 'required' => true, ], ], ], ] ] ); $this->projects_locations_githubEnterpriseConfigs = new CloudBuild\Resource\ProjectsLocationsGithubEnterpriseConfigs( $this, $this->serviceName, 'githubEnterpriseConfigs', [ 'methods' => [ 'create' => [ 'path' => 'v1/{+parent}/githubEnterpriseConfigs', 'httpMethod' => 'POST', 'parameters' => [ 'parent' => [ 'location' => 'path', 'type' => 'string', 'required' => true, ], 'gheConfigId' => [ 'location' => 'query', 'type' => 'string', ], 'projectId' => [ 'location' => 'query', 'type' => 'string', ], ], ],'delete' => [ 'path' => 'v1/{+name}', 'httpMethod' => 'DELETE', 'parameters' => [ 'name' => [ 'location' => 'path', 'type' => 'string', 'required' => true, ], 'configId' => [ 'location' => 'query', 'type' => 'string', ], 'projectId' => [ 'location' => 'query', 'type' => 'string', ], ], ],'get' => [ 'path' => 'v1/{+name}', 'httpMethod' => 'GET', 'parameters' => [ 'name' => [ 'location' => 'path', 'type' => 'string', 'required' => true, ], 'configId' => [ 'location' => 'query', 'type' => 'string', ], 'projectId' => [ 'location' => 'query', 'type' => 'string', ], ], ],'list' => [ 'path' => 'v1/{+parent}/githubEnterpriseConfigs', 'httpMethod' => 'GET', 'parameters' => [ 'parent' => [ 'location' => 'path', 'type' => 'string', 'required' => true, ], 'projectId' => [ 'location' => 'query', 'type' => 'string', ], ], ],'patch' => [ 'path' => 'v1/{+name}', 'httpMethod' => 'PATCH', 'parameters' => [ 'name' => [ 'location' => 'path', 'type' => 'string', 'required' => true, ], 'updateMask' => [ 'location' => 'query', 'type' => 'string', ], ], ], ] ] ); $this->projects_locations_operations = new CloudBuild\Resource\ProjectsLocationsOperations( $this, $this->serviceName, 'operations', [ 'methods' => [ 'cancel' => [ 'path' => 'v1/{+name}:cancel', 'httpMethod' => 'POST', 'parameters' => [ 'name' => [ 'location' => 'path', 'type' => 'string', 'required' => true, ], ], ],'get' => [ 'path' => 'v1/{+name}', 'httpMethod' => 'GET', 'parameters' => [ 'name' => [ 'location' => 'path', 'type' => 'string', 'required' => true, ], ], ], ] ] ); $this->projects_locations_triggers = new CloudBuild\Resource\ProjectsLocationsTriggers( $this, $this->serviceName, 'triggers', [ 'methods' => [ 'create' => [ 'path' => 'v1/{+parent}/triggers', 'httpMethod' => 'POST', 'parameters' => [ 'parent' => [ 'location' => 'path', 'type' => 'string', 'required' => true, ], 'projectId' => [ 'location' => 'query', 'type' => 'string', ], ], ],'delete' => [ 'path' => 'v1/{+name}', 'httpMethod' => 'DELETE', 'parameters' => [ 'name' => [ 'location' => 'path', 'type' => 'string', 'required' => true, ], 'projectId' => [ 'location' => 'query', 'type' => 'string', ], 'triggerId' => [ 'location' => 'query', 'type' => 'string', ], ], ],'get' => [ 'path' => 'v1/{+name}', 'httpMethod' => 'GET', 'parameters' => [ 'name' => [ 'location' => 'path', 'type' => 'string', 'required' => true, ], 'projectId' => [ 'location' => 'query', 'type' => 'string', ], 'triggerId' => [ 'location' => 'query', 'type' => 'string', ], ], ],'list' => [ 'path' => 'v1/{+parent}/triggers', 'httpMethod' => 'GET', 'parameters' => [ 'parent' => [ 'location' => 'path', 'type' => 'string', 'required' => true, ], 'pageSize' => [ 'location' => 'query', 'type' => 'integer', ], 'pageToken' => [ 'location' => 'query', 'type' => 'string', ], 'projectId' => [ 'location' => 'query', 'type' => 'string', ], ], ],'patch' => [ 'path' => 'v1/{+resourceName}', 'httpMethod' => 'PATCH', 'parameters' => [ 'resourceName' => [ 'location' => 'path', 'type' => 'string', 'required' => true, ], 'projectId' => [ 'location' => 'query', 'type' => 'string', ], 'triggerId' => [ 'location' => 'query', 'type' => 'string', ], ], ],'run' => [ 'path' => 'v1/{+name}:run', 'httpMethod' => 'POST', 'parameters' => [ 'name' => [ 'location' => 'path', 'type' => 'string', 'required' => true, ], ], ],'webhook' => [ 'path' => 'v1/{+name}:webhook', 'httpMethod' => 'POST', 'parameters' => [ 'name' => [ 'location' => 'path', 'type' => 'string', 'required' => true, ], 'projectId' => [ 'location' => 'query', 'type' => 'string', ], 'secret' => [ 'location' => 'query', 'type' => 'string', ], 'trigger' => [ 'location' => 'query', 'type' => 'string', ], ], ], ] ] ); $this->projects_locations_workerPools = new CloudBuild\Resource\ProjectsLocationsWorkerPools( $this, $this->serviceName, 'workerPools', [ 'methods' => [ 'create' => [ 'path' => 'v1/{+parent}/workerPools', 'httpMethod' => 'POST', 'parameters' => [ 'parent' => [ 'location' => 'path', 'type' => 'string', 'required' => true, ], 'validateOnly' => [ 'location' => 'query', 'type' => 'boolean', ], 'workerPoolId' => [ 'location' => 'query', 'type' => 'string', ], ], ],'delete' => [ 'path' => 'v1/{+name}', 'httpMethod' => 'DELETE', 'parameters' => [ 'name' => [ 'location' => 'path', 'type' => 'string', 'required' => true, ], 'allowMissing' => [ 'location' => 'query', 'type' => 'boolean', ], 'etag' => [ 'location' => 'query', 'type' => 'string', ], 'validateOnly' => [ 'location' => 'query', 'type' => 'boolean', ], ], ],'get' => [ 'path' => 'v1/{+name}', 'httpMethod' => 'GET', 'parameters' => [ 'name' => [ 'location' => 'path', 'type' => 'string', 'required' => true, ], ], ],'list' => [ 'path' => 'v1/{+parent}/workerPools', 'httpMethod' => 'GET', 'parameters' => [ 'parent' => [ 'location' => 'path', 'type' => 'string', 'required' => true, ], 'pageSize' => [ 'location' => 'query', 'type' => 'integer', ], 'pageToken' => [ 'location' => 'query', 'type' => 'string', ], ], ],'patch' => [ 'path' => 'v1/{+name}', 'httpMethod' => 'PATCH', 'parameters' => [ 'name' => [ 'location' => 'path', 'type' => 'string', 'required' => true, ], 'updateMask' => [ 'location' => 'query', 'type' => 'string', ], 'validateOnly' => [ 'location' => 'query', 'type' => 'boolean', ], ], ], ] ] ); $this->projects_triggers = new CloudBuild\Resource\ProjectsTriggers( $this, $this->serviceName, 'triggers', [ 'methods' => [ 'create' => [ 'path' => 'v1/projects/{projectId}/triggers', 'httpMethod' => 'POST', 'parameters' => [ 'projectId' => [ 'location' => 'path', 'type' => 'string', 'required' => true, ], 'parent' => [ 'location' => 'query', 'type' => 'string', ], ], ],'delete' => [ 'path' => 'v1/projects/{projectId}/triggers/{triggerId}', 'httpMethod' => 'DELETE', 'parameters' => [ 'projectId' => [ 'location' => 'path', 'type' => 'string', 'required' => true, ], 'triggerId' => [ 'location' => 'path', 'type' => 'string', 'required' => true, ], 'name' => [ 'location' => 'query', 'type' => 'string', ], ], ],'get' => [ 'path' => 'v1/projects/{projectId}/triggers/{triggerId}', 'httpMethod' => 'GET', 'parameters' => [ 'projectId' => [ 'location' => 'path', 'type' => 'string', 'required' => true, ], 'triggerId' => [ 'location' => 'path', 'type' => 'string', 'required' => true, ], 'name' => [ 'location' => 'query', 'type' => 'string', ], ], ],'list' => [ 'path' => 'v1/projects/{projectId}/triggers', 'httpMethod' => 'GET', 'parameters' => [ 'projectId' => [ 'location' => 'path', 'type' => 'string', 'required' => true, ], 'pageSize' => [ 'location' => 'query', 'type' => 'integer', ], 'pageToken' => [ 'location' => 'query', 'type' => 'string', ], 'parent' => [ 'location' => 'query', 'type' => 'string', ], ], ],'patch' => [ 'path' => 'v1/projects/{projectId}/triggers/{triggerId}', 'httpMethod' => 'PATCH', 'parameters' => [ 'projectId' => [ 'location' => 'path', 'type' => 'string', 'required' => true, ], 'triggerId' => [ 'location' => 'path', 'type' => 'string', 'required' => true, ], ], ],'run' => [ 'path' => 'v1/projects/{projectId}/triggers/{triggerId}:run', 'httpMethod' => 'POST', 'parameters' => [ 'projectId' => [ 'location' => 'path', 'type' => 'string', 'required' => true, ], 'triggerId' => [ 'location' => 'path', 'type' => 'string', 'required' => true, ], 'name' => [ 'location' => 'query', 'type' => 'string', ], ], ],'webhook' => [ 'path' => 'v1/projects/{projectId}/triggers/{trigger}:webhook', 'httpMethod' => 'POST', 'parameters' => [ 'projectId' => [ 'location' => 'path', 'type' => 'string', 'required' => true, ], 'trigger' => [ 'location' => 'path', 'type' => 'string', 'required' => true, ], 'name' => [ 'location' => 'query', 'type' => 'string', ], 'secret' => [ 'location' => 'query', 'type' => 'string', ], ], ], ] ] ); $this->v1 = new CloudBuild\Resource\V1( $this, $this->serviceName, 'v1', [ 'methods' => [ 'webhook' => [ 'path' => 'v1/webhook', 'httpMethod' => 'POST', 'parameters' => [ 'webhookKey' => [ 'location' => 'query', 'type' => 'string', ], ], ], ] ] ); } } // Adding a class alias for backwards compatibility with the previous class name. class_alias(CloudBuild::class, 'Google_Service_CloudBuild');