#![allow(rustdoc::bare_urls)]
#![allow(rustdoc::broken_intra_doc_links)]
#![allow(rustdoc::invalid_html_tags)]
#![allow(rustdoc::redundant_explicit_links)]
#![no_implicit_prelude]
extern crate bytes;
extern crate google_cloud_type;
extern crate serde;
extern crate serde_json;
extern crate serde_with;
extern crate std;
extern crate wkt;
mod debug;
mod deserialize;
mod serialize;
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct Viewport {
pub low: std::option::Option<google_cloud_type::model::LatLng>,
pub high: std::option::Option<google_cloud_type::model::LatLng>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl Viewport {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_low<T>(mut self, v: T) -> Self
where
T: std::convert::Into<google_cloud_type::model::LatLng>,
{
self.low = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_low<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<google_cloud_type::model::LatLng>,
{
self.low = v.map(|x| x.into());
self
}
pub fn set_high<T>(mut self, v: T) -> Self
where
T: std::convert::Into<google_cloud_type::model::LatLng>,
{
self.high = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_high<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<google_cloud_type::model::LatLng>,
{
self.high = v.map(|x| x.into());
self
}
}
impl wkt::message::Message for Viewport {
fn typename() -> &'static str {
"type.googleapis.com/google.geo.type.Viewport"
}
}