Struct google_api_proto::google::streetview::publish::v1::street_view_publish_service_client::StreetViewPublishServiceClient
source · pub struct StreetViewPublishServiceClient<T> { /* private fields */ }
Expand description
Publishes and connects user-contributed photos on Street View.
Implementations§
source§impl<T> StreetViewPublishServiceClient<T>where
T: GrpcService<BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
impl<T> StreetViewPublishServiceClient<T>where
T: GrpcService<BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
pub fn new(inner: T) -> Self
pub fn with_origin(inner: T, origin: Uri) -> Self
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> StreetViewPublishServiceClient<InterceptedService<T, F>>where
F: Interceptor,
T::ResponseBody: Default,
T: Service<Request<BoxBody>, Response = Response<<T as GrpcService<BoxBody>>::ResponseBody>>,
<T as Service<Request<BoxBody>>>::Error: Into<StdError> + Send + Sync,
sourcepub fn send_compressed(self, encoding: CompressionEncoding) -> Self
pub fn send_compressed(self, encoding: CompressionEncoding) -> Self
Compress requests with the given encoding.
This requires the server to support it otherwise it might respond with an error.
sourcepub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
pub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
Enable decompressing responses.
sourcepub fn max_decoding_message_size(self, limit: usize) -> Self
pub fn max_decoding_message_size(self, limit: usize) -> Self
Limits the maximum size of a decoded message.
Default: 4MB
sourcepub fn max_encoding_message_size(self, limit: usize) -> Self
pub fn max_encoding_message_size(self, limit: usize) -> Self
Limits the maximum size of an encoded message.
Default: usize::MAX
sourcepub async fn start_upload(
&mut self,
request: impl IntoRequest<()>,
) -> Result<Response<UploadRef>, Status>
pub async fn start_upload( &mut self, request: impl IntoRequest<()>, ) -> Result<Response<UploadRef>, Status>
Creates an upload session to start uploading photo bytes. The method uses the upload URL of the returned [UploadRef][google.streetview.publish.v1.UploadRef] to upload the bytes for the [Photo][google.streetview.publish.v1.Photo].
In addition to the photo requirements shown in https://support.google.com/maps/answer/7012050?ref_topic=6275604, the photo must meet the following requirements:
- Photo Sphere XMP metadata must be included in the photo metadata. See https://developers.google.com/streetview/spherical-metadata for the required fields.
- The pixel size of the photo must meet the size requirements listed in https://support.google.com/maps/answer/7012050?ref_topic=6275604, and the photo must be a full 360 horizontally.
After the upload completes, the method uses [UploadRef][google.streetview.publish.v1.UploadRef] with [CreatePhoto][google.streetview.publish.v1.StreetViewPublishService.CreatePhoto] to create the [Photo][google.streetview.publish.v1.Photo] object entry.
sourcepub async fn create_photo(
&mut self,
request: impl IntoRequest<CreatePhotoRequest>,
) -> Result<Response<Photo>, Status>
pub async fn create_photo( &mut self, request: impl IntoRequest<CreatePhotoRequest>, ) -> Result<Response<Photo>, Status>
After the client finishes uploading the photo with the returned [UploadRef][google.streetview.publish.v1.UploadRef], [CreatePhoto][google.streetview.publish.v1.StreetViewPublishService.CreatePhoto] publishes the uploaded [Photo][google.streetview.publish.v1.Photo] to Street View on Google Maps.
Currently, the only way to set heading, pitch, and roll in CreatePhoto is
through the Photo Sphere XMP
metadata in
the photo bytes. CreatePhoto ignores the pose.heading
, pose.pitch
,
pose.roll
, pose.altitude
, and pose.level
fields in Pose.
This method returns the following error codes:
- [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] if the request is malformed or if the uploaded photo is not a 360 photo.
- [google.rpc.Code.NOT_FOUND][google.rpc.Code.NOT_FOUND] if the upload reference does not exist.
- [google.rpc.Code.RESOURCE_EXHAUSTED][google.rpc.Code.RESOURCE_EXHAUSTED] if the account has reached the storage limit.
sourcepub async fn get_photo(
&mut self,
request: impl IntoRequest<GetPhotoRequest>,
) -> Result<Response<Photo>, Status>
pub async fn get_photo( &mut self, request: impl IntoRequest<GetPhotoRequest>, ) -> Result<Response<Photo>, Status>
Gets the metadata of the specified [Photo][google.streetview.publish.v1.Photo].
This method returns the following error codes:
- [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED] if the requesting user did not create the requested [Photo][google.streetview.publish.v1.Photo].
- [google.rpc.Code.NOT_FOUND][google.rpc.Code.NOT_FOUND] if the requested [Photo][google.streetview.publish.v1.Photo] does not exist.
- [google.rpc.Code.UNAVAILABLE][google.rpc.Code.UNAVAILABLE] if the requested [Photo][google.streetview.publish.v1.Photo] is still being indexed.
sourcepub async fn batch_get_photos(
&mut self,
request: impl IntoRequest<BatchGetPhotosRequest>,
) -> Result<Response<BatchGetPhotosResponse>, Status>
pub async fn batch_get_photos( &mut self, request: impl IntoRequest<BatchGetPhotosRequest>, ) -> Result<Response<BatchGetPhotosResponse>, Status>
Gets the metadata of the specified [Photo][google.streetview.publish.v1.Photo] batch.
Note that if [BatchGetPhotos][google.streetview.publish.v1.StreetViewPublishService.BatchGetPhotos] fails, either critical fields are missing or there is an authentication error. Even if [BatchGetPhotos][google.streetview.publish.v1.StreetViewPublishService.BatchGetPhotos] succeeds, individual photos in the batch may have failures. These failures are specified in each [PhotoResponse.status][google.streetview.publish.v1.PhotoResponse.status] in [BatchGetPhotosResponse.results][google.streetview.publish.v1.BatchGetPhotosResponse.results]. See [GetPhoto][google.streetview.publish.v1.StreetViewPublishService.GetPhoto] for specific failures that can occur per photo.
sourcepub async fn list_photos(
&mut self,
request: impl IntoRequest<ListPhotosRequest>,
) -> Result<Response<ListPhotosResponse>, Status>
pub async fn list_photos( &mut self, request: impl IntoRequest<ListPhotosRequest>, ) -> Result<Response<ListPhotosResponse>, Status>
Lists all the [Photos][google.streetview.publish.v1.Photo] that belong to the user.
Note: Recently created photos that are still being indexed are not returned in the response.
sourcepub async fn update_photo(
&mut self,
request: impl IntoRequest<UpdatePhotoRequest>,
) -> Result<Response<Photo>, Status>
pub async fn update_photo( &mut self, request: impl IntoRequest<UpdatePhotoRequest>, ) -> Result<Response<Photo>, Status>
Updates the metadata of a [Photo][google.streetview.publish.v1.Photo], such as pose, place association, connections, etc. Changing the pixels of a photo is not supported.
Only the fields specified in the
[updateMask][google.streetview.publish.v1.UpdatePhotoRequest.update_mask]
field are used. If updateMask
is not present, the update applies to all
fields.
This method returns the following error codes:
- [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED] if the requesting user did not create the requested photo.
- [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] if the request is malformed.
- [google.rpc.Code.NOT_FOUND][google.rpc.Code.NOT_FOUND] if the requested photo does not exist.
- [google.rpc.Code.UNAVAILABLE][google.rpc.Code.UNAVAILABLE] if the requested [Photo][google.streetview.publish.v1.Photo] is still being indexed.
sourcepub async fn batch_update_photos(
&mut self,
request: impl IntoRequest<BatchUpdatePhotosRequest>,
) -> Result<Response<BatchUpdatePhotosResponse>, Status>
pub async fn batch_update_photos( &mut self, request: impl IntoRequest<BatchUpdatePhotosRequest>, ) -> Result<Response<BatchUpdatePhotosResponse>, Status>
Updates the metadata of [Photos][google.streetview.publish.v1.Photo], such as pose, place association, connections, etc. Changing the pixels of photos is not supported.
Note that if [BatchUpdatePhotos][google.streetview.publish.v1.StreetViewPublishService.BatchUpdatePhotos] fails, either critical fields are missing or there is an authentication error. Even if [BatchUpdatePhotos][google.streetview.publish.v1.StreetViewPublishService.BatchUpdatePhotos] succeeds, individual photos in the batch may have failures. These failures are specified in each [PhotoResponse.status][google.streetview.publish.v1.PhotoResponse.status] in [BatchUpdatePhotosResponse.results][google.streetview.publish.v1.BatchUpdatePhotosResponse.results]. See [UpdatePhoto][google.streetview.publish.v1.StreetViewPublishService.UpdatePhoto] for specific failures that can occur per photo.
Only the fields specified in
[updateMask][google.streetview.publish.v1.UpdatePhotoRequest.update_mask]
field are used. If updateMask
is not present, the update applies to all
fields.
The number of [UpdatePhotoRequest][google.streetview.publish.v1.UpdatePhotoRequest] messages in a [BatchUpdatePhotosRequest][google.streetview.publish.v1.BatchUpdatePhotosRequest] must not exceed 20.
Note: To update [Pose.altitude][google.streetview.publish.v1.Pose.altitude], [Pose.latLngPair][google.streetview.publish.v1.Pose.lat_lng_pair] has to be filled as well. Otherwise, the request will fail.
sourcepub async fn delete_photo(
&mut self,
request: impl IntoRequest<DeletePhotoRequest>,
) -> Result<Response<()>, Status>
pub async fn delete_photo( &mut self, request: impl IntoRequest<DeletePhotoRequest>, ) -> Result<Response<()>, Status>
Deletes a [Photo][google.streetview.publish.v1.Photo] and its metadata.
This method returns the following error codes:
- [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED] if the requesting user did not create the requested photo.
- [google.rpc.Code.NOT_FOUND][google.rpc.Code.NOT_FOUND] if the photo ID does not exist.
sourcepub async fn batch_delete_photos(
&mut self,
request: impl IntoRequest<BatchDeletePhotosRequest>,
) -> Result<Response<BatchDeletePhotosResponse>, Status>
pub async fn batch_delete_photos( &mut self, request: impl IntoRequest<BatchDeletePhotosRequest>, ) -> Result<Response<BatchDeletePhotosResponse>, Status>
Deletes a list of [Photos][google.streetview.publish.v1.Photo] and their metadata.
Note that if [BatchDeletePhotos][google.streetview.publish.v1.StreetViewPublishService.BatchDeletePhotos] fails, either critical fields are missing or there is an authentication error. Even if [BatchDeletePhotos][google.streetview.publish.v1.StreetViewPublishService.BatchDeletePhotos] succeeds, individual photos in the batch may have failures. These failures are specified in each [PhotoResponse.status][google.streetview.publish.v1.PhotoResponse.status] in [BatchDeletePhotosResponse.results][google.streetview.publish.v1.BatchDeletePhotosResponse.status]. See [DeletePhoto][google.streetview.publish.v1.StreetViewPublishService.DeletePhoto] for specific failures that can occur per photo.
sourcepub async fn start_photo_sequence_upload(
&mut self,
request: impl IntoRequest<()>,
) -> Result<Response<UploadRef>, Status>
pub async fn start_photo_sequence_upload( &mut self, request: impl IntoRequest<()>, ) -> Result<Response<UploadRef>, Status>
Creates an upload session to start uploading photo sequence data.
The upload URL of the returned
[UploadRef][google.streetview.publish.v1.UploadRef] is used to upload the
data for the photoSequence
.
After the upload is complete, the [UploadRef][google.streetview.publish.v1.UploadRef] is used with [CreatePhotoSequence][google.streetview.publish.v1.StreetViewPublishService.CreatePhotoSequence] to create the [PhotoSequence][google.streetview.publish.v1.PhotoSequence] object entry.
sourcepub async fn create_photo_sequence(
&mut self,
request: impl IntoRequest<CreatePhotoSequenceRequest>,
) -> Result<Response<Operation>, Status>
pub async fn create_photo_sequence( &mut self, request: impl IntoRequest<CreatePhotoSequenceRequest>, ) -> Result<Response<Operation>, Status>
After the client finishes uploading the [PhotoSequence][google.streetview.publish.v1.PhotoSequence] with the returned [UploadRef][google.streetview.publish.v1.UploadRef], [CreatePhotoSequence][google.streetview.publish.v1.StreetViewPublishService.CreatePhotoSequence] extracts a sequence of 360 photos from a video or Extensible Device Metadata (XDM, http://www.xdm.org/) to be published to Street View on Google Maps.
CreatePhotoSequence
returns an [Operation][google.longrunning.Operation],
with the [PhotoSequence][google.streetview.publish.v1.PhotoSequence] Id set
in the Operation.name
field.
This method returns the following error codes:
- [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] if the request is malformed.
- [google.rpc.Code.NOT_FOUND][google.rpc.Code.NOT_FOUND] if the upload reference does not exist.
sourcepub async fn get_photo_sequence(
&mut self,
request: impl IntoRequest<GetPhotoSequenceRequest>,
) -> Result<Response<Operation>, Status>
pub async fn get_photo_sequence( &mut self, request: impl IntoRequest<GetPhotoSequenceRequest>, ) -> Result<Response<Operation>, Status>
Gets the metadata of the specified [PhotoSequence][google.streetview.publish.v1.PhotoSequence] via the [Operation][google.longrunning.Operation] interface.
This method returns the following three types of responses:
Operation.done
= false, if the processing of [PhotoSequence][google.streetview.publish.v1.PhotoSequence] is not finished yet.Operation.done
= true andOperation.error
is populated, if there was an error in processing.Operation.done
= true andOperation.response
is poulated, which contains a [PhotoSequence][google.streetview.publish.v1.PhotoSequence] message.
This method returns the following error codes:
- [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED] if the requesting user did not create the requested [PhotoSequence][google.streetview.publish.v1.PhotoSequence].
- [google.rpc.Code.NOT_FOUND][google.rpc.Code.NOT_FOUND] if the requested [PhotoSequence][google.streetview.publish.v1.PhotoSequence] does not exist.
sourcepub async fn list_photo_sequences(
&mut self,
request: impl IntoRequest<ListPhotoSequencesRequest>,
) -> Result<Response<ListPhotoSequencesResponse>, Status>
pub async fn list_photo_sequences( &mut self, request: impl IntoRequest<ListPhotoSequencesRequest>, ) -> Result<Response<ListPhotoSequencesResponse>, Status>
Lists all the [PhotoSequences][google.streetview.publish.v1.PhotoSequence] that belong to the user, in descending CreatePhotoSequence timestamp order.
sourcepub async fn delete_photo_sequence(
&mut self,
request: impl IntoRequest<DeletePhotoSequenceRequest>,
) -> Result<Response<()>, Status>
pub async fn delete_photo_sequence( &mut self, request: impl IntoRequest<DeletePhotoSequenceRequest>, ) -> Result<Response<()>, Status>
Deletes a [PhotoSequence][google.streetview.publish.v1.PhotoSequence] and its metadata.
This method returns the following error codes:
- [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED] if the requesting user did not create the requested photo sequence.
- [google.rpc.Code.NOT_FOUND][google.rpc.Code.NOT_FOUND] if the photo sequence ID does not exist.
- [google.rpc.Code.FAILED_PRECONDITION][google.rpc.Code.FAILED_PRECONDITION] if the photo sequence ID is not yet finished processing.
Trait Implementations§
source§impl<T: Clone> Clone for StreetViewPublishServiceClient<T>
impl<T: Clone> Clone for StreetViewPublishServiceClient<T>
source§fn clone(&self) -> StreetViewPublishServiceClient<T>
fn clone(&self) -> StreetViewPublishServiceClient<T>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl<T> !Freeze for StreetViewPublishServiceClient<T>
impl<T> RefUnwindSafe for StreetViewPublishServiceClient<T>where
T: RefUnwindSafe,
impl<T> Send for StreetViewPublishServiceClient<T>where
T: Send,
impl<T> Sync for StreetViewPublishServiceClient<T>where
T: Sync,
impl<T> Unpin for StreetViewPublishServiceClient<T>where
T: Unpin,
impl<T> UnwindSafe for StreetViewPublishServiceClient<T>where
T: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request