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 AuthorizedBuyersMarketplace (v1).
24 *
25 * <p>
26 * The Authorized Buyers Marketplace API lets buyers programmatically discover
27 * inventory; propose, retrieve and negotiate deals with publishers.</p>
28 *
29 * <p>
30 * For more information about this service, see the API
31 * <a href="https://developers.google.com/authorized-buyers/apis/marketplace/reference/rest/" target="_blank">Documentation</a>
32 * </p>
33 *
34 * @author Google, Inc.
35 */
36class AuthorizedBuyersMarketplace extends \Google\Service
37{
38  /** See, create, edit, and delete your Authorized Buyers Marketplace entities.. */
39  const AUTHORIZED_BUYERS_MARKETPLACE =
40      "https://www.googleapis.com/auth/authorized-buyers-marketplace";
41
42  public $bidders_finalizedDeals;
43  public $buyers_auctionPackages;
44  public $buyers_clients;
45  public $buyers_clients_users;
46  public $buyers_finalizedDeals;
47  public $buyers_proposals;
48  public $buyers_proposals_deals;
49  public $buyers_publisherProfiles;
50
51  /**
52   * Constructs the internal representation of the AuthorizedBuyersMarketplace
53   * service.
54   *
55   * @param Client|array $clientOrConfig The client used to deliver requests, or a
56   *                                     config array to pass to a new Client instance.
57   * @param string $rootUrl The root URL used for requests to the service.
58   */
59  public function __construct($clientOrConfig = [], $rootUrl = null)
60  {
61    parent::__construct($clientOrConfig);
62    $this->rootUrl = $rootUrl ?: 'https://authorizedbuyersmarketplace.googleapis.com/';
63    $this->servicePath = '';
64    $this->batchPath = 'batch';
65    $this->version = 'v1';
66    $this->serviceName = 'authorizedbuyersmarketplace';
67
68    $this->bidders_finalizedDeals = new AuthorizedBuyersMarketplace\Resource\BiddersFinalizedDeals(
69        $this,
70        $this->serviceName,
71        'finalizedDeals',
72        [
73          'methods' => [
74            'list' => [
75              'path' => 'v1/{+parent}/finalizedDeals',
76              'httpMethod' => 'GET',
77              'parameters' => [
78                'parent' => [
79                  'location' => 'path',
80                  'type' => 'string',
81                  'required' => true,
82                ],
83                'filter' => [
84                  'location' => 'query',
85                  'type' => 'string',
86                ],
87                'orderBy' => [
88                  'location' => 'query',
89                  'type' => 'string',
90                ],
91                'pageSize' => [
92                  'location' => 'query',
93                  'type' => 'integer',
94                ],
95                'pageToken' => [
96                  'location' => 'query',
97                  'type' => 'string',
98                ],
99              ],
100            ],
101          ]
102        ]
103    );
104    $this->buyers_auctionPackages = new AuthorizedBuyersMarketplace\Resource\BuyersAuctionPackages(
105        $this,
106        $this->serviceName,
107        'auctionPackages',
108        [
109          'methods' => [
110            'get' => [
111              'path' => 'v1/{+name}',
112              'httpMethod' => 'GET',
113              'parameters' => [
114                'name' => [
115                  'location' => 'path',
116                  'type' => 'string',
117                  'required' => true,
118                ],
119              ],
120            ],'list' => [
121              'path' => 'v1/{+parent}/auctionPackages',
122              'httpMethod' => 'GET',
123              'parameters' => [
124                'parent' => [
125                  'location' => 'path',
126                  'type' => 'string',
127                  'required' => true,
128                ],
129                'pageSize' => [
130                  'location' => 'query',
131                  'type' => 'integer',
132                ],
133                'pageToken' => [
134                  'location' => 'query',
135                  'type' => 'string',
136                ],
137              ],
138            ],'subscribe' => [
139              'path' => 'v1/{+name}:subscribe',
140              'httpMethod' => 'POST',
141              'parameters' => [
142                'name' => [
143                  'location' => 'path',
144                  'type' => 'string',
145                  'required' => true,
146                ],
147              ],
148            ],'subscribeClients' => [
149              'path' => 'v1/{+auctionPackage}:subscribeClients',
150              'httpMethod' => 'POST',
151              'parameters' => [
152                'auctionPackage' => [
153                  'location' => 'path',
154                  'type' => 'string',
155                  'required' => true,
156                ],
157              ],
158            ],'unsubscribe' => [
159              'path' => 'v1/{+name}:unsubscribe',
160              'httpMethod' => 'POST',
161              'parameters' => [
162                'name' => [
163                  'location' => 'path',
164                  'type' => 'string',
165                  'required' => true,
166                ],
167              ],
168            ],'unsubscribeClients' => [
169              'path' => 'v1/{+auctionPackage}:unsubscribeClients',
170              'httpMethod' => 'POST',
171              'parameters' => [
172                'auctionPackage' => [
173                  'location' => 'path',
174                  'type' => 'string',
175                  'required' => true,
176                ],
177              ],
178            ],
179          ]
180        ]
181    );
182    $this->buyers_clients = new AuthorizedBuyersMarketplace\Resource\BuyersClients(
183        $this,
184        $this->serviceName,
185        'clients',
186        [
187          'methods' => [
188            'activate' => [
189              'path' => 'v1/{+name}:activate',
190              'httpMethod' => 'POST',
191              'parameters' => [
192                'name' => [
193                  'location' => 'path',
194                  'type' => 'string',
195                  'required' => true,
196                ],
197              ],
198            ],'create' => [
199              'path' => 'v1/{+parent}/clients',
200              'httpMethod' => 'POST',
201              'parameters' => [
202                'parent' => [
203                  'location' => 'path',
204                  'type' => 'string',
205                  'required' => true,
206                ],
207              ],
208            ],'deactivate' => [
209              'path' => 'v1/{+name}:deactivate',
210              'httpMethod' => 'POST',
211              'parameters' => [
212                'name' => [
213                  'location' => 'path',
214                  'type' => 'string',
215                  'required' => true,
216                ],
217              ],
218            ],'get' => [
219              'path' => 'v1/{+name}',
220              'httpMethod' => 'GET',
221              'parameters' => [
222                'name' => [
223                  'location' => 'path',
224                  'type' => 'string',
225                  'required' => true,
226                ],
227              ],
228            ],'list' => [
229              'path' => 'v1/{+parent}/clients',
230              'httpMethod' => 'GET',
231              'parameters' => [
232                'parent' => [
233                  'location' => 'path',
234                  'type' => 'string',
235                  'required' => true,
236                ],
237                'filter' => [
238                  'location' => 'query',
239                  'type' => 'string',
240                ],
241                'pageSize' => [
242                  'location' => 'query',
243                  'type' => 'integer',
244                ],
245                'pageToken' => [
246                  'location' => 'query',
247                  'type' => 'string',
248                ],
249              ],
250            ],'patch' => [
251              'path' => 'v1/{+name}',
252              'httpMethod' => 'PATCH',
253              'parameters' => [
254                'name' => [
255                  'location' => 'path',
256                  'type' => 'string',
257                  'required' => true,
258                ],
259                'updateMask' => [
260                  'location' => 'query',
261                  'type' => 'string',
262                ],
263              ],
264            ],
265          ]
266        ]
267    );
268    $this->buyers_clients_users = new AuthorizedBuyersMarketplace\Resource\BuyersClientsUsers(
269        $this,
270        $this->serviceName,
271        'users',
272        [
273          'methods' => [
274            'activate' => [
275              'path' => 'v1/{+name}:activate',
276              'httpMethod' => 'POST',
277              'parameters' => [
278                'name' => [
279                  'location' => 'path',
280                  'type' => 'string',
281                  'required' => true,
282                ],
283              ],
284            ],'create' => [
285              'path' => 'v1/{+parent}/users',
286              'httpMethod' => 'POST',
287              'parameters' => [
288                'parent' => [
289                  'location' => 'path',
290                  'type' => 'string',
291                  'required' => true,
292                ],
293              ],
294            ],'deactivate' => [
295              'path' => 'v1/{+name}:deactivate',
296              'httpMethod' => 'POST',
297              'parameters' => [
298                'name' => [
299                  'location' => 'path',
300                  'type' => 'string',
301                  'required' => true,
302                ],
303              ],
304            ],'delete' => [
305              'path' => 'v1/{+name}',
306              'httpMethod' => 'DELETE',
307              'parameters' => [
308                'name' => [
309                  'location' => 'path',
310                  'type' => 'string',
311                  'required' => true,
312                ],
313              ],
314            ],'get' => [
315              'path' => 'v1/{+name}',
316              'httpMethod' => 'GET',
317              'parameters' => [
318                'name' => [
319                  'location' => 'path',
320                  'type' => 'string',
321                  'required' => true,
322                ],
323              ],
324            ],'list' => [
325              'path' => 'v1/{+parent}/users',
326              'httpMethod' => 'GET',
327              'parameters' => [
328                'parent' => [
329                  'location' => 'path',
330                  'type' => 'string',
331                  'required' => true,
332                ],
333                'pageSize' => [
334                  'location' => 'query',
335                  'type' => 'integer',
336                ],
337                'pageToken' => [
338                  'location' => 'query',
339                  'type' => 'string',
340                ],
341              ],
342            ],
343          ]
344        ]
345    );
346    $this->buyers_finalizedDeals = new AuthorizedBuyersMarketplace\Resource\BuyersFinalizedDeals(
347        $this,
348        $this->serviceName,
349        'finalizedDeals',
350        [
351          'methods' => [
352            'addCreative' => [
353              'path' => 'v1/{+deal}:addCreative',
354              'httpMethod' => 'POST',
355              'parameters' => [
356                'deal' => [
357                  'location' => 'path',
358                  'type' => 'string',
359                  'required' => true,
360                ],
361              ],
362            ],'get' => [
363              'path' => 'v1/{+name}',
364              'httpMethod' => 'GET',
365              'parameters' => [
366                'name' => [
367                  'location' => 'path',
368                  'type' => 'string',
369                  'required' => true,
370                ],
371              ],
372            ],'list' => [
373              'path' => 'v1/{+parent}/finalizedDeals',
374              'httpMethod' => 'GET',
375              'parameters' => [
376                'parent' => [
377                  'location' => 'path',
378                  'type' => 'string',
379                  'required' => true,
380                ],
381                'filter' => [
382                  'location' => 'query',
383                  'type' => 'string',
384                ],
385                'orderBy' => [
386                  'location' => 'query',
387                  'type' => 'string',
388                ],
389                'pageSize' => [
390                  'location' => 'query',
391                  'type' => 'integer',
392                ],
393                'pageToken' => [
394                  'location' => 'query',
395                  'type' => 'string',
396                ],
397              ],
398            ],'pause' => [
399              'path' => 'v1/{+name}:pause',
400              'httpMethod' => 'POST',
401              'parameters' => [
402                'name' => [
403                  'location' => 'path',
404                  'type' => 'string',
405                  'required' => true,
406                ],
407              ],
408            ],'resume' => [
409              'path' => 'v1/{+name}:resume',
410              'httpMethod' => 'POST',
411              'parameters' => [
412                'name' => [
413                  'location' => 'path',
414                  'type' => 'string',
415                  'required' => true,
416                ],
417              ],
418            ],'setReadyToServe' => [
419              'path' => 'v1/{+deal}:setReadyToServe',
420              'httpMethod' => 'POST',
421              'parameters' => [
422                'deal' => [
423                  'location' => 'path',
424                  'type' => 'string',
425                  'required' => true,
426                ],
427              ],
428            ],
429          ]
430        ]
431    );
432    $this->buyers_proposals = new AuthorizedBuyersMarketplace\Resource\BuyersProposals(
433        $this,
434        $this->serviceName,
435        'proposals',
436        [
437          'methods' => [
438            'accept' => [
439              'path' => 'v1/{+name}:accept',
440              'httpMethod' => 'POST',
441              'parameters' => [
442                'name' => [
443                  'location' => 'path',
444                  'type' => 'string',
445                  'required' => true,
446                ],
447              ],
448            ],'addNote' => [
449              'path' => 'v1/{+proposal}:addNote',
450              'httpMethod' => 'POST',
451              'parameters' => [
452                'proposal' => [
453                  'location' => 'path',
454                  'type' => 'string',
455                  'required' => true,
456                ],
457              ],
458            ],'cancelNegotiation' => [
459              'path' => 'v1/{+proposal}:cancelNegotiation',
460              'httpMethod' => 'POST',
461              'parameters' => [
462                'proposal' => [
463                  'location' => 'path',
464                  'type' => 'string',
465                  'required' => true,
466                ],
467              ],
468            ],'get' => [
469              'path' => 'v1/{+name}',
470              'httpMethod' => 'GET',
471              'parameters' => [
472                'name' => [
473                  'location' => 'path',
474                  'type' => 'string',
475                  'required' => true,
476                ],
477              ],
478            ],'list' => [
479              'path' => 'v1/{+parent}/proposals',
480              'httpMethod' => 'GET',
481              'parameters' => [
482                'parent' => [
483                  'location' => 'path',
484                  'type' => 'string',
485                  'required' => true,
486                ],
487                'filter' => [
488                  'location' => 'query',
489                  'type' => 'string',
490                ],
491                'pageSize' => [
492                  'location' => 'query',
493                  'type' => 'integer',
494                ],
495                'pageToken' => [
496                  'location' => 'query',
497                  'type' => 'string',
498                ],
499              ],
500            ],'patch' => [
501              'path' => 'v1/{+name}',
502              'httpMethod' => 'PATCH',
503              'parameters' => [
504                'name' => [
505                  'location' => 'path',
506                  'type' => 'string',
507                  'required' => true,
508                ],
509                'updateMask' => [
510                  'location' => 'query',
511                  'type' => 'string',
512                ],
513              ],
514            ],'sendRfp' => [
515              'path' => 'v1/{+buyer}/proposals:sendRfp',
516              'httpMethod' => 'POST',
517              'parameters' => [
518                'buyer' => [
519                  'location' => 'path',
520                  'type' => 'string',
521                  'required' => true,
522                ],
523              ],
524            ],
525          ]
526        ]
527    );
528    $this->buyers_proposals_deals = new AuthorizedBuyersMarketplace\Resource\BuyersProposalsDeals(
529        $this,
530        $this->serviceName,
531        'deals',
532        [
533          'methods' => [
534            'batchUpdate' => [
535              'path' => 'v1/{+parent}/deals:batchUpdate',
536              'httpMethod' => 'POST',
537              'parameters' => [
538                'parent' => [
539                  'location' => 'path',
540                  'type' => 'string',
541                  'required' => true,
542                ],
543              ],
544            ],'get' => [
545              'path' => 'v1/{+name}',
546              'httpMethod' => 'GET',
547              'parameters' => [
548                'name' => [
549                  'location' => 'path',
550                  'type' => 'string',
551                  'required' => true,
552                ],
553              ],
554            ],'list' => [
555              'path' => 'v1/{+parent}/deals',
556              'httpMethod' => 'GET',
557              'parameters' => [
558                'parent' => [
559                  'location' => 'path',
560                  'type' => 'string',
561                  'required' => true,
562                ],
563                'pageSize' => [
564                  'location' => 'query',
565                  'type' => 'integer',
566                ],
567                'pageToken' => [
568                  'location' => 'query',
569                  'type' => 'string',
570                ],
571              ],
572            ],'patch' => [
573              'path' => 'v1/{+name}',
574              'httpMethod' => 'PATCH',
575              'parameters' => [
576                'name' => [
577                  'location' => 'path',
578                  'type' => 'string',
579                  'required' => true,
580                ],
581                'updateMask' => [
582                  'location' => 'query',
583                  'type' => 'string',
584                ],
585              ],
586            ],
587          ]
588        ]
589    );
590    $this->buyers_publisherProfiles = new AuthorizedBuyersMarketplace\Resource\BuyersPublisherProfiles(
591        $this,
592        $this->serviceName,
593        'publisherProfiles',
594        [
595          'methods' => [
596            'get' => [
597              'path' => 'v1/{+name}',
598              'httpMethod' => 'GET',
599              'parameters' => [
600                'name' => [
601                  'location' => 'path',
602                  'type' => 'string',
603                  'required' => true,
604                ],
605              ],
606            ],'list' => [
607              'path' => 'v1/{+parent}/publisherProfiles',
608              'httpMethod' => 'GET',
609              'parameters' => [
610                'parent' => [
611                  'location' => 'path',
612                  'type' => 'string',
613                  'required' => true,
614                ],
615                'filter' => [
616                  'location' => 'query',
617                  'type' => 'string',
618                ],
619                'pageSize' => [
620                  'location' => 'query',
621                  'type' => 'integer',
622                ],
623                'pageToken' => [
624                  'location' => 'query',
625                  'type' => 'string',
626                ],
627              ],
628            ],
629          ]
630        ]
631    );
632  }
633}
634
635// Adding a class alias for backwards compatibility with the previous class name.
636class_alias(AuthorizedBuyersMarketplace::class, 'Google_Service_AuthorizedBuyersMarketplace');
637