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 MyBusinessPlaceActions (v1).
24 *
25 * <p>
26 * The My Business Place Actions API provides an interface for managing place
27 * action links of a location on Google.</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 MyBusinessPlaceActions extends \Google\Service
37{
38
39
40  public $locations_placeActionLinks;
41  public $placeActionTypeMetadata;
42
43  /**
44   * Constructs the internal representation of the MyBusinessPlaceActions
45   * service.
46   *
47   * @param Client|array $clientOrConfig The client used to deliver requests, or a
48   *                                     config array to pass to a new Client instance.
49   * @param string $rootUrl The root URL used for requests to the service.
50   */
51  public function __construct($clientOrConfig = [], $rootUrl = null)
52  {
53    parent::__construct($clientOrConfig);
54    $this->rootUrl = $rootUrl ?: 'https://mybusinessplaceactions.googleapis.com/';
55    $this->servicePath = '';
56    $this->batchPath = 'batch';
57    $this->version = 'v1';
58    $this->serviceName = 'mybusinessplaceactions';
59
60    $this->locations_placeActionLinks = new MyBusinessPlaceActions\Resource\LocationsPlaceActionLinks(
61        $this,
62        $this->serviceName,
63        'placeActionLinks',
64        [
65          'methods' => [
66            'create' => [
67              'path' => 'v1/{+parent}/placeActionLinks',
68              'httpMethod' => 'POST',
69              'parameters' => [
70                'parent' => [
71                  'location' => 'path',
72                  'type' => 'string',
73                  'required' => true,
74                ],
75              ],
76            ],'delete' => [
77              'path' => 'v1/{+name}',
78              'httpMethod' => 'DELETE',
79              'parameters' => [
80                'name' => [
81                  'location' => 'path',
82                  'type' => 'string',
83                  'required' => true,
84                ],
85              ],
86            ],'get' => [
87              'path' => 'v1/{+name}',
88              'httpMethod' => 'GET',
89              'parameters' => [
90                'name' => [
91                  'location' => 'path',
92                  'type' => 'string',
93                  'required' => true,
94                ],
95              ],
96            ],'list' => [
97              'path' => 'v1/{+parent}/placeActionLinks',
98              'httpMethod' => 'GET',
99              'parameters' => [
100                'parent' => [
101                  'location' => 'path',
102                  'type' => 'string',
103                  'required' => true,
104                ],
105                'filter' => [
106                  'location' => 'query',
107                  'type' => 'string',
108                ],
109                'pageSize' => [
110                  'location' => 'query',
111                  'type' => 'integer',
112                ],
113                'pageToken' => [
114                  'location' => 'query',
115                  'type' => 'string',
116                ],
117              ],
118            ],'patch' => [
119              'path' => 'v1/{+name}',
120              'httpMethod' => 'PATCH',
121              'parameters' => [
122                'name' => [
123                  'location' => 'path',
124                  'type' => 'string',
125                  'required' => true,
126                ],
127                'updateMask' => [
128                  'location' => 'query',
129                  'type' => 'string',
130                ],
131              ],
132            ],
133          ]
134        ]
135    );
136    $this->placeActionTypeMetadata = new MyBusinessPlaceActions\Resource\PlaceActionTypeMetadata(
137        $this,
138        $this->serviceName,
139        'placeActionTypeMetadata',
140        [
141          'methods' => [
142            'list' => [
143              'path' => 'v1/placeActionTypeMetadata',
144              'httpMethod' => 'GET',
145              'parameters' => [
146                'filter' => [
147                  'location' => 'query',
148                  'type' => 'string',
149                ],
150                'languageCode' => [
151                  'location' => 'query',
152                  'type' => 'string',
153                ],
154                'pageSize' => [
155                  'location' => 'query',
156                  'type' => 'integer',
157                ],
158                'pageToken' => [
159                  'location' => 'query',
160                  'type' => 'string',
161                ],
162              ],
163            ],
164          ]
165        ]
166    );
167  }
168}
169
170// Adding a class alias for backwards compatibility with the previous class name.
171class_alias(MyBusinessPlaceActions::class, 'Google_Service_MyBusinessPlaceActions');
172