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