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 MyBusinessQA (v1).
24 *
25 * <p>
26 * The My Business Q API allows questions and answers to be posted for specific
27 * listings.</p>
28 *
29 * <p>
30 * For more information about this service, see the API
31 * <a href="https://developers.google.com/my-business/" target="_blank">Documentation</a>
32 * </p>
33 *
34 * @author Google, Inc.
35 */
36class MyBusinessQA extends \Google\Service
37{
38
39
40  public $locations_questions;
41  public $locations_questions_answers;
42
43  /**
44   * Constructs the internal representation of the MyBusinessQA 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://mybusinessqanda.googleapis.com/';
54    $this->servicePath = '';
55    $this->batchPath = 'batch';
56    $this->version = 'v1';
57    $this->serviceName = 'mybusinessqanda';
58
59    $this->locations_questions = new MyBusinessQA\Resource\LocationsQuestions(
60        $this,
61        $this->serviceName,
62        'questions',
63        [
64          'methods' => [
65            'create' => [
66              'path' => 'v1/{+parent}',
67              'httpMethod' => 'POST',
68              'parameters' => [
69                'parent' => [
70                  'location' => 'path',
71                  'type' => 'string',
72                  'required' => true,
73                ],
74              ],
75            ],'delete' => [
76              'path' => 'v1/{+name}',
77              'httpMethod' => 'DELETE',
78              'parameters' => [
79                'name' => [
80                  'location' => 'path',
81                  'type' => 'string',
82                  'required' => true,
83                ],
84              ],
85            ],'list' => [
86              'path' => 'v1/{+parent}',
87              'httpMethod' => 'GET',
88              'parameters' => [
89                'parent' => [
90                  'location' => 'path',
91                  'type' => 'string',
92                  'required' => true,
93                ],
94                'answersPerQuestion' => [
95                  'location' => 'query',
96                  'type' => 'integer',
97                ],
98                'filter' => [
99                  'location' => 'query',
100                  'type' => 'string',
101                ],
102                'orderBy' => [
103                  'location' => 'query',
104                  'type' => 'string',
105                ],
106                'pageSize' => [
107                  'location' => 'query',
108                  'type' => 'integer',
109                ],
110                'pageToken' => [
111                  'location' => 'query',
112                  'type' => 'string',
113                ],
114              ],
115            ],'patch' => [
116              'path' => 'v1/{+name}',
117              'httpMethod' => 'PATCH',
118              'parameters' => [
119                'name' => [
120                  'location' => 'path',
121                  'type' => 'string',
122                  'required' => true,
123                ],
124                'updateMask' => [
125                  'location' => 'query',
126                  'type' => 'string',
127                ],
128              ],
129            ],
130          ]
131        ]
132    );
133    $this->locations_questions_answers = new MyBusinessQA\Resource\LocationsQuestionsAnswers(
134        $this,
135        $this->serviceName,
136        'answers',
137        [
138          'methods' => [
139            'delete' => [
140              'path' => 'v1/{+name}/answers:delete',
141              'httpMethod' => 'DELETE',
142              'parameters' => [
143                'name' => [
144                  'location' => 'path',
145                  'type' => 'string',
146                  'required' => true,
147                ],
148              ],
149            ],'list' => [
150              'path' => 'v1/{+parent}/answers',
151              'httpMethod' => 'GET',
152              'parameters' => [
153                'parent' => [
154                  'location' => 'path',
155                  'type' => 'string',
156                  'required' => true,
157                ],
158                'orderBy' => [
159                  'location' => 'query',
160                  'type' => 'string',
161                ],
162                'pageSize' => [
163                  'location' => 'query',
164                  'type' => 'integer',
165                ],
166                'pageToken' => [
167                  'location' => 'query',
168                  'type' => 'string',
169                ],
170              ],
171            ],'upsert' => [
172              'path' => 'v1/{+parent}/answers:upsert',
173              'httpMethod' => 'POST',
174              'parameters' => [
175                'parent' => [
176                  'location' => 'path',
177                  'type' => 'string',
178                  'required' => true,
179                ],
180              ],
181            ],
182          ]
183        ]
184    );
185  }
186}
187
188// Adding a class alias for backwards compatibility with the previous class name.
189class_alias(MyBusinessQA::class, 'Google_Service_MyBusinessQA');
190