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 Cloudchannel (v1).
24 *
25 * <p>
26 * The Cloud Channel API enables Google Cloud partners to have a single unified
27 * resale platform and APIs across all of Google Cloud including GCP, Workspace,
28 * Maps and Chrome.</p>
29 *
30 * <p>
31 * For more information about this service, see the API
32 * <a href="https://cloud.google.com/channel" target="_blank">Documentation</a>
33 * </p>
34 *
35 * @author Google, Inc.
36 */
37class Cloudchannel extends \Google\Service
38{
39  /** Manage users on your domain. */
40  const APPS_ORDER =
41      "https://www.googleapis.com/auth/apps.order";
42
43  public $accounts;
44  public $accounts_channelPartnerLinks;
45  public $accounts_channelPartnerLinks_customers;
46  public $accounts_customers;
47  public $accounts_customers_entitlements;
48  public $accounts_offers;
49  public $operations;
50  public $products;
51  public $products_skus;
52
53  /**
54   * Constructs the internal representation of the Cloudchannel service.
55   *
56   * @param Client|array $clientOrConfig The client used to deliver requests, or a
57   *                                     config array to pass to a new Client instance.
58   * @param string $rootUrl The root URL used for requests to the service.
59   */
60  public function __construct($clientOrConfig = [], $rootUrl = null)
61  {
62    parent::__construct($clientOrConfig);
63    $this->rootUrl = $rootUrl ?: 'https://cloudchannel.googleapis.com/';
64    $this->servicePath = '';
65    $this->batchPath = 'batch';
66    $this->version = 'v1';
67    $this->serviceName = 'cloudchannel';
68
69    $this->accounts = new Cloudchannel\Resource\Accounts(
70        $this,
71        $this->serviceName,
72        'accounts',
73        [
74          'methods' => [
75            'checkCloudIdentityAccountsExist' => [
76              'path' => 'v1/{+parent}:checkCloudIdentityAccountsExist',
77              'httpMethod' => 'POST',
78              'parameters' => [
79                'parent' => [
80                  'location' => 'path',
81                  'type' => 'string',
82                  'required' => true,
83                ],
84              ],
85            ],'listSubscribers' => [
86              'path' => 'v1/{+account}:listSubscribers',
87              'httpMethod' => 'GET',
88              'parameters' => [
89                'account' => [
90                  'location' => 'path',
91                  'type' => 'string',
92                  'required' => true,
93                ],
94                'pageSize' => [
95                  'location' => 'query',
96                  'type' => 'integer',
97                ],
98                'pageToken' => [
99                  'location' => 'query',
100                  'type' => 'string',
101                ],
102              ],
103            ],'listTransferableOffers' => [
104              'path' => 'v1/{+parent}:listTransferableOffers',
105              'httpMethod' => 'POST',
106              'parameters' => [
107                'parent' => [
108                  'location' => 'path',
109                  'type' => 'string',
110                  'required' => true,
111                ],
112              ],
113            ],'listTransferableSkus' => [
114              'path' => 'v1/{+parent}:listTransferableSkus',
115              'httpMethod' => 'POST',
116              'parameters' => [
117                'parent' => [
118                  'location' => 'path',
119                  'type' => 'string',
120                  'required' => true,
121                ],
122              ],
123            ],'register' => [
124              'path' => 'v1/{+account}:register',
125              'httpMethod' => 'POST',
126              'parameters' => [
127                'account' => [
128                  'location' => 'path',
129                  'type' => 'string',
130                  'required' => true,
131                ],
132              ],
133            ],'unregister' => [
134              'path' => 'v1/{+account}:unregister',
135              'httpMethod' => 'POST',
136              'parameters' => [
137                'account' => [
138                  'location' => 'path',
139                  'type' => 'string',
140                  'required' => true,
141                ],
142              ],
143            ],
144          ]
145        ]
146    );
147    $this->accounts_channelPartnerLinks = new Cloudchannel\Resource\AccountsChannelPartnerLinks(
148        $this,
149        $this->serviceName,
150        'channelPartnerLinks',
151        [
152          'methods' => [
153            'create' => [
154              'path' => 'v1/{+parent}/channelPartnerLinks',
155              'httpMethod' => 'POST',
156              'parameters' => [
157                'parent' => [
158                  'location' => 'path',
159                  'type' => 'string',
160                  'required' => true,
161                ],
162              ],
163            ],'get' => [
164              'path' => 'v1/{+name}',
165              'httpMethod' => 'GET',
166              'parameters' => [
167                'name' => [
168                  'location' => 'path',
169                  'type' => 'string',
170                  'required' => true,
171                ],
172                'view' => [
173                  'location' => 'query',
174                  'type' => 'string',
175                ],
176              ],
177            ],'list' => [
178              'path' => 'v1/{+parent}/channelPartnerLinks',
179              'httpMethod' => 'GET',
180              'parameters' => [
181                'parent' => [
182                  'location' => 'path',
183                  'type' => 'string',
184                  'required' => true,
185                ],
186                'pageSize' => [
187                  'location' => 'query',
188                  'type' => 'integer',
189                ],
190                'pageToken' => [
191                  'location' => 'query',
192                  'type' => 'string',
193                ],
194                'view' => [
195                  'location' => 'query',
196                  'type' => 'string',
197                ],
198              ],
199            ],'patch' => [
200              'path' => 'v1/{+name}',
201              'httpMethod' => 'PATCH',
202              'parameters' => [
203                'name' => [
204                  'location' => 'path',
205                  'type' => 'string',
206                  'required' => true,
207                ],
208              ],
209            ],
210          ]
211        ]
212    );
213    $this->accounts_channelPartnerLinks_customers = new Cloudchannel\Resource\AccountsChannelPartnerLinksCustomers(
214        $this,
215        $this->serviceName,
216        'customers',
217        [
218          'methods' => [
219            'create' => [
220              'path' => 'v1/{+parent}/customers',
221              'httpMethod' => 'POST',
222              'parameters' => [
223                'parent' => [
224                  'location' => 'path',
225                  'type' => 'string',
226                  'required' => true,
227                ],
228              ],
229            ],'delete' => [
230              'path' => 'v1/{+name}',
231              'httpMethod' => 'DELETE',
232              'parameters' => [
233                'name' => [
234                  'location' => 'path',
235                  'type' => 'string',
236                  'required' => true,
237                ],
238              ],
239            ],'get' => [
240              'path' => 'v1/{+name}',
241              'httpMethod' => 'GET',
242              'parameters' => [
243                'name' => [
244                  'location' => 'path',
245                  'type' => 'string',
246                  'required' => true,
247                ],
248              ],
249            ],'import' => [
250              'path' => 'v1/{+parent}/customers:import',
251              'httpMethod' => 'POST',
252              'parameters' => [
253                'parent' => [
254                  'location' => 'path',
255                  'type' => 'string',
256                  'required' => true,
257                ],
258              ],
259            ],'list' => [
260              'path' => 'v1/{+parent}/customers',
261              'httpMethod' => 'GET',
262              'parameters' => [
263                'parent' => [
264                  'location' => 'path',
265                  'type' => 'string',
266                  'required' => true,
267                ],
268                'filter' => [
269                  'location' => 'query',
270                  'type' => 'string',
271                ],
272                'pageSize' => [
273                  'location' => 'query',
274                  'type' => 'integer',
275                ],
276                'pageToken' => [
277                  'location' => 'query',
278                  'type' => 'string',
279                ],
280              ],
281            ],'patch' => [
282              'path' => 'v1/{+name}',
283              'httpMethod' => 'PATCH',
284              'parameters' => [
285                'name' => [
286                  'location' => 'path',
287                  'type' => 'string',
288                  'required' => true,
289                ],
290                'updateMask' => [
291                  'location' => 'query',
292                  'type' => 'string',
293                ],
294              ],
295            ],
296          ]
297        ]
298    );
299    $this->accounts_customers = new Cloudchannel\Resource\AccountsCustomers(
300        $this,
301        $this->serviceName,
302        'customers',
303        [
304          'methods' => [
305            'create' => [
306              'path' => 'v1/{+parent}/customers',
307              'httpMethod' => 'POST',
308              'parameters' => [
309                'parent' => [
310                  'location' => 'path',
311                  'type' => 'string',
312                  'required' => true,
313                ],
314              ],
315            ],'delete' => [
316              'path' => 'v1/{+name}',
317              'httpMethod' => 'DELETE',
318              'parameters' => [
319                'name' => [
320                  'location' => 'path',
321                  'type' => 'string',
322                  'required' => true,
323                ],
324              ],
325            ],'get' => [
326              'path' => 'v1/{+name}',
327              'httpMethod' => 'GET',
328              'parameters' => [
329                'name' => [
330                  'location' => 'path',
331                  'type' => 'string',
332                  'required' => true,
333                ],
334              ],
335            ],'import' => [
336              'path' => 'v1/{+parent}/customers:import',
337              'httpMethod' => 'POST',
338              'parameters' => [
339                'parent' => [
340                  'location' => 'path',
341                  'type' => 'string',
342                  'required' => true,
343                ],
344              ],
345            ],'list' => [
346              'path' => 'v1/{+parent}/customers',
347              'httpMethod' => 'GET',
348              'parameters' => [
349                'parent' => [
350                  'location' => 'path',
351                  'type' => 'string',
352                  'required' => true,
353                ],
354                'filter' => [
355                  'location' => 'query',
356                  'type' => 'string',
357                ],
358                'pageSize' => [
359                  'location' => 'query',
360                  'type' => 'integer',
361                ],
362                'pageToken' => [
363                  'location' => 'query',
364                  'type' => 'string',
365                ],
366              ],
367            ],'listPurchasableOffers' => [
368              'path' => 'v1/{+customer}:listPurchasableOffers',
369              'httpMethod' => 'GET',
370              'parameters' => [
371                'customer' => [
372                  'location' => 'path',
373                  'type' => 'string',
374                  'required' => true,
375                ],
376                'changeOfferPurchase.entitlement' => [
377                  'location' => 'query',
378                  'type' => 'string',
379                ],
380                'changeOfferPurchase.newSku' => [
381                  'location' => 'query',
382                  'type' => 'string',
383                ],
384                'createEntitlementPurchase.sku' => [
385                  'location' => 'query',
386                  'type' => 'string',
387                ],
388                'languageCode' => [
389                  'location' => 'query',
390                  'type' => 'string',
391                ],
392                'pageSize' => [
393                  'location' => 'query',
394                  'type' => 'integer',
395                ],
396                'pageToken' => [
397                  'location' => 'query',
398                  'type' => 'string',
399                ],
400              ],
401            ],'listPurchasableSkus' => [
402              'path' => 'v1/{+customer}:listPurchasableSkus',
403              'httpMethod' => 'GET',
404              'parameters' => [
405                'customer' => [
406                  'location' => 'path',
407                  'type' => 'string',
408                  'required' => true,
409                ],
410                'changeOfferPurchase.changeType' => [
411                  'location' => 'query',
412                  'type' => 'string',
413                ],
414                'changeOfferPurchase.entitlement' => [
415                  'location' => 'query',
416                  'type' => 'string',
417                ],
418                'createEntitlementPurchase.product' => [
419                  'location' => 'query',
420                  'type' => 'string',
421                ],
422                'languageCode' => [
423                  'location' => 'query',
424                  'type' => 'string',
425                ],
426                'pageSize' => [
427                  'location' => 'query',
428                  'type' => 'integer',
429                ],
430                'pageToken' => [
431                  'location' => 'query',
432                  'type' => 'string',
433                ],
434              ],
435            ],'patch' => [
436              'path' => 'v1/{+name}',
437              'httpMethod' => 'PATCH',
438              'parameters' => [
439                'name' => [
440                  'location' => 'path',
441                  'type' => 'string',
442                  'required' => true,
443                ],
444                'updateMask' => [
445                  'location' => 'query',
446                  'type' => 'string',
447                ],
448              ],
449            ],'provisionCloudIdentity' => [
450              'path' => 'v1/{+customer}:provisionCloudIdentity',
451              'httpMethod' => 'POST',
452              'parameters' => [
453                'customer' => [
454                  'location' => 'path',
455                  'type' => 'string',
456                  'required' => true,
457                ],
458              ],
459            ],'transferEntitlements' => [
460              'path' => 'v1/{+parent}:transferEntitlements',
461              'httpMethod' => 'POST',
462              'parameters' => [
463                'parent' => [
464                  'location' => 'path',
465                  'type' => 'string',
466                  'required' => true,
467                ],
468              ],
469            ],'transferEntitlementsToGoogle' => [
470              'path' => 'v1/{+parent}:transferEntitlementsToGoogle',
471              'httpMethod' => 'POST',
472              'parameters' => [
473                'parent' => [
474                  'location' => 'path',
475                  'type' => 'string',
476                  'required' => true,
477                ],
478              ],
479            ],
480          ]
481        ]
482    );
483    $this->accounts_customers_entitlements = new Cloudchannel\Resource\AccountsCustomersEntitlements(
484        $this,
485        $this->serviceName,
486        'entitlements',
487        [
488          'methods' => [
489            'activate' => [
490              'path' => 'v1/{+name}:activate',
491              'httpMethod' => 'POST',
492              'parameters' => [
493                'name' => [
494                  'location' => 'path',
495                  'type' => 'string',
496                  'required' => true,
497                ],
498              ],
499            ],'cancel' => [
500              'path' => 'v1/{+name}:cancel',
501              'httpMethod' => 'POST',
502              'parameters' => [
503                'name' => [
504                  'location' => 'path',
505                  'type' => 'string',
506                  'required' => true,
507                ],
508              ],
509            ],'changeOffer' => [
510              'path' => 'v1/{+name}:changeOffer',
511              'httpMethod' => 'POST',
512              'parameters' => [
513                'name' => [
514                  'location' => 'path',
515                  'type' => 'string',
516                  'required' => true,
517                ],
518              ],
519            ],'changeParameters' => [
520              'path' => 'v1/{+name}:changeParameters',
521              'httpMethod' => 'POST',
522              'parameters' => [
523                'name' => [
524                  'location' => 'path',
525                  'type' => 'string',
526                  'required' => true,
527                ],
528              ],
529            ],'changeRenewalSettings' => [
530              'path' => 'v1/{+name}:changeRenewalSettings',
531              'httpMethod' => 'POST',
532              'parameters' => [
533                'name' => [
534                  'location' => 'path',
535                  'type' => 'string',
536                  'required' => true,
537                ],
538              ],
539            ],'create' => [
540              'path' => 'v1/{+parent}/entitlements',
541              'httpMethod' => 'POST',
542              'parameters' => [
543                'parent' => [
544                  'location' => 'path',
545                  'type' => 'string',
546                  'required' => true,
547                ],
548              ],
549            ],'get' => [
550              'path' => 'v1/{+name}',
551              'httpMethod' => 'GET',
552              'parameters' => [
553                'name' => [
554                  'location' => 'path',
555                  'type' => 'string',
556                  'required' => true,
557                ],
558              ],
559            ],'list' => [
560              'path' => 'v1/{+parent}/entitlements',
561              'httpMethod' => 'GET',
562              'parameters' => [
563                'parent' => [
564                  'location' => 'path',
565                  'type' => 'string',
566                  'required' => true,
567                ],
568                'pageSize' => [
569                  'location' => 'query',
570                  'type' => 'integer',
571                ],
572                'pageToken' => [
573                  'location' => 'query',
574                  'type' => 'string',
575                ],
576              ],
577            ],'lookupOffer' => [
578              'path' => 'v1/{+entitlement}:lookupOffer',
579              'httpMethod' => 'GET',
580              'parameters' => [
581                'entitlement' => [
582                  'location' => 'path',
583                  'type' => 'string',
584                  'required' => true,
585                ],
586              ],
587            ],'startPaidService' => [
588              'path' => 'v1/{+name}:startPaidService',
589              'httpMethod' => 'POST',
590              'parameters' => [
591                'name' => [
592                  'location' => 'path',
593                  'type' => 'string',
594                  'required' => true,
595                ],
596              ],
597            ],'suspend' => [
598              'path' => 'v1/{+name}:suspend',
599              'httpMethod' => 'POST',
600              'parameters' => [
601                'name' => [
602                  'location' => 'path',
603                  'type' => 'string',
604                  'required' => true,
605                ],
606              ],
607            ],
608          ]
609        ]
610    );
611    $this->accounts_offers = new Cloudchannel\Resource\AccountsOffers(
612        $this,
613        $this->serviceName,
614        'offers',
615        [
616          'methods' => [
617            'list' => [
618              'path' => 'v1/{+parent}/offers',
619              'httpMethod' => 'GET',
620              'parameters' => [
621                'parent' => [
622                  'location' => 'path',
623                  'type' => 'string',
624                  'required' => true,
625                ],
626                'filter' => [
627                  'location' => 'query',
628                  'type' => 'string',
629                ],
630                'languageCode' => [
631                  'location' => 'query',
632                  'type' => 'string',
633                ],
634                'pageSize' => [
635                  'location' => 'query',
636                  'type' => 'integer',
637                ],
638                'pageToken' => [
639                  'location' => 'query',
640                  'type' => 'string',
641                ],
642              ],
643            ],
644          ]
645        ]
646    );
647    $this->operations = new Cloudchannel\Resource\Operations(
648        $this,
649        $this->serviceName,
650        'operations',
651        [
652          'methods' => [
653            'cancel' => [
654              'path' => 'v1/{+name}:cancel',
655              'httpMethod' => 'POST',
656              'parameters' => [
657                'name' => [
658                  'location' => 'path',
659                  'type' => 'string',
660                  'required' => true,
661                ],
662              ],
663            ],'delete' => [
664              'path' => 'v1/{+name}',
665              'httpMethod' => 'DELETE',
666              'parameters' => [
667                'name' => [
668                  'location' => 'path',
669                  'type' => 'string',
670                  'required' => true,
671                ],
672              ],
673            ],'get' => [
674              'path' => 'v1/{+name}',
675              'httpMethod' => 'GET',
676              'parameters' => [
677                'name' => [
678                  'location' => 'path',
679                  'type' => 'string',
680                  'required' => true,
681                ],
682              ],
683            ],'list' => [
684              'path' => 'v1/{+name}',
685              'httpMethod' => 'GET',
686              'parameters' => [
687                'name' => [
688                  'location' => 'path',
689                  'type' => 'string',
690                  'required' => true,
691                ],
692                'filter' => [
693                  'location' => 'query',
694                  'type' => 'string',
695                ],
696                'pageSize' => [
697                  'location' => 'query',
698                  'type' => 'integer',
699                ],
700                'pageToken' => [
701                  'location' => 'query',
702                  'type' => 'string',
703                ],
704              ],
705            ],
706          ]
707        ]
708    );
709    $this->products = new Cloudchannel\Resource\Products(
710        $this,
711        $this->serviceName,
712        'products',
713        [
714          'methods' => [
715            'list' => [
716              'path' => 'v1/products',
717              'httpMethod' => 'GET',
718              'parameters' => [
719                'account' => [
720                  'location' => 'query',
721                  'type' => 'string',
722                ],
723                'languageCode' => [
724                  'location' => 'query',
725                  'type' => 'string',
726                ],
727                'pageSize' => [
728                  'location' => 'query',
729                  'type' => 'integer',
730                ],
731                'pageToken' => [
732                  'location' => 'query',
733                  'type' => 'string',
734                ],
735              ],
736            ],
737          ]
738        ]
739    );
740    $this->products_skus = new Cloudchannel\Resource\ProductsSkus(
741        $this,
742        $this->serviceName,
743        'skus',
744        [
745          'methods' => [
746            'list' => [
747              'path' => 'v1/{+parent}/skus',
748              'httpMethod' => 'GET',
749              'parameters' => [
750                'parent' => [
751                  'location' => 'path',
752                  'type' => 'string',
753                  'required' => true,
754                ],
755                'account' => [
756                  'location' => 'query',
757                  'type' => 'string',
758                ],
759                'languageCode' => [
760                  'location' => 'query',
761                  'type' => 'string',
762                ],
763                'pageSize' => [
764                  'location' => 'query',
765                  'type' => 'integer',
766                ],
767                'pageToken' => [
768                  'location' => 'query',
769                  'type' => 'string',
770                ],
771              ],
772            ],
773          ]
774        ]
775    );
776  }
777}
778
779// Adding a class alias for backwards compatibility with the previous class name.
780class_alias(Cloudchannel::class, 'Google_Service_Cloudchannel');
781