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 MyBusinessAccountManagement (v1). 24 * 25 * <p> 26 * The My Business Account Management API provides an interface for managing 27 * access to 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 MyBusinessAccountManagement extends \Google\Service 37{ 38 39 40 public $accounts; 41 public $accounts_admins; 42 public $accounts_invitations; 43 public $locations; 44 public $locations_admins; 45 46 /** 47 * Constructs the internal representation of the MyBusinessAccountManagement 48 * service. 49 * 50 * @param Client|array $clientOrConfig The client used to deliver requests, or a 51 * config array to pass to a new Client instance. 52 * @param string $rootUrl The root URL used for requests to the service. 53 */ 54 public function __construct($clientOrConfig = [], $rootUrl = null) 55 { 56 parent::__construct($clientOrConfig); 57 $this->rootUrl = $rootUrl ?: 'https://mybusinessaccountmanagement.googleapis.com/'; 58 $this->servicePath = ''; 59 $this->batchPath = 'batch'; 60 $this->version = 'v1'; 61 $this->serviceName = 'mybusinessaccountmanagement'; 62 63 $this->accounts = new MyBusinessAccountManagement\Resource\Accounts( 64 $this, 65 $this->serviceName, 66 'accounts', 67 [ 68 'methods' => [ 69 'create' => [ 70 'path' => 'v1/accounts', 71 'httpMethod' => 'POST', 72 'parameters' => [], 73 ],'get' => [ 74 'path' => 'v1/{+name}', 75 'httpMethod' => 'GET', 76 'parameters' => [ 77 'name' => [ 78 'location' => 'path', 79 'type' => 'string', 80 'required' => true, 81 ], 82 ], 83 ],'list' => [ 84 'path' => 'v1/accounts', 85 'httpMethod' => 'GET', 86 'parameters' => [ 87 'filter' => [ 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 'parentAccount' => [ 100 'location' => 'query', 101 'type' => 'string', 102 ], 103 ], 104 ],'patch' => [ 105 'path' => 'v1/{+name}', 106 'httpMethod' => 'PATCH', 107 'parameters' => [ 108 'name' => [ 109 'location' => 'path', 110 'type' => 'string', 111 'required' => true, 112 ], 113 'updateMask' => [ 114 'location' => 'query', 115 'type' => 'string', 116 ], 117 'validateOnly' => [ 118 'location' => 'query', 119 'type' => 'boolean', 120 ], 121 ], 122 ], 123 ] 124 ] 125 ); 126 $this->accounts_admins = new MyBusinessAccountManagement\Resource\AccountsAdmins( 127 $this, 128 $this->serviceName, 129 'admins', 130 [ 131 'methods' => [ 132 'create' => [ 133 'path' => 'v1/{+parent}/admins', 134 'httpMethod' => 'POST', 135 'parameters' => [ 136 'parent' => [ 137 'location' => 'path', 138 'type' => 'string', 139 'required' => true, 140 ], 141 ], 142 ],'delete' => [ 143 'path' => 'v1/{+name}', 144 'httpMethod' => 'DELETE', 145 'parameters' => [ 146 'name' => [ 147 'location' => 'path', 148 'type' => 'string', 149 'required' => true, 150 ], 151 ], 152 ],'list' => [ 153 'path' => 'v1/{+parent}/admins', 154 'httpMethod' => 'GET', 155 'parameters' => [ 156 'parent' => [ 157 'location' => 'path', 158 'type' => 'string', 159 'required' => true, 160 ], 161 ], 162 ],'patch' => [ 163 'path' => 'v1/{+name}', 164 'httpMethod' => 'PATCH', 165 'parameters' => [ 166 'name' => [ 167 'location' => 'path', 168 'type' => 'string', 169 'required' => true, 170 ], 171 'updateMask' => [ 172 'location' => 'query', 173 'type' => 'string', 174 ], 175 ], 176 ], 177 ] 178 ] 179 ); 180 $this->accounts_invitations = new MyBusinessAccountManagement\Resource\AccountsInvitations( 181 $this, 182 $this->serviceName, 183 'invitations', 184 [ 185 'methods' => [ 186 'accept' => [ 187 'path' => 'v1/{+name}:accept', 188 'httpMethod' => 'POST', 189 'parameters' => [ 190 'name' => [ 191 'location' => 'path', 192 'type' => 'string', 193 'required' => true, 194 ], 195 ], 196 ],'decline' => [ 197 'path' => 'v1/{+name}:decline', 198 'httpMethod' => 'POST', 199 'parameters' => [ 200 'name' => [ 201 'location' => 'path', 202 'type' => 'string', 203 'required' => true, 204 ], 205 ], 206 ],'list' => [ 207 'path' => 'v1/{+parent}/invitations', 208 'httpMethod' => 'GET', 209 'parameters' => [ 210 'parent' => [ 211 'location' => 'path', 212 'type' => 'string', 213 'required' => true, 214 ], 215 'filter' => [ 216 'location' => 'query', 217 'type' => 'string', 218 ], 219 ], 220 ], 221 ] 222 ] 223 ); 224 $this->locations = new MyBusinessAccountManagement\Resource\Locations( 225 $this, 226 $this->serviceName, 227 'locations', 228 [ 229 'methods' => [ 230 'transfer' => [ 231 'path' => 'v1/{+name}:transfer', 232 'httpMethod' => 'POST', 233 'parameters' => [ 234 'name' => [ 235 'location' => 'path', 236 'type' => 'string', 237 'required' => true, 238 ], 239 ], 240 ], 241 ] 242 ] 243 ); 244 $this->locations_admins = new MyBusinessAccountManagement\Resource\LocationsAdmins( 245 $this, 246 $this->serviceName, 247 'admins', 248 [ 249 'methods' => [ 250 'create' => [ 251 'path' => 'v1/{+parent}/admins', 252 'httpMethod' => 'POST', 253 'parameters' => [ 254 'parent' => [ 255 'location' => 'path', 256 'type' => 'string', 257 'required' => true, 258 ], 259 ], 260 ],'delete' => [ 261 'path' => 'v1/{+name}', 262 'httpMethod' => 'DELETE', 263 'parameters' => [ 264 'name' => [ 265 'location' => 'path', 266 'type' => 'string', 267 'required' => true, 268 ], 269 ], 270 ],'list' => [ 271 'path' => 'v1/{+parent}/admins', 272 'httpMethod' => 'GET', 273 'parameters' => [ 274 'parent' => [ 275 'location' => 'path', 276 'type' => 'string', 277 'required' => true, 278 ], 279 ], 280 ],'patch' => [ 281 'path' => 'v1/{+name}', 282 'httpMethod' => 'PATCH', 283 'parameters' => [ 284 'name' => [ 285 'location' => 'path', 286 'type' => 'string', 287 'required' => true, 288 ], 289 'updateMask' => [ 290 'location' => 'query', 291 'type' => 'string', 292 ], 293 ], 294 ], 295 ] 296 ] 297 ); 298 } 299} 300 301// Adding a class alias for backwards compatibility with the previous class name. 302class_alias(MyBusinessAccountManagement::class, 'Google_Service_MyBusinessAccountManagement'); 303