[e3d4e0a] | 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 |
|
---|
| 18 | namespace Google\Service\StreetViewPublish\Resource;
|
---|
| 19 |
|
---|
| 20 | use Google\Service\StreetViewPublish\BatchDeletePhotosRequest;
|
---|
| 21 | use Google\Service\StreetViewPublish\BatchDeletePhotosResponse;
|
---|
| 22 | use Google\Service\StreetViewPublish\BatchGetPhotosResponse;
|
---|
| 23 | use Google\Service\StreetViewPublish\BatchUpdatePhotosRequest;
|
---|
| 24 | use Google\Service\StreetViewPublish\BatchUpdatePhotosResponse;
|
---|
| 25 | use Google\Service\StreetViewPublish\ListPhotosResponse;
|
---|
| 26 |
|
---|
| 27 | /**
|
---|
| 28 | * The "photos" collection of methods.
|
---|
| 29 | * Typical usage is:
|
---|
| 30 | * <code>
|
---|
| 31 | * $streetviewpublishService = new Google\Service\StreetViewPublish(...);
|
---|
| 32 | * $photos = $streetviewpublishService->photos;
|
---|
| 33 | * </code>
|
---|
| 34 | */
|
---|
| 35 | class Photos extends \Google\Service\Resource
|
---|
| 36 | {
|
---|
| 37 | /**
|
---|
| 38 | * Deletes a list of Photos and their metadata. Note that if BatchDeletePhotos
|
---|
| 39 | * fails, either critical fields are missing or there is an authentication
|
---|
| 40 | * error. Even if BatchDeletePhotos succeeds, individual photos in the batch may
|
---|
| 41 | * have failures. These failures are specified in each PhotoResponse.status in
|
---|
| 42 | * BatchDeletePhotosResponse.results. See DeletePhoto for specific failures that
|
---|
| 43 | * can occur per photo. (photos.batchDelete)
|
---|
| 44 | *
|
---|
| 45 | * @param BatchDeletePhotosRequest $postBody
|
---|
| 46 | * @param array $optParams Optional parameters.
|
---|
| 47 | * @return BatchDeletePhotosResponse
|
---|
| 48 | * @throws \Google\Service\Exception
|
---|
| 49 | */
|
---|
| 50 | public function batchDelete(BatchDeletePhotosRequest $postBody, $optParams = [])
|
---|
| 51 | {
|
---|
| 52 | $params = ['postBody' => $postBody];
|
---|
| 53 | $params = array_merge($params, $optParams);
|
---|
| 54 | return $this->call('batchDelete', [$params], BatchDeletePhotosResponse::class);
|
---|
| 55 | }
|
---|
| 56 | /**
|
---|
| 57 | * Gets the metadata of the specified Photo batch. Note that if BatchGetPhotos
|
---|
| 58 | * fails, either critical fields are missing or there is an authentication
|
---|
| 59 | * error. Even if BatchGetPhotos succeeds, individual photos in the batch may
|
---|
| 60 | * have failures. These failures are specified in each PhotoResponse.status in
|
---|
| 61 | * BatchGetPhotosResponse.results. See GetPhoto for specific failures that can
|
---|
| 62 | * occur per photo. (photos.batchGet)
|
---|
| 63 | *
|
---|
| 64 | * @param array $optParams Optional parameters.
|
---|
| 65 | *
|
---|
| 66 | * @opt_param string languageCode Optional. The BCP-47 language code, such as
|
---|
| 67 | * "en-US" or "sr-Latn". For more information, see
|
---|
| 68 | * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. If
|
---|
| 69 | * language_code is unspecified, the user's language preference for Google
|
---|
| 70 | * services is used.
|
---|
| 71 | * @opt_param string photoIds
|
---|
| 72 | * @opt_param string view Required. Specifies if a download URL for the photo
|
---|
| 73 | * bytes should be returned in the Photo response.
|
---|
| 74 | * @return BatchGetPhotosResponse
|
---|
| 75 | * @throws \Google\Service\Exception
|
---|
| 76 | */
|
---|
| 77 | public function batchGet($optParams = [])
|
---|
| 78 | {
|
---|
| 79 | $params = [];
|
---|
| 80 | $params = array_merge($params, $optParams);
|
---|
| 81 | return $this->call('batchGet', [$params], BatchGetPhotosResponse::class);
|
---|
| 82 | }
|
---|
| 83 | /**
|
---|
| 84 | * Updates the metadata of Photos, such as pose, place association, connections,
|
---|
| 85 | * etc. Changing the pixels of photos is not supported. Note that if
|
---|
| 86 | * BatchUpdatePhotos fails, either critical fields are missing or there is an
|
---|
| 87 | * authentication error. Even if BatchUpdatePhotos succeeds, individual photos
|
---|
| 88 | * in the batch may have failures. These failures are specified in each
|
---|
| 89 | * PhotoResponse.status in BatchUpdatePhotosResponse.results. See UpdatePhoto
|
---|
| 90 | * for specific failures that can occur per photo. Only the fields specified in
|
---|
| 91 | * updateMask field are used. If `updateMask` is not present, the update applies
|
---|
| 92 | * to all fields. The number of UpdatePhotoRequest messages in a
|
---|
| 93 | * BatchUpdatePhotosRequest must not exceed 20. > Note: To update Pose.altitude,
|
---|
| 94 | * Pose.latLngPair has to be filled as well. Otherwise, the request will fail.
|
---|
| 95 | * (photos.batchUpdate)
|
---|
| 96 | *
|
---|
| 97 | * @param BatchUpdatePhotosRequest $postBody
|
---|
| 98 | * @param array $optParams Optional parameters.
|
---|
| 99 | * @return BatchUpdatePhotosResponse
|
---|
| 100 | * @throws \Google\Service\Exception
|
---|
| 101 | */
|
---|
| 102 | public function batchUpdate(BatchUpdatePhotosRequest $postBody, $optParams = [])
|
---|
| 103 | {
|
---|
| 104 | $params = ['postBody' => $postBody];
|
---|
| 105 | $params = array_merge($params, $optParams);
|
---|
| 106 | return $this->call('batchUpdate', [$params], BatchUpdatePhotosResponse::class);
|
---|
| 107 | }
|
---|
| 108 | /**
|
---|
| 109 | * Lists all the Photos that belong to the user. > Note: Recently created photos
|
---|
| 110 | * that are still being indexed are not returned in the response.
|
---|
| 111 | * (photos.listPhotos)
|
---|
| 112 | *
|
---|
| 113 | * @param array $optParams Optional parameters.
|
---|
| 114 | *
|
---|
| 115 | * @opt_param string filter Optional. The filter expression. For example:
|
---|
| 116 | * `placeId=ChIJj61dQgK6j4AR4GeTYWZsKWw`. The filters supported are: `placeId`,
|
---|
| 117 | * `min_latitude`, `max_latitude`, `min_longitude`, `max_longitude`. See
|
---|
| 118 | * https://google.aip.dev/160 for more information.
|
---|
| 119 | * @opt_param string languageCode Optional. The BCP-47 language code, such as
|
---|
| 120 | * "en-US" or "sr-Latn". For more information, see
|
---|
| 121 | * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. If
|
---|
| 122 | * language_code is unspecified, the user's language preference for Google
|
---|
| 123 | * services is used.
|
---|
| 124 | * @opt_param int pageSize Optional. The maximum number of photos to return.
|
---|
| 125 | * `pageSize` must be non-negative. If `pageSize` is zero or is not provided,
|
---|
| 126 | * the default page size of 100 is used. The number of photos returned in the
|
---|
| 127 | * response may be less than `pageSize` if the number of photos that belong to
|
---|
| 128 | * the user is less than `pageSize`.
|
---|
| 129 | * @opt_param string pageToken Optional. The nextPageToken value returned from a
|
---|
| 130 | * previous ListPhotos request, if any.
|
---|
| 131 | * @opt_param string view Required. Specifies if a download URL for the photos
|
---|
| 132 | * bytes should be returned in the Photos response.
|
---|
| 133 | * @return ListPhotosResponse
|
---|
| 134 | * @throws \Google\Service\Exception
|
---|
| 135 | */
|
---|
| 136 | public function listPhotos($optParams = [])
|
---|
| 137 | {
|
---|
| 138 | $params = [];
|
---|
| 139 | $params = array_merge($params, $optParams);
|
---|
| 140 | return $this->call('list', [$params], ListPhotosResponse::class);
|
---|
| 141 | }
|
---|
| 142 | }
|
---|
| 143 |
|
---|
| 144 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 145 | class_alias(Photos::class, 'Google_Service_StreetViewPublish_Resource_Photos');
|
---|