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\SiteVerification\Resource;
19
20use Google\Service\SiteVerification\SiteVerificationWebResourceGettokenRequest;
21use Google\Service\SiteVerification\SiteVerificationWebResourceGettokenResponse;
22use Google\Service\SiteVerification\SiteVerificationWebResourceListResponse;
23use Google\Service\SiteVerification\SiteVerificationWebResourceResource;
24
25/**
26 * The "webResource" collection of methods.
27 * Typical usage is:
28 *  <code>
29 *   $siteVerificationService = new Google\Service\SiteVerification(...);
30 *   $webResource = $siteVerificationService->webResource;
31 *  </code>
32 */
33class WebResource extends \Google\Service\Resource
34{
35  /**
36   * Relinquish ownership of a website or domain. (webResource.delete)
37   *
38   * @param string $id The id of a verified site or domain.
39   * @param array $optParams Optional parameters.
40   */
41  public function delete($id, $optParams = [])
42  {
43    $params = ['id' => $id];
44    $params = array_merge($params, $optParams);
45    return $this->call('delete', [$params]);
46  }
47  /**
48   * Get the most current data for a website or domain. (webResource.get)
49   *
50   * @param string $id The id of a verified site or domain.
51   * @param array $optParams Optional parameters.
52   * @return SiteVerificationWebResourceResource
53   */
54  public function get($id, $optParams = [])
55  {
56    $params = ['id' => $id];
57    $params = array_merge($params, $optParams);
58    return $this->call('get', [$params], SiteVerificationWebResourceResource::class);
59  }
60  /**
61   * Get a verification token for placing on a website or domain.
62   * (webResource.getToken)
63   *
64   * @param SiteVerificationWebResourceGettokenRequest $postBody
65   * @param array $optParams Optional parameters.
66   * @return SiteVerificationWebResourceGettokenResponse
67   */
68  public function getToken(SiteVerificationWebResourceGettokenRequest $postBody, $optParams = [])
69  {
70    $params = ['postBody' => $postBody];
71    $params = array_merge($params, $optParams);
72    return $this->call('getToken', [$params], SiteVerificationWebResourceGettokenResponse::class);
73  }
74  /**
75   * Attempt verification of a website or domain. (webResource.insert)
76   *
77   * @param string $verificationMethod The method to use for verifying a site or
78   * domain.
79   * @param SiteVerificationWebResourceResource $postBody
80   * @param array $optParams Optional parameters.
81   * @return SiteVerificationWebResourceResource
82   */
83  public function insert($verificationMethod, SiteVerificationWebResourceResource $postBody, $optParams = [])
84  {
85    $params = ['verificationMethod' => $verificationMethod, 'postBody' => $postBody];
86    $params = array_merge($params, $optParams);
87    return $this->call('insert', [$params], SiteVerificationWebResourceResource::class);
88  }
89  /**
90   * Get the list of your verified websites and domains.
91   * (webResource.listWebResource)
92   *
93   * @param array $optParams Optional parameters.
94   * @return SiteVerificationWebResourceListResponse
95   */
96  public function listWebResource($optParams = [])
97  {
98    $params = [];
99    $params = array_merge($params, $optParams);
100    return $this->call('list', [$params], SiteVerificationWebResourceListResponse::class);
101  }
102  /**
103   * Modify the list of owners for your website or domain. This method supports
104   * patch semantics. (webResource.patch)
105   *
106   * @param string $id The id of a verified site or domain.
107   * @param SiteVerificationWebResourceResource $postBody
108   * @param array $optParams Optional parameters.
109   * @return SiteVerificationWebResourceResource
110   */
111  public function patch($id, SiteVerificationWebResourceResource $postBody, $optParams = [])
112  {
113    $params = ['id' => $id, 'postBody' => $postBody];
114    $params = array_merge($params, $optParams);
115    return $this->call('patch', [$params], SiteVerificationWebResourceResource::class);
116  }
117  /**
118   * Modify the list of owners for your website or domain. (webResource.update)
119   *
120   * @param string $id The id of a verified site or domain.
121   * @param SiteVerificationWebResourceResource $postBody
122   * @param array $optParams Optional parameters.
123   * @return SiteVerificationWebResourceResource
124   */
125  public function update($id, SiteVerificationWebResourceResource $postBody, $optParams = [])
126  {
127    $params = ['id' => $id, 'postBody' => $postBody];
128    $params = array_merge($params, $optParams);
129    return $this->call('update', [$params], SiteVerificationWebResourceResource::class);
130  }
131}
132
133// Adding a class alias for backwards compatibility with the previous class name.
134class_alias(WebResource::class, 'Google_Service_SiteVerification_Resource_WebResource');
135