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 ManufacturerCenter (v1).
24 *
25 * <p>
26 * Public API for managing Manufacturer Center related data.</p>
27 *
28 * <p>
29 * For more information about this service, see the API
30 * <a href="https://developers.google.com/manufacturers/" target="_blank">Documentation</a>
31 * </p>
32 *
33 * @author Google, Inc.
34 */
35class ManufacturerCenter extends \Google\Service
36{
37  /** Manage your product listings for Google Manufacturer Center. */
38  const MANUFACTURERCENTER =
39      "https://www.googleapis.com/auth/manufacturercenter";
40
41  public $accounts_products;
42
43  /**
44   * Constructs the internal representation of the ManufacturerCenter service.
45   *
46   * @param Client|array $clientOrConfig The client used to deliver requests, or a
47   *                                     config array to pass to a new Client instance.
48   * @param string $rootUrl The root URL used for requests to the service.
49   */
50  public function __construct($clientOrConfig = [], $rootUrl = null)
51  {
52    parent::__construct($clientOrConfig);
53    $this->rootUrl = $rootUrl ?: 'https://manufacturers.googleapis.com/';
54    $this->servicePath = '';
55    $this->batchPath = 'batch';
56    $this->version = 'v1';
57    $this->serviceName = 'manufacturers';
58
59    $this->accounts_products = new ManufacturerCenter\Resource\AccountsProducts(
60        $this,
61        $this->serviceName,
62        'products',
63        [
64          'methods' => [
65            'delete' => [
66              'path' => 'v1/{+parent}/products/{+name}',
67              'httpMethod' => 'DELETE',
68              'parameters' => [
69                'parent' => [
70                  'location' => 'path',
71                  'type' => 'string',
72                  'required' => true,
73                ],
74                'name' => [
75                  'location' => 'path',
76                  'type' => 'string',
77                  'required' => true,
78                ],
79              ],
80            ],'get' => [
81              'path' => 'v1/{+parent}/products/{+name}',
82              'httpMethod' => 'GET',
83              'parameters' => [
84                'parent' => [
85                  'location' => 'path',
86                  'type' => 'string',
87                  'required' => true,
88                ],
89                'name' => [
90                  'location' => 'path',
91                  'type' => 'string',
92                  'required' => true,
93                ],
94                'include' => [
95                  'location' => 'query',
96                  'type' => 'string',
97                  'repeated' => true,
98                ],
99              ],
100            ],'list' => [
101              'path' => 'v1/{+parent}/products',
102              'httpMethod' => 'GET',
103              'parameters' => [
104                'parent' => [
105                  'location' => 'path',
106                  'type' => 'string',
107                  'required' => true,
108                ],
109                'include' => [
110                  'location' => 'query',
111                  'type' => 'string',
112                  'repeated' => true,
113                ],
114                'pageSize' => [
115                  'location' => 'query',
116                  'type' => 'integer',
117                ],
118                'pageToken' => [
119                  'location' => 'query',
120                  'type' => 'string',
121                ],
122              ],
123            ],'update' => [
124              'path' => 'v1/{+parent}/products/{+name}',
125              'httpMethod' => 'PUT',
126              'parameters' => [
127                'parent' => [
128                  'location' => 'path',
129                  'type' => 'string',
130                  'required' => true,
131                ],
132                'name' => [
133                  'location' => 'path',
134                  'type' => 'string',
135                  'required' => true,
136                ],
137              ],
138            ],
139          ]
140        ]
141    );
142  }
143}
144
145// Adding a class alias for backwards compatibility with the previous class name.
146class_alias(ManufacturerCenter::class, 'Google_Service_ManufacturerCenter');
147