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 Partners (v2).
20 *
21 * <p>
22 * Searches certified companies and creates contact leads with them, and also
23 * audits the usage of clients.</p>
24 *
25 * <p>
26 * For more information about this service, see the API
27 * <a href="https://developers.google.com/partners/" target="_blank">Documentation</a>
28 * </p>
29 *
30 * @author Google, Inc.
31 */
32class Google_Service_Partners extends Google_Service
33{
34
35
36  public $analytics;
37  public $clientMessages;
38  public $companies;
39  public $companies_leads;
40  public $leads;
41  public $offers;
42  public $offers_history;
43  public $userEvents;
44  public $userStates;
45  public $users;
46  public $v2;
47
48  /**
49   * Constructs the internal representation of the Partners service.
50   *
51   * @param Google_Client $client
52   */
53  public function __construct(Google_Client $client)
54  {
55    parent::__construct($client);
56    $this->rootUrl = 'https://partners.googleapis.com/';
57    $this->servicePath = '';
58    $this->batchPath = 'batch';
59    $this->version = 'v2';
60    $this->serviceName = 'partners';
61
62    $this->analytics = new Google_Service_Partners_Resource_Analytics(
63        $this,
64        $this->serviceName,
65        'analytics',
66        array(
67          'methods' => array(
68            'list' => array(
69              'path' => 'v2/analytics',
70              'httpMethod' => 'GET',
71              'parameters' => array(
72                'requestMetadata.userOverrides.userId' => array(
73                  'location' => 'query',
74                  'type' => 'string',
75                ),
76                'requestMetadata.partnersSessionId' => array(
77                  'location' => 'query',
78                  'type' => 'string',
79                ),
80                'pageToken' => array(
81                  'location' => 'query',
82                  'type' => 'string',
83                ),
84                'pageSize' => array(
85                  'location' => 'query',
86                  'type' => 'integer',
87                ),
88                'requestMetadata.trafficSource.trafficSourceId' => array(
89                  'location' => 'query',
90                  'type' => 'string',
91                ),
92                'requestMetadata.locale' => array(
93                  'location' => 'query',
94                  'type' => 'string',
95                ),
96                'requestMetadata.userOverrides.ipAddress' => array(
97                  'location' => 'query',
98                  'type' => 'string',
99                ),
100                'requestMetadata.experimentIds' => array(
101                  'location' => 'query',
102                  'type' => 'string',
103                  'repeated' => true,
104                ),
105                'requestMetadata.trafficSource.trafficSubId' => array(
106                  'location' => 'query',
107                  'type' => 'string',
108                ),
109              ),
110            ),
111          )
112        )
113    );
114    $this->clientMessages = new Google_Service_Partners_Resource_ClientMessages(
115        $this,
116        $this->serviceName,
117        'clientMessages',
118        array(
119          'methods' => array(
120            'log' => array(
121              'path' => 'v2/clientMessages:log',
122              'httpMethod' => 'POST',
123              'parameters' => array(),
124            ),
125          )
126        )
127    );
128    $this->companies = new Google_Service_Partners_Resource_Companies(
129        $this,
130        $this->serviceName,
131        'companies',
132        array(
133          'methods' => array(
134            'get' => array(
135              'path' => 'v2/companies/{companyId}',
136              'httpMethod' => 'GET',
137              'parameters' => array(
138                'companyId' => array(
139                  'location' => 'path',
140                  'type' => 'string',
141                  'required' => true,
142                ),
143                'requestMetadata.trafficSource.trafficSourceId' => array(
144                  'location' => 'query',
145                  'type' => 'string',
146                ),
147                'requestMetadata.userOverrides.ipAddress' => array(
148                  'location' => 'query',
149                  'type' => 'string',
150                ),
151                'requestMetadata.experimentIds' => array(
152                  'location' => 'query',
153                  'type' => 'string',
154                  'repeated' => true,
155                ),
156                'currencyCode' => array(
157                  'location' => 'query',
158                  'type' => 'string',
159                ),
160                'orderBy' => array(
161                  'location' => 'query',
162                  'type' => 'string',
163                ),
164                'requestMetadata.trafficSource.trafficSubId' => array(
165                  'location' => 'query',
166                  'type' => 'string',
167                ),
168                'requestMetadata.userOverrides.userId' => array(
169                  'location' => 'query',
170                  'type' => 'string',
171                ),
172                'requestMetadata.partnersSessionId' => array(
173                  'location' => 'query',
174                  'type' => 'string',
175                ),
176                'view' => array(
177                  'location' => 'query',
178                  'type' => 'string',
179                ),
180                'requestMetadata.locale' => array(
181                  'location' => 'query',
182                  'type' => 'string',
183                ),
184                'address' => array(
185                  'location' => 'query',
186                  'type' => 'string',
187                ),
188              ),
189            ),'list' => array(
190              'path' => 'v2/companies',
191              'httpMethod' => 'GET',
192              'parameters' => array(
193                'services' => array(
194                  'location' => 'query',
195                  'type' => 'string',
196                  'repeated' => true,
197                ),
198                'requestMetadata.trafficSource.trafficSourceId' => array(
199                  'location' => 'query',
200                  'type' => 'string',
201                ),
202                'maxMonthlyBudget.units' => array(
203                  'location' => 'query',
204                  'type' => 'string',
205                ),
206                'requestMetadata.trafficSource.trafficSubId' => array(
207                  'location' => 'query',
208                  'type' => 'string',
209                ),
210                'minMonthlyBudget.nanos' => array(
211                  'location' => 'query',
212                  'type' => 'integer',
213                ),
214                'requestMetadata.partnersSessionId' => array(
215                  'location' => 'query',
216                  'type' => 'string',
217                ),
218                'pageToken' => array(
219                  'location' => 'query',
220                  'type' => 'string',
221                ),
222                'companyName' => array(
223                  'location' => 'query',
224                  'type' => 'string',
225                ),
226                'industries' => array(
227                  'location' => 'query',
228                  'type' => 'string',
229                  'repeated' => true,
230                ),
231                'websiteUrl' => array(
232                  'location' => 'query',
233                  'type' => 'string',
234                ),
235                'gpsMotivations' => array(
236                  'location' => 'query',
237                  'type' => 'string',
238                  'repeated' => true,
239                ),
240                'languageCodes' => array(
241                  'location' => 'query',
242                  'type' => 'string',
243                  'repeated' => true,
244                ),
245                'pageSize' => array(
246                  'location' => 'query',
247                  'type' => 'integer',
248                ),
249                'requestMetadata.userOverrides.ipAddress' => array(
250                  'location' => 'query',
251                  'type' => 'string',
252                ),
253                'requestMetadata.experimentIds' => array(
254                  'location' => 'query',
255                  'type' => 'string',
256                  'repeated' => true,
257                ),
258                'orderBy' => array(
259                  'location' => 'query',
260                  'type' => 'string',
261                ),
262                'specializations' => array(
263                  'location' => 'query',
264                  'type' => 'string',
265                  'repeated' => true,
266                ),
267                'maxMonthlyBudget.currencyCode' => array(
268                  'location' => 'query',
269                  'type' => 'string',
270                ),
271                'requestMetadata.userOverrides.userId' => array(
272                  'location' => 'query',
273                  'type' => 'string',
274                ),
275                'minMonthlyBudget.currencyCode' => array(
276                  'location' => 'query',
277                  'type' => 'string',
278                ),
279                'view' => array(
280                  'location' => 'query',
281                  'type' => 'string',
282                ),
283                'requestMetadata.locale' => array(
284                  'location' => 'query',
285                  'type' => 'string',
286                ),
287                'address' => array(
288                  'location' => 'query',
289                  'type' => 'string',
290                ),
291                'minMonthlyBudget.units' => array(
292                  'location' => 'query',
293                  'type' => 'string',
294                ),
295                'maxMonthlyBudget.nanos' => array(
296                  'location' => 'query',
297                  'type' => 'integer',
298                ),
299              ),
300            ),
301          )
302        )
303    );
304    $this->companies_leads = new Google_Service_Partners_Resource_CompaniesLeads(
305        $this,
306        $this->serviceName,
307        'leads',
308        array(
309          'methods' => array(
310            'create' => array(
311              'path' => 'v2/companies/{companyId}/leads',
312              'httpMethod' => 'POST',
313              'parameters' => array(
314                'companyId' => array(
315                  'location' => 'path',
316                  'type' => 'string',
317                  'required' => true,
318                ),
319              ),
320            ),
321          )
322        )
323    );
324    $this->leads = new Google_Service_Partners_Resource_Leads(
325        $this,
326        $this->serviceName,
327        'leads',
328        array(
329          'methods' => array(
330            'list' => array(
331              'path' => 'v2/leads',
332              'httpMethod' => 'GET',
333              'parameters' => array(
334                'requestMetadata.experimentIds' => array(
335                  'location' => 'query',
336                  'type' => 'string',
337                  'repeated' => true,
338                ),
339                'requestMetadata.trafficSource.trafficSubId' => array(
340                  'location' => 'query',
341                  'type' => 'string',
342                ),
343                'orderBy' => array(
344                  'location' => 'query',
345                  'type' => 'string',
346                ),
347                'requestMetadata.userOverrides.userId' => array(
348                  'location' => 'query',
349                  'type' => 'string',
350                ),
351                'requestMetadata.partnersSessionId' => array(
352                  'location' => 'query',
353                  'type' => 'string',
354                ),
355                'pageToken' => array(
356                  'location' => 'query',
357                  'type' => 'string',
358                ),
359                'pageSize' => array(
360                  'location' => 'query',
361                  'type' => 'integer',
362                ),
363                'requestMetadata.trafficSource.trafficSourceId' => array(
364                  'location' => 'query',
365                  'type' => 'string',
366                ),
367                'requestMetadata.locale' => array(
368                  'location' => 'query',
369                  'type' => 'string',
370                ),
371                'requestMetadata.userOverrides.ipAddress' => array(
372                  'location' => 'query',
373                  'type' => 'string',
374                ),
375              ),
376            ),
377          )
378        )
379    );
380    $this->offers = new Google_Service_Partners_Resource_Offers(
381        $this,
382        $this->serviceName,
383        'offers',
384        array(
385          'methods' => array(
386            'list' => array(
387              'path' => 'v2/offers',
388              'httpMethod' => 'GET',
389              'parameters' => array(
390                'requestMetadata.userOverrides.userId' => array(
391                  'location' => 'query',
392                  'type' => 'string',
393                ),
394                'requestMetadata.partnersSessionId' => array(
395                  'location' => 'query',
396                  'type' => 'string',
397                ),
398                'requestMetadata.trafficSource.trafficSourceId' => array(
399                  'location' => 'query',
400                  'type' => 'string',
401                ),
402                'requestMetadata.locale' => array(
403                  'location' => 'query',
404                  'type' => 'string',
405                ),
406                'requestMetadata.userOverrides.ipAddress' => array(
407                  'location' => 'query',
408                  'type' => 'string',
409                ),
410                'requestMetadata.experimentIds' => array(
411                  'location' => 'query',
412                  'type' => 'string',
413                  'repeated' => true,
414                ),
415                'requestMetadata.trafficSource.trafficSubId' => array(
416                  'location' => 'query',
417                  'type' => 'string',
418                ),
419              ),
420            ),
421          )
422        )
423    );
424    $this->offers_history = new Google_Service_Partners_Resource_OffersHistory(
425        $this,
426        $this->serviceName,
427        'history',
428        array(
429          'methods' => array(
430            'list' => array(
431              'path' => 'v2/offers/history',
432              'httpMethod' => 'GET',
433              'parameters' => array(
434                'requestMetadata.partnersSessionId' => array(
435                  'location' => 'query',
436                  'type' => 'string',
437                ),
438                'requestMetadata.userOverrides.userId' => array(
439                  'location' => 'query',
440                  'type' => 'string',
441                ),
442                'pageToken' => array(
443                  'location' => 'query',
444                  'type' => 'string',
445                ),
446                'pageSize' => array(
447                  'location' => 'query',
448                  'type' => 'integer',
449                ),
450                'requestMetadata.trafficSource.trafficSourceId' => array(
451                  'location' => 'query',
452                  'type' => 'string',
453                ),
454                'requestMetadata.locale' => array(
455                  'location' => 'query',
456                  'type' => 'string',
457                ),
458                'requestMetadata.userOverrides.ipAddress' => array(
459                  'location' => 'query',
460                  'type' => 'string',
461                ),
462                'entireCompany' => array(
463                  'location' => 'query',
464                  'type' => 'boolean',
465                ),
466                'requestMetadata.experimentIds' => array(
467                  'location' => 'query',
468                  'type' => 'string',
469                  'repeated' => true,
470                ),
471                'orderBy' => array(
472                  'location' => 'query',
473                  'type' => 'string',
474                ),
475                'requestMetadata.trafficSource.trafficSubId' => array(
476                  'location' => 'query',
477                  'type' => 'string',
478                ),
479              ),
480            ),
481          )
482        )
483    );
484    $this->userEvents = new Google_Service_Partners_Resource_UserEvents(
485        $this,
486        $this->serviceName,
487        'userEvents',
488        array(
489          'methods' => array(
490            'log' => array(
491              'path' => 'v2/userEvents:log',
492              'httpMethod' => 'POST',
493              'parameters' => array(),
494            ),
495          )
496        )
497    );
498    $this->userStates = new Google_Service_Partners_Resource_UserStates(
499        $this,
500        $this->serviceName,
501        'userStates',
502        array(
503          'methods' => array(
504            'list' => array(
505              'path' => 'v2/userStates',
506              'httpMethod' => 'GET',
507              'parameters' => array(
508                'requestMetadata.locale' => array(
509                  'location' => 'query',
510                  'type' => 'string',
511                ),
512                'requestMetadata.userOverrides.ipAddress' => array(
513                  'location' => 'query',
514                  'type' => 'string',
515                ),
516                'requestMetadata.experimentIds' => array(
517                  'location' => 'query',
518                  'type' => 'string',
519                  'repeated' => true,
520                ),
521                'requestMetadata.trafficSource.trafficSubId' => array(
522                  'location' => 'query',
523                  'type' => 'string',
524                ),
525                'requestMetadata.userOverrides.userId' => array(
526                  'location' => 'query',
527                  'type' => 'string',
528                ),
529                'requestMetadata.partnersSessionId' => array(
530                  'location' => 'query',
531                  'type' => 'string',
532                ),
533                'requestMetadata.trafficSource.trafficSourceId' => array(
534                  'location' => 'query',
535                  'type' => 'string',
536                ),
537              ),
538            ),
539          )
540        )
541    );
542    $this->users = new Google_Service_Partners_Resource_Users(
543        $this,
544        $this->serviceName,
545        'users',
546        array(
547          'methods' => array(
548            'createCompanyRelation' => array(
549              'path' => 'v2/users/{userId}/companyRelation',
550              'httpMethod' => 'PUT',
551              'parameters' => array(
552                'userId' => array(
553                  'location' => 'path',
554                  'type' => 'string',
555                  'required' => true,
556                ),
557                'requestMetadata.partnersSessionId' => array(
558                  'location' => 'query',
559                  'type' => 'string',
560                ),
561                'requestMetadata.userOverrides.userId' => array(
562                  'location' => 'query',
563                  'type' => 'string',
564                ),
565                'requestMetadata.trafficSource.trafficSourceId' => array(
566                  'location' => 'query',
567                  'type' => 'string',
568                ),
569                'requestMetadata.locale' => array(
570                  'location' => 'query',
571                  'type' => 'string',
572                ),
573                'requestMetadata.userOverrides.ipAddress' => array(
574                  'location' => 'query',
575                  'type' => 'string',
576                ),
577                'requestMetadata.experimentIds' => array(
578                  'location' => 'query',
579                  'type' => 'string',
580                  'repeated' => true,
581                ),
582                'requestMetadata.trafficSource.trafficSubId' => array(
583                  'location' => 'query',
584                  'type' => 'string',
585                ),
586              ),
587            ),'deleteCompanyRelation' => array(
588              'path' => 'v2/users/{userId}/companyRelation',
589              'httpMethod' => 'DELETE',
590              'parameters' => array(
591                'userId' => array(
592                  'location' => 'path',
593                  'type' => 'string',
594                  'required' => true,
595                ),
596                'requestMetadata.locale' => array(
597                  'location' => 'query',
598                  'type' => 'string',
599                ),
600                'requestMetadata.userOverrides.ipAddress' => array(
601                  'location' => 'query',
602                  'type' => 'string',
603                ),
604                'requestMetadata.experimentIds' => array(
605                  'location' => 'query',
606                  'type' => 'string',
607                  'repeated' => true,
608                ),
609                'requestMetadata.trafficSource.trafficSubId' => array(
610                  'location' => 'query',
611                  'type' => 'string',
612                ),
613                'requestMetadata.userOverrides.userId' => array(
614                  'location' => 'query',
615                  'type' => 'string',
616                ),
617                'requestMetadata.partnersSessionId' => array(
618                  'location' => 'query',
619                  'type' => 'string',
620                ),
621                'requestMetadata.trafficSource.trafficSourceId' => array(
622                  'location' => 'query',
623                  'type' => 'string',
624                ),
625              ),
626            ),'get' => array(
627              'path' => 'v2/users/{userId}',
628              'httpMethod' => 'GET',
629              'parameters' => array(
630                'userId' => array(
631                  'location' => 'path',
632                  'type' => 'string',
633                  'required' => true,
634                ),
635                'requestMetadata.userOverrides.userId' => array(
636                  'location' => 'query',
637                  'type' => 'string',
638                ),
639                'requestMetadata.partnersSessionId' => array(
640                  'location' => 'query',
641                  'type' => 'string',
642                ),
643                'userView' => array(
644                  'location' => 'query',
645                  'type' => 'string',
646                ),
647                'requestMetadata.trafficSource.trafficSourceId' => array(
648                  'location' => 'query',
649                  'type' => 'string',
650                ),
651                'requestMetadata.locale' => array(
652                  'location' => 'query',
653                  'type' => 'string',
654                ),
655                'requestMetadata.userOverrides.ipAddress' => array(
656                  'location' => 'query',
657                  'type' => 'string',
658                ),
659                'requestMetadata.experimentIds' => array(
660                  'location' => 'query',
661                  'type' => 'string',
662                  'repeated' => true,
663                ),
664                'requestMetadata.trafficSource.trafficSubId' => array(
665                  'location' => 'query',
666                  'type' => 'string',
667                ),
668              ),
669            ),'updateProfile' => array(
670              'path' => 'v2/users/profile',
671              'httpMethod' => 'PATCH',
672              'parameters' => array(
673                'requestMetadata.locale' => array(
674                  'location' => 'query',
675                  'type' => 'string',
676                ),
677                'requestMetadata.userOverrides.ipAddress' => array(
678                  'location' => 'query',
679                  'type' => 'string',
680                ),
681                'requestMetadata.experimentIds' => array(
682                  'location' => 'query',
683                  'type' => 'string',
684                  'repeated' => true,
685                ),
686                'requestMetadata.trafficSource.trafficSubId' => array(
687                  'location' => 'query',
688                  'type' => 'string',
689                ),
690                'requestMetadata.userOverrides.userId' => array(
691                  'location' => 'query',
692                  'type' => 'string',
693                ),
694                'requestMetadata.partnersSessionId' => array(
695                  'location' => 'query',
696                  'type' => 'string',
697                ),
698                'requestMetadata.trafficSource.trafficSourceId' => array(
699                  'location' => 'query',
700                  'type' => 'string',
701                ),
702              ),
703            ),
704          )
705        )
706    );
707    $this->v2 = new Google_Service_Partners_Resource_V2(
708        $this,
709        $this->serviceName,
710        'v2',
711        array(
712          'methods' => array(
713            'getPartnersstatus' => array(
714              'path' => 'v2/partnersstatus',
715              'httpMethod' => 'GET',
716              'parameters' => array(
717                'requestMetadata.locale' => array(
718                  'location' => 'query',
719                  'type' => 'string',
720                ),
721                'requestMetadata.userOverrides.ipAddress' => array(
722                  'location' => 'query',
723                  'type' => 'string',
724                ),
725                'requestMetadata.experimentIds' => array(
726                  'location' => 'query',
727                  'type' => 'string',
728                  'repeated' => true,
729                ),
730                'requestMetadata.trafficSource.trafficSubId' => array(
731                  'location' => 'query',
732                  'type' => 'string',
733                ),
734                'requestMetadata.userOverrides.userId' => array(
735                  'location' => 'query',
736                  'type' => 'string',
737                ),
738                'requestMetadata.partnersSessionId' => array(
739                  'location' => 'query',
740                  'type' => 'string',
741                ),
742                'requestMetadata.trafficSource.trafficSourceId' => array(
743                  'location' => 'query',
744                  'type' => 'string',
745                ),
746              ),
747            ),'updateCompanies' => array(
748              'path' => 'v2/companies',
749              'httpMethod' => 'PATCH',
750              'parameters' => array(
751                'requestMetadata.experimentIds' => array(
752                  'location' => 'query',
753                  'type' => 'string',
754                  'repeated' => true,
755                ),
756                'requestMetadata.trafficSource.trafficSubId' => array(
757                  'location' => 'query',
758                  'type' => 'string',
759                ),
760                'requestMetadata.partnersSessionId' => array(
761                  'location' => 'query',
762                  'type' => 'string',
763                ),
764                'requestMetadata.userOverrides.userId' => array(
765                  'location' => 'query',
766                  'type' => 'string',
767                ),
768                'requestMetadata.trafficSource.trafficSourceId' => array(
769                  'location' => 'query',
770                  'type' => 'string',
771                ),
772                'requestMetadata.locale' => array(
773                  'location' => 'query',
774                  'type' => 'string',
775                ),
776                'requestMetadata.userOverrides.ipAddress' => array(
777                  'location' => 'query',
778                  'type' => 'string',
779                ),
780                'updateMask' => array(
781                  'location' => 'query',
782                  'type' => 'string',
783                ),
784              ),
785            ),'updateLeads' => array(
786              'path' => 'v2/leads',
787              'httpMethod' => 'PATCH',
788              'parameters' => array(
789                'requestMetadata.experimentIds' => array(
790                  'location' => 'query',
791                  'type' => 'string',
792                  'repeated' => true,
793                ),
794                'requestMetadata.trafficSource.trafficSubId' => array(
795                  'location' => 'query',
796                  'type' => 'string',
797                ),
798                'requestMetadata.userOverrides.userId' => array(
799                  'location' => 'query',
800                  'type' => 'string',
801                ),
802                'requestMetadata.partnersSessionId' => array(
803                  'location' => 'query',
804                  'type' => 'string',
805                ),
806                'requestMetadata.trafficSource.trafficSourceId' => array(
807                  'location' => 'query',
808                  'type' => 'string',
809                ),
810                'requestMetadata.locale' => array(
811                  'location' => 'query',
812                  'type' => 'string',
813                ),
814                'requestMetadata.userOverrides.ipAddress' => array(
815                  'location' => 'query',
816                  'type' => 'string',
817                ),
818                'updateMask' => array(
819                  'location' => 'query',
820                  'type' => 'string',
821                ),
822              ),
823            ),
824          )
825        )
826    );
827  }
828}
829