[e3d4e0a] | 1 | <?php
|
---|
| 2 | /*
|
---|
| 3 | * Copyright 2014 Google Inc.
|
---|
| 4 | *
|
---|
| 5 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
---|
| 6 | * use this file except in compliance with the License. You may obtain a copy of
|
---|
| 7 | * the License at
|
---|
| 8 | *
|
---|
| 9 | * http://www.apache.org/licenses/LICENSE-2.0
|
---|
| 10 | *
|
---|
| 11 | * Unless required by applicable law or agreed to in writing, software
|
---|
| 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
---|
| 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
---|
| 14 | * License for the specific language governing permissions and limitations under
|
---|
| 15 | * the License.
|
---|
| 16 | */
|
---|
| 17 |
|
---|
| 18 | namespace Google\Service\StreetViewPublish\Resource;
|
---|
| 19 |
|
---|
| 20 | use Google\Service\StreetViewPublish\Operation;
|
---|
| 21 | use Google\Service\StreetViewPublish\PhotoSequence as PhotoSequenceModel;
|
---|
| 22 | use Google\Service\StreetViewPublish\StreetviewpublishEmpty;
|
---|
| 23 | use Google\Service\StreetViewPublish\UploadRef;
|
---|
| 24 |
|
---|
| 25 | /**
|
---|
| 26 | * The "photoSequence" collection of methods.
|
---|
| 27 | * Typical usage is:
|
---|
| 28 | * <code>
|
---|
| 29 | * $streetviewpublishService = new Google\Service\StreetViewPublish(...);
|
---|
| 30 | * $photoSequence = $streetviewpublishService->photoSequence;
|
---|
| 31 | * </code>
|
---|
| 32 | */
|
---|
| 33 | class PhotoSequence extends \Google\Service\Resource
|
---|
| 34 | {
|
---|
| 35 | /**
|
---|
| 36 | * After the client finishes uploading the PhotoSequence with the returned
|
---|
| 37 | * UploadRef, CreatePhotoSequence extracts a sequence of 360 photos from a video
|
---|
| 38 | * or Extensible Device Metadata (XDM, http://www.xdm.org/) to be published to
|
---|
| 39 | * Street View on Google Maps. `CreatePhotoSequence` returns an Operation, with
|
---|
| 40 | * the PhotoSequence Id set in the `Operation.name` field. This method returns
|
---|
| 41 | * the following error codes: * google.rpc.Code.INVALID_ARGUMENT if the request
|
---|
| 42 | * is malformed. * google.rpc.Code.NOT_FOUND if the upload reference does not
|
---|
| 43 | * exist. (photoSequence.create)
|
---|
| 44 | *
|
---|
| 45 | * @param PhotoSequenceModel $postBody
|
---|
| 46 | * @param array $optParams Optional parameters.
|
---|
| 47 | *
|
---|
| 48 | * @opt_param string inputType Required. The input form of PhotoSequence.
|
---|
| 49 | * @return Operation
|
---|
| 50 | * @throws \Google\Service\Exception
|
---|
| 51 | */
|
---|
| 52 | public function create(PhotoSequenceModel $postBody, $optParams = [])
|
---|
| 53 | {
|
---|
| 54 | $params = ['postBody' => $postBody];
|
---|
| 55 | $params = array_merge($params, $optParams);
|
---|
| 56 | return $this->call('create', [$params], Operation::class);
|
---|
| 57 | }
|
---|
| 58 | /**
|
---|
| 59 | * Deletes a PhotoSequence and its metadata. This method returns the following
|
---|
| 60 | * error codes: * google.rpc.Code.PERMISSION_DENIED if the requesting user did
|
---|
| 61 | * not create the requested photo sequence. * google.rpc.Code.NOT_FOUND if the
|
---|
| 62 | * photo sequence ID does not exist. * google.rpc.Code.FAILED_PRECONDITION if
|
---|
| 63 | * the photo sequence ID is not yet finished processing. (photoSequence.delete)
|
---|
| 64 | *
|
---|
| 65 | * @param string $sequenceId Required. ID of the PhotoSequence.
|
---|
| 66 | * @param array $optParams Optional parameters.
|
---|
| 67 | * @return StreetviewpublishEmpty
|
---|
| 68 | * @throws \Google\Service\Exception
|
---|
| 69 | */
|
---|
| 70 | public function delete($sequenceId, $optParams = [])
|
---|
| 71 | {
|
---|
| 72 | $params = ['sequenceId' => $sequenceId];
|
---|
| 73 | $params = array_merge($params, $optParams);
|
---|
| 74 | return $this->call('delete', [$params], StreetviewpublishEmpty::class);
|
---|
| 75 | }
|
---|
| 76 | /**
|
---|
| 77 | * Gets the metadata of the specified PhotoSequence via the Operation interface.
|
---|
| 78 | * This method returns the following three types of responses: *
|
---|
| 79 | * `Operation.done` = false, if the processing of PhotoSequence is not finished
|
---|
| 80 | * yet. * `Operation.done` = true and `Operation.error` is populated, if there
|
---|
| 81 | * was an error in processing. * `Operation.done` = true and
|
---|
| 82 | * `Operation.response` is poulated, which contains a PhotoSequence message.
|
---|
| 83 | * This method returns the following error codes: *
|
---|
| 84 | * google.rpc.Code.PERMISSION_DENIED if the requesting user did not create the
|
---|
| 85 | * requested PhotoSequence. * google.rpc.Code.NOT_FOUND if the requested
|
---|
| 86 | * PhotoSequence does not exist. (photoSequence.get)
|
---|
| 87 | *
|
---|
| 88 | * @param string $sequenceId Required. ID of the photo sequence.
|
---|
| 89 | * @param array $optParams Optional parameters.
|
---|
| 90 | *
|
---|
| 91 | * @opt_param string filter Optional. The filter expression. For example:
|
---|
| 92 | * `published_status=PUBLISHED`. The filters supported are: `published_status`.
|
---|
| 93 | * See https://google.aip.dev/160 for more information.
|
---|
| 94 | * @opt_param string view Specifies if a download URL for the photo sequence
|
---|
| 95 | * should be returned in `download_url` of individual photos in the
|
---|
| 96 | * PhotoSequence response. > Note: Currently not implemented.
|
---|
| 97 | * @return Operation
|
---|
| 98 | * @throws \Google\Service\Exception
|
---|
| 99 | */
|
---|
| 100 | public function get($sequenceId, $optParams = [])
|
---|
| 101 | {
|
---|
| 102 | $params = ['sequenceId' => $sequenceId];
|
---|
| 103 | $params = array_merge($params, $optParams);
|
---|
| 104 | return $this->call('get', [$params], Operation::class);
|
---|
| 105 | }
|
---|
| 106 | /**
|
---|
| 107 | * Creates an upload session to start uploading photo sequence data. The upload
|
---|
| 108 | * URL of the returned UploadRef is used to upload the data for the
|
---|
| 109 | * `photoSequence`. After the upload is complete, the UploadRef is used with
|
---|
| 110 | * CreatePhotoSequence to create the PhotoSequence object entry.
|
---|
| 111 | * (photoSequence.startUpload)
|
---|
| 112 | *
|
---|
| 113 | * @param StreetviewpublishEmpty $postBody
|
---|
| 114 | * @param array $optParams Optional parameters.
|
---|
| 115 | * @return UploadRef
|
---|
| 116 | * @throws \Google\Service\Exception
|
---|
| 117 | */
|
---|
| 118 | public function startUpload(StreetviewpublishEmpty $postBody, $optParams = [])
|
---|
| 119 | {
|
---|
| 120 | $params = ['postBody' => $postBody];
|
---|
| 121 | $params = array_merge($params, $optParams);
|
---|
| 122 | return $this->call('startUpload', [$params], UploadRef::class);
|
---|
| 123 | }
|
---|
| 124 | }
|
---|
| 125 |
|
---|
| 126 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 127 | class_alias(PhotoSequence::class, 'Google_Service_StreetViewPublish_Resource_PhotoSequence');
|
---|