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,

source

pub fn new(inner: T) -> Self

source

pub fn with_origin(inner: T, origin: Uri) -> Self

source

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,

source

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.

source

pub fn accept_compressed(self, encoding: CompressionEncoding) -> Self

Enable decompressing responses.

source

pub fn max_decoding_message_size(self, limit: usize) -> Self

Limits the maximum size of a decoded message.

Default: 4MB

source

pub fn max_encoding_message_size(self, limit: usize) -> Self

Limits the maximum size of an encoded message.

Default: usize::MAX

source

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.

source

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.
source

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.
source

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.

source

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.

source

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.
source

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.

source

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.
source

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.

source

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.

source

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.
source

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 and Operation.error is populated, if there was an error in processing.
  • Operation.done = true and Operation.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.
source

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.

source

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>

source§

fn clone(&self) -> StreetViewPublishServiceClient<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T: Debug> Debug for StreetViewPublishServiceClient<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoRequest<T> for T

source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more