Struct google_api_proto::google::maps::places::v1::GetPhotoMediaRequest
source · pub struct GetPhotoMediaRequest {
pub name: String,
pub max_width_px: i32,
pub max_height_px: i32,
pub skip_http_redirect: bool,
}
Expand description
Request for fetching a photo of a place using a photo resource name.
Fields§
§name: String
Required. The resource name of a photo media in the format:
places/{place_id}/photos/{photo_reference}/media
.
The resource name of a photo as returned in a Place object’s photos.name
field comes with the format
places/{place_id}/photos/{photo_reference}
. You need to append /media
at the end of the photo resource to get the photo media resource name.
max_width_px: i32
Optional. Specifies the maximum desired width, in pixels, of the image. If the image is smaller than the values specified, the original image will be returned. If the image is larger in either dimension, it will be scaled to match the smaller of the two dimensions, restricted to its original aspect ratio. Both the max_height_px and max_width_px properties accept an integer between 1 and 4800, inclusively. If the value is not within the allowed range, an INVALID_ARGUMENT error will be returned.
At least one of max_height_px or max_width_px needs to be specified. If neither max_height_px nor max_width_px is specified, an INVALID_ARGUMENT error will be returned.
max_height_px: i32
Optional. Specifies the maximum desired height, in pixels, of the image. If the image is smaller than the values specified, the original image will be returned. If the image is larger in either dimension, it will be scaled to match the smaller of the two dimensions, restricted to its original aspect ratio. Both the max_height_px and max_width_px properties accept an integer between 1 and 4800, inclusively. If the value is not within the allowed range, an INVALID_ARGUMENT error will be returned.
At least one of max_height_px or max_width_px needs to be specified. If neither max_height_px nor max_width_px is specified, an INVALID_ARGUMENT error will be returned.
skip_http_redirect: bool
Optional. If set, skip the default HTTP redirect behavior and render a text format (for example, in JSON format for HTTP use case) response. If not set, an HTTP redirect will be issued to redirect the call to the image media. This option is ignored for non-HTTP requests.
Trait Implementations§
source§impl Clone for GetPhotoMediaRequest
impl Clone for GetPhotoMediaRequest
source§fn clone(&self) -> GetPhotoMediaRequest
fn clone(&self) -> GetPhotoMediaRequest
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for GetPhotoMediaRequest
impl Debug for GetPhotoMediaRequest
source§impl Default for GetPhotoMediaRequest
impl Default for GetPhotoMediaRequest
source§impl Message for GetPhotoMediaRequest
impl Message for GetPhotoMediaRequest
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for GetPhotoMediaRequest
impl PartialEq for GetPhotoMediaRequest
source§fn eq(&self, other: &GetPhotoMediaRequest) -> bool
fn eq(&self, other: &GetPhotoMediaRequest) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for GetPhotoMediaRequest
Auto Trait Implementations§
impl Freeze for GetPhotoMediaRequest
impl RefUnwindSafe for GetPhotoMediaRequest
impl Send for GetPhotoMediaRequest
impl Sync for GetPhotoMediaRequest
impl Unpin for GetPhotoMediaRequest
impl UnwindSafe for GetPhotoMediaRequest
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