1<?php 2/* 3 * Copyright 2014 Google Inc. 4 * 5 * Licensed under the Apache License, Version 2.0 (the "License"); you may not 6 * use this file except in compliance with the License. You may obtain a copy of 7 * the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 * License for the specific language governing permissions and limitations under 15 * the License. 16 */ 17 18namespace Google\Service; 19 20use Google\Client; 21 22/** 23 * Service definition for RemoteBuildExecution (v2). 24 * 25 * <p> 26 * Supplies a Remote Execution API service for tools such as bazel.</p> 27 * 28 * <p> 29 * For more information about this service, see the API 30 * <a href="https://cloud.google.com/remote-build-execution/docs/" target="_blank">Documentation</a> 31 * </p> 32 * 33 * @author Google, Inc. 34 */ 35class RemoteBuildExecution extends \Google\Service 36{ 37 /** See, edit, configure, and delete your Google Cloud Platform data. */ 38 const CLOUD_PLATFORM = 39 "https://www.googleapis.com/auth/cloud-platform"; 40 41 public $actionResults; 42 public $actions; 43 public $blobs; 44 public $operations; 45 public $v2; 46 47 /** 48 * Constructs the internal representation of the RemoteBuildExecution service. 49 * 50 * @param Client|array $clientOrConfig The client used to deliver requests, or a 51 * config array to pass to a new Client instance. 52 * @param string $rootUrl The root URL used for requests to the service. 53 */ 54 public function __construct($clientOrConfig = [], $rootUrl = null) 55 { 56 parent::__construct($clientOrConfig); 57 $this->rootUrl = $rootUrl ?: 'https://remotebuildexecution.googleapis.com/'; 58 $this->servicePath = ''; 59 $this->batchPath = 'batch'; 60 $this->version = 'v2'; 61 $this->serviceName = 'remotebuildexecution'; 62 63 $this->actionResults = new RemoteBuildExecution\Resource\ActionResults( 64 $this, 65 $this->serviceName, 66 'actionResults', 67 [ 68 'methods' => [ 69 'get' => [ 70 'path' => 'v2/{+instanceName}/actionResults/{hash}/{sizeBytes}', 71 'httpMethod' => 'GET', 72 'parameters' => [ 73 'instanceName' => [ 74 'location' => 'path', 75 'type' => 'string', 76 'required' => true, 77 ], 78 'hash' => [ 79 'location' => 'path', 80 'type' => 'string', 81 'required' => true, 82 ], 83 'sizeBytes' => [ 84 'location' => 'path', 85 'type' => 'string', 86 'required' => true, 87 ], 88 'inlineOutputFiles' => [ 89 'location' => 'query', 90 'type' => 'string', 91 'repeated' => true, 92 ], 93 'inlineStderr' => [ 94 'location' => 'query', 95 'type' => 'boolean', 96 ], 97 'inlineStdout' => [ 98 'location' => 'query', 99 'type' => 'boolean', 100 ], 101 ], 102 ],'update' => [ 103 'path' => 'v2/{+instanceName}/actionResults/{hash}/{sizeBytes}', 104 'httpMethod' => 'PUT', 105 'parameters' => [ 106 'instanceName' => [ 107 'location' => 'path', 108 'type' => 'string', 109 'required' => true, 110 ], 111 'hash' => [ 112 'location' => 'path', 113 'type' => 'string', 114 'required' => true, 115 ], 116 'sizeBytes' => [ 117 'location' => 'path', 118 'type' => 'string', 119 'required' => true, 120 ], 121 'resultsCachePolicy.priority' => [ 122 'location' => 'query', 123 'type' => 'integer', 124 ], 125 ], 126 ], 127 ] 128 ] 129 ); 130 $this->actions = new RemoteBuildExecution\Resource\Actions( 131 $this, 132 $this->serviceName, 133 'actions', 134 [ 135 'methods' => [ 136 'execute' => [ 137 'path' => 'v2/{+instanceName}/actions:execute', 138 'httpMethod' => 'POST', 139 'parameters' => [ 140 'instanceName' => [ 141 'location' => 'path', 142 'type' => 'string', 143 'required' => true, 144 ], 145 ], 146 ], 147 ] 148 ] 149 ); 150 $this->blobs = new RemoteBuildExecution\Resource\Blobs( 151 $this, 152 $this->serviceName, 153 'blobs', 154 [ 155 'methods' => [ 156 'batchRead' => [ 157 'path' => 'v2/{+instanceName}/blobs:batchRead', 158 'httpMethod' => 'POST', 159 'parameters' => [ 160 'instanceName' => [ 161 'location' => 'path', 162 'type' => 'string', 163 'required' => true, 164 ], 165 ], 166 ],'batchUpdate' => [ 167 'path' => 'v2/{+instanceName}/blobs:batchUpdate', 168 'httpMethod' => 'POST', 169 'parameters' => [ 170 'instanceName' => [ 171 'location' => 'path', 172 'type' => 'string', 173 'required' => true, 174 ], 175 ], 176 ],'findMissing' => [ 177 'path' => 'v2/{+instanceName}/blobs:findMissing', 178 'httpMethod' => 'POST', 179 'parameters' => [ 180 'instanceName' => [ 181 'location' => 'path', 182 'type' => 'string', 183 'required' => true, 184 ], 185 ], 186 ],'getTree' => [ 187 'path' => 'v2/{+instanceName}/blobs/{hash}/{sizeBytes}:getTree', 188 'httpMethod' => 'GET', 189 'parameters' => [ 190 'instanceName' => [ 191 'location' => 'path', 192 'type' => 'string', 193 'required' => true, 194 ], 195 'hash' => [ 196 'location' => 'path', 197 'type' => 'string', 198 'required' => true, 199 ], 200 'sizeBytes' => [ 201 'location' => 'path', 202 'type' => 'string', 203 'required' => true, 204 ], 205 'pageSize' => [ 206 'location' => 'query', 207 'type' => 'integer', 208 ], 209 'pageToken' => [ 210 'location' => 'query', 211 'type' => 'string', 212 ], 213 ], 214 ], 215 ] 216 ] 217 ); 218 $this->operations = new RemoteBuildExecution\Resource\Operations( 219 $this, 220 $this->serviceName, 221 'operations', 222 [ 223 'methods' => [ 224 'waitExecution' => [ 225 'path' => 'v2/{+name}:waitExecution', 226 'httpMethod' => 'POST', 227 'parameters' => [ 228 'name' => [ 229 'location' => 'path', 230 'type' => 'string', 231 'required' => true, 232 ], 233 ], 234 ], 235 ] 236 ] 237 ); 238 $this->v2 = new RemoteBuildExecution\Resource\V2( 239 $this, 240 $this->serviceName, 241 'v2', 242 [ 243 'methods' => [ 244 'getCapabilities' => [ 245 'path' => 'v2/{+instanceName}/capabilities', 246 'httpMethod' => 'GET', 247 'parameters' => [ 248 'instanceName' => [ 249 'location' => 'path', 250 'type' => 'string', 251 'required' => true, 252 ], 253 ], 254 ], 255 ] 256 ] 257 ); 258 } 259} 260 261// Adding a class alias for backwards compatibility with the previous class name. 262class_alias(RemoteBuildExecution::class, 'Google_Service_RemoteBuildExecution'); 263