| OLD | NEW |
| 1 // This is a generated file (see the discoveryapis_generator project). | 1 // This is a generated file (see the discoveryapis_generator project). |
| 2 | 2 |
| 3 library googleapis.streetviewpublish.v1; | 3 library googleapis.streetviewpublish.v1; |
| 4 | 4 |
| 5 import 'dart:core' as core; | 5 import 'dart:core' as core; |
| 6 import 'dart:async' as async; | 6 import 'dart:async' as async; |
| 7 import 'dart:convert' as convert; | 7 import 'dart:convert' as convert; |
| 8 | 8 |
| 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; | 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; |
| 10 import 'package:http/http.dart' as http; | 10 import 'package:http/http.dart' as http; |
| 11 | 11 |
| 12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show | 12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' |
| 13 ApiRequestError, DetailedApiRequestError; | 13 show ApiRequestError, DetailedApiRequestError; |
| 14 | 14 |
| 15 const core.String USER_AGENT = 'dart-api-client streetviewpublish/v1'; | 15 const core.String USER_AGENT = 'dart-api-client streetviewpublish/v1'; |
| 16 | 16 |
| 17 /** | 17 /// Publishes 360 photos to Google Maps, along with position, orientation, and |
| 18 * Publishes 360 photos to Google Maps, along with position, orientation, and | 18 /// connectivity metadata. Apps can offer an interface for positioning, |
| 19 * connectivity metadata. Apps can offer an interface for positioning, | 19 /// connecting, and uploading user-generated Street View images. |
| 20 * connecting, and uploading user-generated Street View images. | |
| 21 */ | |
| 22 class StreetviewpublishApi { | 20 class StreetviewpublishApi { |
| 23 /** Publish and manage your 360 photos on Google Street View */ | 21 /// Publish and manage your 360 photos on Google Street View |
| 24 static const StreetviewpublishScope = "https://www.googleapis.com/auth/streetv
iewpublish"; | 22 static const StreetviewpublishScope = |
| 25 | 23 "https://www.googleapis.com/auth/streetviewpublish"; |
| 26 | 24 |
| 27 final commons.ApiRequester _requester; | 25 final commons.ApiRequester _requester; |
| 28 | 26 |
| 29 PhotoResourceApi get photo => new PhotoResourceApi(_requester); | 27 PhotoResourceApi get photo => new PhotoResourceApi(_requester); |
| 30 PhotosResourceApi get photos => new PhotosResourceApi(_requester); | 28 PhotosResourceApi get photos => new PhotosResourceApi(_requester); |
| 31 | 29 |
| 32 StreetviewpublishApi(http.Client client, {core.String rootUrl: "https://street
viewpublish.googleapis.com/", core.String servicePath: ""}) : | 30 StreetviewpublishApi(http.Client client, |
| 33 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A
GENT); | 31 {core.String rootUrl: "https://streetviewpublish.googleapis.com/", |
| 32 core.String servicePath: ""}) |
| 33 : _requester = |
| 34 new commons.ApiRequester(client, rootUrl, servicePath, USER_AGENT); |
| 34 } | 35 } |
| 35 | 36 |
| 36 | |
| 37 class PhotoResourceApi { | 37 class PhotoResourceApi { |
| 38 final commons.ApiRequester _requester; | 38 final commons.ApiRequester _requester; |
| 39 | 39 |
| 40 PhotoResourceApi(commons.ApiRequester client) : | 40 PhotoResourceApi(commons.ApiRequester client) : _requester = client; |
| 41 _requester = client; | |
| 42 | 41 |
| 43 /** | 42 /// After the client finishes uploading the photo with the returned |
| 44 * After the client finishes uploading the photo with the returned | 43 /// UploadRef, |
| 45 * UploadRef, | 44 /// CreatePhoto |
| 46 * CreatePhoto | 45 /// publishes the uploaded Photo to |
| 47 * publishes the uploaded Photo to | 46 /// Street View on Google Maps. |
| 48 * Street View on Google Maps. | 47 /// |
| 49 * | 48 /// This method returns the following error codes: |
| 50 * This method returns the following error codes: | 49 /// |
| 51 * | 50 /// * google.rpc.Code.INVALID_ARGUMENT if the request is malformed. |
| 52 * * google.rpc.Code.INVALID_ARGUMENT if the request is malformed. | 51 /// * google.rpc.Code.NOT_FOUND if the upload reference does not exist. |
| 53 * * google.rpc.Code.NOT_FOUND if the upload reference does not exist. | 52 /// * google.rpc.Code.RESOURCE_EXHAUSTED if the account has reached the |
| 54 * * google.rpc.Code.RESOURCE_EXHAUSTED if the account has reached the | 53 /// storage limit. |
| 55 * storage limit. | 54 /// |
| 56 * | 55 /// [request] - The metadata request object. |
| 57 * [request] - The metadata request object. | 56 /// |
| 58 * | 57 /// Request parameters: |
| 59 * Request parameters: | 58 /// |
| 60 * | 59 /// Completes with a [Photo]. |
| 61 * Completes with a [Photo]. | 60 /// |
| 62 * | 61 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 63 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 62 /// an error. |
| 64 * error. | 63 /// |
| 65 * | 64 /// If the used [http.Client] completes with an error when making a REST |
| 66 * If the used [http.Client] completes with an error when making a REST call, | 65 /// call, this method will complete with the same error. |
| 67 * this method will complete with the same error. | |
| 68 */ | |
| 69 async.Future<Photo> create(Photo request) { | 66 async.Future<Photo> create(Photo request) { |
| 70 var _url = null; | 67 var _url = null; |
| 71 var _queryParams = new core.Map(); | 68 var _queryParams = new core.Map(); |
| 72 var _uploadMedia = null; | 69 var _uploadMedia = null; |
| 73 var _uploadOptions = null; | 70 var _uploadOptions = null; |
| 74 var _downloadOptions = commons.DownloadOptions.Metadata; | 71 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 75 var _body = null; | 72 var _body = null; |
| 76 | 73 |
| 77 if (request != null) { | 74 if (request != null) { |
| 78 _body = convert.JSON.encode((request).toJson()); | 75 _body = convert.JSON.encode((request).toJson()); |
| 79 } | 76 } |
| 80 | 77 |
| 81 _url = 'v1/photo'; | 78 _url = 'v1/photo'; |
| 82 | 79 |
| 83 var _response = _requester.request(_url, | 80 var _response = _requester.request(_url, "POST", |
| 84 "POST", | 81 body: _body, |
| 85 body: _body, | 82 queryParams: _queryParams, |
| 86 queryParams: _queryParams, | 83 uploadOptions: _uploadOptions, |
| 87 uploadOptions: _uploadOptions, | 84 uploadMedia: _uploadMedia, |
| 88 uploadMedia: _uploadMedia, | 85 downloadOptions: _downloadOptions); |
| 89 downloadOptions: _downloadOptions); | |
| 90 return _response.then((data) => new Photo.fromJson(data)); | 86 return _response.then((data) => new Photo.fromJson(data)); |
| 91 } | 87 } |
| 92 | 88 |
| 93 /** | 89 /// Deletes a Photo and its metadata. |
| 94 * Deletes a Photo and its metadata. | 90 /// |
| 95 * | 91 /// This method returns the following error codes: |
| 96 * This method returns the following error codes: | 92 /// |
| 97 * | 93 /// * google.rpc.Code.PERMISSION_DENIED if the requesting user did not |
| 98 * * google.rpc.Code.PERMISSION_DENIED if the requesting user did not | 94 /// create the requested photo. |
| 99 * create the requested photo. | 95 /// * google.rpc.Code.NOT_FOUND if the photo ID does not exist. |
| 100 * * google.rpc.Code.NOT_FOUND if the photo ID does not exist. | 96 /// |
| 101 * | 97 /// Request parameters: |
| 102 * Request parameters: | 98 /// |
| 103 * | 99 /// [photoId] - Required. ID of the Photo. |
| 104 * [photoId] - Required. ID of the Photo. | 100 /// |
| 105 * | 101 /// Completes with a [Empty]. |
| 106 * Completes with a [Empty]. | 102 /// |
| 107 * | 103 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 108 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 104 /// an error. |
| 109 * error. | 105 /// |
| 110 * | 106 /// If the used [http.Client] completes with an error when making a REST |
| 111 * If the used [http.Client] completes with an error when making a REST call, | 107 /// call, this method will complete with the same error. |
| 112 * this method will complete with the same error. | |
| 113 */ | |
| 114 async.Future<Empty> delete(core.String photoId) { | 108 async.Future<Empty> delete(core.String photoId) { |
| 115 var _url = null; | 109 var _url = null; |
| 116 var _queryParams = new core.Map(); | 110 var _queryParams = new core.Map(); |
| 117 var _uploadMedia = null; | 111 var _uploadMedia = null; |
| 118 var _uploadOptions = null; | 112 var _uploadOptions = null; |
| 119 var _downloadOptions = commons.DownloadOptions.Metadata; | 113 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 120 var _body = null; | 114 var _body = null; |
| 121 | 115 |
| 122 if (photoId == null) { | 116 if (photoId == null) { |
| 123 throw new core.ArgumentError("Parameter photoId is required."); | 117 throw new core.ArgumentError("Parameter photoId is required."); |
| 124 } | 118 } |
| 125 | 119 |
| 126 _url = 'v1/photo/' + commons.Escaper.ecapeVariable('$photoId'); | 120 _url = 'v1/photo/' + commons.Escaper.ecapeVariable('$photoId'); |
| 127 | 121 |
| 128 var _response = _requester.request(_url, | 122 var _response = _requester.request(_url, "DELETE", |
| 129 "DELETE", | 123 body: _body, |
| 130 body: _body, | 124 queryParams: _queryParams, |
| 131 queryParams: _queryParams, | 125 uploadOptions: _uploadOptions, |
| 132 uploadOptions: _uploadOptions, | 126 uploadMedia: _uploadMedia, |
| 133 uploadMedia: _uploadMedia, | 127 downloadOptions: _downloadOptions); |
| 134 downloadOptions: _downloadOptions); | |
| 135 return _response.then((data) => new Empty.fromJson(data)); | 128 return _response.then((data) => new Empty.fromJson(data)); |
| 136 } | 129 } |
| 137 | 130 |
| 138 /** | 131 /// Gets the metadata of the specified |
| 139 * Gets the metadata of the specified | 132 /// Photo. |
| 140 * Photo. | 133 /// |
| 141 * | 134 /// This method returns the following error codes: |
| 142 * This method returns the following error codes: | 135 /// |
| 143 * | 136 /// * google.rpc.Code.PERMISSION_DENIED if the requesting user did not |
| 144 * * google.rpc.Code.PERMISSION_DENIED if the requesting user did not | 137 /// create the requested Photo. |
| 145 * create the requested Photo. | 138 /// * google.rpc.Code.NOT_FOUND if the requested |
| 146 * * google.rpc.Code.NOT_FOUND if the requested | 139 /// Photo does not exist. |
| 147 * Photo does not exist. | 140 /// |
| 148 * | 141 /// Request parameters: |
| 149 * Request parameters: | 142 /// |
| 150 * | 143 /// [photoId] - Required. ID of the Photo. |
| 151 * [photoId] - Required. ID of the Photo. | 144 /// |
| 152 * | 145 /// [view] - Specifies if a download URL for the photo bytes should be |
| 153 * [view] - Specifies if a download URL for the photo bytes should be returned | 146 /// returned in the |
| 154 * in the | 147 /// Photo response. |
| 155 * Photo response. | 148 /// Possible string values are: |
| 156 * Possible string values are: | 149 /// - "BASIC" : A BASIC. |
| 157 * - "BASIC" : A BASIC. | 150 /// - "INCLUDE_DOWNLOAD_URL" : A INCLUDE_DOWNLOAD_URL. |
| 158 * - "INCLUDE_DOWNLOAD_URL" : A INCLUDE_DOWNLOAD_URL. | 151 /// |
| 159 * | 152 /// Completes with a [Photo]. |
| 160 * Completes with a [Photo]. | 153 /// |
| 161 * | 154 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 162 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 155 /// an error. |
| 163 * error. | 156 /// |
| 164 * | 157 /// If the used [http.Client] completes with an error when making a REST |
| 165 * If the used [http.Client] completes with an error when making a REST call, | 158 /// call, this method will complete with the same error. |
| 166 * this method will complete with the same error. | |
| 167 */ | |
| 168 async.Future<Photo> get(core.String photoId, {core.String view}) { | 159 async.Future<Photo> get(core.String photoId, {core.String view}) { |
| 169 var _url = null; | 160 var _url = null; |
| 170 var _queryParams = new core.Map(); | 161 var _queryParams = new core.Map(); |
| 171 var _uploadMedia = null; | 162 var _uploadMedia = null; |
| 172 var _uploadOptions = null; | 163 var _uploadOptions = null; |
| 173 var _downloadOptions = commons.DownloadOptions.Metadata; | 164 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 174 var _body = null; | 165 var _body = null; |
| 175 | 166 |
| 176 if (photoId == null) { | 167 if (photoId == null) { |
| 177 throw new core.ArgumentError("Parameter photoId is required."); | 168 throw new core.ArgumentError("Parameter photoId is required."); |
| 178 } | 169 } |
| 179 if (view != null) { | 170 if (view != null) { |
| 180 _queryParams["view"] = [view]; | 171 _queryParams["view"] = [view]; |
| 181 } | 172 } |
| 182 | 173 |
| 183 _url = 'v1/photo/' + commons.Escaper.ecapeVariable('$photoId'); | 174 _url = 'v1/photo/' + commons.Escaper.ecapeVariable('$photoId'); |
| 184 | 175 |
| 185 var _response = _requester.request(_url, | 176 var _response = _requester.request(_url, "GET", |
| 186 "GET", | 177 body: _body, |
| 187 body: _body, | 178 queryParams: _queryParams, |
| 188 queryParams: _queryParams, | 179 uploadOptions: _uploadOptions, |
| 189 uploadOptions: _uploadOptions, | 180 uploadMedia: _uploadMedia, |
| 190 uploadMedia: _uploadMedia, | 181 downloadOptions: _downloadOptions); |
| 191 downloadOptions: _downloadOptions); | |
| 192 return _response.then((data) => new Photo.fromJson(data)); | 182 return _response.then((data) => new Photo.fromJson(data)); |
| 193 } | 183 } |
| 194 | 184 |
| 195 /** | 185 /// Creates an upload session to start uploading photo bytes. The upload URL |
| 196 * Creates an upload session to start uploading photo bytes. The upload URL of | 186 /// of |
| 197 * the returned UploadRef is used to | 187 /// the returned UploadRef is used to |
| 198 * upload the bytes for the Photo. | 188 /// upload the bytes for the Photo. |
| 199 * | 189 /// |
| 200 * In addition to the photo requirements shown in | 190 /// In addition to the photo requirements shown in |
| 201 * https://support.google.com/maps/answer/7012050?hl=en&ref_topic=6275604, | 191 /// https://support.google.com/maps/answer/7012050?hl=en&ref_topic=6275604, |
| 202 * the photo must also meet the following requirements: | 192 /// the photo must also meet the following requirements: |
| 203 * | 193 /// |
| 204 * * Photo Sphere XMP metadata must be included in the photo medadata. See | 194 /// * Photo Sphere XMP metadata must be included in the photo medadata. See |
| 205 * https://developers.google.com/streetview/spherical-metadata for the | 195 /// https://developers.google.com/streetview/spherical-metadata for the |
| 206 * required fields. | 196 /// required fields. |
| 207 * * The pixel size of the photo must meet the size requirements listed in | 197 /// * The pixel size of the photo must meet the size requirements listed in |
| 208 * https://support.google.com/maps/answer/7012050?hl=en&ref_topic=6275604, and | 198 /// https://support.google.com/maps/answer/7012050?hl=en&ref_topic=6275604, |
| 209 * the photo must be a full 360 horizontally. | 199 /// and |
| 210 * | 200 /// the photo must be a full 360 horizontally. |
| 211 * After the upload is complete, the | 201 /// |
| 212 * UploadRef is used with | 202 /// After the upload is complete, the |
| 213 * CreatePhoto | 203 /// UploadRef is used with |
| 214 * to create the Photo object entry. | 204 /// CreatePhoto |
| 215 * | 205 /// to create the Photo object entry. |
| 216 * [request] - The metadata request object. | 206 /// |
| 217 * | 207 /// [request] - The metadata request object. |
| 218 * Request parameters: | 208 /// |
| 219 * | 209 /// Request parameters: |
| 220 * Completes with a [UploadRef]. | 210 /// |
| 221 * | 211 /// Completes with a [UploadRef]. |
| 222 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 212 /// |
| 223 * error. | 213 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 224 * | 214 /// an error. |
| 225 * If the used [http.Client] completes with an error when making a REST call, | 215 /// |
| 226 * this method will complete with the same error. | 216 /// If the used [http.Client] completes with an error when making a REST |
| 227 */ | 217 /// call, this method will complete with the same error. |
| 228 async.Future<UploadRef> startUpload(Empty request) { | 218 async.Future<UploadRef> startUpload(Empty request) { |
| 229 var _url = null; | 219 var _url = null; |
| 230 var _queryParams = new core.Map(); | 220 var _queryParams = new core.Map(); |
| 231 var _uploadMedia = null; | 221 var _uploadMedia = null; |
| 232 var _uploadOptions = null; | 222 var _uploadOptions = null; |
| 233 var _downloadOptions = commons.DownloadOptions.Metadata; | 223 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 234 var _body = null; | 224 var _body = null; |
| 235 | 225 |
| 236 if (request != null) { | 226 if (request != null) { |
| 237 _body = convert.JSON.encode((request).toJson()); | 227 _body = convert.JSON.encode((request).toJson()); |
| 238 } | 228 } |
| 239 | 229 |
| 240 _url = 'v1/photo:startUpload'; | 230 _url = 'v1/photo:startUpload'; |
| 241 | 231 |
| 242 var _response = _requester.request(_url, | 232 var _response = _requester.request(_url, "POST", |
| 243 "POST", | 233 body: _body, |
| 244 body: _body, | 234 queryParams: _queryParams, |
| 245 queryParams: _queryParams, | 235 uploadOptions: _uploadOptions, |
| 246 uploadOptions: _uploadOptions, | 236 uploadMedia: _uploadMedia, |
| 247 uploadMedia: _uploadMedia, | 237 downloadOptions: _downloadOptions); |
| 248 downloadOptions: _downloadOptions); | |
| 249 return _response.then((data) => new UploadRef.fromJson(data)); | 238 return _response.then((data) => new UploadRef.fromJson(data)); |
| 250 } | 239 } |
| 251 | 240 |
| 252 /** | 241 /// Updates the metadata of a Photo, such |
| 253 * Updates the metadata of a Photo, such | 242 /// as pose, place association, connections, etc. Changing the pixels of a |
| 254 * as pose, place association, connections, etc. Changing the pixels of a | 243 /// photo is not supported. |
| 255 * photo is not supported. | 244 /// |
| 256 * | 245 /// Only the fields specified in |
| 257 * This method returns the following error codes: | 246 /// updateMask |
| 258 * | 247 /// field are used. If `updateMask` is not present, the update applies to all |
| 259 * * google.rpc.Code.PERMISSION_DENIED if the requesting user did not | 248 /// fields. |
| 260 * create the requested photo. | 249 /// |
| 261 * * google.rpc.Code.INVALID_ARGUMENT if the request is malformed. | 250 /// <aside class="note"><b>Note:</b> To update |
| 262 * * google.rpc.Code.NOT_FOUND if the requested photo does not exist. | 251 /// Pose.altitude, |
| 263 * | 252 /// Pose.latLngPair has to be |
| 264 * [request] - The metadata request object. | 253 /// filled as well. Otherwise, the request will fail.</aside> |
| 265 * | 254 /// |
| 266 * Request parameters: | 255 /// This method returns the following error codes: |
| 267 * | 256 /// |
| 268 * [id] - Required. A base64 encoded identifier. | 257 /// * google.rpc.Code.PERMISSION_DENIED if the requesting user did not |
| 269 * | 258 /// create the requested photo. |
| 270 * [updateMask] - Mask that identifies fields on the photo metadata to update. | 259 /// * google.rpc.Code.INVALID_ARGUMENT if the request is malformed. |
| 271 * If not present, the old Photo metadata will be entirely replaced with the | 260 /// * google.rpc.Code.NOT_FOUND if the requested photo does not exist. |
| 272 * new Photo metadata in this request. The update fails if invalid fields are | 261 /// |
| 273 * specified. Multiple fields can be specified in a comma-delimited list. | 262 /// [request] - The metadata request object. |
| 274 * | 263 /// |
| 275 * The following fields are valid: | 264 /// Request parameters: |
| 276 * | 265 /// |
| 277 * * `pose.heading` | 266 /// [id] - Required. A unique identifier for a photo. |
| 278 * * `pose.latlngpair` | 267 /// |
| 279 * * `pose.pitch` | 268 /// [updateMask] - Mask that identifies fields on the photo metadata to |
| 280 * * `pose.roll` | 269 /// update. |
| 281 * * `pose.level` | 270 /// If not present, the old Photo metadata will be entirely replaced with the |
| 282 * * `pose.altitude` | 271 /// new Photo metadata in this request. The update fails if invalid fields |
| 283 * * `connections` | 272 /// are |
| 284 * * `places` | 273 /// specified. Multiple fields can be specified in a comma-delimited list. |
| 285 * | 274 /// |
| 286 * | 275 /// The following fields are valid: |
| 287 * <aside class="note"><b>Note:</b> Repeated fields in | 276 /// |
| 288 * updateMask | 277 /// * `pose.heading` |
| 289 * mean the entire set of repeated values will be replaced with the new | 278 /// * `pose.latLngPair` |
| 290 * contents. For example, if | 279 /// * `pose.pitch` |
| 291 * updateMask | 280 /// * `pose.roll` |
| 292 * contains `connections` and | 281 /// * `pose.level` |
| 293 * google.streetview.publish.v1.UpdatePhotoRequest.photo.connections is | 282 /// * `pose.altitude` |
| 294 * empty, all connections will be removed.</aside> | 283 /// * `connections` |
| 295 * | 284 /// * `places` |
| 296 * Completes with a [Photo]. | 285 /// |
| 297 * | 286 /// |
| 298 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 287 /// <aside class="note"><b>Note:</b> Repeated fields in |
| 299 * error. | 288 /// updateMask |
| 300 * | 289 /// mean the entire set of repeated values will be replaced with the new |
| 301 * If the used [http.Client] completes with an error when making a REST call, | 290 /// contents. For example, if |
| 302 * this method will complete with the same error. | 291 /// updateMask |
| 303 */ | 292 /// contains `connections` and `UpdatePhotoRequest.photo.connections` is |
| 304 async.Future<Photo> update(Photo request, core.String id, {core.String updateM
ask}) { | 293 /// empty, |
| 294 /// all connections will be removed.</aside> |
| 295 /// |
| 296 /// Completes with a [Photo]. |
| 297 /// |
| 298 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 299 /// an error. |
| 300 /// |
| 301 /// If the used [http.Client] completes with an error when making a REST |
| 302 /// call, this method will complete with the same error. |
| 303 async.Future<Photo> update(Photo request, core.String id, |
| 304 {core.String updateMask}) { |
| 305 var _url = null; | 305 var _url = null; |
| 306 var _queryParams = new core.Map(); | 306 var _queryParams = new core.Map(); |
| 307 var _uploadMedia = null; | 307 var _uploadMedia = null; |
| 308 var _uploadOptions = null; | 308 var _uploadOptions = null; |
| 309 var _downloadOptions = commons.DownloadOptions.Metadata; | 309 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 310 var _body = null; | 310 var _body = null; |
| 311 | 311 |
| 312 if (request != null) { | 312 if (request != null) { |
| 313 _body = convert.JSON.encode((request).toJson()); | 313 _body = convert.JSON.encode((request).toJson()); |
| 314 } | 314 } |
| 315 if (id == null) { | 315 if (id == null) { |
| 316 throw new core.ArgumentError("Parameter id is required."); | 316 throw new core.ArgumentError("Parameter id is required."); |
| 317 } | 317 } |
| 318 if (updateMask != null) { | 318 if (updateMask != null) { |
| 319 _queryParams["updateMask"] = [updateMask]; | 319 _queryParams["updateMask"] = [updateMask]; |
| 320 } | 320 } |
| 321 | 321 |
| 322 _url = 'v1/photo/' + commons.Escaper.ecapeVariable('$id'); | 322 _url = 'v1/photo/' + commons.Escaper.ecapeVariable('$id'); |
| 323 | 323 |
| 324 var _response = _requester.request(_url, | 324 var _response = _requester.request(_url, "PUT", |
| 325 "PUT", | 325 body: _body, |
| 326 body: _body, | 326 queryParams: _queryParams, |
| 327 queryParams: _queryParams, | 327 uploadOptions: _uploadOptions, |
| 328 uploadOptions: _uploadOptions, | 328 uploadMedia: _uploadMedia, |
| 329 uploadMedia: _uploadMedia, | 329 downloadOptions: _downloadOptions); |
| 330 downloadOptions: _downloadOptions); | |
| 331 return _response.then((data) => new Photo.fromJson(data)); | 330 return _response.then((data) => new Photo.fromJson(data)); |
| 332 } | 331 } |
| 333 | |
| 334 } | 332 } |
| 335 | 333 |
| 336 | |
| 337 class PhotosResourceApi { | 334 class PhotosResourceApi { |
| 338 final commons.ApiRequester _requester; | 335 final commons.ApiRequester _requester; |
| 339 | 336 |
| 340 PhotosResourceApi(commons.ApiRequester client) : | 337 PhotosResourceApi(commons.ApiRequester client) : _requester = client; |
| 341 _requester = client; | |
| 342 | 338 |
| 343 /** | 339 /// Deletes a list of Photos and their |
| 344 * Deletes a list of Photos and their metadata. | 340 /// metadata. |
| 345 * | 341 /// |
| 346 * Note that if | 342 /// Note that if |
| 347 * BatchDeletePhotos | 343 /// BatchDeletePhotos |
| 348 * fails, either critical fields are missing or there was an authentication | 344 /// fails, either critical fields are missing or there was an authentication |
| 349 * error. Even if | 345 /// error. Even if |
| 350 * BatchDeletePhotos | 346 /// BatchDeletePhotos |
| 351 * succeeds, there may have been failures for single photos in the batch. | 347 /// succeeds, there may have been failures for single photos in the batch. |
| 352 * These failures will be specified in each | 348 /// These failures will be specified in each |
| 353 * PhotoResponse.status | 349 /// PhotoResponse.status |
| 354 * in | 350 /// in |
| 355 * BatchDeletePhotosResponse.results. | 351 /// BatchDeletePhotosResponse.results. |
| 356 * See | 352 /// See |
| 357 * DeletePhoto | 353 /// DeletePhoto |
| 358 * for specific failures that can occur per photo. | 354 /// for specific failures that can occur per photo. |
| 359 * | 355 /// |
| 360 * [request] - The metadata request object. | 356 /// [request] - The metadata request object. |
| 361 * | 357 /// |
| 362 * Request parameters: | 358 /// Request parameters: |
| 363 * | 359 /// |
| 364 * Completes with a [BatchDeletePhotosResponse]. | 360 /// Completes with a [BatchDeletePhotosResponse]. |
| 365 * | 361 /// |
| 366 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 362 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 367 * error. | 363 /// an error. |
| 368 * | 364 /// |
| 369 * If the used [http.Client] completes with an error when making a REST call, | 365 /// If the used [http.Client] completes with an error when making a REST |
| 370 * this method will complete with the same error. | 366 /// call, this method will complete with the same error. |
| 371 */ | 367 async.Future<BatchDeletePhotosResponse> batchDelete( |
| 372 async.Future<BatchDeletePhotosResponse> batchDelete(BatchDeletePhotosRequest r
equest) { | 368 BatchDeletePhotosRequest request) { |
| 373 var _url = null; | 369 var _url = null; |
| 374 var _queryParams = new core.Map(); | 370 var _queryParams = new core.Map(); |
| 375 var _uploadMedia = null; | 371 var _uploadMedia = null; |
| 376 var _uploadOptions = null; | 372 var _uploadOptions = null; |
| 377 var _downloadOptions = commons.DownloadOptions.Metadata; | 373 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 378 var _body = null; | 374 var _body = null; |
| 379 | 375 |
| 380 if (request != null) { | 376 if (request != null) { |
| 381 _body = convert.JSON.encode((request).toJson()); | 377 _body = convert.JSON.encode((request).toJson()); |
| 382 } | 378 } |
| 383 | 379 |
| 384 _url = 'v1/photos:batchDelete'; | 380 _url = 'v1/photos:batchDelete'; |
| 385 | 381 |
| 386 var _response = _requester.request(_url, | 382 var _response = _requester.request(_url, "POST", |
| 387 "POST", | 383 body: _body, |
| 388 body: _body, | 384 queryParams: _queryParams, |
| 389 queryParams: _queryParams, | 385 uploadOptions: _uploadOptions, |
| 390 uploadOptions: _uploadOptions, | 386 uploadMedia: _uploadMedia, |
| 391 uploadMedia: _uploadMedia, | 387 downloadOptions: _downloadOptions); |
| 392 downloadOptions: _downloadOptions); | 388 return _response |
| 393 return _response.then((data) => new BatchDeletePhotosResponse.fromJson(data)
); | 389 .then((data) => new BatchDeletePhotosResponse.fromJson(data)); |
| 394 } | 390 } |
| 395 | 391 |
| 396 /** | 392 /// Gets the metadata of the specified |
| 397 * Gets the metadata of the specified | 393 /// Photo batch. |
| 398 * Photo batch. | 394 /// |
| 399 * | 395 /// Note that if |
| 400 * Note that if | 396 /// BatchGetPhotos |
| 401 * BatchGetPhotos | 397 /// fails, either critical fields are missing or there was an authentication |
| 402 * fails, either critical fields are missing or there was an authentication | 398 /// error. Even if |
| 403 * error. Even if | 399 /// BatchGetPhotos |
| 404 * BatchGetPhotos | 400 /// succeeds, there may have been failures for single photos in the batch. |
| 405 * succeeds, there may have been failures for single photos in the batch. | 401 /// These failures will be specified in each |
| 406 * These failures will be specified in each | 402 /// PhotoResponse.status |
| 407 * PhotoResponse.status | 403 /// in |
| 408 * in | 404 /// BatchGetPhotosResponse.results. |
| 409 * BatchGetPhotosResponse.results. | 405 /// See |
| 410 * See | 406 /// GetPhoto |
| 411 * GetPhoto | 407 /// for specific failures that can occur per photo. |
| 412 * for specific failures that can occur per photo. | 408 /// |
| 413 * | 409 /// Request parameters: |
| 414 * Request parameters: | 410 /// |
| 415 * | 411 /// [photoIds] - Required. IDs of the Photos. For HTTP |
| 416 * [view] - Specifies if a download URL for the photo bytes should be returned | 412 /// GET requests, the URL query parameter should be |
| 417 * in the | 413 /// `photoIds=<id1>&photoIds=<id2>&...`. |
| 418 * Photo response. | 414 /// |
| 419 * Possible string values are: | 415 /// [view] - Specifies if a download URL for the photo bytes should be |
| 420 * - "BASIC" : A BASIC. | 416 /// returned in the |
| 421 * - "INCLUDE_DOWNLOAD_URL" : A INCLUDE_DOWNLOAD_URL. | 417 /// Photo response. |
| 422 * | 418 /// Possible string values are: |
| 423 * [photoIds] - Required. IDs of the Photos. For HTTP | 419 /// - "BASIC" : A BASIC. |
| 424 * GET requests, the URL query parameter should be | 420 /// - "INCLUDE_DOWNLOAD_URL" : A INCLUDE_DOWNLOAD_URL. |
| 425 * `photoIds=<id1>&photoIds=<id2>&...`. | 421 /// |
| 426 * | 422 /// Completes with a [BatchGetPhotosResponse]. |
| 427 * Completes with a [BatchGetPhotosResponse]. | 423 /// |
| 428 * | 424 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 429 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 425 /// an error. |
| 430 * error. | 426 /// |
| 431 * | 427 /// If the used [http.Client] completes with an error when making a REST |
| 432 * If the used [http.Client] completes with an error when making a REST call, | 428 /// call, this method will complete with the same error. |
| 433 * this method will complete with the same error. | 429 async.Future<BatchGetPhotosResponse> batchGet( |
| 434 */ | 430 {core.List<core.String> photoIds, core.String view}) { |
| 435 async.Future<BatchGetPhotosResponse> batchGet({core.String view, core.List<cor
e.String> photoIds}) { | |
| 436 var _url = null; | 431 var _url = null; |
| 437 var _queryParams = new core.Map(); | 432 var _queryParams = new core.Map(); |
| 438 var _uploadMedia = null; | 433 var _uploadMedia = null; |
| 439 var _uploadOptions = null; | 434 var _uploadOptions = null; |
| 440 var _downloadOptions = commons.DownloadOptions.Metadata; | 435 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 441 var _body = null; | 436 var _body = null; |
| 442 | 437 |
| 438 if (photoIds != null) { |
| 439 _queryParams["photoIds"] = photoIds; |
| 440 } |
| 443 if (view != null) { | 441 if (view != null) { |
| 444 _queryParams["view"] = [view]; | 442 _queryParams["view"] = [view]; |
| 445 } | 443 } |
| 446 if (photoIds != null) { | |
| 447 _queryParams["photoIds"] = photoIds; | |
| 448 } | |
| 449 | 444 |
| 450 _url = 'v1/photos:batchGet'; | 445 _url = 'v1/photos:batchGet'; |
| 451 | 446 |
| 452 var _response = _requester.request(_url, | 447 var _response = _requester.request(_url, "GET", |
| 453 "GET", | 448 body: _body, |
| 454 body: _body, | 449 queryParams: _queryParams, |
| 455 queryParams: _queryParams, | 450 uploadOptions: _uploadOptions, |
| 456 uploadOptions: _uploadOptions, | 451 uploadMedia: _uploadMedia, |
| 457 uploadMedia: _uploadMedia, | 452 downloadOptions: _downloadOptions); |
| 458 downloadOptions: _downloadOptions); | |
| 459 return _response.then((data) => new BatchGetPhotosResponse.fromJson(data)); | 453 return _response.then((data) => new BatchGetPhotosResponse.fromJson(data)); |
| 460 } | 454 } |
| 461 | 455 |
| 462 /** | 456 /// Updates the metadata of Photos, such |
| 463 * Updates the metadata of Photos, such | 457 /// as pose, place association, connections, etc. Changing the pixels of |
| 464 * as pose, place association, connections, etc. Changing the pixels of photos | 458 /// photos |
| 465 * is not supported. | 459 /// is not supported. |
| 466 * | 460 /// |
| 467 * Note that if | 461 /// Note that if |
| 468 * BatchUpdatePhotos | 462 /// BatchUpdatePhotos |
| 469 * fails, either critical fields are missing or there was an authentication | 463 /// fails, either critical fields are missing or there was an authentication |
| 470 * error. Even if | 464 /// error. Even if |
| 471 * BatchUpdatePhotos | 465 /// BatchUpdatePhotos |
| 472 * succeeds, there may have been failures for single photos in the batch. | 466 /// succeeds, there may have been failures for single photos in the batch. |
| 473 * These failures will be specified in each | 467 /// These failures will be specified in each |
| 474 * PhotoResponse.status | 468 /// PhotoResponse.status |
| 475 * in | 469 /// in |
| 476 * BatchUpdatePhotosResponse.results. | 470 /// BatchUpdatePhotosResponse.results. |
| 477 * See | 471 /// See |
| 478 * UpdatePhoto | 472 /// UpdatePhoto |
| 479 * for specific failures that can occur per photo. | 473 /// for specific failures that can occur per photo. |
| 480 * | 474 /// |
| 481 * [request] - The metadata request object. | 475 /// Only the fields specified in |
| 482 * | 476 /// updateMask |
| 483 * Request parameters: | 477 /// field are used. If `updateMask` is not present, the update applies to all |
| 484 * | 478 /// fields. |
| 485 * Completes with a [BatchUpdatePhotosResponse]. | 479 /// |
| 486 * | 480 /// <aside class="note"><b>Note:</b> To update |
| 487 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 481 /// Pose.altitude, |
| 488 * error. | 482 /// Pose.latLngPair has to be |
| 489 * | 483 /// filled as well. Otherwise, the request will fail.</aside> |
| 490 * If the used [http.Client] completes with an error when making a REST call, | 484 /// |
| 491 * this method will complete with the same error. | 485 /// [request] - The metadata request object. |
| 492 */ | 486 /// |
| 493 async.Future<BatchUpdatePhotosResponse> batchUpdate(BatchUpdatePhotosRequest r
equest) { | 487 /// Request parameters: |
| 488 /// |
| 489 /// Completes with a [BatchUpdatePhotosResponse]. |
| 490 /// |
| 491 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 492 /// an error. |
| 493 /// |
| 494 /// If the used [http.Client] completes with an error when making a REST |
| 495 /// call, this method will complete with the same error. |
| 496 async.Future<BatchUpdatePhotosResponse> batchUpdate( |
| 497 BatchUpdatePhotosRequest request) { |
| 494 var _url = null; | 498 var _url = null; |
| 495 var _queryParams = new core.Map(); | 499 var _queryParams = new core.Map(); |
| 496 var _uploadMedia = null; | 500 var _uploadMedia = null; |
| 497 var _uploadOptions = null; | 501 var _uploadOptions = null; |
| 498 var _downloadOptions = commons.DownloadOptions.Metadata; | 502 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 499 var _body = null; | 503 var _body = null; |
| 500 | 504 |
| 501 if (request != null) { | 505 if (request != null) { |
| 502 _body = convert.JSON.encode((request).toJson()); | 506 _body = convert.JSON.encode((request).toJson()); |
| 503 } | 507 } |
| 504 | 508 |
| 505 _url = 'v1/photos:batchUpdate'; | 509 _url = 'v1/photos:batchUpdate'; |
| 506 | 510 |
| 507 var _response = _requester.request(_url, | 511 var _response = _requester.request(_url, "POST", |
| 508 "POST", | 512 body: _body, |
| 509 body: _body, | 513 queryParams: _queryParams, |
| 510 queryParams: _queryParams, | 514 uploadOptions: _uploadOptions, |
| 511 uploadOptions: _uploadOptions, | 515 uploadMedia: _uploadMedia, |
| 512 uploadMedia: _uploadMedia, | 516 downloadOptions: _downloadOptions); |
| 513 downloadOptions: _downloadOptions); | 517 return _response |
| 514 return _response.then((data) => new BatchUpdatePhotosResponse.fromJson(data)
); | 518 .then((data) => new BatchUpdatePhotosResponse.fromJson(data)); |
| 515 } | 519 } |
| 516 | 520 |
| 517 /** | 521 /// Lists all the Photos that belong to |
| 518 * Lists all the Photos that belong to the user. | 522 /// the user. |
| 519 * | 523 /// |
| 520 * Request parameters: | 524 /// Request parameters: |
| 521 * | 525 /// |
| 522 * [filter] - The filter expression. For example: | 526 /// [filter] - The filter expression. For example: |
| 523 * `placeId=ChIJj61dQgK6j4AR4GeTYWZsKWw`. | 527 /// `placeId=ChIJj61dQgK6j4AR4GeTYWZsKWw`. |
| 524 * | 528 /// |
| 525 * [pageToken] - The | 529 /// [pageToken] - The |
| 526 * nextPageToken | 530 /// nextPageToken |
| 527 * value returned from a previous | 531 /// value returned from a previous |
| 528 * ListPhotos | 532 /// ListPhotos |
| 529 * request, if any. | 533 /// request, if any. |
| 530 * | 534 /// |
| 531 * [pageSize] - The maximum number of photos to return. | 535 /// [pageSize] - The maximum number of photos to return. |
| 532 * `pageSize` must be non-negative. If `pageSize` is zero or is not provided, | 536 /// `pageSize` must be non-negative. If `pageSize` is zero or is not |
| 533 * the default page size of 100 will be used. | 537 /// provided, |
| 534 * The number of photos returned in the response may be less than `pageSize` | 538 /// the default page size of 100 will be used. |
| 535 * if the number of photos that belong to the user is less than `pageSize`. | 539 /// The number of photos returned in the response may be less than `pageSize` |
| 536 * | 540 /// if the number of photos that belong to the user is less than `pageSize`. |
| 537 * [view] - Specifies if a download URL for the photos bytes should be | 541 /// |
| 538 * returned in the | 542 /// [view] - Specifies if a download URL for the photos bytes should be |
| 539 * Photos response. | 543 /// returned in the |
| 540 * Possible string values are: | 544 /// Photos response. |
| 541 * - "BASIC" : A BASIC. | 545 /// Possible string values are: |
| 542 * - "INCLUDE_DOWNLOAD_URL" : A INCLUDE_DOWNLOAD_URL. | 546 /// - "BASIC" : A BASIC. |
| 543 * | 547 /// - "INCLUDE_DOWNLOAD_URL" : A INCLUDE_DOWNLOAD_URL. |
| 544 * Completes with a [ListPhotosResponse]. | 548 /// |
| 545 * | 549 /// Completes with a [ListPhotosResponse]. |
| 546 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 550 /// |
| 547 * error. | 551 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 548 * | 552 /// an error. |
| 549 * If the used [http.Client] completes with an error when making a REST call, | 553 /// |
| 550 * this method will complete with the same error. | 554 /// If the used [http.Client] completes with an error when making a REST |
| 551 */ | 555 /// call, this method will complete with the same error. |
| 552 async.Future<ListPhotosResponse> list({core.String filter, core.String pageTok
en, core.int pageSize, core.String view}) { | 556 async.Future<ListPhotosResponse> list( |
| 557 {core.String filter, |
| 558 core.String pageToken, |
| 559 core.int pageSize, |
| 560 core.String view}) { |
| 553 var _url = null; | 561 var _url = null; |
| 554 var _queryParams = new core.Map(); | 562 var _queryParams = new core.Map(); |
| 555 var _uploadMedia = null; | 563 var _uploadMedia = null; |
| 556 var _uploadOptions = null; | 564 var _uploadOptions = null; |
| 557 var _downloadOptions = commons.DownloadOptions.Metadata; | 565 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 558 var _body = null; | 566 var _body = null; |
| 559 | 567 |
| 560 if (filter != null) { | 568 if (filter != null) { |
| 561 _queryParams["filter"] = [filter]; | 569 _queryParams["filter"] = [filter]; |
| 562 } | 570 } |
| 563 if (pageToken != null) { | 571 if (pageToken != null) { |
| 564 _queryParams["pageToken"] = [pageToken]; | 572 _queryParams["pageToken"] = [pageToken]; |
| 565 } | 573 } |
| 566 if (pageSize != null) { | 574 if (pageSize != null) { |
| 567 _queryParams["pageSize"] = ["${pageSize}"]; | 575 _queryParams["pageSize"] = ["${pageSize}"]; |
| 568 } | 576 } |
| 569 if (view != null) { | 577 if (view != null) { |
| 570 _queryParams["view"] = [view]; | 578 _queryParams["view"] = [view]; |
| 571 } | 579 } |
| 572 | 580 |
| 573 _url = 'v1/photos'; | 581 _url = 'v1/photos'; |
| 574 | 582 |
| 575 var _response = _requester.request(_url, | 583 var _response = _requester.request(_url, "GET", |
| 576 "GET", | 584 body: _body, |
| 577 body: _body, | 585 queryParams: _queryParams, |
| 578 queryParams: _queryParams, | 586 uploadOptions: _uploadOptions, |
| 579 uploadOptions: _uploadOptions, | 587 uploadMedia: _uploadMedia, |
| 580 uploadMedia: _uploadMedia, | 588 downloadOptions: _downloadOptions); |
| 581 downloadOptions: _downloadOptions); | |
| 582 return _response.then((data) => new ListPhotosResponse.fromJson(data)); | 589 return _response.then((data) => new ListPhotosResponse.fromJson(data)); |
| 583 } | 590 } |
| 584 | |
| 585 } | 591 } |
| 586 | 592 |
| 587 | 593 /// Request to delete multiple Photos. |
| 588 | |
| 589 /** Request to delete multiple Photos. */ | |
| 590 class BatchDeletePhotosRequest { | 594 class BatchDeletePhotosRequest { |
| 591 /** | 595 /// Required. IDs of the Photos. For HTTP |
| 592 * Required. IDs of the Photos. For HTTP | 596 /// GET requests, the URL query parameter should be |
| 593 * GET requests, the URL query parameter should be | 597 /// `photoIds=<id1>&photoIds=<id2>&...`. |
| 594 * `photoIds=<id1>&photoIds=<id2>&...`. | |
| 595 */ | |
| 596 core.List<core.String> photoIds; | 598 core.List<core.String> photoIds; |
| 597 | 599 |
| 598 BatchDeletePhotosRequest(); | 600 BatchDeletePhotosRequest(); |
| 599 | 601 |
| 600 BatchDeletePhotosRequest.fromJson(core.Map _json) { | 602 BatchDeletePhotosRequest.fromJson(core.Map _json) { |
| 601 if (_json.containsKey("photoIds")) { | 603 if (_json.containsKey("photoIds")) { |
| 602 photoIds = _json["photoIds"]; | 604 photoIds = _json["photoIds"]; |
| 603 } | 605 } |
| 604 } | 606 } |
| 605 | 607 |
| 606 core.Map<core.String, core.Object> toJson() { | 608 core.Map<core.String, core.Object> toJson() { |
| 607 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 609 final core.Map<core.String, core.Object> _json = |
| 610 new core.Map<core.String, core.Object>(); |
| 608 if (photoIds != null) { | 611 if (photoIds != null) { |
| 609 _json["photoIds"] = photoIds; | 612 _json["photoIds"] = photoIds; |
| 610 } | 613 } |
| 611 return _json; | 614 return _json; |
| 612 } | 615 } |
| 613 } | 616 } |
| 614 | 617 |
| 615 /** | 618 /// Response to batch delete of one or more |
| 616 * Response to batch delete of one or more | 619 /// Photos. |
| 617 * Photos. | |
| 618 */ | |
| 619 class BatchDeletePhotosResponse { | 620 class BatchDeletePhotosResponse { |
| 620 /** | 621 /// The status for the operation to delete a single |
| 621 * The status for the operation to delete a single | 622 /// Photo in the batch request. |
| 622 * Photo in the batch request. | |
| 623 */ | |
| 624 core.List<Status> status; | 623 core.List<Status> status; |
| 625 | 624 |
| 626 BatchDeletePhotosResponse(); | 625 BatchDeletePhotosResponse(); |
| 627 | 626 |
| 628 BatchDeletePhotosResponse.fromJson(core.Map _json) { | 627 BatchDeletePhotosResponse.fromJson(core.Map _json) { |
| 629 if (_json.containsKey("status")) { | 628 if (_json.containsKey("status")) { |
| 630 status = _json["status"].map((value) => new Status.fromJson(value)).toList
(); | 629 status = |
| 630 _json["status"].map((value) => new Status.fromJson(value)).toList(); |
| 631 } | 631 } |
| 632 } | 632 } |
| 633 | 633 |
| 634 core.Map<core.String, core.Object> toJson() { | 634 core.Map<core.String, core.Object> toJson() { |
| 635 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 635 final core.Map<core.String, core.Object> _json = |
| 636 new core.Map<core.String, core.Object>(); |
| 636 if (status != null) { | 637 if (status != null) { |
| 637 _json["status"] = status.map((value) => (value).toJson()).toList(); | 638 _json["status"] = status.map((value) => (value).toJson()).toList(); |
| 638 } | 639 } |
| 639 return _json; | 640 return _json; |
| 640 } | 641 } |
| 641 } | 642 } |
| 642 | 643 |
| 643 /** Response to batch get of Photos. */ | 644 /// Response to batch get of Photos. |
| 644 class BatchGetPhotosResponse { | 645 class BatchGetPhotosResponse { |
| 645 /** | 646 /// List of results for each individual |
| 646 * List of results for each individual | 647 /// Photo requested, in the same order as |
| 647 * Photo requested, in the same order as | 648 /// the requests in |
| 648 * the requests in | 649 /// BatchGetPhotos. |
| 649 * BatchGetPhotos. | |
| 650 */ | |
| 651 core.List<PhotoResponse> results; | 650 core.List<PhotoResponse> results; |
| 652 | 651 |
| 653 BatchGetPhotosResponse(); | 652 BatchGetPhotosResponse(); |
| 654 | 653 |
| 655 BatchGetPhotosResponse.fromJson(core.Map _json) { | 654 BatchGetPhotosResponse.fromJson(core.Map _json) { |
| 656 if (_json.containsKey("results")) { | 655 if (_json.containsKey("results")) { |
| 657 results = _json["results"].map((value) => new PhotoResponse.fromJson(value
)).toList(); | 656 results = _json["results"] |
| 657 .map((value) => new PhotoResponse.fromJson(value)) |
| 658 .toList(); |
| 658 } | 659 } |
| 659 } | 660 } |
| 660 | 661 |
| 661 core.Map<core.String, core.Object> toJson() { | 662 core.Map<core.String, core.Object> toJson() { |
| 662 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 663 final core.Map<core.String, core.Object> _json = |
| 664 new core.Map<core.String, core.Object>(); |
| 663 if (results != null) { | 665 if (results != null) { |
| 664 _json["results"] = results.map((value) => (value).toJson()).toList(); | 666 _json["results"] = results.map((value) => (value).toJson()).toList(); |
| 665 } | 667 } |
| 666 return _json; | 668 return _json; |
| 667 } | 669 } |
| 668 } | 670 } |
| 669 | 671 |
| 670 /** | 672 /// Request to update the metadata of photos. |
| 671 * Request to update the metadata of photos. | 673 /// Updating the pixels of photos is not supported. |
| 672 * Updating the pixels of photos is not supported. | |
| 673 */ | |
| 674 class BatchUpdatePhotosRequest { | 674 class BatchUpdatePhotosRequest { |
| 675 /** | 675 /// Required. List of |
| 676 * Required. List of | 676 /// UpdatePhotoRequests. |
| 677 * UpdatePhotoRequests. | |
| 678 */ | |
| 679 core.List<UpdatePhotoRequest> updatePhotoRequests; | 677 core.List<UpdatePhotoRequest> updatePhotoRequests; |
| 680 | 678 |
| 681 BatchUpdatePhotosRequest(); | 679 BatchUpdatePhotosRequest(); |
| 682 | 680 |
| 683 BatchUpdatePhotosRequest.fromJson(core.Map _json) { | 681 BatchUpdatePhotosRequest.fromJson(core.Map _json) { |
| 684 if (_json.containsKey("updatePhotoRequests")) { | 682 if (_json.containsKey("updatePhotoRequests")) { |
| 685 updatePhotoRequests = _json["updatePhotoRequests"].map((value) => new Upda
tePhotoRequest.fromJson(value)).toList(); | 683 updatePhotoRequests = _json["updatePhotoRequests"] |
| 684 .map((value) => new UpdatePhotoRequest.fromJson(value)) |
| 685 .toList(); |
| 686 } | 686 } |
| 687 } | 687 } |
| 688 | 688 |
| 689 core.Map<core.String, core.Object> toJson() { | 689 core.Map<core.String, core.Object> toJson() { |
| 690 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 690 final core.Map<core.String, core.Object> _json = |
| 691 new core.Map<core.String, core.Object>(); |
| 691 if (updatePhotoRequests != null) { | 692 if (updatePhotoRequests != null) { |
| 692 _json["updatePhotoRequests"] = updatePhotoRequests.map((value) => (value).
toJson()).toList(); | 693 _json["updatePhotoRequests"] = |
| 694 updatePhotoRequests.map((value) => (value).toJson()).toList(); |
| 693 } | 695 } |
| 694 return _json; | 696 return _json; |
| 695 } | 697 } |
| 696 } | 698 } |
| 697 | 699 |
| 698 /** | 700 /// Response to batch update of metadata of one or more |
| 699 * Response to batch update of metadata of one or more | 701 /// Photos. |
| 700 * Photos. | |
| 701 */ | |
| 702 class BatchUpdatePhotosResponse { | 702 class BatchUpdatePhotosResponse { |
| 703 /** | 703 /// List of results for each individual |
| 704 * List of results for each individual | 704 /// Photo updated, in the same order as |
| 705 * Photo updated, in the same order as | 705 /// the request. |
| 706 * the request. | |
| 707 */ | |
| 708 core.List<PhotoResponse> results; | 706 core.List<PhotoResponse> results; |
| 709 | 707 |
| 710 BatchUpdatePhotosResponse(); | 708 BatchUpdatePhotosResponse(); |
| 711 | 709 |
| 712 BatchUpdatePhotosResponse.fromJson(core.Map _json) { | 710 BatchUpdatePhotosResponse.fromJson(core.Map _json) { |
| 713 if (_json.containsKey("results")) { | 711 if (_json.containsKey("results")) { |
| 714 results = _json["results"].map((value) => new PhotoResponse.fromJson(value
)).toList(); | 712 results = _json["results"] |
| 713 .map((value) => new PhotoResponse.fromJson(value)) |
| 714 .toList(); |
| 715 } | 715 } |
| 716 } | 716 } |
| 717 | 717 |
| 718 core.Map<core.String, core.Object> toJson() { | 718 core.Map<core.String, core.Object> toJson() { |
| 719 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 719 final core.Map<core.String, core.Object> _json = |
| 720 new core.Map<core.String, core.Object>(); |
| 720 if (results != null) { | 721 if (results != null) { |
| 721 _json["results"] = results.map((value) => (value).toJson()).toList(); | 722 _json["results"] = results.map((value) => (value).toJson()).toList(); |
| 722 } | 723 } |
| 723 return _json; | 724 return _json; |
| 724 } | 725 } |
| 725 } | 726 } |
| 726 | 727 |
| 727 /** A connection is the link from a source photo to a destination photo. */ | 728 /// A connection is the link from a source photo to a destination photo. |
| 728 class Connection { | 729 class Connection { |
| 729 /** | 730 /// Required. The destination of the connection from the containing photo to |
| 730 * Required. The destination of the connection from the containing photo to | 731 /// another photo. |
| 731 * another photo. | |
| 732 */ | |
| 733 PhotoId target; | 732 PhotoId target; |
| 734 | 733 |
| 735 Connection(); | 734 Connection(); |
| 736 | 735 |
| 737 Connection.fromJson(core.Map _json) { | 736 Connection.fromJson(core.Map _json) { |
| 738 if (_json.containsKey("target")) { | 737 if (_json.containsKey("target")) { |
| 739 target = new PhotoId.fromJson(_json["target"]); | 738 target = new PhotoId.fromJson(_json["target"]); |
| 740 } | 739 } |
| 741 } | 740 } |
| 742 | 741 |
| 743 core.Map<core.String, core.Object> toJson() { | 742 core.Map<core.String, core.Object> toJson() { |
| 744 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 743 final core.Map<core.String, core.Object> _json = |
| 744 new core.Map<core.String, core.Object>(); |
| 745 if (target != null) { | 745 if (target != null) { |
| 746 _json["target"] = (target).toJson(); | 746 _json["target"] = (target).toJson(); |
| 747 } | 747 } |
| 748 return _json; | 748 return _json; |
| 749 } | 749 } |
| 750 } | 750 } |
| 751 | 751 |
| 752 /** | 752 /// A generic empty message that you can re-use to avoid defining duplicated |
| 753 * A generic empty message that you can re-use to avoid defining duplicated | 753 /// empty messages in your APIs. A typical example is to use it as the request |
| 754 * empty messages in your APIs. A typical example is to use it as the request | 754 /// or the response type of an API method. For instance: |
| 755 * or the response type of an API method. For instance: | 755 /// |
| 756 * | 756 /// service Foo { |
| 757 * service Foo { | 757 /// rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); |
| 758 * rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); | 758 /// } |
| 759 * } | 759 /// |
| 760 * | 760 /// The JSON representation for `Empty` is empty JSON object `{}`. |
| 761 * The JSON representation for `Empty` is empty JSON object `{}`. | |
| 762 */ | |
| 763 class Empty { | 761 class Empty { |
| 764 | |
| 765 Empty(); | 762 Empty(); |
| 766 | 763 |
| 767 Empty.fromJson(core.Map _json) { | 764 Empty.fromJson(core.Map _json) {} |
| 768 } | |
| 769 | 765 |
| 770 core.Map<core.String, core.Object> toJson() { | 766 core.Map<core.String, core.Object> toJson() { |
| 771 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 767 final core.Map<core.String, core.Object> _json = |
| 768 new core.Map<core.String, core.Object>(); |
| 772 return _json; | 769 return _json; |
| 773 } | 770 } |
| 774 } | 771 } |
| 775 | 772 |
| 776 /** | 773 /// An object representing a latitude/longitude pair. This is expressed as a |
| 777 * An object representing a latitude/longitude pair. This is expressed as a pair | 774 /// pair |
| 778 * of doubles representing degrees latitude and degrees longitude. Unless | 775 /// of doubles representing degrees latitude and degrees longitude. Unless |
| 779 * specified otherwise, this must conform to the | 776 /// specified otherwise, this must conform to the |
| 780 * <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84 | 777 /// <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84 |
| 781 * standard</a>. Values must be within normalized ranges. | 778 /// standard</a>. Values must be within normalized ranges. |
| 782 * | 779 /// |
| 783 * Example of normalization code in Python: | 780 /// Example of normalization code in Python: |
| 784 * | 781 /// |
| 785 * def NormalizeLongitude(longitude): | 782 /// def NormalizeLongitude(longitude): |
| 786 * """Wraps decimal degrees longitude to [-180.0, 180.0].""" | 783 /// """Wraps decimal degrees longitude to [-180.0, 180.0].""" |
| 787 * q, r = divmod(longitude, 360.0) | 784 /// q, r = divmod(longitude, 360.0) |
| 788 * if r > 180.0 or (r == 180.0 and q <= -1.0): | 785 /// if r > 180.0 or (r == 180.0 and q <= -1.0): |
| 789 * return r - 360.0 | 786 /// return r - 360.0 |
| 790 * return r | 787 /// return r |
| 791 * | 788 /// |
| 792 * def NormalizeLatLng(latitude, longitude): | 789 /// def NormalizeLatLng(latitude, longitude): |
| 793 * """Wraps decimal degrees latitude and longitude to | 790 /// """Wraps decimal degrees latitude and longitude to |
| 794 * [-90.0, 90.0] and [-180.0, 180.0], respectively.""" | 791 /// [-90.0, 90.0] and [-180.0, 180.0], respectively.""" |
| 795 * r = latitude % 360.0 | 792 /// r = latitude % 360.0 |
| 796 * if r <= 90.0: | 793 /// if r <= 90.0: |
| 797 * return r, NormalizeLongitude(longitude) | 794 /// return r, NormalizeLongitude(longitude) |
| 798 * elif r >= 270.0: | 795 /// elif r >= 270.0: |
| 799 * return r - 360, NormalizeLongitude(longitude) | 796 /// return r - 360, NormalizeLongitude(longitude) |
| 800 * else: | 797 /// else: |
| 801 * return 180 - r, NormalizeLongitude(longitude + 180.0) | 798 /// return 180 - r, NormalizeLongitude(longitude + 180.0) |
| 802 * | 799 /// |
| 803 * assert 180.0 == NormalizeLongitude(180.0) | 800 /// assert 180.0 == NormalizeLongitude(180.0) |
| 804 * assert -180.0 == NormalizeLongitude(-180.0) | 801 /// assert -180.0 == NormalizeLongitude(-180.0) |
| 805 * assert -179.0 == NormalizeLongitude(181.0) | 802 /// assert -179.0 == NormalizeLongitude(181.0) |
| 806 * assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0) | 803 /// assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0) |
| 807 * assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0) | 804 /// assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0) |
| 808 * assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0) | 805 /// assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0) |
| 809 * assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0) | 806 /// assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0) |
| 810 * assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0) | 807 /// assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0) |
| 811 * assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0) | 808 /// assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0) |
| 812 * assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0) | 809 /// assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0) |
| 813 * assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0) | 810 /// assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0) |
| 814 * assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0) | 811 /// assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0) |
| 815 * assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0) | 812 /// assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0) |
| 816 */ | |
| 817 class LatLng { | 813 class LatLng { |
| 818 /** The latitude in degrees. It must be in the range [-90.0, +90.0]. */ | 814 /// The latitude in degrees. It must be in the range [-90.0, +90.0]. |
| 819 core.double latitude; | 815 core.double latitude; |
| 820 /** The longitude in degrees. It must be in the range [-180.0, +180.0]. */ | 816 |
| 817 /// The longitude in degrees. It must be in the range [-180.0, +180.0]. |
| 821 core.double longitude; | 818 core.double longitude; |
| 822 | 819 |
| 823 LatLng(); | 820 LatLng(); |
| 824 | 821 |
| 825 LatLng.fromJson(core.Map _json) { | 822 LatLng.fromJson(core.Map _json) { |
| 826 if (_json.containsKey("latitude")) { | 823 if (_json.containsKey("latitude")) { |
| 827 latitude = _json["latitude"]; | 824 latitude = _json["latitude"]; |
| 828 } | 825 } |
| 829 if (_json.containsKey("longitude")) { | 826 if (_json.containsKey("longitude")) { |
| 830 longitude = _json["longitude"]; | 827 longitude = _json["longitude"]; |
| 831 } | 828 } |
| 832 } | 829 } |
| 833 | 830 |
| 834 core.Map<core.String, core.Object> toJson() { | 831 core.Map<core.String, core.Object> toJson() { |
| 835 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 832 final core.Map<core.String, core.Object> _json = |
| 833 new core.Map<core.String, core.Object>(); |
| 836 if (latitude != null) { | 834 if (latitude != null) { |
| 837 _json["latitude"] = latitude; | 835 _json["latitude"] = latitude; |
| 838 } | 836 } |
| 839 if (longitude != null) { | 837 if (longitude != null) { |
| 840 _json["longitude"] = longitude; | 838 _json["longitude"] = longitude; |
| 841 } | 839 } |
| 842 return _json; | 840 return _json; |
| 843 } | 841 } |
| 844 } | 842 } |
| 845 | 843 |
| 846 /** Level information containing level number and its corresponding name. */ | 844 /// Level information containing level number and its corresponding name. |
| 847 class Level { | 845 class Level { |
| 848 /** | 846 /// Required. A name assigned to this Level, restricted to 3 characters. |
| 849 * Required. A name assigned to this Level, restricted to 3 characters. | 847 /// Consider how the elevator buttons would be labeled for this level if |
| 850 * Consider how the elevator buttons would be labeled for this level if there | 848 /// there |
| 851 * was an elevator. | 849 /// was an elevator. |
| 852 */ | |
| 853 core.String name; | 850 core.String name; |
| 854 /** | 851 |
| 855 * Floor number, used for ordering. 0 indicates the ground level, 1 indicates | 852 /// Floor number, used for ordering. 0 indicates the ground level, 1 |
| 856 * the first level above ground level, -1 indicates the first level under | 853 /// indicates |
| 857 * ground level. Non-integer values are OK. | 854 /// the first level above ground level, -1 indicates the first level under |
| 858 */ | 855 /// ground level. Non-integer values are OK. |
| 859 core.double number; | 856 core.double number; |
| 860 | 857 |
| 861 Level(); | 858 Level(); |
| 862 | 859 |
| 863 Level.fromJson(core.Map _json) { | 860 Level.fromJson(core.Map _json) { |
| 864 if (_json.containsKey("name")) { | 861 if (_json.containsKey("name")) { |
| 865 name = _json["name"]; | 862 name = _json["name"]; |
| 866 } | 863 } |
| 867 if (_json.containsKey("number")) { | 864 if (_json.containsKey("number")) { |
| 868 number = _json["number"]; | 865 number = _json["number"]; |
| 869 } | 866 } |
| 870 } | 867 } |
| 871 | 868 |
| 872 core.Map<core.String, core.Object> toJson() { | 869 core.Map<core.String, core.Object> toJson() { |
| 873 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 870 final core.Map<core.String, core.Object> _json = |
| 871 new core.Map<core.String, core.Object>(); |
| 874 if (name != null) { | 872 if (name != null) { |
| 875 _json["name"] = name; | 873 _json["name"] = name; |
| 876 } | 874 } |
| 877 if (number != null) { | 875 if (number != null) { |
| 878 _json["number"] = number; | 876 _json["number"] = number; |
| 879 } | 877 } |
| 880 return _json; | 878 return _json; |
| 881 } | 879 } |
| 882 } | 880 } |
| 883 | 881 |
| 884 /** Response to list all photos that belong to a user. */ | 882 /// Response to list all photos that belong to a user. |
| 885 class ListPhotosResponse { | 883 class ListPhotosResponse { |
| 886 /** | 884 /// Token to retrieve the next page of results, or empty if there are no more |
| 887 * Token to retrieve the next page of results, or empty if there are no more | 885 /// results in the list. |
| 888 * results in the list. | |
| 889 */ | |
| 890 core.String nextPageToken; | 886 core.String nextPageToken; |
| 891 /** | 887 |
| 892 * List of photos. The maximum number of items returned is based on the | 888 /// List of photos. The maximum number of items returned is based on the |
| 893 * pageSize field | 889 /// pageSize field |
| 894 * in the request. | 890 /// in the request. |
| 895 */ | |
| 896 core.List<Photo> photos; | 891 core.List<Photo> photos; |
| 897 | 892 |
| 898 ListPhotosResponse(); | 893 ListPhotosResponse(); |
| 899 | 894 |
| 900 ListPhotosResponse.fromJson(core.Map _json) { | 895 ListPhotosResponse.fromJson(core.Map _json) { |
| 901 if (_json.containsKey("nextPageToken")) { | 896 if (_json.containsKey("nextPageToken")) { |
| 902 nextPageToken = _json["nextPageToken"]; | 897 nextPageToken = _json["nextPageToken"]; |
| 903 } | 898 } |
| 904 if (_json.containsKey("photos")) { | 899 if (_json.containsKey("photos")) { |
| 905 photos = _json["photos"].map((value) => new Photo.fromJson(value)).toList(
); | 900 photos = |
| 901 _json["photos"].map((value) => new Photo.fromJson(value)).toList(); |
| 906 } | 902 } |
| 907 } | 903 } |
| 908 | 904 |
| 909 core.Map<core.String, core.Object> toJson() { | 905 core.Map<core.String, core.Object> toJson() { |
| 910 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 906 final core.Map<core.String, core.Object> _json = |
| 907 new core.Map<core.String, core.Object>(); |
| 911 if (nextPageToken != null) { | 908 if (nextPageToken != null) { |
| 912 _json["nextPageToken"] = nextPageToken; | 909 _json["nextPageToken"] = nextPageToken; |
| 913 } | 910 } |
| 914 if (photos != null) { | 911 if (photos != null) { |
| 915 _json["photos"] = photos.map((value) => (value).toJson()).toList(); | 912 _json["photos"] = photos.map((value) => (value).toJson()).toList(); |
| 916 } | 913 } |
| 917 return _json; | 914 return _json; |
| 918 } | 915 } |
| 919 } | 916 } |
| 920 | 917 |
| 921 /** Photo is used to store 360 photos along with photo metadata. */ | 918 /// Photo is used to store 360 photos along with photo metadata. |
| 922 class Photo { | 919 class Photo { |
| 923 /** | 920 /// Absolute time when the photo was captured. |
| 924 * Absolute time when the photo was captured. | 921 /// When the photo has no exif timestamp, this is used to set a timestamp in |
| 925 * When the photo has no exif timestamp, this is used to set a timestamp in | 922 /// the photo metadata. |
| 926 * the photo metadata. | |
| 927 */ | |
| 928 core.String captureTime; | 923 core.String captureTime; |
| 929 /** | 924 |
| 930 * Connections to other photos. A connection represents the link from this | 925 /// Connections to other photos. A connection represents the link from this |
| 931 * photo to another photo. | 926 /// photo to another photo. |
| 932 */ | |
| 933 core.List<Connection> connections; | 927 core.List<Connection> connections; |
| 934 /** | 928 |
| 935 * Output only. The download URL for the photo bytes. This field is set only | 929 /// Output only. The download URL for the photo bytes. This field is set only |
| 936 * when | 930 /// when |
| 937 * GetPhotoRequest.view | 931 /// GetPhotoRequest.view |
| 938 * is set to | 932 /// is set to |
| 939 * PhotoView.INCLUDE_DOWNLOAD_URL. | 933 /// PhotoView.INCLUDE_DOWNLOAD_URL. |
| 940 */ | |
| 941 core.String downloadUrl; | 934 core.String downloadUrl; |
| 942 /** | 935 |
| 943 * Required when updating photo. Output only when creating photo. | 936 /// Required when updating photo. Output only when creating photo. |
| 944 * Identifier for the photo, which is unique among all photos in | 937 /// Identifier for the photo, which is unique among all photos in |
| 945 * Google. | 938 /// Google. |
| 946 */ | |
| 947 PhotoId photoId; | 939 PhotoId photoId; |
| 948 /** Places where this photo belongs. */ | 940 |
| 941 /// Places where this photo belongs. |
| 949 core.List<Place> places; | 942 core.List<Place> places; |
| 950 /** Pose of the photo. */ | 943 |
| 944 /// Pose of the photo. |
| 951 Pose pose; | 945 Pose pose; |
| 952 /** Output only. The share link for the photo. */ | 946 |
| 947 /// Output only. The share link for the photo. |
| 953 core.String shareLink; | 948 core.String shareLink; |
| 954 /** | 949 |
| 955 * Output only. The thumbnail URL for showing a preview of the given photo. | 950 /// Output only. The thumbnail URL for showing a preview of the given photo. |
| 956 */ | |
| 957 core.String thumbnailUrl; | 951 core.String thumbnailUrl; |
| 958 /** | 952 |
| 959 * Required when creating photo. Input only. The resource URL where the photo | 953 /// Required when creating photo. Input only. The resource URL where the |
| 960 * bytes are uploaded to. | 954 /// photo |
| 961 */ | 955 /// bytes are uploaded to. |
| 962 UploadRef uploadReference; | 956 UploadRef uploadReference; |
| 963 /** Output only. View count of the photo. */ | 957 |
| 958 /// Output only. View count of the photo. |
| 964 core.String viewCount; | 959 core.String viewCount; |
| 965 | 960 |
| 966 Photo(); | 961 Photo(); |
| 967 | 962 |
| 968 Photo.fromJson(core.Map _json) { | 963 Photo.fromJson(core.Map _json) { |
| 969 if (_json.containsKey("captureTime")) { | 964 if (_json.containsKey("captureTime")) { |
| 970 captureTime = _json["captureTime"]; | 965 captureTime = _json["captureTime"]; |
| 971 } | 966 } |
| 972 if (_json.containsKey("connections")) { | 967 if (_json.containsKey("connections")) { |
| 973 connections = _json["connections"].map((value) => new Connection.fromJson(
value)).toList(); | 968 connections = _json["connections"] |
| 969 .map((value) => new Connection.fromJson(value)) |
| 970 .toList(); |
| 974 } | 971 } |
| 975 if (_json.containsKey("downloadUrl")) { | 972 if (_json.containsKey("downloadUrl")) { |
| 976 downloadUrl = _json["downloadUrl"]; | 973 downloadUrl = _json["downloadUrl"]; |
| 977 } | 974 } |
| 978 if (_json.containsKey("photoId")) { | 975 if (_json.containsKey("photoId")) { |
| 979 photoId = new PhotoId.fromJson(_json["photoId"]); | 976 photoId = new PhotoId.fromJson(_json["photoId"]); |
| 980 } | 977 } |
| 981 if (_json.containsKey("places")) { | 978 if (_json.containsKey("places")) { |
| 982 places = _json["places"].map((value) => new Place.fromJson(value)).toList(
); | 979 places = |
| 980 _json["places"].map((value) => new Place.fromJson(value)).toList(); |
| 983 } | 981 } |
| 984 if (_json.containsKey("pose")) { | 982 if (_json.containsKey("pose")) { |
| 985 pose = new Pose.fromJson(_json["pose"]); | 983 pose = new Pose.fromJson(_json["pose"]); |
| 986 } | 984 } |
| 987 if (_json.containsKey("shareLink")) { | 985 if (_json.containsKey("shareLink")) { |
| 988 shareLink = _json["shareLink"]; | 986 shareLink = _json["shareLink"]; |
| 989 } | 987 } |
| 990 if (_json.containsKey("thumbnailUrl")) { | 988 if (_json.containsKey("thumbnailUrl")) { |
| 991 thumbnailUrl = _json["thumbnailUrl"]; | 989 thumbnailUrl = _json["thumbnailUrl"]; |
| 992 } | 990 } |
| 993 if (_json.containsKey("uploadReference")) { | 991 if (_json.containsKey("uploadReference")) { |
| 994 uploadReference = new UploadRef.fromJson(_json["uploadReference"]); | 992 uploadReference = new UploadRef.fromJson(_json["uploadReference"]); |
| 995 } | 993 } |
| 996 if (_json.containsKey("viewCount")) { | 994 if (_json.containsKey("viewCount")) { |
| 997 viewCount = _json["viewCount"]; | 995 viewCount = _json["viewCount"]; |
| 998 } | 996 } |
| 999 } | 997 } |
| 1000 | 998 |
| 1001 core.Map<core.String, core.Object> toJson() { | 999 core.Map<core.String, core.Object> toJson() { |
| 1002 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1000 final core.Map<core.String, core.Object> _json = |
| 1001 new core.Map<core.String, core.Object>(); |
| 1003 if (captureTime != null) { | 1002 if (captureTime != null) { |
| 1004 _json["captureTime"] = captureTime; | 1003 _json["captureTime"] = captureTime; |
| 1005 } | 1004 } |
| 1006 if (connections != null) { | 1005 if (connections != null) { |
| 1007 _json["connections"] = connections.map((value) => (value).toJson()).toList
(); | 1006 _json["connections"] = |
| 1007 connections.map((value) => (value).toJson()).toList(); |
| 1008 } | 1008 } |
| 1009 if (downloadUrl != null) { | 1009 if (downloadUrl != null) { |
| 1010 _json["downloadUrl"] = downloadUrl; | 1010 _json["downloadUrl"] = downloadUrl; |
| 1011 } | 1011 } |
| 1012 if (photoId != null) { | 1012 if (photoId != null) { |
| 1013 _json["photoId"] = (photoId).toJson(); | 1013 _json["photoId"] = (photoId).toJson(); |
| 1014 } | 1014 } |
| 1015 if (places != null) { | 1015 if (places != null) { |
| 1016 _json["places"] = places.map((value) => (value).toJson()).toList(); | 1016 _json["places"] = places.map((value) => (value).toJson()).toList(); |
| 1017 } | 1017 } |
| 1018 if (pose != null) { | 1018 if (pose != null) { |
| 1019 _json["pose"] = (pose).toJson(); | 1019 _json["pose"] = (pose).toJson(); |
| 1020 } | 1020 } |
| 1021 if (shareLink != null) { | 1021 if (shareLink != null) { |
| 1022 _json["shareLink"] = shareLink; | 1022 _json["shareLink"] = shareLink; |
| 1023 } | 1023 } |
| 1024 if (thumbnailUrl != null) { | 1024 if (thumbnailUrl != null) { |
| 1025 _json["thumbnailUrl"] = thumbnailUrl; | 1025 _json["thumbnailUrl"] = thumbnailUrl; |
| 1026 } | 1026 } |
| 1027 if (uploadReference != null) { | 1027 if (uploadReference != null) { |
| 1028 _json["uploadReference"] = (uploadReference).toJson(); | 1028 _json["uploadReference"] = (uploadReference).toJson(); |
| 1029 } | 1029 } |
| 1030 if (viewCount != null) { | 1030 if (viewCount != null) { |
| 1031 _json["viewCount"] = viewCount; | 1031 _json["viewCount"] = viewCount; |
| 1032 } | 1032 } |
| 1033 return _json; | 1033 return _json; |
| 1034 } | 1034 } |
| 1035 } | 1035 } |
| 1036 | 1036 |
| 1037 /** Identifier for a Photo. */ | 1037 /// Identifier for a Photo. |
| 1038 class PhotoId { | 1038 class PhotoId { |
| 1039 /** Required. A base64 encoded identifier. */ | 1039 /// Required. A unique identifier for a photo. |
| 1040 core.String id; | 1040 core.String id; |
| 1041 | 1041 |
| 1042 PhotoId(); | 1042 PhotoId(); |
| 1043 | 1043 |
| 1044 PhotoId.fromJson(core.Map _json) { | 1044 PhotoId.fromJson(core.Map _json) { |
| 1045 if (_json.containsKey("id")) { | 1045 if (_json.containsKey("id")) { |
| 1046 id = _json["id"]; | 1046 id = _json["id"]; |
| 1047 } | 1047 } |
| 1048 } | 1048 } |
| 1049 | 1049 |
| 1050 core.Map<core.String, core.Object> toJson() { | 1050 core.Map<core.String, core.Object> toJson() { |
| 1051 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1051 final core.Map<core.String, core.Object> _json = |
| 1052 new core.Map<core.String, core.Object>(); |
| 1052 if (id != null) { | 1053 if (id != null) { |
| 1053 _json["id"] = id; | 1054 _json["id"] = id; |
| 1054 } | 1055 } |
| 1055 return _json; | 1056 return _json; |
| 1056 } | 1057 } |
| 1057 } | 1058 } |
| 1058 | 1059 |
| 1059 /** | 1060 /// Response payload for a single |
| 1060 * Response payload for a single | 1061 /// Photo |
| 1061 * Photo | 1062 /// in batch operations including |
| 1062 * in batch operations including | 1063 /// BatchGetPhotos |
| 1063 * BatchGetPhotos | 1064 /// and |
| 1064 * and | 1065 /// BatchUpdatePhotos. |
| 1065 * BatchUpdatePhotos. | |
| 1066 */ | |
| 1067 class PhotoResponse { | 1066 class PhotoResponse { |
| 1068 /** | 1067 /// The Photo resource, if the request |
| 1069 * The Photo resource, if the request | 1068 /// was successful. |
| 1070 * was successful. | |
| 1071 */ | |
| 1072 Photo photo; | 1069 Photo photo; |
| 1073 /** | 1070 |
| 1074 * The status for the operation to get or update a single photo in the batch | 1071 /// The status for the operation to get or update a single photo in the batch |
| 1075 * request. | 1072 /// request. |
| 1076 */ | |
| 1077 Status status; | 1073 Status status; |
| 1078 | 1074 |
| 1079 PhotoResponse(); | 1075 PhotoResponse(); |
| 1080 | 1076 |
| 1081 PhotoResponse.fromJson(core.Map _json) { | 1077 PhotoResponse.fromJson(core.Map _json) { |
| 1082 if (_json.containsKey("photo")) { | 1078 if (_json.containsKey("photo")) { |
| 1083 photo = new Photo.fromJson(_json["photo"]); | 1079 photo = new Photo.fromJson(_json["photo"]); |
| 1084 } | 1080 } |
| 1085 if (_json.containsKey("status")) { | 1081 if (_json.containsKey("status")) { |
| 1086 status = new Status.fromJson(_json["status"]); | 1082 status = new Status.fromJson(_json["status"]); |
| 1087 } | 1083 } |
| 1088 } | 1084 } |
| 1089 | 1085 |
| 1090 core.Map<core.String, core.Object> toJson() { | 1086 core.Map<core.String, core.Object> toJson() { |
| 1091 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1087 final core.Map<core.String, core.Object> _json = |
| 1088 new core.Map<core.String, core.Object>(); |
| 1092 if (photo != null) { | 1089 if (photo != null) { |
| 1093 _json["photo"] = (photo).toJson(); | 1090 _json["photo"] = (photo).toJson(); |
| 1094 } | 1091 } |
| 1095 if (status != null) { | 1092 if (status != null) { |
| 1096 _json["status"] = (status).toJson(); | 1093 _json["status"] = (status).toJson(); |
| 1097 } | 1094 } |
| 1098 return _json; | 1095 return _json; |
| 1099 } | 1096 } |
| 1100 } | 1097 } |
| 1101 | 1098 |
| 1102 /** Place metadata for an entity. */ | 1099 /// Place metadata for an entity. |
| 1103 class Place { | 1100 class Place { |
| 1104 /** | 1101 /// Required. Place identifier, as described in |
| 1105 * Required. Place identifier, as described in | 1102 /// https://developers.google.com/places/place-id. |
| 1106 * https://developers.google.com/places/place-id. | |
| 1107 */ | |
| 1108 core.String placeId; | 1103 core.String placeId; |
| 1109 | 1104 |
| 1110 Place(); | 1105 Place(); |
| 1111 | 1106 |
| 1112 Place.fromJson(core.Map _json) { | 1107 Place.fromJson(core.Map _json) { |
| 1113 if (_json.containsKey("placeId")) { | 1108 if (_json.containsKey("placeId")) { |
| 1114 placeId = _json["placeId"]; | 1109 placeId = _json["placeId"]; |
| 1115 } | 1110 } |
| 1116 } | 1111 } |
| 1117 | 1112 |
| 1118 core.Map<core.String, core.Object> toJson() { | 1113 core.Map<core.String, core.Object> toJson() { |
| 1119 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1114 final core.Map<core.String, core.Object> _json = |
| 1115 new core.Map<core.String, core.Object>(); |
| 1120 if (placeId != null) { | 1116 if (placeId != null) { |
| 1121 _json["placeId"] = placeId; | 1117 _json["placeId"] = placeId; |
| 1122 } | 1118 } |
| 1123 return _json; | 1119 return _json; |
| 1124 } | 1120 } |
| 1125 } | 1121 } |
| 1126 | 1122 |
| 1127 /** Raw pose measurement for an entity. */ | 1123 /// Raw pose measurement for an entity. |
| 1128 class Pose { | 1124 class Pose { |
| 1129 /** | 1125 /// Altitude of the pose in meters above ground level (as defined by WGS84). |
| 1130 * Altitude of the pose in meters above ground level (as defined by WGS84). | 1126 /// NaN indicates an unmeasured quantity. |
| 1131 * NaN indicates an unmeasured quantity. | |
| 1132 */ | |
| 1133 core.double altitude; | 1127 core.double altitude; |
| 1134 /** | 1128 |
| 1135 * Compass heading, measured at the center of the photo in degrees clockwise | 1129 /// Compass heading, measured at the center of the photo in degrees clockwise |
| 1136 * from North. Value must be >=0 and <360. | 1130 /// from North. Value must be >=0 and <360. |
| 1137 * NaN indicates an unmeasured quantity. | 1131 /// NaN indicates an unmeasured quantity. |
| 1138 */ | |
| 1139 core.double heading; | 1132 core.double heading; |
| 1140 /** | 1133 |
| 1141 * Latitude and longitude pair of the pose, as explained here: | 1134 /// Latitude and longitude pair of the pose, as explained here: |
| 1142 * https://cloud.google.com/datastore/docs/reference/rest/Shared.Types/LatLng | 1135 /// https://cloud.google.com/datastore/docs/reference/rest/Shared.Types/LatLng |
| 1143 * When creating a Photo, if the | 1136 /// When creating a Photo, if the |
| 1144 * latitude and longitude pair are not provided here, the geolocation from the | 1137 /// latitude and longitude pair are not provided here, the geolocation from |
| 1145 * exif header will be used. If the latitude and longitude pair is not | 1138 /// the |
| 1146 * provided and cannot be found in the exif header, the create photo process | 1139 /// exif header will be used. If the latitude and longitude pair is not |
| 1147 * will fail. | 1140 /// provided and cannot be found in the exif header, the create photo process |
| 1148 */ | 1141 /// will fail. |
| 1149 LatLng latLngPair; | 1142 LatLng latLngPair; |
| 1150 /** Level (the floor in a building) used to configure vertical navigation. */ | 1143 |
| 1144 /// Level (the floor in a building) used to configure vertical navigation. |
| 1151 Level level; | 1145 Level level; |
| 1152 /** | 1146 |
| 1153 * Pitch, measured at the center of the photo in degrees. Value must be >=-90 | 1147 /// Pitch, measured at the center of the photo in degrees. Value must be |
| 1154 * and <= 90. A value of -90 means looking directly down, and a value of 90 | 1148 /// >=-90 |
| 1155 * means looking directly up. | 1149 /// and <= 90. A value of -90 means looking directly down, and a value of 90 |
| 1156 * NaN indicates an unmeasured quantity. | 1150 /// means looking directly up. |
| 1157 */ | 1151 /// NaN indicates an unmeasured quantity. |
| 1158 core.double pitch; | 1152 core.double pitch; |
| 1159 /** | 1153 |
| 1160 * Roll, measured in degrees. Value must be >= 0 and <360. A value of 0 | 1154 /// Roll, measured in degrees. Value must be >= 0 and <360. A value of 0 |
| 1161 * means level with the horizon. | 1155 /// means level with the horizon. |
| 1162 * NaN indicates an unmeasured quantity. | 1156 /// NaN indicates an unmeasured quantity. |
| 1163 */ | |
| 1164 core.double roll; | 1157 core.double roll; |
| 1165 | 1158 |
| 1166 Pose(); | 1159 Pose(); |
| 1167 | 1160 |
| 1168 Pose.fromJson(core.Map _json) { | 1161 Pose.fromJson(core.Map _json) { |
| 1169 if (_json.containsKey("altitude")) { | 1162 if (_json.containsKey("altitude")) { |
| 1170 altitude = _json["altitude"]; | 1163 altitude = _json["altitude"]; |
| 1171 } | 1164 } |
| 1172 if (_json.containsKey("heading")) { | 1165 if (_json.containsKey("heading")) { |
| 1173 heading = _json["heading"]; | 1166 heading = _json["heading"]; |
| 1174 } | 1167 } |
| 1175 if (_json.containsKey("latLngPair")) { | 1168 if (_json.containsKey("latLngPair")) { |
| 1176 latLngPair = new LatLng.fromJson(_json["latLngPair"]); | 1169 latLngPair = new LatLng.fromJson(_json["latLngPair"]); |
| 1177 } | 1170 } |
| 1178 if (_json.containsKey("level")) { | 1171 if (_json.containsKey("level")) { |
| 1179 level = new Level.fromJson(_json["level"]); | 1172 level = new Level.fromJson(_json["level"]); |
| 1180 } | 1173 } |
| 1181 if (_json.containsKey("pitch")) { | 1174 if (_json.containsKey("pitch")) { |
| 1182 pitch = _json["pitch"]; | 1175 pitch = _json["pitch"]; |
| 1183 } | 1176 } |
| 1184 if (_json.containsKey("roll")) { | 1177 if (_json.containsKey("roll")) { |
| 1185 roll = _json["roll"]; | 1178 roll = _json["roll"]; |
| 1186 } | 1179 } |
| 1187 } | 1180 } |
| 1188 | 1181 |
| 1189 core.Map<core.String, core.Object> toJson() { | 1182 core.Map<core.String, core.Object> toJson() { |
| 1190 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1183 final core.Map<core.String, core.Object> _json = |
| 1184 new core.Map<core.String, core.Object>(); |
| 1191 if (altitude != null) { | 1185 if (altitude != null) { |
| 1192 _json["altitude"] = altitude; | 1186 _json["altitude"] = altitude; |
| 1193 } | 1187 } |
| 1194 if (heading != null) { | 1188 if (heading != null) { |
| 1195 _json["heading"] = heading; | 1189 _json["heading"] = heading; |
| 1196 } | 1190 } |
| 1197 if (latLngPair != null) { | 1191 if (latLngPair != null) { |
| 1198 _json["latLngPair"] = (latLngPair).toJson(); | 1192 _json["latLngPair"] = (latLngPair).toJson(); |
| 1199 } | 1193 } |
| 1200 if (level != null) { | 1194 if (level != null) { |
| 1201 _json["level"] = (level).toJson(); | 1195 _json["level"] = (level).toJson(); |
| 1202 } | 1196 } |
| 1203 if (pitch != null) { | 1197 if (pitch != null) { |
| 1204 _json["pitch"] = pitch; | 1198 _json["pitch"] = pitch; |
| 1205 } | 1199 } |
| 1206 if (roll != null) { | 1200 if (roll != null) { |
| 1207 _json["roll"] = roll; | 1201 _json["roll"] = roll; |
| 1208 } | 1202 } |
| 1209 return _json; | 1203 return _json; |
| 1210 } | 1204 } |
| 1211 } | 1205 } |
| 1212 | 1206 |
| 1213 /** | 1207 /// The `Status` type defines a logical error model that is suitable for |
| 1214 * The `Status` type defines a logical error model that is suitable for | 1208 /// different |
| 1215 * different | 1209 /// programming environments, including REST APIs and RPC APIs. It is used by |
| 1216 * programming environments, including REST APIs and RPC APIs. It is used by | 1210 /// [gRPC](https://github.com/grpc). The error model is designed to be: |
| 1217 * [gRPC](https://github.com/grpc). The error model is designed to be: | 1211 /// |
| 1218 * | 1212 /// - Simple to use and understand for most users |
| 1219 * - Simple to use and understand for most users | 1213 /// - Flexible enough to meet unexpected needs |
| 1220 * - Flexible enough to meet unexpected needs | 1214 /// |
| 1221 * | 1215 /// # Overview |
| 1222 * # Overview | 1216 /// |
| 1223 * | 1217 /// The `Status` message contains three pieces of data: error code, error |
| 1224 * The `Status` message contains three pieces of data: error code, error | 1218 /// message, |
| 1225 * message, | 1219 /// and error details. The error code should be an enum value of |
| 1226 * and error details. The error code should be an enum value of | 1220 /// google.rpc.Code, but it may accept additional error codes if needed. The |
| 1227 * google.rpc.Code, but it may accept additional error codes if needed. The | 1221 /// error message should be a developer-facing English message that helps |
| 1228 * error message should be a developer-facing English message that helps | 1222 /// developers *understand* and *resolve* the error. If a localized user-facing |
| 1229 * developers *understand* and *resolve* the error. If a localized user-facing | 1223 /// error message is needed, put the localized message in the error details or |
| 1230 * error message is needed, put the localized message in the error details or | 1224 /// localize it in the client. The optional error details may contain arbitrary |
| 1231 * localize it in the client. The optional error details may contain arbitrary | 1225 /// information about the error. There is a predefined set of error detail |
| 1232 * information about the error. There is a predefined set of error detail types | 1226 /// types |
| 1233 * in the package `google.rpc` that can be used for common error conditions. | 1227 /// in the package `google.rpc` that can be used for common error conditions. |
| 1234 * | 1228 /// |
| 1235 * # Language mapping | 1229 /// # Language mapping |
| 1236 * | 1230 /// |
| 1237 * The `Status` message is the logical representation of the error model, but it | 1231 /// The `Status` message is the logical representation of the error model, but |
| 1238 * is not necessarily the actual wire format. When the `Status` message is | 1232 /// it |
| 1239 * exposed in different client libraries and different wire protocols, it can be | 1233 /// is not necessarily the actual wire format. When the `Status` message is |
| 1240 * mapped differently. For example, it will likely be mapped to some exceptions | 1234 /// exposed in different client libraries and different wire protocols, it can |
| 1241 * in Java, but more likely mapped to some error codes in C. | 1235 /// be |
| 1242 * | 1236 /// mapped differently. For example, it will likely be mapped to some |
| 1243 * # Other uses | 1237 /// exceptions |
| 1244 * | 1238 /// in Java, but more likely mapped to some error codes in C. |
| 1245 * The error model and the `Status` message can be used in a variety of | 1239 /// |
| 1246 * environments, either with or without APIs, to provide a | 1240 /// # Other uses |
| 1247 * consistent developer experience across different environments. | 1241 /// |
| 1248 * | 1242 /// The error model and the `Status` message can be used in a variety of |
| 1249 * Example uses of this error model include: | 1243 /// environments, either with or without APIs, to provide a |
| 1250 * | 1244 /// consistent developer experience across different environments. |
| 1251 * - Partial errors. If a service needs to return partial errors to the client, | 1245 /// |
| 1252 * it may embed the `Status` in the normal response to indicate the partial | 1246 /// Example uses of this error model include: |
| 1253 * errors. | 1247 /// |
| 1254 * | 1248 /// - Partial errors. If a service needs to return partial errors to the |
| 1255 * - Workflow errors. A typical workflow has multiple steps. Each step may | 1249 /// client, |
| 1256 * have a `Status` message for error reporting. | 1250 /// it may embed the `Status` in the normal response to indicate the partial |
| 1257 * | 1251 /// errors. |
| 1258 * - Batch operations. If a client uses batch request and batch response, the | 1252 /// |
| 1259 * `Status` message should be used directly inside batch response, one for | 1253 /// - Workflow errors. A typical workflow has multiple steps. Each step may |
| 1260 * each error sub-response. | 1254 /// have a `Status` message for error reporting. |
| 1261 * | 1255 /// |
| 1262 * - Asynchronous operations. If an API call embeds asynchronous operation | 1256 /// - Batch operations. If a client uses batch request and batch response, the |
| 1263 * results in its response, the status of those operations should be | 1257 /// `Status` message should be used directly inside batch response, one for |
| 1264 * represented directly using the `Status` message. | 1258 /// each error sub-response. |
| 1265 * | 1259 /// |
| 1266 * - Logging. If some API errors are stored in logs, the message `Status` could | 1260 /// - Asynchronous operations. If an API call embeds asynchronous operation |
| 1267 * be used directly after any stripping needed for security/privacy reasons. | 1261 /// results in its response, the status of those operations should be |
| 1268 */ | 1262 /// represented directly using the `Status` message. |
| 1263 /// |
| 1264 /// - Logging. If some API errors are stored in logs, the message `Status` |
| 1265 /// could |
| 1266 /// be used directly after any stripping needed for security/privacy reasons. |
| 1269 class Status { | 1267 class Status { |
| 1270 /** The status code, which should be an enum value of google.rpc.Code. */ | 1268 /// The status code, which should be an enum value of google.rpc.Code. |
| 1271 core.int code; | 1269 core.int code; |
| 1272 /** | 1270 |
| 1273 * A list of messages that carry the error details. There is a common set of | 1271 /// A list of messages that carry the error details. There is a common set |
| 1274 * message types for APIs to use. | 1272 /// of |
| 1275 * | 1273 /// message types for APIs to use. |
| 1276 * The values for Object must be JSON objects. It can consist of `num`, | 1274 /// |
| 1277 * `String`, `bool` and `null` as well as `Map` and `List` values. | 1275 /// The values for Object must be JSON objects. It can consist of `num`, |
| 1278 */ | 1276 /// `String`, `bool` and `null` as well as `Map` and `List` values. |
| 1279 core.List<core.Map<core.String, core.Object>> details; | 1277 core.List<core.Map<core.String, core.Object>> details; |
| 1280 /** | 1278 |
| 1281 * A developer-facing error message, which should be in English. Any | 1279 /// A developer-facing error message, which should be in English. Any |
| 1282 * user-facing error message should be localized and sent in the | 1280 /// user-facing error message should be localized and sent in the |
| 1283 * google.rpc.Status.details field, or localized by the client. | 1281 /// google.rpc.Status.details field, or localized by the client. |
| 1284 */ | |
| 1285 core.String message; | 1282 core.String message; |
| 1286 | 1283 |
| 1287 Status(); | 1284 Status(); |
| 1288 | 1285 |
| 1289 Status.fromJson(core.Map _json) { | 1286 Status.fromJson(core.Map _json) { |
| 1290 if (_json.containsKey("code")) { | 1287 if (_json.containsKey("code")) { |
| 1291 code = _json["code"]; | 1288 code = _json["code"]; |
| 1292 } | 1289 } |
| 1293 if (_json.containsKey("details")) { | 1290 if (_json.containsKey("details")) { |
| 1294 details = _json["details"]; | 1291 details = _json["details"]; |
| 1295 } | 1292 } |
| 1296 if (_json.containsKey("message")) { | 1293 if (_json.containsKey("message")) { |
| 1297 message = _json["message"]; | 1294 message = _json["message"]; |
| 1298 } | 1295 } |
| 1299 } | 1296 } |
| 1300 | 1297 |
| 1301 core.Map<core.String, core.Object> toJson() { | 1298 core.Map<core.String, core.Object> toJson() { |
| 1302 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1299 final core.Map<core.String, core.Object> _json = |
| 1300 new core.Map<core.String, core.Object>(); |
| 1303 if (code != null) { | 1301 if (code != null) { |
| 1304 _json["code"] = code; | 1302 _json["code"] = code; |
| 1305 } | 1303 } |
| 1306 if (details != null) { | 1304 if (details != null) { |
| 1307 _json["details"] = details; | 1305 _json["details"] = details; |
| 1308 } | 1306 } |
| 1309 if (message != null) { | 1307 if (message != null) { |
| 1310 _json["message"] = message; | 1308 _json["message"] = message; |
| 1311 } | 1309 } |
| 1312 return _json; | 1310 return _json; |
| 1313 } | 1311 } |
| 1314 } | 1312 } |
| 1315 | 1313 |
| 1316 /** | 1314 /// Request to update the metadata of a |
| 1317 * Request to update the metadata of a | 1315 /// Photo. Updating the pixels of a photo |
| 1318 * Photo. Updating the pixels of a photo | 1316 /// is not supported. |
| 1319 * is not supported. | |
| 1320 */ | |
| 1321 class UpdatePhotoRequest { | 1317 class UpdatePhotoRequest { |
| 1322 /** | 1318 /// Required. Photo object containing the |
| 1323 * Required. Photo object containing the | 1319 /// new metadata. |
| 1324 * new metadata. Only the fields specified in | |
| 1325 * updateMask | |
| 1326 * field are used. If `updateMask` is not present, the update applies to all | |
| 1327 * fields. <aside class="note"><b>Note:</b> To update | |
| 1328 * Pose.altitude, | |
| 1329 * Pose.latLngPair has to be | |
| 1330 * filled as well. Otherwise, the request will fail. | |
| 1331 */ | |
| 1332 Photo photo; | 1320 Photo photo; |
| 1333 /** | 1321 |
| 1334 * Mask that identifies fields on the photo metadata to update. | 1322 /// Mask that identifies fields on the photo metadata to update. |
| 1335 * If not present, the old Photo metadata will be entirely replaced with the | 1323 /// If not present, the old Photo metadata will be entirely replaced with the |
| 1336 * new Photo metadata in this request. The update fails if invalid fields are | 1324 /// new Photo metadata in this request. The update fails if invalid fields |
| 1337 * specified. Multiple fields can be specified in a comma-delimited list. | 1325 /// are |
| 1338 * | 1326 /// specified. Multiple fields can be specified in a comma-delimited list. |
| 1339 * The following fields are valid: | 1327 /// |
| 1340 * | 1328 /// The following fields are valid: |
| 1341 * * `pose.heading` | 1329 /// |
| 1342 * * `pose.latlngpair` | 1330 /// * `pose.heading` |
| 1343 * * `pose.pitch` | 1331 /// * `pose.latLngPair` |
| 1344 * * `pose.roll` | 1332 /// * `pose.pitch` |
| 1345 * * `pose.level` | 1333 /// * `pose.roll` |
| 1346 * * `pose.altitude` | 1334 /// * `pose.level` |
| 1347 * * `connections` | 1335 /// * `pose.altitude` |
| 1348 * * `places` | 1336 /// * `connections` |
| 1349 * | 1337 /// * `places` |
| 1350 * | 1338 /// |
| 1351 * <aside class="note"><b>Note:</b> Repeated fields in | 1339 /// |
| 1352 * updateMask | 1340 /// <aside class="note"><b>Note:</b> Repeated fields in |
| 1353 * mean the entire set of repeated values will be replaced with the new | 1341 /// updateMask |
| 1354 * contents. For example, if | 1342 /// mean the entire set of repeated values will be replaced with the new |
| 1355 * updateMask | 1343 /// contents. For example, if |
| 1356 * contains `connections` and | 1344 /// updateMask |
| 1357 * google.streetview.publish.v1.UpdatePhotoRequest.photo.connections is | 1345 /// contains `connections` and `UpdatePhotoRequest.photo.connections` is |
| 1358 * empty, all connections will be removed.</aside> | 1346 /// empty, |
| 1359 */ | 1347 /// all connections will be removed.</aside> |
| 1360 core.String updateMask; | 1348 core.String updateMask; |
| 1361 | 1349 |
| 1362 UpdatePhotoRequest(); | 1350 UpdatePhotoRequest(); |
| 1363 | 1351 |
| 1364 UpdatePhotoRequest.fromJson(core.Map _json) { | 1352 UpdatePhotoRequest.fromJson(core.Map _json) { |
| 1365 if (_json.containsKey("photo")) { | 1353 if (_json.containsKey("photo")) { |
| 1366 photo = new Photo.fromJson(_json["photo"]); | 1354 photo = new Photo.fromJson(_json["photo"]); |
| 1367 } | 1355 } |
| 1368 if (_json.containsKey("updateMask")) { | 1356 if (_json.containsKey("updateMask")) { |
| 1369 updateMask = _json["updateMask"]; | 1357 updateMask = _json["updateMask"]; |
| 1370 } | 1358 } |
| 1371 } | 1359 } |
| 1372 | 1360 |
| 1373 core.Map<core.String, core.Object> toJson() { | 1361 core.Map<core.String, core.Object> toJson() { |
| 1374 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1362 final core.Map<core.String, core.Object> _json = |
| 1363 new core.Map<core.String, core.Object>(); |
| 1375 if (photo != null) { | 1364 if (photo != null) { |
| 1376 _json["photo"] = (photo).toJson(); | 1365 _json["photo"] = (photo).toJson(); |
| 1377 } | 1366 } |
| 1378 if (updateMask != null) { | 1367 if (updateMask != null) { |
| 1379 _json["updateMask"] = updateMask; | 1368 _json["updateMask"] = updateMask; |
| 1380 } | 1369 } |
| 1381 return _json; | 1370 return _json; |
| 1382 } | 1371 } |
| 1383 } | 1372 } |
| 1384 | 1373 |
| 1385 /** Upload reference for media files. */ | 1374 /// Upload reference for media files. |
| 1386 class UploadRef { | 1375 class UploadRef { |
| 1387 /** | 1376 /// Required. An upload reference should be unique for each user. It follows |
| 1388 * Required. An upload reference should be unique for each user. It follows | 1377 /// the form: |
| 1389 * the form: | 1378 /// "https://streetviewpublish.googleapis.com/media/user/{account_id}/photo/{u
pload_reference}" |
| 1390 * "https://streetviewpublish.googleapis.com/media/user/{account_id}/photo/{up
load_reference}" | |
| 1391 */ | |
| 1392 core.String uploadUrl; | 1379 core.String uploadUrl; |
| 1393 | 1380 |
| 1394 UploadRef(); | 1381 UploadRef(); |
| 1395 | 1382 |
| 1396 UploadRef.fromJson(core.Map _json) { | 1383 UploadRef.fromJson(core.Map _json) { |
| 1397 if (_json.containsKey("uploadUrl")) { | 1384 if (_json.containsKey("uploadUrl")) { |
| 1398 uploadUrl = _json["uploadUrl"]; | 1385 uploadUrl = _json["uploadUrl"]; |
| 1399 } | 1386 } |
| 1400 } | 1387 } |
| 1401 | 1388 |
| 1402 core.Map<core.String, core.Object> toJson() { | 1389 core.Map<core.String, core.Object> toJson() { |
| 1403 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1390 final core.Map<core.String, core.Object> _json = |
| 1391 new core.Map<core.String, core.Object>(); |
| 1404 if (uploadUrl != null) { | 1392 if (uploadUrl != null) { |
| 1405 _json["uploadUrl"] = uploadUrl; | 1393 _json["uploadUrl"] = uploadUrl; |
| 1406 } | 1394 } |
| 1407 return _json; | 1395 return _json; |
| 1408 } | 1396 } |
| 1409 } | 1397 } |
| OLD | NEW |