#![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 async_trait;
extern crate bytes;
extern crate gaxi;
extern crate google_cloud_api;
extern crate google_cloud_gax;
extern crate google_cloud_type;
extern crate serde;
extern crate serde_json;
extern crate serde_with;
extern crate std;
extern crate tracing;
extern crate wkt;
mod debug;
mod deserialize;
mod serialize;
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct FindClosestBuildingInsightsRequest {
pub location: std::option::Option<google_cloud_type::model::LatLng>,
pub required_quality: crate::model::ImageryQuality,
pub exact_quality_required: bool,
pub experiments: std::vec::Vec<crate::model::Experiment>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl FindClosestBuildingInsightsRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_location<T>(mut self, v: T) -> Self
where
T: std::convert::Into<google_cloud_type::model::LatLng>,
{
self.location = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_location<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<google_cloud_type::model::LatLng>,
{
self.location = v.map(|x| x.into());
self
}
pub fn set_required_quality<T: std::convert::Into<crate::model::ImageryQuality>>(
mut self,
v: T,
) -> Self {
self.required_quality = v.into();
self
}
pub fn set_exact_quality_required<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.exact_quality_required = v.into();
self
}
pub fn set_experiments<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::Experiment>,
{
use std::iter::Iterator;
self.experiments = v.into_iter().map(|i| i.into()).collect();
self
}
}
impl wkt::message::Message for FindClosestBuildingInsightsRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.maps.solar.v1.FindClosestBuildingInsightsRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct LatLngBox {
pub sw: std::option::Option<google_cloud_type::model::LatLng>,
pub ne: std::option::Option<google_cloud_type::model::LatLng>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl LatLngBox {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_sw<T>(mut self, v: T) -> Self
where
T: std::convert::Into<google_cloud_type::model::LatLng>,
{
self.sw = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_sw<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<google_cloud_type::model::LatLng>,
{
self.sw = v.map(|x| x.into());
self
}
pub fn set_ne<T>(mut self, v: T) -> Self
where
T: std::convert::Into<google_cloud_type::model::LatLng>,
{
self.ne = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_ne<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<google_cloud_type::model::LatLng>,
{
self.ne = v.map(|x| x.into());
self
}
}
impl wkt::message::Message for LatLngBox {
fn typename() -> &'static str {
"type.googleapis.com/google.maps.solar.v1.LatLngBox"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct BuildingInsights {
pub name: std::string::String,
pub center: std::option::Option<google_cloud_type::model::LatLng>,
pub bounding_box: std::option::Option<crate::model::LatLngBox>,
pub imagery_date: std::option::Option<google_cloud_type::model::Date>,
pub imagery_processed_date: std::option::Option<google_cloud_type::model::Date>,
pub postal_code: std::string::String,
pub administrative_area: std::string::String,
pub statistical_area: std::string::String,
pub region_code: std::string::String,
pub solar_potential: std::option::Option<crate::model::SolarPotential>,
pub imagery_quality: crate::model::ImageryQuality,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl BuildingInsights {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_center<T>(mut self, v: T) -> Self
where
T: std::convert::Into<google_cloud_type::model::LatLng>,
{
self.center = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_center<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<google_cloud_type::model::LatLng>,
{
self.center = v.map(|x| x.into());
self
}
pub fn set_bounding_box<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::LatLngBox>,
{
self.bounding_box = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_bounding_box<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::LatLngBox>,
{
self.bounding_box = v.map(|x| x.into());
self
}
pub fn set_imagery_date<T>(mut self, v: T) -> Self
where
T: std::convert::Into<google_cloud_type::model::Date>,
{
self.imagery_date = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_imagery_date<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<google_cloud_type::model::Date>,
{
self.imagery_date = v.map(|x| x.into());
self
}
pub fn set_imagery_processed_date<T>(mut self, v: T) -> Self
where
T: std::convert::Into<google_cloud_type::model::Date>,
{
self.imagery_processed_date = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_imagery_processed_date<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<google_cloud_type::model::Date>,
{
self.imagery_processed_date = v.map(|x| x.into());
self
}
pub fn set_postal_code<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.postal_code = v.into();
self
}
pub fn set_administrative_area<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.administrative_area = v.into();
self
}
pub fn set_statistical_area<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.statistical_area = v.into();
self
}
pub fn set_region_code<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.region_code = v.into();
self
}
pub fn set_solar_potential<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::SolarPotential>,
{
self.solar_potential = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_solar_potential<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::SolarPotential>,
{
self.solar_potential = v.map(|x| x.into());
self
}
pub fn set_imagery_quality<T: std::convert::Into<crate::model::ImageryQuality>>(
mut self,
v: T,
) -> Self {
self.imagery_quality = v.into();
self
}
}
impl wkt::message::Message for BuildingInsights {
fn typename() -> &'static str {
"type.googleapis.com/google.maps.solar.v1.BuildingInsights"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct SolarPotential {
pub max_array_panels_count: i32,
pub panel_capacity_watts: f32,
pub panel_height_meters: f32,
pub panel_width_meters: f32,
pub panel_lifetime_years: i32,
pub max_array_area_meters2: f32,
pub max_sunshine_hours_per_year: f32,
pub carbon_offset_factor_kg_per_mwh: f32,
pub whole_roof_stats: std::option::Option<crate::model::SizeAndSunshineStats>,
pub building_stats: std::option::Option<crate::model::SizeAndSunshineStats>,
pub roof_segment_stats: std::vec::Vec<crate::model::RoofSegmentSizeAndSunshineStats>,
pub solar_panels: std::vec::Vec<crate::model::SolarPanel>,
pub solar_panel_configs: std::vec::Vec<crate::model::SolarPanelConfig>,
pub financial_analyses: std::vec::Vec<crate::model::FinancialAnalysis>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl SolarPotential {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_max_array_panels_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.max_array_panels_count = v.into();
self
}
pub fn set_panel_capacity_watts<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
self.panel_capacity_watts = v.into();
self
}
pub fn set_panel_height_meters<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
self.panel_height_meters = v.into();
self
}
pub fn set_panel_width_meters<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
self.panel_width_meters = v.into();
self
}
pub fn set_panel_lifetime_years<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.panel_lifetime_years = v.into();
self
}
pub fn set_max_array_area_meters2<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
self.max_array_area_meters2 = v.into();
self
}
pub fn set_max_sunshine_hours_per_year<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
self.max_sunshine_hours_per_year = v.into();
self
}
pub fn set_carbon_offset_factor_kg_per_mwh<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
self.carbon_offset_factor_kg_per_mwh = v.into();
self
}
pub fn set_whole_roof_stats<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::SizeAndSunshineStats>,
{
self.whole_roof_stats = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_whole_roof_stats<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::SizeAndSunshineStats>,
{
self.whole_roof_stats = v.map(|x| x.into());
self
}
pub fn set_building_stats<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::SizeAndSunshineStats>,
{
self.building_stats = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_building_stats<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::SizeAndSunshineStats>,
{
self.building_stats = v.map(|x| x.into());
self
}
pub fn set_roof_segment_stats<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::RoofSegmentSizeAndSunshineStats>,
{
use std::iter::Iterator;
self.roof_segment_stats = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_solar_panels<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::SolarPanel>,
{
use std::iter::Iterator;
self.solar_panels = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_solar_panel_configs<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::SolarPanelConfig>,
{
use std::iter::Iterator;
self.solar_panel_configs = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_financial_analyses<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::FinancialAnalysis>,
{
use std::iter::Iterator;
self.financial_analyses = v.into_iter().map(|i| i.into()).collect();
self
}
}
impl wkt::message::Message for SolarPotential {
fn typename() -> &'static str {
"type.googleapis.com/google.maps.solar.v1.SolarPotential"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct RoofSegmentSizeAndSunshineStats {
pub pitch_degrees: std::option::Option<f32>,
pub azimuth_degrees: std::option::Option<f32>,
pub stats: std::option::Option<crate::model::SizeAndSunshineStats>,
pub center: std::option::Option<google_cloud_type::model::LatLng>,
pub bounding_box: std::option::Option<crate::model::LatLngBox>,
pub plane_height_at_center_meters: std::option::Option<f32>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl RoofSegmentSizeAndSunshineStats {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_pitch_degrees<T>(mut self, v: T) -> Self
where
T: std::convert::Into<f32>,
{
self.pitch_degrees = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_pitch_degrees<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<f32>,
{
self.pitch_degrees = v.map(|x| x.into());
self
}
pub fn set_azimuth_degrees<T>(mut self, v: T) -> Self
where
T: std::convert::Into<f32>,
{
self.azimuth_degrees = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_azimuth_degrees<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<f32>,
{
self.azimuth_degrees = v.map(|x| x.into());
self
}
pub fn set_stats<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::SizeAndSunshineStats>,
{
self.stats = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_stats<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::SizeAndSunshineStats>,
{
self.stats = v.map(|x| x.into());
self
}
pub fn set_center<T>(mut self, v: T) -> Self
where
T: std::convert::Into<google_cloud_type::model::LatLng>,
{
self.center = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_center<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<google_cloud_type::model::LatLng>,
{
self.center = v.map(|x| x.into());
self
}
pub fn set_bounding_box<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::LatLngBox>,
{
self.bounding_box = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_bounding_box<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::LatLngBox>,
{
self.bounding_box = v.map(|x| x.into());
self
}
pub fn set_plane_height_at_center_meters<T>(mut self, v: T) -> Self
where
T: std::convert::Into<f32>,
{
self.plane_height_at_center_meters = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_plane_height_at_center_meters<T>(
mut self,
v: std::option::Option<T>,
) -> Self
where
T: std::convert::Into<f32>,
{
self.plane_height_at_center_meters = v.map(|x| x.into());
self
}
}
impl wkt::message::Message for RoofSegmentSizeAndSunshineStats {
fn typename() -> &'static str {
"type.googleapis.com/google.maps.solar.v1.RoofSegmentSizeAndSunshineStats"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct SizeAndSunshineStats {
pub area_meters2: f32,
pub sunshine_quantiles: std::vec::Vec<f32>,
pub ground_area_meters2: f32,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl SizeAndSunshineStats {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_area_meters2<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
self.area_meters2 = v.into();
self
}
pub fn set_sunshine_quantiles<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<f32>,
{
use std::iter::Iterator;
self.sunshine_quantiles = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_ground_area_meters2<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
self.ground_area_meters2 = v.into();
self
}
}
impl wkt::message::Message for SizeAndSunshineStats {
fn typename() -> &'static str {
"type.googleapis.com/google.maps.solar.v1.SizeAndSunshineStats"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct SolarPanel {
pub center: std::option::Option<google_cloud_type::model::LatLng>,
pub orientation: crate::model::SolarPanelOrientation,
pub yearly_energy_dc_kwh: f32,
pub segment_index: std::option::Option<i32>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl SolarPanel {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_center<T>(mut self, v: T) -> Self
where
T: std::convert::Into<google_cloud_type::model::LatLng>,
{
self.center = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_center<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<google_cloud_type::model::LatLng>,
{
self.center = v.map(|x| x.into());
self
}
pub fn set_orientation<T: std::convert::Into<crate::model::SolarPanelOrientation>>(
mut self,
v: T,
) -> Self {
self.orientation = v.into();
self
}
pub fn set_yearly_energy_dc_kwh<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
self.yearly_energy_dc_kwh = v.into();
self
}
pub fn set_segment_index<T>(mut self, v: T) -> Self
where
T: std::convert::Into<i32>,
{
self.segment_index = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_segment_index<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<i32>,
{
self.segment_index = v.map(|x| x.into());
self
}
}
impl wkt::message::Message for SolarPanel {
fn typename() -> &'static str {
"type.googleapis.com/google.maps.solar.v1.SolarPanel"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct SolarPanelConfig {
pub panels_count: i32,
pub yearly_energy_dc_kwh: f32,
pub roof_segment_summaries: std::vec::Vec<crate::model::RoofSegmentSummary>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl SolarPanelConfig {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_panels_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.panels_count = v.into();
self
}
pub fn set_yearly_energy_dc_kwh<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
self.yearly_energy_dc_kwh = v.into();
self
}
pub fn set_roof_segment_summaries<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::RoofSegmentSummary>,
{
use std::iter::Iterator;
self.roof_segment_summaries = v.into_iter().map(|i| i.into()).collect();
self
}
}
impl wkt::message::Message for SolarPanelConfig {
fn typename() -> &'static str {
"type.googleapis.com/google.maps.solar.v1.SolarPanelConfig"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct RoofSegmentSummary {
pub pitch_degrees: std::option::Option<f32>,
pub azimuth_degrees: std::option::Option<f32>,
pub panels_count: i32,
pub yearly_energy_dc_kwh: f32,
pub segment_index: std::option::Option<i32>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl RoofSegmentSummary {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_pitch_degrees<T>(mut self, v: T) -> Self
where
T: std::convert::Into<f32>,
{
self.pitch_degrees = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_pitch_degrees<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<f32>,
{
self.pitch_degrees = v.map(|x| x.into());
self
}
pub fn set_azimuth_degrees<T>(mut self, v: T) -> Self
where
T: std::convert::Into<f32>,
{
self.azimuth_degrees = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_azimuth_degrees<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<f32>,
{
self.azimuth_degrees = v.map(|x| x.into());
self
}
pub fn set_panels_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.panels_count = v.into();
self
}
pub fn set_yearly_energy_dc_kwh<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
self.yearly_energy_dc_kwh = v.into();
self
}
pub fn set_segment_index<T>(mut self, v: T) -> Self
where
T: std::convert::Into<i32>,
{
self.segment_index = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_segment_index<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<i32>,
{
self.segment_index = v.map(|x| x.into());
self
}
}
impl wkt::message::Message for RoofSegmentSummary {
fn typename() -> &'static str {
"type.googleapis.com/google.maps.solar.v1.RoofSegmentSummary"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct FinancialAnalysis {
pub monthly_bill: std::option::Option<google_cloud_type::model::Money>,
pub default_bill: bool,
pub average_kwh_per_month: f32,
pub panel_config_index: std::option::Option<i32>,
pub financial_details: std::option::Option<crate::model::FinancialDetails>,
pub leasing_savings: std::option::Option<crate::model::LeasingSavings>,
pub cash_purchase_savings: std::option::Option<crate::model::CashPurchaseSavings>,
pub financed_purchase_savings: std::option::Option<crate::model::FinancedPurchaseSavings>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl FinancialAnalysis {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_monthly_bill<T>(mut self, v: T) -> Self
where
T: std::convert::Into<google_cloud_type::model::Money>,
{
self.monthly_bill = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_monthly_bill<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<google_cloud_type::model::Money>,
{
self.monthly_bill = v.map(|x| x.into());
self
}
pub fn set_default_bill<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.default_bill = v.into();
self
}
pub fn set_average_kwh_per_month<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
self.average_kwh_per_month = v.into();
self
}
pub fn set_panel_config_index<T>(mut self, v: T) -> Self
where
T: std::convert::Into<i32>,
{
self.panel_config_index = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_panel_config_index<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<i32>,
{
self.panel_config_index = v.map(|x| x.into());
self
}
pub fn set_financial_details<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::FinancialDetails>,
{
self.financial_details = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_financial_details<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::FinancialDetails>,
{
self.financial_details = v.map(|x| x.into());
self
}
pub fn set_leasing_savings<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::LeasingSavings>,
{
self.leasing_savings = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_leasing_savings<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::LeasingSavings>,
{
self.leasing_savings = v.map(|x| x.into());
self
}
pub fn set_cash_purchase_savings<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::CashPurchaseSavings>,
{
self.cash_purchase_savings = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_cash_purchase_savings<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::CashPurchaseSavings>,
{
self.cash_purchase_savings = v.map(|x| x.into());
self
}
pub fn set_financed_purchase_savings<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::FinancedPurchaseSavings>,
{
self.financed_purchase_savings = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_financed_purchase_savings<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::FinancedPurchaseSavings>,
{
self.financed_purchase_savings = v.map(|x| x.into());
self
}
}
impl wkt::message::Message for FinancialAnalysis {
fn typename() -> &'static str {
"type.googleapis.com/google.maps.solar.v1.FinancialAnalysis"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct FinancialDetails {
pub initial_ac_kwh_per_year: f32,
pub remaining_lifetime_utility_bill: std::option::Option<google_cloud_type::model::Money>,
pub federal_incentive: std::option::Option<google_cloud_type::model::Money>,
pub state_incentive: std::option::Option<google_cloud_type::model::Money>,
pub utility_incentive: std::option::Option<google_cloud_type::model::Money>,
pub lifetime_srec_total: std::option::Option<google_cloud_type::model::Money>,
pub cost_of_electricity_without_solar: std::option::Option<google_cloud_type::model::Money>,
pub net_metering_allowed: bool,
pub solar_percentage: std::option::Option<f32>,
pub percentage_exported_to_grid: std::option::Option<f32>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl FinancialDetails {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_initial_ac_kwh_per_year<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
self.initial_ac_kwh_per_year = v.into();
self
}
pub fn set_remaining_lifetime_utility_bill<T>(mut self, v: T) -> Self
where
T: std::convert::Into<google_cloud_type::model::Money>,
{
self.remaining_lifetime_utility_bill = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_remaining_lifetime_utility_bill<T>(
mut self,
v: std::option::Option<T>,
) -> Self
where
T: std::convert::Into<google_cloud_type::model::Money>,
{
self.remaining_lifetime_utility_bill = v.map(|x| x.into());
self
}
pub fn set_federal_incentive<T>(mut self, v: T) -> Self
where
T: std::convert::Into<google_cloud_type::model::Money>,
{
self.federal_incentive = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_federal_incentive<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<google_cloud_type::model::Money>,
{
self.federal_incentive = v.map(|x| x.into());
self
}
pub fn set_state_incentive<T>(mut self, v: T) -> Self
where
T: std::convert::Into<google_cloud_type::model::Money>,
{
self.state_incentive = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_state_incentive<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<google_cloud_type::model::Money>,
{
self.state_incentive = v.map(|x| x.into());
self
}
pub fn set_utility_incentive<T>(mut self, v: T) -> Self
where
T: std::convert::Into<google_cloud_type::model::Money>,
{
self.utility_incentive = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_utility_incentive<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<google_cloud_type::model::Money>,
{
self.utility_incentive = v.map(|x| x.into());
self
}
pub fn set_lifetime_srec_total<T>(mut self, v: T) -> Self
where
T: std::convert::Into<google_cloud_type::model::Money>,
{
self.lifetime_srec_total = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_lifetime_srec_total<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<google_cloud_type::model::Money>,
{
self.lifetime_srec_total = v.map(|x| x.into());
self
}
pub fn set_cost_of_electricity_without_solar<T>(mut self, v: T) -> Self
where
T: std::convert::Into<google_cloud_type::model::Money>,
{
self.cost_of_electricity_without_solar = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_cost_of_electricity_without_solar<T>(
mut self,
v: std::option::Option<T>,
) -> Self
where
T: std::convert::Into<google_cloud_type::model::Money>,
{
self.cost_of_electricity_without_solar = v.map(|x| x.into());
self
}
pub fn set_net_metering_allowed<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.net_metering_allowed = v.into();
self
}
pub fn set_solar_percentage<T>(mut self, v: T) -> Self
where
T: std::convert::Into<f32>,
{
self.solar_percentage = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_solar_percentage<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<f32>,
{
self.solar_percentage = v.map(|x| x.into());
self
}
pub fn set_percentage_exported_to_grid<T>(mut self, v: T) -> Self
where
T: std::convert::Into<f32>,
{
self.percentage_exported_to_grid = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_percentage_exported_to_grid<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<f32>,
{
self.percentage_exported_to_grid = v.map(|x| x.into());
self
}
}
impl wkt::message::Message for FinancialDetails {
fn typename() -> &'static str {
"type.googleapis.com/google.maps.solar.v1.FinancialDetails"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct SavingsOverTime {
pub savings_year1: std::option::Option<google_cloud_type::model::Money>,
pub savings_year20: std::option::Option<google_cloud_type::model::Money>,
pub present_value_of_savings_year20: std::option::Option<google_cloud_type::model::Money>,
pub savings_lifetime: std::option::Option<google_cloud_type::model::Money>,
pub present_value_of_savings_lifetime: std::option::Option<google_cloud_type::model::Money>,
pub financially_viable: bool,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl SavingsOverTime {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_savings_year1<T>(mut self, v: T) -> Self
where
T: std::convert::Into<google_cloud_type::model::Money>,
{
self.savings_year1 = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_savings_year1<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<google_cloud_type::model::Money>,
{
self.savings_year1 = v.map(|x| x.into());
self
}
pub fn set_savings_year20<T>(mut self, v: T) -> Self
where
T: std::convert::Into<google_cloud_type::model::Money>,
{
self.savings_year20 = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_savings_year20<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<google_cloud_type::model::Money>,
{
self.savings_year20 = v.map(|x| x.into());
self
}
pub fn set_present_value_of_savings_year20<T>(mut self, v: T) -> Self
where
T: std::convert::Into<google_cloud_type::model::Money>,
{
self.present_value_of_savings_year20 = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_present_value_of_savings_year20<T>(
mut self,
v: std::option::Option<T>,
) -> Self
where
T: std::convert::Into<google_cloud_type::model::Money>,
{
self.present_value_of_savings_year20 = v.map(|x| x.into());
self
}
pub fn set_savings_lifetime<T>(mut self, v: T) -> Self
where
T: std::convert::Into<google_cloud_type::model::Money>,
{
self.savings_lifetime = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_savings_lifetime<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<google_cloud_type::model::Money>,
{
self.savings_lifetime = v.map(|x| x.into());
self
}
pub fn set_present_value_of_savings_lifetime<T>(mut self, v: T) -> Self
where
T: std::convert::Into<google_cloud_type::model::Money>,
{
self.present_value_of_savings_lifetime = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_present_value_of_savings_lifetime<T>(
mut self,
v: std::option::Option<T>,
) -> Self
where
T: std::convert::Into<google_cloud_type::model::Money>,
{
self.present_value_of_savings_lifetime = v.map(|x| x.into());
self
}
pub fn set_financially_viable<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.financially_viable = v.into();
self
}
}
impl wkt::message::Message for SavingsOverTime {
fn typename() -> &'static str {
"type.googleapis.com/google.maps.solar.v1.SavingsOverTime"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct LeasingSavings {
pub leases_allowed: bool,
pub leases_supported: bool,
pub annual_leasing_cost: std::option::Option<google_cloud_type::model::Money>,
pub savings: std::option::Option<crate::model::SavingsOverTime>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl LeasingSavings {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_leases_allowed<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.leases_allowed = v.into();
self
}
pub fn set_leases_supported<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.leases_supported = v.into();
self
}
pub fn set_annual_leasing_cost<T>(mut self, v: T) -> Self
where
T: std::convert::Into<google_cloud_type::model::Money>,
{
self.annual_leasing_cost = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_annual_leasing_cost<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<google_cloud_type::model::Money>,
{
self.annual_leasing_cost = v.map(|x| x.into());
self
}
pub fn set_savings<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::SavingsOverTime>,
{
self.savings = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_savings<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::SavingsOverTime>,
{
self.savings = v.map(|x| x.into());
self
}
}
impl wkt::message::Message for LeasingSavings {
fn typename() -> &'static str {
"type.googleapis.com/google.maps.solar.v1.LeasingSavings"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct CashPurchaseSavings {
pub out_of_pocket_cost: std::option::Option<google_cloud_type::model::Money>,
pub upfront_cost: std::option::Option<google_cloud_type::model::Money>,
pub rebate_value: std::option::Option<google_cloud_type::model::Money>,
pub payback_years: std::option::Option<f32>,
pub savings: std::option::Option<crate::model::SavingsOverTime>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl CashPurchaseSavings {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_out_of_pocket_cost<T>(mut self, v: T) -> Self
where
T: std::convert::Into<google_cloud_type::model::Money>,
{
self.out_of_pocket_cost = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_out_of_pocket_cost<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<google_cloud_type::model::Money>,
{
self.out_of_pocket_cost = v.map(|x| x.into());
self
}
pub fn set_upfront_cost<T>(mut self, v: T) -> Self
where
T: std::convert::Into<google_cloud_type::model::Money>,
{
self.upfront_cost = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_upfront_cost<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<google_cloud_type::model::Money>,
{
self.upfront_cost = v.map(|x| x.into());
self
}
pub fn set_rebate_value<T>(mut self, v: T) -> Self
where
T: std::convert::Into<google_cloud_type::model::Money>,
{
self.rebate_value = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_rebate_value<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<google_cloud_type::model::Money>,
{
self.rebate_value = v.map(|x| x.into());
self
}
pub fn set_payback_years<T>(mut self, v: T) -> Self
where
T: std::convert::Into<f32>,
{
self.payback_years = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_payback_years<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<f32>,
{
self.payback_years = v.map(|x| x.into());
self
}
pub fn set_savings<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::SavingsOverTime>,
{
self.savings = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_savings<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::SavingsOverTime>,
{
self.savings = v.map(|x| x.into());
self
}
}
impl wkt::message::Message for CashPurchaseSavings {
fn typename() -> &'static str {
"type.googleapis.com/google.maps.solar.v1.CashPurchaseSavings"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct FinancedPurchaseSavings {
pub annual_loan_payment: std::option::Option<google_cloud_type::model::Money>,
pub rebate_value: std::option::Option<google_cloud_type::model::Money>,
pub loan_interest_rate: f32,
pub savings: std::option::Option<crate::model::SavingsOverTime>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl FinancedPurchaseSavings {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_annual_loan_payment<T>(mut self, v: T) -> Self
where
T: std::convert::Into<google_cloud_type::model::Money>,
{
self.annual_loan_payment = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_annual_loan_payment<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<google_cloud_type::model::Money>,
{
self.annual_loan_payment = v.map(|x| x.into());
self
}
pub fn set_rebate_value<T>(mut self, v: T) -> Self
where
T: std::convert::Into<google_cloud_type::model::Money>,
{
self.rebate_value = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_rebate_value<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<google_cloud_type::model::Money>,
{
self.rebate_value = v.map(|x| x.into());
self
}
pub fn set_loan_interest_rate<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
self.loan_interest_rate = v.into();
self
}
pub fn set_savings<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::SavingsOverTime>,
{
self.savings = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_savings<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::SavingsOverTime>,
{
self.savings = v.map(|x| x.into());
self
}
}
impl wkt::message::Message for FinancedPurchaseSavings {
fn typename() -> &'static str {
"type.googleapis.com/google.maps.solar.v1.FinancedPurchaseSavings"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetDataLayersRequest {
pub location: std::option::Option<google_cloud_type::model::LatLng>,
pub radius_meters: f32,
pub view: crate::model::DataLayerView,
pub required_quality: crate::model::ImageryQuality,
pub pixel_size_meters: f32,
pub exact_quality_required: bool,
pub experiments: std::vec::Vec<crate::model::Experiment>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl GetDataLayersRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_location<T>(mut self, v: T) -> Self
where
T: std::convert::Into<google_cloud_type::model::LatLng>,
{
self.location = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_location<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<google_cloud_type::model::LatLng>,
{
self.location = v.map(|x| x.into());
self
}
pub fn set_radius_meters<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
self.radius_meters = v.into();
self
}
pub fn set_view<T: std::convert::Into<crate::model::DataLayerView>>(mut self, v: T) -> Self {
self.view = v.into();
self
}
pub fn set_required_quality<T: std::convert::Into<crate::model::ImageryQuality>>(
mut self,
v: T,
) -> Self {
self.required_quality = v.into();
self
}
pub fn set_pixel_size_meters<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
self.pixel_size_meters = v.into();
self
}
pub fn set_exact_quality_required<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.exact_quality_required = v.into();
self
}
pub fn set_experiments<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::Experiment>,
{
use std::iter::Iterator;
self.experiments = v.into_iter().map(|i| i.into()).collect();
self
}
}
impl wkt::message::Message for GetDataLayersRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.maps.solar.v1.GetDataLayersRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct DataLayers {
pub imagery_date: std::option::Option<google_cloud_type::model::Date>,
pub imagery_processed_date: std::option::Option<google_cloud_type::model::Date>,
pub dsm_url: std::string::String,
pub rgb_url: std::string::String,
pub mask_url: std::string::String,
pub annual_flux_url: std::string::String,
pub monthly_flux_url: std::string::String,
pub hourly_shade_urls: std::vec::Vec<std::string::String>,
pub imagery_quality: crate::model::ImageryQuality,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl DataLayers {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_imagery_date<T>(mut self, v: T) -> Self
where
T: std::convert::Into<google_cloud_type::model::Date>,
{
self.imagery_date = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_imagery_date<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<google_cloud_type::model::Date>,
{
self.imagery_date = v.map(|x| x.into());
self
}
pub fn set_imagery_processed_date<T>(mut self, v: T) -> Self
where
T: std::convert::Into<google_cloud_type::model::Date>,
{
self.imagery_processed_date = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_imagery_processed_date<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<google_cloud_type::model::Date>,
{
self.imagery_processed_date = v.map(|x| x.into());
self
}
pub fn set_dsm_url<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.dsm_url = v.into();
self
}
pub fn set_rgb_url<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.rgb_url = v.into();
self
}
pub fn set_mask_url<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.mask_url = v.into();
self
}
pub fn set_annual_flux_url<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.annual_flux_url = v.into();
self
}
pub fn set_monthly_flux_url<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.monthly_flux_url = v.into();
self
}
pub fn set_hourly_shade_urls<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<std::string::String>,
{
use std::iter::Iterator;
self.hourly_shade_urls = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_imagery_quality<T: std::convert::Into<crate::model::ImageryQuality>>(
mut self,
v: T,
) -> Self {
self.imagery_quality = v.into();
self
}
}
impl wkt::message::Message for DataLayers {
fn typename() -> &'static str {
"type.googleapis.com/google.maps.solar.v1.DataLayers"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetGeoTiffRequest {
pub id: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl GetGeoTiffRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.id = v.into();
self
}
}
impl wkt::message::Message for GetGeoTiffRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.maps.solar.v1.GetGeoTiffRequest"
}
}
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum DataLayerView {
Unspecified,
DsmLayer,
ImageryLayers,
ImageryAndAnnualFluxLayers,
ImageryAndAllFluxLayers,
FullLayers,
UnknownValue(data_layer_view::UnknownValue),
}
#[doc(hidden)]
pub mod data_layer_view {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl DataLayerView {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::DsmLayer => std::option::Option::Some(1),
Self::ImageryLayers => std::option::Option::Some(2),
Self::ImageryAndAnnualFluxLayers => std::option::Option::Some(3),
Self::ImageryAndAllFluxLayers => std::option::Option::Some(4),
Self::FullLayers => std::option::Option::Some(5),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("DATA_LAYER_VIEW_UNSPECIFIED"),
Self::DsmLayer => std::option::Option::Some("DSM_LAYER"),
Self::ImageryLayers => std::option::Option::Some("IMAGERY_LAYERS"),
Self::ImageryAndAnnualFluxLayers => {
std::option::Option::Some("IMAGERY_AND_ANNUAL_FLUX_LAYERS")
}
Self::ImageryAndAllFluxLayers => {
std::option::Option::Some("IMAGERY_AND_ALL_FLUX_LAYERS")
}
Self::FullLayers => std::option::Option::Some("FULL_LAYERS"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for DataLayerView {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for DataLayerView {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for DataLayerView {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::DsmLayer,
2 => Self::ImageryLayers,
3 => Self::ImageryAndAnnualFluxLayers,
4 => Self::ImageryAndAllFluxLayers,
5 => Self::FullLayers,
_ => Self::UnknownValue(data_layer_view::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for DataLayerView {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"DATA_LAYER_VIEW_UNSPECIFIED" => Self::Unspecified,
"DSM_LAYER" => Self::DsmLayer,
"IMAGERY_LAYERS" => Self::ImageryLayers,
"IMAGERY_AND_ANNUAL_FLUX_LAYERS" => Self::ImageryAndAnnualFluxLayers,
"IMAGERY_AND_ALL_FLUX_LAYERS" => Self::ImageryAndAllFluxLayers,
"FULL_LAYERS" => Self::FullLayers,
_ => Self::UnknownValue(data_layer_view::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for DataLayerView {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::DsmLayer => serializer.serialize_i32(1),
Self::ImageryLayers => serializer.serialize_i32(2),
Self::ImageryAndAnnualFluxLayers => serializer.serialize_i32(3),
Self::ImageryAndAllFluxLayers => serializer.serialize_i32(4),
Self::FullLayers => serializer.serialize_i32(5),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for DataLayerView {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<DataLayerView>::new(
".google.maps.solar.v1.DataLayerView",
))
}
}
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum ImageryQuality {
Unspecified,
High,
Medium,
Low,
Base,
UnknownValue(imagery_quality::UnknownValue),
}
#[doc(hidden)]
pub mod imagery_quality {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl ImageryQuality {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::High => std::option::Option::Some(1),
Self::Medium => std::option::Option::Some(2),
Self::Low => std::option::Option::Some(3),
Self::Base => std::option::Option::Some(4),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("IMAGERY_QUALITY_UNSPECIFIED"),
Self::High => std::option::Option::Some("HIGH"),
Self::Medium => std::option::Option::Some("MEDIUM"),
Self::Low => std::option::Option::Some("LOW"),
Self::Base => std::option::Option::Some("BASE"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for ImageryQuality {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for ImageryQuality {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for ImageryQuality {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::High,
2 => Self::Medium,
3 => Self::Low,
4 => Self::Base,
_ => Self::UnknownValue(imagery_quality::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for ImageryQuality {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"IMAGERY_QUALITY_UNSPECIFIED" => Self::Unspecified,
"HIGH" => Self::High,
"MEDIUM" => Self::Medium,
"LOW" => Self::Low,
"BASE" => Self::Base,
_ => Self::UnknownValue(imagery_quality::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for ImageryQuality {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::High => serializer.serialize_i32(1),
Self::Medium => serializer.serialize_i32(2),
Self::Low => serializer.serialize_i32(3),
Self::Base => serializer.serialize_i32(4),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for ImageryQuality {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<ImageryQuality>::new(
".google.maps.solar.v1.ImageryQuality",
))
}
}
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum SolarPanelOrientation {
Unspecified,
Landscape,
Portrait,
UnknownValue(solar_panel_orientation::UnknownValue),
}
#[doc(hidden)]
pub mod solar_panel_orientation {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl SolarPanelOrientation {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::Landscape => std::option::Option::Some(1),
Self::Portrait => std::option::Option::Some(2),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("SOLAR_PANEL_ORIENTATION_UNSPECIFIED"),
Self::Landscape => std::option::Option::Some("LANDSCAPE"),
Self::Portrait => std::option::Option::Some("PORTRAIT"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for SolarPanelOrientation {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for SolarPanelOrientation {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for SolarPanelOrientation {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::Landscape,
2 => Self::Portrait,
_ => Self::UnknownValue(solar_panel_orientation::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for SolarPanelOrientation {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"SOLAR_PANEL_ORIENTATION_UNSPECIFIED" => Self::Unspecified,
"LANDSCAPE" => Self::Landscape,
"PORTRAIT" => Self::Portrait,
_ => Self::UnknownValue(solar_panel_orientation::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for SolarPanelOrientation {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::Landscape => serializer.serialize_i32(1),
Self::Portrait => serializer.serialize_i32(2),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for SolarPanelOrientation {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<SolarPanelOrientation>::new(
".google.maps.solar.v1.SolarPanelOrientation",
))
}
}
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum Experiment {
Unspecified,
ExpandedCoverage,
UnknownValue(experiment::UnknownValue),
}
#[doc(hidden)]
pub mod experiment {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl Experiment {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::ExpandedCoverage => std::option::Option::Some(1),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("EXPERIMENT_UNSPECIFIED"),
Self::ExpandedCoverage => std::option::Option::Some("EXPANDED_COVERAGE"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for Experiment {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for Experiment {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for Experiment {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::ExpandedCoverage,
_ => Self::UnknownValue(experiment::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for Experiment {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"EXPERIMENT_UNSPECIFIED" => Self::Unspecified,
"EXPANDED_COVERAGE" => Self::ExpandedCoverage,
_ => Self::UnknownValue(experiment::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for Experiment {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::ExpandedCoverage => serializer.serialize_i32(1),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for Experiment {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<Experiment>::new(
".google.maps.solar.v1.Experiment",
))
}
}