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