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 18/** 19 * Service definition for Pubsub (v1). 20 * 21 * <p> 22 * Provides reliable, many-to-many, asynchronous messaging between applications.</p> 23 * 24 * <p> 25 * For more information about this service, see the API 26 * <a href="https://cloud.google.com/pubsub/docs" target="_blank">Documentation</a> 27 * </p> 28 * 29 * @author Google, Inc. 30 */ 31class Google_Service_Pubsub extends Google_Service 32{ 33 /** View and manage your data across Google Cloud Platform services. */ 34 const CLOUD_PLATFORM = 35 "https://www.googleapis.com/auth/cloud-platform"; 36 /** View and manage Pub/Sub topics and subscriptions. */ 37 const PUBSUB = 38 "https://www.googleapis.com/auth/pubsub"; 39 40 public $projects_snapshots; 41 public $projects_subscriptions; 42 public $projects_topics; 43 public $projects_topics_snapshots; 44 public $projects_topics_subscriptions; 45 46 /** 47 * Constructs the internal representation of the Pubsub service. 48 * 49 * @param Google_Client $client 50 */ 51 public function __construct(Google_Client $client) 52 { 53 parent::__construct($client); 54 $this->rootUrl = 'https://pubsub.googleapis.com/'; 55 $this->servicePath = ''; 56 $this->batchPath = 'batch'; 57 $this->version = 'v1'; 58 $this->serviceName = 'pubsub'; 59 60 $this->projects_snapshots = new Google_Service_Pubsub_Resource_ProjectsSnapshots( 61 $this, 62 $this->serviceName, 63 'snapshots', 64 array( 65 'methods' => array( 66 'create' => array( 67 'path' => 'v1/{+name}', 68 'httpMethod' => 'PUT', 69 'parameters' => array( 70 'name' => array( 71 'location' => 'path', 72 'type' => 'string', 73 'required' => true, 74 ), 75 ), 76 ),'delete' => array( 77 'path' => 'v1/{+snapshot}', 78 'httpMethod' => 'DELETE', 79 'parameters' => array( 80 'snapshot' => array( 81 'location' => 'path', 82 'type' => 'string', 83 'required' => true, 84 ), 85 ), 86 ),'get' => array( 87 'path' => 'v1/{+snapshot}', 88 'httpMethod' => 'GET', 89 'parameters' => array( 90 'snapshot' => array( 91 'location' => 'path', 92 'type' => 'string', 93 'required' => true, 94 ), 95 ), 96 ),'getIamPolicy' => array( 97 'path' => 'v1/{+resource}:getIamPolicy', 98 'httpMethod' => 'GET', 99 'parameters' => array( 100 'resource' => array( 101 'location' => 'path', 102 'type' => 'string', 103 'required' => true, 104 ), 105 ), 106 ),'list' => array( 107 'path' => 'v1/{+project}/snapshots', 108 'httpMethod' => 'GET', 109 'parameters' => array( 110 'project' => array( 111 'location' => 'path', 112 'type' => 'string', 113 'required' => true, 114 ), 115 'pageToken' => array( 116 'location' => 'query', 117 'type' => 'string', 118 ), 119 'pageSize' => array( 120 'location' => 'query', 121 'type' => 'integer', 122 ), 123 ), 124 ),'patch' => array( 125 'path' => 'v1/{+name}', 126 'httpMethod' => 'PATCH', 127 'parameters' => array( 128 'name' => array( 129 'location' => 'path', 130 'type' => 'string', 131 'required' => true, 132 ), 133 ), 134 ),'setIamPolicy' => array( 135 'path' => 'v1/{+resource}:setIamPolicy', 136 'httpMethod' => 'POST', 137 'parameters' => array( 138 'resource' => array( 139 'location' => 'path', 140 'type' => 'string', 141 'required' => true, 142 ), 143 ), 144 ),'testIamPermissions' => array( 145 'path' => 'v1/{+resource}:testIamPermissions', 146 'httpMethod' => 'POST', 147 'parameters' => array( 148 'resource' => array( 149 'location' => 'path', 150 'type' => 'string', 151 'required' => true, 152 ), 153 ), 154 ), 155 ) 156 ) 157 ); 158 $this->projects_subscriptions = new Google_Service_Pubsub_Resource_ProjectsSubscriptions( 159 $this, 160 $this->serviceName, 161 'subscriptions', 162 array( 163 'methods' => array( 164 'acknowledge' => array( 165 'path' => 'v1/{+subscription}:acknowledge', 166 'httpMethod' => 'POST', 167 'parameters' => array( 168 'subscription' => array( 169 'location' => 'path', 170 'type' => 'string', 171 'required' => true, 172 ), 173 ), 174 ),'create' => array( 175 'path' => 'v1/{+name}', 176 'httpMethod' => 'PUT', 177 'parameters' => array( 178 'name' => array( 179 'location' => 'path', 180 'type' => 'string', 181 'required' => true, 182 ), 183 ), 184 ),'delete' => array( 185 'path' => 'v1/{+subscription}', 186 'httpMethod' => 'DELETE', 187 'parameters' => array( 188 'subscription' => array( 189 'location' => 'path', 190 'type' => 'string', 191 'required' => true, 192 ), 193 ), 194 ),'get' => array( 195 'path' => 'v1/{+subscription}', 196 'httpMethod' => 'GET', 197 'parameters' => array( 198 'subscription' => array( 199 'location' => 'path', 200 'type' => 'string', 201 'required' => true, 202 ), 203 ), 204 ),'getIamPolicy' => array( 205 'path' => 'v1/{+resource}:getIamPolicy', 206 'httpMethod' => 'GET', 207 'parameters' => array( 208 'resource' => array( 209 'location' => 'path', 210 'type' => 'string', 211 'required' => true, 212 ), 213 ), 214 ),'list' => array( 215 'path' => 'v1/{+project}/subscriptions', 216 'httpMethod' => 'GET', 217 'parameters' => array( 218 'project' => array( 219 'location' => 'path', 220 'type' => 'string', 221 'required' => true, 222 ), 223 'pageToken' => array( 224 'location' => 'query', 225 'type' => 'string', 226 ), 227 'pageSize' => array( 228 'location' => 'query', 229 'type' => 'integer', 230 ), 231 ), 232 ),'modifyAckDeadline' => array( 233 'path' => 'v1/{+subscription}:modifyAckDeadline', 234 'httpMethod' => 'POST', 235 'parameters' => array( 236 'subscription' => array( 237 'location' => 'path', 238 'type' => 'string', 239 'required' => true, 240 ), 241 ), 242 ),'modifyPushConfig' => array( 243 'path' => 'v1/{+subscription}:modifyPushConfig', 244 'httpMethod' => 'POST', 245 'parameters' => array( 246 'subscription' => array( 247 'location' => 'path', 248 'type' => 'string', 249 'required' => true, 250 ), 251 ), 252 ),'patch' => array( 253 'path' => 'v1/{+name}', 254 'httpMethod' => 'PATCH', 255 'parameters' => array( 256 'name' => array( 257 'location' => 'path', 258 'type' => 'string', 259 'required' => true, 260 ), 261 ), 262 ),'pull' => array( 263 'path' => 'v1/{+subscription}:pull', 264 'httpMethod' => 'POST', 265 'parameters' => array( 266 'subscription' => array( 267 'location' => 'path', 268 'type' => 'string', 269 'required' => true, 270 ), 271 ), 272 ),'seek' => array( 273 'path' => 'v1/{+subscription}:seek', 274 'httpMethod' => 'POST', 275 'parameters' => array( 276 'subscription' => array( 277 'location' => 'path', 278 'type' => 'string', 279 'required' => true, 280 ), 281 ), 282 ),'setIamPolicy' => array( 283 'path' => 'v1/{+resource}:setIamPolicy', 284 'httpMethod' => 'POST', 285 'parameters' => array( 286 'resource' => array( 287 'location' => 'path', 288 'type' => 'string', 289 'required' => true, 290 ), 291 ), 292 ),'testIamPermissions' => array( 293 'path' => 'v1/{+resource}:testIamPermissions', 294 'httpMethod' => 'POST', 295 'parameters' => array( 296 'resource' => array( 297 'location' => 'path', 298 'type' => 'string', 299 'required' => true, 300 ), 301 ), 302 ), 303 ) 304 ) 305 ); 306 $this->projects_topics = new Google_Service_Pubsub_Resource_ProjectsTopics( 307 $this, 308 $this->serviceName, 309 'topics', 310 array( 311 'methods' => array( 312 'create' => array( 313 'path' => 'v1/{+name}', 314 'httpMethod' => 'PUT', 315 'parameters' => array( 316 'name' => array( 317 'location' => 'path', 318 'type' => 'string', 319 'required' => true, 320 ), 321 ), 322 ),'delete' => array( 323 'path' => 'v1/{+topic}', 324 'httpMethod' => 'DELETE', 325 'parameters' => array( 326 'topic' => array( 327 'location' => 'path', 328 'type' => 'string', 329 'required' => true, 330 ), 331 ), 332 ),'get' => array( 333 'path' => 'v1/{+topic}', 334 'httpMethod' => 'GET', 335 'parameters' => array( 336 'topic' => array( 337 'location' => 'path', 338 'type' => 'string', 339 'required' => true, 340 ), 341 ), 342 ),'getIamPolicy' => array( 343 'path' => 'v1/{+resource}:getIamPolicy', 344 'httpMethod' => 'GET', 345 'parameters' => array( 346 'resource' => array( 347 'location' => 'path', 348 'type' => 'string', 349 'required' => true, 350 ), 351 ), 352 ),'list' => array( 353 'path' => 'v1/{+project}/topics', 354 'httpMethod' => 'GET', 355 'parameters' => array( 356 'project' => array( 357 'location' => 'path', 358 'type' => 'string', 359 'required' => true, 360 ), 361 'pageToken' => array( 362 'location' => 'query', 363 'type' => 'string', 364 ), 365 'pageSize' => array( 366 'location' => 'query', 367 'type' => 'integer', 368 ), 369 ), 370 ),'patch' => array( 371 'path' => 'v1/{+name}', 372 'httpMethod' => 'PATCH', 373 'parameters' => array( 374 'name' => array( 375 'location' => 'path', 376 'type' => 'string', 377 'required' => true, 378 ), 379 ), 380 ),'publish' => array( 381 'path' => 'v1/{+topic}:publish', 382 'httpMethod' => 'POST', 383 'parameters' => array( 384 'topic' => array( 385 'location' => 'path', 386 'type' => 'string', 387 'required' => true, 388 ), 389 ), 390 ),'setIamPolicy' => array( 391 'path' => 'v1/{+resource}:setIamPolicy', 392 'httpMethod' => 'POST', 393 'parameters' => array( 394 'resource' => array( 395 'location' => 'path', 396 'type' => 'string', 397 'required' => true, 398 ), 399 ), 400 ),'testIamPermissions' => array( 401 'path' => 'v1/{+resource}:testIamPermissions', 402 'httpMethod' => 'POST', 403 'parameters' => array( 404 'resource' => array( 405 'location' => 'path', 406 'type' => 'string', 407 'required' => true, 408 ), 409 ), 410 ), 411 ) 412 ) 413 ); 414 $this->projects_topics_snapshots = new Google_Service_Pubsub_Resource_ProjectsTopicsSnapshots( 415 $this, 416 $this->serviceName, 417 'snapshots', 418 array( 419 'methods' => array( 420 'list' => array( 421 'path' => 'v1/{+topic}/snapshots', 422 'httpMethod' => 'GET', 423 'parameters' => array( 424 'topic' => array( 425 'location' => 'path', 426 'type' => 'string', 427 'required' => true, 428 ), 429 'pageToken' => array( 430 'location' => 'query', 431 'type' => 'string', 432 ), 433 'pageSize' => array( 434 'location' => 'query', 435 'type' => 'integer', 436 ), 437 ), 438 ), 439 ) 440 ) 441 ); 442 $this->projects_topics_subscriptions = new Google_Service_Pubsub_Resource_ProjectsTopicsSubscriptions( 443 $this, 444 $this->serviceName, 445 'subscriptions', 446 array( 447 'methods' => array( 448 'list' => array( 449 'path' => 'v1/{+topic}/subscriptions', 450 'httpMethod' => 'GET', 451 'parameters' => array( 452 'topic' => array( 453 'location' => 'path', 454 'type' => 'string', 455 'required' => true, 456 ), 457 'pageToken' => array( 458 'location' => 'query', 459 'type' => 'string', 460 ), 461 'pageSize' => array( 462 'location' => 'query', 463 'type' => 'integer', 464 ), 465 ), 466 ), 467 ) 468 ) 469 ); 470 } 471} 472