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 CloudMemorystoreforMemcached (v1).
24 *
25 * <p>
26 * Google Cloud Memorystore for Memcached API is used for creating and managing
27 * Memcached instances in GCP.</p>
28 *
29 * <p>
30 * For more information about this service, see the API
31 * <a href="https://cloud.google.com/memorystore/" target="_blank">Documentation</a>
32 * </p>
33 *
34 * @author Google, Inc.
35 */
36class CloudMemorystoreforMemcached extends \Google\Service
37{
38  /** See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.. */
39  const CLOUD_PLATFORM =
40      "https://www.googleapis.com/auth/cloud-platform";
41
42  public $projects_locations;
43  public $projects_locations_instances;
44  public $projects_locations_operations;
45
46  /**
47   * Constructs the internal representation of the CloudMemorystoreforMemcached
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://memcache.googleapis.com/';
58    $this->servicePath = '';
59    $this->batchPath = 'batch';
60    $this->version = 'v1';
61    $this->serviceName = 'memcache';
62
63    $this->projects_locations = new CloudMemorystoreforMemcached\Resource\ProjectsLocations(
64        $this,
65        $this->serviceName,
66        'locations',
67        [
68          'methods' => [
69            'get' => [
70              'path' => 'v1/{+name}',
71              'httpMethod' => 'GET',
72              'parameters' => [
73                'name' => [
74                  'location' => 'path',
75                  'type' => 'string',
76                  'required' => true,
77                ],
78              ],
79            ],'list' => [
80              'path' => 'v1/{+name}/locations',
81              'httpMethod' => 'GET',
82              'parameters' => [
83                'name' => [
84                  'location' => 'path',
85                  'type' => 'string',
86                  'required' => true,
87                ],
88                'filter' => [
89                  'location' => 'query',
90                  'type' => 'string',
91                ],
92                'pageSize' => [
93                  'location' => 'query',
94                  'type' => 'integer',
95                ],
96                'pageToken' => [
97                  'location' => 'query',
98                  'type' => 'string',
99                ],
100              ],
101            ],
102          ]
103        ]
104    );
105    $this->projects_locations_instances = new CloudMemorystoreforMemcached\Resource\ProjectsLocationsInstances(
106        $this,
107        $this->serviceName,
108        'instances',
109        [
110          'methods' => [
111            'applyParameters' => [
112              'path' => 'v1/{+name}:applyParameters',
113              'httpMethod' => 'POST',
114              'parameters' => [
115                'name' => [
116                  'location' => 'path',
117                  'type' => 'string',
118                  'required' => true,
119                ],
120              ],
121            ],'create' => [
122              'path' => 'v1/{+parent}/instances',
123              'httpMethod' => 'POST',
124              'parameters' => [
125                'parent' => [
126                  'location' => 'path',
127                  'type' => 'string',
128                  'required' => true,
129                ],
130                'instanceId' => [
131                  'location' => 'query',
132                  'type' => 'string',
133                ],
134              ],
135            ],'delete' => [
136              'path' => 'v1/{+name}',
137              'httpMethod' => 'DELETE',
138              'parameters' => [
139                'name' => [
140                  'location' => 'path',
141                  'type' => 'string',
142                  'required' => true,
143                ],
144              ],
145            ],'get' => [
146              'path' => 'v1/{+name}',
147              'httpMethod' => 'GET',
148              'parameters' => [
149                'name' => [
150                  'location' => 'path',
151                  'type' => 'string',
152                  'required' => true,
153                ],
154              ],
155            ],'list' => [
156              'path' => 'v1/{+parent}/instances',
157              'httpMethod' => 'GET',
158              'parameters' => [
159                'parent' => [
160                  'location' => 'path',
161                  'type' => 'string',
162                  'required' => true,
163                ],
164                'filter' => [
165                  'location' => 'query',
166                  'type' => 'string',
167                ],
168                'orderBy' => [
169                  'location' => 'query',
170                  'type' => 'string',
171                ],
172                'pageSize' => [
173                  'location' => 'query',
174                  'type' => 'integer',
175                ],
176                'pageToken' => [
177                  'location' => 'query',
178                  'type' => 'string',
179                ],
180              ],
181            ],'patch' => [
182              'path' => 'v1/{+name}',
183              'httpMethod' => 'PATCH',
184              'parameters' => [
185                'name' => [
186                  'location' => 'path',
187                  'type' => 'string',
188                  'required' => true,
189                ],
190                'updateMask' => [
191                  'location' => 'query',
192                  'type' => 'string',
193                ],
194              ],
195            ],'updateParameters' => [
196              'path' => 'v1/{+name}:updateParameters',
197              'httpMethod' => 'PATCH',
198              'parameters' => [
199                'name' => [
200                  'location' => 'path',
201                  'type' => 'string',
202                  'required' => true,
203                ],
204              ],
205            ],
206          ]
207        ]
208    );
209    $this->projects_locations_operations = new CloudMemorystoreforMemcached\Resource\ProjectsLocationsOperations(
210        $this,
211        $this->serviceName,
212        'operations',
213        [
214          'methods' => [
215            'cancel' => [
216              'path' => 'v1/{+name}:cancel',
217              'httpMethod' => 'POST',
218              'parameters' => [
219                'name' => [
220                  'location' => 'path',
221                  'type' => 'string',
222                  'required' => true,
223                ],
224              ],
225            ],'delete' => [
226              'path' => 'v1/{+name}',
227              'httpMethod' => 'DELETE',
228              'parameters' => [
229                'name' => [
230                  'location' => 'path',
231                  'type' => 'string',
232                  'required' => true,
233                ],
234              ],
235            ],'get' => [
236              'path' => 'v1/{+name}',
237              'httpMethod' => 'GET',
238              'parameters' => [
239                'name' => [
240                  'location' => 'path',
241                  'type' => 'string',
242                  'required' => true,
243                ],
244              ],
245            ],'list' => [
246              'path' => 'v1/{+name}/operations',
247              'httpMethod' => 'GET',
248              'parameters' => [
249                'name' => [
250                  'location' => 'path',
251                  'type' => 'string',
252                  'required' => true,
253                ],
254                'filter' => [
255                  'location' => 'query',
256                  'type' => 'string',
257                ],
258                'pageSize' => [
259                  'location' => 'query',
260                  'type' => 'integer',
261                ],
262                'pageToken' => [
263                  'location' => 'query',
264                  'type' => 'string',
265                ],
266              ],
267            ],
268          ]
269        ]
270    );
271  }
272}
273
274// Adding a class alias for backwards compatibility with the previous class name.
275class_alias(CloudMemorystoreforMemcached::class, 'Google_Service_CloudMemorystoreforMemcached');
276