#[allow(missing_docs)] #[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum ResourceType {
#[allow(missing_docs)] Order,
#[allow(missing_docs)] Outpost,
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for ResourceType {
fn from(s: &str) -> Self {
match s {
"ORDER" => ResourceType::Order,
"OUTPOST" => ResourceType::Outpost,
other => ResourceType::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
}
}
}
impl std::str::FromStr for ResourceType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ResourceType::from(s))
}
}
impl ResourceType {
pub fn as_str(&self) -> &str {
match self {
ResourceType::Order => "ORDER",
ResourceType::Outpost => "OUTPOST",
ResourceType::Unknown(value) => value.as_str(),
}
}
pub const fn values() -> &'static [&'static str] {
&["ORDER", "OUTPOST"]
}
}
impl AsRef<str> for ResourceType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Site {
#[doc(hidden)]
pub site_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub account_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub description: std::option::Option<std::string::String>,
#[doc(hidden)]
pub tags:
std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
#[doc(hidden)]
pub site_arn: std::option::Option<std::string::String>,
#[doc(hidden)]
pub notes: std::option::Option<std::string::String>,
#[doc(hidden)]
pub operating_address_country_code: std::option::Option<std::string::String>,
#[doc(hidden)]
pub operating_address_state_or_region: std::option::Option<std::string::String>,
#[doc(hidden)]
pub operating_address_city: std::option::Option<std::string::String>,
#[doc(hidden)]
pub rack_physical_properties: std::option::Option<crate::model::RackPhysicalProperties>,
}
impl Site {
pub fn site_id(&self) -> std::option::Option<&str> {
self.site_id.as_deref()
}
pub fn account_id(&self) -> std::option::Option<&str> {
self.account_id.as_deref()
}
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
pub fn tags(
&self,
) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
{
self.tags.as_ref()
}
pub fn site_arn(&self) -> std::option::Option<&str> {
self.site_arn.as_deref()
}
pub fn notes(&self) -> std::option::Option<&str> {
self.notes.as_deref()
}
pub fn operating_address_country_code(&self) -> std::option::Option<&str> {
self.operating_address_country_code.as_deref()
}
pub fn operating_address_state_or_region(&self) -> std::option::Option<&str> {
self.operating_address_state_or_region.as_deref()
}
pub fn operating_address_city(&self) -> std::option::Option<&str> {
self.operating_address_city.as_deref()
}
pub fn rack_physical_properties(
&self,
) -> std::option::Option<&crate::model::RackPhysicalProperties> {
self.rack_physical_properties.as_ref()
}
}
pub mod site {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) site_id: std::option::Option<std::string::String>,
pub(crate) account_id: std::option::Option<std::string::String>,
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) tags: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
pub(crate) site_arn: std::option::Option<std::string::String>,
pub(crate) notes: std::option::Option<std::string::String>,
pub(crate) operating_address_country_code: std::option::Option<std::string::String>,
pub(crate) operating_address_state_or_region: std::option::Option<std::string::String>,
pub(crate) operating_address_city: std::option::Option<std::string::String>,
pub(crate) rack_physical_properties:
std::option::Option<crate::model::RackPhysicalProperties>,
}
impl Builder {
pub fn site_id(mut self, input: impl Into<std::string::String>) -> Self {
self.site_id = Some(input.into());
self
}
pub fn set_site_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.site_id = input;
self
}
pub fn account_id(mut self, input: impl Into<std::string::String>) -> Self {
self.account_id = Some(input.into());
self
}
pub fn set_account_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.account_id = input;
self
}
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
self.description = Some(input.into());
self
}
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.description = input;
self
}
pub fn tags(
mut self,
k: impl Into<std::string::String>,
v: impl Into<std::string::String>,
) -> Self {
let mut hash_map = self.tags.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.tags = Some(hash_map);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
) -> Self {
self.tags = input;
self
}
pub fn site_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.site_arn = Some(input.into());
self
}
pub fn set_site_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.site_arn = input;
self
}
pub fn notes(mut self, input: impl Into<std::string::String>) -> Self {
self.notes = Some(input.into());
self
}
pub fn set_notes(mut self, input: std::option::Option<std::string::String>) -> Self {
self.notes = input;
self
}
pub fn operating_address_country_code(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.operating_address_country_code = Some(input.into());
self
}
pub fn set_operating_address_country_code(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.operating_address_country_code = input;
self
}
pub fn operating_address_state_or_region(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.operating_address_state_or_region = Some(input.into());
self
}
pub fn set_operating_address_state_or_region(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.operating_address_state_or_region = input;
self
}
pub fn operating_address_city(mut self, input: impl Into<std::string::String>) -> Self {
self.operating_address_city = Some(input.into());
self
}
pub fn set_operating_address_city(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.operating_address_city = input;
self
}
pub fn rack_physical_properties(
mut self,
input: crate::model::RackPhysicalProperties,
) -> Self {
self.rack_physical_properties = Some(input);
self
}
pub fn set_rack_physical_properties(
mut self,
input: std::option::Option<crate::model::RackPhysicalProperties>,
) -> Self {
self.rack_physical_properties = input;
self
}
pub fn build(self) -> crate::model::Site {
crate::model::Site {
site_id: self.site_id,
account_id: self.account_id,
name: self.name,
description: self.description,
tags: self.tags,
site_arn: self.site_arn,
notes: self.notes,
operating_address_country_code: self.operating_address_country_code,
operating_address_state_or_region: self.operating_address_state_or_region,
operating_address_city: self.operating_address_city,
rack_physical_properties: self.rack_physical_properties,
}
}
}
}
impl Site {
pub fn builder() -> crate::model::site::Builder {
crate::model::site::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct RackPhysicalProperties {
#[doc(hidden)]
pub power_draw_kva: std::option::Option<crate::model::PowerDrawKva>,
#[doc(hidden)]
pub power_phase: std::option::Option<crate::model::PowerPhase>,
#[doc(hidden)]
pub power_connector: std::option::Option<crate::model::PowerConnector>,
#[doc(hidden)]
pub power_feed_drop: std::option::Option<crate::model::PowerFeedDrop>,
#[doc(hidden)]
pub uplink_gbps: std::option::Option<crate::model::UplinkGbps>,
#[doc(hidden)]
pub uplink_count: std::option::Option<crate::model::UplinkCount>,
#[doc(hidden)]
pub fiber_optic_cable_type: std::option::Option<crate::model::FiberOpticCableType>,
#[doc(hidden)]
pub optical_standard: std::option::Option<crate::model::OpticalStandard>,
#[doc(hidden)]
pub maximum_supported_weight_lbs: std::option::Option<crate::model::MaximumSupportedWeightLbs>,
}
impl RackPhysicalProperties {
pub fn power_draw_kva(&self) -> std::option::Option<&crate::model::PowerDrawKva> {
self.power_draw_kva.as_ref()
}
pub fn power_phase(&self) -> std::option::Option<&crate::model::PowerPhase> {
self.power_phase.as_ref()
}
pub fn power_connector(&self) -> std::option::Option<&crate::model::PowerConnector> {
self.power_connector.as_ref()
}
pub fn power_feed_drop(&self) -> std::option::Option<&crate::model::PowerFeedDrop> {
self.power_feed_drop.as_ref()
}
pub fn uplink_gbps(&self) -> std::option::Option<&crate::model::UplinkGbps> {
self.uplink_gbps.as_ref()
}
pub fn uplink_count(&self) -> std::option::Option<&crate::model::UplinkCount> {
self.uplink_count.as_ref()
}
pub fn fiber_optic_cable_type(
&self,
) -> std::option::Option<&crate::model::FiberOpticCableType> {
self.fiber_optic_cable_type.as_ref()
}
pub fn optical_standard(&self) -> std::option::Option<&crate::model::OpticalStandard> {
self.optical_standard.as_ref()
}
pub fn maximum_supported_weight_lbs(
&self,
) -> std::option::Option<&crate::model::MaximumSupportedWeightLbs> {
self.maximum_supported_weight_lbs.as_ref()
}
}
pub mod rack_physical_properties {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) power_draw_kva: std::option::Option<crate::model::PowerDrawKva>,
pub(crate) power_phase: std::option::Option<crate::model::PowerPhase>,
pub(crate) power_connector: std::option::Option<crate::model::PowerConnector>,
pub(crate) power_feed_drop: std::option::Option<crate::model::PowerFeedDrop>,
pub(crate) uplink_gbps: std::option::Option<crate::model::UplinkGbps>,
pub(crate) uplink_count: std::option::Option<crate::model::UplinkCount>,
pub(crate) fiber_optic_cable_type: std::option::Option<crate::model::FiberOpticCableType>,
pub(crate) optical_standard: std::option::Option<crate::model::OpticalStandard>,
pub(crate) maximum_supported_weight_lbs:
std::option::Option<crate::model::MaximumSupportedWeightLbs>,
}
impl Builder {
pub fn power_draw_kva(mut self, input: crate::model::PowerDrawKva) -> Self {
self.power_draw_kva = Some(input);
self
}
pub fn set_power_draw_kva(
mut self,
input: std::option::Option<crate::model::PowerDrawKva>,
) -> Self {
self.power_draw_kva = input;
self
}
pub fn power_phase(mut self, input: crate::model::PowerPhase) -> Self {
self.power_phase = Some(input);
self
}
pub fn set_power_phase(
mut self,
input: std::option::Option<crate::model::PowerPhase>,
) -> Self {
self.power_phase = input;
self
}
pub fn power_connector(mut self, input: crate::model::PowerConnector) -> Self {
self.power_connector = Some(input);
self
}
pub fn set_power_connector(
mut self,
input: std::option::Option<crate::model::PowerConnector>,
) -> Self {
self.power_connector = input;
self
}
pub fn power_feed_drop(mut self, input: crate::model::PowerFeedDrop) -> Self {
self.power_feed_drop = Some(input);
self
}
pub fn set_power_feed_drop(
mut self,
input: std::option::Option<crate::model::PowerFeedDrop>,
) -> Self {
self.power_feed_drop = input;
self
}
pub fn uplink_gbps(mut self, input: crate::model::UplinkGbps) -> Self {
self.uplink_gbps = Some(input);
self
}
pub fn set_uplink_gbps(
mut self,
input: std::option::Option<crate::model::UplinkGbps>,
) -> Self {
self.uplink_gbps = input;
self
}
pub fn uplink_count(mut self, input: crate::model::UplinkCount) -> Self {
self.uplink_count = Some(input);
self
}
pub fn set_uplink_count(
mut self,
input: std::option::Option<crate::model::UplinkCount>,
) -> Self {
self.uplink_count = input;
self
}
pub fn fiber_optic_cable_type(mut self, input: crate::model::FiberOpticCableType) -> Self {
self.fiber_optic_cable_type = Some(input);
self
}
pub fn set_fiber_optic_cable_type(
mut self,
input: std::option::Option<crate::model::FiberOpticCableType>,
) -> Self {
self.fiber_optic_cable_type = input;
self
}
pub fn optical_standard(mut self, input: crate::model::OpticalStandard) -> Self {
self.optical_standard = Some(input);
self
}
pub fn set_optical_standard(
mut self,
input: std::option::Option<crate::model::OpticalStandard>,
) -> Self {
self.optical_standard = input;
self
}
pub fn maximum_supported_weight_lbs(
mut self,
input: crate::model::MaximumSupportedWeightLbs,
) -> Self {
self.maximum_supported_weight_lbs = Some(input);
self
}
pub fn set_maximum_supported_weight_lbs(
mut self,
input: std::option::Option<crate::model::MaximumSupportedWeightLbs>,
) -> Self {
self.maximum_supported_weight_lbs = input;
self
}
pub fn build(self) -> crate::model::RackPhysicalProperties {
crate::model::RackPhysicalProperties {
power_draw_kva: self.power_draw_kva,
power_phase: self.power_phase,
power_connector: self.power_connector,
power_feed_drop: self.power_feed_drop,
uplink_gbps: self.uplink_gbps,
uplink_count: self.uplink_count,
fiber_optic_cable_type: self.fiber_optic_cable_type,
optical_standard: self.optical_standard,
maximum_supported_weight_lbs: self.maximum_supported_weight_lbs,
}
}
}
}
impl RackPhysicalProperties {
pub fn builder() -> crate::model::rack_physical_properties::Builder {
crate::model::rack_physical_properties::Builder::default()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum MaximumSupportedWeightLbs {
#[allow(missing_docs)] Max1400Lbs,
#[allow(missing_docs)] Max1600Lbs,
#[allow(missing_docs)] Max1800Lbs,
#[allow(missing_docs)] Max2000Lbs,
#[allow(missing_docs)] NoLimit,
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for MaximumSupportedWeightLbs {
fn from(s: &str) -> Self {
match s {
"MAX_1400_LBS" => MaximumSupportedWeightLbs::Max1400Lbs,
"MAX_1600_LBS" => MaximumSupportedWeightLbs::Max1600Lbs,
"MAX_1800_LBS" => MaximumSupportedWeightLbs::Max1800Lbs,
"MAX_2000_LBS" => MaximumSupportedWeightLbs::Max2000Lbs,
"NO_LIMIT" => MaximumSupportedWeightLbs::NoLimit,
other => MaximumSupportedWeightLbs::Unknown(crate::types::UnknownVariantValue(
other.to_owned(),
)),
}
}
}
impl std::str::FromStr for MaximumSupportedWeightLbs {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(MaximumSupportedWeightLbs::from(s))
}
}
impl MaximumSupportedWeightLbs {
pub fn as_str(&self) -> &str {
match self {
MaximumSupportedWeightLbs::Max1400Lbs => "MAX_1400_LBS",
MaximumSupportedWeightLbs::Max1600Lbs => "MAX_1600_LBS",
MaximumSupportedWeightLbs::Max1800Lbs => "MAX_1800_LBS",
MaximumSupportedWeightLbs::Max2000Lbs => "MAX_2000_LBS",
MaximumSupportedWeightLbs::NoLimit => "NO_LIMIT",
MaximumSupportedWeightLbs::Unknown(value) => value.as_str(),
}
}
pub const fn values() -> &'static [&'static str] {
&[
"MAX_1400_LBS",
"MAX_1600_LBS",
"MAX_1800_LBS",
"MAX_2000_LBS",
"NO_LIMIT",
]
}
}
impl AsRef<str> for MaximumSupportedWeightLbs {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum OpticalStandard {
#[allow(missing_docs)] Optic1000BaseLx,
#[allow(missing_docs)] Optic1000BaseSx,
#[allow(missing_docs)] Optic100GbaseCwdm4,
#[allow(missing_docs)] Optic100GbaseLr4,
#[allow(missing_docs)] Optic100GbaseSr4,
#[allow(missing_docs)] Optic100GPsm4Msa,
#[allow(missing_docs)] Optic10GbaseIr,
#[allow(missing_docs)] Optic10GbaseLr,
#[allow(missing_docs)] Optic10GbaseSr,
#[allow(missing_docs)] Optic40GbaseEsr,
#[allow(missing_docs)] Optic40GbaseIr4Lr4L,
#[allow(missing_docs)] Optic40GbaseLr4,
#[allow(missing_docs)] Optic40GbaseSr,
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for OpticalStandard {
fn from(s: &str) -> Self {
match s {
"OPTIC_1000BASE_LX" => OpticalStandard::Optic1000BaseLx,
"OPTIC_1000BASE_SX" => OpticalStandard::Optic1000BaseSx,
"OPTIC_100GBASE_CWDM4" => OpticalStandard::Optic100GbaseCwdm4,
"OPTIC_100GBASE_LR4" => OpticalStandard::Optic100GbaseLr4,
"OPTIC_100GBASE_SR4" => OpticalStandard::Optic100GbaseSr4,
"OPTIC_100G_PSM4_MSA" => OpticalStandard::Optic100GPsm4Msa,
"OPTIC_10GBASE_IR" => OpticalStandard::Optic10GbaseIr,
"OPTIC_10GBASE_LR" => OpticalStandard::Optic10GbaseLr,
"OPTIC_10GBASE_SR" => OpticalStandard::Optic10GbaseSr,
"OPTIC_40GBASE_ESR" => OpticalStandard::Optic40GbaseEsr,
"OPTIC_40GBASE_IR4_LR4L" => OpticalStandard::Optic40GbaseIr4Lr4L,
"OPTIC_40GBASE_LR4" => OpticalStandard::Optic40GbaseLr4,
"OPTIC_40GBASE_SR" => OpticalStandard::Optic40GbaseSr,
other => OpticalStandard::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
}
}
}
impl std::str::FromStr for OpticalStandard {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(OpticalStandard::from(s))
}
}
impl OpticalStandard {
pub fn as_str(&self) -> &str {
match self {
OpticalStandard::Optic1000BaseLx => "OPTIC_1000BASE_LX",
OpticalStandard::Optic1000BaseSx => "OPTIC_1000BASE_SX",
OpticalStandard::Optic100GbaseCwdm4 => "OPTIC_100GBASE_CWDM4",
OpticalStandard::Optic100GbaseLr4 => "OPTIC_100GBASE_LR4",
OpticalStandard::Optic100GbaseSr4 => "OPTIC_100GBASE_SR4",
OpticalStandard::Optic100GPsm4Msa => "OPTIC_100G_PSM4_MSA",
OpticalStandard::Optic10GbaseIr => "OPTIC_10GBASE_IR",
OpticalStandard::Optic10GbaseLr => "OPTIC_10GBASE_LR",
OpticalStandard::Optic10GbaseSr => "OPTIC_10GBASE_SR",
OpticalStandard::Optic40GbaseEsr => "OPTIC_40GBASE_ESR",
OpticalStandard::Optic40GbaseIr4Lr4L => "OPTIC_40GBASE_IR4_LR4L",
OpticalStandard::Optic40GbaseLr4 => "OPTIC_40GBASE_LR4",
OpticalStandard::Optic40GbaseSr => "OPTIC_40GBASE_SR",
OpticalStandard::Unknown(value) => value.as_str(),
}
}
pub const fn values() -> &'static [&'static str] {
&[
"OPTIC_1000BASE_LX",
"OPTIC_1000BASE_SX",
"OPTIC_100GBASE_CWDM4",
"OPTIC_100GBASE_LR4",
"OPTIC_100GBASE_SR4",
"OPTIC_100G_PSM4_MSA",
"OPTIC_10GBASE_IR",
"OPTIC_10GBASE_LR",
"OPTIC_10GBASE_SR",
"OPTIC_40GBASE_ESR",
"OPTIC_40GBASE_IR4_LR4L",
"OPTIC_40GBASE_LR4",
"OPTIC_40GBASE_SR",
]
}
}
impl AsRef<str> for OpticalStandard {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum FiberOpticCableType {
#[allow(missing_docs)] MultiMode,
#[allow(missing_docs)] SingleMode,
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for FiberOpticCableType {
fn from(s: &str) -> Self {
match s {
"MULTI_MODE" => FiberOpticCableType::MultiMode,
"SINGLE_MODE" => FiberOpticCableType::SingleMode,
other => {
FiberOpticCableType::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
}
}
}
}
impl std::str::FromStr for FiberOpticCableType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(FiberOpticCableType::from(s))
}
}
impl FiberOpticCableType {
pub fn as_str(&self) -> &str {
match self {
FiberOpticCableType::MultiMode => "MULTI_MODE",
FiberOpticCableType::SingleMode => "SINGLE_MODE",
FiberOpticCableType::Unknown(value) => value.as_str(),
}
}
pub const fn values() -> &'static [&'static str] {
&["MULTI_MODE", "SINGLE_MODE"]
}
}
impl AsRef<str> for FiberOpticCableType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum UplinkCount {
#[allow(missing_docs)] UplinkCount1,
#[allow(missing_docs)] UplinkCount12,
#[allow(missing_docs)] UplinkCount16,
#[allow(missing_docs)] UplinkCount2,
#[allow(missing_docs)] UplinkCount3,
#[allow(missing_docs)] UplinkCount4,
#[allow(missing_docs)] UplinkCount5,
#[allow(missing_docs)] UplinkCount6,
#[allow(missing_docs)] UplinkCount7,
#[allow(missing_docs)] UplinkCount8,
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for UplinkCount {
fn from(s: &str) -> Self {
match s {
"UPLINK_COUNT_1" => UplinkCount::UplinkCount1,
"UPLINK_COUNT_12" => UplinkCount::UplinkCount12,
"UPLINK_COUNT_16" => UplinkCount::UplinkCount16,
"UPLINK_COUNT_2" => UplinkCount::UplinkCount2,
"UPLINK_COUNT_3" => UplinkCount::UplinkCount3,
"UPLINK_COUNT_4" => UplinkCount::UplinkCount4,
"UPLINK_COUNT_5" => UplinkCount::UplinkCount5,
"UPLINK_COUNT_6" => UplinkCount::UplinkCount6,
"UPLINK_COUNT_7" => UplinkCount::UplinkCount7,
"UPLINK_COUNT_8" => UplinkCount::UplinkCount8,
other => UplinkCount::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
}
}
}
impl std::str::FromStr for UplinkCount {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(UplinkCount::from(s))
}
}
impl UplinkCount {
pub fn as_str(&self) -> &str {
match self {
UplinkCount::UplinkCount1 => "UPLINK_COUNT_1",
UplinkCount::UplinkCount12 => "UPLINK_COUNT_12",
UplinkCount::UplinkCount16 => "UPLINK_COUNT_16",
UplinkCount::UplinkCount2 => "UPLINK_COUNT_2",
UplinkCount::UplinkCount3 => "UPLINK_COUNT_3",
UplinkCount::UplinkCount4 => "UPLINK_COUNT_4",
UplinkCount::UplinkCount5 => "UPLINK_COUNT_5",
UplinkCount::UplinkCount6 => "UPLINK_COUNT_6",
UplinkCount::UplinkCount7 => "UPLINK_COUNT_7",
UplinkCount::UplinkCount8 => "UPLINK_COUNT_8",
UplinkCount::Unknown(value) => value.as_str(),
}
}
pub const fn values() -> &'static [&'static str] {
&[
"UPLINK_COUNT_1",
"UPLINK_COUNT_12",
"UPLINK_COUNT_16",
"UPLINK_COUNT_2",
"UPLINK_COUNT_3",
"UPLINK_COUNT_4",
"UPLINK_COUNT_5",
"UPLINK_COUNT_6",
"UPLINK_COUNT_7",
"UPLINK_COUNT_8",
]
}
}
impl AsRef<str> for UplinkCount {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum UplinkGbps {
#[allow(missing_docs)] Uplink100G,
#[allow(missing_docs)] Uplink10G,
#[allow(missing_docs)] Uplink1G,
#[allow(missing_docs)] Uplink40G,
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for UplinkGbps {
fn from(s: &str) -> Self {
match s {
"UPLINK_100G" => UplinkGbps::Uplink100G,
"UPLINK_10G" => UplinkGbps::Uplink10G,
"UPLINK_1G" => UplinkGbps::Uplink1G,
"UPLINK_40G" => UplinkGbps::Uplink40G,
other => UplinkGbps::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
}
}
}
impl std::str::FromStr for UplinkGbps {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(UplinkGbps::from(s))
}
}
impl UplinkGbps {
pub fn as_str(&self) -> &str {
match self {
UplinkGbps::Uplink100G => "UPLINK_100G",
UplinkGbps::Uplink10G => "UPLINK_10G",
UplinkGbps::Uplink1G => "UPLINK_1G",
UplinkGbps::Uplink40G => "UPLINK_40G",
UplinkGbps::Unknown(value) => value.as_str(),
}
}
pub const fn values() -> &'static [&'static str] {
&["UPLINK_100G", "UPLINK_10G", "UPLINK_1G", "UPLINK_40G"]
}
}
impl AsRef<str> for UplinkGbps {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum PowerFeedDrop {
#[allow(missing_docs)] AboveRack,
#[allow(missing_docs)] BelowRack,
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for PowerFeedDrop {
fn from(s: &str) -> Self {
match s {
"ABOVE_RACK" => PowerFeedDrop::AboveRack,
"BELOW_RACK" => PowerFeedDrop::BelowRack,
other => PowerFeedDrop::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
}
}
}
impl std::str::FromStr for PowerFeedDrop {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(PowerFeedDrop::from(s))
}
}
impl PowerFeedDrop {
pub fn as_str(&self) -> &str {
match self {
PowerFeedDrop::AboveRack => "ABOVE_RACK",
PowerFeedDrop::BelowRack => "BELOW_RACK",
PowerFeedDrop::Unknown(value) => value.as_str(),
}
}
pub const fn values() -> &'static [&'static str] {
&["ABOVE_RACK", "BELOW_RACK"]
}
}
impl AsRef<str> for PowerFeedDrop {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum PowerConnector {
#[allow(missing_docs)] Ah530P7W,
#[allow(missing_docs)] Ah532P6W,
#[allow(missing_docs)] Iec309,
#[allow(missing_docs)] L630P,
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for PowerConnector {
fn from(s: &str) -> Self {
match s {
"AH530P7W" => PowerConnector::Ah530P7W,
"AH532P6W" => PowerConnector::Ah532P6W,
"IEC309" => PowerConnector::Iec309,
"L6_30P" => PowerConnector::L630P,
other => PowerConnector::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
}
}
}
impl std::str::FromStr for PowerConnector {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(PowerConnector::from(s))
}
}
impl PowerConnector {
pub fn as_str(&self) -> &str {
match self {
PowerConnector::Ah530P7W => "AH530P7W",
PowerConnector::Ah532P6W => "AH532P6W",
PowerConnector::Iec309 => "IEC309",
PowerConnector::L630P => "L6_30P",
PowerConnector::Unknown(value) => value.as_str(),
}
}
pub const fn values() -> &'static [&'static str] {
&["AH530P7W", "AH532P6W", "IEC309", "L6_30P"]
}
}
impl AsRef<str> for PowerConnector {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum PowerPhase {
#[allow(missing_docs)] SinglePhase,
#[allow(missing_docs)] ThreePhase,
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for PowerPhase {
fn from(s: &str) -> Self {
match s {
"SINGLE_PHASE" => PowerPhase::SinglePhase,
"THREE_PHASE" => PowerPhase::ThreePhase,
other => PowerPhase::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
}
}
}
impl std::str::FromStr for PowerPhase {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(PowerPhase::from(s))
}
}
impl PowerPhase {
pub fn as_str(&self) -> &str {
match self {
PowerPhase::SinglePhase => "SINGLE_PHASE",
PowerPhase::ThreePhase => "THREE_PHASE",
PowerPhase::Unknown(value) => value.as_str(),
}
}
pub const fn values() -> &'static [&'static str] {
&["SINGLE_PHASE", "THREE_PHASE"]
}
}
impl AsRef<str> for PowerPhase {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum PowerDrawKva {
#[allow(missing_docs)] Power10Kva,
#[allow(missing_docs)] Power15Kva,
#[allow(missing_docs)] Power30Kva,
#[allow(missing_docs)] Power5Kva,
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for PowerDrawKva {
fn from(s: &str) -> Self {
match s {
"POWER_10_KVA" => PowerDrawKva::Power10Kva,
"POWER_15_KVA" => PowerDrawKva::Power15Kva,
"POWER_30_KVA" => PowerDrawKva::Power30Kva,
"POWER_5_KVA" => PowerDrawKva::Power5Kva,
other => PowerDrawKva::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
}
}
}
impl std::str::FromStr for PowerDrawKva {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(PowerDrawKva::from(s))
}
}
impl PowerDrawKva {
pub fn as_str(&self) -> &str {
match self {
PowerDrawKva::Power10Kva => "POWER_10_KVA",
PowerDrawKva::Power15Kva => "POWER_15_KVA",
PowerDrawKva::Power30Kva => "POWER_30_KVA",
PowerDrawKva::Power5Kva => "POWER_5_KVA",
PowerDrawKva::Unknown(value) => value.as_str(),
}
}
pub const fn values() -> &'static [&'static str] {
&[
"POWER_10_KVA",
"POWER_15_KVA",
"POWER_30_KVA",
"POWER_5_KVA",
]
}
}
impl AsRef<str> for PowerDrawKva {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Address {
#[doc(hidden)]
pub contact_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub contact_phone_number: std::option::Option<std::string::String>,
#[doc(hidden)]
pub address_line1: std::option::Option<std::string::String>,
#[doc(hidden)]
pub address_line2: std::option::Option<std::string::String>,
#[doc(hidden)]
pub address_line3: std::option::Option<std::string::String>,
#[doc(hidden)]
pub city: std::option::Option<std::string::String>,
#[doc(hidden)]
pub state_or_region: std::option::Option<std::string::String>,
#[doc(hidden)]
pub district_or_county: std::option::Option<std::string::String>,
#[doc(hidden)]
pub postal_code: std::option::Option<std::string::String>,
#[doc(hidden)]
pub country_code: std::option::Option<std::string::String>,
#[doc(hidden)]
pub municipality: std::option::Option<std::string::String>,
}
impl Address {
pub fn contact_name(&self) -> std::option::Option<&str> {
self.contact_name.as_deref()
}
pub fn contact_phone_number(&self) -> std::option::Option<&str> {
self.contact_phone_number.as_deref()
}
pub fn address_line1(&self) -> std::option::Option<&str> {
self.address_line1.as_deref()
}
pub fn address_line2(&self) -> std::option::Option<&str> {
self.address_line2.as_deref()
}
pub fn address_line3(&self) -> std::option::Option<&str> {
self.address_line3.as_deref()
}
pub fn city(&self) -> std::option::Option<&str> {
self.city.as_deref()
}
pub fn state_or_region(&self) -> std::option::Option<&str> {
self.state_or_region.as_deref()
}
pub fn district_or_county(&self) -> std::option::Option<&str> {
self.district_or_county.as_deref()
}
pub fn postal_code(&self) -> std::option::Option<&str> {
self.postal_code.as_deref()
}
pub fn country_code(&self) -> std::option::Option<&str> {
self.country_code.as_deref()
}
pub fn municipality(&self) -> std::option::Option<&str> {
self.municipality.as_deref()
}
}
pub mod address {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) contact_name: std::option::Option<std::string::String>,
pub(crate) contact_phone_number: std::option::Option<std::string::String>,
pub(crate) address_line1: std::option::Option<std::string::String>,
pub(crate) address_line2: std::option::Option<std::string::String>,
pub(crate) address_line3: std::option::Option<std::string::String>,
pub(crate) city: std::option::Option<std::string::String>,
pub(crate) state_or_region: std::option::Option<std::string::String>,
pub(crate) district_or_county: std::option::Option<std::string::String>,
pub(crate) postal_code: std::option::Option<std::string::String>,
pub(crate) country_code: std::option::Option<std::string::String>,
pub(crate) municipality: std::option::Option<std::string::String>,
}
impl Builder {
pub fn contact_name(mut self, input: impl Into<std::string::String>) -> Self {
self.contact_name = Some(input.into());
self
}
pub fn set_contact_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.contact_name = input;
self
}
pub fn contact_phone_number(mut self, input: impl Into<std::string::String>) -> Self {
self.contact_phone_number = Some(input.into());
self
}
pub fn set_contact_phone_number(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.contact_phone_number = input;
self
}
pub fn address_line1(mut self, input: impl Into<std::string::String>) -> Self {
self.address_line1 = Some(input.into());
self
}
pub fn set_address_line1(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.address_line1 = input;
self
}
pub fn address_line2(mut self, input: impl Into<std::string::String>) -> Self {
self.address_line2 = Some(input.into());
self
}
pub fn set_address_line2(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.address_line2 = input;
self
}
pub fn address_line3(mut self, input: impl Into<std::string::String>) -> Self {
self.address_line3 = Some(input.into());
self
}
pub fn set_address_line3(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.address_line3 = input;
self
}
pub fn city(mut self, input: impl Into<std::string::String>) -> Self {
self.city = Some(input.into());
self
}
pub fn set_city(mut self, input: std::option::Option<std::string::String>) -> Self {
self.city = input;
self
}
pub fn state_or_region(mut self, input: impl Into<std::string::String>) -> Self {
self.state_or_region = Some(input.into());
self
}
pub fn set_state_or_region(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.state_or_region = input;
self
}
pub fn district_or_county(mut self, input: impl Into<std::string::String>) -> Self {
self.district_or_county = Some(input.into());
self
}
pub fn set_district_or_county(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.district_or_county = input;
self
}
pub fn postal_code(mut self, input: impl Into<std::string::String>) -> Self {
self.postal_code = Some(input.into());
self
}
pub fn set_postal_code(mut self, input: std::option::Option<std::string::String>) -> Self {
self.postal_code = input;
self
}
pub fn country_code(mut self, input: impl Into<std::string::String>) -> Self {
self.country_code = Some(input.into());
self
}
pub fn set_country_code(mut self, input: std::option::Option<std::string::String>) -> Self {
self.country_code = input;
self
}
pub fn municipality(mut self, input: impl Into<std::string::String>) -> Self {
self.municipality = Some(input.into());
self
}
pub fn set_municipality(mut self, input: std::option::Option<std::string::String>) -> Self {
self.municipality = input;
self
}
pub fn build(self) -> crate::model::Address {
crate::model::Address {
contact_name: self.contact_name,
contact_phone_number: self.contact_phone_number,
address_line1: self.address_line1,
address_line2: self.address_line2,
address_line3: self.address_line3,
city: self.city,
state_or_region: self.state_or_region,
district_or_county: self.district_or_county,
postal_code: self.postal_code,
country_code: self.country_code,
municipality: self.municipality,
}
}
}
}
impl Address {
pub fn builder() -> crate::model::address::Builder {
crate::model::address::Builder::default()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum AddressType {
#[allow(missing_docs)] OperatingAddress,
#[allow(missing_docs)] ShippingAddress,
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for AddressType {
fn from(s: &str) -> Self {
match s {
"OPERATING_ADDRESS" => AddressType::OperatingAddress,
"SHIPPING_ADDRESS" => AddressType::ShippingAddress,
other => AddressType::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
}
}
}
impl std::str::FromStr for AddressType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(AddressType::from(s))
}
}
impl AddressType {
pub fn as_str(&self) -> &str {
match self {
AddressType::OperatingAddress => "OPERATING_ADDRESS",
AddressType::ShippingAddress => "SHIPPING_ADDRESS",
AddressType::Unknown(value) => value.as_str(),
}
}
pub const fn values() -> &'static [&'static str] {
&["OPERATING_ADDRESS", "SHIPPING_ADDRESS"]
}
}
impl AsRef<str> for AddressType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Outpost {
#[doc(hidden)]
pub outpost_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub owner_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub outpost_arn: std::option::Option<std::string::String>,
#[doc(hidden)]
pub site_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub description: std::option::Option<std::string::String>,
#[doc(hidden)]
pub life_cycle_status: std::option::Option<std::string::String>,
#[doc(hidden)]
pub availability_zone: std::option::Option<std::string::String>,
#[doc(hidden)]
pub availability_zone_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub tags:
std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
#[doc(hidden)]
pub site_arn: std::option::Option<std::string::String>,
#[doc(hidden)]
pub supported_hardware_type: std::option::Option<crate::model::SupportedHardwareType>,
}
impl Outpost {
pub fn outpost_id(&self) -> std::option::Option<&str> {
self.outpost_id.as_deref()
}
pub fn owner_id(&self) -> std::option::Option<&str> {
self.owner_id.as_deref()
}
pub fn outpost_arn(&self) -> std::option::Option<&str> {
self.outpost_arn.as_deref()
}
pub fn site_id(&self) -> std::option::Option<&str> {
self.site_id.as_deref()
}
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
pub fn life_cycle_status(&self) -> std::option::Option<&str> {
self.life_cycle_status.as_deref()
}
pub fn availability_zone(&self) -> std::option::Option<&str> {
self.availability_zone.as_deref()
}
pub fn availability_zone_id(&self) -> std::option::Option<&str> {
self.availability_zone_id.as_deref()
}
pub fn tags(
&self,
) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
{
self.tags.as_ref()
}
pub fn site_arn(&self) -> std::option::Option<&str> {
self.site_arn.as_deref()
}
pub fn supported_hardware_type(
&self,
) -> std::option::Option<&crate::model::SupportedHardwareType> {
self.supported_hardware_type.as_ref()
}
}
pub mod outpost {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) outpost_id: std::option::Option<std::string::String>,
pub(crate) owner_id: std::option::Option<std::string::String>,
pub(crate) outpost_arn: std::option::Option<std::string::String>,
pub(crate) site_id: std::option::Option<std::string::String>,
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) life_cycle_status: std::option::Option<std::string::String>,
pub(crate) availability_zone: std::option::Option<std::string::String>,
pub(crate) availability_zone_id: std::option::Option<std::string::String>,
pub(crate) tags: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
pub(crate) site_arn: std::option::Option<std::string::String>,
pub(crate) supported_hardware_type:
std::option::Option<crate::model::SupportedHardwareType>,
}
impl Builder {
pub fn outpost_id(mut self, input: impl Into<std::string::String>) -> Self {
self.outpost_id = Some(input.into());
self
}
pub fn set_outpost_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.outpost_id = input;
self
}
pub fn owner_id(mut self, input: impl Into<std::string::String>) -> Self {
self.owner_id = Some(input.into());
self
}
pub fn set_owner_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.owner_id = input;
self
}
pub fn outpost_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.outpost_arn = Some(input.into());
self
}
pub fn set_outpost_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.outpost_arn = input;
self
}
pub fn site_id(mut self, input: impl Into<std::string::String>) -> Self {
self.site_id = Some(input.into());
self
}
pub fn set_site_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.site_id = input;
self
}
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
self.description = Some(input.into());
self
}
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.description = input;
self
}
pub fn life_cycle_status(mut self, input: impl Into<std::string::String>) -> Self {
self.life_cycle_status = Some(input.into());
self
}
pub fn set_life_cycle_status(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.life_cycle_status = input;
self
}
pub fn availability_zone(mut self, input: impl Into<std::string::String>) -> Self {
self.availability_zone = Some(input.into());
self
}
pub fn set_availability_zone(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.availability_zone = input;
self
}
pub fn availability_zone_id(mut self, input: impl Into<std::string::String>) -> Self {
self.availability_zone_id = Some(input.into());
self
}
pub fn set_availability_zone_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.availability_zone_id = input;
self
}
pub fn tags(
mut self,
k: impl Into<std::string::String>,
v: impl Into<std::string::String>,
) -> Self {
let mut hash_map = self.tags.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.tags = Some(hash_map);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
) -> Self {
self.tags = input;
self
}
pub fn site_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.site_arn = Some(input.into());
self
}
pub fn set_site_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.site_arn = input;
self
}
pub fn supported_hardware_type(
mut self,
input: crate::model::SupportedHardwareType,
) -> Self {
self.supported_hardware_type = Some(input);
self
}
pub fn set_supported_hardware_type(
mut self,
input: std::option::Option<crate::model::SupportedHardwareType>,
) -> Self {
self.supported_hardware_type = input;
self
}
pub fn build(self) -> crate::model::Outpost {
crate::model::Outpost {
outpost_id: self.outpost_id,
owner_id: self.owner_id,
outpost_arn: self.outpost_arn,
site_id: self.site_id,
name: self.name,
description: self.description,
life_cycle_status: self.life_cycle_status,
availability_zone: self.availability_zone,
availability_zone_id: self.availability_zone_id,
tags: self.tags,
site_arn: self.site_arn,
supported_hardware_type: self.supported_hardware_type,
}
}
}
}
impl Outpost {
pub fn builder() -> crate::model::outpost::Builder {
crate::model::outpost::Builder::default()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum SupportedHardwareType {
#[allow(missing_docs)] Rack,
#[allow(missing_docs)] Server,
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for SupportedHardwareType {
fn from(s: &str) -> Self {
match s {
"RACK" => SupportedHardwareType::Rack,
"SERVER" => SupportedHardwareType::Server,
other => {
SupportedHardwareType::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
}
}
}
}
impl std::str::FromStr for SupportedHardwareType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(SupportedHardwareType::from(s))
}
}
impl SupportedHardwareType {
pub fn as_str(&self) -> &str {
match self {
SupportedHardwareType::Rack => "RACK",
SupportedHardwareType::Server => "SERVER",
SupportedHardwareType::Unknown(value) => value.as_str(),
}
}
pub const fn values() -> &'static [&'static str] {
&["RACK", "SERVER"]
}
}
impl AsRef<str> for SupportedHardwareType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct OrderSummary {
#[doc(hidden)]
pub outpost_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub order_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub order_type: std::option::Option<crate::model::OrderType>,
#[doc(hidden)]
pub status: std::option::Option<crate::model::OrderStatus>,
#[doc(hidden)]
pub line_item_counts_by_status:
std::option::Option<std::collections::HashMap<crate::model::LineItemStatus, i32>>,
#[doc(hidden)]
pub order_submission_date: std::option::Option<aws_smithy_types::DateTime>,
#[doc(hidden)]
pub order_fulfilled_date: std::option::Option<aws_smithy_types::DateTime>,
}
impl OrderSummary {
pub fn outpost_id(&self) -> std::option::Option<&str> {
self.outpost_id.as_deref()
}
pub fn order_id(&self) -> std::option::Option<&str> {
self.order_id.as_deref()
}
pub fn order_type(&self) -> std::option::Option<&crate::model::OrderType> {
self.order_type.as_ref()
}
pub fn status(&self) -> std::option::Option<&crate::model::OrderStatus> {
self.status.as_ref()
}
pub fn line_item_counts_by_status(
&self,
) -> std::option::Option<&std::collections::HashMap<crate::model::LineItemStatus, i32>> {
self.line_item_counts_by_status.as_ref()
}
pub fn order_submission_date(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.order_submission_date.as_ref()
}
pub fn order_fulfilled_date(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.order_fulfilled_date.as_ref()
}
}
pub mod order_summary {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) outpost_id: std::option::Option<std::string::String>,
pub(crate) order_id: std::option::Option<std::string::String>,
pub(crate) order_type: std::option::Option<crate::model::OrderType>,
pub(crate) status: std::option::Option<crate::model::OrderStatus>,
pub(crate) line_item_counts_by_status:
std::option::Option<std::collections::HashMap<crate::model::LineItemStatus, i32>>,
pub(crate) order_submission_date: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) order_fulfilled_date: std::option::Option<aws_smithy_types::DateTime>,
}
impl Builder {
pub fn outpost_id(mut self, input: impl Into<std::string::String>) -> Self {
self.outpost_id = Some(input.into());
self
}
pub fn set_outpost_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.outpost_id = input;
self
}
pub fn order_id(mut self, input: impl Into<std::string::String>) -> Self {
self.order_id = Some(input.into());
self
}
pub fn set_order_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.order_id = input;
self
}
pub fn order_type(mut self, input: crate::model::OrderType) -> Self {
self.order_type = Some(input);
self
}
pub fn set_order_type(
mut self,
input: std::option::Option<crate::model::OrderType>,
) -> Self {
self.order_type = input;
self
}
pub fn status(mut self, input: crate::model::OrderStatus) -> Self {
self.status = Some(input);
self
}
pub fn set_status(mut self, input: std::option::Option<crate::model::OrderStatus>) -> Self {
self.status = input;
self
}
pub fn line_item_counts_by_status(
mut self,
k: crate::model::LineItemStatus,
v: i32,
) -> Self {
let mut hash_map = self.line_item_counts_by_status.unwrap_or_default();
hash_map.insert(k, v);
self.line_item_counts_by_status = Some(hash_map);
self
}
pub fn set_line_item_counts_by_status(
mut self,
input: std::option::Option<
std::collections::HashMap<crate::model::LineItemStatus, i32>,
>,
) -> Self {
self.line_item_counts_by_status = input;
self
}
pub fn order_submission_date(mut self, input: aws_smithy_types::DateTime) -> Self {
self.order_submission_date = Some(input);
self
}
pub fn set_order_submission_date(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.order_submission_date = input;
self
}
pub fn order_fulfilled_date(mut self, input: aws_smithy_types::DateTime) -> Self {
self.order_fulfilled_date = Some(input);
self
}
pub fn set_order_fulfilled_date(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.order_fulfilled_date = input;
self
}
pub fn build(self) -> crate::model::OrderSummary {
crate::model::OrderSummary {
outpost_id: self.outpost_id,
order_id: self.order_id,
order_type: self.order_type,
status: self.status,
line_item_counts_by_status: self.line_item_counts_by_status,
order_submission_date: self.order_submission_date,
order_fulfilled_date: self.order_fulfilled_date,
}
}
}
}
impl OrderSummary {
pub fn builder() -> crate::model::order_summary::Builder {
crate::model::order_summary::Builder::default()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum LineItemStatus {
#[allow(missing_docs)] Building,
#[allow(missing_docs)] Cancelled,
#[allow(missing_docs)] Delivered,
#[allow(missing_docs)] Error,
#[allow(missing_docs)] Installed,
#[allow(missing_docs)] Installing,
#[allow(missing_docs)] Preparing,
#[allow(missing_docs)] Shipped,
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for LineItemStatus {
fn from(s: &str) -> Self {
match s {
"BUILDING" => LineItemStatus::Building,
"CANCELLED" => LineItemStatus::Cancelled,
"DELIVERED" => LineItemStatus::Delivered,
"ERROR" => LineItemStatus::Error,
"INSTALLED" => LineItemStatus::Installed,
"INSTALLING" => LineItemStatus::Installing,
"PREPARING" => LineItemStatus::Preparing,
"SHIPPED" => LineItemStatus::Shipped,
other => LineItemStatus::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
}
}
}
impl std::str::FromStr for LineItemStatus {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(LineItemStatus::from(s))
}
}
impl LineItemStatus {
pub fn as_str(&self) -> &str {
match self {
LineItemStatus::Building => "BUILDING",
LineItemStatus::Cancelled => "CANCELLED",
LineItemStatus::Delivered => "DELIVERED",
LineItemStatus::Error => "ERROR",
LineItemStatus::Installed => "INSTALLED",
LineItemStatus::Installing => "INSTALLING",
LineItemStatus::Preparing => "PREPARING",
LineItemStatus::Shipped => "SHIPPED",
LineItemStatus::Unknown(value) => value.as_str(),
}
}
pub const fn values() -> &'static [&'static str] {
&[
"BUILDING",
"CANCELLED",
"DELIVERED",
"ERROR",
"INSTALLED",
"INSTALLING",
"PREPARING",
"SHIPPED",
]
}
}
impl AsRef<str> for LineItemStatus {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum OrderStatus {
#[allow(missing_docs)] Cancelled,
#[allow(missing_docs)] Completed,
#[allow(missing_docs)] Error,
#[allow(missing_docs)] Fulfilled,
#[allow(missing_docs)] Installing,
#[allow(missing_docs)] InProgress,
#[allow(missing_docs)] Pending,
#[allow(missing_docs)] Preparing,
#[allow(missing_docs)] Processing,
#[allow(missing_docs)] Received,
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for OrderStatus {
fn from(s: &str) -> Self {
match s {
"CANCELLED" => OrderStatus::Cancelled,
"COMPLETED" => OrderStatus::Completed,
"ERROR" => OrderStatus::Error,
"FULFILLED" => OrderStatus::Fulfilled,
"INSTALLING" => OrderStatus::Installing,
"IN_PROGRESS" => OrderStatus::InProgress,
"PENDING" => OrderStatus::Pending,
"PREPARING" => OrderStatus::Preparing,
"PROCESSING" => OrderStatus::Processing,
"RECEIVED" => OrderStatus::Received,
other => OrderStatus::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
}
}
}
impl std::str::FromStr for OrderStatus {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(OrderStatus::from(s))
}
}
impl OrderStatus {
pub fn as_str(&self) -> &str {
match self {
OrderStatus::Cancelled => "CANCELLED",
OrderStatus::Completed => "COMPLETED",
OrderStatus::Error => "ERROR",
OrderStatus::Fulfilled => "FULFILLED",
OrderStatus::Installing => "INSTALLING",
OrderStatus::InProgress => "IN_PROGRESS",
OrderStatus::Pending => "PENDING",
OrderStatus::Preparing => "PREPARING",
OrderStatus::Processing => "PROCESSING",
OrderStatus::Received => "RECEIVED",
OrderStatus::Unknown(value) => value.as_str(),
}
}
pub const fn values() -> &'static [&'static str] {
&[
"CANCELLED",
"COMPLETED",
"ERROR",
"FULFILLED",
"INSTALLING",
"IN_PROGRESS",
"PENDING",
"PREPARING",
"PROCESSING",
"RECEIVED",
]
}
}
impl AsRef<str> for OrderStatus {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum OrderType {
#[allow(missing_docs)] Outpost,
#[allow(missing_docs)] Replacement,
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for OrderType {
fn from(s: &str) -> Self {
match s {
"OUTPOST" => OrderType::Outpost,
"REPLACEMENT" => OrderType::Replacement,
other => OrderType::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
}
}
}
impl std::str::FromStr for OrderType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(OrderType::from(s))
}
}
impl OrderType {
pub fn as_str(&self) -> &str {
match self {
OrderType::Outpost => "OUTPOST",
OrderType::Replacement => "REPLACEMENT",
OrderType::Unknown(value) => value.as_str(),
}
}
pub const fn values() -> &'static [&'static str] {
&["OUTPOST", "REPLACEMENT"]
}
}
impl AsRef<str> for OrderType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CatalogItem {
#[doc(hidden)]
pub catalog_item_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub item_status: std::option::Option<crate::model::CatalogItemStatus>,
#[doc(hidden)]
pub ec2_capacities: std::option::Option<std::vec::Vec<crate::model::Ec2Capacity>>,
#[doc(hidden)]
pub power_kva: std::option::Option<f32>,
#[doc(hidden)]
pub weight_lbs: std::option::Option<i32>,
#[doc(hidden)]
pub supported_uplink_gbps: std::option::Option<std::vec::Vec<i32>>,
#[doc(hidden)]
pub supported_storage: std::option::Option<std::vec::Vec<crate::model::SupportedStorageEnum>>,
}
impl CatalogItem {
pub fn catalog_item_id(&self) -> std::option::Option<&str> {
self.catalog_item_id.as_deref()
}
pub fn item_status(&self) -> std::option::Option<&crate::model::CatalogItemStatus> {
self.item_status.as_ref()
}
pub fn ec2_capacities(&self) -> std::option::Option<&[crate::model::Ec2Capacity]> {
self.ec2_capacities.as_deref()
}
pub fn power_kva(&self) -> std::option::Option<f32> {
self.power_kva
}
pub fn weight_lbs(&self) -> std::option::Option<i32> {
self.weight_lbs
}
pub fn supported_uplink_gbps(&self) -> std::option::Option<&[i32]> {
self.supported_uplink_gbps.as_deref()
}
pub fn supported_storage(&self) -> std::option::Option<&[crate::model::SupportedStorageEnum]> {
self.supported_storage.as_deref()
}
}
pub mod catalog_item {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) catalog_item_id: std::option::Option<std::string::String>,
pub(crate) item_status: std::option::Option<crate::model::CatalogItemStatus>,
pub(crate) ec2_capacities: std::option::Option<std::vec::Vec<crate::model::Ec2Capacity>>,
pub(crate) power_kva: std::option::Option<f32>,
pub(crate) weight_lbs: std::option::Option<i32>,
pub(crate) supported_uplink_gbps: std::option::Option<std::vec::Vec<i32>>,
pub(crate) supported_storage:
std::option::Option<std::vec::Vec<crate::model::SupportedStorageEnum>>,
}
impl Builder {
pub fn catalog_item_id(mut self, input: impl Into<std::string::String>) -> Self {
self.catalog_item_id = Some(input.into());
self
}
pub fn set_catalog_item_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.catalog_item_id = input;
self
}
pub fn item_status(mut self, input: crate::model::CatalogItemStatus) -> Self {
self.item_status = Some(input);
self
}
pub fn set_item_status(
mut self,
input: std::option::Option<crate::model::CatalogItemStatus>,
) -> Self {
self.item_status = input;
self
}
pub fn ec2_capacities(mut self, input: crate::model::Ec2Capacity) -> Self {
let mut v = self.ec2_capacities.unwrap_or_default();
v.push(input);
self.ec2_capacities = Some(v);
self
}
pub fn set_ec2_capacities(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Ec2Capacity>>,
) -> Self {
self.ec2_capacities = input;
self
}
pub fn power_kva(mut self, input: f32) -> Self {
self.power_kva = Some(input);
self
}
pub fn set_power_kva(mut self, input: std::option::Option<f32>) -> Self {
self.power_kva = input;
self
}
pub fn weight_lbs(mut self, input: i32) -> Self {
self.weight_lbs = Some(input);
self
}
pub fn set_weight_lbs(mut self, input: std::option::Option<i32>) -> Self {
self.weight_lbs = input;
self
}
pub fn supported_uplink_gbps(mut self, input: i32) -> Self {
let mut v = self.supported_uplink_gbps.unwrap_or_default();
v.push(input);
self.supported_uplink_gbps = Some(v);
self
}
pub fn set_supported_uplink_gbps(
mut self,
input: std::option::Option<std::vec::Vec<i32>>,
) -> Self {
self.supported_uplink_gbps = input;
self
}
pub fn supported_storage(mut self, input: crate::model::SupportedStorageEnum) -> Self {
let mut v = self.supported_storage.unwrap_or_default();
v.push(input);
self.supported_storage = Some(v);
self
}
pub fn set_supported_storage(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::SupportedStorageEnum>>,
) -> Self {
self.supported_storage = input;
self
}
pub fn build(self) -> crate::model::CatalogItem {
crate::model::CatalogItem {
catalog_item_id: self.catalog_item_id,
item_status: self.item_status,
ec2_capacities: self.ec2_capacities,
power_kva: self.power_kva,
weight_lbs: self.weight_lbs,
supported_uplink_gbps: self.supported_uplink_gbps,
supported_storage: self.supported_storage,
}
}
}
}
impl CatalogItem {
pub fn builder() -> crate::model::catalog_item::Builder {
crate::model::catalog_item::Builder::default()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum SupportedStorageEnum {
#[allow(missing_docs)] Ebs,
#[allow(missing_docs)] S3,
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for SupportedStorageEnum {
fn from(s: &str) -> Self {
match s {
"EBS" => SupportedStorageEnum::Ebs,
"S3" => SupportedStorageEnum::S3,
other => {
SupportedStorageEnum::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
}
}
}
}
impl std::str::FromStr for SupportedStorageEnum {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(SupportedStorageEnum::from(s))
}
}
impl SupportedStorageEnum {
pub fn as_str(&self) -> &str {
match self {
SupportedStorageEnum::Ebs => "EBS",
SupportedStorageEnum::S3 => "S3",
SupportedStorageEnum::Unknown(value) => value.as_str(),
}
}
pub const fn values() -> &'static [&'static str] {
&["EBS", "S3"]
}
}
impl AsRef<str> for SupportedStorageEnum {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Ec2Capacity {
#[doc(hidden)]
pub family: std::option::Option<std::string::String>,
#[doc(hidden)]
pub max_size: std::option::Option<std::string::String>,
#[doc(hidden)]
pub quantity: std::option::Option<std::string::String>,
}
impl Ec2Capacity {
pub fn family(&self) -> std::option::Option<&str> {
self.family.as_deref()
}
pub fn max_size(&self) -> std::option::Option<&str> {
self.max_size.as_deref()
}
pub fn quantity(&self) -> std::option::Option<&str> {
self.quantity.as_deref()
}
}
pub mod ec2_capacity {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) family: std::option::Option<std::string::String>,
pub(crate) max_size: std::option::Option<std::string::String>,
pub(crate) quantity: std::option::Option<std::string::String>,
}
impl Builder {
pub fn family(mut self, input: impl Into<std::string::String>) -> Self {
self.family = Some(input.into());
self
}
pub fn set_family(mut self, input: std::option::Option<std::string::String>) -> Self {
self.family = input;
self
}
pub fn max_size(mut self, input: impl Into<std::string::String>) -> Self {
self.max_size = Some(input.into());
self
}
pub fn set_max_size(mut self, input: std::option::Option<std::string::String>) -> Self {
self.max_size = input;
self
}
pub fn quantity(mut self, input: impl Into<std::string::String>) -> Self {
self.quantity = Some(input.into());
self
}
pub fn set_quantity(mut self, input: std::option::Option<std::string::String>) -> Self {
self.quantity = input;
self
}
pub fn build(self) -> crate::model::Ec2Capacity {
crate::model::Ec2Capacity {
family: self.family,
max_size: self.max_size,
quantity: self.quantity,
}
}
}
}
impl Ec2Capacity {
pub fn builder() -> crate::model::ec2_capacity::Builder {
crate::model::ec2_capacity::Builder::default()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum CatalogItemStatus {
#[allow(missing_docs)] Available,
#[allow(missing_docs)] Discontinued,
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for CatalogItemStatus {
fn from(s: &str) -> Self {
match s {
"AVAILABLE" => CatalogItemStatus::Available,
"DISCONTINUED" => CatalogItemStatus::Discontinued,
other => {
CatalogItemStatus::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
}
}
}
}
impl std::str::FromStr for CatalogItemStatus {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(CatalogItemStatus::from(s))
}
}
impl CatalogItemStatus {
pub fn as_str(&self) -> &str {
match self {
CatalogItemStatus::Available => "AVAILABLE",
CatalogItemStatus::Discontinued => "DISCONTINUED",
CatalogItemStatus::Unknown(value) => value.as_str(),
}
}
pub const fn values() -> &'static [&'static str] {
&["AVAILABLE", "DISCONTINUED"]
}
}
impl AsRef<str> for CatalogItemStatus {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum CatalogItemClass {
#[allow(missing_docs)] Rack,
#[allow(missing_docs)] Server,
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for CatalogItemClass {
fn from(s: &str) -> Self {
match s {
"RACK" => CatalogItemClass::Rack,
"SERVER" => CatalogItemClass::Server,
other => CatalogItemClass::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
}
}
}
impl std::str::FromStr for CatalogItemClass {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(CatalogItemClass::from(s))
}
}
impl CatalogItemClass {
pub fn as_str(&self) -> &str {
match self {
CatalogItemClass::Rack => "RACK",
CatalogItemClass::Server => "SERVER",
CatalogItemClass::Unknown(value) => value.as_str(),
}
}
pub const fn values() -> &'static [&'static str] {
&["RACK", "SERVER"]
}
}
impl AsRef<str> for CatalogItemClass {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AssetInfo {
#[doc(hidden)]
pub asset_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub rack_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub asset_type: std::option::Option<crate::model::AssetType>,
#[doc(hidden)]
pub compute_attributes: std::option::Option<crate::model::ComputeAttributes>,
#[doc(hidden)]
pub asset_location: std::option::Option<crate::model::AssetLocation>,
}
impl AssetInfo {
pub fn asset_id(&self) -> std::option::Option<&str> {
self.asset_id.as_deref()
}
pub fn rack_id(&self) -> std::option::Option<&str> {
self.rack_id.as_deref()
}
pub fn asset_type(&self) -> std::option::Option<&crate::model::AssetType> {
self.asset_type.as_ref()
}
pub fn compute_attributes(&self) -> std::option::Option<&crate::model::ComputeAttributes> {
self.compute_attributes.as_ref()
}
pub fn asset_location(&self) -> std::option::Option<&crate::model::AssetLocation> {
self.asset_location.as_ref()
}
}
pub mod asset_info {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) asset_id: std::option::Option<std::string::String>,
pub(crate) rack_id: std::option::Option<std::string::String>,
pub(crate) asset_type: std::option::Option<crate::model::AssetType>,
pub(crate) compute_attributes: std::option::Option<crate::model::ComputeAttributes>,
pub(crate) asset_location: std::option::Option<crate::model::AssetLocation>,
}
impl Builder {
pub fn asset_id(mut self, input: impl Into<std::string::String>) -> Self {
self.asset_id = Some(input.into());
self
}
pub fn set_asset_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.asset_id = input;
self
}
pub fn rack_id(mut self, input: impl Into<std::string::String>) -> Self {
self.rack_id = Some(input.into());
self
}
pub fn set_rack_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.rack_id = input;
self
}
pub fn asset_type(mut self, input: crate::model::AssetType) -> Self {
self.asset_type = Some(input);
self
}
pub fn set_asset_type(
mut self,
input: std::option::Option<crate::model::AssetType>,
) -> Self {
self.asset_type = input;
self
}
pub fn compute_attributes(mut self, input: crate::model::ComputeAttributes) -> Self {
self.compute_attributes = Some(input);
self
}
pub fn set_compute_attributes(
mut self,
input: std::option::Option<crate::model::ComputeAttributes>,
) -> Self {
self.compute_attributes = input;
self
}
pub fn asset_location(mut self, input: crate::model::AssetLocation) -> Self {
self.asset_location = Some(input);
self
}
pub fn set_asset_location(
mut self,
input: std::option::Option<crate::model::AssetLocation>,
) -> Self {
self.asset_location = input;
self
}
pub fn build(self) -> crate::model::AssetInfo {
crate::model::AssetInfo {
asset_id: self.asset_id,
rack_id: self.rack_id,
asset_type: self.asset_type,
compute_attributes: self.compute_attributes,
asset_location: self.asset_location,
}
}
}
}
impl AssetInfo {
pub fn builder() -> crate::model::asset_info::Builder {
crate::model::asset_info::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AssetLocation {
#[doc(hidden)]
pub rack_elevation: std::option::Option<f32>,
}
impl AssetLocation {
pub fn rack_elevation(&self) -> std::option::Option<f32> {
self.rack_elevation
}
}
pub mod asset_location {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) rack_elevation: std::option::Option<f32>,
}
impl Builder {
pub fn rack_elevation(mut self, input: f32) -> Self {
self.rack_elevation = Some(input);
self
}
pub fn set_rack_elevation(mut self, input: std::option::Option<f32>) -> Self {
self.rack_elevation = input;
self
}
pub fn build(self) -> crate::model::AssetLocation {
crate::model::AssetLocation {
rack_elevation: self.rack_elevation,
}
}
}
}
impl AssetLocation {
pub fn builder() -> crate::model::asset_location::Builder {
crate::model::asset_location::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ComputeAttributes {
#[doc(hidden)]
pub host_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub state: std::option::Option<crate::model::ComputeAssetState>,
}
impl ComputeAttributes {
pub fn host_id(&self) -> std::option::Option<&str> {
self.host_id.as_deref()
}
pub fn state(&self) -> std::option::Option<&crate::model::ComputeAssetState> {
self.state.as_ref()
}
}
pub mod compute_attributes {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) host_id: std::option::Option<std::string::String>,
pub(crate) state: std::option::Option<crate::model::ComputeAssetState>,
}
impl Builder {
pub fn host_id(mut self, input: impl Into<std::string::String>) -> Self {
self.host_id = Some(input.into());
self
}
pub fn set_host_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.host_id = input;
self
}
pub fn state(mut self, input: crate::model::ComputeAssetState) -> Self {
self.state = Some(input);
self
}
pub fn set_state(
mut self,
input: std::option::Option<crate::model::ComputeAssetState>,
) -> Self {
self.state = input;
self
}
pub fn build(self) -> crate::model::ComputeAttributes {
crate::model::ComputeAttributes {
host_id: self.host_id,
state: self.state,
}
}
}
}
impl ComputeAttributes {
pub fn builder() -> crate::model::compute_attributes::Builder {
crate::model::compute_attributes::Builder::default()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum ComputeAssetState {
#[allow(missing_docs)] Active,
#[allow(missing_docs)] Isolated,
#[allow(missing_docs)] Retiring,
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for ComputeAssetState {
fn from(s: &str) -> Self {
match s {
"ACTIVE" => ComputeAssetState::Active,
"ISOLATED" => ComputeAssetState::Isolated,
"RETIRING" => ComputeAssetState::Retiring,
other => {
ComputeAssetState::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
}
}
}
}
impl std::str::FromStr for ComputeAssetState {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ComputeAssetState::from(s))
}
}
impl ComputeAssetState {
pub fn as_str(&self) -> &str {
match self {
ComputeAssetState::Active => "ACTIVE",
ComputeAssetState::Isolated => "ISOLATED",
ComputeAssetState::Retiring => "RETIRING",
ComputeAssetState::Unknown(value) => value.as_str(),
}
}
pub const fn values() -> &'static [&'static str] {
&["ACTIVE", "ISOLATED", "RETIRING"]
}
}
impl AsRef<str> for ComputeAssetState {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum AssetType {
#[allow(missing_docs)] Compute,
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for AssetType {
fn from(s: &str) -> Self {
match s {
"COMPUTE" => AssetType::Compute,
other => AssetType::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
}
}
}
impl std::str::FromStr for AssetType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(AssetType::from(s))
}
}
impl AssetType {
pub fn as_str(&self) -> &str {
match self {
AssetType::Compute => "COMPUTE",
AssetType::Unknown(value) => value.as_str(),
}
}
pub const fn values() -> &'static [&'static str] {
&["COMPUTE"]
}
}
impl AsRef<str> for AssetType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum AssetState {
#[allow(missing_docs)] Active,
#[allow(missing_docs)] Retiring,
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for AssetState {
fn from(s: &str) -> Self {
match s {
"ACTIVE" => AssetState::Active,
"RETIRING" => AssetState::Retiring,
other => AssetState::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
}
}
}
impl std::str::FromStr for AssetState {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(AssetState::from(s))
}
}
impl AssetState {
pub fn as_str(&self) -> &str {
match self {
AssetState::Active => "ACTIVE",
AssetState::Retiring => "RETIRING",
AssetState::Unknown(value) => value.as_str(),
}
}
pub const fn values() -> &'static [&'static str] {
&["ACTIVE", "RETIRING"]
}
}
impl AsRef<str> for AssetState {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InstanceTypeItem {
#[doc(hidden)]
pub instance_type: std::option::Option<std::string::String>,
}
impl InstanceTypeItem {
pub fn instance_type(&self) -> std::option::Option<&str> {
self.instance_type.as_deref()
}
}
pub mod instance_type_item {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) instance_type: std::option::Option<std::string::String>,
}
impl Builder {
pub fn instance_type(mut self, input: impl Into<std::string::String>) -> Self {
self.instance_type = Some(input.into());
self
}
pub fn set_instance_type(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.instance_type = input;
self
}
pub fn build(self) -> crate::model::InstanceTypeItem {
crate::model::InstanceTypeItem {
instance_type: self.instance_type,
}
}
}
}
impl InstanceTypeItem {
pub fn builder() -> crate::model::instance_type_item::Builder {
crate::model::instance_type_item::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Order {
#[doc(hidden)]
pub outpost_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub order_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub status: std::option::Option<crate::model::OrderStatus>,
#[doc(hidden)]
pub line_items: std::option::Option<std::vec::Vec<crate::model::LineItem>>,
#[doc(hidden)]
pub payment_option: std::option::Option<crate::model::PaymentOption>,
#[doc(hidden)]
pub order_submission_date: std::option::Option<aws_smithy_types::DateTime>,
#[doc(hidden)]
pub order_fulfilled_date: std::option::Option<aws_smithy_types::DateTime>,
}
impl Order {
pub fn outpost_id(&self) -> std::option::Option<&str> {
self.outpost_id.as_deref()
}
pub fn order_id(&self) -> std::option::Option<&str> {
self.order_id.as_deref()
}
pub fn status(&self) -> std::option::Option<&crate::model::OrderStatus> {
self.status.as_ref()
}
pub fn line_items(&self) -> std::option::Option<&[crate::model::LineItem]> {
self.line_items.as_deref()
}
pub fn payment_option(&self) -> std::option::Option<&crate::model::PaymentOption> {
self.payment_option.as_ref()
}
pub fn order_submission_date(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.order_submission_date.as_ref()
}
pub fn order_fulfilled_date(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.order_fulfilled_date.as_ref()
}
}
pub mod order {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) outpost_id: std::option::Option<std::string::String>,
pub(crate) order_id: std::option::Option<std::string::String>,
pub(crate) status: std::option::Option<crate::model::OrderStatus>,
pub(crate) line_items: std::option::Option<std::vec::Vec<crate::model::LineItem>>,
pub(crate) payment_option: std::option::Option<crate::model::PaymentOption>,
pub(crate) order_submission_date: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) order_fulfilled_date: std::option::Option<aws_smithy_types::DateTime>,
}
impl Builder {
pub fn outpost_id(mut self, input: impl Into<std::string::String>) -> Self {
self.outpost_id = Some(input.into());
self
}
pub fn set_outpost_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.outpost_id = input;
self
}
pub fn order_id(mut self, input: impl Into<std::string::String>) -> Self {
self.order_id = Some(input.into());
self
}
pub fn set_order_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.order_id = input;
self
}
pub fn status(mut self, input: crate::model::OrderStatus) -> Self {
self.status = Some(input);
self
}
pub fn set_status(mut self, input: std::option::Option<crate::model::OrderStatus>) -> Self {
self.status = input;
self
}
pub fn line_items(mut self, input: crate::model::LineItem) -> Self {
let mut v = self.line_items.unwrap_or_default();
v.push(input);
self.line_items = Some(v);
self
}
pub fn set_line_items(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::LineItem>>,
) -> Self {
self.line_items = input;
self
}
pub fn payment_option(mut self, input: crate::model::PaymentOption) -> Self {
self.payment_option = Some(input);
self
}
pub fn set_payment_option(
mut self,
input: std::option::Option<crate::model::PaymentOption>,
) -> Self {
self.payment_option = input;
self
}
pub fn order_submission_date(mut self, input: aws_smithy_types::DateTime) -> Self {
self.order_submission_date = Some(input);
self
}
pub fn set_order_submission_date(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.order_submission_date = input;
self
}
pub fn order_fulfilled_date(mut self, input: aws_smithy_types::DateTime) -> Self {
self.order_fulfilled_date = Some(input);
self
}
pub fn set_order_fulfilled_date(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.order_fulfilled_date = input;
self
}
pub fn build(self) -> crate::model::Order {
crate::model::Order {
outpost_id: self.outpost_id,
order_id: self.order_id,
status: self.status,
line_items: self.line_items,
payment_option: self.payment_option,
order_submission_date: self.order_submission_date,
order_fulfilled_date: self.order_fulfilled_date,
}
}
}
}
impl Order {
pub fn builder() -> crate::model::order::Builder {
crate::model::order::Builder::default()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum PaymentOption {
#[allow(missing_docs)] AllUpfront,
#[allow(missing_docs)] NoUpfront,
#[allow(missing_docs)] PartialUpfront,
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for PaymentOption {
fn from(s: &str) -> Self {
match s {
"ALL_UPFRONT" => PaymentOption::AllUpfront,
"NO_UPFRONT" => PaymentOption::NoUpfront,
"PARTIAL_UPFRONT" => PaymentOption::PartialUpfront,
other => PaymentOption::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
}
}
}
impl std::str::FromStr for PaymentOption {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(PaymentOption::from(s))
}
}
impl PaymentOption {
pub fn as_str(&self) -> &str {
match self {
PaymentOption::AllUpfront => "ALL_UPFRONT",
PaymentOption::NoUpfront => "NO_UPFRONT",
PaymentOption::PartialUpfront => "PARTIAL_UPFRONT",
PaymentOption::Unknown(value) => value.as_str(),
}
}
pub const fn values() -> &'static [&'static str] {
&["ALL_UPFRONT", "NO_UPFRONT", "PARTIAL_UPFRONT"]
}
}
impl AsRef<str> for PaymentOption {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LineItem {
#[doc(hidden)]
pub catalog_item_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub line_item_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub quantity: i32,
#[doc(hidden)]
pub status: std::option::Option<crate::model::LineItemStatus>,
#[doc(hidden)]
pub shipment_information: std::option::Option<crate::model::ShipmentInformation>,
#[doc(hidden)]
pub asset_information_list:
std::option::Option<std::vec::Vec<crate::model::LineItemAssetInformation>>,
}
impl LineItem {
pub fn catalog_item_id(&self) -> std::option::Option<&str> {
self.catalog_item_id.as_deref()
}
pub fn line_item_id(&self) -> std::option::Option<&str> {
self.line_item_id.as_deref()
}
pub fn quantity(&self) -> i32 {
self.quantity
}
pub fn status(&self) -> std::option::Option<&crate::model::LineItemStatus> {
self.status.as_ref()
}
pub fn shipment_information(&self) -> std::option::Option<&crate::model::ShipmentInformation> {
self.shipment_information.as_ref()
}
pub fn asset_information_list(
&self,
) -> std::option::Option<&[crate::model::LineItemAssetInformation]> {
self.asset_information_list.as_deref()
}
}
pub mod line_item {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) catalog_item_id: std::option::Option<std::string::String>,
pub(crate) line_item_id: std::option::Option<std::string::String>,
pub(crate) quantity: std::option::Option<i32>,
pub(crate) status: std::option::Option<crate::model::LineItemStatus>,
pub(crate) shipment_information: std::option::Option<crate::model::ShipmentInformation>,
pub(crate) asset_information_list:
std::option::Option<std::vec::Vec<crate::model::LineItemAssetInformation>>,
}
impl Builder {
pub fn catalog_item_id(mut self, input: impl Into<std::string::String>) -> Self {
self.catalog_item_id = Some(input.into());
self
}
pub fn set_catalog_item_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.catalog_item_id = input;
self
}
pub fn line_item_id(mut self, input: impl Into<std::string::String>) -> Self {
self.line_item_id = Some(input.into());
self
}
pub fn set_line_item_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.line_item_id = input;
self
}
pub fn quantity(mut self, input: i32) -> Self {
self.quantity = Some(input);
self
}
pub fn set_quantity(mut self, input: std::option::Option<i32>) -> Self {
self.quantity = input;
self
}
pub fn status(mut self, input: crate::model::LineItemStatus) -> Self {
self.status = Some(input);
self
}
pub fn set_status(
mut self,
input: std::option::Option<crate::model::LineItemStatus>,
) -> Self {
self.status = input;
self
}
pub fn shipment_information(mut self, input: crate::model::ShipmentInformation) -> Self {
self.shipment_information = Some(input);
self
}
pub fn set_shipment_information(
mut self,
input: std::option::Option<crate::model::ShipmentInformation>,
) -> Self {
self.shipment_information = input;
self
}
pub fn asset_information_list(
mut self,
input: crate::model::LineItemAssetInformation,
) -> Self {
let mut v = self.asset_information_list.unwrap_or_default();
v.push(input);
self.asset_information_list = Some(v);
self
}
pub fn set_asset_information_list(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::LineItemAssetInformation>>,
) -> Self {
self.asset_information_list = input;
self
}
pub fn build(self) -> crate::model::LineItem {
crate::model::LineItem {
catalog_item_id: self.catalog_item_id,
line_item_id: self.line_item_id,
quantity: self.quantity.unwrap_or_default(),
status: self.status,
shipment_information: self.shipment_information,
asset_information_list: self.asset_information_list,
}
}
}
}
impl LineItem {
pub fn builder() -> crate::model::line_item::Builder {
crate::model::line_item::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LineItemAssetInformation {
#[doc(hidden)]
pub asset_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub mac_address_list: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl LineItemAssetInformation {
pub fn asset_id(&self) -> std::option::Option<&str> {
self.asset_id.as_deref()
}
pub fn mac_address_list(&self) -> std::option::Option<&[std::string::String]> {
self.mac_address_list.as_deref()
}
}
pub mod line_item_asset_information {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) asset_id: std::option::Option<std::string::String>,
pub(crate) mac_address_list: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl Builder {
pub fn asset_id(mut self, input: impl Into<std::string::String>) -> Self {
self.asset_id = Some(input.into());
self
}
pub fn set_asset_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.asset_id = input;
self
}
pub fn mac_address_list(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.mac_address_list.unwrap_or_default();
v.push(input.into());
self.mac_address_list = Some(v);
self
}
pub fn set_mac_address_list(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.mac_address_list = input;
self
}
pub fn build(self) -> crate::model::LineItemAssetInformation {
crate::model::LineItemAssetInformation {
asset_id: self.asset_id,
mac_address_list: self.mac_address_list,
}
}
}
}
impl LineItemAssetInformation {
pub fn builder() -> crate::model::line_item_asset_information::Builder {
crate::model::line_item_asset_information::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ShipmentInformation {
#[doc(hidden)]
pub shipment_tracking_number: std::option::Option<std::string::String>,
#[doc(hidden)]
pub shipment_carrier: std::option::Option<crate::model::ShipmentCarrier>,
}
impl ShipmentInformation {
pub fn shipment_tracking_number(&self) -> std::option::Option<&str> {
self.shipment_tracking_number.as_deref()
}
pub fn shipment_carrier(&self) -> std::option::Option<&crate::model::ShipmentCarrier> {
self.shipment_carrier.as_ref()
}
}
pub mod shipment_information {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) shipment_tracking_number: std::option::Option<std::string::String>,
pub(crate) shipment_carrier: std::option::Option<crate::model::ShipmentCarrier>,
}
impl Builder {
pub fn shipment_tracking_number(mut self, input: impl Into<std::string::String>) -> Self {
self.shipment_tracking_number = Some(input.into());
self
}
pub fn set_shipment_tracking_number(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.shipment_tracking_number = input;
self
}
pub fn shipment_carrier(mut self, input: crate::model::ShipmentCarrier) -> Self {
self.shipment_carrier = Some(input);
self
}
pub fn set_shipment_carrier(
mut self,
input: std::option::Option<crate::model::ShipmentCarrier>,
) -> Self {
self.shipment_carrier = input;
self
}
pub fn build(self) -> crate::model::ShipmentInformation {
crate::model::ShipmentInformation {
shipment_tracking_number: self.shipment_tracking_number,
shipment_carrier: self.shipment_carrier,
}
}
}
}
impl ShipmentInformation {
pub fn builder() -> crate::model::shipment_information::Builder {
crate::model::shipment_information::Builder::default()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum ShipmentCarrier {
#[allow(missing_docs)] Dbs,
#[allow(missing_docs)] Dhl,
#[allow(missing_docs)] Fedex,
#[allow(missing_docs)] Ups,
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for ShipmentCarrier {
fn from(s: &str) -> Self {
match s {
"DBS" => ShipmentCarrier::Dbs,
"DHL" => ShipmentCarrier::Dhl,
"FEDEX" => ShipmentCarrier::Fedex,
"UPS" => ShipmentCarrier::Ups,
other => ShipmentCarrier::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
}
}
}
impl std::str::FromStr for ShipmentCarrier {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ShipmentCarrier::from(s))
}
}
impl ShipmentCarrier {
pub fn as_str(&self) -> &str {
match self {
ShipmentCarrier::Dbs => "DBS",
ShipmentCarrier::Dhl => "DHL",
ShipmentCarrier::Fedex => "FEDEX",
ShipmentCarrier::Ups => "UPS",
ShipmentCarrier::Unknown(value) => value.as_str(),
}
}
pub const fn values() -> &'static [&'static str] {
&["DBS", "DHL", "FEDEX", "UPS"]
}
}
impl AsRef<str> for ShipmentCarrier {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ConnectionDetails {
#[doc(hidden)]
pub client_public_key: std::option::Option<std::string::String>,
#[doc(hidden)]
pub server_public_key: std::option::Option<std::string::String>,
#[doc(hidden)]
pub server_endpoint: std::option::Option<std::string::String>,
#[doc(hidden)]
pub client_tunnel_address: std::option::Option<std::string::String>,
#[doc(hidden)]
pub server_tunnel_address: std::option::Option<std::string::String>,
#[doc(hidden)]
pub allowed_ips: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl ConnectionDetails {
pub fn client_public_key(&self) -> std::option::Option<&str> {
self.client_public_key.as_deref()
}
pub fn server_public_key(&self) -> std::option::Option<&str> {
self.server_public_key.as_deref()
}
pub fn server_endpoint(&self) -> std::option::Option<&str> {
self.server_endpoint.as_deref()
}
pub fn client_tunnel_address(&self) -> std::option::Option<&str> {
self.client_tunnel_address.as_deref()
}
pub fn server_tunnel_address(&self) -> std::option::Option<&str> {
self.server_tunnel_address.as_deref()
}
pub fn allowed_ips(&self) -> std::option::Option<&[std::string::String]> {
self.allowed_ips.as_deref()
}
}
pub mod connection_details {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) client_public_key: std::option::Option<std::string::String>,
pub(crate) server_public_key: std::option::Option<std::string::String>,
pub(crate) server_endpoint: std::option::Option<std::string::String>,
pub(crate) client_tunnel_address: std::option::Option<std::string::String>,
pub(crate) server_tunnel_address: std::option::Option<std::string::String>,
pub(crate) allowed_ips: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl Builder {
pub fn client_public_key(mut self, input: impl Into<std::string::String>) -> Self {
self.client_public_key = Some(input.into());
self
}
pub fn set_client_public_key(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.client_public_key = input;
self
}
pub fn server_public_key(mut self, input: impl Into<std::string::String>) -> Self {
self.server_public_key = Some(input.into());
self
}
pub fn set_server_public_key(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.server_public_key = input;
self
}
pub fn server_endpoint(mut self, input: impl Into<std::string::String>) -> Self {
self.server_endpoint = Some(input.into());
self
}
pub fn set_server_endpoint(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.server_endpoint = input;
self
}
pub fn client_tunnel_address(mut self, input: impl Into<std::string::String>) -> Self {
self.client_tunnel_address = Some(input.into());
self
}
pub fn set_client_tunnel_address(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.client_tunnel_address = input;
self
}
pub fn server_tunnel_address(mut self, input: impl Into<std::string::String>) -> Self {
self.server_tunnel_address = Some(input.into());
self
}
pub fn set_server_tunnel_address(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.server_tunnel_address = input;
self
}
pub fn allowed_ips(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.allowed_ips.unwrap_or_default();
v.push(input.into());
self.allowed_ips = Some(v);
self
}
pub fn set_allowed_ips(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.allowed_ips = input;
self
}
pub fn build(self) -> crate::model::ConnectionDetails {
crate::model::ConnectionDetails {
client_public_key: self.client_public_key,
server_public_key: self.server_public_key,
server_endpoint: self.server_endpoint,
client_tunnel_address: self.client_tunnel_address,
server_tunnel_address: self.server_tunnel_address,
allowed_ips: self.allowed_ips,
}
}
}
}
impl ConnectionDetails {
pub fn builder() -> crate::model::connection_details::Builder {
crate::model::connection_details::Builder::default()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum PaymentTerm {
#[allow(missing_docs)] OneYear,
#[allow(missing_docs)] ThreeYears,
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for PaymentTerm {
fn from(s: &str) -> Self {
match s {
"ONE_YEAR" => PaymentTerm::OneYear,
"THREE_YEARS" => PaymentTerm::ThreeYears,
other => PaymentTerm::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
}
}
}
impl std::str::FromStr for PaymentTerm {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(PaymentTerm::from(s))
}
}
impl PaymentTerm {
pub fn as_str(&self) -> &str {
match self {
PaymentTerm::OneYear => "ONE_YEAR",
PaymentTerm::ThreeYears => "THREE_YEARS",
PaymentTerm::Unknown(value) => value.as_str(),
}
}
pub const fn values() -> &'static [&'static str] {
&["ONE_YEAR", "THREE_YEARS"]
}
}
impl AsRef<str> for PaymentTerm {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LineItemRequest {
#[doc(hidden)]
pub catalog_item_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub quantity: i32,
}
impl LineItemRequest {
pub fn catalog_item_id(&self) -> std::option::Option<&str> {
self.catalog_item_id.as_deref()
}
pub fn quantity(&self) -> i32 {
self.quantity
}
}
pub mod line_item_request {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) catalog_item_id: std::option::Option<std::string::String>,
pub(crate) quantity: std::option::Option<i32>,
}
impl Builder {
pub fn catalog_item_id(mut self, input: impl Into<std::string::String>) -> Self {
self.catalog_item_id = Some(input.into());
self
}
pub fn set_catalog_item_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.catalog_item_id = input;
self
}
pub fn quantity(mut self, input: i32) -> Self {
self.quantity = Some(input);
self
}
pub fn set_quantity(mut self, input: std::option::Option<i32>) -> Self {
self.quantity = input;
self
}
pub fn build(self) -> crate::model::LineItemRequest {
crate::model::LineItemRequest {
catalog_item_id: self.catalog_item_id,
quantity: self.quantity.unwrap_or_default(),
}
}
}
}
impl LineItemRequest {
pub fn builder() -> crate::model::line_item_request::Builder {
crate::model::line_item_request::Builder::default()
}
}