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 SiteVerification (v1).
24 *
25 * <p>
26 * Verifies ownership of websites or domains with Google.</p>
27 *
28 * <p>
29 * For more information about this service, see the API
30 * <a href="https://developers.google.com/site-verification/" target="_blank">Documentation</a>
31 * </p>
32 *
33 * @author Google, Inc.
34 */
35class SiteVerification extends \Google\Service
36{
37  /** Manage the list of sites and domains you control. */
38  const SITEVERIFICATION =
39      "https://www.googleapis.com/auth/siteverification";
40  /** Manage your new site verifications with Google. */
41  const SITEVERIFICATION_VERIFY_ONLY =
42      "https://www.googleapis.com/auth/siteverification.verify_only";
43
44  public $webResource;
45
46  /**
47   * Constructs the internal representation of the SiteVerification service.
48   *
49   * @param Client|array $clientOrConfig The client used to deliver requests, or a
50   *                                     config array to pass to a new Client instance.
51   * @param string $rootUrl The root URL used for requests to the service.
52   */
53  public function __construct($clientOrConfig = [], $rootUrl = null)
54  {
55    parent::__construct($clientOrConfig);
56    $this->rootUrl = $rootUrl ?: 'https://www.googleapis.com/';
57    $this->servicePath = 'siteVerification/v1/';
58    $this->batchPath = 'batch/siteVerification/v1';
59    $this->version = 'v1';
60    $this->serviceName = 'siteVerification';
61
62    $this->webResource = new SiteVerification\Resource\WebResource(
63        $this,
64        $this->serviceName,
65        'webResource',
66        [
67          'methods' => [
68            'delete' => [
69              'path' => 'webResource/{id}',
70              'httpMethod' => 'DELETE',
71              'parameters' => [
72                'id' => [
73                  'location' => 'path',
74                  'type' => 'string',
75                  'required' => true,
76                ],
77              ],
78            ],'get' => [
79              'path' => 'webResource/{id}',
80              'httpMethod' => 'GET',
81              'parameters' => [
82                'id' => [
83                  'location' => 'path',
84                  'type' => 'string',
85                  'required' => true,
86                ],
87              ],
88            ],'getToken' => [
89              'path' => 'token',
90              'httpMethod' => 'POST',
91              'parameters' => [],
92            ],'insert' => [
93              'path' => 'webResource',
94              'httpMethod' => 'POST',
95              'parameters' => [
96                'verificationMethod' => [
97                  'location' => 'query',
98                  'type' => 'string',
99                  'required' => true,
100                ],
101              ],
102            ],'list' => [
103              'path' => 'webResource',
104              'httpMethod' => 'GET',
105              'parameters' => [],
106            ],'patch' => [
107              'path' => 'webResource/{id}',
108              'httpMethod' => 'PATCH',
109              'parameters' => [
110                'id' => [
111                  'location' => 'path',
112                  'type' => 'string',
113                  'required' => true,
114                ],
115              ],
116            ],'update' => [
117              'path' => 'webResource/{id}',
118              'httpMethod' => 'PUT',
119              'parameters' => [
120                'id' => [
121                  'location' => 'path',
122                  'type' => 'string',
123                  'required' => true,
124                ],
125              ],
126            ],
127          ]
128        ]
129    );
130  }
131}
132
133// Adding a class alias for backwards compatibility with the previous class name.
134class_alias(SiteVerification::class, 'Google_Service_SiteVerification');
135