summaryrefslogtreecommitdiff
path: root/Postman/Postman-Mail/google-api-php-client-1.1.2/src/Google/Service/Replicapoolupdater.php
blob: aac3dcfb0f1b678a01cb063dcd059fdf4b633a79 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
<?php
/*
 * Copyright 2010 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.
 */

/**
 * Service definition for Replicapoolupdater (v1beta1).
 *
 * <p>
 * The Google Compute Engine Instance Group Updater API provides services for
 * updating groups of Compute Engine Instances.</p>
 *
 * <p>
 * For more information about this service, see the API
 * <a href="https://cloud.google.com/compute/docs/instance-groups/manager/#applying_rolling_updates_using_the_updater_service" target="_blank">Documentation</a>
 * </p>
 *
 * @author Google, Inc.
 */
class Postman_Google_Service_Replicapoolupdater extends Postman_Google_Service
{
  /** View and manage your data across Google Cloud Platform services. */
  const CLOUD_PLATFORM =
      "https://www.googleapis.com/auth/cloud-platform";
  /** View and manage replica pools. */
  const REPLICAPOOL =
      "https://www.googleapis.com/auth/replicapool";
  /** View replica pools. */
  const REPLICAPOOL_READONLY =
      "https://www.googleapis.com/auth/replicapool.readonly";

  public $updates;
  

  /**
   * Constructs the internal representation of the Replicapoolupdater service.
   *
   * @param Postman_Google_Client $client
   */
  public function __construct(Postman_Google_Client $client)
  {
    parent::__construct($client);
    $this->servicePath = 'replicapoolupdater/v1beta1/projects/';
    $this->version = 'v1beta1';
    $this->serviceName = 'replicapoolupdater';

    $this->updates = new Postman_Google_Service_Replicapoolupdater_Updates_Resource(
        $this,
        $this->serviceName,
        'updates',
        array(
          'methods' => array(
            'cancel' => array(
              'path' => '{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/updates/{update}/cancel',
              'httpMethod' => 'POST',
              'parameters' => array(
                'project' => array(
                  'location' => 'path',
                  'type' => 'string',
                  'required' => true,
                ),
                'zone' => array(
                  'location' => 'path',
                  'type' => 'string',
                  'required' => true,
                ),
                'instanceGroupManager' => array(
                  'location' => 'path',
                  'type' => 'string',
                  'required' => true,
                ),
                'update' => array(
                  'location' => 'path',
                  'type' => 'string',
                  'required' => true,
                ),
              ),
            ),'get' => array(
              'path' => '{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/updates/{update}',
              'httpMethod' => 'GET',
              'parameters' => array(
                'project' => array(
                  'location' => 'path',
                  'type' => 'string',
                  'required' => true,
                ),
                'zone' => array(
                  'location' => 'path',
                  'type' => 'string',
                  'required' => true,
                ),
                'instanceGroupManager' => array(
                  'location' => 'path',
                  'type' => 'string',
                  'required' => true,
                ),
                'update' => array(
                  'location' => 'path',
                  'type' => 'string',
                  'required' => true,
                ),
              ),
            ),'insert' => array(
              'path' => '{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/updates',
              'httpMethod' => 'POST',
              'parameters' => array(
                'project' => array(
                  'location' => 'path',
                  'type' => 'string',
                  'required' => true,
                ),
                'zone' => array(
                  'location' => 'path',
                  'type' => 'string',
                  'required' => true,
                ),
                'instanceGroupManager' => array(
                  'location' => 'path',
                  'type' => 'string',
                  'required' => true,
                ),
              ),
            ),'list' => array(
              'path' => '{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/updates',
              'httpMethod' => 'GET',
              'parameters' => array(
                'project' => array(
                  'location' => 'path',
                  'type' => 'string',
                  'required' => true,
                ),
                'zone' => array(
                  'location' => 'path',
                  'type' => 'string',
                  'required' => true,
                ),
                'instanceGroupManager' => array(
                  'location' => 'path',
                  'type' => 'string',
                  'required' => true,
                ),
                'pageToken' => array(
                  'location' => 'query',
                  'type' => 'string',
                ),
                'maxResults' => array(
                  'location' => 'query',
                  'type' => 'integer',
                ),
              ),
            ),'pause' => array(
              'path' => '{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/updates/{update}/pause',
              'httpMethod' => 'POST',
              'parameters' => array(
                'project' => array(
                  'location' => 'path',
                  'type' => 'string',
                  'required' => true,
                ),
                'zone' => array(
                  'location' => 'path',
                  'type' => 'string',
                  'required' => true,
                ),
                'instanceGroupManager' => array(
                  'location' => 'path',
                  'type' => 'string',
                  'required' => true,
                ),
                'update' => array(
                  'location' => 'path',
                  'type' => 'string',
                  'required' => true,
                ),
              ),
            ),'rollback' => array(
              'path' => '{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/updates/{update}/rollback',
              'httpMethod' => 'POST',
              'parameters' => array(
                'project' => array(
                  'location' => 'path',
                  'type' => 'string',
                  'required' => true,
                ),
                'zone' => array(
                  'location' => 'path',
                  'type' => 'string',
                  'required' => true,
                ),
                'instanceGroupManager' => array(
                  'location' => 'path',
                  'type' => 'string',
                  'required' => true,
                ),
                'update' => array(
                  'location' => 'path',
                  'type' => 'string',
                  'required' => true,
                ),
              ),
            ),'rollforward' => array(
              'path' => '{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/updates/{update}/rollforward',
              'httpMethod' => 'POST',
              'parameters' => array(
                'project' => array(
                  'location' => 'path',
                  'type' => 'string',
                  'required' => true,
                ),
                'zone' => array(
                  'location' => 'path',
                  'type' => 'string',
                  'required' => true,
                ),
                'instanceGroupManager' => array(
                  'location' => 'path',
                  'type' => 'string',
                  'required' => true,
                ),
                'update' => array(
                  'location' => 'path',
                  'type' => 'string',
                  'required' => true,
                ),
              ),
            ),
          )
        )
    );
  }
}


/**
 * The "updates" collection of methods.
 * Typical usage is:
 *  <code>
 *   $replicapoolupdaterService = new Postman_Google_Service_Replicapoolupdater(...);
 *   $updates = $replicapoolupdaterService->updates;
 *  </code>
 */
class Postman_Google_Service_Replicapoolupdater_Updates_Resource extends Postman_Google_Service_Resource
{

  /**
   * Called on the particular Update endpoint. Cancels the update in state PAUSED.
   * No-op if invoked in state CANCELLED. (updates.cancel)
   *
   * @param string $project Project ID for this request.
   * @param string $zone Zone for the instance group manager.
   * @param string $instanceGroupManager Name of the instance group manager for
   * this request.
   * @param string $update Unique (in the context of a group) handle of an update.
   * @param array $optParams Optional parameters.
   */
  public function cancel($project, $zone, $instanceGroupManager, $update, $optParams = array())
  {
    $params = array('project' => $project, 'zone' => $zone, 'instanceGroupManager' => $instanceGroupManager, 'update' => $update);
    $params = array_merge($params, $optParams);
    return $this->call('cancel', array($params));
  }

  /**
   * Called on the particular Update endpoint. Returns the Update resource.
   * (updates.get)
   *
   * @param string $project Project ID for this request.
   * @param string $zone Zone for the instance group manager.
   * @param string $instanceGroupManager Name of the instance group manager for
   * this request.
   * @param string $update Unique (in the context of a group) handle of an update.
   * @param array $optParams Optional parameters.
   * @return Postman_Google_Service_Replicapoolupdater_Update
   */
  public function get($project, $zone, $instanceGroupManager, $update, $optParams = array())
  {
    $params = array('project' => $project, 'zone' => $zone, 'instanceGroupManager' => $instanceGroupManager, 'update' => $update);
    $params = array_merge($params, $optParams);
    return $this->call('get', array($params), "Postman_Google_Service_Replicapoolupdater_Update");
  }

  /**
   * Called on the collection endpoint. Inserts the new Update resource and starts
   * the update. (updates.insert)
   *
   * @param string $project Project ID for this request.
   * @param string $zone Zone for the instance group manager.
   * @param string $instanceGroupManager Name of the instance group manager for
   * this request.
   * @param Postman_Google_Update $postBody
   * @param array $optParams Optional parameters.
   * @return Postman_Google_Service_Replicapoolupdater_InsertResponse
   */
  public function insert($project, $zone, $instanceGroupManager, Postman_Google_Service_Replicapoolupdater_Update $postBody, $optParams = array())
  {
    $params = array('project' => $project, 'zone' => $zone, 'instanceGroupManager' => $instanceGroupManager, 'postBody' => $postBody);
    $params = array_merge($params, $optParams);
    return $this->call('insert', array($params), "Postman_Google_Service_Replicapoolupdater_InsertResponse");
  }

  /**
   * Called on the collection endpoint. Lists updates for a given instance group,
   * in reverse chronological order. Pagination is supported, see
   * ListRequestHeader. (updates.listUpdates)
   *
   * @param string $project Project ID for this request.
   * @param string $zone Zone for the instance group manager.
   * @param string $instanceGroupManager Name of the instance group manager for
   * this request.
   * @param array $optParams Optional parameters.
   *
   * @opt_param string pageToken Set this to the nextPageToken value returned by a
   * previous list request to obtain the next page of results from the previous
   * list request.
   * @opt_param int maxResults Maximum count of results to be returned. Acceptable
   * values are 1 to 100, inclusive. (Default: 50)
   * @return Postman_Google_Service_Replicapoolupdater_UpdateList
   */
  public function listUpdates($project, $zone, $instanceGroupManager, $optParams = array())
  {
    $params = array('project' => $project, 'zone' => $zone, 'instanceGroupManager' => $instanceGroupManager);
    $params = array_merge($params, $optParams);
    return $this->call('list', array($params), "Postman_Google_Service_Replicapoolupdater_UpdateList");
  }

  /**
   * Called on the particular Update endpoint. Pauses the update in state
   * ROLLING_FORWARD or ROLLING_BACK. No-op if invoked in state PAUSED.
   * (updates.pause)
   *
   * @param string $project Project ID for this request.
   * @param string $zone Zone for the instance group manager.
   * @param string $instanceGroupManager Name of the instance group manager for
   * this request.
   * @param string $update Unique (in the context of a group) handle of an update.
   * @param array $optParams Optional parameters.
   */
  public function pause($project, $zone, $instanceGroupManager, $update, $optParams = array())
  {
    $params = array('project' => $project, 'zone' => $zone, 'instanceGroupManager' => $instanceGroupManager, 'update' => $update);
    $params = array_merge($params, $optParams);
    return $this->call('pause', array($params));
  }

  /**
   * Called on the particular Update endpoint. Rolls back the update in state
   * ROLLING_FORWARD or PAUSED. No-op if invoked in state ROLLED_BACK or
   * ROLLING_BACK. (updates.rollback)
   *
   * @param string $project Project ID for this request.
   * @param string $zone Zone for the instance group manager.
   * @param string $instanceGroupManager Name of the instance group manager for
   * this request.
   * @param string $update Unique (in the context of a group) handle of an update.
   * @param array $optParams Optional parameters.
   */
  public function rollback($project, $zone, $instanceGroupManager, $update, $optParams = array())
  {
    $params = array('project' => $project, 'zone' => $zone, 'instanceGroupManager' => $instanceGroupManager, 'update' => $update);
    $params = array_merge($params, $optParams);
    return $this->call('rollback', array($params));
  }

  /**
   * Called on the particular Update endpoint. Rolls forward the update in state
   * ROLLING_BACK or PAUSED. No-op if invoked in state ROLLED_OUT or
   * ROLLING_FORWARD. (updates.rollforward)
   *
   * @param string $project Project ID for this request.
   * @param string $zone Zone for the instance group manager.
   * @param string $instanceGroupManager Name of the instance group manager for
   * this request.
   * @param string $update Unique (in the context of a group) handle of an update.
   * @param array $optParams Optional parameters.
   */
  public function rollforward($project, $zone, $instanceGroupManager, $update, $optParams = array())
  {
    $params = array('project' => $project, 'zone' => $zone, 'instanceGroupManager' => $instanceGroupManager, 'update' => $update);
    $params = array_merge($params, $optParams);
    return $this->call('rollforward', array($params));
  }
}




class Postman_Google_Service_Replicapoolupdater_InsertResponse extends Postman_Google_Model
{
  protected $internal_gapi_mappings = array(
  );
  public $update;


  public function setUpdate($update)
  {
    $this->update = $update;
  }
  public function getUpdate()
  {
    return $this->update;
  }
}

class Postman_Google_Service_Replicapoolupdater_InstanceUpdate extends Postman_Google_Model
{
  protected $internal_gapi_mappings = array(
  );
  public $instanceName;
  public $state;


  public function setInstanceName($instanceName)
  {
    $this->instanceName = $instanceName;
  }
  public function getInstanceName()
  {
    return $this->instanceName;
  }
  public function setState($state)
  {
    $this->state = $state;
  }
  public function getState()
  {
    return $this->state;
  }
}

class Postman_Google_Service_Replicapoolupdater_Update extends Postman_Google_Collection
{
  protected $collection_key = 'instanceUpdates';
  protected $internal_gapi_mappings = array(
  );
  public $creationTimestamp;
  public $details;
  public $handle;
  public $instanceTemplate;
  protected $instanceUpdatesType = 'Postman_Google_Service_Replicapoolupdater_InstanceUpdate';
  protected $instanceUpdatesDataType = 'array';
  public $kind;
  protected $policyType = 'Postman_Google_Service_Replicapoolupdater_UpdatePolicy';
  protected $policyDataType = '';
  public $selfLink;
  public $state;
  public $targetState;
  public $user;


  public function setCreationTimestamp($creationTimestamp)
  {
    $this->creationTimestamp = $creationTimestamp;
  }
  public function getCreationTimestamp()
  {
    return $this->creationTimestamp;
  }
  public function setDetails($details)
  {
    $this->details = $details;
  }
  public function getDetails()
  {
    return $this->details;
  }
  public function setHandle($handle)
  {
    $this->handle = $handle;
  }
  public function getHandle()
  {
    return $this->handle;
  }
  public function setInstanceTemplate($instanceTemplate)
  {
    $this->instanceTemplate = $instanceTemplate;
  }
  public function getInstanceTemplate()
  {
    return $this->instanceTemplate;
  }
  public function setInstanceUpdates($instanceUpdates)
  {
    $this->instanceUpdates = $instanceUpdates;
  }
  public function getInstanceUpdates()
  {
    return $this->instanceUpdates;
  }
  public function setKind($kind)
  {
    $this->kind = $kind;
  }
  public function getKind()
  {
    return $this->kind;
  }
  public function setPolicy(Postman_Google_Service_Replicapoolupdater_UpdatePolicy $policy)
  {
    $this->policy = $policy;
  }
  public function getPolicy()
  {
    return $this->policy;
  }
  public function setSelfLink($selfLink)
  {
    $this->selfLink = $selfLink;
  }
  public function getSelfLink()
  {
    return $this->selfLink;
  }
  public function setState($state)
  {
    $this->state = $state;
  }
  public function getState()
  {
    return $this->state;
  }
  public function setTargetState($targetState)
  {
    $this->targetState = $targetState;
  }
  public function getTargetState()
  {
    return $this->targetState;
  }
  public function setUser($user)
  {
    $this->user = $user;
  }
  public function getUser()
  {
    return $this->user;
  }
}

class Postman_Google_Service_Replicapoolupdater_UpdateList extends Postman_Google_Collection
{
  protected $collection_key = 'items';
  protected $internal_gapi_mappings = array(
  );
  protected $itemsType = 'Postman_Google_Service_Replicapoolupdater_Update';
  protected $itemsDataType = 'array';
  public $nextPageToken;


  public function setItems($items)
  {
    $this->items = $items;
  }
  public function getItems()
  {
    return $this->items;
  }
  public function setNextPageToken($nextPageToken)
  {
    $this->nextPageToken = $nextPageToken;
  }
  public function getNextPageToken()
  {
    return $this->nextPageToken;
  }
}

class Postman_Google_Service_Replicapoolupdater_UpdatePolicy extends Postman_Google_Model
{
  protected $internal_gapi_mappings = array(
  );
  protected $canaryType = 'Postman_Google_Service_Replicapoolupdater_UpdatePolicyCanary';
  protected $canaryDataType = '';
  public $maxNumConcurrentInstances;
  public $sleepAfterInstanceRestartSec;


  public function setCanary(Postman_Google_Service_Replicapoolupdater_UpdatePolicyCanary $canary)
  {
    $this->canary = $canary;
  }
  public function getCanary()
  {
    return $this->canary;
  }
  public function setMaxNumConcurrentInstances($maxNumConcurrentInstances)
  {
    $this->maxNumConcurrentInstances = $maxNumConcurrentInstances;
  }
  public function getMaxNumConcurrentInstances()
  {
    return $this->maxNumConcurrentInstances;
  }
  public function setSleepAfterInstanceRestartSec($sleepAfterInstanceRestartSec)
  {
    $this->sleepAfterInstanceRestartSec = $sleepAfterInstanceRestartSec;
  }
  public function getSleepAfterInstanceRestartSec()
  {
    return $this->sleepAfterInstanceRestartSec;
  }
}

class Postman_Google_Service_Replicapoolupdater_UpdatePolicyCanary extends Postman_Google_Model
{
  protected $internal_gapi_mappings = array(
  );
  public $numInstances;


  public function setNumInstances($numInstances)
  {
    $this->numInstances = $numInstances;
  }
  public function getNumInstances()
  {
    return $this->numInstances;
  }
}