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 StreetViewPublish (v1).
24 *
25 * <p>
26 * Publishes 360 photos to Google Maps, along with position, orientation, and
27 * connectivity metadata. Apps can offer an interface for positioning,
28 * connecting, and uploading user-generated Street View images.</p>
29 *
30 * <p>
31 * For more information about this service, see the API
32 * <a href="https://developers.google.com/streetview/publish/" target="_blank">Documentation</a>
33 * </p>
34 *
35 * @author Google, Inc.
36 */
37class StreetViewPublish extends \Google\Service
38{
39  /** Publish and manage your 360 photos on Google Street View. */
40  const STREETVIEWPUBLISH =
41      "https://www.googleapis.com/auth/streetviewpublish";
42
43  public $photo;
44  public $photos;
45
46  /**
47   * Constructs the internal representation of the StreetViewPublish 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://streetviewpublish.googleapis.com/';
57    $this->servicePath = '';
58    $this->batchPath = 'batch';
59    $this->version = 'v1';
60    $this->serviceName = 'streetviewpublish';
61
62    $this->photo = new StreetViewPublish\Resource\Photo(
63        $this,
64        $this->serviceName,
65        'photo',
66        [
67          'methods' => [
68            'create' => [
69              'path' => 'v1/photo',
70              'httpMethod' => 'POST',
71              'parameters' => [],
72            ],'delete' => [
73              'path' => 'v1/photo/{photoId}',
74              'httpMethod' => 'DELETE',
75              'parameters' => [
76                'photoId' => [
77                  'location' => 'path',
78                  'type' => 'string',
79                  'required' => true,
80                ],
81              ],
82            ],'get' => [
83              'path' => 'v1/photo/{photoId}',
84              'httpMethod' => 'GET',
85              'parameters' => [
86                'photoId' => [
87                  'location' => 'path',
88                  'type' => 'string',
89                  'required' => true,
90                ],
91                'languageCode' => [
92                  'location' => 'query',
93                  'type' => 'string',
94                ],
95                'view' => [
96                  'location' => 'query',
97                  'type' => 'string',
98                ],
99              ],
100            ],'startUpload' => [
101              'path' => 'v1/photo:startUpload',
102              'httpMethod' => 'POST',
103              'parameters' => [],
104            ],'update' => [
105              'path' => 'v1/photo/{id}',
106              'httpMethod' => 'PUT',
107              'parameters' => [
108                'id' => [
109                  'location' => 'path',
110                  'type' => 'string',
111                  'required' => true,
112                ],
113                'updateMask' => [
114                  'location' => 'query',
115                  'type' => 'string',
116                ],
117              ],
118            ],
119          ]
120        ]
121    );
122    $this->photos = new StreetViewPublish\Resource\Photos(
123        $this,
124        $this->serviceName,
125        'photos',
126        [
127          'methods' => [
128            'batchDelete' => [
129              'path' => 'v1/photos:batchDelete',
130              'httpMethod' => 'POST',
131              'parameters' => [],
132            ],'batchGet' => [
133              'path' => 'v1/photos:batchGet',
134              'httpMethod' => 'GET',
135              'parameters' => [
136                'languageCode' => [
137                  'location' => 'query',
138                  'type' => 'string',
139                ],
140                'photoIds' => [
141                  'location' => 'query',
142                  'type' => 'string',
143                  'repeated' => true,
144                ],
145                'view' => [
146                  'location' => 'query',
147                  'type' => 'string',
148                ],
149              ],
150            ],'batchUpdate' => [
151              'path' => 'v1/photos:batchUpdate',
152              'httpMethod' => 'POST',
153              'parameters' => [],
154            ],'list' => [
155              'path' => 'v1/photos',
156              'httpMethod' => 'GET',
157              'parameters' => [
158                'filter' => [
159                  'location' => 'query',
160                  'type' => 'string',
161                ],
162                'languageCode' => [
163                  'location' => 'query',
164                  'type' => 'string',
165                ],
166                'pageSize' => [
167                  'location' => 'query',
168                  'type' => 'integer',
169                ],
170                'pageToken' => [
171                  'location' => 'query',
172                  'type' => 'string',
173                ],
174                'view' => [
175                  'location' => 'query',
176                  'type' => 'string',
177                ],
178              ],
179            ],
180          ]
181        ]
182    );
183  }
184}
185
186// Adding a class alias for backwards compatibility with the previous class name.
187class_alias(StreetViewPublish::class, 'Google_Service_StreetViewPublish');
188