aws-sdk-ec2 0.24.0

AWS SDK for Amazon Elastic Compute Cloud
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Information about an address range that is provisioned for use with your Amazon Web Services resources through bring your own IP addresses (BYOIP).</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ByoipCidr {
    /// <p>The address range, in CIDR notation.</p>
    #[doc(hidden)]
    pub cidr: std::option::Option<std::string::String>,
    /// <p>The description of the address range.</p>
    #[doc(hidden)]
    pub description: std::option::Option<std::string::String>,
    /// <p>Upon success, contains the ID of the address pool. Otherwise, contains an error message.</p>
    #[doc(hidden)]
    pub status_message: std::option::Option<std::string::String>,
    /// <p>The state of the address pool.</p>
    #[doc(hidden)]
    pub state: std::option::Option<crate::model::ByoipCidrState>,
}
impl ByoipCidr {
    /// <p>The address range, in CIDR notation.</p>
    pub fn cidr(&self) -> std::option::Option<&str> {
        self.cidr.as_deref()
    }
    /// <p>The description of the address range.</p>
    pub fn description(&self) -> std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>Upon success, contains the ID of the address pool. Otherwise, contains an error message.</p>
    pub fn status_message(&self) -> std::option::Option<&str> {
        self.status_message.as_deref()
    }
    /// <p>The state of the address pool.</p>
    pub fn state(&self) -> std::option::Option<&crate::model::ByoipCidrState> {
        self.state.as_ref()
    }
}
/// See [`ByoipCidr`](crate::model::ByoipCidr).
pub mod byoip_cidr {

    /// A builder for [`ByoipCidr`](crate::model::ByoipCidr).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) cidr: std::option::Option<std::string::String>,
        pub(crate) description: std::option::Option<std::string::String>,
        pub(crate) status_message: std::option::Option<std::string::String>,
        pub(crate) state: std::option::Option<crate::model::ByoipCidrState>,
    }
    impl Builder {
        /// <p>The address range, in CIDR notation.</p>
        pub fn cidr(mut self, input: impl Into<std::string::String>) -> Self {
            self.cidr = Some(input.into());
            self
        }
        /// <p>The address range, in CIDR notation.</p>
        pub fn set_cidr(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.cidr = input;
            self
        }
        /// <p>The description of the address range.</p>
        pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
            self.description = Some(input.into());
            self
        }
        /// <p>The description of the address range.</p>
        pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.description = input;
            self
        }
        /// <p>Upon success, contains the ID of the address pool. Otherwise, contains an error message.</p>
        pub fn status_message(mut self, input: impl Into<std::string::String>) -> Self {
            self.status_message = Some(input.into());
            self
        }
        /// <p>Upon success, contains the ID of the address pool. Otherwise, contains an error message.</p>
        pub fn set_status_message(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.status_message = input;
            self
        }
        /// <p>The state of the address pool.</p>
        pub fn state(mut self, input: crate::model::ByoipCidrState) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>The state of the address pool.</p>
        pub fn set_state(
            mut self,
            input: std::option::Option<crate::model::ByoipCidrState>,
        ) -> Self {
            self.state = input;
            self
        }
        /// Consumes the builder and constructs a [`ByoipCidr`](crate::model::ByoipCidr).
        pub fn build(self) -> crate::model::ByoipCidr {
            crate::model::ByoipCidr {
                cidr: self.cidr,
                description: self.description,
                status_message: self.status_message,
                state: self.state,
            }
        }
    }
}
impl ByoipCidr {
    /// Creates a new builder-style object to manufacture [`ByoipCidr`](crate::model::ByoipCidr).
    pub fn builder() -> crate::model::byoip_cidr::Builder {
        crate::model::byoip_cidr::Builder::default()
    }
}

/// When writing a match expression against `ByoipCidrState`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let byoipcidrstate = unimplemented!();
/// match byoipcidrstate {
///     ByoipCidrState::Advertised => { /* ... */ },
///     ByoipCidrState::Deprovisioned => { /* ... */ },
///     ByoipCidrState::FailedDeprovision => { /* ... */ },
///     ByoipCidrState::FailedProvision => { /* ... */ },
///     ByoipCidrState::PendingDeprovision => { /* ... */ },
///     ByoipCidrState::PendingProvision => { /* ... */ },
///     ByoipCidrState::Provisioned => { /* ... */ },
///     ByoipCidrState::ProvisionedNotPubliclyAdvertisable => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `byoipcidrstate` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `ByoipCidrState::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `ByoipCidrState::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `ByoipCidrState::NewFeature` is defined.
/// Specifically, when `byoipcidrstate` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `ByoipCidrState::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 ByoipCidrState {
    #[allow(missing_docs)] // documentation missing in model
    Advertised,
    #[allow(missing_docs)] // documentation missing in model
    Deprovisioned,
    #[allow(missing_docs)] // documentation missing in model
    FailedDeprovision,
    #[allow(missing_docs)] // documentation missing in model
    FailedProvision,
    #[allow(missing_docs)] // documentation missing in model
    PendingDeprovision,
    #[allow(missing_docs)] // documentation missing in model
    PendingProvision,
    #[allow(missing_docs)] // documentation missing in model
    Provisioned,
    #[allow(missing_docs)] // documentation missing in model
    ProvisionedNotPubliclyAdvertisable,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for ByoipCidrState {
    fn from(s: &str) -> Self {
        match s {
            "advertised" => ByoipCidrState::Advertised,
            "deprovisioned" => ByoipCidrState::Deprovisioned,
            "failed-deprovision" => ByoipCidrState::FailedDeprovision,
            "failed-provision" => ByoipCidrState::FailedProvision,
            "pending-deprovision" => ByoipCidrState::PendingDeprovision,
            "pending-provision" => ByoipCidrState::PendingProvision,
            "provisioned" => ByoipCidrState::Provisioned,
            "provisioned-not-publicly-advertisable" => {
                ByoipCidrState::ProvisionedNotPubliclyAdvertisable
            }
            other => ByoipCidrState::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for ByoipCidrState {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(ByoipCidrState::from(s))
    }
}
impl ByoipCidrState {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            ByoipCidrState::Advertised => "advertised",
            ByoipCidrState::Deprovisioned => "deprovisioned",
            ByoipCidrState::FailedDeprovision => "failed-deprovision",
            ByoipCidrState::FailedProvision => "failed-provision",
            ByoipCidrState::PendingDeprovision => "pending-deprovision",
            ByoipCidrState::PendingProvision => "pending-provision",
            ByoipCidrState::Provisioned => "provisioned",
            ByoipCidrState::ProvisionedNotPubliclyAdvertisable => {
                "provisioned-not-publicly-advertisable"
            }
            ByoipCidrState::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &[
            "advertised",
            "deprovisioned",
            "failed-deprovision",
            "failed-provision",
            "pending-deprovision",
            "pending-provision",
            "provisioned",
            "provisioned-not-publicly-advertisable",
        ]
    }
}
impl AsRef<str> for ByoipCidrState {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes the description of a security group rule.</p>
/// <p>You can use this when you want to update the security group rule description for either an inbound or outbound rule.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SecurityGroupRuleDescription {
    /// <p>The ID of the security group rule.</p>
    #[doc(hidden)]
    pub security_group_rule_id: std::option::Option<std::string::String>,
    /// <p>The description of the security group rule.</p>
    #[doc(hidden)]
    pub description: std::option::Option<std::string::String>,
}
impl SecurityGroupRuleDescription {
    /// <p>The ID of the security group rule.</p>
    pub fn security_group_rule_id(&self) -> std::option::Option<&str> {
        self.security_group_rule_id.as_deref()
    }
    /// <p>The description of the security group rule.</p>
    pub fn description(&self) -> std::option::Option<&str> {
        self.description.as_deref()
    }
}
/// See [`SecurityGroupRuleDescription`](crate::model::SecurityGroupRuleDescription).
pub mod security_group_rule_description {

    /// A builder for [`SecurityGroupRuleDescription`](crate::model::SecurityGroupRuleDescription).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) security_group_rule_id: std::option::Option<std::string::String>,
        pub(crate) description: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The ID of the security group rule.</p>
        pub fn security_group_rule_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.security_group_rule_id = Some(input.into());
            self
        }
        /// <p>The ID of the security group rule.</p>
        pub fn set_security_group_rule_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.security_group_rule_id = input;
            self
        }
        /// <p>The description of the security group rule.</p>
        pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
            self.description = Some(input.into());
            self
        }
        /// <p>The description of the security group rule.</p>
        pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.description = input;
            self
        }
        /// Consumes the builder and constructs a [`SecurityGroupRuleDescription`](crate::model::SecurityGroupRuleDescription).
        pub fn build(self) -> crate::model::SecurityGroupRuleDescription {
            crate::model::SecurityGroupRuleDescription {
                security_group_rule_id: self.security_group_rule_id,
                description: self.description,
            }
        }
    }
}
impl SecurityGroupRuleDescription {
    /// Creates a new builder-style object to manufacture [`SecurityGroupRuleDescription`](crate::model::SecurityGroupRuleDescription).
    pub fn builder() -> crate::model::security_group_rule_description::Builder {
        crate::model::security_group_rule_description::Builder::default()
    }
}

/// <p>Describes a set of permissions for a security group rule.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct IpPermission {
    /// <p>If the protocol is TCP or UDP, this is the start of the port range. If the protocol is ICMP or ICMPv6, this is the type number. A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all ICMP/ICMPv6 codes.</p>
    #[doc(hidden)]
    pub from_port: std::option::Option<i32>,
    /// <p>The IP protocol name (<code>tcp</code>, <code>udp</code>, <code>icmp</code>, <code>icmpv6</code>) or number (see <a href="http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml">Protocol Numbers</a>).</p>
    /// <p>[VPC only] Use <code>-1</code> to specify all protocols. When authorizing security group rules, specifying <code>-1</code> or a protocol number other than <code>tcp</code>, <code>udp</code>, <code>icmp</code>, or <code>icmpv6</code> allows traffic on all ports, regardless of any port range you specify. For <code>tcp</code>, <code>udp</code>, and <code>icmp</code>, you must specify a port range. For <code>icmpv6</code>, the port range is optional; if you omit the port range, traffic for all types and codes is allowed.</p>
    #[doc(hidden)]
    pub ip_protocol: std::option::Option<std::string::String>,
    /// <p>The IPv4 ranges.</p>
    #[doc(hidden)]
    pub ip_ranges: std::option::Option<std::vec::Vec<crate::model::IpRange>>,
    /// <p>[VPC only] The IPv6 ranges.</p>
    #[doc(hidden)]
    pub ipv6_ranges: std::option::Option<std::vec::Vec<crate::model::Ipv6Range>>,
    /// <p>[VPC only] The prefix list IDs.</p>
    #[doc(hidden)]
    pub prefix_list_ids: std::option::Option<std::vec::Vec<crate::model::PrefixListId>>,
    /// <p>If the protocol is TCP or UDP, this is the end of the port range. If the protocol is ICMP or ICMPv6, this is the code. A value of -1 indicates all ICMP/ICMPv6 codes. If you specify all ICMP/ICMPv6 types, you must specify all ICMP/ICMPv6 codes.</p>
    #[doc(hidden)]
    pub to_port: std::option::Option<i32>,
    /// <p>The security group and Amazon Web Services account ID pairs.</p>
    #[doc(hidden)]
    pub user_id_group_pairs: std::option::Option<std::vec::Vec<crate::model::UserIdGroupPair>>,
}
impl IpPermission {
    /// <p>If the protocol is TCP or UDP, this is the start of the port range. If the protocol is ICMP or ICMPv6, this is the type number. A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all ICMP/ICMPv6 codes.</p>
    pub fn from_port(&self) -> std::option::Option<i32> {
        self.from_port
    }
    /// <p>The IP protocol name (<code>tcp</code>, <code>udp</code>, <code>icmp</code>, <code>icmpv6</code>) or number (see <a href="http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml">Protocol Numbers</a>).</p>
    /// <p>[VPC only] Use <code>-1</code> to specify all protocols. When authorizing security group rules, specifying <code>-1</code> or a protocol number other than <code>tcp</code>, <code>udp</code>, <code>icmp</code>, or <code>icmpv6</code> allows traffic on all ports, regardless of any port range you specify. For <code>tcp</code>, <code>udp</code>, and <code>icmp</code>, you must specify a port range. For <code>icmpv6</code>, the port range is optional; if you omit the port range, traffic for all types and codes is allowed.</p>
    pub fn ip_protocol(&self) -> std::option::Option<&str> {
        self.ip_protocol.as_deref()
    }
    /// <p>The IPv4 ranges.</p>
    pub fn ip_ranges(&self) -> std::option::Option<&[crate::model::IpRange]> {
        self.ip_ranges.as_deref()
    }
    /// <p>[VPC only] The IPv6 ranges.</p>
    pub fn ipv6_ranges(&self) -> std::option::Option<&[crate::model::Ipv6Range]> {
        self.ipv6_ranges.as_deref()
    }
    /// <p>[VPC only] The prefix list IDs.</p>
    pub fn prefix_list_ids(&self) -> std::option::Option<&[crate::model::PrefixListId]> {
        self.prefix_list_ids.as_deref()
    }
    /// <p>If the protocol is TCP or UDP, this is the end of the port range. If the protocol is ICMP or ICMPv6, this is the code. A value of -1 indicates all ICMP/ICMPv6 codes. If you specify all ICMP/ICMPv6 types, you must specify all ICMP/ICMPv6 codes.</p>
    pub fn to_port(&self) -> std::option::Option<i32> {
        self.to_port
    }
    /// <p>The security group and Amazon Web Services account ID pairs.</p>
    pub fn user_id_group_pairs(&self) -> std::option::Option<&[crate::model::UserIdGroupPair]> {
        self.user_id_group_pairs.as_deref()
    }
}
/// See [`IpPermission`](crate::model::IpPermission).
pub mod ip_permission {

    /// A builder for [`IpPermission`](crate::model::IpPermission).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) from_port: std::option::Option<i32>,
        pub(crate) ip_protocol: std::option::Option<std::string::String>,
        pub(crate) ip_ranges: std::option::Option<std::vec::Vec<crate::model::IpRange>>,
        pub(crate) ipv6_ranges: std::option::Option<std::vec::Vec<crate::model::Ipv6Range>>,
        pub(crate) prefix_list_ids: std::option::Option<std::vec::Vec<crate::model::PrefixListId>>,
        pub(crate) to_port: std::option::Option<i32>,
        pub(crate) user_id_group_pairs:
            std::option::Option<std::vec::Vec<crate::model::UserIdGroupPair>>,
    }
    impl Builder {
        /// <p>If the protocol is TCP or UDP, this is the start of the port range. If the protocol is ICMP or ICMPv6, this is the type number. A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all ICMP/ICMPv6 codes.</p>
        pub fn from_port(mut self, input: i32) -> Self {
            self.from_port = Some(input);
            self
        }
        /// <p>If the protocol is TCP or UDP, this is the start of the port range. If the protocol is ICMP or ICMPv6, this is the type number. A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all ICMP/ICMPv6 codes.</p>
        pub fn set_from_port(mut self, input: std::option::Option<i32>) -> Self {
            self.from_port = input;
            self
        }
        /// <p>The IP protocol name (<code>tcp</code>, <code>udp</code>, <code>icmp</code>, <code>icmpv6</code>) or number (see <a href="http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml">Protocol Numbers</a>).</p>
        /// <p>[VPC only] Use <code>-1</code> to specify all protocols. When authorizing security group rules, specifying <code>-1</code> or a protocol number other than <code>tcp</code>, <code>udp</code>, <code>icmp</code>, or <code>icmpv6</code> allows traffic on all ports, regardless of any port range you specify. For <code>tcp</code>, <code>udp</code>, and <code>icmp</code>, you must specify a port range. For <code>icmpv6</code>, the port range is optional; if you omit the port range, traffic for all types and codes is allowed.</p>
        pub fn ip_protocol(mut self, input: impl Into<std::string::String>) -> Self {
            self.ip_protocol = Some(input.into());
            self
        }
        /// <p>The IP protocol name (<code>tcp</code>, <code>udp</code>, <code>icmp</code>, <code>icmpv6</code>) or number (see <a href="http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml">Protocol Numbers</a>).</p>
        /// <p>[VPC only] Use <code>-1</code> to specify all protocols. When authorizing security group rules, specifying <code>-1</code> or a protocol number other than <code>tcp</code>, <code>udp</code>, <code>icmp</code>, or <code>icmpv6</code> allows traffic on all ports, regardless of any port range you specify. For <code>tcp</code>, <code>udp</code>, and <code>icmp</code>, you must specify a port range. For <code>icmpv6</code>, the port range is optional; if you omit the port range, traffic for all types and codes is allowed.</p>
        pub fn set_ip_protocol(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.ip_protocol = input;
            self
        }
        /// Appends an item to `ip_ranges`.
        ///
        /// To override the contents of this collection use [`set_ip_ranges`](Self::set_ip_ranges).
        ///
        /// <p>The IPv4 ranges.</p>
        pub fn ip_ranges(mut self, input: crate::model::IpRange) -> Self {
            let mut v = self.ip_ranges.unwrap_or_default();
            v.push(input);
            self.ip_ranges = Some(v);
            self
        }
        /// <p>The IPv4 ranges.</p>
        pub fn set_ip_ranges(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::IpRange>>,
        ) -> Self {
            self.ip_ranges = input;
            self
        }
        /// Appends an item to `ipv6_ranges`.
        ///
        /// To override the contents of this collection use [`set_ipv6_ranges`](Self::set_ipv6_ranges).
        ///
        /// <p>[VPC only] The IPv6 ranges.</p>
        pub fn ipv6_ranges(mut self, input: crate::model::Ipv6Range) -> Self {
            let mut v = self.ipv6_ranges.unwrap_or_default();
            v.push(input);
            self.ipv6_ranges = Some(v);
            self
        }
        /// <p>[VPC only] The IPv6 ranges.</p>
        pub fn set_ipv6_ranges(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Ipv6Range>>,
        ) -> Self {
            self.ipv6_ranges = input;
            self
        }
        /// Appends an item to `prefix_list_ids`.
        ///
        /// To override the contents of this collection use [`set_prefix_list_ids`](Self::set_prefix_list_ids).
        ///
        /// <p>[VPC only] The prefix list IDs.</p>
        pub fn prefix_list_ids(mut self, input: crate::model::PrefixListId) -> Self {
            let mut v = self.prefix_list_ids.unwrap_or_default();
            v.push(input);
            self.prefix_list_ids = Some(v);
            self
        }
        /// <p>[VPC only] The prefix list IDs.</p>
        pub fn set_prefix_list_ids(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::PrefixListId>>,
        ) -> Self {
            self.prefix_list_ids = input;
            self
        }
        /// <p>If the protocol is TCP or UDP, this is the end of the port range. If the protocol is ICMP or ICMPv6, this is the code. A value of -1 indicates all ICMP/ICMPv6 codes. If you specify all ICMP/ICMPv6 types, you must specify all ICMP/ICMPv6 codes.</p>
        pub fn to_port(mut self, input: i32) -> Self {
            self.to_port = Some(input);
            self
        }
        /// <p>If the protocol is TCP or UDP, this is the end of the port range. If the protocol is ICMP or ICMPv6, this is the code. A value of -1 indicates all ICMP/ICMPv6 codes. If you specify all ICMP/ICMPv6 types, you must specify all ICMP/ICMPv6 codes.</p>
        pub fn set_to_port(mut self, input: std::option::Option<i32>) -> Self {
            self.to_port = input;
            self
        }
        /// Appends an item to `user_id_group_pairs`.
        ///
        /// To override the contents of this collection use [`set_user_id_group_pairs`](Self::set_user_id_group_pairs).
        ///
        /// <p>The security group and Amazon Web Services account ID pairs.</p>
        pub fn user_id_group_pairs(mut self, input: crate::model::UserIdGroupPair) -> Self {
            let mut v = self.user_id_group_pairs.unwrap_or_default();
            v.push(input);
            self.user_id_group_pairs = Some(v);
            self
        }
        /// <p>The security group and Amazon Web Services account ID pairs.</p>
        pub fn set_user_id_group_pairs(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::UserIdGroupPair>>,
        ) -> Self {
            self.user_id_group_pairs = input;
            self
        }
        /// Consumes the builder and constructs a [`IpPermission`](crate::model::IpPermission).
        pub fn build(self) -> crate::model::IpPermission {
            crate::model::IpPermission {
                from_port: self.from_port,
                ip_protocol: self.ip_protocol,
                ip_ranges: self.ip_ranges,
                ipv6_ranges: self.ipv6_ranges,
                prefix_list_ids: self.prefix_list_ids,
                to_port: self.to_port,
                user_id_group_pairs: self.user_id_group_pairs,
            }
        }
    }
}
impl IpPermission {
    /// Creates a new builder-style object to manufacture [`IpPermission`](crate::model::IpPermission).
    pub fn builder() -> crate::model::ip_permission::Builder {
        crate::model::ip_permission::Builder::default()
    }
}

/// <p>Describes a security group and Amazon Web Services account ID pair.</p> <note>
/// <p>We are retiring EC2-Classic. We recommend that you migrate from EC2-Classic to a VPC. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html">Migrate from EC2-Classic to a VPC</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
/// </note>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UserIdGroupPair {
    /// <p>A description for the security group rule that references this user ID group pair.</p>
    /// <p>Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*</p>
    #[doc(hidden)]
    pub description: std::option::Option<std::string::String>,
    /// <p>The ID of the security group.</p>
    #[doc(hidden)]
    pub group_id: std::option::Option<std::string::String>,
    /// <p>The name of the security group. In a request, use this parameter for a security group in EC2-Classic or a default VPC only. For a security group in a nondefault VPC, use the security group ID. </p>
    /// <p>For a referenced security group in another VPC, this value is not returned if the referenced security group is deleted.</p>
    #[doc(hidden)]
    pub group_name: std::option::Option<std::string::String>,
    /// <p>The status of a VPC peering connection, if applicable.</p>
    #[doc(hidden)]
    pub peering_status: std::option::Option<std::string::String>,
    /// <p>The ID of an Amazon Web Services account.</p>
    /// <p>For a referenced security group in another VPC, the account ID of the referenced security group is returned in the response. If the referenced security group is deleted, this value is not returned.</p>
    /// <p>[EC2-Classic] Required when adding or removing rules that reference a security group in another Amazon Web Services account.</p>
    #[doc(hidden)]
    pub user_id: std::option::Option<std::string::String>,
    /// <p>The ID of the VPC for the referenced security group, if applicable.</p>
    #[doc(hidden)]
    pub vpc_id: std::option::Option<std::string::String>,
    /// <p>The ID of the VPC peering connection, if applicable.</p>
    #[doc(hidden)]
    pub vpc_peering_connection_id: std::option::Option<std::string::String>,
}
impl UserIdGroupPair {
    /// <p>A description for the security group rule that references this user ID group pair.</p>
    /// <p>Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*</p>
    pub fn description(&self) -> std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The ID of the security group.</p>
    pub fn group_id(&self) -> std::option::Option<&str> {
        self.group_id.as_deref()
    }
    /// <p>The name of the security group. In a request, use this parameter for a security group in EC2-Classic or a default VPC only. For a security group in a nondefault VPC, use the security group ID. </p>
    /// <p>For a referenced security group in another VPC, this value is not returned if the referenced security group is deleted.</p>
    pub fn group_name(&self) -> std::option::Option<&str> {
        self.group_name.as_deref()
    }
    /// <p>The status of a VPC peering connection, if applicable.</p>
    pub fn peering_status(&self) -> std::option::Option<&str> {
        self.peering_status.as_deref()
    }
    /// <p>The ID of an Amazon Web Services account.</p>
    /// <p>For a referenced security group in another VPC, the account ID of the referenced security group is returned in the response. If the referenced security group is deleted, this value is not returned.</p>
    /// <p>[EC2-Classic] Required when adding or removing rules that reference a security group in another Amazon Web Services account.</p>
    pub fn user_id(&self) -> std::option::Option<&str> {
        self.user_id.as_deref()
    }
    /// <p>The ID of the VPC for the referenced security group, if applicable.</p>
    pub fn vpc_id(&self) -> std::option::Option<&str> {
        self.vpc_id.as_deref()
    }
    /// <p>The ID of the VPC peering connection, if applicable.</p>
    pub fn vpc_peering_connection_id(&self) -> std::option::Option<&str> {
        self.vpc_peering_connection_id.as_deref()
    }
}
/// See [`UserIdGroupPair`](crate::model::UserIdGroupPair).
pub mod user_id_group_pair {

    /// A builder for [`UserIdGroupPair`](crate::model::UserIdGroupPair).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) description: std::option::Option<std::string::String>,
        pub(crate) group_id: std::option::Option<std::string::String>,
        pub(crate) group_name: std::option::Option<std::string::String>,
        pub(crate) peering_status: std::option::Option<std::string::String>,
        pub(crate) user_id: std::option::Option<std::string::String>,
        pub(crate) vpc_id: std::option::Option<std::string::String>,
        pub(crate) vpc_peering_connection_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>A description for the security group rule that references this user ID group pair.</p>
        /// <p>Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*</p>
        pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
            self.description = Some(input.into());
            self
        }
        /// <p>A description for the security group rule that references this user ID group pair.</p>
        /// <p>Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*</p>
        pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.description = input;
            self
        }
        /// <p>The ID of the security group.</p>
        pub fn group_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.group_id = Some(input.into());
            self
        }
        /// <p>The ID of the security group.</p>
        pub fn set_group_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.group_id = input;
            self
        }
        /// <p>The name of the security group. In a request, use this parameter for a security group in EC2-Classic or a default VPC only. For a security group in a nondefault VPC, use the security group ID. </p>
        /// <p>For a referenced security group in another VPC, this value is not returned if the referenced security group is deleted.</p>
        pub fn group_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.group_name = Some(input.into());
            self
        }
        /// <p>The name of the security group. In a request, use this parameter for a security group in EC2-Classic or a default VPC only. For a security group in a nondefault VPC, use the security group ID. </p>
        /// <p>For a referenced security group in another VPC, this value is not returned if the referenced security group is deleted.</p>
        pub fn set_group_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.group_name = input;
            self
        }
        /// <p>The status of a VPC peering connection, if applicable.</p>
        pub fn peering_status(mut self, input: impl Into<std::string::String>) -> Self {
            self.peering_status = Some(input.into());
            self
        }
        /// <p>The status of a VPC peering connection, if applicable.</p>
        pub fn set_peering_status(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.peering_status = input;
            self
        }
        /// <p>The ID of an Amazon Web Services account.</p>
        /// <p>For a referenced security group in another VPC, the account ID of the referenced security group is returned in the response. If the referenced security group is deleted, this value is not returned.</p>
        /// <p>[EC2-Classic] Required when adding or removing rules that reference a security group in another Amazon Web Services account.</p>
        pub fn user_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.user_id = Some(input.into());
            self
        }
        /// <p>The ID of an Amazon Web Services account.</p>
        /// <p>For a referenced security group in another VPC, the account ID of the referenced security group is returned in the response. If the referenced security group is deleted, this value is not returned.</p>
        /// <p>[EC2-Classic] Required when adding or removing rules that reference a security group in another Amazon Web Services account.</p>
        pub fn set_user_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.user_id = input;
            self
        }
        /// <p>The ID of the VPC for the referenced security group, if applicable.</p>
        pub fn vpc_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.vpc_id = Some(input.into());
            self
        }
        /// <p>The ID of the VPC for the referenced security group, if applicable.</p>
        pub fn set_vpc_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.vpc_id = input;
            self
        }
        /// <p>The ID of the VPC peering connection, if applicable.</p>
        pub fn vpc_peering_connection_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.vpc_peering_connection_id = Some(input.into());
            self
        }
        /// <p>The ID of the VPC peering connection, if applicable.</p>
        pub fn set_vpc_peering_connection_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.vpc_peering_connection_id = input;
            self
        }
        /// Consumes the builder and constructs a [`UserIdGroupPair`](crate::model::UserIdGroupPair).
        pub fn build(self) -> crate::model::UserIdGroupPair {
            crate::model::UserIdGroupPair {
                description: self.description,
                group_id: self.group_id,
                group_name: self.group_name,
                peering_status: self.peering_status,
                user_id: self.user_id,
                vpc_id: self.vpc_id,
                vpc_peering_connection_id: self.vpc_peering_connection_id,
            }
        }
    }
}
impl UserIdGroupPair {
    /// Creates a new builder-style object to manufacture [`UserIdGroupPair`](crate::model::UserIdGroupPair).
    pub fn builder() -> crate::model::user_id_group_pair::Builder {
        crate::model::user_id_group_pair::Builder::default()
    }
}

/// <p>Describes a prefix list ID.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct PrefixListId {
    /// <p>A description for the security group rule that references this prefix list ID.</p>
    /// <p>Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*</p>
    #[doc(hidden)]
    pub description: std::option::Option<std::string::String>,
    /// <p>The ID of the prefix.</p>
    #[doc(hidden)]
    pub prefix_list_id: std::option::Option<std::string::String>,
}
impl PrefixListId {
    /// <p>A description for the security group rule that references this prefix list ID.</p>
    /// <p>Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*</p>
    pub fn description(&self) -> std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The ID of the prefix.</p>
    pub fn prefix_list_id(&self) -> std::option::Option<&str> {
        self.prefix_list_id.as_deref()
    }
}
/// See [`PrefixListId`](crate::model::PrefixListId).
pub mod prefix_list_id {

    /// A builder for [`PrefixListId`](crate::model::PrefixListId).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) description: std::option::Option<std::string::String>,
        pub(crate) prefix_list_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>A description for the security group rule that references this prefix list ID.</p>
        /// <p>Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*</p>
        pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
            self.description = Some(input.into());
            self
        }
        /// <p>A description for the security group rule that references this prefix list ID.</p>
        /// <p>Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*</p>
        pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.description = input;
            self
        }
        /// <p>The ID of the prefix.</p>
        pub fn prefix_list_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.prefix_list_id = Some(input.into());
            self
        }
        /// <p>The ID of the prefix.</p>
        pub fn set_prefix_list_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.prefix_list_id = input;
            self
        }
        /// Consumes the builder and constructs a [`PrefixListId`](crate::model::PrefixListId).
        pub fn build(self) -> crate::model::PrefixListId {
            crate::model::PrefixListId {
                description: self.description,
                prefix_list_id: self.prefix_list_id,
            }
        }
    }
}
impl PrefixListId {
    /// Creates a new builder-style object to manufacture [`PrefixListId`](crate::model::PrefixListId).
    pub fn builder() -> crate::model::prefix_list_id::Builder {
        crate::model::prefix_list_id::Builder::default()
    }
}

/// <p>[EC2-VPC only] Describes an IPv6 range.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Ipv6Range {
    /// <p>The IPv6 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv6 address, use the /128 prefix length.</p>
    #[doc(hidden)]
    pub cidr_ipv6: std::option::Option<std::string::String>,
    /// <p>A description for the security group rule that references this IPv6 address range.</p>
    /// <p>Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&amp;;{}!$*</p>
    #[doc(hidden)]
    pub description: std::option::Option<std::string::String>,
}
impl Ipv6Range {
    /// <p>The IPv6 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv6 address, use the /128 prefix length.</p>
    pub fn cidr_ipv6(&self) -> std::option::Option<&str> {
        self.cidr_ipv6.as_deref()
    }
    /// <p>A description for the security group rule that references this IPv6 address range.</p>
    /// <p>Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&amp;;{}!$*</p>
    pub fn description(&self) -> std::option::Option<&str> {
        self.description.as_deref()
    }
}
/// See [`Ipv6Range`](crate::model::Ipv6Range).
pub mod ipv6_range {

    /// A builder for [`Ipv6Range`](crate::model::Ipv6Range).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) cidr_ipv6: std::option::Option<std::string::String>,
        pub(crate) description: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The IPv6 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv6 address, use the /128 prefix length.</p>
        pub fn cidr_ipv6(mut self, input: impl Into<std::string::String>) -> Self {
            self.cidr_ipv6 = Some(input.into());
            self
        }
        /// <p>The IPv6 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv6 address, use the /128 prefix length.</p>
        pub fn set_cidr_ipv6(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.cidr_ipv6 = input;
            self
        }
        /// <p>A description for the security group rule that references this IPv6 address range.</p>
        /// <p>Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&amp;;{}!$*</p>
        pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
            self.description = Some(input.into());
            self
        }
        /// <p>A description for the security group rule that references this IPv6 address range.</p>
        /// <p>Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&amp;;{}!$*</p>
        pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.description = input;
            self
        }
        /// Consumes the builder and constructs a [`Ipv6Range`](crate::model::Ipv6Range).
        pub fn build(self) -> crate::model::Ipv6Range {
            crate::model::Ipv6Range {
                cidr_ipv6: self.cidr_ipv6,
                description: self.description,
            }
        }
    }
}
impl Ipv6Range {
    /// Creates a new builder-style object to manufacture [`Ipv6Range`](crate::model::Ipv6Range).
    pub fn builder() -> crate::model::ipv6_range::Builder {
        crate::model::ipv6_range::Builder::default()
    }
}

/// <p>Describes an IPv4 range.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct IpRange {
    /// <p>The IPv4 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv4 address, use the /32 prefix length.</p>
    #[doc(hidden)]
    pub cidr_ip: std::option::Option<std::string::String>,
    /// <p>A description for the security group rule that references this IPv4 address range.</p>
    /// <p>Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&amp;;{}!$*</p>
    #[doc(hidden)]
    pub description: std::option::Option<std::string::String>,
}
impl IpRange {
    /// <p>The IPv4 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv4 address, use the /32 prefix length.</p>
    pub fn cidr_ip(&self) -> std::option::Option<&str> {
        self.cidr_ip.as_deref()
    }
    /// <p>A description for the security group rule that references this IPv4 address range.</p>
    /// <p>Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&amp;;{}!$*</p>
    pub fn description(&self) -> std::option::Option<&str> {
        self.description.as_deref()
    }
}
/// See [`IpRange`](crate::model::IpRange).
pub mod ip_range {

    /// A builder for [`IpRange`](crate::model::IpRange).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) cidr_ip: std::option::Option<std::string::String>,
        pub(crate) description: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The IPv4 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv4 address, use the /32 prefix length.</p>
        pub fn cidr_ip(mut self, input: impl Into<std::string::String>) -> Self {
            self.cidr_ip = Some(input.into());
            self
        }
        /// <p>The IPv4 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv4 address, use the /32 prefix length.</p>
        pub fn set_cidr_ip(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.cidr_ip = input;
            self
        }
        /// <p>A description for the security group rule that references this IPv4 address range.</p>
        /// <p>Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&amp;;{}!$*</p>
        pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
            self.description = Some(input.into());
            self
        }
        /// <p>A description for the security group rule that references this IPv4 address range.</p>
        /// <p>Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&amp;;{}!$*</p>
        pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.description = input;
            self
        }
        /// Consumes the builder and constructs a [`IpRange`](crate::model::IpRange).
        pub fn build(self) -> crate::model::IpRange {
            crate::model::IpRange {
                cidr_ip: self.cidr_ip,
                description: self.description,
            }
        }
    }
}
impl IpRange {
    /// Creates a new builder-style object to manufacture [`IpRange`](crate::model::IpRange).
    pub fn builder() -> crate::model::ip_range::Builder {
        crate::model::ip_range::Builder::default()
    }
}

/// <p>Describes the monitoring of an instance.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InstanceMonitoring {
    /// <p>The ID of the instance.</p>
    #[doc(hidden)]
    pub instance_id: std::option::Option<std::string::String>,
    /// <p>The monitoring for the instance.</p>
    #[doc(hidden)]
    pub monitoring: std::option::Option<crate::model::Monitoring>,
}
impl InstanceMonitoring {
    /// <p>The ID of the instance.</p>
    pub fn instance_id(&self) -> std::option::Option<&str> {
        self.instance_id.as_deref()
    }
    /// <p>The monitoring for the instance.</p>
    pub fn monitoring(&self) -> std::option::Option<&crate::model::Monitoring> {
        self.monitoring.as_ref()
    }
}
/// See [`InstanceMonitoring`](crate::model::InstanceMonitoring).
pub mod instance_monitoring {

    /// A builder for [`InstanceMonitoring`](crate::model::InstanceMonitoring).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) instance_id: std::option::Option<std::string::String>,
        pub(crate) monitoring: std::option::Option<crate::model::Monitoring>,
    }
    impl Builder {
        /// <p>The ID of the instance.</p>
        pub fn instance_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.instance_id = Some(input.into());
            self
        }
        /// <p>The ID of the instance.</p>
        pub fn set_instance_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.instance_id = input;
            self
        }
        /// <p>The monitoring for the instance.</p>
        pub fn monitoring(mut self, input: crate::model::Monitoring) -> Self {
            self.monitoring = Some(input);
            self
        }
        /// <p>The monitoring for the instance.</p>
        pub fn set_monitoring(
            mut self,
            input: std::option::Option<crate::model::Monitoring>,
        ) -> Self {
            self.monitoring = input;
            self
        }
        /// Consumes the builder and constructs a [`InstanceMonitoring`](crate::model::InstanceMonitoring).
        pub fn build(self) -> crate::model::InstanceMonitoring {
            crate::model::InstanceMonitoring {
                instance_id: self.instance_id,
                monitoring: self.monitoring,
            }
        }
    }
}
impl InstanceMonitoring {
    /// Creates a new builder-style object to manufacture [`InstanceMonitoring`](crate::model::InstanceMonitoring).
    pub fn builder() -> crate::model::instance_monitoring::Builder {
        crate::model::instance_monitoring::Builder::default()
    }
}

/// <p>Describes the monitoring of an instance.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Monitoring {
    /// <p>Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.</p>
    #[doc(hidden)]
    pub state: std::option::Option<crate::model::MonitoringState>,
}
impl Monitoring {
    /// <p>Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.</p>
    pub fn state(&self) -> std::option::Option<&crate::model::MonitoringState> {
        self.state.as_ref()
    }
}
/// See [`Monitoring`](crate::model::Monitoring).
pub mod monitoring {

    /// A builder for [`Monitoring`](crate::model::Monitoring).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) state: std::option::Option<crate::model::MonitoringState>,
    }
    impl Builder {
        /// <p>Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.</p>
        pub fn state(mut self, input: crate::model::MonitoringState) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.</p>
        pub fn set_state(
            mut self,
            input: std::option::Option<crate::model::MonitoringState>,
        ) -> Self {
            self.state = input;
            self
        }
        /// Consumes the builder and constructs a [`Monitoring`](crate::model::Monitoring).
        pub fn build(self) -> crate::model::Monitoring {
            crate::model::Monitoring { state: self.state }
        }
    }
}
impl Monitoring {
    /// Creates a new builder-style object to manufacture [`Monitoring`](crate::model::Monitoring).
    pub fn builder() -> crate::model::monitoring::Builder {
        crate::model::monitoring::Builder::default()
    }
}

/// When writing a match expression against `MonitoringState`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let monitoringstate = unimplemented!();
/// match monitoringstate {
///     MonitoringState::Disabled => { /* ... */ },
///     MonitoringState::Disabling => { /* ... */ },
///     MonitoringState::Enabled => { /* ... */ },
///     MonitoringState::Pending => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `monitoringstate` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `MonitoringState::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `MonitoringState::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `MonitoringState::NewFeature` is defined.
/// Specifically, when `monitoringstate` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `MonitoringState::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 MonitoringState {
    #[allow(missing_docs)] // documentation missing in model
    Disabled,
    #[allow(missing_docs)] // documentation missing in model
    Disabling,
    #[allow(missing_docs)] // documentation missing in model
    Enabled,
    #[allow(missing_docs)] // documentation missing in model
    Pending,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for MonitoringState {
    fn from(s: &str) -> Self {
        match s {
            "disabled" => MonitoringState::Disabled,
            "disabling" => MonitoringState::Disabling,
            "enabled" => MonitoringState::Enabled,
            "pending" => MonitoringState::Pending,
            other => MonitoringState::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for MonitoringState {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(MonitoringState::from(s))
    }
}
impl MonitoringState {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            MonitoringState::Disabled => "disabled",
            MonitoringState::Disabling => "disabling",
            MonitoringState::Enabled => "enabled",
            MonitoringState::Pending => "pending",
            MonitoringState::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["disabled", "disabling", "enabled", "pending"]
    }
}
impl AsRef<str> for MonitoringState {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes an instance state change.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InstanceStateChange {
    /// <p>The current state of the instance.</p>
    #[doc(hidden)]
    pub current_state: std::option::Option<crate::model::InstanceState>,
    /// <p>The ID of the instance.</p>
    #[doc(hidden)]
    pub instance_id: std::option::Option<std::string::String>,
    /// <p>The previous state of the instance.</p>
    #[doc(hidden)]
    pub previous_state: std::option::Option<crate::model::InstanceState>,
}
impl InstanceStateChange {
    /// <p>The current state of the instance.</p>
    pub fn current_state(&self) -> std::option::Option<&crate::model::InstanceState> {
        self.current_state.as_ref()
    }
    /// <p>The ID of the instance.</p>
    pub fn instance_id(&self) -> std::option::Option<&str> {
        self.instance_id.as_deref()
    }
    /// <p>The previous state of the instance.</p>
    pub fn previous_state(&self) -> std::option::Option<&crate::model::InstanceState> {
        self.previous_state.as_ref()
    }
}
/// See [`InstanceStateChange`](crate::model::InstanceStateChange).
pub mod instance_state_change {

    /// A builder for [`InstanceStateChange`](crate::model::InstanceStateChange).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) current_state: std::option::Option<crate::model::InstanceState>,
        pub(crate) instance_id: std::option::Option<std::string::String>,
        pub(crate) previous_state: std::option::Option<crate::model::InstanceState>,
    }
    impl Builder {
        /// <p>The current state of the instance.</p>
        pub fn current_state(mut self, input: crate::model::InstanceState) -> Self {
            self.current_state = Some(input);
            self
        }
        /// <p>The current state of the instance.</p>
        pub fn set_current_state(
            mut self,
            input: std::option::Option<crate::model::InstanceState>,
        ) -> Self {
            self.current_state = input;
            self
        }
        /// <p>The ID of the instance.</p>
        pub fn instance_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.instance_id = Some(input.into());
            self
        }
        /// <p>The ID of the instance.</p>
        pub fn set_instance_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.instance_id = input;
            self
        }
        /// <p>The previous state of the instance.</p>
        pub fn previous_state(mut self, input: crate::model::InstanceState) -> Self {
            self.previous_state = Some(input);
            self
        }
        /// <p>The previous state of the instance.</p>
        pub fn set_previous_state(
            mut self,
            input: std::option::Option<crate::model::InstanceState>,
        ) -> Self {
            self.previous_state = input;
            self
        }
        /// Consumes the builder and constructs a [`InstanceStateChange`](crate::model::InstanceStateChange).
        pub fn build(self) -> crate::model::InstanceStateChange {
            crate::model::InstanceStateChange {
                current_state: self.current_state,
                instance_id: self.instance_id,
                previous_state: self.previous_state,
            }
        }
    }
}
impl InstanceStateChange {
    /// Creates a new builder-style object to manufacture [`InstanceStateChange`](crate::model::InstanceStateChange).
    pub fn builder() -> crate::model::instance_state_change::Builder {
        crate::model::instance_state_change::Builder::default()
    }
}

/// <p>Describes the current state of an instance.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InstanceState {
    /// <p>The state of the instance as a 16-bit unsigned integer. </p>
    /// <p>The high byte is all of the bits between 2^8 and (2^16)-1, which equals decimal values between 256 and 65,535. These numerical values are used for internal purposes and should be ignored.</p>
    /// <p>The low byte is all of the bits between 2^0 and (2^8)-1, which equals decimal values between 0 and 255. </p>
    /// <p>The valid values for instance-state-code will all be in the range of the low byte and they are:</p>
    /// <ul>
    /// <li> <p> <code>0</code> : <code>pending</code> </p> </li>
    /// <li> <p> <code>16</code> : <code>running</code> </p> </li>
    /// <li> <p> <code>32</code> : <code>shutting-down</code> </p> </li>
    /// <li> <p> <code>48</code> : <code>terminated</code> </p> </li>
    /// <li> <p> <code>64</code> : <code>stopping</code> </p> </li>
    /// <li> <p> <code>80</code> : <code>stopped</code> </p> </li>
    /// </ul>
    /// <p>You can ignore the high byte value by zeroing out all of the bits above 2^8 or 256 in decimal.</p>
    #[doc(hidden)]
    pub code: std::option::Option<i32>,
    /// <p>The current state of the instance.</p>
    #[doc(hidden)]
    pub name: std::option::Option<crate::model::InstanceStateName>,
}
impl InstanceState {
    /// <p>The state of the instance as a 16-bit unsigned integer. </p>
    /// <p>The high byte is all of the bits between 2^8 and (2^16)-1, which equals decimal values between 256 and 65,535. These numerical values are used for internal purposes and should be ignored.</p>
    /// <p>The low byte is all of the bits between 2^0 and (2^8)-1, which equals decimal values between 0 and 255. </p>
    /// <p>The valid values for instance-state-code will all be in the range of the low byte and they are:</p>
    /// <ul>
    /// <li> <p> <code>0</code> : <code>pending</code> </p> </li>
    /// <li> <p> <code>16</code> : <code>running</code> </p> </li>
    /// <li> <p> <code>32</code> : <code>shutting-down</code> </p> </li>
    /// <li> <p> <code>48</code> : <code>terminated</code> </p> </li>
    /// <li> <p> <code>64</code> : <code>stopping</code> </p> </li>
    /// <li> <p> <code>80</code> : <code>stopped</code> </p> </li>
    /// </ul>
    /// <p>You can ignore the high byte value by zeroing out all of the bits above 2^8 or 256 in decimal.</p>
    pub fn code(&self) -> std::option::Option<i32> {
        self.code
    }
    /// <p>The current state of the instance.</p>
    pub fn name(&self) -> std::option::Option<&crate::model::InstanceStateName> {
        self.name.as_ref()
    }
}
/// See [`InstanceState`](crate::model::InstanceState).
pub mod instance_state {

    /// A builder for [`InstanceState`](crate::model::InstanceState).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) code: std::option::Option<i32>,
        pub(crate) name: std::option::Option<crate::model::InstanceStateName>,
    }
    impl Builder {
        /// <p>The state of the instance as a 16-bit unsigned integer. </p>
        /// <p>The high byte is all of the bits between 2^8 and (2^16)-1, which equals decimal values between 256 and 65,535. These numerical values are used for internal purposes and should be ignored.</p>
        /// <p>The low byte is all of the bits between 2^0 and (2^8)-1, which equals decimal values between 0 and 255. </p>
        /// <p>The valid values for instance-state-code will all be in the range of the low byte and they are:</p>
        /// <ul>
        /// <li> <p> <code>0</code> : <code>pending</code> </p> </li>
        /// <li> <p> <code>16</code> : <code>running</code> </p> </li>
        /// <li> <p> <code>32</code> : <code>shutting-down</code> </p> </li>
        /// <li> <p> <code>48</code> : <code>terminated</code> </p> </li>
        /// <li> <p> <code>64</code> : <code>stopping</code> </p> </li>
        /// <li> <p> <code>80</code> : <code>stopped</code> </p> </li>
        /// </ul>
        /// <p>You can ignore the high byte value by zeroing out all of the bits above 2^8 or 256 in decimal.</p>
        pub fn code(mut self, input: i32) -> Self {
            self.code = Some(input);
            self
        }
        /// <p>The state of the instance as a 16-bit unsigned integer. </p>
        /// <p>The high byte is all of the bits between 2^8 and (2^16)-1, which equals decimal values between 256 and 65,535. These numerical values are used for internal purposes and should be ignored.</p>
        /// <p>The low byte is all of the bits between 2^0 and (2^8)-1, which equals decimal values between 0 and 255. </p>
        /// <p>The valid values for instance-state-code will all be in the range of the low byte and they are:</p>
        /// <ul>
        /// <li> <p> <code>0</code> : <code>pending</code> </p> </li>
        /// <li> <p> <code>16</code> : <code>running</code> </p> </li>
        /// <li> <p> <code>32</code> : <code>shutting-down</code> </p> </li>
        /// <li> <p> <code>48</code> : <code>terminated</code> </p> </li>
        /// <li> <p> <code>64</code> : <code>stopping</code> </p> </li>
        /// <li> <p> <code>80</code> : <code>stopped</code> </p> </li>
        /// </ul>
        /// <p>You can ignore the high byte value by zeroing out all of the bits above 2^8 or 256 in decimal.</p>
        pub fn set_code(mut self, input: std::option::Option<i32>) -> Self {
            self.code = input;
            self
        }
        /// <p>The current state of the instance.</p>
        pub fn name(mut self, input: crate::model::InstanceStateName) -> Self {
            self.name = Some(input);
            self
        }
        /// <p>The current state of the instance.</p>
        pub fn set_name(
            mut self,
            input: std::option::Option<crate::model::InstanceStateName>,
        ) -> Self {
            self.name = input;
            self
        }
        /// Consumes the builder and constructs a [`InstanceState`](crate::model::InstanceState).
        pub fn build(self) -> crate::model::InstanceState {
            crate::model::InstanceState {
                code: self.code,
                name: self.name,
            }
        }
    }
}
impl InstanceState {
    /// Creates a new builder-style object to manufacture [`InstanceState`](crate::model::InstanceState).
    pub fn builder() -> crate::model::instance_state::Builder {
        crate::model::instance_state::Builder::default()
    }
}

/// When writing a match expression against `InstanceStateName`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let instancestatename = unimplemented!();
/// match instancestatename {
///     InstanceStateName::Pending => { /* ... */ },
///     InstanceStateName::Running => { /* ... */ },
///     InstanceStateName::ShuttingDown => { /* ... */ },
///     InstanceStateName::Stopped => { /* ... */ },
///     InstanceStateName::Stopping => { /* ... */ },
///     InstanceStateName::Terminated => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `instancestatename` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `InstanceStateName::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `InstanceStateName::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `InstanceStateName::NewFeature` is defined.
/// Specifically, when `instancestatename` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `InstanceStateName::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 InstanceStateName {
    #[allow(missing_docs)] // documentation missing in model
    Pending,
    #[allow(missing_docs)] // documentation missing in model
    Running,
    #[allow(missing_docs)] // documentation missing in model
    ShuttingDown,
    #[allow(missing_docs)] // documentation missing in model
    Stopped,
    #[allow(missing_docs)] // documentation missing in model
    Stopping,
    #[allow(missing_docs)] // documentation missing in model
    Terminated,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for InstanceStateName {
    fn from(s: &str) -> Self {
        match s {
            "pending" => InstanceStateName::Pending,
            "running" => InstanceStateName::Running,
            "shutting-down" => InstanceStateName::ShuttingDown,
            "stopped" => InstanceStateName::Stopped,
            "stopping" => InstanceStateName::Stopping,
            "terminated" => InstanceStateName::Terminated,
            other => {
                InstanceStateName::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for InstanceStateName {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(InstanceStateName::from(s))
    }
}
impl InstanceStateName {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            InstanceStateName::Pending => "pending",
            InstanceStateName::Running => "running",
            InstanceStateName::ShuttingDown => "shutting-down",
            InstanceStateName::Stopped => "stopped",
            InstanceStateName::Stopping => "stopping",
            InstanceStateName::Terminated => "terminated",
            InstanceStateName::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &[
            "pending",
            "running",
            "shutting-down",
            "stopped",
            "stopping",
            "terminated",
        ]
    }
}
impl AsRef<str> for InstanceStateName {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Information about a terminated Client VPN endpoint client connection.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TerminateConnectionStatus {
    /// <p>The ID of the client connection.</p>
    #[doc(hidden)]
    pub connection_id: std::option::Option<std::string::String>,
    /// <p>The state of the client connection.</p>
    #[doc(hidden)]
    pub previous_status: std::option::Option<crate::model::ClientVpnConnectionStatus>,
    /// <p>A message about the status of the client connection, if applicable.</p>
    #[doc(hidden)]
    pub current_status: std::option::Option<crate::model::ClientVpnConnectionStatus>,
}
impl TerminateConnectionStatus {
    /// <p>The ID of the client connection.</p>
    pub fn connection_id(&self) -> std::option::Option<&str> {
        self.connection_id.as_deref()
    }
    /// <p>The state of the client connection.</p>
    pub fn previous_status(&self) -> std::option::Option<&crate::model::ClientVpnConnectionStatus> {
        self.previous_status.as_ref()
    }
    /// <p>A message about the status of the client connection, if applicable.</p>
    pub fn current_status(&self) -> std::option::Option<&crate::model::ClientVpnConnectionStatus> {
        self.current_status.as_ref()
    }
}
/// See [`TerminateConnectionStatus`](crate::model::TerminateConnectionStatus).
pub mod terminate_connection_status {

    /// A builder for [`TerminateConnectionStatus`](crate::model::TerminateConnectionStatus).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) connection_id: std::option::Option<std::string::String>,
        pub(crate) previous_status: std::option::Option<crate::model::ClientVpnConnectionStatus>,
        pub(crate) current_status: std::option::Option<crate::model::ClientVpnConnectionStatus>,
    }
    impl Builder {
        /// <p>The ID of the client connection.</p>
        pub fn connection_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.connection_id = Some(input.into());
            self
        }
        /// <p>The ID of the client connection.</p>
        pub fn set_connection_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.connection_id = input;
            self
        }
        /// <p>The state of the client connection.</p>
        pub fn previous_status(mut self, input: crate::model::ClientVpnConnectionStatus) -> Self {
            self.previous_status = Some(input);
            self
        }
        /// <p>The state of the client connection.</p>
        pub fn set_previous_status(
            mut self,
            input: std::option::Option<crate::model::ClientVpnConnectionStatus>,
        ) -> Self {
            self.previous_status = input;
            self
        }
        /// <p>A message about the status of the client connection, if applicable.</p>
        pub fn current_status(mut self, input: crate::model::ClientVpnConnectionStatus) -> Self {
            self.current_status = Some(input);
            self
        }
        /// <p>A message about the status of the client connection, if applicable.</p>
        pub fn set_current_status(
            mut self,
            input: std::option::Option<crate::model::ClientVpnConnectionStatus>,
        ) -> Self {
            self.current_status = input;
            self
        }
        /// Consumes the builder and constructs a [`TerminateConnectionStatus`](crate::model::TerminateConnectionStatus).
        pub fn build(self) -> crate::model::TerminateConnectionStatus {
            crate::model::TerminateConnectionStatus {
                connection_id: self.connection_id,
                previous_status: self.previous_status,
                current_status: self.current_status,
            }
        }
    }
}
impl TerminateConnectionStatus {
    /// Creates a new builder-style object to manufacture [`TerminateConnectionStatus`](crate::model::TerminateConnectionStatus).
    pub fn builder() -> crate::model::terminate_connection_status::Builder {
        crate::model::terminate_connection_status::Builder::default()
    }
}

/// <p>Describes the status of a client connection.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ClientVpnConnectionStatus {
    /// <p>The state of the client connection.</p>
    #[doc(hidden)]
    pub code: std::option::Option<crate::model::ClientVpnConnectionStatusCode>,
    /// <p>A message about the status of the client connection, if applicable.</p>
    #[doc(hidden)]
    pub message: std::option::Option<std::string::String>,
}
impl ClientVpnConnectionStatus {
    /// <p>The state of the client connection.</p>
    pub fn code(&self) -> std::option::Option<&crate::model::ClientVpnConnectionStatusCode> {
        self.code.as_ref()
    }
    /// <p>A message about the status of the client connection, if applicable.</p>
    pub fn message(&self) -> std::option::Option<&str> {
        self.message.as_deref()
    }
}
/// See [`ClientVpnConnectionStatus`](crate::model::ClientVpnConnectionStatus).
pub mod client_vpn_connection_status {

    /// A builder for [`ClientVpnConnectionStatus`](crate::model::ClientVpnConnectionStatus).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) code: std::option::Option<crate::model::ClientVpnConnectionStatusCode>,
        pub(crate) message: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The state of the client connection.</p>
        pub fn code(mut self, input: crate::model::ClientVpnConnectionStatusCode) -> Self {
            self.code = Some(input);
            self
        }
        /// <p>The state of the client connection.</p>
        pub fn set_code(
            mut self,
            input: std::option::Option<crate::model::ClientVpnConnectionStatusCode>,
        ) -> Self {
            self.code = input;
            self
        }
        /// <p>A message about the status of the client connection, if applicable.</p>
        pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
            self.message = Some(input.into());
            self
        }
        /// <p>A message about the status of the client connection, if applicable.</p>
        pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.message = input;
            self
        }
        /// Consumes the builder and constructs a [`ClientVpnConnectionStatus`](crate::model::ClientVpnConnectionStatus).
        pub fn build(self) -> crate::model::ClientVpnConnectionStatus {
            crate::model::ClientVpnConnectionStatus {
                code: self.code,
                message: self.message,
            }
        }
    }
}
impl ClientVpnConnectionStatus {
    /// Creates a new builder-style object to manufacture [`ClientVpnConnectionStatus`](crate::model::ClientVpnConnectionStatus).
    pub fn builder() -> crate::model::client_vpn_connection_status::Builder {
        crate::model::client_vpn_connection_status::Builder::default()
    }
}

/// When writing a match expression against `ClientVpnConnectionStatusCode`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let clientvpnconnectionstatuscode = unimplemented!();
/// match clientvpnconnectionstatuscode {
///     ClientVpnConnectionStatusCode::Active => { /* ... */ },
///     ClientVpnConnectionStatusCode::FailedToTerminate => { /* ... */ },
///     ClientVpnConnectionStatusCode::Terminated => { /* ... */ },
///     ClientVpnConnectionStatusCode::Terminating => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `clientvpnconnectionstatuscode` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `ClientVpnConnectionStatusCode::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `ClientVpnConnectionStatusCode::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `ClientVpnConnectionStatusCode::NewFeature` is defined.
/// Specifically, when `clientvpnconnectionstatuscode` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `ClientVpnConnectionStatusCode::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 ClientVpnConnectionStatusCode {
    #[allow(missing_docs)] // documentation missing in model
    Active,
    #[allow(missing_docs)] // documentation missing in model
    FailedToTerminate,
    #[allow(missing_docs)] // documentation missing in model
    Terminated,
    #[allow(missing_docs)] // documentation missing in model
    Terminating,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for ClientVpnConnectionStatusCode {
    fn from(s: &str) -> Self {
        match s {
            "active" => ClientVpnConnectionStatusCode::Active,
            "failed-to-terminate" => ClientVpnConnectionStatusCode::FailedToTerminate,
            "terminated" => ClientVpnConnectionStatusCode::Terminated,
            "terminating" => ClientVpnConnectionStatusCode::Terminating,
            other => ClientVpnConnectionStatusCode::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for ClientVpnConnectionStatusCode {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(ClientVpnConnectionStatusCode::from(s))
    }
}
impl ClientVpnConnectionStatusCode {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            ClientVpnConnectionStatusCode::Active => "active",
            ClientVpnConnectionStatusCode::FailedToTerminate => "failed-to-terminate",
            ClientVpnConnectionStatusCode::Terminated => "terminated",
            ClientVpnConnectionStatusCode::Terminating => "terminating",
            ClientVpnConnectionStatusCode::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["active", "failed-to-terminate", "terminated", "terminating"]
    }
}
impl AsRef<str> for ClientVpnConnectionStatusCode {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes a network insights analysis.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct NetworkInsightsAnalysis {
    /// <p>The ID of the network insights analysis.</p>
    #[doc(hidden)]
    pub network_insights_analysis_id: std::option::Option<std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the network insights analysis.</p>
    #[doc(hidden)]
    pub network_insights_analysis_arn: std::option::Option<std::string::String>,
    /// <p>The ID of the path.</p>
    #[doc(hidden)]
    pub network_insights_path_id: std::option::Option<std::string::String>,
    /// <p>The member accounts that contain resources that the path can traverse.</p>
    #[doc(hidden)]
    pub additional_accounts: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>The Amazon Resource Names (ARN) of the Amazon Web Services resources that the path must traverse.</p>
    #[doc(hidden)]
    pub filter_in_arns: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>The time the analysis started.</p>
    #[doc(hidden)]
    pub start_date: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The status of the network insights analysis.</p>
    #[doc(hidden)]
    pub status: std::option::Option<crate::model::AnalysisStatus>,
    /// <p>The status message, if the status is <code>failed</code>.</p>
    #[doc(hidden)]
    pub status_message: std::option::Option<std::string::String>,
    /// <p>The warning message.</p>
    #[doc(hidden)]
    pub warning_message: std::option::Option<std::string::String>,
    /// <p>Indicates whether the destination is reachable from the source.</p>
    #[doc(hidden)]
    pub network_path_found: std::option::Option<bool>,
    /// <p>The components in the path from source to destination.</p>
    #[doc(hidden)]
    pub forward_path_components: std::option::Option<std::vec::Vec<crate::model::PathComponent>>,
    /// <p>The components in the path from destination to source.</p>
    #[doc(hidden)]
    pub return_path_components: std::option::Option<std::vec::Vec<crate::model::PathComponent>>,
    /// <p>The explanations. For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/reachability/explanation-codes.html">Reachability Analyzer explanation codes</a>.</p>
    #[doc(hidden)]
    pub explanations: std::option::Option<std::vec::Vec<crate::model::Explanation>>,
    /// <p>Potential intermediate components.</p>
    #[doc(hidden)]
    pub alternate_path_hints: std::option::Option<std::vec::Vec<crate::model::AlternatePathHint>>,
    /// <p>Potential intermediate accounts.</p>
    #[doc(hidden)]
    pub suggested_accounts: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>The tags.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl NetworkInsightsAnalysis {
    /// <p>The ID of the network insights analysis.</p>
    pub fn network_insights_analysis_id(&self) -> std::option::Option<&str> {
        self.network_insights_analysis_id.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the network insights analysis.</p>
    pub fn network_insights_analysis_arn(&self) -> std::option::Option<&str> {
        self.network_insights_analysis_arn.as_deref()
    }
    /// <p>The ID of the path.</p>
    pub fn network_insights_path_id(&self) -> std::option::Option<&str> {
        self.network_insights_path_id.as_deref()
    }
    /// <p>The member accounts that contain resources that the path can traverse.</p>
    pub fn additional_accounts(&self) -> std::option::Option<&[std::string::String]> {
        self.additional_accounts.as_deref()
    }
    /// <p>The Amazon Resource Names (ARN) of the Amazon Web Services resources that the path must traverse.</p>
    pub fn filter_in_arns(&self) -> std::option::Option<&[std::string::String]> {
        self.filter_in_arns.as_deref()
    }
    /// <p>The time the analysis started.</p>
    pub fn start_date(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.start_date.as_ref()
    }
    /// <p>The status of the network insights analysis.</p>
    pub fn status(&self) -> std::option::Option<&crate::model::AnalysisStatus> {
        self.status.as_ref()
    }
    /// <p>The status message, if the status is <code>failed</code>.</p>
    pub fn status_message(&self) -> std::option::Option<&str> {
        self.status_message.as_deref()
    }
    /// <p>The warning message.</p>
    pub fn warning_message(&self) -> std::option::Option<&str> {
        self.warning_message.as_deref()
    }
    /// <p>Indicates whether the destination is reachable from the source.</p>
    pub fn network_path_found(&self) -> std::option::Option<bool> {
        self.network_path_found
    }
    /// <p>The components in the path from source to destination.</p>
    pub fn forward_path_components(&self) -> std::option::Option<&[crate::model::PathComponent]> {
        self.forward_path_components.as_deref()
    }
    /// <p>The components in the path from destination to source.</p>
    pub fn return_path_components(&self) -> std::option::Option<&[crate::model::PathComponent]> {
        self.return_path_components.as_deref()
    }
    /// <p>The explanations. For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/reachability/explanation-codes.html">Reachability Analyzer explanation codes</a>.</p>
    pub fn explanations(&self) -> std::option::Option<&[crate::model::Explanation]> {
        self.explanations.as_deref()
    }
    /// <p>Potential intermediate components.</p>
    pub fn alternate_path_hints(&self) -> std::option::Option<&[crate::model::AlternatePathHint]> {
        self.alternate_path_hints.as_deref()
    }
    /// <p>Potential intermediate accounts.</p>
    pub fn suggested_accounts(&self) -> std::option::Option<&[std::string::String]> {
        self.suggested_accounts.as_deref()
    }
    /// <p>The tags.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
}
/// See [`NetworkInsightsAnalysis`](crate::model::NetworkInsightsAnalysis).
pub mod network_insights_analysis {

    /// A builder for [`NetworkInsightsAnalysis`](crate::model::NetworkInsightsAnalysis).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) network_insights_analysis_id: std::option::Option<std::string::String>,
        pub(crate) network_insights_analysis_arn: std::option::Option<std::string::String>,
        pub(crate) network_insights_path_id: std::option::Option<std::string::String>,
        pub(crate) additional_accounts: std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) filter_in_arns: std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) start_date: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) status: std::option::Option<crate::model::AnalysisStatus>,
        pub(crate) status_message: std::option::Option<std::string::String>,
        pub(crate) warning_message: std::option::Option<std::string::String>,
        pub(crate) network_path_found: std::option::Option<bool>,
        pub(crate) forward_path_components:
            std::option::Option<std::vec::Vec<crate::model::PathComponent>>,
        pub(crate) return_path_components:
            std::option::Option<std::vec::Vec<crate::model::PathComponent>>,
        pub(crate) explanations: std::option::Option<std::vec::Vec<crate::model::Explanation>>,
        pub(crate) alternate_path_hints:
            std::option::Option<std::vec::Vec<crate::model::AlternatePathHint>>,
        pub(crate) suggested_accounts: std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    }
    impl Builder {
        /// <p>The ID of the network insights analysis.</p>
        pub fn network_insights_analysis_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.network_insights_analysis_id = Some(input.into());
            self
        }
        /// <p>The ID of the network insights analysis.</p>
        pub fn set_network_insights_analysis_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.network_insights_analysis_id = input;
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the network insights analysis.</p>
        pub fn network_insights_analysis_arn(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.network_insights_analysis_arn = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the network insights analysis.</p>
        pub fn set_network_insights_analysis_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.network_insights_analysis_arn = input;
            self
        }
        /// <p>The ID of the path.</p>
        pub fn network_insights_path_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.network_insights_path_id = Some(input.into());
            self
        }
        /// <p>The ID of the path.</p>
        pub fn set_network_insights_path_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.network_insights_path_id = input;
            self
        }
        /// Appends an item to `additional_accounts`.
        ///
        /// To override the contents of this collection use [`set_additional_accounts`](Self::set_additional_accounts).
        ///
        /// <p>The member accounts that contain resources that the path can traverse.</p>
        pub fn additional_accounts(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.additional_accounts.unwrap_or_default();
            v.push(input.into());
            self.additional_accounts = Some(v);
            self
        }
        /// <p>The member accounts that contain resources that the path can traverse.</p>
        pub fn set_additional_accounts(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.additional_accounts = input;
            self
        }
        /// Appends an item to `filter_in_arns`.
        ///
        /// To override the contents of this collection use [`set_filter_in_arns`](Self::set_filter_in_arns).
        ///
        /// <p>The Amazon Resource Names (ARN) of the Amazon Web Services resources that the path must traverse.</p>
        pub fn filter_in_arns(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.filter_in_arns.unwrap_or_default();
            v.push(input.into());
            self.filter_in_arns = Some(v);
            self
        }
        /// <p>The Amazon Resource Names (ARN) of the Amazon Web Services resources that the path must traverse.</p>
        pub fn set_filter_in_arns(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.filter_in_arns = input;
            self
        }
        /// <p>The time the analysis started.</p>
        pub fn start_date(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.start_date = Some(input);
            self
        }
        /// <p>The time the analysis started.</p>
        pub fn set_start_date(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.start_date = input;
            self
        }
        /// <p>The status of the network insights analysis.</p>
        pub fn status(mut self, input: crate::model::AnalysisStatus) -> Self {
            self.status = Some(input);
            self
        }
        /// <p>The status of the network insights analysis.</p>
        pub fn set_status(
            mut self,
            input: std::option::Option<crate::model::AnalysisStatus>,
        ) -> Self {
            self.status = input;
            self
        }
        /// <p>The status message, if the status is <code>failed</code>.</p>
        pub fn status_message(mut self, input: impl Into<std::string::String>) -> Self {
            self.status_message = Some(input.into());
            self
        }
        /// <p>The status message, if the status is <code>failed</code>.</p>
        pub fn set_status_message(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.status_message = input;
            self
        }
        /// <p>The warning message.</p>
        pub fn warning_message(mut self, input: impl Into<std::string::String>) -> Self {
            self.warning_message = Some(input.into());
            self
        }
        /// <p>The warning message.</p>
        pub fn set_warning_message(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.warning_message = input;
            self
        }
        /// <p>Indicates whether the destination is reachable from the source.</p>
        pub fn network_path_found(mut self, input: bool) -> Self {
            self.network_path_found = Some(input);
            self
        }
        /// <p>Indicates whether the destination is reachable from the source.</p>
        pub fn set_network_path_found(mut self, input: std::option::Option<bool>) -> Self {
            self.network_path_found = input;
            self
        }
        /// Appends an item to `forward_path_components`.
        ///
        /// To override the contents of this collection use [`set_forward_path_components`](Self::set_forward_path_components).
        ///
        /// <p>The components in the path from source to destination.</p>
        pub fn forward_path_components(mut self, input: crate::model::PathComponent) -> Self {
            let mut v = self.forward_path_components.unwrap_or_default();
            v.push(input);
            self.forward_path_components = Some(v);
            self
        }
        /// <p>The components in the path from source to destination.</p>
        pub fn set_forward_path_components(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::PathComponent>>,
        ) -> Self {
            self.forward_path_components = input;
            self
        }
        /// Appends an item to `return_path_components`.
        ///
        /// To override the contents of this collection use [`set_return_path_components`](Self::set_return_path_components).
        ///
        /// <p>The components in the path from destination to source.</p>
        pub fn return_path_components(mut self, input: crate::model::PathComponent) -> Self {
            let mut v = self.return_path_components.unwrap_or_default();
            v.push(input);
            self.return_path_components = Some(v);
            self
        }
        /// <p>The components in the path from destination to source.</p>
        pub fn set_return_path_components(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::PathComponent>>,
        ) -> Self {
            self.return_path_components = input;
            self
        }
        /// Appends an item to `explanations`.
        ///
        /// To override the contents of this collection use [`set_explanations`](Self::set_explanations).
        ///
        /// <p>The explanations. For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/reachability/explanation-codes.html">Reachability Analyzer explanation codes</a>.</p>
        pub fn explanations(mut self, input: crate::model::Explanation) -> Self {
            let mut v = self.explanations.unwrap_or_default();
            v.push(input);
            self.explanations = Some(v);
            self
        }
        /// <p>The explanations. For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/reachability/explanation-codes.html">Reachability Analyzer explanation codes</a>.</p>
        pub fn set_explanations(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Explanation>>,
        ) -> Self {
            self.explanations = input;
            self
        }
        /// Appends an item to `alternate_path_hints`.
        ///
        /// To override the contents of this collection use [`set_alternate_path_hints`](Self::set_alternate_path_hints).
        ///
        /// <p>Potential intermediate components.</p>
        pub fn alternate_path_hints(mut self, input: crate::model::AlternatePathHint) -> Self {
            let mut v = self.alternate_path_hints.unwrap_or_default();
            v.push(input);
            self.alternate_path_hints = Some(v);
            self
        }
        /// <p>Potential intermediate components.</p>
        pub fn set_alternate_path_hints(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::AlternatePathHint>>,
        ) -> Self {
            self.alternate_path_hints = input;
            self
        }
        /// Appends an item to `suggested_accounts`.
        ///
        /// To override the contents of this collection use [`set_suggested_accounts`](Self::set_suggested_accounts).
        ///
        /// <p>Potential intermediate accounts.</p>
        pub fn suggested_accounts(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.suggested_accounts.unwrap_or_default();
            v.push(input.into());
            self.suggested_accounts = Some(v);
            self
        }
        /// <p>Potential intermediate accounts.</p>
        pub fn set_suggested_accounts(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.suggested_accounts = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>The tags.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>The tags.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// Consumes the builder and constructs a [`NetworkInsightsAnalysis`](crate::model::NetworkInsightsAnalysis).
        pub fn build(self) -> crate::model::NetworkInsightsAnalysis {
            crate::model::NetworkInsightsAnalysis {
                network_insights_analysis_id: self.network_insights_analysis_id,
                network_insights_analysis_arn: self.network_insights_analysis_arn,
                network_insights_path_id: self.network_insights_path_id,
                additional_accounts: self.additional_accounts,
                filter_in_arns: self.filter_in_arns,
                start_date: self.start_date,
                status: self.status,
                status_message: self.status_message,
                warning_message: self.warning_message,
                network_path_found: self.network_path_found,
                forward_path_components: self.forward_path_components,
                return_path_components: self.return_path_components,
                explanations: self.explanations,
                alternate_path_hints: self.alternate_path_hints,
                suggested_accounts: self.suggested_accounts,
                tags: self.tags,
            }
        }
    }
}
impl NetworkInsightsAnalysis {
    /// Creates a new builder-style object to manufacture [`NetworkInsightsAnalysis`](crate::model::NetworkInsightsAnalysis).
    pub fn builder() -> crate::model::network_insights_analysis::Builder {
        crate::model::network_insights_analysis::Builder::default()
    }
}

/// <p>Describes a tag.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Tag {
    /// <p>The key of the tag.</p>
    /// <p>Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with <code>aws:</code>.</p>
    #[doc(hidden)]
    pub key: std::option::Option<std::string::String>,
    /// <p>The value of the tag.</p>
    /// <p>Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.</p>
    #[doc(hidden)]
    pub value: std::option::Option<std::string::String>,
}
impl Tag {
    /// <p>The key of the tag.</p>
    /// <p>Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with <code>aws:</code>.</p>
    pub fn key(&self) -> std::option::Option<&str> {
        self.key.as_deref()
    }
    /// <p>The value of the tag.</p>
    /// <p>Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.</p>
    pub fn value(&self) -> std::option::Option<&str> {
        self.value.as_deref()
    }
}
/// See [`Tag`](crate::model::Tag).
pub mod tag {

    /// A builder for [`Tag`](crate::model::Tag).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) key: std::option::Option<std::string::String>,
        pub(crate) value: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The key of the tag.</p>
        /// <p>Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with <code>aws:</code>.</p>
        pub fn key(mut self, input: impl Into<std::string::String>) -> Self {
            self.key = Some(input.into());
            self
        }
        /// <p>The key of the tag.</p>
        /// <p>Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with <code>aws:</code>.</p>
        pub fn set_key(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.key = input;
            self
        }
        /// <p>The value of the tag.</p>
        /// <p>Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.</p>
        pub fn value(mut self, input: impl Into<std::string::String>) -> Self {
            self.value = Some(input.into());
            self
        }
        /// <p>The value of the tag.</p>
        /// <p>Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.</p>
        pub fn set_value(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.value = input;
            self
        }
        /// Consumes the builder and constructs a [`Tag`](crate::model::Tag).
        pub fn build(self) -> crate::model::Tag {
            crate::model::Tag {
                key: self.key,
                value: self.value,
            }
        }
    }
}
impl Tag {
    /// Creates a new builder-style object to manufacture [`Tag`](crate::model::Tag).
    pub fn builder() -> crate::model::tag::Builder {
        crate::model::tag::Builder::default()
    }
}

/// <p>Describes an potential intermediate component of a feasible path.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AlternatePathHint {
    /// <p>The ID of the component.</p>
    #[doc(hidden)]
    pub component_id: std::option::Option<std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the component.</p>
    #[doc(hidden)]
    pub component_arn: std::option::Option<std::string::String>,
}
impl AlternatePathHint {
    /// <p>The ID of the component.</p>
    pub fn component_id(&self) -> std::option::Option<&str> {
        self.component_id.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the component.</p>
    pub fn component_arn(&self) -> std::option::Option<&str> {
        self.component_arn.as_deref()
    }
}
/// See [`AlternatePathHint`](crate::model::AlternatePathHint).
pub mod alternate_path_hint {

    /// A builder for [`AlternatePathHint`](crate::model::AlternatePathHint).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) component_id: std::option::Option<std::string::String>,
        pub(crate) component_arn: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The ID of the component.</p>
        pub fn component_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.component_id = Some(input.into());
            self
        }
        /// <p>The ID of the component.</p>
        pub fn set_component_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.component_id = input;
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the component.</p>
        pub fn component_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.component_arn = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the component.</p>
        pub fn set_component_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.component_arn = input;
            self
        }
        /// Consumes the builder and constructs a [`AlternatePathHint`](crate::model::AlternatePathHint).
        pub fn build(self) -> crate::model::AlternatePathHint {
            crate::model::AlternatePathHint {
                component_id: self.component_id,
                component_arn: self.component_arn,
            }
        }
    }
}
impl AlternatePathHint {
    /// Creates a new builder-style object to manufacture [`AlternatePathHint`](crate::model::AlternatePathHint).
    pub fn builder() -> crate::model::alternate_path_hint::Builder {
        crate::model::alternate_path_hint::Builder::default()
    }
}

/// <p>Describes an explanation code for an unreachable path. For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/reachability/explanation-codes.html">Reachability Analyzer explanation codes</a>.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Explanation {
    /// <p>The network ACL.</p>
    #[doc(hidden)]
    pub acl: std::option::Option<crate::model::AnalysisComponent>,
    /// <p>The network ACL rule.</p>
    #[doc(hidden)]
    pub acl_rule: std::option::Option<crate::model::AnalysisAclRule>,
    /// <p>The IPv4 address, in CIDR notation.</p>
    #[doc(hidden)]
    pub address: std::option::Option<std::string::String>,
    /// <p>The IPv4 addresses, in CIDR notation.</p>
    #[doc(hidden)]
    pub addresses: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>The resource to which the component is attached.</p>
    #[doc(hidden)]
    pub attached_to: std::option::Option<crate::model::AnalysisComponent>,
    /// <p>The Availability Zones.</p>
    #[doc(hidden)]
    pub availability_zones: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>The CIDR ranges.</p>
    #[doc(hidden)]
    pub cidrs: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>The component.</p>
    #[doc(hidden)]
    pub component: std::option::Option<crate::model::AnalysisComponent>,
    /// <p>The customer gateway.</p>
    #[doc(hidden)]
    pub customer_gateway: std::option::Option<crate::model::AnalysisComponent>,
    /// <p>The destination.</p>
    #[doc(hidden)]
    pub destination: std::option::Option<crate::model::AnalysisComponent>,
    /// <p>The destination VPC.</p>
    #[doc(hidden)]
    pub destination_vpc: std::option::Option<crate::model::AnalysisComponent>,
    /// <p>The direction. The following are the possible values:</p>
    /// <ul>
    /// <li> <p>egress</p> </li>
    /// <li> <p>ingress</p> </li>
    /// </ul>
    #[doc(hidden)]
    pub direction: std::option::Option<std::string::String>,
    /// <p>The explanation code.</p>
    #[doc(hidden)]
    pub explanation_code: std::option::Option<std::string::String>,
    /// <p>The route table.</p>
    #[doc(hidden)]
    pub ingress_route_table: std::option::Option<crate::model::AnalysisComponent>,
    /// <p>The internet gateway.</p>
    #[doc(hidden)]
    pub internet_gateway: std::option::Option<crate::model::AnalysisComponent>,
    /// <p>The Amazon Resource Name (ARN) of the load balancer.</p>
    #[doc(hidden)]
    pub load_balancer_arn: std::option::Option<std::string::String>,
    /// <p>The listener for a Classic Load Balancer.</p>
    #[doc(hidden)]
    pub classic_load_balancer_listener:
        std::option::Option<crate::model::AnalysisLoadBalancerListener>,
    /// <p>The listener port of the load balancer.</p>
    #[doc(hidden)]
    pub load_balancer_listener_port: std::option::Option<i32>,
    /// <p>The target.</p>
    #[doc(hidden)]
    pub load_balancer_target: std::option::Option<crate::model::AnalysisLoadBalancerTarget>,
    /// <p>The target group.</p>
    #[doc(hidden)]
    pub load_balancer_target_group: std::option::Option<crate::model::AnalysisComponent>,
    /// <p>The target groups.</p>
    #[doc(hidden)]
    pub load_balancer_target_groups:
        std::option::Option<std::vec::Vec<crate::model::AnalysisComponent>>,
    /// <p>The target port.</p>
    #[doc(hidden)]
    pub load_balancer_target_port: std::option::Option<i32>,
    /// <p>The load balancer listener.</p>
    #[doc(hidden)]
    pub elastic_load_balancer_listener: std::option::Option<crate::model::AnalysisComponent>,
    /// <p>The missing component.</p>
    #[doc(hidden)]
    pub missing_component: std::option::Option<std::string::String>,
    /// <p>The NAT gateway.</p>
    #[doc(hidden)]
    pub nat_gateway: std::option::Option<crate::model::AnalysisComponent>,
    /// <p>The network interface.</p>
    #[doc(hidden)]
    pub network_interface: std::option::Option<crate::model::AnalysisComponent>,
    /// <p>The packet field.</p>
    #[doc(hidden)]
    pub packet_field: std::option::Option<std::string::String>,
    /// <p>The VPC peering connection.</p>
    #[doc(hidden)]
    pub vpc_peering_connection: std::option::Option<crate::model::AnalysisComponent>,
    /// <p>The port.</p>
    #[doc(hidden)]
    pub port: std::option::Option<i32>,
    /// <p>The port ranges.</p>
    #[doc(hidden)]
    pub port_ranges: std::option::Option<std::vec::Vec<crate::model::PortRange>>,
    /// <p>The prefix list.</p>
    #[doc(hidden)]
    pub prefix_list: std::option::Option<crate::model::AnalysisComponent>,
    /// <p>The protocols.</p>
    #[doc(hidden)]
    pub protocols: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>The route table route.</p>
    #[doc(hidden)]
    pub route_table_route: std::option::Option<crate::model::AnalysisRouteTableRoute>,
    /// <p>The route table.</p>
    #[doc(hidden)]
    pub route_table: std::option::Option<crate::model::AnalysisComponent>,
    /// <p>The security group.</p>
    #[doc(hidden)]
    pub security_group: std::option::Option<crate::model::AnalysisComponent>,
    /// <p>The security group rule.</p>
    #[doc(hidden)]
    pub security_group_rule: std::option::Option<crate::model::AnalysisSecurityGroupRule>,
    /// <p>The security groups.</p>
    #[doc(hidden)]
    pub security_groups: std::option::Option<std::vec::Vec<crate::model::AnalysisComponent>>,
    /// <p>The source VPC.</p>
    #[doc(hidden)]
    pub source_vpc: std::option::Option<crate::model::AnalysisComponent>,
    /// <p>The state.</p>
    #[doc(hidden)]
    pub state: std::option::Option<std::string::String>,
    /// <p>The subnet.</p>
    #[doc(hidden)]
    pub subnet: std::option::Option<crate::model::AnalysisComponent>,
    /// <p>The route table for the subnet.</p>
    #[doc(hidden)]
    pub subnet_route_table: std::option::Option<crate::model::AnalysisComponent>,
    /// <p>The component VPC.</p>
    #[doc(hidden)]
    pub vpc: std::option::Option<crate::model::AnalysisComponent>,
    /// <p>The VPC endpoint.</p>
    #[doc(hidden)]
    pub vpc_endpoint: std::option::Option<crate::model::AnalysisComponent>,
    /// <p>The VPN connection.</p>
    #[doc(hidden)]
    pub vpn_connection: std::option::Option<crate::model::AnalysisComponent>,
    /// <p>The VPN gateway.</p>
    #[doc(hidden)]
    pub vpn_gateway: std::option::Option<crate::model::AnalysisComponent>,
    /// <p>The transit gateway.</p>
    #[doc(hidden)]
    pub transit_gateway: std::option::Option<crate::model::AnalysisComponent>,
    /// <p>The transit gateway route table.</p>
    #[doc(hidden)]
    pub transit_gateway_route_table: std::option::Option<crate::model::AnalysisComponent>,
    /// <p>The transit gateway route table route.</p>
    #[doc(hidden)]
    pub transit_gateway_route_table_route:
        std::option::Option<crate::model::TransitGatewayRouteTableRoute>,
    /// <p>The transit gateway attachment.</p>
    #[doc(hidden)]
    pub transit_gateway_attachment: std::option::Option<crate::model::AnalysisComponent>,
    /// <p>The Amazon Web Services account for the component.</p>
    #[doc(hidden)]
    pub component_account: std::option::Option<std::string::String>,
    /// <p>The Region for the component.</p>
    #[doc(hidden)]
    pub component_region: std::option::Option<std::string::String>,
}
impl Explanation {
    /// <p>The network ACL.</p>
    pub fn acl(&self) -> std::option::Option<&crate::model::AnalysisComponent> {
        self.acl.as_ref()
    }
    /// <p>The network ACL rule.</p>
    pub fn acl_rule(&self) -> std::option::Option<&crate::model::AnalysisAclRule> {
        self.acl_rule.as_ref()
    }
    /// <p>The IPv4 address, in CIDR notation.</p>
    pub fn address(&self) -> std::option::Option<&str> {
        self.address.as_deref()
    }
    /// <p>The IPv4 addresses, in CIDR notation.</p>
    pub fn addresses(&self) -> std::option::Option<&[std::string::String]> {
        self.addresses.as_deref()
    }
    /// <p>The resource to which the component is attached.</p>
    pub fn attached_to(&self) -> std::option::Option<&crate::model::AnalysisComponent> {
        self.attached_to.as_ref()
    }
    /// <p>The Availability Zones.</p>
    pub fn availability_zones(&self) -> std::option::Option<&[std::string::String]> {
        self.availability_zones.as_deref()
    }
    /// <p>The CIDR ranges.</p>
    pub fn cidrs(&self) -> std::option::Option<&[std::string::String]> {
        self.cidrs.as_deref()
    }
    /// <p>The component.</p>
    pub fn component(&self) -> std::option::Option<&crate::model::AnalysisComponent> {
        self.component.as_ref()
    }
    /// <p>The customer gateway.</p>
    pub fn customer_gateway(&self) -> std::option::Option<&crate::model::AnalysisComponent> {
        self.customer_gateway.as_ref()
    }
    /// <p>The destination.</p>
    pub fn destination(&self) -> std::option::Option<&crate::model::AnalysisComponent> {
        self.destination.as_ref()
    }
    /// <p>The destination VPC.</p>
    pub fn destination_vpc(&self) -> std::option::Option<&crate::model::AnalysisComponent> {
        self.destination_vpc.as_ref()
    }
    /// <p>The direction. The following are the possible values:</p>
    /// <ul>
    /// <li> <p>egress</p> </li>
    /// <li> <p>ingress</p> </li>
    /// </ul>
    pub fn direction(&self) -> std::option::Option<&str> {
        self.direction.as_deref()
    }
    /// <p>The explanation code.</p>
    pub fn explanation_code(&self) -> std::option::Option<&str> {
        self.explanation_code.as_deref()
    }
    /// <p>The route table.</p>
    pub fn ingress_route_table(&self) -> std::option::Option<&crate::model::AnalysisComponent> {
        self.ingress_route_table.as_ref()
    }
    /// <p>The internet gateway.</p>
    pub fn internet_gateway(&self) -> std::option::Option<&crate::model::AnalysisComponent> {
        self.internet_gateway.as_ref()
    }
    /// <p>The Amazon Resource Name (ARN) of the load balancer.</p>
    pub fn load_balancer_arn(&self) -> std::option::Option<&str> {
        self.load_balancer_arn.as_deref()
    }
    /// <p>The listener for a Classic Load Balancer.</p>
    pub fn classic_load_balancer_listener(
        &self,
    ) -> std::option::Option<&crate::model::AnalysisLoadBalancerListener> {
        self.classic_load_balancer_listener.as_ref()
    }
    /// <p>The listener port of the load balancer.</p>
    pub fn load_balancer_listener_port(&self) -> std::option::Option<i32> {
        self.load_balancer_listener_port
    }
    /// <p>The target.</p>
    pub fn load_balancer_target(
        &self,
    ) -> std::option::Option<&crate::model::AnalysisLoadBalancerTarget> {
        self.load_balancer_target.as_ref()
    }
    /// <p>The target group.</p>
    pub fn load_balancer_target_group(
        &self,
    ) -> std::option::Option<&crate::model::AnalysisComponent> {
        self.load_balancer_target_group.as_ref()
    }
    /// <p>The target groups.</p>
    pub fn load_balancer_target_groups(
        &self,
    ) -> std::option::Option<&[crate::model::AnalysisComponent]> {
        self.load_balancer_target_groups.as_deref()
    }
    /// <p>The target port.</p>
    pub fn load_balancer_target_port(&self) -> std::option::Option<i32> {
        self.load_balancer_target_port
    }
    /// <p>The load balancer listener.</p>
    pub fn elastic_load_balancer_listener(
        &self,
    ) -> std::option::Option<&crate::model::AnalysisComponent> {
        self.elastic_load_balancer_listener.as_ref()
    }
    /// <p>The missing component.</p>
    pub fn missing_component(&self) -> std::option::Option<&str> {
        self.missing_component.as_deref()
    }
    /// <p>The NAT gateway.</p>
    pub fn nat_gateway(&self) -> std::option::Option<&crate::model::AnalysisComponent> {
        self.nat_gateway.as_ref()
    }
    /// <p>The network interface.</p>
    pub fn network_interface(&self) -> std::option::Option<&crate::model::AnalysisComponent> {
        self.network_interface.as_ref()
    }
    /// <p>The packet field.</p>
    pub fn packet_field(&self) -> std::option::Option<&str> {
        self.packet_field.as_deref()
    }
    /// <p>The VPC peering connection.</p>
    pub fn vpc_peering_connection(&self) -> std::option::Option<&crate::model::AnalysisComponent> {
        self.vpc_peering_connection.as_ref()
    }
    /// <p>The port.</p>
    pub fn port(&self) -> std::option::Option<i32> {
        self.port
    }
    /// <p>The port ranges.</p>
    pub fn port_ranges(&self) -> std::option::Option<&[crate::model::PortRange]> {
        self.port_ranges.as_deref()
    }
    /// <p>The prefix list.</p>
    pub fn prefix_list(&self) -> std::option::Option<&crate::model::AnalysisComponent> {
        self.prefix_list.as_ref()
    }
    /// <p>The protocols.</p>
    pub fn protocols(&self) -> std::option::Option<&[std::string::String]> {
        self.protocols.as_deref()
    }
    /// <p>The route table route.</p>
    pub fn route_table_route(&self) -> std::option::Option<&crate::model::AnalysisRouteTableRoute> {
        self.route_table_route.as_ref()
    }
    /// <p>The route table.</p>
    pub fn route_table(&self) -> std::option::Option<&crate::model::AnalysisComponent> {
        self.route_table.as_ref()
    }
    /// <p>The security group.</p>
    pub fn security_group(&self) -> std::option::Option<&crate::model::AnalysisComponent> {
        self.security_group.as_ref()
    }
    /// <p>The security group rule.</p>
    pub fn security_group_rule(
        &self,
    ) -> std::option::Option<&crate::model::AnalysisSecurityGroupRule> {
        self.security_group_rule.as_ref()
    }
    /// <p>The security groups.</p>
    pub fn security_groups(&self) -> std::option::Option<&[crate::model::AnalysisComponent]> {
        self.security_groups.as_deref()
    }
    /// <p>The source VPC.</p>
    pub fn source_vpc(&self) -> std::option::Option<&crate::model::AnalysisComponent> {
        self.source_vpc.as_ref()
    }
    /// <p>The state.</p>
    pub fn state(&self) -> std::option::Option<&str> {
        self.state.as_deref()
    }
    /// <p>The subnet.</p>
    pub fn subnet(&self) -> std::option::Option<&crate::model::AnalysisComponent> {
        self.subnet.as_ref()
    }
    /// <p>The route table for the subnet.</p>
    pub fn subnet_route_table(&self) -> std::option::Option<&crate::model::AnalysisComponent> {
        self.subnet_route_table.as_ref()
    }
    /// <p>The component VPC.</p>
    pub fn vpc(&self) -> std::option::Option<&crate::model::AnalysisComponent> {
        self.vpc.as_ref()
    }
    /// <p>The VPC endpoint.</p>
    pub fn vpc_endpoint(&self) -> std::option::Option<&crate::model::AnalysisComponent> {
        self.vpc_endpoint.as_ref()
    }
    /// <p>The VPN connection.</p>
    pub fn vpn_connection(&self) -> std::option::Option<&crate::model::AnalysisComponent> {
        self.vpn_connection.as_ref()
    }
    /// <p>The VPN gateway.</p>
    pub fn vpn_gateway(&self) -> std::option::Option<&crate::model::AnalysisComponent> {
        self.vpn_gateway.as_ref()
    }
    /// <p>The transit gateway.</p>
    pub fn transit_gateway(&self) -> std::option::Option<&crate::model::AnalysisComponent> {
        self.transit_gateway.as_ref()
    }
    /// <p>The transit gateway route table.</p>
    pub fn transit_gateway_route_table(
        &self,
    ) -> std::option::Option<&crate::model::AnalysisComponent> {
        self.transit_gateway_route_table.as_ref()
    }
    /// <p>The transit gateway route table route.</p>
    pub fn transit_gateway_route_table_route(
        &self,
    ) -> std::option::Option<&crate::model::TransitGatewayRouteTableRoute> {
        self.transit_gateway_route_table_route.as_ref()
    }
    /// <p>The transit gateway attachment.</p>
    pub fn transit_gateway_attachment(
        &self,
    ) -> std::option::Option<&crate::model::AnalysisComponent> {
        self.transit_gateway_attachment.as_ref()
    }
    /// <p>The Amazon Web Services account for the component.</p>
    pub fn component_account(&self) -> std::option::Option<&str> {
        self.component_account.as_deref()
    }
    /// <p>The Region for the component.</p>
    pub fn component_region(&self) -> std::option::Option<&str> {
        self.component_region.as_deref()
    }
}
/// See [`Explanation`](crate::model::Explanation).
pub mod explanation {

    /// A builder for [`Explanation`](crate::model::Explanation).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) acl: std::option::Option<crate::model::AnalysisComponent>,
        pub(crate) acl_rule: std::option::Option<crate::model::AnalysisAclRule>,
        pub(crate) address: std::option::Option<std::string::String>,
        pub(crate) addresses: std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) attached_to: std::option::Option<crate::model::AnalysisComponent>,
        pub(crate) availability_zones: std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) cidrs: std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) component: std::option::Option<crate::model::AnalysisComponent>,
        pub(crate) customer_gateway: std::option::Option<crate::model::AnalysisComponent>,
        pub(crate) destination: std::option::Option<crate::model::AnalysisComponent>,
        pub(crate) destination_vpc: std::option::Option<crate::model::AnalysisComponent>,
        pub(crate) direction: std::option::Option<std::string::String>,
        pub(crate) explanation_code: std::option::Option<std::string::String>,
        pub(crate) ingress_route_table: std::option::Option<crate::model::AnalysisComponent>,
        pub(crate) internet_gateway: std::option::Option<crate::model::AnalysisComponent>,
        pub(crate) load_balancer_arn: std::option::Option<std::string::String>,
        pub(crate) classic_load_balancer_listener:
            std::option::Option<crate::model::AnalysisLoadBalancerListener>,
        pub(crate) load_balancer_listener_port: std::option::Option<i32>,
        pub(crate) load_balancer_target:
            std::option::Option<crate::model::AnalysisLoadBalancerTarget>,
        pub(crate) load_balancer_target_group: std::option::Option<crate::model::AnalysisComponent>,
        pub(crate) load_balancer_target_groups:
            std::option::Option<std::vec::Vec<crate::model::AnalysisComponent>>,
        pub(crate) load_balancer_target_port: std::option::Option<i32>,
        pub(crate) elastic_load_balancer_listener:
            std::option::Option<crate::model::AnalysisComponent>,
        pub(crate) missing_component: std::option::Option<std::string::String>,
        pub(crate) nat_gateway: std::option::Option<crate::model::AnalysisComponent>,
        pub(crate) network_interface: std::option::Option<crate::model::AnalysisComponent>,
        pub(crate) packet_field: std::option::Option<std::string::String>,
        pub(crate) vpc_peering_connection: std::option::Option<crate::model::AnalysisComponent>,
        pub(crate) port: std::option::Option<i32>,
        pub(crate) port_ranges: std::option::Option<std::vec::Vec<crate::model::PortRange>>,
        pub(crate) prefix_list: std::option::Option<crate::model::AnalysisComponent>,
        pub(crate) protocols: std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) route_table_route: std::option::Option<crate::model::AnalysisRouteTableRoute>,
        pub(crate) route_table: std::option::Option<crate::model::AnalysisComponent>,
        pub(crate) security_group: std::option::Option<crate::model::AnalysisComponent>,
        pub(crate) security_group_rule:
            std::option::Option<crate::model::AnalysisSecurityGroupRule>,
        pub(crate) security_groups:
            std::option::Option<std::vec::Vec<crate::model::AnalysisComponent>>,
        pub(crate) source_vpc: std::option::Option<crate::model::AnalysisComponent>,
        pub(crate) state: std::option::Option<std::string::String>,
        pub(crate) subnet: std::option::Option<crate::model::AnalysisComponent>,
        pub(crate) subnet_route_table: std::option::Option<crate::model::AnalysisComponent>,
        pub(crate) vpc: std::option::Option<crate::model::AnalysisComponent>,
        pub(crate) vpc_endpoint: std::option::Option<crate::model::AnalysisComponent>,
        pub(crate) vpn_connection: std::option::Option<crate::model::AnalysisComponent>,
        pub(crate) vpn_gateway: std::option::Option<crate::model::AnalysisComponent>,
        pub(crate) transit_gateway: std::option::Option<crate::model::AnalysisComponent>,
        pub(crate) transit_gateway_route_table:
            std::option::Option<crate::model::AnalysisComponent>,
        pub(crate) transit_gateway_route_table_route:
            std::option::Option<crate::model::TransitGatewayRouteTableRoute>,
        pub(crate) transit_gateway_attachment: std::option::Option<crate::model::AnalysisComponent>,
        pub(crate) component_account: std::option::Option<std::string::String>,
        pub(crate) component_region: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The network ACL.</p>
        pub fn acl(mut self, input: crate::model::AnalysisComponent) -> Self {
            self.acl = Some(input);
            self
        }
        /// <p>The network ACL.</p>
        pub fn set_acl(
            mut self,
            input: std::option::Option<crate::model::AnalysisComponent>,
        ) -> Self {
            self.acl = input;
            self
        }
        /// <p>The network ACL rule.</p>
        pub fn acl_rule(mut self, input: crate::model::AnalysisAclRule) -> Self {
            self.acl_rule = Some(input);
            self
        }
        /// <p>The network ACL rule.</p>
        pub fn set_acl_rule(
            mut self,
            input: std::option::Option<crate::model::AnalysisAclRule>,
        ) -> Self {
            self.acl_rule = input;
            self
        }
        /// <p>The IPv4 address, in CIDR notation.</p>
        pub fn address(mut self, input: impl Into<std::string::String>) -> Self {
            self.address = Some(input.into());
            self
        }
        /// <p>The IPv4 address, in CIDR notation.</p>
        pub fn set_address(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.address = input;
            self
        }
        /// Appends an item to `addresses`.
        ///
        /// To override the contents of this collection use [`set_addresses`](Self::set_addresses).
        ///
        /// <p>The IPv4 addresses, in CIDR notation.</p>
        pub fn addresses(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.addresses.unwrap_or_default();
            v.push(input.into());
            self.addresses = Some(v);
            self
        }
        /// <p>The IPv4 addresses, in CIDR notation.</p>
        pub fn set_addresses(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.addresses = input;
            self
        }
        /// <p>The resource to which the component is attached.</p>
        pub fn attached_to(mut self, input: crate::model::AnalysisComponent) -> Self {
            self.attached_to = Some(input);
            self
        }
        /// <p>The resource to which the component is attached.</p>
        pub fn set_attached_to(
            mut self,
            input: std::option::Option<crate::model::AnalysisComponent>,
        ) -> Self {
            self.attached_to = input;
            self
        }
        /// Appends an item to `availability_zones`.
        ///
        /// To override the contents of this collection use [`set_availability_zones`](Self::set_availability_zones).
        ///
        /// <p>The Availability Zones.</p>
        pub fn availability_zones(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.availability_zones.unwrap_or_default();
            v.push(input.into());
            self.availability_zones = Some(v);
            self
        }
        /// <p>The Availability Zones.</p>
        pub fn set_availability_zones(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.availability_zones = input;
            self
        }
        /// Appends an item to `cidrs`.
        ///
        /// To override the contents of this collection use [`set_cidrs`](Self::set_cidrs).
        ///
        /// <p>The CIDR ranges.</p>
        pub fn cidrs(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.cidrs.unwrap_or_default();
            v.push(input.into());
            self.cidrs = Some(v);
            self
        }
        /// <p>The CIDR ranges.</p>
        pub fn set_cidrs(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.cidrs = input;
            self
        }
        /// <p>The component.</p>
        pub fn component(mut self, input: crate::model::AnalysisComponent) -> Self {
            self.component = Some(input);
            self
        }
        /// <p>The component.</p>
        pub fn set_component(
            mut self,
            input: std::option::Option<crate::model::AnalysisComponent>,
        ) -> Self {
            self.component = input;
            self
        }
        /// <p>The customer gateway.</p>
        pub fn customer_gateway(mut self, input: crate::model::AnalysisComponent) -> Self {
            self.customer_gateway = Some(input);
            self
        }
        /// <p>The customer gateway.</p>
        pub fn set_customer_gateway(
            mut self,
            input: std::option::Option<crate::model::AnalysisComponent>,
        ) -> Self {
            self.customer_gateway = input;
            self
        }
        /// <p>The destination.</p>
        pub fn destination(mut self, input: crate::model::AnalysisComponent) -> Self {
            self.destination = Some(input);
            self
        }
        /// <p>The destination.</p>
        pub fn set_destination(
            mut self,
            input: std::option::Option<crate::model::AnalysisComponent>,
        ) -> Self {
            self.destination = input;
            self
        }
        /// <p>The destination VPC.</p>
        pub fn destination_vpc(mut self, input: crate::model::AnalysisComponent) -> Self {
            self.destination_vpc = Some(input);
            self
        }
        /// <p>The destination VPC.</p>
        pub fn set_destination_vpc(
            mut self,
            input: std::option::Option<crate::model::AnalysisComponent>,
        ) -> Self {
            self.destination_vpc = input;
            self
        }
        /// <p>The direction. The following are the possible values:</p>
        /// <ul>
        /// <li> <p>egress</p> </li>
        /// <li> <p>ingress</p> </li>
        /// </ul>
        pub fn direction(mut self, input: impl Into<std::string::String>) -> Self {
            self.direction = Some(input.into());
            self
        }
        /// <p>The direction. The following are the possible values:</p>
        /// <ul>
        /// <li> <p>egress</p> </li>
        /// <li> <p>ingress</p> </li>
        /// </ul>
        pub fn set_direction(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.direction = input;
            self
        }
        /// <p>The explanation code.</p>
        pub fn explanation_code(mut self, input: impl Into<std::string::String>) -> Self {
            self.explanation_code = Some(input.into());
            self
        }
        /// <p>The explanation code.</p>
        pub fn set_explanation_code(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.explanation_code = input;
            self
        }
        /// <p>The route table.</p>
        pub fn ingress_route_table(mut self, input: crate::model::AnalysisComponent) -> Self {
            self.ingress_route_table = Some(input);
            self
        }
        /// <p>The route table.</p>
        pub fn set_ingress_route_table(
            mut self,
            input: std::option::Option<crate::model::AnalysisComponent>,
        ) -> Self {
            self.ingress_route_table = input;
            self
        }
        /// <p>The internet gateway.</p>
        pub fn internet_gateway(mut self, input: crate::model::AnalysisComponent) -> Self {
            self.internet_gateway = Some(input);
            self
        }
        /// <p>The internet gateway.</p>
        pub fn set_internet_gateway(
            mut self,
            input: std::option::Option<crate::model::AnalysisComponent>,
        ) -> Self {
            self.internet_gateway = input;
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the load balancer.</p>
        pub fn load_balancer_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.load_balancer_arn = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the load balancer.</p>
        pub fn set_load_balancer_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.load_balancer_arn = input;
            self
        }
        /// <p>The listener for a Classic Load Balancer.</p>
        pub fn classic_load_balancer_listener(
            mut self,
            input: crate::model::AnalysisLoadBalancerListener,
        ) -> Self {
            self.classic_load_balancer_listener = Some(input);
            self
        }
        /// <p>The listener for a Classic Load Balancer.</p>
        pub fn set_classic_load_balancer_listener(
            mut self,
            input: std::option::Option<crate::model::AnalysisLoadBalancerListener>,
        ) -> Self {
            self.classic_load_balancer_listener = input;
            self
        }
        /// <p>The listener port of the load balancer.</p>
        pub fn load_balancer_listener_port(mut self, input: i32) -> Self {
            self.load_balancer_listener_port = Some(input);
            self
        }
        /// <p>The listener port of the load balancer.</p>
        pub fn set_load_balancer_listener_port(mut self, input: std::option::Option<i32>) -> Self {
            self.load_balancer_listener_port = input;
            self
        }
        /// <p>The target.</p>
        pub fn load_balancer_target(
            mut self,
            input: crate::model::AnalysisLoadBalancerTarget,
        ) -> Self {
            self.load_balancer_target = Some(input);
            self
        }
        /// <p>The target.</p>
        pub fn set_load_balancer_target(
            mut self,
            input: std::option::Option<crate::model::AnalysisLoadBalancerTarget>,
        ) -> Self {
            self.load_balancer_target = input;
            self
        }
        /// <p>The target group.</p>
        pub fn load_balancer_target_group(
            mut self,
            input: crate::model::AnalysisComponent,
        ) -> Self {
            self.load_balancer_target_group = Some(input);
            self
        }
        /// <p>The target group.</p>
        pub fn set_load_balancer_target_group(
            mut self,
            input: std::option::Option<crate::model::AnalysisComponent>,
        ) -> Self {
            self.load_balancer_target_group = input;
            self
        }
        /// Appends an item to `load_balancer_target_groups`.
        ///
        /// To override the contents of this collection use [`set_load_balancer_target_groups`](Self::set_load_balancer_target_groups).
        ///
        /// <p>The target groups.</p>
        pub fn load_balancer_target_groups(
            mut self,
            input: crate::model::AnalysisComponent,
        ) -> Self {
            let mut v = self.load_balancer_target_groups.unwrap_or_default();
            v.push(input);
            self.load_balancer_target_groups = Some(v);
            self
        }
        /// <p>The target groups.</p>
        pub fn set_load_balancer_target_groups(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::AnalysisComponent>>,
        ) -> Self {
            self.load_balancer_target_groups = input;
            self
        }
        /// <p>The target port.</p>
        pub fn load_balancer_target_port(mut self, input: i32) -> Self {
            self.load_balancer_target_port = Some(input);
            self
        }
        /// <p>The target port.</p>
        pub fn set_load_balancer_target_port(mut self, input: std::option::Option<i32>) -> Self {
            self.load_balancer_target_port = input;
            self
        }
        /// <p>The load balancer listener.</p>
        pub fn elastic_load_balancer_listener(
            mut self,
            input: crate::model::AnalysisComponent,
        ) -> Self {
            self.elastic_load_balancer_listener = Some(input);
            self
        }
        /// <p>The load balancer listener.</p>
        pub fn set_elastic_load_balancer_listener(
            mut self,
            input: std::option::Option<crate::model::AnalysisComponent>,
        ) -> Self {
            self.elastic_load_balancer_listener = input;
            self
        }
        /// <p>The missing component.</p>
        pub fn missing_component(mut self, input: impl Into<std::string::String>) -> Self {
            self.missing_component = Some(input.into());
            self
        }
        /// <p>The missing component.</p>
        pub fn set_missing_component(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.missing_component = input;
            self
        }
        /// <p>The NAT gateway.</p>
        pub fn nat_gateway(mut self, input: crate::model::AnalysisComponent) -> Self {
            self.nat_gateway = Some(input);
            self
        }
        /// <p>The NAT gateway.</p>
        pub fn set_nat_gateway(
            mut self,
            input: std::option::Option<crate::model::AnalysisComponent>,
        ) -> Self {
            self.nat_gateway = input;
            self
        }
        /// <p>The network interface.</p>
        pub fn network_interface(mut self, input: crate::model::AnalysisComponent) -> Self {
            self.network_interface = Some(input);
            self
        }
        /// <p>The network interface.</p>
        pub fn set_network_interface(
            mut self,
            input: std::option::Option<crate::model::AnalysisComponent>,
        ) -> Self {
            self.network_interface = input;
            self
        }
        /// <p>The packet field.</p>
        pub fn packet_field(mut self, input: impl Into<std::string::String>) -> Self {
            self.packet_field = Some(input.into());
            self
        }
        /// <p>The packet field.</p>
        pub fn set_packet_field(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.packet_field = input;
            self
        }
        /// <p>The VPC peering connection.</p>
        pub fn vpc_peering_connection(mut self, input: crate::model::AnalysisComponent) -> Self {
            self.vpc_peering_connection = Some(input);
            self
        }
        /// <p>The VPC peering connection.</p>
        pub fn set_vpc_peering_connection(
            mut self,
            input: std::option::Option<crate::model::AnalysisComponent>,
        ) -> Self {
            self.vpc_peering_connection = input;
            self
        }
        /// <p>The port.</p>
        pub fn port(mut self, input: i32) -> Self {
            self.port = Some(input);
            self
        }
        /// <p>The port.</p>
        pub fn set_port(mut self, input: std::option::Option<i32>) -> Self {
            self.port = input;
            self
        }
        /// Appends an item to `port_ranges`.
        ///
        /// To override the contents of this collection use [`set_port_ranges`](Self::set_port_ranges).
        ///
        /// <p>The port ranges.</p>
        pub fn port_ranges(mut self, input: crate::model::PortRange) -> Self {
            let mut v = self.port_ranges.unwrap_or_default();
            v.push(input);
            self.port_ranges = Some(v);
            self
        }
        /// <p>The port ranges.</p>
        pub fn set_port_ranges(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::PortRange>>,
        ) -> Self {
            self.port_ranges = input;
            self
        }
        /// <p>The prefix list.</p>
        pub fn prefix_list(mut self, input: crate::model::AnalysisComponent) -> Self {
            self.prefix_list = Some(input);
            self
        }
        /// <p>The prefix list.</p>
        pub fn set_prefix_list(
            mut self,
            input: std::option::Option<crate::model::AnalysisComponent>,
        ) -> Self {
            self.prefix_list = input;
            self
        }
        /// Appends an item to `protocols`.
        ///
        /// To override the contents of this collection use [`set_protocols`](Self::set_protocols).
        ///
        /// <p>The protocols.</p>
        pub fn protocols(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.protocols.unwrap_or_default();
            v.push(input.into());
            self.protocols = Some(v);
            self
        }
        /// <p>The protocols.</p>
        pub fn set_protocols(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.protocols = input;
            self
        }
        /// <p>The route table route.</p>
        pub fn route_table_route(mut self, input: crate::model::AnalysisRouteTableRoute) -> Self {
            self.route_table_route = Some(input);
            self
        }
        /// <p>The route table route.</p>
        pub fn set_route_table_route(
            mut self,
            input: std::option::Option<crate::model::AnalysisRouteTableRoute>,
        ) -> Self {
            self.route_table_route = input;
            self
        }
        /// <p>The route table.</p>
        pub fn route_table(mut self, input: crate::model::AnalysisComponent) -> Self {
            self.route_table = Some(input);
            self
        }
        /// <p>The route table.</p>
        pub fn set_route_table(
            mut self,
            input: std::option::Option<crate::model::AnalysisComponent>,
        ) -> Self {
            self.route_table = input;
            self
        }
        /// <p>The security group.</p>
        pub fn security_group(mut self, input: crate::model::AnalysisComponent) -> Self {
            self.security_group = Some(input);
            self
        }
        /// <p>The security group.</p>
        pub fn set_security_group(
            mut self,
            input: std::option::Option<crate::model::AnalysisComponent>,
        ) -> Self {
            self.security_group = input;
            self
        }
        /// <p>The security group rule.</p>
        pub fn security_group_rule(
            mut self,
            input: crate::model::AnalysisSecurityGroupRule,
        ) -> Self {
            self.security_group_rule = Some(input);
            self
        }
        /// <p>The security group rule.</p>
        pub fn set_security_group_rule(
            mut self,
            input: std::option::Option<crate::model::AnalysisSecurityGroupRule>,
        ) -> Self {
            self.security_group_rule = input;
            self
        }
        /// Appends an item to `security_groups`.
        ///
        /// To override the contents of this collection use [`set_security_groups`](Self::set_security_groups).
        ///
        /// <p>The security groups.</p>
        pub fn security_groups(mut self, input: crate::model::AnalysisComponent) -> Self {
            let mut v = self.security_groups.unwrap_or_default();
            v.push(input);
            self.security_groups = Some(v);
            self
        }
        /// <p>The security groups.</p>
        pub fn set_security_groups(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::AnalysisComponent>>,
        ) -> Self {
            self.security_groups = input;
            self
        }
        /// <p>The source VPC.</p>
        pub fn source_vpc(mut self, input: crate::model::AnalysisComponent) -> Self {
            self.source_vpc = Some(input);
            self
        }
        /// <p>The source VPC.</p>
        pub fn set_source_vpc(
            mut self,
            input: std::option::Option<crate::model::AnalysisComponent>,
        ) -> Self {
            self.source_vpc = input;
            self
        }
        /// <p>The state.</p>
        pub fn state(mut self, input: impl Into<std::string::String>) -> Self {
            self.state = Some(input.into());
            self
        }
        /// <p>The state.</p>
        pub fn set_state(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.state = input;
            self
        }
        /// <p>The subnet.</p>
        pub fn subnet(mut self, input: crate::model::AnalysisComponent) -> Self {
            self.subnet = Some(input);
            self
        }
        /// <p>The subnet.</p>
        pub fn set_subnet(
            mut self,
            input: std::option::Option<crate::model::AnalysisComponent>,
        ) -> Self {
            self.subnet = input;
            self
        }
        /// <p>The route table for the subnet.</p>
        pub fn subnet_route_table(mut self, input: crate::model::AnalysisComponent) -> Self {
            self.subnet_route_table = Some(input);
            self
        }
        /// <p>The route table for the subnet.</p>
        pub fn set_subnet_route_table(
            mut self,
            input: std::option::Option<crate::model::AnalysisComponent>,
        ) -> Self {
            self.subnet_route_table = input;
            self
        }
        /// <p>The component VPC.</p>
        pub fn vpc(mut self, input: crate::model::AnalysisComponent) -> Self {
            self.vpc = Some(input);
            self
        }
        /// <p>The component VPC.</p>
        pub fn set_vpc(
            mut self,
            input: std::option::Option<crate::model::AnalysisComponent>,
        ) -> Self {
            self.vpc = input;
            self
        }
        /// <p>The VPC endpoint.</p>
        pub fn vpc_endpoint(mut self, input: crate::model::AnalysisComponent) -> Self {
            self.vpc_endpoint = Some(input);
            self
        }
        /// <p>The VPC endpoint.</p>
        pub fn set_vpc_endpoint(
            mut self,
            input: std::option::Option<crate::model::AnalysisComponent>,
        ) -> Self {
            self.vpc_endpoint = input;
            self
        }
        /// <p>The VPN connection.</p>
        pub fn vpn_connection(mut self, input: crate::model::AnalysisComponent) -> Self {
            self.vpn_connection = Some(input);
            self
        }
        /// <p>The VPN connection.</p>
        pub fn set_vpn_connection(
            mut self,
            input: std::option::Option<crate::model::AnalysisComponent>,
        ) -> Self {
            self.vpn_connection = input;
            self
        }
        /// <p>The VPN gateway.</p>
        pub fn vpn_gateway(mut self, input: crate::model::AnalysisComponent) -> Self {
            self.vpn_gateway = Some(input);
            self
        }
        /// <p>The VPN gateway.</p>
        pub fn set_vpn_gateway(
            mut self,
            input: std::option::Option<crate::model::AnalysisComponent>,
        ) -> Self {
            self.vpn_gateway = input;
            self
        }
        /// <p>The transit gateway.</p>
        pub fn transit_gateway(mut self, input: crate::model::AnalysisComponent) -> Self {
            self.transit_gateway = Some(input);
            self
        }
        /// <p>The transit gateway.</p>
        pub fn set_transit_gateway(
            mut self,
            input: std::option::Option<crate::model::AnalysisComponent>,
        ) -> Self {
            self.transit_gateway = input;
            self
        }
        /// <p>The transit gateway route table.</p>
        pub fn transit_gateway_route_table(
            mut self,
            input: crate::model::AnalysisComponent,
        ) -> Self {
            self.transit_gateway_route_table = Some(input);
            self
        }
        /// <p>The transit gateway route table.</p>
        pub fn set_transit_gateway_route_table(
            mut self,
            input: std::option::Option<crate::model::AnalysisComponent>,
        ) -> Self {
            self.transit_gateway_route_table = input;
            self
        }
        /// <p>The transit gateway route table route.</p>
        pub fn transit_gateway_route_table_route(
            mut self,
            input: crate::model::TransitGatewayRouteTableRoute,
        ) -> Self {
            self.transit_gateway_route_table_route = Some(input);
            self
        }
        /// <p>The transit gateway route table route.</p>
        pub fn set_transit_gateway_route_table_route(
            mut self,
            input: std::option::Option<crate::model::TransitGatewayRouteTableRoute>,
        ) -> Self {
            self.transit_gateway_route_table_route = input;
            self
        }
        /// <p>The transit gateway attachment.</p>
        pub fn transit_gateway_attachment(
            mut self,
            input: crate::model::AnalysisComponent,
        ) -> Self {
            self.transit_gateway_attachment = Some(input);
            self
        }
        /// <p>The transit gateway attachment.</p>
        pub fn set_transit_gateway_attachment(
            mut self,
            input: std::option::Option<crate::model::AnalysisComponent>,
        ) -> Self {
            self.transit_gateway_attachment = input;
            self
        }
        /// <p>The Amazon Web Services account for the component.</p>
        pub fn component_account(mut self, input: impl Into<std::string::String>) -> Self {
            self.component_account = Some(input.into());
            self
        }
        /// <p>The Amazon Web Services account for the component.</p>
        pub fn set_component_account(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.component_account = input;
            self
        }
        /// <p>The Region for the component.</p>
        pub fn component_region(mut self, input: impl Into<std::string::String>) -> Self {
            self.component_region = Some(input.into());
            self
        }
        /// <p>The Region for the component.</p>
        pub fn set_component_region(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.component_region = input;
            self
        }
        /// Consumes the builder and constructs a [`Explanation`](crate::model::Explanation).
        pub fn build(self) -> crate::model::Explanation {
            crate::model::Explanation {
                acl: self.acl,
                acl_rule: self.acl_rule,
                address: self.address,
                addresses: self.addresses,
                attached_to: self.attached_to,
                availability_zones: self.availability_zones,
                cidrs: self.cidrs,
                component: self.component,
                customer_gateway: self.customer_gateway,
                destination: self.destination,
                destination_vpc: self.destination_vpc,
                direction: self.direction,
                explanation_code: self.explanation_code,
                ingress_route_table: self.ingress_route_table,
                internet_gateway: self.internet_gateway,
                load_balancer_arn: self.load_balancer_arn,
                classic_load_balancer_listener: self.classic_load_balancer_listener,
                load_balancer_listener_port: self.load_balancer_listener_port,
                load_balancer_target: self.load_balancer_target,
                load_balancer_target_group: self.load_balancer_target_group,
                load_balancer_target_groups: self.load_balancer_target_groups,
                load_balancer_target_port: self.load_balancer_target_port,
                elastic_load_balancer_listener: self.elastic_load_balancer_listener,
                missing_component: self.missing_component,
                nat_gateway: self.nat_gateway,
                network_interface: self.network_interface,
                packet_field: self.packet_field,
                vpc_peering_connection: self.vpc_peering_connection,
                port: self.port,
                port_ranges: self.port_ranges,
                prefix_list: self.prefix_list,
                protocols: self.protocols,
                route_table_route: self.route_table_route,
                route_table: self.route_table,
                security_group: self.security_group,
                security_group_rule: self.security_group_rule,
                security_groups: self.security_groups,
                source_vpc: self.source_vpc,
                state: self.state,
                subnet: self.subnet,
                subnet_route_table: self.subnet_route_table,
                vpc: self.vpc,
                vpc_endpoint: self.vpc_endpoint,
                vpn_connection: self.vpn_connection,
                vpn_gateway: self.vpn_gateway,
                transit_gateway: self.transit_gateway,
                transit_gateway_route_table: self.transit_gateway_route_table,
                transit_gateway_route_table_route: self.transit_gateway_route_table_route,
                transit_gateway_attachment: self.transit_gateway_attachment,
                component_account: self.component_account,
                component_region: self.component_region,
            }
        }
    }
}
impl Explanation {
    /// Creates a new builder-style object to manufacture [`Explanation`](crate::model::Explanation).
    pub fn builder() -> crate::model::explanation::Builder {
        crate::model::explanation::Builder::default()
    }
}

/// <p>Describes a path component.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AnalysisComponent {
    /// <p>The ID of the component.</p>
    #[doc(hidden)]
    pub id: std::option::Option<std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the component.</p>
    #[doc(hidden)]
    pub arn: std::option::Option<std::string::String>,
    /// <p>The name of the analysis component.</p>
    #[doc(hidden)]
    pub name: std::option::Option<std::string::String>,
}
impl AnalysisComponent {
    /// <p>The ID of the component.</p>
    pub fn id(&self) -> std::option::Option<&str> {
        self.id.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the component.</p>
    pub fn arn(&self) -> std::option::Option<&str> {
        self.arn.as_deref()
    }
    /// <p>The name of the analysis component.</p>
    pub fn name(&self) -> std::option::Option<&str> {
        self.name.as_deref()
    }
}
/// See [`AnalysisComponent`](crate::model::AnalysisComponent).
pub mod analysis_component {

    /// A builder for [`AnalysisComponent`](crate::model::AnalysisComponent).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) id: std::option::Option<std::string::String>,
        pub(crate) arn: std::option::Option<std::string::String>,
        pub(crate) name: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The ID of the component.</p>
        pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
            self.id = Some(input.into());
            self
        }
        /// <p>The ID of the component.</p>
        pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.id = input;
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the component.</p>
        pub fn arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.arn = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the component.</p>
        pub fn set_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.arn = input;
            self
        }
        /// <p>The name of the analysis component.</p>
        pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
            self.name = Some(input.into());
            self
        }
        /// <p>The name of the analysis component.</p>
        pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.name = input;
            self
        }
        /// Consumes the builder and constructs a [`AnalysisComponent`](crate::model::AnalysisComponent).
        pub fn build(self) -> crate::model::AnalysisComponent {
            crate::model::AnalysisComponent {
                id: self.id,
                arn: self.arn,
                name: self.name,
            }
        }
    }
}
impl AnalysisComponent {
    /// Creates a new builder-style object to manufacture [`AnalysisComponent`](crate::model::AnalysisComponent).
    pub fn builder() -> crate::model::analysis_component::Builder {
        crate::model::analysis_component::Builder::default()
    }
}

/// <p>Describes a route in a transit gateway route table.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TransitGatewayRouteTableRoute {
    /// <p>The CIDR block used for destination matches.</p>
    #[doc(hidden)]
    pub destination_cidr: std::option::Option<std::string::String>,
    /// <p>The state of the route.</p>
    #[doc(hidden)]
    pub state: std::option::Option<std::string::String>,
    /// <p>The route origin. The following are the possible values:</p>
    /// <ul>
    /// <li> <p>static</p> </li>
    /// <li> <p>propagated</p> </li>
    /// </ul>
    #[doc(hidden)]
    pub route_origin: std::option::Option<std::string::String>,
    /// <p>The ID of the prefix list.</p>
    #[doc(hidden)]
    pub prefix_list_id: std::option::Option<std::string::String>,
    /// <p>The ID of the route attachment.</p>
    #[doc(hidden)]
    pub attachment_id: std::option::Option<std::string::String>,
    /// <p>The ID of the resource for the route attachment.</p>
    #[doc(hidden)]
    pub resource_id: std::option::Option<std::string::String>,
    /// <p>The resource type for the route attachment.</p>
    #[doc(hidden)]
    pub resource_type: std::option::Option<std::string::String>,
}
impl TransitGatewayRouteTableRoute {
    /// <p>The CIDR block used for destination matches.</p>
    pub fn destination_cidr(&self) -> std::option::Option<&str> {
        self.destination_cidr.as_deref()
    }
    /// <p>The state of the route.</p>
    pub fn state(&self) -> std::option::Option<&str> {
        self.state.as_deref()
    }
    /// <p>The route origin. The following are the possible values:</p>
    /// <ul>
    /// <li> <p>static</p> </li>
    /// <li> <p>propagated</p> </li>
    /// </ul>
    pub fn route_origin(&self) -> std::option::Option<&str> {
        self.route_origin.as_deref()
    }
    /// <p>The ID of the prefix list.</p>
    pub fn prefix_list_id(&self) -> std::option::Option<&str> {
        self.prefix_list_id.as_deref()
    }
    /// <p>The ID of the route attachment.</p>
    pub fn attachment_id(&self) -> std::option::Option<&str> {
        self.attachment_id.as_deref()
    }
    /// <p>The ID of the resource for the route attachment.</p>
    pub fn resource_id(&self) -> std::option::Option<&str> {
        self.resource_id.as_deref()
    }
    /// <p>The resource type for the route attachment.</p>
    pub fn resource_type(&self) -> std::option::Option<&str> {
        self.resource_type.as_deref()
    }
}
/// See [`TransitGatewayRouteTableRoute`](crate::model::TransitGatewayRouteTableRoute).
pub mod transit_gateway_route_table_route {

    /// A builder for [`TransitGatewayRouteTableRoute`](crate::model::TransitGatewayRouteTableRoute).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) destination_cidr: std::option::Option<std::string::String>,
        pub(crate) state: std::option::Option<std::string::String>,
        pub(crate) route_origin: std::option::Option<std::string::String>,
        pub(crate) prefix_list_id: std::option::Option<std::string::String>,
        pub(crate) attachment_id: std::option::Option<std::string::String>,
        pub(crate) resource_id: std::option::Option<std::string::String>,
        pub(crate) resource_type: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The CIDR block used for destination matches.</p>
        pub fn destination_cidr(mut self, input: impl Into<std::string::String>) -> Self {
            self.destination_cidr = Some(input.into());
            self
        }
        /// <p>The CIDR block used for destination matches.</p>
        pub fn set_destination_cidr(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.destination_cidr = input;
            self
        }
        /// <p>The state of the route.</p>
        pub fn state(mut self, input: impl Into<std::string::String>) -> Self {
            self.state = Some(input.into());
            self
        }
        /// <p>The state of the route.</p>
        pub fn set_state(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.state = input;
            self
        }
        /// <p>The route origin. The following are the possible values:</p>
        /// <ul>
        /// <li> <p>static</p> </li>
        /// <li> <p>propagated</p> </li>
        /// </ul>
        pub fn route_origin(mut self, input: impl Into<std::string::String>) -> Self {
            self.route_origin = Some(input.into());
            self
        }
        /// <p>The route origin. The following are the possible values:</p>
        /// <ul>
        /// <li> <p>static</p> </li>
        /// <li> <p>propagated</p> </li>
        /// </ul>
        pub fn set_route_origin(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.route_origin = input;
            self
        }
        /// <p>The ID of the prefix list.</p>
        pub fn prefix_list_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.prefix_list_id = Some(input.into());
            self
        }
        /// <p>The ID of the prefix list.</p>
        pub fn set_prefix_list_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.prefix_list_id = input;
            self
        }
        /// <p>The ID of the route attachment.</p>
        pub fn attachment_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.attachment_id = Some(input.into());
            self
        }
        /// <p>The ID of the route attachment.</p>
        pub fn set_attachment_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.attachment_id = input;
            self
        }
        /// <p>The ID of the resource for the route attachment.</p>
        pub fn resource_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.resource_id = Some(input.into());
            self
        }
        /// <p>The ID of the resource for the route attachment.</p>
        pub fn set_resource_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.resource_id = input;
            self
        }
        /// <p>The resource type for the route attachment.</p>
        pub fn resource_type(mut self, input: impl Into<std::string::String>) -> Self {
            self.resource_type = Some(input.into());
            self
        }
        /// <p>The resource type for the route attachment.</p>
        pub fn set_resource_type(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.resource_type = input;
            self
        }
        /// Consumes the builder and constructs a [`TransitGatewayRouteTableRoute`](crate::model::TransitGatewayRouteTableRoute).
        pub fn build(self) -> crate::model::TransitGatewayRouteTableRoute {
            crate::model::TransitGatewayRouteTableRoute {
                destination_cidr: self.destination_cidr,
                state: self.state,
                route_origin: self.route_origin,
                prefix_list_id: self.prefix_list_id,
                attachment_id: self.attachment_id,
                resource_id: self.resource_id,
                resource_type: self.resource_type,
            }
        }
    }
}
impl TransitGatewayRouteTableRoute {
    /// Creates a new builder-style object to manufacture [`TransitGatewayRouteTableRoute`](crate::model::TransitGatewayRouteTableRoute).
    pub fn builder() -> crate::model::transit_gateway_route_table_route::Builder {
        crate::model::transit_gateway_route_table_route::Builder::default()
    }
}

/// <p>Describes a security group rule.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AnalysisSecurityGroupRule {
    /// <p>The IPv4 address range, in CIDR notation.</p>
    #[doc(hidden)]
    pub cidr: std::option::Option<std::string::String>,
    /// <p>The direction. The following are the possible values:</p>
    /// <ul>
    /// <li> <p>egress</p> </li>
    /// <li> <p>ingress</p> </li>
    /// </ul>
    #[doc(hidden)]
    pub direction: std::option::Option<std::string::String>,
    /// <p>The security group ID.</p>
    #[doc(hidden)]
    pub security_group_id: std::option::Option<std::string::String>,
    /// <p>The port range.</p>
    #[doc(hidden)]
    pub port_range: std::option::Option<crate::model::PortRange>,
    /// <p>The prefix list ID.</p>
    #[doc(hidden)]
    pub prefix_list_id: std::option::Option<std::string::String>,
    /// <p>The protocol name.</p>
    #[doc(hidden)]
    pub protocol: std::option::Option<std::string::String>,
}
impl AnalysisSecurityGroupRule {
    /// <p>The IPv4 address range, in CIDR notation.</p>
    pub fn cidr(&self) -> std::option::Option<&str> {
        self.cidr.as_deref()
    }
    /// <p>The direction. The following are the possible values:</p>
    /// <ul>
    /// <li> <p>egress</p> </li>
    /// <li> <p>ingress</p> </li>
    /// </ul>
    pub fn direction(&self) -> std::option::Option<&str> {
        self.direction.as_deref()
    }
    /// <p>The security group ID.</p>
    pub fn security_group_id(&self) -> std::option::Option<&str> {
        self.security_group_id.as_deref()
    }
    /// <p>The port range.</p>
    pub fn port_range(&self) -> std::option::Option<&crate::model::PortRange> {
        self.port_range.as_ref()
    }
    /// <p>The prefix list ID.</p>
    pub fn prefix_list_id(&self) -> std::option::Option<&str> {
        self.prefix_list_id.as_deref()
    }
    /// <p>The protocol name.</p>
    pub fn protocol(&self) -> std::option::Option<&str> {
        self.protocol.as_deref()
    }
}
/// See [`AnalysisSecurityGroupRule`](crate::model::AnalysisSecurityGroupRule).
pub mod analysis_security_group_rule {

    /// A builder for [`AnalysisSecurityGroupRule`](crate::model::AnalysisSecurityGroupRule).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) cidr: std::option::Option<std::string::String>,
        pub(crate) direction: std::option::Option<std::string::String>,
        pub(crate) security_group_id: std::option::Option<std::string::String>,
        pub(crate) port_range: std::option::Option<crate::model::PortRange>,
        pub(crate) prefix_list_id: std::option::Option<std::string::String>,
        pub(crate) protocol: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The IPv4 address range, in CIDR notation.</p>
        pub fn cidr(mut self, input: impl Into<std::string::String>) -> Self {
            self.cidr = Some(input.into());
            self
        }
        /// <p>The IPv4 address range, in CIDR notation.</p>
        pub fn set_cidr(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.cidr = input;
            self
        }
        /// <p>The direction. The following are the possible values:</p>
        /// <ul>
        /// <li> <p>egress</p> </li>
        /// <li> <p>ingress</p> </li>
        /// </ul>
        pub fn direction(mut self, input: impl Into<std::string::String>) -> Self {
            self.direction = Some(input.into());
            self
        }
        /// <p>The direction. The following are the possible values:</p>
        /// <ul>
        /// <li> <p>egress</p> </li>
        /// <li> <p>ingress</p> </li>
        /// </ul>
        pub fn set_direction(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.direction = input;
            self
        }
        /// <p>The security group ID.</p>
        pub fn security_group_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.security_group_id = Some(input.into());
            self
        }
        /// <p>The security group ID.</p>
        pub fn set_security_group_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.security_group_id = input;
            self
        }
        /// <p>The port range.</p>
        pub fn port_range(mut self, input: crate::model::PortRange) -> Self {
            self.port_range = Some(input);
            self
        }
        /// <p>The port range.</p>
        pub fn set_port_range(
            mut self,
            input: std::option::Option<crate::model::PortRange>,
        ) -> Self {
            self.port_range = input;
            self
        }
        /// <p>The prefix list ID.</p>
        pub fn prefix_list_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.prefix_list_id = Some(input.into());
            self
        }
        /// <p>The prefix list ID.</p>
        pub fn set_prefix_list_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.prefix_list_id = input;
            self
        }
        /// <p>The protocol name.</p>
        pub fn protocol(mut self, input: impl Into<std::string::String>) -> Self {
            self.protocol = Some(input.into());
            self
        }
        /// <p>The protocol name.</p>
        pub fn set_protocol(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.protocol = input;
            self
        }
        /// Consumes the builder and constructs a [`AnalysisSecurityGroupRule`](crate::model::AnalysisSecurityGroupRule).
        pub fn build(self) -> crate::model::AnalysisSecurityGroupRule {
            crate::model::AnalysisSecurityGroupRule {
                cidr: self.cidr,
                direction: self.direction,
                security_group_id: self.security_group_id,
                port_range: self.port_range,
                prefix_list_id: self.prefix_list_id,
                protocol: self.protocol,
            }
        }
    }
}
impl AnalysisSecurityGroupRule {
    /// Creates a new builder-style object to manufacture [`AnalysisSecurityGroupRule`](crate::model::AnalysisSecurityGroupRule).
    pub fn builder() -> crate::model::analysis_security_group_rule::Builder {
        crate::model::analysis_security_group_rule::Builder::default()
    }
}

/// <p>Describes a range of ports.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct PortRange {
    /// <p>The first port in the range.</p>
    #[doc(hidden)]
    pub from: std::option::Option<i32>,
    /// <p>The last port in the range.</p>
    #[doc(hidden)]
    pub to: std::option::Option<i32>,
}
impl PortRange {
    /// <p>The first port in the range.</p>
    pub fn from(&self) -> std::option::Option<i32> {
        self.from
    }
    /// <p>The last port in the range.</p>
    pub fn to(&self) -> std::option::Option<i32> {
        self.to
    }
}
/// See [`PortRange`](crate::model::PortRange).
pub mod port_range {

    /// A builder for [`PortRange`](crate::model::PortRange).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) from: std::option::Option<i32>,
        pub(crate) to: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>The first port in the range.</p>
        pub fn from(mut self, input: i32) -> Self {
            self.from = Some(input);
            self
        }
        /// <p>The first port in the range.</p>
        pub fn set_from(mut self, input: std::option::Option<i32>) -> Self {
            self.from = input;
            self
        }
        /// <p>The last port in the range.</p>
        pub fn to(mut self, input: i32) -> Self {
            self.to = Some(input);
            self
        }
        /// <p>The last port in the range.</p>
        pub fn set_to(mut self, input: std::option::Option<i32>) -> Self {
            self.to = input;
            self
        }
        /// Consumes the builder and constructs a [`PortRange`](crate::model::PortRange).
        pub fn build(self) -> crate::model::PortRange {
            crate::model::PortRange {
                from: self.from,
                to: self.to,
            }
        }
    }
}
impl PortRange {
    /// Creates a new builder-style object to manufacture [`PortRange`](crate::model::PortRange).
    pub fn builder() -> crate::model::port_range::Builder {
        crate::model::port_range::Builder::default()
    }
}

/// <p>Describes a route table route.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AnalysisRouteTableRoute {
    /// <p>The destination IPv4 address, in CIDR notation.</p>
    #[doc(hidden)]
    pub destination_cidr: std::option::Option<std::string::String>,
    /// <p>The prefix of the Amazon Web Service.</p>
    #[doc(hidden)]
    pub destination_prefix_list_id: std::option::Option<std::string::String>,
    /// <p>The ID of an egress-only internet gateway.</p>
    #[doc(hidden)]
    pub egress_only_internet_gateway_id: std::option::Option<std::string::String>,
    /// <p>The ID of the gateway, such as an internet gateway or virtual private gateway.</p>
    #[doc(hidden)]
    pub gateway_id: std::option::Option<std::string::String>,
    /// <p>The ID of the instance, such as a NAT instance.</p>
    #[doc(hidden)]
    pub instance_id: std::option::Option<std::string::String>,
    /// <p>The ID of a NAT gateway.</p>
    #[doc(hidden)]
    pub nat_gateway_id: std::option::Option<std::string::String>,
    /// <p>The ID of a network interface.</p>
    #[doc(hidden)]
    pub network_interface_id: std::option::Option<std::string::String>,
    /// <p>Describes how the route was created. The following are the possible values:</p>
    /// <ul>
    /// <li> <p>CreateRouteTable - The route was automatically created when the route table was created.</p> </li>
    /// <li> <p>CreateRoute - The route was manually added to the route table.</p> </li>
    /// <li> <p>EnableVgwRoutePropagation - The route was propagated by route propagation.</p> </li>
    /// </ul>
    #[doc(hidden)]
    pub origin: std::option::Option<std::string::String>,
    /// <p>The ID of a transit gateway.</p>
    #[doc(hidden)]
    pub transit_gateway_id: std::option::Option<std::string::String>,
    /// <p>The ID of a VPC peering connection.</p>
    #[doc(hidden)]
    pub vpc_peering_connection_id: std::option::Option<std::string::String>,
    /// <p>The state. The following are the possible values:</p>
    /// <ul>
    /// <li> <p>active</p> </li>
    /// <li> <p>blackhole</p> </li>
    /// </ul>
    #[doc(hidden)]
    pub state: std::option::Option<std::string::String>,
}
impl AnalysisRouteTableRoute {
    /// <p>The destination IPv4 address, in CIDR notation.</p>
    pub fn destination_cidr(&self) -> std::option::Option<&str> {
        self.destination_cidr.as_deref()
    }
    /// <p>The prefix of the Amazon Web Service.</p>
    pub fn destination_prefix_list_id(&self) -> std::option::Option<&str> {
        self.destination_prefix_list_id.as_deref()
    }
    /// <p>The ID of an egress-only internet gateway.</p>
    pub fn egress_only_internet_gateway_id(&self) -> std::option::Option<&str> {
        self.egress_only_internet_gateway_id.as_deref()
    }
    /// <p>The ID of the gateway, such as an internet gateway or virtual private gateway.</p>
    pub fn gateway_id(&self) -> std::option::Option<&str> {
        self.gateway_id.as_deref()
    }
    /// <p>The ID of the instance, such as a NAT instance.</p>
    pub fn instance_id(&self) -> std::option::Option<&str> {
        self.instance_id.as_deref()
    }
    /// <p>The ID of a NAT gateway.</p>
    pub fn nat_gateway_id(&self) -> std::option::Option<&str> {
        self.nat_gateway_id.as_deref()
    }
    /// <p>The ID of a network interface.</p>
    pub fn network_interface_id(&self) -> std::option::Option<&str> {
        self.network_interface_id.as_deref()
    }
    /// <p>Describes how the route was created. The following are the possible values:</p>
    /// <ul>
    /// <li> <p>CreateRouteTable - The route was automatically created when the route table was created.</p> </li>
    /// <li> <p>CreateRoute - The route was manually added to the route table.</p> </li>
    /// <li> <p>EnableVgwRoutePropagation - The route was propagated by route propagation.</p> </li>
    /// </ul>
    pub fn origin(&self) -> std::option::Option<&str> {
        self.origin.as_deref()
    }
    /// <p>The ID of a transit gateway.</p>
    pub fn transit_gateway_id(&self) -> std::option::Option<&str> {
        self.transit_gateway_id.as_deref()
    }
    /// <p>The ID of a VPC peering connection.</p>
    pub fn vpc_peering_connection_id(&self) -> std::option::Option<&str> {
        self.vpc_peering_connection_id.as_deref()
    }
    /// <p>The state. The following are the possible values:</p>
    /// <ul>
    /// <li> <p>active</p> </li>
    /// <li> <p>blackhole</p> </li>
    /// </ul>
    pub fn state(&self) -> std::option::Option<&str> {
        self.state.as_deref()
    }
}
/// See [`AnalysisRouteTableRoute`](crate::model::AnalysisRouteTableRoute).
pub mod analysis_route_table_route {

    /// A builder for [`AnalysisRouteTableRoute`](crate::model::AnalysisRouteTableRoute).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) destination_cidr: std::option::Option<std::string::String>,
        pub(crate) destination_prefix_list_id: std::option::Option<std::string::String>,
        pub(crate) egress_only_internet_gateway_id: std::option::Option<std::string::String>,
        pub(crate) gateway_id: std::option::Option<std::string::String>,
        pub(crate) instance_id: std::option::Option<std::string::String>,
        pub(crate) nat_gateway_id: std::option::Option<std::string::String>,
        pub(crate) network_interface_id: std::option::Option<std::string::String>,
        pub(crate) origin: std::option::Option<std::string::String>,
        pub(crate) transit_gateway_id: std::option::Option<std::string::String>,
        pub(crate) vpc_peering_connection_id: std::option::Option<std::string::String>,
        pub(crate) state: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The destination IPv4 address, in CIDR notation.</p>
        pub fn destination_cidr(mut self, input: impl Into<std::string::String>) -> Self {
            self.destination_cidr = Some(input.into());
            self
        }
        /// <p>The destination IPv4 address, in CIDR notation.</p>
        pub fn set_destination_cidr(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.destination_cidr = input;
            self
        }
        /// <p>The prefix of the Amazon Web Service.</p>
        pub fn destination_prefix_list_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.destination_prefix_list_id = Some(input.into());
            self
        }
        /// <p>The prefix of the Amazon Web Service.</p>
        pub fn set_destination_prefix_list_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.destination_prefix_list_id = input;
            self
        }
        /// <p>The ID of an egress-only internet gateway.</p>
        pub fn egress_only_internet_gateway_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.egress_only_internet_gateway_id = Some(input.into());
            self
        }
        /// <p>The ID of an egress-only internet gateway.</p>
        pub fn set_egress_only_internet_gateway_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.egress_only_internet_gateway_id = input;
            self
        }
        /// <p>The ID of the gateway, such as an internet gateway or virtual private gateway.</p>
        pub fn gateway_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.gateway_id = Some(input.into());
            self
        }
        /// <p>The ID of the gateway, such as an internet gateway or virtual private gateway.</p>
        pub fn set_gateway_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.gateway_id = input;
            self
        }
        /// <p>The ID of the instance, such as a NAT instance.</p>
        pub fn instance_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.instance_id = Some(input.into());
            self
        }
        /// <p>The ID of the instance, such as a NAT instance.</p>
        pub fn set_instance_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.instance_id = input;
            self
        }
        /// <p>The ID of a NAT gateway.</p>
        pub fn nat_gateway_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.nat_gateway_id = Some(input.into());
            self
        }
        /// <p>The ID of a NAT gateway.</p>
        pub fn set_nat_gateway_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.nat_gateway_id = input;
            self
        }
        /// <p>The ID of a network interface.</p>
        pub fn network_interface_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.network_interface_id = Some(input.into());
            self
        }
        /// <p>The ID of a network interface.</p>
        pub fn set_network_interface_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.network_interface_id = input;
            self
        }
        /// <p>Describes how the route was created. The following are the possible values:</p>
        /// <ul>
        /// <li> <p>CreateRouteTable - The route was automatically created when the route table was created.</p> </li>
        /// <li> <p>CreateRoute - The route was manually added to the route table.</p> </li>
        /// <li> <p>EnableVgwRoutePropagation - The route was propagated by route propagation.</p> </li>
        /// </ul>
        pub fn origin(mut self, input: impl Into<std::string::String>) -> Self {
            self.origin = Some(input.into());
            self
        }
        /// <p>Describes how the route was created. The following are the possible values:</p>
        /// <ul>
        /// <li> <p>CreateRouteTable - The route was automatically created when the route table was created.</p> </li>
        /// <li> <p>CreateRoute - The route was manually added to the route table.</p> </li>
        /// <li> <p>EnableVgwRoutePropagation - The route was propagated by route propagation.</p> </li>
        /// </ul>
        pub fn set_origin(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.origin = input;
            self
        }
        /// <p>The ID of a transit gateway.</p>
        pub fn transit_gateway_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.transit_gateway_id = Some(input.into());
            self
        }
        /// <p>The ID of a transit gateway.</p>
        pub fn set_transit_gateway_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.transit_gateway_id = input;
            self
        }
        /// <p>The ID of a VPC peering connection.</p>
        pub fn vpc_peering_connection_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.vpc_peering_connection_id = Some(input.into());
            self
        }
        /// <p>The ID of a VPC peering connection.</p>
        pub fn set_vpc_peering_connection_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.vpc_peering_connection_id = input;
            self
        }
        /// <p>The state. The following are the possible values:</p>
        /// <ul>
        /// <li> <p>active</p> </li>
        /// <li> <p>blackhole</p> </li>
        /// </ul>
        pub fn state(mut self, input: impl Into<std::string::String>) -> Self {
            self.state = Some(input.into());
            self
        }
        /// <p>The state. The following are the possible values:</p>
        /// <ul>
        /// <li> <p>active</p> </li>
        /// <li> <p>blackhole</p> </li>
        /// </ul>
        pub fn set_state(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.state = input;
            self
        }
        /// Consumes the builder and constructs a [`AnalysisRouteTableRoute`](crate::model::AnalysisRouteTableRoute).
        pub fn build(self) -> crate::model::AnalysisRouteTableRoute {
            crate::model::AnalysisRouteTableRoute {
                destination_cidr: self.destination_cidr,
                destination_prefix_list_id: self.destination_prefix_list_id,
                egress_only_internet_gateway_id: self.egress_only_internet_gateway_id,
                gateway_id: self.gateway_id,
                instance_id: self.instance_id,
                nat_gateway_id: self.nat_gateway_id,
                network_interface_id: self.network_interface_id,
                origin: self.origin,
                transit_gateway_id: self.transit_gateway_id,
                vpc_peering_connection_id: self.vpc_peering_connection_id,
                state: self.state,
            }
        }
    }
}
impl AnalysisRouteTableRoute {
    /// Creates a new builder-style object to manufacture [`AnalysisRouteTableRoute`](crate::model::AnalysisRouteTableRoute).
    pub fn builder() -> crate::model::analysis_route_table_route::Builder {
        crate::model::analysis_route_table_route::Builder::default()
    }
}

/// <p>Describes a load balancer target.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AnalysisLoadBalancerTarget {
    /// <p>The IP address.</p>
    #[doc(hidden)]
    pub address: std::option::Option<std::string::String>,
    /// <p>The Availability Zone.</p>
    #[doc(hidden)]
    pub availability_zone: std::option::Option<std::string::String>,
    /// <p>Information about the instance.</p>
    #[doc(hidden)]
    pub instance: std::option::Option<crate::model::AnalysisComponent>,
    /// <p>The port on which the target is listening.</p>
    #[doc(hidden)]
    pub port: std::option::Option<i32>,
}
impl AnalysisLoadBalancerTarget {
    /// <p>The IP address.</p>
    pub fn address(&self) -> std::option::Option<&str> {
        self.address.as_deref()
    }
    /// <p>The Availability Zone.</p>
    pub fn availability_zone(&self) -> std::option::Option<&str> {
        self.availability_zone.as_deref()
    }
    /// <p>Information about the instance.</p>
    pub fn instance(&self) -> std::option::Option<&crate::model::AnalysisComponent> {
        self.instance.as_ref()
    }
    /// <p>The port on which the target is listening.</p>
    pub fn port(&self) -> std::option::Option<i32> {
        self.port
    }
}
/// See [`AnalysisLoadBalancerTarget`](crate::model::AnalysisLoadBalancerTarget).
pub mod analysis_load_balancer_target {

    /// A builder for [`AnalysisLoadBalancerTarget`](crate::model::AnalysisLoadBalancerTarget).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) address: std::option::Option<std::string::String>,
        pub(crate) availability_zone: std::option::Option<std::string::String>,
        pub(crate) instance: std::option::Option<crate::model::AnalysisComponent>,
        pub(crate) port: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>The IP address.</p>
        pub fn address(mut self, input: impl Into<std::string::String>) -> Self {
            self.address = Some(input.into());
            self
        }
        /// <p>The IP address.</p>
        pub fn set_address(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.address = input;
            self
        }
        /// <p>The Availability Zone.</p>
        pub fn availability_zone(mut self, input: impl Into<std::string::String>) -> Self {
            self.availability_zone = Some(input.into());
            self
        }
        /// <p>The Availability Zone.</p>
        pub fn set_availability_zone(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.availability_zone = input;
            self
        }
        /// <p>Information about the instance.</p>
        pub fn instance(mut self, input: crate::model::AnalysisComponent) -> Self {
            self.instance = Some(input);
            self
        }
        /// <p>Information about the instance.</p>
        pub fn set_instance(
            mut self,
            input: std::option::Option<crate::model::AnalysisComponent>,
        ) -> Self {
            self.instance = input;
            self
        }
        /// <p>The port on which the target is listening.</p>
        pub fn port(mut self, input: i32) -> Self {
            self.port = Some(input);
            self
        }
        /// <p>The port on which the target is listening.</p>
        pub fn set_port(mut self, input: std::option::Option<i32>) -> Self {
            self.port = input;
            self
        }
        /// Consumes the builder and constructs a [`AnalysisLoadBalancerTarget`](crate::model::AnalysisLoadBalancerTarget).
        pub fn build(self) -> crate::model::AnalysisLoadBalancerTarget {
            crate::model::AnalysisLoadBalancerTarget {
                address: self.address,
                availability_zone: self.availability_zone,
                instance: self.instance,
                port: self.port,
            }
        }
    }
}
impl AnalysisLoadBalancerTarget {
    /// Creates a new builder-style object to manufacture [`AnalysisLoadBalancerTarget`](crate::model::AnalysisLoadBalancerTarget).
    pub fn builder() -> crate::model::analysis_load_balancer_target::Builder {
        crate::model::analysis_load_balancer_target::Builder::default()
    }
}

/// <p>Describes a load balancer listener.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AnalysisLoadBalancerListener {
    /// <p>The port on which the load balancer is listening.</p>
    #[doc(hidden)]
    pub load_balancer_port: std::option::Option<i32>,
    /// <p>[Classic Load Balancers] The back-end port for the listener.</p>
    #[doc(hidden)]
    pub instance_port: std::option::Option<i32>,
}
impl AnalysisLoadBalancerListener {
    /// <p>The port on which the load balancer is listening.</p>
    pub fn load_balancer_port(&self) -> std::option::Option<i32> {
        self.load_balancer_port
    }
    /// <p>[Classic Load Balancers] The back-end port for the listener.</p>
    pub fn instance_port(&self) -> std::option::Option<i32> {
        self.instance_port
    }
}
/// See [`AnalysisLoadBalancerListener`](crate::model::AnalysisLoadBalancerListener).
pub mod analysis_load_balancer_listener {

    /// A builder for [`AnalysisLoadBalancerListener`](crate::model::AnalysisLoadBalancerListener).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) load_balancer_port: std::option::Option<i32>,
        pub(crate) instance_port: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>The port on which the load balancer is listening.</p>
        pub fn load_balancer_port(mut self, input: i32) -> Self {
            self.load_balancer_port = Some(input);
            self
        }
        /// <p>The port on which the load balancer is listening.</p>
        pub fn set_load_balancer_port(mut self, input: std::option::Option<i32>) -> Self {
            self.load_balancer_port = input;
            self
        }
        /// <p>[Classic Load Balancers] The back-end port for the listener.</p>
        pub fn instance_port(mut self, input: i32) -> Self {
            self.instance_port = Some(input);
            self
        }
        /// <p>[Classic Load Balancers] The back-end port for the listener.</p>
        pub fn set_instance_port(mut self, input: std::option::Option<i32>) -> Self {
            self.instance_port = input;
            self
        }
        /// Consumes the builder and constructs a [`AnalysisLoadBalancerListener`](crate::model::AnalysisLoadBalancerListener).
        pub fn build(self) -> crate::model::AnalysisLoadBalancerListener {
            crate::model::AnalysisLoadBalancerListener {
                load_balancer_port: self.load_balancer_port,
                instance_port: self.instance_port,
            }
        }
    }
}
impl AnalysisLoadBalancerListener {
    /// Creates a new builder-style object to manufacture [`AnalysisLoadBalancerListener`](crate::model::AnalysisLoadBalancerListener).
    pub fn builder() -> crate::model::analysis_load_balancer_listener::Builder {
        crate::model::analysis_load_balancer_listener::Builder::default()
    }
}

/// <p>Describes a network access control (ACL) rule.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AnalysisAclRule {
    /// <p>The IPv4 address range, in CIDR notation.</p>
    #[doc(hidden)]
    pub cidr: std::option::Option<std::string::String>,
    /// <p>Indicates whether the rule is an outbound rule.</p>
    #[doc(hidden)]
    pub egress: std::option::Option<bool>,
    /// <p>The range of ports.</p>
    #[doc(hidden)]
    pub port_range: std::option::Option<crate::model::PortRange>,
    /// <p>The protocol.</p>
    #[doc(hidden)]
    pub protocol: std::option::Option<std::string::String>,
    /// <p>Indicates whether to allow or deny traffic that matches the rule.</p>
    #[doc(hidden)]
    pub rule_action: std::option::Option<std::string::String>,
    /// <p>The rule number.</p>
    #[doc(hidden)]
    pub rule_number: std::option::Option<i32>,
}
impl AnalysisAclRule {
    /// <p>The IPv4 address range, in CIDR notation.</p>
    pub fn cidr(&self) -> std::option::Option<&str> {
        self.cidr.as_deref()
    }
    /// <p>Indicates whether the rule is an outbound rule.</p>
    pub fn egress(&self) -> std::option::Option<bool> {
        self.egress
    }
    /// <p>The range of ports.</p>
    pub fn port_range(&self) -> std::option::Option<&crate::model::PortRange> {
        self.port_range.as_ref()
    }
    /// <p>The protocol.</p>
    pub fn protocol(&self) -> std::option::Option<&str> {
        self.protocol.as_deref()
    }
    /// <p>Indicates whether to allow or deny traffic that matches the rule.</p>
    pub fn rule_action(&self) -> std::option::Option<&str> {
        self.rule_action.as_deref()
    }
    /// <p>The rule number.</p>
    pub fn rule_number(&self) -> std::option::Option<i32> {
        self.rule_number
    }
}
/// See [`AnalysisAclRule`](crate::model::AnalysisAclRule).
pub mod analysis_acl_rule {

    /// A builder for [`AnalysisAclRule`](crate::model::AnalysisAclRule).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) cidr: std::option::Option<std::string::String>,
        pub(crate) egress: std::option::Option<bool>,
        pub(crate) port_range: std::option::Option<crate::model::PortRange>,
        pub(crate) protocol: std::option::Option<std::string::String>,
        pub(crate) rule_action: std::option::Option<std::string::String>,
        pub(crate) rule_number: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>The IPv4 address range, in CIDR notation.</p>
        pub fn cidr(mut self, input: impl Into<std::string::String>) -> Self {
            self.cidr = Some(input.into());
            self
        }
        /// <p>The IPv4 address range, in CIDR notation.</p>
        pub fn set_cidr(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.cidr = input;
            self
        }
        /// <p>Indicates whether the rule is an outbound rule.</p>
        pub fn egress(mut self, input: bool) -> Self {
            self.egress = Some(input);
            self
        }
        /// <p>Indicates whether the rule is an outbound rule.</p>
        pub fn set_egress(mut self, input: std::option::Option<bool>) -> Self {
            self.egress = input;
            self
        }
        /// <p>The range of ports.</p>
        pub fn port_range(mut self, input: crate::model::PortRange) -> Self {
            self.port_range = Some(input);
            self
        }
        /// <p>The range of ports.</p>
        pub fn set_port_range(
            mut self,
            input: std::option::Option<crate::model::PortRange>,
        ) -> Self {
            self.port_range = input;
            self
        }
        /// <p>The protocol.</p>
        pub fn protocol(mut self, input: impl Into<std::string::String>) -> Self {
            self.protocol = Some(input.into());
            self
        }
        /// <p>The protocol.</p>
        pub fn set_protocol(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.protocol = input;
            self
        }
        /// <p>Indicates whether to allow or deny traffic that matches the rule.</p>
        pub fn rule_action(mut self, input: impl Into<std::string::String>) -> Self {
            self.rule_action = Some(input.into());
            self
        }
        /// <p>Indicates whether to allow or deny traffic that matches the rule.</p>
        pub fn set_rule_action(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.rule_action = input;
            self
        }
        /// <p>The rule number.</p>
        pub fn rule_number(mut self, input: i32) -> Self {
            self.rule_number = Some(input);
            self
        }
        /// <p>The rule number.</p>
        pub fn set_rule_number(mut self, input: std::option::Option<i32>) -> Self {
            self.rule_number = input;
            self
        }
        /// Consumes the builder and constructs a [`AnalysisAclRule`](crate::model::AnalysisAclRule).
        pub fn build(self) -> crate::model::AnalysisAclRule {
            crate::model::AnalysisAclRule {
                cidr: self.cidr,
                egress: self.egress,
                port_range: self.port_range,
                protocol: self.protocol,
                rule_action: self.rule_action,
                rule_number: self.rule_number,
            }
        }
    }
}
impl AnalysisAclRule {
    /// Creates a new builder-style object to manufacture [`AnalysisAclRule`](crate::model::AnalysisAclRule).
    pub fn builder() -> crate::model::analysis_acl_rule::Builder {
        crate::model::analysis_acl_rule::Builder::default()
    }
}

/// <p>Describes a path component.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct PathComponent {
    /// <p>The sequence number.</p>
    #[doc(hidden)]
    pub sequence_number: std::option::Option<i32>,
    /// <p>The network ACL rule.</p>
    #[doc(hidden)]
    pub acl_rule: std::option::Option<crate::model::AnalysisAclRule>,
    /// <p>The resource to which the path component is attached.</p>
    #[doc(hidden)]
    pub attached_to: std::option::Option<crate::model::AnalysisComponent>,
    /// <p>The component.</p>
    #[doc(hidden)]
    pub component: std::option::Option<crate::model::AnalysisComponent>,
    /// <p>The destination VPC.</p>
    #[doc(hidden)]
    pub destination_vpc: std::option::Option<crate::model::AnalysisComponent>,
    /// <p>The outbound header.</p>
    #[doc(hidden)]
    pub outbound_header: std::option::Option<crate::model::AnalysisPacketHeader>,
    /// <p>The inbound header.</p>
    #[doc(hidden)]
    pub inbound_header: std::option::Option<crate::model::AnalysisPacketHeader>,
    /// <p>The route table route.</p>
    #[doc(hidden)]
    pub route_table_route: std::option::Option<crate::model::AnalysisRouteTableRoute>,
    /// <p>The security group rule.</p>
    #[doc(hidden)]
    pub security_group_rule: std::option::Option<crate::model::AnalysisSecurityGroupRule>,
    /// <p>The source VPC.</p>
    #[doc(hidden)]
    pub source_vpc: std::option::Option<crate::model::AnalysisComponent>,
    /// <p>The subnet.</p>
    #[doc(hidden)]
    pub subnet: std::option::Option<crate::model::AnalysisComponent>,
    /// <p>The component VPC.</p>
    #[doc(hidden)]
    pub vpc: std::option::Option<crate::model::AnalysisComponent>,
    /// <p>The additional details.</p>
    #[doc(hidden)]
    pub additional_details: std::option::Option<std::vec::Vec<crate::model::AdditionalDetail>>,
    /// <p>The transit gateway.</p>
    #[doc(hidden)]
    pub transit_gateway: std::option::Option<crate::model::AnalysisComponent>,
    /// <p>The route in a transit gateway route table.</p>
    #[doc(hidden)]
    pub transit_gateway_route_table_route:
        std::option::Option<crate::model::TransitGatewayRouteTableRoute>,
    /// <p>The explanation codes.</p>
    #[doc(hidden)]
    pub explanations: std::option::Option<std::vec::Vec<crate::model::Explanation>>,
    /// <p>The load balancer listener.</p>
    #[doc(hidden)]
    pub elastic_load_balancer_listener: std::option::Option<crate::model::AnalysisComponent>,
}
impl PathComponent {
    /// <p>The sequence number.</p>
    pub fn sequence_number(&self) -> std::option::Option<i32> {
        self.sequence_number
    }
    /// <p>The network ACL rule.</p>
    pub fn acl_rule(&self) -> std::option::Option<&crate::model::AnalysisAclRule> {
        self.acl_rule.as_ref()
    }
    /// <p>The resource to which the path component is attached.</p>
    pub fn attached_to(&self) -> std::option::Option<&crate::model::AnalysisComponent> {
        self.attached_to.as_ref()
    }
    /// <p>The component.</p>
    pub fn component(&self) -> std::option::Option<&crate::model::AnalysisComponent> {
        self.component.as_ref()
    }
    /// <p>The destination VPC.</p>
    pub fn destination_vpc(&self) -> std::option::Option<&crate::model::AnalysisComponent> {
        self.destination_vpc.as_ref()
    }
    /// <p>The outbound header.</p>
    pub fn outbound_header(&self) -> std::option::Option<&crate::model::AnalysisPacketHeader> {
        self.outbound_header.as_ref()
    }
    /// <p>The inbound header.</p>
    pub fn inbound_header(&self) -> std::option::Option<&crate::model::AnalysisPacketHeader> {
        self.inbound_header.as_ref()
    }
    /// <p>The route table route.</p>
    pub fn route_table_route(&self) -> std::option::Option<&crate::model::AnalysisRouteTableRoute> {
        self.route_table_route.as_ref()
    }
    /// <p>The security group rule.</p>
    pub fn security_group_rule(
        &self,
    ) -> std::option::Option<&crate::model::AnalysisSecurityGroupRule> {
        self.security_group_rule.as_ref()
    }
    /// <p>The source VPC.</p>
    pub fn source_vpc(&self) -> std::option::Option<&crate::model::AnalysisComponent> {
        self.source_vpc.as_ref()
    }
    /// <p>The subnet.</p>
    pub fn subnet(&self) -> std::option::Option<&crate::model::AnalysisComponent> {
        self.subnet.as_ref()
    }
    /// <p>The component VPC.</p>
    pub fn vpc(&self) -> std::option::Option<&crate::model::AnalysisComponent> {
        self.vpc.as_ref()
    }
    /// <p>The additional details.</p>
    pub fn additional_details(&self) -> std::option::Option<&[crate::model::AdditionalDetail]> {
        self.additional_details.as_deref()
    }
    /// <p>The transit gateway.</p>
    pub fn transit_gateway(&self) -> std::option::Option<&crate::model::AnalysisComponent> {
        self.transit_gateway.as_ref()
    }
    /// <p>The route in a transit gateway route table.</p>
    pub fn transit_gateway_route_table_route(
        &self,
    ) -> std::option::Option<&crate::model::TransitGatewayRouteTableRoute> {
        self.transit_gateway_route_table_route.as_ref()
    }
    /// <p>The explanation codes.</p>
    pub fn explanations(&self) -> std::option::Option<&[crate::model::Explanation]> {
        self.explanations.as_deref()
    }
    /// <p>The load balancer listener.</p>
    pub fn elastic_load_balancer_listener(
        &self,
    ) -> std::option::Option<&crate::model::AnalysisComponent> {
        self.elastic_load_balancer_listener.as_ref()
    }
}
/// See [`PathComponent`](crate::model::PathComponent).
pub mod path_component {

    /// A builder for [`PathComponent`](crate::model::PathComponent).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) sequence_number: std::option::Option<i32>,
        pub(crate) acl_rule: std::option::Option<crate::model::AnalysisAclRule>,
        pub(crate) attached_to: std::option::Option<crate::model::AnalysisComponent>,
        pub(crate) component: std::option::Option<crate::model::AnalysisComponent>,
        pub(crate) destination_vpc: std::option::Option<crate::model::AnalysisComponent>,
        pub(crate) outbound_header: std::option::Option<crate::model::AnalysisPacketHeader>,
        pub(crate) inbound_header: std::option::Option<crate::model::AnalysisPacketHeader>,
        pub(crate) route_table_route: std::option::Option<crate::model::AnalysisRouteTableRoute>,
        pub(crate) security_group_rule:
            std::option::Option<crate::model::AnalysisSecurityGroupRule>,
        pub(crate) source_vpc: std::option::Option<crate::model::AnalysisComponent>,
        pub(crate) subnet: std::option::Option<crate::model::AnalysisComponent>,
        pub(crate) vpc: std::option::Option<crate::model::AnalysisComponent>,
        pub(crate) additional_details:
            std::option::Option<std::vec::Vec<crate::model::AdditionalDetail>>,
        pub(crate) transit_gateway: std::option::Option<crate::model::AnalysisComponent>,
        pub(crate) transit_gateway_route_table_route:
            std::option::Option<crate::model::TransitGatewayRouteTableRoute>,
        pub(crate) explanations: std::option::Option<std::vec::Vec<crate::model::Explanation>>,
        pub(crate) elastic_load_balancer_listener:
            std::option::Option<crate::model::AnalysisComponent>,
    }
    impl Builder {
        /// <p>The sequence number.</p>
        pub fn sequence_number(mut self, input: i32) -> Self {
            self.sequence_number = Some(input);
            self
        }
        /// <p>The sequence number.</p>
        pub fn set_sequence_number(mut self, input: std::option::Option<i32>) -> Self {
            self.sequence_number = input;
            self
        }
        /// <p>The network ACL rule.</p>
        pub fn acl_rule(mut self, input: crate::model::AnalysisAclRule) -> Self {
            self.acl_rule = Some(input);
            self
        }
        /// <p>The network ACL rule.</p>
        pub fn set_acl_rule(
            mut self,
            input: std::option::Option<crate::model::AnalysisAclRule>,
        ) -> Self {
            self.acl_rule = input;
            self
        }
        /// <p>The resource to which the path component is attached.</p>
        pub fn attached_to(mut self, input: crate::model::AnalysisComponent) -> Self {
            self.attached_to = Some(input);
            self
        }
        /// <p>The resource to which the path component is attached.</p>
        pub fn set_attached_to(
            mut self,
            input: std::option::Option<crate::model::AnalysisComponent>,
        ) -> Self {
            self.attached_to = input;
            self
        }
        /// <p>The component.</p>
        pub fn component(mut self, input: crate::model::AnalysisComponent) -> Self {
            self.component = Some(input);
            self
        }
        /// <p>The component.</p>
        pub fn set_component(
            mut self,
            input: std::option::Option<crate::model::AnalysisComponent>,
        ) -> Self {
            self.component = input;
            self
        }
        /// <p>The destination VPC.</p>
        pub fn destination_vpc(mut self, input: crate::model::AnalysisComponent) -> Self {
            self.destination_vpc = Some(input);
            self
        }
        /// <p>The destination VPC.</p>
        pub fn set_destination_vpc(
            mut self,
            input: std::option::Option<crate::model::AnalysisComponent>,
        ) -> Self {
            self.destination_vpc = input;
            self
        }
        /// <p>The outbound header.</p>
        pub fn outbound_header(mut self, input: crate::model::AnalysisPacketHeader) -> Self {
            self.outbound_header = Some(input);
            self
        }
        /// <p>The outbound header.</p>
        pub fn set_outbound_header(
            mut self,
            input: std::option::Option<crate::model::AnalysisPacketHeader>,
        ) -> Self {
            self.outbound_header = input;
            self
        }
        /// <p>The inbound header.</p>
        pub fn inbound_header(mut self, input: crate::model::AnalysisPacketHeader) -> Self {
            self.inbound_header = Some(input);
            self
        }
        /// <p>The inbound header.</p>
        pub fn set_inbound_header(
            mut self,
            input: std::option::Option<crate::model::AnalysisPacketHeader>,
        ) -> Self {
            self.inbound_header = input;
            self
        }
        /// <p>The route table route.</p>
        pub fn route_table_route(mut self, input: crate::model::AnalysisRouteTableRoute) -> Self {
            self.route_table_route = Some(input);
            self
        }
        /// <p>The route table route.</p>
        pub fn set_route_table_route(
            mut self,
            input: std::option::Option<crate::model::AnalysisRouteTableRoute>,
        ) -> Self {
            self.route_table_route = input;
            self
        }
        /// <p>The security group rule.</p>
        pub fn security_group_rule(
            mut self,
            input: crate::model::AnalysisSecurityGroupRule,
        ) -> Self {
            self.security_group_rule = Some(input);
            self
        }
        /// <p>The security group rule.</p>
        pub fn set_security_group_rule(
            mut self,
            input: std::option::Option<crate::model::AnalysisSecurityGroupRule>,
        ) -> Self {
            self.security_group_rule = input;
            self
        }
        /// <p>The source VPC.</p>
        pub fn source_vpc(mut self, input: crate::model::AnalysisComponent) -> Self {
            self.source_vpc = Some(input);
            self
        }
        /// <p>The source VPC.</p>
        pub fn set_source_vpc(
            mut self,
            input: std::option::Option<crate::model::AnalysisComponent>,
        ) -> Self {
            self.source_vpc = input;
            self
        }
        /// <p>The subnet.</p>
        pub fn subnet(mut self, input: crate::model::AnalysisComponent) -> Self {
            self.subnet = Some(input);
            self
        }
        /// <p>The subnet.</p>
        pub fn set_subnet(
            mut self,
            input: std::option::Option<crate::model::AnalysisComponent>,
        ) -> Self {
            self.subnet = input;
            self
        }
        /// <p>The component VPC.</p>
        pub fn vpc(mut self, input: crate::model::AnalysisComponent) -> Self {
            self.vpc = Some(input);
            self
        }
        /// <p>The component VPC.</p>
        pub fn set_vpc(
            mut self,
            input: std::option::Option<crate::model::AnalysisComponent>,
        ) -> Self {
            self.vpc = input;
            self
        }
        /// Appends an item to `additional_details`.
        ///
        /// To override the contents of this collection use [`set_additional_details`](Self::set_additional_details).
        ///
        /// <p>The additional details.</p>
        pub fn additional_details(mut self, input: crate::model::AdditionalDetail) -> Self {
            let mut v = self.additional_details.unwrap_or_default();
            v.push(input);
            self.additional_details = Some(v);
            self
        }
        /// <p>The additional details.</p>
        pub fn set_additional_details(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::AdditionalDetail>>,
        ) -> Self {
            self.additional_details = input;
            self
        }
        /// <p>The transit gateway.</p>
        pub fn transit_gateway(mut self, input: crate::model::AnalysisComponent) -> Self {
            self.transit_gateway = Some(input);
            self
        }
        /// <p>The transit gateway.</p>
        pub fn set_transit_gateway(
            mut self,
            input: std::option::Option<crate::model::AnalysisComponent>,
        ) -> Self {
            self.transit_gateway = input;
            self
        }
        /// <p>The route in a transit gateway route table.</p>
        pub fn transit_gateway_route_table_route(
            mut self,
            input: crate::model::TransitGatewayRouteTableRoute,
        ) -> Self {
            self.transit_gateway_route_table_route = Some(input);
            self
        }
        /// <p>The route in a transit gateway route table.</p>
        pub fn set_transit_gateway_route_table_route(
            mut self,
            input: std::option::Option<crate::model::TransitGatewayRouteTableRoute>,
        ) -> Self {
            self.transit_gateway_route_table_route = input;
            self
        }
        /// Appends an item to `explanations`.
        ///
        /// To override the contents of this collection use [`set_explanations`](Self::set_explanations).
        ///
        /// <p>The explanation codes.</p>
        pub fn explanations(mut self, input: crate::model::Explanation) -> Self {
            let mut v = self.explanations.unwrap_or_default();
            v.push(input);
            self.explanations = Some(v);
            self
        }
        /// <p>The explanation codes.</p>
        pub fn set_explanations(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Explanation>>,
        ) -> Self {
            self.explanations = input;
            self
        }
        /// <p>The load balancer listener.</p>
        pub fn elastic_load_balancer_listener(
            mut self,
            input: crate::model::AnalysisComponent,
        ) -> Self {
            self.elastic_load_balancer_listener = Some(input);
            self
        }
        /// <p>The load balancer listener.</p>
        pub fn set_elastic_load_balancer_listener(
            mut self,
            input: std::option::Option<crate::model::AnalysisComponent>,
        ) -> Self {
            self.elastic_load_balancer_listener = input;
            self
        }
        /// Consumes the builder and constructs a [`PathComponent`](crate::model::PathComponent).
        pub fn build(self) -> crate::model::PathComponent {
            crate::model::PathComponent {
                sequence_number: self.sequence_number,
                acl_rule: self.acl_rule,
                attached_to: self.attached_to,
                component: self.component,
                destination_vpc: self.destination_vpc,
                outbound_header: self.outbound_header,
                inbound_header: self.inbound_header,
                route_table_route: self.route_table_route,
                security_group_rule: self.security_group_rule,
                source_vpc: self.source_vpc,
                subnet: self.subnet,
                vpc: self.vpc,
                additional_details: self.additional_details,
                transit_gateway: self.transit_gateway,
                transit_gateway_route_table_route: self.transit_gateway_route_table_route,
                explanations: self.explanations,
                elastic_load_balancer_listener: self.elastic_load_balancer_listener,
            }
        }
    }
}
impl PathComponent {
    /// Creates a new builder-style object to manufacture [`PathComponent`](crate::model::PathComponent).
    pub fn builder() -> crate::model::path_component::Builder {
        crate::model::path_component::Builder::default()
    }
}

/// <p>Describes an additional detail for a path analysis.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AdditionalDetail {
    /// <p>The information type.</p>
    #[doc(hidden)]
    pub additional_detail_type: std::option::Option<std::string::String>,
    /// <p>The path component.</p>
    #[doc(hidden)]
    pub component: std::option::Option<crate::model::AnalysisComponent>,
}
impl AdditionalDetail {
    /// <p>The information type.</p>
    pub fn additional_detail_type(&self) -> std::option::Option<&str> {
        self.additional_detail_type.as_deref()
    }
    /// <p>The path component.</p>
    pub fn component(&self) -> std::option::Option<&crate::model::AnalysisComponent> {
        self.component.as_ref()
    }
}
/// See [`AdditionalDetail`](crate::model::AdditionalDetail).
pub mod additional_detail {

    /// A builder for [`AdditionalDetail`](crate::model::AdditionalDetail).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) additional_detail_type: std::option::Option<std::string::String>,
        pub(crate) component: std::option::Option<crate::model::AnalysisComponent>,
    }
    impl Builder {
        /// <p>The information type.</p>
        pub fn additional_detail_type(mut self, input: impl Into<std::string::String>) -> Self {
            self.additional_detail_type = Some(input.into());
            self
        }
        /// <p>The information type.</p>
        pub fn set_additional_detail_type(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.additional_detail_type = input;
            self
        }
        /// <p>The path component.</p>
        pub fn component(mut self, input: crate::model::AnalysisComponent) -> Self {
            self.component = Some(input);
            self
        }
        /// <p>The path component.</p>
        pub fn set_component(
            mut self,
            input: std::option::Option<crate::model::AnalysisComponent>,
        ) -> Self {
            self.component = input;
            self
        }
        /// Consumes the builder and constructs a [`AdditionalDetail`](crate::model::AdditionalDetail).
        pub fn build(self) -> crate::model::AdditionalDetail {
            crate::model::AdditionalDetail {
                additional_detail_type: self.additional_detail_type,
                component: self.component,
            }
        }
    }
}
impl AdditionalDetail {
    /// Creates a new builder-style object to manufacture [`AdditionalDetail`](crate::model::AdditionalDetail).
    pub fn builder() -> crate::model::additional_detail::Builder {
        crate::model::additional_detail::Builder::default()
    }
}

/// <p>Describes a header. Reflects any changes made by a component as traffic passes through. The fields of an inbound header are null except for the first component of a path.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AnalysisPacketHeader {
    /// <p>The destination addresses.</p>
    #[doc(hidden)]
    pub destination_addresses: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>The destination port ranges.</p>
    #[doc(hidden)]
    pub destination_port_ranges: std::option::Option<std::vec::Vec<crate::model::PortRange>>,
    /// <p>The protocol.</p>
    #[doc(hidden)]
    pub protocol: std::option::Option<std::string::String>,
    /// <p>The source addresses.</p>
    #[doc(hidden)]
    pub source_addresses: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>The source port ranges.</p>
    #[doc(hidden)]
    pub source_port_ranges: std::option::Option<std::vec::Vec<crate::model::PortRange>>,
}
impl AnalysisPacketHeader {
    /// <p>The destination addresses.</p>
    pub fn destination_addresses(&self) -> std::option::Option<&[std::string::String]> {
        self.destination_addresses.as_deref()
    }
    /// <p>The destination port ranges.</p>
    pub fn destination_port_ranges(&self) -> std::option::Option<&[crate::model::PortRange]> {
        self.destination_port_ranges.as_deref()
    }
    /// <p>The protocol.</p>
    pub fn protocol(&self) -> std::option::Option<&str> {
        self.protocol.as_deref()
    }
    /// <p>The source addresses.</p>
    pub fn source_addresses(&self) -> std::option::Option<&[std::string::String]> {
        self.source_addresses.as_deref()
    }
    /// <p>The source port ranges.</p>
    pub fn source_port_ranges(&self) -> std::option::Option<&[crate::model::PortRange]> {
        self.source_port_ranges.as_deref()
    }
}
/// See [`AnalysisPacketHeader`](crate::model::AnalysisPacketHeader).
pub mod analysis_packet_header {

    /// A builder for [`AnalysisPacketHeader`](crate::model::AnalysisPacketHeader).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) destination_addresses: std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) destination_port_ranges:
            std::option::Option<std::vec::Vec<crate::model::PortRange>>,
        pub(crate) protocol: std::option::Option<std::string::String>,
        pub(crate) source_addresses: std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) source_port_ranges: std::option::Option<std::vec::Vec<crate::model::PortRange>>,
    }
    impl Builder {
        /// Appends an item to `destination_addresses`.
        ///
        /// To override the contents of this collection use [`set_destination_addresses`](Self::set_destination_addresses).
        ///
        /// <p>The destination addresses.</p>
        pub fn destination_addresses(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.destination_addresses.unwrap_or_default();
            v.push(input.into());
            self.destination_addresses = Some(v);
            self
        }
        /// <p>The destination addresses.</p>
        pub fn set_destination_addresses(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.destination_addresses = input;
            self
        }
        /// Appends an item to `destination_port_ranges`.
        ///
        /// To override the contents of this collection use [`set_destination_port_ranges`](Self::set_destination_port_ranges).
        ///
        /// <p>The destination port ranges.</p>
        pub fn destination_port_ranges(mut self, input: crate::model::PortRange) -> Self {
            let mut v = self.destination_port_ranges.unwrap_or_default();
            v.push(input);
            self.destination_port_ranges = Some(v);
            self
        }
        /// <p>The destination port ranges.</p>
        pub fn set_destination_port_ranges(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::PortRange>>,
        ) -> Self {
            self.destination_port_ranges = input;
            self
        }
        /// <p>The protocol.</p>
        pub fn protocol(mut self, input: impl Into<std::string::String>) -> Self {
            self.protocol = Some(input.into());
            self
        }
        /// <p>The protocol.</p>
        pub fn set_protocol(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.protocol = input;
            self
        }
        /// Appends an item to `source_addresses`.
        ///
        /// To override the contents of this collection use [`set_source_addresses`](Self::set_source_addresses).
        ///
        /// <p>The source addresses.</p>
        pub fn source_addresses(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.source_addresses.unwrap_or_default();
            v.push(input.into());
            self.source_addresses = Some(v);
            self
        }
        /// <p>The source addresses.</p>
        pub fn set_source_addresses(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.source_addresses = input;
            self
        }
        /// Appends an item to `source_port_ranges`.
        ///
        /// To override the contents of this collection use [`set_source_port_ranges`](Self::set_source_port_ranges).
        ///
        /// <p>The source port ranges.</p>
        pub fn source_port_ranges(mut self, input: crate::model::PortRange) -> Self {
            let mut v = self.source_port_ranges.unwrap_or_default();
            v.push(input);
            self.source_port_ranges = Some(v);
            self
        }
        /// <p>The source port ranges.</p>
        pub fn set_source_port_ranges(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::PortRange>>,
        ) -> Self {
            self.source_port_ranges = input;
            self
        }
        /// Consumes the builder and constructs a [`AnalysisPacketHeader`](crate::model::AnalysisPacketHeader).
        pub fn build(self) -> crate::model::AnalysisPacketHeader {
            crate::model::AnalysisPacketHeader {
                destination_addresses: self.destination_addresses,
                destination_port_ranges: self.destination_port_ranges,
                protocol: self.protocol,
                source_addresses: self.source_addresses,
                source_port_ranges: self.source_port_ranges,
            }
        }
    }
}
impl AnalysisPacketHeader {
    /// Creates a new builder-style object to manufacture [`AnalysisPacketHeader`](crate::model::AnalysisPacketHeader).
    pub fn builder() -> crate::model::analysis_packet_header::Builder {
        crate::model::analysis_packet_header::Builder::default()
    }
}

/// When writing a match expression against `AnalysisStatus`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let analysisstatus = unimplemented!();
/// match analysisstatus {
///     AnalysisStatus::Failed => { /* ... */ },
///     AnalysisStatus::Running => { /* ... */ },
///     AnalysisStatus::Succeeded => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `analysisstatus` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `AnalysisStatus::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `AnalysisStatus::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `AnalysisStatus::NewFeature` is defined.
/// Specifically, when `analysisstatus` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `AnalysisStatus::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 AnalysisStatus {
    #[allow(missing_docs)] // documentation missing in model
    Failed,
    #[allow(missing_docs)] // documentation missing in model
    Running,
    #[allow(missing_docs)] // documentation missing in model
    Succeeded,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for AnalysisStatus {
    fn from(s: &str) -> Self {
        match s {
            "failed" => AnalysisStatus::Failed,
            "running" => AnalysisStatus::Running,
            "succeeded" => AnalysisStatus::Succeeded,
            other => AnalysisStatus::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for AnalysisStatus {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(AnalysisStatus::from(s))
    }
}
impl AnalysisStatus {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            AnalysisStatus::Failed => "failed",
            AnalysisStatus::Running => "running",
            AnalysisStatus::Succeeded => "succeeded",
            AnalysisStatus::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["failed", "running", "succeeded"]
    }
}
impl AsRef<str> for AnalysisStatus {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>The tags to apply to a resource when the resource is being created.</p> <note>
/// <p>The <code>Valid Values</code> lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.</p>
/// </note>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TagSpecification {
    /// <p>The type of resource to tag on creation.</p>
    #[doc(hidden)]
    pub resource_type: std::option::Option<crate::model::ResourceType>,
    /// <p>The tags to apply to the resource.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl TagSpecification {
    /// <p>The type of resource to tag on creation.</p>
    pub fn resource_type(&self) -> std::option::Option<&crate::model::ResourceType> {
        self.resource_type.as_ref()
    }
    /// <p>The tags to apply to the resource.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
}
/// See [`TagSpecification`](crate::model::TagSpecification).
pub mod tag_specification {

    /// A builder for [`TagSpecification`](crate::model::TagSpecification).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) resource_type: std::option::Option<crate::model::ResourceType>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    }
    impl Builder {
        /// <p>The type of resource to tag on creation.</p>
        pub fn resource_type(mut self, input: crate::model::ResourceType) -> Self {
            self.resource_type = Some(input);
            self
        }
        /// <p>The type of resource to tag on creation.</p>
        pub fn set_resource_type(
            mut self,
            input: std::option::Option<crate::model::ResourceType>,
        ) -> Self {
            self.resource_type = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>The tags to apply to the resource.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>The tags to apply to the resource.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// Consumes the builder and constructs a [`TagSpecification`](crate::model::TagSpecification).
        pub fn build(self) -> crate::model::TagSpecification {
            crate::model::TagSpecification {
                resource_type: self.resource_type,
                tags: self.tags,
            }
        }
    }
}
impl TagSpecification {
    /// Creates a new builder-style object to manufacture [`TagSpecification`](crate::model::TagSpecification).
    pub fn builder() -> crate::model::tag_specification::Builder {
        crate::model::tag_specification::Builder::default()
    }
}

/// When writing a match expression against `ResourceType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let resourcetype = unimplemented!();
/// match resourcetype {
///     ResourceType::CapacityReservation => { /* ... */ },
///     ResourceType::CapacityReservationFleet => { /* ... */ },
///     ResourceType::CarrierGateway => { /* ... */ },
///     ResourceType::ClientVpnEndpoint => { /* ... */ },
///     ResourceType::CoipPool => { /* ... */ },
///     ResourceType::CustomerGateway => { /* ... */ },
///     ResourceType::DedicatedHost => { /* ... */ },
///     ResourceType::DhcpOptions => { /* ... */ },
///     ResourceType::EgressOnlyInternetGateway => { /* ... */ },
///     ResourceType::ElasticGpu => { /* ... */ },
///     ResourceType::ElasticIp => { /* ... */ },
///     ResourceType::ExportImageTask => { /* ... */ },
///     ResourceType::ExportInstanceTask => { /* ... */ },
///     ResourceType::Fleet => { /* ... */ },
///     ResourceType::FpgaImage => { /* ... */ },
///     ResourceType::HostReservation => { /* ... */ },
///     ResourceType::Image => { /* ... */ },
///     ResourceType::ImportImageTask => { /* ... */ },
///     ResourceType::ImportSnapshotTask => { /* ... */ },
///     ResourceType::Instance => { /* ... */ },
///     ResourceType::InstanceEventWindow => { /* ... */ },
///     ResourceType::InternetGateway => { /* ... */ },
///     ResourceType::Ipam => { /* ... */ },
///     ResourceType::IpamPool => { /* ... */ },
///     ResourceType::IpamScope => { /* ... */ },
///     ResourceType::Ipv4poolEc2 => { /* ... */ },
///     ResourceType::Ipv6poolEc2 => { /* ... */ },
///     ResourceType::KeyPair => { /* ... */ },
///     ResourceType::LaunchTemplate => { /* ... */ },
///     ResourceType::LocalGateway => { /* ... */ },
///     ResourceType::LocalGatewayRouteTable => { /* ... */ },
///     ResourceType::LocalGatewayRouteTableVirtualInterfaceGroupAssociation => { /* ... */ },
///     ResourceType::LocalGatewayRouteTableVpcAssociation => { /* ... */ },
///     ResourceType::LocalGatewayVirtualInterface => { /* ... */ },
///     ResourceType::LocalGatewayVirtualInterfaceGroup => { /* ... */ },
///     ResourceType::Natgateway => { /* ... */ },
///     ResourceType::NetworkAcl => { /* ... */ },
///     ResourceType::NetworkInsightsAccessScope => { /* ... */ },
///     ResourceType::NetworkInsightsAccessScopeAnalysis => { /* ... */ },
///     ResourceType::NetworkInsightsAnalysis => { /* ... */ },
///     ResourceType::NetworkInsightsPath => { /* ... */ },
///     ResourceType::NetworkInterface => { /* ... */ },
///     ResourceType::PlacementGroup => { /* ... */ },
///     ResourceType::PrefixList => { /* ... */ },
///     ResourceType::ReplaceRootVolumeTask => { /* ... */ },
///     ResourceType::ReservedInstances => { /* ... */ },
///     ResourceType::RouteTable => { /* ... */ },
///     ResourceType::SecurityGroup => { /* ... */ },
///     ResourceType::SecurityGroupRule => { /* ... */ },
///     ResourceType::Snapshot => { /* ... */ },
///     ResourceType::SpotFleetRequest => { /* ... */ },
///     ResourceType::SpotInstancesRequest => { /* ... */ },
///     ResourceType::Subnet => { /* ... */ },
///     ResourceType::SubnetCidrReservation => { /* ... */ },
///     ResourceType::TrafficMirrorFilter => { /* ... */ },
///     ResourceType::TrafficMirrorFilterRule => { /* ... */ },
///     ResourceType::TrafficMirrorSession => { /* ... */ },
///     ResourceType::TrafficMirrorTarget => { /* ... */ },
///     ResourceType::TransitGateway => { /* ... */ },
///     ResourceType::TransitGatewayAttachment => { /* ... */ },
///     ResourceType::TransitGatewayConnectPeer => { /* ... */ },
///     ResourceType::TransitGatewayMulticastDomain => { /* ... */ },
///     ResourceType::TransitGatewayPolicyTable => { /* ... */ },
///     ResourceType::TransitGatewayRouteTable => { /* ... */ },
///     ResourceType::TransitGatewayRouteTableAnnouncement => { /* ... */ },
///     ResourceType::VerifiedAccessEndpoint => { /* ... */ },
///     ResourceType::VerifiedAccessGroup => { /* ... */ },
///     ResourceType::VerifiedAccessInstance => { /* ... */ },
///     ResourceType::VerifiedAccessPolicy => { /* ... */ },
///     ResourceType::VerifiedAccessTrustProvider => { /* ... */ },
///     ResourceType::Volume => { /* ... */ },
///     ResourceType::Vpc => { /* ... */ },
///     ResourceType::VpcBlockPublicAccessExclusion => { /* ... */ },
///     ResourceType::VpcEndpoint => { /* ... */ },
///     ResourceType::VpcEndpointConnection => { /* ... */ },
///     ResourceType::VpcEndpointConnectionDeviceType => { /* ... */ },
///     ResourceType::VpcEndpointService => { /* ... */ },
///     ResourceType::VpcEndpointServicePermission => { /* ... */ },
///     ResourceType::VpcFlowLog => { /* ... */ },
///     ResourceType::VpcPeeringConnection => { /* ... */ },
///     ResourceType::VpnConnection => { /* ... */ },
///     ResourceType::VpnConnectionDeviceType => { /* ... */ },
///     ResourceType::VpnGateway => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `resourcetype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `ResourceType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `ResourceType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `ResourceType::NewFeature` is defined.
/// Specifically, when `resourcetype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `ResourceType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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)] // documentation missing in model
    CapacityReservation,
    #[allow(missing_docs)] // documentation missing in model
    CapacityReservationFleet,
    #[allow(missing_docs)] // documentation missing in model
    CarrierGateway,
    #[allow(missing_docs)] // documentation missing in model
    ClientVpnEndpoint,
    #[allow(missing_docs)] // documentation missing in model
    CoipPool,
    #[allow(missing_docs)] // documentation missing in model
    CustomerGateway,
    #[allow(missing_docs)] // documentation missing in model
    DedicatedHost,
    #[allow(missing_docs)] // documentation missing in model
    DhcpOptions,
    #[allow(missing_docs)] // documentation missing in model
    EgressOnlyInternetGateway,
    #[allow(missing_docs)] // documentation missing in model
    ElasticGpu,
    #[allow(missing_docs)] // documentation missing in model
    ElasticIp,
    #[allow(missing_docs)] // documentation missing in model
    ExportImageTask,
    #[allow(missing_docs)] // documentation missing in model
    ExportInstanceTask,
    #[allow(missing_docs)] // documentation missing in model
    Fleet,
    #[allow(missing_docs)] // documentation missing in model
    FpgaImage,
    #[allow(missing_docs)] // documentation missing in model
    HostReservation,
    #[allow(missing_docs)] // documentation missing in model
    Image,
    #[allow(missing_docs)] // documentation missing in model
    ImportImageTask,
    #[allow(missing_docs)] // documentation missing in model
    ImportSnapshotTask,
    #[allow(missing_docs)] // documentation missing in model
    Instance,
    #[allow(missing_docs)] // documentation missing in model
    InstanceEventWindow,
    #[allow(missing_docs)] // documentation missing in model
    InternetGateway,
    #[allow(missing_docs)] // documentation missing in model
    Ipam,
    #[allow(missing_docs)] // documentation missing in model
    IpamPool,
    #[allow(missing_docs)] // documentation missing in model
    IpamScope,
    #[allow(missing_docs)] // documentation missing in model
    Ipv4poolEc2,
    #[allow(missing_docs)] // documentation missing in model
    Ipv6poolEc2,
    #[allow(missing_docs)] // documentation missing in model
    KeyPair,
    #[allow(missing_docs)] // documentation missing in model
    LaunchTemplate,
    #[allow(missing_docs)] // documentation missing in model
    LocalGateway,
    #[allow(missing_docs)] // documentation missing in model
    LocalGatewayRouteTable,
    #[allow(missing_docs)] // documentation missing in model
    LocalGatewayRouteTableVirtualInterfaceGroupAssociation,
    #[allow(missing_docs)] // documentation missing in model
    LocalGatewayRouteTableVpcAssociation,
    #[allow(missing_docs)] // documentation missing in model
    LocalGatewayVirtualInterface,
    #[allow(missing_docs)] // documentation missing in model
    LocalGatewayVirtualInterfaceGroup,
    #[allow(missing_docs)] // documentation missing in model
    Natgateway,
    #[allow(missing_docs)] // documentation missing in model
    NetworkAcl,
    #[allow(missing_docs)] // documentation missing in model
    NetworkInsightsAccessScope,
    #[allow(missing_docs)] // documentation missing in model
    NetworkInsightsAccessScopeAnalysis,
    #[allow(missing_docs)] // documentation missing in model
    NetworkInsightsAnalysis,
    #[allow(missing_docs)] // documentation missing in model
    NetworkInsightsPath,
    #[allow(missing_docs)] // documentation missing in model
    NetworkInterface,
    #[allow(missing_docs)] // documentation missing in model
    PlacementGroup,
    #[allow(missing_docs)] // documentation missing in model
    PrefixList,
    #[allow(missing_docs)] // documentation missing in model
    ReplaceRootVolumeTask,
    #[allow(missing_docs)] // documentation missing in model
    ReservedInstances,
    #[allow(missing_docs)] // documentation missing in model
    RouteTable,
    #[allow(missing_docs)] // documentation missing in model
    SecurityGroup,
    #[allow(missing_docs)] // documentation missing in model
    SecurityGroupRule,
    #[allow(missing_docs)] // documentation missing in model
    Snapshot,
    #[allow(missing_docs)] // documentation missing in model
    SpotFleetRequest,
    #[allow(missing_docs)] // documentation missing in model
    SpotInstancesRequest,
    #[allow(missing_docs)] // documentation missing in model
    Subnet,
    #[allow(missing_docs)] // documentation missing in model
    SubnetCidrReservation,
    #[allow(missing_docs)] // documentation missing in model
    TrafficMirrorFilter,
    #[allow(missing_docs)] // documentation missing in model
    TrafficMirrorFilterRule,
    #[allow(missing_docs)] // documentation missing in model
    TrafficMirrorSession,
    #[allow(missing_docs)] // documentation missing in model
    TrafficMirrorTarget,
    #[allow(missing_docs)] // documentation missing in model
    TransitGateway,
    #[allow(missing_docs)] // documentation missing in model
    TransitGatewayAttachment,
    #[allow(missing_docs)] // documentation missing in model
    TransitGatewayConnectPeer,
    #[allow(missing_docs)] // documentation missing in model
    TransitGatewayMulticastDomain,
    #[allow(missing_docs)] // documentation missing in model
    TransitGatewayPolicyTable,
    #[allow(missing_docs)] // documentation missing in model
    TransitGatewayRouteTable,
    #[allow(missing_docs)] // documentation missing in model
    TransitGatewayRouteTableAnnouncement,
    #[allow(missing_docs)] // documentation missing in model
    VerifiedAccessEndpoint,
    #[allow(missing_docs)] // documentation missing in model
    VerifiedAccessGroup,
    #[allow(missing_docs)] // documentation missing in model
    VerifiedAccessInstance,
    #[allow(missing_docs)] // documentation missing in model
    VerifiedAccessPolicy,
    #[allow(missing_docs)] // documentation missing in model
    VerifiedAccessTrustProvider,
    #[allow(missing_docs)] // documentation missing in model
    Volume,
    #[allow(missing_docs)] // documentation missing in model
    Vpc,
    #[allow(missing_docs)] // documentation missing in model
    VpcBlockPublicAccessExclusion,
    #[allow(missing_docs)] // documentation missing in model
    VpcEndpoint,
    #[allow(missing_docs)] // documentation missing in model
    VpcEndpointConnection,
    #[allow(missing_docs)] // documentation missing in model
    VpcEndpointConnectionDeviceType,
    #[allow(missing_docs)] // documentation missing in model
    VpcEndpointService,
    #[allow(missing_docs)] // documentation missing in model
    VpcEndpointServicePermission,
    #[allow(missing_docs)] // documentation missing in model
    VpcFlowLog,
    #[allow(missing_docs)] // documentation missing in model
    VpcPeeringConnection,
    #[allow(missing_docs)] // documentation missing in model
    VpnConnection,
    #[allow(missing_docs)] // documentation missing in model
    VpnConnectionDeviceType,
    #[allow(missing_docs)] // documentation missing in model
    VpnGateway,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for ResourceType {
    fn from(s: &str) -> Self {
        match s {
            "capacity-reservation" => ResourceType::CapacityReservation,
            "capacity-reservation-fleet" => ResourceType::CapacityReservationFleet,
            "carrier-gateway" => ResourceType::CarrierGateway,
            "client-vpn-endpoint" => ResourceType::ClientVpnEndpoint,
            "coip-pool" => ResourceType::CoipPool,
            "customer-gateway" => ResourceType::CustomerGateway,
            "dedicated-host" => ResourceType::DedicatedHost,
            "dhcp-options" => ResourceType::DhcpOptions,
            "egress-only-internet-gateway" => ResourceType::EgressOnlyInternetGateway,
            "elastic-gpu" => ResourceType::ElasticGpu,
            "elastic-ip" => ResourceType::ElasticIp,
            "export-image-task" => ResourceType::ExportImageTask,
            "export-instance-task" => ResourceType::ExportInstanceTask,
            "fleet" => ResourceType::Fleet,
            "fpga-image" => ResourceType::FpgaImage,
            "host-reservation" => ResourceType::HostReservation,
            "image" => ResourceType::Image,
            "import-image-task" => ResourceType::ImportImageTask,
            "import-snapshot-task" => ResourceType::ImportSnapshotTask,
            "instance" => ResourceType::Instance,
            "instance-event-window" => ResourceType::InstanceEventWindow,
            "internet-gateway" => ResourceType::InternetGateway,
            "ipam" => ResourceType::Ipam,
            "ipam-pool" => ResourceType::IpamPool,
            "ipam-scope" => ResourceType::IpamScope,
            "ipv4pool-ec2" => ResourceType::Ipv4poolEc2,
            "ipv6pool-ec2" => ResourceType::Ipv6poolEc2,
            "key-pair" => ResourceType::KeyPair,
            "launch-template" => ResourceType::LaunchTemplate,
            "local-gateway" => ResourceType::LocalGateway,
            "local-gateway-route-table" => ResourceType::LocalGatewayRouteTable,
            "local-gateway-route-table-virtual-interface-group-association" => {
                ResourceType::LocalGatewayRouteTableVirtualInterfaceGroupAssociation
            }
            "local-gateway-route-table-vpc-association" => {
                ResourceType::LocalGatewayRouteTableVpcAssociation
            }
            "local-gateway-virtual-interface" => ResourceType::LocalGatewayVirtualInterface,
            "local-gateway-virtual-interface-group" => {
                ResourceType::LocalGatewayVirtualInterfaceGroup
            }
            "natgateway" => ResourceType::Natgateway,
            "network-acl" => ResourceType::NetworkAcl,
            "network-insights-access-scope" => ResourceType::NetworkInsightsAccessScope,
            "network-insights-access-scope-analysis" => {
                ResourceType::NetworkInsightsAccessScopeAnalysis
            }
            "network-insights-analysis" => ResourceType::NetworkInsightsAnalysis,
            "network-insights-path" => ResourceType::NetworkInsightsPath,
            "network-interface" => ResourceType::NetworkInterface,
            "placement-group" => ResourceType::PlacementGroup,
            "prefix-list" => ResourceType::PrefixList,
            "replace-root-volume-task" => ResourceType::ReplaceRootVolumeTask,
            "reserved-instances" => ResourceType::ReservedInstances,
            "route-table" => ResourceType::RouteTable,
            "security-group" => ResourceType::SecurityGroup,
            "security-group-rule" => ResourceType::SecurityGroupRule,
            "snapshot" => ResourceType::Snapshot,
            "spot-fleet-request" => ResourceType::SpotFleetRequest,
            "spot-instances-request" => ResourceType::SpotInstancesRequest,
            "subnet" => ResourceType::Subnet,
            "subnet-cidr-reservation" => ResourceType::SubnetCidrReservation,
            "traffic-mirror-filter" => ResourceType::TrafficMirrorFilter,
            "traffic-mirror-filter-rule" => ResourceType::TrafficMirrorFilterRule,
            "traffic-mirror-session" => ResourceType::TrafficMirrorSession,
            "traffic-mirror-target" => ResourceType::TrafficMirrorTarget,
            "transit-gateway" => ResourceType::TransitGateway,
            "transit-gateway-attachment" => ResourceType::TransitGatewayAttachment,
            "transit-gateway-connect-peer" => ResourceType::TransitGatewayConnectPeer,
            "transit-gateway-multicast-domain" => ResourceType::TransitGatewayMulticastDomain,
            "transit-gateway-policy-table" => ResourceType::TransitGatewayPolicyTable,
            "transit-gateway-route-table" => ResourceType::TransitGatewayRouteTable,
            "transit-gateway-route-table-announcement" => {
                ResourceType::TransitGatewayRouteTableAnnouncement
            }
            "verified-access-endpoint" => ResourceType::VerifiedAccessEndpoint,
            "verified-access-group" => ResourceType::VerifiedAccessGroup,
            "verified-access-instance" => ResourceType::VerifiedAccessInstance,
            "verified-access-policy" => ResourceType::VerifiedAccessPolicy,
            "verified-access-trust-provider" => ResourceType::VerifiedAccessTrustProvider,
            "volume" => ResourceType::Volume,
            "vpc" => ResourceType::Vpc,
            "vpc-block-public-access-exclusion" => ResourceType::VpcBlockPublicAccessExclusion,
            "vpc-endpoint" => ResourceType::VpcEndpoint,
            "vpc-endpoint-connection" => ResourceType::VpcEndpointConnection,
            "vpc-endpoint-connection-device-type" => ResourceType::VpcEndpointConnectionDeviceType,
            "vpc-endpoint-service" => ResourceType::VpcEndpointService,
            "vpc-endpoint-service-permission" => ResourceType::VpcEndpointServicePermission,
            "vpc-flow-log" => ResourceType::VpcFlowLog,
            "vpc-peering-connection" => ResourceType::VpcPeeringConnection,
            "vpn-connection" => ResourceType::VpnConnection,
            "vpn-connection-device-type" => ResourceType::VpnConnectionDeviceType,
            "vpn-gateway" => ResourceType::VpnGateway,
            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 {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            ResourceType::CapacityReservation => "capacity-reservation",
            ResourceType::CapacityReservationFleet => "capacity-reservation-fleet",
            ResourceType::CarrierGateway => "carrier-gateway",
            ResourceType::ClientVpnEndpoint => "client-vpn-endpoint",
            ResourceType::CoipPool => "coip-pool",
            ResourceType::CustomerGateway => "customer-gateway",
            ResourceType::DedicatedHost => "dedicated-host",
            ResourceType::DhcpOptions => "dhcp-options",
            ResourceType::EgressOnlyInternetGateway => "egress-only-internet-gateway",
            ResourceType::ElasticGpu => "elastic-gpu",
            ResourceType::ElasticIp => "elastic-ip",
            ResourceType::ExportImageTask => "export-image-task",
            ResourceType::ExportInstanceTask => "export-instance-task",
            ResourceType::Fleet => "fleet",
            ResourceType::FpgaImage => "fpga-image",
            ResourceType::HostReservation => "host-reservation",
            ResourceType::Image => "image",
            ResourceType::ImportImageTask => "import-image-task",
            ResourceType::ImportSnapshotTask => "import-snapshot-task",
            ResourceType::Instance => "instance",
            ResourceType::InstanceEventWindow => "instance-event-window",
            ResourceType::InternetGateway => "internet-gateway",
            ResourceType::Ipam => "ipam",
            ResourceType::IpamPool => "ipam-pool",
            ResourceType::IpamScope => "ipam-scope",
            ResourceType::Ipv4poolEc2 => "ipv4pool-ec2",
            ResourceType::Ipv6poolEc2 => "ipv6pool-ec2",
            ResourceType::KeyPair => "key-pair",
            ResourceType::LaunchTemplate => "launch-template",
            ResourceType::LocalGateway => "local-gateway",
            ResourceType::LocalGatewayRouteTable => "local-gateway-route-table",
            ResourceType::LocalGatewayRouteTableVirtualInterfaceGroupAssociation => {
                "local-gateway-route-table-virtual-interface-group-association"
            }
            ResourceType::LocalGatewayRouteTableVpcAssociation => {
                "local-gateway-route-table-vpc-association"
            }
            ResourceType::LocalGatewayVirtualInterface => "local-gateway-virtual-interface",
            ResourceType::LocalGatewayVirtualInterfaceGroup => {
                "local-gateway-virtual-interface-group"
            }
            ResourceType::Natgateway => "natgateway",
            ResourceType::NetworkAcl => "network-acl",
            ResourceType::NetworkInsightsAccessScope => "network-insights-access-scope",
            ResourceType::NetworkInsightsAccessScopeAnalysis => {
                "network-insights-access-scope-analysis"
            }
            ResourceType::NetworkInsightsAnalysis => "network-insights-analysis",
            ResourceType::NetworkInsightsPath => "network-insights-path",
            ResourceType::NetworkInterface => "network-interface",
            ResourceType::PlacementGroup => "placement-group",
            ResourceType::PrefixList => "prefix-list",
            ResourceType::ReplaceRootVolumeTask => "replace-root-volume-task",
            ResourceType::ReservedInstances => "reserved-instances",
            ResourceType::RouteTable => "route-table",
            ResourceType::SecurityGroup => "security-group",
            ResourceType::SecurityGroupRule => "security-group-rule",
            ResourceType::Snapshot => "snapshot",
            ResourceType::SpotFleetRequest => "spot-fleet-request",
            ResourceType::SpotInstancesRequest => "spot-instances-request",
            ResourceType::Subnet => "subnet",
            ResourceType::SubnetCidrReservation => "subnet-cidr-reservation",
            ResourceType::TrafficMirrorFilter => "traffic-mirror-filter",
            ResourceType::TrafficMirrorFilterRule => "traffic-mirror-filter-rule",
            ResourceType::TrafficMirrorSession => "traffic-mirror-session",
            ResourceType::TrafficMirrorTarget => "traffic-mirror-target",
            ResourceType::TransitGateway => "transit-gateway",
            ResourceType::TransitGatewayAttachment => "transit-gateway-attachment",
            ResourceType::TransitGatewayConnectPeer => "transit-gateway-connect-peer",
            ResourceType::TransitGatewayMulticastDomain => "transit-gateway-multicast-domain",
            ResourceType::TransitGatewayPolicyTable => "transit-gateway-policy-table",
            ResourceType::TransitGatewayRouteTable => "transit-gateway-route-table",
            ResourceType::TransitGatewayRouteTableAnnouncement => {
                "transit-gateway-route-table-announcement"
            }
            ResourceType::VerifiedAccessEndpoint => "verified-access-endpoint",
            ResourceType::VerifiedAccessGroup => "verified-access-group",
            ResourceType::VerifiedAccessInstance => "verified-access-instance",
            ResourceType::VerifiedAccessPolicy => "verified-access-policy",
            ResourceType::VerifiedAccessTrustProvider => "verified-access-trust-provider",
            ResourceType::Volume => "volume",
            ResourceType::Vpc => "vpc",
            ResourceType::VpcBlockPublicAccessExclusion => "vpc-block-public-access-exclusion",
            ResourceType::VpcEndpoint => "vpc-endpoint",
            ResourceType::VpcEndpointConnection => "vpc-endpoint-connection",
            ResourceType::VpcEndpointConnectionDeviceType => "vpc-endpoint-connection-device-type",
            ResourceType::VpcEndpointService => "vpc-endpoint-service",
            ResourceType::VpcEndpointServicePermission => "vpc-endpoint-service-permission",
            ResourceType::VpcFlowLog => "vpc-flow-log",
            ResourceType::VpcPeeringConnection => "vpc-peering-connection",
            ResourceType::VpnConnection => "vpn-connection",
            ResourceType::VpnConnectionDeviceType => "vpn-connection-device-type",
            ResourceType::VpnGateway => "vpn-gateway",
            ResourceType::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &[
            "capacity-reservation",
            "capacity-reservation-fleet",
            "carrier-gateway",
            "client-vpn-endpoint",
            "coip-pool",
            "customer-gateway",
            "dedicated-host",
            "dhcp-options",
            "egress-only-internet-gateway",
            "elastic-gpu",
            "elastic-ip",
            "export-image-task",
            "export-instance-task",
            "fleet",
            "fpga-image",
            "host-reservation",
            "image",
            "import-image-task",
            "import-snapshot-task",
            "instance",
            "instance-event-window",
            "internet-gateway",
            "ipam",
            "ipam-pool",
            "ipam-scope",
            "ipv4pool-ec2",
            "ipv6pool-ec2",
            "key-pair",
            "launch-template",
            "local-gateway",
            "local-gateway-route-table",
            "local-gateway-route-table-virtual-interface-group-association",
            "local-gateway-route-table-vpc-association",
            "local-gateway-virtual-interface",
            "local-gateway-virtual-interface-group",
            "natgateway",
            "network-acl",
            "network-insights-access-scope",
            "network-insights-access-scope-analysis",
            "network-insights-analysis",
            "network-insights-path",
            "network-interface",
            "placement-group",
            "prefix-list",
            "replace-root-volume-task",
            "reserved-instances",
            "route-table",
            "security-group",
            "security-group-rule",
            "snapshot",
            "spot-fleet-request",
            "spot-instances-request",
            "subnet",
            "subnet-cidr-reservation",
            "traffic-mirror-filter",
            "traffic-mirror-filter-rule",
            "traffic-mirror-session",
            "traffic-mirror-target",
            "transit-gateway",
            "transit-gateway-attachment",
            "transit-gateway-connect-peer",
            "transit-gateway-multicast-domain",
            "transit-gateway-policy-table",
            "transit-gateway-route-table",
            "transit-gateway-route-table-announcement",
            "verified-access-endpoint",
            "verified-access-group",
            "verified-access-instance",
            "verified-access-policy",
            "verified-access-trust-provider",
            "volume",
            "vpc",
            "vpc-block-public-access-exclusion",
            "vpc-endpoint",
            "vpc-endpoint-connection",
            "vpc-endpoint-connection-device-type",
            "vpc-endpoint-service",
            "vpc-endpoint-service-permission",
            "vpc-flow-log",
            "vpc-peering-connection",
            "vpn-connection",
            "vpn-connection-device-type",
            "vpn-gateway",
        ]
    }
}
impl AsRef<str> for ResourceType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes a Network Access Scope analysis.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct NetworkInsightsAccessScopeAnalysis {
    /// <p>The ID of the Network Access Scope analysis.</p>
    #[doc(hidden)]
    pub network_insights_access_scope_analysis_id: std::option::Option<std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the Network Access Scope analysis.</p>
    #[doc(hidden)]
    pub network_insights_access_scope_analysis_arn: std::option::Option<std::string::String>,
    /// <p>The ID of the Network Access Scope.</p>
    #[doc(hidden)]
    pub network_insights_access_scope_id: std::option::Option<std::string::String>,
    /// <p>The status.</p>
    #[doc(hidden)]
    pub status: std::option::Option<crate::model::AnalysisStatus>,
    /// <p>The status message.</p>
    #[doc(hidden)]
    pub status_message: std::option::Option<std::string::String>,
    /// <p>The warning message.</p>
    #[doc(hidden)]
    pub warning_message: std::option::Option<std::string::String>,
    /// <p>The analysis start date.</p>
    #[doc(hidden)]
    pub start_date: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The analysis end date.</p>
    #[doc(hidden)]
    pub end_date: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>Indicates whether there are findings.</p>
    #[doc(hidden)]
    pub findings_found: std::option::Option<crate::model::FindingsFound>,
    /// <p>The number of network interfaces analyzed.</p>
    #[doc(hidden)]
    pub analyzed_eni_count: std::option::Option<i32>,
    /// <p>The tags.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl NetworkInsightsAccessScopeAnalysis {
    /// <p>The ID of the Network Access Scope analysis.</p>
    pub fn network_insights_access_scope_analysis_id(&self) -> std::option::Option<&str> {
        self.network_insights_access_scope_analysis_id.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the Network Access Scope analysis.</p>
    pub fn network_insights_access_scope_analysis_arn(&self) -> std::option::Option<&str> {
        self.network_insights_access_scope_analysis_arn.as_deref()
    }
    /// <p>The ID of the Network Access Scope.</p>
    pub fn network_insights_access_scope_id(&self) -> std::option::Option<&str> {
        self.network_insights_access_scope_id.as_deref()
    }
    /// <p>The status.</p>
    pub fn status(&self) -> std::option::Option<&crate::model::AnalysisStatus> {
        self.status.as_ref()
    }
    /// <p>The status message.</p>
    pub fn status_message(&self) -> std::option::Option<&str> {
        self.status_message.as_deref()
    }
    /// <p>The warning message.</p>
    pub fn warning_message(&self) -> std::option::Option<&str> {
        self.warning_message.as_deref()
    }
    /// <p>The analysis start date.</p>
    pub fn start_date(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.start_date.as_ref()
    }
    /// <p>The analysis end date.</p>
    pub fn end_date(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.end_date.as_ref()
    }
    /// <p>Indicates whether there are findings.</p>
    pub fn findings_found(&self) -> std::option::Option<&crate::model::FindingsFound> {
        self.findings_found.as_ref()
    }
    /// <p>The number of network interfaces analyzed.</p>
    pub fn analyzed_eni_count(&self) -> std::option::Option<i32> {
        self.analyzed_eni_count
    }
    /// <p>The tags.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
}
/// See [`NetworkInsightsAccessScopeAnalysis`](crate::model::NetworkInsightsAccessScopeAnalysis).
pub mod network_insights_access_scope_analysis {

    /// A builder for [`NetworkInsightsAccessScopeAnalysis`](crate::model::NetworkInsightsAccessScopeAnalysis).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) network_insights_access_scope_analysis_id:
            std::option::Option<std::string::String>,
        pub(crate) network_insights_access_scope_analysis_arn:
            std::option::Option<std::string::String>,
        pub(crate) network_insights_access_scope_id: std::option::Option<std::string::String>,
        pub(crate) status: std::option::Option<crate::model::AnalysisStatus>,
        pub(crate) status_message: std::option::Option<std::string::String>,
        pub(crate) warning_message: std::option::Option<std::string::String>,
        pub(crate) start_date: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) end_date: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) findings_found: std::option::Option<crate::model::FindingsFound>,
        pub(crate) analyzed_eni_count: std::option::Option<i32>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    }
    impl Builder {
        /// <p>The ID of the Network Access Scope analysis.</p>
        pub fn network_insights_access_scope_analysis_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.network_insights_access_scope_analysis_id = Some(input.into());
            self
        }
        /// <p>The ID of the Network Access Scope analysis.</p>
        pub fn set_network_insights_access_scope_analysis_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.network_insights_access_scope_analysis_id = input;
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the Network Access Scope analysis.</p>
        pub fn network_insights_access_scope_analysis_arn(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.network_insights_access_scope_analysis_arn = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the Network Access Scope analysis.</p>
        pub fn set_network_insights_access_scope_analysis_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.network_insights_access_scope_analysis_arn = input;
            self
        }
        /// <p>The ID of the Network Access Scope.</p>
        pub fn network_insights_access_scope_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.network_insights_access_scope_id = Some(input.into());
            self
        }
        /// <p>The ID of the Network Access Scope.</p>
        pub fn set_network_insights_access_scope_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.network_insights_access_scope_id = input;
            self
        }
        /// <p>The status.</p>
        pub fn status(mut self, input: crate::model::AnalysisStatus) -> Self {
            self.status = Some(input);
            self
        }
        /// <p>The status.</p>
        pub fn set_status(
            mut self,
            input: std::option::Option<crate::model::AnalysisStatus>,
        ) -> Self {
            self.status = input;
            self
        }
        /// <p>The status message.</p>
        pub fn status_message(mut self, input: impl Into<std::string::String>) -> Self {
            self.status_message = Some(input.into());
            self
        }
        /// <p>The status message.</p>
        pub fn set_status_message(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.status_message = input;
            self
        }
        /// <p>The warning message.</p>
        pub fn warning_message(mut self, input: impl Into<std::string::String>) -> Self {
            self.warning_message = Some(input.into());
            self
        }
        /// <p>The warning message.</p>
        pub fn set_warning_message(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.warning_message = input;
            self
        }
        /// <p>The analysis start date.</p>
        pub fn start_date(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.start_date = Some(input);
            self
        }
        /// <p>The analysis start date.</p>
        pub fn set_start_date(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.start_date = input;
            self
        }
        /// <p>The analysis end date.</p>
        pub fn end_date(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.end_date = Some(input);
            self
        }
        /// <p>The analysis end date.</p>
        pub fn set_end_date(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.end_date = input;
            self
        }
        /// <p>Indicates whether there are findings.</p>
        pub fn findings_found(mut self, input: crate::model::FindingsFound) -> Self {
            self.findings_found = Some(input);
            self
        }
        /// <p>Indicates whether there are findings.</p>
        pub fn set_findings_found(
            mut self,
            input: std::option::Option<crate::model::FindingsFound>,
        ) -> Self {
            self.findings_found = input;
            self
        }
        /// <p>The number of network interfaces analyzed.</p>
        pub fn analyzed_eni_count(mut self, input: i32) -> Self {
            self.analyzed_eni_count = Some(input);
            self
        }
        /// <p>The number of network interfaces analyzed.</p>
        pub fn set_analyzed_eni_count(mut self, input: std::option::Option<i32>) -> Self {
            self.analyzed_eni_count = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>The tags.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>The tags.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// Consumes the builder and constructs a [`NetworkInsightsAccessScopeAnalysis`](crate::model::NetworkInsightsAccessScopeAnalysis).
        pub fn build(self) -> crate::model::NetworkInsightsAccessScopeAnalysis {
            crate::model::NetworkInsightsAccessScopeAnalysis {
                network_insights_access_scope_analysis_id: self
                    .network_insights_access_scope_analysis_id,
                network_insights_access_scope_analysis_arn: self
                    .network_insights_access_scope_analysis_arn,
                network_insights_access_scope_id: self.network_insights_access_scope_id,
                status: self.status,
                status_message: self.status_message,
                warning_message: self.warning_message,
                start_date: self.start_date,
                end_date: self.end_date,
                findings_found: self.findings_found,
                analyzed_eni_count: self.analyzed_eni_count,
                tags: self.tags,
            }
        }
    }
}
impl NetworkInsightsAccessScopeAnalysis {
    /// Creates a new builder-style object to manufacture [`NetworkInsightsAccessScopeAnalysis`](crate::model::NetworkInsightsAccessScopeAnalysis).
    pub fn builder() -> crate::model::network_insights_access_scope_analysis::Builder {
        crate::model::network_insights_access_scope_analysis::Builder::default()
    }
}

/// When writing a match expression against `FindingsFound`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let findingsfound = unimplemented!();
/// match findingsfound {
///     FindingsFound::False => { /* ... */ },
///     FindingsFound::True => { /* ... */ },
///     FindingsFound::UnknownValue => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `findingsfound` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `FindingsFound::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `FindingsFound::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `FindingsFound::NewFeature` is defined.
/// Specifically, when `findingsfound` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `FindingsFound::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
/// _Note: `FindingsFound::Unknown` has been renamed to `::UnknownValue`._
#[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 FindingsFound {
    #[allow(missing_docs)] // documentation missing in model
    False,
    #[allow(missing_docs)] // documentation missing in model
    True,
    /// _Note: `::Unknown` has been renamed to `::UnknownValue`._
    UnknownValue,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for FindingsFound {
    fn from(s: &str) -> Self {
        match s {
            "false" => FindingsFound::False,
            "true" => FindingsFound::True,
            "unknown" => FindingsFound::UnknownValue,
            other => FindingsFound::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for FindingsFound {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(FindingsFound::from(s))
    }
}
impl FindingsFound {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            FindingsFound::False => "false",
            FindingsFound::True => "true",
            FindingsFound::UnknownValue => "unknown",
            FindingsFound::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["false", "true", "unknown"]
    }
}
impl AsRef<str> for FindingsFound {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes a route for a transit gateway route table.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TransitGatewayRoute {
    /// <p>The CIDR block used for destination matches.</p>
    #[doc(hidden)]
    pub destination_cidr_block: std::option::Option<std::string::String>,
    /// <p>The ID of the prefix list used for destination matches.</p>
    #[doc(hidden)]
    pub prefix_list_id: std::option::Option<std::string::String>,
    /// <p>The ID of the transit gateway route table announcement. </p>
    #[doc(hidden)]
    pub transit_gateway_route_table_announcement_id: std::option::Option<std::string::String>,
    /// <p>The attachments.</p>
    #[doc(hidden)]
    pub transit_gateway_attachments:
        std::option::Option<std::vec::Vec<crate::model::TransitGatewayRouteAttachment>>,
    /// <p>The route type.</p>
    #[doc(hidden)]
    pub r#type: std::option::Option<crate::model::TransitGatewayRouteType>,
    /// <p>The state of the route.</p>
    #[doc(hidden)]
    pub state: std::option::Option<crate::model::TransitGatewayRouteState>,
}
impl TransitGatewayRoute {
    /// <p>The CIDR block used for destination matches.</p>
    pub fn destination_cidr_block(&self) -> std::option::Option<&str> {
        self.destination_cidr_block.as_deref()
    }
    /// <p>The ID of the prefix list used for destination matches.</p>
    pub fn prefix_list_id(&self) -> std::option::Option<&str> {
        self.prefix_list_id.as_deref()
    }
    /// <p>The ID of the transit gateway route table announcement. </p>
    pub fn transit_gateway_route_table_announcement_id(&self) -> std::option::Option<&str> {
        self.transit_gateway_route_table_announcement_id.as_deref()
    }
    /// <p>The attachments.</p>
    pub fn transit_gateway_attachments(
        &self,
    ) -> std::option::Option<&[crate::model::TransitGatewayRouteAttachment]> {
        self.transit_gateway_attachments.as_deref()
    }
    /// <p>The route type.</p>
    pub fn r#type(&self) -> std::option::Option<&crate::model::TransitGatewayRouteType> {
        self.r#type.as_ref()
    }
    /// <p>The state of the route.</p>
    pub fn state(&self) -> std::option::Option<&crate::model::TransitGatewayRouteState> {
        self.state.as_ref()
    }
}
/// See [`TransitGatewayRoute`](crate::model::TransitGatewayRoute).
pub mod transit_gateway_route {

    /// A builder for [`TransitGatewayRoute`](crate::model::TransitGatewayRoute).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) destination_cidr_block: std::option::Option<std::string::String>,
        pub(crate) prefix_list_id: std::option::Option<std::string::String>,
        pub(crate) transit_gateway_route_table_announcement_id:
            std::option::Option<std::string::String>,
        pub(crate) transit_gateway_attachments:
            std::option::Option<std::vec::Vec<crate::model::TransitGatewayRouteAttachment>>,
        pub(crate) r#type: std::option::Option<crate::model::TransitGatewayRouteType>,
        pub(crate) state: std::option::Option<crate::model::TransitGatewayRouteState>,
    }
    impl Builder {
        /// <p>The CIDR block used for destination matches.</p>
        pub fn destination_cidr_block(mut self, input: impl Into<std::string::String>) -> Self {
            self.destination_cidr_block = Some(input.into());
            self
        }
        /// <p>The CIDR block used for destination matches.</p>
        pub fn set_destination_cidr_block(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.destination_cidr_block = input;
            self
        }
        /// <p>The ID of the prefix list used for destination matches.</p>
        pub fn prefix_list_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.prefix_list_id = Some(input.into());
            self
        }
        /// <p>The ID of the prefix list used for destination matches.</p>
        pub fn set_prefix_list_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.prefix_list_id = input;
            self
        }
        /// <p>The ID of the transit gateway route table announcement. </p>
        pub fn transit_gateway_route_table_announcement_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.transit_gateway_route_table_announcement_id = Some(input.into());
            self
        }
        /// <p>The ID of the transit gateway route table announcement. </p>
        pub fn set_transit_gateway_route_table_announcement_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.transit_gateway_route_table_announcement_id = input;
            self
        }
        /// Appends an item to `transit_gateway_attachments`.
        ///
        /// To override the contents of this collection use [`set_transit_gateway_attachments`](Self::set_transit_gateway_attachments).
        ///
        /// <p>The attachments.</p>
        pub fn transit_gateway_attachments(
            mut self,
            input: crate::model::TransitGatewayRouteAttachment,
        ) -> Self {
            let mut v = self.transit_gateway_attachments.unwrap_or_default();
            v.push(input);
            self.transit_gateway_attachments = Some(v);
            self
        }
        /// <p>The attachments.</p>
        pub fn set_transit_gateway_attachments(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::TransitGatewayRouteAttachment>>,
        ) -> Self {
            self.transit_gateway_attachments = input;
            self
        }
        /// <p>The route type.</p>
        pub fn r#type(mut self, input: crate::model::TransitGatewayRouteType) -> Self {
            self.r#type = Some(input);
            self
        }
        /// <p>The route type.</p>
        pub fn set_type(
            mut self,
            input: std::option::Option<crate::model::TransitGatewayRouteType>,
        ) -> Self {
            self.r#type = input;
            self
        }
        /// <p>The state of the route.</p>
        pub fn state(mut self, input: crate::model::TransitGatewayRouteState) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>The state of the route.</p>
        pub fn set_state(
            mut self,
            input: std::option::Option<crate::model::TransitGatewayRouteState>,
        ) -> Self {
            self.state = input;
            self
        }
        /// Consumes the builder and constructs a [`TransitGatewayRoute`](crate::model::TransitGatewayRoute).
        pub fn build(self) -> crate::model::TransitGatewayRoute {
            crate::model::TransitGatewayRoute {
                destination_cidr_block: self.destination_cidr_block,
                prefix_list_id: self.prefix_list_id,
                transit_gateway_route_table_announcement_id: self
                    .transit_gateway_route_table_announcement_id,
                transit_gateway_attachments: self.transit_gateway_attachments,
                r#type: self.r#type,
                state: self.state,
            }
        }
    }
}
impl TransitGatewayRoute {
    /// Creates a new builder-style object to manufacture [`TransitGatewayRoute`](crate::model::TransitGatewayRoute).
    pub fn builder() -> crate::model::transit_gateway_route::Builder {
        crate::model::transit_gateway_route::Builder::default()
    }
}

/// When writing a match expression against `TransitGatewayRouteState`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let transitgatewayroutestate = unimplemented!();
/// match transitgatewayroutestate {
///     TransitGatewayRouteState::Active => { /* ... */ },
///     TransitGatewayRouteState::Blackhole => { /* ... */ },
///     TransitGatewayRouteState::Deleted => { /* ... */ },
///     TransitGatewayRouteState::Deleting => { /* ... */ },
///     TransitGatewayRouteState::Pending => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `transitgatewayroutestate` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `TransitGatewayRouteState::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `TransitGatewayRouteState::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `TransitGatewayRouteState::NewFeature` is defined.
/// Specifically, when `transitgatewayroutestate` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `TransitGatewayRouteState::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 TransitGatewayRouteState {
    #[allow(missing_docs)] // documentation missing in model
    Active,
    #[allow(missing_docs)] // documentation missing in model
    Blackhole,
    #[allow(missing_docs)] // documentation missing in model
    Deleted,
    #[allow(missing_docs)] // documentation missing in model
    Deleting,
    #[allow(missing_docs)] // documentation missing in model
    Pending,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for TransitGatewayRouteState {
    fn from(s: &str) -> Self {
        match s {
            "active" => TransitGatewayRouteState::Active,
            "blackhole" => TransitGatewayRouteState::Blackhole,
            "deleted" => TransitGatewayRouteState::Deleted,
            "deleting" => TransitGatewayRouteState::Deleting,
            "pending" => TransitGatewayRouteState::Pending,
            other => TransitGatewayRouteState::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for TransitGatewayRouteState {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(TransitGatewayRouteState::from(s))
    }
}
impl TransitGatewayRouteState {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            TransitGatewayRouteState::Active => "active",
            TransitGatewayRouteState::Blackhole => "blackhole",
            TransitGatewayRouteState::Deleted => "deleted",
            TransitGatewayRouteState::Deleting => "deleting",
            TransitGatewayRouteState::Pending => "pending",
            TransitGatewayRouteState::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["active", "blackhole", "deleted", "deleting", "pending"]
    }
}
impl AsRef<str> for TransitGatewayRouteState {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `TransitGatewayRouteType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let transitgatewayroutetype = unimplemented!();
/// match transitgatewayroutetype {
///     TransitGatewayRouteType::Propagated => { /* ... */ },
///     TransitGatewayRouteType::Static => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `transitgatewayroutetype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `TransitGatewayRouteType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `TransitGatewayRouteType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `TransitGatewayRouteType::NewFeature` is defined.
/// Specifically, when `transitgatewayroutetype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `TransitGatewayRouteType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 TransitGatewayRouteType {
    #[allow(missing_docs)] // documentation missing in model
    Propagated,
    #[allow(missing_docs)] // documentation missing in model
    Static,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for TransitGatewayRouteType {
    fn from(s: &str) -> Self {
        match s {
            "propagated" => TransitGatewayRouteType::Propagated,
            "static" => TransitGatewayRouteType::Static,
            other => TransitGatewayRouteType::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for TransitGatewayRouteType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(TransitGatewayRouteType::from(s))
    }
}
impl TransitGatewayRouteType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            TransitGatewayRouteType::Propagated => "propagated",
            TransitGatewayRouteType::Static => "static",
            TransitGatewayRouteType::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["propagated", "static"]
    }
}
impl AsRef<str> for TransitGatewayRouteType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes a route attachment.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TransitGatewayRouteAttachment {
    /// <p>The ID of the resource.</p>
    #[doc(hidden)]
    pub resource_id: std::option::Option<std::string::String>,
    /// <p>The ID of the attachment.</p>
    #[doc(hidden)]
    pub transit_gateway_attachment_id: std::option::Option<std::string::String>,
    /// <p>The resource type. Note that the <code>tgw-peering</code> resource type has been deprecated. </p>
    #[doc(hidden)]
    pub resource_type: std::option::Option<crate::model::TransitGatewayAttachmentResourceType>,
}
impl TransitGatewayRouteAttachment {
    /// <p>The ID of the resource.</p>
    pub fn resource_id(&self) -> std::option::Option<&str> {
        self.resource_id.as_deref()
    }
    /// <p>The ID of the attachment.</p>
    pub fn transit_gateway_attachment_id(&self) -> std::option::Option<&str> {
        self.transit_gateway_attachment_id.as_deref()
    }
    /// <p>The resource type. Note that the <code>tgw-peering</code> resource type has been deprecated. </p>
    pub fn resource_type(
        &self,
    ) -> std::option::Option<&crate::model::TransitGatewayAttachmentResourceType> {
        self.resource_type.as_ref()
    }
}
/// See [`TransitGatewayRouteAttachment`](crate::model::TransitGatewayRouteAttachment).
pub mod transit_gateway_route_attachment {

    /// A builder for [`TransitGatewayRouteAttachment`](crate::model::TransitGatewayRouteAttachment).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) resource_id: std::option::Option<std::string::String>,
        pub(crate) transit_gateway_attachment_id: std::option::Option<std::string::String>,
        pub(crate) resource_type:
            std::option::Option<crate::model::TransitGatewayAttachmentResourceType>,
    }
    impl Builder {
        /// <p>The ID of the resource.</p>
        pub fn resource_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.resource_id = Some(input.into());
            self
        }
        /// <p>The ID of the resource.</p>
        pub fn set_resource_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.resource_id = input;
            self
        }
        /// <p>The ID of the attachment.</p>
        pub fn transit_gateway_attachment_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.transit_gateway_attachment_id = Some(input.into());
            self
        }
        /// <p>The ID of the attachment.</p>
        pub fn set_transit_gateway_attachment_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.transit_gateway_attachment_id = input;
            self
        }
        /// <p>The resource type. Note that the <code>tgw-peering</code> resource type has been deprecated. </p>
        pub fn resource_type(
            mut self,
            input: crate::model::TransitGatewayAttachmentResourceType,
        ) -> Self {
            self.resource_type = Some(input);
            self
        }
        /// <p>The resource type. Note that the <code>tgw-peering</code> resource type has been deprecated. </p>
        pub fn set_resource_type(
            mut self,
            input: std::option::Option<crate::model::TransitGatewayAttachmentResourceType>,
        ) -> Self {
            self.resource_type = input;
            self
        }
        /// Consumes the builder and constructs a [`TransitGatewayRouteAttachment`](crate::model::TransitGatewayRouteAttachment).
        pub fn build(self) -> crate::model::TransitGatewayRouteAttachment {
            crate::model::TransitGatewayRouteAttachment {
                resource_id: self.resource_id,
                transit_gateway_attachment_id: self.transit_gateway_attachment_id,
                resource_type: self.resource_type,
            }
        }
    }
}
impl TransitGatewayRouteAttachment {
    /// Creates a new builder-style object to manufacture [`TransitGatewayRouteAttachment`](crate::model::TransitGatewayRouteAttachment).
    pub fn builder() -> crate::model::transit_gateway_route_attachment::Builder {
        crate::model::transit_gateway_route_attachment::Builder::default()
    }
}

/// When writing a match expression against `TransitGatewayAttachmentResourceType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let transitgatewayattachmentresourcetype = unimplemented!();
/// match transitgatewayattachmentresourcetype {
///     TransitGatewayAttachmentResourceType::Connect => { /* ... */ },
///     TransitGatewayAttachmentResourceType::DirectConnectGateway => { /* ... */ },
///     TransitGatewayAttachmentResourceType::Peering => { /* ... */ },
///     TransitGatewayAttachmentResourceType::TgwPeering => { /* ... */ },
///     TransitGatewayAttachmentResourceType::Vpc => { /* ... */ },
///     TransitGatewayAttachmentResourceType::Vpn => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `transitgatewayattachmentresourcetype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `TransitGatewayAttachmentResourceType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `TransitGatewayAttachmentResourceType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `TransitGatewayAttachmentResourceType::NewFeature` is defined.
/// Specifically, when `transitgatewayattachmentresourcetype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `TransitGatewayAttachmentResourceType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 TransitGatewayAttachmentResourceType {
    #[allow(missing_docs)] // documentation missing in model
    Connect,
    #[allow(missing_docs)] // documentation missing in model
    DirectConnectGateway,
    #[allow(missing_docs)] // documentation missing in model
    Peering,
    #[allow(missing_docs)] // documentation missing in model
    TgwPeering,
    #[allow(missing_docs)] // documentation missing in model
    Vpc,
    #[allow(missing_docs)] // documentation missing in model
    Vpn,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for TransitGatewayAttachmentResourceType {
    fn from(s: &str) -> Self {
        match s {
            "connect" => TransitGatewayAttachmentResourceType::Connect,
            "direct-connect-gateway" => TransitGatewayAttachmentResourceType::DirectConnectGateway,
            "peering" => TransitGatewayAttachmentResourceType::Peering,
            "tgw-peering" => TransitGatewayAttachmentResourceType::TgwPeering,
            "vpc" => TransitGatewayAttachmentResourceType::Vpc,
            "vpn" => TransitGatewayAttachmentResourceType::Vpn,
            other => TransitGatewayAttachmentResourceType::Unknown(
                crate::types::UnknownVariantValue(other.to_owned()),
            ),
        }
    }
}
impl std::str::FromStr for TransitGatewayAttachmentResourceType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(TransitGatewayAttachmentResourceType::from(s))
    }
}
impl TransitGatewayAttachmentResourceType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            TransitGatewayAttachmentResourceType::Connect => "connect",
            TransitGatewayAttachmentResourceType::DirectConnectGateway => "direct-connect-gateway",
            TransitGatewayAttachmentResourceType::Peering => "peering",
            TransitGatewayAttachmentResourceType::TgwPeering => "tgw-peering",
            TransitGatewayAttachmentResourceType::Vpc => "vpc",
            TransitGatewayAttachmentResourceType::Vpn => "vpn",
            TransitGatewayAttachmentResourceType::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &[
            "connect",
            "direct-connect-gateway",
            "peering",
            "tgw-peering",
            "vpc",
            "vpn",
        ]
    }
}
impl AsRef<str> for TransitGatewayAttachmentResourceType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.</p>
/// <p>If you specify multiple filters, the filters are joined with an <code>AND</code>, and the request returns only results that match all of the specified filters.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Filter {
    /// <p>The name of the filter. Filter names are case-sensitive.</p>
    #[doc(hidden)]
    pub name: std::option::Option<std::string::String>,
    /// <p>The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an <code>OR</code>, and the request returns all results that match any of the specified values.</p>
    #[doc(hidden)]
    pub values: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl Filter {
    /// <p>The name of the filter. Filter names are case-sensitive.</p>
    pub fn name(&self) -> std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an <code>OR</code>, and the request returns all results that match any of the specified values.</p>
    pub fn values(&self) -> std::option::Option<&[std::string::String]> {
        self.values.as_deref()
    }
}
/// See [`Filter`](crate::model::Filter).
pub mod filter {

    /// A builder for [`Filter`](crate::model::Filter).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) name: std::option::Option<std::string::String>,
        pub(crate) values: std::option::Option<std::vec::Vec<std::string::String>>,
    }
    impl Builder {
        /// <p>The name of the filter. Filter names are case-sensitive.</p>
        pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
            self.name = Some(input.into());
            self
        }
        /// <p>The name of the filter. Filter names are case-sensitive.</p>
        pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.name = input;
            self
        }
        /// Appends an item to `values`.
        ///
        /// To override the contents of this collection use [`set_values`](Self::set_values).
        ///
        /// <p>The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an <code>OR</code>, and the request returns all results that match any of the specified values.</p>
        pub fn values(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.values.unwrap_or_default();
            v.push(input.into());
            self.values = Some(v);
            self
        }
        /// <p>The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an <code>OR</code>, and the request returns all results that match any of the specified values.</p>
        pub fn set_values(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.values = input;
            self
        }
        /// Consumes the builder and constructs a [`Filter`](crate::model::Filter).
        pub fn build(self) -> crate::model::Filter {
            crate::model::Filter {
                name: self.name,
                values: self.values,
            }
        }
    }
}
impl Filter {
    /// Creates a new builder-style object to manufacture [`Filter`](crate::model::Filter).
    pub fn builder() -> crate::model::filter::Builder {
        crate::model::filter::Builder::default()
    }
}

/// <p>Describes the transit gateway multicast group resources.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TransitGatewayMulticastGroup {
    /// <p>The IP address assigned to the transit gateway multicast group.</p>
    #[doc(hidden)]
    pub group_ip_address: std::option::Option<std::string::String>,
    /// <p>The ID of the transit gateway attachment.</p>
    #[doc(hidden)]
    pub transit_gateway_attachment_id: std::option::Option<std::string::String>,
    /// <p>The ID of the subnet.</p>
    #[doc(hidden)]
    pub subnet_id: std::option::Option<std::string::String>,
    /// <p>The ID of the resource.</p>
    #[doc(hidden)]
    pub resource_id: std::option::Option<std::string::String>,
    /// <p>The type of resource, for example a VPC attachment.</p>
    #[doc(hidden)]
    pub resource_type: std::option::Option<crate::model::TransitGatewayAttachmentResourceType>,
    /// <p> The ID of the Amazon Web Services account that owns the transit gateway multicast domain group resource.</p>
    #[doc(hidden)]
    pub resource_owner_id: std::option::Option<std::string::String>,
    /// <p>The ID of the transit gateway attachment.</p>
    #[doc(hidden)]
    pub network_interface_id: std::option::Option<std::string::String>,
    /// <p>Indicates that the resource is a transit gateway multicast group member.</p>
    #[doc(hidden)]
    pub group_member: std::option::Option<bool>,
    /// <p>Indicates that the resource is a transit gateway multicast group member.</p>
    #[doc(hidden)]
    pub group_source: std::option::Option<bool>,
    /// <p>The member type (for example, <code>static</code>).</p>
    #[doc(hidden)]
    pub member_type: std::option::Option<crate::model::MembershipType>,
    /// <p>The source type.</p>
    #[doc(hidden)]
    pub source_type: std::option::Option<crate::model::MembershipType>,
}
impl TransitGatewayMulticastGroup {
    /// <p>The IP address assigned to the transit gateway multicast group.</p>
    pub fn group_ip_address(&self) -> std::option::Option<&str> {
        self.group_ip_address.as_deref()
    }
    /// <p>The ID of the transit gateway attachment.</p>
    pub fn transit_gateway_attachment_id(&self) -> std::option::Option<&str> {
        self.transit_gateway_attachment_id.as_deref()
    }
    /// <p>The ID of the subnet.</p>
    pub fn subnet_id(&self) -> std::option::Option<&str> {
        self.subnet_id.as_deref()
    }
    /// <p>The ID of the resource.</p>
    pub fn resource_id(&self) -> std::option::Option<&str> {
        self.resource_id.as_deref()
    }
    /// <p>The type of resource, for example a VPC attachment.</p>
    pub fn resource_type(
        &self,
    ) -> std::option::Option<&crate::model::TransitGatewayAttachmentResourceType> {
        self.resource_type.as_ref()
    }
    /// <p> The ID of the Amazon Web Services account that owns the transit gateway multicast domain group resource.</p>
    pub fn resource_owner_id(&self) -> std::option::Option<&str> {
        self.resource_owner_id.as_deref()
    }
    /// <p>The ID of the transit gateway attachment.</p>
    pub fn network_interface_id(&self) -> std::option::Option<&str> {
        self.network_interface_id.as_deref()
    }
    /// <p>Indicates that the resource is a transit gateway multicast group member.</p>
    pub fn group_member(&self) -> std::option::Option<bool> {
        self.group_member
    }
    /// <p>Indicates that the resource is a transit gateway multicast group member.</p>
    pub fn group_source(&self) -> std::option::Option<bool> {
        self.group_source
    }
    /// <p>The member type (for example, <code>static</code>).</p>
    pub fn member_type(&self) -> std::option::Option<&crate::model::MembershipType> {
        self.member_type.as_ref()
    }
    /// <p>The source type.</p>
    pub fn source_type(&self) -> std::option::Option<&crate::model::MembershipType> {
        self.source_type.as_ref()
    }
}
/// See [`TransitGatewayMulticastGroup`](crate::model::TransitGatewayMulticastGroup).
pub mod transit_gateway_multicast_group {

    /// A builder for [`TransitGatewayMulticastGroup`](crate::model::TransitGatewayMulticastGroup).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) group_ip_address: std::option::Option<std::string::String>,
        pub(crate) transit_gateway_attachment_id: std::option::Option<std::string::String>,
        pub(crate) subnet_id: std::option::Option<std::string::String>,
        pub(crate) resource_id: std::option::Option<std::string::String>,
        pub(crate) resource_type:
            std::option::Option<crate::model::TransitGatewayAttachmentResourceType>,
        pub(crate) resource_owner_id: std::option::Option<std::string::String>,
        pub(crate) network_interface_id: std::option::Option<std::string::String>,
        pub(crate) group_member: std::option::Option<bool>,
        pub(crate) group_source: std::option::Option<bool>,
        pub(crate) member_type: std::option::Option<crate::model::MembershipType>,
        pub(crate) source_type: std::option::Option<crate::model::MembershipType>,
    }
    impl Builder {
        /// <p>The IP address assigned to the transit gateway multicast group.</p>
        pub fn group_ip_address(mut self, input: impl Into<std::string::String>) -> Self {
            self.group_ip_address = Some(input.into());
            self
        }
        /// <p>The IP address assigned to the transit gateway multicast group.</p>
        pub fn set_group_ip_address(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.group_ip_address = input;
            self
        }
        /// <p>The ID of the transit gateway attachment.</p>
        pub fn transit_gateway_attachment_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.transit_gateway_attachment_id = Some(input.into());
            self
        }
        /// <p>The ID of the transit gateway attachment.</p>
        pub fn set_transit_gateway_attachment_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.transit_gateway_attachment_id = input;
            self
        }
        /// <p>The ID of the subnet.</p>
        pub fn subnet_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.subnet_id = Some(input.into());
            self
        }
        /// <p>The ID of the subnet.</p>
        pub fn set_subnet_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.subnet_id = input;
            self
        }
        /// <p>The ID of the resource.</p>
        pub fn resource_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.resource_id = Some(input.into());
            self
        }
        /// <p>The ID of the resource.</p>
        pub fn set_resource_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.resource_id = input;
            self
        }
        /// <p>The type of resource, for example a VPC attachment.</p>
        pub fn resource_type(
            mut self,
            input: crate::model::TransitGatewayAttachmentResourceType,
        ) -> Self {
            self.resource_type = Some(input);
            self
        }
        /// <p>The type of resource, for example a VPC attachment.</p>
        pub fn set_resource_type(
            mut self,
            input: std::option::Option<crate::model::TransitGatewayAttachmentResourceType>,
        ) -> Self {
            self.resource_type = input;
            self
        }
        /// <p> The ID of the Amazon Web Services account that owns the transit gateway multicast domain group resource.</p>
        pub fn resource_owner_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.resource_owner_id = Some(input.into());
            self
        }
        /// <p> The ID of the Amazon Web Services account that owns the transit gateway multicast domain group resource.</p>
        pub fn set_resource_owner_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.resource_owner_id = input;
            self
        }
        /// <p>The ID of the transit gateway attachment.</p>
        pub fn network_interface_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.network_interface_id = Some(input.into());
            self
        }
        /// <p>The ID of the transit gateway attachment.</p>
        pub fn set_network_interface_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.network_interface_id = input;
            self
        }
        /// <p>Indicates that the resource is a transit gateway multicast group member.</p>
        pub fn group_member(mut self, input: bool) -> Self {
            self.group_member = Some(input);
            self
        }
        /// <p>Indicates that the resource is a transit gateway multicast group member.</p>
        pub fn set_group_member(mut self, input: std::option::Option<bool>) -> Self {
            self.group_member = input;
            self
        }
        /// <p>Indicates that the resource is a transit gateway multicast group member.</p>
        pub fn group_source(mut self, input: bool) -> Self {
            self.group_source = Some(input);
            self
        }
        /// <p>Indicates that the resource is a transit gateway multicast group member.</p>
        pub fn set_group_source(mut self, input: std::option::Option<bool>) -> Self {
            self.group_source = input;
            self
        }
        /// <p>The member type (for example, <code>static</code>).</p>
        pub fn member_type(mut self, input: crate::model::MembershipType) -> Self {
            self.member_type = Some(input);
            self
        }
        /// <p>The member type (for example, <code>static</code>).</p>
        pub fn set_member_type(
            mut self,
            input: std::option::Option<crate::model::MembershipType>,
        ) -> Self {
            self.member_type = input;
            self
        }
        /// <p>The source type.</p>
        pub fn source_type(mut self, input: crate::model::MembershipType) -> Self {
            self.source_type = Some(input);
            self
        }
        /// <p>The source type.</p>
        pub fn set_source_type(
            mut self,
            input: std::option::Option<crate::model::MembershipType>,
        ) -> Self {
            self.source_type = input;
            self
        }
        /// Consumes the builder and constructs a [`TransitGatewayMulticastGroup`](crate::model::TransitGatewayMulticastGroup).
        pub fn build(self) -> crate::model::TransitGatewayMulticastGroup {
            crate::model::TransitGatewayMulticastGroup {
                group_ip_address: self.group_ip_address,
                transit_gateway_attachment_id: self.transit_gateway_attachment_id,
                subnet_id: self.subnet_id,
                resource_id: self.resource_id,
                resource_type: self.resource_type,
                resource_owner_id: self.resource_owner_id,
                network_interface_id: self.network_interface_id,
                group_member: self.group_member,
                group_source: self.group_source,
                member_type: self.member_type,
                source_type: self.source_type,
            }
        }
    }
}
impl TransitGatewayMulticastGroup {
    /// Creates a new builder-style object to manufacture [`TransitGatewayMulticastGroup`](crate::model::TransitGatewayMulticastGroup).
    pub fn builder() -> crate::model::transit_gateway_multicast_group::Builder {
        crate::model::transit_gateway_multicast_group::Builder::default()
    }
}

/// When writing a match expression against `MembershipType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let membershiptype = unimplemented!();
/// match membershiptype {
///     MembershipType::Igmp => { /* ... */ },
///     MembershipType::Static => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `membershiptype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `MembershipType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `MembershipType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `MembershipType::NewFeature` is defined.
/// Specifically, when `membershiptype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `MembershipType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 MembershipType {
    #[allow(missing_docs)] // documentation missing in model
    Igmp,
    #[allow(missing_docs)] // documentation missing in model
    Static,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for MembershipType {
    fn from(s: &str) -> Self {
        match s {
            "igmp" => MembershipType::Igmp,
            "static" => MembershipType::Static,
            other => MembershipType::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for MembershipType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(MembershipType::from(s))
    }
}
impl MembershipType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            MembershipType::Igmp => "igmp",
            MembershipType::Static => "static",
            MembershipType::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["igmp", "static"]
    }
}
impl AsRef<str> for MembershipType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes a route for a local gateway route table.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LocalGatewayRoute {
    /// <p>The CIDR block used for destination matches.</p>
    #[doc(hidden)]
    pub destination_cidr_block: std::option::Option<std::string::String>,
    /// <p>The ID of the virtual interface group.</p>
    #[doc(hidden)]
    pub local_gateway_virtual_interface_group_id: std::option::Option<std::string::String>,
    /// <p>The route type.</p>
    #[doc(hidden)]
    pub r#type: std::option::Option<crate::model::LocalGatewayRouteType>,
    /// <p>The state of the route.</p>
    #[doc(hidden)]
    pub state: std::option::Option<crate::model::LocalGatewayRouteState>,
    /// <p>The ID of the local gateway route table.</p>
    #[doc(hidden)]
    pub local_gateway_route_table_id: std::option::Option<std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the local gateway route table.</p>
    #[doc(hidden)]
    pub local_gateway_route_table_arn: std::option::Option<std::string::String>,
    /// <p>The ID of the Amazon Web Services account that owns the local gateway route.</p>
    #[doc(hidden)]
    pub owner_id: std::option::Option<std::string::String>,
    /// <p>The ID of the subnet.</p>
    #[doc(hidden)]
    pub subnet_id: std::option::Option<std::string::String>,
    /// <p>The ID of the customer-owned address pool.</p>
    #[doc(hidden)]
    pub coip_pool_id: std::option::Option<std::string::String>,
    /// <p>The ID of the network interface.</p>
    #[doc(hidden)]
    pub network_interface_id: std::option::Option<std::string::String>,
}
impl LocalGatewayRoute {
    /// <p>The CIDR block used for destination matches.</p>
    pub fn destination_cidr_block(&self) -> std::option::Option<&str> {
        self.destination_cidr_block.as_deref()
    }
    /// <p>The ID of the virtual interface group.</p>
    pub fn local_gateway_virtual_interface_group_id(&self) -> std::option::Option<&str> {
        self.local_gateway_virtual_interface_group_id.as_deref()
    }
    /// <p>The route type.</p>
    pub fn r#type(&self) -> std::option::Option<&crate::model::LocalGatewayRouteType> {
        self.r#type.as_ref()
    }
    /// <p>The state of the route.</p>
    pub fn state(&self) -> std::option::Option<&crate::model::LocalGatewayRouteState> {
        self.state.as_ref()
    }
    /// <p>The ID of the local gateway route table.</p>
    pub fn local_gateway_route_table_id(&self) -> std::option::Option<&str> {
        self.local_gateway_route_table_id.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the local gateway route table.</p>
    pub fn local_gateway_route_table_arn(&self) -> std::option::Option<&str> {
        self.local_gateway_route_table_arn.as_deref()
    }
    /// <p>The ID of the Amazon Web Services account that owns the local gateway route.</p>
    pub fn owner_id(&self) -> std::option::Option<&str> {
        self.owner_id.as_deref()
    }
    /// <p>The ID of the subnet.</p>
    pub fn subnet_id(&self) -> std::option::Option<&str> {
        self.subnet_id.as_deref()
    }
    /// <p>The ID of the customer-owned address pool.</p>
    pub fn coip_pool_id(&self) -> std::option::Option<&str> {
        self.coip_pool_id.as_deref()
    }
    /// <p>The ID of the network interface.</p>
    pub fn network_interface_id(&self) -> std::option::Option<&str> {
        self.network_interface_id.as_deref()
    }
}
/// See [`LocalGatewayRoute`](crate::model::LocalGatewayRoute).
pub mod local_gateway_route {

    /// A builder for [`LocalGatewayRoute`](crate::model::LocalGatewayRoute).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) destination_cidr_block: std::option::Option<std::string::String>,
        pub(crate) local_gateway_virtual_interface_group_id:
            std::option::Option<std::string::String>,
        pub(crate) r#type: std::option::Option<crate::model::LocalGatewayRouteType>,
        pub(crate) state: std::option::Option<crate::model::LocalGatewayRouteState>,
        pub(crate) local_gateway_route_table_id: std::option::Option<std::string::String>,
        pub(crate) local_gateway_route_table_arn: std::option::Option<std::string::String>,
        pub(crate) owner_id: std::option::Option<std::string::String>,
        pub(crate) subnet_id: std::option::Option<std::string::String>,
        pub(crate) coip_pool_id: std::option::Option<std::string::String>,
        pub(crate) network_interface_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The CIDR block used for destination matches.</p>
        pub fn destination_cidr_block(mut self, input: impl Into<std::string::String>) -> Self {
            self.destination_cidr_block = Some(input.into());
            self
        }
        /// <p>The CIDR block used for destination matches.</p>
        pub fn set_destination_cidr_block(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.destination_cidr_block = input;
            self
        }
        /// <p>The ID of the virtual interface group.</p>
        pub fn local_gateway_virtual_interface_group_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.local_gateway_virtual_interface_group_id = Some(input.into());
            self
        }
        /// <p>The ID of the virtual interface group.</p>
        pub fn set_local_gateway_virtual_interface_group_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.local_gateway_virtual_interface_group_id = input;
            self
        }
        /// <p>The route type.</p>
        pub fn r#type(mut self, input: crate::model::LocalGatewayRouteType) -> Self {
            self.r#type = Some(input);
            self
        }
        /// <p>The route type.</p>
        pub fn set_type(
            mut self,
            input: std::option::Option<crate::model::LocalGatewayRouteType>,
        ) -> Self {
            self.r#type = input;
            self
        }
        /// <p>The state of the route.</p>
        pub fn state(mut self, input: crate::model::LocalGatewayRouteState) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>The state of the route.</p>
        pub fn set_state(
            mut self,
            input: std::option::Option<crate::model::LocalGatewayRouteState>,
        ) -> Self {
            self.state = input;
            self
        }
        /// <p>The ID of the local gateway route table.</p>
        pub fn local_gateway_route_table_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.local_gateway_route_table_id = Some(input.into());
            self
        }
        /// <p>The ID of the local gateway route table.</p>
        pub fn set_local_gateway_route_table_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.local_gateway_route_table_id = input;
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the local gateway route table.</p>
        pub fn local_gateway_route_table_arn(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.local_gateway_route_table_arn = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the local gateway route table.</p>
        pub fn set_local_gateway_route_table_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.local_gateway_route_table_arn = input;
            self
        }
        /// <p>The ID of the Amazon Web Services account that owns the local gateway route.</p>
        pub fn owner_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.owner_id = Some(input.into());
            self
        }
        /// <p>The ID of the Amazon Web Services account that owns the local gateway route.</p>
        pub fn set_owner_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.owner_id = input;
            self
        }
        /// <p>The ID of the subnet.</p>
        pub fn subnet_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.subnet_id = Some(input.into());
            self
        }
        /// <p>The ID of the subnet.</p>
        pub fn set_subnet_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.subnet_id = input;
            self
        }
        /// <p>The ID of the customer-owned address pool.</p>
        pub fn coip_pool_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.coip_pool_id = Some(input.into());
            self
        }
        /// <p>The ID of the customer-owned address pool.</p>
        pub fn set_coip_pool_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.coip_pool_id = input;
            self
        }
        /// <p>The ID of the network interface.</p>
        pub fn network_interface_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.network_interface_id = Some(input.into());
            self
        }
        /// <p>The ID of the network interface.</p>
        pub fn set_network_interface_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.network_interface_id = input;
            self
        }
        /// Consumes the builder and constructs a [`LocalGatewayRoute`](crate::model::LocalGatewayRoute).
        pub fn build(self) -> crate::model::LocalGatewayRoute {
            crate::model::LocalGatewayRoute {
                destination_cidr_block: self.destination_cidr_block,
                local_gateway_virtual_interface_group_id: self
                    .local_gateway_virtual_interface_group_id,
                r#type: self.r#type,
                state: self.state,
                local_gateway_route_table_id: self.local_gateway_route_table_id,
                local_gateway_route_table_arn: self.local_gateway_route_table_arn,
                owner_id: self.owner_id,
                subnet_id: self.subnet_id,
                coip_pool_id: self.coip_pool_id,
                network_interface_id: self.network_interface_id,
            }
        }
    }
}
impl LocalGatewayRoute {
    /// Creates a new builder-style object to manufacture [`LocalGatewayRoute`](crate::model::LocalGatewayRoute).
    pub fn builder() -> crate::model::local_gateway_route::Builder {
        crate::model::local_gateway_route::Builder::default()
    }
}

/// When writing a match expression against `LocalGatewayRouteState`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let localgatewayroutestate = unimplemented!();
/// match localgatewayroutestate {
///     LocalGatewayRouteState::Active => { /* ... */ },
///     LocalGatewayRouteState::Blackhole => { /* ... */ },
///     LocalGatewayRouteState::Deleted => { /* ... */ },
///     LocalGatewayRouteState::Deleting => { /* ... */ },
///     LocalGatewayRouteState::Pending => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `localgatewayroutestate` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `LocalGatewayRouteState::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `LocalGatewayRouteState::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `LocalGatewayRouteState::NewFeature` is defined.
/// Specifically, when `localgatewayroutestate` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `LocalGatewayRouteState::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 LocalGatewayRouteState {
    #[allow(missing_docs)] // documentation missing in model
    Active,
    #[allow(missing_docs)] // documentation missing in model
    Blackhole,
    #[allow(missing_docs)] // documentation missing in model
    Deleted,
    #[allow(missing_docs)] // documentation missing in model
    Deleting,
    #[allow(missing_docs)] // documentation missing in model
    Pending,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for LocalGatewayRouteState {
    fn from(s: &str) -> Self {
        match s {
            "active" => LocalGatewayRouteState::Active,
            "blackhole" => LocalGatewayRouteState::Blackhole,
            "deleted" => LocalGatewayRouteState::Deleted,
            "deleting" => LocalGatewayRouteState::Deleting,
            "pending" => LocalGatewayRouteState::Pending,
            other => {
                LocalGatewayRouteState::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for LocalGatewayRouteState {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(LocalGatewayRouteState::from(s))
    }
}
impl LocalGatewayRouteState {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            LocalGatewayRouteState::Active => "active",
            LocalGatewayRouteState::Blackhole => "blackhole",
            LocalGatewayRouteState::Deleted => "deleted",
            LocalGatewayRouteState::Deleting => "deleting",
            LocalGatewayRouteState::Pending => "pending",
            LocalGatewayRouteState::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["active", "blackhole", "deleted", "deleting", "pending"]
    }
}
impl AsRef<str> for LocalGatewayRouteState {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `LocalGatewayRouteType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let localgatewayroutetype = unimplemented!();
/// match localgatewayroutetype {
///     LocalGatewayRouteType::Propagated => { /* ... */ },
///     LocalGatewayRouteType::Static => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `localgatewayroutetype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `LocalGatewayRouteType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `LocalGatewayRouteType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `LocalGatewayRouteType::NewFeature` is defined.
/// Specifically, when `localgatewayroutetype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `LocalGatewayRouteType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 LocalGatewayRouteType {
    #[allow(missing_docs)] // documentation missing in model
    Propagated,
    #[allow(missing_docs)] // documentation missing in model
    Static,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for LocalGatewayRouteType {
    fn from(s: &str) -> Self {
        match s {
            "propagated" => LocalGatewayRouteType::Propagated,
            "static" => LocalGatewayRouteType::Static,
            other => {
                LocalGatewayRouteType::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for LocalGatewayRouteType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(LocalGatewayRouteType::from(s))
    }
}
impl LocalGatewayRouteType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            LocalGatewayRouteType::Propagated => "propagated",
            LocalGatewayRouteType::Static => "static",
            LocalGatewayRouteType::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["propagated", "static"]
    }
}
impl AsRef<str> for LocalGatewayRouteType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes the launch specification for a Scheduled Instance.</p>
/// <p>If you are launching the Scheduled Instance in EC2-VPC, you must specify the ID of the subnet. You can specify the subnet using either <code>SubnetId</code> or <code>NetworkInterface</code>.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ScheduledInstancesLaunchSpecification {
    /// <p>The block device mapping entries.</p>
    #[doc(hidden)]
    pub block_device_mappings:
        std::option::Option<std::vec::Vec<crate::model::ScheduledInstancesBlockDeviceMapping>>,
    /// <p>Indicates whether the instances are optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS-optimized instance.</p>
    /// <p>Default: <code>false</code> </p>
    #[doc(hidden)]
    pub ebs_optimized: std::option::Option<bool>,
    /// <p>The IAM instance profile.</p>
    #[doc(hidden)]
    pub iam_instance_profile:
        std::option::Option<crate::model::ScheduledInstancesIamInstanceProfile>,
    /// <p>The ID of the Amazon Machine Image (AMI).</p>
    #[doc(hidden)]
    pub image_id: std::option::Option<std::string::String>,
    /// <p>The instance type.</p>
    #[doc(hidden)]
    pub instance_type: std::option::Option<std::string::String>,
    /// <p>The ID of the kernel.</p>
    #[doc(hidden)]
    pub kernel_id: std::option::Option<std::string::String>,
    /// <p>The name of the key pair.</p>
    #[doc(hidden)]
    pub key_name: std::option::Option<std::string::String>,
    /// <p>Enable or disable monitoring for the instances.</p>
    #[doc(hidden)]
    pub monitoring: std::option::Option<crate::model::ScheduledInstancesMonitoring>,
    /// <p>The network interfaces.</p>
    #[doc(hidden)]
    pub network_interfaces:
        std::option::Option<std::vec::Vec<crate::model::ScheduledInstancesNetworkInterface>>,
    /// <p>The placement information.</p>
    #[doc(hidden)]
    pub placement: std::option::Option<crate::model::ScheduledInstancesPlacement>,
    /// <p>The ID of the RAM disk.</p>
    #[doc(hidden)]
    pub ramdisk_id: std::option::Option<std::string::String>,
    /// <p>The IDs of the security groups.</p>
    #[doc(hidden)]
    pub security_group_ids: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>The ID of the subnet in which to launch the instances.</p>
    #[doc(hidden)]
    pub subnet_id: std::option::Option<std::string::String>,
    /// <p>The base64-encoded MIME user data.</p>
    #[doc(hidden)]
    pub user_data: std::option::Option<std::string::String>,
}
impl ScheduledInstancesLaunchSpecification {
    /// <p>The block device mapping entries.</p>
    pub fn block_device_mappings(
        &self,
    ) -> std::option::Option<&[crate::model::ScheduledInstancesBlockDeviceMapping]> {
        self.block_device_mappings.as_deref()
    }
    /// <p>Indicates whether the instances are optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS-optimized instance.</p>
    /// <p>Default: <code>false</code> </p>
    pub fn ebs_optimized(&self) -> std::option::Option<bool> {
        self.ebs_optimized
    }
    /// <p>The IAM instance profile.</p>
    pub fn iam_instance_profile(
        &self,
    ) -> std::option::Option<&crate::model::ScheduledInstancesIamInstanceProfile> {
        self.iam_instance_profile.as_ref()
    }
    /// <p>The ID of the Amazon Machine Image (AMI).</p>
    pub fn image_id(&self) -> std::option::Option<&str> {
        self.image_id.as_deref()
    }
    /// <p>The instance type.</p>
    pub fn instance_type(&self) -> std::option::Option<&str> {
        self.instance_type.as_deref()
    }
    /// <p>The ID of the kernel.</p>
    pub fn kernel_id(&self) -> std::option::Option<&str> {
        self.kernel_id.as_deref()
    }
    /// <p>The name of the key pair.</p>
    pub fn key_name(&self) -> std::option::Option<&str> {
        self.key_name.as_deref()
    }
    /// <p>Enable or disable monitoring for the instances.</p>
    pub fn monitoring(&self) -> std::option::Option<&crate::model::ScheduledInstancesMonitoring> {
        self.monitoring.as_ref()
    }
    /// <p>The network interfaces.</p>
    pub fn network_interfaces(
        &self,
    ) -> std::option::Option<&[crate::model::ScheduledInstancesNetworkInterface]> {
        self.network_interfaces.as_deref()
    }
    /// <p>The placement information.</p>
    pub fn placement(&self) -> std::option::Option<&crate::model::ScheduledInstancesPlacement> {
        self.placement.as_ref()
    }
    /// <p>The ID of the RAM disk.</p>
    pub fn ramdisk_id(&self) -> std::option::Option<&str> {
        self.ramdisk_id.as_deref()
    }
    /// <p>The IDs of the security groups.</p>
    pub fn security_group_ids(&self) -> std::option::Option<&[std::string::String]> {
        self.security_group_ids.as_deref()
    }
    /// <p>The ID of the subnet in which to launch the instances.</p>
    pub fn subnet_id(&self) -> std::option::Option<&str> {
        self.subnet_id.as_deref()
    }
    /// <p>The base64-encoded MIME user data.</p>
    pub fn user_data(&self) -> std::option::Option<&str> {
        self.user_data.as_deref()
    }
}
/// See [`ScheduledInstancesLaunchSpecification`](crate::model::ScheduledInstancesLaunchSpecification).
pub mod scheduled_instances_launch_specification {

    /// A builder for [`ScheduledInstancesLaunchSpecification`](crate::model::ScheduledInstancesLaunchSpecification).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) block_device_mappings:
            std::option::Option<std::vec::Vec<crate::model::ScheduledInstancesBlockDeviceMapping>>,
        pub(crate) ebs_optimized: std::option::Option<bool>,
        pub(crate) iam_instance_profile:
            std::option::Option<crate::model::ScheduledInstancesIamInstanceProfile>,
        pub(crate) image_id: std::option::Option<std::string::String>,
        pub(crate) instance_type: std::option::Option<std::string::String>,
        pub(crate) kernel_id: std::option::Option<std::string::String>,
        pub(crate) key_name: std::option::Option<std::string::String>,
        pub(crate) monitoring: std::option::Option<crate::model::ScheduledInstancesMonitoring>,
        pub(crate) network_interfaces:
            std::option::Option<std::vec::Vec<crate::model::ScheduledInstancesNetworkInterface>>,
        pub(crate) placement: std::option::Option<crate::model::ScheduledInstancesPlacement>,
        pub(crate) ramdisk_id: std::option::Option<std::string::String>,
        pub(crate) security_group_ids: std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) subnet_id: std::option::Option<std::string::String>,
        pub(crate) user_data: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// Appends an item to `block_device_mappings`.
        ///
        /// To override the contents of this collection use [`set_block_device_mappings`](Self::set_block_device_mappings).
        ///
        /// <p>The block device mapping entries.</p>
        pub fn block_device_mappings(
            mut self,
            input: crate::model::ScheduledInstancesBlockDeviceMapping,
        ) -> Self {
            let mut v = self.block_device_mappings.unwrap_or_default();
            v.push(input);
            self.block_device_mappings = Some(v);
            self
        }
        /// <p>The block device mapping entries.</p>
        pub fn set_block_device_mappings(
            mut self,
            input: std::option::Option<
                std::vec::Vec<crate::model::ScheduledInstancesBlockDeviceMapping>,
            >,
        ) -> Self {
            self.block_device_mappings = input;
            self
        }
        /// <p>Indicates whether the instances are optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS-optimized instance.</p>
        /// <p>Default: <code>false</code> </p>
        pub fn ebs_optimized(mut self, input: bool) -> Self {
            self.ebs_optimized = Some(input);
            self
        }
        /// <p>Indicates whether the instances are optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS-optimized instance.</p>
        /// <p>Default: <code>false</code> </p>
        pub fn set_ebs_optimized(mut self, input: std::option::Option<bool>) -> Self {
            self.ebs_optimized = input;
            self
        }
        /// <p>The IAM instance profile.</p>
        pub fn iam_instance_profile(
            mut self,
            input: crate::model::ScheduledInstancesIamInstanceProfile,
        ) -> Self {
            self.iam_instance_profile = Some(input);
            self
        }
        /// <p>The IAM instance profile.</p>
        pub fn set_iam_instance_profile(
            mut self,
            input: std::option::Option<crate::model::ScheduledInstancesIamInstanceProfile>,
        ) -> Self {
            self.iam_instance_profile = input;
            self
        }
        /// <p>The ID of the Amazon Machine Image (AMI).</p>
        pub fn image_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.image_id = Some(input.into());
            self
        }
        /// <p>The ID of the Amazon Machine Image (AMI).</p>
        pub fn set_image_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.image_id = input;
            self
        }
        /// <p>The instance type.</p>
        pub fn instance_type(mut self, input: impl Into<std::string::String>) -> Self {
            self.instance_type = Some(input.into());
            self
        }
        /// <p>The instance type.</p>
        pub fn set_instance_type(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.instance_type = input;
            self
        }
        /// <p>The ID of the kernel.</p>
        pub fn kernel_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.kernel_id = Some(input.into());
            self
        }
        /// <p>The ID of the kernel.</p>
        pub fn set_kernel_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.kernel_id = input;
            self
        }
        /// <p>The name of the key pair.</p>
        pub fn key_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.key_name = Some(input.into());
            self
        }
        /// <p>The name of the key pair.</p>
        pub fn set_key_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.key_name = input;
            self
        }
        /// <p>Enable or disable monitoring for the instances.</p>
        pub fn monitoring(mut self, input: crate::model::ScheduledInstancesMonitoring) -> Self {
            self.monitoring = Some(input);
            self
        }
        /// <p>Enable or disable monitoring for the instances.</p>
        pub fn set_monitoring(
            mut self,
            input: std::option::Option<crate::model::ScheduledInstancesMonitoring>,
        ) -> Self {
            self.monitoring = input;
            self
        }
        /// Appends an item to `network_interfaces`.
        ///
        /// To override the contents of this collection use [`set_network_interfaces`](Self::set_network_interfaces).
        ///
        /// <p>The network interfaces.</p>
        pub fn network_interfaces(
            mut self,
            input: crate::model::ScheduledInstancesNetworkInterface,
        ) -> Self {
            let mut v = self.network_interfaces.unwrap_or_default();
            v.push(input);
            self.network_interfaces = Some(v);
            self
        }
        /// <p>The network interfaces.</p>
        pub fn set_network_interfaces(
            mut self,
            input: std::option::Option<
                std::vec::Vec<crate::model::ScheduledInstancesNetworkInterface>,
            >,
        ) -> Self {
            self.network_interfaces = input;
            self
        }
        /// <p>The placement information.</p>
        pub fn placement(mut self, input: crate::model::ScheduledInstancesPlacement) -> Self {
            self.placement = Some(input);
            self
        }
        /// <p>The placement information.</p>
        pub fn set_placement(
            mut self,
            input: std::option::Option<crate::model::ScheduledInstancesPlacement>,
        ) -> Self {
            self.placement = input;
            self
        }
        /// <p>The ID of the RAM disk.</p>
        pub fn ramdisk_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.ramdisk_id = Some(input.into());
            self
        }
        /// <p>The ID of the RAM disk.</p>
        pub fn set_ramdisk_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.ramdisk_id = input;
            self
        }
        /// Appends an item to `security_group_ids`.
        ///
        /// To override the contents of this collection use [`set_security_group_ids`](Self::set_security_group_ids).
        ///
        /// <p>The IDs of the security groups.</p>
        pub fn security_group_ids(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.security_group_ids.unwrap_or_default();
            v.push(input.into());
            self.security_group_ids = Some(v);
            self
        }
        /// <p>The IDs of the security groups.</p>
        pub fn set_security_group_ids(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.security_group_ids = input;
            self
        }
        /// <p>The ID of the subnet in which to launch the instances.</p>
        pub fn subnet_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.subnet_id = Some(input.into());
            self
        }
        /// <p>The ID of the subnet in which to launch the instances.</p>
        pub fn set_subnet_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.subnet_id = input;
            self
        }
        /// <p>The base64-encoded MIME user data.</p>
        pub fn user_data(mut self, input: impl Into<std::string::String>) -> Self {
            self.user_data = Some(input.into());
            self
        }
        /// <p>The base64-encoded MIME user data.</p>
        pub fn set_user_data(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.user_data = input;
            self
        }
        /// Consumes the builder and constructs a [`ScheduledInstancesLaunchSpecification`](crate::model::ScheduledInstancesLaunchSpecification).
        pub fn build(self) -> crate::model::ScheduledInstancesLaunchSpecification {
            crate::model::ScheduledInstancesLaunchSpecification {
                block_device_mappings: self.block_device_mappings,
                ebs_optimized: self.ebs_optimized,
                iam_instance_profile: self.iam_instance_profile,
                image_id: self.image_id,
                instance_type: self.instance_type,
                kernel_id: self.kernel_id,
                key_name: self.key_name,
                monitoring: self.monitoring,
                network_interfaces: self.network_interfaces,
                placement: self.placement,
                ramdisk_id: self.ramdisk_id,
                security_group_ids: self.security_group_ids,
                subnet_id: self.subnet_id,
                user_data: self.user_data,
            }
        }
    }
}
impl ScheduledInstancesLaunchSpecification {
    /// Creates a new builder-style object to manufacture [`ScheduledInstancesLaunchSpecification`](crate::model::ScheduledInstancesLaunchSpecification).
    pub fn builder() -> crate::model::scheduled_instances_launch_specification::Builder {
        crate::model::scheduled_instances_launch_specification::Builder::default()
    }
}

/// <p>Describes the placement for a Scheduled Instance.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ScheduledInstancesPlacement {
    /// <p>The Availability Zone.</p>
    #[doc(hidden)]
    pub availability_zone: std::option::Option<std::string::String>,
    /// <p>The name of the placement group.</p>
    #[doc(hidden)]
    pub group_name: std::option::Option<std::string::String>,
}
impl ScheduledInstancesPlacement {
    /// <p>The Availability Zone.</p>
    pub fn availability_zone(&self) -> std::option::Option<&str> {
        self.availability_zone.as_deref()
    }
    /// <p>The name of the placement group.</p>
    pub fn group_name(&self) -> std::option::Option<&str> {
        self.group_name.as_deref()
    }
}
/// See [`ScheduledInstancesPlacement`](crate::model::ScheduledInstancesPlacement).
pub mod scheduled_instances_placement {

    /// A builder for [`ScheduledInstancesPlacement`](crate::model::ScheduledInstancesPlacement).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) availability_zone: std::option::Option<std::string::String>,
        pub(crate) group_name: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The Availability Zone.</p>
        pub fn availability_zone(mut self, input: impl Into<std::string::String>) -> Self {
            self.availability_zone = Some(input.into());
            self
        }
        /// <p>The Availability Zone.</p>
        pub fn set_availability_zone(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.availability_zone = input;
            self
        }
        /// <p>The name of the placement group.</p>
        pub fn group_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.group_name = Some(input.into());
            self
        }
        /// <p>The name of the placement group.</p>
        pub fn set_group_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.group_name = input;
            self
        }
        /// Consumes the builder and constructs a [`ScheduledInstancesPlacement`](crate::model::ScheduledInstancesPlacement).
        pub fn build(self) -> crate::model::ScheduledInstancesPlacement {
            crate::model::ScheduledInstancesPlacement {
                availability_zone: self.availability_zone,
                group_name: self.group_name,
            }
        }
    }
}
impl ScheduledInstancesPlacement {
    /// Creates a new builder-style object to manufacture [`ScheduledInstancesPlacement`](crate::model::ScheduledInstancesPlacement).
    pub fn builder() -> crate::model::scheduled_instances_placement::Builder {
        crate::model::scheduled_instances_placement::Builder::default()
    }
}

/// <p>Describes a network interface for a Scheduled Instance.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ScheduledInstancesNetworkInterface {
    /// <p>Indicates whether to assign a public IPv4 address to instances launched in a VPC. The public IPv4 address can only be assigned to a network interface for eth0, and can only be assigned to a new network interface, not an existing one. You cannot specify more than one network interface in the request. If launching into a default subnet, the default value is <code>true</code>.</p>
    #[doc(hidden)]
    pub associate_public_ip_address: std::option::Option<bool>,
    /// <p>Indicates whether to delete the interface when the instance is terminated.</p>
    #[doc(hidden)]
    pub delete_on_termination: std::option::Option<bool>,
    /// <p>The description.</p>
    #[doc(hidden)]
    pub description: std::option::Option<std::string::String>,
    /// <p>The index of the device for the network interface attachment.</p>
    #[doc(hidden)]
    pub device_index: std::option::Option<i32>,
    /// <p>The IDs of the security groups.</p>
    #[doc(hidden)]
    pub groups: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>The number of IPv6 addresses to assign to the network interface. The IPv6 addresses are automatically selected from the subnet range.</p>
    #[doc(hidden)]
    pub ipv6_address_count: std::option::Option<i32>,
    /// <p>The specific IPv6 addresses from the subnet range.</p>
    #[doc(hidden)]
    pub ipv6_addresses:
        std::option::Option<std::vec::Vec<crate::model::ScheduledInstancesIpv6Address>>,
    /// <p>The ID of the network interface.</p>
    #[doc(hidden)]
    pub network_interface_id: std::option::Option<std::string::String>,
    /// <p>The IPv4 address of the network interface within the subnet.</p>
    #[doc(hidden)]
    pub private_ip_address: std::option::Option<std::string::String>,
    /// <p>The private IPv4 addresses.</p>
    #[doc(hidden)]
    pub private_ip_address_configs:
        std::option::Option<std::vec::Vec<crate::model::ScheduledInstancesPrivateIpAddressConfig>>,
    /// <p>The number of secondary private IPv4 addresses.</p>
    #[doc(hidden)]
    pub secondary_private_ip_address_count: std::option::Option<i32>,
    /// <p>The ID of the subnet.</p>
    #[doc(hidden)]
    pub subnet_id: std::option::Option<std::string::String>,
}
impl ScheduledInstancesNetworkInterface {
    /// <p>Indicates whether to assign a public IPv4 address to instances launched in a VPC. The public IPv4 address can only be assigned to a network interface for eth0, and can only be assigned to a new network interface, not an existing one. You cannot specify more than one network interface in the request. If launching into a default subnet, the default value is <code>true</code>.</p>
    pub fn associate_public_ip_address(&self) -> std::option::Option<bool> {
        self.associate_public_ip_address
    }
    /// <p>Indicates whether to delete the interface when the instance is terminated.</p>
    pub fn delete_on_termination(&self) -> std::option::Option<bool> {
        self.delete_on_termination
    }
    /// <p>The description.</p>
    pub fn description(&self) -> std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The index of the device for the network interface attachment.</p>
    pub fn device_index(&self) -> std::option::Option<i32> {
        self.device_index
    }
    /// <p>The IDs of the security groups.</p>
    pub fn groups(&self) -> std::option::Option<&[std::string::String]> {
        self.groups.as_deref()
    }
    /// <p>The number of IPv6 addresses to assign to the network interface. The IPv6 addresses are automatically selected from the subnet range.</p>
    pub fn ipv6_address_count(&self) -> std::option::Option<i32> {
        self.ipv6_address_count
    }
    /// <p>The specific IPv6 addresses from the subnet range.</p>
    pub fn ipv6_addresses(
        &self,
    ) -> std::option::Option<&[crate::model::ScheduledInstancesIpv6Address]> {
        self.ipv6_addresses.as_deref()
    }
    /// <p>The ID of the network interface.</p>
    pub fn network_interface_id(&self) -> std::option::Option<&str> {
        self.network_interface_id.as_deref()
    }
    /// <p>The IPv4 address of the network interface within the subnet.</p>
    pub fn private_ip_address(&self) -> std::option::Option<&str> {
        self.private_ip_address.as_deref()
    }
    /// <p>The private IPv4 addresses.</p>
    pub fn private_ip_address_configs(
        &self,
    ) -> std::option::Option<&[crate::model::ScheduledInstancesPrivateIpAddressConfig]> {
        self.private_ip_address_configs.as_deref()
    }
    /// <p>The number of secondary private IPv4 addresses.</p>
    pub fn secondary_private_ip_address_count(&self) -> std::option::Option<i32> {
        self.secondary_private_ip_address_count
    }
    /// <p>The ID of the subnet.</p>
    pub fn subnet_id(&self) -> std::option::Option<&str> {
        self.subnet_id.as_deref()
    }
}
/// See [`ScheduledInstancesNetworkInterface`](crate::model::ScheduledInstancesNetworkInterface).
pub mod scheduled_instances_network_interface {

    /// A builder for [`ScheduledInstancesNetworkInterface`](crate::model::ScheduledInstancesNetworkInterface).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) associate_public_ip_address: std::option::Option<bool>,
        pub(crate) delete_on_termination: std::option::Option<bool>,
        pub(crate) description: std::option::Option<std::string::String>,
        pub(crate) device_index: std::option::Option<i32>,
        pub(crate) groups: std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) ipv6_address_count: std::option::Option<i32>,
        pub(crate) ipv6_addresses:
            std::option::Option<std::vec::Vec<crate::model::ScheduledInstancesIpv6Address>>,
        pub(crate) network_interface_id: std::option::Option<std::string::String>,
        pub(crate) private_ip_address: std::option::Option<std::string::String>,
        pub(crate) private_ip_address_configs: std::option::Option<
            std::vec::Vec<crate::model::ScheduledInstancesPrivateIpAddressConfig>,
        >,
        pub(crate) secondary_private_ip_address_count: std::option::Option<i32>,
        pub(crate) subnet_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>Indicates whether to assign a public IPv4 address to instances launched in a VPC. The public IPv4 address can only be assigned to a network interface for eth0, and can only be assigned to a new network interface, not an existing one. You cannot specify more than one network interface in the request. If launching into a default subnet, the default value is <code>true</code>.</p>
        pub fn associate_public_ip_address(mut self, input: bool) -> Self {
            self.associate_public_ip_address = Some(input);
            self
        }
        /// <p>Indicates whether to assign a public IPv4 address to instances launched in a VPC. The public IPv4 address can only be assigned to a network interface for eth0, and can only be assigned to a new network interface, not an existing one. You cannot specify more than one network interface in the request. If launching into a default subnet, the default value is <code>true</code>.</p>
        pub fn set_associate_public_ip_address(mut self, input: std::option::Option<bool>) -> Self {
            self.associate_public_ip_address = input;
            self
        }
        /// <p>Indicates whether to delete the interface when the instance is terminated.</p>
        pub fn delete_on_termination(mut self, input: bool) -> Self {
            self.delete_on_termination = Some(input);
            self
        }
        /// <p>Indicates whether to delete the interface when the instance is terminated.</p>
        pub fn set_delete_on_termination(mut self, input: std::option::Option<bool>) -> Self {
            self.delete_on_termination = input;
            self
        }
        /// <p>The description.</p>
        pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
            self.description = Some(input.into());
            self
        }
        /// <p>The description.</p>
        pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.description = input;
            self
        }
        /// <p>The index of the device for the network interface attachment.</p>
        pub fn device_index(mut self, input: i32) -> Self {
            self.device_index = Some(input);
            self
        }
        /// <p>The index of the device for the network interface attachment.</p>
        pub fn set_device_index(mut self, input: std::option::Option<i32>) -> Self {
            self.device_index = input;
            self
        }
        /// Appends an item to `groups`.
        ///
        /// To override the contents of this collection use [`set_groups`](Self::set_groups).
        ///
        /// <p>The IDs of the security groups.</p>
        pub fn groups(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.groups.unwrap_or_default();
            v.push(input.into());
            self.groups = Some(v);
            self
        }
        /// <p>The IDs of the security groups.</p>
        pub fn set_groups(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.groups = input;
            self
        }
        /// <p>The number of IPv6 addresses to assign to the network interface. The IPv6 addresses are automatically selected from the subnet range.</p>
        pub fn ipv6_address_count(mut self, input: i32) -> Self {
            self.ipv6_address_count = Some(input);
            self
        }
        /// <p>The number of IPv6 addresses to assign to the network interface. The IPv6 addresses are automatically selected from the subnet range.</p>
        pub fn set_ipv6_address_count(mut self, input: std::option::Option<i32>) -> Self {
            self.ipv6_address_count = input;
            self
        }
        /// Appends an item to `ipv6_addresses`.
        ///
        /// To override the contents of this collection use [`set_ipv6_addresses`](Self::set_ipv6_addresses).
        ///
        /// <p>The specific IPv6 addresses from the subnet range.</p>
        pub fn ipv6_addresses(
            mut self,
            input: crate::model::ScheduledInstancesIpv6Address,
        ) -> Self {
            let mut v = self.ipv6_addresses.unwrap_or_default();
            v.push(input);
            self.ipv6_addresses = Some(v);
            self
        }
        /// <p>The specific IPv6 addresses from the subnet range.</p>
        pub fn set_ipv6_addresses(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::ScheduledInstancesIpv6Address>>,
        ) -> Self {
            self.ipv6_addresses = input;
            self
        }
        /// <p>The ID of the network interface.</p>
        pub fn network_interface_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.network_interface_id = Some(input.into());
            self
        }
        /// <p>The ID of the network interface.</p>
        pub fn set_network_interface_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.network_interface_id = input;
            self
        }
        /// <p>The IPv4 address of the network interface within the subnet.</p>
        pub fn private_ip_address(mut self, input: impl Into<std::string::String>) -> Self {
            self.private_ip_address = Some(input.into());
            self
        }
        /// <p>The IPv4 address of the network interface within the subnet.</p>
        pub fn set_private_ip_address(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.private_ip_address = input;
            self
        }
        /// Appends an item to `private_ip_address_configs`.
        ///
        /// To override the contents of this collection use [`set_private_ip_address_configs`](Self::set_private_ip_address_configs).
        ///
        /// <p>The private IPv4 addresses.</p>
        pub fn private_ip_address_configs(
            mut self,
            input: crate::model::ScheduledInstancesPrivateIpAddressConfig,
        ) -> Self {
            let mut v = self.private_ip_address_configs.unwrap_or_default();
            v.push(input);
            self.private_ip_address_configs = Some(v);
            self
        }
        /// <p>The private IPv4 addresses.</p>
        pub fn set_private_ip_address_configs(
            mut self,
            input: std::option::Option<
                std::vec::Vec<crate::model::ScheduledInstancesPrivateIpAddressConfig>,
            >,
        ) -> Self {
            self.private_ip_address_configs = input;
            self
        }
        /// <p>The number of secondary private IPv4 addresses.</p>
        pub fn secondary_private_ip_address_count(mut self, input: i32) -> Self {
            self.secondary_private_ip_address_count = Some(input);
            self
        }
        /// <p>The number of secondary private IPv4 addresses.</p>
        pub fn set_secondary_private_ip_address_count(
            mut self,
            input: std::option::Option<i32>,
        ) -> Self {
            self.secondary_private_ip_address_count = input;
            self
        }
        /// <p>The ID of the subnet.</p>
        pub fn subnet_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.subnet_id = Some(input.into());
            self
        }
        /// <p>The ID of the subnet.</p>
        pub fn set_subnet_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.subnet_id = input;
            self
        }
        /// Consumes the builder and constructs a [`ScheduledInstancesNetworkInterface`](crate::model::ScheduledInstancesNetworkInterface).
        pub fn build(self) -> crate::model::ScheduledInstancesNetworkInterface {
            crate::model::ScheduledInstancesNetworkInterface {
                associate_public_ip_address: self.associate_public_ip_address,
                delete_on_termination: self.delete_on_termination,
                description: self.description,
                device_index: self.device_index,
                groups: self.groups,
                ipv6_address_count: self.ipv6_address_count,
                ipv6_addresses: self.ipv6_addresses,
                network_interface_id: self.network_interface_id,
                private_ip_address: self.private_ip_address,
                private_ip_address_configs: self.private_ip_address_configs,
                secondary_private_ip_address_count: self.secondary_private_ip_address_count,
                subnet_id: self.subnet_id,
            }
        }
    }
}
impl ScheduledInstancesNetworkInterface {
    /// Creates a new builder-style object to manufacture [`ScheduledInstancesNetworkInterface`](crate::model::ScheduledInstancesNetworkInterface).
    pub fn builder() -> crate::model::scheduled_instances_network_interface::Builder {
        crate::model::scheduled_instances_network_interface::Builder::default()
    }
}

/// <p>Describes a private IPv4 address for a Scheduled Instance.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ScheduledInstancesPrivateIpAddressConfig {
    /// <p>Indicates whether this is a primary IPv4 address. Otherwise, this is a secondary IPv4 address.</p>
    #[doc(hidden)]
    pub primary: std::option::Option<bool>,
    /// <p>The IPv4 address.</p>
    #[doc(hidden)]
    pub private_ip_address: std::option::Option<std::string::String>,
}
impl ScheduledInstancesPrivateIpAddressConfig {
    /// <p>Indicates whether this is a primary IPv4 address. Otherwise, this is a secondary IPv4 address.</p>
    pub fn primary(&self) -> std::option::Option<bool> {
        self.primary
    }
    /// <p>The IPv4 address.</p>
    pub fn private_ip_address(&self) -> std::option::Option<&str> {
        self.private_ip_address.as_deref()
    }
}
/// See [`ScheduledInstancesPrivateIpAddressConfig`](crate::model::ScheduledInstancesPrivateIpAddressConfig).
pub mod scheduled_instances_private_ip_address_config {

    /// A builder for [`ScheduledInstancesPrivateIpAddressConfig`](crate::model::ScheduledInstancesPrivateIpAddressConfig).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) primary: std::option::Option<bool>,
        pub(crate) private_ip_address: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>Indicates whether this is a primary IPv4 address. Otherwise, this is a secondary IPv4 address.</p>
        pub fn primary(mut self, input: bool) -> Self {
            self.primary = Some(input);
            self
        }
        /// <p>Indicates whether this is a primary IPv4 address. Otherwise, this is a secondary IPv4 address.</p>
        pub fn set_primary(mut self, input: std::option::Option<bool>) -> Self {
            self.primary = input;
            self
        }
        /// <p>The IPv4 address.</p>
        pub fn private_ip_address(mut self, input: impl Into<std::string::String>) -> Self {
            self.private_ip_address = Some(input.into());
            self
        }
        /// <p>The IPv4 address.</p>
        pub fn set_private_ip_address(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.private_ip_address = input;
            self
        }
        /// Consumes the builder and constructs a [`ScheduledInstancesPrivateIpAddressConfig`](crate::model::ScheduledInstancesPrivateIpAddressConfig).
        pub fn build(self) -> crate::model::ScheduledInstancesPrivateIpAddressConfig {
            crate::model::ScheduledInstancesPrivateIpAddressConfig {
                primary: self.primary,
                private_ip_address: self.private_ip_address,
            }
        }
    }
}
impl ScheduledInstancesPrivateIpAddressConfig {
    /// Creates a new builder-style object to manufacture [`ScheduledInstancesPrivateIpAddressConfig`](crate::model::ScheduledInstancesPrivateIpAddressConfig).
    pub fn builder() -> crate::model::scheduled_instances_private_ip_address_config::Builder {
        crate::model::scheduled_instances_private_ip_address_config::Builder::default()
    }
}

/// <p>Describes an IPv6 address.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ScheduledInstancesIpv6Address {
    /// <p>The IPv6 address.</p>
    #[doc(hidden)]
    pub ipv6_address: std::option::Option<std::string::String>,
}
impl ScheduledInstancesIpv6Address {
    /// <p>The IPv6 address.</p>
    pub fn ipv6_address(&self) -> std::option::Option<&str> {
        self.ipv6_address.as_deref()
    }
}
/// See [`ScheduledInstancesIpv6Address`](crate::model::ScheduledInstancesIpv6Address).
pub mod scheduled_instances_ipv6_address {

    /// A builder for [`ScheduledInstancesIpv6Address`](crate::model::ScheduledInstancesIpv6Address).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) ipv6_address: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The IPv6 address.</p>
        pub fn ipv6_address(mut self, input: impl Into<std::string::String>) -> Self {
            self.ipv6_address = Some(input.into());
            self
        }
        /// <p>The IPv6 address.</p>
        pub fn set_ipv6_address(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.ipv6_address = input;
            self
        }
        /// Consumes the builder and constructs a [`ScheduledInstancesIpv6Address`](crate::model::ScheduledInstancesIpv6Address).
        pub fn build(self) -> crate::model::ScheduledInstancesIpv6Address {
            crate::model::ScheduledInstancesIpv6Address {
                ipv6_address: self.ipv6_address,
            }
        }
    }
}
impl ScheduledInstancesIpv6Address {
    /// Creates a new builder-style object to manufacture [`ScheduledInstancesIpv6Address`](crate::model::ScheduledInstancesIpv6Address).
    pub fn builder() -> crate::model::scheduled_instances_ipv6_address::Builder {
        crate::model::scheduled_instances_ipv6_address::Builder::default()
    }
}

/// <p>Describes whether monitoring is enabled for a Scheduled Instance.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ScheduledInstancesMonitoring {
    /// <p>Indicates whether monitoring is enabled.</p>
    #[doc(hidden)]
    pub enabled: std::option::Option<bool>,
}
impl ScheduledInstancesMonitoring {
    /// <p>Indicates whether monitoring is enabled.</p>
    pub fn enabled(&self) -> std::option::Option<bool> {
        self.enabled
    }
}
/// See [`ScheduledInstancesMonitoring`](crate::model::ScheduledInstancesMonitoring).
pub mod scheduled_instances_monitoring {

    /// A builder for [`ScheduledInstancesMonitoring`](crate::model::ScheduledInstancesMonitoring).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) enabled: std::option::Option<bool>,
    }
    impl Builder {
        /// <p>Indicates whether monitoring is enabled.</p>
        pub fn enabled(mut self, input: bool) -> Self {
            self.enabled = Some(input);
            self
        }
        /// <p>Indicates whether monitoring is enabled.</p>
        pub fn set_enabled(mut self, input: std::option::Option<bool>) -> Self {
            self.enabled = input;
            self
        }
        /// Consumes the builder and constructs a [`ScheduledInstancesMonitoring`](crate::model::ScheduledInstancesMonitoring).
        pub fn build(self) -> crate::model::ScheduledInstancesMonitoring {
            crate::model::ScheduledInstancesMonitoring {
                enabled: self.enabled,
            }
        }
    }
}
impl ScheduledInstancesMonitoring {
    /// Creates a new builder-style object to manufacture [`ScheduledInstancesMonitoring`](crate::model::ScheduledInstancesMonitoring).
    pub fn builder() -> crate::model::scheduled_instances_monitoring::Builder {
        crate::model::scheduled_instances_monitoring::Builder::default()
    }
}

/// <p>Describes an IAM instance profile for a Scheduled Instance.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ScheduledInstancesIamInstanceProfile {
    /// <p>The Amazon Resource Name (ARN).</p>
    #[doc(hidden)]
    pub arn: std::option::Option<std::string::String>,
    /// <p>The name.</p>
    #[doc(hidden)]
    pub name: std::option::Option<std::string::String>,
}
impl ScheduledInstancesIamInstanceProfile {
    /// <p>The Amazon Resource Name (ARN).</p>
    pub fn arn(&self) -> std::option::Option<&str> {
        self.arn.as_deref()
    }
    /// <p>The name.</p>
    pub fn name(&self) -> std::option::Option<&str> {
        self.name.as_deref()
    }
}
/// See [`ScheduledInstancesIamInstanceProfile`](crate::model::ScheduledInstancesIamInstanceProfile).
pub mod scheduled_instances_iam_instance_profile {

    /// A builder for [`ScheduledInstancesIamInstanceProfile`](crate::model::ScheduledInstancesIamInstanceProfile).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) arn: std::option::Option<std::string::String>,
        pub(crate) name: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The Amazon Resource Name (ARN).</p>
        pub fn arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.arn = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN).</p>
        pub fn set_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.arn = input;
            self
        }
        /// <p>The name.</p>
        pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
            self.name = Some(input.into());
            self
        }
        /// <p>The name.</p>
        pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.name = input;
            self
        }
        /// Consumes the builder and constructs a [`ScheduledInstancesIamInstanceProfile`](crate::model::ScheduledInstancesIamInstanceProfile).
        pub fn build(self) -> crate::model::ScheduledInstancesIamInstanceProfile {
            crate::model::ScheduledInstancesIamInstanceProfile {
                arn: self.arn,
                name: self.name,
            }
        }
    }
}
impl ScheduledInstancesIamInstanceProfile {
    /// Creates a new builder-style object to manufacture [`ScheduledInstancesIamInstanceProfile`](crate::model::ScheduledInstancesIamInstanceProfile).
    pub fn builder() -> crate::model::scheduled_instances_iam_instance_profile::Builder {
        crate::model::scheduled_instances_iam_instance_profile::Builder::default()
    }
}

/// <p>Describes a block device mapping for a Scheduled Instance.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ScheduledInstancesBlockDeviceMapping {
    /// <p>The device name (for example, <code>/dev/sdh</code> or <code>xvdh</code>).</p>
    #[doc(hidden)]
    pub device_name: std::option::Option<std::string::String>,
    /// <p>Parameters used to set up EBS volumes automatically when the instance is launched.</p>
    #[doc(hidden)]
    pub ebs: std::option::Option<crate::model::ScheduledInstancesEbs>,
    /// <p>To omit the device from the block device mapping, specify an empty string.</p>
    #[doc(hidden)]
    pub no_device: std::option::Option<std::string::String>,
    /// <p>The virtual device name (<code>ephemeral</code>N). Instance store volumes are numbered starting from 0. An instance type with two available instance store volumes can specify mappings for <code>ephemeral0</code> and <code>ephemeral1</code>. The number of available instance store volumes depends on the instance type. After you connect to the instance, you must mount the volume.</p>
    /// <p>Constraints: For M3 instances, you must specify instance store volumes in the block device mapping for the instance. When you launch an M3 instance, we ignore any instance store volumes specified in the block device mapping for the AMI.</p>
    #[doc(hidden)]
    pub virtual_name: std::option::Option<std::string::String>,
}
impl ScheduledInstancesBlockDeviceMapping {
    /// <p>The device name (for example, <code>/dev/sdh</code> or <code>xvdh</code>).</p>
    pub fn device_name(&self) -> std::option::Option<&str> {
        self.device_name.as_deref()
    }
    /// <p>Parameters used to set up EBS volumes automatically when the instance is launched.</p>
    pub fn ebs(&self) -> std::option::Option<&crate::model::ScheduledInstancesEbs> {
        self.ebs.as_ref()
    }
    /// <p>To omit the device from the block device mapping, specify an empty string.</p>
    pub fn no_device(&self) -> std::option::Option<&str> {
        self.no_device.as_deref()
    }
    /// <p>The virtual device name (<code>ephemeral</code>N). Instance store volumes are numbered starting from 0. An instance type with two available instance store volumes can specify mappings for <code>ephemeral0</code> and <code>ephemeral1</code>. The number of available instance store volumes depends on the instance type. After you connect to the instance, you must mount the volume.</p>
    /// <p>Constraints: For M3 instances, you must specify instance store volumes in the block device mapping for the instance. When you launch an M3 instance, we ignore any instance store volumes specified in the block device mapping for the AMI.</p>
    pub fn virtual_name(&self) -> std::option::Option<&str> {
        self.virtual_name.as_deref()
    }
}
/// See [`ScheduledInstancesBlockDeviceMapping`](crate::model::ScheduledInstancesBlockDeviceMapping).
pub mod scheduled_instances_block_device_mapping {

    /// A builder for [`ScheduledInstancesBlockDeviceMapping`](crate::model::ScheduledInstancesBlockDeviceMapping).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) device_name: std::option::Option<std::string::String>,
        pub(crate) ebs: std::option::Option<crate::model::ScheduledInstancesEbs>,
        pub(crate) no_device: std::option::Option<std::string::String>,
        pub(crate) virtual_name: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The device name (for example, <code>/dev/sdh</code> or <code>xvdh</code>).</p>
        pub fn device_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.device_name = Some(input.into());
            self
        }
        /// <p>The device name (for example, <code>/dev/sdh</code> or <code>xvdh</code>).</p>
        pub fn set_device_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.device_name = input;
            self
        }
        /// <p>Parameters used to set up EBS volumes automatically when the instance is launched.</p>
        pub fn ebs(mut self, input: crate::model::ScheduledInstancesEbs) -> Self {
            self.ebs = Some(input);
            self
        }
        /// <p>Parameters used to set up EBS volumes automatically when the instance is launched.</p>
        pub fn set_ebs(
            mut self,
            input: std::option::Option<crate::model::ScheduledInstancesEbs>,
        ) -> Self {
            self.ebs = input;
            self
        }
        /// <p>To omit the device from the block device mapping, specify an empty string.</p>
        pub fn no_device(mut self, input: impl Into<std::string::String>) -> Self {
            self.no_device = Some(input.into());
            self
        }
        /// <p>To omit the device from the block device mapping, specify an empty string.</p>
        pub fn set_no_device(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.no_device = input;
            self
        }
        /// <p>The virtual device name (<code>ephemeral</code>N). Instance store volumes are numbered starting from 0. An instance type with two available instance store volumes can specify mappings for <code>ephemeral0</code> and <code>ephemeral1</code>. The number of available instance store volumes depends on the instance type. After you connect to the instance, you must mount the volume.</p>
        /// <p>Constraints: For M3 instances, you must specify instance store volumes in the block device mapping for the instance. When you launch an M3 instance, we ignore any instance store volumes specified in the block device mapping for the AMI.</p>
        pub fn virtual_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.virtual_name = Some(input.into());
            self
        }
        /// <p>The virtual device name (<code>ephemeral</code>N). Instance store volumes are numbered starting from 0. An instance type with two available instance store volumes can specify mappings for <code>ephemeral0</code> and <code>ephemeral1</code>. The number of available instance store volumes depends on the instance type. After you connect to the instance, you must mount the volume.</p>
        /// <p>Constraints: For M3 instances, you must specify instance store volumes in the block device mapping for the instance. When you launch an M3 instance, we ignore any instance store volumes specified in the block device mapping for the AMI.</p>
        pub fn set_virtual_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.virtual_name = input;
            self
        }
        /// Consumes the builder and constructs a [`ScheduledInstancesBlockDeviceMapping`](crate::model::ScheduledInstancesBlockDeviceMapping).
        pub fn build(self) -> crate::model::ScheduledInstancesBlockDeviceMapping {
            crate::model::ScheduledInstancesBlockDeviceMapping {
                device_name: self.device_name,
                ebs: self.ebs,
                no_device: self.no_device,
                virtual_name: self.virtual_name,
            }
        }
    }
}
impl ScheduledInstancesBlockDeviceMapping {
    /// Creates a new builder-style object to manufacture [`ScheduledInstancesBlockDeviceMapping`](crate::model::ScheduledInstancesBlockDeviceMapping).
    pub fn builder() -> crate::model::scheduled_instances_block_device_mapping::Builder {
        crate::model::scheduled_instances_block_device_mapping::Builder::default()
    }
}

/// <p>Describes an EBS volume for a Scheduled Instance.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ScheduledInstancesEbs {
    /// <p>Indicates whether the volume is deleted on instance termination.</p>
    #[doc(hidden)]
    pub delete_on_termination: std::option::Option<bool>,
    /// <p>Indicates whether the volume is encrypted. You can attached encrypted volumes only to instances that support them.</p>
    #[doc(hidden)]
    pub encrypted: std::option::Option<bool>,
    /// <p>The number of I/O operations per second (IOPS) to provision for an <code>io1</code> or <code>io2</code> volume, with a maximum ratio of 50 IOPS/GiB for <code>io1</code>, and 500 IOPS/GiB for <code>io2</code>. Range is 100 to 64,000 IOPS for volumes in most Regions. Maximum IOPS of 64,000 is guaranteed only on <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances">instances built on the Nitro System</a>. Other instance families guarantee performance up to 32,000 IOPS. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html">Amazon EBS volume types</a> in the <i>Amazon EC2 User Guide</i>.</p>
    /// <p>This parameter is valid only for Provisioned IOPS SSD (<code>io1</code> and <code>io2</code>) volumes.</p>
    #[doc(hidden)]
    pub iops: std::option::Option<i32>,
    /// <p>The ID of the snapshot.</p>
    #[doc(hidden)]
    pub snapshot_id: std::option::Option<std::string::String>,
    /// <p>The size of the volume, in GiB.</p>
    /// <p>Default: If you're creating the volume from a snapshot and don't specify a volume size, the default is the snapshot size.</p>
    #[doc(hidden)]
    pub volume_size: std::option::Option<i32>,
    /// <p>The volume type. <code>gp2</code> for General Purpose SSD, <code>io1</code> or <code> io2</code> for Provisioned IOPS SSD, Throughput Optimized HDD for <code>st1</code>, Cold HDD for <code>sc1</code>, or <code>standard</code> for Magnetic.</p>
    /// <p>Default: <code>gp2</code> </p>
    #[doc(hidden)]
    pub volume_type: std::option::Option<std::string::String>,
}
impl ScheduledInstancesEbs {
    /// <p>Indicates whether the volume is deleted on instance termination.</p>
    pub fn delete_on_termination(&self) -> std::option::Option<bool> {
        self.delete_on_termination
    }
    /// <p>Indicates whether the volume is encrypted. You can attached encrypted volumes only to instances that support them.</p>
    pub fn encrypted(&self) -> std::option::Option<bool> {
        self.encrypted
    }
    /// <p>The number of I/O operations per second (IOPS) to provision for an <code>io1</code> or <code>io2</code> volume, with a maximum ratio of 50 IOPS/GiB for <code>io1</code>, and 500 IOPS/GiB for <code>io2</code>. Range is 100 to 64,000 IOPS for volumes in most Regions. Maximum IOPS of 64,000 is guaranteed only on <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances">instances built on the Nitro System</a>. Other instance families guarantee performance up to 32,000 IOPS. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html">Amazon EBS volume types</a> in the <i>Amazon EC2 User Guide</i>.</p>
    /// <p>This parameter is valid only for Provisioned IOPS SSD (<code>io1</code> and <code>io2</code>) volumes.</p>
    pub fn iops(&self) -> std::option::Option<i32> {
        self.iops
    }
    /// <p>The ID of the snapshot.</p>
    pub fn snapshot_id(&self) -> std::option::Option<&str> {
        self.snapshot_id.as_deref()
    }
    /// <p>The size of the volume, in GiB.</p>
    /// <p>Default: If you're creating the volume from a snapshot and don't specify a volume size, the default is the snapshot size.</p>
    pub fn volume_size(&self) -> std::option::Option<i32> {
        self.volume_size
    }
    /// <p>The volume type. <code>gp2</code> for General Purpose SSD, <code>io1</code> or <code> io2</code> for Provisioned IOPS SSD, Throughput Optimized HDD for <code>st1</code>, Cold HDD for <code>sc1</code>, or <code>standard</code> for Magnetic.</p>
    /// <p>Default: <code>gp2</code> </p>
    pub fn volume_type(&self) -> std::option::Option<&str> {
        self.volume_type.as_deref()
    }
}
/// See [`ScheduledInstancesEbs`](crate::model::ScheduledInstancesEbs).
pub mod scheduled_instances_ebs {

    /// A builder for [`ScheduledInstancesEbs`](crate::model::ScheduledInstancesEbs).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) delete_on_termination: std::option::Option<bool>,
        pub(crate) encrypted: std::option::Option<bool>,
        pub(crate) iops: std::option::Option<i32>,
        pub(crate) snapshot_id: std::option::Option<std::string::String>,
        pub(crate) volume_size: std::option::Option<i32>,
        pub(crate) volume_type: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>Indicates whether the volume is deleted on instance termination.</p>
        pub fn delete_on_termination(mut self, input: bool) -> Self {
            self.delete_on_termination = Some(input);
            self
        }
        /// <p>Indicates whether the volume is deleted on instance termination.</p>
        pub fn set_delete_on_termination(mut self, input: std::option::Option<bool>) -> Self {
            self.delete_on_termination = input;
            self
        }
        /// <p>Indicates whether the volume is encrypted. You can attached encrypted volumes only to instances that support them.</p>
        pub fn encrypted(mut self, input: bool) -> Self {
            self.encrypted = Some(input);
            self
        }
        /// <p>Indicates whether the volume is encrypted. You can attached encrypted volumes only to instances that support them.</p>
        pub fn set_encrypted(mut self, input: std::option::Option<bool>) -> Self {
            self.encrypted = input;
            self
        }
        /// <p>The number of I/O operations per second (IOPS) to provision for an <code>io1</code> or <code>io2</code> volume, with a maximum ratio of 50 IOPS/GiB for <code>io1</code>, and 500 IOPS/GiB for <code>io2</code>. Range is 100 to 64,000 IOPS for volumes in most Regions. Maximum IOPS of 64,000 is guaranteed only on <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances">instances built on the Nitro System</a>. Other instance families guarantee performance up to 32,000 IOPS. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html">Amazon EBS volume types</a> in the <i>Amazon EC2 User Guide</i>.</p>
        /// <p>This parameter is valid only for Provisioned IOPS SSD (<code>io1</code> and <code>io2</code>) volumes.</p>
        pub fn iops(mut self, input: i32) -> Self {
            self.iops = Some(input);
            self
        }
        /// <p>The number of I/O operations per second (IOPS) to provision for an <code>io1</code> or <code>io2</code> volume, with a maximum ratio of 50 IOPS/GiB for <code>io1</code>, and 500 IOPS/GiB for <code>io2</code>. Range is 100 to 64,000 IOPS for volumes in most Regions. Maximum IOPS of 64,000 is guaranteed only on <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances">instances built on the Nitro System</a>. Other instance families guarantee performance up to 32,000 IOPS. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html">Amazon EBS volume types</a> in the <i>Amazon EC2 User Guide</i>.</p>
        /// <p>This parameter is valid only for Provisioned IOPS SSD (<code>io1</code> and <code>io2</code>) volumes.</p>
        pub fn set_iops(mut self, input: std::option::Option<i32>) -> Self {
            self.iops = input;
            self
        }
        /// <p>The ID of the snapshot.</p>
        pub fn snapshot_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.snapshot_id = Some(input.into());
            self
        }
        /// <p>The ID of the snapshot.</p>
        pub fn set_snapshot_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.snapshot_id = input;
            self
        }
        /// <p>The size of the volume, in GiB.</p>
        /// <p>Default: If you're creating the volume from a snapshot and don't specify a volume size, the default is the snapshot size.</p>
        pub fn volume_size(mut self, input: i32) -> Self {
            self.volume_size = Some(input);
            self
        }
        /// <p>The size of the volume, in GiB.</p>
        /// <p>Default: If you're creating the volume from a snapshot and don't specify a volume size, the default is the snapshot size.</p>
        pub fn set_volume_size(mut self, input: std::option::Option<i32>) -> Self {
            self.volume_size = input;
            self
        }
        /// <p>The volume type. <code>gp2</code> for General Purpose SSD, <code>io1</code> or <code> io2</code> for Provisioned IOPS SSD, Throughput Optimized HDD for <code>st1</code>, Cold HDD for <code>sc1</code>, or <code>standard</code> for Magnetic.</p>
        /// <p>Default: <code>gp2</code> </p>
        pub fn volume_type(mut self, input: impl Into<std::string::String>) -> Self {
            self.volume_type = Some(input.into());
            self
        }
        /// <p>The volume type. <code>gp2</code> for General Purpose SSD, <code>io1</code> or <code> io2</code> for Provisioned IOPS SSD, Throughput Optimized HDD for <code>st1</code>, Cold HDD for <code>sc1</code>, or <code>standard</code> for Magnetic.</p>
        /// <p>Default: <code>gp2</code> </p>
        pub fn set_volume_type(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.volume_type = input;
            self
        }
        /// Consumes the builder and constructs a [`ScheduledInstancesEbs`](crate::model::ScheduledInstancesEbs).
        pub fn build(self) -> crate::model::ScheduledInstancesEbs {
            crate::model::ScheduledInstancesEbs {
                delete_on_termination: self.delete_on_termination,
                encrypted: self.encrypted,
                iops: self.iops,
                snapshot_id: self.snapshot_id,
                volume_size: self.volume_size,
                volume_type: self.volume_type,
            }
        }
    }
}
impl ScheduledInstancesEbs {
    /// Creates a new builder-style object to manufacture [`ScheduledInstancesEbs`](crate::model::ScheduledInstancesEbs).
    pub fn builder() -> crate::model::scheduled_instances_ebs::Builder {
        crate::model::scheduled_instances_ebs::Builder::default()
    }
}

/// <p>Describes an instance.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Instance {
    /// <p>The AMI launch index, which can be used to find this instance in the launch group.</p>
    #[doc(hidden)]
    pub ami_launch_index: std::option::Option<i32>,
    /// <p>The ID of the AMI used to launch the instance.</p>
    #[doc(hidden)]
    pub image_id: std::option::Option<std::string::String>,
    /// <p>The ID of the instance.</p>
    #[doc(hidden)]
    pub instance_id: std::option::Option<std::string::String>,
    /// <p>The instance type.</p>
    #[doc(hidden)]
    pub instance_type: std::option::Option<crate::model::InstanceType>,
    /// <p>The kernel associated with this instance, if applicable.</p>
    #[doc(hidden)]
    pub kernel_id: std::option::Option<std::string::String>,
    /// <p>The name of the key pair, if this instance was launched with an associated key pair.</p>
    #[doc(hidden)]
    pub key_name: std::option::Option<std::string::String>,
    /// <p>The time the instance was launched.</p>
    #[doc(hidden)]
    pub launch_time: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The monitoring for the instance.</p>
    #[doc(hidden)]
    pub monitoring: std::option::Option<crate::model::Monitoring>,
    /// <p>The location where the instance launched, if applicable.</p>
    #[doc(hidden)]
    pub placement: std::option::Option<crate::model::Placement>,
    /// <p>The value is <code>Windows</code> for Windows instances; otherwise blank.</p>
    #[doc(hidden)]
    pub platform: std::option::Option<crate::model::PlatformValues>,
    /// <p>(IPv4 only) The private DNS hostname name assigned to the instance. This DNS hostname can only be used inside the Amazon EC2 network. This name is not available until the instance enters the <code>running</code> state. </p>
    /// <p>[EC2-VPC] The Amazon-provided DNS server resolves Amazon-provided private DNS hostnames if you've enabled DNS resolution and DNS hostnames in your VPC. If you are not using the Amazon-provided DNS server in your VPC, your custom domain name servers must resolve the hostname as appropriate.</p>
    #[doc(hidden)]
    pub private_dns_name: std::option::Option<std::string::String>,
    /// <p>The private IPv4 address assigned to the instance.</p>
    #[doc(hidden)]
    pub private_ip_address: std::option::Option<std::string::String>,
    /// <p>The product codes attached to this instance, if applicable.</p>
    #[doc(hidden)]
    pub product_codes: std::option::Option<std::vec::Vec<crate::model::ProductCode>>,
    /// <p>(IPv4 only) The public DNS name assigned to the instance. This name is not available until the instance enters the <code>running</code> state. For EC2-VPC, this name is only available if you've enabled DNS hostnames for your VPC.</p>
    #[doc(hidden)]
    pub public_dns_name: std::option::Option<std::string::String>,
    /// <p>The public IPv4 address, or the Carrier IP address assigned to the instance, if applicable.</p>
    /// <p>A Carrier IP address only applies to an instance launched in a subnet associated with a Wavelength Zone.</p>
    #[doc(hidden)]
    pub public_ip_address: std::option::Option<std::string::String>,
    /// <p>The RAM disk associated with this instance, if applicable.</p>
    #[doc(hidden)]
    pub ramdisk_id: std::option::Option<std::string::String>,
    /// <p>The current state of the instance.</p>
    #[doc(hidden)]
    pub state: std::option::Option<crate::model::InstanceState>,
    /// <p>The reason for the most recent state transition. This might be an empty string.</p>
    #[doc(hidden)]
    pub state_transition_reason: std::option::Option<std::string::String>,
    /// <p>[EC2-VPC] The ID of the subnet in which the instance is running.</p>
    #[doc(hidden)]
    pub subnet_id: std::option::Option<std::string::String>,
    /// <p>[EC2-VPC] The ID of the VPC in which the instance is running.</p>
    #[doc(hidden)]
    pub vpc_id: std::option::Option<std::string::String>,
    /// <p>The architecture of the image.</p>
    #[doc(hidden)]
    pub architecture: std::option::Option<crate::model::ArchitectureValues>,
    /// <p>Any block device mapping entries for the instance.</p>
    #[doc(hidden)]
    pub block_device_mappings:
        std::option::Option<std::vec::Vec<crate::model::InstanceBlockDeviceMapping>>,
    /// <p>The idempotency token you provided when you launched the instance, if applicable.</p>
    #[doc(hidden)]
    pub client_token: std::option::Option<std::string::String>,
    /// <p>Indicates whether the instance is optimized for Amazon EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.</p>
    #[doc(hidden)]
    pub ebs_optimized: std::option::Option<bool>,
    /// <p>Specifies whether enhanced networking with ENA is enabled.</p>
    #[doc(hidden)]
    pub ena_support: std::option::Option<bool>,
    /// <p>The hypervisor type of the instance. The value <code>xen</code> is used for both Xen and Nitro hypervisors.</p>
    #[doc(hidden)]
    pub hypervisor: std::option::Option<crate::model::HypervisorType>,
    /// <p>The IAM instance profile associated with the instance, if applicable.</p>
    #[doc(hidden)]
    pub iam_instance_profile: std::option::Option<crate::model::IamInstanceProfile>,
    /// <p>Indicates whether this is a Spot Instance or a Scheduled Instance.</p>
    #[doc(hidden)]
    pub instance_lifecycle: std::option::Option<crate::model::InstanceLifecycleType>,
    /// <p>The Elastic GPU associated with the instance.</p>
    #[doc(hidden)]
    pub elastic_gpu_associations:
        std::option::Option<std::vec::Vec<crate::model::ElasticGpuAssociation>>,
    /// <p> The elastic inference accelerator associated with the instance.</p>
    #[doc(hidden)]
    pub elastic_inference_accelerator_associations:
        std::option::Option<std::vec::Vec<crate::model::ElasticInferenceAcceleratorAssociation>>,
    /// <p>[EC2-VPC] The network interfaces for the instance.</p>
    #[doc(hidden)]
    pub network_interfaces:
        std::option::Option<std::vec::Vec<crate::model::InstanceNetworkInterface>>,
    /// <p>The Amazon Resource Name (ARN) of the Outpost.</p>
    #[doc(hidden)]
    pub outpost_arn: std::option::Option<std::string::String>,
    /// <p>The device name of the root device volume (for example, <code>/dev/sda1</code>).</p>
    #[doc(hidden)]
    pub root_device_name: std::option::Option<std::string::String>,
    /// <p>The root device type used by the AMI. The AMI can use an EBS volume or an instance store volume.</p>
    #[doc(hidden)]
    pub root_device_type: std::option::Option<crate::model::DeviceType>,
    /// <p>The security groups for the instance.</p>
    #[doc(hidden)]
    pub security_groups: std::option::Option<std::vec::Vec<crate::model::GroupIdentifier>>,
    /// <p>Indicates whether source/destination checking is enabled.</p>
    #[doc(hidden)]
    pub source_dest_check: std::option::Option<bool>,
    /// <p>If the request is a Spot Instance request, the ID of the request.</p>
    #[doc(hidden)]
    pub spot_instance_request_id: std::option::Option<std::string::String>,
    /// <p>Specifies whether enhanced networking with the Intel 82599 Virtual Function interface is enabled.</p>
    #[doc(hidden)]
    pub sriov_net_support: std::option::Option<std::string::String>,
    /// <p>The reason for the most recent state transition.</p>
    #[doc(hidden)]
    pub state_reason: std::option::Option<crate::model::StateReason>,
    /// <p>Any tags assigned to the instance.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    /// <p>The virtualization type of the instance.</p>
    #[doc(hidden)]
    pub virtualization_type: std::option::Option<crate::model::VirtualizationType>,
    /// <p>The CPU options for the instance.</p>
    #[doc(hidden)]
    pub cpu_options: std::option::Option<crate::model::CpuOptions>,
    /// <p>The ID of the Capacity Reservation.</p>
    #[doc(hidden)]
    pub capacity_reservation_id: std::option::Option<std::string::String>,
    /// <p>Information about the Capacity Reservation targeting option.</p>
    #[doc(hidden)]
    pub capacity_reservation_specification:
        std::option::Option<crate::model::CapacityReservationSpecificationResponse>,
    /// <p>Indicates whether the instance is enabled for hibernation.</p>
    #[doc(hidden)]
    pub hibernation_options: std::option::Option<crate::model::HibernationOptions>,
    /// <p>The license configurations for the instance.</p>
    #[doc(hidden)]
    pub licenses: std::option::Option<std::vec::Vec<crate::model::LicenseConfiguration>>,
    /// <p>The metadata options for the instance.</p>
    #[doc(hidden)]
    pub metadata_options: std::option::Option<crate::model::InstanceMetadataOptionsResponse>,
    /// <p>Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves.</p>
    #[doc(hidden)]
    pub enclave_options: std::option::Option<crate::model::EnclaveOptions>,
    /// <p>The boot mode of the instance. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-boot.html">Boot modes</a> in the <i>Amazon EC2 User Guide</i>.</p>
    #[doc(hidden)]
    pub boot_mode: std::option::Option<crate::model::BootModeValues>,
    /// <p>The platform details value for the instance. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/billing-info-fields.html">AMI billing information fields</a> in the <i>Amazon EC2 User Guide</i>.</p>
    #[doc(hidden)]
    pub platform_details: std::option::Option<std::string::String>,
    /// <p>The usage operation value for the instance. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/billing-info-fields.html">AMI billing information fields</a> in the <i>Amazon EC2 User Guide</i>.</p>
    #[doc(hidden)]
    pub usage_operation: std::option::Option<std::string::String>,
    /// <p>The time that the usage operation was last updated.</p>
    #[doc(hidden)]
    pub usage_operation_update_time: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The options for the instance hostname.</p>
    #[doc(hidden)]
    pub private_dns_name_options: std::option::Option<crate::model::PrivateDnsNameOptionsResponse>,
    /// <p>The IPv6 address assigned to the instance.</p>
    #[doc(hidden)]
    pub ipv6_address: std::option::Option<std::string::String>,
    /// <p>If the instance is configured for NitroTPM support, the value is <code>v2.0</code>. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/nitrotpm.html">NitroTPM</a> in the <i>Amazon EC2 User Guide</i>.</p>
    #[doc(hidden)]
    pub tpm_support: std::option::Option<std::string::String>,
    /// <p>Provides information on the recovery and maintenance options of your instance.</p>
    #[doc(hidden)]
    pub maintenance_options: std::option::Option<crate::model::InstanceMaintenanceOptions>,
}
impl Instance {
    /// <p>The AMI launch index, which can be used to find this instance in the launch group.</p>
    pub fn ami_launch_index(&self) -> std::option::Option<i32> {
        self.ami_launch_index
    }
    /// <p>The ID of the AMI used to launch the instance.</p>
    pub fn image_id(&self) -> std::option::Option<&str> {
        self.image_id.as_deref()
    }
    /// <p>The ID of the instance.</p>
    pub fn instance_id(&self) -> std::option::Option<&str> {
        self.instance_id.as_deref()
    }
    /// <p>The instance type.</p>
    pub fn instance_type(&self) -> std::option::Option<&crate::model::InstanceType> {
        self.instance_type.as_ref()
    }
    /// <p>The kernel associated with this instance, if applicable.</p>
    pub fn kernel_id(&self) -> std::option::Option<&str> {
        self.kernel_id.as_deref()
    }
    /// <p>The name of the key pair, if this instance was launched with an associated key pair.</p>
    pub fn key_name(&self) -> std::option::Option<&str> {
        self.key_name.as_deref()
    }
    /// <p>The time the instance was launched.</p>
    pub fn launch_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.launch_time.as_ref()
    }
    /// <p>The monitoring for the instance.</p>
    pub fn monitoring(&self) -> std::option::Option<&crate::model::Monitoring> {
        self.monitoring.as_ref()
    }
    /// <p>The location where the instance launched, if applicable.</p>
    pub fn placement(&self) -> std::option::Option<&crate::model::Placement> {
        self.placement.as_ref()
    }
    /// <p>The value is <code>Windows</code> for Windows instances; otherwise blank.</p>
    pub fn platform(&self) -> std::option::Option<&crate::model::PlatformValues> {
        self.platform.as_ref()
    }
    /// <p>(IPv4 only) The private DNS hostname name assigned to the instance. This DNS hostname can only be used inside the Amazon EC2 network. This name is not available until the instance enters the <code>running</code> state. </p>
    /// <p>[EC2-VPC] The Amazon-provided DNS server resolves Amazon-provided private DNS hostnames if you've enabled DNS resolution and DNS hostnames in your VPC. If you are not using the Amazon-provided DNS server in your VPC, your custom domain name servers must resolve the hostname as appropriate.</p>
    pub fn private_dns_name(&self) -> std::option::Option<&str> {
        self.private_dns_name.as_deref()
    }
    /// <p>The private IPv4 address assigned to the instance.</p>
    pub fn private_ip_address(&self) -> std::option::Option<&str> {
        self.private_ip_address.as_deref()
    }
    /// <p>The product codes attached to this instance, if applicable.</p>
    pub fn product_codes(&self) -> std::option::Option<&[crate::model::ProductCode]> {
        self.product_codes.as_deref()
    }
    /// <p>(IPv4 only) The public DNS name assigned to the instance. This name is not available until the instance enters the <code>running</code> state. For EC2-VPC, this name is only available if you've enabled DNS hostnames for your VPC.</p>
    pub fn public_dns_name(&self) -> std::option::Option<&str> {
        self.public_dns_name.as_deref()
    }
    /// <p>The public IPv4 address, or the Carrier IP address assigned to the instance, if applicable.</p>
    /// <p>A Carrier IP address only applies to an instance launched in a subnet associated with a Wavelength Zone.</p>
    pub fn public_ip_address(&self) -> std::option::Option<&str> {
        self.public_ip_address.as_deref()
    }
    /// <p>The RAM disk associated with this instance, if applicable.</p>
    pub fn ramdisk_id(&self) -> std::option::Option<&str> {
        self.ramdisk_id.as_deref()
    }
    /// <p>The current state of the instance.</p>
    pub fn state(&self) -> std::option::Option<&crate::model::InstanceState> {
        self.state.as_ref()
    }
    /// <p>The reason for the most recent state transition. This might be an empty string.</p>
    pub fn state_transition_reason(&self) -> std::option::Option<&str> {
        self.state_transition_reason.as_deref()
    }
    /// <p>[EC2-VPC] The ID of the subnet in which the instance is running.</p>
    pub fn subnet_id(&self) -> std::option::Option<&str> {
        self.subnet_id.as_deref()
    }
    /// <p>[EC2-VPC] The ID of the VPC in which the instance is running.</p>
    pub fn vpc_id(&self) -> std::option::Option<&str> {
        self.vpc_id.as_deref()
    }
    /// <p>The architecture of the image.</p>
    pub fn architecture(&self) -> std::option::Option<&crate::model::ArchitectureValues> {
        self.architecture.as_ref()
    }
    /// <p>Any block device mapping entries for the instance.</p>
    pub fn block_device_mappings(
        &self,
    ) -> std::option::Option<&[crate::model::InstanceBlockDeviceMapping]> {
        self.block_device_mappings.as_deref()
    }
    /// <p>The idempotency token you provided when you launched the instance, if applicable.</p>
    pub fn client_token(&self) -> std::option::Option<&str> {
        self.client_token.as_deref()
    }
    /// <p>Indicates whether the instance is optimized for Amazon EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.</p>
    pub fn ebs_optimized(&self) -> std::option::Option<bool> {
        self.ebs_optimized
    }
    /// <p>Specifies whether enhanced networking with ENA is enabled.</p>
    pub fn ena_support(&self) -> std::option::Option<bool> {
        self.ena_support
    }
    /// <p>The hypervisor type of the instance. The value <code>xen</code> is used for both Xen and Nitro hypervisors.</p>
    pub fn hypervisor(&self) -> std::option::Option<&crate::model::HypervisorType> {
        self.hypervisor.as_ref()
    }
    /// <p>The IAM instance profile associated with the instance, if applicable.</p>
    pub fn iam_instance_profile(&self) -> std::option::Option<&crate::model::IamInstanceProfile> {
        self.iam_instance_profile.as_ref()
    }
    /// <p>Indicates whether this is a Spot Instance or a Scheduled Instance.</p>
    pub fn instance_lifecycle(&self) -> std::option::Option<&crate::model::InstanceLifecycleType> {
        self.instance_lifecycle.as_ref()
    }
    /// <p>The Elastic GPU associated with the instance.</p>
    pub fn elastic_gpu_associations(
        &self,
    ) -> std::option::Option<&[crate::model::ElasticGpuAssociation]> {
        self.elastic_gpu_associations.as_deref()
    }
    /// <p> The elastic inference accelerator associated with the instance.</p>
    pub fn elastic_inference_accelerator_associations(
        &self,
    ) -> std::option::Option<&[crate::model::ElasticInferenceAcceleratorAssociation]> {
        self.elastic_inference_accelerator_associations.as_deref()
    }
    /// <p>[EC2-VPC] The network interfaces for the instance.</p>
    pub fn network_interfaces(
        &self,
    ) -> std::option::Option<&[crate::model::InstanceNetworkInterface]> {
        self.network_interfaces.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the Outpost.</p>
    pub fn outpost_arn(&self) -> std::option::Option<&str> {
        self.outpost_arn.as_deref()
    }
    /// <p>The device name of the root device volume (for example, <code>/dev/sda1</code>).</p>
    pub fn root_device_name(&self) -> std::option::Option<&str> {
        self.root_device_name.as_deref()
    }
    /// <p>The root device type used by the AMI. The AMI can use an EBS volume or an instance store volume.</p>
    pub fn root_device_type(&self) -> std::option::Option<&crate::model::DeviceType> {
        self.root_device_type.as_ref()
    }
    /// <p>The security groups for the instance.</p>
    pub fn security_groups(&self) -> std::option::Option<&[crate::model::GroupIdentifier]> {
        self.security_groups.as_deref()
    }
    /// <p>Indicates whether source/destination checking is enabled.</p>
    pub fn source_dest_check(&self) -> std::option::Option<bool> {
        self.source_dest_check
    }
    /// <p>If the request is a Spot Instance request, the ID of the request.</p>
    pub fn spot_instance_request_id(&self) -> std::option::Option<&str> {
        self.spot_instance_request_id.as_deref()
    }
    /// <p>Specifies whether enhanced networking with the Intel 82599 Virtual Function interface is enabled.</p>
    pub fn sriov_net_support(&self) -> std::option::Option<&str> {
        self.sriov_net_support.as_deref()
    }
    /// <p>The reason for the most recent state transition.</p>
    pub fn state_reason(&self) -> std::option::Option<&crate::model::StateReason> {
        self.state_reason.as_ref()
    }
    /// <p>Any tags assigned to the instance.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
    /// <p>The virtualization type of the instance.</p>
    pub fn virtualization_type(&self) -> std::option::Option<&crate::model::VirtualizationType> {
        self.virtualization_type.as_ref()
    }
    /// <p>The CPU options for the instance.</p>
    pub fn cpu_options(&self) -> std::option::Option<&crate::model::CpuOptions> {
        self.cpu_options.as_ref()
    }
    /// <p>The ID of the Capacity Reservation.</p>
    pub fn capacity_reservation_id(&self) -> std::option::Option<&str> {
        self.capacity_reservation_id.as_deref()
    }
    /// <p>Information about the Capacity Reservation targeting option.</p>
    pub fn capacity_reservation_specification(
        &self,
    ) -> std::option::Option<&crate::model::CapacityReservationSpecificationResponse> {
        self.capacity_reservation_specification.as_ref()
    }
    /// <p>Indicates whether the instance is enabled for hibernation.</p>
    pub fn hibernation_options(&self) -> std::option::Option<&crate::model::HibernationOptions> {
        self.hibernation_options.as_ref()
    }
    /// <p>The license configurations for the instance.</p>
    pub fn licenses(&self) -> std::option::Option<&[crate::model::LicenseConfiguration]> {
        self.licenses.as_deref()
    }
    /// <p>The metadata options for the instance.</p>
    pub fn metadata_options(
        &self,
    ) -> std::option::Option<&crate::model::InstanceMetadataOptionsResponse> {
        self.metadata_options.as_ref()
    }
    /// <p>Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves.</p>
    pub fn enclave_options(&self) -> std::option::Option<&crate::model::EnclaveOptions> {
        self.enclave_options.as_ref()
    }
    /// <p>The boot mode of the instance. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-boot.html">Boot modes</a> in the <i>Amazon EC2 User Guide</i>.</p>
    pub fn boot_mode(&self) -> std::option::Option<&crate::model::BootModeValues> {
        self.boot_mode.as_ref()
    }
    /// <p>The platform details value for the instance. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/billing-info-fields.html">AMI billing information fields</a> in the <i>Amazon EC2 User Guide</i>.</p>
    pub fn platform_details(&self) -> std::option::Option<&str> {
        self.platform_details.as_deref()
    }
    /// <p>The usage operation value for the instance. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/billing-info-fields.html">AMI billing information fields</a> in the <i>Amazon EC2 User Guide</i>.</p>
    pub fn usage_operation(&self) -> std::option::Option<&str> {
        self.usage_operation.as_deref()
    }
    /// <p>The time that the usage operation was last updated.</p>
    pub fn usage_operation_update_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.usage_operation_update_time.as_ref()
    }
    /// <p>The options for the instance hostname.</p>
    pub fn private_dns_name_options(
        &self,
    ) -> std::option::Option<&crate::model::PrivateDnsNameOptionsResponse> {
        self.private_dns_name_options.as_ref()
    }
    /// <p>The IPv6 address assigned to the instance.</p>
    pub fn ipv6_address(&self) -> std::option::Option<&str> {
        self.ipv6_address.as_deref()
    }
    /// <p>If the instance is configured for NitroTPM support, the value is <code>v2.0</code>. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/nitrotpm.html">NitroTPM</a> in the <i>Amazon EC2 User Guide</i>.</p>
    pub fn tpm_support(&self) -> std::option::Option<&str> {
        self.tpm_support.as_deref()
    }
    /// <p>Provides information on the recovery and maintenance options of your instance.</p>
    pub fn maintenance_options(
        &self,
    ) -> std::option::Option<&crate::model::InstanceMaintenanceOptions> {
        self.maintenance_options.as_ref()
    }
}
/// See [`Instance`](crate::model::Instance).
pub mod instance {

    /// A builder for [`Instance`](crate::model::Instance).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) ami_launch_index: std::option::Option<i32>,
        pub(crate) image_id: std::option::Option<std::string::String>,
        pub(crate) instance_id: std::option::Option<std::string::String>,
        pub(crate) instance_type: std::option::Option<crate::model::InstanceType>,
        pub(crate) kernel_id: std::option::Option<std::string::String>,
        pub(crate) key_name: std::option::Option<std::string::String>,
        pub(crate) launch_time: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) monitoring: std::option::Option<crate::model::Monitoring>,
        pub(crate) placement: std::option::Option<crate::model::Placement>,
        pub(crate) platform: std::option::Option<crate::model::PlatformValues>,
        pub(crate) private_dns_name: std::option::Option<std::string::String>,
        pub(crate) private_ip_address: std::option::Option<std::string::String>,
        pub(crate) product_codes: std::option::Option<std::vec::Vec<crate::model::ProductCode>>,
        pub(crate) public_dns_name: std::option::Option<std::string::String>,
        pub(crate) public_ip_address: std::option::Option<std::string::String>,
        pub(crate) ramdisk_id: std::option::Option<std::string::String>,
        pub(crate) state: std::option::Option<crate::model::InstanceState>,
        pub(crate) state_transition_reason: std::option::Option<std::string::String>,
        pub(crate) subnet_id: std::option::Option<std::string::String>,
        pub(crate) vpc_id: std::option::Option<std::string::String>,
        pub(crate) architecture: std::option::Option<crate::model::ArchitectureValues>,
        pub(crate) block_device_mappings:
            std::option::Option<std::vec::Vec<crate::model::InstanceBlockDeviceMapping>>,
        pub(crate) client_token: std::option::Option<std::string::String>,
        pub(crate) ebs_optimized: std::option::Option<bool>,
        pub(crate) ena_support: std::option::Option<bool>,
        pub(crate) hypervisor: std::option::Option<crate::model::HypervisorType>,
        pub(crate) iam_instance_profile: std::option::Option<crate::model::IamInstanceProfile>,
        pub(crate) instance_lifecycle: std::option::Option<crate::model::InstanceLifecycleType>,
        pub(crate) elastic_gpu_associations:
            std::option::Option<std::vec::Vec<crate::model::ElasticGpuAssociation>>,
        pub(crate) elastic_inference_accelerator_associations: std::option::Option<
            std::vec::Vec<crate::model::ElasticInferenceAcceleratorAssociation>,
        >,
        pub(crate) network_interfaces:
            std::option::Option<std::vec::Vec<crate::model::InstanceNetworkInterface>>,
        pub(crate) outpost_arn: std::option::Option<std::string::String>,
        pub(crate) root_device_name: std::option::Option<std::string::String>,
        pub(crate) root_device_type: std::option::Option<crate::model::DeviceType>,
        pub(crate) security_groups:
            std::option::Option<std::vec::Vec<crate::model::GroupIdentifier>>,
        pub(crate) source_dest_check: std::option::Option<bool>,
        pub(crate) spot_instance_request_id: std::option::Option<std::string::String>,
        pub(crate) sriov_net_support: std::option::Option<std::string::String>,
        pub(crate) state_reason: std::option::Option<crate::model::StateReason>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        pub(crate) virtualization_type: std::option::Option<crate::model::VirtualizationType>,
        pub(crate) cpu_options: std::option::Option<crate::model::CpuOptions>,
        pub(crate) capacity_reservation_id: std::option::Option<std::string::String>,
        pub(crate) capacity_reservation_specification:
            std::option::Option<crate::model::CapacityReservationSpecificationResponse>,
        pub(crate) hibernation_options: std::option::Option<crate::model::HibernationOptions>,
        pub(crate) licenses: std::option::Option<std::vec::Vec<crate::model::LicenseConfiguration>>,
        pub(crate) metadata_options:
            std::option::Option<crate::model::InstanceMetadataOptionsResponse>,
        pub(crate) enclave_options: std::option::Option<crate::model::EnclaveOptions>,
        pub(crate) boot_mode: std::option::Option<crate::model::BootModeValues>,
        pub(crate) platform_details: std::option::Option<std::string::String>,
        pub(crate) usage_operation: std::option::Option<std::string::String>,
        pub(crate) usage_operation_update_time: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) private_dns_name_options:
            std::option::Option<crate::model::PrivateDnsNameOptionsResponse>,
        pub(crate) ipv6_address: std::option::Option<std::string::String>,
        pub(crate) tpm_support: std::option::Option<std::string::String>,
        pub(crate) maintenance_options:
            std::option::Option<crate::model::InstanceMaintenanceOptions>,
    }
    impl Builder {
        /// <p>The AMI launch index, which can be used to find this instance in the launch group.</p>
        pub fn ami_launch_index(mut self, input: i32) -> Self {
            self.ami_launch_index = Some(input);
            self
        }
        /// <p>The AMI launch index, which can be used to find this instance in the launch group.</p>
        pub fn set_ami_launch_index(mut self, input: std::option::Option<i32>) -> Self {
            self.ami_launch_index = input;
            self
        }
        /// <p>The ID of the AMI used to launch the instance.</p>
        pub fn image_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.image_id = Some(input.into());
            self
        }
        /// <p>The ID of the AMI used to launch the instance.</p>
        pub fn set_image_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.image_id = input;
            self
        }
        /// <p>The ID of the instance.</p>
        pub fn instance_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.instance_id = Some(input.into());
            self
        }
        /// <p>The ID of the instance.</p>
        pub fn set_instance_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.instance_id = input;
            self
        }
        /// <p>The instance type.</p>
        pub fn instance_type(mut self, input: crate::model::InstanceType) -> Self {
            self.instance_type = Some(input);
            self
        }
        /// <p>The instance type.</p>
        pub fn set_instance_type(
            mut self,
            input: std::option::Option<crate::model::InstanceType>,
        ) -> Self {
            self.instance_type = input;
            self
        }
        /// <p>The kernel associated with this instance, if applicable.</p>
        pub fn kernel_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.kernel_id = Some(input.into());
            self
        }
        /// <p>The kernel associated with this instance, if applicable.</p>
        pub fn set_kernel_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.kernel_id = input;
            self
        }
        /// <p>The name of the key pair, if this instance was launched with an associated key pair.</p>
        pub fn key_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.key_name = Some(input.into());
            self
        }
        /// <p>The name of the key pair, if this instance was launched with an associated key pair.</p>
        pub fn set_key_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.key_name = input;
            self
        }
        /// <p>The time the instance was launched.</p>
        pub fn launch_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.launch_time = Some(input);
            self
        }
        /// <p>The time the instance was launched.</p>
        pub fn set_launch_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.launch_time = input;
            self
        }
        /// <p>The monitoring for the instance.</p>
        pub fn monitoring(mut self, input: crate::model::Monitoring) -> Self {
            self.monitoring = Some(input);
            self
        }
        /// <p>The monitoring for the instance.</p>
        pub fn set_monitoring(
            mut self,
            input: std::option::Option<crate::model::Monitoring>,
        ) -> Self {
            self.monitoring = input;
            self
        }
        /// <p>The location where the instance launched, if applicable.</p>
        pub fn placement(mut self, input: crate::model::Placement) -> Self {
            self.placement = Some(input);
            self
        }
        /// <p>The location where the instance launched, if applicable.</p>
        pub fn set_placement(
            mut self,
            input: std::option::Option<crate::model::Placement>,
        ) -> Self {
            self.placement = input;
            self
        }
        /// <p>The value is <code>Windows</code> for Windows instances; otherwise blank.</p>
        pub fn platform(mut self, input: crate::model::PlatformValues) -> Self {
            self.platform = Some(input);
            self
        }
        /// <p>The value is <code>Windows</code> for Windows instances; otherwise blank.</p>
        pub fn set_platform(
            mut self,
            input: std::option::Option<crate::model::PlatformValues>,
        ) -> Self {
            self.platform = input;
            self
        }
        /// <p>(IPv4 only) The private DNS hostname name assigned to the instance. This DNS hostname can only be used inside the Amazon EC2 network. This name is not available until the instance enters the <code>running</code> state. </p>
        /// <p>[EC2-VPC] The Amazon-provided DNS server resolves Amazon-provided private DNS hostnames if you've enabled DNS resolution and DNS hostnames in your VPC. If you are not using the Amazon-provided DNS server in your VPC, your custom domain name servers must resolve the hostname as appropriate.</p>
        pub fn private_dns_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.private_dns_name = Some(input.into());
            self
        }
        /// <p>(IPv4 only) The private DNS hostname name assigned to the instance. This DNS hostname can only be used inside the Amazon EC2 network. This name is not available until the instance enters the <code>running</code> state. </p>
        /// <p>[EC2-VPC] The Amazon-provided DNS server resolves Amazon-provided private DNS hostnames if you've enabled DNS resolution and DNS hostnames in your VPC. If you are not using the Amazon-provided DNS server in your VPC, your custom domain name servers must resolve the hostname as appropriate.</p>
        pub fn set_private_dns_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.private_dns_name = input;
            self
        }
        /// <p>The private IPv4 address assigned to the instance.</p>
        pub fn private_ip_address(mut self, input: impl Into<std::string::String>) -> Self {
            self.private_ip_address = Some(input.into());
            self
        }
        /// <p>The private IPv4 address assigned to the instance.</p>
        pub fn set_private_ip_address(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.private_ip_address = input;
            self
        }
        /// Appends an item to `product_codes`.
        ///
        /// To override the contents of this collection use [`set_product_codes`](Self::set_product_codes).
        ///
        /// <p>The product codes attached to this instance, if applicable.</p>
        pub fn product_codes(mut self, input: crate::model::ProductCode) -> Self {
            let mut v = self.product_codes.unwrap_or_default();
            v.push(input);
            self.product_codes = Some(v);
            self
        }
        /// <p>The product codes attached to this instance, if applicable.</p>
        pub fn set_product_codes(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::ProductCode>>,
        ) -> Self {
            self.product_codes = input;
            self
        }
        /// <p>(IPv4 only) The public DNS name assigned to the instance. This name is not available until the instance enters the <code>running</code> state. For EC2-VPC, this name is only available if you've enabled DNS hostnames for your VPC.</p>
        pub fn public_dns_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.public_dns_name = Some(input.into());
            self
        }
        /// <p>(IPv4 only) The public DNS name assigned to the instance. This name is not available until the instance enters the <code>running</code> state. For EC2-VPC, this name is only available if you've enabled DNS hostnames for your VPC.</p>
        pub fn set_public_dns_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.public_dns_name = input;
            self
        }
        /// <p>The public IPv4 address, or the Carrier IP address assigned to the instance, if applicable.</p>
        /// <p>A Carrier IP address only applies to an instance launched in a subnet associated with a Wavelength Zone.</p>
        pub fn public_ip_address(mut self, input: impl Into<std::string::String>) -> Self {
            self.public_ip_address = Some(input.into());
            self
        }
        /// <p>The public IPv4 address, or the Carrier IP address assigned to the instance, if applicable.</p>
        /// <p>A Carrier IP address only applies to an instance launched in a subnet associated with a Wavelength Zone.</p>
        pub fn set_public_ip_address(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.public_ip_address = input;
            self
        }
        /// <p>The RAM disk associated with this instance, if applicable.</p>
        pub fn ramdisk_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.ramdisk_id = Some(input.into());
            self
        }
        /// <p>The RAM disk associated with this instance, if applicable.</p>
        pub fn set_ramdisk_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.ramdisk_id = input;
            self
        }
        /// <p>The current state of the instance.</p>
        pub fn state(mut self, input: crate::model::InstanceState) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>The current state of the instance.</p>
        pub fn set_state(
            mut self,
            input: std::option::Option<crate::model::InstanceState>,
        ) -> Self {
            self.state = input;
            self
        }
        /// <p>The reason for the most recent state transition. This might be an empty string.</p>
        pub fn state_transition_reason(mut self, input: impl Into<std::string::String>) -> Self {
            self.state_transition_reason = Some(input.into());
            self
        }
        /// <p>The reason for the most recent state transition. This might be an empty string.</p>
        pub fn set_state_transition_reason(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.state_transition_reason = input;
            self
        }
        /// <p>[EC2-VPC] The ID of the subnet in which the instance is running.</p>
        pub fn subnet_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.subnet_id = Some(input.into());
            self
        }
        /// <p>[EC2-VPC] The ID of the subnet in which the instance is running.</p>
        pub fn set_subnet_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.subnet_id = input;
            self
        }
        /// <p>[EC2-VPC] The ID of the VPC in which the instance is running.</p>
        pub fn vpc_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.vpc_id = Some(input.into());
            self
        }
        /// <p>[EC2-VPC] The ID of the VPC in which the instance is running.</p>
        pub fn set_vpc_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.vpc_id = input;
            self
        }
        /// <p>The architecture of the image.</p>
        pub fn architecture(mut self, input: crate::model::ArchitectureValues) -> Self {
            self.architecture = Some(input);
            self
        }
        /// <p>The architecture of the image.</p>
        pub fn set_architecture(
            mut self,
            input: std::option::Option<crate::model::ArchitectureValues>,
        ) -> Self {
            self.architecture = input;
            self
        }
        /// Appends an item to `block_device_mappings`.
        ///
        /// To override the contents of this collection use [`set_block_device_mappings`](Self::set_block_device_mappings).
        ///
        /// <p>Any block device mapping entries for the instance.</p>
        pub fn block_device_mappings(
            mut self,
            input: crate::model::InstanceBlockDeviceMapping,
        ) -> Self {
            let mut v = self.block_device_mappings.unwrap_or_default();
            v.push(input);
            self.block_device_mappings = Some(v);
            self
        }
        /// <p>Any block device mapping entries for the instance.</p>
        pub fn set_block_device_mappings(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::InstanceBlockDeviceMapping>>,
        ) -> Self {
            self.block_device_mappings = input;
            self
        }
        /// <p>The idempotency token you provided when you launched the instance, if applicable.</p>
        pub fn client_token(mut self, input: impl Into<std::string::String>) -> Self {
            self.client_token = Some(input.into());
            self
        }
        /// <p>The idempotency token you provided when you launched the instance, if applicable.</p>
        pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.client_token = input;
            self
        }
        /// <p>Indicates whether the instance is optimized for Amazon EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.</p>
        pub fn ebs_optimized(mut self, input: bool) -> Self {
            self.ebs_optimized = Some(input);
            self
        }
        /// <p>Indicates whether the instance is optimized for Amazon EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.</p>
        pub fn set_ebs_optimized(mut self, input: std::option::Option<bool>) -> Self {
            self.ebs_optimized = input;
            self
        }
        /// <p>Specifies whether enhanced networking with ENA is enabled.</p>
        pub fn ena_support(mut self, input: bool) -> Self {
            self.ena_support = Some(input);
            self
        }
        /// <p>Specifies whether enhanced networking with ENA is enabled.</p>
        pub fn set_ena_support(mut self, input: std::option::Option<bool>) -> Self {
            self.ena_support = input;
            self
        }
        /// <p>The hypervisor type of the instance. The value <code>xen</code> is used for both Xen and Nitro hypervisors.</p>
        pub fn hypervisor(mut self, input: crate::model::HypervisorType) -> Self {
            self.hypervisor = Some(input);
            self
        }
        /// <p>The hypervisor type of the instance. The value <code>xen</code> is used for both Xen and Nitro hypervisors.</p>
        pub fn set_hypervisor(
            mut self,
            input: std::option::Option<crate::model::HypervisorType>,
        ) -> Self {
            self.hypervisor = input;
            self
        }
        /// <p>The IAM instance profile associated with the instance, if applicable.</p>
        pub fn iam_instance_profile(mut self, input: crate::model::IamInstanceProfile) -> Self {
            self.iam_instance_profile = Some(input);
            self
        }
        /// <p>The IAM instance profile associated with the instance, if applicable.</p>
        pub fn set_iam_instance_profile(
            mut self,
            input: std::option::Option<crate::model::IamInstanceProfile>,
        ) -> Self {
            self.iam_instance_profile = input;
            self
        }
        /// <p>Indicates whether this is a Spot Instance or a Scheduled Instance.</p>
        pub fn instance_lifecycle(mut self, input: crate::model::InstanceLifecycleType) -> Self {
            self.instance_lifecycle = Some(input);
            self
        }
        /// <p>Indicates whether this is a Spot Instance or a Scheduled Instance.</p>
        pub fn set_instance_lifecycle(
            mut self,
            input: std::option::Option<crate::model::InstanceLifecycleType>,
        ) -> Self {
            self.instance_lifecycle = input;
            self
        }
        /// Appends an item to `elastic_gpu_associations`.
        ///
        /// To override the contents of this collection use [`set_elastic_gpu_associations`](Self::set_elastic_gpu_associations).
        ///
        /// <p>The Elastic GPU associated with the instance.</p>
        pub fn elastic_gpu_associations(
            mut self,
            input: crate::model::ElasticGpuAssociation,
        ) -> Self {
            let mut v = self.elastic_gpu_associations.unwrap_or_default();
            v.push(input);
            self.elastic_gpu_associations = Some(v);
            self
        }
        /// <p>The Elastic GPU associated with the instance.</p>
        pub fn set_elastic_gpu_associations(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::ElasticGpuAssociation>>,
        ) -> Self {
            self.elastic_gpu_associations = input;
            self
        }
        /// Appends an item to `elastic_inference_accelerator_associations`.
        ///
        /// To override the contents of this collection use [`set_elastic_inference_accelerator_associations`](Self::set_elastic_inference_accelerator_associations).
        ///
        /// <p> The elastic inference accelerator associated with the instance.</p>
        pub fn elastic_inference_accelerator_associations(
            mut self,
            input: crate::model::ElasticInferenceAcceleratorAssociation,
        ) -> Self {
            let mut v = self
                .elastic_inference_accelerator_associations
                .unwrap_or_default();
            v.push(input);
            self.elastic_inference_accelerator_associations = Some(v);
            self
        }
        /// <p> The elastic inference accelerator associated with the instance.</p>
        pub fn set_elastic_inference_accelerator_associations(
            mut self,
            input: std::option::Option<
                std::vec::Vec<crate::model::ElasticInferenceAcceleratorAssociation>,
            >,
        ) -> Self {
            self.elastic_inference_accelerator_associations = input;
            self
        }
        /// Appends an item to `network_interfaces`.
        ///
        /// To override the contents of this collection use [`set_network_interfaces`](Self::set_network_interfaces).
        ///
        /// <p>[EC2-VPC] The network interfaces for the instance.</p>
        pub fn network_interfaces(mut self, input: crate::model::InstanceNetworkInterface) -> Self {
            let mut v = self.network_interfaces.unwrap_or_default();
            v.push(input);
            self.network_interfaces = Some(v);
            self
        }
        /// <p>[EC2-VPC] The network interfaces for the instance.</p>
        pub fn set_network_interfaces(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::InstanceNetworkInterface>>,
        ) -> Self {
            self.network_interfaces = input;
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the Outpost.</p>
        pub fn outpost_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.outpost_arn = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the Outpost.</p>
        pub fn set_outpost_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.outpost_arn = input;
            self
        }
        /// <p>The device name of the root device volume (for example, <code>/dev/sda1</code>).</p>
        pub fn root_device_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.root_device_name = Some(input.into());
            self
        }
        /// <p>The device name of the root device volume (for example, <code>/dev/sda1</code>).</p>
        pub fn set_root_device_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.root_device_name = input;
            self
        }
        /// <p>The root device type used by the AMI. The AMI can use an EBS volume or an instance store volume.</p>
        pub fn root_device_type(mut self, input: crate::model::DeviceType) -> Self {
            self.root_device_type = Some(input);
            self
        }
        /// <p>The root device type used by the AMI. The AMI can use an EBS volume or an instance store volume.</p>
        pub fn set_root_device_type(
            mut self,
            input: std::option::Option<crate::model::DeviceType>,
        ) -> Self {
            self.root_device_type = input;
            self
        }
        /// Appends an item to `security_groups`.
        ///
        /// To override the contents of this collection use [`set_security_groups`](Self::set_security_groups).
        ///
        /// <p>The security groups for the instance.</p>
        pub fn security_groups(mut self, input: crate::model::GroupIdentifier) -> Self {
            let mut v = self.security_groups.unwrap_or_default();
            v.push(input);
            self.security_groups = Some(v);
            self
        }
        /// <p>The security groups for the instance.</p>
        pub fn set_security_groups(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::GroupIdentifier>>,
        ) -> Self {
            self.security_groups = input;
            self
        }
        /// <p>Indicates whether source/destination checking is enabled.</p>
        pub fn source_dest_check(mut self, input: bool) -> Self {
            self.source_dest_check = Some(input);
            self
        }
        /// <p>Indicates whether source/destination checking is enabled.</p>
        pub fn set_source_dest_check(mut self, input: std::option::Option<bool>) -> Self {
            self.source_dest_check = input;
            self
        }
        /// <p>If the request is a Spot Instance request, the ID of the request.</p>
        pub fn spot_instance_request_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.spot_instance_request_id = Some(input.into());
            self
        }
        /// <p>If the request is a Spot Instance request, the ID of the request.</p>
        pub fn set_spot_instance_request_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.spot_instance_request_id = input;
            self
        }
        /// <p>Specifies whether enhanced networking with the Intel 82599 Virtual Function interface is enabled.</p>
        pub fn sriov_net_support(mut self, input: impl Into<std::string::String>) -> Self {
            self.sriov_net_support = Some(input.into());
            self
        }
        /// <p>Specifies whether enhanced networking with the Intel 82599 Virtual Function interface is enabled.</p>
        pub fn set_sriov_net_support(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.sriov_net_support = input;
            self
        }
        /// <p>The reason for the most recent state transition.</p>
        pub fn state_reason(mut self, input: crate::model::StateReason) -> Self {
            self.state_reason = Some(input);
            self
        }
        /// <p>The reason for the most recent state transition.</p>
        pub fn set_state_reason(
            mut self,
            input: std::option::Option<crate::model::StateReason>,
        ) -> Self {
            self.state_reason = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>Any tags assigned to the instance.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>Any tags assigned to the instance.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// <p>The virtualization type of the instance.</p>
        pub fn virtualization_type(mut self, input: crate::model::VirtualizationType) -> Self {
            self.virtualization_type = Some(input);
            self
        }
        /// <p>The virtualization type of the instance.</p>
        pub fn set_virtualization_type(
            mut self,
            input: std::option::Option<crate::model::VirtualizationType>,
        ) -> Self {
            self.virtualization_type = input;
            self
        }
        /// <p>The CPU options for the instance.</p>
        pub fn cpu_options(mut self, input: crate::model::CpuOptions) -> Self {
            self.cpu_options = Some(input);
            self
        }
        /// <p>The CPU options for the instance.</p>
        pub fn set_cpu_options(
            mut self,
            input: std::option::Option<crate::model::CpuOptions>,
        ) -> Self {
            self.cpu_options = input;
            self
        }
        /// <p>The ID of the Capacity Reservation.</p>
        pub fn capacity_reservation_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.capacity_reservation_id = Some(input.into());
            self
        }
        /// <p>The ID of the Capacity Reservation.</p>
        pub fn set_capacity_reservation_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.capacity_reservation_id = input;
            self
        }
        /// <p>Information about the Capacity Reservation targeting option.</p>
        pub fn capacity_reservation_specification(
            mut self,
            input: crate::model::CapacityReservationSpecificationResponse,
        ) -> Self {
            self.capacity_reservation_specification = Some(input);
            self
        }
        /// <p>Information about the Capacity Reservation targeting option.</p>
        pub fn set_capacity_reservation_specification(
            mut self,
            input: std::option::Option<crate::model::CapacityReservationSpecificationResponse>,
        ) -> Self {
            self.capacity_reservation_specification = input;
            self
        }
        /// <p>Indicates whether the instance is enabled for hibernation.</p>
        pub fn hibernation_options(mut self, input: crate::model::HibernationOptions) -> Self {
            self.hibernation_options = Some(input);
            self
        }
        /// <p>Indicates whether the instance is enabled for hibernation.</p>
        pub fn set_hibernation_options(
            mut self,
            input: std::option::Option<crate::model::HibernationOptions>,
        ) -> Self {
            self.hibernation_options = input;
            self
        }
        /// Appends an item to `licenses`.
        ///
        /// To override the contents of this collection use [`set_licenses`](Self::set_licenses).
        ///
        /// <p>The license configurations for the instance.</p>
        pub fn licenses(mut self, input: crate::model::LicenseConfiguration) -> Self {
            let mut v = self.licenses.unwrap_or_default();
            v.push(input);
            self.licenses = Some(v);
            self
        }
        /// <p>The license configurations for the instance.</p>
        pub fn set_licenses(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::LicenseConfiguration>>,
        ) -> Self {
            self.licenses = input;
            self
        }
        /// <p>The metadata options for the instance.</p>
        pub fn metadata_options(
            mut self,
            input: crate::model::InstanceMetadataOptionsResponse,
        ) -> Self {
            self.metadata_options = Some(input);
            self
        }
        /// <p>The metadata options for the instance.</p>
        pub fn set_metadata_options(
            mut self,
            input: std::option::Option<crate::model::InstanceMetadataOptionsResponse>,
        ) -> Self {
            self.metadata_options = input;
            self
        }
        /// <p>Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves.</p>
        pub fn enclave_options(mut self, input: crate::model::EnclaveOptions) -> Self {
            self.enclave_options = Some(input);
            self
        }
        /// <p>Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves.</p>
        pub fn set_enclave_options(
            mut self,
            input: std::option::Option<crate::model::EnclaveOptions>,
        ) -> Self {
            self.enclave_options = input;
            self
        }
        /// <p>The boot mode of the instance. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-boot.html">Boot modes</a> in the <i>Amazon EC2 User Guide</i>.</p>
        pub fn boot_mode(mut self, input: crate::model::BootModeValues) -> Self {
            self.boot_mode = Some(input);
            self
        }
        /// <p>The boot mode of the instance. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-boot.html">Boot modes</a> in the <i>Amazon EC2 User Guide</i>.</p>
        pub fn set_boot_mode(
            mut self,
            input: std::option::Option<crate::model::BootModeValues>,
        ) -> Self {
            self.boot_mode = input;
            self
        }
        /// <p>The platform details value for the instance. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/billing-info-fields.html">AMI billing information fields</a> in the <i>Amazon EC2 User Guide</i>.</p>
        pub fn platform_details(mut self, input: impl Into<std::string::String>) -> Self {
            self.platform_details = Some(input.into());
            self
        }
        /// <p>The platform details value for the instance. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/billing-info-fields.html">AMI billing information fields</a> in the <i>Amazon EC2 User Guide</i>.</p>
        pub fn set_platform_details(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.platform_details = input;
            self
        }
        /// <p>The usage operation value for the instance. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/billing-info-fields.html">AMI billing information fields</a> in the <i>Amazon EC2 User Guide</i>.</p>
        pub fn usage_operation(mut self, input: impl Into<std::string::String>) -> Self {
            self.usage_operation = Some(input.into());
            self
        }
        /// <p>The usage operation value for the instance. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/billing-info-fields.html">AMI billing information fields</a> in the <i>Amazon EC2 User Guide</i>.</p>
        pub fn set_usage_operation(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.usage_operation = input;
            self
        }
        /// <p>The time that the usage operation was last updated.</p>
        pub fn usage_operation_update_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.usage_operation_update_time = Some(input);
            self
        }
        /// <p>The time that the usage operation was last updated.</p>
        pub fn set_usage_operation_update_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.usage_operation_update_time = input;
            self
        }
        /// <p>The options for the instance hostname.</p>
        pub fn private_dns_name_options(
            mut self,
            input: crate::model::PrivateDnsNameOptionsResponse,
        ) -> Self {
            self.private_dns_name_options = Some(input);
            self
        }
        /// <p>The options for the instance hostname.</p>
        pub fn set_private_dns_name_options(
            mut self,
            input: std::option::Option<crate::model::PrivateDnsNameOptionsResponse>,
        ) -> Self {
            self.private_dns_name_options = input;
            self
        }
        /// <p>The IPv6 address assigned to the instance.</p>
        pub fn ipv6_address(mut self, input: impl Into<std::string::String>) -> Self {
            self.ipv6_address = Some(input.into());
            self
        }
        /// <p>The IPv6 address assigned to the instance.</p>
        pub fn set_ipv6_address(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.ipv6_address = input;
            self
        }
        /// <p>If the instance is configured for NitroTPM support, the value is <code>v2.0</code>. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/nitrotpm.html">NitroTPM</a> in the <i>Amazon EC2 User Guide</i>.</p>
        pub fn tpm_support(mut self, input: impl Into<std::string::String>) -> Self {
            self.tpm_support = Some(input.into());
            self
        }
        /// <p>If the instance is configured for NitroTPM support, the value is <code>v2.0</code>. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/nitrotpm.html">NitroTPM</a> in the <i>Amazon EC2 User Guide</i>.</p>
        pub fn set_tpm_support(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.tpm_support = input;
            self
        }
        /// <p>Provides information on the recovery and maintenance options of your instance.</p>
        pub fn maintenance_options(
            mut self,
            input: crate::model::InstanceMaintenanceOptions,
        ) -> Self {
            self.maintenance_options = Some(input);
            self
        }
        /// <p>Provides information on the recovery and maintenance options of your instance.</p>
        pub fn set_maintenance_options(
            mut self,
            input: std::option::Option<crate::model::InstanceMaintenanceOptions>,
        ) -> Self {
            self.maintenance_options = input;
            self
        }
        /// Consumes the builder and constructs a [`Instance`](crate::model::Instance).
        pub fn build(self) -> crate::model::Instance {
            crate::model::Instance {
                ami_launch_index: self.ami_launch_index,
                image_id: self.image_id,
                instance_id: self.instance_id,
                instance_type: self.instance_type,
                kernel_id: self.kernel_id,
                key_name: self.key_name,
                launch_time: self.launch_time,
                monitoring: self.monitoring,
                placement: self.placement,
                platform: self.platform,
                private_dns_name: self.private_dns_name,
                private_ip_address: self.private_ip_address,
                product_codes: self.product_codes,
                public_dns_name: self.public_dns_name,
                public_ip_address: self.public_ip_address,
                ramdisk_id: self.ramdisk_id,
                state: self.state,
                state_transition_reason: self.state_transition_reason,
                subnet_id: self.subnet_id,
                vpc_id: self.vpc_id,
                architecture: self.architecture,
                block_device_mappings: self.block_device_mappings,
                client_token: self.client_token,
                ebs_optimized: self.ebs_optimized,
                ena_support: self.ena_support,
                hypervisor: self.hypervisor,
                iam_instance_profile: self.iam_instance_profile,
                instance_lifecycle: self.instance_lifecycle,
                elastic_gpu_associations: self.elastic_gpu_associations,
                elastic_inference_accelerator_associations: self
                    .elastic_inference_accelerator_associations,
                network_interfaces: self.network_interfaces,
                outpost_arn: self.outpost_arn,
                root_device_name: self.root_device_name,
                root_device_type: self.root_device_type,
                security_groups: self.security_groups,
                source_dest_check: self.source_dest_check,
                spot_instance_request_id: self.spot_instance_request_id,
                sriov_net_support: self.sriov_net_support,
                state_reason: self.state_reason,
                tags: self.tags,
                virtualization_type: self.virtualization_type,
                cpu_options: self.cpu_options,
                capacity_reservation_id: self.capacity_reservation_id,
                capacity_reservation_specification: self.capacity_reservation_specification,
                hibernation_options: self.hibernation_options,
                licenses: self.licenses,
                metadata_options: self.metadata_options,
                enclave_options: self.enclave_options,
                boot_mode: self.boot_mode,
                platform_details: self.platform_details,
                usage_operation: self.usage_operation,
                usage_operation_update_time: self.usage_operation_update_time,
                private_dns_name_options: self.private_dns_name_options,
                ipv6_address: self.ipv6_address,
                tpm_support: self.tpm_support,
                maintenance_options: self.maintenance_options,
            }
        }
    }
}
impl Instance {
    /// Creates a new builder-style object to manufacture [`Instance`](crate::model::Instance).
    pub fn builder() -> crate::model::instance::Builder {
        crate::model::instance::Builder::default()
    }
}

/// <p>The maintenance options for the instance.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InstanceMaintenanceOptions {
    /// <p>Provides information on the current automatic recovery behavior of your instance.</p>
    #[doc(hidden)]
    pub auto_recovery: std::option::Option<crate::model::InstanceAutoRecoveryState>,
}
impl InstanceMaintenanceOptions {
    /// <p>Provides information on the current automatic recovery behavior of your instance.</p>
    pub fn auto_recovery(&self) -> std::option::Option<&crate::model::InstanceAutoRecoveryState> {
        self.auto_recovery.as_ref()
    }
}
/// See [`InstanceMaintenanceOptions`](crate::model::InstanceMaintenanceOptions).
pub mod instance_maintenance_options {

    /// A builder for [`InstanceMaintenanceOptions`](crate::model::InstanceMaintenanceOptions).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) auto_recovery: std::option::Option<crate::model::InstanceAutoRecoveryState>,
    }
    impl Builder {
        /// <p>Provides information on the current automatic recovery behavior of your instance.</p>
        pub fn auto_recovery(mut self, input: crate::model::InstanceAutoRecoveryState) -> Self {
            self.auto_recovery = Some(input);
            self
        }
        /// <p>Provides information on the current automatic recovery behavior of your instance.</p>
        pub fn set_auto_recovery(
            mut self,
            input: std::option::Option<crate::model::InstanceAutoRecoveryState>,
        ) -> Self {
            self.auto_recovery = input;
            self
        }
        /// Consumes the builder and constructs a [`InstanceMaintenanceOptions`](crate::model::InstanceMaintenanceOptions).
        pub fn build(self) -> crate::model::InstanceMaintenanceOptions {
            crate::model::InstanceMaintenanceOptions {
                auto_recovery: self.auto_recovery,
            }
        }
    }
}
impl InstanceMaintenanceOptions {
    /// Creates a new builder-style object to manufacture [`InstanceMaintenanceOptions`](crate::model::InstanceMaintenanceOptions).
    pub fn builder() -> crate::model::instance_maintenance_options::Builder {
        crate::model::instance_maintenance_options::Builder::default()
    }
}

/// When writing a match expression against `InstanceAutoRecoveryState`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let instanceautorecoverystate = unimplemented!();
/// match instanceautorecoverystate {
///     InstanceAutoRecoveryState::Default => { /* ... */ },
///     InstanceAutoRecoveryState::Disabled => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `instanceautorecoverystate` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `InstanceAutoRecoveryState::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `InstanceAutoRecoveryState::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `InstanceAutoRecoveryState::NewFeature` is defined.
/// Specifically, when `instanceautorecoverystate` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `InstanceAutoRecoveryState::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 InstanceAutoRecoveryState {
    #[allow(missing_docs)] // documentation missing in model
    Default,
    #[allow(missing_docs)] // documentation missing in model
    Disabled,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for InstanceAutoRecoveryState {
    fn from(s: &str) -> Self {
        match s {
            "default" => InstanceAutoRecoveryState::Default,
            "disabled" => InstanceAutoRecoveryState::Disabled,
            other => InstanceAutoRecoveryState::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for InstanceAutoRecoveryState {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(InstanceAutoRecoveryState::from(s))
    }
}
impl InstanceAutoRecoveryState {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            InstanceAutoRecoveryState::Default => "default",
            InstanceAutoRecoveryState::Disabled => "disabled",
            InstanceAutoRecoveryState::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["default", "disabled"]
    }
}
impl AsRef<str> for InstanceAutoRecoveryState {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes the options for instance hostnames.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct PrivateDnsNameOptionsResponse {
    /// <p>The type of hostname to assign to an instance.</p>
    #[doc(hidden)]
    pub hostname_type: std::option::Option<crate::model::HostnameType>,
    /// <p>Indicates whether to respond to DNS queries for instance hostnames with DNS A records.</p>
    #[doc(hidden)]
    pub enable_resource_name_dns_a_record: std::option::Option<bool>,
    /// <p>Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records.</p>
    #[doc(hidden)]
    pub enable_resource_name_dns_aaaa_record: std::option::Option<bool>,
}
impl PrivateDnsNameOptionsResponse {
    /// <p>The type of hostname to assign to an instance.</p>
    pub fn hostname_type(&self) -> std::option::Option<&crate::model::HostnameType> {
        self.hostname_type.as_ref()
    }
    /// <p>Indicates whether to respond to DNS queries for instance hostnames with DNS A records.</p>
    pub fn enable_resource_name_dns_a_record(&self) -> std::option::Option<bool> {
        self.enable_resource_name_dns_a_record
    }
    /// <p>Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records.</p>
    pub fn enable_resource_name_dns_aaaa_record(&self) -> std::option::Option<bool> {
        self.enable_resource_name_dns_aaaa_record
    }
}
/// See [`PrivateDnsNameOptionsResponse`](crate::model::PrivateDnsNameOptionsResponse).
pub mod private_dns_name_options_response {

    /// A builder for [`PrivateDnsNameOptionsResponse`](crate::model::PrivateDnsNameOptionsResponse).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) hostname_type: std::option::Option<crate::model::HostnameType>,
        pub(crate) enable_resource_name_dns_a_record: std::option::Option<bool>,
        pub(crate) enable_resource_name_dns_aaaa_record: std::option::Option<bool>,
    }
    impl Builder {
        /// <p>The type of hostname to assign to an instance.</p>
        pub fn hostname_type(mut self, input: crate::model::HostnameType) -> Self {
            self.hostname_type = Some(input);
            self
        }
        /// <p>The type of hostname to assign to an instance.</p>
        pub fn set_hostname_type(
            mut self,
            input: std::option::Option<crate::model::HostnameType>,
        ) -> Self {
            self.hostname_type = input;
            self
        }
        /// <p>Indicates whether to respond to DNS queries for instance hostnames with DNS A records.</p>
        pub fn enable_resource_name_dns_a_record(mut self, input: bool) -> Self {
            self.enable_resource_name_dns_a_record = Some(input);
            self
        }
        /// <p>Indicates whether to respond to DNS queries for instance hostnames with DNS A records.</p>
        pub fn set_enable_resource_name_dns_a_record(
            mut self,
            input: std::option::Option<bool>,
        ) -> Self {
            self.enable_resource_name_dns_a_record = input;
            self
        }
        /// <p>Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records.</p>
        pub fn enable_resource_name_dns_aaaa_record(mut self, input: bool) -> Self {
            self.enable_resource_name_dns_aaaa_record = Some(input);
            self
        }
        /// <p>Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records.</p>
        pub fn set_enable_resource_name_dns_aaaa_record(
            mut self,
            input: std::option::Option<bool>,
        ) -> Self {
            self.enable_resource_name_dns_aaaa_record = input;
            self
        }
        /// Consumes the builder and constructs a [`PrivateDnsNameOptionsResponse`](crate::model::PrivateDnsNameOptionsResponse).
        pub fn build(self) -> crate::model::PrivateDnsNameOptionsResponse {
            crate::model::PrivateDnsNameOptionsResponse {
                hostname_type: self.hostname_type,
                enable_resource_name_dns_a_record: self.enable_resource_name_dns_a_record,
                enable_resource_name_dns_aaaa_record: self.enable_resource_name_dns_aaaa_record,
            }
        }
    }
}
impl PrivateDnsNameOptionsResponse {
    /// Creates a new builder-style object to manufacture [`PrivateDnsNameOptionsResponse`](crate::model::PrivateDnsNameOptionsResponse).
    pub fn builder() -> crate::model::private_dns_name_options_response::Builder {
        crate::model::private_dns_name_options_response::Builder::default()
    }
}

/// When writing a match expression against `HostnameType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let hostnametype = unimplemented!();
/// match hostnametype {
///     HostnameType::IpName => { /* ... */ },
///     HostnameType::ResourceName => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `hostnametype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `HostnameType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `HostnameType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `HostnameType::NewFeature` is defined.
/// Specifically, when `hostnametype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `HostnameType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 HostnameType {
    #[allow(missing_docs)] // documentation missing in model
    IpName,
    #[allow(missing_docs)] // documentation missing in model
    ResourceName,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for HostnameType {
    fn from(s: &str) -> Self {
        match s {
            "ip-name" => HostnameType::IpName,
            "resource-name" => HostnameType::ResourceName,
            other => HostnameType::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for HostnameType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(HostnameType::from(s))
    }
}
impl HostnameType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            HostnameType::IpName => "ip-name",
            HostnameType::ResourceName => "resource-name",
            HostnameType::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["ip-name", "resource-name"]
    }
}
impl AsRef<str> for HostnameType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `BootModeValues`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let bootmodevalues = unimplemented!();
/// match bootmodevalues {
///     BootModeValues::LegacyBios => { /* ... */ },
///     BootModeValues::Uefi => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `bootmodevalues` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `BootModeValues::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `BootModeValues::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `BootModeValues::NewFeature` is defined.
/// Specifically, when `bootmodevalues` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `BootModeValues::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 BootModeValues {
    #[allow(missing_docs)] // documentation missing in model
    LegacyBios,
    #[allow(missing_docs)] // documentation missing in model
    Uefi,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for BootModeValues {
    fn from(s: &str) -> Self {
        match s {
            "legacy-bios" => BootModeValues::LegacyBios,
            "uefi" => BootModeValues::Uefi,
            other => BootModeValues::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for BootModeValues {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(BootModeValues::from(s))
    }
}
impl BootModeValues {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            BootModeValues::LegacyBios => "legacy-bios",
            BootModeValues::Uefi => "uefi",
            BootModeValues::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["legacy-bios", "uefi"]
    }
}
impl AsRef<str> for BootModeValues {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct EnclaveOptions {
    /// <p>If this parameter is set to <code>true</code>, the instance is enabled for Amazon Web Services Nitro Enclaves; otherwise, it is not enabled for Amazon Web Services Nitro Enclaves.</p>
    #[doc(hidden)]
    pub enabled: std::option::Option<bool>,
}
impl EnclaveOptions {
    /// <p>If this parameter is set to <code>true</code>, the instance is enabled for Amazon Web Services Nitro Enclaves; otherwise, it is not enabled for Amazon Web Services Nitro Enclaves.</p>
    pub fn enabled(&self) -> std::option::Option<bool> {
        self.enabled
    }
}
/// See [`EnclaveOptions`](crate::model::EnclaveOptions).
pub mod enclave_options {

    /// A builder for [`EnclaveOptions`](crate::model::EnclaveOptions).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) enabled: std::option::Option<bool>,
    }
    impl Builder {
        /// <p>If this parameter is set to <code>true</code>, the instance is enabled for Amazon Web Services Nitro Enclaves; otherwise, it is not enabled for Amazon Web Services Nitro Enclaves.</p>
        pub fn enabled(mut self, input: bool) -> Self {
            self.enabled = Some(input);
            self
        }
        /// <p>If this parameter is set to <code>true</code>, the instance is enabled for Amazon Web Services Nitro Enclaves; otherwise, it is not enabled for Amazon Web Services Nitro Enclaves.</p>
        pub fn set_enabled(mut self, input: std::option::Option<bool>) -> Self {
            self.enabled = input;
            self
        }
        /// Consumes the builder and constructs a [`EnclaveOptions`](crate::model::EnclaveOptions).
        pub fn build(self) -> crate::model::EnclaveOptions {
            crate::model::EnclaveOptions {
                enabled: self.enabled,
            }
        }
    }
}
impl EnclaveOptions {
    /// Creates a new builder-style object to manufacture [`EnclaveOptions`](crate::model::EnclaveOptions).
    pub fn builder() -> crate::model::enclave_options::Builder {
        crate::model::enclave_options::Builder::default()
    }
}

/// <p>The metadata options for the instance.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InstanceMetadataOptionsResponse {
    /// <p>The state of the metadata option changes.</p>
    /// <p> <code>pending</code> - The metadata options are being updated and the instance is not ready to process metadata traffic with the new selection.</p>
    /// <p> <code>applied</code> - The metadata options have been successfully applied on the instance.</p>
    #[doc(hidden)]
    pub state: std::option::Option<crate::model::InstanceMetadataOptionsState>,
    /// <p>IMDSv2 uses token-backed sessions. Indicates whether the use of HTTP tokens is <code>optional</code> (in other words, indicates whether the use of IMDSv2 is <code>optional</code>) or <code>required</code> (in other words, indicates whether the use of IMDSv2 is <code>required</code>).</p>
    /// <ul>
    /// <li> <p> <code>optional</code> - When IMDSv2 is optional, you can choose to retrieve instance metadata with or without a session token in your request. If you retrieve the IAM role credentials without a token, the IMDSv1 role credentials are returned. If you retrieve the IAM role credentials using a valid session token, the IMDSv2 role credentials are returned.</p> </li>
    /// <li> <p> <code>required</code> - When IMDSv2 is required, you must send a session token with any instance metadata retrieval requests. In this state, retrieving the IAM role credentials always returns IMDSv2 credentials; IMDSv1 credentials are not available.</p> </li>
    /// </ul>
    /// <p>Default: <code>optional</code> </p>
    #[doc(hidden)]
    pub http_tokens: std::option::Option<crate::model::HttpTokensState>,
    /// <p>The desired HTTP PUT response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel.</p>
    /// <p>Default: 1</p>
    /// <p>Possible values: Integers from 1 to 64</p>
    #[doc(hidden)]
    pub http_put_response_hop_limit: std::option::Option<i32>,
    /// <p>Indicates whether the HTTP metadata endpoint on your instances is enabled or disabled.</p>
    /// <p>If the value is <code>disabled</code>, you cannot access your instance metadata.</p>
    #[doc(hidden)]
    pub http_endpoint: std::option::Option<crate::model::InstanceMetadataEndpointState>,
    /// <p>Indicates whether the IPv6 endpoint for the instance metadata service is enabled or disabled.</p>
    #[doc(hidden)]
    pub http_protocol_ipv6: std::option::Option<crate::model::InstanceMetadataProtocolState>,
    /// <p>Indicates whether access to instance tags from the instance metadata is enabled or disabled. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html#work-with-tags-in-IMDS">Work with instance tags using the instance metadata</a>.</p>
    #[doc(hidden)]
    pub instance_metadata_tags: std::option::Option<crate::model::InstanceMetadataTagsState>,
}
impl InstanceMetadataOptionsResponse {
    /// <p>The state of the metadata option changes.</p>
    /// <p> <code>pending</code> - The metadata options are being updated and the instance is not ready to process metadata traffic with the new selection.</p>
    /// <p> <code>applied</code> - The metadata options have been successfully applied on the instance.</p>
    pub fn state(&self) -> std::option::Option<&crate::model::InstanceMetadataOptionsState> {
        self.state.as_ref()
    }
    /// <p>IMDSv2 uses token-backed sessions. Indicates whether the use of HTTP tokens is <code>optional</code> (in other words, indicates whether the use of IMDSv2 is <code>optional</code>) or <code>required</code> (in other words, indicates whether the use of IMDSv2 is <code>required</code>).</p>
    /// <ul>
    /// <li> <p> <code>optional</code> - When IMDSv2 is optional, you can choose to retrieve instance metadata with or without a session token in your request. If you retrieve the IAM role credentials without a token, the IMDSv1 role credentials are returned. If you retrieve the IAM role credentials using a valid session token, the IMDSv2 role credentials are returned.</p> </li>
    /// <li> <p> <code>required</code> - When IMDSv2 is required, you must send a session token with any instance metadata retrieval requests. In this state, retrieving the IAM role credentials always returns IMDSv2 credentials; IMDSv1 credentials are not available.</p> </li>
    /// </ul>
    /// <p>Default: <code>optional</code> </p>
    pub fn http_tokens(&self) -> std::option::Option<&crate::model::HttpTokensState> {
        self.http_tokens.as_ref()
    }
    /// <p>The desired HTTP PUT response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel.</p>
    /// <p>Default: 1</p>
    /// <p>Possible values: Integers from 1 to 64</p>
    pub fn http_put_response_hop_limit(&self) -> std::option::Option<i32> {
        self.http_put_response_hop_limit
    }
    /// <p>Indicates whether the HTTP metadata endpoint on your instances is enabled or disabled.</p>
    /// <p>If the value is <code>disabled</code>, you cannot access your instance metadata.</p>
    pub fn http_endpoint(
        &self,
    ) -> std::option::Option<&crate::model::InstanceMetadataEndpointState> {
        self.http_endpoint.as_ref()
    }
    /// <p>Indicates whether the IPv6 endpoint for the instance metadata service is enabled or disabled.</p>
    pub fn http_protocol_ipv6(
        &self,
    ) -> std::option::Option<&crate::model::InstanceMetadataProtocolState> {
        self.http_protocol_ipv6.as_ref()
    }
    /// <p>Indicates whether access to instance tags from the instance metadata is enabled or disabled. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html#work-with-tags-in-IMDS">Work with instance tags using the instance metadata</a>.</p>
    pub fn instance_metadata_tags(
        &self,
    ) -> std::option::Option<&crate::model::InstanceMetadataTagsState> {
        self.instance_metadata_tags.as_ref()
    }
}
/// See [`InstanceMetadataOptionsResponse`](crate::model::InstanceMetadataOptionsResponse).
pub mod instance_metadata_options_response {

    /// A builder for [`InstanceMetadataOptionsResponse`](crate::model::InstanceMetadataOptionsResponse).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) state: std::option::Option<crate::model::InstanceMetadataOptionsState>,
        pub(crate) http_tokens: std::option::Option<crate::model::HttpTokensState>,
        pub(crate) http_put_response_hop_limit: std::option::Option<i32>,
        pub(crate) http_endpoint: std::option::Option<crate::model::InstanceMetadataEndpointState>,
        pub(crate) http_protocol_ipv6:
            std::option::Option<crate::model::InstanceMetadataProtocolState>,
        pub(crate) instance_metadata_tags:
            std::option::Option<crate::model::InstanceMetadataTagsState>,
    }
    impl Builder {
        /// <p>The state of the metadata option changes.</p>
        /// <p> <code>pending</code> - The metadata options are being updated and the instance is not ready to process metadata traffic with the new selection.</p>
        /// <p> <code>applied</code> - The metadata options have been successfully applied on the instance.</p>
        pub fn state(mut self, input: crate::model::InstanceMetadataOptionsState) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>The state of the metadata option changes.</p>
        /// <p> <code>pending</code> - The metadata options are being updated and the instance is not ready to process metadata traffic with the new selection.</p>
        /// <p> <code>applied</code> - The metadata options have been successfully applied on the instance.</p>
        pub fn set_state(
            mut self,
            input: std::option::Option<crate::model::InstanceMetadataOptionsState>,
        ) -> Self {
            self.state = input;
            self
        }
        /// <p>IMDSv2 uses token-backed sessions. Indicates whether the use of HTTP tokens is <code>optional</code> (in other words, indicates whether the use of IMDSv2 is <code>optional</code>) or <code>required</code> (in other words, indicates whether the use of IMDSv2 is <code>required</code>).</p>
        /// <ul>
        /// <li> <p> <code>optional</code> - When IMDSv2 is optional, you can choose to retrieve instance metadata with or without a session token in your request. If you retrieve the IAM role credentials without a token, the IMDSv1 role credentials are returned. If you retrieve the IAM role credentials using a valid session token, the IMDSv2 role credentials are returned.</p> </li>
        /// <li> <p> <code>required</code> - When IMDSv2 is required, you must send a session token with any instance metadata retrieval requests. In this state, retrieving the IAM role credentials always returns IMDSv2 credentials; IMDSv1 credentials are not available.</p> </li>
        /// </ul>
        /// <p>Default: <code>optional</code> </p>
        pub fn http_tokens(mut self, input: crate::model::HttpTokensState) -> Self {
            self.http_tokens = Some(input);
            self
        }
        /// <p>IMDSv2 uses token-backed sessions. Indicates whether the use of HTTP tokens is <code>optional</code> (in other words, indicates whether the use of IMDSv2 is <code>optional</code>) or <code>required</code> (in other words, indicates whether the use of IMDSv2 is <code>required</code>).</p>
        /// <ul>
        /// <li> <p> <code>optional</code> - When IMDSv2 is optional, you can choose to retrieve instance metadata with or without a session token in your request. If you retrieve the IAM role credentials without a token, the IMDSv1 role credentials are returned. If you retrieve the IAM role credentials using a valid session token, the IMDSv2 role credentials are returned.</p> </li>
        /// <li> <p> <code>required</code> - When IMDSv2 is required, you must send a session token with any instance metadata retrieval requests. In this state, retrieving the IAM role credentials always returns IMDSv2 credentials; IMDSv1 credentials are not available.</p> </li>
        /// </ul>
        /// <p>Default: <code>optional</code> </p>
        pub fn set_http_tokens(
            mut self,
            input: std::option::Option<crate::model::HttpTokensState>,
        ) -> Self {
            self.http_tokens = input;
            self
        }
        /// <p>The desired HTTP PUT response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel.</p>
        /// <p>Default: 1</p>
        /// <p>Possible values: Integers from 1 to 64</p>
        pub fn http_put_response_hop_limit(mut self, input: i32) -> Self {
            self.http_put_response_hop_limit = Some(input);
            self
        }
        /// <p>The desired HTTP PUT response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel.</p>
        /// <p>Default: 1</p>
        /// <p>Possible values: Integers from 1 to 64</p>
        pub fn set_http_put_response_hop_limit(mut self, input: std::option::Option<i32>) -> Self {
            self.http_put_response_hop_limit = input;
            self
        }
        /// <p>Indicates whether the HTTP metadata endpoint on your instances is enabled or disabled.</p>
        /// <p>If the value is <code>disabled</code>, you cannot access your instance metadata.</p>
        pub fn http_endpoint(mut self, input: crate::model::InstanceMetadataEndpointState) -> Self {
            self.http_endpoint = Some(input);
            self
        }
        /// <p>Indicates whether the HTTP metadata endpoint on your instances is enabled or disabled.</p>
        /// <p>If the value is <code>disabled</code>, you cannot access your instance metadata.</p>
        pub fn set_http_endpoint(
            mut self,
            input: std::option::Option<crate::model::InstanceMetadataEndpointState>,
        ) -> Self {
            self.http_endpoint = input;
            self
        }
        /// <p>Indicates whether the IPv6 endpoint for the instance metadata service is enabled or disabled.</p>
        pub fn http_protocol_ipv6(
            mut self,
            input: crate::model::InstanceMetadataProtocolState,
        ) -> Self {
            self.http_protocol_ipv6 = Some(input);
            self
        }
        /// <p>Indicates whether the IPv6 endpoint for the instance metadata service is enabled or disabled.</p>
        pub fn set_http_protocol_ipv6(
            mut self,
            input: std::option::Option<crate::model::InstanceMetadataProtocolState>,
        ) -> Self {
            self.http_protocol_ipv6 = input;
            self
        }
        /// <p>Indicates whether access to instance tags from the instance metadata is enabled or disabled. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html#work-with-tags-in-IMDS">Work with instance tags using the instance metadata</a>.</p>
        pub fn instance_metadata_tags(
            mut self,
            input: crate::model::InstanceMetadataTagsState,
        ) -> Self {
            self.instance_metadata_tags = Some(input);
            self
        }
        /// <p>Indicates whether access to instance tags from the instance metadata is enabled or disabled. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html#work-with-tags-in-IMDS">Work with instance tags using the instance metadata</a>.</p>
        pub fn set_instance_metadata_tags(
            mut self,
            input: std::option::Option<crate::model::InstanceMetadataTagsState>,
        ) -> Self {
            self.instance_metadata_tags = input;
            self
        }
        /// Consumes the builder and constructs a [`InstanceMetadataOptionsResponse`](crate::model::InstanceMetadataOptionsResponse).
        pub fn build(self) -> crate::model::InstanceMetadataOptionsResponse {
            crate::model::InstanceMetadataOptionsResponse {
                state: self.state,
                http_tokens: self.http_tokens,
                http_put_response_hop_limit: self.http_put_response_hop_limit,
                http_endpoint: self.http_endpoint,
                http_protocol_ipv6: self.http_protocol_ipv6,
                instance_metadata_tags: self.instance_metadata_tags,
            }
        }
    }
}
impl InstanceMetadataOptionsResponse {
    /// Creates a new builder-style object to manufacture [`InstanceMetadataOptionsResponse`](crate::model::InstanceMetadataOptionsResponse).
    pub fn builder() -> crate::model::instance_metadata_options_response::Builder {
        crate::model::instance_metadata_options_response::Builder::default()
    }
}

/// When writing a match expression against `InstanceMetadataTagsState`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let instancemetadatatagsstate = unimplemented!();
/// match instancemetadatatagsstate {
///     InstanceMetadataTagsState::Disabled => { /* ... */ },
///     InstanceMetadataTagsState::Enabled => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `instancemetadatatagsstate` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `InstanceMetadataTagsState::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `InstanceMetadataTagsState::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `InstanceMetadataTagsState::NewFeature` is defined.
/// Specifically, when `instancemetadatatagsstate` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `InstanceMetadataTagsState::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 InstanceMetadataTagsState {
    #[allow(missing_docs)] // documentation missing in model
    Disabled,
    #[allow(missing_docs)] // documentation missing in model
    Enabled,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for InstanceMetadataTagsState {
    fn from(s: &str) -> Self {
        match s {
            "disabled" => InstanceMetadataTagsState::Disabled,
            "enabled" => InstanceMetadataTagsState::Enabled,
            other => InstanceMetadataTagsState::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for InstanceMetadataTagsState {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(InstanceMetadataTagsState::from(s))
    }
}
impl InstanceMetadataTagsState {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            InstanceMetadataTagsState::Disabled => "disabled",
            InstanceMetadataTagsState::Enabled => "enabled",
            InstanceMetadataTagsState::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["disabled", "enabled"]
    }
}
impl AsRef<str> for InstanceMetadataTagsState {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `InstanceMetadataProtocolState`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let instancemetadataprotocolstate = unimplemented!();
/// match instancemetadataprotocolstate {
///     InstanceMetadataProtocolState::Disabled => { /* ... */ },
///     InstanceMetadataProtocolState::Enabled => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `instancemetadataprotocolstate` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `InstanceMetadataProtocolState::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `InstanceMetadataProtocolState::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `InstanceMetadataProtocolState::NewFeature` is defined.
/// Specifically, when `instancemetadataprotocolstate` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `InstanceMetadataProtocolState::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 InstanceMetadataProtocolState {
    #[allow(missing_docs)] // documentation missing in model
    Disabled,
    #[allow(missing_docs)] // documentation missing in model
    Enabled,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for InstanceMetadataProtocolState {
    fn from(s: &str) -> Self {
        match s {
            "disabled" => InstanceMetadataProtocolState::Disabled,
            "enabled" => InstanceMetadataProtocolState::Enabled,
            other => InstanceMetadataProtocolState::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for InstanceMetadataProtocolState {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(InstanceMetadataProtocolState::from(s))
    }
}
impl InstanceMetadataProtocolState {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            InstanceMetadataProtocolState::Disabled => "disabled",
            InstanceMetadataProtocolState::Enabled => "enabled",
            InstanceMetadataProtocolState::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["disabled", "enabled"]
    }
}
impl AsRef<str> for InstanceMetadataProtocolState {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `InstanceMetadataEndpointState`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let instancemetadataendpointstate = unimplemented!();
/// match instancemetadataendpointstate {
///     InstanceMetadataEndpointState::Disabled => { /* ... */ },
///     InstanceMetadataEndpointState::Enabled => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `instancemetadataendpointstate` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `InstanceMetadataEndpointState::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `InstanceMetadataEndpointState::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `InstanceMetadataEndpointState::NewFeature` is defined.
/// Specifically, when `instancemetadataendpointstate` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `InstanceMetadataEndpointState::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 InstanceMetadataEndpointState {
    #[allow(missing_docs)] // documentation missing in model
    Disabled,
    #[allow(missing_docs)] // documentation missing in model
    Enabled,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for InstanceMetadataEndpointState {
    fn from(s: &str) -> Self {
        match s {
            "disabled" => InstanceMetadataEndpointState::Disabled,
            "enabled" => InstanceMetadataEndpointState::Enabled,
            other => InstanceMetadataEndpointState::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for InstanceMetadataEndpointState {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(InstanceMetadataEndpointState::from(s))
    }
}
impl InstanceMetadataEndpointState {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            InstanceMetadataEndpointState::Disabled => "disabled",
            InstanceMetadataEndpointState::Enabled => "enabled",
            InstanceMetadataEndpointState::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["disabled", "enabled"]
    }
}
impl AsRef<str> for InstanceMetadataEndpointState {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `HttpTokensState`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let httptokensstate = unimplemented!();
/// match httptokensstate {
///     HttpTokensState::Optional => { /* ... */ },
///     HttpTokensState::Required => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `httptokensstate` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `HttpTokensState::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `HttpTokensState::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `HttpTokensState::NewFeature` is defined.
/// Specifically, when `httptokensstate` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `HttpTokensState::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 HttpTokensState {
    #[allow(missing_docs)] // documentation missing in model
    Optional,
    #[allow(missing_docs)] // documentation missing in model
    Required,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for HttpTokensState {
    fn from(s: &str) -> Self {
        match s {
            "optional" => HttpTokensState::Optional,
            "required" => HttpTokensState::Required,
            other => HttpTokensState::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for HttpTokensState {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(HttpTokensState::from(s))
    }
}
impl HttpTokensState {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            HttpTokensState::Optional => "optional",
            HttpTokensState::Required => "required",
            HttpTokensState::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["optional", "required"]
    }
}
impl AsRef<str> for HttpTokensState {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `InstanceMetadataOptionsState`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let instancemetadataoptionsstate = unimplemented!();
/// match instancemetadataoptionsstate {
///     InstanceMetadataOptionsState::Applied => { /* ... */ },
///     InstanceMetadataOptionsState::Pending => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `instancemetadataoptionsstate` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `InstanceMetadataOptionsState::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `InstanceMetadataOptionsState::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `InstanceMetadataOptionsState::NewFeature` is defined.
/// Specifically, when `instancemetadataoptionsstate` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `InstanceMetadataOptionsState::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 InstanceMetadataOptionsState {
    #[allow(missing_docs)] // documentation missing in model
    Applied,
    #[allow(missing_docs)] // documentation missing in model
    Pending,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for InstanceMetadataOptionsState {
    fn from(s: &str) -> Self {
        match s {
            "applied" => InstanceMetadataOptionsState::Applied,
            "pending" => InstanceMetadataOptionsState::Pending,
            other => InstanceMetadataOptionsState::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for InstanceMetadataOptionsState {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(InstanceMetadataOptionsState::from(s))
    }
}
impl InstanceMetadataOptionsState {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            InstanceMetadataOptionsState::Applied => "applied",
            InstanceMetadataOptionsState::Pending => "pending",
            InstanceMetadataOptionsState::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["applied", "pending"]
    }
}
impl AsRef<str> for InstanceMetadataOptionsState {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes a license configuration.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LicenseConfiguration {
    /// <p>The Amazon Resource Name (ARN) of the license configuration.</p>
    #[doc(hidden)]
    pub license_configuration_arn: std::option::Option<std::string::String>,
}
impl LicenseConfiguration {
    /// <p>The Amazon Resource Name (ARN) of the license configuration.</p>
    pub fn license_configuration_arn(&self) -> std::option::Option<&str> {
        self.license_configuration_arn.as_deref()
    }
}
/// See [`LicenseConfiguration`](crate::model::LicenseConfiguration).
pub mod license_configuration {

    /// A builder for [`LicenseConfiguration`](crate::model::LicenseConfiguration).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) license_configuration_arn: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The Amazon Resource Name (ARN) of the license configuration.</p>
        pub fn license_configuration_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.license_configuration_arn = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the license configuration.</p>
        pub fn set_license_configuration_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.license_configuration_arn = input;
            self
        }
        /// Consumes the builder and constructs a [`LicenseConfiguration`](crate::model::LicenseConfiguration).
        pub fn build(self) -> crate::model::LicenseConfiguration {
            crate::model::LicenseConfiguration {
                license_configuration_arn: self.license_configuration_arn,
            }
        }
    }
}
impl LicenseConfiguration {
    /// Creates a new builder-style object to manufacture [`LicenseConfiguration`](crate::model::LicenseConfiguration).
    pub fn builder() -> crate::model::license_configuration::Builder {
        crate::model::license_configuration::Builder::default()
    }
}

/// <p>Indicates whether your instance is configured for hibernation. This parameter is valid only if the instance meets the <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html#hibernating-prerequisites">hibernation prerequisites</a>. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html">Hibernate your instance</a> in the <i>Amazon EC2 User Guide</i>.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct HibernationOptions {
    /// <p>If this parameter is set to <code>true</code>, your instance is enabled for hibernation; otherwise, it is not enabled for hibernation.</p>
    #[doc(hidden)]
    pub configured: std::option::Option<bool>,
}
impl HibernationOptions {
    /// <p>If this parameter is set to <code>true</code>, your instance is enabled for hibernation; otherwise, it is not enabled for hibernation.</p>
    pub fn configured(&self) -> std::option::Option<bool> {
        self.configured
    }
}
/// See [`HibernationOptions`](crate::model::HibernationOptions).
pub mod hibernation_options {

    /// A builder for [`HibernationOptions`](crate::model::HibernationOptions).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) configured: std::option::Option<bool>,
    }
    impl Builder {
        /// <p>If this parameter is set to <code>true</code>, your instance is enabled for hibernation; otherwise, it is not enabled for hibernation.</p>
        pub fn configured(mut self, input: bool) -> Self {
            self.configured = Some(input);
            self
        }
        /// <p>If this parameter is set to <code>true</code>, your instance is enabled for hibernation; otherwise, it is not enabled for hibernation.</p>
        pub fn set_configured(mut self, input: std::option::Option<bool>) -> Self {
            self.configured = input;
            self
        }
        /// Consumes the builder and constructs a [`HibernationOptions`](crate::model::HibernationOptions).
        pub fn build(self) -> crate::model::HibernationOptions {
            crate::model::HibernationOptions {
                configured: self.configured,
            }
        }
    }
}
impl HibernationOptions {
    /// Creates a new builder-style object to manufacture [`HibernationOptions`](crate::model::HibernationOptions).
    pub fn builder() -> crate::model::hibernation_options::Builder {
        crate::model::hibernation_options::Builder::default()
    }
}

/// <p>Describes the instance's Capacity Reservation targeting preferences. The action returns the <code>capacityReservationPreference</code> response element if the instance is configured to run in On-Demand capacity, or if it is configured in run in any <code>open</code> Capacity Reservation that has matching attributes (instance type, platform, Availability Zone). The action returns the <code>capacityReservationTarget</code> response element if the instance explicily targets a specific Capacity Reservation or Capacity Reservation group.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CapacityReservationSpecificationResponse {
    /// <p>Describes the instance's Capacity Reservation preferences. Possible preferences include:</p>
    /// <ul>
    /// <li> <p> <code>open</code> - The instance can run in any <code>open</code> Capacity Reservation that has matching attributes (instance type, platform, Availability Zone).</p> </li>
    /// <li> <p> <code>none</code> - The instance avoids running in a Capacity Reservation even if one is available. The instance runs in On-Demand capacity.</p> </li>
    /// </ul>
    #[doc(hidden)]
    pub capacity_reservation_preference:
        std::option::Option<crate::model::CapacityReservationPreference>,
    /// <p>Information about the targeted Capacity Reservation or Capacity Reservation group.</p>
    #[doc(hidden)]
    pub capacity_reservation_target:
        std::option::Option<crate::model::CapacityReservationTargetResponse>,
}
impl CapacityReservationSpecificationResponse {
    /// <p>Describes the instance's Capacity Reservation preferences. Possible preferences include:</p>
    /// <ul>
    /// <li> <p> <code>open</code> - The instance can run in any <code>open</code> Capacity Reservation that has matching attributes (instance type, platform, Availability Zone).</p> </li>
    /// <li> <p> <code>none</code> - The instance avoids running in a Capacity Reservation even if one is available. The instance runs in On-Demand capacity.</p> </li>
    /// </ul>
    pub fn capacity_reservation_preference(
        &self,
    ) -> std::option::Option<&crate::model::CapacityReservationPreference> {
        self.capacity_reservation_preference.as_ref()
    }
    /// <p>Information about the targeted Capacity Reservation or Capacity Reservation group.</p>
    pub fn capacity_reservation_target(
        &self,
    ) -> std::option::Option<&crate::model::CapacityReservationTargetResponse> {
        self.capacity_reservation_target.as_ref()
    }
}
/// See [`CapacityReservationSpecificationResponse`](crate::model::CapacityReservationSpecificationResponse).
pub mod capacity_reservation_specification_response {

    /// A builder for [`CapacityReservationSpecificationResponse`](crate::model::CapacityReservationSpecificationResponse).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) capacity_reservation_preference:
            std::option::Option<crate::model::CapacityReservationPreference>,
        pub(crate) capacity_reservation_target:
            std::option::Option<crate::model::CapacityReservationTargetResponse>,
    }
    impl Builder {
        /// <p>Describes the instance's Capacity Reservation preferences. Possible preferences include:</p>
        /// <ul>
        /// <li> <p> <code>open</code> - The instance can run in any <code>open</code> Capacity Reservation that has matching attributes (instance type, platform, Availability Zone).</p> </li>
        /// <li> <p> <code>none</code> - The instance avoids running in a Capacity Reservation even if one is available. The instance runs in On-Demand capacity.</p> </li>
        /// </ul>
        pub fn capacity_reservation_preference(
            mut self,
            input: crate::model::CapacityReservationPreference,
        ) -> Self {
            self.capacity_reservation_preference = Some(input);
            self
        }
        /// <p>Describes the instance's Capacity Reservation preferences. Possible preferences include:</p>
        /// <ul>
        /// <li> <p> <code>open</code> - The instance can run in any <code>open</code> Capacity Reservation that has matching attributes (instance type, platform, Availability Zone).</p> </li>
        /// <li> <p> <code>none</code> - The instance avoids running in a Capacity Reservation even if one is available. The instance runs in On-Demand capacity.</p> </li>
        /// </ul>
        pub fn set_capacity_reservation_preference(
            mut self,
            input: std::option::Option<crate::model::CapacityReservationPreference>,
        ) -> Self {
            self.capacity_reservation_preference = input;
            self
        }
        /// <p>Information about the targeted Capacity Reservation or Capacity Reservation group.</p>
        pub fn capacity_reservation_target(
            mut self,
            input: crate::model::CapacityReservationTargetResponse,
        ) -> Self {
            self.capacity_reservation_target = Some(input);
            self
        }
        /// <p>Information about the targeted Capacity Reservation or Capacity Reservation group.</p>
        pub fn set_capacity_reservation_target(
            mut self,
            input: std::option::Option<crate::model::CapacityReservationTargetResponse>,
        ) -> Self {
            self.capacity_reservation_target = input;
            self
        }
        /// Consumes the builder and constructs a [`CapacityReservationSpecificationResponse`](crate::model::CapacityReservationSpecificationResponse).
        pub fn build(self) -> crate::model::CapacityReservationSpecificationResponse {
            crate::model::CapacityReservationSpecificationResponse {
                capacity_reservation_preference: self.capacity_reservation_preference,
                capacity_reservation_target: self.capacity_reservation_target,
            }
        }
    }
}
impl CapacityReservationSpecificationResponse {
    /// Creates a new builder-style object to manufacture [`CapacityReservationSpecificationResponse`](crate::model::CapacityReservationSpecificationResponse).
    pub fn builder() -> crate::model::capacity_reservation_specification_response::Builder {
        crate::model::capacity_reservation_specification_response::Builder::default()
    }
}

/// <p>Describes a target Capacity Reservation or Capacity Reservation group.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CapacityReservationTargetResponse {
    /// <p>The ID of the targeted Capacity Reservation.</p>
    #[doc(hidden)]
    pub capacity_reservation_id: std::option::Option<std::string::String>,
    /// <p>The ARN of the targeted Capacity Reservation group.</p>
    #[doc(hidden)]
    pub capacity_reservation_resource_group_arn: std::option::Option<std::string::String>,
}
impl CapacityReservationTargetResponse {
    /// <p>The ID of the targeted Capacity Reservation.</p>
    pub fn capacity_reservation_id(&self) -> std::option::Option<&str> {
        self.capacity_reservation_id.as_deref()
    }
    /// <p>The ARN of the targeted Capacity Reservation group.</p>
    pub fn capacity_reservation_resource_group_arn(&self) -> std::option::Option<&str> {
        self.capacity_reservation_resource_group_arn.as_deref()
    }
}
/// See [`CapacityReservationTargetResponse`](crate::model::CapacityReservationTargetResponse).
pub mod capacity_reservation_target_response {

    /// A builder for [`CapacityReservationTargetResponse`](crate::model::CapacityReservationTargetResponse).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) capacity_reservation_id: std::option::Option<std::string::String>,
        pub(crate) capacity_reservation_resource_group_arn:
            std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The ID of the targeted Capacity Reservation.</p>
        pub fn capacity_reservation_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.capacity_reservation_id = Some(input.into());
            self
        }
        /// <p>The ID of the targeted Capacity Reservation.</p>
        pub fn set_capacity_reservation_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.capacity_reservation_id = input;
            self
        }
        /// <p>The ARN of the targeted Capacity Reservation group.</p>
        pub fn capacity_reservation_resource_group_arn(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.capacity_reservation_resource_group_arn = Some(input.into());
            self
        }
        /// <p>The ARN of the targeted Capacity Reservation group.</p>
        pub fn set_capacity_reservation_resource_group_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.capacity_reservation_resource_group_arn = input;
            self
        }
        /// Consumes the builder and constructs a [`CapacityReservationTargetResponse`](crate::model::CapacityReservationTargetResponse).
        pub fn build(self) -> crate::model::CapacityReservationTargetResponse {
            crate::model::CapacityReservationTargetResponse {
                capacity_reservation_id: self.capacity_reservation_id,
                capacity_reservation_resource_group_arn: self
                    .capacity_reservation_resource_group_arn,
            }
        }
    }
}
impl CapacityReservationTargetResponse {
    /// Creates a new builder-style object to manufacture [`CapacityReservationTargetResponse`](crate::model::CapacityReservationTargetResponse).
    pub fn builder() -> crate::model::capacity_reservation_target_response::Builder {
        crate::model::capacity_reservation_target_response::Builder::default()
    }
}

/// When writing a match expression against `CapacityReservationPreference`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let capacityreservationpreference = unimplemented!();
/// match capacityreservationpreference {
///     CapacityReservationPreference::None => { /* ... */ },
///     CapacityReservationPreference::Open => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `capacityreservationpreference` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `CapacityReservationPreference::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `CapacityReservationPreference::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `CapacityReservationPreference::NewFeature` is defined.
/// Specifically, when `capacityreservationpreference` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `CapacityReservationPreference::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 CapacityReservationPreference {
    #[allow(missing_docs)] // documentation missing in model
    None,
    #[allow(missing_docs)] // documentation missing in model
    Open,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for CapacityReservationPreference {
    fn from(s: &str) -> Self {
        match s {
            "none" => CapacityReservationPreference::None,
            "open" => CapacityReservationPreference::Open,
            other => CapacityReservationPreference::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for CapacityReservationPreference {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(CapacityReservationPreference::from(s))
    }
}
impl CapacityReservationPreference {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            CapacityReservationPreference::None => "none",
            CapacityReservationPreference::Open => "open",
            CapacityReservationPreference::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["none", "open"]
    }
}
impl AsRef<str> for CapacityReservationPreference {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>The CPU options for the instance.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CpuOptions {
    /// <p>The number of CPU cores for the instance.</p>
    #[doc(hidden)]
    pub core_count: std::option::Option<i32>,
    /// <p>The number of threads per CPU core.</p>
    #[doc(hidden)]
    pub threads_per_core: std::option::Option<i32>,
}
impl CpuOptions {
    /// <p>The number of CPU cores for the instance.</p>
    pub fn core_count(&self) -> std::option::Option<i32> {
        self.core_count
    }
    /// <p>The number of threads per CPU core.</p>
    pub fn threads_per_core(&self) -> std::option::Option<i32> {
        self.threads_per_core
    }
}
/// See [`CpuOptions`](crate::model::CpuOptions).
pub mod cpu_options {

    /// A builder for [`CpuOptions`](crate::model::CpuOptions).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) core_count: std::option::Option<i32>,
        pub(crate) threads_per_core: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>The number of CPU cores for the instance.</p>
        pub fn core_count(mut self, input: i32) -> Self {
            self.core_count = Some(input);
            self
        }
        /// <p>The number of CPU cores for the instance.</p>
        pub fn set_core_count(mut self, input: std::option::Option<i32>) -> Self {
            self.core_count = input;
            self
        }
        /// <p>The number of threads per CPU core.</p>
        pub fn threads_per_core(mut self, input: i32) -> Self {
            self.threads_per_core = Some(input);
            self
        }
        /// <p>The number of threads per CPU core.</p>
        pub fn set_threads_per_core(mut self, input: std::option::Option<i32>) -> Self {
            self.threads_per_core = input;
            self
        }
        /// Consumes the builder and constructs a [`CpuOptions`](crate::model::CpuOptions).
        pub fn build(self) -> crate::model::CpuOptions {
            crate::model::CpuOptions {
                core_count: self.core_count,
                threads_per_core: self.threads_per_core,
            }
        }
    }
}
impl CpuOptions {
    /// Creates a new builder-style object to manufacture [`CpuOptions`](crate::model::CpuOptions).
    pub fn builder() -> crate::model::cpu_options::Builder {
        crate::model::cpu_options::Builder::default()
    }
}

/// When writing a match expression against `VirtualizationType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let virtualizationtype = unimplemented!();
/// match virtualizationtype {
///     VirtualizationType::Hvm => { /* ... */ },
///     VirtualizationType::Paravirtual => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `virtualizationtype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `VirtualizationType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `VirtualizationType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `VirtualizationType::NewFeature` is defined.
/// Specifically, when `virtualizationtype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `VirtualizationType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 VirtualizationType {
    #[allow(missing_docs)] // documentation missing in model
    Hvm,
    #[allow(missing_docs)] // documentation missing in model
    Paravirtual,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for VirtualizationType {
    fn from(s: &str) -> Self {
        match s {
            "hvm" => VirtualizationType::Hvm,
            "paravirtual" => VirtualizationType::Paravirtual,
            other => {
                VirtualizationType::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for VirtualizationType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(VirtualizationType::from(s))
    }
}
impl VirtualizationType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            VirtualizationType::Hvm => "hvm",
            VirtualizationType::Paravirtual => "paravirtual",
            VirtualizationType::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["hvm", "paravirtual"]
    }
}
impl AsRef<str> for VirtualizationType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes a state change.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct StateReason {
    /// <p>The reason code for the state change.</p>
    #[doc(hidden)]
    pub code: std::option::Option<std::string::String>,
    /// <p>The message for the state change.</p>
    /// <ul>
    /// <li> <p> <code>Server.InsufficientInstanceCapacity</code>: There was insufficient capacity available to satisfy the launch request.</p> </li>
    /// <li> <p> <code>Server.InternalError</code>: An internal error caused the instance to terminate during launch.</p> </li>
    /// <li> <p> <code>Server.ScheduledStop</code>: The instance was stopped due to a scheduled retirement.</p> </li>
    /// <li> <p> <code>Server.SpotInstanceShutdown</code>: The instance was stopped because the number of Spot requests with a maximum price equal to or higher than the Spot price exceeded available capacity or because of an increase in the Spot price.</p> </li>
    /// <li> <p> <code>Server.SpotInstanceTermination</code>: The instance was terminated because the number of Spot requests with a maximum price equal to or higher than the Spot price exceeded available capacity or because of an increase in the Spot price.</p> </li>
    /// <li> <p> <code>Client.InstanceInitiatedShutdown</code>: The instance was shut down using the <code>shutdown -h</code> command from the instance.</p> </li>
    /// <li> <p> <code>Client.InstanceTerminated</code>: The instance was terminated or rebooted during AMI creation.</p> </li>
    /// <li> <p> <code>Client.InternalError</code>: A client error caused the instance to terminate during launch.</p> </li>
    /// <li> <p> <code>Client.InvalidSnapshot.NotFound</code>: The specified snapshot was not found.</p> </li>
    /// <li> <p> <code>Client.UserInitiatedHibernate</code>: Hibernation was initiated on the instance.</p> </li>
    /// <li> <p> <code>Client.UserInitiatedShutdown</code>: The instance was shut down using the Amazon EC2 API.</p> </li>
    /// <li> <p> <code>Client.VolumeLimitExceeded</code>: The limit on the number of EBS volumes or total storage was exceeded. Decrease usage or request an increase in your account limits.</p> </li>
    /// </ul>
    #[doc(hidden)]
    pub message: std::option::Option<std::string::String>,
}
impl StateReason {
    /// <p>The reason code for the state change.</p>
    pub fn code(&self) -> std::option::Option<&str> {
        self.code.as_deref()
    }
    /// <p>The message for the state change.</p>
    /// <ul>
    /// <li> <p> <code>Server.InsufficientInstanceCapacity</code>: There was insufficient capacity available to satisfy the launch request.</p> </li>
    /// <li> <p> <code>Server.InternalError</code>: An internal error caused the instance to terminate during launch.</p> </li>
    /// <li> <p> <code>Server.ScheduledStop</code>: The instance was stopped due to a scheduled retirement.</p> </li>
    /// <li> <p> <code>Server.SpotInstanceShutdown</code>: The instance was stopped because the number of Spot requests with a maximum price equal to or higher than the Spot price exceeded available capacity or because of an increase in the Spot price.</p> </li>
    /// <li> <p> <code>Server.SpotInstanceTermination</code>: The instance was terminated because the number of Spot requests with a maximum price equal to or higher than the Spot price exceeded available capacity or because of an increase in the Spot price.</p> </li>
    /// <li> <p> <code>Client.InstanceInitiatedShutdown</code>: The instance was shut down using the <code>shutdown -h</code> command from the instance.</p> </li>
    /// <li> <p> <code>Client.InstanceTerminated</code>: The instance was terminated or rebooted during AMI creation.</p> </li>
    /// <li> <p> <code>Client.InternalError</code>: A client error caused the instance to terminate during launch.</p> </li>
    /// <li> <p> <code>Client.InvalidSnapshot.NotFound</code>: The specified snapshot was not found.</p> </li>
    /// <li> <p> <code>Client.UserInitiatedHibernate</code>: Hibernation was initiated on the instance.</p> </li>
    /// <li> <p> <code>Client.UserInitiatedShutdown</code>: The instance was shut down using the Amazon EC2 API.</p> </li>
    /// <li> <p> <code>Client.VolumeLimitExceeded</code>: The limit on the number of EBS volumes or total storage was exceeded. Decrease usage or request an increase in your account limits.</p> </li>
    /// </ul>
    pub fn message(&self) -> std::option::Option<&str> {
        self.message.as_deref()
    }
}
/// See [`StateReason`](crate::model::StateReason).
pub mod state_reason {

    /// A builder for [`StateReason`](crate::model::StateReason).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) code: std::option::Option<std::string::String>,
        pub(crate) message: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The reason code for the state change.</p>
        pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
            self.code = Some(input.into());
            self
        }
        /// <p>The reason code for the state change.</p>
        pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.code = input;
            self
        }
        /// <p>The message for the state change.</p>
        /// <ul>
        /// <li> <p> <code>Server.InsufficientInstanceCapacity</code>: There was insufficient capacity available to satisfy the launch request.</p> </li>
        /// <li> <p> <code>Server.InternalError</code>: An internal error caused the instance to terminate during launch.</p> </li>
        /// <li> <p> <code>Server.ScheduledStop</code>: The instance was stopped due to a scheduled retirement.</p> </li>
        /// <li> <p> <code>Server.SpotInstanceShutdown</code>: The instance was stopped because the number of Spot requests with a maximum price equal to or higher than the Spot price exceeded available capacity or because of an increase in the Spot price.</p> </li>
        /// <li> <p> <code>Server.SpotInstanceTermination</code>: The instance was terminated because the number of Spot requests with a maximum price equal to or higher than the Spot price exceeded available capacity or because of an increase in the Spot price.</p> </li>
        /// <li> <p> <code>Client.InstanceInitiatedShutdown</code>: The instance was shut down using the <code>shutdown -h</code> command from the instance.</p> </li>
        /// <li> <p> <code>Client.InstanceTerminated</code>: The instance was terminated or rebooted during AMI creation.</p> </li>
        /// <li> <p> <code>Client.InternalError</code>: A client error caused the instance to terminate during launch.</p> </li>
        /// <li> <p> <code>Client.InvalidSnapshot.NotFound</code>: The specified snapshot was not found.</p> </li>
        /// <li> <p> <code>Client.UserInitiatedHibernate</code>: Hibernation was initiated on the instance.</p> </li>
        /// <li> <p> <code>Client.UserInitiatedShutdown</code>: The instance was shut down using the Amazon EC2 API.</p> </li>
        /// <li> <p> <code>Client.VolumeLimitExceeded</code>: The limit on the number of EBS volumes or total storage was exceeded. Decrease usage or request an increase in your account limits.</p> </li>
        /// </ul>
        pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
            self.message = Some(input.into());
            self
        }
        /// <p>The message for the state change.</p>
        /// <ul>
        /// <li> <p> <code>Server.InsufficientInstanceCapacity</code>: There was insufficient capacity available to satisfy the launch request.</p> </li>
        /// <li> <p> <code>Server.InternalError</code>: An internal error caused the instance to terminate during launch.</p> </li>
        /// <li> <p> <code>Server.ScheduledStop</code>: The instance was stopped due to a scheduled retirement.</p> </li>
        /// <li> <p> <code>Server.SpotInstanceShutdown</code>: The instance was stopped because the number of Spot requests with a maximum price equal to or higher than the Spot price exceeded available capacity or because of an increase in the Spot price.</p> </li>
        /// <li> <p> <code>Server.SpotInstanceTermination</code>: The instance was terminated because the number of Spot requests with a maximum price equal to or higher than the Spot price exceeded available capacity or because of an increase in the Spot price.</p> </li>
        /// <li> <p> <code>Client.InstanceInitiatedShutdown</code>: The instance was shut down using the <code>shutdown -h</code> command from the instance.</p> </li>
        /// <li> <p> <code>Client.InstanceTerminated</code>: The instance was terminated or rebooted during AMI creation.</p> </li>
        /// <li> <p> <code>Client.InternalError</code>: A client error caused the instance to terminate during launch.</p> </li>
        /// <li> <p> <code>Client.InvalidSnapshot.NotFound</code>: The specified snapshot was not found.</p> </li>
        /// <li> <p> <code>Client.UserInitiatedHibernate</code>: Hibernation was initiated on the instance.</p> </li>
        /// <li> <p> <code>Client.UserInitiatedShutdown</code>: The instance was shut down using the Amazon EC2 API.</p> </li>
        /// <li> <p> <code>Client.VolumeLimitExceeded</code>: The limit on the number of EBS volumes or total storage was exceeded. Decrease usage or request an increase in your account limits.</p> </li>
        /// </ul>
        pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.message = input;
            self
        }
        /// Consumes the builder and constructs a [`StateReason`](crate::model::StateReason).
        pub fn build(self) -> crate::model::StateReason {
            crate::model::StateReason {
                code: self.code,
                message: self.message,
            }
        }
    }
}
impl StateReason {
    /// Creates a new builder-style object to manufacture [`StateReason`](crate::model::StateReason).
    pub fn builder() -> crate::model::state_reason::Builder {
        crate::model::state_reason::Builder::default()
    }
}

/// <p>Describes a security group.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GroupIdentifier {
    /// <p>The name of the security group.</p>
    #[doc(hidden)]
    pub group_name: std::option::Option<std::string::String>,
    /// <p>The ID of the security group.</p>
    #[doc(hidden)]
    pub group_id: std::option::Option<std::string::String>,
}
impl GroupIdentifier {
    /// <p>The name of the security group.</p>
    pub fn group_name(&self) -> std::option::Option<&str> {
        self.group_name.as_deref()
    }
    /// <p>The ID of the security group.</p>
    pub fn group_id(&self) -> std::option::Option<&str> {
        self.group_id.as_deref()
    }
}
/// See [`GroupIdentifier`](crate::model::GroupIdentifier).
pub mod group_identifier {

    /// A builder for [`GroupIdentifier`](crate::model::GroupIdentifier).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) group_name: std::option::Option<std::string::String>,
        pub(crate) group_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The name of the security group.</p>
        pub fn group_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.group_name = Some(input.into());
            self
        }
        /// <p>The name of the security group.</p>
        pub fn set_group_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.group_name = input;
            self
        }
        /// <p>The ID of the security group.</p>
        pub fn group_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.group_id = Some(input.into());
            self
        }
        /// <p>The ID of the security group.</p>
        pub fn set_group_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.group_id = input;
            self
        }
        /// Consumes the builder and constructs a [`GroupIdentifier`](crate::model::GroupIdentifier).
        pub fn build(self) -> crate::model::GroupIdentifier {
            crate::model::GroupIdentifier {
                group_name: self.group_name,
                group_id: self.group_id,
            }
        }
    }
}
impl GroupIdentifier {
    /// Creates a new builder-style object to manufacture [`GroupIdentifier`](crate::model::GroupIdentifier).
    pub fn builder() -> crate::model::group_identifier::Builder {
        crate::model::group_identifier::Builder::default()
    }
}

/// When writing a match expression against `DeviceType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let devicetype = unimplemented!();
/// match devicetype {
///     DeviceType::Ebs => { /* ... */ },
///     DeviceType::InstanceStore => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `devicetype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `DeviceType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `DeviceType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `DeviceType::NewFeature` is defined.
/// Specifically, when `devicetype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `DeviceType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 DeviceType {
    #[allow(missing_docs)] // documentation missing in model
    Ebs,
    #[allow(missing_docs)] // documentation missing in model
    InstanceStore,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for DeviceType {
    fn from(s: &str) -> Self {
        match s {
            "ebs" => DeviceType::Ebs,
            "instance-store" => DeviceType::InstanceStore,
            other => DeviceType::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for DeviceType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(DeviceType::from(s))
    }
}
impl DeviceType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            DeviceType::Ebs => "ebs",
            DeviceType::InstanceStore => "instance-store",
            DeviceType::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["ebs", "instance-store"]
    }
}
impl AsRef<str> for DeviceType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes a network interface.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InstanceNetworkInterface {
    /// <p>The association information for an Elastic IPv4 associated with the network interface.</p>
    #[doc(hidden)]
    pub association: std::option::Option<crate::model::InstanceNetworkInterfaceAssociation>,
    /// <p>The network interface attachment.</p>
    #[doc(hidden)]
    pub attachment: std::option::Option<crate::model::InstanceNetworkInterfaceAttachment>,
    /// <p>The description.</p>
    #[doc(hidden)]
    pub description: std::option::Option<std::string::String>,
    /// <p>The security groups.</p>
    #[doc(hidden)]
    pub groups: std::option::Option<std::vec::Vec<crate::model::GroupIdentifier>>,
    /// <p>The IPv6 addresses associated with the network interface.</p>
    #[doc(hidden)]
    pub ipv6_addresses: std::option::Option<std::vec::Vec<crate::model::InstanceIpv6Address>>,
    /// <p>The MAC address.</p>
    #[doc(hidden)]
    pub mac_address: std::option::Option<std::string::String>,
    /// <p>The ID of the network interface.</p>
    #[doc(hidden)]
    pub network_interface_id: std::option::Option<std::string::String>,
    /// <p>The ID of the Amazon Web Services account that created the network interface.</p>
    #[doc(hidden)]
    pub owner_id: std::option::Option<std::string::String>,
    /// <p>The private DNS name.</p>
    #[doc(hidden)]
    pub private_dns_name: std::option::Option<std::string::String>,
    /// <p>The IPv4 address of the network interface within the subnet.</p>
    #[doc(hidden)]
    pub private_ip_address: std::option::Option<std::string::String>,
    /// <p>The private IPv4 addresses associated with the network interface.</p>
    #[doc(hidden)]
    pub private_ip_addresses:
        std::option::Option<std::vec::Vec<crate::model::InstancePrivateIpAddress>>,
    /// <p>Indicates whether source/destination checking is enabled.</p>
    #[doc(hidden)]
    pub source_dest_check: std::option::Option<bool>,
    /// <p>The status of the network interface.</p>
    #[doc(hidden)]
    pub status: std::option::Option<crate::model::NetworkInterfaceStatus>,
    /// <p>The ID of the subnet.</p>
    #[doc(hidden)]
    pub subnet_id: std::option::Option<std::string::String>,
    /// <p>The ID of the VPC.</p>
    #[doc(hidden)]
    pub vpc_id: std::option::Option<std::string::String>,
    /// <p>The type of network interface.</p>
    /// <p>Valid values: <code>interface</code> | <code>efa</code> | <code>trunk</code> </p>
    #[doc(hidden)]
    pub interface_type: std::option::Option<std::string::String>,
    /// <p>The IPv4 delegated prefixes that are assigned to the network interface.</p>
    #[doc(hidden)]
    pub ipv4_prefixes: std::option::Option<std::vec::Vec<crate::model::InstanceIpv4Prefix>>,
    /// <p>The IPv6 delegated prefixes that are assigned to the network interface.</p>
    #[doc(hidden)]
    pub ipv6_prefixes: std::option::Option<std::vec::Vec<crate::model::InstanceIpv6Prefix>>,
}
impl InstanceNetworkInterface {
    /// <p>The association information for an Elastic IPv4 associated with the network interface.</p>
    pub fn association(
        &self,
    ) -> std::option::Option<&crate::model::InstanceNetworkInterfaceAssociation> {
        self.association.as_ref()
    }
    /// <p>The network interface attachment.</p>
    pub fn attachment(
        &self,
    ) -> std::option::Option<&crate::model::InstanceNetworkInterfaceAttachment> {
        self.attachment.as_ref()
    }
    /// <p>The description.</p>
    pub fn description(&self) -> std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The security groups.</p>
    pub fn groups(&self) -> std::option::Option<&[crate::model::GroupIdentifier]> {
        self.groups.as_deref()
    }
    /// <p>The IPv6 addresses associated with the network interface.</p>
    pub fn ipv6_addresses(&self) -> std::option::Option<&[crate::model::InstanceIpv6Address]> {
        self.ipv6_addresses.as_deref()
    }
    /// <p>The MAC address.</p>
    pub fn mac_address(&self) -> std::option::Option<&str> {
        self.mac_address.as_deref()
    }
    /// <p>The ID of the network interface.</p>
    pub fn network_interface_id(&self) -> std::option::Option<&str> {
        self.network_interface_id.as_deref()
    }
    /// <p>The ID of the Amazon Web Services account that created the network interface.</p>
    pub fn owner_id(&self) -> std::option::Option<&str> {
        self.owner_id.as_deref()
    }
    /// <p>The private DNS name.</p>
    pub fn private_dns_name(&self) -> std::option::Option<&str> {
        self.private_dns_name.as_deref()
    }
    /// <p>The IPv4 address of the network interface within the subnet.</p>
    pub fn private_ip_address(&self) -> std::option::Option<&str> {
        self.private_ip_address.as_deref()
    }
    /// <p>The private IPv4 addresses associated with the network interface.</p>
    pub fn private_ip_addresses(
        &self,
    ) -> std::option::Option<&[crate::model::InstancePrivateIpAddress]> {
        self.private_ip_addresses.as_deref()
    }
    /// <p>Indicates whether source/destination checking is enabled.</p>
    pub fn source_dest_check(&self) -> std::option::Option<bool> {
        self.source_dest_check
    }
    /// <p>The status of the network interface.</p>
    pub fn status(&self) -> std::option::Option<&crate::model::NetworkInterfaceStatus> {
        self.status.as_ref()
    }
    /// <p>The ID of the subnet.</p>
    pub fn subnet_id(&self) -> std::option::Option<&str> {
        self.subnet_id.as_deref()
    }
    /// <p>The ID of the VPC.</p>
    pub fn vpc_id(&self) -> std::option::Option<&str> {
        self.vpc_id.as_deref()
    }
    /// <p>The type of network interface.</p>
    /// <p>Valid values: <code>interface</code> | <code>efa</code> | <code>trunk</code> </p>
    pub fn interface_type(&self) -> std::option::Option<&str> {
        self.interface_type.as_deref()
    }
    /// <p>The IPv4 delegated prefixes that are assigned to the network interface.</p>
    pub fn ipv4_prefixes(&self) -> std::option::Option<&[crate::model::InstanceIpv4Prefix]> {
        self.ipv4_prefixes.as_deref()
    }
    /// <p>The IPv6 delegated prefixes that are assigned to the network interface.</p>
    pub fn ipv6_prefixes(&self) -> std::option::Option<&[crate::model::InstanceIpv6Prefix]> {
        self.ipv6_prefixes.as_deref()
    }
}
/// See [`InstanceNetworkInterface`](crate::model::InstanceNetworkInterface).
pub mod instance_network_interface {

    /// A builder for [`InstanceNetworkInterface`](crate::model::InstanceNetworkInterface).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) association:
            std::option::Option<crate::model::InstanceNetworkInterfaceAssociation>,
        pub(crate) attachment:
            std::option::Option<crate::model::InstanceNetworkInterfaceAttachment>,
        pub(crate) description: std::option::Option<std::string::String>,
        pub(crate) groups: std::option::Option<std::vec::Vec<crate::model::GroupIdentifier>>,
        pub(crate) ipv6_addresses:
            std::option::Option<std::vec::Vec<crate::model::InstanceIpv6Address>>,
        pub(crate) mac_address: std::option::Option<std::string::String>,
        pub(crate) network_interface_id: std::option::Option<std::string::String>,
        pub(crate) owner_id: std::option::Option<std::string::String>,
        pub(crate) private_dns_name: std::option::Option<std::string::String>,
        pub(crate) private_ip_address: std::option::Option<std::string::String>,
        pub(crate) private_ip_addresses:
            std::option::Option<std::vec::Vec<crate::model::InstancePrivateIpAddress>>,
        pub(crate) source_dest_check: std::option::Option<bool>,
        pub(crate) status: std::option::Option<crate::model::NetworkInterfaceStatus>,
        pub(crate) subnet_id: std::option::Option<std::string::String>,
        pub(crate) vpc_id: std::option::Option<std::string::String>,
        pub(crate) interface_type: std::option::Option<std::string::String>,
        pub(crate) ipv4_prefixes:
            std::option::Option<std::vec::Vec<crate::model::InstanceIpv4Prefix>>,
        pub(crate) ipv6_prefixes:
            std::option::Option<std::vec::Vec<crate::model::InstanceIpv6Prefix>>,
    }
    impl Builder {
        /// <p>The association information for an Elastic IPv4 associated with the network interface.</p>
        pub fn association(
            mut self,
            input: crate::model::InstanceNetworkInterfaceAssociation,
        ) -> Self {
            self.association = Some(input);
            self
        }
        /// <p>The association information for an Elastic IPv4 associated with the network interface.</p>
        pub fn set_association(
            mut self,
            input: std::option::Option<crate::model::InstanceNetworkInterfaceAssociation>,
        ) -> Self {
            self.association = input;
            self
        }
        /// <p>The network interface attachment.</p>
        pub fn attachment(
            mut self,
            input: crate::model::InstanceNetworkInterfaceAttachment,
        ) -> Self {
            self.attachment = Some(input);
            self
        }
        /// <p>The network interface attachment.</p>
        pub fn set_attachment(
            mut self,
            input: std::option::Option<crate::model::InstanceNetworkInterfaceAttachment>,
        ) -> Self {
            self.attachment = input;
            self
        }
        /// <p>The description.</p>
        pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
            self.description = Some(input.into());
            self
        }
        /// <p>The description.</p>
        pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.description = input;
            self
        }
        /// Appends an item to `groups`.
        ///
        /// To override the contents of this collection use [`set_groups`](Self::set_groups).
        ///
        /// <p>The security groups.</p>
        pub fn groups(mut self, input: crate::model::GroupIdentifier) -> Self {
            let mut v = self.groups.unwrap_or_default();
            v.push(input);
            self.groups = Some(v);
            self
        }
        /// <p>The security groups.</p>
        pub fn set_groups(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::GroupIdentifier>>,
        ) -> Self {
            self.groups = input;
            self
        }
        /// Appends an item to `ipv6_addresses`.
        ///
        /// To override the contents of this collection use [`set_ipv6_addresses`](Self::set_ipv6_addresses).
        ///
        /// <p>The IPv6 addresses associated with the network interface.</p>
        pub fn ipv6_addresses(mut self, input: crate::model::InstanceIpv6Address) -> Self {
            let mut v = self.ipv6_addresses.unwrap_or_default();
            v.push(input);
            self.ipv6_addresses = Some(v);
            self
        }
        /// <p>The IPv6 addresses associated with the network interface.</p>
        pub fn set_ipv6_addresses(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::InstanceIpv6Address>>,
        ) -> Self {
            self.ipv6_addresses = input;
            self
        }
        /// <p>The MAC address.</p>
        pub fn mac_address(mut self, input: impl Into<std::string::String>) -> Self {
            self.mac_address = Some(input.into());
            self
        }
        /// <p>The MAC address.</p>
        pub fn set_mac_address(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.mac_address = input;
            self
        }
        /// <p>The ID of the network interface.</p>
        pub fn network_interface_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.network_interface_id = Some(input.into());
            self
        }
        /// <p>The ID of the network interface.</p>
        pub fn set_network_interface_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.network_interface_id = input;
            self
        }
        /// <p>The ID of the Amazon Web Services account that created the network interface.</p>
        pub fn owner_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.owner_id = Some(input.into());
            self
        }
        /// <p>The ID of the Amazon Web Services account that created the network interface.</p>
        pub fn set_owner_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.owner_id = input;
            self
        }
        /// <p>The private DNS name.</p>
        pub fn private_dns_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.private_dns_name = Some(input.into());
            self
        }
        /// <p>The private DNS name.</p>
        pub fn set_private_dns_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.private_dns_name = input;
            self
        }
        /// <p>The IPv4 address of the network interface within the subnet.</p>
        pub fn private_ip_address(mut self, input: impl Into<std::string::String>) -> Self {
            self.private_ip_address = Some(input.into());
            self
        }
        /// <p>The IPv4 address of the network interface within the subnet.</p>
        pub fn set_private_ip_address(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.private_ip_address = input;
            self
        }
        /// Appends an item to `private_ip_addresses`.
        ///
        /// To override the contents of this collection use [`set_private_ip_addresses`](Self::set_private_ip_addresses).
        ///
        /// <p>The private IPv4 addresses associated with the network interface.</p>
        pub fn private_ip_addresses(
            mut self,
            input: crate::model::InstancePrivateIpAddress,
        ) -> Self {
            let mut v = self.private_ip_addresses.unwrap_or_default();
            v.push(input);
            self.private_ip_addresses = Some(v);
            self
        }
        /// <p>The private IPv4 addresses associated with the network interface.</p>
        pub fn set_private_ip_addresses(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::InstancePrivateIpAddress>>,
        ) -> Self {
            self.private_ip_addresses = input;
            self
        }
        /// <p>Indicates whether source/destination checking is enabled.</p>
        pub fn source_dest_check(mut self, input: bool) -> Self {
            self.source_dest_check = Some(input);
            self
        }
        /// <p>Indicates whether source/destination checking is enabled.</p>
        pub fn set_source_dest_check(mut self, input: std::option::Option<bool>) -> Self {
            self.source_dest_check = input;
            self
        }
        /// <p>The status of the network interface.</p>
        pub fn status(mut self, input: crate::model::NetworkInterfaceStatus) -> Self {
            self.status = Some(input);
            self
        }
        /// <p>The status of the network interface.</p>
        pub fn set_status(
            mut self,
            input: std::option::Option<crate::model::NetworkInterfaceStatus>,
        ) -> Self {
            self.status = input;
            self
        }
        /// <p>The ID of the subnet.</p>
        pub fn subnet_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.subnet_id = Some(input.into());
            self
        }
        /// <p>The ID of the subnet.</p>
        pub fn set_subnet_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.subnet_id = input;
            self
        }
        /// <p>The ID of the VPC.</p>
        pub fn vpc_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.vpc_id = Some(input.into());
            self
        }
        /// <p>The ID of the VPC.</p>
        pub fn set_vpc_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.vpc_id = input;
            self
        }
        /// <p>The type of network interface.</p>
        /// <p>Valid values: <code>interface</code> | <code>efa</code> | <code>trunk</code> </p>
        pub fn interface_type(mut self, input: impl Into<std::string::String>) -> Self {
            self.interface_type = Some(input.into());
            self
        }
        /// <p>The type of network interface.</p>
        /// <p>Valid values: <code>interface</code> | <code>efa</code> | <code>trunk</code> </p>
        pub fn set_interface_type(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.interface_type = input;
            self
        }
        /// Appends an item to `ipv4_prefixes`.
        ///
        /// To override the contents of this collection use [`set_ipv4_prefixes`](Self::set_ipv4_prefixes).
        ///
        /// <p>The IPv4 delegated prefixes that are assigned to the network interface.</p>
        pub fn ipv4_prefixes(mut self, input: crate::model::InstanceIpv4Prefix) -> Self {
            let mut v = self.ipv4_prefixes.unwrap_or_default();
            v.push(input);
            self.ipv4_prefixes = Some(v);
            self
        }
        /// <p>The IPv4 delegated prefixes that are assigned to the network interface.</p>
        pub fn set_ipv4_prefixes(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::InstanceIpv4Prefix>>,
        ) -> Self {
            self.ipv4_prefixes = input;
            self
        }
        /// Appends an item to `ipv6_prefixes`.
        ///
        /// To override the contents of this collection use [`set_ipv6_prefixes`](Self::set_ipv6_prefixes).
        ///
        /// <p>The IPv6 delegated prefixes that are assigned to the network interface.</p>
        pub fn ipv6_prefixes(mut self, input: crate::model::InstanceIpv6Prefix) -> Self {
            let mut v = self.ipv6_prefixes.unwrap_or_default();
            v.push(input);
            self.ipv6_prefixes = Some(v);
            self
        }
        /// <p>The IPv6 delegated prefixes that are assigned to the network interface.</p>
        pub fn set_ipv6_prefixes(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::InstanceIpv6Prefix>>,
        ) -> Self {
            self.ipv6_prefixes = input;
            self
        }
        /// Consumes the builder and constructs a [`InstanceNetworkInterface`](crate::model::InstanceNetworkInterface).
        pub fn build(self) -> crate::model::InstanceNetworkInterface {
            crate::model::InstanceNetworkInterface {
                association: self.association,
                attachment: self.attachment,
                description: self.description,
                groups: self.groups,
                ipv6_addresses: self.ipv6_addresses,
                mac_address: self.mac_address,
                network_interface_id: self.network_interface_id,
                owner_id: self.owner_id,
                private_dns_name: self.private_dns_name,
                private_ip_address: self.private_ip_address,
                private_ip_addresses: self.private_ip_addresses,
                source_dest_check: self.source_dest_check,
                status: self.status,
                subnet_id: self.subnet_id,
                vpc_id: self.vpc_id,
                interface_type: self.interface_type,
                ipv4_prefixes: self.ipv4_prefixes,
                ipv6_prefixes: self.ipv6_prefixes,
            }
        }
    }
}
impl InstanceNetworkInterface {
    /// Creates a new builder-style object to manufacture [`InstanceNetworkInterface`](crate::model::InstanceNetworkInterface).
    pub fn builder() -> crate::model::instance_network_interface::Builder {
        crate::model::instance_network_interface::Builder::default()
    }
}

/// <p>Information about an IPv6 prefix.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InstanceIpv6Prefix {
    /// <p>One or more IPv6 prefixes assigned to the network interface.</p>
    #[doc(hidden)]
    pub ipv6_prefix: std::option::Option<std::string::String>,
}
impl InstanceIpv6Prefix {
    /// <p>One or more IPv6 prefixes assigned to the network interface.</p>
    pub fn ipv6_prefix(&self) -> std::option::Option<&str> {
        self.ipv6_prefix.as_deref()
    }
}
/// See [`InstanceIpv6Prefix`](crate::model::InstanceIpv6Prefix).
pub mod instance_ipv6_prefix {

    /// A builder for [`InstanceIpv6Prefix`](crate::model::InstanceIpv6Prefix).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) ipv6_prefix: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>One or more IPv6 prefixes assigned to the network interface.</p>
        pub fn ipv6_prefix(mut self, input: impl Into<std::string::String>) -> Self {
            self.ipv6_prefix = Some(input.into());
            self
        }
        /// <p>One or more IPv6 prefixes assigned to the network interface.</p>
        pub fn set_ipv6_prefix(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.ipv6_prefix = input;
            self
        }
        /// Consumes the builder and constructs a [`InstanceIpv6Prefix`](crate::model::InstanceIpv6Prefix).
        pub fn build(self) -> crate::model::InstanceIpv6Prefix {
            crate::model::InstanceIpv6Prefix {
                ipv6_prefix: self.ipv6_prefix,
            }
        }
    }
}
impl InstanceIpv6Prefix {
    /// Creates a new builder-style object to manufacture [`InstanceIpv6Prefix`](crate::model::InstanceIpv6Prefix).
    pub fn builder() -> crate::model::instance_ipv6_prefix::Builder {
        crate::model::instance_ipv6_prefix::Builder::default()
    }
}

/// <p>Information about an IPv4 prefix.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InstanceIpv4Prefix {
    /// <p>One or more IPv4 prefixes assigned to the network interface.</p>
    #[doc(hidden)]
    pub ipv4_prefix: std::option::Option<std::string::String>,
}
impl InstanceIpv4Prefix {
    /// <p>One or more IPv4 prefixes assigned to the network interface.</p>
    pub fn ipv4_prefix(&self) -> std::option::Option<&str> {
        self.ipv4_prefix.as_deref()
    }
}
/// See [`InstanceIpv4Prefix`](crate::model::InstanceIpv4Prefix).
pub mod instance_ipv4_prefix {

    /// A builder for [`InstanceIpv4Prefix`](crate::model::InstanceIpv4Prefix).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) ipv4_prefix: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>One or more IPv4 prefixes assigned to the network interface.</p>
        pub fn ipv4_prefix(mut self, input: impl Into<std::string::String>) -> Self {
            self.ipv4_prefix = Some(input.into());
            self
        }
        /// <p>One or more IPv4 prefixes assigned to the network interface.</p>
        pub fn set_ipv4_prefix(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.ipv4_prefix = input;
            self
        }
        /// Consumes the builder and constructs a [`InstanceIpv4Prefix`](crate::model::InstanceIpv4Prefix).
        pub fn build(self) -> crate::model::InstanceIpv4Prefix {
            crate::model::InstanceIpv4Prefix {
                ipv4_prefix: self.ipv4_prefix,
            }
        }
    }
}
impl InstanceIpv4Prefix {
    /// Creates a new builder-style object to manufacture [`InstanceIpv4Prefix`](crate::model::InstanceIpv4Prefix).
    pub fn builder() -> crate::model::instance_ipv4_prefix::Builder {
        crate::model::instance_ipv4_prefix::Builder::default()
    }
}

/// When writing a match expression against `NetworkInterfaceStatus`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let networkinterfacestatus = unimplemented!();
/// match networkinterfacestatus {
///     NetworkInterfaceStatus::Associated => { /* ... */ },
///     NetworkInterfaceStatus::Attaching => { /* ... */ },
///     NetworkInterfaceStatus::Available => { /* ... */ },
///     NetworkInterfaceStatus::Detaching => { /* ... */ },
///     NetworkInterfaceStatus::InUse => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `networkinterfacestatus` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `NetworkInterfaceStatus::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `NetworkInterfaceStatus::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `NetworkInterfaceStatus::NewFeature` is defined.
/// Specifically, when `networkinterfacestatus` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `NetworkInterfaceStatus::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 NetworkInterfaceStatus {
    #[allow(missing_docs)] // documentation missing in model
    Associated,
    #[allow(missing_docs)] // documentation missing in model
    Attaching,
    #[allow(missing_docs)] // documentation missing in model
    Available,
    #[allow(missing_docs)] // documentation missing in model
    Detaching,
    #[allow(missing_docs)] // documentation missing in model
    InUse,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for NetworkInterfaceStatus {
    fn from(s: &str) -> Self {
        match s {
            "associated" => NetworkInterfaceStatus::Associated,
            "attaching" => NetworkInterfaceStatus::Attaching,
            "available" => NetworkInterfaceStatus::Available,
            "detaching" => NetworkInterfaceStatus::Detaching,
            "in-use" => NetworkInterfaceStatus::InUse,
            other => {
                NetworkInterfaceStatus::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for NetworkInterfaceStatus {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(NetworkInterfaceStatus::from(s))
    }
}
impl NetworkInterfaceStatus {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            NetworkInterfaceStatus::Associated => "associated",
            NetworkInterfaceStatus::Attaching => "attaching",
            NetworkInterfaceStatus::Available => "available",
            NetworkInterfaceStatus::Detaching => "detaching",
            NetworkInterfaceStatus::InUse => "in-use",
            NetworkInterfaceStatus::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &[
            "associated",
            "attaching",
            "available",
            "detaching",
            "in-use",
        ]
    }
}
impl AsRef<str> for NetworkInterfaceStatus {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes a private IPv4 address.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InstancePrivateIpAddress {
    /// <p>The association information for an Elastic IP address for the network interface.</p>
    #[doc(hidden)]
    pub association: std::option::Option<crate::model::InstanceNetworkInterfaceAssociation>,
    /// <p>Indicates whether this IPv4 address is the primary private IP address of the network interface.</p>
    #[doc(hidden)]
    pub primary: std::option::Option<bool>,
    /// <p>The private IPv4 DNS name.</p>
    #[doc(hidden)]
    pub private_dns_name: std::option::Option<std::string::String>,
    /// <p>The private IPv4 address of the network interface.</p>
    #[doc(hidden)]
    pub private_ip_address: std::option::Option<std::string::String>,
}
impl InstancePrivateIpAddress {
    /// <p>The association information for an Elastic IP address for the network interface.</p>
    pub fn association(
        &self,
    ) -> std::option::Option<&crate::model::InstanceNetworkInterfaceAssociation> {
        self.association.as_ref()
    }
    /// <p>Indicates whether this IPv4 address is the primary private IP address of the network interface.</p>
    pub fn primary(&self) -> std::option::Option<bool> {
        self.primary
    }
    /// <p>The private IPv4 DNS name.</p>
    pub fn private_dns_name(&self) -> std::option::Option<&str> {
        self.private_dns_name.as_deref()
    }
    /// <p>The private IPv4 address of the network interface.</p>
    pub fn private_ip_address(&self) -> std::option::Option<&str> {
        self.private_ip_address.as_deref()
    }
}
/// See [`InstancePrivateIpAddress`](crate::model::InstancePrivateIpAddress).
pub mod instance_private_ip_address {

    /// A builder for [`InstancePrivateIpAddress`](crate::model::InstancePrivateIpAddress).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) association:
            std::option::Option<crate::model::InstanceNetworkInterfaceAssociation>,
        pub(crate) primary: std::option::Option<bool>,
        pub(crate) private_dns_name: std::option::Option<std::string::String>,
        pub(crate) private_ip_address: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The association information for an Elastic IP address for the network interface.</p>
        pub fn association(
            mut self,
            input: crate::model::InstanceNetworkInterfaceAssociation,
        ) -> Self {
            self.association = Some(input);
            self
        }
        /// <p>The association information for an Elastic IP address for the network interface.</p>
        pub fn set_association(
            mut self,
            input: std::option::Option<crate::model::InstanceNetworkInterfaceAssociation>,
        ) -> Self {
            self.association = input;
            self
        }
        /// <p>Indicates whether this IPv4 address is the primary private IP address of the network interface.</p>
        pub fn primary(mut self, input: bool) -> Self {
            self.primary = Some(input);
            self
        }
        /// <p>Indicates whether this IPv4 address is the primary private IP address of the network interface.</p>
        pub fn set_primary(mut self, input: std::option::Option<bool>) -> Self {
            self.primary = input;
            self
        }
        /// <p>The private IPv4 DNS name.</p>
        pub fn private_dns_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.private_dns_name = Some(input.into());
            self
        }
        /// <p>The private IPv4 DNS name.</p>
        pub fn set_private_dns_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.private_dns_name = input;
            self
        }
        /// <p>The private IPv4 address of the network interface.</p>
        pub fn private_ip_address(mut self, input: impl Into<std::string::String>) -> Self {
            self.private_ip_address = Some(input.into());
            self
        }
        /// <p>The private IPv4 address of the network interface.</p>
        pub fn set_private_ip_address(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.private_ip_address = input;
            self
        }
        /// Consumes the builder and constructs a [`InstancePrivateIpAddress`](crate::model::InstancePrivateIpAddress).
        pub fn build(self) -> crate::model::InstancePrivateIpAddress {
            crate::model::InstancePrivateIpAddress {
                association: self.association,
                primary: self.primary,
                private_dns_name: self.private_dns_name,
                private_ip_address: self.private_ip_address,
            }
        }
    }
}
impl InstancePrivateIpAddress {
    /// Creates a new builder-style object to manufacture [`InstancePrivateIpAddress`](crate::model::InstancePrivateIpAddress).
    pub fn builder() -> crate::model::instance_private_ip_address::Builder {
        crate::model::instance_private_ip_address::Builder::default()
    }
}

/// <p>Describes association information for an Elastic IP address (IPv4).</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InstanceNetworkInterfaceAssociation {
    /// <p>The carrier IP address associated with the network interface.</p>
    #[doc(hidden)]
    pub carrier_ip: std::option::Option<std::string::String>,
    /// <p>The customer-owned IP address associated with the network interface.</p>
    #[doc(hidden)]
    pub customer_owned_ip: std::option::Option<std::string::String>,
    /// <p>The ID of the owner of the Elastic IP address.</p>
    #[doc(hidden)]
    pub ip_owner_id: std::option::Option<std::string::String>,
    /// <p>The public DNS name.</p>
    #[doc(hidden)]
    pub public_dns_name: std::option::Option<std::string::String>,
    /// <p>The public IP address or Elastic IP address bound to the network interface.</p>
    #[doc(hidden)]
    pub public_ip: std::option::Option<std::string::String>,
}
impl InstanceNetworkInterfaceAssociation {
    /// <p>The carrier IP address associated with the network interface.</p>
    pub fn carrier_ip(&self) -> std::option::Option<&str> {
        self.carrier_ip.as_deref()
    }
    /// <p>The customer-owned IP address associated with the network interface.</p>
    pub fn customer_owned_ip(&self) -> std::option::Option<&str> {
        self.customer_owned_ip.as_deref()
    }
    /// <p>The ID of the owner of the Elastic IP address.</p>
    pub fn ip_owner_id(&self) -> std::option::Option<&str> {
        self.ip_owner_id.as_deref()
    }
    /// <p>The public DNS name.</p>
    pub fn public_dns_name(&self) -> std::option::Option<&str> {
        self.public_dns_name.as_deref()
    }
    /// <p>The public IP address or Elastic IP address bound to the network interface.</p>
    pub fn public_ip(&self) -> std::option::Option<&str> {
        self.public_ip.as_deref()
    }
}
/// See [`InstanceNetworkInterfaceAssociation`](crate::model::InstanceNetworkInterfaceAssociation).
pub mod instance_network_interface_association {

    /// A builder for [`InstanceNetworkInterfaceAssociation`](crate::model::InstanceNetworkInterfaceAssociation).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) carrier_ip: std::option::Option<std::string::String>,
        pub(crate) customer_owned_ip: std::option::Option<std::string::String>,
        pub(crate) ip_owner_id: std::option::Option<std::string::String>,
        pub(crate) public_dns_name: std::option::Option<std::string::String>,
        pub(crate) public_ip: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The carrier IP address associated with the network interface.</p>
        pub fn carrier_ip(mut self, input: impl Into<std::string::String>) -> Self {
            self.carrier_ip = Some(input.into());
            self
        }
        /// <p>The carrier IP address associated with the network interface.</p>
        pub fn set_carrier_ip(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.carrier_ip = input;
            self
        }
        /// <p>The customer-owned IP address associated with the network interface.</p>
        pub fn customer_owned_ip(mut self, input: impl Into<std::string::String>) -> Self {
            self.customer_owned_ip = Some(input.into());
            self
        }
        /// <p>The customer-owned IP address associated with the network interface.</p>
        pub fn set_customer_owned_ip(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.customer_owned_ip = input;
            self
        }
        /// <p>The ID of the owner of the Elastic IP address.</p>
        pub fn ip_owner_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.ip_owner_id = Some(input.into());
            self
        }
        /// <p>The ID of the owner of the Elastic IP address.</p>
        pub fn set_ip_owner_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.ip_owner_id = input;
            self
        }
        /// <p>The public DNS name.</p>
        pub fn public_dns_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.public_dns_name = Some(input.into());
            self
        }
        /// <p>The public DNS name.</p>
        pub fn set_public_dns_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.public_dns_name = input;
            self
        }
        /// <p>The public IP address or Elastic IP address bound to the network interface.</p>
        pub fn public_ip(mut self, input: impl Into<std::string::String>) -> Self {
            self.public_ip = Some(input.into());
            self
        }
        /// <p>The public IP address or Elastic IP address bound to the network interface.</p>
        pub fn set_public_ip(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.public_ip = input;
            self
        }
        /// Consumes the builder and constructs a [`InstanceNetworkInterfaceAssociation`](crate::model::InstanceNetworkInterfaceAssociation).
        pub fn build(self) -> crate::model::InstanceNetworkInterfaceAssociation {
            crate::model::InstanceNetworkInterfaceAssociation {
                carrier_ip: self.carrier_ip,
                customer_owned_ip: self.customer_owned_ip,
                ip_owner_id: self.ip_owner_id,
                public_dns_name: self.public_dns_name,
                public_ip: self.public_ip,
            }
        }
    }
}
impl InstanceNetworkInterfaceAssociation {
    /// Creates a new builder-style object to manufacture [`InstanceNetworkInterfaceAssociation`](crate::model::InstanceNetworkInterfaceAssociation).
    pub fn builder() -> crate::model::instance_network_interface_association::Builder {
        crate::model::instance_network_interface_association::Builder::default()
    }
}

/// <p>Describes an IPv6 address.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InstanceIpv6Address {
    /// <p>The IPv6 address.</p>
    #[doc(hidden)]
    pub ipv6_address: std::option::Option<std::string::String>,
}
impl InstanceIpv6Address {
    /// <p>The IPv6 address.</p>
    pub fn ipv6_address(&self) -> std::option::Option<&str> {
        self.ipv6_address.as_deref()
    }
}
/// See [`InstanceIpv6Address`](crate::model::InstanceIpv6Address).
pub mod instance_ipv6_address {

    /// A builder for [`InstanceIpv6Address`](crate::model::InstanceIpv6Address).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) ipv6_address: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The IPv6 address.</p>
        pub fn ipv6_address(mut self, input: impl Into<std::string::String>) -> Self {
            self.ipv6_address = Some(input.into());
            self
        }
        /// <p>The IPv6 address.</p>
        pub fn set_ipv6_address(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.ipv6_address = input;
            self
        }
        /// Consumes the builder and constructs a [`InstanceIpv6Address`](crate::model::InstanceIpv6Address).
        pub fn build(self) -> crate::model::InstanceIpv6Address {
            crate::model::InstanceIpv6Address {
                ipv6_address: self.ipv6_address,
            }
        }
    }
}
impl InstanceIpv6Address {
    /// Creates a new builder-style object to manufacture [`InstanceIpv6Address`](crate::model::InstanceIpv6Address).
    pub fn builder() -> crate::model::instance_ipv6_address::Builder {
        crate::model::instance_ipv6_address::Builder::default()
    }
}

/// <p>Describes a network interface attachment.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InstanceNetworkInterfaceAttachment {
    /// <p>The time stamp when the attachment initiated.</p>
    #[doc(hidden)]
    pub attach_time: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The ID of the network interface attachment.</p>
    #[doc(hidden)]
    pub attachment_id: std::option::Option<std::string::String>,
    /// <p>Indicates whether the network interface is deleted when the instance is terminated.</p>
    #[doc(hidden)]
    pub delete_on_termination: std::option::Option<bool>,
    /// <p>The index of the device on the instance for the network interface attachment.</p>
    #[doc(hidden)]
    pub device_index: std::option::Option<i32>,
    /// <p>The attachment state.</p>
    #[doc(hidden)]
    pub status: std::option::Option<crate::model::AttachmentStatus>,
    /// <p>The index of the network card.</p>
    #[doc(hidden)]
    pub network_card_index: std::option::Option<i32>,
}
impl InstanceNetworkInterfaceAttachment {
    /// <p>The time stamp when the attachment initiated.</p>
    pub fn attach_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.attach_time.as_ref()
    }
    /// <p>The ID of the network interface attachment.</p>
    pub fn attachment_id(&self) -> std::option::Option<&str> {
        self.attachment_id.as_deref()
    }
    /// <p>Indicates whether the network interface is deleted when the instance is terminated.</p>
    pub fn delete_on_termination(&self) -> std::option::Option<bool> {
        self.delete_on_termination
    }
    /// <p>The index of the device on the instance for the network interface attachment.</p>
    pub fn device_index(&self) -> std::option::Option<i32> {
        self.device_index
    }
    /// <p>The attachment state.</p>
    pub fn status(&self) -> std::option::Option<&crate::model::AttachmentStatus> {
        self.status.as_ref()
    }
    /// <p>The index of the network card.</p>
    pub fn network_card_index(&self) -> std::option::Option<i32> {
        self.network_card_index
    }
}
/// See [`InstanceNetworkInterfaceAttachment`](crate::model::InstanceNetworkInterfaceAttachment).
pub mod instance_network_interface_attachment {

    /// A builder for [`InstanceNetworkInterfaceAttachment`](crate::model::InstanceNetworkInterfaceAttachment).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) attach_time: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) attachment_id: std::option::Option<std::string::String>,
        pub(crate) delete_on_termination: std::option::Option<bool>,
        pub(crate) device_index: std::option::Option<i32>,
        pub(crate) status: std::option::Option<crate::model::AttachmentStatus>,
        pub(crate) network_card_index: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>The time stamp when the attachment initiated.</p>
        pub fn attach_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.attach_time = Some(input);
            self
        }
        /// <p>The time stamp when the attachment initiated.</p>
        pub fn set_attach_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.attach_time = input;
            self
        }
        /// <p>The ID of the network interface attachment.</p>
        pub fn attachment_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.attachment_id = Some(input.into());
            self
        }
        /// <p>The ID of the network interface attachment.</p>
        pub fn set_attachment_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.attachment_id = input;
            self
        }
        /// <p>Indicates whether the network interface is deleted when the instance is terminated.</p>
        pub fn delete_on_termination(mut self, input: bool) -> Self {
            self.delete_on_termination = Some(input);
            self
        }
        /// <p>Indicates whether the network interface is deleted when the instance is terminated.</p>
        pub fn set_delete_on_termination(mut self, input: std::option::Option<bool>) -> Self {
            self.delete_on_termination = input;
            self
        }
        /// <p>The index of the device on the instance for the network interface attachment.</p>
        pub fn device_index(mut self, input: i32) -> Self {
            self.device_index = Some(input);
            self
        }
        /// <p>The index of the device on the instance for the network interface attachment.</p>
        pub fn set_device_index(mut self, input: std::option::Option<i32>) -> Self {
            self.device_index = input;
            self
        }
        /// <p>The attachment state.</p>
        pub fn status(mut self, input: crate::model::AttachmentStatus) -> Self {
            self.status = Some(input);
            self
        }
        /// <p>The attachment state.</p>
        pub fn set_status(
            mut self,
            input: std::option::Option<crate::model::AttachmentStatus>,
        ) -> Self {
            self.status = input;
            self
        }
        /// <p>The index of the network card.</p>
        pub fn network_card_index(mut self, input: i32) -> Self {
            self.network_card_index = Some(input);
            self
        }
        /// <p>The index of the network card.</p>
        pub fn set_network_card_index(mut self, input: std::option::Option<i32>) -> Self {
            self.network_card_index = input;
            self
        }
        /// Consumes the builder and constructs a [`InstanceNetworkInterfaceAttachment`](crate::model::InstanceNetworkInterfaceAttachment).
        pub fn build(self) -> crate::model::InstanceNetworkInterfaceAttachment {
            crate::model::InstanceNetworkInterfaceAttachment {
                attach_time: self.attach_time,
                attachment_id: self.attachment_id,
                delete_on_termination: self.delete_on_termination,
                device_index: self.device_index,
                status: self.status,
                network_card_index: self.network_card_index,
            }
        }
    }
}
impl InstanceNetworkInterfaceAttachment {
    /// Creates a new builder-style object to manufacture [`InstanceNetworkInterfaceAttachment`](crate::model::InstanceNetworkInterfaceAttachment).
    pub fn builder() -> crate::model::instance_network_interface_attachment::Builder {
        crate::model::instance_network_interface_attachment::Builder::default()
    }
}

/// When writing a match expression against `AttachmentStatus`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let attachmentstatus = unimplemented!();
/// match attachmentstatus {
///     AttachmentStatus::Attached => { /* ... */ },
///     AttachmentStatus::Attaching => { /* ... */ },
///     AttachmentStatus::Detached => { /* ... */ },
///     AttachmentStatus::Detaching => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `attachmentstatus` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `AttachmentStatus::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `AttachmentStatus::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `AttachmentStatus::NewFeature` is defined.
/// Specifically, when `attachmentstatus` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `AttachmentStatus::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 AttachmentStatus {
    #[allow(missing_docs)] // documentation missing in model
    Attached,
    #[allow(missing_docs)] // documentation missing in model
    Attaching,
    #[allow(missing_docs)] // documentation missing in model
    Detached,
    #[allow(missing_docs)] // documentation missing in model
    Detaching,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for AttachmentStatus {
    fn from(s: &str) -> Self {
        match s {
            "attached" => AttachmentStatus::Attached,
            "attaching" => AttachmentStatus::Attaching,
            "detached" => AttachmentStatus::Detached,
            "detaching" => AttachmentStatus::Detaching,
            other => AttachmentStatus::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for AttachmentStatus {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(AttachmentStatus::from(s))
    }
}
impl AttachmentStatus {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            AttachmentStatus::Attached => "attached",
            AttachmentStatus::Attaching => "attaching",
            AttachmentStatus::Detached => "detached",
            AttachmentStatus::Detaching => "detaching",
            AttachmentStatus::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["attached", "attaching", "detached", "detaching"]
    }
}
impl AsRef<str> for AttachmentStatus {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p> Describes the association between an instance and an elastic inference accelerator. </p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ElasticInferenceAcceleratorAssociation {
    /// <p> The Amazon Resource Name (ARN) of the elastic inference accelerator. </p>
    #[doc(hidden)]
    pub elastic_inference_accelerator_arn: std::option::Option<std::string::String>,
    /// <p> The ID of the association. </p>
    #[doc(hidden)]
    pub elastic_inference_accelerator_association_id: std::option::Option<std::string::String>,
    /// <p> The state of the elastic inference accelerator. </p>
    #[doc(hidden)]
    pub elastic_inference_accelerator_association_state: std::option::Option<std::string::String>,
    /// <p> The time at which the elastic inference accelerator is associated with an instance. </p>
    #[doc(hidden)]
    pub elastic_inference_accelerator_association_time:
        std::option::Option<aws_smithy_types::DateTime>,
}
impl ElasticInferenceAcceleratorAssociation {
    /// <p> The Amazon Resource Name (ARN) of the elastic inference accelerator. </p>
    pub fn elastic_inference_accelerator_arn(&self) -> std::option::Option<&str> {
        self.elastic_inference_accelerator_arn.as_deref()
    }
    /// <p> The ID of the association. </p>
    pub fn elastic_inference_accelerator_association_id(&self) -> std::option::Option<&str> {
        self.elastic_inference_accelerator_association_id.as_deref()
    }
    /// <p> The state of the elastic inference accelerator. </p>
    pub fn elastic_inference_accelerator_association_state(&self) -> std::option::Option<&str> {
        self.elastic_inference_accelerator_association_state
            .as_deref()
    }
    /// <p> The time at which the elastic inference accelerator is associated with an instance. </p>
    pub fn elastic_inference_accelerator_association_time(
        &self,
    ) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.elastic_inference_accelerator_association_time.as_ref()
    }
}
/// See [`ElasticInferenceAcceleratorAssociation`](crate::model::ElasticInferenceAcceleratorAssociation).
pub mod elastic_inference_accelerator_association {

    /// A builder for [`ElasticInferenceAcceleratorAssociation`](crate::model::ElasticInferenceAcceleratorAssociation).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) elastic_inference_accelerator_arn: std::option::Option<std::string::String>,
        pub(crate) elastic_inference_accelerator_association_id:
            std::option::Option<std::string::String>,
        pub(crate) elastic_inference_accelerator_association_state:
            std::option::Option<std::string::String>,
        pub(crate) elastic_inference_accelerator_association_time:
            std::option::Option<aws_smithy_types::DateTime>,
    }
    impl Builder {
        /// <p> The Amazon Resource Name (ARN) of the elastic inference accelerator. </p>
        pub fn elastic_inference_accelerator_arn(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.elastic_inference_accelerator_arn = Some(input.into());
            self
        }
        /// <p> The Amazon Resource Name (ARN) of the elastic inference accelerator. </p>
        pub fn set_elastic_inference_accelerator_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.elastic_inference_accelerator_arn = input;
            self
        }
        /// <p> The ID of the association. </p>
        pub fn elastic_inference_accelerator_association_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.elastic_inference_accelerator_association_id = Some(input.into());
            self
        }
        /// <p> The ID of the association. </p>
        pub fn set_elastic_inference_accelerator_association_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.elastic_inference_accelerator_association_id = input;
            self
        }
        /// <p> The state of the elastic inference accelerator. </p>
        pub fn elastic_inference_accelerator_association_state(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.elastic_inference_accelerator_association_state = Some(input.into());
            self
        }
        /// <p> The state of the elastic inference accelerator. </p>
        pub fn set_elastic_inference_accelerator_association_state(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.elastic_inference_accelerator_association_state = input;
            self
        }
        /// <p> The time at which the elastic inference accelerator is associated with an instance. </p>
        pub fn elastic_inference_accelerator_association_time(
            mut self,
            input: aws_smithy_types::DateTime,
        ) -> Self {
            self.elastic_inference_accelerator_association_time = Some(input);
            self
        }
        /// <p> The time at which the elastic inference accelerator is associated with an instance. </p>
        pub fn set_elastic_inference_accelerator_association_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.elastic_inference_accelerator_association_time = input;
            self
        }
        /// Consumes the builder and constructs a [`ElasticInferenceAcceleratorAssociation`](crate::model::ElasticInferenceAcceleratorAssociation).
        pub fn build(self) -> crate::model::ElasticInferenceAcceleratorAssociation {
            crate::model::ElasticInferenceAcceleratorAssociation {
                elastic_inference_accelerator_arn: self.elastic_inference_accelerator_arn,
                elastic_inference_accelerator_association_id: self
                    .elastic_inference_accelerator_association_id,
                elastic_inference_accelerator_association_state: self
                    .elastic_inference_accelerator_association_state,
                elastic_inference_accelerator_association_time: self
                    .elastic_inference_accelerator_association_time,
            }
        }
    }
}
impl ElasticInferenceAcceleratorAssociation {
    /// Creates a new builder-style object to manufacture [`ElasticInferenceAcceleratorAssociation`](crate::model::ElasticInferenceAcceleratorAssociation).
    pub fn builder() -> crate::model::elastic_inference_accelerator_association::Builder {
        crate::model::elastic_inference_accelerator_association::Builder::default()
    }
}

/// <p>Describes the association between an instance and an Elastic Graphics accelerator.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ElasticGpuAssociation {
    /// <p>The ID of the Elastic Graphics accelerator.</p>
    #[doc(hidden)]
    pub elastic_gpu_id: std::option::Option<std::string::String>,
    /// <p>The ID of the association.</p>
    #[doc(hidden)]
    pub elastic_gpu_association_id: std::option::Option<std::string::String>,
    /// <p>The state of the association between the instance and the Elastic Graphics accelerator.</p>
    #[doc(hidden)]
    pub elastic_gpu_association_state: std::option::Option<std::string::String>,
    /// <p>The time the Elastic Graphics accelerator was associated with the instance.</p>
    #[doc(hidden)]
    pub elastic_gpu_association_time: std::option::Option<std::string::String>,
}
impl ElasticGpuAssociation {
    /// <p>The ID of the Elastic Graphics accelerator.</p>
    pub fn elastic_gpu_id(&self) -> std::option::Option<&str> {
        self.elastic_gpu_id.as_deref()
    }
    /// <p>The ID of the association.</p>
    pub fn elastic_gpu_association_id(&self) -> std::option::Option<&str> {
        self.elastic_gpu_association_id.as_deref()
    }
    /// <p>The state of the association between the instance and the Elastic Graphics accelerator.</p>
    pub fn elastic_gpu_association_state(&self) -> std::option::Option<&str> {
        self.elastic_gpu_association_state.as_deref()
    }
    /// <p>The time the Elastic Graphics accelerator was associated with the instance.</p>
    pub fn elastic_gpu_association_time(&self) -> std::option::Option<&str> {
        self.elastic_gpu_association_time.as_deref()
    }
}
/// See [`ElasticGpuAssociation`](crate::model::ElasticGpuAssociation).
pub mod elastic_gpu_association {

    /// A builder for [`ElasticGpuAssociation`](crate::model::ElasticGpuAssociation).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) elastic_gpu_id: std::option::Option<std::string::String>,
        pub(crate) elastic_gpu_association_id: std::option::Option<std::string::String>,
        pub(crate) elastic_gpu_association_state: std::option::Option<std::string::String>,
        pub(crate) elastic_gpu_association_time: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The ID of the Elastic Graphics accelerator.</p>
        pub fn elastic_gpu_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.elastic_gpu_id = Some(input.into());
            self
        }
        /// <p>The ID of the Elastic Graphics accelerator.</p>
        pub fn set_elastic_gpu_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.elastic_gpu_id = input;
            self
        }
        /// <p>The ID of the association.</p>
        pub fn elastic_gpu_association_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.elastic_gpu_association_id = Some(input.into());
            self
        }
        /// <p>The ID of the association.</p>
        pub fn set_elastic_gpu_association_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.elastic_gpu_association_id = input;
            self
        }
        /// <p>The state of the association between the instance and the Elastic Graphics accelerator.</p>
        pub fn elastic_gpu_association_state(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.elastic_gpu_association_state = Some(input.into());
            self
        }
        /// <p>The state of the association between the instance and the Elastic Graphics accelerator.</p>
        pub fn set_elastic_gpu_association_state(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.elastic_gpu_association_state = input;
            self
        }
        /// <p>The time the Elastic Graphics accelerator was associated with the instance.</p>
        pub fn elastic_gpu_association_time(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.elastic_gpu_association_time = Some(input.into());
            self
        }
        /// <p>The time the Elastic Graphics accelerator was associated with the instance.</p>
        pub fn set_elastic_gpu_association_time(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.elastic_gpu_association_time = input;
            self
        }
        /// Consumes the builder and constructs a [`ElasticGpuAssociation`](crate::model::ElasticGpuAssociation).
        pub fn build(self) -> crate::model::ElasticGpuAssociation {
            crate::model::ElasticGpuAssociation {
                elastic_gpu_id: self.elastic_gpu_id,
                elastic_gpu_association_id: self.elastic_gpu_association_id,
                elastic_gpu_association_state: self.elastic_gpu_association_state,
                elastic_gpu_association_time: self.elastic_gpu_association_time,
            }
        }
    }
}
impl ElasticGpuAssociation {
    /// Creates a new builder-style object to manufacture [`ElasticGpuAssociation`](crate::model::ElasticGpuAssociation).
    pub fn builder() -> crate::model::elastic_gpu_association::Builder {
        crate::model::elastic_gpu_association::Builder::default()
    }
}

/// When writing a match expression against `InstanceLifecycleType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let instancelifecycletype = unimplemented!();
/// match instancelifecycletype {
///     InstanceLifecycleType::Scheduled => { /* ... */ },
///     InstanceLifecycleType::Spot => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `instancelifecycletype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `InstanceLifecycleType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `InstanceLifecycleType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `InstanceLifecycleType::NewFeature` is defined.
/// Specifically, when `instancelifecycletype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `InstanceLifecycleType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 InstanceLifecycleType {
    #[allow(missing_docs)] // documentation missing in model
    Scheduled,
    #[allow(missing_docs)] // documentation missing in model
    Spot,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for InstanceLifecycleType {
    fn from(s: &str) -> Self {
        match s {
            "scheduled" => InstanceLifecycleType::Scheduled,
            "spot" => InstanceLifecycleType::Spot,
            other => {
                InstanceLifecycleType::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for InstanceLifecycleType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(InstanceLifecycleType::from(s))
    }
}
impl InstanceLifecycleType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            InstanceLifecycleType::Scheduled => "scheduled",
            InstanceLifecycleType::Spot => "spot",
            InstanceLifecycleType::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["scheduled", "spot"]
    }
}
impl AsRef<str> for InstanceLifecycleType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes an IAM instance profile.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct IamInstanceProfile {
    /// <p>The Amazon Resource Name (ARN) of the instance profile.</p>
    #[doc(hidden)]
    pub arn: std::option::Option<std::string::String>,
    /// <p>The ID of the instance profile.</p>
    #[doc(hidden)]
    pub id: std::option::Option<std::string::String>,
}
impl IamInstanceProfile {
    /// <p>The Amazon Resource Name (ARN) of the instance profile.</p>
    pub fn arn(&self) -> std::option::Option<&str> {
        self.arn.as_deref()
    }
    /// <p>The ID of the instance profile.</p>
    pub fn id(&self) -> std::option::Option<&str> {
        self.id.as_deref()
    }
}
/// See [`IamInstanceProfile`](crate::model::IamInstanceProfile).
pub mod iam_instance_profile {

    /// A builder for [`IamInstanceProfile`](crate::model::IamInstanceProfile).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) arn: std::option::Option<std::string::String>,
        pub(crate) id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The Amazon Resource Name (ARN) of the instance profile.</p>
        pub fn arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.arn = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the instance profile.</p>
        pub fn set_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.arn = input;
            self
        }
        /// <p>The ID of the instance profile.</p>
        pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
            self.id = Some(input.into());
            self
        }
        /// <p>The ID of the instance profile.</p>
        pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.id = input;
            self
        }
        /// Consumes the builder and constructs a [`IamInstanceProfile`](crate::model::IamInstanceProfile).
        pub fn build(self) -> crate::model::IamInstanceProfile {
            crate::model::IamInstanceProfile {
                arn: self.arn,
                id: self.id,
            }
        }
    }
}
impl IamInstanceProfile {
    /// Creates a new builder-style object to manufacture [`IamInstanceProfile`](crate::model::IamInstanceProfile).
    pub fn builder() -> crate::model::iam_instance_profile::Builder {
        crate::model::iam_instance_profile::Builder::default()
    }
}

/// When writing a match expression against `HypervisorType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let hypervisortype = unimplemented!();
/// match hypervisortype {
///     HypervisorType::Ovm => { /* ... */ },
///     HypervisorType::Xen => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `hypervisortype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `HypervisorType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `HypervisorType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `HypervisorType::NewFeature` is defined.
/// Specifically, when `hypervisortype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `HypervisorType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 HypervisorType {
    #[allow(missing_docs)] // documentation missing in model
    Ovm,
    #[allow(missing_docs)] // documentation missing in model
    Xen,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for HypervisorType {
    fn from(s: &str) -> Self {
        match s {
            "ovm" => HypervisorType::Ovm,
            "xen" => HypervisorType::Xen,
            other => HypervisorType::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for HypervisorType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(HypervisorType::from(s))
    }
}
impl HypervisorType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            HypervisorType::Ovm => "ovm",
            HypervisorType::Xen => "xen",
            HypervisorType::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["ovm", "xen"]
    }
}
impl AsRef<str> for HypervisorType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes a block device mapping.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InstanceBlockDeviceMapping {
    /// <p>The device name (for example, <code>/dev/sdh</code> or <code>xvdh</code>).</p>
    #[doc(hidden)]
    pub device_name: std::option::Option<std::string::String>,
    /// <p>Parameters used to automatically set up EBS volumes when the instance is launched.</p>
    #[doc(hidden)]
    pub ebs: std::option::Option<crate::model::EbsInstanceBlockDevice>,
}
impl InstanceBlockDeviceMapping {
    /// <p>The device name (for example, <code>/dev/sdh</code> or <code>xvdh</code>).</p>
    pub fn device_name(&self) -> std::option::Option<&str> {
        self.device_name.as_deref()
    }
    /// <p>Parameters used to automatically set up EBS volumes when the instance is launched.</p>
    pub fn ebs(&self) -> std::option::Option<&crate::model::EbsInstanceBlockDevice> {
        self.ebs.as_ref()
    }
}
/// See [`InstanceBlockDeviceMapping`](crate::model::InstanceBlockDeviceMapping).
pub mod instance_block_device_mapping {

    /// A builder for [`InstanceBlockDeviceMapping`](crate::model::InstanceBlockDeviceMapping).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) device_name: std::option::Option<std::string::String>,
        pub(crate) ebs: std::option::Option<crate::model::EbsInstanceBlockDevice>,
    }
    impl Builder {
        /// <p>The device name (for example, <code>/dev/sdh</code> or <code>xvdh</code>).</p>
        pub fn device_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.device_name = Some(input.into());
            self
        }
        /// <p>The device name (for example, <code>/dev/sdh</code> or <code>xvdh</code>).</p>
        pub fn set_device_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.device_name = input;
            self
        }
        /// <p>Parameters used to automatically set up EBS volumes when the instance is launched.</p>
        pub fn ebs(mut self, input: crate::model::EbsInstanceBlockDevice) -> Self {
            self.ebs = Some(input);
            self
        }
        /// <p>Parameters used to automatically set up EBS volumes when the instance is launched.</p>
        pub fn set_ebs(
            mut self,
            input: std::option::Option<crate::model::EbsInstanceBlockDevice>,
        ) -> Self {
            self.ebs = input;
            self
        }
        /// Consumes the builder and constructs a [`InstanceBlockDeviceMapping`](crate::model::InstanceBlockDeviceMapping).
        pub fn build(self) -> crate::model::InstanceBlockDeviceMapping {
            crate::model::InstanceBlockDeviceMapping {
                device_name: self.device_name,
                ebs: self.ebs,
            }
        }
    }
}
impl InstanceBlockDeviceMapping {
    /// Creates a new builder-style object to manufacture [`InstanceBlockDeviceMapping`](crate::model::InstanceBlockDeviceMapping).
    pub fn builder() -> crate::model::instance_block_device_mapping::Builder {
        crate::model::instance_block_device_mapping::Builder::default()
    }
}

/// <p>Describes a parameter used to set up an EBS volume in a block device mapping.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct EbsInstanceBlockDevice {
    /// <p>The time stamp when the attachment initiated.</p>
    #[doc(hidden)]
    pub attach_time: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>Indicates whether the volume is deleted on instance termination.</p>
    #[doc(hidden)]
    pub delete_on_termination: std::option::Option<bool>,
    /// <p>The attachment state.</p>
    #[doc(hidden)]
    pub status: std::option::Option<crate::model::AttachmentStatus>,
    /// <p>The ID of the EBS volume.</p>
    #[doc(hidden)]
    pub volume_id: std::option::Option<std::string::String>,
}
impl EbsInstanceBlockDevice {
    /// <p>The time stamp when the attachment initiated.</p>
    pub fn attach_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.attach_time.as_ref()
    }
    /// <p>Indicates whether the volume is deleted on instance termination.</p>
    pub fn delete_on_termination(&self) -> std::option::Option<bool> {
        self.delete_on_termination
    }
    /// <p>The attachment state.</p>
    pub fn status(&self) -> std::option::Option<&crate::model::AttachmentStatus> {
        self.status.as_ref()
    }
    /// <p>The ID of the EBS volume.</p>
    pub fn volume_id(&self) -> std::option::Option<&str> {
        self.volume_id.as_deref()
    }
}
/// See [`EbsInstanceBlockDevice`](crate::model::EbsInstanceBlockDevice).
pub mod ebs_instance_block_device {

    /// A builder for [`EbsInstanceBlockDevice`](crate::model::EbsInstanceBlockDevice).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) attach_time: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) delete_on_termination: std::option::Option<bool>,
        pub(crate) status: std::option::Option<crate::model::AttachmentStatus>,
        pub(crate) volume_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The time stamp when the attachment initiated.</p>
        pub fn attach_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.attach_time = Some(input);
            self
        }
        /// <p>The time stamp when the attachment initiated.</p>
        pub fn set_attach_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.attach_time = input;
            self
        }
        /// <p>Indicates whether the volume is deleted on instance termination.</p>
        pub fn delete_on_termination(mut self, input: bool) -> Self {
            self.delete_on_termination = Some(input);
            self
        }
        /// <p>Indicates whether the volume is deleted on instance termination.</p>
        pub fn set_delete_on_termination(mut self, input: std::option::Option<bool>) -> Self {
            self.delete_on_termination = input;
            self
        }
        /// <p>The attachment state.</p>
        pub fn status(mut self, input: crate::model::AttachmentStatus) -> Self {
            self.status = Some(input);
            self
        }
        /// <p>The attachment state.</p>
        pub fn set_status(
            mut self,
            input: std::option::Option<crate::model::AttachmentStatus>,
        ) -> Self {
            self.status = input;
            self
        }
        /// <p>The ID of the EBS volume.</p>
        pub fn volume_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.volume_id = Some(input.into());
            self
        }
        /// <p>The ID of the EBS volume.</p>
        pub fn set_volume_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.volume_id = input;
            self
        }
        /// Consumes the builder and constructs a [`EbsInstanceBlockDevice`](crate::model::EbsInstanceBlockDevice).
        pub fn build(self) -> crate::model::EbsInstanceBlockDevice {
            crate::model::EbsInstanceBlockDevice {
                attach_time: self.attach_time,
                delete_on_termination: self.delete_on_termination,
                status: self.status,
                volume_id: self.volume_id,
            }
        }
    }
}
impl EbsInstanceBlockDevice {
    /// Creates a new builder-style object to manufacture [`EbsInstanceBlockDevice`](crate::model::EbsInstanceBlockDevice).
    pub fn builder() -> crate::model::ebs_instance_block_device::Builder {
        crate::model::ebs_instance_block_device::Builder::default()
    }
}

/// When writing a match expression against `ArchitectureValues`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let architecturevalues = unimplemented!();
/// match architecturevalues {
///     ArchitectureValues::Arm64 => { /* ... */ },
///     ArchitectureValues::Arm64Mac => { /* ... */ },
///     ArchitectureValues::I386 => { /* ... */ },
///     ArchitectureValues::X8664 => { /* ... */ },
///     ArchitectureValues::X8664Mac => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `architecturevalues` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `ArchitectureValues::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `ArchitectureValues::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `ArchitectureValues::NewFeature` is defined.
/// Specifically, when `architecturevalues` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `ArchitectureValues::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 ArchitectureValues {
    #[allow(missing_docs)] // documentation missing in model
    Arm64,
    #[allow(missing_docs)] // documentation missing in model
    Arm64Mac,
    #[allow(missing_docs)] // documentation missing in model
    I386,
    #[allow(missing_docs)] // documentation missing in model
    X8664,
    #[allow(missing_docs)] // documentation missing in model
    X8664Mac,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for ArchitectureValues {
    fn from(s: &str) -> Self {
        match s {
            "arm64" => ArchitectureValues::Arm64,
            "arm64_mac" => ArchitectureValues::Arm64Mac,
            "i386" => ArchitectureValues::I386,
            "x86_64" => ArchitectureValues::X8664,
            "x86_64_mac" => ArchitectureValues::X8664Mac,
            other => {
                ArchitectureValues::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for ArchitectureValues {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(ArchitectureValues::from(s))
    }
}
impl ArchitectureValues {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            ArchitectureValues::Arm64 => "arm64",
            ArchitectureValues::Arm64Mac => "arm64_mac",
            ArchitectureValues::I386 => "i386",
            ArchitectureValues::X8664 => "x86_64",
            ArchitectureValues::X8664Mac => "x86_64_mac",
            ArchitectureValues::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["arm64", "arm64_mac", "i386", "x86_64", "x86_64_mac"]
    }
}
impl AsRef<str> for ArchitectureValues {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes a product code.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ProductCode {
    /// <p>The product code.</p>
    #[doc(hidden)]
    pub product_code_id: std::option::Option<std::string::String>,
    /// <p>The type of product code.</p>
    #[doc(hidden)]
    pub product_code_type: std::option::Option<crate::model::ProductCodeValues>,
}
impl ProductCode {
    /// <p>The product code.</p>
    pub fn product_code_id(&self) -> std::option::Option<&str> {
        self.product_code_id.as_deref()
    }
    /// <p>The type of product code.</p>
    pub fn product_code_type(&self) -> std::option::Option<&crate::model::ProductCodeValues> {
        self.product_code_type.as_ref()
    }
}
/// See [`ProductCode`](crate::model::ProductCode).
pub mod product_code {

    /// A builder for [`ProductCode`](crate::model::ProductCode).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) product_code_id: std::option::Option<std::string::String>,
        pub(crate) product_code_type: std::option::Option<crate::model::ProductCodeValues>,
    }
    impl Builder {
        /// <p>The product code.</p>
        pub fn product_code_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.product_code_id = Some(input.into());
            self
        }
        /// <p>The product code.</p>
        pub fn set_product_code_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.product_code_id = input;
            self
        }
        /// <p>The type of product code.</p>
        pub fn product_code_type(mut self, input: crate::model::ProductCodeValues) -> Self {
            self.product_code_type = Some(input);
            self
        }
        /// <p>The type of product code.</p>
        pub fn set_product_code_type(
            mut self,
            input: std::option::Option<crate::model::ProductCodeValues>,
        ) -> Self {
            self.product_code_type = input;
            self
        }
        /// Consumes the builder and constructs a [`ProductCode`](crate::model::ProductCode).
        pub fn build(self) -> crate::model::ProductCode {
            crate::model::ProductCode {
                product_code_id: self.product_code_id,
                product_code_type: self.product_code_type,
            }
        }
    }
}
impl ProductCode {
    /// Creates a new builder-style object to manufacture [`ProductCode`](crate::model::ProductCode).
    pub fn builder() -> crate::model::product_code::Builder {
        crate::model::product_code::Builder::default()
    }
}

/// When writing a match expression against `ProductCodeValues`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let productcodevalues = unimplemented!();
/// match productcodevalues {
///     ProductCodeValues::Devpay => { /* ... */ },
///     ProductCodeValues::Marketplace => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `productcodevalues` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `ProductCodeValues::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `ProductCodeValues::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `ProductCodeValues::NewFeature` is defined.
/// Specifically, when `productcodevalues` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `ProductCodeValues::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 ProductCodeValues {
    #[allow(missing_docs)] // documentation missing in model
    Devpay,
    #[allow(missing_docs)] // documentation missing in model
    Marketplace,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for ProductCodeValues {
    fn from(s: &str) -> Self {
        match s {
            "devpay" => ProductCodeValues::Devpay,
            "marketplace" => ProductCodeValues::Marketplace,
            other => {
                ProductCodeValues::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for ProductCodeValues {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(ProductCodeValues::from(s))
    }
}
impl ProductCodeValues {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            ProductCodeValues::Devpay => "devpay",
            ProductCodeValues::Marketplace => "marketplace",
            ProductCodeValues::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["devpay", "marketplace"]
    }
}
impl AsRef<str> for ProductCodeValues {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `PlatformValues`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let platformvalues = unimplemented!();
/// match platformvalues {
///     PlatformValues::Windows => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `platformvalues` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `PlatformValues::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `PlatformValues::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `PlatformValues::NewFeature` is defined.
/// Specifically, when `platformvalues` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `PlatformValues::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 PlatformValues {
    #[allow(missing_docs)] // documentation missing in model
    Windows,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for PlatformValues {
    fn from(s: &str) -> Self {
        match s {
            "Windows" => PlatformValues::Windows,
            other => PlatformValues::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for PlatformValues {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(PlatformValues::from(s))
    }
}
impl PlatformValues {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            PlatformValues::Windows => "Windows",
            PlatformValues::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["Windows"]
    }
}
impl AsRef<str> for PlatformValues {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes the placement of an instance.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Placement {
    /// <p>The Availability Zone of the instance.</p>
    /// <p>If not specified, an Availability Zone will be automatically chosen for you based on the load balancing criteria for the Region.</p>
    /// <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet">CreateFleet</a>.</p>
    #[doc(hidden)]
    pub availability_zone: std::option::Option<std::string::String>,
    /// <p>The affinity setting for the instance on the Dedicated Host.</p>
    /// <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet">CreateFleet</a> or <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ImportInstance.html">ImportInstance</a>.</p>
    #[doc(hidden)]
    pub affinity: std::option::Option<std::string::String>,
    /// <p>The name of the placement group that the instance is in. If you specify <code>GroupName</code>, you can't specify <code>GroupId</code>.</p>
    #[doc(hidden)]
    pub group_name: std::option::Option<std::string::String>,
    /// <p>The number of the partition that the instance is in. Valid only if the placement group strategy is set to <code>partition</code>.</p>
    /// <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet">CreateFleet</a>.</p>
    #[doc(hidden)]
    pub partition_number: std::option::Option<i32>,
    /// <p>The ID of the Dedicated Host on which the instance resides.</p>
    /// <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet">CreateFleet</a> or <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ImportInstance.html">ImportInstance</a>.</p>
    #[doc(hidden)]
    pub host_id: std::option::Option<std::string::String>,
    /// <p>The tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of <code>dedicated</code> runs on single-tenant hardware.</p>
    /// <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet">CreateFleet</a>. The <code>host</code> tenancy is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ImportInstance.html">ImportInstance</a> or for T3 instances that are configured for the <code>unlimited</code> CPU credit option.</p>
    #[doc(hidden)]
    pub tenancy: std::option::Option<crate::model::Tenancy>,
    /// <p>Reserved for future use.</p>
    #[doc(hidden)]
    pub spread_domain: std::option::Option<std::string::String>,
    /// <p>The ARN of the host resource group in which to launch the instances.</p>
    /// <p>If you specify this parameter, either omit the <b>Tenancy</b> parameter or set it to <code>host</code>.</p>
    /// <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet">CreateFleet</a>.</p>
    #[doc(hidden)]
    pub host_resource_group_arn: std::option::Option<std::string::String>,
    /// <p>The ID of the placement group that the instance is in. If you specify <code>GroupId</code>, you can't specify <code>GroupName</code>.</p>
    #[doc(hidden)]
    pub group_id: std::option::Option<std::string::String>,
}
impl Placement {
    /// <p>The Availability Zone of the instance.</p>
    /// <p>If not specified, an Availability Zone will be automatically chosen for you based on the load balancing criteria for the Region.</p>
    /// <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet">CreateFleet</a>.</p>
    pub fn availability_zone(&self) -> std::option::Option<&str> {
        self.availability_zone.as_deref()
    }
    /// <p>The affinity setting for the instance on the Dedicated Host.</p>
    /// <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet">CreateFleet</a> or <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ImportInstance.html">ImportInstance</a>.</p>
    pub fn affinity(&self) -> std::option::Option<&str> {
        self.affinity.as_deref()
    }
    /// <p>The name of the placement group that the instance is in. If you specify <code>GroupName</code>, you can't specify <code>GroupId</code>.</p>
    pub fn group_name(&self) -> std::option::Option<&str> {
        self.group_name.as_deref()
    }
    /// <p>The number of the partition that the instance is in. Valid only if the placement group strategy is set to <code>partition</code>.</p>
    /// <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet">CreateFleet</a>.</p>
    pub fn partition_number(&self) -> std::option::Option<i32> {
        self.partition_number
    }
    /// <p>The ID of the Dedicated Host on which the instance resides.</p>
    /// <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet">CreateFleet</a> or <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ImportInstance.html">ImportInstance</a>.</p>
    pub fn host_id(&self) -> std::option::Option<&str> {
        self.host_id.as_deref()
    }
    /// <p>The tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of <code>dedicated</code> runs on single-tenant hardware.</p>
    /// <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet">CreateFleet</a>. The <code>host</code> tenancy is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ImportInstance.html">ImportInstance</a> or for T3 instances that are configured for the <code>unlimited</code> CPU credit option.</p>
    pub fn tenancy(&self) -> std::option::Option<&crate::model::Tenancy> {
        self.tenancy.as_ref()
    }
    /// <p>Reserved for future use.</p>
    pub fn spread_domain(&self) -> std::option::Option<&str> {
        self.spread_domain.as_deref()
    }
    /// <p>The ARN of the host resource group in which to launch the instances.</p>
    /// <p>If you specify this parameter, either omit the <b>Tenancy</b> parameter or set it to <code>host</code>.</p>
    /// <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet">CreateFleet</a>.</p>
    pub fn host_resource_group_arn(&self) -> std::option::Option<&str> {
        self.host_resource_group_arn.as_deref()
    }
    /// <p>The ID of the placement group that the instance is in. If you specify <code>GroupId</code>, you can't specify <code>GroupName</code>.</p>
    pub fn group_id(&self) -> std::option::Option<&str> {
        self.group_id.as_deref()
    }
}
/// See [`Placement`](crate::model::Placement).
pub mod placement {

    /// A builder for [`Placement`](crate::model::Placement).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) availability_zone: std::option::Option<std::string::String>,
        pub(crate) affinity: std::option::Option<std::string::String>,
        pub(crate) group_name: std::option::Option<std::string::String>,
        pub(crate) partition_number: std::option::Option<i32>,
        pub(crate) host_id: std::option::Option<std::string::String>,
        pub(crate) tenancy: std::option::Option<crate::model::Tenancy>,
        pub(crate) spread_domain: std::option::Option<std::string::String>,
        pub(crate) host_resource_group_arn: std::option::Option<std::string::String>,
        pub(crate) group_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The Availability Zone of the instance.</p>
        /// <p>If not specified, an Availability Zone will be automatically chosen for you based on the load balancing criteria for the Region.</p>
        /// <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet">CreateFleet</a>.</p>
        pub fn availability_zone(mut self, input: impl Into<std::string::String>) -> Self {
            self.availability_zone = Some(input.into());
            self
        }
        /// <p>The Availability Zone of the instance.</p>
        /// <p>If not specified, an Availability Zone will be automatically chosen for you based on the load balancing criteria for the Region.</p>
        /// <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet">CreateFleet</a>.</p>
        pub fn set_availability_zone(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.availability_zone = input;
            self
        }
        /// <p>The affinity setting for the instance on the Dedicated Host.</p>
        /// <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet">CreateFleet</a> or <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ImportInstance.html">ImportInstance</a>.</p>
        pub fn affinity(mut self, input: impl Into<std::string::String>) -> Self {
            self.affinity = Some(input.into());
            self
        }
        /// <p>The affinity setting for the instance on the Dedicated Host.</p>
        /// <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet">CreateFleet</a> or <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ImportInstance.html">ImportInstance</a>.</p>
        pub fn set_affinity(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.affinity = input;
            self
        }
        /// <p>The name of the placement group that the instance is in. If you specify <code>GroupName</code>, you can't specify <code>GroupId</code>.</p>
        pub fn group_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.group_name = Some(input.into());
            self
        }
        /// <p>The name of the placement group that the instance is in. If you specify <code>GroupName</code>, you can't specify <code>GroupId</code>.</p>
        pub fn set_group_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.group_name = input;
            self
        }
        /// <p>The number of the partition that the instance is in. Valid only if the placement group strategy is set to <code>partition</code>.</p>
        /// <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet">CreateFleet</a>.</p>
        pub fn partition_number(mut self, input: i32) -> Self {
            self.partition_number = Some(input);
            self
        }
        /// <p>The number of the partition that the instance is in. Valid only if the placement group strategy is set to <code>partition</code>.</p>
        /// <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet">CreateFleet</a>.</p>
        pub fn set_partition_number(mut self, input: std::option::Option<i32>) -> Self {
            self.partition_number = input;
            self
        }
        /// <p>The ID of the Dedicated Host on which the instance resides.</p>
        /// <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet">CreateFleet</a> or <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ImportInstance.html">ImportInstance</a>.</p>
        pub fn host_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.host_id = Some(input.into());
            self
        }
        /// <p>The ID of the Dedicated Host on which the instance resides.</p>
        /// <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet">CreateFleet</a> or <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ImportInstance.html">ImportInstance</a>.</p>
        pub fn set_host_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.host_id = input;
            self
        }
        /// <p>The tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of <code>dedicated</code> runs on single-tenant hardware.</p>
        /// <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet">CreateFleet</a>. The <code>host</code> tenancy is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ImportInstance.html">ImportInstance</a> or for T3 instances that are configured for the <code>unlimited</code> CPU credit option.</p>
        pub fn tenancy(mut self, input: crate::model::Tenancy) -> Self {
            self.tenancy = Some(input);
            self
        }
        /// <p>The tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of <code>dedicated</code> runs on single-tenant hardware.</p>
        /// <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet">CreateFleet</a>. The <code>host</code> tenancy is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ImportInstance.html">ImportInstance</a> or for T3 instances that are configured for the <code>unlimited</code> CPU credit option.</p>
        pub fn set_tenancy(mut self, input: std::option::Option<crate::model::Tenancy>) -> Self {
            self.tenancy = input;
            self
        }
        /// <p>Reserved for future use.</p>
        pub fn spread_domain(mut self, input: impl Into<std::string::String>) -> Self {
            self.spread_domain = Some(input.into());
            self
        }
        /// <p>Reserved for future use.</p>
        pub fn set_spread_domain(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.spread_domain = input;
            self
        }
        /// <p>The ARN of the host resource group in which to launch the instances.</p>
        /// <p>If you specify this parameter, either omit the <b>Tenancy</b> parameter or set it to <code>host</code>.</p>
        /// <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet">CreateFleet</a>.</p>
        pub fn host_resource_group_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.host_resource_group_arn = Some(input.into());
            self
        }
        /// <p>The ARN of the host resource group in which to launch the instances.</p>
        /// <p>If you specify this parameter, either omit the <b>Tenancy</b> parameter or set it to <code>host</code>.</p>
        /// <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet">CreateFleet</a>.</p>
        pub fn set_host_resource_group_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.host_resource_group_arn = input;
            self
        }
        /// <p>The ID of the placement group that the instance is in. If you specify <code>GroupId</code>, you can't specify <code>GroupName</code>.</p>
        pub fn group_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.group_id = Some(input.into());
            self
        }
        /// <p>The ID of the placement group that the instance is in. If you specify <code>GroupId</code>, you can't specify <code>GroupName</code>.</p>
        pub fn set_group_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.group_id = input;
            self
        }
        /// Consumes the builder and constructs a [`Placement`](crate::model::Placement).
        pub fn build(self) -> crate::model::Placement {
            crate::model::Placement {
                availability_zone: self.availability_zone,
                affinity: self.affinity,
                group_name: self.group_name,
                partition_number: self.partition_number,
                host_id: self.host_id,
                tenancy: self.tenancy,
                spread_domain: self.spread_domain,
                host_resource_group_arn: self.host_resource_group_arn,
                group_id: self.group_id,
            }
        }
    }
}
impl Placement {
    /// Creates a new builder-style object to manufacture [`Placement`](crate::model::Placement).
    pub fn builder() -> crate::model::placement::Builder {
        crate::model::placement::Builder::default()
    }
}

/// When writing a match expression against `Tenancy`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let tenancy = unimplemented!();
/// match tenancy {
///     Tenancy::Dedicated => { /* ... */ },
///     Tenancy::Default => { /* ... */ },
///     Tenancy::Host => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `tenancy` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `Tenancy::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `Tenancy::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `Tenancy::NewFeature` is defined.
/// Specifically, when `tenancy` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `Tenancy::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 Tenancy {
    #[allow(missing_docs)] // documentation missing in model
    Dedicated,
    #[allow(missing_docs)] // documentation missing in model
    Default,
    #[allow(missing_docs)] // documentation missing in model
    Host,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for Tenancy {
    fn from(s: &str) -> Self {
        match s {
            "dedicated" => Tenancy::Dedicated,
            "default" => Tenancy::Default,
            "host" => Tenancy::Host,
            other => Tenancy::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for Tenancy {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(Tenancy::from(s))
    }
}
impl Tenancy {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            Tenancy::Dedicated => "dedicated",
            Tenancy::Default => "default",
            Tenancy::Host => "host",
            Tenancy::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["dedicated", "default", "host"]
    }
}
impl AsRef<str> for Tenancy {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `InstanceType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let instancetype = unimplemented!();
/// match instancetype {
///     InstanceType::A12xlarge => { /* ... */ },
///     InstanceType::A14xlarge => { /* ... */ },
///     InstanceType::A1Large => { /* ... */ },
///     InstanceType::A1Medium => { /* ... */ },
///     InstanceType::A1Metal => { /* ... */ },
///     InstanceType::A1Xlarge => { /* ... */ },
///     InstanceType::C1Medium => { /* ... */ },
///     InstanceType::C1Xlarge => { /* ... */ },
///     InstanceType::C32xlarge => { /* ... */ },
///     InstanceType::C34xlarge => { /* ... */ },
///     InstanceType::C38xlarge => { /* ... */ },
///     InstanceType::C3Large => { /* ... */ },
///     InstanceType::C3Xlarge => { /* ... */ },
///     InstanceType::C42xlarge => { /* ... */ },
///     InstanceType::C44xlarge => { /* ... */ },
///     InstanceType::C48xlarge => { /* ... */ },
///     InstanceType::C4Large => { /* ... */ },
///     InstanceType::C4Xlarge => { /* ... */ },
///     InstanceType::C512xlarge => { /* ... */ },
///     InstanceType::C518xlarge => { /* ... */ },
///     InstanceType::C524xlarge => { /* ... */ },
///     InstanceType::C52xlarge => { /* ... */ },
///     InstanceType::C54xlarge => { /* ... */ },
///     InstanceType::C59xlarge => { /* ... */ },
///     InstanceType::C5Large => { /* ... */ },
///     InstanceType::C5Metal => { /* ... */ },
///     InstanceType::C5Xlarge => { /* ... */ },
///     InstanceType::C5a12xlarge => { /* ... */ },
///     InstanceType::C5a16xlarge => { /* ... */ },
///     InstanceType::C5a24xlarge => { /* ... */ },
///     InstanceType::C5a2xlarge => { /* ... */ },
///     InstanceType::C5a4xlarge => { /* ... */ },
///     InstanceType::C5a8xlarge => { /* ... */ },
///     InstanceType::C5aLarge => { /* ... */ },
///     InstanceType::C5aXlarge => { /* ... */ },
///     InstanceType::C5ad12xlarge => { /* ... */ },
///     InstanceType::C5ad16xlarge => { /* ... */ },
///     InstanceType::C5ad24xlarge => { /* ... */ },
///     InstanceType::C5ad2xlarge => { /* ... */ },
///     InstanceType::C5ad4xlarge => { /* ... */ },
///     InstanceType::C5ad8xlarge => { /* ... */ },
///     InstanceType::C5adLarge => { /* ... */ },
///     InstanceType::C5adXlarge => { /* ... */ },
///     InstanceType::C5d12xlarge => { /* ... */ },
///     InstanceType::C5d18xlarge => { /* ... */ },
///     InstanceType::C5d24xlarge => { /* ... */ },
///     InstanceType::C5d2xlarge => { /* ... */ },
///     InstanceType::C5d4xlarge => { /* ... */ },
///     InstanceType::C5d9xlarge => { /* ... */ },
///     InstanceType::C5dLarge => { /* ... */ },
///     InstanceType::C5dMetal => { /* ... */ },
///     InstanceType::C5dXlarge => { /* ... */ },
///     InstanceType::C5n18xlarge => { /* ... */ },
///     InstanceType::C5n2xlarge => { /* ... */ },
///     InstanceType::C5n4xlarge => { /* ... */ },
///     InstanceType::C5n9xlarge => { /* ... */ },
///     InstanceType::C5nLarge => { /* ... */ },
///     InstanceType::C5nMetal => { /* ... */ },
///     InstanceType::C5nXlarge => { /* ... */ },
///     InstanceType::C6a12xlarge => { /* ... */ },
///     InstanceType::C6a16xlarge => { /* ... */ },
///     InstanceType::C6a24xlarge => { /* ... */ },
///     InstanceType::C6a2xlarge => { /* ... */ },
///     InstanceType::C6a32xlarge => { /* ... */ },
///     InstanceType::C6a48xlarge => { /* ... */ },
///     InstanceType::C6a4xlarge => { /* ... */ },
///     InstanceType::C6a8xlarge => { /* ... */ },
///     InstanceType::C6aLarge => { /* ... */ },
///     InstanceType::C6aMetal => { /* ... */ },
///     InstanceType::C6aXlarge => { /* ... */ },
///     InstanceType::C6g12xlarge => { /* ... */ },
///     InstanceType::C6g16xlarge => { /* ... */ },
///     InstanceType::C6g2xlarge => { /* ... */ },
///     InstanceType::C6g4xlarge => { /* ... */ },
///     InstanceType::C6g8xlarge => { /* ... */ },
///     InstanceType::C6gLarge => { /* ... */ },
///     InstanceType::C6gMedium => { /* ... */ },
///     InstanceType::C6gMetal => { /* ... */ },
///     InstanceType::C6gXlarge => { /* ... */ },
///     InstanceType::C6gd12xlarge => { /* ... */ },
///     InstanceType::C6gd16xlarge => { /* ... */ },
///     InstanceType::C6gd2xlarge => { /* ... */ },
///     InstanceType::C6gd4xlarge => { /* ... */ },
///     InstanceType::C6gd8xlarge => { /* ... */ },
///     InstanceType::C6gdLarge => { /* ... */ },
///     InstanceType::C6gdMedium => { /* ... */ },
///     InstanceType::C6gdMetal => { /* ... */ },
///     InstanceType::C6gdXlarge => { /* ... */ },
///     InstanceType::C6gn12xlarge => { /* ... */ },
///     InstanceType::C6gn16xlarge => { /* ... */ },
///     InstanceType::C6gn2xlarge => { /* ... */ },
///     InstanceType::C6gn4xlarge => { /* ... */ },
///     InstanceType::C6gn8xlarge => { /* ... */ },
///     InstanceType::C6gnLarge => { /* ... */ },
///     InstanceType::C6gnMedium => { /* ... */ },
///     InstanceType::C6gnXlarge => { /* ... */ },
///     InstanceType::C6i12xlarge => { /* ... */ },
///     InstanceType::C6i16xlarge => { /* ... */ },
///     InstanceType::C6i24xlarge => { /* ... */ },
///     InstanceType::C6i2xlarge => { /* ... */ },
///     InstanceType::C6i32xlarge => { /* ... */ },
///     InstanceType::C6i4xlarge => { /* ... */ },
///     InstanceType::C6i8xlarge => { /* ... */ },
///     InstanceType::C6iLarge => { /* ... */ },
///     InstanceType::C6iMetal => { /* ... */ },
///     InstanceType::C6iXlarge => { /* ... */ },
///     InstanceType::C6id12xlarge => { /* ... */ },
///     InstanceType::C6id16xlarge => { /* ... */ },
///     InstanceType::C6id24xlarge => { /* ... */ },
///     InstanceType::C6id2xlarge => { /* ... */ },
///     InstanceType::C6id32xlarge => { /* ... */ },
///     InstanceType::C6id4xlarge => { /* ... */ },
///     InstanceType::C6id8xlarge => { /* ... */ },
///     InstanceType::C6idLarge => { /* ... */ },
///     InstanceType::C6idMetal => { /* ... */ },
///     InstanceType::C6idXlarge => { /* ... */ },
///     InstanceType::C6in12xlarge => { /* ... */ },
///     InstanceType::C6in16xlarge => { /* ... */ },
///     InstanceType::C6in24xlarge => { /* ... */ },
///     InstanceType::C6in2xlarge => { /* ... */ },
///     InstanceType::C6in32xlarge => { /* ... */ },
///     InstanceType::C6in4xlarge => { /* ... */ },
///     InstanceType::C6in8xlarge => { /* ... */ },
///     InstanceType::C6inLarge => { /* ... */ },
///     InstanceType::C6inXlarge => { /* ... */ },
///     InstanceType::C7g12xlarge => { /* ... */ },
///     InstanceType::C7g16xlarge => { /* ... */ },
///     InstanceType::C7g2xlarge => { /* ... */ },
///     InstanceType::C7g4xlarge => { /* ... */ },
///     InstanceType::C7g8xlarge => { /* ... */ },
///     InstanceType::C7gLarge => { /* ... */ },
///     InstanceType::C7gMedium => { /* ... */ },
///     InstanceType::C7gXlarge => { /* ... */ },
///     InstanceType::Cc14xlarge => { /* ... */ },
///     InstanceType::Cc28xlarge => { /* ... */ },
///     InstanceType::Cg14xlarge => { /* ... */ },
///     InstanceType::Cr18xlarge => { /* ... */ },
///     InstanceType::D22xlarge => { /* ... */ },
///     InstanceType::D24xlarge => { /* ... */ },
///     InstanceType::D28xlarge => { /* ... */ },
///     InstanceType::D2Xlarge => { /* ... */ },
///     InstanceType::D32xlarge => { /* ... */ },
///     InstanceType::D34xlarge => { /* ... */ },
///     InstanceType::D38xlarge => { /* ... */ },
///     InstanceType::D3Xlarge => { /* ... */ },
///     InstanceType::D3en12xlarge => { /* ... */ },
///     InstanceType::D3en2xlarge => { /* ... */ },
///     InstanceType::D3en4xlarge => { /* ... */ },
///     InstanceType::D3en6xlarge => { /* ... */ },
///     InstanceType::D3en8xlarge => { /* ... */ },
///     InstanceType::D3enXlarge => { /* ... */ },
///     InstanceType::Dl124xlarge => { /* ... */ },
///     InstanceType::F116xlarge => { /* ... */ },
///     InstanceType::F12xlarge => { /* ... */ },
///     InstanceType::F14xlarge => { /* ... */ },
///     InstanceType::G22xlarge => { /* ... */ },
///     InstanceType::G28xlarge => { /* ... */ },
///     InstanceType::G316xlarge => { /* ... */ },
///     InstanceType::G34xlarge => { /* ... */ },
///     InstanceType::G38xlarge => { /* ... */ },
///     InstanceType::G3sXlarge => { /* ... */ },
///     InstanceType::G4ad16xlarge => { /* ... */ },
///     InstanceType::G4ad2xlarge => { /* ... */ },
///     InstanceType::G4ad4xlarge => { /* ... */ },
///     InstanceType::G4ad8xlarge => { /* ... */ },
///     InstanceType::G4adXlarge => { /* ... */ },
///     InstanceType::G4dn12xlarge => { /* ... */ },
///     InstanceType::G4dn16xlarge => { /* ... */ },
///     InstanceType::G4dn2xlarge => { /* ... */ },
///     InstanceType::G4dn4xlarge => { /* ... */ },
///     InstanceType::G4dn8xlarge => { /* ... */ },
///     InstanceType::G4dnMetal => { /* ... */ },
///     InstanceType::G4dnXlarge => { /* ... */ },
///     InstanceType::G512xlarge => { /* ... */ },
///     InstanceType::G516xlarge => { /* ... */ },
///     InstanceType::G524xlarge => { /* ... */ },
///     InstanceType::G52xlarge => { /* ... */ },
///     InstanceType::G548xlarge => { /* ... */ },
///     InstanceType::G54xlarge => { /* ... */ },
///     InstanceType::G58xlarge => { /* ... */ },
///     InstanceType::G5Xlarge => { /* ... */ },
///     InstanceType::G5g16xlarge => { /* ... */ },
///     InstanceType::G5g2xlarge => { /* ... */ },
///     InstanceType::G5g4xlarge => { /* ... */ },
///     InstanceType::G5g8xlarge => { /* ... */ },
///     InstanceType::G5gMetal => { /* ... */ },
///     InstanceType::G5gXlarge => { /* ... */ },
///     InstanceType::H116xlarge => { /* ... */ },
///     InstanceType::H12xlarge => { /* ... */ },
///     InstanceType::H14xlarge => { /* ... */ },
///     InstanceType::H18xlarge => { /* ... */ },
///     InstanceType::Hi14xlarge => { /* ... */ },
///     InstanceType::Hpc6a48xlarge => { /* ... */ },
///     InstanceType::Hpc6id32xlarge => { /* ... */ },
///     InstanceType::Hs18xlarge => { /* ... */ },
///     InstanceType::I22xlarge => { /* ... */ },
///     InstanceType::I24xlarge => { /* ... */ },
///     InstanceType::I28xlarge => { /* ... */ },
///     InstanceType::I2Xlarge => { /* ... */ },
///     InstanceType::I316xlarge => { /* ... */ },
///     InstanceType::I32xlarge => { /* ... */ },
///     InstanceType::I34xlarge => { /* ... */ },
///     InstanceType::I38xlarge => { /* ... */ },
///     InstanceType::I3Large => { /* ... */ },
///     InstanceType::I3Metal => { /* ... */ },
///     InstanceType::I3Xlarge => { /* ... */ },
///     InstanceType::I3en12xlarge => { /* ... */ },
///     InstanceType::I3en24xlarge => { /* ... */ },
///     InstanceType::I3en2xlarge => { /* ... */ },
///     InstanceType::I3en3xlarge => { /* ... */ },
///     InstanceType::I3en6xlarge => { /* ... */ },
///     InstanceType::I3enLarge => { /* ... */ },
///     InstanceType::I3enMetal => { /* ... */ },
///     InstanceType::I3enXlarge => { /* ... */ },
///     InstanceType::I4i16xlarge => { /* ... */ },
///     InstanceType::I4i2xlarge => { /* ... */ },
///     InstanceType::I4i32xlarge => { /* ... */ },
///     InstanceType::I4i4xlarge => { /* ... */ },
///     InstanceType::I4i8xlarge => { /* ... */ },
///     InstanceType::I4iLarge => { /* ... */ },
///     InstanceType::I4iMetal => { /* ... */ },
///     InstanceType::I4iXlarge => { /* ... */ },
///     InstanceType::Im4gn16xlarge => { /* ... */ },
///     InstanceType::Im4gn2xlarge => { /* ... */ },
///     InstanceType::Im4gn4xlarge => { /* ... */ },
///     InstanceType::Im4gn8xlarge => { /* ... */ },
///     InstanceType::Im4gnLarge => { /* ... */ },
///     InstanceType::Im4gnXlarge => { /* ... */ },
///     InstanceType::Inf124xlarge => { /* ... */ },
///     InstanceType::Inf12xlarge => { /* ... */ },
///     InstanceType::Inf16xlarge => { /* ... */ },
///     InstanceType::Inf1Xlarge => { /* ... */ },
///     InstanceType::Is4gen2xlarge => { /* ... */ },
///     InstanceType::Is4gen4xlarge => { /* ... */ },
///     InstanceType::Is4gen8xlarge => { /* ... */ },
///     InstanceType::Is4genLarge => { /* ... */ },
///     InstanceType::Is4genMedium => { /* ... */ },
///     InstanceType::Is4genXlarge => { /* ... */ },
///     InstanceType::M1Large => { /* ... */ },
///     InstanceType::M1Medium => { /* ... */ },
///     InstanceType::M1Small => { /* ... */ },
///     InstanceType::M1Xlarge => { /* ... */ },
///     InstanceType::M22xlarge => { /* ... */ },
///     InstanceType::M24xlarge => { /* ... */ },
///     InstanceType::M2Xlarge => { /* ... */ },
///     InstanceType::M32xlarge => { /* ... */ },
///     InstanceType::M3Large => { /* ... */ },
///     InstanceType::M3Medium => { /* ... */ },
///     InstanceType::M3Xlarge => { /* ... */ },
///     InstanceType::M410xlarge => { /* ... */ },
///     InstanceType::M416xlarge => { /* ... */ },
///     InstanceType::M42xlarge => { /* ... */ },
///     InstanceType::M44xlarge => { /* ... */ },
///     InstanceType::M4Large => { /* ... */ },
///     InstanceType::M4Xlarge => { /* ... */ },
///     InstanceType::M512xlarge => { /* ... */ },
///     InstanceType::M516xlarge => { /* ... */ },
///     InstanceType::M524xlarge => { /* ... */ },
///     InstanceType::M52xlarge => { /* ... */ },
///     InstanceType::M54xlarge => { /* ... */ },
///     InstanceType::M58xlarge => { /* ... */ },
///     InstanceType::M5Large => { /* ... */ },
///     InstanceType::M5Metal => { /* ... */ },
///     InstanceType::M5Xlarge => { /* ... */ },
///     InstanceType::M5a12xlarge => { /* ... */ },
///     InstanceType::M5a16xlarge => { /* ... */ },
///     InstanceType::M5a24xlarge => { /* ... */ },
///     InstanceType::M5a2xlarge => { /* ... */ },
///     InstanceType::M5a4xlarge => { /* ... */ },
///     InstanceType::M5a8xlarge => { /* ... */ },
///     InstanceType::M5aLarge => { /* ... */ },
///     InstanceType::M5aXlarge => { /* ... */ },
///     InstanceType::M5ad12xlarge => { /* ... */ },
///     InstanceType::M5ad16xlarge => { /* ... */ },
///     InstanceType::M5ad24xlarge => { /* ... */ },
///     InstanceType::M5ad2xlarge => { /* ... */ },
///     InstanceType::M5ad4xlarge => { /* ... */ },
///     InstanceType::M5ad8xlarge => { /* ... */ },
///     InstanceType::M5adLarge => { /* ... */ },
///     InstanceType::M5adXlarge => { /* ... */ },
///     InstanceType::M5d12xlarge => { /* ... */ },
///     InstanceType::M5d16xlarge => { /* ... */ },
///     InstanceType::M5d24xlarge => { /* ... */ },
///     InstanceType::M5d2xlarge => { /* ... */ },
///     InstanceType::M5d4xlarge => { /* ... */ },
///     InstanceType::M5d8xlarge => { /* ... */ },
///     InstanceType::M5dLarge => { /* ... */ },
///     InstanceType::M5dMetal => { /* ... */ },
///     InstanceType::M5dXlarge => { /* ... */ },
///     InstanceType::M5dn12xlarge => { /* ... */ },
///     InstanceType::M5dn16xlarge => { /* ... */ },
///     InstanceType::M5dn24xlarge => { /* ... */ },
///     InstanceType::M5dn2xlarge => { /* ... */ },
///     InstanceType::M5dn4xlarge => { /* ... */ },
///     InstanceType::M5dn8xlarge => { /* ... */ },
///     InstanceType::M5dnLarge => { /* ... */ },
///     InstanceType::M5dnMetal => { /* ... */ },
///     InstanceType::M5dnXlarge => { /* ... */ },
///     InstanceType::M5n12xlarge => { /* ... */ },
///     InstanceType::M5n16xlarge => { /* ... */ },
///     InstanceType::M5n24xlarge => { /* ... */ },
///     InstanceType::M5n2xlarge => { /* ... */ },
///     InstanceType::M5n4xlarge => { /* ... */ },
///     InstanceType::M5n8xlarge => { /* ... */ },
///     InstanceType::M5nLarge => { /* ... */ },
///     InstanceType::M5nMetal => { /* ... */ },
///     InstanceType::M5nXlarge => { /* ... */ },
///     InstanceType::M5zn12xlarge => { /* ... */ },
///     InstanceType::M5zn2xlarge => { /* ... */ },
///     InstanceType::M5zn3xlarge => { /* ... */ },
///     InstanceType::M5zn6xlarge => { /* ... */ },
///     InstanceType::M5znLarge => { /* ... */ },
///     InstanceType::M5znMetal => { /* ... */ },
///     InstanceType::M5znXlarge => { /* ... */ },
///     InstanceType::M6a12xlarge => { /* ... */ },
///     InstanceType::M6a16xlarge => { /* ... */ },
///     InstanceType::M6a24xlarge => { /* ... */ },
///     InstanceType::M6a2xlarge => { /* ... */ },
///     InstanceType::M6a32xlarge => { /* ... */ },
///     InstanceType::M6a48xlarge => { /* ... */ },
///     InstanceType::M6a4xlarge => { /* ... */ },
///     InstanceType::M6a8xlarge => { /* ... */ },
///     InstanceType::M6aLarge => { /* ... */ },
///     InstanceType::M6aMetal => { /* ... */ },
///     InstanceType::M6aXlarge => { /* ... */ },
///     InstanceType::M6g12xlarge => { /* ... */ },
///     InstanceType::M6g16xlarge => { /* ... */ },
///     InstanceType::M6g2xlarge => { /* ... */ },
///     InstanceType::M6g4xlarge => { /* ... */ },
///     InstanceType::M6g8xlarge => { /* ... */ },
///     InstanceType::M6gLarge => { /* ... */ },
///     InstanceType::M6gMedium => { /* ... */ },
///     InstanceType::M6gMetal => { /* ... */ },
///     InstanceType::M6gXlarge => { /* ... */ },
///     InstanceType::M6gd12xlarge => { /* ... */ },
///     InstanceType::M6gd16xlarge => { /* ... */ },
///     InstanceType::M6gd2xlarge => { /* ... */ },
///     InstanceType::M6gd4xlarge => { /* ... */ },
///     InstanceType::M6gd8xlarge => { /* ... */ },
///     InstanceType::M6gdLarge => { /* ... */ },
///     InstanceType::M6gdMedium => { /* ... */ },
///     InstanceType::M6gdMetal => { /* ... */ },
///     InstanceType::M6gdXlarge => { /* ... */ },
///     InstanceType::M6i12xlarge => { /* ... */ },
///     InstanceType::M6i16xlarge => { /* ... */ },
///     InstanceType::M6i24xlarge => { /* ... */ },
///     InstanceType::M6i2xlarge => { /* ... */ },
///     InstanceType::M6i32xlarge => { /* ... */ },
///     InstanceType::M6i4xlarge => { /* ... */ },
///     InstanceType::M6i8xlarge => { /* ... */ },
///     InstanceType::M6iLarge => { /* ... */ },
///     InstanceType::M6iMetal => { /* ... */ },
///     InstanceType::M6iXlarge => { /* ... */ },
///     InstanceType::M6id12xlarge => { /* ... */ },
///     InstanceType::M6id16xlarge => { /* ... */ },
///     InstanceType::M6id24xlarge => { /* ... */ },
///     InstanceType::M6id2xlarge => { /* ... */ },
///     InstanceType::M6id32xlarge => { /* ... */ },
///     InstanceType::M6id4xlarge => { /* ... */ },
///     InstanceType::M6id8xlarge => { /* ... */ },
///     InstanceType::M6idLarge => { /* ... */ },
///     InstanceType::M6idMetal => { /* ... */ },
///     InstanceType::M6idXlarge => { /* ... */ },
///     InstanceType::M6idn12xlarge => { /* ... */ },
///     InstanceType::M6idn16xlarge => { /* ... */ },
///     InstanceType::M6idn24xlarge => { /* ... */ },
///     InstanceType::M6idn2xlarge => { /* ... */ },
///     InstanceType::M6idn32xlarge => { /* ... */ },
///     InstanceType::M6idn4xlarge => { /* ... */ },
///     InstanceType::M6idn8xlarge => { /* ... */ },
///     InstanceType::M6idnLarge => { /* ... */ },
///     InstanceType::M6idnXlarge => { /* ... */ },
///     InstanceType::M6in12xlarge => { /* ... */ },
///     InstanceType::M6in16xlarge => { /* ... */ },
///     InstanceType::M6in24xlarge => { /* ... */ },
///     InstanceType::M6in2xlarge => { /* ... */ },
///     InstanceType::M6in32xlarge => { /* ... */ },
///     InstanceType::M6in4xlarge => { /* ... */ },
///     InstanceType::M6in8xlarge => { /* ... */ },
///     InstanceType::M6inLarge => { /* ... */ },
///     InstanceType::M6inXlarge => { /* ... */ },
///     InstanceType::Mac1Metal => { /* ... */ },
///     InstanceType::Mac2Metal => { /* ... */ },
///     InstanceType::P216xlarge => { /* ... */ },
///     InstanceType::P28xlarge => { /* ... */ },
///     InstanceType::P2Xlarge => { /* ... */ },
///     InstanceType::P316xlarge => { /* ... */ },
///     InstanceType::P32xlarge => { /* ... */ },
///     InstanceType::P38xlarge => { /* ... */ },
///     InstanceType::P3dn24xlarge => { /* ... */ },
///     InstanceType::P4d24xlarge => { /* ... */ },
///     InstanceType::P4de24xlarge => { /* ... */ },
///     InstanceType::R32xlarge => { /* ... */ },
///     InstanceType::R34xlarge => { /* ... */ },
///     InstanceType::R38xlarge => { /* ... */ },
///     InstanceType::R3Large => { /* ... */ },
///     InstanceType::R3Xlarge => { /* ... */ },
///     InstanceType::R416xlarge => { /* ... */ },
///     InstanceType::R42xlarge => { /* ... */ },
///     InstanceType::R44xlarge => { /* ... */ },
///     InstanceType::R48xlarge => { /* ... */ },
///     InstanceType::R4Large => { /* ... */ },
///     InstanceType::R4Xlarge => { /* ... */ },
///     InstanceType::R512xlarge => { /* ... */ },
///     InstanceType::R516xlarge => { /* ... */ },
///     InstanceType::R524xlarge => { /* ... */ },
///     InstanceType::R52xlarge => { /* ... */ },
///     InstanceType::R54xlarge => { /* ... */ },
///     InstanceType::R58xlarge => { /* ... */ },
///     InstanceType::R5Large => { /* ... */ },
///     InstanceType::R5Metal => { /* ... */ },
///     InstanceType::R5Xlarge => { /* ... */ },
///     InstanceType::R5a12xlarge => { /* ... */ },
///     InstanceType::R5a16xlarge => { /* ... */ },
///     InstanceType::R5a24xlarge => { /* ... */ },
///     InstanceType::R5a2xlarge => { /* ... */ },
///     InstanceType::R5a4xlarge => { /* ... */ },
///     InstanceType::R5a8xlarge => { /* ... */ },
///     InstanceType::R5aLarge => { /* ... */ },
///     InstanceType::R5aXlarge => { /* ... */ },
///     InstanceType::R5ad12xlarge => { /* ... */ },
///     InstanceType::R5ad16xlarge => { /* ... */ },
///     InstanceType::R5ad24xlarge => { /* ... */ },
///     InstanceType::R5ad2xlarge => { /* ... */ },
///     InstanceType::R5ad4xlarge => { /* ... */ },
///     InstanceType::R5ad8xlarge => { /* ... */ },
///     InstanceType::R5adLarge => { /* ... */ },
///     InstanceType::R5adXlarge => { /* ... */ },
///     InstanceType::R5b12xlarge => { /* ... */ },
///     InstanceType::R5b16xlarge => { /* ... */ },
///     InstanceType::R5b24xlarge => { /* ... */ },
///     InstanceType::R5b2xlarge => { /* ... */ },
///     InstanceType::R5b4xlarge => { /* ... */ },
///     InstanceType::R5b8xlarge => { /* ... */ },
///     InstanceType::R5bLarge => { /* ... */ },
///     InstanceType::R5bMetal => { /* ... */ },
///     InstanceType::R5bXlarge => { /* ... */ },
///     InstanceType::R5d12xlarge => { /* ... */ },
///     InstanceType::R5d16xlarge => { /* ... */ },
///     InstanceType::R5d24xlarge => { /* ... */ },
///     InstanceType::R5d2xlarge => { /* ... */ },
///     InstanceType::R5d4xlarge => { /* ... */ },
///     InstanceType::R5d8xlarge => { /* ... */ },
///     InstanceType::R5dLarge => { /* ... */ },
///     InstanceType::R5dMetal => { /* ... */ },
///     InstanceType::R5dXlarge => { /* ... */ },
///     InstanceType::R5dn12xlarge => { /* ... */ },
///     InstanceType::R5dn16xlarge => { /* ... */ },
///     InstanceType::R5dn24xlarge => { /* ... */ },
///     InstanceType::R5dn2xlarge => { /* ... */ },
///     InstanceType::R5dn4xlarge => { /* ... */ },
///     InstanceType::R5dn8xlarge => { /* ... */ },
///     InstanceType::R5dnLarge => { /* ... */ },
///     InstanceType::R5dnMetal => { /* ... */ },
///     InstanceType::R5dnXlarge => { /* ... */ },
///     InstanceType::R5n12xlarge => { /* ... */ },
///     InstanceType::R5n16xlarge => { /* ... */ },
///     InstanceType::R5n24xlarge => { /* ... */ },
///     InstanceType::R5n2xlarge => { /* ... */ },
///     InstanceType::R5n4xlarge => { /* ... */ },
///     InstanceType::R5n8xlarge => { /* ... */ },
///     InstanceType::R5nLarge => { /* ... */ },
///     InstanceType::R5nMetal => { /* ... */ },
///     InstanceType::R5nXlarge => { /* ... */ },
///     InstanceType::R6a12xlarge => { /* ... */ },
///     InstanceType::R6a16xlarge => { /* ... */ },
///     InstanceType::R6a24xlarge => { /* ... */ },
///     InstanceType::R6a2xlarge => { /* ... */ },
///     InstanceType::R6a32xlarge => { /* ... */ },
///     InstanceType::R6a48xlarge => { /* ... */ },
///     InstanceType::R6a4xlarge => { /* ... */ },
///     InstanceType::R6a8xlarge => { /* ... */ },
///     InstanceType::R6aLarge => { /* ... */ },
///     InstanceType::R6aMetal => { /* ... */ },
///     InstanceType::R6aXlarge => { /* ... */ },
///     InstanceType::R6g12xlarge => { /* ... */ },
///     InstanceType::R6g16xlarge => { /* ... */ },
///     InstanceType::R6g2xlarge => { /* ... */ },
///     InstanceType::R6g4xlarge => { /* ... */ },
///     InstanceType::R6g8xlarge => { /* ... */ },
///     InstanceType::R6gLarge => { /* ... */ },
///     InstanceType::R6gMedium => { /* ... */ },
///     InstanceType::R6gMetal => { /* ... */ },
///     InstanceType::R6gXlarge => { /* ... */ },
///     InstanceType::R6gd12xlarge => { /* ... */ },
///     InstanceType::R6gd16xlarge => { /* ... */ },
///     InstanceType::R6gd2xlarge => { /* ... */ },
///     InstanceType::R6gd4xlarge => { /* ... */ },
///     InstanceType::R6gd8xlarge => { /* ... */ },
///     InstanceType::R6gdLarge => { /* ... */ },
///     InstanceType::R6gdMedium => { /* ... */ },
///     InstanceType::R6gdMetal => { /* ... */ },
///     InstanceType::R6gdXlarge => { /* ... */ },
///     InstanceType::R6i12xlarge => { /* ... */ },
///     InstanceType::R6i16xlarge => { /* ... */ },
///     InstanceType::R6i24xlarge => { /* ... */ },
///     InstanceType::R6i2xlarge => { /* ... */ },
///     InstanceType::R6i32xlarge => { /* ... */ },
///     InstanceType::R6i4xlarge => { /* ... */ },
///     InstanceType::R6i8xlarge => { /* ... */ },
///     InstanceType::R6iLarge => { /* ... */ },
///     InstanceType::R6iMetal => { /* ... */ },
///     InstanceType::R6iXlarge => { /* ... */ },
///     InstanceType::R6id12xlarge => { /* ... */ },
///     InstanceType::R6id16xlarge => { /* ... */ },
///     InstanceType::R6id24xlarge => { /* ... */ },
///     InstanceType::R6id2xlarge => { /* ... */ },
///     InstanceType::R6id32xlarge => { /* ... */ },
///     InstanceType::R6id4xlarge => { /* ... */ },
///     InstanceType::R6id8xlarge => { /* ... */ },
///     InstanceType::R6idLarge => { /* ... */ },
///     InstanceType::R6idMetal => { /* ... */ },
///     InstanceType::R6idXlarge => { /* ... */ },
///     InstanceType::R6idn12xlarge => { /* ... */ },
///     InstanceType::R6idn16xlarge => { /* ... */ },
///     InstanceType::R6idn24xlarge => { /* ... */ },
///     InstanceType::R6idn2xlarge => { /* ... */ },
///     InstanceType::R6idn32xlarge => { /* ... */ },
///     InstanceType::R6idn4xlarge => { /* ... */ },
///     InstanceType::R6idn8xlarge => { /* ... */ },
///     InstanceType::R6idnLarge => { /* ... */ },
///     InstanceType::R6idnXlarge => { /* ... */ },
///     InstanceType::R6in12xlarge => { /* ... */ },
///     InstanceType::R6in16xlarge => { /* ... */ },
///     InstanceType::R6in24xlarge => { /* ... */ },
///     InstanceType::R6in2xlarge => { /* ... */ },
///     InstanceType::R6in32xlarge => { /* ... */ },
///     InstanceType::R6in4xlarge => { /* ... */ },
///     InstanceType::R6in8xlarge => { /* ... */ },
///     InstanceType::R6inLarge => { /* ... */ },
///     InstanceType::R6inXlarge => { /* ... */ },
///     InstanceType::T1Micro => { /* ... */ },
///     InstanceType::T22xlarge => { /* ... */ },
///     InstanceType::T2Large => { /* ... */ },
///     InstanceType::T2Medium => { /* ... */ },
///     InstanceType::T2Micro => { /* ... */ },
///     InstanceType::T2Nano => { /* ... */ },
///     InstanceType::T2Small => { /* ... */ },
///     InstanceType::T2Xlarge => { /* ... */ },
///     InstanceType::T32xlarge => { /* ... */ },
///     InstanceType::T3Large => { /* ... */ },
///     InstanceType::T3Medium => { /* ... */ },
///     InstanceType::T3Micro => { /* ... */ },
///     InstanceType::T3Nano => { /* ... */ },
///     InstanceType::T3Small => { /* ... */ },
///     InstanceType::T3Xlarge => { /* ... */ },
///     InstanceType::T3a2xlarge => { /* ... */ },
///     InstanceType::T3aLarge => { /* ... */ },
///     InstanceType::T3aMedium => { /* ... */ },
///     InstanceType::T3aMicro => { /* ... */ },
///     InstanceType::T3aNano => { /* ... */ },
///     InstanceType::T3aSmall => { /* ... */ },
///     InstanceType::T3aXlarge => { /* ... */ },
///     InstanceType::T4g2xlarge => { /* ... */ },
///     InstanceType::T4gLarge => { /* ... */ },
///     InstanceType::T4gMedium => { /* ... */ },
///     InstanceType::T4gMicro => { /* ... */ },
///     InstanceType::T4gNano => { /* ... */ },
///     InstanceType::T4gSmall => { /* ... */ },
///     InstanceType::T4gXlarge => { /* ... */ },
///     InstanceType::Trn12xlarge => { /* ... */ },
///     InstanceType::Trn132xlarge => { /* ... */ },
///     InstanceType::U12tb1112xlarge => { /* ... */ },
///     InstanceType::U12tb1Metal => { /* ... */ },
///     InstanceType::U18tb1112xlarge => { /* ... */ },
///     InstanceType::U18tb1Metal => { /* ... */ },
///     InstanceType::U24tb1112xlarge => { /* ... */ },
///     InstanceType::U24tb1Metal => { /* ... */ },
///     InstanceType::U3tb156xlarge => { /* ... */ },
///     InstanceType::U6tb1112xlarge => { /* ... */ },
///     InstanceType::U6tb156xlarge => { /* ... */ },
///     InstanceType::U6tb1Metal => { /* ... */ },
///     InstanceType::U9tb1112xlarge => { /* ... */ },
///     InstanceType::U9tb1Metal => { /* ... */ },
///     InstanceType::Vt124xlarge => { /* ... */ },
///     InstanceType::Vt13xlarge => { /* ... */ },
///     InstanceType::Vt16xlarge => { /* ... */ },
///     InstanceType::X116xlarge => { /* ... */ },
///     InstanceType::X132xlarge => { /* ... */ },
///     InstanceType::X1e16xlarge => { /* ... */ },
///     InstanceType::X1e2xlarge => { /* ... */ },
///     InstanceType::X1e32xlarge => { /* ... */ },
///     InstanceType::X1e4xlarge => { /* ... */ },
///     InstanceType::X1e8xlarge => { /* ... */ },
///     InstanceType::X1eXlarge => { /* ... */ },
///     InstanceType::X2gd12xlarge => { /* ... */ },
///     InstanceType::X2gd16xlarge => { /* ... */ },
///     InstanceType::X2gd2xlarge => { /* ... */ },
///     InstanceType::X2gd4xlarge => { /* ... */ },
///     InstanceType::X2gd8xlarge => { /* ... */ },
///     InstanceType::X2gdLarge => { /* ... */ },
///     InstanceType::X2gdMedium => { /* ... */ },
///     InstanceType::X2gdMetal => { /* ... */ },
///     InstanceType::X2gdXlarge => { /* ... */ },
///     InstanceType::X2idn16xlarge => { /* ... */ },
///     InstanceType::X2idn24xlarge => { /* ... */ },
///     InstanceType::X2idn32xlarge => { /* ... */ },
///     InstanceType::X2idnMetal => { /* ... */ },
///     InstanceType::X2iedn16xlarge => { /* ... */ },
///     InstanceType::X2iedn24xlarge => { /* ... */ },
///     InstanceType::X2iedn2xlarge => { /* ... */ },
///     InstanceType::X2iedn32xlarge => { /* ... */ },
///     InstanceType::X2iedn4xlarge => { /* ... */ },
///     InstanceType::X2iedn8xlarge => { /* ... */ },
///     InstanceType::X2iednMetal => { /* ... */ },
///     InstanceType::X2iednXlarge => { /* ... */ },
///     InstanceType::X2iezn12xlarge => { /* ... */ },
///     InstanceType::X2iezn2xlarge => { /* ... */ },
///     InstanceType::X2iezn4xlarge => { /* ... */ },
///     InstanceType::X2iezn6xlarge => { /* ... */ },
///     InstanceType::X2iezn8xlarge => { /* ... */ },
///     InstanceType::X2ieznMetal => { /* ... */ },
///     InstanceType::Z1d12xlarge => { /* ... */ },
///     InstanceType::Z1d2xlarge => { /* ... */ },
///     InstanceType::Z1d3xlarge => { /* ... */ },
///     InstanceType::Z1d6xlarge => { /* ... */ },
///     InstanceType::Z1dLarge => { /* ... */ },
///     InstanceType::Z1dMetal => { /* ... */ },
///     InstanceType::Z1dXlarge => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `instancetype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `InstanceType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `InstanceType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `InstanceType::NewFeature` is defined.
/// Specifically, when `instancetype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `InstanceType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 InstanceType {
    #[allow(missing_docs)] // documentation missing in model
    A12xlarge,
    #[allow(missing_docs)] // documentation missing in model
    A14xlarge,
    #[allow(missing_docs)] // documentation missing in model
    A1Large,
    #[allow(missing_docs)] // documentation missing in model
    A1Medium,
    #[allow(missing_docs)] // documentation missing in model
    A1Metal,
    #[allow(missing_docs)] // documentation missing in model
    A1Xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C1Medium,
    #[allow(missing_docs)] // documentation missing in model
    C1Xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C32xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C34xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C38xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C3Large,
    #[allow(missing_docs)] // documentation missing in model
    C3Xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C42xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C44xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C48xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C4Large,
    #[allow(missing_docs)] // documentation missing in model
    C4Xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C512xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C518xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C524xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C52xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C54xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C59xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C5Large,
    #[allow(missing_docs)] // documentation missing in model
    C5Metal,
    #[allow(missing_docs)] // documentation missing in model
    C5Xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C5a12xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C5a16xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C5a24xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C5a2xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C5a4xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C5a8xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C5aLarge,
    #[allow(missing_docs)] // documentation missing in model
    C5aXlarge,
    #[allow(missing_docs)] // documentation missing in model
    C5ad12xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C5ad16xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C5ad24xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C5ad2xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C5ad4xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C5ad8xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C5adLarge,
    #[allow(missing_docs)] // documentation missing in model
    C5adXlarge,
    #[allow(missing_docs)] // documentation missing in model
    C5d12xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C5d18xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C5d24xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C5d2xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C5d4xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C5d9xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C5dLarge,
    #[allow(missing_docs)] // documentation missing in model
    C5dMetal,
    #[allow(missing_docs)] // documentation missing in model
    C5dXlarge,
    #[allow(missing_docs)] // documentation missing in model
    C5n18xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C5n2xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C5n4xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C5n9xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C5nLarge,
    #[allow(missing_docs)] // documentation missing in model
    C5nMetal,
    #[allow(missing_docs)] // documentation missing in model
    C5nXlarge,
    #[allow(missing_docs)] // documentation missing in model
    C6a12xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C6a16xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C6a24xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C6a2xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C6a32xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C6a48xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C6a4xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C6a8xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C6aLarge,
    #[allow(missing_docs)] // documentation missing in model
    C6aMetal,
    #[allow(missing_docs)] // documentation missing in model
    C6aXlarge,
    #[allow(missing_docs)] // documentation missing in model
    C6g12xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C6g16xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C6g2xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C6g4xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C6g8xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C6gLarge,
    #[allow(missing_docs)] // documentation missing in model
    C6gMedium,
    #[allow(missing_docs)] // documentation missing in model
    C6gMetal,
    #[allow(missing_docs)] // documentation missing in model
    C6gXlarge,
    #[allow(missing_docs)] // documentation missing in model
    C6gd12xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C6gd16xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C6gd2xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C6gd4xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C6gd8xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C6gdLarge,
    #[allow(missing_docs)] // documentation missing in model
    C6gdMedium,
    #[allow(missing_docs)] // documentation missing in model
    C6gdMetal,
    #[allow(missing_docs)] // documentation missing in model
    C6gdXlarge,
    #[allow(missing_docs)] // documentation missing in model
    C6gn12xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C6gn16xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C6gn2xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C6gn4xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C6gn8xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C6gnLarge,
    #[allow(missing_docs)] // documentation missing in model
    C6gnMedium,
    #[allow(missing_docs)] // documentation missing in model
    C6gnXlarge,
    #[allow(missing_docs)] // documentation missing in model
    C6i12xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C6i16xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C6i24xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C6i2xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C6i32xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C6i4xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C6i8xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C6iLarge,
    #[allow(missing_docs)] // documentation missing in model
    C6iMetal,
    #[allow(missing_docs)] // documentation missing in model
    C6iXlarge,
    #[allow(missing_docs)] // documentation missing in model
    C6id12xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C6id16xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C6id24xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C6id2xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C6id32xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C6id4xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C6id8xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C6idLarge,
    #[allow(missing_docs)] // documentation missing in model
    C6idMetal,
    #[allow(missing_docs)] // documentation missing in model
    C6idXlarge,
    #[allow(missing_docs)] // documentation missing in model
    C6in12xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C6in16xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C6in24xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C6in2xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C6in32xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C6in4xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C6in8xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C6inLarge,
    #[allow(missing_docs)] // documentation missing in model
    C6inXlarge,
    #[allow(missing_docs)] // documentation missing in model
    C7g12xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C7g16xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C7g2xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C7g4xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C7g8xlarge,
    #[allow(missing_docs)] // documentation missing in model
    C7gLarge,
    #[allow(missing_docs)] // documentation missing in model
    C7gMedium,
    #[allow(missing_docs)] // documentation missing in model
    C7gXlarge,
    #[allow(missing_docs)] // documentation missing in model
    Cc14xlarge,
    #[allow(missing_docs)] // documentation missing in model
    Cc28xlarge,
    #[allow(missing_docs)] // documentation missing in model
    Cg14xlarge,
    #[allow(missing_docs)] // documentation missing in model
    Cr18xlarge,
    #[allow(missing_docs)] // documentation missing in model
    D22xlarge,
    #[allow(missing_docs)] // documentation missing in model
    D24xlarge,
    #[allow(missing_docs)] // documentation missing in model
    D28xlarge,
    #[allow(missing_docs)] // documentation missing in model
    D2Xlarge,
    #[allow(missing_docs)] // documentation missing in model
    D32xlarge,
    #[allow(missing_docs)] // documentation missing in model
    D34xlarge,
    #[allow(missing_docs)] // documentation missing in model
    D38xlarge,
    #[allow(missing_docs)] // documentation missing in model
    D3Xlarge,
    #[allow(missing_docs)] // documentation missing in model
    D3en12xlarge,
    #[allow(missing_docs)] // documentation missing in model
    D3en2xlarge,
    #[allow(missing_docs)] // documentation missing in model
    D3en4xlarge,
    #[allow(missing_docs)] // documentation missing in model
    D3en6xlarge,
    #[allow(missing_docs)] // documentation missing in model
    D3en8xlarge,
    #[allow(missing_docs)] // documentation missing in model
    D3enXlarge,
    #[allow(missing_docs)] // documentation missing in model
    Dl124xlarge,
    #[allow(missing_docs)] // documentation missing in model
    F116xlarge,
    #[allow(missing_docs)] // documentation missing in model
    F12xlarge,
    #[allow(missing_docs)] // documentation missing in model
    F14xlarge,
    #[allow(missing_docs)] // documentation missing in model
    G22xlarge,
    #[allow(missing_docs)] // documentation missing in model
    G28xlarge,
    #[allow(missing_docs)] // documentation missing in model
    G316xlarge,
    #[allow(missing_docs)] // documentation missing in model
    G34xlarge,
    #[allow(missing_docs)] // documentation missing in model
    G38xlarge,
    #[allow(missing_docs)] // documentation missing in model
    G3sXlarge,
    #[allow(missing_docs)] // documentation missing in model
    G4ad16xlarge,
    #[allow(missing_docs)] // documentation missing in model
    G4ad2xlarge,
    #[allow(missing_docs)] // documentation missing in model
    G4ad4xlarge,
    #[allow(missing_docs)] // documentation missing in model
    G4ad8xlarge,
    #[allow(missing_docs)] // documentation missing in model
    G4adXlarge,
    #[allow(missing_docs)] // documentation missing in model
    G4dn12xlarge,
    #[allow(missing_docs)] // documentation missing in model
    G4dn16xlarge,
    #[allow(missing_docs)] // documentation missing in model
    G4dn2xlarge,
    #[allow(missing_docs)] // documentation missing in model
    G4dn4xlarge,
    #[allow(missing_docs)] // documentation missing in model
    G4dn8xlarge,
    #[allow(missing_docs)] // documentation missing in model
    G4dnMetal,
    #[allow(missing_docs)] // documentation missing in model
    G4dnXlarge,
    #[allow(missing_docs)] // documentation missing in model
    G512xlarge,
    #[allow(missing_docs)] // documentation missing in model
    G516xlarge,
    #[allow(missing_docs)] // documentation missing in model
    G524xlarge,
    #[allow(missing_docs)] // documentation missing in model
    G52xlarge,
    #[allow(missing_docs)] // documentation missing in model
    G548xlarge,
    #[allow(missing_docs)] // documentation missing in model
    G54xlarge,
    #[allow(missing_docs)] // documentation missing in model
    G58xlarge,
    #[allow(missing_docs)] // documentation missing in model
    G5Xlarge,
    #[allow(missing_docs)] // documentation missing in model
    G5g16xlarge,
    #[allow(missing_docs)] // documentation missing in model
    G5g2xlarge,
    #[allow(missing_docs)] // documentation missing in model
    G5g4xlarge,
    #[allow(missing_docs)] // documentation missing in model
    G5g8xlarge,
    #[allow(missing_docs)] // documentation missing in model
    G5gMetal,
    #[allow(missing_docs)] // documentation missing in model
    G5gXlarge,
    #[allow(missing_docs)] // documentation missing in model
    H116xlarge,
    #[allow(missing_docs)] // documentation missing in model
    H12xlarge,
    #[allow(missing_docs)] // documentation missing in model
    H14xlarge,
    #[allow(missing_docs)] // documentation missing in model
    H18xlarge,
    #[allow(missing_docs)] // documentation missing in model
    Hi14xlarge,
    #[allow(missing_docs)] // documentation missing in model
    Hpc6a48xlarge,
    #[allow(missing_docs)] // documentation missing in model
    Hpc6id32xlarge,
    #[allow(missing_docs)] // documentation missing in model
    Hs18xlarge,
    #[allow(missing_docs)] // documentation missing in model
    I22xlarge,
    #[allow(missing_docs)] // documentation missing in model
    I24xlarge,
    #[allow(missing_docs)] // documentation missing in model
    I28xlarge,
    #[allow(missing_docs)] // documentation missing in model
    I2Xlarge,
    #[allow(missing_docs)] // documentation missing in model
    I316xlarge,
    #[allow(missing_docs)] // documentation missing in model
    I32xlarge,
    #[allow(missing_docs)] // documentation missing in model
    I34xlarge,
    #[allow(missing_docs)] // documentation missing in model
    I38xlarge,
    #[allow(missing_docs)] // documentation missing in model
    I3Large,
    #[allow(missing_docs)] // documentation missing in model
    I3Metal,
    #[allow(missing_docs)] // documentation missing in model
    I3Xlarge,
    #[allow(missing_docs)] // documentation missing in model
    I3en12xlarge,
    #[allow(missing_docs)] // documentation missing in model
    I3en24xlarge,
    #[allow(missing_docs)] // documentation missing in model
    I3en2xlarge,
    #[allow(missing_docs)] // documentation missing in model
    I3en3xlarge,
    #[allow(missing_docs)] // documentation missing in model
    I3en6xlarge,
    #[allow(missing_docs)] // documentation missing in model
    I3enLarge,
    #[allow(missing_docs)] // documentation missing in model
    I3enMetal,
    #[allow(missing_docs)] // documentation missing in model
    I3enXlarge,
    #[allow(missing_docs)] // documentation missing in model
    I4i16xlarge,
    #[allow(missing_docs)] // documentation missing in model
    I4i2xlarge,
    #[allow(missing_docs)] // documentation missing in model
    I4i32xlarge,
    #[allow(missing_docs)] // documentation missing in model
    I4i4xlarge,
    #[allow(missing_docs)] // documentation missing in model
    I4i8xlarge,
    #[allow(missing_docs)] // documentation missing in model
    I4iLarge,
    #[allow(missing_docs)] // documentation missing in model
    I4iMetal,
    #[allow(missing_docs)] // documentation missing in model
    I4iXlarge,
    #[allow(missing_docs)] // documentation missing in model
    Im4gn16xlarge,
    #[allow(missing_docs)] // documentation missing in model
    Im4gn2xlarge,
    #[allow(missing_docs)] // documentation missing in model
    Im4gn4xlarge,
    #[allow(missing_docs)] // documentation missing in model
    Im4gn8xlarge,
    #[allow(missing_docs)] // documentation missing in model
    Im4gnLarge,
    #[allow(missing_docs)] // documentation missing in model
    Im4gnXlarge,
    #[allow(missing_docs)] // documentation missing in model
    Inf124xlarge,
    #[allow(missing_docs)] // documentation missing in model
    Inf12xlarge,
    #[allow(missing_docs)] // documentation missing in model
    Inf16xlarge,
    #[allow(missing_docs)] // documentation missing in model
    Inf1Xlarge,
    #[allow(missing_docs)] // documentation missing in model
    Is4gen2xlarge,
    #[allow(missing_docs)] // documentation missing in model
    Is4gen4xlarge,
    #[allow(missing_docs)] // documentation missing in model
    Is4gen8xlarge,
    #[allow(missing_docs)] // documentation missing in model
    Is4genLarge,
    #[allow(missing_docs)] // documentation missing in model
    Is4genMedium,
    #[allow(missing_docs)] // documentation missing in model
    Is4genXlarge,
    #[allow(missing_docs)] // documentation missing in model
    M1Large,
    #[allow(missing_docs)] // documentation missing in model
    M1Medium,
    #[allow(missing_docs)] // documentation missing in model
    M1Small,
    #[allow(missing_docs)] // documentation missing in model
    M1Xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M22xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M24xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M2Xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M32xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M3Large,
    #[allow(missing_docs)] // documentation missing in model
    M3Medium,
    #[allow(missing_docs)] // documentation missing in model
    M3Xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M410xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M416xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M42xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M44xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M4Large,
    #[allow(missing_docs)] // documentation missing in model
    M4Xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M512xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M516xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M524xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M52xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M54xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M58xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M5Large,
    #[allow(missing_docs)] // documentation missing in model
    M5Metal,
    #[allow(missing_docs)] // documentation missing in model
    M5Xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M5a12xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M5a16xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M5a24xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M5a2xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M5a4xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M5a8xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M5aLarge,
    #[allow(missing_docs)] // documentation missing in model
    M5aXlarge,
    #[allow(missing_docs)] // documentation missing in model
    M5ad12xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M5ad16xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M5ad24xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M5ad2xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M5ad4xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M5ad8xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M5adLarge,
    #[allow(missing_docs)] // documentation missing in model
    M5adXlarge,
    #[allow(missing_docs)] // documentation missing in model
    M5d12xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M5d16xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M5d24xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M5d2xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M5d4xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M5d8xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M5dLarge,
    #[allow(missing_docs)] // documentation missing in model
    M5dMetal,
    #[allow(missing_docs)] // documentation missing in model
    M5dXlarge,
    #[allow(missing_docs)] // documentation missing in model
    M5dn12xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M5dn16xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M5dn24xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M5dn2xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M5dn4xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M5dn8xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M5dnLarge,
    #[allow(missing_docs)] // documentation missing in model
    M5dnMetal,
    #[allow(missing_docs)] // documentation missing in model
    M5dnXlarge,
    #[allow(missing_docs)] // documentation missing in model
    M5n12xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M5n16xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M5n24xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M5n2xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M5n4xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M5n8xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M5nLarge,
    #[allow(missing_docs)] // documentation missing in model
    M5nMetal,
    #[allow(missing_docs)] // documentation missing in model
    M5nXlarge,
    #[allow(missing_docs)] // documentation missing in model
    M5zn12xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M5zn2xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M5zn3xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M5zn6xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M5znLarge,
    #[allow(missing_docs)] // documentation missing in model
    M5znMetal,
    #[allow(missing_docs)] // documentation missing in model
    M5znXlarge,
    #[allow(missing_docs)] // documentation missing in model
    M6a12xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M6a16xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M6a24xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M6a2xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M6a32xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M6a48xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M6a4xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M6a8xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M6aLarge,
    #[allow(missing_docs)] // documentation missing in model
    M6aMetal,
    #[allow(missing_docs)] // documentation missing in model
    M6aXlarge,
    #[allow(missing_docs)] // documentation missing in model
    M6g12xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M6g16xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M6g2xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M6g4xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M6g8xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M6gLarge,
    #[allow(missing_docs)] // documentation missing in model
    M6gMedium,
    #[allow(missing_docs)] // documentation missing in model
    M6gMetal,
    #[allow(missing_docs)] // documentation missing in model
    M6gXlarge,
    #[allow(missing_docs)] // documentation missing in model
    M6gd12xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M6gd16xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M6gd2xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M6gd4xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M6gd8xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M6gdLarge,
    #[allow(missing_docs)] // documentation missing in model
    M6gdMedium,
    #[allow(missing_docs)] // documentation missing in model
    M6gdMetal,
    #[allow(missing_docs)] // documentation missing in model
    M6gdXlarge,
    #[allow(missing_docs)] // documentation missing in model
    M6i12xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M6i16xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M6i24xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M6i2xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M6i32xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M6i4xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M6i8xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M6iLarge,
    #[allow(missing_docs)] // documentation missing in model
    M6iMetal,
    #[allow(missing_docs)] // documentation missing in model
    M6iXlarge,
    #[allow(missing_docs)] // documentation missing in model
    M6id12xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M6id16xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M6id24xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M6id2xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M6id32xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M6id4xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M6id8xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M6idLarge,
    #[allow(missing_docs)] // documentation missing in model
    M6idMetal,
    #[allow(missing_docs)] // documentation missing in model
    M6idXlarge,
    #[allow(missing_docs)] // documentation missing in model
    M6idn12xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M6idn16xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M6idn24xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M6idn2xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M6idn32xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M6idn4xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M6idn8xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M6idnLarge,
    #[allow(missing_docs)] // documentation missing in model
    M6idnXlarge,
    #[allow(missing_docs)] // documentation missing in model
    M6in12xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M6in16xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M6in24xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M6in2xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M6in32xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M6in4xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M6in8xlarge,
    #[allow(missing_docs)] // documentation missing in model
    M6inLarge,
    #[allow(missing_docs)] // documentation missing in model
    M6inXlarge,
    #[allow(missing_docs)] // documentation missing in model
    Mac1Metal,
    #[allow(missing_docs)] // documentation missing in model
    Mac2Metal,
    #[allow(missing_docs)] // documentation missing in model
    P216xlarge,
    #[allow(missing_docs)] // documentation missing in model
    P28xlarge,
    #[allow(missing_docs)] // documentation missing in model
    P2Xlarge,
    #[allow(missing_docs)] // documentation missing in model
    P316xlarge,
    #[allow(missing_docs)] // documentation missing in model
    P32xlarge,
    #[allow(missing_docs)] // documentation missing in model
    P38xlarge,
    #[allow(missing_docs)] // documentation missing in model
    P3dn24xlarge,
    #[allow(missing_docs)] // documentation missing in model
    P4d24xlarge,
    #[allow(missing_docs)] // documentation missing in model
    P4de24xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R32xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R34xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R38xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R3Large,
    #[allow(missing_docs)] // documentation missing in model
    R3Xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R416xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R42xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R44xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R48xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R4Large,
    #[allow(missing_docs)] // documentation missing in model
    R4Xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R512xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R516xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R524xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R52xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R54xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R58xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R5Large,
    #[allow(missing_docs)] // documentation missing in model
    R5Metal,
    #[allow(missing_docs)] // documentation missing in model
    R5Xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R5a12xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R5a16xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R5a24xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R5a2xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R5a4xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R5a8xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R5aLarge,
    #[allow(missing_docs)] // documentation missing in model
    R5aXlarge,
    #[allow(missing_docs)] // documentation missing in model
    R5ad12xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R5ad16xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R5ad24xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R5ad2xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R5ad4xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R5ad8xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R5adLarge,
    #[allow(missing_docs)] // documentation missing in model
    R5adXlarge,
    #[allow(missing_docs)] // documentation missing in model
    R5b12xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R5b16xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R5b24xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R5b2xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R5b4xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R5b8xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R5bLarge,
    #[allow(missing_docs)] // documentation missing in model
    R5bMetal,
    #[allow(missing_docs)] // documentation missing in model
    R5bXlarge,
    #[allow(missing_docs)] // documentation missing in model
    R5d12xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R5d16xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R5d24xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R5d2xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R5d4xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R5d8xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R5dLarge,
    #[allow(missing_docs)] // documentation missing in model
    R5dMetal,
    #[allow(missing_docs)] // documentation missing in model
    R5dXlarge,
    #[allow(missing_docs)] // documentation missing in model
    R5dn12xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R5dn16xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R5dn24xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R5dn2xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R5dn4xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R5dn8xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R5dnLarge,
    #[allow(missing_docs)] // documentation missing in model
    R5dnMetal,
    #[allow(missing_docs)] // documentation missing in model
    R5dnXlarge,
    #[allow(missing_docs)] // documentation missing in model
    R5n12xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R5n16xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R5n24xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R5n2xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R5n4xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R5n8xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R5nLarge,
    #[allow(missing_docs)] // documentation missing in model
    R5nMetal,
    #[allow(missing_docs)] // documentation missing in model
    R5nXlarge,
    #[allow(missing_docs)] // documentation missing in model
    R6a12xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R6a16xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R6a24xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R6a2xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R6a32xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R6a48xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R6a4xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R6a8xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R6aLarge,
    #[allow(missing_docs)] // documentation missing in model
    R6aMetal,
    #[allow(missing_docs)] // documentation missing in model
    R6aXlarge,
    #[allow(missing_docs)] // documentation missing in model
    R6g12xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R6g16xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R6g2xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R6g4xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R6g8xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R6gLarge,
    #[allow(missing_docs)] // documentation missing in model
    R6gMedium,
    #[allow(missing_docs)] // documentation missing in model
    R6gMetal,
    #[allow(missing_docs)] // documentation missing in model
    R6gXlarge,
    #[allow(missing_docs)] // documentation missing in model
    R6gd12xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R6gd16xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R6gd2xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R6gd4xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R6gd8xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R6gdLarge,
    #[allow(missing_docs)] // documentation missing in model
    R6gdMedium,
    #[allow(missing_docs)] // documentation missing in model
    R6gdMetal,
    #[allow(missing_docs)] // documentation missing in model
    R6gdXlarge,
    #[allow(missing_docs)] // documentation missing in model
    R6i12xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R6i16xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R6i24xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R6i2xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R6i32xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R6i4xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R6i8xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R6iLarge,
    #[allow(missing_docs)] // documentation missing in model
    R6iMetal,
    #[allow(missing_docs)] // documentation missing in model
    R6iXlarge,
    #[allow(missing_docs)] // documentation missing in model
    R6id12xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R6id16xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R6id24xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R6id2xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R6id32xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R6id4xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R6id8xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R6idLarge,
    #[allow(missing_docs)] // documentation missing in model
    R6idMetal,
    #[allow(missing_docs)] // documentation missing in model
    R6idXlarge,
    #[allow(missing_docs)] // documentation missing in model
    R6idn12xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R6idn16xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R6idn24xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R6idn2xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R6idn32xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R6idn4xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R6idn8xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R6idnLarge,
    #[allow(missing_docs)] // documentation missing in model
    R6idnXlarge,
    #[allow(missing_docs)] // documentation missing in model
    R6in12xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R6in16xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R6in24xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R6in2xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R6in32xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R6in4xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R6in8xlarge,
    #[allow(missing_docs)] // documentation missing in model
    R6inLarge,
    #[allow(missing_docs)] // documentation missing in model
    R6inXlarge,
    #[allow(missing_docs)] // documentation missing in model
    T1Micro,
    #[allow(missing_docs)] // documentation missing in model
    T22xlarge,
    #[allow(missing_docs)] // documentation missing in model
    T2Large,
    #[allow(missing_docs)] // documentation missing in model
    T2Medium,
    #[allow(missing_docs)] // documentation missing in model
    T2Micro,
    #[allow(missing_docs)] // documentation missing in model
    T2Nano,
    #[allow(missing_docs)] // documentation missing in model
    T2Small,
    #[allow(missing_docs)] // documentation missing in model
    T2Xlarge,
    #[allow(missing_docs)] // documentation missing in model
    T32xlarge,
    #[allow(missing_docs)] // documentation missing in model
    T3Large,
    #[allow(missing_docs)] // documentation missing in model
    T3Medium,
    #[allow(missing_docs)] // documentation missing in model
    T3Micro,
    #[allow(missing_docs)] // documentation missing in model
    T3Nano,
    #[allow(missing_docs)] // documentation missing in model
    T3Small,
    #[allow(missing_docs)] // documentation missing in model
    T3Xlarge,
    #[allow(missing_docs)] // documentation missing in model
    T3a2xlarge,
    #[allow(missing_docs)] // documentation missing in model
    T3aLarge,
    #[allow(missing_docs)] // documentation missing in model
    T3aMedium,
    #[allow(missing_docs)] // documentation missing in model
    T3aMicro,
    #[allow(missing_docs)] // documentation missing in model
    T3aNano,
    #[allow(missing_docs)] // documentation missing in model
    T3aSmall,
    #[allow(missing_docs)] // documentation missing in model
    T3aXlarge,
    #[allow(missing_docs)] // documentation missing in model
    T4g2xlarge,
    #[allow(missing_docs)] // documentation missing in model
    T4gLarge,
    #[allow(missing_docs)] // documentation missing in model
    T4gMedium,
    #[allow(missing_docs)] // documentation missing in model
    T4gMicro,
    #[allow(missing_docs)] // documentation missing in model
    T4gNano,
    #[allow(missing_docs)] // documentation missing in model
    T4gSmall,
    #[allow(missing_docs)] // documentation missing in model
    T4gXlarge,
    #[allow(missing_docs)] // documentation missing in model
    Trn12xlarge,
    #[allow(missing_docs)] // documentation missing in model
    Trn132xlarge,
    #[allow(missing_docs)] // documentation missing in model
    U12tb1112xlarge,
    #[allow(missing_docs)] // documentation missing in model
    U12tb1Metal,
    #[allow(missing_docs)] // documentation missing in model
    U18tb1112xlarge,
    #[allow(missing_docs)] // documentation missing in model
    U18tb1Metal,
    #[allow(missing_docs)] // documentation missing in model
    U24tb1112xlarge,
    #[allow(missing_docs)] // documentation missing in model
    U24tb1Metal,
    #[allow(missing_docs)] // documentation missing in model
    U3tb156xlarge,
    #[allow(missing_docs)] // documentation missing in model
    U6tb1112xlarge,
    #[allow(missing_docs)] // documentation missing in model
    U6tb156xlarge,
    #[allow(missing_docs)] // documentation missing in model
    U6tb1Metal,
    #[allow(missing_docs)] // documentation missing in model
    U9tb1112xlarge,
    #[allow(missing_docs)] // documentation missing in model
    U9tb1Metal,
    #[allow(missing_docs)] // documentation missing in model
    Vt124xlarge,
    #[allow(missing_docs)] // documentation missing in model
    Vt13xlarge,
    #[allow(missing_docs)] // documentation missing in model
    Vt16xlarge,
    #[allow(missing_docs)] // documentation missing in model
    X116xlarge,
    #[allow(missing_docs)] // documentation missing in model
    X132xlarge,
    #[allow(missing_docs)] // documentation missing in model
    X1e16xlarge,
    #[allow(missing_docs)] // documentation missing in model
    X1e2xlarge,
    #[allow(missing_docs)] // documentation missing in model
    X1e32xlarge,
    #[allow(missing_docs)] // documentation missing in model
    X1e4xlarge,
    #[allow(missing_docs)] // documentation missing in model
    X1e8xlarge,
    #[allow(missing_docs)] // documentation missing in model
    X1eXlarge,
    #[allow(missing_docs)] // documentation missing in model
    X2gd12xlarge,
    #[allow(missing_docs)] // documentation missing in model
    X2gd16xlarge,
    #[allow(missing_docs)] // documentation missing in model
    X2gd2xlarge,
    #[allow(missing_docs)] // documentation missing in model
    X2gd4xlarge,
    #[allow(missing_docs)] // documentation missing in model
    X2gd8xlarge,
    #[allow(missing_docs)] // documentation missing in model
    X2gdLarge,
    #[allow(missing_docs)] // documentation missing in model
    X2gdMedium,
    #[allow(missing_docs)] // documentation missing in model
    X2gdMetal,
    #[allow(missing_docs)] // documentation missing in model
    X2gdXlarge,
    #[allow(missing_docs)] // documentation missing in model
    X2idn16xlarge,
    #[allow(missing_docs)] // documentation missing in model
    X2idn24xlarge,
    #[allow(missing_docs)] // documentation missing in model
    X2idn32xlarge,
    #[allow(missing_docs)] // documentation missing in model
    X2idnMetal,
    #[allow(missing_docs)] // documentation missing in model
    X2iedn16xlarge,
    #[allow(missing_docs)] // documentation missing in model
    X2iedn24xlarge,
    #[allow(missing_docs)] // documentation missing in model
    X2iedn2xlarge,
    #[allow(missing_docs)] // documentation missing in model
    X2iedn32xlarge,
    #[allow(missing_docs)] // documentation missing in model
    X2iedn4xlarge,
    #[allow(missing_docs)] // documentation missing in model
    X2iedn8xlarge,
    #[allow(missing_docs)] // documentation missing in model
    X2iednMetal,
    #[allow(missing_docs)] // documentation missing in model
    X2iednXlarge,
    #[allow(missing_docs)] // documentation missing in model
    X2iezn12xlarge,
    #[allow(missing_docs)] // documentation missing in model
    X2iezn2xlarge,
    #[allow(missing_docs)] // documentation missing in model
    X2iezn4xlarge,
    #[allow(missing_docs)] // documentation missing in model
    X2iezn6xlarge,
    #[allow(missing_docs)] // documentation missing in model
    X2iezn8xlarge,
    #[allow(missing_docs)] // documentation missing in model
    X2ieznMetal,
    #[allow(missing_docs)] // documentation missing in model
    Z1d12xlarge,
    #[allow(missing_docs)] // documentation missing in model
    Z1d2xlarge,
    #[allow(missing_docs)] // documentation missing in model
    Z1d3xlarge,
    #[allow(missing_docs)] // documentation missing in model
    Z1d6xlarge,
    #[allow(missing_docs)] // documentation missing in model
    Z1dLarge,
    #[allow(missing_docs)] // documentation missing in model
    Z1dMetal,
    #[allow(missing_docs)] // documentation missing in model
    Z1dXlarge,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for InstanceType {
    fn from(s: &str) -> Self {
        match s {
            "a1.2xlarge" => InstanceType::A12xlarge,
            "a1.4xlarge" => InstanceType::A14xlarge,
            "a1.large" => InstanceType::A1Large,
            "a1.medium" => InstanceType::A1Medium,
            "a1.metal" => InstanceType::A1Metal,
            "a1.xlarge" => InstanceType::A1Xlarge,
            "c1.medium" => InstanceType::C1Medium,
            "c1.xlarge" => InstanceType::C1Xlarge,
            "c3.2xlarge" => InstanceType::C32xlarge,
            "c3.4xlarge" => InstanceType::C34xlarge,
            "c3.8xlarge" => InstanceType::C38xlarge,
            "c3.large" => InstanceType::C3Large,
            "c3.xlarge" => InstanceType::C3Xlarge,
            "c4.2xlarge" => InstanceType::C42xlarge,
            "c4.4xlarge" => InstanceType::C44xlarge,
            "c4.8xlarge" => InstanceType::C48xlarge,
            "c4.large" => InstanceType::C4Large,
            "c4.xlarge" => InstanceType::C4Xlarge,
            "c5.12xlarge" => InstanceType::C512xlarge,
            "c5.18xlarge" => InstanceType::C518xlarge,
            "c5.24xlarge" => InstanceType::C524xlarge,
            "c5.2xlarge" => InstanceType::C52xlarge,
            "c5.4xlarge" => InstanceType::C54xlarge,
            "c5.9xlarge" => InstanceType::C59xlarge,
            "c5.large" => InstanceType::C5Large,
            "c5.metal" => InstanceType::C5Metal,
            "c5.xlarge" => InstanceType::C5Xlarge,
            "c5a.12xlarge" => InstanceType::C5a12xlarge,
            "c5a.16xlarge" => InstanceType::C5a16xlarge,
            "c5a.24xlarge" => InstanceType::C5a24xlarge,
            "c5a.2xlarge" => InstanceType::C5a2xlarge,
            "c5a.4xlarge" => InstanceType::C5a4xlarge,
            "c5a.8xlarge" => InstanceType::C5a8xlarge,
            "c5a.large" => InstanceType::C5aLarge,
            "c5a.xlarge" => InstanceType::C5aXlarge,
            "c5ad.12xlarge" => InstanceType::C5ad12xlarge,
            "c5ad.16xlarge" => InstanceType::C5ad16xlarge,
            "c5ad.24xlarge" => InstanceType::C5ad24xlarge,
            "c5ad.2xlarge" => InstanceType::C5ad2xlarge,
            "c5ad.4xlarge" => InstanceType::C5ad4xlarge,
            "c5ad.8xlarge" => InstanceType::C5ad8xlarge,
            "c5ad.large" => InstanceType::C5adLarge,
            "c5ad.xlarge" => InstanceType::C5adXlarge,
            "c5d.12xlarge" => InstanceType::C5d12xlarge,
            "c5d.18xlarge" => InstanceType::C5d18xlarge,
            "c5d.24xlarge" => InstanceType::C5d24xlarge,
            "c5d.2xlarge" => InstanceType::C5d2xlarge,
            "c5d.4xlarge" => InstanceType::C5d4xlarge,
            "c5d.9xlarge" => InstanceType::C5d9xlarge,
            "c5d.large" => InstanceType::C5dLarge,
            "c5d.metal" => InstanceType::C5dMetal,
            "c5d.xlarge" => InstanceType::C5dXlarge,
            "c5n.18xlarge" => InstanceType::C5n18xlarge,
            "c5n.2xlarge" => InstanceType::C5n2xlarge,
            "c5n.4xlarge" => InstanceType::C5n4xlarge,
            "c5n.9xlarge" => InstanceType::C5n9xlarge,
            "c5n.large" => InstanceType::C5nLarge,
            "c5n.metal" => InstanceType::C5nMetal,
            "c5n.xlarge" => InstanceType::C5nXlarge,
            "c6a.12xlarge" => InstanceType::C6a12xlarge,
            "c6a.16xlarge" => InstanceType::C6a16xlarge,
            "c6a.24xlarge" => InstanceType::C6a24xlarge,
            "c6a.2xlarge" => InstanceType::C6a2xlarge,
            "c6a.32xlarge" => InstanceType::C6a32xlarge,
            "c6a.48xlarge" => InstanceType::C6a48xlarge,
            "c6a.4xlarge" => InstanceType::C6a4xlarge,
            "c6a.8xlarge" => InstanceType::C6a8xlarge,
            "c6a.large" => InstanceType::C6aLarge,
            "c6a.metal" => InstanceType::C6aMetal,
            "c6a.xlarge" => InstanceType::C6aXlarge,
            "c6g.12xlarge" => InstanceType::C6g12xlarge,
            "c6g.16xlarge" => InstanceType::C6g16xlarge,
            "c6g.2xlarge" => InstanceType::C6g2xlarge,
            "c6g.4xlarge" => InstanceType::C6g4xlarge,
            "c6g.8xlarge" => InstanceType::C6g8xlarge,
            "c6g.large" => InstanceType::C6gLarge,
            "c6g.medium" => InstanceType::C6gMedium,
            "c6g.metal" => InstanceType::C6gMetal,
            "c6g.xlarge" => InstanceType::C6gXlarge,
            "c6gd.12xlarge" => InstanceType::C6gd12xlarge,
            "c6gd.16xlarge" => InstanceType::C6gd16xlarge,
            "c6gd.2xlarge" => InstanceType::C6gd2xlarge,
            "c6gd.4xlarge" => InstanceType::C6gd4xlarge,
            "c6gd.8xlarge" => InstanceType::C6gd8xlarge,
            "c6gd.large" => InstanceType::C6gdLarge,
            "c6gd.medium" => InstanceType::C6gdMedium,
            "c6gd.metal" => InstanceType::C6gdMetal,
            "c6gd.xlarge" => InstanceType::C6gdXlarge,
            "c6gn.12xlarge" => InstanceType::C6gn12xlarge,
            "c6gn.16xlarge" => InstanceType::C6gn16xlarge,
            "c6gn.2xlarge" => InstanceType::C6gn2xlarge,
            "c6gn.4xlarge" => InstanceType::C6gn4xlarge,
            "c6gn.8xlarge" => InstanceType::C6gn8xlarge,
            "c6gn.large" => InstanceType::C6gnLarge,
            "c6gn.medium" => InstanceType::C6gnMedium,
            "c6gn.xlarge" => InstanceType::C6gnXlarge,
            "c6i.12xlarge" => InstanceType::C6i12xlarge,
            "c6i.16xlarge" => InstanceType::C6i16xlarge,
            "c6i.24xlarge" => InstanceType::C6i24xlarge,
            "c6i.2xlarge" => InstanceType::C6i2xlarge,
            "c6i.32xlarge" => InstanceType::C6i32xlarge,
            "c6i.4xlarge" => InstanceType::C6i4xlarge,
            "c6i.8xlarge" => InstanceType::C6i8xlarge,
            "c6i.large" => InstanceType::C6iLarge,
            "c6i.metal" => InstanceType::C6iMetal,
            "c6i.xlarge" => InstanceType::C6iXlarge,
            "c6id.12xlarge" => InstanceType::C6id12xlarge,
            "c6id.16xlarge" => InstanceType::C6id16xlarge,
            "c6id.24xlarge" => InstanceType::C6id24xlarge,
            "c6id.2xlarge" => InstanceType::C6id2xlarge,
            "c6id.32xlarge" => InstanceType::C6id32xlarge,
            "c6id.4xlarge" => InstanceType::C6id4xlarge,
            "c6id.8xlarge" => InstanceType::C6id8xlarge,
            "c6id.large" => InstanceType::C6idLarge,
            "c6id.metal" => InstanceType::C6idMetal,
            "c6id.xlarge" => InstanceType::C6idXlarge,
            "c6in.12xlarge" => InstanceType::C6in12xlarge,
            "c6in.16xlarge" => InstanceType::C6in16xlarge,
            "c6in.24xlarge" => InstanceType::C6in24xlarge,
            "c6in.2xlarge" => InstanceType::C6in2xlarge,
            "c6in.32xlarge" => InstanceType::C6in32xlarge,
            "c6in.4xlarge" => InstanceType::C6in4xlarge,
            "c6in.8xlarge" => InstanceType::C6in8xlarge,
            "c6in.large" => InstanceType::C6inLarge,
            "c6in.xlarge" => InstanceType::C6inXlarge,
            "c7g.12xlarge" => InstanceType::C7g12xlarge,
            "c7g.16xlarge" => InstanceType::C7g16xlarge,
            "c7g.2xlarge" => InstanceType::C7g2xlarge,
            "c7g.4xlarge" => InstanceType::C7g4xlarge,
            "c7g.8xlarge" => InstanceType::C7g8xlarge,
            "c7g.large" => InstanceType::C7gLarge,
            "c7g.medium" => InstanceType::C7gMedium,
            "c7g.xlarge" => InstanceType::C7gXlarge,
            "cc1.4xlarge" => InstanceType::Cc14xlarge,
            "cc2.8xlarge" => InstanceType::Cc28xlarge,
            "cg1.4xlarge" => InstanceType::Cg14xlarge,
            "cr1.8xlarge" => InstanceType::Cr18xlarge,
            "d2.2xlarge" => InstanceType::D22xlarge,
            "d2.4xlarge" => InstanceType::D24xlarge,
            "d2.8xlarge" => InstanceType::D28xlarge,
            "d2.xlarge" => InstanceType::D2Xlarge,
            "d3.2xlarge" => InstanceType::D32xlarge,
            "d3.4xlarge" => InstanceType::D34xlarge,
            "d3.8xlarge" => InstanceType::D38xlarge,
            "d3.xlarge" => InstanceType::D3Xlarge,
            "d3en.12xlarge" => InstanceType::D3en12xlarge,
            "d3en.2xlarge" => InstanceType::D3en2xlarge,
            "d3en.4xlarge" => InstanceType::D3en4xlarge,
            "d3en.6xlarge" => InstanceType::D3en6xlarge,
            "d3en.8xlarge" => InstanceType::D3en8xlarge,
            "d3en.xlarge" => InstanceType::D3enXlarge,
            "dl1.24xlarge" => InstanceType::Dl124xlarge,
            "f1.16xlarge" => InstanceType::F116xlarge,
            "f1.2xlarge" => InstanceType::F12xlarge,
            "f1.4xlarge" => InstanceType::F14xlarge,
            "g2.2xlarge" => InstanceType::G22xlarge,
            "g2.8xlarge" => InstanceType::G28xlarge,
            "g3.16xlarge" => InstanceType::G316xlarge,
            "g3.4xlarge" => InstanceType::G34xlarge,
            "g3.8xlarge" => InstanceType::G38xlarge,
            "g3s.xlarge" => InstanceType::G3sXlarge,
            "g4ad.16xlarge" => InstanceType::G4ad16xlarge,
            "g4ad.2xlarge" => InstanceType::G4ad2xlarge,
            "g4ad.4xlarge" => InstanceType::G4ad4xlarge,
            "g4ad.8xlarge" => InstanceType::G4ad8xlarge,
            "g4ad.xlarge" => InstanceType::G4adXlarge,
            "g4dn.12xlarge" => InstanceType::G4dn12xlarge,
            "g4dn.16xlarge" => InstanceType::G4dn16xlarge,
            "g4dn.2xlarge" => InstanceType::G4dn2xlarge,
            "g4dn.4xlarge" => InstanceType::G4dn4xlarge,
            "g4dn.8xlarge" => InstanceType::G4dn8xlarge,
            "g4dn.metal" => InstanceType::G4dnMetal,
            "g4dn.xlarge" => InstanceType::G4dnXlarge,
            "g5.12xlarge" => InstanceType::G512xlarge,
            "g5.16xlarge" => InstanceType::G516xlarge,
            "g5.24xlarge" => InstanceType::G524xlarge,
            "g5.2xlarge" => InstanceType::G52xlarge,
            "g5.48xlarge" => InstanceType::G548xlarge,
            "g5.4xlarge" => InstanceType::G54xlarge,
            "g5.8xlarge" => InstanceType::G58xlarge,
            "g5.xlarge" => InstanceType::G5Xlarge,
            "g5g.16xlarge" => InstanceType::G5g16xlarge,
            "g5g.2xlarge" => InstanceType::G5g2xlarge,
            "g5g.4xlarge" => InstanceType::G5g4xlarge,
            "g5g.8xlarge" => InstanceType::G5g8xlarge,
            "g5g.metal" => InstanceType::G5gMetal,
            "g5g.xlarge" => InstanceType::G5gXlarge,
            "h1.16xlarge" => InstanceType::H116xlarge,
            "h1.2xlarge" => InstanceType::H12xlarge,
            "h1.4xlarge" => InstanceType::H14xlarge,
            "h1.8xlarge" => InstanceType::H18xlarge,
            "hi1.4xlarge" => InstanceType::Hi14xlarge,
            "hpc6a.48xlarge" => InstanceType::Hpc6a48xlarge,
            "hpc6id.32xlarge" => InstanceType::Hpc6id32xlarge,
            "hs1.8xlarge" => InstanceType::Hs18xlarge,
            "i2.2xlarge" => InstanceType::I22xlarge,
            "i2.4xlarge" => InstanceType::I24xlarge,
            "i2.8xlarge" => InstanceType::I28xlarge,
            "i2.xlarge" => InstanceType::I2Xlarge,
            "i3.16xlarge" => InstanceType::I316xlarge,
            "i3.2xlarge" => InstanceType::I32xlarge,
            "i3.4xlarge" => InstanceType::I34xlarge,
            "i3.8xlarge" => InstanceType::I38xlarge,
            "i3.large" => InstanceType::I3Large,
            "i3.metal" => InstanceType::I3Metal,
            "i3.xlarge" => InstanceType::I3Xlarge,
            "i3en.12xlarge" => InstanceType::I3en12xlarge,
            "i3en.24xlarge" => InstanceType::I3en24xlarge,
            "i3en.2xlarge" => InstanceType::I3en2xlarge,
            "i3en.3xlarge" => InstanceType::I3en3xlarge,
            "i3en.6xlarge" => InstanceType::I3en6xlarge,
            "i3en.large" => InstanceType::I3enLarge,
            "i3en.metal" => InstanceType::I3enMetal,
            "i3en.xlarge" => InstanceType::I3enXlarge,
            "i4i.16xlarge" => InstanceType::I4i16xlarge,
            "i4i.2xlarge" => InstanceType::I4i2xlarge,
            "i4i.32xlarge" => InstanceType::I4i32xlarge,
            "i4i.4xlarge" => InstanceType::I4i4xlarge,
            "i4i.8xlarge" => InstanceType::I4i8xlarge,
            "i4i.large" => InstanceType::I4iLarge,
            "i4i.metal" => InstanceType::I4iMetal,
            "i4i.xlarge" => InstanceType::I4iXlarge,
            "im4gn.16xlarge" => InstanceType::Im4gn16xlarge,
            "im4gn.2xlarge" => InstanceType::Im4gn2xlarge,
            "im4gn.4xlarge" => InstanceType::Im4gn4xlarge,
            "im4gn.8xlarge" => InstanceType::Im4gn8xlarge,
            "im4gn.large" => InstanceType::Im4gnLarge,
            "im4gn.xlarge" => InstanceType::Im4gnXlarge,
            "inf1.24xlarge" => InstanceType::Inf124xlarge,
            "inf1.2xlarge" => InstanceType::Inf12xlarge,
            "inf1.6xlarge" => InstanceType::Inf16xlarge,
            "inf1.xlarge" => InstanceType::Inf1Xlarge,
            "is4gen.2xlarge" => InstanceType::Is4gen2xlarge,
            "is4gen.4xlarge" => InstanceType::Is4gen4xlarge,
            "is4gen.8xlarge" => InstanceType::Is4gen8xlarge,
            "is4gen.large" => InstanceType::Is4genLarge,
            "is4gen.medium" => InstanceType::Is4genMedium,
            "is4gen.xlarge" => InstanceType::Is4genXlarge,
            "m1.large" => InstanceType::M1Large,
            "m1.medium" => InstanceType::M1Medium,
            "m1.small" => InstanceType::M1Small,
            "m1.xlarge" => InstanceType::M1Xlarge,
            "m2.2xlarge" => InstanceType::M22xlarge,
            "m2.4xlarge" => InstanceType::M24xlarge,
            "m2.xlarge" => InstanceType::M2Xlarge,
            "m3.2xlarge" => InstanceType::M32xlarge,
            "m3.large" => InstanceType::M3Large,
            "m3.medium" => InstanceType::M3Medium,
            "m3.xlarge" => InstanceType::M3Xlarge,
            "m4.10xlarge" => InstanceType::M410xlarge,
            "m4.16xlarge" => InstanceType::M416xlarge,
            "m4.2xlarge" => InstanceType::M42xlarge,
            "m4.4xlarge" => InstanceType::M44xlarge,
            "m4.large" => InstanceType::M4Large,
            "m4.xlarge" => InstanceType::M4Xlarge,
            "m5.12xlarge" => InstanceType::M512xlarge,
            "m5.16xlarge" => InstanceType::M516xlarge,
            "m5.24xlarge" => InstanceType::M524xlarge,
            "m5.2xlarge" => InstanceType::M52xlarge,
            "m5.4xlarge" => InstanceType::M54xlarge,
            "m5.8xlarge" => InstanceType::M58xlarge,
            "m5.large" => InstanceType::M5Large,
            "m5.metal" => InstanceType::M5Metal,
            "m5.xlarge" => InstanceType::M5Xlarge,
            "m5a.12xlarge" => InstanceType::M5a12xlarge,
            "m5a.16xlarge" => InstanceType::M5a16xlarge,
            "m5a.24xlarge" => InstanceType::M5a24xlarge,
            "m5a.2xlarge" => InstanceType::M5a2xlarge,
            "m5a.4xlarge" => InstanceType::M5a4xlarge,
            "m5a.8xlarge" => InstanceType::M5a8xlarge,
            "m5a.large" => InstanceType::M5aLarge,
            "m5a.xlarge" => InstanceType::M5aXlarge,
            "m5ad.12xlarge" => InstanceType::M5ad12xlarge,
            "m5ad.16xlarge" => InstanceType::M5ad16xlarge,
            "m5ad.24xlarge" => InstanceType::M5ad24xlarge,
            "m5ad.2xlarge" => InstanceType::M5ad2xlarge,
            "m5ad.4xlarge" => InstanceType::M5ad4xlarge,
            "m5ad.8xlarge" => InstanceType::M5ad8xlarge,
            "m5ad.large" => InstanceType::M5adLarge,
            "m5ad.xlarge" => InstanceType::M5adXlarge,
            "m5d.12xlarge" => InstanceType::M5d12xlarge,
            "m5d.16xlarge" => InstanceType::M5d16xlarge,
            "m5d.24xlarge" => InstanceType::M5d24xlarge,
            "m5d.2xlarge" => InstanceType::M5d2xlarge,
            "m5d.4xlarge" => InstanceType::M5d4xlarge,
            "m5d.8xlarge" => InstanceType::M5d8xlarge,
            "m5d.large" => InstanceType::M5dLarge,
            "m5d.metal" => InstanceType::M5dMetal,
            "m5d.xlarge" => InstanceType::M5dXlarge,
            "m5dn.12xlarge" => InstanceType::M5dn12xlarge,
            "m5dn.16xlarge" => InstanceType::M5dn16xlarge,
            "m5dn.24xlarge" => InstanceType::M5dn24xlarge,
            "m5dn.2xlarge" => InstanceType::M5dn2xlarge,
            "m5dn.4xlarge" => InstanceType::M5dn4xlarge,
            "m5dn.8xlarge" => InstanceType::M5dn8xlarge,
            "m5dn.large" => InstanceType::M5dnLarge,
            "m5dn.metal" => InstanceType::M5dnMetal,
            "m5dn.xlarge" => InstanceType::M5dnXlarge,
            "m5n.12xlarge" => InstanceType::M5n12xlarge,
            "m5n.16xlarge" => InstanceType::M5n16xlarge,
            "m5n.24xlarge" => InstanceType::M5n24xlarge,
            "m5n.2xlarge" => InstanceType::M5n2xlarge,
            "m5n.4xlarge" => InstanceType::M5n4xlarge,
            "m5n.8xlarge" => InstanceType::M5n8xlarge,
            "m5n.large" => InstanceType::M5nLarge,
            "m5n.metal" => InstanceType::M5nMetal,
            "m5n.xlarge" => InstanceType::M5nXlarge,
            "m5zn.12xlarge" => InstanceType::M5zn12xlarge,
            "m5zn.2xlarge" => InstanceType::M5zn2xlarge,
            "m5zn.3xlarge" => InstanceType::M5zn3xlarge,
            "m5zn.6xlarge" => InstanceType::M5zn6xlarge,
            "m5zn.large" => InstanceType::M5znLarge,
            "m5zn.metal" => InstanceType::M5znMetal,
            "m5zn.xlarge" => InstanceType::M5znXlarge,
            "m6a.12xlarge" => InstanceType::M6a12xlarge,
            "m6a.16xlarge" => InstanceType::M6a16xlarge,
            "m6a.24xlarge" => InstanceType::M6a24xlarge,
            "m6a.2xlarge" => InstanceType::M6a2xlarge,
            "m6a.32xlarge" => InstanceType::M6a32xlarge,
            "m6a.48xlarge" => InstanceType::M6a48xlarge,
            "m6a.4xlarge" => InstanceType::M6a4xlarge,
            "m6a.8xlarge" => InstanceType::M6a8xlarge,
            "m6a.large" => InstanceType::M6aLarge,
            "m6a.metal" => InstanceType::M6aMetal,
            "m6a.xlarge" => InstanceType::M6aXlarge,
            "m6g.12xlarge" => InstanceType::M6g12xlarge,
            "m6g.16xlarge" => InstanceType::M6g16xlarge,
            "m6g.2xlarge" => InstanceType::M6g2xlarge,
            "m6g.4xlarge" => InstanceType::M6g4xlarge,
            "m6g.8xlarge" => InstanceType::M6g8xlarge,
            "m6g.large" => InstanceType::M6gLarge,
            "m6g.medium" => InstanceType::M6gMedium,
            "m6g.metal" => InstanceType::M6gMetal,
            "m6g.xlarge" => InstanceType::M6gXlarge,
            "m6gd.12xlarge" => InstanceType::M6gd12xlarge,
            "m6gd.16xlarge" => InstanceType::M6gd16xlarge,
            "m6gd.2xlarge" => InstanceType::M6gd2xlarge,
            "m6gd.4xlarge" => InstanceType::M6gd4xlarge,
            "m6gd.8xlarge" => InstanceType::M6gd8xlarge,
            "m6gd.large" => InstanceType::M6gdLarge,
            "m6gd.medium" => InstanceType::M6gdMedium,
            "m6gd.metal" => InstanceType::M6gdMetal,
            "m6gd.xlarge" => InstanceType::M6gdXlarge,
            "m6i.12xlarge" => InstanceType::M6i12xlarge,
            "m6i.16xlarge" => InstanceType::M6i16xlarge,
            "m6i.24xlarge" => InstanceType::M6i24xlarge,
            "m6i.2xlarge" => InstanceType::M6i2xlarge,
            "m6i.32xlarge" => InstanceType::M6i32xlarge,
            "m6i.4xlarge" => InstanceType::M6i4xlarge,
            "m6i.8xlarge" => InstanceType::M6i8xlarge,
            "m6i.large" => InstanceType::M6iLarge,
            "m6i.metal" => InstanceType::M6iMetal,
            "m6i.xlarge" => InstanceType::M6iXlarge,
            "m6id.12xlarge" => InstanceType::M6id12xlarge,
            "m6id.16xlarge" => InstanceType::M6id16xlarge,
            "m6id.24xlarge" => InstanceType::M6id24xlarge,
            "m6id.2xlarge" => InstanceType::M6id2xlarge,
            "m6id.32xlarge" => InstanceType::M6id32xlarge,
            "m6id.4xlarge" => InstanceType::M6id4xlarge,
            "m6id.8xlarge" => InstanceType::M6id8xlarge,
            "m6id.large" => InstanceType::M6idLarge,
            "m6id.metal" => InstanceType::M6idMetal,
            "m6id.xlarge" => InstanceType::M6idXlarge,
            "m6idn.12xlarge" => InstanceType::M6idn12xlarge,
            "m6idn.16xlarge" => InstanceType::M6idn16xlarge,
            "m6idn.24xlarge" => InstanceType::M6idn24xlarge,
            "m6idn.2xlarge" => InstanceType::M6idn2xlarge,
            "m6idn.32xlarge" => InstanceType::M6idn32xlarge,
            "m6idn.4xlarge" => InstanceType::M6idn4xlarge,
            "m6idn.8xlarge" => InstanceType::M6idn8xlarge,
            "m6idn.large" => InstanceType::M6idnLarge,
            "m6idn.xlarge" => InstanceType::M6idnXlarge,
            "m6in.12xlarge" => InstanceType::M6in12xlarge,
            "m6in.16xlarge" => InstanceType::M6in16xlarge,
            "m6in.24xlarge" => InstanceType::M6in24xlarge,
            "m6in.2xlarge" => InstanceType::M6in2xlarge,
            "m6in.32xlarge" => InstanceType::M6in32xlarge,
            "m6in.4xlarge" => InstanceType::M6in4xlarge,
            "m6in.8xlarge" => InstanceType::M6in8xlarge,
            "m6in.large" => InstanceType::M6inLarge,
            "m6in.xlarge" => InstanceType::M6inXlarge,
            "mac1.metal" => InstanceType::Mac1Metal,
            "mac2.metal" => InstanceType::Mac2Metal,
            "p2.16xlarge" => InstanceType::P216xlarge,
            "p2.8xlarge" => InstanceType::P28xlarge,
            "p2.xlarge" => InstanceType::P2Xlarge,
            "p3.16xlarge" => InstanceType::P316xlarge,
            "p3.2xlarge" => InstanceType::P32xlarge,
            "p3.8xlarge" => InstanceType::P38xlarge,
            "p3dn.24xlarge" => InstanceType::P3dn24xlarge,
            "p4d.24xlarge" => InstanceType::P4d24xlarge,
            "p4de.24xlarge" => InstanceType::P4de24xlarge,
            "r3.2xlarge" => InstanceType::R32xlarge,
            "r3.4xlarge" => InstanceType::R34xlarge,
            "r3.8xlarge" => InstanceType::R38xlarge,
            "r3.large" => InstanceType::R3Large,
            "r3.xlarge" => InstanceType::R3Xlarge,
            "r4.16xlarge" => InstanceType::R416xlarge,
            "r4.2xlarge" => InstanceType::R42xlarge,
            "r4.4xlarge" => InstanceType::R44xlarge,
            "r4.8xlarge" => InstanceType::R48xlarge,
            "r4.large" => InstanceType::R4Large,
            "r4.xlarge" => InstanceType::R4Xlarge,
            "r5.12xlarge" => InstanceType::R512xlarge,
            "r5.16xlarge" => InstanceType::R516xlarge,
            "r5.24xlarge" => InstanceType::R524xlarge,
            "r5.2xlarge" => InstanceType::R52xlarge,
            "r5.4xlarge" => InstanceType::R54xlarge,
            "r5.8xlarge" => InstanceType::R58xlarge,
            "r5.large" => InstanceType::R5Large,
            "r5.metal" => InstanceType::R5Metal,
            "r5.xlarge" => InstanceType::R5Xlarge,
            "r5a.12xlarge" => InstanceType::R5a12xlarge,
            "r5a.16xlarge" => InstanceType::R5a16xlarge,
            "r5a.24xlarge" => InstanceType::R5a24xlarge,
            "r5a.2xlarge" => InstanceType::R5a2xlarge,
            "r5a.4xlarge" => InstanceType::R5a4xlarge,
            "r5a.8xlarge" => InstanceType::R5a8xlarge,
            "r5a.large" => InstanceType::R5aLarge,
            "r5a.xlarge" => InstanceType::R5aXlarge,
            "r5ad.12xlarge" => InstanceType::R5ad12xlarge,
            "r5ad.16xlarge" => InstanceType::R5ad16xlarge,
            "r5ad.24xlarge" => InstanceType::R5ad24xlarge,
            "r5ad.2xlarge" => InstanceType::R5ad2xlarge,
            "r5ad.4xlarge" => InstanceType::R5ad4xlarge,
            "r5ad.8xlarge" => InstanceType::R5ad8xlarge,
            "r5ad.large" => InstanceType::R5adLarge,
            "r5ad.xlarge" => InstanceType::R5adXlarge,
            "r5b.12xlarge" => InstanceType::R5b12xlarge,
            "r5b.16xlarge" => InstanceType::R5b16xlarge,
            "r5b.24xlarge" => InstanceType::R5b24xlarge,
            "r5b.2xlarge" => InstanceType::R5b2xlarge,
            "r5b.4xlarge" => InstanceType::R5b4xlarge,
            "r5b.8xlarge" => InstanceType::R5b8xlarge,
            "r5b.large" => InstanceType::R5bLarge,
            "r5b.metal" => InstanceType::R5bMetal,
            "r5b.xlarge" => InstanceType::R5bXlarge,
            "r5d.12xlarge" => InstanceType::R5d12xlarge,
            "r5d.16xlarge" => InstanceType::R5d16xlarge,
            "r5d.24xlarge" => InstanceType::R5d24xlarge,
            "r5d.2xlarge" => InstanceType::R5d2xlarge,
            "r5d.4xlarge" => InstanceType::R5d4xlarge,
            "r5d.8xlarge" => InstanceType::R5d8xlarge,
            "r5d.large" => InstanceType::R5dLarge,
            "r5d.metal" => InstanceType::R5dMetal,
            "r5d.xlarge" => InstanceType::R5dXlarge,
            "r5dn.12xlarge" => InstanceType::R5dn12xlarge,
            "r5dn.16xlarge" => InstanceType::R5dn16xlarge,
            "r5dn.24xlarge" => InstanceType::R5dn24xlarge,
            "r5dn.2xlarge" => InstanceType::R5dn2xlarge,
            "r5dn.4xlarge" => InstanceType::R5dn4xlarge,
            "r5dn.8xlarge" => InstanceType::R5dn8xlarge,
            "r5dn.large" => InstanceType::R5dnLarge,
            "r5dn.metal" => InstanceType::R5dnMetal,
            "r5dn.xlarge" => InstanceType::R5dnXlarge,
            "r5n.12xlarge" => InstanceType::R5n12xlarge,
            "r5n.16xlarge" => InstanceType::R5n16xlarge,
            "r5n.24xlarge" => InstanceType::R5n24xlarge,
            "r5n.2xlarge" => InstanceType::R5n2xlarge,
            "r5n.4xlarge" => InstanceType::R5n4xlarge,
            "r5n.8xlarge" => InstanceType::R5n8xlarge,
            "r5n.large" => InstanceType::R5nLarge,
            "r5n.metal" => InstanceType::R5nMetal,
            "r5n.xlarge" => InstanceType::R5nXlarge,
            "r6a.12xlarge" => InstanceType::R6a12xlarge,
            "r6a.16xlarge" => InstanceType::R6a16xlarge,
            "r6a.24xlarge" => InstanceType::R6a24xlarge,
            "r6a.2xlarge" => InstanceType::R6a2xlarge,
            "r6a.32xlarge" => InstanceType::R6a32xlarge,
            "r6a.48xlarge" => InstanceType::R6a48xlarge,
            "r6a.4xlarge" => InstanceType::R6a4xlarge,
            "r6a.8xlarge" => InstanceType::R6a8xlarge,
            "r6a.large" => InstanceType::R6aLarge,
            "r6a.metal" => InstanceType::R6aMetal,
            "r6a.xlarge" => InstanceType::R6aXlarge,
            "r6g.12xlarge" => InstanceType::R6g12xlarge,
            "r6g.16xlarge" => InstanceType::R6g16xlarge,
            "r6g.2xlarge" => InstanceType::R6g2xlarge,
            "r6g.4xlarge" => InstanceType::R6g4xlarge,
            "r6g.8xlarge" => InstanceType::R6g8xlarge,
            "r6g.large" => InstanceType::R6gLarge,
            "r6g.medium" => InstanceType::R6gMedium,
            "r6g.metal" => InstanceType::R6gMetal,
            "r6g.xlarge" => InstanceType::R6gXlarge,
            "r6gd.12xlarge" => InstanceType::R6gd12xlarge,
            "r6gd.16xlarge" => InstanceType::R6gd16xlarge,
            "r6gd.2xlarge" => InstanceType::R6gd2xlarge,
            "r6gd.4xlarge" => InstanceType::R6gd4xlarge,
            "r6gd.8xlarge" => InstanceType::R6gd8xlarge,
            "r6gd.large" => InstanceType::R6gdLarge,
            "r6gd.medium" => InstanceType::R6gdMedium,
            "r6gd.metal" => InstanceType::R6gdMetal,
            "r6gd.xlarge" => InstanceType::R6gdXlarge,
            "r6i.12xlarge" => InstanceType::R6i12xlarge,
            "r6i.16xlarge" => InstanceType::R6i16xlarge,
            "r6i.24xlarge" => InstanceType::R6i24xlarge,
            "r6i.2xlarge" => InstanceType::R6i2xlarge,
            "r6i.32xlarge" => InstanceType::R6i32xlarge,
            "r6i.4xlarge" => InstanceType::R6i4xlarge,
            "r6i.8xlarge" => InstanceType::R6i8xlarge,
            "r6i.large" => InstanceType::R6iLarge,
            "r6i.metal" => InstanceType::R6iMetal,
            "r6i.xlarge" => InstanceType::R6iXlarge,
            "r6id.12xlarge" => InstanceType::R6id12xlarge,
            "r6id.16xlarge" => InstanceType::R6id16xlarge,
            "r6id.24xlarge" => InstanceType::R6id24xlarge,
            "r6id.2xlarge" => InstanceType::R6id2xlarge,
            "r6id.32xlarge" => InstanceType::R6id32xlarge,
            "r6id.4xlarge" => InstanceType::R6id4xlarge,
            "r6id.8xlarge" => InstanceType::R6id8xlarge,
            "r6id.large" => InstanceType::R6idLarge,
            "r6id.metal" => InstanceType::R6idMetal,
            "r6id.xlarge" => InstanceType::R6idXlarge,
            "r6idn.12xlarge" => InstanceType::R6idn12xlarge,
            "r6idn.16xlarge" => InstanceType::R6idn16xlarge,
            "r6idn.24xlarge" => InstanceType::R6idn24xlarge,
            "r6idn.2xlarge" => InstanceType::R6idn2xlarge,
            "r6idn.32xlarge" => InstanceType::R6idn32xlarge,
            "r6idn.4xlarge" => InstanceType::R6idn4xlarge,
            "r6idn.8xlarge" => InstanceType::R6idn8xlarge,
            "r6idn.large" => InstanceType::R6idnLarge,
            "r6idn.xlarge" => InstanceType::R6idnXlarge,
            "r6in.12xlarge" => InstanceType::R6in12xlarge,
            "r6in.16xlarge" => InstanceType::R6in16xlarge,
            "r6in.24xlarge" => InstanceType::R6in24xlarge,
            "r6in.2xlarge" => InstanceType::R6in2xlarge,
            "r6in.32xlarge" => InstanceType::R6in32xlarge,
            "r6in.4xlarge" => InstanceType::R6in4xlarge,
            "r6in.8xlarge" => InstanceType::R6in8xlarge,
            "r6in.large" => InstanceType::R6inLarge,
            "r6in.xlarge" => InstanceType::R6inXlarge,
            "t1.micro" => InstanceType::T1Micro,
            "t2.2xlarge" => InstanceType::T22xlarge,
            "t2.large" => InstanceType::T2Large,
            "t2.medium" => InstanceType::T2Medium,
            "t2.micro" => InstanceType::T2Micro,
            "t2.nano" => InstanceType::T2Nano,
            "t2.small" => InstanceType::T2Small,
            "t2.xlarge" => InstanceType::T2Xlarge,
            "t3.2xlarge" => InstanceType::T32xlarge,
            "t3.large" => InstanceType::T3Large,
            "t3.medium" => InstanceType::T3Medium,
            "t3.micro" => InstanceType::T3Micro,
            "t3.nano" => InstanceType::T3Nano,
            "t3.small" => InstanceType::T3Small,
            "t3.xlarge" => InstanceType::T3Xlarge,
            "t3a.2xlarge" => InstanceType::T3a2xlarge,
            "t3a.large" => InstanceType::T3aLarge,
            "t3a.medium" => InstanceType::T3aMedium,
            "t3a.micro" => InstanceType::T3aMicro,
            "t3a.nano" => InstanceType::T3aNano,
            "t3a.small" => InstanceType::T3aSmall,
            "t3a.xlarge" => InstanceType::T3aXlarge,
            "t4g.2xlarge" => InstanceType::T4g2xlarge,
            "t4g.large" => InstanceType::T4gLarge,
            "t4g.medium" => InstanceType::T4gMedium,
            "t4g.micro" => InstanceType::T4gMicro,
            "t4g.nano" => InstanceType::T4gNano,
            "t4g.small" => InstanceType::T4gSmall,
            "t4g.xlarge" => InstanceType::T4gXlarge,
            "trn1.2xlarge" => InstanceType::Trn12xlarge,
            "trn1.32xlarge" => InstanceType::Trn132xlarge,
            "u-12tb1.112xlarge" => InstanceType::U12tb1112xlarge,
            "u-12tb1.metal" => InstanceType::U12tb1Metal,
            "u-18tb1.112xlarge" => InstanceType::U18tb1112xlarge,
            "u-18tb1.metal" => InstanceType::U18tb1Metal,
            "u-24tb1.112xlarge" => InstanceType::U24tb1112xlarge,
            "u-24tb1.metal" => InstanceType::U24tb1Metal,
            "u-3tb1.56xlarge" => InstanceType::U3tb156xlarge,
            "u-6tb1.112xlarge" => InstanceType::U6tb1112xlarge,
            "u-6tb1.56xlarge" => InstanceType::U6tb156xlarge,
            "u-6tb1.metal" => InstanceType::U6tb1Metal,
            "u-9tb1.112xlarge" => InstanceType::U9tb1112xlarge,
            "u-9tb1.metal" => InstanceType::U9tb1Metal,
            "vt1.24xlarge" => InstanceType::Vt124xlarge,
            "vt1.3xlarge" => InstanceType::Vt13xlarge,
            "vt1.6xlarge" => InstanceType::Vt16xlarge,
            "x1.16xlarge" => InstanceType::X116xlarge,
            "x1.32xlarge" => InstanceType::X132xlarge,
            "x1e.16xlarge" => InstanceType::X1e16xlarge,
            "x1e.2xlarge" => InstanceType::X1e2xlarge,
            "x1e.32xlarge" => InstanceType::X1e32xlarge,
            "x1e.4xlarge" => InstanceType::X1e4xlarge,
            "x1e.8xlarge" => InstanceType::X1e8xlarge,
            "x1e.xlarge" => InstanceType::X1eXlarge,
            "x2gd.12xlarge" => InstanceType::X2gd12xlarge,
            "x2gd.16xlarge" => InstanceType::X2gd16xlarge,
            "x2gd.2xlarge" => InstanceType::X2gd2xlarge,
            "x2gd.4xlarge" => InstanceType::X2gd4xlarge,
            "x2gd.8xlarge" => InstanceType::X2gd8xlarge,
            "x2gd.large" => InstanceType::X2gdLarge,
            "x2gd.medium" => InstanceType::X2gdMedium,
            "x2gd.metal" => InstanceType::X2gdMetal,
            "x2gd.xlarge" => InstanceType::X2gdXlarge,
            "x2idn.16xlarge" => InstanceType::X2idn16xlarge,
            "x2idn.24xlarge" => InstanceType::X2idn24xlarge,
            "x2idn.32xlarge" => InstanceType::X2idn32xlarge,
            "x2idn.metal" => InstanceType::X2idnMetal,
            "x2iedn.16xlarge" => InstanceType::X2iedn16xlarge,
            "x2iedn.24xlarge" => InstanceType::X2iedn24xlarge,
            "x2iedn.2xlarge" => InstanceType::X2iedn2xlarge,
            "x2iedn.32xlarge" => InstanceType::X2iedn32xlarge,
            "x2iedn.4xlarge" => InstanceType::X2iedn4xlarge,
            "x2iedn.8xlarge" => InstanceType::X2iedn8xlarge,
            "x2iedn.metal" => InstanceType::X2iednMetal,
            "x2iedn.xlarge" => InstanceType::X2iednXlarge,
            "x2iezn.12xlarge" => InstanceType::X2iezn12xlarge,
            "x2iezn.2xlarge" => InstanceType::X2iezn2xlarge,
            "x2iezn.4xlarge" => InstanceType::X2iezn4xlarge,
            "x2iezn.6xlarge" => InstanceType::X2iezn6xlarge,
            "x2iezn.8xlarge" => InstanceType::X2iezn8xlarge,
            "x2iezn.metal" => InstanceType::X2ieznMetal,
            "z1d.12xlarge" => InstanceType::Z1d12xlarge,
            "z1d.2xlarge" => InstanceType::Z1d2xlarge,
            "z1d.3xlarge" => InstanceType::Z1d3xlarge,
            "z1d.6xlarge" => InstanceType::Z1d6xlarge,
            "z1d.large" => InstanceType::Z1dLarge,
            "z1d.metal" => InstanceType::Z1dMetal,
            "z1d.xlarge" => InstanceType::Z1dXlarge,
            other => InstanceType::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for InstanceType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(InstanceType::from(s))
    }
}
impl InstanceType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            InstanceType::A12xlarge => "a1.2xlarge",
            InstanceType::A14xlarge => "a1.4xlarge",
            InstanceType::A1Large => "a1.large",
            InstanceType::A1Medium => "a1.medium",
            InstanceType::A1Metal => "a1.metal",
            InstanceType::A1Xlarge => "a1.xlarge",
            InstanceType::C1Medium => "c1.medium",
            InstanceType::C1Xlarge => "c1.xlarge",
            InstanceType::C32xlarge => "c3.2xlarge",
            InstanceType::C34xlarge => "c3.4xlarge",
            InstanceType::C38xlarge => "c3.8xlarge",
            InstanceType::C3Large => "c3.large",
            InstanceType::C3Xlarge => "c3.xlarge",
            InstanceType::C42xlarge => "c4.2xlarge",
            InstanceType::C44xlarge => "c4.4xlarge",
            InstanceType::C48xlarge => "c4.8xlarge",
            InstanceType::C4Large => "c4.large",
            InstanceType::C4Xlarge => "c4.xlarge",
            InstanceType::C512xlarge => "c5.12xlarge",
            InstanceType::C518xlarge => "c5.18xlarge",
            InstanceType::C524xlarge => "c5.24xlarge",
            InstanceType::C52xlarge => "c5.2xlarge",
            InstanceType::C54xlarge => "c5.4xlarge",
            InstanceType::C59xlarge => "c5.9xlarge",
            InstanceType::C5Large => "c5.large",
            InstanceType::C5Metal => "c5.metal",
            InstanceType::C5Xlarge => "c5.xlarge",
            InstanceType::C5a12xlarge => "c5a.12xlarge",
            InstanceType::C5a16xlarge => "c5a.16xlarge",
            InstanceType::C5a24xlarge => "c5a.24xlarge",
            InstanceType::C5a2xlarge => "c5a.2xlarge",
            InstanceType::C5a4xlarge => "c5a.4xlarge",
            InstanceType::C5a8xlarge => "c5a.8xlarge",
            InstanceType::C5aLarge => "c5a.large",
            InstanceType::C5aXlarge => "c5a.xlarge",
            InstanceType::C5ad12xlarge => "c5ad.12xlarge",
            InstanceType::C5ad16xlarge => "c5ad.16xlarge",
            InstanceType::C5ad24xlarge => "c5ad.24xlarge",
            InstanceType::C5ad2xlarge => "c5ad.2xlarge",
            InstanceType::C5ad4xlarge => "c5ad.4xlarge",
            InstanceType::C5ad8xlarge => "c5ad.8xlarge",
            InstanceType::C5adLarge => "c5ad.large",
            InstanceType::C5adXlarge => "c5ad.xlarge",
            InstanceType::C5d12xlarge => "c5d.12xlarge",
            InstanceType::C5d18xlarge => "c5d.18xlarge",
            InstanceType::C5d24xlarge => "c5d.24xlarge",
            InstanceType::C5d2xlarge => "c5d.2xlarge",
            InstanceType::C5d4xlarge => "c5d.4xlarge",
            InstanceType::C5d9xlarge => "c5d.9xlarge",
            InstanceType::C5dLarge => "c5d.large",
            InstanceType::C5dMetal => "c5d.metal",
            InstanceType::C5dXlarge => "c5d.xlarge",
            InstanceType::C5n18xlarge => "c5n.18xlarge",
            InstanceType::C5n2xlarge => "c5n.2xlarge",
            InstanceType::C5n4xlarge => "c5n.4xlarge",
            InstanceType::C5n9xlarge => "c5n.9xlarge",
            InstanceType::C5nLarge => "c5n.large",
            InstanceType::C5nMetal => "c5n.metal",
            InstanceType::C5nXlarge => "c5n.xlarge",
            InstanceType::C6a12xlarge => "c6a.12xlarge",
            InstanceType::C6a16xlarge => "c6a.16xlarge",
            InstanceType::C6a24xlarge => "c6a.24xlarge",
            InstanceType::C6a2xlarge => "c6a.2xlarge",
            InstanceType::C6a32xlarge => "c6a.32xlarge",
            InstanceType::C6a48xlarge => "c6a.48xlarge",
            InstanceType::C6a4xlarge => "c6a.4xlarge",
            InstanceType::C6a8xlarge => "c6a.8xlarge",
            InstanceType::C6aLarge => "c6a.large",
            InstanceType::C6aMetal => "c6a.metal",
            InstanceType::C6aXlarge => "c6a.xlarge",
            InstanceType::C6g12xlarge => "c6g.12xlarge",
            InstanceType::C6g16xlarge => "c6g.16xlarge",
            InstanceType::C6g2xlarge => "c6g.2xlarge",
            InstanceType::C6g4xlarge => "c6g.4xlarge",
            InstanceType::C6g8xlarge => "c6g.8xlarge",
            InstanceType::C6gLarge => "c6g.large",
            InstanceType::C6gMedium => "c6g.medium",
            InstanceType::C6gMetal => "c6g.metal",
            InstanceType::C6gXlarge => "c6g.xlarge",
            InstanceType::C6gd12xlarge => "c6gd.12xlarge",
            InstanceType::C6gd16xlarge => "c6gd.16xlarge",
            InstanceType::C6gd2xlarge => "c6gd.2xlarge",
            InstanceType::C6gd4xlarge => "c6gd.4xlarge",
            InstanceType::C6gd8xlarge => "c6gd.8xlarge",
            InstanceType::C6gdLarge => "c6gd.large",
            InstanceType::C6gdMedium => "c6gd.medium",
            InstanceType::C6gdMetal => "c6gd.metal",
            InstanceType::C6gdXlarge => "c6gd.xlarge",
            InstanceType::C6gn12xlarge => "c6gn.12xlarge",
            InstanceType::C6gn16xlarge => "c6gn.16xlarge",
            InstanceType::C6gn2xlarge => "c6gn.2xlarge",
            InstanceType::C6gn4xlarge => "c6gn.4xlarge",
            InstanceType::C6gn8xlarge => "c6gn.8xlarge",
            InstanceType::C6gnLarge => "c6gn.large",
            InstanceType::C6gnMedium => "c6gn.medium",
            InstanceType::C6gnXlarge => "c6gn.xlarge",
            InstanceType::C6i12xlarge => "c6i.12xlarge",
            InstanceType::C6i16xlarge => "c6i.16xlarge",
            InstanceType::C6i24xlarge => "c6i.24xlarge",
            InstanceType::C6i2xlarge => "c6i.2xlarge",
            InstanceType::C6i32xlarge => "c6i.32xlarge",
            InstanceType::C6i4xlarge => "c6i.4xlarge",
            InstanceType::C6i8xlarge => "c6i.8xlarge",
            InstanceType::C6iLarge => "c6i.large",
            InstanceType::C6iMetal => "c6i.metal",
            InstanceType::C6iXlarge => "c6i.xlarge",
            InstanceType::C6id12xlarge => "c6id.12xlarge",
            InstanceType::C6id16xlarge => "c6id.16xlarge",
            InstanceType::C6id24xlarge => "c6id.24xlarge",
            InstanceType::C6id2xlarge => "c6id.2xlarge",
            InstanceType::C6id32xlarge => "c6id.32xlarge",
            InstanceType::C6id4xlarge => "c6id.4xlarge",
            InstanceType::C6id8xlarge => "c6id.8xlarge",
            InstanceType::C6idLarge => "c6id.large",
            InstanceType::C6idMetal => "c6id.metal",
            InstanceType::C6idXlarge => "c6id.xlarge",
            InstanceType::C6in12xlarge => "c6in.12xlarge",
            InstanceType::C6in16xlarge => "c6in.16xlarge",
            InstanceType::C6in24xlarge => "c6in.24xlarge",
            InstanceType::C6in2xlarge => "c6in.2xlarge",
            InstanceType::C6in32xlarge => "c6in.32xlarge",
            InstanceType::C6in4xlarge => "c6in.4xlarge",
            InstanceType::C6in8xlarge => "c6in.8xlarge",
            InstanceType::C6inLarge => "c6in.large",
            InstanceType::C6inXlarge => "c6in.xlarge",
            InstanceType::C7g12xlarge => "c7g.12xlarge",
            InstanceType::C7g16xlarge => "c7g.16xlarge",
            InstanceType::C7g2xlarge => "c7g.2xlarge",
            InstanceType::C7g4xlarge => "c7g.4xlarge",
            InstanceType::C7g8xlarge => "c7g.8xlarge",
            InstanceType::C7gLarge => "c7g.large",
            InstanceType::C7gMedium => "c7g.medium",
            InstanceType::C7gXlarge => "c7g.xlarge",
            InstanceType::Cc14xlarge => "cc1.4xlarge",
            InstanceType::Cc28xlarge => "cc2.8xlarge",
            InstanceType::Cg14xlarge => "cg1.4xlarge",
            InstanceType::Cr18xlarge => "cr1.8xlarge",
            InstanceType::D22xlarge => "d2.2xlarge",
            InstanceType::D24xlarge => "d2.4xlarge",
            InstanceType::D28xlarge => "d2.8xlarge",
            InstanceType::D2Xlarge => "d2.xlarge",
            InstanceType::D32xlarge => "d3.2xlarge",
            InstanceType::D34xlarge => "d3.4xlarge",
            InstanceType::D38xlarge => "d3.8xlarge",
            InstanceType::D3Xlarge => "d3.xlarge",
            InstanceType::D3en12xlarge => "d3en.12xlarge",
            InstanceType::D3en2xlarge => "d3en.2xlarge",
            InstanceType::D3en4xlarge => "d3en.4xlarge",
            InstanceType::D3en6xlarge => "d3en.6xlarge",
            InstanceType::D3en8xlarge => "d3en.8xlarge",
            InstanceType::D3enXlarge => "d3en.xlarge",
            InstanceType::Dl124xlarge => "dl1.24xlarge",
            InstanceType::F116xlarge => "f1.16xlarge",
            InstanceType::F12xlarge => "f1.2xlarge",
            InstanceType::F14xlarge => "f1.4xlarge",
            InstanceType::G22xlarge => "g2.2xlarge",
            InstanceType::G28xlarge => "g2.8xlarge",
            InstanceType::G316xlarge => "g3.16xlarge",
            InstanceType::G34xlarge => "g3.4xlarge",
            InstanceType::G38xlarge => "g3.8xlarge",
            InstanceType::G3sXlarge => "g3s.xlarge",
            InstanceType::G4ad16xlarge => "g4ad.16xlarge",
            InstanceType::G4ad2xlarge => "g4ad.2xlarge",
            InstanceType::G4ad4xlarge => "g4ad.4xlarge",
            InstanceType::G4ad8xlarge => "g4ad.8xlarge",
            InstanceType::G4adXlarge => "g4ad.xlarge",
            InstanceType::G4dn12xlarge => "g4dn.12xlarge",
            InstanceType::G4dn16xlarge => "g4dn.16xlarge",
            InstanceType::G4dn2xlarge => "g4dn.2xlarge",
            InstanceType::G4dn4xlarge => "g4dn.4xlarge",
            InstanceType::G4dn8xlarge => "g4dn.8xlarge",
            InstanceType::G4dnMetal => "g4dn.metal",
            InstanceType::G4dnXlarge => "g4dn.xlarge",
            InstanceType::G512xlarge => "g5.12xlarge",
            InstanceType::G516xlarge => "g5.16xlarge",
            InstanceType::G524xlarge => "g5.24xlarge",
            InstanceType::G52xlarge => "g5.2xlarge",
            InstanceType::G548xlarge => "g5.48xlarge",
            InstanceType::G54xlarge => "g5.4xlarge",
            InstanceType::G58xlarge => "g5.8xlarge",
            InstanceType::G5Xlarge => "g5.xlarge",
            InstanceType::G5g16xlarge => "g5g.16xlarge",
            InstanceType::G5g2xlarge => "g5g.2xlarge",
            InstanceType::G5g4xlarge => "g5g.4xlarge",
            InstanceType::G5g8xlarge => "g5g.8xlarge",
            InstanceType::G5gMetal => "g5g.metal",
            InstanceType::G5gXlarge => "g5g.xlarge",
            InstanceType::H116xlarge => "h1.16xlarge",
            InstanceType::H12xlarge => "h1.2xlarge",
            InstanceType::H14xlarge => "h1.4xlarge",
            InstanceType::H18xlarge => "h1.8xlarge",
            InstanceType::Hi14xlarge => "hi1.4xlarge",
            InstanceType::Hpc6a48xlarge => "hpc6a.48xlarge",
            InstanceType::Hpc6id32xlarge => "hpc6id.32xlarge",
            InstanceType::Hs18xlarge => "hs1.8xlarge",
            InstanceType::I22xlarge => "i2.2xlarge",
            InstanceType::I24xlarge => "i2.4xlarge",
            InstanceType::I28xlarge => "i2.8xlarge",
            InstanceType::I2Xlarge => "i2.xlarge",
            InstanceType::I316xlarge => "i3.16xlarge",
            InstanceType::I32xlarge => "i3.2xlarge",
            InstanceType::I34xlarge => "i3.4xlarge",
            InstanceType::I38xlarge => "i3.8xlarge",
            InstanceType::I3Large => "i3.large",
            InstanceType::I3Metal => "i3.metal",
            InstanceType::I3Xlarge => "i3.xlarge",
            InstanceType::I3en12xlarge => "i3en.12xlarge",
            InstanceType::I3en24xlarge => "i3en.24xlarge",
            InstanceType::I3en2xlarge => "i3en.2xlarge",
            InstanceType::I3en3xlarge => "i3en.3xlarge",
            InstanceType::I3en6xlarge => "i3en.6xlarge",
            InstanceType::I3enLarge => "i3en.large",
            InstanceType::I3enMetal => "i3en.metal",
            InstanceType::I3enXlarge => "i3en.xlarge",
            InstanceType::I4i16xlarge => "i4i.16xlarge",
            InstanceType::I4i2xlarge => "i4i.2xlarge",
            InstanceType::I4i32xlarge => "i4i.32xlarge",
            InstanceType::I4i4xlarge => "i4i.4xlarge",
            InstanceType::I4i8xlarge => "i4i.8xlarge",
            InstanceType::I4iLarge => "i4i.large",
            InstanceType::I4iMetal => "i4i.metal",
            InstanceType::I4iXlarge => "i4i.xlarge",
            InstanceType::Im4gn16xlarge => "im4gn.16xlarge",
            InstanceType::Im4gn2xlarge => "im4gn.2xlarge",
            InstanceType::Im4gn4xlarge => "im4gn.4xlarge",
            InstanceType::Im4gn8xlarge => "im4gn.8xlarge",
            InstanceType::Im4gnLarge => "im4gn.large",
            InstanceType::Im4gnXlarge => "im4gn.xlarge",
            InstanceType::Inf124xlarge => "inf1.24xlarge",
            InstanceType::Inf12xlarge => "inf1.2xlarge",
            InstanceType::Inf16xlarge => "inf1.6xlarge",
            InstanceType::Inf1Xlarge => "inf1.xlarge",
            InstanceType::Is4gen2xlarge => "is4gen.2xlarge",
            InstanceType::Is4gen4xlarge => "is4gen.4xlarge",
            InstanceType::Is4gen8xlarge => "is4gen.8xlarge",
            InstanceType::Is4genLarge => "is4gen.large",
            InstanceType::Is4genMedium => "is4gen.medium",
            InstanceType::Is4genXlarge => "is4gen.xlarge",
            InstanceType::M1Large => "m1.large",
            InstanceType::M1Medium => "m1.medium",
            InstanceType::M1Small => "m1.small",
            InstanceType::M1Xlarge => "m1.xlarge",
            InstanceType::M22xlarge => "m2.2xlarge",
            InstanceType::M24xlarge => "m2.4xlarge",
            InstanceType::M2Xlarge => "m2.xlarge",
            InstanceType::M32xlarge => "m3.2xlarge",
            InstanceType::M3Large => "m3.large",
            InstanceType::M3Medium => "m3.medium",
            InstanceType::M3Xlarge => "m3.xlarge",
            InstanceType::M410xlarge => "m4.10xlarge",
            InstanceType::M416xlarge => "m4.16xlarge",
            InstanceType::M42xlarge => "m4.2xlarge",
            InstanceType::M44xlarge => "m4.4xlarge",
            InstanceType::M4Large => "m4.large",
            InstanceType::M4Xlarge => "m4.xlarge",
            InstanceType::M512xlarge => "m5.12xlarge",
            InstanceType::M516xlarge => "m5.16xlarge",
            InstanceType::M524xlarge => "m5.24xlarge",
            InstanceType::M52xlarge => "m5.2xlarge",
            InstanceType::M54xlarge => "m5.4xlarge",
            InstanceType::M58xlarge => "m5.8xlarge",
            InstanceType::M5Large => "m5.large",
            InstanceType::M5Metal => "m5.metal",
            InstanceType::M5Xlarge => "m5.xlarge",
            InstanceType::M5a12xlarge => "m5a.12xlarge",
            InstanceType::M5a16xlarge => "m5a.16xlarge",
            InstanceType::M5a24xlarge => "m5a.24xlarge",
            InstanceType::M5a2xlarge => "m5a.2xlarge",
            InstanceType::M5a4xlarge => "m5a.4xlarge",
            InstanceType::M5a8xlarge => "m5a.8xlarge",
            InstanceType::M5aLarge => "m5a.large",
            InstanceType::M5aXlarge => "m5a.xlarge",
            InstanceType::M5ad12xlarge => "m5ad.12xlarge",
            InstanceType::M5ad16xlarge => "m5ad.16xlarge",
            InstanceType::M5ad24xlarge => "m5ad.24xlarge",
            InstanceType::M5ad2xlarge => "m5ad.2xlarge",
            InstanceType::M5ad4xlarge => "m5ad.4xlarge",
            InstanceType::M5ad8xlarge => "m5ad.8xlarge",
            InstanceType::M5adLarge => "m5ad.large",
            InstanceType::M5adXlarge => "m5ad.xlarge",
            InstanceType::M5d12xlarge => "m5d.12xlarge",
            InstanceType::M5d16xlarge => "m5d.16xlarge",
            InstanceType::M5d24xlarge => "m5d.24xlarge",
            InstanceType::M5d2xlarge => "m5d.2xlarge",
            InstanceType::M5d4xlarge => "m5d.4xlarge",
            InstanceType::M5d8xlarge => "m5d.8xlarge",
            InstanceType::M5dLarge => "m5d.large",
            InstanceType::M5dMetal => "m5d.metal",
            InstanceType::M5dXlarge => "m5d.xlarge",
            InstanceType::M5dn12xlarge => "m5dn.12xlarge",
            InstanceType::M5dn16xlarge => "m5dn.16xlarge",
            InstanceType::M5dn24xlarge => "m5dn.24xlarge",
            InstanceType::M5dn2xlarge => "m5dn.2xlarge",
            InstanceType::M5dn4xlarge => "m5dn.4xlarge",
            InstanceType::M5dn8xlarge => "m5dn.8xlarge",
            InstanceType::M5dnLarge => "m5dn.large",
            InstanceType::M5dnMetal => "m5dn.metal",
            InstanceType::M5dnXlarge => "m5dn.xlarge",
            InstanceType::M5n12xlarge => "m5n.12xlarge",
            InstanceType::M5n16xlarge => "m5n.16xlarge",
            InstanceType::M5n24xlarge => "m5n.24xlarge",
            InstanceType::M5n2xlarge => "m5n.2xlarge",
            InstanceType::M5n4xlarge => "m5n.4xlarge",
            InstanceType::M5n8xlarge => "m5n.8xlarge",
            InstanceType::M5nLarge => "m5n.large",
            InstanceType::M5nMetal => "m5n.metal",
            InstanceType::M5nXlarge => "m5n.xlarge",
            InstanceType::M5zn12xlarge => "m5zn.12xlarge",
            InstanceType::M5zn2xlarge => "m5zn.2xlarge",
            InstanceType::M5zn3xlarge => "m5zn.3xlarge",
            InstanceType::M5zn6xlarge => "m5zn.6xlarge",
            InstanceType::M5znLarge => "m5zn.large",
            InstanceType::M5znMetal => "m5zn.metal",
            InstanceType::M5znXlarge => "m5zn.xlarge",
            InstanceType::M6a12xlarge => "m6a.12xlarge",
            InstanceType::M6a16xlarge => "m6a.16xlarge",
            InstanceType::M6a24xlarge => "m6a.24xlarge",
            InstanceType::M6a2xlarge => "m6a.2xlarge",
            InstanceType::M6a32xlarge => "m6a.32xlarge",
            InstanceType::M6a48xlarge => "m6a.48xlarge",
            InstanceType::M6a4xlarge => "m6a.4xlarge",
            InstanceType::M6a8xlarge => "m6a.8xlarge",
            InstanceType::M6aLarge => "m6a.large",
            InstanceType::M6aMetal => "m6a.metal",
            InstanceType::M6aXlarge => "m6a.xlarge",
            InstanceType::M6g12xlarge => "m6g.12xlarge",
            InstanceType::M6g16xlarge => "m6g.16xlarge",
            InstanceType::M6g2xlarge => "m6g.2xlarge",
            InstanceType::M6g4xlarge => "m6g.4xlarge",
            InstanceType::M6g8xlarge => "m6g.8xlarge",
            InstanceType::M6gLarge => "m6g.large",
            InstanceType::M6gMedium => "m6g.medium",
            InstanceType::M6gMetal => "m6g.metal",
            InstanceType::M6gXlarge => "m6g.xlarge",
            InstanceType::M6gd12xlarge => "m6gd.12xlarge",
            InstanceType::M6gd16xlarge => "m6gd.16xlarge",
            InstanceType::M6gd2xlarge => "m6gd.2xlarge",
            InstanceType::M6gd4xlarge => "m6gd.4xlarge",
            InstanceType::M6gd8xlarge => "m6gd.8xlarge",
            InstanceType::M6gdLarge => "m6gd.large",
            InstanceType::M6gdMedium => "m6gd.medium",
            InstanceType::M6gdMetal => "m6gd.metal",
            InstanceType::M6gdXlarge => "m6gd.xlarge",
            InstanceType::M6i12xlarge => "m6i.12xlarge",
            InstanceType::M6i16xlarge => "m6i.16xlarge",
            InstanceType::M6i24xlarge => "m6i.24xlarge",
            InstanceType::M6i2xlarge => "m6i.2xlarge",
            InstanceType::M6i32xlarge => "m6i.32xlarge",
            InstanceType::M6i4xlarge => "m6i.4xlarge",
            InstanceType::M6i8xlarge => "m6i.8xlarge",
            InstanceType::M6iLarge => "m6i.large",
            InstanceType::M6iMetal => "m6i.metal",
            InstanceType::M6iXlarge => "m6i.xlarge",
            InstanceType::M6id12xlarge => "m6id.12xlarge",
            InstanceType::M6id16xlarge => "m6id.16xlarge",
            InstanceType::M6id24xlarge => "m6id.24xlarge",
            InstanceType::M6id2xlarge => "m6id.2xlarge",
            InstanceType::M6id32xlarge => "m6id.32xlarge",
            InstanceType::M6id4xlarge => "m6id.4xlarge",
            InstanceType::M6id8xlarge => "m6id.8xlarge",
            InstanceType::M6idLarge => "m6id.large",
            InstanceType::M6idMetal => "m6id.metal",
            InstanceType::M6idXlarge => "m6id.xlarge",
            InstanceType::M6idn12xlarge => "m6idn.12xlarge",
            InstanceType::M6idn16xlarge => "m6idn.16xlarge",
            InstanceType::M6idn24xlarge => "m6idn.24xlarge",
            InstanceType::M6idn2xlarge => "m6idn.2xlarge",
            InstanceType::M6idn32xlarge => "m6idn.32xlarge",
            InstanceType::M6idn4xlarge => "m6idn.4xlarge",
            InstanceType::M6idn8xlarge => "m6idn.8xlarge",
            InstanceType::M6idnLarge => "m6idn.large",
            InstanceType::M6idnXlarge => "m6idn.xlarge",
            InstanceType::M6in12xlarge => "m6in.12xlarge",
            InstanceType::M6in16xlarge => "m6in.16xlarge",
            InstanceType::M6in24xlarge => "m6in.24xlarge",
            InstanceType::M6in2xlarge => "m6in.2xlarge",
            InstanceType::M6in32xlarge => "m6in.32xlarge",
            InstanceType::M6in4xlarge => "m6in.4xlarge",
            InstanceType::M6in8xlarge => "m6in.8xlarge",
            InstanceType::M6inLarge => "m6in.large",
            InstanceType::M6inXlarge => "m6in.xlarge",
            InstanceType::Mac1Metal => "mac1.metal",
            InstanceType::Mac2Metal => "mac2.metal",
            InstanceType::P216xlarge => "p2.16xlarge",
            InstanceType::P28xlarge => "p2.8xlarge",
            InstanceType::P2Xlarge => "p2.xlarge",
            InstanceType::P316xlarge => "p3.16xlarge",
            InstanceType::P32xlarge => "p3.2xlarge",
            InstanceType::P38xlarge => "p3.8xlarge",
            InstanceType::P3dn24xlarge => "p3dn.24xlarge",
            InstanceType::P4d24xlarge => "p4d.24xlarge",
            InstanceType::P4de24xlarge => "p4de.24xlarge",
            InstanceType::R32xlarge => "r3.2xlarge",
            InstanceType::R34xlarge => "r3.4xlarge",
            InstanceType::R38xlarge => "r3.8xlarge",
            InstanceType::R3Large => "r3.large",
            InstanceType::R3Xlarge => "r3.xlarge",
            InstanceType::R416xlarge => "r4.16xlarge",
            InstanceType::R42xlarge => "r4.2xlarge",
            InstanceType::R44xlarge => "r4.4xlarge",
            InstanceType::R48xlarge => "r4.8xlarge",
            InstanceType::R4Large => "r4.large",
            InstanceType::R4Xlarge => "r4.xlarge",
            InstanceType::R512xlarge => "r5.12xlarge",
            InstanceType::R516xlarge => "r5.16xlarge",
            InstanceType::R524xlarge => "r5.24xlarge",
            InstanceType::R52xlarge => "r5.2xlarge",
            InstanceType::R54xlarge => "r5.4xlarge",
            InstanceType::R58xlarge => "r5.8xlarge",
            InstanceType::R5Large => "r5.large",
            InstanceType::R5Metal => "r5.metal",
            InstanceType::R5Xlarge => "r5.xlarge",
            InstanceType::R5a12xlarge => "r5a.12xlarge",
            InstanceType::R5a16xlarge => "r5a.16xlarge",
            InstanceType::R5a24xlarge => "r5a.24xlarge",
            InstanceType::R5a2xlarge => "r5a.2xlarge",
            InstanceType::R5a4xlarge => "r5a.4xlarge",
            InstanceType::R5a8xlarge => "r5a.8xlarge",
            InstanceType::R5aLarge => "r5a.large",
            InstanceType::R5aXlarge => "r5a.xlarge",
            InstanceType::R5ad12xlarge => "r5ad.12xlarge",
            InstanceType::R5ad16xlarge => "r5ad.16xlarge",
            InstanceType::R5ad24xlarge => "r5ad.24xlarge",
            InstanceType::R5ad2xlarge => "r5ad.2xlarge",
            InstanceType::R5ad4xlarge => "r5ad.4xlarge",
            InstanceType::R5ad8xlarge => "r5ad.8xlarge",
            InstanceType::R5adLarge => "r5ad.large",
            InstanceType::R5adXlarge => "r5ad.xlarge",
            InstanceType::R5b12xlarge => "r5b.12xlarge",
            InstanceType::R5b16xlarge => "r5b.16xlarge",
            InstanceType::R5b24xlarge => "r5b.24xlarge",
            InstanceType::R5b2xlarge => "r5b.2xlarge",
            InstanceType::R5b4xlarge => "r5b.4xlarge",
            InstanceType::R5b8xlarge => "r5b.8xlarge",
            InstanceType::R5bLarge => "r5b.large",
            InstanceType::R5bMetal => "r5b.metal",
            InstanceType::R5bXlarge => "r5b.xlarge",
            InstanceType::R5d12xlarge => "r5d.12xlarge",
            InstanceType::R5d16xlarge => "r5d.16xlarge",
            InstanceType::R5d24xlarge => "r5d.24xlarge",
            InstanceType::R5d2xlarge => "r5d.2xlarge",
            InstanceType::R5d4xlarge => "r5d.4xlarge",
            InstanceType::R5d8xlarge => "r5d.8xlarge",
            InstanceType::R5dLarge => "r5d.large",
            InstanceType::R5dMetal => "r5d.metal",
            InstanceType::R5dXlarge => "r5d.xlarge",
            InstanceType::R5dn12xlarge => "r5dn.12xlarge",
            InstanceType::R5dn16xlarge => "r5dn.16xlarge",
            InstanceType::R5dn24xlarge => "r5dn.24xlarge",
            InstanceType::R5dn2xlarge => "r5dn.2xlarge",
            InstanceType::R5dn4xlarge => "r5dn.4xlarge",
            InstanceType::R5dn8xlarge => "r5dn.8xlarge",
            InstanceType::R5dnLarge => "r5dn.large",
            InstanceType::R5dnMetal => "r5dn.metal",
            InstanceType::R5dnXlarge => "r5dn.xlarge",
            InstanceType::R5n12xlarge => "r5n.12xlarge",
            InstanceType::R5n16xlarge => "r5n.16xlarge",
            InstanceType::R5n24xlarge => "r5n.24xlarge",
            InstanceType::R5n2xlarge => "r5n.2xlarge",
            InstanceType::R5n4xlarge => "r5n.4xlarge",
            InstanceType::R5n8xlarge => "r5n.8xlarge",
            InstanceType::R5nLarge => "r5n.large",
            InstanceType::R5nMetal => "r5n.metal",
            InstanceType::R5nXlarge => "r5n.xlarge",
            InstanceType::R6a12xlarge => "r6a.12xlarge",
            InstanceType::R6a16xlarge => "r6a.16xlarge",
            InstanceType::R6a24xlarge => "r6a.24xlarge",
            InstanceType::R6a2xlarge => "r6a.2xlarge",
            InstanceType::R6a32xlarge => "r6a.32xlarge",
            InstanceType::R6a48xlarge => "r6a.48xlarge",
            InstanceType::R6a4xlarge => "r6a.4xlarge",
            InstanceType::R6a8xlarge => "r6a.8xlarge",
            InstanceType::R6aLarge => "r6a.large",
            InstanceType::R6aMetal => "r6a.metal",
            InstanceType::R6aXlarge => "r6a.xlarge",
            InstanceType::R6g12xlarge => "r6g.12xlarge",
            InstanceType::R6g16xlarge => "r6g.16xlarge",
            InstanceType::R6g2xlarge => "r6g.2xlarge",
            InstanceType::R6g4xlarge => "r6g.4xlarge",
            InstanceType::R6g8xlarge => "r6g.8xlarge",
            InstanceType::R6gLarge => "r6g.large",
            InstanceType::R6gMedium => "r6g.medium",
            InstanceType::R6gMetal => "r6g.metal",
            InstanceType::R6gXlarge => "r6g.xlarge",
            InstanceType::R6gd12xlarge => "r6gd.12xlarge",
            InstanceType::R6gd16xlarge => "r6gd.16xlarge",
            InstanceType::R6gd2xlarge => "r6gd.2xlarge",
            InstanceType::R6gd4xlarge => "r6gd.4xlarge",
            InstanceType::R6gd8xlarge => "r6gd.8xlarge",
            InstanceType::R6gdLarge => "r6gd.large",
            InstanceType::R6gdMedium => "r6gd.medium",
            InstanceType::R6gdMetal => "r6gd.metal",
            InstanceType::R6gdXlarge => "r6gd.xlarge",
            InstanceType::R6i12xlarge => "r6i.12xlarge",
            InstanceType::R6i16xlarge => "r6i.16xlarge",
            InstanceType::R6i24xlarge => "r6i.24xlarge",
            InstanceType::R6i2xlarge => "r6i.2xlarge",
            InstanceType::R6i32xlarge => "r6i.32xlarge",
            InstanceType::R6i4xlarge => "r6i.4xlarge",
            InstanceType::R6i8xlarge => "r6i.8xlarge",
            InstanceType::R6iLarge => "r6i.large",
            InstanceType::R6iMetal => "r6i.metal",
            InstanceType::R6iXlarge => "r6i.xlarge",
            InstanceType::R6id12xlarge => "r6id.12xlarge",
            InstanceType::R6id16xlarge => "r6id.16xlarge",
            InstanceType::R6id24xlarge => "r6id.24xlarge",
            InstanceType::R6id2xlarge => "r6id.2xlarge",
            InstanceType::R6id32xlarge => "r6id.32xlarge",
            InstanceType::R6id4xlarge => "r6id.4xlarge",
            InstanceType::R6id8xlarge => "r6id.8xlarge",
            InstanceType::R6idLarge => "r6id.large",
            InstanceType::R6idMetal => "r6id.metal",
            InstanceType::R6idXlarge => "r6id.xlarge",
            InstanceType::R6idn12xlarge => "r6idn.12xlarge",
            InstanceType::R6idn16xlarge => "r6idn.16xlarge",
            InstanceType::R6idn24xlarge => "r6idn.24xlarge",
            InstanceType::R6idn2xlarge => "r6idn.2xlarge",
            InstanceType::R6idn32xlarge => "r6idn.32xlarge",
            InstanceType::R6idn4xlarge => "r6idn.4xlarge",
            InstanceType::R6idn8xlarge => "r6idn.8xlarge",
            InstanceType::R6idnLarge => "r6idn.large",
            InstanceType::R6idnXlarge => "r6idn.xlarge",
            InstanceType::R6in12xlarge => "r6in.12xlarge",
            InstanceType::R6in16xlarge => "r6in.16xlarge",
            InstanceType::R6in24xlarge => "r6in.24xlarge",
            InstanceType::R6in2xlarge => "r6in.2xlarge",
            InstanceType::R6in32xlarge => "r6in.32xlarge",
            InstanceType::R6in4xlarge => "r6in.4xlarge",
            InstanceType::R6in8xlarge => "r6in.8xlarge",
            InstanceType::R6inLarge => "r6in.large",
            InstanceType::R6inXlarge => "r6in.xlarge",
            InstanceType::T1Micro => "t1.micro",
            InstanceType::T22xlarge => "t2.2xlarge",
            InstanceType::T2Large => "t2.large",
            InstanceType::T2Medium => "t2.medium",
            InstanceType::T2Micro => "t2.micro",
            InstanceType::T2Nano => "t2.nano",
            InstanceType::T2Small => "t2.small",
            InstanceType::T2Xlarge => "t2.xlarge",
            InstanceType::T32xlarge => "t3.2xlarge",
            InstanceType::T3Large => "t3.large",
            InstanceType::T3Medium => "t3.medium",
            InstanceType::T3Micro => "t3.micro",
            InstanceType::T3Nano => "t3.nano",
            InstanceType::T3Small => "t3.small",
            InstanceType::T3Xlarge => "t3.xlarge",
            InstanceType::T3a2xlarge => "t3a.2xlarge",
            InstanceType::T3aLarge => "t3a.large",
            InstanceType::T3aMedium => "t3a.medium",
            InstanceType::T3aMicro => "t3a.micro",
            InstanceType::T3aNano => "t3a.nano",
            InstanceType::T3aSmall => "t3a.small",
            InstanceType::T3aXlarge => "t3a.xlarge",
            InstanceType::T4g2xlarge => "t4g.2xlarge",
            InstanceType::T4gLarge => "t4g.large",
            InstanceType::T4gMedium => "t4g.medium",
            InstanceType::T4gMicro => "t4g.micro",
            InstanceType::T4gNano => "t4g.nano",
            InstanceType::T4gSmall => "t4g.small",
            InstanceType::T4gXlarge => "t4g.xlarge",
            InstanceType::Trn12xlarge => "trn1.2xlarge",
            InstanceType::Trn132xlarge => "trn1.32xlarge",
            InstanceType::U12tb1112xlarge => "u-12tb1.112xlarge",
            InstanceType::U12tb1Metal => "u-12tb1.metal",
            InstanceType::U18tb1112xlarge => "u-18tb1.112xlarge",
            InstanceType::U18tb1Metal => "u-18tb1.metal",
            InstanceType::U24tb1112xlarge => "u-24tb1.112xlarge",
            InstanceType::U24tb1Metal => "u-24tb1.metal",
            InstanceType::U3tb156xlarge => "u-3tb1.56xlarge",
            InstanceType::U6tb1112xlarge => "u-6tb1.112xlarge",
            InstanceType::U6tb156xlarge => "u-6tb1.56xlarge",
            InstanceType::U6tb1Metal => "u-6tb1.metal",
            InstanceType::U9tb1112xlarge => "u-9tb1.112xlarge",
            InstanceType::U9tb1Metal => "u-9tb1.metal",
            InstanceType::Vt124xlarge => "vt1.24xlarge",
            InstanceType::Vt13xlarge => "vt1.3xlarge",
            InstanceType::Vt16xlarge => "vt1.6xlarge",
            InstanceType::X116xlarge => "x1.16xlarge",
            InstanceType::X132xlarge => "x1.32xlarge",
            InstanceType::X1e16xlarge => "x1e.16xlarge",
            InstanceType::X1e2xlarge => "x1e.2xlarge",
            InstanceType::X1e32xlarge => "x1e.32xlarge",
            InstanceType::X1e4xlarge => "x1e.4xlarge",
            InstanceType::X1e8xlarge => "x1e.8xlarge",
            InstanceType::X1eXlarge => "x1e.xlarge",
            InstanceType::X2gd12xlarge => "x2gd.12xlarge",
            InstanceType::X2gd16xlarge => "x2gd.16xlarge",
            InstanceType::X2gd2xlarge => "x2gd.2xlarge",
            InstanceType::X2gd4xlarge => "x2gd.4xlarge",
            InstanceType::X2gd8xlarge => "x2gd.8xlarge",
            InstanceType::X2gdLarge => "x2gd.large",
            InstanceType::X2gdMedium => "x2gd.medium",
            InstanceType::X2gdMetal => "x2gd.metal",
            InstanceType::X2gdXlarge => "x2gd.xlarge",
            InstanceType::X2idn16xlarge => "x2idn.16xlarge",
            InstanceType::X2idn24xlarge => "x2idn.24xlarge",
            InstanceType::X2idn32xlarge => "x2idn.32xlarge",
            InstanceType::X2idnMetal => "x2idn.metal",
            InstanceType::X2iedn16xlarge => "x2iedn.16xlarge",
            InstanceType::X2iedn24xlarge => "x2iedn.24xlarge",
            InstanceType::X2iedn2xlarge => "x2iedn.2xlarge",
            InstanceType::X2iedn32xlarge => "x2iedn.32xlarge",
            InstanceType::X2iedn4xlarge => "x2iedn.4xlarge",
            InstanceType::X2iedn8xlarge => "x2iedn.8xlarge",
            InstanceType::X2iednMetal => "x2iedn.metal",
            InstanceType::X2iednXlarge => "x2iedn.xlarge",
            InstanceType::X2iezn12xlarge => "x2iezn.12xlarge",
            InstanceType::X2iezn2xlarge => "x2iezn.2xlarge",
            InstanceType::X2iezn4xlarge => "x2iezn.4xlarge",
            InstanceType::X2iezn6xlarge => "x2iezn.6xlarge",
            InstanceType::X2iezn8xlarge => "x2iezn.8xlarge",
            InstanceType::X2ieznMetal => "x2iezn.metal",
            InstanceType::Z1d12xlarge => "z1d.12xlarge",
            InstanceType::Z1d2xlarge => "z1d.2xlarge",
            InstanceType::Z1d3xlarge => "z1d.3xlarge",
            InstanceType::Z1d6xlarge => "z1d.6xlarge",
            InstanceType::Z1dLarge => "z1d.large",
            InstanceType::Z1dMetal => "z1d.metal",
            InstanceType::Z1dXlarge => "z1d.xlarge",
            InstanceType::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &[
            "a1.2xlarge",
            "a1.4xlarge",
            "a1.large",
            "a1.medium",
            "a1.metal",
            "a1.xlarge",
            "c1.medium",
            "c1.xlarge",
            "c3.2xlarge",
            "c3.4xlarge",
            "c3.8xlarge",
            "c3.large",
            "c3.xlarge",
            "c4.2xlarge",
            "c4.4xlarge",
            "c4.8xlarge",
            "c4.large",
            "c4.xlarge",
            "c5.12xlarge",
            "c5.18xlarge",
            "c5.24xlarge",
            "c5.2xlarge",
            "c5.4xlarge",
            "c5.9xlarge",
            "c5.large",
            "c5.metal",
            "c5.xlarge",
            "c5a.12xlarge",
            "c5a.16xlarge",
            "c5a.24xlarge",
            "c5a.2xlarge",
            "c5a.4xlarge",
            "c5a.8xlarge",
            "c5a.large",
            "c5a.xlarge",
            "c5ad.12xlarge",
            "c5ad.16xlarge",
            "c5ad.24xlarge",
            "c5ad.2xlarge",
            "c5ad.4xlarge",
            "c5ad.8xlarge",
            "c5ad.large",
            "c5ad.xlarge",
            "c5d.12xlarge",
            "c5d.18xlarge",
            "c5d.24xlarge",
            "c5d.2xlarge",
            "c5d.4xlarge",
            "c5d.9xlarge",
            "c5d.large",
            "c5d.metal",
            "c5d.xlarge",
            "c5n.18xlarge",
            "c5n.2xlarge",
            "c5n.4xlarge",
            "c5n.9xlarge",
            "c5n.large",
            "c5n.metal",
            "c5n.xlarge",
            "c6a.12xlarge",
            "c6a.16xlarge",
            "c6a.24xlarge",
            "c6a.2xlarge",
            "c6a.32xlarge",
            "c6a.48xlarge",
            "c6a.4xlarge",
            "c6a.8xlarge",
            "c6a.large",
            "c6a.metal",
            "c6a.xlarge",
            "c6g.12xlarge",
            "c6g.16xlarge",
            "c6g.2xlarge",
            "c6g.4xlarge",
            "c6g.8xlarge",
            "c6g.large",
            "c6g.medium",
            "c6g.metal",
            "c6g.xlarge",
            "c6gd.12xlarge",
            "c6gd.16xlarge",
            "c6gd.2xlarge",
            "c6gd.4xlarge",
            "c6gd.8xlarge",
            "c6gd.large",
            "c6gd.medium",
            "c6gd.metal",
            "c6gd.xlarge",
            "c6gn.12xlarge",
            "c6gn.16xlarge",
            "c6gn.2xlarge",
            "c6gn.4xlarge",
            "c6gn.8xlarge",
            "c6gn.large",
            "c6gn.medium",
            "c6gn.xlarge",
            "c6i.12xlarge",
            "c6i.16xlarge",
            "c6i.24xlarge",
            "c6i.2xlarge",
            "c6i.32xlarge",
            "c6i.4xlarge",
            "c6i.8xlarge",
            "c6i.large",
            "c6i.metal",
            "c6i.xlarge",
            "c6id.12xlarge",
            "c6id.16xlarge",
            "c6id.24xlarge",
            "c6id.2xlarge",
            "c6id.32xlarge",
            "c6id.4xlarge",
            "c6id.8xlarge",
            "c6id.large",
            "c6id.metal",
            "c6id.xlarge",
            "c6in.12xlarge",
            "c6in.16xlarge",
            "c6in.24xlarge",
            "c6in.2xlarge",
            "c6in.32xlarge",
            "c6in.4xlarge",
            "c6in.8xlarge",
            "c6in.large",
            "c6in.xlarge",
            "c7g.12xlarge",
            "c7g.16xlarge",
            "c7g.2xlarge",
            "c7g.4xlarge",
            "c7g.8xlarge",
            "c7g.large",
            "c7g.medium",
            "c7g.xlarge",
            "cc1.4xlarge",
            "cc2.8xlarge",
            "cg1.4xlarge",
            "cr1.8xlarge",
            "d2.2xlarge",
            "d2.4xlarge",
            "d2.8xlarge",
            "d2.xlarge",
            "d3.2xlarge",
            "d3.4xlarge",
            "d3.8xlarge",
            "d3.xlarge",
            "d3en.12xlarge",
            "d3en.2xlarge",
            "d3en.4xlarge",
            "d3en.6xlarge",
            "d3en.8xlarge",
            "d3en.xlarge",
            "dl1.24xlarge",
            "f1.16xlarge",
            "f1.2xlarge",
            "f1.4xlarge",
            "g2.2xlarge",
            "g2.8xlarge",
            "g3.16xlarge",
            "g3.4xlarge",
            "g3.8xlarge",
            "g3s.xlarge",
            "g4ad.16xlarge",
            "g4ad.2xlarge",
            "g4ad.4xlarge",
            "g4ad.8xlarge",
            "g4ad.xlarge",
            "g4dn.12xlarge",
            "g4dn.16xlarge",
            "g4dn.2xlarge",
            "g4dn.4xlarge",
            "g4dn.8xlarge",
            "g4dn.metal",
            "g4dn.xlarge",
            "g5.12xlarge",
            "g5.16xlarge",
            "g5.24xlarge",
            "g5.2xlarge",
            "g5.48xlarge",
            "g5.4xlarge",
            "g5.8xlarge",
            "g5.xlarge",
            "g5g.16xlarge",
            "g5g.2xlarge",
            "g5g.4xlarge",
            "g5g.8xlarge",
            "g5g.metal",
            "g5g.xlarge",
            "h1.16xlarge",
            "h1.2xlarge",
            "h1.4xlarge",
            "h1.8xlarge",
            "hi1.4xlarge",
            "hpc6a.48xlarge",
            "hpc6id.32xlarge",
            "hs1.8xlarge",
            "i2.2xlarge",
            "i2.4xlarge",
            "i2.8xlarge",
            "i2.xlarge",
            "i3.16xlarge",
            "i3.2xlarge",
            "i3.4xlarge",
            "i3.8xlarge",
            "i3.large",
            "i3.metal",
            "i3.xlarge",
            "i3en.12xlarge",
            "i3en.24xlarge",
            "i3en.2xlarge",
            "i3en.3xlarge",
            "i3en.6xlarge",
            "i3en.large",
            "i3en.metal",
            "i3en.xlarge",
            "i4i.16xlarge",
            "i4i.2xlarge",
            "i4i.32xlarge",
            "i4i.4xlarge",
            "i4i.8xlarge",
            "i4i.large",
            "i4i.metal",
            "i4i.xlarge",
            "im4gn.16xlarge",
            "im4gn.2xlarge",
            "im4gn.4xlarge",
            "im4gn.8xlarge",
            "im4gn.large",
            "im4gn.xlarge",
            "inf1.24xlarge",
            "inf1.2xlarge",
            "inf1.6xlarge",
            "inf1.xlarge",
            "is4gen.2xlarge",
            "is4gen.4xlarge",
            "is4gen.8xlarge",
            "is4gen.large",
            "is4gen.medium",
            "is4gen.xlarge",
            "m1.large",
            "m1.medium",
            "m1.small",
            "m1.xlarge",
            "m2.2xlarge",
            "m2.4xlarge",
            "m2.xlarge",
            "m3.2xlarge",
            "m3.large",
            "m3.medium",
            "m3.xlarge",
            "m4.10xlarge",
            "m4.16xlarge",
            "m4.2xlarge",
            "m4.4xlarge",
            "m4.large",
            "m4.xlarge",
            "m5.12xlarge",
            "m5.16xlarge",
            "m5.24xlarge",
            "m5.2xlarge",
            "m5.4xlarge",
            "m5.8xlarge",
            "m5.large",
            "m5.metal",
            "m5.xlarge",
            "m5a.12xlarge",
            "m5a.16xlarge",
            "m5a.24xlarge",
            "m5a.2xlarge",
            "m5a.4xlarge",
            "m5a.8xlarge",
            "m5a.large",
            "m5a.xlarge",
            "m5ad.12xlarge",
            "m5ad.16xlarge",
            "m5ad.24xlarge",
            "m5ad.2xlarge",
            "m5ad.4xlarge",
            "m5ad.8xlarge",
            "m5ad.large",
            "m5ad.xlarge",
            "m5d.12xlarge",
            "m5d.16xlarge",
            "m5d.24xlarge",
            "m5d.2xlarge",
            "m5d.4xlarge",
            "m5d.8xlarge",
            "m5d.large",
            "m5d.metal",
            "m5d.xlarge",
            "m5dn.12xlarge",
            "m5dn.16xlarge",
            "m5dn.24xlarge",
            "m5dn.2xlarge",
            "m5dn.4xlarge",
            "m5dn.8xlarge",
            "m5dn.large",
            "m5dn.metal",
            "m5dn.xlarge",
            "m5n.12xlarge",
            "m5n.16xlarge",
            "m5n.24xlarge",
            "m5n.2xlarge",
            "m5n.4xlarge",
            "m5n.8xlarge",
            "m5n.large",
            "m5n.metal",
            "m5n.xlarge",
            "m5zn.12xlarge",
            "m5zn.2xlarge",
            "m5zn.3xlarge",
            "m5zn.6xlarge",
            "m5zn.large",
            "m5zn.metal",
            "m5zn.xlarge",
            "m6a.12xlarge",
            "m6a.16xlarge",
            "m6a.24xlarge",
            "m6a.2xlarge",
            "m6a.32xlarge",
            "m6a.48xlarge",
            "m6a.4xlarge",
            "m6a.8xlarge",
            "m6a.large",
            "m6a.metal",
            "m6a.xlarge",
            "m6g.12xlarge",
            "m6g.16xlarge",
            "m6g.2xlarge",
            "m6g.4xlarge",
            "m6g.8xlarge",
            "m6g.large",
            "m6g.medium",
            "m6g.metal",
            "m6g.xlarge",
            "m6gd.12xlarge",
            "m6gd.16xlarge",
            "m6gd.2xlarge",
            "m6gd.4xlarge",
            "m6gd.8xlarge",
            "m6gd.large",
            "m6gd.medium",
            "m6gd.metal",
            "m6gd.xlarge",
            "m6i.12xlarge",
            "m6i.16xlarge",
            "m6i.24xlarge",
            "m6i.2xlarge",
            "m6i.32xlarge",
            "m6i.4xlarge",
            "m6i.8xlarge",
            "m6i.large",
            "m6i.metal",
            "m6i.xlarge",
            "m6id.12xlarge",
            "m6id.16xlarge",
            "m6id.24xlarge",
            "m6id.2xlarge",
            "m6id.32xlarge",
            "m6id.4xlarge",
            "m6id.8xlarge",
            "m6id.large",
            "m6id.metal",
            "m6id.xlarge",
            "m6idn.12xlarge",
            "m6idn.16xlarge",
            "m6idn.24xlarge",
            "m6idn.2xlarge",
            "m6idn.32xlarge",
            "m6idn.4xlarge",
            "m6idn.8xlarge",
            "m6idn.large",
            "m6idn.xlarge",
            "m6in.12xlarge",
            "m6in.16xlarge",
            "m6in.24xlarge",
            "m6in.2xlarge",
            "m6in.32xlarge",
            "m6in.4xlarge",
            "m6in.8xlarge",
            "m6in.large",
            "m6in.xlarge",
            "mac1.metal",
            "mac2.metal",
            "p2.16xlarge",
            "p2.8xlarge",
            "p2.xlarge",
            "p3.16xlarge",
            "p3.2xlarge",
            "p3.8xlarge",
            "p3dn.24xlarge",
            "p4d.24xlarge",
            "p4de.24xlarge",
            "r3.2xlarge",
            "r3.4xlarge",
            "r3.8xlarge",
            "r3.large",
            "r3.xlarge",
            "r4.16xlarge",
            "r4.2xlarge",
            "r4.4xlarge",
            "r4.8xlarge",
            "r4.large",
            "r4.xlarge",
            "r5.12xlarge",
            "r5.16xlarge",
            "r5.24xlarge",
            "r5.2xlarge",
            "r5.4xlarge",
            "r5.8xlarge",
            "r5.large",
            "r5.metal",
            "r5.xlarge",
            "r5a.12xlarge",
            "r5a.16xlarge",
            "r5a.24xlarge",
            "r5a.2xlarge",
            "r5a.4xlarge",
            "r5a.8xlarge",
            "r5a.large",
            "r5a.xlarge",
            "r5ad.12xlarge",
            "r5ad.16xlarge",
            "r5ad.24xlarge",
            "r5ad.2xlarge",
            "r5ad.4xlarge",
            "r5ad.8xlarge",
            "r5ad.large",
            "r5ad.xlarge",
            "r5b.12xlarge",
            "r5b.16xlarge",
            "r5b.24xlarge",
            "r5b.2xlarge",
            "r5b.4xlarge",
            "r5b.8xlarge",
            "r5b.large",
            "r5b.metal",
            "r5b.xlarge",
            "r5d.12xlarge",
            "r5d.16xlarge",
            "r5d.24xlarge",
            "r5d.2xlarge",
            "r5d.4xlarge",
            "r5d.8xlarge",
            "r5d.large",
            "r5d.metal",
            "r5d.xlarge",
            "r5dn.12xlarge",
            "r5dn.16xlarge",
            "r5dn.24xlarge",
            "r5dn.2xlarge",
            "r5dn.4xlarge",
            "r5dn.8xlarge",
            "r5dn.large",
            "r5dn.metal",
            "r5dn.xlarge",
            "r5n.12xlarge",
            "r5n.16xlarge",
            "r5n.24xlarge",
            "r5n.2xlarge",
            "r5n.4xlarge",
            "r5n.8xlarge",
            "r5n.large",
            "r5n.metal",
            "r5n.xlarge",
            "r6a.12xlarge",
            "r6a.16xlarge",
            "r6a.24xlarge",
            "r6a.2xlarge",
            "r6a.32xlarge",
            "r6a.48xlarge",
            "r6a.4xlarge",
            "r6a.8xlarge",
            "r6a.large",
            "r6a.metal",
            "r6a.xlarge",
            "r6g.12xlarge",
            "r6g.16xlarge",
            "r6g.2xlarge",
            "r6g.4xlarge",
            "r6g.8xlarge",
            "r6g.large",
            "r6g.medium",
            "r6g.metal",
            "r6g.xlarge",
            "r6gd.12xlarge",
            "r6gd.16xlarge",
            "r6gd.2xlarge",
            "r6gd.4xlarge",
            "r6gd.8xlarge",
            "r6gd.large",
            "r6gd.medium",
            "r6gd.metal",
            "r6gd.xlarge",
            "r6i.12xlarge",
            "r6i.16xlarge",
            "r6i.24xlarge",
            "r6i.2xlarge",
            "r6i.32xlarge",
            "r6i.4xlarge",
            "r6i.8xlarge",
            "r6i.large",
            "r6i.metal",
            "r6i.xlarge",
            "r6id.12xlarge",
            "r6id.16xlarge",
            "r6id.24xlarge",
            "r6id.2xlarge",
            "r6id.32xlarge",
            "r6id.4xlarge",
            "r6id.8xlarge",
            "r6id.large",
            "r6id.metal",
            "r6id.xlarge",
            "r6idn.12xlarge",
            "r6idn.16xlarge",
            "r6idn.24xlarge",
            "r6idn.2xlarge",
            "r6idn.32xlarge",
            "r6idn.4xlarge",
            "r6idn.8xlarge",
            "r6idn.large",
            "r6idn.xlarge",
            "r6in.12xlarge",
            "r6in.16xlarge",
            "r6in.24xlarge",
            "r6in.2xlarge",
            "r6in.32xlarge",
            "r6in.4xlarge",
            "r6in.8xlarge",
            "r6in.large",
            "r6in.xlarge",
            "t1.micro",
            "t2.2xlarge",
            "t2.large",
            "t2.medium",
            "t2.micro",
            "t2.nano",
            "t2.small",
            "t2.xlarge",
            "t3.2xlarge",
            "t3.large",
            "t3.medium",
            "t3.micro",
            "t3.nano",
            "t3.small",
            "t3.xlarge",
            "t3a.2xlarge",
            "t3a.large",
            "t3a.medium",
            "t3a.micro",
            "t3a.nano",
            "t3a.small",
            "t3a.xlarge",
            "t4g.2xlarge",
            "t4g.large",
            "t4g.medium",
            "t4g.micro",
            "t4g.nano",
            "t4g.small",
            "t4g.xlarge",
            "trn1.2xlarge",
            "trn1.32xlarge",
            "u-12tb1.112xlarge",
            "u-12tb1.metal",
            "u-18tb1.112xlarge",
            "u-18tb1.metal",
            "u-24tb1.112xlarge",
            "u-24tb1.metal",
            "u-3tb1.56xlarge",
            "u-6tb1.112xlarge",
            "u-6tb1.56xlarge",
            "u-6tb1.metal",
            "u-9tb1.112xlarge",
            "u-9tb1.metal",
            "vt1.24xlarge",
            "vt1.3xlarge",
            "vt1.6xlarge",
            "x1.16xlarge",
            "x1.32xlarge",
            "x1e.16xlarge",
            "x1e.2xlarge",
            "x1e.32xlarge",
            "x1e.4xlarge",
            "x1e.8xlarge",
            "x1e.xlarge",
            "x2gd.12xlarge",
            "x2gd.16xlarge",
            "x2gd.2xlarge",
            "x2gd.4xlarge",
            "x2gd.8xlarge",
            "x2gd.large",
            "x2gd.medium",
            "x2gd.metal",
            "x2gd.xlarge",
            "x2idn.16xlarge",
            "x2idn.24xlarge",
            "x2idn.32xlarge",
            "x2idn.metal",
            "x2iedn.16xlarge",
            "x2iedn.24xlarge",
            "x2iedn.2xlarge",
            "x2iedn.32xlarge",
            "x2iedn.4xlarge",
            "x2iedn.8xlarge",
            "x2iedn.metal",
            "x2iedn.xlarge",
            "x2iezn.12xlarge",
            "x2iezn.2xlarge",
            "x2iezn.4xlarge",
            "x2iezn.6xlarge",
            "x2iezn.8xlarge",
            "x2iezn.metal",
            "z1d.12xlarge",
            "z1d.2xlarge",
            "z1d.3xlarge",
            "z1d.6xlarge",
            "z1d.large",
            "z1d.metal",
            "z1d.xlarge",
        ]
    }
}
impl AsRef<str> for InstanceType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>The maintenance options for the instance.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InstanceMaintenanceOptionsRequest {
    /// <p>Disables the automatic recovery behavior of your instance or sets it to default. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-recover.html#instance-configuration-recovery">Simplified automatic recovery</a>.</p>
    #[doc(hidden)]
    pub auto_recovery: std::option::Option<crate::model::InstanceAutoRecoveryState>,
}
impl InstanceMaintenanceOptionsRequest {
    /// <p>Disables the automatic recovery behavior of your instance or sets it to default. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-recover.html#instance-configuration-recovery">Simplified automatic recovery</a>.</p>
    pub fn auto_recovery(&self) -> std::option::Option<&crate::model::InstanceAutoRecoveryState> {
        self.auto_recovery.as_ref()
    }
}
/// See [`InstanceMaintenanceOptionsRequest`](crate::model::InstanceMaintenanceOptionsRequest).
pub mod instance_maintenance_options_request {

    /// A builder for [`InstanceMaintenanceOptionsRequest`](crate::model::InstanceMaintenanceOptionsRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) auto_recovery: std::option::Option<crate::model::InstanceAutoRecoveryState>,
    }
    impl Builder {
        /// <p>Disables the automatic recovery behavior of your instance or sets it to default. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-recover.html#instance-configuration-recovery">Simplified automatic recovery</a>.</p>
        pub fn auto_recovery(mut self, input: crate::model::InstanceAutoRecoveryState) -> Self {
            self.auto_recovery = Some(input);
            self
        }
        /// <p>Disables the automatic recovery behavior of your instance or sets it to default. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-recover.html#instance-configuration-recovery">Simplified automatic recovery</a>.</p>
        pub fn set_auto_recovery(
            mut self,
            input: std::option::Option<crate::model::InstanceAutoRecoveryState>,
        ) -> Self {
            self.auto_recovery = input;
            self
        }
        /// Consumes the builder and constructs a [`InstanceMaintenanceOptionsRequest`](crate::model::InstanceMaintenanceOptionsRequest).
        pub fn build(self) -> crate::model::InstanceMaintenanceOptionsRequest {
            crate::model::InstanceMaintenanceOptionsRequest {
                auto_recovery: self.auto_recovery,
            }
        }
    }
}
impl InstanceMaintenanceOptionsRequest {
    /// Creates a new builder-style object to manufacture [`InstanceMaintenanceOptionsRequest`](crate::model::InstanceMaintenanceOptionsRequest).
    pub fn builder() -> crate::model::instance_maintenance_options_request::Builder {
        crate::model::instance_maintenance_options_request::Builder::default()
    }
}

/// <p>Describes the options for instance hostnames.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct PrivateDnsNameOptionsRequest {
    /// <p>The type of hostname for EC2 instances. For IPv4 only subnets, an instance DNS name must be based on the instance IPv4 address. For IPv6 only subnets, an instance DNS name must be based on the instance ID. For dual-stack subnets, you can specify whether DNS names use the instance IPv4 address or the instance ID.</p>
    #[doc(hidden)]
    pub hostname_type: std::option::Option<crate::model::HostnameType>,
    /// <p>Indicates whether to respond to DNS queries for instance hostnames with DNS A records.</p>
    #[doc(hidden)]
    pub enable_resource_name_dns_a_record: std::option::Option<bool>,
    /// <p>Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records.</p>
    #[doc(hidden)]
    pub enable_resource_name_dns_aaaa_record: std::option::Option<bool>,
}
impl PrivateDnsNameOptionsRequest {
    /// <p>The type of hostname for EC2 instances. For IPv4 only subnets, an instance DNS name must be based on the instance IPv4 address. For IPv6 only subnets, an instance DNS name must be based on the instance ID. For dual-stack subnets, you can specify whether DNS names use the instance IPv4 address or the instance ID.</p>
    pub fn hostname_type(&self) -> std::option::Option<&crate::model::HostnameType> {
        self.hostname_type.as_ref()
    }
    /// <p>Indicates whether to respond to DNS queries for instance hostnames with DNS A records.</p>
    pub fn enable_resource_name_dns_a_record(&self) -> std::option::Option<bool> {
        self.enable_resource_name_dns_a_record
    }
    /// <p>Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records.</p>
    pub fn enable_resource_name_dns_aaaa_record(&self) -> std::option::Option<bool> {
        self.enable_resource_name_dns_aaaa_record
    }
}
/// See [`PrivateDnsNameOptionsRequest`](crate::model::PrivateDnsNameOptionsRequest).
pub mod private_dns_name_options_request {

    /// A builder for [`PrivateDnsNameOptionsRequest`](crate::model::PrivateDnsNameOptionsRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) hostname_type: std::option::Option<crate::model::HostnameType>,
        pub(crate) enable_resource_name_dns_a_record: std::option::Option<bool>,
        pub(crate) enable_resource_name_dns_aaaa_record: std::option::Option<bool>,
    }
    impl Builder {
        /// <p>The type of hostname for EC2 instances. For IPv4 only subnets, an instance DNS name must be based on the instance IPv4 address. For IPv6 only subnets, an instance DNS name must be based on the instance ID. For dual-stack subnets, you can specify whether DNS names use the instance IPv4 address or the instance ID.</p>
        pub fn hostname_type(mut self, input: crate::model::HostnameType) -> Self {
            self.hostname_type = Some(input);
            self
        }
        /// <p>The type of hostname for EC2 instances. For IPv4 only subnets, an instance DNS name must be based on the instance IPv4 address. For IPv6 only subnets, an instance DNS name must be based on the instance ID. For dual-stack subnets, you can specify whether DNS names use the instance IPv4 address or the instance ID.</p>
        pub fn set_hostname_type(
            mut self,
            input: std::option::Option<crate::model::HostnameType>,
        ) -> Self {
            self.hostname_type = input;
            self
        }
        /// <p>Indicates whether to respond to DNS queries for instance hostnames with DNS A records.</p>
        pub fn enable_resource_name_dns_a_record(mut self, input: bool) -> Self {
            self.enable_resource_name_dns_a_record = Some(input);
            self
        }
        /// <p>Indicates whether to respond to DNS queries for instance hostnames with DNS A records.</p>
        pub fn set_enable_resource_name_dns_a_record(
            mut self,
            input: std::option::Option<bool>,
        ) -> Self {
            self.enable_resource_name_dns_a_record = input;
            self
        }
        /// <p>Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records.</p>
        pub fn enable_resource_name_dns_aaaa_record(mut self, input: bool) -> Self {
            self.enable_resource_name_dns_aaaa_record = Some(input);
            self
        }
        /// <p>Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records.</p>
        pub fn set_enable_resource_name_dns_aaaa_record(
            mut self,
            input: std::option::Option<bool>,
        ) -> Self {
            self.enable_resource_name_dns_aaaa_record = input;
            self
        }
        /// Consumes the builder and constructs a [`PrivateDnsNameOptionsRequest`](crate::model::PrivateDnsNameOptionsRequest).
        pub fn build(self) -> crate::model::PrivateDnsNameOptionsRequest {
            crate::model::PrivateDnsNameOptionsRequest {
                hostname_type: self.hostname_type,
                enable_resource_name_dns_a_record: self.enable_resource_name_dns_a_record,
                enable_resource_name_dns_aaaa_record: self.enable_resource_name_dns_aaaa_record,
            }
        }
    }
}
impl PrivateDnsNameOptionsRequest {
    /// Creates a new builder-style object to manufacture [`PrivateDnsNameOptionsRequest`](crate::model::PrivateDnsNameOptionsRequest).
    pub fn builder() -> crate::model::private_dns_name_options_request::Builder {
        crate::model::private_dns_name_options_request::Builder::default()
    }
}

/// <p>Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves. For more information, see <a href="https://docs.aws.amazon.com/enclaves/latest/user/nitro-enclave.html"> What is Amazon Web Services Nitro Enclaves?</a> in the <i>Amazon Web Services Nitro Enclaves User Guide</i>.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct EnclaveOptionsRequest {
    /// <p>To enable the instance for Amazon Web Services Nitro Enclaves, set this parameter to <code>true</code>.</p>
    #[doc(hidden)]
    pub enabled: std::option::Option<bool>,
}
impl EnclaveOptionsRequest {
    /// <p>To enable the instance for Amazon Web Services Nitro Enclaves, set this parameter to <code>true</code>.</p>
    pub fn enabled(&self) -> std::option::Option<bool> {
        self.enabled
    }
}
/// See [`EnclaveOptionsRequest`](crate::model::EnclaveOptionsRequest).
pub mod enclave_options_request {

    /// A builder for [`EnclaveOptionsRequest`](crate::model::EnclaveOptionsRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) enabled: std::option::Option<bool>,
    }
    impl Builder {
        /// <p>To enable the instance for Amazon Web Services Nitro Enclaves, set this parameter to <code>true</code>.</p>
        pub fn enabled(mut self, input: bool) -> Self {
            self.enabled = Some(input);
            self
        }
        /// <p>To enable the instance for Amazon Web Services Nitro Enclaves, set this parameter to <code>true</code>.</p>
        pub fn set_enabled(mut self, input: std::option::Option<bool>) -> Self {
            self.enabled = input;
            self
        }
        /// Consumes the builder and constructs a [`EnclaveOptionsRequest`](crate::model::EnclaveOptionsRequest).
        pub fn build(self) -> crate::model::EnclaveOptionsRequest {
            crate::model::EnclaveOptionsRequest {
                enabled: self.enabled,
            }
        }
    }
}
impl EnclaveOptionsRequest {
    /// Creates a new builder-style object to manufacture [`EnclaveOptionsRequest`](crate::model::EnclaveOptionsRequest).
    pub fn builder() -> crate::model::enclave_options_request::Builder {
        crate::model::enclave_options_request::Builder::default()
    }
}

/// <p>The metadata options for the instance.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InstanceMetadataOptionsRequest {
    /// <p>IMDSv2 uses token-backed sessions. Set the use of HTTP tokens to <code>optional</code> (in other words, set the use of IMDSv2 to <code>optional</code>) or <code>required</code> (in other words, set the use of IMDSv2 to <code>required</code>).</p>
    /// <ul>
    /// <li> <p> <code>optional</code> - When IMDSv2 is optional, you can choose to retrieve instance metadata with or without a session token in your request. If you retrieve the IAM role credentials without a token, the IMDSv1 role credentials are returned. If you retrieve the IAM role credentials using a valid session token, the IMDSv2 role credentials are returned.</p> </li>
    /// <li> <p> <code>required</code> - When IMDSv2 is required, you must send a session token with any instance metadata retrieval requests. In this state, retrieving the IAM role credentials always returns IMDSv2 credentials; IMDSv1 credentials are not available.</p> </li>
    /// </ul>
    /// <p>Default: <code>optional</code> </p>
    #[doc(hidden)]
    pub http_tokens: std::option::Option<crate::model::HttpTokensState>,
    /// <p>The desired HTTP PUT response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel.</p>
    /// <p>Default: 1</p>
    /// <p>Possible values: Integers from 1 to 64</p>
    #[doc(hidden)]
    pub http_put_response_hop_limit: std::option::Option<i32>,
    /// <p>Enables or disables the HTTP metadata endpoint on your instances.</p>
    /// <p>If you specify a value of <code>disabled</code>, you cannot access your instance metadata.</p>
    /// <p>Default: <code>enabled</code> </p>
    #[doc(hidden)]
    pub http_endpoint: std::option::Option<crate::model::InstanceMetadataEndpointState>,
    /// <p>Enables or disables the IPv6 endpoint for the instance metadata service.</p>
    #[doc(hidden)]
    pub http_protocol_ipv6: std::option::Option<crate::model::InstanceMetadataProtocolState>,
    /// <p>Set to <code>enabled</code> to allow access to instance tags from the instance metadata. Set to <code>disabled</code> to turn off access to instance tags from the instance metadata. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html#work-with-tags-in-IMDS">Work with instance tags using the instance metadata</a>.</p>
    /// <p>Default: <code>disabled</code> </p>
    #[doc(hidden)]
    pub instance_metadata_tags: std::option::Option<crate::model::InstanceMetadataTagsState>,
}
impl InstanceMetadataOptionsRequest {
    /// <p>IMDSv2 uses token-backed sessions. Set the use of HTTP tokens to <code>optional</code> (in other words, set the use of IMDSv2 to <code>optional</code>) or <code>required</code> (in other words, set the use of IMDSv2 to <code>required</code>).</p>
    /// <ul>
    /// <li> <p> <code>optional</code> - When IMDSv2 is optional, you can choose to retrieve instance metadata with or without a session token in your request. If you retrieve the IAM role credentials without a token, the IMDSv1 role credentials are returned. If you retrieve the IAM role credentials using a valid session token, the IMDSv2 role credentials are returned.</p> </li>
    /// <li> <p> <code>required</code> - When IMDSv2 is required, you must send a session token with any instance metadata retrieval requests. In this state, retrieving the IAM role credentials always returns IMDSv2 credentials; IMDSv1 credentials are not available.</p> </li>
    /// </ul>
    /// <p>Default: <code>optional</code> </p>
    pub fn http_tokens(&self) -> std::option::Option<&crate::model::HttpTokensState> {
        self.http_tokens.as_ref()
    }
    /// <p>The desired HTTP PUT response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel.</p>
    /// <p>Default: 1</p>
    /// <p>Possible values: Integers from 1 to 64</p>
    pub fn http_put_response_hop_limit(&self) -> std::option::Option<i32> {
        self.http_put_response_hop_limit
    }
    /// <p>Enables or disables the HTTP metadata endpoint on your instances.</p>
    /// <p>If you specify a value of <code>disabled</code>, you cannot access your instance metadata.</p>
    /// <p>Default: <code>enabled</code> </p>
    pub fn http_endpoint(
        &self,
    ) -> std::option::Option<&crate::model::InstanceMetadataEndpointState> {
        self.http_endpoint.as_ref()
    }
    /// <p>Enables or disables the IPv6 endpoint for the instance metadata service.</p>
    pub fn http_protocol_ipv6(
        &self,
    ) -> std::option::Option<&crate::model::InstanceMetadataProtocolState> {
        self.http_protocol_ipv6.as_ref()
    }
    /// <p>Set to <code>enabled</code> to allow access to instance tags from the instance metadata. Set to <code>disabled</code> to turn off access to instance tags from the instance metadata. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html#work-with-tags-in-IMDS">Work with instance tags using the instance metadata</a>.</p>
    /// <p>Default: <code>disabled</code> </p>
    pub fn instance_metadata_tags(
        &self,
    ) -> std::option::Option<&crate::model::InstanceMetadataTagsState> {
        self.instance_metadata_tags.as_ref()
    }
}
/// See [`InstanceMetadataOptionsRequest`](crate::model::InstanceMetadataOptionsRequest).
pub mod instance_metadata_options_request {

    /// A builder for [`InstanceMetadataOptionsRequest`](crate::model::InstanceMetadataOptionsRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) http_tokens: std::option::Option<crate::model::HttpTokensState>,
        pub(crate) http_put_response_hop_limit: std::option::Option<i32>,
        pub(crate) http_endpoint: std::option::Option<crate::model::InstanceMetadataEndpointState>,
        pub(crate) http_protocol_ipv6:
            std::option::Option<crate::model::InstanceMetadataProtocolState>,
        pub(crate) instance_metadata_tags:
            std::option::Option<crate::model::InstanceMetadataTagsState>,
    }
    impl Builder {
        /// <p>IMDSv2 uses token-backed sessions. Set the use of HTTP tokens to <code>optional</code> (in other words, set the use of IMDSv2 to <code>optional</code>) or <code>required</code> (in other words, set the use of IMDSv2 to <code>required</code>).</p>
        /// <ul>
        /// <li> <p> <code>optional</code> - When IMDSv2 is optional, you can choose to retrieve instance metadata with or without a session token in your request. If you retrieve the IAM role credentials without a token, the IMDSv1 role credentials are returned. If you retrieve the IAM role credentials using a valid session token, the IMDSv2 role credentials are returned.</p> </li>
        /// <li> <p> <code>required</code> - When IMDSv2 is required, you must send a session token with any instance metadata retrieval requests. In this state, retrieving the IAM role credentials always returns IMDSv2 credentials; IMDSv1 credentials are not available.</p> </li>
        /// </ul>
        /// <p>Default: <code>optional</code> </p>
        pub fn http_tokens(mut self, input: crate::model::HttpTokensState) -> Self {
            self.http_tokens = Some(input);
            self
        }
        /// <p>IMDSv2 uses token-backed sessions. Set the use of HTTP tokens to <code>optional</code> (in other words, set the use of IMDSv2 to <code>optional</code>) or <code>required</code> (in other words, set the use of IMDSv2 to <code>required</code>).</p>
        /// <ul>
        /// <li> <p> <code>optional</code> - When IMDSv2 is optional, you can choose to retrieve instance metadata with or without a session token in your request. If you retrieve the IAM role credentials without a token, the IMDSv1 role credentials are returned. If you retrieve the IAM role credentials using a valid session token, the IMDSv2 role credentials are returned.</p> </li>
        /// <li> <p> <code>required</code> - When IMDSv2 is required, you must send a session token with any instance metadata retrieval requests. In this state, retrieving the IAM role credentials always returns IMDSv2 credentials; IMDSv1 credentials are not available.</p> </li>
        /// </ul>
        /// <p>Default: <code>optional</code> </p>
        pub fn set_http_tokens(
            mut self,
            input: std::option::Option<crate::model::HttpTokensState>,
        ) -> Self {
            self.http_tokens = input;
            self
        }
        /// <p>The desired HTTP PUT response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel.</p>
        /// <p>Default: 1</p>
        /// <p>Possible values: Integers from 1 to 64</p>
        pub fn http_put_response_hop_limit(mut self, input: i32) -> Self {
            self.http_put_response_hop_limit = Some(input);
            self
        }
        /// <p>The desired HTTP PUT response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel.</p>
        /// <p>Default: 1</p>
        /// <p>Possible values: Integers from 1 to 64</p>
        pub fn set_http_put_response_hop_limit(mut self, input: std::option::Option<i32>) -> Self {
            self.http_put_response_hop_limit = input;
            self
        }
        /// <p>Enables or disables the HTTP metadata endpoint on your instances.</p>
        /// <p>If you specify a value of <code>disabled</code>, you cannot access your instance metadata.</p>
        /// <p>Default: <code>enabled</code> </p>
        pub fn http_endpoint(mut self, input: crate::model::InstanceMetadataEndpointState) -> Self {
            self.http_endpoint = Some(input);
            self
        }
        /// <p>Enables or disables the HTTP metadata endpoint on your instances.</p>
        /// <p>If you specify a value of <code>disabled</code>, you cannot access your instance metadata.</p>
        /// <p>Default: <code>enabled</code> </p>
        pub fn set_http_endpoint(
            mut self,
            input: std::option::Option<crate::model::InstanceMetadataEndpointState>,
        ) -> Self {
            self.http_endpoint = input;
            self
        }
        /// <p>Enables or disables the IPv6 endpoint for the instance metadata service.</p>
        pub fn http_protocol_ipv6(
            mut self,
            input: crate::model::InstanceMetadataProtocolState,
        ) -> Self {
            self.http_protocol_ipv6 = Some(input);
            self
        }
        /// <p>Enables or disables the IPv6 endpoint for the instance metadata service.</p>
        pub fn set_http_protocol_ipv6(
            mut self,
            input: std::option::Option<crate::model::InstanceMetadataProtocolState>,
        ) -> Self {
            self.http_protocol_ipv6 = input;
            self
        }
        /// <p>Set to <code>enabled</code> to allow access to instance tags from the instance metadata. Set to <code>disabled</code> to turn off access to instance tags from the instance metadata. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html#work-with-tags-in-IMDS">Work with instance tags using the instance metadata</a>.</p>
        /// <p>Default: <code>disabled</code> </p>
        pub fn instance_metadata_tags(
            mut self,
            input: crate::model::InstanceMetadataTagsState,
        ) -> Self {
            self.instance_metadata_tags = Some(input);
            self
        }
        /// <p>Set to <code>enabled</code> to allow access to instance tags from the instance metadata. Set to <code>disabled</code> to turn off access to instance tags from the instance metadata. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html#work-with-tags-in-IMDS">Work with instance tags using the instance metadata</a>.</p>
        /// <p>Default: <code>disabled</code> </p>
        pub fn set_instance_metadata_tags(
            mut self,
            input: std::option::Option<crate::model::InstanceMetadataTagsState>,
        ) -> Self {
            self.instance_metadata_tags = input;
            self
        }
        /// Consumes the builder and constructs a [`InstanceMetadataOptionsRequest`](crate::model::InstanceMetadataOptionsRequest).
        pub fn build(self) -> crate::model::InstanceMetadataOptionsRequest {
            crate::model::InstanceMetadataOptionsRequest {
                http_tokens: self.http_tokens,
                http_put_response_hop_limit: self.http_put_response_hop_limit,
                http_endpoint: self.http_endpoint,
                http_protocol_ipv6: self.http_protocol_ipv6,
                instance_metadata_tags: self.instance_metadata_tags,
            }
        }
    }
}
impl InstanceMetadataOptionsRequest {
    /// Creates a new builder-style object to manufacture [`InstanceMetadataOptionsRequest`](crate::model::InstanceMetadataOptionsRequest).
    pub fn builder() -> crate::model::instance_metadata_options_request::Builder {
        crate::model::instance_metadata_options_request::Builder::default()
    }
}

/// <p>Describes a license configuration.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LicenseConfigurationRequest {
    /// <p>The Amazon Resource Name (ARN) of the license configuration.</p>
    #[doc(hidden)]
    pub license_configuration_arn: std::option::Option<std::string::String>,
}
impl LicenseConfigurationRequest {
    /// <p>The Amazon Resource Name (ARN) of the license configuration.</p>
    pub fn license_configuration_arn(&self) -> std::option::Option<&str> {
        self.license_configuration_arn.as_deref()
    }
}
/// See [`LicenseConfigurationRequest`](crate::model::LicenseConfigurationRequest).
pub mod license_configuration_request {

    /// A builder for [`LicenseConfigurationRequest`](crate::model::LicenseConfigurationRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) license_configuration_arn: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The Amazon Resource Name (ARN) of the license configuration.</p>
        pub fn license_configuration_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.license_configuration_arn = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the license configuration.</p>
        pub fn set_license_configuration_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.license_configuration_arn = input;
            self
        }
        /// Consumes the builder and constructs a [`LicenseConfigurationRequest`](crate::model::LicenseConfigurationRequest).
        pub fn build(self) -> crate::model::LicenseConfigurationRequest {
            crate::model::LicenseConfigurationRequest {
                license_configuration_arn: self.license_configuration_arn,
            }
        }
    }
}
impl LicenseConfigurationRequest {
    /// Creates a new builder-style object to manufacture [`LicenseConfigurationRequest`](crate::model::LicenseConfigurationRequest).
    pub fn builder() -> crate::model::license_configuration_request::Builder {
        crate::model::license_configuration_request::Builder::default()
    }
}

/// <p>Indicates whether your instance is configured for hibernation. This parameter is valid only if the instance meets the <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html#hibernating-prerequisites">hibernation prerequisites</a>. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html">Hibernate your instance</a> in the <i>Amazon EC2 User Guide</i>.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct HibernationOptionsRequest {
    /// <p>If you set this parameter to <code>true</code>, your instance is enabled for hibernation.</p>
    /// <p>Default: <code>false</code> </p>
    #[doc(hidden)]
    pub configured: std::option::Option<bool>,
}
impl HibernationOptionsRequest {
    /// <p>If you set this parameter to <code>true</code>, your instance is enabled for hibernation.</p>
    /// <p>Default: <code>false</code> </p>
    pub fn configured(&self) -> std::option::Option<bool> {
        self.configured
    }
}
/// See [`HibernationOptionsRequest`](crate::model::HibernationOptionsRequest).
pub mod hibernation_options_request {

    /// A builder for [`HibernationOptionsRequest`](crate::model::HibernationOptionsRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) configured: std::option::Option<bool>,
    }
    impl Builder {
        /// <p>If you set this parameter to <code>true</code>, your instance is enabled for hibernation.</p>
        /// <p>Default: <code>false</code> </p>
        pub fn configured(mut self, input: bool) -> Self {
            self.configured = Some(input);
            self
        }
        /// <p>If you set this parameter to <code>true</code>, your instance is enabled for hibernation.</p>
        /// <p>Default: <code>false</code> </p>
        pub fn set_configured(mut self, input: std::option::Option<bool>) -> Self {
            self.configured = input;
            self
        }
        /// Consumes the builder and constructs a [`HibernationOptionsRequest`](crate::model::HibernationOptionsRequest).
        pub fn build(self) -> crate::model::HibernationOptionsRequest {
            crate::model::HibernationOptionsRequest {
                configured: self.configured,
            }
        }
    }
}
impl HibernationOptionsRequest {
    /// Creates a new builder-style object to manufacture [`HibernationOptionsRequest`](crate::model::HibernationOptionsRequest).
    pub fn builder() -> crate::model::hibernation_options_request::Builder {
        crate::model::hibernation_options_request::Builder::default()
    }
}

/// <p>Describes an instance's Capacity Reservation targeting option. You can specify only one parameter at a time. If you specify <code>CapacityReservationPreference</code> and <code>CapacityReservationTarget</code>, the request fails.</p>
/// <p>Use the <code>CapacityReservationPreference</code> parameter to configure the instance to run as an On-Demand Instance or to run in any <code>open</code> Capacity Reservation that has matching attributes (instance type, platform, Availability Zone). Use the <code>CapacityReservationTarget</code> parameter to explicitly target a specific Capacity Reservation or a Capacity Reservation group.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CapacityReservationSpecification {
    /// <p>Indicates the instance's Capacity Reservation preferences. Possible preferences include:</p>
    /// <ul>
    /// <li> <p> <code>open</code> - The instance can run in any <code>open</code> Capacity Reservation that has matching attributes (instance type, platform, Availability Zone).</p> </li>
    /// <li> <p> <code>none</code> - The instance avoids running in a Capacity Reservation even if one is available. The instance runs as an On-Demand Instance.</p> </li>
    /// </ul>
    #[doc(hidden)]
    pub capacity_reservation_preference:
        std::option::Option<crate::model::CapacityReservationPreference>,
    /// <p>Information about the target Capacity Reservation or Capacity Reservation group.</p>
    #[doc(hidden)]
    pub capacity_reservation_target: std::option::Option<crate::model::CapacityReservationTarget>,
}
impl CapacityReservationSpecification {
    /// <p>Indicates the instance's Capacity Reservation preferences. Possible preferences include:</p>
    /// <ul>
    /// <li> <p> <code>open</code> - The instance can run in any <code>open</code> Capacity Reservation that has matching attributes (instance type, platform, Availability Zone).</p> </li>
    /// <li> <p> <code>none</code> - The instance avoids running in a Capacity Reservation even if one is available. The instance runs as an On-Demand Instance.</p> </li>
    /// </ul>
    pub fn capacity_reservation_preference(
        &self,
    ) -> std::option::Option<&crate::model::CapacityReservationPreference> {
        self.capacity_reservation_preference.as_ref()
    }
    /// <p>Information about the target Capacity Reservation or Capacity Reservation group.</p>
    pub fn capacity_reservation_target(
        &self,
    ) -> std::option::Option<&crate::model::CapacityReservationTarget> {
        self.capacity_reservation_target.as_ref()
    }
}
/// See [`CapacityReservationSpecification`](crate::model::CapacityReservationSpecification).
pub mod capacity_reservation_specification {

    /// A builder for [`CapacityReservationSpecification`](crate::model::CapacityReservationSpecification).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) capacity_reservation_preference:
            std::option::Option<crate::model::CapacityReservationPreference>,
        pub(crate) capacity_reservation_target:
            std::option::Option<crate::model::CapacityReservationTarget>,
    }
    impl Builder {
        /// <p>Indicates the instance's Capacity Reservation preferences. Possible preferences include:</p>
        /// <ul>
        /// <li> <p> <code>open</code> - The instance can run in any <code>open</code> Capacity Reservation that has matching attributes (instance type, platform, Availability Zone).</p> </li>
        /// <li> <p> <code>none</code> - The instance avoids running in a Capacity Reservation even if one is available. The instance runs as an On-Demand Instance.</p> </li>
        /// </ul>
        pub fn capacity_reservation_preference(
            mut self,
            input: crate::model::CapacityReservationPreference,
        ) -> Self {
            self.capacity_reservation_preference = Some(input);
            self
        }
        /// <p>Indicates the instance's Capacity Reservation preferences. Possible preferences include:</p>
        /// <ul>
        /// <li> <p> <code>open</code> - The instance can run in any <code>open</code> Capacity Reservation that has matching attributes (instance type, platform, Availability Zone).</p> </li>
        /// <li> <p> <code>none</code> - The instance avoids running in a Capacity Reservation even if one is available. The instance runs as an On-Demand Instance.</p> </li>
        /// </ul>
        pub fn set_capacity_reservation_preference(
            mut self,
            input: std::option::Option<crate::model::CapacityReservationPreference>,
        ) -> Self {
            self.capacity_reservation_preference = input;
            self
        }
        /// <p>Information about the target Capacity Reservation or Capacity Reservation group.</p>
        pub fn capacity_reservation_target(
            mut self,
            input: crate::model::CapacityReservationTarget,
        ) -> Self {
            self.capacity_reservation_target = Some(input);
            self
        }
        /// <p>Information about the target Capacity Reservation or Capacity Reservation group.</p>
        pub fn set_capacity_reservation_target(
            mut self,
            input: std::option::Option<crate::model::CapacityReservationTarget>,
        ) -> Self {
            self.capacity_reservation_target = input;
            self
        }
        /// Consumes the builder and constructs a [`CapacityReservationSpecification`](crate::model::CapacityReservationSpecification).
        pub fn build(self) -> crate::model::CapacityReservationSpecification {
            crate::model::CapacityReservationSpecification {
                capacity_reservation_preference: self.capacity_reservation_preference,
                capacity_reservation_target: self.capacity_reservation_target,
            }
        }
    }
}
impl CapacityReservationSpecification {
    /// Creates a new builder-style object to manufacture [`CapacityReservationSpecification`](crate::model::CapacityReservationSpecification).
    pub fn builder() -> crate::model::capacity_reservation_specification::Builder {
        crate::model::capacity_reservation_specification::Builder::default()
    }
}

/// <p>Describes a target Capacity Reservation or Capacity Reservation group.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CapacityReservationTarget {
    /// <p>The ID of the Capacity Reservation in which to run the instance.</p>
    #[doc(hidden)]
    pub capacity_reservation_id: std::option::Option<std::string::String>,
    /// <p>The ARN of the Capacity Reservation resource group in which to run the instance.</p>
    #[doc(hidden)]
    pub capacity_reservation_resource_group_arn: std::option::Option<std::string::String>,
}
impl CapacityReservationTarget {
    /// <p>The ID of the Capacity Reservation in which to run the instance.</p>
    pub fn capacity_reservation_id(&self) -> std::option::Option<&str> {
        self.capacity_reservation_id.as_deref()
    }
    /// <p>The ARN of the Capacity Reservation resource group in which to run the instance.</p>
    pub fn capacity_reservation_resource_group_arn(&self) -> std::option::Option<&str> {
        self.capacity_reservation_resource_group_arn.as_deref()
    }
}
/// See [`CapacityReservationTarget`](crate::model::CapacityReservationTarget).
pub mod capacity_reservation_target {

    /// A builder for [`CapacityReservationTarget`](crate::model::CapacityReservationTarget).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) capacity_reservation_id: std::option::Option<std::string::String>,
        pub(crate) capacity_reservation_resource_group_arn:
            std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The ID of the Capacity Reservation in which to run the instance.</p>
        pub fn capacity_reservation_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.capacity_reservation_id = Some(input.into());
            self
        }
        /// <p>The ID of the Capacity Reservation in which to run the instance.</p>
        pub fn set_capacity_reservation_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.capacity_reservation_id = input;
            self
        }
        /// <p>The ARN of the Capacity Reservation resource group in which to run the instance.</p>
        pub fn capacity_reservation_resource_group_arn(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.capacity_reservation_resource_group_arn = Some(input.into());
            self
        }
        /// <p>The ARN of the Capacity Reservation resource group in which to run the instance.</p>
        pub fn set_capacity_reservation_resource_group_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.capacity_reservation_resource_group_arn = input;
            self
        }
        /// Consumes the builder and constructs a [`CapacityReservationTarget`](crate::model::CapacityReservationTarget).
        pub fn build(self) -> crate::model::CapacityReservationTarget {
            crate::model::CapacityReservationTarget {
                capacity_reservation_id: self.capacity_reservation_id,
                capacity_reservation_resource_group_arn: self
                    .capacity_reservation_resource_group_arn,
            }
        }
    }
}
impl CapacityReservationTarget {
    /// Creates a new builder-style object to manufacture [`CapacityReservationTarget`](crate::model::CapacityReservationTarget).
    pub fn builder() -> crate::model::capacity_reservation_target::Builder {
        crate::model::capacity_reservation_target::Builder::default()
    }
}

/// <p>The CPU options for the instance. Both the core count and threads per core must be specified in the request.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CpuOptionsRequest {
    /// <p>The number of CPU cores for the instance.</p>
    #[doc(hidden)]
    pub core_count: std::option::Option<i32>,
    /// <p>The number of threads per CPU core. To disable multithreading for the instance, specify a value of <code>1</code>. Otherwise, specify the default value of <code>2</code>.</p>
    #[doc(hidden)]
    pub threads_per_core: std::option::Option<i32>,
}
impl CpuOptionsRequest {
    /// <p>The number of CPU cores for the instance.</p>
    pub fn core_count(&self) -> std::option::Option<i32> {
        self.core_count
    }
    /// <p>The number of threads per CPU core. To disable multithreading for the instance, specify a value of <code>1</code>. Otherwise, specify the default value of <code>2</code>.</p>
    pub fn threads_per_core(&self) -> std::option::Option<i32> {
        self.threads_per_core
    }
}
/// See [`CpuOptionsRequest`](crate::model::CpuOptionsRequest).
pub mod cpu_options_request {

    /// A builder for [`CpuOptionsRequest`](crate::model::CpuOptionsRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) core_count: std::option::Option<i32>,
        pub(crate) threads_per_core: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>The number of CPU cores for the instance.</p>
        pub fn core_count(mut self, input: i32) -> Self {
            self.core_count = Some(input);
            self
        }
        /// <p>The number of CPU cores for the instance.</p>
        pub fn set_core_count(mut self, input: std::option::Option<i32>) -> Self {
            self.core_count = input;
            self
        }
        /// <p>The number of threads per CPU core. To disable multithreading for the instance, specify a value of <code>1</code>. Otherwise, specify the default value of <code>2</code>.</p>
        pub fn threads_per_core(mut self, input: i32) -> Self {
            self.threads_per_core = Some(input);
            self
        }
        /// <p>The number of threads per CPU core. To disable multithreading for the instance, specify a value of <code>1</code>. Otherwise, specify the default value of <code>2</code>.</p>
        pub fn set_threads_per_core(mut self, input: std::option::Option<i32>) -> Self {
            self.threads_per_core = input;
            self
        }
        /// Consumes the builder and constructs a [`CpuOptionsRequest`](crate::model::CpuOptionsRequest).
        pub fn build(self) -> crate::model::CpuOptionsRequest {
            crate::model::CpuOptionsRequest {
                core_count: self.core_count,
                threads_per_core: self.threads_per_core,
            }
        }
    }
}
impl CpuOptionsRequest {
    /// Creates a new builder-style object to manufacture [`CpuOptionsRequest`](crate::model::CpuOptionsRequest).
    pub fn builder() -> crate::model::cpu_options_request::Builder {
        crate::model::cpu_options_request::Builder::default()
    }
}

/// <p>The credit option for CPU usage of a T instance.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CreditSpecificationRequest {
    /// <p>The credit option for CPU usage of a T instance.</p>
    /// <p>Valid values: <code>standard</code> | <code>unlimited</code> </p>
    #[doc(hidden)]
    pub cpu_credits: std::option::Option<std::string::String>,
}
impl CreditSpecificationRequest {
    /// <p>The credit option for CPU usage of a T instance.</p>
    /// <p>Valid values: <code>standard</code> | <code>unlimited</code> </p>
    pub fn cpu_credits(&self) -> std::option::Option<&str> {
        self.cpu_credits.as_deref()
    }
}
/// See [`CreditSpecificationRequest`](crate::model::CreditSpecificationRequest).
pub mod credit_specification_request {

    /// A builder for [`CreditSpecificationRequest`](crate::model::CreditSpecificationRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) cpu_credits: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The credit option for CPU usage of a T instance.</p>
        /// <p>Valid values: <code>standard</code> | <code>unlimited</code> </p>
        pub fn cpu_credits(mut self, input: impl Into<std::string::String>) -> Self {
            self.cpu_credits = Some(input.into());
            self
        }
        /// <p>The credit option for CPU usage of a T instance.</p>
        /// <p>Valid values: <code>standard</code> | <code>unlimited</code> </p>
        pub fn set_cpu_credits(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.cpu_credits = input;
            self
        }
        /// Consumes the builder and constructs a [`CreditSpecificationRequest`](crate::model::CreditSpecificationRequest).
        pub fn build(self) -> crate::model::CreditSpecificationRequest {
            crate::model::CreditSpecificationRequest {
                cpu_credits: self.cpu_credits,
            }
        }
    }
}
impl CreditSpecificationRequest {
    /// Creates a new builder-style object to manufacture [`CreditSpecificationRequest`](crate::model::CreditSpecificationRequest).
    pub fn builder() -> crate::model::credit_specification_request::Builder {
        crate::model::credit_specification_request::Builder::default()
    }
}

/// <p>Describes the market (purchasing) option for the instances.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InstanceMarketOptionsRequest {
    /// <p>The market type.</p>
    #[doc(hidden)]
    pub market_type: std::option::Option<crate::model::MarketType>,
    /// <p>The options for Spot Instances.</p>
    #[doc(hidden)]
    pub spot_options: std::option::Option<crate::model::SpotMarketOptions>,
}
impl InstanceMarketOptionsRequest {
    /// <p>The market type.</p>
    pub fn market_type(&self) -> std::option::Option<&crate::model::MarketType> {
        self.market_type.as_ref()
    }
    /// <p>The options for Spot Instances.</p>
    pub fn spot_options(&self) -> std::option::Option<&crate::model::SpotMarketOptions> {
        self.spot_options.as_ref()
    }
}
/// See [`InstanceMarketOptionsRequest`](crate::model::InstanceMarketOptionsRequest).
pub mod instance_market_options_request {

    /// A builder for [`InstanceMarketOptionsRequest`](crate::model::InstanceMarketOptionsRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) market_type: std::option::Option<crate::model::MarketType>,
        pub(crate) spot_options: std::option::Option<crate::model::SpotMarketOptions>,
    }
    impl Builder {
        /// <p>The market type.</p>
        pub fn market_type(mut self, input: crate::model::MarketType) -> Self {
            self.market_type = Some(input);
            self
        }
        /// <p>The market type.</p>
        pub fn set_market_type(
            mut self,
            input: std::option::Option<crate::model::MarketType>,
        ) -> Self {
            self.market_type = input;
            self
        }
        /// <p>The options for Spot Instances.</p>
        pub fn spot_options(mut self, input: crate::model::SpotMarketOptions) -> Self {
            self.spot_options = Some(input);
            self
        }
        /// <p>The options for Spot Instances.</p>
        pub fn set_spot_options(
            mut self,
            input: std::option::Option<crate::model::SpotMarketOptions>,
        ) -> Self {
            self.spot_options = input;
            self
        }
        /// Consumes the builder and constructs a [`InstanceMarketOptionsRequest`](crate::model::InstanceMarketOptionsRequest).
        pub fn build(self) -> crate::model::InstanceMarketOptionsRequest {
            crate::model::InstanceMarketOptionsRequest {
                market_type: self.market_type,
                spot_options: self.spot_options,
            }
        }
    }
}
impl InstanceMarketOptionsRequest {
    /// Creates a new builder-style object to manufacture [`InstanceMarketOptionsRequest`](crate::model::InstanceMarketOptionsRequest).
    pub fn builder() -> crate::model::instance_market_options_request::Builder {
        crate::model::instance_market_options_request::Builder::default()
    }
}

/// <p>The options for Spot Instances.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SpotMarketOptions {
    /// <p>The maximum hourly price that you're willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.</p> <important>
    /// <p>If you specify a maximum price, your Spot Instances will be interrupted more frequently than if you do not specify this parameter.</p>
    /// </important>
    #[doc(hidden)]
    pub max_price: std::option::Option<std::string::String>,
    /// <p>The Spot Instance request type. For <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RunInstances">RunInstances</a>, persistent Spot Instance requests are only supported when the instance interruption behavior is either <code>hibernate</code> or <code>stop</code>.</p>
    #[doc(hidden)]
    pub spot_instance_type: std::option::Option<crate::model::SpotInstanceType>,
    /// <p>Deprecated.</p>
    #[doc(hidden)]
    pub block_duration_minutes: std::option::Option<i32>,
    /// <p>The end date of the request, in UTC format (<i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z). Supported only for persistent requests.</p>
    /// <ul>
    /// <li> <p>For a persistent request, the request remains active until the <code>ValidUntil</code> date and time is reached. Otherwise, the request remains active until you cancel it.</p> </li>
    /// <li> <p>For a one-time request, <code>ValidUntil</code> is not supported. The request remains active until all instances launch or you cancel the request.</p> </li>
    /// </ul>
    #[doc(hidden)]
    pub valid_until: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The behavior when a Spot Instance is interrupted. The default is <code>terminate</code>.</p>
    #[doc(hidden)]
    pub instance_interruption_behavior:
        std::option::Option<crate::model::InstanceInterruptionBehavior>,
}
impl SpotMarketOptions {
    /// <p>The maximum hourly price that you're willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.</p> <important>
    /// <p>If you specify a maximum price, your Spot Instances will be interrupted more frequently than if you do not specify this parameter.</p>
    /// </important>
    pub fn max_price(&self) -> std::option::Option<&str> {
        self.max_price.as_deref()
    }
    /// <p>The Spot Instance request type. For <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RunInstances">RunInstances</a>, persistent Spot Instance requests are only supported when the instance interruption behavior is either <code>hibernate</code> or <code>stop</code>.</p>
    pub fn spot_instance_type(&self) -> std::option::Option<&crate::model::SpotInstanceType> {
        self.spot_instance_type.as_ref()
    }
    /// <p>Deprecated.</p>
    pub fn block_duration_minutes(&self) -> std::option::Option<i32> {
        self.block_duration_minutes
    }
    /// <p>The end date of the request, in UTC format (<i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z). Supported only for persistent requests.</p>
    /// <ul>
    /// <li> <p>For a persistent request, the request remains active until the <code>ValidUntil</code> date and time is reached. Otherwise, the request remains active until you cancel it.</p> </li>
    /// <li> <p>For a one-time request, <code>ValidUntil</code> is not supported. The request remains active until all instances launch or you cancel the request.</p> </li>
    /// </ul>
    pub fn valid_until(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.valid_until.as_ref()
    }
    /// <p>The behavior when a Spot Instance is interrupted. The default is <code>terminate</code>.</p>
    pub fn instance_interruption_behavior(
        &self,
    ) -> std::option::Option<&crate::model::InstanceInterruptionBehavior> {
        self.instance_interruption_behavior.as_ref()
    }
}
/// See [`SpotMarketOptions`](crate::model::SpotMarketOptions).
pub mod spot_market_options {

    /// A builder for [`SpotMarketOptions`](crate::model::SpotMarketOptions).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) max_price: std::option::Option<std::string::String>,
        pub(crate) spot_instance_type: std::option::Option<crate::model::SpotInstanceType>,
        pub(crate) block_duration_minutes: std::option::Option<i32>,
        pub(crate) valid_until: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) instance_interruption_behavior:
            std::option::Option<crate::model::InstanceInterruptionBehavior>,
    }
    impl Builder {
        /// <p>The maximum hourly price that you're willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.</p> <important>
        /// <p>If you specify a maximum price, your Spot Instances will be interrupted more frequently than if you do not specify this parameter.</p>
        /// </important>
        pub fn max_price(mut self, input: impl Into<std::string::String>) -> Self {
            self.max_price = Some(input.into());
            self
        }
        /// <p>The maximum hourly price that you're willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.</p> <important>
        /// <p>If you specify a maximum price, your Spot Instances will be interrupted more frequently than if you do not specify this parameter.</p>
        /// </important>
        pub fn set_max_price(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.max_price = input;
            self
        }
        /// <p>The Spot Instance request type. For <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RunInstances">RunInstances</a>, persistent Spot Instance requests are only supported when the instance interruption behavior is either <code>hibernate</code> or <code>stop</code>.</p>
        pub fn spot_instance_type(mut self, input: crate::model::SpotInstanceType) -> Self {
            self.spot_instance_type = Some(input);
            self
        }
        /// <p>The Spot Instance request type. For <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RunInstances">RunInstances</a>, persistent Spot Instance requests are only supported when the instance interruption behavior is either <code>hibernate</code> or <code>stop</code>.</p>
        pub fn set_spot_instance_type(
            mut self,
            input: std::option::Option<crate::model::SpotInstanceType>,
        ) -> Self {
            self.spot_instance_type = input;
            self
        }
        /// <p>Deprecated.</p>
        pub fn block_duration_minutes(mut self, input: i32) -> Self {
            self.block_duration_minutes = Some(input);
            self
        }
        /// <p>Deprecated.</p>
        pub fn set_block_duration_minutes(mut self, input: std::option::Option<i32>) -> Self {
            self.block_duration_minutes = input;
            self
        }
        /// <p>The end date of the request, in UTC format (<i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z). Supported only for persistent requests.</p>
        /// <ul>
        /// <li> <p>For a persistent request, the request remains active until the <code>ValidUntil</code> date and time is reached. Otherwise, the request remains active until you cancel it.</p> </li>
        /// <li> <p>For a one-time request, <code>ValidUntil</code> is not supported. The request remains active until all instances launch or you cancel the request.</p> </li>
        /// </ul>
        pub fn valid_until(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.valid_until = Some(input);
            self
        }
        /// <p>The end date of the request, in UTC format (<i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z). Supported only for persistent requests.</p>
        /// <ul>
        /// <li> <p>For a persistent request, the request remains active until the <code>ValidUntil</code> date and time is reached. Otherwise, the request remains active until you cancel it.</p> </li>
        /// <li> <p>For a one-time request, <code>ValidUntil</code> is not supported. The request remains active until all instances launch or you cancel the request.</p> </li>
        /// </ul>
        pub fn set_valid_until(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.valid_until = input;
            self
        }
        /// <p>The behavior when a Spot Instance is interrupted. The default is <code>terminate</code>.</p>
        pub fn instance_interruption_behavior(
            mut self,
            input: crate::model::InstanceInterruptionBehavior,
        ) -> Self {
            self.instance_interruption_behavior = Some(input);
            self
        }
        /// <p>The behavior when a Spot Instance is interrupted. The default is <code>terminate</code>.</p>
        pub fn set_instance_interruption_behavior(
            mut self,
            input: std::option::Option<crate::model::InstanceInterruptionBehavior>,
        ) -> Self {
            self.instance_interruption_behavior = input;
            self
        }
        /// Consumes the builder and constructs a [`SpotMarketOptions`](crate::model::SpotMarketOptions).
        pub fn build(self) -> crate::model::SpotMarketOptions {
            crate::model::SpotMarketOptions {
                max_price: self.max_price,
                spot_instance_type: self.spot_instance_type,
                block_duration_minutes: self.block_duration_minutes,
                valid_until: self.valid_until,
                instance_interruption_behavior: self.instance_interruption_behavior,
            }
        }
    }
}
impl SpotMarketOptions {
    /// Creates a new builder-style object to manufacture [`SpotMarketOptions`](crate::model::SpotMarketOptions).
    pub fn builder() -> crate::model::spot_market_options::Builder {
        crate::model::spot_market_options::Builder::default()
    }
}

/// When writing a match expression against `InstanceInterruptionBehavior`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let instanceinterruptionbehavior = unimplemented!();
/// match instanceinterruptionbehavior {
///     InstanceInterruptionBehavior::Hibernate => { /* ... */ },
///     InstanceInterruptionBehavior::Stop => { /* ... */ },
///     InstanceInterruptionBehavior::Terminate => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `instanceinterruptionbehavior` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `InstanceInterruptionBehavior::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `InstanceInterruptionBehavior::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `InstanceInterruptionBehavior::NewFeature` is defined.
/// Specifically, when `instanceinterruptionbehavior` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `InstanceInterruptionBehavior::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 InstanceInterruptionBehavior {
    #[allow(missing_docs)] // documentation missing in model
    Hibernate,
    #[allow(missing_docs)] // documentation missing in model
    Stop,
    #[allow(missing_docs)] // documentation missing in model
    Terminate,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for InstanceInterruptionBehavior {
    fn from(s: &str) -> Self {
        match s {
            "hibernate" => InstanceInterruptionBehavior::Hibernate,
            "stop" => InstanceInterruptionBehavior::Stop,
            "terminate" => InstanceInterruptionBehavior::Terminate,
            other => InstanceInterruptionBehavior::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for InstanceInterruptionBehavior {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(InstanceInterruptionBehavior::from(s))
    }
}
impl InstanceInterruptionBehavior {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            InstanceInterruptionBehavior::Hibernate => "hibernate",
            InstanceInterruptionBehavior::Stop => "stop",
            InstanceInterruptionBehavior::Terminate => "terminate",
            InstanceInterruptionBehavior::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["hibernate", "stop", "terminate"]
    }
}
impl AsRef<str> for InstanceInterruptionBehavior {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `SpotInstanceType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let spotinstancetype = unimplemented!();
/// match spotinstancetype {
///     SpotInstanceType::OneTime => { /* ... */ },
///     SpotInstanceType::Persistent => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `spotinstancetype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `SpotInstanceType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `SpotInstanceType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `SpotInstanceType::NewFeature` is defined.
/// Specifically, when `spotinstancetype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `SpotInstanceType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 SpotInstanceType {
    #[allow(missing_docs)] // documentation missing in model
    OneTime,
    #[allow(missing_docs)] // documentation missing in model
    Persistent,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for SpotInstanceType {
    fn from(s: &str) -> Self {
        match s {
            "one-time" => SpotInstanceType::OneTime,
            "persistent" => SpotInstanceType::Persistent,
            other => SpotInstanceType::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for SpotInstanceType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(SpotInstanceType::from(s))
    }
}
impl SpotInstanceType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            SpotInstanceType::OneTime => "one-time",
            SpotInstanceType::Persistent => "persistent",
            SpotInstanceType::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["one-time", "persistent"]
    }
}
impl AsRef<str> for SpotInstanceType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `MarketType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let markettype = unimplemented!();
/// match markettype {
///     MarketType::Spot => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `markettype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `MarketType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `MarketType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `MarketType::NewFeature` is defined.
/// Specifically, when `markettype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `MarketType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 MarketType {
    #[allow(missing_docs)] // documentation missing in model
    Spot,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for MarketType {
    fn from(s: &str) -> Self {
        match s {
            "spot" => MarketType::Spot,
            other => MarketType::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for MarketType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(MarketType::from(s))
    }
}
impl MarketType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            MarketType::Spot => "spot",
            MarketType::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["spot"]
    }
}
impl AsRef<str> for MarketType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>The launch template to use. You must specify either the launch template ID or launch template name in the request, but not both.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LaunchTemplateSpecification {
    /// <p>The ID of the launch template.</p>
    /// <p>You must specify the <code>LaunchTemplateId</code> or the <code>LaunchTemplateName</code>, but not both.</p>
    #[doc(hidden)]
    pub launch_template_id: std::option::Option<std::string::String>,
    /// <p>The name of the launch template.</p>
    /// <p>You must specify the <code>LaunchTemplateName</code> or the <code>LaunchTemplateId</code>, but not both.</p>
    #[doc(hidden)]
    pub launch_template_name: std::option::Option<std::string::String>,
    /// <p>The launch template version number, <code>$Latest</code>, or <code>$Default</code>.</p>
    /// <p>If the value is <code>$Latest</code>, Amazon EC2 uses the latest version of the launch template.</p>
    /// <p>If the value is <code>$Default</code>, Amazon EC2 uses the default version of the launch template.</p>
    /// <p>Default: The default version of the launch template.</p>
    #[doc(hidden)]
    pub version: std::option::Option<std::string::String>,
}
impl LaunchTemplateSpecification {
    /// <p>The ID of the launch template.</p>
    /// <p>You must specify the <code>LaunchTemplateId</code> or the <code>LaunchTemplateName</code>, but not both.</p>
    pub fn launch_template_id(&self) -> std::option::Option<&str> {
        self.launch_template_id.as_deref()
    }
    /// <p>The name of the launch template.</p>
    /// <p>You must specify the <code>LaunchTemplateName</code> or the <code>LaunchTemplateId</code>, but not both.</p>
    pub fn launch_template_name(&self) -> std::option::Option<&str> {
        self.launch_template_name.as_deref()
    }
    /// <p>The launch template version number, <code>$Latest</code>, or <code>$Default</code>.</p>
    /// <p>If the value is <code>$Latest</code>, Amazon EC2 uses the latest version of the launch template.</p>
    /// <p>If the value is <code>$Default</code>, Amazon EC2 uses the default version of the launch template.</p>
    /// <p>Default: The default version of the launch template.</p>
    pub fn version(&self) -> std::option::Option<&str> {
        self.version.as_deref()
    }
}
/// See [`LaunchTemplateSpecification`](crate::model::LaunchTemplateSpecification).
pub mod launch_template_specification {

    /// A builder for [`LaunchTemplateSpecification`](crate::model::LaunchTemplateSpecification).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) launch_template_id: std::option::Option<std::string::String>,
        pub(crate) launch_template_name: std::option::Option<std::string::String>,
        pub(crate) version: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The ID of the launch template.</p>
        /// <p>You must specify the <code>LaunchTemplateId</code> or the <code>LaunchTemplateName</code>, but not both.</p>
        pub fn launch_template_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.launch_template_id = Some(input.into());
            self
        }
        /// <p>The ID of the launch template.</p>
        /// <p>You must specify the <code>LaunchTemplateId</code> or the <code>LaunchTemplateName</code>, but not both.</p>
        pub fn set_launch_template_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.launch_template_id = input;
            self
        }
        /// <p>The name of the launch template.</p>
        /// <p>You must specify the <code>LaunchTemplateName</code> or the <code>LaunchTemplateId</code>, but not both.</p>
        pub fn launch_template_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.launch_template_name = Some(input.into());
            self
        }
        /// <p>The name of the launch template.</p>
        /// <p>You must specify the <code>LaunchTemplateName</code> or the <code>LaunchTemplateId</code>, but not both.</p>
        pub fn set_launch_template_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.launch_template_name = input;
            self
        }
        /// <p>The launch template version number, <code>$Latest</code>, or <code>$Default</code>.</p>
        /// <p>If the value is <code>$Latest</code>, Amazon EC2 uses the latest version of the launch template.</p>
        /// <p>If the value is <code>$Default</code>, Amazon EC2 uses the default version of the launch template.</p>
        /// <p>Default: The default version of the launch template.</p>
        pub fn version(mut self, input: impl Into<std::string::String>) -> Self {
            self.version = Some(input.into());
            self
        }
        /// <p>The launch template version number, <code>$Latest</code>, or <code>$Default</code>.</p>
        /// <p>If the value is <code>$Latest</code>, Amazon EC2 uses the latest version of the launch template.</p>
        /// <p>If the value is <code>$Default</code>, Amazon EC2 uses the default version of the launch template.</p>
        /// <p>Default: The default version of the launch template.</p>
        pub fn set_version(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.version = input;
            self
        }
        /// Consumes the builder and constructs a [`LaunchTemplateSpecification`](crate::model::LaunchTemplateSpecification).
        pub fn build(self) -> crate::model::LaunchTemplateSpecification {
            crate::model::LaunchTemplateSpecification {
                launch_template_id: self.launch_template_id,
                launch_template_name: self.launch_template_name,
                version: self.version,
            }
        }
    }
}
impl LaunchTemplateSpecification {
    /// Creates a new builder-style object to manufacture [`LaunchTemplateSpecification`](crate::model::LaunchTemplateSpecification).
    pub fn builder() -> crate::model::launch_template_specification::Builder {
        crate::model::launch_template_specification::Builder::default()
    }
}

/// <p> Describes an elastic inference accelerator. </p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ElasticInferenceAccelerator {
    /// <p> The type of elastic inference accelerator. The possible values are <code>eia1.medium</code>, <code>eia1.large</code>, <code>eia1.xlarge</code>, <code>eia2.medium</code>, <code>eia2.large</code>, and <code>eia2.xlarge</code>. </p>
    #[doc(hidden)]
    pub r#type: std::option::Option<std::string::String>,
    /// <p> The number of elastic inference accelerators to attach to the instance. </p>
    /// <p>Default: 1</p>
    #[doc(hidden)]
    pub count: std::option::Option<i32>,
}
impl ElasticInferenceAccelerator {
    /// <p> The type of elastic inference accelerator. The possible values are <code>eia1.medium</code>, <code>eia1.large</code>, <code>eia1.xlarge</code>, <code>eia2.medium</code>, <code>eia2.large</code>, and <code>eia2.xlarge</code>. </p>
    pub fn r#type(&self) -> std::option::Option<&str> {
        self.r#type.as_deref()
    }
    /// <p> The number of elastic inference accelerators to attach to the instance. </p>
    /// <p>Default: 1</p>
    pub fn count(&self) -> std::option::Option<i32> {
        self.count
    }
}
/// See [`ElasticInferenceAccelerator`](crate::model::ElasticInferenceAccelerator).
pub mod elastic_inference_accelerator {

    /// A builder for [`ElasticInferenceAccelerator`](crate::model::ElasticInferenceAccelerator).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) r#type: std::option::Option<std::string::String>,
        pub(crate) count: std::option::Option<i32>,
    }
    impl Builder {
        /// <p> The type of elastic inference accelerator. The possible values are <code>eia1.medium</code>, <code>eia1.large</code>, <code>eia1.xlarge</code>, <code>eia2.medium</code>, <code>eia2.large</code>, and <code>eia2.xlarge</code>. </p>
        pub fn r#type(mut self, input: impl Into<std::string::String>) -> Self {
            self.r#type = Some(input.into());
            self
        }
        /// <p> The type of elastic inference accelerator. The possible values are <code>eia1.medium</code>, <code>eia1.large</code>, <code>eia1.xlarge</code>, <code>eia2.medium</code>, <code>eia2.large</code>, and <code>eia2.xlarge</code>. </p>
        pub fn set_type(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.r#type = input;
            self
        }
        /// <p> The number of elastic inference accelerators to attach to the instance. </p>
        /// <p>Default: 1</p>
        pub fn count(mut self, input: i32) -> Self {
            self.count = Some(input);
            self
        }
        /// <p> The number of elastic inference accelerators to attach to the instance. </p>
        /// <p>Default: 1</p>
        pub fn set_count(mut self, input: std::option::Option<i32>) -> Self {
            self.count = input;
            self
        }
        /// Consumes the builder and constructs a [`ElasticInferenceAccelerator`](crate::model::ElasticInferenceAccelerator).
        pub fn build(self) -> crate::model::ElasticInferenceAccelerator {
            crate::model::ElasticInferenceAccelerator {
                r#type: self.r#type,
                count: self.count,
            }
        }
    }
}
impl ElasticInferenceAccelerator {
    /// Creates a new builder-style object to manufacture [`ElasticInferenceAccelerator`](crate::model::ElasticInferenceAccelerator).
    pub fn builder() -> crate::model::elastic_inference_accelerator::Builder {
        crate::model::elastic_inference_accelerator::Builder::default()
    }
}

/// <p>A specification for an Elastic Graphics accelerator.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ElasticGpuSpecification {
    /// <p>The type of Elastic Graphics accelerator. For more information about the values to specify for <code>Type</code>, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/elastic-graphics.html#elastic-graphics-basics">Elastic Graphics Basics</a>, specifically the Elastic Graphics accelerator column, in the <i>Amazon Elastic Compute Cloud User Guide for Windows Instances</i>.</p>
    #[doc(hidden)]
    pub r#type: std::option::Option<std::string::String>,
}
impl ElasticGpuSpecification {
    /// <p>The type of Elastic Graphics accelerator. For more information about the values to specify for <code>Type</code>, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/elastic-graphics.html#elastic-graphics-basics">Elastic Graphics Basics</a>, specifically the Elastic Graphics accelerator column, in the <i>Amazon Elastic Compute Cloud User Guide for Windows Instances</i>.</p>
    pub fn r#type(&self) -> std::option::Option<&str> {
        self.r#type.as_deref()
    }
}
/// See [`ElasticGpuSpecification`](crate::model::ElasticGpuSpecification).
pub mod elastic_gpu_specification {

    /// A builder for [`ElasticGpuSpecification`](crate::model::ElasticGpuSpecification).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) r#type: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The type of Elastic Graphics accelerator. For more information about the values to specify for <code>Type</code>, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/elastic-graphics.html#elastic-graphics-basics">Elastic Graphics Basics</a>, specifically the Elastic Graphics accelerator column, in the <i>Amazon Elastic Compute Cloud User Guide for Windows Instances</i>.</p>
        pub fn r#type(mut self, input: impl Into<std::string::String>) -> Self {
            self.r#type = Some(input.into());
            self
        }
        /// <p>The type of Elastic Graphics accelerator. For more information about the values to specify for <code>Type</code>, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/elastic-graphics.html#elastic-graphics-basics">Elastic Graphics Basics</a>, specifically the Elastic Graphics accelerator column, in the <i>Amazon Elastic Compute Cloud User Guide for Windows Instances</i>.</p>
        pub fn set_type(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.r#type = input;
            self
        }
        /// Consumes the builder and constructs a [`ElasticGpuSpecification`](crate::model::ElasticGpuSpecification).
        pub fn build(self) -> crate::model::ElasticGpuSpecification {
            crate::model::ElasticGpuSpecification {
                r#type: self.r#type,
            }
        }
    }
}
impl ElasticGpuSpecification {
    /// Creates a new builder-style object to manufacture [`ElasticGpuSpecification`](crate::model::ElasticGpuSpecification).
    pub fn builder() -> crate::model::elastic_gpu_specification::Builder {
        crate::model::elastic_gpu_specification::Builder::default()
    }
}

/// <p>Describes a network interface.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InstanceNetworkInterfaceSpecification {
    /// <p>Indicates whether to assign a public IPv4 address to an instance you launch in a VPC. The public IP address can only be assigned to a network interface for eth0, and can only be assigned to a new network interface, not an existing one. You cannot specify more than one network interface in the request. If launching into a default subnet, the default value is <code>true</code>.</p>
    #[doc(hidden)]
    pub associate_public_ip_address: std::option::Option<bool>,
    /// <p>If set to <code>true</code>, the interface is deleted when the instance is terminated. You can specify <code>true</code> only if creating a new network interface when launching an instance.</p>
    #[doc(hidden)]
    pub delete_on_termination: std::option::Option<bool>,
    /// <p>The description of the network interface. Applies only if creating a network interface when launching an instance.</p>
    #[doc(hidden)]
    pub description: std::option::Option<std::string::String>,
    /// <p>The position of the network interface in the attachment order. A primary network interface has a device index of 0.</p>
    /// <p>If you specify a network interface when launching an instance, you must specify the device index.</p>
    #[doc(hidden)]
    pub device_index: std::option::Option<i32>,
    /// <p>The IDs of the security groups for the network interface. Applies only if creating a network interface when launching an instance.</p>
    #[doc(hidden)]
    pub groups: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>A number of IPv6 addresses to assign to the network interface. Amazon EC2 chooses the IPv6 addresses from the range of the subnet. You cannot specify this option and the option to assign specific IPv6 addresses in the same request. You can specify this option if you've specified a minimum number of instances to launch.</p>
    #[doc(hidden)]
    pub ipv6_address_count: std::option::Option<i32>,
    /// <p>The IPv6 addresses to assign to the network interface. You cannot specify this option and the option to assign a number of IPv6 addresses in the same request. You cannot specify this option if you've specified a minimum number of instances to launch.</p>
    #[doc(hidden)]
    pub ipv6_addresses: std::option::Option<std::vec::Vec<crate::model::InstanceIpv6Address>>,
    /// <p>The ID of the network interface.</p>
    /// <p>If you are creating a Spot Fleet, omit this parameter because you can’t specify a network interface ID in a launch specification.</p>
    #[doc(hidden)]
    pub network_interface_id: std::option::Option<std::string::String>,
    /// <p>The private IPv4 address of the network interface. Applies only if creating a network interface when launching an instance. You cannot specify this option if you're launching more than one instance in a <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RunInstances.html">RunInstances</a> request.</p>
    #[doc(hidden)]
    pub private_ip_address: std::option::Option<std::string::String>,
    /// <p>The private IPv4 addresses to assign to the network interface. Only one private IPv4 address can be designated as primary. You cannot specify this option if you're launching more than one instance in a <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RunInstances.html">RunInstances</a> request.</p>
    #[doc(hidden)]
    pub private_ip_addresses:
        std::option::Option<std::vec::Vec<crate::model::PrivateIpAddressSpecification>>,
    /// <p>The number of secondary private IPv4 addresses. You can't specify this option and specify more than one private IP address using the private IP addresses option. You cannot specify this option if you're launching more than one instance in a <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RunInstances.html">RunInstances</a> request.</p>
    #[doc(hidden)]
    pub secondary_private_ip_address_count: std::option::Option<i32>,
    /// <p>The ID of the subnet associated with the network interface. Applies only if creating a network interface when launching an instance.</p>
    #[doc(hidden)]
    pub subnet_id: std::option::Option<std::string::String>,
    /// <p>Indicates whether to assign a carrier IP address to the network interface.</p>
    /// <p>You can only assign a carrier IP address to a network interface that is in a subnet in a Wavelength Zone. For more information about carrier IP addresses, see <a href="https://docs.aws.amazon.com/wavelength/latest/developerguide/how-wavelengths-work.html#provider-owned-ip">Carrier IP address</a> in the <i>Amazon Web Services Wavelength Developer Guide</i>.</p>
    #[doc(hidden)]
    pub associate_carrier_ip_address: std::option::Option<bool>,
    /// <p>The type of network interface.</p>
    /// <p>Valid values: <code>interface</code> | <code>efa</code> </p>
    #[doc(hidden)]
    pub interface_type: std::option::Option<std::string::String>,
    /// <p>The index of the network card. Some instance types support multiple network cards. The primary network interface must be assigned to network card index 0. The default is network card index 0.</p>
    /// <p>If you are using <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RequestSpotInstances.html">RequestSpotInstances</a> to create Spot Instances, omit this parameter because you can’t specify the network card index when using this API. To specify the network card index, use <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RunInstances.html">RunInstances</a>.</p>
    #[doc(hidden)]
    pub network_card_index: std::option::Option<i32>,
    /// <p>The IPv4 delegated prefixes to be assigned to the network interface. You cannot use this option if you use the <code>Ipv4PrefixCount</code> option.</p>
    #[doc(hidden)]
    pub ipv4_prefixes:
        std::option::Option<std::vec::Vec<crate::model::Ipv4PrefixSpecificationRequest>>,
    /// <p>The number of IPv4 delegated prefixes to be automatically assigned to the network interface. You cannot use this option if you use the <code>Ipv4Prefix</code> option.</p>
    #[doc(hidden)]
    pub ipv4_prefix_count: std::option::Option<i32>,
    /// <p>The IPv6 delegated prefixes to be assigned to the network interface. You cannot use this option if you use the <code>Ipv6PrefixCount</code> option.</p>
    #[doc(hidden)]
    pub ipv6_prefixes:
        std::option::Option<std::vec::Vec<crate::model::Ipv6PrefixSpecificationRequest>>,
    /// <p>The number of IPv6 delegated prefixes to be automatically assigned to the network interface. You cannot use this option if you use the <code>Ipv6Prefix</code> option.</p>
    #[doc(hidden)]
    pub ipv6_prefix_count: std::option::Option<i32>,
}
impl InstanceNetworkInterfaceSpecification {
    /// <p>Indicates whether to assign a public IPv4 address to an instance you launch in a VPC. The public IP address can only be assigned to a network interface for eth0, and can only be assigned to a new network interface, not an existing one. You cannot specify more than one network interface in the request. If launching into a default subnet, the default value is <code>true</code>.</p>
    pub fn associate_public_ip_address(&self) -> std::option::Option<bool> {
        self.associate_public_ip_address
    }
    /// <p>If set to <code>true</code>, the interface is deleted when the instance is terminated. You can specify <code>true</code> only if creating a new network interface when launching an instance.</p>
    pub fn delete_on_termination(&self) -> std::option::Option<bool> {
        self.delete_on_termination
    }
    /// <p>The description of the network interface. Applies only if creating a network interface when launching an instance.</p>
    pub fn description(&self) -> std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The position of the network interface in the attachment order. A primary network interface has a device index of 0.</p>
    /// <p>If you specify a network interface when launching an instance, you must specify the device index.</p>
    pub fn device_index(&self) -> std::option::Option<i32> {
        self.device_index
    }
    /// <p>The IDs of the security groups for the network interface. Applies only if creating a network interface when launching an instance.</p>
    pub fn groups(&self) -> std::option::Option<&[std::string::String]> {
        self.groups.as_deref()
    }
    /// <p>A number of IPv6 addresses to assign to the network interface. Amazon EC2 chooses the IPv6 addresses from the range of the subnet. You cannot specify this option and the option to assign specific IPv6 addresses in the same request. You can specify this option if you've specified a minimum number of instances to launch.</p>
    pub fn ipv6_address_count(&self) -> std::option::Option<i32> {
        self.ipv6_address_count
    }
    /// <p>The IPv6 addresses to assign to the network interface. You cannot specify this option and the option to assign a number of IPv6 addresses in the same request. You cannot specify this option if you've specified a minimum number of instances to launch.</p>
    pub fn ipv6_addresses(&self) -> std::option::Option<&[crate::model::InstanceIpv6Address]> {
        self.ipv6_addresses.as_deref()
    }
    /// <p>The ID of the network interface.</p>
    /// <p>If you are creating a Spot Fleet, omit this parameter because you can’t specify a network interface ID in a launch specification.</p>
    pub fn network_interface_id(&self) -> std::option::Option<&str> {
        self.network_interface_id.as_deref()
    }
    /// <p>The private IPv4 address of the network interface. Applies only if creating a network interface when launching an instance. You cannot specify this option if you're launching more than one instance in a <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RunInstances.html">RunInstances</a> request.</p>
    pub fn private_ip_address(&self) -> std::option::Option<&str> {
        self.private_ip_address.as_deref()
    }
    /// <p>The private IPv4 addresses to assign to the network interface. Only one private IPv4 address can be designated as primary. You cannot specify this option if you're launching more than one instance in a <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RunInstances.html">RunInstances</a> request.</p>
    pub fn private_ip_addresses(
        &self,
    ) -> std::option::Option<&[crate::model::PrivateIpAddressSpecification]> {
        self.private_ip_addresses.as_deref()
    }
    /// <p>The number of secondary private IPv4 addresses. You can't specify this option and specify more than one private IP address using the private IP addresses option. You cannot specify this option if you're launching more than one instance in a <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RunInstances.html">RunInstances</a> request.</p>
    pub fn secondary_private_ip_address_count(&self) -> std::option::Option<i32> {
        self.secondary_private_ip_address_count
    }
    /// <p>The ID of the subnet associated with the network interface. Applies only if creating a network interface when launching an instance.</p>
    pub fn subnet_id(&self) -> std::option::Option<&str> {
        self.subnet_id.as_deref()
    }
    /// <p>Indicates whether to assign a carrier IP address to the network interface.</p>
    /// <p>You can only assign a carrier IP address to a network interface that is in a subnet in a Wavelength Zone. For more information about carrier IP addresses, see <a href="https://docs.aws.amazon.com/wavelength/latest/developerguide/how-wavelengths-work.html#provider-owned-ip">Carrier IP address</a> in the <i>Amazon Web Services Wavelength Developer Guide</i>.</p>
    pub fn associate_carrier_ip_address(&self) -> std::option::Option<bool> {
        self.associate_carrier_ip_address
    }
    /// <p>The type of network interface.</p>
    /// <p>Valid values: <code>interface</code> | <code>efa</code> </p>
    pub fn interface_type(&self) -> std::option::Option<&str> {
        self.interface_type.as_deref()
    }
    /// <p>The index of the network card. Some instance types support multiple network cards. The primary network interface must be assigned to network card index 0. The default is network card index 0.</p>
    /// <p>If you are using <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RequestSpotInstances.html">RequestSpotInstances</a> to create Spot Instances, omit this parameter because you can’t specify the network card index when using this API. To specify the network card index, use <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RunInstances.html">RunInstances</a>.</p>
    pub fn network_card_index(&self) -> std::option::Option<i32> {
        self.network_card_index
    }
    /// <p>The IPv4 delegated prefixes to be assigned to the network interface. You cannot use this option if you use the <code>Ipv4PrefixCount</code> option.</p>
    pub fn ipv4_prefixes(
        &self,
    ) -> std::option::Option<&[crate::model::Ipv4PrefixSpecificationRequest]> {
        self.ipv4_prefixes.as_deref()
    }
    /// <p>The number of IPv4 delegated prefixes to be automatically assigned to the network interface. You cannot use this option if you use the <code>Ipv4Prefix</code> option.</p>
    pub fn ipv4_prefix_count(&self) -> std::option::Option<i32> {
        self.ipv4_prefix_count
    }
    /// <p>The IPv6 delegated prefixes to be assigned to the network interface. You cannot use this option if you use the <code>Ipv6PrefixCount</code> option.</p>
    pub fn ipv6_prefixes(
        &self,
    ) -> std::option::Option<&[crate::model::Ipv6PrefixSpecificationRequest]> {
        self.ipv6_prefixes.as_deref()
    }
    /// <p>The number of IPv6 delegated prefixes to be automatically assigned to the network interface. You cannot use this option if you use the <code>Ipv6Prefix</code> option.</p>
    pub fn ipv6_prefix_count(&self) -> std::option::Option<i32> {
        self.ipv6_prefix_count
    }
}
/// See [`InstanceNetworkInterfaceSpecification`](crate::model::InstanceNetworkInterfaceSpecification).
pub mod instance_network_interface_specification {

    /// A builder for [`InstanceNetworkInterfaceSpecification`](crate::model::InstanceNetworkInterfaceSpecification).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) associate_public_ip_address: std::option::Option<bool>,
        pub(crate) delete_on_termination: std::option::Option<bool>,
        pub(crate) description: std::option::Option<std::string::String>,
        pub(crate) device_index: std::option::Option<i32>,
        pub(crate) groups: std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) ipv6_address_count: std::option::Option<i32>,
        pub(crate) ipv6_addresses:
            std::option::Option<std::vec::Vec<crate::model::InstanceIpv6Address>>,
        pub(crate) network_interface_id: std::option::Option<std::string::String>,
        pub(crate) private_ip_address: std::option::Option<std::string::String>,
        pub(crate) private_ip_addresses:
            std::option::Option<std::vec::Vec<crate::model::PrivateIpAddressSpecification>>,
        pub(crate) secondary_private_ip_address_count: std::option::Option<i32>,
        pub(crate) subnet_id: std::option::Option<std::string::String>,
        pub(crate) associate_carrier_ip_address: std::option::Option<bool>,
        pub(crate) interface_type: std::option::Option<std::string::String>,
        pub(crate) network_card_index: std::option::Option<i32>,
        pub(crate) ipv4_prefixes:
            std::option::Option<std::vec::Vec<crate::model::Ipv4PrefixSpecificationRequest>>,
        pub(crate) ipv4_prefix_count: std::option::Option<i32>,
        pub(crate) ipv6_prefixes:
            std::option::Option<std::vec::Vec<crate::model::Ipv6PrefixSpecificationRequest>>,
        pub(crate) ipv6_prefix_count: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>Indicates whether to assign a public IPv4 address to an instance you launch in a VPC. The public IP address can only be assigned to a network interface for eth0, and can only be assigned to a new network interface, not an existing one. You cannot specify more than one network interface in the request. If launching into a default subnet, the default value is <code>true</code>.</p>
        pub fn associate_public_ip_address(mut self, input: bool) -> Self {
            self.associate_public_ip_address = Some(input);
            self
        }
        /// <p>Indicates whether to assign a public IPv4 address to an instance you launch in a VPC. The public IP address can only be assigned to a network interface for eth0, and can only be assigned to a new network interface, not an existing one. You cannot specify more than one network interface in the request. If launching into a default subnet, the default value is <code>true</code>.</p>
        pub fn set_associate_public_ip_address(mut self, input: std::option::Option<bool>) -> Self {
            self.associate_public_ip_address = input;
            self
        }
        /// <p>If set to <code>true</code>, the interface is deleted when the instance is terminated. You can specify <code>true</code> only if creating a new network interface when launching an instance.</p>
        pub fn delete_on_termination(mut self, input: bool) -> Self {
            self.delete_on_termination = Some(input);
            self
        }
        /// <p>If set to <code>true</code>, the interface is deleted when the instance is terminated. You can specify <code>true</code> only if creating a new network interface when launching an instance.</p>
        pub fn set_delete_on_termination(mut self, input: std::option::Option<bool>) -> Self {
            self.delete_on_termination = input;
            self
        }
        /// <p>The description of the network interface. Applies only if creating a network interface when launching an instance.</p>
        pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
            self.description = Some(input.into());
            self
        }
        /// <p>The description of the network interface. Applies only if creating a network interface when launching an instance.</p>
        pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.description = input;
            self
        }
        /// <p>The position of the network interface in the attachment order. A primary network interface has a device index of 0.</p>
        /// <p>If you specify a network interface when launching an instance, you must specify the device index.</p>
        pub fn device_index(mut self, input: i32) -> Self {
            self.device_index = Some(input);
            self
        }
        /// <p>The position of the network interface in the attachment order. A primary network interface has a device index of 0.</p>
        /// <p>If you specify a network interface when launching an instance, you must specify the device index.</p>
        pub fn set_device_index(mut self, input: std::option::Option<i32>) -> Self {
            self.device_index = input;
            self
        }
        /// Appends an item to `groups`.
        ///
        /// To override the contents of this collection use [`set_groups`](Self::set_groups).
        ///
        /// <p>The IDs of the security groups for the network interface. Applies only if creating a network interface when launching an instance.</p>
        pub fn groups(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.groups.unwrap_or_default();
            v.push(input.into());
            self.groups = Some(v);
            self
        }
        /// <p>The IDs of the security groups for the network interface. Applies only if creating a network interface when launching an instance.</p>
        pub fn set_groups(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.groups = input;
            self
        }
        /// <p>A number of IPv6 addresses to assign to the network interface. Amazon EC2 chooses the IPv6 addresses from the range of the subnet. You cannot specify this option and the option to assign specific IPv6 addresses in the same request. You can specify this option if you've specified a minimum number of instances to launch.</p>
        pub fn ipv6_address_count(mut self, input: i32) -> Self {
            self.ipv6_address_count = Some(input);
            self
        }
        /// <p>A number of IPv6 addresses to assign to the network interface. Amazon EC2 chooses the IPv6 addresses from the range of the subnet. You cannot specify this option and the option to assign specific IPv6 addresses in the same request. You can specify this option if you've specified a minimum number of instances to launch.</p>
        pub fn set_ipv6_address_count(mut self, input: std::option::Option<i32>) -> Self {
            self.ipv6_address_count = input;
            self
        }
        /// Appends an item to `ipv6_addresses`.
        ///
        /// To override the contents of this collection use [`set_ipv6_addresses`](Self::set_ipv6_addresses).
        ///
        /// <p>The IPv6 addresses to assign to the network interface. You cannot specify this option and the option to assign a number of IPv6 addresses in the same request. You cannot specify this option if you've specified a minimum number of instances to launch.</p>
        pub fn ipv6_addresses(mut self, input: crate::model::InstanceIpv6Address) -> Self {
            let mut v = self.ipv6_addresses.unwrap_or_default();
            v.push(input);
            self.ipv6_addresses = Some(v);
            self
        }
        /// <p>The IPv6 addresses to assign to the network interface. You cannot specify this option and the option to assign a number of IPv6 addresses in the same request. You cannot specify this option if you've specified a minimum number of instances to launch.</p>
        pub fn set_ipv6_addresses(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::InstanceIpv6Address>>,
        ) -> Self {
            self.ipv6_addresses = input;
            self
        }
        /// <p>The ID of the network interface.</p>
        /// <p>If you are creating a Spot Fleet, omit this parameter because you can’t specify a network interface ID in a launch specification.</p>
        pub fn network_interface_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.network_interface_id = Some(input.into());
            self
        }
        /// <p>The ID of the network interface.</p>
        /// <p>If you are creating a Spot Fleet, omit this parameter because you can’t specify a network interface ID in a launch specification.</p>
        pub fn set_network_interface_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.network_interface_id = input;
            self
        }
        /// <p>The private IPv4 address of the network interface. Applies only if creating a network interface when launching an instance. You cannot specify this option if you're launching more than one instance in a <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RunInstances.html">RunInstances</a> request.</p>
        pub fn private_ip_address(mut self, input: impl Into<std::string::String>) -> Self {
            self.private_ip_address = Some(input.into());
            self
        }
        /// <p>The private IPv4 address of the network interface. Applies only if creating a network interface when launching an instance. You cannot specify this option if you're launching more than one instance in a <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RunInstances.html">RunInstances</a> request.</p>
        pub fn set_private_ip_address(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.private_ip_address = input;
            self
        }
        /// Appends an item to `private_ip_addresses`.
        ///
        /// To override the contents of this collection use [`set_private_ip_addresses`](Self::set_private_ip_addresses).
        ///
        /// <p>The private IPv4 addresses to assign to the network interface. Only one private IPv4 address can be designated as primary. You cannot specify this option if you're launching more than one instance in a <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RunInstances.html">RunInstances</a> request.</p>
        pub fn private_ip_addresses(
            mut self,
            input: crate::model::PrivateIpAddressSpecification,
        ) -> Self {
            let mut v = self.private_ip_addresses.unwrap_or_default();
            v.push(input);
            self.private_ip_addresses = Some(v);
            self
        }
        /// <p>The private IPv4 addresses to assign to the network interface. Only one private IPv4 address can be designated as primary. You cannot specify this option if you're launching more than one instance in a <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RunInstances.html">RunInstances</a> request.</p>
        pub fn set_private_ip_addresses(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::PrivateIpAddressSpecification>>,
        ) -> Self {
            self.private_ip_addresses = input;
            self
        }
        /// <p>The number of secondary private IPv4 addresses. You can't specify this option and specify more than one private IP address using the private IP addresses option. You cannot specify this option if you're launching more than one instance in a <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RunInstances.html">RunInstances</a> request.</p>
        pub fn secondary_private_ip_address_count(mut self, input: i32) -> Self {
            self.secondary_private_ip_address_count = Some(input);
            self
        }
        /// <p>The number of secondary private IPv4 addresses. You can't specify this option and specify more than one private IP address using the private IP addresses option. You cannot specify this option if you're launching more than one instance in a <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RunInstances.html">RunInstances</a> request.</p>
        pub fn set_secondary_private_ip_address_count(
            mut self,
            input: std::option::Option<i32>,
        ) -> Self {
            self.secondary_private_ip_address_count = input;
            self
        }
        /// <p>The ID of the subnet associated with the network interface. Applies only if creating a network interface when launching an instance.</p>
        pub fn subnet_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.subnet_id = Some(input.into());
            self
        }
        /// <p>The ID of the subnet associated with the network interface. Applies only if creating a network interface when launching an instance.</p>
        pub fn set_subnet_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.subnet_id = input;
            self
        }
        /// <p>Indicates whether to assign a carrier IP address to the network interface.</p>
        /// <p>You can only assign a carrier IP address to a network interface that is in a subnet in a Wavelength Zone. For more information about carrier IP addresses, see <a href="https://docs.aws.amazon.com/wavelength/latest/developerguide/how-wavelengths-work.html#provider-owned-ip">Carrier IP address</a> in the <i>Amazon Web Services Wavelength Developer Guide</i>.</p>
        pub fn associate_carrier_ip_address(mut self, input: bool) -> Self {
            self.associate_carrier_ip_address = Some(input);
            self
        }
        /// <p>Indicates whether to assign a carrier IP address to the network interface.</p>
        /// <p>You can only assign a carrier IP address to a network interface that is in a subnet in a Wavelength Zone. For more information about carrier IP addresses, see <a href="https://docs.aws.amazon.com/wavelength/latest/developerguide/how-wavelengths-work.html#provider-owned-ip">Carrier IP address</a> in the <i>Amazon Web Services Wavelength Developer Guide</i>.</p>
        pub fn set_associate_carrier_ip_address(
            mut self,
            input: std::option::Option<bool>,
        ) -> Self {
            self.associate_carrier_ip_address = input;
            self
        }
        /// <p>The type of network interface.</p>
        /// <p>Valid values: <code>interface</code> | <code>efa</code> </p>
        pub fn interface_type(mut self, input: impl Into<std::string::String>) -> Self {
            self.interface_type = Some(input.into());
            self
        }
        /// <p>The type of network interface.</p>
        /// <p>Valid values: <code>interface</code> | <code>efa</code> </p>
        pub fn set_interface_type(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.interface_type = input;
            self
        }
        /// <p>The index of the network card. Some instance types support multiple network cards. The primary network interface must be assigned to network card index 0. The default is network card index 0.</p>
        /// <p>If you are using <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RequestSpotInstances.html">RequestSpotInstances</a> to create Spot Instances, omit this parameter because you can’t specify the network card index when using this API. To specify the network card index, use <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RunInstances.html">RunInstances</a>.</p>
        pub fn network_card_index(mut self, input: i32) -> Self {
            self.network_card_index = Some(input);
            self
        }
        /// <p>The index of the network card. Some instance types support multiple network cards. The primary network interface must be assigned to network card index 0. The default is network card index 0.</p>
        /// <p>If you are using <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RequestSpotInstances.html">RequestSpotInstances</a> to create Spot Instances, omit this parameter because you can’t specify the network card index when using this API. To specify the network card index, use <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RunInstances.html">RunInstances</a>.</p>
        pub fn set_network_card_index(mut self, input: std::option::Option<i32>) -> Self {
            self.network_card_index = input;
            self
        }
        /// Appends an item to `ipv4_prefixes`.
        ///
        /// To override the contents of this collection use [`set_ipv4_prefixes`](Self::set_ipv4_prefixes).
        ///
        /// <p>The IPv4 delegated prefixes to be assigned to the network interface. You cannot use this option if you use the <code>Ipv4PrefixCount</code> option.</p>
        pub fn ipv4_prefixes(
            mut self,
            input: crate::model::Ipv4PrefixSpecificationRequest,
        ) -> Self {
            let mut v = self.ipv4_prefixes.unwrap_or_default();
            v.push(input);
            self.ipv4_prefixes = Some(v);
            self
        }
        /// <p>The IPv4 delegated prefixes to be assigned to the network interface. You cannot use this option if you use the <code>Ipv4PrefixCount</code> option.</p>
        pub fn set_ipv4_prefixes(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Ipv4PrefixSpecificationRequest>>,
        ) -> Self {
            self.ipv4_prefixes = input;
            self
        }
        /// <p>The number of IPv4 delegated prefixes to be automatically assigned to the network interface. You cannot use this option if you use the <code>Ipv4Prefix</code> option.</p>
        pub fn ipv4_prefix_count(mut self, input: i32) -> Self {
            self.ipv4_prefix_count = Some(input);
            self
        }
        /// <p>The number of IPv4 delegated prefixes to be automatically assigned to the network interface. You cannot use this option if you use the <code>Ipv4Prefix</code> option.</p>
        pub fn set_ipv4_prefix_count(mut self, input: std::option::Option<i32>) -> Self {
            self.ipv4_prefix_count = input;
            self
        }
        /// Appends an item to `ipv6_prefixes`.
        ///
        /// To override the contents of this collection use [`set_ipv6_prefixes`](Self::set_ipv6_prefixes).
        ///
        /// <p>The IPv6 delegated prefixes to be assigned to the network interface. You cannot use this option if you use the <code>Ipv6PrefixCount</code> option.</p>
        pub fn ipv6_prefixes(
            mut self,
            input: crate::model::Ipv6PrefixSpecificationRequest,
        ) -> Self {
            let mut v = self.ipv6_prefixes.unwrap_or_default();
            v.push(input);
            self.ipv6_prefixes = Some(v);
            self
        }
        /// <p>The IPv6 delegated prefixes to be assigned to the network interface. You cannot use this option if you use the <code>Ipv6PrefixCount</code> option.</p>
        pub fn set_ipv6_prefixes(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Ipv6PrefixSpecificationRequest>>,
        ) -> Self {
            self.ipv6_prefixes = input;
            self
        }
        /// <p>The number of IPv6 delegated prefixes to be automatically assigned to the network interface. You cannot use this option if you use the <code>Ipv6Prefix</code> option.</p>
        pub fn ipv6_prefix_count(mut self, input: i32) -> Self {
            self.ipv6_prefix_count = Some(input);
            self
        }
        /// <p>The number of IPv6 delegated prefixes to be automatically assigned to the network interface. You cannot use this option if you use the <code>Ipv6Prefix</code> option.</p>
        pub fn set_ipv6_prefix_count(mut self, input: std::option::Option<i32>) -> Self {
            self.ipv6_prefix_count = input;
            self
        }
        /// Consumes the builder and constructs a [`InstanceNetworkInterfaceSpecification`](crate::model::InstanceNetworkInterfaceSpecification).
        pub fn build(self) -> crate::model::InstanceNetworkInterfaceSpecification {
            crate::model::InstanceNetworkInterfaceSpecification {
                associate_public_ip_address: self.associate_public_ip_address,
                delete_on_termination: self.delete_on_termination,
                description: self.description,
                device_index: self.device_index,
                groups: self.groups,
                ipv6_address_count: self.ipv6_address_count,
                ipv6_addresses: self.ipv6_addresses,
                network_interface_id: self.network_interface_id,
                private_ip_address: self.private_ip_address,
                private_ip_addresses: self.private_ip_addresses,
                secondary_private_ip_address_count: self.secondary_private_ip_address_count,
                subnet_id: self.subnet_id,
                associate_carrier_ip_address: self.associate_carrier_ip_address,
                interface_type: self.interface_type,
                network_card_index: self.network_card_index,
                ipv4_prefixes: self.ipv4_prefixes,
                ipv4_prefix_count: self.ipv4_prefix_count,
                ipv6_prefixes: self.ipv6_prefixes,
                ipv6_prefix_count: self.ipv6_prefix_count,
            }
        }
    }
}
impl InstanceNetworkInterfaceSpecification {
    /// Creates a new builder-style object to manufacture [`InstanceNetworkInterfaceSpecification`](crate::model::InstanceNetworkInterfaceSpecification).
    pub fn builder() -> crate::model::instance_network_interface_specification::Builder {
        crate::model::instance_network_interface_specification::Builder::default()
    }
}

/// <p>Describes the IPv4 prefix option for a network interface.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Ipv6PrefixSpecificationRequest {
    /// <p>The IPv6 prefix.</p>
    #[doc(hidden)]
    pub ipv6_prefix: std::option::Option<std::string::String>,
}
impl Ipv6PrefixSpecificationRequest {
    /// <p>The IPv6 prefix.</p>
    pub fn ipv6_prefix(&self) -> std::option::Option<&str> {
        self.ipv6_prefix.as_deref()
    }
}
/// See [`Ipv6PrefixSpecificationRequest`](crate::model::Ipv6PrefixSpecificationRequest).
pub mod ipv6_prefix_specification_request {

    /// A builder for [`Ipv6PrefixSpecificationRequest`](crate::model::Ipv6PrefixSpecificationRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) ipv6_prefix: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The IPv6 prefix.</p>
        pub fn ipv6_prefix(mut self, input: impl Into<std::string::String>) -> Self {
            self.ipv6_prefix = Some(input.into());
            self
        }
        /// <p>The IPv6 prefix.</p>
        pub fn set_ipv6_prefix(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.ipv6_prefix = input;
            self
        }
        /// Consumes the builder and constructs a [`Ipv6PrefixSpecificationRequest`](crate::model::Ipv6PrefixSpecificationRequest).
        pub fn build(self) -> crate::model::Ipv6PrefixSpecificationRequest {
            crate::model::Ipv6PrefixSpecificationRequest {
                ipv6_prefix: self.ipv6_prefix,
            }
        }
    }
}
impl Ipv6PrefixSpecificationRequest {
    /// Creates a new builder-style object to manufacture [`Ipv6PrefixSpecificationRequest`](crate::model::Ipv6PrefixSpecificationRequest).
    pub fn builder() -> crate::model::ipv6_prefix_specification_request::Builder {
        crate::model::ipv6_prefix_specification_request::Builder::default()
    }
}

/// <p>Describes the IPv4 prefix option for a network interface.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Ipv4PrefixSpecificationRequest {
    /// <p>The IPv4 prefix. For information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-prefix-eni.html"> Assigning prefixes to Amazon EC2 network interfaces</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
    #[doc(hidden)]
    pub ipv4_prefix: std::option::Option<std::string::String>,
}
impl Ipv4PrefixSpecificationRequest {
    /// <p>The IPv4 prefix. For information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-prefix-eni.html"> Assigning prefixes to Amazon EC2 network interfaces</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
    pub fn ipv4_prefix(&self) -> std::option::Option<&str> {
        self.ipv4_prefix.as_deref()
    }
}
/// See [`Ipv4PrefixSpecificationRequest`](crate::model::Ipv4PrefixSpecificationRequest).
pub mod ipv4_prefix_specification_request {

    /// A builder for [`Ipv4PrefixSpecificationRequest`](crate::model::Ipv4PrefixSpecificationRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) ipv4_prefix: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The IPv4 prefix. For information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-prefix-eni.html"> Assigning prefixes to Amazon EC2 network interfaces</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
        pub fn ipv4_prefix(mut self, input: impl Into<std::string::String>) -> Self {
            self.ipv4_prefix = Some(input.into());
            self
        }
        /// <p>The IPv4 prefix. For information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-prefix-eni.html"> Assigning prefixes to Amazon EC2 network interfaces</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
        pub fn set_ipv4_prefix(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.ipv4_prefix = input;
            self
        }
        /// Consumes the builder and constructs a [`Ipv4PrefixSpecificationRequest`](crate::model::Ipv4PrefixSpecificationRequest).
        pub fn build(self) -> crate::model::Ipv4PrefixSpecificationRequest {
            crate::model::Ipv4PrefixSpecificationRequest {
                ipv4_prefix: self.ipv4_prefix,
            }
        }
    }
}
impl Ipv4PrefixSpecificationRequest {
    /// Creates a new builder-style object to manufacture [`Ipv4PrefixSpecificationRequest`](crate::model::Ipv4PrefixSpecificationRequest).
    pub fn builder() -> crate::model::ipv4_prefix_specification_request::Builder {
        crate::model::ipv4_prefix_specification_request::Builder::default()
    }
}

/// <p>Describes a secondary private IPv4 address for a network interface.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct PrivateIpAddressSpecification {
    /// <p>Indicates whether the private IPv4 address is the primary private IPv4 address. Only one IPv4 address can be designated as primary.</p>
    #[doc(hidden)]
    pub primary: std::option::Option<bool>,
    /// <p>The private IPv4 address.</p>
    #[doc(hidden)]
    pub private_ip_address: std::option::Option<std::string::String>,
}
impl PrivateIpAddressSpecification {
    /// <p>Indicates whether the private IPv4 address is the primary private IPv4 address. Only one IPv4 address can be designated as primary.</p>
    pub fn primary(&self) -> std::option::Option<bool> {
        self.primary
    }
    /// <p>The private IPv4 address.</p>
    pub fn private_ip_address(&self) -> std::option::Option<&str> {
        self.private_ip_address.as_deref()
    }
}
/// See [`PrivateIpAddressSpecification`](crate::model::PrivateIpAddressSpecification).
pub mod private_ip_address_specification {

    /// A builder for [`PrivateIpAddressSpecification`](crate::model::PrivateIpAddressSpecification).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) primary: std::option::Option<bool>,
        pub(crate) private_ip_address: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>Indicates whether the private IPv4 address is the primary private IPv4 address. Only one IPv4 address can be designated as primary.</p>
        pub fn primary(mut self, input: bool) -> Self {
            self.primary = Some(input);
            self
        }
        /// <p>Indicates whether the private IPv4 address is the primary private IPv4 address. Only one IPv4 address can be designated as primary.</p>
        pub fn set_primary(mut self, input: std::option::Option<bool>) -> Self {
            self.primary = input;
            self
        }
        /// <p>The private IPv4 address.</p>
        pub fn private_ip_address(mut self, input: impl Into<std::string::String>) -> Self {
            self.private_ip_address = Some(input.into());
            self
        }
        /// <p>The private IPv4 address.</p>
        pub fn set_private_ip_address(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.private_ip_address = input;
            self
        }
        /// Consumes the builder and constructs a [`PrivateIpAddressSpecification`](crate::model::PrivateIpAddressSpecification).
        pub fn build(self) -> crate::model::PrivateIpAddressSpecification {
            crate::model::PrivateIpAddressSpecification {
                primary: self.primary,
                private_ip_address: self.private_ip_address,
            }
        }
    }
}
impl PrivateIpAddressSpecification {
    /// Creates a new builder-style object to manufacture [`PrivateIpAddressSpecification`](crate::model::PrivateIpAddressSpecification).
    pub fn builder() -> crate::model::private_ip_address_specification::Builder {
        crate::model::private_ip_address_specification::Builder::default()
    }
}

/// When writing a match expression against `ShutdownBehavior`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let shutdownbehavior = unimplemented!();
/// match shutdownbehavior {
///     ShutdownBehavior::Stop => { /* ... */ },
///     ShutdownBehavior::Terminate => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `shutdownbehavior` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `ShutdownBehavior::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `ShutdownBehavior::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `ShutdownBehavior::NewFeature` is defined.
/// Specifically, when `shutdownbehavior` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `ShutdownBehavior::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 ShutdownBehavior {
    #[allow(missing_docs)] // documentation missing in model
    Stop,
    #[allow(missing_docs)] // documentation missing in model
    Terminate,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for ShutdownBehavior {
    fn from(s: &str) -> Self {
        match s {
            "stop" => ShutdownBehavior::Stop,
            "terminate" => ShutdownBehavior::Terminate,
            other => ShutdownBehavior::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for ShutdownBehavior {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(ShutdownBehavior::from(s))
    }
}
impl ShutdownBehavior {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            ShutdownBehavior::Stop => "stop",
            ShutdownBehavior::Terminate => "terminate",
            ShutdownBehavior::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["stop", "terminate"]
    }
}
impl AsRef<str> for ShutdownBehavior {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes an IAM instance profile.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct IamInstanceProfileSpecification {
    /// <p>The Amazon Resource Name (ARN) of the instance profile.</p>
    #[doc(hidden)]
    pub arn: std::option::Option<std::string::String>,
    /// <p>The name of the instance profile.</p>
    #[doc(hidden)]
    pub name: std::option::Option<std::string::String>,
}
impl IamInstanceProfileSpecification {
    /// <p>The Amazon Resource Name (ARN) of the instance profile.</p>
    pub fn arn(&self) -> std::option::Option<&str> {
        self.arn.as_deref()
    }
    /// <p>The name of the instance profile.</p>
    pub fn name(&self) -> std::option::Option<&str> {
        self.name.as_deref()
    }
}
/// See [`IamInstanceProfileSpecification`](crate::model::IamInstanceProfileSpecification).
pub mod iam_instance_profile_specification {

    /// A builder for [`IamInstanceProfileSpecification`](crate::model::IamInstanceProfileSpecification).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) arn: std::option::Option<std::string::String>,
        pub(crate) name: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The Amazon Resource Name (ARN) of the instance profile.</p>
        pub fn arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.arn = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the instance profile.</p>
        pub fn set_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.arn = input;
            self
        }
        /// <p>The name of the instance profile.</p>
        pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
            self.name = Some(input.into());
            self
        }
        /// <p>The name of the instance profile.</p>
        pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.name = input;
            self
        }
        /// Consumes the builder and constructs a [`IamInstanceProfileSpecification`](crate::model::IamInstanceProfileSpecification).
        pub fn build(self) -> crate::model::IamInstanceProfileSpecification {
            crate::model::IamInstanceProfileSpecification {
                arn: self.arn,
                name: self.name,
            }
        }
    }
}
impl IamInstanceProfileSpecification {
    /// Creates a new builder-style object to manufacture [`IamInstanceProfileSpecification`](crate::model::IamInstanceProfileSpecification).
    pub fn builder() -> crate::model::iam_instance_profile_specification::Builder {
        crate::model::iam_instance_profile_specification::Builder::default()
    }
}

/// <p>Describes the monitoring of an instance.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct RunInstancesMonitoringEnabled {
    /// <p>Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.</p>
    #[doc(hidden)]
    pub enabled: std::option::Option<bool>,
}
impl RunInstancesMonitoringEnabled {
    /// <p>Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.</p>
    pub fn enabled(&self) -> std::option::Option<bool> {
        self.enabled
    }
}
/// See [`RunInstancesMonitoringEnabled`](crate::model::RunInstancesMonitoringEnabled).
pub mod run_instances_monitoring_enabled {

    /// A builder for [`RunInstancesMonitoringEnabled`](crate::model::RunInstancesMonitoringEnabled).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) enabled: std::option::Option<bool>,
    }
    impl Builder {
        /// <p>Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.</p>
        pub fn enabled(mut self, input: bool) -> Self {
            self.enabled = Some(input);
            self
        }
        /// <p>Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.</p>
        pub fn set_enabled(mut self, input: std::option::Option<bool>) -> Self {
            self.enabled = input;
            self
        }
        /// Consumes the builder and constructs a [`RunInstancesMonitoringEnabled`](crate::model::RunInstancesMonitoringEnabled).
        pub fn build(self) -> crate::model::RunInstancesMonitoringEnabled {
            crate::model::RunInstancesMonitoringEnabled {
                enabled: self.enabled,
            }
        }
    }
}
impl RunInstancesMonitoringEnabled {
    /// Creates a new builder-style object to manufacture [`RunInstancesMonitoringEnabled`](crate::model::RunInstancesMonitoringEnabled).
    pub fn builder() -> crate::model::run_instances_monitoring_enabled::Builder {
        crate::model::run_instances_monitoring_enabled::Builder::default()
    }
}

/// <p>Describes a block device mapping, which defines the EBS volumes and instance store volumes to attach to an instance at launch.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct BlockDeviceMapping {
    /// <p>The device name (for example, <code>/dev/sdh</code> or <code>xvdh</code>).</p>
    #[doc(hidden)]
    pub device_name: std::option::Option<std::string::String>,
    /// <p>The virtual device name (<code>ephemeral</code>N). Instance store volumes are numbered starting from 0. An instance type with 2 available instance store volumes can specify mappings for <code>ephemeral0</code> and <code>ephemeral1</code>. The number of available instance store volumes depends on the instance type. After you connect to the instance, you must mount the volume.</p>
    /// <p>NVMe instance store volumes are automatically enumerated and assigned a device name. Including them in your block device mapping has no effect.</p>
    /// <p>Constraints: For M3 instances, you must specify instance store volumes in the block device mapping for the instance. When you launch an M3 instance, we ignore any instance store volumes specified in the block device mapping for the AMI.</p>
    #[doc(hidden)]
    pub virtual_name: std::option::Option<std::string::String>,
    /// <p>Parameters used to automatically set up EBS volumes when the instance is launched.</p>
    #[doc(hidden)]
    pub ebs: std::option::Option<crate::model::EbsBlockDevice>,
    /// <p>To omit the device from the block device mapping, specify an empty string. When this property is specified, the device is removed from the block device mapping regardless of the assigned value.</p>
    #[doc(hidden)]
    pub no_device: std::option::Option<std::string::String>,
}
impl BlockDeviceMapping {
    /// <p>The device name (for example, <code>/dev/sdh</code> or <code>xvdh</code>).</p>
    pub fn device_name(&self) -> std::option::Option<&str> {
        self.device_name.as_deref()
    }
    /// <p>The virtual device name (<code>ephemeral</code>N). Instance store volumes are numbered starting from 0. An instance type with 2 available instance store volumes can specify mappings for <code>ephemeral0</code> and <code>ephemeral1</code>. The number of available instance store volumes depends on the instance type. After you connect to the instance, you must mount the volume.</p>
    /// <p>NVMe instance store volumes are automatically enumerated and assigned a device name. Including them in your block device mapping has no effect.</p>
    /// <p>Constraints: For M3 instances, you must specify instance store volumes in the block device mapping for the instance. When you launch an M3 instance, we ignore any instance store volumes specified in the block device mapping for the AMI.</p>
    pub fn virtual_name(&self) -> std::option::Option<&str> {
        self.virtual_name.as_deref()
    }
    /// <p>Parameters used to automatically set up EBS volumes when the instance is launched.</p>
    pub fn ebs(&self) -> std::option::Option<&crate::model::EbsBlockDevice> {
        self.ebs.as_ref()
    }
    /// <p>To omit the device from the block device mapping, specify an empty string. When this property is specified, the device is removed from the block device mapping regardless of the assigned value.</p>
    pub fn no_device(&self) -> std::option::Option<&str> {
        self.no_device.as_deref()
    }
}
/// See [`BlockDeviceMapping`](crate::model::BlockDeviceMapping).
pub mod block_device_mapping {

    /// A builder for [`BlockDeviceMapping`](crate::model::BlockDeviceMapping).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) device_name: std::option::Option<std::string::String>,
        pub(crate) virtual_name: std::option::Option<std::string::String>,
        pub(crate) ebs: std::option::Option<crate::model::EbsBlockDevice>,
        pub(crate) no_device: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The device name (for example, <code>/dev/sdh</code> or <code>xvdh</code>).</p>
        pub fn device_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.device_name = Some(input.into());
            self
        }
        /// <p>The device name (for example, <code>/dev/sdh</code> or <code>xvdh</code>).</p>
        pub fn set_device_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.device_name = input;
            self
        }
        /// <p>The virtual device name (<code>ephemeral</code>N). Instance store volumes are numbered starting from 0. An instance type with 2 available instance store volumes can specify mappings for <code>ephemeral0</code> and <code>ephemeral1</code>. The number of available instance store volumes depends on the instance type. After you connect to the instance, you must mount the volume.</p>
        /// <p>NVMe instance store volumes are automatically enumerated and assigned a device name. Including them in your block device mapping has no effect.</p>
        /// <p>Constraints: For M3 instances, you must specify instance store volumes in the block device mapping for the instance. When you launch an M3 instance, we ignore any instance store volumes specified in the block device mapping for the AMI.</p>
        pub fn virtual_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.virtual_name = Some(input.into());
            self
        }
        /// <p>The virtual device name (<code>ephemeral</code>N). Instance store volumes are numbered starting from 0. An instance type with 2 available instance store volumes can specify mappings for <code>ephemeral0</code> and <code>ephemeral1</code>. The number of available instance store volumes depends on the instance type. After you connect to the instance, you must mount the volume.</p>
        /// <p>NVMe instance store volumes are automatically enumerated and assigned a device name. Including them in your block device mapping has no effect.</p>
        /// <p>Constraints: For M3 instances, you must specify instance store volumes in the block device mapping for the instance. When you launch an M3 instance, we ignore any instance store volumes specified in the block device mapping for the AMI.</p>
        pub fn set_virtual_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.virtual_name = input;
            self
        }
        /// <p>Parameters used to automatically set up EBS volumes when the instance is launched.</p>
        pub fn ebs(mut self, input: crate::model::EbsBlockDevice) -> Self {
            self.ebs = Some(input);
            self
        }
        /// <p>Parameters used to automatically set up EBS volumes when the instance is launched.</p>
        pub fn set_ebs(mut self, input: std::option::Option<crate::model::EbsBlockDevice>) -> Self {
            self.ebs = input;
            self
        }
        /// <p>To omit the device from the block device mapping, specify an empty string. When this property is specified, the device is removed from the block device mapping regardless of the assigned value.</p>
        pub fn no_device(mut self, input: impl Into<std::string::String>) -> Self {
            self.no_device = Some(input.into());
            self
        }
        /// <p>To omit the device from the block device mapping, specify an empty string. When this property is specified, the device is removed from the block device mapping regardless of the assigned value.</p>
        pub fn set_no_device(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.no_device = input;
            self
        }
        /// Consumes the builder and constructs a [`BlockDeviceMapping`](crate::model::BlockDeviceMapping).
        pub fn build(self) -> crate::model::BlockDeviceMapping {
            crate::model::BlockDeviceMapping {
                device_name: self.device_name,
                virtual_name: self.virtual_name,
                ebs: self.ebs,
                no_device: self.no_device,
            }
        }
    }
}
impl BlockDeviceMapping {
    /// Creates a new builder-style object to manufacture [`BlockDeviceMapping`](crate::model::BlockDeviceMapping).
    pub fn builder() -> crate::model::block_device_mapping::Builder {
        crate::model::block_device_mapping::Builder::default()
    }
}

/// <p>Describes a block device for an EBS volume.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct EbsBlockDevice {
    /// <p>Indicates whether the EBS volume is deleted on instance termination. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/terminating-instances.html#preserving-volumes-on-termination">Preserving Amazon EBS volumes on instance termination</a> in the <i>Amazon EC2 User Guide</i>.</p>
    #[doc(hidden)]
    pub delete_on_termination: std::option::Option<bool>,
    /// <p>The number of I/O operations per second (IOPS). For <code>gp3</code>, <code>io1</code>, and <code>io2</code> volumes, this represents the number of IOPS that are provisioned for the volume. For <code>gp2</code> volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting.</p>
    /// <p>The following are the supported values for each volume type:</p>
    /// <ul>
    /// <li> <p> <code>gp3</code>: 3,000-16,000 IOPS</p> </li>
    /// <li> <p> <code>io1</code>: 100-64,000 IOPS</p> </li>
    /// <li> <p> <code>io2</code>: 100-64,000 IOPS</p> </li>
    /// </ul>
    /// <p>For <code>io1</code> and <code>io2</code> volumes, we guarantee 64,000 IOPS only for <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances">Instances built on the Nitro System</a>. Other instance families guarantee performance up to 32,000 IOPS.</p>
    /// <p>This parameter is required for <code>io1</code> and <code>io2</code> volumes. The default for <code>gp3</code> volumes is 3,000 IOPS. This parameter is not supported for <code>gp2</code>, <code>st1</code>, <code>sc1</code>, or <code>standard</code> volumes.</p>
    #[doc(hidden)]
    pub iops: std::option::Option<i32>,
    /// <p>The ID of the snapshot.</p>
    #[doc(hidden)]
    pub snapshot_id: std::option::Option<std::string::String>,
    /// <p>The size of the volume, in GiBs. You must specify either a snapshot ID or a volume size. If you specify a snapshot, the default is the snapshot size. You can specify a volume size that is equal to or larger than the snapshot size.</p>
    /// <p>The following are the supported volumes sizes for each volume type:</p>
    /// <ul>
    /// <li> <p> <code>gp2</code> and <code>gp3</code>:1-16,384</p> </li>
    /// <li> <p> <code>io1</code> and <code>io2</code>: 4-16,384</p> </li>
    /// <li> <p> <code>st1</code> and <code>sc1</code>: 125-16,384</p> </li>
    /// <li> <p> <code>standard</code>: 1-1,024</p> </li>
    /// </ul>
    #[doc(hidden)]
    pub volume_size: std::option::Option<i32>,
    /// <p>The volume type. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html">Amazon EBS volume types</a> in the <i>Amazon EC2 User Guide</i>. If the volume type is <code>io1</code> or <code>io2</code>, you must specify the IOPS that the volume supports.</p>
    #[doc(hidden)]
    pub volume_type: std::option::Option<crate::model::VolumeType>,
    /// <p>Identifier (key ID, key alias, ID ARN, or alias ARN) for a customer managed CMK under which the EBS volume is encrypted.</p>
    /// <p>This parameter is only supported on <code>BlockDeviceMapping</code> objects called by <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RunInstances.html">RunInstances</a>, <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RequestSpotFleet.html">RequestSpotFleet</a>, and <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RequestSpotInstances.html">RequestSpotInstances</a>.</p>
    #[doc(hidden)]
    pub kms_key_id: std::option::Option<std::string::String>,
    /// <p>The throughput that the volume supports, in MiB/s.</p>
    /// <p>This parameter is valid only for <code>gp3</code> volumes.</p>
    /// <p>Valid Range: Minimum value of 125. Maximum value of 1000.</p>
    #[doc(hidden)]
    pub throughput: std::option::Option<i32>,
    /// <p>The ARN of the Outpost on which the snapshot is stored.</p>
    /// <p>This parameter is only supported on <code>BlockDeviceMapping</code> objects called by <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateImage.html"> CreateImage</a>.</p>
    #[doc(hidden)]
    pub outpost_arn: std::option::Option<std::string::String>,
    /// <p>Indicates whether the encryption state of an EBS volume is changed while being restored from a backing snapshot. The effect of setting the encryption state to <code>true</code> depends on the volume origin (new or from a snapshot), starting encryption state, ownership, and whether encryption by default is enabled. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html#encryption-parameters">Amazon EBS encryption</a> in the <i>Amazon EC2 User Guide</i>.</p>
    /// <p>In no case can you remove encryption from an encrypted volume.</p>
    /// <p>Encrypted volumes can only be attached to instances that support Amazon EBS encryption. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html#EBSEncryption_supported_instances">Supported instance types</a>.</p>
    /// <p>This parameter is not returned by <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeImageAttribute.html">DescribeImageAttribute</a>.</p>
    #[doc(hidden)]
    pub encrypted: std::option::Option<bool>,
}
impl EbsBlockDevice {
    /// <p>Indicates whether the EBS volume is deleted on instance termination. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/terminating-instances.html#preserving-volumes-on-termination">Preserving Amazon EBS volumes on instance termination</a> in the <i>Amazon EC2 User Guide</i>.</p>
    pub fn delete_on_termination(&self) -> std::option::Option<bool> {
        self.delete_on_termination
    }
    /// <p>The number of I/O operations per second (IOPS). For <code>gp3</code>, <code>io1</code>, and <code>io2</code> volumes, this represents the number of IOPS that are provisioned for the volume. For <code>gp2</code> volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting.</p>
    /// <p>The following are the supported values for each volume type:</p>
    /// <ul>
    /// <li> <p> <code>gp3</code>: 3,000-16,000 IOPS</p> </li>
    /// <li> <p> <code>io1</code>: 100-64,000 IOPS</p> </li>
    /// <li> <p> <code>io2</code>: 100-64,000 IOPS</p> </li>
    /// </ul>
    /// <p>For <code>io1</code> and <code>io2</code> volumes, we guarantee 64,000 IOPS only for <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances">Instances built on the Nitro System</a>. Other instance families guarantee performance up to 32,000 IOPS.</p>
    /// <p>This parameter is required for <code>io1</code> and <code>io2</code> volumes. The default for <code>gp3</code> volumes is 3,000 IOPS. This parameter is not supported for <code>gp2</code>, <code>st1</code>, <code>sc1</code>, or <code>standard</code> volumes.</p>
    pub fn iops(&self) -> std::option::Option<i32> {
        self.iops
    }
    /// <p>The ID of the snapshot.</p>
    pub fn snapshot_id(&self) -> std::option::Option<&str> {
        self.snapshot_id.as_deref()
    }
    /// <p>The size of the volume, in GiBs. You must specify either a snapshot ID or a volume size. If you specify a snapshot, the default is the snapshot size. You can specify a volume size that is equal to or larger than the snapshot size.</p>
    /// <p>The following are the supported volumes sizes for each volume type:</p>
    /// <ul>
    /// <li> <p> <code>gp2</code> and <code>gp3</code>:1-16,384</p> </li>
    /// <li> <p> <code>io1</code> and <code>io2</code>: 4-16,384</p> </li>
    /// <li> <p> <code>st1</code> and <code>sc1</code>: 125-16,384</p> </li>
    /// <li> <p> <code>standard</code>: 1-1,024</p> </li>
    /// </ul>
    pub fn volume_size(&self) -> std::option::Option<i32> {
        self.volume_size
    }
    /// <p>The volume type. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html">Amazon EBS volume types</a> in the <i>Amazon EC2 User Guide</i>. If the volume type is <code>io1</code> or <code>io2</code>, you must specify the IOPS that the volume supports.</p>
    pub fn volume_type(&self) -> std::option::Option<&crate::model::VolumeType> {
        self.volume_type.as_ref()
    }
    /// <p>Identifier (key ID, key alias, ID ARN, or alias ARN) for a customer managed CMK under which the EBS volume is encrypted.</p>
    /// <p>This parameter is only supported on <code>BlockDeviceMapping</code> objects called by <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RunInstances.html">RunInstances</a>, <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RequestSpotFleet.html">RequestSpotFleet</a>, and <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RequestSpotInstances.html">RequestSpotInstances</a>.</p>
    pub fn kms_key_id(&self) -> std::option::Option<&str> {
        self.kms_key_id.as_deref()
    }
    /// <p>The throughput that the volume supports, in MiB/s.</p>
    /// <p>This parameter is valid only for <code>gp3</code> volumes.</p>
    /// <p>Valid Range: Minimum value of 125. Maximum value of 1000.</p>
    pub fn throughput(&self) -> std::option::Option<i32> {
        self.throughput
    }
    /// <p>The ARN of the Outpost on which the snapshot is stored.</p>
    /// <p>This parameter is only supported on <code>BlockDeviceMapping</code> objects called by <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateImage.html"> CreateImage</a>.</p>
    pub fn outpost_arn(&self) -> std::option::Option<&str> {
        self.outpost_arn.as_deref()
    }
    /// <p>Indicates whether the encryption state of an EBS volume is changed while being restored from a backing snapshot. The effect of setting the encryption state to <code>true</code> depends on the volume origin (new or from a snapshot), starting encryption state, ownership, and whether encryption by default is enabled. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html#encryption-parameters">Amazon EBS encryption</a> in the <i>Amazon EC2 User Guide</i>.</p>
    /// <p>In no case can you remove encryption from an encrypted volume.</p>
    /// <p>Encrypted volumes can only be attached to instances that support Amazon EBS encryption. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html#EBSEncryption_supported_instances">Supported instance types</a>.</p>
    /// <p>This parameter is not returned by <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeImageAttribute.html">DescribeImageAttribute</a>.</p>
    pub fn encrypted(&self) -> std::option::Option<bool> {
        self.encrypted
    }
}
/// See [`EbsBlockDevice`](crate::model::EbsBlockDevice).
pub mod ebs_block_device {

    /// A builder for [`EbsBlockDevice`](crate::model::EbsBlockDevice).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) delete_on_termination: std::option::Option<bool>,
        pub(crate) iops: std::option::Option<i32>,
        pub(crate) snapshot_id: std::option::Option<std::string::String>,
        pub(crate) volume_size: std::option::Option<i32>,
        pub(crate) volume_type: std::option::Option<crate::model::VolumeType>,
        pub(crate) kms_key_id: std::option::Option<std::string::String>,
        pub(crate) throughput: std::option::Option<i32>,
        pub(crate) outpost_arn: std::option::Option<std::string::String>,
        pub(crate) encrypted: std::option::Option<bool>,
    }
    impl Builder {
        /// <p>Indicates whether the EBS volume is deleted on instance termination. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/terminating-instances.html#preserving-volumes-on-termination">Preserving Amazon EBS volumes on instance termination</a> in the <i>Amazon EC2 User Guide</i>.</p>
        pub fn delete_on_termination(mut self, input: bool) -> Self {
            self.delete_on_termination = Some(input);
            self
        }
        /// <p>Indicates whether the EBS volume is deleted on instance termination. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/terminating-instances.html#preserving-volumes-on-termination">Preserving Amazon EBS volumes on instance termination</a> in the <i>Amazon EC2 User Guide</i>.</p>
        pub fn set_delete_on_termination(mut self, input: std::option::Option<bool>) -> Self {
            self.delete_on_termination = input;
            self
        }
        /// <p>The number of I/O operations per second (IOPS). For <code>gp3</code>, <code>io1</code>, and <code>io2</code> volumes, this represents the number of IOPS that are provisioned for the volume. For <code>gp2</code> volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting.</p>
        /// <p>The following are the supported values for each volume type:</p>
        /// <ul>
        /// <li> <p> <code>gp3</code>: 3,000-16,000 IOPS</p> </li>
        /// <li> <p> <code>io1</code>: 100-64,000 IOPS</p> </li>
        /// <li> <p> <code>io2</code>: 100-64,000 IOPS</p> </li>
        /// </ul>
        /// <p>For <code>io1</code> and <code>io2</code> volumes, we guarantee 64,000 IOPS only for <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances">Instances built on the Nitro System</a>. Other instance families guarantee performance up to 32,000 IOPS.</p>
        /// <p>This parameter is required for <code>io1</code> and <code>io2</code> volumes. The default for <code>gp3</code> volumes is 3,000 IOPS. This parameter is not supported for <code>gp2</code>, <code>st1</code>, <code>sc1</code>, or <code>standard</code> volumes.</p>
        pub fn iops(mut self, input: i32) -> Self {
            self.iops = Some(input);
            self
        }
        /// <p>The number of I/O operations per second (IOPS). For <code>gp3</code>, <code>io1</code>, and <code>io2</code> volumes, this represents the number of IOPS that are provisioned for the volume. For <code>gp2</code> volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting.</p>
        /// <p>The following are the supported values for each volume type:</p>
        /// <ul>
        /// <li> <p> <code>gp3</code>: 3,000-16,000 IOPS</p> </li>
        /// <li> <p> <code>io1</code>: 100-64,000 IOPS</p> </li>
        /// <li> <p> <code>io2</code>: 100-64,000 IOPS</p> </li>
        /// </ul>
        /// <p>For <code>io1</code> and <code>io2</code> volumes, we guarantee 64,000 IOPS only for <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances">Instances built on the Nitro System</a>. Other instance families guarantee performance up to 32,000 IOPS.</p>
        /// <p>This parameter is required for <code>io1</code> and <code>io2</code> volumes. The default for <code>gp3</code> volumes is 3,000 IOPS. This parameter is not supported for <code>gp2</code>, <code>st1</code>, <code>sc1</code>, or <code>standard</code> volumes.</p>
        pub fn set_iops(mut self, input: std::option::Option<i32>) -> Self {
            self.iops = input;
            self
        }
        /// <p>The ID of the snapshot.</p>
        pub fn snapshot_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.snapshot_id = Some(input.into());
            self
        }
        /// <p>The ID of the snapshot.</p>
        pub fn set_snapshot_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.snapshot_id = input;
            self
        }
        /// <p>The size of the volume, in GiBs. You must specify either a snapshot ID or a volume size. If you specify a snapshot, the default is the snapshot size. You can specify a volume size that is equal to or larger than the snapshot size.</p>
        /// <p>The following are the supported volumes sizes for each volume type:</p>
        /// <ul>
        /// <li> <p> <code>gp2</code> and <code>gp3</code>:1-16,384</p> </li>
        /// <li> <p> <code>io1</code> and <code>io2</code>: 4-16,384</p> </li>
        /// <li> <p> <code>st1</code> and <code>sc1</code>: 125-16,384</p> </li>
        /// <li> <p> <code>standard</code>: 1-1,024</p> </li>
        /// </ul>
        pub fn volume_size(mut self, input: i32) -> Self {
            self.volume_size = Some(input);
            self
        }
        /// <p>The size of the volume, in GiBs. You must specify either a snapshot ID or a volume size. If you specify a snapshot, the default is the snapshot size. You can specify a volume size that is equal to or larger than the snapshot size.</p>
        /// <p>The following are the supported volumes sizes for each volume type:</p>
        /// <ul>
        /// <li> <p> <code>gp2</code> and <code>gp3</code>:1-16,384</p> </li>
        /// <li> <p> <code>io1</code> and <code>io2</code>: 4-16,384</p> </li>
        /// <li> <p> <code>st1</code> and <code>sc1</code>: 125-16,384</p> </li>
        /// <li> <p> <code>standard</code>: 1-1,024</p> </li>
        /// </ul>
        pub fn set_volume_size(mut self, input: std::option::Option<i32>) -> Self {
            self.volume_size = input;
            self
        }
        /// <p>The volume type. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html">Amazon EBS volume types</a> in the <i>Amazon EC2 User Guide</i>. If the volume type is <code>io1</code> or <code>io2</code>, you must specify the IOPS that the volume supports.</p>
        pub fn volume_type(mut self, input: crate::model::VolumeType) -> Self {
            self.volume_type = Some(input);
            self
        }
        /// <p>The volume type. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html">Amazon EBS volume types</a> in the <i>Amazon EC2 User Guide</i>. If the volume type is <code>io1</code> or <code>io2</code>, you must specify the IOPS that the volume supports.</p>
        pub fn set_volume_type(
            mut self,
            input: std::option::Option<crate::model::VolumeType>,
        ) -> Self {
            self.volume_type = input;
            self
        }
        /// <p>Identifier (key ID, key alias, ID ARN, or alias ARN) for a customer managed CMK under which the EBS volume is encrypted.</p>
        /// <p>This parameter is only supported on <code>BlockDeviceMapping</code> objects called by <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RunInstances.html">RunInstances</a>, <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RequestSpotFleet.html">RequestSpotFleet</a>, and <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RequestSpotInstances.html">RequestSpotInstances</a>.</p>
        pub fn kms_key_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.kms_key_id = Some(input.into());
            self
        }
        /// <p>Identifier (key ID, key alias, ID ARN, or alias ARN) for a customer managed CMK under which the EBS volume is encrypted.</p>
        /// <p>This parameter is only supported on <code>BlockDeviceMapping</code> objects called by <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RunInstances.html">RunInstances</a>, <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RequestSpotFleet.html">RequestSpotFleet</a>, and <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RequestSpotInstances.html">RequestSpotInstances</a>.</p>
        pub fn set_kms_key_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.kms_key_id = input;
            self
        }
        /// <p>The throughput that the volume supports, in MiB/s.</p>
        /// <p>This parameter is valid only for <code>gp3</code> volumes.</p>
        /// <p>Valid Range: Minimum value of 125. Maximum value of 1000.</p>
        pub fn throughput(mut self, input: i32) -> Self {
            self.throughput = Some(input);
            self
        }
        /// <p>The throughput that the volume supports, in MiB/s.</p>
        /// <p>This parameter is valid only for <code>gp3</code> volumes.</p>
        /// <p>Valid Range: Minimum value of 125. Maximum value of 1000.</p>
        pub fn set_throughput(mut self, input: std::option::Option<i32>) -> Self {
            self.throughput = input;
            self
        }
        /// <p>The ARN of the Outpost on which the snapshot is stored.</p>
        /// <p>This parameter is only supported on <code>BlockDeviceMapping</code> objects called by <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateImage.html"> CreateImage</a>.</p>
        pub fn outpost_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.outpost_arn = Some(input.into());
            self
        }
        /// <p>The ARN of the Outpost on which the snapshot is stored.</p>
        /// <p>This parameter is only supported on <code>BlockDeviceMapping</code> objects called by <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateImage.html"> CreateImage</a>.</p>
        pub fn set_outpost_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.outpost_arn = input;
            self
        }
        /// <p>Indicates whether the encryption state of an EBS volume is changed while being restored from a backing snapshot. The effect of setting the encryption state to <code>true</code> depends on the volume origin (new or from a snapshot), starting encryption state, ownership, and whether encryption by default is enabled. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html#encryption-parameters">Amazon EBS encryption</a> in the <i>Amazon EC2 User Guide</i>.</p>
        /// <p>In no case can you remove encryption from an encrypted volume.</p>
        /// <p>Encrypted volumes can only be attached to instances that support Amazon EBS encryption. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html#EBSEncryption_supported_instances">Supported instance types</a>.</p>
        /// <p>This parameter is not returned by <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeImageAttribute.html">DescribeImageAttribute</a>.</p>
        pub fn encrypted(mut self, input: bool) -> Self {
            self.encrypted = Some(input);
            self
        }
        /// <p>Indicates whether the encryption state of an EBS volume is changed while being restored from a backing snapshot. The effect of setting the encryption state to <code>true</code> depends on the volume origin (new or from a snapshot), starting encryption state, ownership, and whether encryption by default is enabled. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html#encryption-parameters">Amazon EBS encryption</a> in the <i>Amazon EC2 User Guide</i>.</p>
        /// <p>In no case can you remove encryption from an encrypted volume.</p>
        /// <p>Encrypted volumes can only be attached to instances that support Amazon EBS encryption. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html#EBSEncryption_supported_instances">Supported instance types</a>.</p>
        /// <p>This parameter is not returned by <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeImageAttribute.html">DescribeImageAttribute</a>.</p>
        pub fn set_encrypted(mut self, input: std::option::Option<bool>) -> Self {
            self.encrypted = input;
            self
        }
        /// Consumes the builder and constructs a [`EbsBlockDevice`](crate::model::EbsBlockDevice).
        pub fn build(self) -> crate::model::EbsBlockDevice {
            crate::model::EbsBlockDevice {
                delete_on_termination: self.delete_on_termination,
                iops: self.iops,
                snapshot_id: self.snapshot_id,
                volume_size: self.volume_size,
                volume_type: self.volume_type,
                kms_key_id: self.kms_key_id,
                throughput: self.throughput,
                outpost_arn: self.outpost_arn,
                encrypted: self.encrypted,
            }
        }
    }
}
impl EbsBlockDevice {
    /// Creates a new builder-style object to manufacture [`EbsBlockDevice`](crate::model::EbsBlockDevice).
    pub fn builder() -> crate::model::ebs_block_device::Builder {
        crate::model::ebs_block_device::Builder::default()
    }
}

/// When writing a match expression against `VolumeType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let volumetype = unimplemented!();
/// match volumetype {
///     VolumeType::Gp2 => { /* ... */ },
///     VolumeType::Gp3 => { /* ... */ },
///     VolumeType::Io1 => { /* ... */ },
///     VolumeType::Io2 => { /* ... */ },
///     VolumeType::Sc1 => { /* ... */ },
///     VolumeType::St1 => { /* ... */ },
///     VolumeType::Standard => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `volumetype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `VolumeType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `VolumeType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `VolumeType::NewFeature` is defined.
/// Specifically, when `volumetype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `VolumeType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 VolumeType {
    #[allow(missing_docs)] // documentation missing in model
    Gp2,
    #[allow(missing_docs)] // documentation missing in model
    Gp3,
    #[allow(missing_docs)] // documentation missing in model
    Io1,
    #[allow(missing_docs)] // documentation missing in model
    Io2,
    #[allow(missing_docs)] // documentation missing in model
    Sc1,
    #[allow(missing_docs)] // documentation missing in model
    St1,
    #[allow(missing_docs)] // documentation missing in model
    Standard,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for VolumeType {
    fn from(s: &str) -> Self {
        match s {
            "gp2" => VolumeType::Gp2,
            "gp3" => VolumeType::Gp3,
            "io1" => VolumeType::Io1,
            "io2" => VolumeType::Io2,
            "sc1" => VolumeType::Sc1,
            "st1" => VolumeType::St1,
            "standard" => VolumeType::Standard,
            other => VolumeType::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for VolumeType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(VolumeType::from(s))
    }
}
impl VolumeType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            VolumeType::Gp2 => "gp2",
            VolumeType::Gp3 => "gp3",
            VolumeType::Io1 => "io1",
            VolumeType::Io2 => "io2",
            VolumeType::Sc1 => "sc1",
            VolumeType::St1 => "st1",
            VolumeType::Standard => "standard",
            VolumeType::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["gp2", "gp3", "io1", "io2", "sc1", "st1", "standard"]
    }
}
impl AsRef<str> for VolumeType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes the state of an authorization rule.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ClientVpnAuthorizationRuleStatus {
    /// <p>The state of the authorization rule.</p>
    #[doc(hidden)]
    pub code: std::option::Option<crate::model::ClientVpnAuthorizationRuleStatusCode>,
    /// <p>A message about the status of the authorization rule, if applicable.</p>
    #[doc(hidden)]
    pub message: std::option::Option<std::string::String>,
}
impl ClientVpnAuthorizationRuleStatus {
    /// <p>The state of the authorization rule.</p>
    pub fn code(&self) -> std::option::Option<&crate::model::ClientVpnAuthorizationRuleStatusCode> {
        self.code.as_ref()
    }
    /// <p>A message about the status of the authorization rule, if applicable.</p>
    pub fn message(&self) -> std::option::Option<&str> {
        self.message.as_deref()
    }
}
/// See [`ClientVpnAuthorizationRuleStatus`](crate::model::ClientVpnAuthorizationRuleStatus).
pub mod client_vpn_authorization_rule_status {

    /// A builder for [`ClientVpnAuthorizationRuleStatus`](crate::model::ClientVpnAuthorizationRuleStatus).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) code: std::option::Option<crate::model::ClientVpnAuthorizationRuleStatusCode>,
        pub(crate) message: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The state of the authorization rule.</p>
        pub fn code(mut self, input: crate::model::ClientVpnAuthorizationRuleStatusCode) -> Self {
            self.code = Some(input);
            self
        }
        /// <p>The state of the authorization rule.</p>
        pub fn set_code(
            mut self,
            input: std::option::Option<crate::model::ClientVpnAuthorizationRuleStatusCode>,
        ) -> Self {
            self.code = input;
            self
        }
        /// <p>A message about the status of the authorization rule, if applicable.</p>
        pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
            self.message = Some(input.into());
            self
        }
        /// <p>A message about the status of the authorization rule, if applicable.</p>
        pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.message = input;
            self
        }
        /// Consumes the builder and constructs a [`ClientVpnAuthorizationRuleStatus`](crate::model::ClientVpnAuthorizationRuleStatus).
        pub fn build(self) -> crate::model::ClientVpnAuthorizationRuleStatus {
            crate::model::ClientVpnAuthorizationRuleStatus {
                code: self.code,
                message: self.message,
            }
        }
    }
}
impl ClientVpnAuthorizationRuleStatus {
    /// Creates a new builder-style object to manufacture [`ClientVpnAuthorizationRuleStatus`](crate::model::ClientVpnAuthorizationRuleStatus).
    pub fn builder() -> crate::model::client_vpn_authorization_rule_status::Builder {
        crate::model::client_vpn_authorization_rule_status::Builder::default()
    }
}

/// When writing a match expression against `ClientVpnAuthorizationRuleStatusCode`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let clientvpnauthorizationrulestatuscode = unimplemented!();
/// match clientvpnauthorizationrulestatuscode {
///     ClientVpnAuthorizationRuleStatusCode::Active => { /* ... */ },
///     ClientVpnAuthorizationRuleStatusCode::Authorizing => { /* ... */ },
///     ClientVpnAuthorizationRuleStatusCode::Failed => { /* ... */ },
///     ClientVpnAuthorizationRuleStatusCode::Revoking => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `clientvpnauthorizationrulestatuscode` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `ClientVpnAuthorizationRuleStatusCode::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `ClientVpnAuthorizationRuleStatusCode::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `ClientVpnAuthorizationRuleStatusCode::NewFeature` is defined.
/// Specifically, when `clientvpnauthorizationrulestatuscode` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `ClientVpnAuthorizationRuleStatusCode::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 ClientVpnAuthorizationRuleStatusCode {
    #[allow(missing_docs)] // documentation missing in model
    Active,
    #[allow(missing_docs)] // documentation missing in model
    Authorizing,
    #[allow(missing_docs)] // documentation missing in model
    Failed,
    #[allow(missing_docs)] // documentation missing in model
    Revoking,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for ClientVpnAuthorizationRuleStatusCode {
    fn from(s: &str) -> Self {
        match s {
            "active" => ClientVpnAuthorizationRuleStatusCode::Active,
            "authorizing" => ClientVpnAuthorizationRuleStatusCode::Authorizing,
            "failed" => ClientVpnAuthorizationRuleStatusCode::Failed,
            "revoking" => ClientVpnAuthorizationRuleStatusCode::Revoking,
            other => ClientVpnAuthorizationRuleStatusCode::Unknown(
                crate::types::UnknownVariantValue(other.to_owned()),
            ),
        }
    }
}
impl std::str::FromStr for ClientVpnAuthorizationRuleStatusCode {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(ClientVpnAuthorizationRuleStatusCode::from(s))
    }
}
impl ClientVpnAuthorizationRuleStatusCode {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            ClientVpnAuthorizationRuleStatusCode::Active => "active",
            ClientVpnAuthorizationRuleStatusCode::Authorizing => "authorizing",
            ClientVpnAuthorizationRuleStatusCode::Failed => "failed",
            ClientVpnAuthorizationRuleStatusCode::Revoking => "revoking",
            ClientVpnAuthorizationRuleStatusCode::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["active", "authorizing", "failed", "revoking"]
    }
}
impl AsRef<str> for ClientVpnAuthorizationRuleStatusCode {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `SnapshotState`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let snapshotstate = unimplemented!();
/// match snapshotstate {
///     SnapshotState::Completed => { /* ... */ },
///     SnapshotState::Error => { /* ... */ },
///     SnapshotState::Pending => { /* ... */ },
///     SnapshotState::Recoverable => { /* ... */ },
///     SnapshotState::Recovering => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `snapshotstate` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `SnapshotState::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `SnapshotState::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `SnapshotState::NewFeature` is defined.
/// Specifically, when `snapshotstate` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `SnapshotState::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 SnapshotState {
    #[allow(missing_docs)] // documentation missing in model
    Completed,
    #[allow(missing_docs)] // documentation missing in model
    Error,
    #[allow(missing_docs)] // documentation missing in model
    Pending,
    #[allow(missing_docs)] // documentation missing in model
    Recoverable,
    #[allow(missing_docs)] // documentation missing in model
    Recovering,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for SnapshotState {
    fn from(s: &str) -> Self {
        match s {
            "completed" => SnapshotState::Completed,
            "error" => SnapshotState::Error,
            "pending" => SnapshotState::Pending,
            "recoverable" => SnapshotState::Recoverable,
            "recovering" => SnapshotState::Recovering,
            other => SnapshotState::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for SnapshotState {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(SnapshotState::from(s))
    }
}
impl SnapshotState {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            SnapshotState::Completed => "completed",
            SnapshotState::Error => "error",
            SnapshotState::Pending => "pending",
            SnapshotState::Recoverable => "recoverable",
            SnapshotState::Recovering => "recovering",
            SnapshotState::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["completed", "error", "pending", "recoverable", "recovering"]
    }
}
impl AsRef<str> for SnapshotState {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes a managed prefix list.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ManagedPrefixList {
    /// <p>The ID of the prefix list.</p>
    #[doc(hidden)]
    pub prefix_list_id: std::option::Option<std::string::String>,
    /// <p>The IP address version.</p>
    #[doc(hidden)]
    pub address_family: std::option::Option<std::string::String>,
    /// <p>The current state of the prefix list.</p>
    #[doc(hidden)]
    pub state: std::option::Option<crate::model::PrefixListState>,
    /// <p>The state message.</p>
    #[doc(hidden)]
    pub state_message: std::option::Option<std::string::String>,
    /// <p>The Amazon Resource Name (ARN) for the prefix list.</p>
    #[doc(hidden)]
    pub prefix_list_arn: std::option::Option<std::string::String>,
    /// <p>The name of the prefix list.</p>
    #[doc(hidden)]
    pub prefix_list_name: std::option::Option<std::string::String>,
    /// <p>The maximum number of entries for the prefix list.</p>
    #[doc(hidden)]
    pub max_entries: std::option::Option<i32>,
    /// <p>The version of the prefix list.</p>
    #[doc(hidden)]
    pub version: std::option::Option<i64>,
    /// <p>The tags for the prefix list.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    /// <p>The ID of the owner of the prefix list.</p>
    #[doc(hidden)]
    pub owner_id: std::option::Option<std::string::String>,
}
impl ManagedPrefixList {
    /// <p>The ID of the prefix list.</p>
    pub fn prefix_list_id(&self) -> std::option::Option<&str> {
        self.prefix_list_id.as_deref()
    }
    /// <p>The IP address version.</p>
    pub fn address_family(&self) -> std::option::Option<&str> {
        self.address_family.as_deref()
    }
    /// <p>The current state of the prefix list.</p>
    pub fn state(&self) -> std::option::Option<&crate::model::PrefixListState> {
        self.state.as_ref()
    }
    /// <p>The state message.</p>
    pub fn state_message(&self) -> std::option::Option<&str> {
        self.state_message.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) for the prefix list.</p>
    pub fn prefix_list_arn(&self) -> std::option::Option<&str> {
        self.prefix_list_arn.as_deref()
    }
    /// <p>The name of the prefix list.</p>
    pub fn prefix_list_name(&self) -> std::option::Option<&str> {
        self.prefix_list_name.as_deref()
    }
    /// <p>The maximum number of entries for the prefix list.</p>
    pub fn max_entries(&self) -> std::option::Option<i32> {
        self.max_entries
    }
    /// <p>The version of the prefix list.</p>
    pub fn version(&self) -> std::option::Option<i64> {
        self.version
    }
    /// <p>The tags for the prefix list.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
    /// <p>The ID of the owner of the prefix list.</p>
    pub fn owner_id(&self) -> std::option::Option<&str> {
        self.owner_id.as_deref()
    }
}
/// See [`ManagedPrefixList`](crate::model::ManagedPrefixList).
pub mod managed_prefix_list {

    /// A builder for [`ManagedPrefixList`](crate::model::ManagedPrefixList).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) prefix_list_id: std::option::Option<std::string::String>,
        pub(crate) address_family: std::option::Option<std::string::String>,
        pub(crate) state: std::option::Option<crate::model::PrefixListState>,
        pub(crate) state_message: std::option::Option<std::string::String>,
        pub(crate) prefix_list_arn: std::option::Option<std::string::String>,
        pub(crate) prefix_list_name: std::option::Option<std::string::String>,
        pub(crate) max_entries: std::option::Option<i32>,
        pub(crate) version: std::option::Option<i64>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        pub(crate) owner_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The ID of the prefix list.</p>
        pub fn prefix_list_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.prefix_list_id = Some(input.into());
            self
        }
        /// <p>The ID of the prefix list.</p>
        pub fn set_prefix_list_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.prefix_list_id = input;
            self
        }
        /// <p>The IP address version.</p>
        pub fn address_family(mut self, input: impl Into<std::string::String>) -> Self {
            self.address_family = Some(input.into());
            self
        }
        /// <p>The IP address version.</p>
        pub fn set_address_family(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.address_family = input;
            self
        }
        /// <p>The current state of the prefix list.</p>
        pub fn state(mut self, input: crate::model::PrefixListState) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>The current state of the prefix list.</p>
        pub fn set_state(
            mut self,
            input: std::option::Option<crate::model::PrefixListState>,
        ) -> Self {
            self.state = input;
            self
        }
        /// <p>The state message.</p>
        pub fn state_message(mut self, input: impl Into<std::string::String>) -> Self {
            self.state_message = Some(input.into());
            self
        }
        /// <p>The state message.</p>
        pub fn set_state_message(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.state_message = input;
            self
        }
        /// <p>The Amazon Resource Name (ARN) for the prefix list.</p>
        pub fn prefix_list_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.prefix_list_arn = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) for the prefix list.</p>
        pub fn set_prefix_list_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.prefix_list_arn = input;
            self
        }
        /// <p>The name of the prefix list.</p>
        pub fn prefix_list_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.prefix_list_name = Some(input.into());
            self
        }
        /// <p>The name of the prefix list.</p>
        pub fn set_prefix_list_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.prefix_list_name = input;
            self
        }
        /// <p>The maximum number of entries for the prefix list.</p>
        pub fn max_entries(mut self, input: i32) -> Self {
            self.max_entries = Some(input);
            self
        }
        /// <p>The maximum number of entries for the prefix list.</p>
        pub fn set_max_entries(mut self, input: std::option::Option<i32>) -> Self {
            self.max_entries = input;
            self
        }
        /// <p>The version of the prefix list.</p>
        pub fn version(mut self, input: i64) -> Self {
            self.version = Some(input);
            self
        }
        /// <p>The version of the prefix list.</p>
        pub fn set_version(mut self, input: std::option::Option<i64>) -> Self {
            self.version = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>The tags for the prefix list.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>The tags for the prefix list.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// <p>The ID of the owner of the prefix list.</p>
        pub fn owner_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.owner_id = Some(input.into());
            self
        }
        /// <p>The ID of the owner of the prefix list.</p>
        pub fn set_owner_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.owner_id = input;
            self
        }
        /// Consumes the builder and constructs a [`ManagedPrefixList`](crate::model::ManagedPrefixList).
        pub fn build(self) -> crate::model::ManagedPrefixList {
            crate::model::ManagedPrefixList {
                prefix_list_id: self.prefix_list_id,
                address_family: self.address_family,
                state: self.state,
                state_message: self.state_message,
                prefix_list_arn: self.prefix_list_arn,
                prefix_list_name: self.prefix_list_name,
                max_entries: self.max_entries,
                version: self.version,
                tags: self.tags,
                owner_id: self.owner_id,
            }
        }
    }
}
impl ManagedPrefixList {
    /// Creates a new builder-style object to manufacture [`ManagedPrefixList`](crate::model::ManagedPrefixList).
    pub fn builder() -> crate::model::managed_prefix_list::Builder {
        crate::model::managed_prefix_list::Builder::default()
    }
}

/// When writing a match expression against `PrefixListState`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let prefixliststate = unimplemented!();
/// match prefixliststate {
///     PrefixListState::CreateComplete => { /* ... */ },
///     PrefixListState::CreateFailed => { /* ... */ },
///     PrefixListState::CreateInProgress => { /* ... */ },
///     PrefixListState::DeleteComplete => { /* ... */ },
///     PrefixListState::DeleteFailed => { /* ... */ },
///     PrefixListState::DeleteInProgress => { /* ... */ },
///     PrefixListState::ModifyComplete => { /* ... */ },
///     PrefixListState::ModifyFailed => { /* ... */ },
///     PrefixListState::ModifyInProgress => { /* ... */ },
///     PrefixListState::RestoreComplete => { /* ... */ },
///     PrefixListState::RestoreFailed => { /* ... */ },
///     PrefixListState::RestoreInProgress => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `prefixliststate` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `PrefixListState::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `PrefixListState::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `PrefixListState::NewFeature` is defined.
/// Specifically, when `prefixliststate` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `PrefixListState::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 PrefixListState {
    #[allow(missing_docs)] // documentation missing in model
    CreateComplete,
    #[allow(missing_docs)] // documentation missing in model
    CreateFailed,
    #[allow(missing_docs)] // documentation missing in model
    CreateInProgress,
    #[allow(missing_docs)] // documentation missing in model
    DeleteComplete,
    #[allow(missing_docs)] // documentation missing in model
    DeleteFailed,
    #[allow(missing_docs)] // documentation missing in model
    DeleteInProgress,
    #[allow(missing_docs)] // documentation missing in model
    ModifyComplete,
    #[allow(missing_docs)] // documentation missing in model
    ModifyFailed,
    #[allow(missing_docs)] // documentation missing in model
    ModifyInProgress,
    #[allow(missing_docs)] // documentation missing in model
    RestoreComplete,
    #[allow(missing_docs)] // documentation missing in model
    RestoreFailed,
    #[allow(missing_docs)] // documentation missing in model
    RestoreInProgress,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for PrefixListState {
    fn from(s: &str) -> Self {
        match s {
            "create-complete" => PrefixListState::CreateComplete,
            "create-failed" => PrefixListState::CreateFailed,
            "create-in-progress" => PrefixListState::CreateInProgress,
            "delete-complete" => PrefixListState::DeleteComplete,
            "delete-failed" => PrefixListState::DeleteFailed,
            "delete-in-progress" => PrefixListState::DeleteInProgress,
            "modify-complete" => PrefixListState::ModifyComplete,
            "modify-failed" => PrefixListState::ModifyFailed,
            "modify-in-progress" => PrefixListState::ModifyInProgress,
            "restore-complete" => PrefixListState::RestoreComplete,
            "restore-failed" => PrefixListState::RestoreFailed,
            "restore-in-progress" => PrefixListState::RestoreInProgress,
            other => PrefixListState::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for PrefixListState {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(PrefixListState::from(s))
    }
}
impl PrefixListState {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            PrefixListState::CreateComplete => "create-complete",
            PrefixListState::CreateFailed => "create-failed",
            PrefixListState::CreateInProgress => "create-in-progress",
            PrefixListState::DeleteComplete => "delete-complete",
            PrefixListState::DeleteFailed => "delete-failed",
            PrefixListState::DeleteInProgress => "delete-in-progress",
            PrefixListState::ModifyComplete => "modify-complete",
            PrefixListState::ModifyFailed => "modify-failed",
            PrefixListState::ModifyInProgress => "modify-in-progress",
            PrefixListState::RestoreComplete => "restore-complete",
            PrefixListState::RestoreFailed => "restore-failed",
            PrefixListState::RestoreInProgress => "restore-in-progress",
            PrefixListState::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &[
            "create-complete",
            "create-failed",
            "create-in-progress",
            "delete-complete",
            "delete-failed",
            "delete-in-progress",
            "modify-complete",
            "modify-failed",
            "modify-in-progress",
            "restore-complete",
            "restore-failed",
            "restore-in-progress",
        ]
    }
}
impl AsRef<str> for PrefixListState {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `Status`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let status = unimplemented!();
/// match status {
///     Status::InClassic => { /* ... */ },
///     Status::InVpc => { /* ... */ },
///     Status::MoveInProgress => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `status` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `Status::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `Status::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `Status::NewFeature` is defined.
/// Specifically, when `status` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `Status::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 Status {
    #[allow(missing_docs)] // documentation missing in model
    InClassic,
    #[allow(missing_docs)] // documentation missing in model
    InVpc,
    #[allow(missing_docs)] // documentation missing in model
    MoveInProgress,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for Status {
    fn from(s: &str) -> Self {
        match s {
            "InClassic" => Status::InClassic,
            "InVpc" => Status::InVpc,
            "MoveInProgress" => Status::MoveInProgress,
            other => Status::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for Status {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(Status::from(s))
    }
}
impl Status {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            Status::InClassic => "InClassic",
            Status::InVpc => "InVpc",
            Status::MoveInProgress => "MoveInProgress",
            Status::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["InClassic", "InVpc", "MoveInProgress"]
    }
}
impl AsRef<str> for Status {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `SnapshotAttributeName`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let snapshotattributename = unimplemented!();
/// match snapshotattributename {
///     SnapshotAttributeName::CreateVolumePermission => { /* ... */ },
///     SnapshotAttributeName::ProductCodes => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `snapshotattributename` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `SnapshotAttributeName::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `SnapshotAttributeName::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `SnapshotAttributeName::NewFeature` is defined.
/// Specifically, when `snapshotattributename` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `SnapshotAttributeName::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 SnapshotAttributeName {
    #[allow(missing_docs)] // documentation missing in model
    CreateVolumePermission,
    #[allow(missing_docs)] // documentation missing in model
    ProductCodes,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for SnapshotAttributeName {
    fn from(s: &str) -> Self {
        match s {
            "createVolumePermission" => SnapshotAttributeName::CreateVolumePermission,
            "productCodes" => SnapshotAttributeName::ProductCodes,
            other => {
                SnapshotAttributeName::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for SnapshotAttributeName {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(SnapshotAttributeName::from(s))
    }
}
impl SnapshotAttributeName {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            SnapshotAttributeName::CreateVolumePermission => "createVolumePermission",
            SnapshotAttributeName::ProductCodes => "productCodes",
            SnapshotAttributeName::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["createVolumePermission", "productCodes"]
    }
}
impl AsRef<str> for SnapshotAttributeName {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `InstanceAttributeName`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let instanceattributename = unimplemented!();
/// match instanceattributename {
///     InstanceAttributeName::BlockDeviceMapping => { /* ... */ },
///     InstanceAttributeName::DisableApiStop => { /* ... */ },
///     InstanceAttributeName::DisableApiTermination => { /* ... */ },
///     InstanceAttributeName::EbsOptimized => { /* ... */ },
///     InstanceAttributeName::EnaSupport => { /* ... */ },
///     InstanceAttributeName::EnclaveOptions => { /* ... */ },
///     InstanceAttributeName::GroupSet => { /* ... */ },
///     InstanceAttributeName::InstanceInitiatedShutdownBehavior => { /* ... */ },
///     InstanceAttributeName::InstanceType => { /* ... */ },
///     InstanceAttributeName::Kernel => { /* ... */ },
///     InstanceAttributeName::ProductCodes => { /* ... */ },
///     InstanceAttributeName::Ramdisk => { /* ... */ },
///     InstanceAttributeName::RootDeviceName => { /* ... */ },
///     InstanceAttributeName::SourceDestCheck => { /* ... */ },
///     InstanceAttributeName::SriovNetSupport => { /* ... */ },
///     InstanceAttributeName::UserData => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `instanceattributename` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `InstanceAttributeName::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `InstanceAttributeName::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `InstanceAttributeName::NewFeature` is defined.
/// Specifically, when `instanceattributename` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `InstanceAttributeName::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 InstanceAttributeName {
    #[allow(missing_docs)] // documentation missing in model
    BlockDeviceMapping,
    #[allow(missing_docs)] // documentation missing in model
    DisableApiStop,
    #[allow(missing_docs)] // documentation missing in model
    DisableApiTermination,
    #[allow(missing_docs)] // documentation missing in model
    EbsOptimized,
    #[allow(missing_docs)] // documentation missing in model
    EnaSupport,
    #[allow(missing_docs)] // documentation missing in model
    EnclaveOptions,
    #[allow(missing_docs)] // documentation missing in model
    GroupSet,
    #[allow(missing_docs)] // documentation missing in model
    InstanceInitiatedShutdownBehavior,
    #[allow(missing_docs)] // documentation missing in model
    InstanceType,
    #[allow(missing_docs)] // documentation missing in model
    Kernel,
    #[allow(missing_docs)] // documentation missing in model
    ProductCodes,
    #[allow(missing_docs)] // documentation missing in model
    Ramdisk,
    #[allow(missing_docs)] // documentation missing in model
    RootDeviceName,
    #[allow(missing_docs)] // documentation missing in model
    SourceDestCheck,
    #[allow(missing_docs)] // documentation missing in model
    SriovNetSupport,
    #[allow(missing_docs)] // documentation missing in model
    UserData,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for InstanceAttributeName {
    fn from(s: &str) -> Self {
        match s {
            "blockDeviceMapping" => InstanceAttributeName::BlockDeviceMapping,
            "disableApiStop" => InstanceAttributeName::DisableApiStop,
            "disableApiTermination" => InstanceAttributeName::DisableApiTermination,
            "ebsOptimized" => InstanceAttributeName::EbsOptimized,
            "enaSupport" => InstanceAttributeName::EnaSupport,
            "enclaveOptions" => InstanceAttributeName::EnclaveOptions,
            "groupSet" => InstanceAttributeName::GroupSet,
            "instanceInitiatedShutdownBehavior" => {
                InstanceAttributeName::InstanceInitiatedShutdownBehavior
            }
            "instanceType" => InstanceAttributeName::InstanceType,
            "kernel" => InstanceAttributeName::Kernel,
            "productCodes" => InstanceAttributeName::ProductCodes,
            "ramdisk" => InstanceAttributeName::Ramdisk,
            "rootDeviceName" => InstanceAttributeName::RootDeviceName,
            "sourceDestCheck" => InstanceAttributeName::SourceDestCheck,
            "sriovNetSupport" => InstanceAttributeName::SriovNetSupport,
            "userData" => InstanceAttributeName::UserData,
            other => {
                InstanceAttributeName::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for InstanceAttributeName {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(InstanceAttributeName::from(s))
    }
}
impl InstanceAttributeName {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            InstanceAttributeName::BlockDeviceMapping => "blockDeviceMapping",
            InstanceAttributeName::DisableApiStop => "disableApiStop",
            InstanceAttributeName::DisableApiTermination => "disableApiTermination",
            InstanceAttributeName::EbsOptimized => "ebsOptimized",
            InstanceAttributeName::EnaSupport => "enaSupport",
            InstanceAttributeName::EnclaveOptions => "enclaveOptions",
            InstanceAttributeName::GroupSet => "groupSet",
            InstanceAttributeName::InstanceInitiatedShutdownBehavior => {
                "instanceInitiatedShutdownBehavior"
            }
            InstanceAttributeName::InstanceType => "instanceType",
            InstanceAttributeName::Kernel => "kernel",
            InstanceAttributeName::ProductCodes => "productCodes",
            InstanceAttributeName::Ramdisk => "ramdisk",
            InstanceAttributeName::RootDeviceName => "rootDeviceName",
            InstanceAttributeName::SourceDestCheck => "sourceDestCheck",
            InstanceAttributeName::SriovNetSupport => "sriovNetSupport",
            InstanceAttributeName::UserData => "userData",
            InstanceAttributeName::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &[
            "blockDeviceMapping",
            "disableApiStop",
            "disableApiTermination",
            "ebsOptimized",
            "enaSupport",
            "enclaveOptions",
            "groupSet",
            "instanceInitiatedShutdownBehavior",
            "instanceType",
            "kernel",
            "productCodes",
            "ramdisk",
            "rootDeviceName",
            "sourceDestCheck",
            "sriovNetSupport",
            "userData",
        ]
    }
}
impl AsRef<str> for InstanceAttributeName {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `ResetImageAttributeName`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let resetimageattributename = unimplemented!();
/// match resetimageattributename {
///     ResetImageAttributeName::LaunchPermission => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `resetimageattributename` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `ResetImageAttributeName::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `ResetImageAttributeName::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `ResetImageAttributeName::NewFeature` is defined.
/// Specifically, when `resetimageattributename` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `ResetImageAttributeName::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 ResetImageAttributeName {
    #[allow(missing_docs)] // documentation missing in model
    LaunchPermission,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for ResetImageAttributeName {
    fn from(s: &str) -> Self {
        match s {
            "launchPermission" => ResetImageAttributeName::LaunchPermission,
            other => ResetImageAttributeName::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for ResetImageAttributeName {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(ResetImageAttributeName::from(s))
    }
}
impl ResetImageAttributeName {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            ResetImageAttributeName::LaunchPermission => "launchPermission",
            ResetImageAttributeName::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["launchPermission"]
    }
}
impl AsRef<str> for ResetImageAttributeName {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `ResetFpgaImageAttributeName`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let resetfpgaimageattributename = unimplemented!();
/// match resetfpgaimageattributename {
///     ResetFpgaImageAttributeName::LoadPermission => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `resetfpgaimageattributename` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `ResetFpgaImageAttributeName::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `ResetFpgaImageAttributeName::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `ResetFpgaImageAttributeName::NewFeature` is defined.
/// Specifically, when `resetfpgaimageattributename` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `ResetFpgaImageAttributeName::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 ResetFpgaImageAttributeName {
    #[allow(missing_docs)] // documentation missing in model
    LoadPermission,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for ResetFpgaImageAttributeName {
    fn from(s: &str) -> Self {
        match s {
            "loadPermission" => ResetFpgaImageAttributeName::LoadPermission,
            other => ResetFpgaImageAttributeName::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for ResetFpgaImageAttributeName {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(ResetFpgaImageAttributeName::from(s))
    }
}
impl ResetFpgaImageAttributeName {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            ResetFpgaImageAttributeName::LoadPermission => "loadPermission",
            ResetFpgaImageAttributeName::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["loadPermission"]
    }
}
impl AsRef<str> for ResetFpgaImageAttributeName {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>The attributes associated with an Elastic IP address.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AddressAttribute {
    /// <p>The public IP address.</p>
    #[doc(hidden)]
    pub public_ip: std::option::Option<std::string::String>,
    /// <p>[EC2-VPC] The allocation ID.</p>
    #[doc(hidden)]
    pub allocation_id: std::option::Option<std::string::String>,
    /// <p>The pointer (PTR) record for the IP address.</p>
    #[doc(hidden)]
    pub ptr_record: std::option::Option<std::string::String>,
    /// <p>The updated PTR record for the IP address.</p>
    #[doc(hidden)]
    pub ptr_record_update: std::option::Option<crate::model::PtrUpdateStatus>,
}
impl AddressAttribute {
    /// <p>The public IP address.</p>
    pub fn public_ip(&self) -> std::option::Option<&str> {
        self.public_ip.as_deref()
    }
    /// <p>[EC2-VPC] The allocation ID.</p>
    pub fn allocation_id(&self) -> std::option::Option<&str> {
        self.allocation_id.as_deref()
    }
    /// <p>The pointer (PTR) record for the IP address.</p>
    pub fn ptr_record(&self) -> std::option::Option<&str> {
        self.ptr_record.as_deref()
    }
    /// <p>The updated PTR record for the IP address.</p>
    pub fn ptr_record_update(&self) -> std::option::Option<&crate::model::PtrUpdateStatus> {
        self.ptr_record_update.as_ref()
    }
}
/// See [`AddressAttribute`](crate::model::AddressAttribute).
pub mod address_attribute {

    /// A builder for [`AddressAttribute`](crate::model::AddressAttribute).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) public_ip: std::option::Option<std::string::String>,
        pub(crate) allocation_id: std::option::Option<std::string::String>,
        pub(crate) ptr_record: std::option::Option<std::string::String>,
        pub(crate) ptr_record_update: std::option::Option<crate::model::PtrUpdateStatus>,
    }
    impl Builder {
        /// <p>The public IP address.</p>
        pub fn public_ip(mut self, input: impl Into<std::string::String>) -> Self {
            self.public_ip = Some(input.into());
            self
        }
        /// <p>The public IP address.</p>
        pub fn set_public_ip(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.public_ip = input;
            self
        }
        /// <p>[EC2-VPC] The allocation ID.</p>
        pub fn allocation_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.allocation_id = Some(input.into());
            self
        }
        /// <p>[EC2-VPC] The allocation ID.</p>
        pub fn set_allocation_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.allocation_id = input;
            self
        }
        /// <p>The pointer (PTR) record for the IP address.</p>
        pub fn ptr_record(mut self, input: impl Into<std::string::String>) -> Self {
            self.ptr_record = Some(input.into());
            self
        }
        /// <p>The pointer (PTR) record for the IP address.</p>
        pub fn set_ptr_record(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.ptr_record = input;
            self
        }
        /// <p>The updated PTR record for the IP address.</p>
        pub fn ptr_record_update(mut self, input: crate::model::PtrUpdateStatus) -> Self {
            self.ptr_record_update = Some(input);
            self
        }
        /// <p>The updated PTR record for the IP address.</p>
        pub fn set_ptr_record_update(
            mut self,
            input: std::option::Option<crate::model::PtrUpdateStatus>,
        ) -> Self {
            self.ptr_record_update = input;
            self
        }
        /// Consumes the builder and constructs a [`AddressAttribute`](crate::model::AddressAttribute).
        pub fn build(self) -> crate::model::AddressAttribute {
            crate::model::AddressAttribute {
                public_ip: self.public_ip,
                allocation_id: self.allocation_id,
                ptr_record: self.ptr_record,
                ptr_record_update: self.ptr_record_update,
            }
        }
    }
}
impl AddressAttribute {
    /// Creates a new builder-style object to manufacture [`AddressAttribute`](crate::model::AddressAttribute).
    pub fn builder() -> crate::model::address_attribute::Builder {
        crate::model::address_attribute::Builder::default()
    }
}

/// <p>The status of an updated pointer (PTR) record for an Elastic IP address.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct PtrUpdateStatus {
    /// <p>The value for the PTR record update.</p>
    #[doc(hidden)]
    pub value: std::option::Option<std::string::String>,
    /// <p>The status of the PTR record update.</p>
    #[doc(hidden)]
    pub status: std::option::Option<std::string::String>,
    /// <p>The reason for the PTR record update.</p>
    #[doc(hidden)]
    pub reason: std::option::Option<std::string::String>,
}
impl PtrUpdateStatus {
    /// <p>The value for the PTR record update.</p>
    pub fn value(&self) -> std::option::Option<&str> {
        self.value.as_deref()
    }
    /// <p>The status of the PTR record update.</p>
    pub fn status(&self) -> std::option::Option<&str> {
        self.status.as_deref()
    }
    /// <p>The reason for the PTR record update.</p>
    pub fn reason(&self) -> std::option::Option<&str> {
        self.reason.as_deref()
    }
}
/// See [`PtrUpdateStatus`](crate::model::PtrUpdateStatus).
pub mod ptr_update_status {

    /// A builder for [`PtrUpdateStatus`](crate::model::PtrUpdateStatus).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) value: std::option::Option<std::string::String>,
        pub(crate) status: std::option::Option<std::string::String>,
        pub(crate) reason: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The value for the PTR record update.</p>
        pub fn value(mut self, input: impl Into<std::string::String>) -> Self {
            self.value = Some(input.into());
            self
        }
        /// <p>The value for the PTR record update.</p>
        pub fn set_value(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.value = input;
            self
        }
        /// <p>The status of the PTR record update.</p>
        pub fn status(mut self, input: impl Into<std::string::String>) -> Self {
            self.status = Some(input.into());
            self
        }
        /// <p>The status of the PTR record update.</p>
        pub fn set_status(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.status = input;
            self
        }
        /// <p>The reason for the PTR record update.</p>
        pub fn reason(mut self, input: impl Into<std::string::String>) -> Self {
            self.reason = Some(input.into());
            self
        }
        /// <p>The reason for the PTR record update.</p>
        pub fn set_reason(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.reason = input;
            self
        }
        /// Consumes the builder and constructs a [`PtrUpdateStatus`](crate::model::PtrUpdateStatus).
        pub fn build(self) -> crate::model::PtrUpdateStatus {
            crate::model::PtrUpdateStatus {
                value: self.value,
                status: self.status,
                reason: self.reason,
            }
        }
    }
}
impl PtrUpdateStatus {
    /// Creates a new builder-style object to manufacture [`PtrUpdateStatus`](crate::model::PtrUpdateStatus).
    pub fn builder() -> crate::model::ptr_update_status::Builder {
        crate::model::ptr_update_status::Builder::default()
    }
}

/// When writing a match expression against `AddressAttributeName`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let addressattributename = unimplemented!();
/// match addressattributename {
///     AddressAttributeName::DomainName => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `addressattributename` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `AddressAttributeName::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `AddressAttributeName::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `AddressAttributeName::NewFeature` is defined.
/// Specifically, when `addressattributename` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `AddressAttributeName::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 AddressAttributeName {
    #[allow(missing_docs)] // documentation missing in model
    DomainName,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for AddressAttributeName {
    fn from(s: &str) -> Self {
        match s {
            "domain-name" => AddressAttributeName::DomainName,
            other => {
                AddressAttributeName::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for AddressAttributeName {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(AddressAttributeName::from(s))
    }
}
impl AddressAttributeName {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            AddressAttributeName::DomainName => "domain-name",
            AddressAttributeName::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["domain-name"]
    }
}
impl AsRef<str> for AddressAttributeName {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes a Spot Instance request.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SpotInstanceRequest {
    /// <p>Deprecated.</p>
    #[doc(hidden)]
    pub actual_block_hourly_price: std::option::Option<std::string::String>,
    /// <p>The Availability Zone group. If you specify the same Availability Zone group for all Spot Instance requests, all Spot Instances are launched in the same Availability Zone.</p>
    #[doc(hidden)]
    pub availability_zone_group: std::option::Option<std::string::String>,
    /// <p>Deprecated.</p>
    #[doc(hidden)]
    pub block_duration_minutes: std::option::Option<i32>,
    /// <p>The date and time when the Spot Instance request was created, in UTC format (for example, <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).</p>
    #[doc(hidden)]
    pub create_time: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The fault codes for the Spot Instance request, if any.</p>
    #[doc(hidden)]
    pub fault: std::option::Option<crate::model::SpotInstanceStateFault>,
    /// <p>The instance ID, if an instance has been launched to fulfill the Spot Instance request.</p>
    #[doc(hidden)]
    pub instance_id: std::option::Option<std::string::String>,
    /// <p>The instance launch group. Launch groups are Spot Instances that launch together and terminate together.</p>
    #[doc(hidden)]
    pub launch_group: std::option::Option<std::string::String>,
    /// <p>Additional information for launching instances.</p>
    #[doc(hidden)]
    pub launch_specification: std::option::Option<crate::model::LaunchSpecification>,
    /// <p>The Availability Zone in which the request is launched.</p>
    #[doc(hidden)]
    pub launched_availability_zone: std::option::Option<std::string::String>,
    /// <p>The product description associated with the Spot Instance.</p>
    #[doc(hidden)]
    pub product_description: std::option::Option<crate::model::RiProductDescription>,
    /// <p>The ID of the Spot Instance request.</p>
    #[doc(hidden)]
    pub spot_instance_request_id: std::option::Option<std::string::String>,
    /// <p>The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.</p> <important>
    /// <p>If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.</p>
    /// </important>
    #[doc(hidden)]
    pub spot_price: std::option::Option<std::string::String>,
    /// <p>The state of the Spot Instance request. Spot request status information helps track your Spot Instance requests. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-request-status.html">Spot request status</a> in the <i>Amazon EC2 User Guide for Linux Instances</i>.</p>
    #[doc(hidden)]
    pub state: std::option::Option<crate::model::SpotInstanceState>,
    /// <p>The status code and status message describing the Spot Instance request.</p>
    #[doc(hidden)]
    pub status: std::option::Option<crate::model::SpotInstanceStatus>,
    /// <p>Any tags assigned to the resource.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    /// <p>The Spot Instance request type.</p>
    #[doc(hidden)]
    pub r#type: std::option::Option<crate::model::SpotInstanceType>,
    /// <p>The start date of the request, in UTC format (for example, <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z). The request becomes active at this date and time.</p>
    #[doc(hidden)]
    pub valid_from: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The end date of the request, in UTC format (<i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).</p>
    /// <ul>
    /// <li> <p>For a persistent request, the request remains active until the <code>validUntil</code> date and time is reached. Otherwise, the request remains active until you cancel it. </p> </li>
    /// <li> <p>For a one-time request, the request remains active until all instances launch, the request is canceled, or the <code>validUntil</code> date and time is reached. By default, the request is valid for 7 days from the date the request was created.</p> </li>
    /// </ul>
    #[doc(hidden)]
    pub valid_until: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The behavior when a Spot Instance is interrupted.</p>
    #[doc(hidden)]
    pub instance_interruption_behavior:
        std::option::Option<crate::model::InstanceInterruptionBehavior>,
}
impl SpotInstanceRequest {
    /// <p>Deprecated.</p>
    pub fn actual_block_hourly_price(&self) -> std::option::Option<&str> {
        self.actual_block_hourly_price.as_deref()
    }
    /// <p>The Availability Zone group. If you specify the same Availability Zone group for all Spot Instance requests, all Spot Instances are launched in the same Availability Zone.</p>
    pub fn availability_zone_group(&self) -> std::option::Option<&str> {
        self.availability_zone_group.as_deref()
    }
    /// <p>Deprecated.</p>
    pub fn block_duration_minutes(&self) -> std::option::Option<i32> {
        self.block_duration_minutes
    }
    /// <p>The date and time when the Spot Instance request was created, in UTC format (for example, <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).</p>
    pub fn create_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.create_time.as_ref()
    }
    /// <p>The fault codes for the Spot Instance request, if any.</p>
    pub fn fault(&self) -> std::option::Option<&crate::model::SpotInstanceStateFault> {
        self.fault.as_ref()
    }
    /// <p>The instance ID, if an instance has been launched to fulfill the Spot Instance request.</p>
    pub fn instance_id(&self) -> std::option::Option<&str> {
        self.instance_id.as_deref()
    }
    /// <p>The instance launch group. Launch groups are Spot Instances that launch together and terminate together.</p>
    pub fn launch_group(&self) -> std::option::Option<&str> {
        self.launch_group.as_deref()
    }
    /// <p>Additional information for launching instances.</p>
    pub fn launch_specification(&self) -> std::option::Option<&crate::model::LaunchSpecification> {
        self.launch_specification.as_ref()
    }
    /// <p>The Availability Zone in which the request is launched.</p>
    pub fn launched_availability_zone(&self) -> std::option::Option<&str> {
        self.launched_availability_zone.as_deref()
    }
    /// <p>The product description associated with the Spot Instance.</p>
    pub fn product_description(&self) -> std::option::Option<&crate::model::RiProductDescription> {
        self.product_description.as_ref()
    }
    /// <p>The ID of the Spot Instance request.</p>
    pub fn spot_instance_request_id(&self) -> std::option::Option<&str> {
        self.spot_instance_request_id.as_deref()
    }
    /// <p>The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.</p> <important>
    /// <p>If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.</p>
    /// </important>
    pub fn spot_price(&self) -> std::option::Option<&str> {
        self.spot_price.as_deref()
    }
    /// <p>The state of the Spot Instance request. Spot request status information helps track your Spot Instance requests. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-request-status.html">Spot request status</a> in the <i>Amazon EC2 User Guide for Linux Instances</i>.</p>
    pub fn state(&self) -> std::option::Option<&crate::model::SpotInstanceState> {
        self.state.as_ref()
    }
    /// <p>The status code and status message describing the Spot Instance request.</p>
    pub fn status(&self) -> std::option::Option<&crate::model::SpotInstanceStatus> {
        self.status.as_ref()
    }
    /// <p>Any tags assigned to the resource.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
    /// <p>The Spot Instance request type.</p>
    pub fn r#type(&self) -> std::option::Option<&crate::model::SpotInstanceType> {
        self.r#type.as_ref()
    }
    /// <p>The start date of the request, in UTC format (for example, <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z). The request becomes active at this date and time.</p>
    pub fn valid_from(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.valid_from.as_ref()
    }
    /// <p>The end date of the request, in UTC format (<i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).</p>
    /// <ul>
    /// <li> <p>For a persistent request, the request remains active until the <code>validUntil</code> date and time is reached. Otherwise, the request remains active until you cancel it. </p> </li>
    /// <li> <p>For a one-time request, the request remains active until all instances launch, the request is canceled, or the <code>validUntil</code> date and time is reached. By default, the request is valid for 7 days from the date the request was created.</p> </li>
    /// </ul>
    pub fn valid_until(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.valid_until.as_ref()
    }
    /// <p>The behavior when a Spot Instance is interrupted.</p>
    pub fn instance_interruption_behavior(
        &self,
    ) -> std::option::Option<&crate::model::InstanceInterruptionBehavior> {
        self.instance_interruption_behavior.as_ref()
    }
}
/// See [`SpotInstanceRequest`](crate::model::SpotInstanceRequest).
pub mod spot_instance_request {

    /// A builder for [`SpotInstanceRequest`](crate::model::SpotInstanceRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) actual_block_hourly_price: std::option::Option<std::string::String>,
        pub(crate) availability_zone_group: std::option::Option<std::string::String>,
        pub(crate) block_duration_minutes: std::option::Option<i32>,
        pub(crate) create_time: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) fault: std::option::Option<crate::model::SpotInstanceStateFault>,
        pub(crate) instance_id: std::option::Option<std::string::String>,
        pub(crate) launch_group: std::option::Option<std::string::String>,
        pub(crate) launch_specification: std::option::Option<crate::model::LaunchSpecification>,
        pub(crate) launched_availability_zone: std::option::Option<std::string::String>,
        pub(crate) product_description: std::option::Option<crate::model::RiProductDescription>,
        pub(crate) spot_instance_request_id: std::option::Option<std::string::String>,
        pub(crate) spot_price: std::option::Option<std::string::String>,
        pub(crate) state: std::option::Option<crate::model::SpotInstanceState>,
        pub(crate) status: std::option::Option<crate::model::SpotInstanceStatus>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        pub(crate) r#type: std::option::Option<crate::model::SpotInstanceType>,
        pub(crate) valid_from: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) valid_until: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) instance_interruption_behavior:
            std::option::Option<crate::model::InstanceInterruptionBehavior>,
    }
    impl Builder {
        /// <p>Deprecated.</p>
        pub fn actual_block_hourly_price(mut self, input: impl Into<std::string::String>) -> Self {
            self.actual_block_hourly_price = Some(input.into());
            self
        }
        /// <p>Deprecated.</p>
        pub fn set_actual_block_hourly_price(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.actual_block_hourly_price = input;
            self
        }
        /// <p>The Availability Zone group. If you specify the same Availability Zone group for all Spot Instance requests, all Spot Instances are launched in the same Availability Zone.</p>
        pub fn availability_zone_group(mut self, input: impl Into<std::string::String>) -> Self {
            self.availability_zone_group = Some(input.into());
            self
        }
        /// <p>The Availability Zone group. If you specify the same Availability Zone group for all Spot Instance requests, all Spot Instances are launched in the same Availability Zone.</p>
        pub fn set_availability_zone_group(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.availability_zone_group = input;
            self
        }
        /// <p>Deprecated.</p>
        pub fn block_duration_minutes(mut self, input: i32) -> Self {
            self.block_duration_minutes = Some(input);
            self
        }
        /// <p>Deprecated.</p>
        pub fn set_block_duration_minutes(mut self, input: std::option::Option<i32>) -> Self {
            self.block_duration_minutes = input;
            self
        }
        /// <p>The date and time when the Spot Instance request was created, in UTC format (for example, <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).</p>
        pub fn create_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.create_time = Some(input);
            self
        }
        /// <p>The date and time when the Spot Instance request was created, in UTC format (for example, <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).</p>
        pub fn set_create_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.create_time = input;
            self
        }
        /// <p>The fault codes for the Spot Instance request, if any.</p>
        pub fn fault(mut self, input: crate::model::SpotInstanceStateFault) -> Self {
            self.fault = Some(input);
            self
        }
        /// <p>The fault codes for the Spot Instance request, if any.</p>
        pub fn set_fault(
            mut self,
            input: std::option::Option<crate::model::SpotInstanceStateFault>,
        ) -> Self {
            self.fault = input;
            self
        }
        /// <p>The instance ID, if an instance has been launched to fulfill the Spot Instance request.</p>
        pub fn instance_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.instance_id = Some(input.into());
            self
        }
        /// <p>The instance ID, if an instance has been launched to fulfill the Spot Instance request.</p>
        pub fn set_instance_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.instance_id = input;
            self
        }
        /// <p>The instance launch group. Launch groups are Spot Instances that launch together and terminate together.</p>
        pub fn launch_group(mut self, input: impl Into<std::string::String>) -> Self {
            self.launch_group = Some(input.into());
            self
        }
        /// <p>The instance launch group. Launch groups are Spot Instances that launch together and terminate together.</p>
        pub fn set_launch_group(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.launch_group = input;
            self
        }
        /// <p>Additional information for launching instances.</p>
        pub fn launch_specification(mut self, input: crate::model::LaunchSpecification) -> Self {
            self.launch_specification = Some(input);
            self
        }
        /// <p>Additional information for launching instances.</p>
        pub fn set_launch_specification(
            mut self,
            input: std::option::Option<crate::model::LaunchSpecification>,
        ) -> Self {
            self.launch_specification = input;
            self
        }
        /// <p>The Availability Zone in which the request is launched.</p>
        pub fn launched_availability_zone(mut self, input: impl Into<std::string::String>) -> Self {
            self.launched_availability_zone = Some(input.into());
            self
        }
        /// <p>The Availability Zone in which the request is launched.</p>
        pub fn set_launched_availability_zone(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.launched_availability_zone = input;
            self
        }
        /// <p>The product description associated with the Spot Instance.</p>
        pub fn product_description(mut self, input: crate::model::RiProductDescription) -> Self {
            self.product_description = Some(input);
            self
        }
        /// <p>The product description associated with the Spot Instance.</p>
        pub fn set_product_description(
            mut self,
            input: std::option::Option<crate::model::RiProductDescription>,
        ) -> Self {
            self.product_description = input;
            self
        }
        /// <p>The ID of the Spot Instance request.</p>
        pub fn spot_instance_request_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.spot_instance_request_id = Some(input.into());
            self
        }
        /// <p>The ID of the Spot Instance request.</p>
        pub fn set_spot_instance_request_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.spot_instance_request_id = input;
            self
        }
        /// <p>The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.</p> <important>
        /// <p>If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.</p>
        /// </important>
        pub fn spot_price(mut self, input: impl Into<std::string::String>) -> Self {
            self.spot_price = Some(input.into());
            self
        }
        /// <p>The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.</p> <important>
        /// <p>If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.</p>
        /// </important>
        pub fn set_spot_price(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.spot_price = input;
            self
        }
        /// <p>The state of the Spot Instance request. Spot request status information helps track your Spot Instance requests. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-request-status.html">Spot request status</a> in the <i>Amazon EC2 User Guide for Linux Instances</i>.</p>
        pub fn state(mut self, input: crate::model::SpotInstanceState) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>The state of the Spot Instance request. Spot request status information helps track your Spot Instance requests. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-request-status.html">Spot request status</a> in the <i>Amazon EC2 User Guide for Linux Instances</i>.</p>
        pub fn set_state(
            mut self,
            input: std::option::Option<crate::model::SpotInstanceState>,
        ) -> Self {
            self.state = input;
            self
        }
        /// <p>The status code and status message describing the Spot Instance request.</p>
        pub fn status(mut self, input: crate::model::SpotInstanceStatus) -> Self {
            self.status = Some(input);
            self
        }
        /// <p>The status code and status message describing the Spot Instance request.</p>
        pub fn set_status(
            mut self,
            input: std::option::Option<crate::model::SpotInstanceStatus>,
        ) -> Self {
            self.status = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>Any tags assigned to the resource.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>Any tags assigned to the resource.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// <p>The Spot Instance request type.</p>
        pub fn r#type(mut self, input: crate::model::SpotInstanceType) -> Self {
            self.r#type = Some(input);
            self
        }
        /// <p>The Spot Instance request type.</p>
        pub fn set_type(
            mut self,
            input: std::option::Option<crate::model::SpotInstanceType>,
        ) -> Self {
            self.r#type = input;
            self
        }
        /// <p>The start date of the request, in UTC format (for example, <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z). The request becomes active at this date and time.</p>
        pub fn valid_from(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.valid_from = Some(input);
            self
        }
        /// <p>The start date of the request, in UTC format (for example, <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z). The request becomes active at this date and time.</p>
        pub fn set_valid_from(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.valid_from = input;
            self
        }
        /// <p>The end date of the request, in UTC format (<i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).</p>
        /// <ul>
        /// <li> <p>For a persistent request, the request remains active until the <code>validUntil</code> date and time is reached. Otherwise, the request remains active until you cancel it. </p> </li>
        /// <li> <p>For a one-time request, the request remains active until all instances launch, the request is canceled, or the <code>validUntil</code> date and time is reached. By default, the request is valid for 7 days from the date the request was created.</p> </li>
        /// </ul>
        pub fn valid_until(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.valid_until = Some(input);
            self
        }
        /// <p>The end date of the request, in UTC format (<i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).</p>
        /// <ul>
        /// <li> <p>For a persistent request, the request remains active until the <code>validUntil</code> date and time is reached. Otherwise, the request remains active until you cancel it. </p> </li>
        /// <li> <p>For a one-time request, the request remains active until all instances launch, the request is canceled, or the <code>validUntil</code> date and time is reached. By default, the request is valid for 7 days from the date the request was created.</p> </li>
        /// </ul>
        pub fn set_valid_until(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.valid_until = input;
            self
        }
        /// <p>The behavior when a Spot Instance is interrupted.</p>
        pub fn instance_interruption_behavior(
            mut self,
            input: crate::model::InstanceInterruptionBehavior,
        ) -> Self {
            self.instance_interruption_behavior = Some(input);
            self
        }
        /// <p>The behavior when a Spot Instance is interrupted.</p>
        pub fn set_instance_interruption_behavior(
            mut self,
            input: std::option::Option<crate::model::InstanceInterruptionBehavior>,
        ) -> Self {
            self.instance_interruption_behavior = input;
            self
        }
        /// Consumes the builder and constructs a [`SpotInstanceRequest`](crate::model::SpotInstanceRequest).
        pub fn build(self) -> crate::model::SpotInstanceRequest {
            crate::model::SpotInstanceRequest {
                actual_block_hourly_price: self.actual_block_hourly_price,
                availability_zone_group: self.availability_zone_group,
                block_duration_minutes: self.block_duration_minutes,
                create_time: self.create_time,
                fault: self.fault,
                instance_id: self.instance_id,
                launch_group: self.launch_group,
                launch_specification: self.launch_specification,
                launched_availability_zone: self.launched_availability_zone,
                product_description: self.product_description,
                spot_instance_request_id: self.spot_instance_request_id,
                spot_price: self.spot_price,
                state: self.state,
                status: self.status,
                tags: self.tags,
                r#type: self.r#type,
                valid_from: self.valid_from,
                valid_until: self.valid_until,
                instance_interruption_behavior: self.instance_interruption_behavior,
            }
        }
    }
}
impl SpotInstanceRequest {
    /// Creates a new builder-style object to manufacture [`SpotInstanceRequest`](crate::model::SpotInstanceRequest).
    pub fn builder() -> crate::model::spot_instance_request::Builder {
        crate::model::spot_instance_request::Builder::default()
    }
}

/// <p>Describes the status of a Spot Instance request.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SpotInstanceStatus {
    /// <p>The status code. For a list of status codes, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-request-status.html#spot-instance-request-status-understand">Spot request status codes</a> in the <i>Amazon EC2 User Guide for Linux Instances</i>.</p>
    #[doc(hidden)]
    pub code: std::option::Option<std::string::String>,
    /// <p>The description for the status code.</p>
    #[doc(hidden)]
    pub message: std::option::Option<std::string::String>,
    /// <p>The date and time of the most recent status update, in UTC format (for example, <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).</p>
    #[doc(hidden)]
    pub update_time: std::option::Option<aws_smithy_types::DateTime>,
}
impl SpotInstanceStatus {
    /// <p>The status code. For a list of status codes, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-request-status.html#spot-instance-request-status-understand">Spot request status codes</a> in the <i>Amazon EC2 User Guide for Linux Instances</i>.</p>
    pub fn code(&self) -> std::option::Option<&str> {
        self.code.as_deref()
    }
    /// <p>The description for the status code.</p>
    pub fn message(&self) -> std::option::Option<&str> {
        self.message.as_deref()
    }
    /// <p>The date and time of the most recent status update, in UTC format (for example, <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).</p>
    pub fn update_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.update_time.as_ref()
    }
}
/// See [`SpotInstanceStatus`](crate::model::SpotInstanceStatus).
pub mod spot_instance_status {

    /// A builder for [`SpotInstanceStatus`](crate::model::SpotInstanceStatus).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) code: std::option::Option<std::string::String>,
        pub(crate) message: std::option::Option<std::string::String>,
        pub(crate) update_time: std::option::Option<aws_smithy_types::DateTime>,
    }
    impl Builder {
        /// <p>The status code. For a list of status codes, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-request-status.html#spot-instance-request-status-understand">Spot request status codes</a> in the <i>Amazon EC2 User Guide for Linux Instances</i>.</p>
        pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
            self.code = Some(input.into());
            self
        }
        /// <p>The status code. For a list of status codes, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-request-status.html#spot-instance-request-status-understand">Spot request status codes</a> in the <i>Amazon EC2 User Guide for Linux Instances</i>.</p>
        pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.code = input;
            self
        }
        /// <p>The description for the status code.</p>
        pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
            self.message = Some(input.into());
            self
        }
        /// <p>The description for the status code.</p>
        pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.message = input;
            self
        }
        /// <p>The date and time of the most recent status update, in UTC format (for example, <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).</p>
        pub fn update_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.update_time = Some(input);
            self
        }
        /// <p>The date and time of the most recent status update, in UTC format (for example, <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).</p>
        pub fn set_update_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.update_time = input;
            self
        }
        /// Consumes the builder and constructs a [`SpotInstanceStatus`](crate::model::SpotInstanceStatus).
        pub fn build(self) -> crate::model::SpotInstanceStatus {
            crate::model::SpotInstanceStatus {
                code: self.code,
                message: self.message,
                update_time: self.update_time,
            }
        }
    }
}
impl SpotInstanceStatus {
    /// Creates a new builder-style object to manufacture [`SpotInstanceStatus`](crate::model::SpotInstanceStatus).
    pub fn builder() -> crate::model::spot_instance_status::Builder {
        crate::model::spot_instance_status::Builder::default()
    }
}

/// When writing a match expression against `SpotInstanceState`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let spotinstancestate = unimplemented!();
/// match spotinstancestate {
///     SpotInstanceState::Active => { /* ... */ },
///     SpotInstanceState::Cancelled => { /* ... */ },
///     SpotInstanceState::Closed => { /* ... */ },
///     SpotInstanceState::Failed => { /* ... */ },
///     SpotInstanceState::Open => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `spotinstancestate` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `SpotInstanceState::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `SpotInstanceState::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `SpotInstanceState::NewFeature` is defined.
/// Specifically, when `spotinstancestate` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `SpotInstanceState::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 SpotInstanceState {
    #[allow(missing_docs)] // documentation missing in model
    Active,
    #[allow(missing_docs)] // documentation missing in model
    Cancelled,
    #[allow(missing_docs)] // documentation missing in model
    Closed,
    #[allow(missing_docs)] // documentation missing in model
    Failed,
    #[allow(missing_docs)] // documentation missing in model
    Open,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for SpotInstanceState {
    fn from(s: &str) -> Self {
        match s {
            "active" => SpotInstanceState::Active,
            "cancelled" => SpotInstanceState::Cancelled,
            "closed" => SpotInstanceState::Closed,
            "failed" => SpotInstanceState::Failed,
            "open" => SpotInstanceState::Open,
            other => {
                SpotInstanceState::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for SpotInstanceState {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(SpotInstanceState::from(s))
    }
}
impl SpotInstanceState {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            SpotInstanceState::Active => "active",
            SpotInstanceState::Cancelled => "cancelled",
            SpotInstanceState::Closed => "closed",
            SpotInstanceState::Failed => "failed",
            SpotInstanceState::Open => "open",
            SpotInstanceState::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["active", "cancelled", "closed", "failed", "open"]
    }
}
impl AsRef<str> for SpotInstanceState {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

#[allow(missing_docs)] // documentation missing in model
#[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 struct RiProductDescription(String);
impl RiProductDescription {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        &self.0
    }
    /// Returns all the `&str` representations of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &[
            "Linux/UNIX",
            "Linux/UNIX (Amazon VPC)",
            "Windows",
            "Windows (Amazon VPC)",
        ]
    }
}
impl<T> std::convert::From<T> for RiProductDescription
where
    T: std::convert::AsRef<str>,
{
    fn from(s: T) -> Self {
        RiProductDescription(s.as_ref().to_owned())
    }
}

/// <p>Describes the launch specification for an instance.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LaunchSpecification {
    /// <p>The Base64-encoded user data for the instance.</p>
    #[doc(hidden)]
    pub user_data: std::option::Option<std::string::String>,
    /// <p>One or more security groups. When requesting instances in a VPC, you must specify the IDs of the security groups. When requesting instances in EC2-Classic, you can specify the names or the IDs of the security groups.</p>
    #[doc(hidden)]
    pub security_groups: std::option::Option<std::vec::Vec<crate::model::GroupIdentifier>>,
    /// <p>Deprecated.</p>
    #[doc(hidden)]
    pub addressing_type: std::option::Option<std::string::String>,
    /// <p>One or more block device mapping entries.</p>
    #[doc(hidden)]
    pub block_device_mappings: std::option::Option<std::vec::Vec<crate::model::BlockDeviceMapping>>,
    /// <p>Indicates whether the instance is optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.</p>
    /// <p>Default: <code>false</code> </p>
    #[doc(hidden)]
    pub ebs_optimized: std::option::Option<bool>,
    /// <p>The IAM instance profile.</p>
    #[doc(hidden)]
    pub iam_instance_profile: std::option::Option<crate::model::IamInstanceProfileSpecification>,
    /// <p>The ID of the AMI.</p>
    #[doc(hidden)]
    pub image_id: std::option::Option<std::string::String>,
    /// <p>The instance type. Only one instance type can be specified.</p>
    #[doc(hidden)]
    pub instance_type: std::option::Option<crate::model::InstanceType>,
    /// <p>The ID of the kernel.</p>
    #[doc(hidden)]
    pub kernel_id: std::option::Option<std::string::String>,
    /// <p>The name of the key pair.</p>
    #[doc(hidden)]
    pub key_name: std::option::Option<std::string::String>,
    /// <p>One or more network interfaces. If you specify a network interface, you must specify subnet IDs and security group IDs using the network interface.</p>
    #[doc(hidden)]
    pub network_interfaces:
        std::option::Option<std::vec::Vec<crate::model::InstanceNetworkInterfaceSpecification>>,
    /// <p>The placement information for the instance.</p>
    #[doc(hidden)]
    pub placement: std::option::Option<crate::model::SpotPlacement>,
    /// <p>The ID of the RAM disk.</p>
    #[doc(hidden)]
    pub ramdisk_id: std::option::Option<std::string::String>,
    /// <p>The ID of the subnet in which to launch the instance.</p>
    #[doc(hidden)]
    pub subnet_id: std::option::Option<std::string::String>,
    /// <p>Describes the monitoring of an instance.</p>
    #[doc(hidden)]
    pub monitoring: std::option::Option<crate::model::RunInstancesMonitoringEnabled>,
}
impl LaunchSpecification {
    /// <p>The Base64-encoded user data for the instance.</p>
    pub fn user_data(&self) -> std::option::Option<&str> {
        self.user_data.as_deref()
    }
    /// <p>One or more security groups. When requesting instances in a VPC, you must specify the IDs of the security groups. When requesting instances in EC2-Classic, you can specify the names or the IDs of the security groups.</p>
    pub fn security_groups(&self) -> std::option::Option<&[crate::model::GroupIdentifier]> {
        self.security_groups.as_deref()
    }
    /// <p>Deprecated.</p>
    pub fn addressing_type(&self) -> std::option::Option<&str> {
        self.addressing_type.as_deref()
    }
    /// <p>One or more block device mapping entries.</p>
    pub fn block_device_mappings(
        &self,
    ) -> std::option::Option<&[crate::model::BlockDeviceMapping]> {
        self.block_device_mappings.as_deref()
    }
    /// <p>Indicates whether the instance is optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.</p>
    /// <p>Default: <code>false</code> </p>
    pub fn ebs_optimized(&self) -> std::option::Option<bool> {
        self.ebs_optimized
    }
    /// <p>The IAM instance profile.</p>
    pub fn iam_instance_profile(
        &self,
    ) -> std::option::Option<&crate::model::IamInstanceProfileSpecification> {
        self.iam_instance_profile.as_ref()
    }
    /// <p>The ID of the AMI.</p>
    pub fn image_id(&self) -> std::option::Option<&str> {
        self.image_id.as_deref()
    }
    /// <p>The instance type. Only one instance type can be specified.</p>
    pub fn instance_type(&self) -> std::option::Option<&crate::model::InstanceType> {
        self.instance_type.as_ref()
    }
    /// <p>The ID of the kernel.</p>
    pub fn kernel_id(&self) -> std::option::Option<&str> {
        self.kernel_id.as_deref()
    }
    /// <p>The name of the key pair.</p>
    pub fn key_name(&self) -> std::option::Option<&str> {
        self.key_name.as_deref()
    }
    /// <p>One or more network interfaces. If you specify a network interface, you must specify subnet IDs and security group IDs using the network interface.</p>
    pub fn network_interfaces(
        &self,
    ) -> std::option::Option<&[crate::model::InstanceNetworkInterfaceSpecification]> {
        self.network_interfaces.as_deref()
    }
    /// <p>The placement information for the instance.</p>
    pub fn placement(&self) -> std::option::Option<&crate::model::SpotPlacement> {
        self.placement.as_ref()
    }
    /// <p>The ID of the RAM disk.</p>
    pub fn ramdisk_id(&self) -> std::option::Option<&str> {
        self.ramdisk_id.as_deref()
    }
    /// <p>The ID of the subnet in which to launch the instance.</p>
    pub fn subnet_id(&self) -> std::option::Option<&str> {
        self.subnet_id.as_deref()
    }
    /// <p>Describes the monitoring of an instance.</p>
    pub fn monitoring(&self) -> std::option::Option<&crate::model::RunInstancesMonitoringEnabled> {
        self.monitoring.as_ref()
    }
}
/// See [`LaunchSpecification`](crate::model::LaunchSpecification).
pub mod launch_specification {

    /// A builder for [`LaunchSpecification`](crate::model::LaunchSpecification).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) user_data: std::option::Option<std::string::String>,
        pub(crate) security_groups:
            std::option::Option<std::vec::Vec<crate::model::GroupIdentifier>>,
        pub(crate) addressing_type: std::option::Option<std::string::String>,
        pub(crate) block_device_mappings:
            std::option::Option<std::vec::Vec<crate::model::BlockDeviceMapping>>,
        pub(crate) ebs_optimized: std::option::Option<bool>,
        pub(crate) iam_instance_profile:
            std::option::Option<crate::model::IamInstanceProfileSpecification>,
        pub(crate) image_id: std::option::Option<std::string::String>,
        pub(crate) instance_type: std::option::Option<crate::model::InstanceType>,
        pub(crate) kernel_id: std::option::Option<std::string::String>,
        pub(crate) key_name: std::option::Option<std::string::String>,
        pub(crate) network_interfaces:
            std::option::Option<std::vec::Vec<crate::model::InstanceNetworkInterfaceSpecification>>,
        pub(crate) placement: std::option::Option<crate::model::SpotPlacement>,
        pub(crate) ramdisk_id: std::option::Option<std::string::String>,
        pub(crate) subnet_id: std::option::Option<std::string::String>,
        pub(crate) monitoring: std::option::Option<crate::model::RunInstancesMonitoringEnabled>,
    }
    impl Builder {
        /// <p>The Base64-encoded user data for the instance.</p>
        pub fn user_data(mut self, input: impl Into<std::string::String>) -> Self {
            self.user_data = Some(input.into());
            self
        }
        /// <p>The Base64-encoded user data for the instance.</p>
        pub fn set_user_data(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.user_data = input;
            self
        }
        /// Appends an item to `security_groups`.
        ///
        /// To override the contents of this collection use [`set_security_groups`](Self::set_security_groups).
        ///
        /// <p>One or more security groups. When requesting instances in a VPC, you must specify the IDs of the security groups. When requesting instances in EC2-Classic, you can specify the names or the IDs of the security groups.</p>
        pub fn security_groups(mut self, input: crate::model::GroupIdentifier) -> Self {
            let mut v = self.security_groups.unwrap_or_default();
            v.push(input);
            self.security_groups = Some(v);
            self
        }
        /// <p>One or more security groups. When requesting instances in a VPC, you must specify the IDs of the security groups. When requesting instances in EC2-Classic, you can specify the names or the IDs of the security groups.</p>
        pub fn set_security_groups(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::GroupIdentifier>>,
        ) -> Self {
            self.security_groups = input;
            self
        }
        /// <p>Deprecated.</p>
        pub fn addressing_type(mut self, input: impl Into<std::string::String>) -> Self {
            self.addressing_type = Some(input.into());
            self
        }
        /// <p>Deprecated.</p>
        pub fn set_addressing_type(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.addressing_type = input;
            self
        }
        /// Appends an item to `block_device_mappings`.
        ///
        /// To override the contents of this collection use [`set_block_device_mappings`](Self::set_block_device_mappings).
        ///
        /// <p>One or more block device mapping entries.</p>
        pub fn block_device_mappings(mut self, input: crate::model::BlockDeviceMapping) -> Self {
            let mut v = self.block_device_mappings.unwrap_or_default();
            v.push(input);
            self.block_device_mappings = Some(v);
            self
        }
        /// <p>One or more block device mapping entries.</p>
        pub fn set_block_device_mappings(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::BlockDeviceMapping>>,
        ) -> Self {
            self.block_device_mappings = input;
            self
        }
        /// <p>Indicates whether the instance is optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.</p>
        /// <p>Default: <code>false</code> </p>
        pub fn ebs_optimized(mut self, input: bool) -> Self {
            self.ebs_optimized = Some(input);
            self
        }
        /// <p>Indicates whether the instance is optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.</p>
        /// <p>Default: <code>false</code> </p>
        pub fn set_ebs_optimized(mut self, input: std::option::Option<bool>) -> Self {
            self.ebs_optimized = input;
            self
        }
        /// <p>The IAM instance profile.</p>
        pub fn iam_instance_profile(
            mut self,
            input: crate::model::IamInstanceProfileSpecification,
        ) -> Self {
            self.iam_instance_profile = Some(input);
            self
        }
        /// <p>The IAM instance profile.</p>
        pub fn set_iam_instance_profile(
            mut self,
            input: std::option::Option<crate::model::IamInstanceProfileSpecification>,
        ) -> Self {
            self.iam_instance_profile = input;
            self
        }
        /// <p>The ID of the AMI.</p>
        pub fn image_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.image_id = Some(input.into());
            self
        }
        /// <p>The ID of the AMI.</p>
        pub fn set_image_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.image_id = input;
            self
        }
        /// <p>The instance type. Only one instance type can be specified.</p>
        pub fn instance_type(mut self, input: crate::model::InstanceType) -> Self {
            self.instance_type = Some(input);
            self
        }
        /// <p>The instance type. Only one instance type can be specified.</p>
        pub fn set_instance_type(
            mut self,
            input: std::option::Option<crate::model::InstanceType>,
        ) -> Self {
            self.instance_type = input;
            self
        }
        /// <p>The ID of the kernel.</p>
        pub fn kernel_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.kernel_id = Some(input.into());
            self
        }
        /// <p>The ID of the kernel.</p>
        pub fn set_kernel_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.kernel_id = input;
            self
        }
        /// <p>The name of the key pair.</p>
        pub fn key_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.key_name = Some(input.into());
            self
        }
        /// <p>The name of the key pair.</p>
        pub fn set_key_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.key_name = input;
            self
        }
        /// Appends an item to `network_interfaces`.
        ///
        /// To override the contents of this collection use [`set_network_interfaces`](Self::set_network_interfaces).
        ///
        /// <p>One or more network interfaces. If you specify a network interface, you must specify subnet IDs and security group IDs using the network interface.</p>
        pub fn network_interfaces(
            mut self,
            input: crate::model::InstanceNetworkInterfaceSpecification,
        ) -> Self {
            let mut v = self.network_interfaces.unwrap_or_default();
            v.push(input);
            self.network_interfaces = Some(v);
            self
        }
        /// <p>One or more network interfaces. If you specify a network interface, you must specify subnet IDs and security group IDs using the network interface.</p>
        pub fn set_network_interfaces(
            mut self,
            input: std::option::Option<
                std::vec::Vec<crate::model::InstanceNetworkInterfaceSpecification>,
            >,
        ) -> Self {
            self.network_interfaces = input;
            self
        }
        /// <p>The placement information for the instance.</p>
        pub fn placement(mut self, input: crate::model::SpotPlacement) -> Self {
            self.placement = Some(input);
            self
        }
        /// <p>The placement information for the instance.</p>
        pub fn set_placement(
            mut self,
            input: std::option::Option<crate::model::SpotPlacement>,
        ) -> Self {
            self.placement = input;
            self
        }
        /// <p>The ID of the RAM disk.</p>
        pub fn ramdisk_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.ramdisk_id = Some(input.into());
            self
        }
        /// <p>The ID of the RAM disk.</p>
        pub fn set_ramdisk_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.ramdisk_id = input;
            self
        }
        /// <p>The ID of the subnet in which to launch the instance.</p>
        pub fn subnet_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.subnet_id = Some(input.into());
            self
        }
        /// <p>The ID of the subnet in which to launch the instance.</p>
        pub fn set_subnet_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.subnet_id = input;
            self
        }
        /// <p>Describes the monitoring of an instance.</p>
        pub fn monitoring(mut self, input: crate::model::RunInstancesMonitoringEnabled) -> Self {
            self.monitoring = Some(input);
            self
        }
        /// <p>Describes the monitoring of an instance.</p>
        pub fn set_monitoring(
            mut self,
            input: std::option::Option<crate::model::RunInstancesMonitoringEnabled>,
        ) -> Self {
            self.monitoring = input;
            self
        }
        /// Consumes the builder and constructs a [`LaunchSpecification`](crate::model::LaunchSpecification).
        pub fn build(self) -> crate::model::LaunchSpecification {
            crate::model::LaunchSpecification {
                user_data: self.user_data,
                security_groups: self.security_groups,
                addressing_type: self.addressing_type,
                block_device_mappings: self.block_device_mappings,
                ebs_optimized: self.ebs_optimized,
                iam_instance_profile: self.iam_instance_profile,
                image_id: self.image_id,
                instance_type: self.instance_type,
                kernel_id: self.kernel_id,
                key_name: self.key_name,
                network_interfaces: self.network_interfaces,
                placement: self.placement,
                ramdisk_id: self.ramdisk_id,
                subnet_id: self.subnet_id,
                monitoring: self.monitoring,
            }
        }
    }
}
impl LaunchSpecification {
    /// Creates a new builder-style object to manufacture [`LaunchSpecification`](crate::model::LaunchSpecification).
    pub fn builder() -> crate::model::launch_specification::Builder {
        crate::model::launch_specification::Builder::default()
    }
}

/// <p>Describes Spot Instance placement.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SpotPlacement {
    /// <p>The Availability Zone.</p>
    /// <p>[Spot Fleet only] To specify multiple Availability Zones, separate them using commas; for example, "us-west-2a, us-west-2b".</p>
    #[doc(hidden)]
    pub availability_zone: std::option::Option<std::string::String>,
    /// <p>The name of the placement group.</p>
    #[doc(hidden)]
    pub group_name: std::option::Option<std::string::String>,
    /// <p>The tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of <code>dedicated</code> runs on single-tenant hardware. The <code>host</code> tenancy is not supported for Spot Instances.</p>
    #[doc(hidden)]
    pub tenancy: std::option::Option<crate::model::Tenancy>,
}
impl SpotPlacement {
    /// <p>The Availability Zone.</p>
    /// <p>[Spot Fleet only] To specify multiple Availability Zones, separate them using commas; for example, "us-west-2a, us-west-2b".</p>
    pub fn availability_zone(&self) -> std::option::Option<&str> {
        self.availability_zone.as_deref()
    }
    /// <p>The name of the placement group.</p>
    pub fn group_name(&self) -> std::option::Option<&str> {
        self.group_name.as_deref()
    }
    /// <p>The tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of <code>dedicated</code> runs on single-tenant hardware. The <code>host</code> tenancy is not supported for Spot Instances.</p>
    pub fn tenancy(&self) -> std::option::Option<&crate::model::Tenancy> {
        self.tenancy.as_ref()
    }
}
/// See [`SpotPlacement`](crate::model::SpotPlacement).
pub mod spot_placement {

    /// A builder for [`SpotPlacement`](crate::model::SpotPlacement).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) availability_zone: std::option::Option<std::string::String>,
        pub(crate) group_name: std::option::Option<std::string::String>,
        pub(crate) tenancy: std::option::Option<crate::model::Tenancy>,
    }
    impl Builder {
        /// <p>The Availability Zone.</p>
        /// <p>[Spot Fleet only] To specify multiple Availability Zones, separate them using commas; for example, "us-west-2a, us-west-2b".</p>
        pub fn availability_zone(mut self, input: impl Into<std::string::String>) -> Self {
            self.availability_zone = Some(input.into());
            self
        }
        /// <p>The Availability Zone.</p>
        /// <p>[Spot Fleet only] To specify multiple Availability Zones, separate them using commas; for example, "us-west-2a, us-west-2b".</p>
        pub fn set_availability_zone(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.availability_zone = input;
            self
        }
        /// <p>The name of the placement group.</p>
        pub fn group_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.group_name = Some(input.into());
            self
        }
        /// <p>The name of the placement group.</p>
        pub fn set_group_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.group_name = input;
            self
        }
        /// <p>The tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of <code>dedicated</code> runs on single-tenant hardware. The <code>host</code> tenancy is not supported for Spot Instances.</p>
        pub fn tenancy(mut self, input: crate::model::Tenancy) -> Self {
            self.tenancy = Some(input);
            self
        }
        /// <p>The tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of <code>dedicated</code> runs on single-tenant hardware. The <code>host</code> tenancy is not supported for Spot Instances.</p>
        pub fn set_tenancy(mut self, input: std::option::Option<crate::model::Tenancy>) -> Self {
            self.tenancy = input;
            self
        }
        /// Consumes the builder and constructs a [`SpotPlacement`](crate::model::SpotPlacement).
        pub fn build(self) -> crate::model::SpotPlacement {
            crate::model::SpotPlacement {
                availability_zone: self.availability_zone,
                group_name: self.group_name,
                tenancy: self.tenancy,
            }
        }
    }
}
impl SpotPlacement {
    /// Creates a new builder-style object to manufacture [`SpotPlacement`](crate::model::SpotPlacement).
    pub fn builder() -> crate::model::spot_placement::Builder {
        crate::model::spot_placement::Builder::default()
    }
}

/// <p>Describes a Spot Instance state change.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SpotInstanceStateFault {
    /// <p>The reason code for the Spot Instance state change.</p>
    #[doc(hidden)]
    pub code: std::option::Option<std::string::String>,
    /// <p>The message for the Spot Instance state change.</p>
    #[doc(hidden)]
    pub message: std::option::Option<std::string::String>,
}
impl SpotInstanceStateFault {
    /// <p>The reason code for the Spot Instance state change.</p>
    pub fn code(&self) -> std::option::Option<&str> {
        self.code.as_deref()
    }
    /// <p>The message for the Spot Instance state change.</p>
    pub fn message(&self) -> std::option::Option<&str> {
        self.message.as_deref()
    }
}
/// See [`SpotInstanceStateFault`](crate::model::SpotInstanceStateFault).
pub mod spot_instance_state_fault {

    /// A builder for [`SpotInstanceStateFault`](crate::model::SpotInstanceStateFault).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) code: std::option::Option<std::string::String>,
        pub(crate) message: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The reason code for the Spot Instance state change.</p>
        pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
            self.code = Some(input.into());
            self
        }
        /// <p>The reason code for the Spot Instance state change.</p>
        pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.code = input;
            self
        }
        /// <p>The message for the Spot Instance state change.</p>
        pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
            self.message = Some(input.into());
            self
        }
        /// <p>The message for the Spot Instance state change.</p>
        pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.message = input;
            self
        }
        /// Consumes the builder and constructs a [`SpotInstanceStateFault`](crate::model::SpotInstanceStateFault).
        pub fn build(self) -> crate::model::SpotInstanceStateFault {
            crate::model::SpotInstanceStateFault {
                code: self.code,
                message: self.message,
            }
        }
    }
}
impl SpotInstanceStateFault {
    /// Creates a new builder-style object to manufacture [`SpotInstanceStateFault`](crate::model::SpotInstanceStateFault).
    pub fn builder() -> crate::model::spot_instance_state_fault::Builder {
        crate::model::spot_instance_state_fault::Builder::default()
    }
}

/// <p>Describes the launch specification for an instance.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct RequestSpotLaunchSpecification {
    /// <p>One or more security group IDs.</p>
    #[doc(hidden)]
    pub security_group_ids: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>One or more security groups. When requesting instances in a VPC, you must specify the IDs of the security groups. When requesting instances in EC2-Classic, you can specify the names or the IDs of the security groups.</p>
    #[doc(hidden)]
    pub security_groups: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>Deprecated.</p>
    #[doc(hidden)]
    pub addressing_type: std::option::Option<std::string::String>,
    /// <p>One or more block device mapping entries. You can't specify both a snapshot ID and an encryption value. This is because only blank volumes can be encrypted on creation. If a snapshot is the basis for a volume, it is not blank and its encryption status is used for the volume encryption status.</p>
    #[doc(hidden)]
    pub block_device_mappings: std::option::Option<std::vec::Vec<crate::model::BlockDeviceMapping>>,
    /// <p>Indicates whether the instance is optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.</p>
    /// <p>Default: <code>false</code> </p>
    #[doc(hidden)]
    pub ebs_optimized: std::option::Option<bool>,
    /// <p>The IAM instance profile.</p>
    #[doc(hidden)]
    pub iam_instance_profile: std::option::Option<crate::model::IamInstanceProfileSpecification>,
    /// <p>The ID of the AMI.</p>
    #[doc(hidden)]
    pub image_id: std::option::Option<std::string::String>,
    /// <p>The instance type. Only one instance type can be specified.</p>
    #[doc(hidden)]
    pub instance_type: std::option::Option<crate::model::InstanceType>,
    /// <p>The ID of the kernel.</p>
    #[doc(hidden)]
    pub kernel_id: std::option::Option<std::string::String>,
    /// <p>The name of the key pair.</p>
    #[doc(hidden)]
    pub key_name: std::option::Option<std::string::String>,
    /// <p>Indicates whether basic or detailed monitoring is enabled for the instance.</p>
    /// <p>Default: Disabled</p>
    #[doc(hidden)]
    pub monitoring: std::option::Option<crate::model::RunInstancesMonitoringEnabled>,
    /// <p>One or more network interfaces. If you specify a network interface, you must specify subnet IDs and security group IDs using the network interface.</p>
    #[doc(hidden)]
    pub network_interfaces:
        std::option::Option<std::vec::Vec<crate::model::InstanceNetworkInterfaceSpecification>>,
    /// <p>The placement information for the instance.</p>
    #[doc(hidden)]
    pub placement: std::option::Option<crate::model::SpotPlacement>,
    /// <p>The ID of the RAM disk.</p>
    #[doc(hidden)]
    pub ramdisk_id: std::option::Option<std::string::String>,
    /// <p>The ID of the subnet in which to launch the instance.</p>
    #[doc(hidden)]
    pub subnet_id: std::option::Option<std::string::String>,
    /// <p>The Base64-encoded user data for the instance. User data is limited to 16 KB.</p>
    #[doc(hidden)]
    pub user_data: std::option::Option<std::string::String>,
}
impl RequestSpotLaunchSpecification {
    /// <p>One or more security group IDs.</p>
    pub fn security_group_ids(&self) -> std::option::Option<&[std::string::String]> {
        self.security_group_ids.as_deref()
    }
    /// <p>One or more security groups. When requesting instances in a VPC, you must specify the IDs of the security groups. When requesting instances in EC2-Classic, you can specify the names or the IDs of the security groups.</p>
    pub fn security_groups(&self) -> std::option::Option<&[std::string::String]> {
        self.security_groups.as_deref()
    }
    /// <p>Deprecated.</p>
    pub fn addressing_type(&self) -> std::option::Option<&str> {
        self.addressing_type.as_deref()
    }
    /// <p>One or more block device mapping entries. You can't specify both a snapshot ID and an encryption value. This is because only blank volumes can be encrypted on creation. If a snapshot is the basis for a volume, it is not blank and its encryption status is used for the volume encryption status.</p>
    pub fn block_device_mappings(
        &self,
    ) -> std::option::Option<&[crate::model::BlockDeviceMapping]> {
        self.block_device_mappings.as_deref()
    }
    /// <p>Indicates whether the instance is optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.</p>
    /// <p>Default: <code>false</code> </p>
    pub fn ebs_optimized(&self) -> std::option::Option<bool> {
        self.ebs_optimized
    }
    /// <p>The IAM instance profile.</p>
    pub fn iam_instance_profile(
        &self,
    ) -> std::option::Option<&crate::model::IamInstanceProfileSpecification> {
        self.iam_instance_profile.as_ref()
    }
    /// <p>The ID of the AMI.</p>
    pub fn image_id(&self) -> std::option::Option<&str> {
        self.image_id.as_deref()
    }
    /// <p>The instance type. Only one instance type can be specified.</p>
    pub fn instance_type(&self) -> std::option::Option<&crate::model::InstanceType> {
        self.instance_type.as_ref()
    }
    /// <p>The ID of the kernel.</p>
    pub fn kernel_id(&self) -> std::option::Option<&str> {
        self.kernel_id.as_deref()
    }
    /// <p>The name of the key pair.</p>
    pub fn key_name(&self) -> std::option::Option<&str> {
        self.key_name.as_deref()
    }
    /// <p>Indicates whether basic or detailed monitoring is enabled for the instance.</p>
    /// <p>Default: Disabled</p>
    pub fn monitoring(&self) -> std::option::Option<&crate::model::RunInstancesMonitoringEnabled> {
        self.monitoring.as_ref()
    }
    /// <p>One or more network interfaces. If you specify a network interface, you must specify subnet IDs and security group IDs using the network interface.</p>
    pub fn network_interfaces(
        &self,
    ) -> std::option::Option<&[crate::model::InstanceNetworkInterfaceSpecification]> {
        self.network_interfaces.as_deref()
    }
    /// <p>The placement information for the instance.</p>
    pub fn placement(&self) -> std::option::Option<&crate::model::SpotPlacement> {
        self.placement.as_ref()
    }
    /// <p>The ID of the RAM disk.</p>
    pub fn ramdisk_id(&self) -> std::option::Option<&str> {
        self.ramdisk_id.as_deref()
    }
    /// <p>The ID of the subnet in which to launch the instance.</p>
    pub fn subnet_id(&self) -> std::option::Option<&str> {
        self.subnet_id.as_deref()
    }
    /// <p>The Base64-encoded user data for the instance. User data is limited to 16 KB.</p>
    pub fn user_data(&self) -> std::option::Option<&str> {
        self.user_data.as_deref()
    }
}
/// See [`RequestSpotLaunchSpecification`](crate::model::RequestSpotLaunchSpecification).
pub mod request_spot_launch_specification {

    /// A builder for [`RequestSpotLaunchSpecification`](crate::model::RequestSpotLaunchSpecification).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) security_group_ids: std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) security_groups: std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) addressing_type: std::option::Option<std::string::String>,
        pub(crate) block_device_mappings:
            std::option::Option<std::vec::Vec<crate::model::BlockDeviceMapping>>,
        pub(crate) ebs_optimized: std::option::Option<bool>,
        pub(crate) iam_instance_profile:
            std::option::Option<crate::model::IamInstanceProfileSpecification>,
        pub(crate) image_id: std::option::Option<std::string::String>,
        pub(crate) instance_type: std::option::Option<crate::model::InstanceType>,
        pub(crate) kernel_id: std::option::Option<std::string::String>,
        pub(crate) key_name: std::option::Option<std::string::String>,
        pub(crate) monitoring: std::option::Option<crate::model::RunInstancesMonitoringEnabled>,
        pub(crate) network_interfaces:
            std::option::Option<std::vec::Vec<crate::model::InstanceNetworkInterfaceSpecification>>,
        pub(crate) placement: std::option::Option<crate::model::SpotPlacement>,
        pub(crate) ramdisk_id: std::option::Option<std::string::String>,
        pub(crate) subnet_id: std::option::Option<std::string::String>,
        pub(crate) user_data: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// Appends an item to `security_group_ids`.
        ///
        /// To override the contents of this collection use [`set_security_group_ids`](Self::set_security_group_ids).
        ///
        /// <p>One or more security group IDs.</p>
        pub fn security_group_ids(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.security_group_ids.unwrap_or_default();
            v.push(input.into());
            self.security_group_ids = Some(v);
            self
        }
        /// <p>One or more security group IDs.</p>
        pub fn set_security_group_ids(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.security_group_ids = input;
            self
        }
        /// Appends an item to `security_groups`.
        ///
        /// To override the contents of this collection use [`set_security_groups`](Self::set_security_groups).
        ///
        /// <p>One or more security groups. When requesting instances in a VPC, you must specify the IDs of the security groups. When requesting instances in EC2-Classic, you can specify the names or the IDs of the security groups.</p>
        pub fn security_groups(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.security_groups.unwrap_or_default();
            v.push(input.into());
            self.security_groups = Some(v);
            self
        }
        /// <p>One or more security groups. When requesting instances in a VPC, you must specify the IDs of the security groups. When requesting instances in EC2-Classic, you can specify the names or the IDs of the security groups.</p>
        pub fn set_security_groups(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.security_groups = input;
            self
        }
        /// <p>Deprecated.</p>
        pub fn addressing_type(mut self, input: impl Into<std::string::String>) -> Self {
            self.addressing_type = Some(input.into());
            self
        }
        /// <p>Deprecated.</p>
        pub fn set_addressing_type(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.addressing_type = input;
            self
        }
        /// Appends an item to `block_device_mappings`.
        ///
        /// To override the contents of this collection use [`set_block_device_mappings`](Self::set_block_device_mappings).
        ///
        /// <p>One or more block device mapping entries. You can't specify both a snapshot ID and an encryption value. This is because only blank volumes can be encrypted on creation. If a snapshot is the basis for a volume, it is not blank and its encryption status is used for the volume encryption status.</p>
        pub fn block_device_mappings(mut self, input: crate::model::BlockDeviceMapping) -> Self {
            let mut v = self.block_device_mappings.unwrap_or_default();
            v.push(input);
            self.block_device_mappings = Some(v);
            self
        }
        /// <p>One or more block device mapping entries. You can't specify both a snapshot ID and an encryption value. This is because only blank volumes can be encrypted on creation. If a snapshot is the basis for a volume, it is not blank and its encryption status is used for the volume encryption status.</p>
        pub fn set_block_device_mappings(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::BlockDeviceMapping>>,
        ) -> Self {
            self.block_device_mappings = input;
            self
        }
        /// <p>Indicates whether the instance is optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.</p>
        /// <p>Default: <code>false</code> </p>
        pub fn ebs_optimized(mut self, input: bool) -> Self {
            self.ebs_optimized = Some(input);
            self
        }
        /// <p>Indicates whether the instance is optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.</p>
        /// <p>Default: <code>false</code> </p>
        pub fn set_ebs_optimized(mut self, input: std::option::Option<bool>) -> Self {
            self.ebs_optimized = input;
            self
        }
        /// <p>The IAM instance profile.</p>
        pub fn iam_instance_profile(
            mut self,
            input: crate::model::IamInstanceProfileSpecification,
        ) -> Self {
            self.iam_instance_profile = Some(input);
            self
        }
        /// <p>The IAM instance profile.</p>
        pub fn set_iam_instance_profile(
            mut self,
            input: std::option::Option<crate::model::IamInstanceProfileSpecification>,
        ) -> Self {
            self.iam_instance_profile = input;
            self
        }
        /// <p>The ID of the AMI.</p>
        pub fn image_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.image_id = Some(input.into());
            self
        }
        /// <p>The ID of the AMI.</p>
        pub fn set_image_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.image_id = input;
            self
        }
        /// <p>The instance type. Only one instance type can be specified.</p>
        pub fn instance_type(mut self, input: crate::model::InstanceType) -> Self {
            self.instance_type = Some(input);
            self
        }
        /// <p>The instance type. Only one instance type can be specified.</p>
        pub fn set_instance_type(
            mut self,
            input: std::option::Option<crate::model::InstanceType>,
        ) -> Self {
            self.instance_type = input;
            self
        }
        /// <p>The ID of the kernel.</p>
        pub fn kernel_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.kernel_id = Some(input.into());
            self
        }
        /// <p>The ID of the kernel.</p>
        pub fn set_kernel_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.kernel_id = input;
            self
        }
        /// <p>The name of the key pair.</p>
        pub fn key_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.key_name = Some(input.into());
            self
        }
        /// <p>The name of the key pair.</p>
        pub fn set_key_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.key_name = input;
            self
        }
        /// <p>Indicates whether basic or detailed monitoring is enabled for the instance.</p>
        /// <p>Default: Disabled</p>
        pub fn monitoring(mut self, input: crate::model::RunInstancesMonitoringEnabled) -> Self {
            self.monitoring = Some(input);
            self
        }
        /// <p>Indicates whether basic or detailed monitoring is enabled for the instance.</p>
        /// <p>Default: Disabled</p>
        pub fn set_monitoring(
            mut self,
            input: std::option::Option<crate::model::RunInstancesMonitoringEnabled>,
        ) -> Self {
            self.monitoring = input;
            self
        }
        /// Appends an item to `network_interfaces`.
        ///
        /// To override the contents of this collection use [`set_network_interfaces`](Self::set_network_interfaces).
        ///
        /// <p>One or more network interfaces. If you specify a network interface, you must specify subnet IDs and security group IDs using the network interface.</p>
        pub fn network_interfaces(
            mut self,
            input: crate::model::InstanceNetworkInterfaceSpecification,
        ) -> Self {
            let mut v = self.network_interfaces.unwrap_or_default();
            v.push(input);
            self.network_interfaces = Some(v);
            self
        }
        /// <p>One or more network interfaces. If you specify a network interface, you must specify subnet IDs and security group IDs using the network interface.</p>
        pub fn set_network_interfaces(
            mut self,
            input: std::option::Option<
                std::vec::Vec<crate::model::InstanceNetworkInterfaceSpecification>,
            >,
        ) -> Self {
            self.network_interfaces = input;
            self
        }
        /// <p>The placement information for the instance.</p>
        pub fn placement(mut self, input: crate::model::SpotPlacement) -> Self {
            self.placement = Some(input);
            self
        }
        /// <p>The placement information for the instance.</p>
        pub fn set_placement(
            mut self,
            input: std::option::Option<crate::model::SpotPlacement>,
        ) -> Self {
            self.placement = input;
            self
        }
        /// <p>The ID of the RAM disk.</p>
        pub fn ramdisk_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.ramdisk_id = Some(input.into());
            self
        }
        /// <p>The ID of the RAM disk.</p>
        pub fn set_ramdisk_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.ramdisk_id = input;
            self
        }
        /// <p>The ID of the subnet in which to launch the instance.</p>
        pub fn subnet_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.subnet_id = Some(input.into());
            self
        }
        /// <p>The ID of the subnet in which to launch the instance.</p>
        pub fn set_subnet_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.subnet_id = input;
            self
        }
        /// <p>The Base64-encoded user data for the instance. User data is limited to 16 KB.</p>
        pub fn user_data(mut self, input: impl Into<std::string::String>) -> Self {
            self.user_data = Some(input.into());
            self
        }
        /// <p>The Base64-encoded user data for the instance. User data is limited to 16 KB.</p>
        pub fn set_user_data(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.user_data = input;
            self
        }
        /// Consumes the builder and constructs a [`RequestSpotLaunchSpecification`](crate::model::RequestSpotLaunchSpecification).
        pub fn build(self) -> crate::model::RequestSpotLaunchSpecification {
            crate::model::RequestSpotLaunchSpecification {
                security_group_ids: self.security_group_ids,
                security_groups: self.security_groups,
                addressing_type: self.addressing_type,
                block_device_mappings: self.block_device_mappings,
                ebs_optimized: self.ebs_optimized,
                iam_instance_profile: self.iam_instance_profile,
                image_id: self.image_id,
                instance_type: self.instance_type,
                kernel_id: self.kernel_id,
                key_name: self.key_name,
                monitoring: self.monitoring,
                network_interfaces: self.network_interfaces,
                placement: self.placement,
                ramdisk_id: self.ramdisk_id,
                subnet_id: self.subnet_id,
                user_data: self.user_data,
            }
        }
    }
}
impl RequestSpotLaunchSpecification {
    /// Creates a new builder-style object to manufacture [`RequestSpotLaunchSpecification`](crate::model::RequestSpotLaunchSpecification).
    pub fn builder() -> crate::model::request_spot_launch_specification::Builder {
        crate::model::request_spot_launch_specification::Builder::default()
    }
}

/// <p>Describes the configuration of a Spot Fleet request.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SpotFleetRequestConfigData {
    /// <p>The strategy that determines how to allocate the target Spot Instance capacity across the Spot Instance pools specified by the Spot Fleet launch configuration. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-fleet-allocation-strategy.html">Allocation strategies for Spot Instances</a> in the <i>Amazon EC2 User Guide</i>.</p>
    /// <dl>
    /// <dt>
    /// priceCapacityOptimized (recommended)
    /// </dt>
    /// <dd>
    /// <p>Spot Fleet identifies the pools with the highest capacity availability for the number of instances that are launching. This means that we will request Spot Instances from the pools that we believe have the lowest chance of interruption in the near term. Spot Fleet then requests Spot Instances from the lowest priced of these pools.</p>
    /// </dd>
    /// <dt>
    /// capacityOptimized
    /// </dt>
    /// <dd>
    /// <p>Spot Fleet identifies the pools with the highest capacity availability for the number of instances that are launching. This means that we will request Spot Instances from the pools that we believe have the lowest chance of interruption in the near term. To give certain instance types a higher chance of launching first, use <code>capacityOptimizedPrioritized</code>. Set a priority for each instance type by using the <code>Priority</code> parameter for <code>LaunchTemplateOverrides</code>. You can assign the same priority to different <code>LaunchTemplateOverrides</code>. EC2 implements the priorities on a best-effort basis, but optimizes for capacity first. <code>capacityOptimizedPrioritized</code> is supported only if your Spot Fleet uses a launch template. Note that if the <code>OnDemandAllocationStrategy</code> is set to <code>prioritized</code>, the same priority is applied when fulfilling On-Demand capacity.</p>
    /// </dd>
    /// <dt>
    /// diversified
    /// </dt>
    /// <dd>
    /// <p>Spot Fleet requests instances from all of the Spot Instance pools that you specify.</p>
    /// </dd>
    /// <dt>
    /// lowestPrice
    /// </dt>
    /// <dd>
    /// <p>Spot Fleet requests instances from the lowest priced Spot Instance pool that has available capacity. If the lowest priced pool doesn't have available capacity, the Spot Instances come from the next lowest priced pool that has available capacity. If a pool runs out of capacity before fulfilling your desired capacity, Spot Fleet will continue to fulfill your request by drawing from the next lowest priced pool. To ensure that your desired capacity is met, you might receive Spot Instances from several pools. Because this strategy only considers instance price and not capacity availability, it might lead to high interruption rates.</p>
    /// </dd>
    /// </dl>
    /// <p>Default: <code>lowestPrice</code> </p>
    #[doc(hidden)]
    pub allocation_strategy: std::option::Option<crate::model::AllocationStrategy>,
    /// <p>The order of the launch template overrides to use in fulfilling On-Demand capacity. If you specify <code>lowestPrice</code>, Spot Fleet uses price to determine the order, launching the lowest price first. If you specify <code>prioritized</code>, Spot Fleet uses the priority that you assign to each Spot Fleet launch template override, launching the highest priority first. If you do not specify a value, Spot Fleet defaults to <code>lowestPrice</code>.</p>
    #[doc(hidden)]
    pub on_demand_allocation_strategy:
        std::option::Option<crate::model::OnDemandAllocationStrategy>,
    /// <p>The strategies for managing your Spot Instances that are at an elevated risk of being interrupted.</p>
    #[doc(hidden)]
    pub spot_maintenance_strategies: std::option::Option<crate::model::SpotMaintenanceStrategies>,
    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of your listings. This helps to avoid duplicate listings. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring Idempotency</a>.</p>
    #[doc(hidden)]
    pub client_token: std::option::Option<std::string::String>,
    /// <p>Indicates whether running Spot Instances should be terminated if you decrease the target capacity of the Spot Fleet request below the current size of the Spot Fleet.</p>
    #[doc(hidden)]
    pub excess_capacity_termination_policy:
        std::option::Option<crate::model::ExcessCapacityTerminationPolicy>,
    /// <p>The number of units fulfilled by this request compared to the set target capacity. You cannot set this value.</p>
    #[doc(hidden)]
    pub fulfilled_capacity: std::option::Option<f64>,
    /// <p>The number of On-Demand units fulfilled by this request compared to the set target On-Demand capacity.</p>
    #[doc(hidden)]
    pub on_demand_fulfilled_capacity: std::option::Option<f64>,
    /// <p>The Amazon Resource Name (ARN) of an Identity and Access Management (IAM) role that grants the Spot Fleet the permission to request, launch, terminate, and tag instances on your behalf. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-fleet-requests.html#spot-fleet-prerequisites">Spot Fleet prerequisites</a> in the <i>Amazon EC2 User Guide</i>. Spot Fleet can terminate Spot Instances on your behalf when you cancel its Spot Fleet request using <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CancelSpotFleetRequests">CancelSpotFleetRequests</a> or when the Spot Fleet request expires, if you set <code>TerminateInstancesWithExpiration</code>.</p>
    #[doc(hidden)]
    pub iam_fleet_role: std::option::Option<std::string::String>,
    /// <p>The launch specifications for the Spot Fleet request. If you specify <code>LaunchSpecifications</code>, you can't specify <code>LaunchTemplateConfigs</code>. If you include On-Demand capacity in your request, you must use <code>LaunchTemplateConfigs</code>.</p>
    #[doc(hidden)]
    pub launch_specifications:
        std::option::Option<std::vec::Vec<crate::model::SpotFleetLaunchSpecification>>,
    /// <p>The launch template and overrides. If you specify <code>LaunchTemplateConfigs</code>, you can't specify <code>LaunchSpecifications</code>. If you include On-Demand capacity in your request, you must use <code>LaunchTemplateConfigs</code>.</p>
    #[doc(hidden)]
    pub launch_template_configs:
        std::option::Option<std::vec::Vec<crate::model::LaunchTemplateConfig>>,
    /// <p>The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.</p> <important>
    /// <p>If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.</p>
    /// </important>
    #[doc(hidden)]
    pub spot_price: std::option::Option<std::string::String>,
    /// <p>The number of units to request for the Spot Fleet. You can choose to set the target capacity in terms of instances or a performance characteristic that is important to your application workload, such as vCPUs, memory, or I/O. If the request type is <code>maintain</code>, you can specify a target capacity of 0 and add capacity later.</p>
    #[doc(hidden)]
    pub target_capacity: std::option::Option<i32>,
    /// <p>The number of On-Demand units to request. You can choose to set the target capacity in terms of instances or a performance characteristic that is important to your application workload, such as vCPUs, memory, or I/O. If the request type is <code>maintain</code>, you can specify a target capacity of 0 and add capacity later.</p>
    #[doc(hidden)]
    pub on_demand_target_capacity: std::option::Option<i32>,
    /// <p>The maximum amount per hour for On-Demand Instances that you're willing to pay. You can use the <code>onDemandMaxTotalPrice</code> parameter, the <code>spotMaxTotalPrice</code> parameter, or both parameters to ensure that your fleet cost does not exceed your budget. If you set a maximum price per hour for the On-Demand Instances and Spot Instances in your request, Spot Fleet will launch instances until it reaches the maximum amount you're willing to pay. When the maximum amount you're willing to pay is reached, the fleet stops launching instances even if it hasn’t met the target capacity.</p>
    #[doc(hidden)]
    pub on_demand_max_total_price: std::option::Option<std::string::String>,
    /// <p>The maximum amount per hour for Spot Instances that you're willing to pay. You can use the <code>spotdMaxTotalPrice</code> parameter, the <code>onDemandMaxTotalPrice</code> parameter, or both parameters to ensure that your fleet cost does not exceed your budget. If you set a maximum price per hour for the On-Demand Instances and Spot Instances in your request, Spot Fleet will launch instances until it reaches the maximum amount you're willing to pay. When the maximum amount you're willing to pay is reached, the fleet stops launching instances even if it hasn’t met the target capacity.</p>
    #[doc(hidden)]
    pub spot_max_total_price: std::option::Option<std::string::String>,
    /// <p>Indicates whether running Spot Instances are terminated when the Spot Fleet request expires.</p>
    #[doc(hidden)]
    pub terminate_instances_with_expiration: std::option::Option<bool>,
    /// <p>The type of request. Indicates whether the Spot Fleet only requests the target capacity or also attempts to maintain it. When this value is <code>request</code>, the Spot Fleet only places the required requests. It does not attempt to replenish Spot Instances if capacity is diminished, nor does it submit requests in alternative Spot pools if capacity is not available. When this value is <code>maintain</code>, the Spot Fleet maintains the target capacity. The Spot Fleet places the required requests to meet capacity and automatically replenishes any interrupted instances. Default: <code>maintain</code>. <code>instant</code> is listed but is not used by Spot Fleet.</p>
    #[doc(hidden)]
    pub r#type: std::option::Option<crate::model::FleetType>,
    /// <p>The start date and time of the request, in UTC format (<i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z). By default, Amazon EC2 starts fulfilling the request immediately.</p>
    #[doc(hidden)]
    pub valid_from: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The end date and time of the request, in UTC format (<i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z). After the end date and time, no new Spot Instance requests are placed or able to fulfill the request. If no value is specified, the Spot Fleet request remains until you cancel it.</p>
    #[doc(hidden)]
    pub valid_until: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>Indicates whether Spot Fleet should replace unhealthy instances.</p>
    #[doc(hidden)]
    pub replace_unhealthy_instances: std::option::Option<bool>,
    /// <p>The behavior when a Spot Instance is interrupted. The default is <code>terminate</code>.</p>
    #[doc(hidden)]
    pub instance_interruption_behavior:
        std::option::Option<crate::model::InstanceInterruptionBehavior>,
    /// <p>One or more Classic Load Balancers and target groups to attach to the Spot Fleet request. Spot Fleet registers the running Spot Instances with the specified Classic Load Balancers and target groups.</p>
    /// <p>With Network Load Balancers, Spot Fleet cannot register instances that have the following instance types: C1, CC1, CC2, CG1, CG2, CR1, CS1, G1, G2, HI1, HS1, M1, M2, M3, and T1.</p>
    #[doc(hidden)]
    pub load_balancers_config: std::option::Option<crate::model::LoadBalancersConfig>,
    /// <p>The number of Spot pools across which to allocate your target Spot capacity. Valid only when Spot <b>AllocationStrategy</b> is set to <code>lowest-price</code>. Spot Fleet selects the cheapest Spot pools and evenly allocates your target Spot capacity across the number of Spot pools that you specify.</p>
    /// <p>Note that Spot Fleet attempts to draw Spot Instances from the number of pools that you specify on a best effort basis. If a pool runs out of Spot capacity before fulfilling your target capacity, Spot Fleet will continue to fulfill your request by drawing from the next cheapest pool. To ensure that your target capacity is met, you might receive Spot Instances from more than the number of pools that you specified. Similarly, if most of the pools have no Spot capacity, you might receive your full target capacity from fewer than the number of pools that you specified.</p>
    #[doc(hidden)]
    pub instance_pools_to_use_count: std::option::Option<i32>,
    /// <p>Reserved.</p>
    #[doc(hidden)]
    pub context: std::option::Option<std::string::String>,
    /// <p>The unit for the target capacity. <code>TargetCapacityUnitType</code> can only be specified when <code>InstanceRequirements</code> is specified.</p>
    /// <p>Default: <code>units</code> (translates to number of instances)</p>
    #[doc(hidden)]
    pub target_capacity_unit_type: std::option::Option<crate::model::TargetCapacityUnitType>,
    /// <p>The key-value pair for tagging the Spot Fleet request on creation. The value for <code>ResourceType</code> must be <code>spot-fleet-request</code>, otherwise the Spot Fleet request fails. To tag instances at launch, specify the tags in the <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html#create-launch-template">launch template</a> (valid only if you use <code>LaunchTemplateConfigs</code>) or in the <code> <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_SpotFleetTagSpecification.html">SpotFleetTagSpecification</a> </code> (valid only if you use <code>LaunchSpecifications</code>). For information about tagging after launch, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html#tag-resources">Tagging Your Resources</a>.</p>
    #[doc(hidden)]
    pub tag_specifications: std::option::Option<std::vec::Vec<crate::model::TagSpecification>>,
}
impl SpotFleetRequestConfigData {
    /// <p>The strategy that determines how to allocate the target Spot Instance capacity across the Spot Instance pools specified by the Spot Fleet launch configuration. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-fleet-allocation-strategy.html">Allocation strategies for Spot Instances</a> in the <i>Amazon EC2 User Guide</i>.</p>
    /// <dl>
    /// <dt>
    /// priceCapacityOptimized (recommended)
    /// </dt>
    /// <dd>
    /// <p>Spot Fleet identifies the pools with the highest capacity availability for the number of instances that are launching. This means that we will request Spot Instances from the pools that we believe have the lowest chance of interruption in the near term. Spot Fleet then requests Spot Instances from the lowest priced of these pools.</p>
    /// </dd>
    /// <dt>
    /// capacityOptimized
    /// </dt>
    /// <dd>
    /// <p>Spot Fleet identifies the pools with the highest capacity availability for the number of instances that are launching. This means that we will request Spot Instances from the pools that we believe have the lowest chance of interruption in the near term. To give certain instance types a higher chance of launching first, use <code>capacityOptimizedPrioritized</code>. Set a priority for each instance type by using the <code>Priority</code> parameter for <code>LaunchTemplateOverrides</code>. You can assign the same priority to different <code>LaunchTemplateOverrides</code>. EC2 implements the priorities on a best-effort basis, but optimizes for capacity first. <code>capacityOptimizedPrioritized</code> is supported only if your Spot Fleet uses a launch template. Note that if the <code>OnDemandAllocationStrategy</code> is set to <code>prioritized</code>, the same priority is applied when fulfilling On-Demand capacity.</p>
    /// </dd>
    /// <dt>
    /// diversified
    /// </dt>
    /// <dd>
    /// <p>Spot Fleet requests instances from all of the Spot Instance pools that you specify.</p>
    /// </dd>
    /// <dt>
    /// lowestPrice
    /// </dt>
    /// <dd>
    /// <p>Spot Fleet requests instances from the lowest priced Spot Instance pool that has available capacity. If the lowest priced pool doesn't have available capacity, the Spot Instances come from the next lowest priced pool that has available capacity. If a pool runs out of capacity before fulfilling your desired capacity, Spot Fleet will continue to fulfill your request by drawing from the next lowest priced pool. To ensure that your desired capacity is met, you might receive Spot Instances from several pools. Because this strategy only considers instance price and not capacity availability, it might lead to high interruption rates.</p>
    /// </dd>
    /// </dl>
    /// <p>Default: <code>lowestPrice</code> </p>
    pub fn allocation_strategy(&self) -> std::option::Option<&crate::model::AllocationStrategy> {
        self.allocation_strategy.as_ref()
    }
    /// <p>The order of the launch template overrides to use in fulfilling On-Demand capacity. If you specify <code>lowestPrice</code>, Spot Fleet uses price to determine the order, launching the lowest price first. If you specify <code>prioritized</code>, Spot Fleet uses the priority that you assign to each Spot Fleet launch template override, launching the highest priority first. If you do not specify a value, Spot Fleet defaults to <code>lowestPrice</code>.</p>
    pub fn on_demand_allocation_strategy(
        &self,
    ) -> std::option::Option<&crate::model::OnDemandAllocationStrategy> {
        self.on_demand_allocation_strategy.as_ref()
    }
    /// <p>The strategies for managing your Spot Instances that are at an elevated risk of being interrupted.</p>
    pub fn spot_maintenance_strategies(
        &self,
    ) -> std::option::Option<&crate::model::SpotMaintenanceStrategies> {
        self.spot_maintenance_strategies.as_ref()
    }
    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of your listings. This helps to avoid duplicate listings. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring Idempotency</a>.</p>
    pub fn client_token(&self) -> std::option::Option<&str> {
        self.client_token.as_deref()
    }
    /// <p>Indicates whether running Spot Instances should be terminated if you decrease the target capacity of the Spot Fleet request below the current size of the Spot Fleet.</p>
    pub fn excess_capacity_termination_policy(
        &self,
    ) -> std::option::Option<&crate::model::ExcessCapacityTerminationPolicy> {
        self.excess_capacity_termination_policy.as_ref()
    }
    /// <p>The number of units fulfilled by this request compared to the set target capacity. You cannot set this value.</p>
    pub fn fulfilled_capacity(&self) -> std::option::Option<f64> {
        self.fulfilled_capacity
    }
    /// <p>The number of On-Demand units fulfilled by this request compared to the set target On-Demand capacity.</p>
    pub fn on_demand_fulfilled_capacity(&self) -> std::option::Option<f64> {
        self.on_demand_fulfilled_capacity
    }
    /// <p>The Amazon Resource Name (ARN) of an Identity and Access Management (IAM) role that grants the Spot Fleet the permission to request, launch, terminate, and tag instances on your behalf. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-fleet-requests.html#spot-fleet-prerequisites">Spot Fleet prerequisites</a> in the <i>Amazon EC2 User Guide</i>. Spot Fleet can terminate Spot Instances on your behalf when you cancel its Spot Fleet request using <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CancelSpotFleetRequests">CancelSpotFleetRequests</a> or when the Spot Fleet request expires, if you set <code>TerminateInstancesWithExpiration</code>.</p>
    pub fn iam_fleet_role(&self) -> std::option::Option<&str> {
        self.iam_fleet_role.as_deref()
    }
    /// <p>The launch specifications for the Spot Fleet request. If you specify <code>LaunchSpecifications</code>, you can't specify <code>LaunchTemplateConfigs</code>. If you include On-Demand capacity in your request, you must use <code>LaunchTemplateConfigs</code>.</p>
    pub fn launch_specifications(
        &self,
    ) -> std::option::Option<&[crate::model::SpotFleetLaunchSpecification]> {
        self.launch_specifications.as_deref()
    }
    /// <p>The launch template and overrides. If you specify <code>LaunchTemplateConfigs</code>, you can't specify <code>LaunchSpecifications</code>. If you include On-Demand capacity in your request, you must use <code>LaunchTemplateConfigs</code>.</p>
    pub fn launch_template_configs(
        &self,
    ) -> std::option::Option<&[crate::model::LaunchTemplateConfig]> {
        self.launch_template_configs.as_deref()
    }
    /// <p>The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.</p> <important>
    /// <p>If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.</p>
    /// </important>
    pub fn spot_price(&self) -> std::option::Option<&str> {
        self.spot_price.as_deref()
    }
    /// <p>The number of units to request for the Spot Fleet. You can choose to set the target capacity in terms of instances or a performance characteristic that is important to your application workload, such as vCPUs, memory, or I/O. If the request type is <code>maintain</code>, you can specify a target capacity of 0 and add capacity later.</p>
    pub fn target_capacity(&self) -> std::option::Option<i32> {
        self.target_capacity
    }
    /// <p>The number of On-Demand units to request. You can choose to set the target capacity in terms of instances or a performance characteristic that is important to your application workload, such as vCPUs, memory, or I/O. If the request type is <code>maintain</code>, you can specify a target capacity of 0 and add capacity later.</p>
    pub fn on_demand_target_capacity(&self) -> std::option::Option<i32> {
        self.on_demand_target_capacity
    }
    /// <p>The maximum amount per hour for On-Demand Instances that you're willing to pay. You can use the <code>onDemandMaxTotalPrice</code> parameter, the <code>spotMaxTotalPrice</code> parameter, or both parameters to ensure that your fleet cost does not exceed your budget. If you set a maximum price per hour for the On-Demand Instances and Spot Instances in your request, Spot Fleet will launch instances until it reaches the maximum amount you're willing to pay. When the maximum amount you're willing to pay is reached, the fleet stops launching instances even if it hasn’t met the target capacity.</p>
    pub fn on_demand_max_total_price(&self) -> std::option::Option<&str> {
        self.on_demand_max_total_price.as_deref()
    }
    /// <p>The maximum amount per hour for Spot Instances that you're willing to pay. You can use the <code>spotdMaxTotalPrice</code> parameter, the <code>onDemandMaxTotalPrice</code> parameter, or both parameters to ensure that your fleet cost does not exceed your budget. If you set a maximum price per hour for the On-Demand Instances and Spot Instances in your request, Spot Fleet will launch instances until it reaches the maximum amount you're willing to pay. When the maximum amount you're willing to pay is reached, the fleet stops launching instances even if it hasn’t met the target capacity.</p>
    pub fn spot_max_total_price(&self) -> std::option::Option<&str> {
        self.spot_max_total_price.as_deref()
    }
    /// <p>Indicates whether running Spot Instances are terminated when the Spot Fleet request expires.</p>
    pub fn terminate_instances_with_expiration(&self) -> std::option::Option<bool> {
        self.terminate_instances_with_expiration
    }
    /// <p>The type of request. Indicates whether the Spot Fleet only requests the target capacity or also attempts to maintain it. When this value is <code>request</code>, the Spot Fleet only places the required requests. It does not attempt to replenish Spot Instances if capacity is diminished, nor does it submit requests in alternative Spot pools if capacity is not available. When this value is <code>maintain</code>, the Spot Fleet maintains the target capacity. The Spot Fleet places the required requests to meet capacity and automatically replenishes any interrupted instances. Default: <code>maintain</code>. <code>instant</code> is listed but is not used by Spot Fleet.</p>
    pub fn r#type(&self) -> std::option::Option<&crate::model::FleetType> {
        self.r#type.as_ref()
    }
    /// <p>The start date and time of the request, in UTC format (<i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z). By default, Amazon EC2 starts fulfilling the request immediately.</p>
    pub fn valid_from(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.valid_from.as_ref()
    }
    /// <p>The end date and time of the request, in UTC format (<i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z). After the end date and time, no new Spot Instance requests are placed or able to fulfill the request. If no value is specified, the Spot Fleet request remains until you cancel it.</p>
    pub fn valid_until(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.valid_until.as_ref()
    }
    /// <p>Indicates whether Spot Fleet should replace unhealthy instances.</p>
    pub fn replace_unhealthy_instances(&self) -> std::option::Option<bool> {
        self.replace_unhealthy_instances
    }
    /// <p>The behavior when a Spot Instance is interrupted. The default is <code>terminate</code>.</p>
    pub fn instance_interruption_behavior(
        &self,
    ) -> std::option::Option<&crate::model::InstanceInterruptionBehavior> {
        self.instance_interruption_behavior.as_ref()
    }
    /// <p>One or more Classic Load Balancers and target groups to attach to the Spot Fleet request. Spot Fleet registers the running Spot Instances with the specified Classic Load Balancers and target groups.</p>
    /// <p>With Network Load Balancers, Spot Fleet cannot register instances that have the following instance types: C1, CC1, CC2, CG1, CG2, CR1, CS1, G1, G2, HI1, HS1, M1, M2, M3, and T1.</p>
    pub fn load_balancers_config(&self) -> std::option::Option<&crate::model::LoadBalancersConfig> {
        self.load_balancers_config.as_ref()
    }
    /// <p>The number of Spot pools across which to allocate your target Spot capacity. Valid only when Spot <b>AllocationStrategy</b> is set to <code>lowest-price</code>. Spot Fleet selects the cheapest Spot pools and evenly allocates your target Spot capacity across the number of Spot pools that you specify.</p>
    /// <p>Note that Spot Fleet attempts to draw Spot Instances from the number of pools that you specify on a best effort basis. If a pool runs out of Spot capacity before fulfilling your target capacity, Spot Fleet will continue to fulfill your request by drawing from the next cheapest pool. To ensure that your target capacity is met, you might receive Spot Instances from more than the number of pools that you specified. Similarly, if most of the pools have no Spot capacity, you might receive your full target capacity from fewer than the number of pools that you specified.</p>
    pub fn instance_pools_to_use_count(&self) -> std::option::Option<i32> {
        self.instance_pools_to_use_count
    }
    /// <p>Reserved.</p>
    pub fn context(&self) -> std::option::Option<&str> {
        self.context.as_deref()
    }
    /// <p>The unit for the target capacity. <code>TargetCapacityUnitType</code> can only be specified when <code>InstanceRequirements</code> is specified.</p>
    /// <p>Default: <code>units</code> (translates to number of instances)</p>
    pub fn target_capacity_unit_type(
        &self,
    ) -> std::option::Option<&crate::model::TargetCapacityUnitType> {
        self.target_capacity_unit_type.as_ref()
    }
    /// <p>The key-value pair for tagging the Spot Fleet request on creation. The value for <code>ResourceType</code> must be <code>spot-fleet-request</code>, otherwise the Spot Fleet request fails. To tag instances at launch, specify the tags in the <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html#create-launch-template">launch template</a> (valid only if you use <code>LaunchTemplateConfigs</code>) or in the <code> <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_SpotFleetTagSpecification.html">SpotFleetTagSpecification</a> </code> (valid only if you use <code>LaunchSpecifications</code>). For information about tagging after launch, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html#tag-resources">Tagging Your Resources</a>.</p>
    pub fn tag_specifications(&self) -> std::option::Option<&[crate::model::TagSpecification]> {
        self.tag_specifications.as_deref()
    }
}
/// See [`SpotFleetRequestConfigData`](crate::model::SpotFleetRequestConfigData).
pub mod spot_fleet_request_config_data {

    /// A builder for [`SpotFleetRequestConfigData`](crate::model::SpotFleetRequestConfigData).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) allocation_strategy: std::option::Option<crate::model::AllocationStrategy>,
        pub(crate) on_demand_allocation_strategy:
            std::option::Option<crate::model::OnDemandAllocationStrategy>,
        pub(crate) spot_maintenance_strategies:
            std::option::Option<crate::model::SpotMaintenanceStrategies>,
        pub(crate) client_token: std::option::Option<std::string::String>,
        pub(crate) excess_capacity_termination_policy:
            std::option::Option<crate::model::ExcessCapacityTerminationPolicy>,
        pub(crate) fulfilled_capacity: std::option::Option<f64>,
        pub(crate) on_demand_fulfilled_capacity: std::option::Option<f64>,
        pub(crate) iam_fleet_role: std::option::Option<std::string::String>,
        pub(crate) launch_specifications:
            std::option::Option<std::vec::Vec<crate::model::SpotFleetLaunchSpecification>>,
        pub(crate) launch_template_configs:
            std::option::Option<std::vec::Vec<crate::model::LaunchTemplateConfig>>,
        pub(crate) spot_price: std::option::Option<std::string::String>,
        pub(crate) target_capacity: std::option::Option<i32>,
        pub(crate) on_demand_target_capacity: std::option::Option<i32>,
        pub(crate) on_demand_max_total_price: std::option::Option<std::string::String>,
        pub(crate) spot_max_total_price: std::option::Option<std::string::String>,
        pub(crate) terminate_instances_with_expiration: std::option::Option<bool>,
        pub(crate) r#type: std::option::Option<crate::model::FleetType>,
        pub(crate) valid_from: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) valid_until: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) replace_unhealthy_instances: std::option::Option<bool>,
        pub(crate) instance_interruption_behavior:
            std::option::Option<crate::model::InstanceInterruptionBehavior>,
        pub(crate) load_balancers_config: std::option::Option<crate::model::LoadBalancersConfig>,
        pub(crate) instance_pools_to_use_count: std::option::Option<i32>,
        pub(crate) context: std::option::Option<std::string::String>,
        pub(crate) target_capacity_unit_type:
            std::option::Option<crate::model::TargetCapacityUnitType>,
        pub(crate) tag_specifications:
            std::option::Option<std::vec::Vec<crate::model::TagSpecification>>,
    }
    impl Builder {
        /// <p>The strategy that determines how to allocate the target Spot Instance capacity across the Spot Instance pools specified by the Spot Fleet launch configuration. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-fleet-allocation-strategy.html">Allocation strategies for Spot Instances</a> in the <i>Amazon EC2 User Guide</i>.</p>
        /// <dl>
        /// <dt>
        /// priceCapacityOptimized (recommended)
        /// </dt>
        /// <dd>
        /// <p>Spot Fleet identifies the pools with the highest capacity availability for the number of instances that are launching. This means that we will request Spot Instances from the pools that we believe have the lowest chance of interruption in the near term. Spot Fleet then requests Spot Instances from the lowest priced of these pools.</p>
        /// </dd>
        /// <dt>
        /// capacityOptimized
        /// </dt>
        /// <dd>
        /// <p>Spot Fleet identifies the pools with the highest capacity availability for the number of instances that are launching. This means that we will request Spot Instances from the pools that we believe have the lowest chance of interruption in the near term. To give certain instance types a higher chance of launching first, use <code>capacityOptimizedPrioritized</code>. Set a priority for each instance type by using the <code>Priority</code> parameter for <code>LaunchTemplateOverrides</code>. You can assign the same priority to different <code>LaunchTemplateOverrides</code>. EC2 implements the priorities on a best-effort basis, but optimizes for capacity first. <code>capacityOptimizedPrioritized</code> is supported only if your Spot Fleet uses a launch template. Note that if the <code>OnDemandAllocationStrategy</code> is set to <code>prioritized</code>, the same priority is applied when fulfilling On-Demand capacity.</p>
        /// </dd>
        /// <dt>
        /// diversified
        /// </dt>
        /// <dd>
        /// <p>Spot Fleet requests instances from all of the Spot Instance pools that you specify.</p>
        /// </dd>
        /// <dt>
        /// lowestPrice
        /// </dt>
        /// <dd>
        /// <p>Spot Fleet requests instances from the lowest priced Spot Instance pool that has available capacity. If the lowest priced pool doesn't have available capacity, the Spot Instances come from the next lowest priced pool that has available capacity. If a pool runs out of capacity before fulfilling your desired capacity, Spot Fleet will continue to fulfill your request by drawing from the next lowest priced pool. To ensure that your desired capacity is met, you might receive Spot Instances from several pools. Because this strategy only considers instance price and not capacity availability, it might lead to high interruption rates.</p>
        /// </dd>
        /// </dl>
        /// <p>Default: <code>lowestPrice</code> </p>
        pub fn allocation_strategy(mut self, input: crate::model::AllocationStrategy) -> Self {
            self.allocation_strategy = Some(input);
            self
        }
        /// <p>The strategy that determines how to allocate the target Spot Instance capacity across the Spot Instance pools specified by the Spot Fleet launch configuration. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-fleet-allocation-strategy.html">Allocation strategies for Spot Instances</a> in the <i>Amazon EC2 User Guide</i>.</p>
        /// <dl>
        /// <dt>
        /// priceCapacityOptimized (recommended)
        /// </dt>
        /// <dd>
        /// <p>Spot Fleet identifies the pools with the highest capacity availability for the number of instances that are launching. This means that we will request Spot Instances from the pools that we believe have the lowest chance of interruption in the near term. Spot Fleet then requests Spot Instances from the lowest priced of these pools.</p>
        /// </dd>
        /// <dt>
        /// capacityOptimized
        /// </dt>
        /// <dd>
        /// <p>Spot Fleet identifies the pools with the highest capacity availability for the number of instances that are launching. This means that we will request Spot Instances from the pools that we believe have the lowest chance of interruption in the near term. To give certain instance types a higher chance of launching first, use <code>capacityOptimizedPrioritized</code>. Set a priority for each instance type by using the <code>Priority</code> parameter for <code>LaunchTemplateOverrides</code>. You can assign the same priority to different <code>LaunchTemplateOverrides</code>. EC2 implements the priorities on a best-effort basis, but optimizes for capacity first. <code>capacityOptimizedPrioritized</code> is supported only if your Spot Fleet uses a launch template. Note that if the <code>OnDemandAllocationStrategy</code> is set to <code>prioritized</code>, the same priority is applied when fulfilling On-Demand capacity.</p>
        /// </dd>
        /// <dt>
        /// diversified
        /// </dt>
        /// <dd>
        /// <p>Spot Fleet requests instances from all of the Spot Instance pools that you specify.</p>
        /// </dd>
        /// <dt>
        /// lowestPrice
        /// </dt>
        /// <dd>
        /// <p>Spot Fleet requests instances from the lowest priced Spot Instance pool that has available capacity. If the lowest priced pool doesn't have available capacity, the Spot Instances come from the next lowest priced pool that has available capacity. If a pool runs out of capacity before fulfilling your desired capacity, Spot Fleet will continue to fulfill your request by drawing from the next lowest priced pool. To ensure that your desired capacity is met, you might receive Spot Instances from several pools. Because this strategy only considers instance price and not capacity availability, it might lead to high interruption rates.</p>
        /// </dd>
        /// </dl>
        /// <p>Default: <code>lowestPrice</code> </p>
        pub fn set_allocation_strategy(
            mut self,
            input: std::option::Option<crate::model::AllocationStrategy>,
        ) -> Self {
            self.allocation_strategy = input;
            self
        }
        /// <p>The order of the launch template overrides to use in fulfilling On-Demand capacity. If you specify <code>lowestPrice</code>, Spot Fleet uses price to determine the order, launching the lowest price first. If you specify <code>prioritized</code>, Spot Fleet uses the priority that you assign to each Spot Fleet launch template override, launching the highest priority first. If you do not specify a value, Spot Fleet defaults to <code>lowestPrice</code>.</p>
        pub fn on_demand_allocation_strategy(
            mut self,
            input: crate::model::OnDemandAllocationStrategy,
        ) -> Self {
            self.on_demand_allocation_strategy = Some(input);
            self
        }
        /// <p>The order of the launch template overrides to use in fulfilling On-Demand capacity. If you specify <code>lowestPrice</code>, Spot Fleet uses price to determine the order, launching the lowest price first. If you specify <code>prioritized</code>, Spot Fleet uses the priority that you assign to each Spot Fleet launch template override, launching the highest priority first. If you do not specify a value, Spot Fleet defaults to <code>lowestPrice</code>.</p>
        pub fn set_on_demand_allocation_strategy(
            mut self,
            input: std::option::Option<crate::model::OnDemandAllocationStrategy>,
        ) -> Self {
            self.on_demand_allocation_strategy = input;
            self
        }
        /// <p>The strategies for managing your Spot Instances that are at an elevated risk of being interrupted.</p>
        pub fn spot_maintenance_strategies(
            mut self,
            input: crate::model::SpotMaintenanceStrategies,
        ) -> Self {
            self.spot_maintenance_strategies = Some(input);
            self
        }
        /// <p>The strategies for managing your Spot Instances that are at an elevated risk of being interrupted.</p>
        pub fn set_spot_maintenance_strategies(
            mut self,
            input: std::option::Option<crate::model::SpotMaintenanceStrategies>,
        ) -> Self {
            self.spot_maintenance_strategies = input;
            self
        }
        /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of your listings. This helps to avoid duplicate listings. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring Idempotency</a>.</p>
        pub fn client_token(mut self, input: impl Into<std::string::String>) -> Self {
            self.client_token = Some(input.into());
            self
        }
        /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of your listings. This helps to avoid duplicate listings. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring Idempotency</a>.</p>
        pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.client_token = input;
            self
        }
        /// <p>Indicates whether running Spot Instances should be terminated if you decrease the target capacity of the Spot Fleet request below the current size of the Spot Fleet.</p>
        pub fn excess_capacity_termination_policy(
            mut self,
            input: crate::model::ExcessCapacityTerminationPolicy,
        ) -> Self {
            self.excess_capacity_termination_policy = Some(input);
            self
        }
        /// <p>Indicates whether running Spot Instances should be terminated if you decrease the target capacity of the Spot Fleet request below the current size of the Spot Fleet.</p>
        pub fn set_excess_capacity_termination_policy(
            mut self,
            input: std::option::Option<crate::model::ExcessCapacityTerminationPolicy>,
        ) -> Self {
            self.excess_capacity_termination_policy = input;
            self
        }
        /// <p>The number of units fulfilled by this request compared to the set target capacity. You cannot set this value.</p>
        pub fn fulfilled_capacity(mut self, input: f64) -> Self {
            self.fulfilled_capacity = Some(input);
            self
        }
        /// <p>The number of units fulfilled by this request compared to the set target capacity. You cannot set this value.</p>
        pub fn set_fulfilled_capacity(mut self, input: std::option::Option<f64>) -> Self {
            self.fulfilled_capacity = input;
            self
        }
        /// <p>The number of On-Demand units fulfilled by this request compared to the set target On-Demand capacity.</p>
        pub fn on_demand_fulfilled_capacity(mut self, input: f64) -> Self {
            self.on_demand_fulfilled_capacity = Some(input);
            self
        }
        /// <p>The number of On-Demand units fulfilled by this request compared to the set target On-Demand capacity.</p>
        pub fn set_on_demand_fulfilled_capacity(mut self, input: std::option::Option<f64>) -> Self {
            self.on_demand_fulfilled_capacity = input;
            self
        }
        /// <p>The Amazon Resource Name (ARN) of an Identity and Access Management (IAM) role that grants the Spot Fleet the permission to request, launch, terminate, and tag instances on your behalf. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-fleet-requests.html#spot-fleet-prerequisites">Spot Fleet prerequisites</a> in the <i>Amazon EC2 User Guide</i>. Spot Fleet can terminate Spot Instances on your behalf when you cancel its Spot Fleet request using <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CancelSpotFleetRequests">CancelSpotFleetRequests</a> or when the Spot Fleet request expires, if you set <code>TerminateInstancesWithExpiration</code>.</p>
        pub fn iam_fleet_role(mut self, input: impl Into<std::string::String>) -> Self {
            self.iam_fleet_role = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of an Identity and Access Management (IAM) role that grants the Spot Fleet the permission to request, launch, terminate, and tag instances on your behalf. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-fleet-requests.html#spot-fleet-prerequisites">Spot Fleet prerequisites</a> in the <i>Amazon EC2 User Guide</i>. Spot Fleet can terminate Spot Instances on your behalf when you cancel its Spot Fleet request using <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CancelSpotFleetRequests">CancelSpotFleetRequests</a> or when the Spot Fleet request expires, if you set <code>TerminateInstancesWithExpiration</code>.</p>
        pub fn set_iam_fleet_role(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.iam_fleet_role = input;
            self
        }
        /// Appends an item to `launch_specifications`.
        ///
        /// To override the contents of this collection use [`set_launch_specifications`](Self::set_launch_specifications).
        ///
        /// <p>The launch specifications for the Spot Fleet request. If you specify <code>LaunchSpecifications</code>, you can't specify <code>LaunchTemplateConfigs</code>. If you include On-Demand capacity in your request, you must use <code>LaunchTemplateConfigs</code>.</p>
        pub fn launch_specifications(
            mut self,
            input: crate::model::SpotFleetLaunchSpecification,
        ) -> Self {
            let mut v = self.launch_specifications.unwrap_or_default();
            v.push(input);
            self.launch_specifications = Some(v);
            self
        }
        /// <p>The launch specifications for the Spot Fleet request. If you specify <code>LaunchSpecifications</code>, you can't specify <code>LaunchTemplateConfigs</code>. If you include On-Demand capacity in your request, you must use <code>LaunchTemplateConfigs</code>.</p>
        pub fn set_launch_specifications(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::SpotFleetLaunchSpecification>>,
        ) -> Self {
            self.launch_specifications = input;
            self
        }
        /// Appends an item to `launch_template_configs`.
        ///
        /// To override the contents of this collection use [`set_launch_template_configs`](Self::set_launch_template_configs).
        ///
        /// <p>The launch template and overrides. If you specify <code>LaunchTemplateConfigs</code>, you can't specify <code>LaunchSpecifications</code>. If you include On-Demand capacity in your request, you must use <code>LaunchTemplateConfigs</code>.</p>
        pub fn launch_template_configs(
            mut self,
            input: crate::model::LaunchTemplateConfig,
        ) -> Self {
            let mut v = self.launch_template_configs.unwrap_or_default();
            v.push(input);
            self.launch_template_configs = Some(v);
            self
        }
        /// <p>The launch template and overrides. If you specify <code>LaunchTemplateConfigs</code>, you can't specify <code>LaunchSpecifications</code>. If you include On-Demand capacity in your request, you must use <code>LaunchTemplateConfigs</code>.</p>
        pub fn set_launch_template_configs(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::LaunchTemplateConfig>>,
        ) -> Self {
            self.launch_template_configs = input;
            self
        }
        /// <p>The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.</p> <important>
        /// <p>If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.</p>
        /// </important>
        pub fn spot_price(mut self, input: impl Into<std::string::String>) -> Self {
            self.spot_price = Some(input.into());
            self
        }
        /// <p>The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.</p> <important>
        /// <p>If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.</p>
        /// </important>
        pub fn set_spot_price(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.spot_price = input;
            self
        }
        /// <p>The number of units to request for the Spot Fleet. You can choose to set the target capacity in terms of instances or a performance characteristic that is important to your application workload, such as vCPUs, memory, or I/O. If the request type is <code>maintain</code>, you can specify a target capacity of 0 and add capacity later.</p>
        pub fn target_capacity(mut self, input: i32) -> Self {
            self.target_capacity = Some(input);
            self
        }
        /// <p>The number of units to request for the Spot Fleet. You can choose to set the target capacity in terms of instances or a performance characteristic that is important to your application workload, such as vCPUs, memory, or I/O. If the request type is <code>maintain</code>, you can specify a target capacity of 0 and add capacity later.</p>
        pub fn set_target_capacity(mut self, input: std::option::Option<i32>) -> Self {
            self.target_capacity = input;
            self
        }
        /// <p>The number of On-Demand units to request. You can choose to set the target capacity in terms of instances or a performance characteristic that is important to your application workload, such as vCPUs, memory, or I/O. If the request type is <code>maintain</code>, you can specify a target capacity of 0 and add capacity later.</p>
        pub fn on_demand_target_capacity(mut self, input: i32) -> Self {
            self.on_demand_target_capacity = Some(input);
            self
        }
        /// <p>The number of On-Demand units to request. You can choose to set the target capacity in terms of instances or a performance characteristic that is important to your application workload, such as vCPUs, memory, or I/O. If the request type is <code>maintain</code>, you can specify a target capacity of 0 and add capacity later.</p>
        pub fn set_on_demand_target_capacity(mut self, input: std::option::Option<i32>) -> Self {
            self.on_demand_target_capacity = input;
            self
        }
        /// <p>The maximum amount per hour for On-Demand Instances that you're willing to pay. You can use the <code>onDemandMaxTotalPrice</code> parameter, the <code>spotMaxTotalPrice</code> parameter, or both parameters to ensure that your fleet cost does not exceed your budget. If you set a maximum price per hour for the On-Demand Instances and Spot Instances in your request, Spot Fleet will launch instances until it reaches the maximum amount you're willing to pay. When the maximum amount you're willing to pay is reached, the fleet stops launching instances even if it hasn’t met the target capacity.</p>
        pub fn on_demand_max_total_price(mut self, input: impl Into<std::string::String>) -> Self {
            self.on_demand_max_total_price = Some(input.into());
            self
        }
        /// <p>The maximum amount per hour for On-Demand Instances that you're willing to pay. You can use the <code>onDemandMaxTotalPrice</code> parameter, the <code>spotMaxTotalPrice</code> parameter, or both parameters to ensure that your fleet cost does not exceed your budget. If you set a maximum price per hour for the On-Demand Instances and Spot Instances in your request, Spot Fleet will launch instances until it reaches the maximum amount you're willing to pay. When the maximum amount you're willing to pay is reached, the fleet stops launching instances even if it hasn’t met the target capacity.</p>
        pub fn set_on_demand_max_total_price(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.on_demand_max_total_price = input;
            self
        }
        /// <p>The maximum amount per hour for Spot Instances that you're willing to pay. You can use the <code>spotdMaxTotalPrice</code> parameter, the <code>onDemandMaxTotalPrice</code> parameter, or both parameters to ensure that your fleet cost does not exceed your budget. If you set a maximum price per hour for the On-Demand Instances and Spot Instances in your request, Spot Fleet will launch instances until it reaches the maximum amount you're willing to pay. When the maximum amount you're willing to pay is reached, the fleet stops launching instances even if it hasn’t met the target capacity.</p>
        pub fn spot_max_total_price(mut self, input: impl Into<std::string::String>) -> Self {
            self.spot_max_total_price = Some(input.into());
            self
        }
        /// <p>The maximum amount per hour for Spot Instances that you're willing to pay. You can use the <code>spotdMaxTotalPrice</code> parameter, the <code>onDemandMaxTotalPrice</code> parameter, or both parameters to ensure that your fleet cost does not exceed your budget. If you set a maximum price per hour for the On-Demand Instances and Spot Instances in your request, Spot Fleet will launch instances until it reaches the maximum amount you're willing to pay. When the maximum amount you're willing to pay is reached, the fleet stops launching instances even if it hasn’t met the target capacity.</p>
        pub fn set_spot_max_total_price(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.spot_max_total_price = input;
            self
        }
        /// <p>Indicates whether running Spot Instances are terminated when the Spot Fleet request expires.</p>
        pub fn terminate_instances_with_expiration(mut self, input: bool) -> Self {
            self.terminate_instances_with_expiration = Some(input);
            self
        }
        /// <p>Indicates whether running Spot Instances are terminated when the Spot Fleet request expires.</p>
        pub fn set_terminate_instances_with_expiration(
            mut self,
            input: std::option::Option<bool>,
        ) -> Self {
            self.terminate_instances_with_expiration = input;
            self
        }
        /// <p>The type of request. Indicates whether the Spot Fleet only requests the target capacity or also attempts to maintain it. When this value is <code>request</code>, the Spot Fleet only places the required requests. It does not attempt to replenish Spot Instances if capacity is diminished, nor does it submit requests in alternative Spot pools if capacity is not available. When this value is <code>maintain</code>, the Spot Fleet maintains the target capacity. The Spot Fleet places the required requests to meet capacity and automatically replenishes any interrupted instances. Default: <code>maintain</code>. <code>instant</code> is listed but is not used by Spot Fleet.</p>
        pub fn r#type(mut self, input: crate::model::FleetType) -> Self {
            self.r#type = Some(input);
            self
        }
        /// <p>The type of request. Indicates whether the Spot Fleet only requests the target capacity or also attempts to maintain it. When this value is <code>request</code>, the Spot Fleet only places the required requests. It does not attempt to replenish Spot Instances if capacity is diminished, nor does it submit requests in alternative Spot pools if capacity is not available. When this value is <code>maintain</code>, the Spot Fleet maintains the target capacity. The Spot Fleet places the required requests to meet capacity and automatically replenishes any interrupted instances. Default: <code>maintain</code>. <code>instant</code> is listed but is not used by Spot Fleet.</p>
        pub fn set_type(mut self, input: std::option::Option<crate::model::FleetType>) -> Self {
            self.r#type = input;
            self
        }
        /// <p>The start date and time of the request, in UTC format (<i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z). By default, Amazon EC2 starts fulfilling the request immediately.</p>
        pub fn valid_from(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.valid_from = Some(input);
            self
        }
        /// <p>The start date and time of the request, in UTC format (<i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z). By default, Amazon EC2 starts fulfilling the request immediately.</p>
        pub fn set_valid_from(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.valid_from = input;
            self
        }
        /// <p>The end date and time of the request, in UTC format (<i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z). After the end date and time, no new Spot Instance requests are placed or able to fulfill the request. If no value is specified, the Spot Fleet request remains until you cancel it.</p>
        pub fn valid_until(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.valid_until = Some(input);
            self
        }
        /// <p>The end date and time of the request, in UTC format (<i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z). After the end date and time, no new Spot Instance requests are placed or able to fulfill the request. If no value is specified, the Spot Fleet request remains until you cancel it.</p>
        pub fn set_valid_until(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.valid_until = input;
            self
        }
        /// <p>Indicates whether Spot Fleet should replace unhealthy instances.</p>
        pub fn replace_unhealthy_instances(mut self, input: bool) -> Self {
            self.replace_unhealthy_instances = Some(input);
            self
        }
        /// <p>Indicates whether Spot Fleet should replace unhealthy instances.</p>
        pub fn set_replace_unhealthy_instances(mut self, input: std::option::Option<bool>) -> Self {
            self.replace_unhealthy_instances = input;
            self
        }
        /// <p>The behavior when a Spot Instance is interrupted. The default is <code>terminate</code>.</p>
        pub fn instance_interruption_behavior(
            mut self,
            input: crate::model::InstanceInterruptionBehavior,
        ) -> Self {
            self.instance_interruption_behavior = Some(input);
            self
        }
        /// <p>The behavior when a Spot Instance is interrupted. The default is <code>terminate</code>.</p>
        pub fn set_instance_interruption_behavior(
            mut self,
            input: std::option::Option<crate::model::InstanceInterruptionBehavior>,
        ) -> Self {
            self.instance_interruption_behavior = input;
            self
        }
        /// <p>One or more Classic Load Balancers and target groups to attach to the Spot Fleet request. Spot Fleet registers the running Spot Instances with the specified Classic Load Balancers and target groups.</p>
        /// <p>With Network Load Balancers, Spot Fleet cannot register instances that have the following instance types: C1, CC1, CC2, CG1, CG2, CR1, CS1, G1, G2, HI1, HS1, M1, M2, M3, and T1.</p>
        pub fn load_balancers_config(mut self, input: crate::model::LoadBalancersConfig) -> Self {
            self.load_balancers_config = Some(input);
            self
        }
        /// <p>One or more Classic Load Balancers and target groups to attach to the Spot Fleet request. Spot Fleet registers the running Spot Instances with the specified Classic Load Balancers and target groups.</p>
        /// <p>With Network Load Balancers, Spot Fleet cannot register instances that have the following instance types: C1, CC1, CC2, CG1, CG2, CR1, CS1, G1, G2, HI1, HS1, M1, M2, M3, and T1.</p>
        pub fn set_load_balancers_config(
            mut self,
            input: std::option::Option<crate::model::LoadBalancersConfig>,
        ) -> Self {
            self.load_balancers_config = input;
            self
        }
        /// <p>The number of Spot pools across which to allocate your target Spot capacity. Valid only when Spot <b>AllocationStrategy</b> is set to <code>lowest-price</code>. Spot Fleet selects the cheapest Spot pools and evenly allocates your target Spot capacity across the number of Spot pools that you specify.</p>
        /// <p>Note that Spot Fleet attempts to draw Spot Instances from the number of pools that you specify on a best effort basis. If a pool runs out of Spot capacity before fulfilling your target capacity, Spot Fleet will continue to fulfill your request by drawing from the next cheapest pool. To ensure that your target capacity is met, you might receive Spot Instances from more than the number of pools that you specified. Similarly, if most of the pools have no Spot capacity, you might receive your full target capacity from fewer than the number of pools that you specified.</p>
        pub fn instance_pools_to_use_count(mut self, input: i32) -> Self {
            self.instance_pools_to_use_count = Some(input);
            self
        }
        /// <p>The number of Spot pools across which to allocate your target Spot capacity. Valid only when Spot <b>AllocationStrategy</b> is set to <code>lowest-price</code>. Spot Fleet selects the cheapest Spot pools and evenly allocates your target Spot capacity across the number of Spot pools that you specify.</p>
        /// <p>Note that Spot Fleet attempts to draw Spot Instances from the number of pools that you specify on a best effort basis. If a pool runs out of Spot capacity before fulfilling your target capacity, Spot Fleet will continue to fulfill your request by drawing from the next cheapest pool. To ensure that your target capacity is met, you might receive Spot Instances from more than the number of pools that you specified. Similarly, if most of the pools have no Spot capacity, you might receive your full target capacity from fewer than the number of pools that you specified.</p>
        pub fn set_instance_pools_to_use_count(mut self, input: std::option::Option<i32>) -> Self {
            self.instance_pools_to_use_count = input;
            self
        }
        /// <p>Reserved.</p>
        pub fn context(mut self, input: impl Into<std::string::String>) -> Self {
            self.context = Some(input.into());
            self
        }
        /// <p>Reserved.</p>
        pub fn set_context(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.context = input;
            self
        }
        /// <p>The unit for the target capacity. <code>TargetCapacityUnitType</code> can only be specified when <code>InstanceRequirements</code> is specified.</p>
        /// <p>Default: <code>units</code> (translates to number of instances)</p>
        pub fn target_capacity_unit_type(
            mut self,
            input: crate::model::TargetCapacityUnitType,
        ) -> Self {
            self.target_capacity_unit_type = Some(input);
            self
        }
        /// <p>The unit for the target capacity. <code>TargetCapacityUnitType</code> can only be specified when <code>InstanceRequirements</code> is specified.</p>
        /// <p>Default: <code>units</code> (translates to number of instances)</p>
        pub fn set_target_capacity_unit_type(
            mut self,
            input: std::option::Option<crate::model::TargetCapacityUnitType>,
        ) -> Self {
            self.target_capacity_unit_type = input;
            self
        }
        /// Appends an item to `tag_specifications`.
        ///
        /// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
        ///
        /// <p>The key-value pair for tagging the Spot Fleet request on creation. The value for <code>ResourceType</code> must be <code>spot-fleet-request</code>, otherwise the Spot Fleet request fails. To tag instances at launch, specify the tags in the <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html#create-launch-template">launch template</a> (valid only if you use <code>LaunchTemplateConfigs</code>) or in the <code> <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_SpotFleetTagSpecification.html">SpotFleetTagSpecification</a> </code> (valid only if you use <code>LaunchSpecifications</code>). For information about tagging after launch, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html#tag-resources">Tagging Your Resources</a>.</p>
        pub fn tag_specifications(mut self, input: crate::model::TagSpecification) -> Self {
            let mut v = self.tag_specifications.unwrap_or_default();
            v.push(input);
            self.tag_specifications = Some(v);
            self
        }
        /// <p>The key-value pair for tagging the Spot Fleet request on creation. The value for <code>ResourceType</code> must be <code>spot-fleet-request</code>, otherwise the Spot Fleet request fails. To tag instances at launch, specify the tags in the <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html#create-launch-template">launch template</a> (valid only if you use <code>LaunchTemplateConfigs</code>) or in the <code> <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_SpotFleetTagSpecification.html">SpotFleetTagSpecification</a> </code> (valid only if you use <code>LaunchSpecifications</code>). For information about tagging after launch, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html#tag-resources">Tagging Your Resources</a>.</p>
        pub fn set_tag_specifications(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::TagSpecification>>,
        ) -> Self {
            self.tag_specifications = input;
            self
        }
        /// Consumes the builder and constructs a [`SpotFleetRequestConfigData`](crate::model::SpotFleetRequestConfigData).
        pub fn build(self) -> crate::model::SpotFleetRequestConfigData {
            crate::model::SpotFleetRequestConfigData {
                allocation_strategy: self.allocation_strategy,
                on_demand_allocation_strategy: self.on_demand_allocation_strategy,
                spot_maintenance_strategies: self.spot_maintenance_strategies,
                client_token: self.client_token,
                excess_capacity_termination_policy: self.excess_capacity_termination_policy,
                fulfilled_capacity: self.fulfilled_capacity,
                on_demand_fulfilled_capacity: self.on_demand_fulfilled_capacity,
                iam_fleet_role: self.iam_fleet_role,
                launch_specifications: self.launch_specifications,
                launch_template_configs: self.launch_template_configs,
                spot_price: self.spot_price,
                target_capacity: self.target_capacity,
                on_demand_target_capacity: self.on_demand_target_capacity,
                on_demand_max_total_price: self.on_demand_max_total_price,
                spot_max_total_price: self.spot_max_total_price,
                terminate_instances_with_expiration: self.terminate_instances_with_expiration,
                r#type: self.r#type,
                valid_from: self.valid_from,
                valid_until: self.valid_until,
                replace_unhealthy_instances: self.replace_unhealthy_instances,
                instance_interruption_behavior: self.instance_interruption_behavior,
                load_balancers_config: self.load_balancers_config,
                instance_pools_to_use_count: self.instance_pools_to_use_count,
                context: self.context,
                target_capacity_unit_type: self.target_capacity_unit_type,
                tag_specifications: self.tag_specifications,
            }
        }
    }
}
impl SpotFleetRequestConfigData {
    /// Creates a new builder-style object to manufacture [`SpotFleetRequestConfigData`](crate::model::SpotFleetRequestConfigData).
    pub fn builder() -> crate::model::spot_fleet_request_config_data::Builder {
        crate::model::spot_fleet_request_config_data::Builder::default()
    }
}

/// When writing a match expression against `TargetCapacityUnitType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let targetcapacityunittype = unimplemented!();
/// match targetcapacityunittype {
///     TargetCapacityUnitType::MemoryMib => { /* ... */ },
///     TargetCapacityUnitType::Units => { /* ... */ },
///     TargetCapacityUnitType::Vcpu => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `targetcapacityunittype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `TargetCapacityUnitType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `TargetCapacityUnitType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `TargetCapacityUnitType::NewFeature` is defined.
/// Specifically, when `targetcapacityunittype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `TargetCapacityUnitType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 TargetCapacityUnitType {
    #[allow(missing_docs)] // documentation missing in model
    MemoryMib,
    #[allow(missing_docs)] // documentation missing in model
    Units,
    #[allow(missing_docs)] // documentation missing in model
    Vcpu,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for TargetCapacityUnitType {
    fn from(s: &str) -> Self {
        match s {
            "memory-mib" => TargetCapacityUnitType::MemoryMib,
            "units" => TargetCapacityUnitType::Units,
            "vcpu" => TargetCapacityUnitType::Vcpu,
            other => {
                TargetCapacityUnitType::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for TargetCapacityUnitType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(TargetCapacityUnitType::from(s))
    }
}
impl TargetCapacityUnitType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            TargetCapacityUnitType::MemoryMib => "memory-mib",
            TargetCapacityUnitType::Units => "units",
            TargetCapacityUnitType::Vcpu => "vcpu",
            TargetCapacityUnitType::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["memory-mib", "units", "vcpu"]
    }
}
impl AsRef<str> for TargetCapacityUnitType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes the Classic Load Balancers and target groups to attach to a Spot Fleet request.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LoadBalancersConfig {
    /// <p>The Classic Load Balancers.</p>
    #[doc(hidden)]
    pub classic_load_balancers_config:
        std::option::Option<crate::model::ClassicLoadBalancersConfig>,
    /// <p>The target groups.</p>
    #[doc(hidden)]
    pub target_groups_config: std::option::Option<crate::model::TargetGroupsConfig>,
}
impl LoadBalancersConfig {
    /// <p>The Classic Load Balancers.</p>
    pub fn classic_load_balancers_config(
        &self,
    ) -> std::option::Option<&crate::model::ClassicLoadBalancersConfig> {
        self.classic_load_balancers_config.as_ref()
    }
    /// <p>The target groups.</p>
    pub fn target_groups_config(&self) -> std::option::Option<&crate::model::TargetGroupsConfig> {
        self.target_groups_config.as_ref()
    }
}
/// See [`LoadBalancersConfig`](crate::model::LoadBalancersConfig).
pub mod load_balancers_config {

    /// A builder for [`LoadBalancersConfig`](crate::model::LoadBalancersConfig).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) classic_load_balancers_config:
            std::option::Option<crate::model::ClassicLoadBalancersConfig>,
        pub(crate) target_groups_config: std::option::Option<crate::model::TargetGroupsConfig>,
    }
    impl Builder {
        /// <p>The Classic Load Balancers.</p>
        pub fn classic_load_balancers_config(
            mut self,
            input: crate::model::ClassicLoadBalancersConfig,
        ) -> Self {
            self.classic_load_balancers_config = Some(input);
            self
        }
        /// <p>The Classic Load Balancers.</p>
        pub fn set_classic_load_balancers_config(
            mut self,
            input: std::option::Option<crate::model::ClassicLoadBalancersConfig>,
        ) -> Self {
            self.classic_load_balancers_config = input;
            self
        }
        /// <p>The target groups.</p>
        pub fn target_groups_config(mut self, input: crate::model::TargetGroupsConfig) -> Self {
            self.target_groups_config = Some(input);
            self
        }
        /// <p>The target groups.</p>
        pub fn set_target_groups_config(
            mut self,
            input: std::option::Option<crate::model::TargetGroupsConfig>,
        ) -> Self {
            self.target_groups_config = input;
            self
        }
        /// Consumes the builder and constructs a [`LoadBalancersConfig`](crate::model::LoadBalancersConfig).
        pub fn build(self) -> crate::model::LoadBalancersConfig {
            crate::model::LoadBalancersConfig {
                classic_load_balancers_config: self.classic_load_balancers_config,
                target_groups_config: self.target_groups_config,
            }
        }
    }
}
impl LoadBalancersConfig {
    /// Creates a new builder-style object to manufacture [`LoadBalancersConfig`](crate::model::LoadBalancersConfig).
    pub fn builder() -> crate::model::load_balancers_config::Builder {
        crate::model::load_balancers_config::Builder::default()
    }
}

/// <p>Describes the target groups to attach to a Spot Fleet. Spot Fleet registers the running Spot Instances with these target groups.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TargetGroupsConfig {
    /// <p>One or more target groups.</p>
    #[doc(hidden)]
    pub target_groups: std::option::Option<std::vec::Vec<crate::model::TargetGroup>>,
}
impl TargetGroupsConfig {
    /// <p>One or more target groups.</p>
    pub fn target_groups(&self) -> std::option::Option<&[crate::model::TargetGroup]> {
        self.target_groups.as_deref()
    }
}
/// See [`TargetGroupsConfig`](crate::model::TargetGroupsConfig).
pub mod target_groups_config {

    /// A builder for [`TargetGroupsConfig`](crate::model::TargetGroupsConfig).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) target_groups: std::option::Option<std::vec::Vec<crate::model::TargetGroup>>,
    }
    impl Builder {
        /// Appends an item to `target_groups`.
        ///
        /// To override the contents of this collection use [`set_target_groups`](Self::set_target_groups).
        ///
        /// <p>One or more target groups.</p>
        pub fn target_groups(mut self, input: crate::model::TargetGroup) -> Self {
            let mut v = self.target_groups.unwrap_or_default();
            v.push(input);
            self.target_groups = Some(v);
            self
        }
        /// <p>One or more target groups.</p>
        pub fn set_target_groups(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::TargetGroup>>,
        ) -> Self {
            self.target_groups = input;
            self
        }
        /// Consumes the builder and constructs a [`TargetGroupsConfig`](crate::model::TargetGroupsConfig).
        pub fn build(self) -> crate::model::TargetGroupsConfig {
            crate::model::TargetGroupsConfig {
                target_groups: self.target_groups,
            }
        }
    }
}
impl TargetGroupsConfig {
    /// Creates a new builder-style object to manufacture [`TargetGroupsConfig`](crate::model::TargetGroupsConfig).
    pub fn builder() -> crate::model::target_groups_config::Builder {
        crate::model::target_groups_config::Builder::default()
    }
}

/// <p>Describes a load balancer target group.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TargetGroup {
    /// <p>The Amazon Resource Name (ARN) of the target group.</p>
    #[doc(hidden)]
    pub arn: std::option::Option<std::string::String>,
}
impl TargetGroup {
    /// <p>The Amazon Resource Name (ARN) of the target group.</p>
    pub fn arn(&self) -> std::option::Option<&str> {
        self.arn.as_deref()
    }
}
/// See [`TargetGroup`](crate::model::TargetGroup).
pub mod target_group {

    /// A builder for [`TargetGroup`](crate::model::TargetGroup).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) arn: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The Amazon Resource Name (ARN) of the target group.</p>
        pub fn arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.arn = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the target group.</p>
        pub fn set_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.arn = input;
            self
        }
        /// Consumes the builder and constructs a [`TargetGroup`](crate::model::TargetGroup).
        pub fn build(self) -> crate::model::TargetGroup {
            crate::model::TargetGroup { arn: self.arn }
        }
    }
}
impl TargetGroup {
    /// Creates a new builder-style object to manufacture [`TargetGroup`](crate::model::TargetGroup).
    pub fn builder() -> crate::model::target_group::Builder {
        crate::model::target_group::Builder::default()
    }
}

/// <p>Describes the Classic Load Balancers to attach to a Spot Fleet. Spot Fleet registers the running Spot Instances with these Classic Load Balancers.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ClassicLoadBalancersConfig {
    /// <p>One or more Classic Load Balancers.</p>
    #[doc(hidden)]
    pub classic_load_balancers:
        std::option::Option<std::vec::Vec<crate::model::ClassicLoadBalancer>>,
}
impl ClassicLoadBalancersConfig {
    /// <p>One or more Classic Load Balancers.</p>
    pub fn classic_load_balancers(
        &self,
    ) -> std::option::Option<&[crate::model::ClassicLoadBalancer]> {
        self.classic_load_balancers.as_deref()
    }
}
/// See [`ClassicLoadBalancersConfig`](crate::model::ClassicLoadBalancersConfig).
pub mod classic_load_balancers_config {

    /// A builder for [`ClassicLoadBalancersConfig`](crate::model::ClassicLoadBalancersConfig).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) classic_load_balancers:
            std::option::Option<std::vec::Vec<crate::model::ClassicLoadBalancer>>,
    }
    impl Builder {
        /// Appends an item to `classic_load_balancers`.
        ///
        /// To override the contents of this collection use [`set_classic_load_balancers`](Self::set_classic_load_balancers).
        ///
        /// <p>One or more Classic Load Balancers.</p>
        pub fn classic_load_balancers(mut self, input: crate::model::ClassicLoadBalancer) -> Self {
            let mut v = self.classic_load_balancers.unwrap_or_default();
            v.push(input);
            self.classic_load_balancers = Some(v);
            self
        }
        /// <p>One or more Classic Load Balancers.</p>
        pub fn set_classic_load_balancers(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::ClassicLoadBalancer>>,
        ) -> Self {
            self.classic_load_balancers = input;
            self
        }
        /// Consumes the builder and constructs a [`ClassicLoadBalancersConfig`](crate::model::ClassicLoadBalancersConfig).
        pub fn build(self) -> crate::model::ClassicLoadBalancersConfig {
            crate::model::ClassicLoadBalancersConfig {
                classic_load_balancers: self.classic_load_balancers,
            }
        }
    }
}
impl ClassicLoadBalancersConfig {
    /// Creates a new builder-style object to manufacture [`ClassicLoadBalancersConfig`](crate::model::ClassicLoadBalancersConfig).
    pub fn builder() -> crate::model::classic_load_balancers_config::Builder {
        crate::model::classic_load_balancers_config::Builder::default()
    }
}

/// <p>Describes a Classic Load Balancer.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ClassicLoadBalancer {
    /// <p>The name of the load balancer.</p>
    #[doc(hidden)]
    pub name: std::option::Option<std::string::String>,
}
impl ClassicLoadBalancer {
    /// <p>The name of the load balancer.</p>
    pub fn name(&self) -> std::option::Option<&str> {
        self.name.as_deref()
    }
}
/// See [`ClassicLoadBalancer`](crate::model::ClassicLoadBalancer).
pub mod classic_load_balancer {

    /// A builder for [`ClassicLoadBalancer`](crate::model::ClassicLoadBalancer).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) name: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The name of the load balancer.</p>
        pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
            self.name = Some(input.into());
            self
        }
        /// <p>The name of the load balancer.</p>
        pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.name = input;
            self
        }
        /// Consumes the builder and constructs a [`ClassicLoadBalancer`](crate::model::ClassicLoadBalancer).
        pub fn build(self) -> crate::model::ClassicLoadBalancer {
            crate::model::ClassicLoadBalancer { name: self.name }
        }
    }
}
impl ClassicLoadBalancer {
    /// Creates a new builder-style object to manufacture [`ClassicLoadBalancer`](crate::model::ClassicLoadBalancer).
    pub fn builder() -> crate::model::classic_load_balancer::Builder {
        crate::model::classic_load_balancer::Builder::default()
    }
}

/// When writing a match expression against `FleetType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let fleettype = unimplemented!();
/// match fleettype {
///     FleetType::Instant => { /* ... */ },
///     FleetType::Maintain => { /* ... */ },
///     FleetType::Request => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `fleettype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `FleetType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `FleetType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `FleetType::NewFeature` is defined.
/// Specifically, when `fleettype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `FleetType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 FleetType {
    #[allow(missing_docs)] // documentation missing in model
    Instant,
    #[allow(missing_docs)] // documentation missing in model
    Maintain,
    #[allow(missing_docs)] // documentation missing in model
    Request,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for FleetType {
    fn from(s: &str) -> Self {
        match s {
            "instant" => FleetType::Instant,
            "maintain" => FleetType::Maintain,
            "request" => FleetType::Request,
            other => FleetType::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for FleetType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(FleetType::from(s))
    }
}
impl FleetType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            FleetType::Instant => "instant",
            FleetType::Maintain => "maintain",
            FleetType::Request => "request",
            FleetType::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["instant", "maintain", "request"]
    }
}
impl AsRef<str> for FleetType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes a launch template and overrides.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LaunchTemplateConfig {
    /// <p>The launch template.</p>
    #[doc(hidden)]
    pub launch_template_specification:
        std::option::Option<crate::model::FleetLaunchTemplateSpecification>,
    /// <p>Any parameters that you specify override the same parameters in the launch template.</p>
    #[doc(hidden)]
    pub overrides: std::option::Option<std::vec::Vec<crate::model::LaunchTemplateOverrides>>,
}
impl LaunchTemplateConfig {
    /// <p>The launch template.</p>
    pub fn launch_template_specification(
        &self,
    ) -> std::option::Option<&crate::model::FleetLaunchTemplateSpecification> {
        self.launch_template_specification.as_ref()
    }
    /// <p>Any parameters that you specify override the same parameters in the launch template.</p>
    pub fn overrides(&self) -> std::option::Option<&[crate::model::LaunchTemplateOverrides]> {
        self.overrides.as_deref()
    }
}
/// See [`LaunchTemplateConfig`](crate::model::LaunchTemplateConfig).
pub mod launch_template_config {

    /// A builder for [`LaunchTemplateConfig`](crate::model::LaunchTemplateConfig).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) launch_template_specification:
            std::option::Option<crate::model::FleetLaunchTemplateSpecification>,
        pub(crate) overrides:
            std::option::Option<std::vec::Vec<crate::model::LaunchTemplateOverrides>>,
    }
    impl Builder {
        /// <p>The launch template.</p>
        pub fn launch_template_specification(
            mut self,
            input: crate::model::FleetLaunchTemplateSpecification,
        ) -> Self {
            self.launch_template_specification = Some(input);
            self
        }
        /// <p>The launch template.</p>
        pub fn set_launch_template_specification(
            mut self,
            input: std::option::Option<crate::model::FleetLaunchTemplateSpecification>,
        ) -> Self {
            self.launch_template_specification = input;
            self
        }
        /// Appends an item to `overrides`.
        ///
        /// To override the contents of this collection use [`set_overrides`](Self::set_overrides).
        ///
        /// <p>Any parameters that you specify override the same parameters in the launch template.</p>
        pub fn overrides(mut self, input: crate::model::LaunchTemplateOverrides) -> Self {
            let mut v = self.overrides.unwrap_or_default();
            v.push(input);
            self.overrides = Some(v);
            self
        }
        /// <p>Any parameters that you specify override the same parameters in the launch template.</p>
        pub fn set_overrides(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::LaunchTemplateOverrides>>,
        ) -> Self {
            self.overrides = input;
            self
        }
        /// Consumes the builder and constructs a [`LaunchTemplateConfig`](crate::model::LaunchTemplateConfig).
        pub fn build(self) -> crate::model::LaunchTemplateConfig {
            crate::model::LaunchTemplateConfig {
                launch_template_specification: self.launch_template_specification,
                overrides: self.overrides,
            }
        }
    }
}
impl LaunchTemplateConfig {
    /// Creates a new builder-style object to manufacture [`LaunchTemplateConfig`](crate::model::LaunchTemplateConfig).
    pub fn builder() -> crate::model::launch_template_config::Builder {
        crate::model::launch_template_config::Builder::default()
    }
}

/// <p>Describes overrides for a launch template.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LaunchTemplateOverrides {
    /// <p>The instance type.</p>
    #[doc(hidden)]
    pub instance_type: std::option::Option<crate::model::InstanceType>,
    /// <p>The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.</p> <important>
    /// <p>If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.</p>
    /// </important>
    #[doc(hidden)]
    pub spot_price: std::option::Option<std::string::String>,
    /// <p>The ID of the subnet in which to launch the instances.</p>
    #[doc(hidden)]
    pub subnet_id: std::option::Option<std::string::String>,
    /// <p>The Availability Zone in which to launch the instances.</p>
    #[doc(hidden)]
    pub availability_zone: std::option::Option<std::string::String>,
    /// <p>The number of units provided by the specified instance type.</p>
    #[doc(hidden)]
    pub weighted_capacity: std::option::Option<f64>,
    /// <p>The priority for the launch template override. The highest priority is launched first.</p>
    /// <p>If <code>OnDemandAllocationStrategy</code> is set to <code>prioritized</code>, Spot Fleet uses priority to determine which launch template override to use first in fulfilling On-Demand capacity.</p>
    /// <p>If the Spot <code>AllocationStrategy</code> is set to <code>capacityOptimizedPrioritized</code>, Spot Fleet uses priority on a best-effort basis to determine which launch template override to use in fulfilling Spot capacity, but optimizes for capacity first.</p>
    /// <p>Valid values are whole numbers starting at <code>0</code>. The lower the number, the higher the priority. If no number is set, the launch template override has the lowest priority. You can set the same priority for different launch template overrides.</p>
    #[doc(hidden)]
    pub priority: std::option::Option<f64>,
    /// <p>The instance requirements. When you specify instance requirements, Amazon EC2 will identify instance types with the provided requirements, and then use your On-Demand and Spot allocation strategies to launch instances from these instance types, in the same way as when you specify a list of instance types.</p> <note>
    /// <p>If you specify <code>InstanceRequirements</code>, you can't specify <code>InstanceType</code>.</p>
    /// </note>
    #[doc(hidden)]
    pub instance_requirements: std::option::Option<crate::model::InstanceRequirements>,
}
impl LaunchTemplateOverrides {
    /// <p>The instance type.</p>
    pub fn instance_type(&self) -> std::option::Option<&crate::model::InstanceType> {
        self.instance_type.as_ref()
    }
    /// <p>The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.</p> <important>
    /// <p>If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.</p>
    /// </important>
    pub fn spot_price(&self) -> std::option::Option<&str> {
        self.spot_price.as_deref()
    }
    /// <p>The ID of the subnet in which to launch the instances.</p>
    pub fn subnet_id(&self) -> std::option::Option<&str> {
        self.subnet_id.as_deref()
    }
    /// <p>The Availability Zone in which to launch the instances.</p>
    pub fn availability_zone(&self) -> std::option::Option<&str> {
        self.availability_zone.as_deref()
    }
    /// <p>The number of units provided by the specified instance type.</p>
    pub fn weighted_capacity(&self) -> std::option::Option<f64> {
        self.weighted_capacity
    }
    /// <p>The priority for the launch template override. The highest priority is launched first.</p>
    /// <p>If <code>OnDemandAllocationStrategy</code> is set to <code>prioritized</code>, Spot Fleet uses priority to determine which launch template override to use first in fulfilling On-Demand capacity.</p>
    /// <p>If the Spot <code>AllocationStrategy</code> is set to <code>capacityOptimizedPrioritized</code>, Spot Fleet uses priority on a best-effort basis to determine which launch template override to use in fulfilling Spot capacity, but optimizes for capacity first.</p>
    /// <p>Valid values are whole numbers starting at <code>0</code>. The lower the number, the higher the priority. If no number is set, the launch template override has the lowest priority. You can set the same priority for different launch template overrides.</p>
    pub fn priority(&self) -> std::option::Option<f64> {
        self.priority
    }
    /// <p>The instance requirements. When you specify instance requirements, Amazon EC2 will identify instance types with the provided requirements, and then use your On-Demand and Spot allocation strategies to launch instances from these instance types, in the same way as when you specify a list of instance types.</p> <note>
    /// <p>If you specify <code>InstanceRequirements</code>, you can't specify <code>InstanceType</code>.</p>
    /// </note>
    pub fn instance_requirements(
        &self,
    ) -> std::option::Option<&crate::model::InstanceRequirements> {
        self.instance_requirements.as_ref()
    }
}
/// See [`LaunchTemplateOverrides`](crate::model::LaunchTemplateOverrides).
pub mod launch_template_overrides {

    /// A builder for [`LaunchTemplateOverrides`](crate::model::LaunchTemplateOverrides).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) instance_type: std::option::Option<crate::model::InstanceType>,
        pub(crate) spot_price: std::option::Option<std::string::String>,
        pub(crate) subnet_id: std::option::Option<std::string::String>,
        pub(crate) availability_zone: std::option::Option<std::string::String>,
        pub(crate) weighted_capacity: std::option::Option<f64>,
        pub(crate) priority: std::option::Option<f64>,
        pub(crate) instance_requirements: std::option::Option<crate::model::InstanceRequirements>,
    }
    impl Builder {
        /// <p>The instance type.</p>
        pub fn instance_type(mut self, input: crate::model::InstanceType) -> Self {
            self.instance_type = Some(input);
            self
        }
        /// <p>The instance type.</p>
        pub fn set_instance_type(
            mut self,
            input: std::option::Option<crate::model::InstanceType>,
        ) -> Self {
            self.instance_type = input;
            self
        }
        /// <p>The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.</p> <important>
        /// <p>If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.</p>
        /// </important>
        pub fn spot_price(mut self, input: impl Into<std::string::String>) -> Self {
            self.spot_price = Some(input.into());
            self
        }
        /// <p>The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.</p> <important>
        /// <p>If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.</p>
        /// </important>
        pub fn set_spot_price(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.spot_price = input;
            self
        }
        /// <p>The ID of the subnet in which to launch the instances.</p>
        pub fn subnet_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.subnet_id = Some(input.into());
            self
        }
        /// <p>The ID of the subnet in which to launch the instances.</p>
        pub fn set_subnet_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.subnet_id = input;
            self
        }
        /// <p>The Availability Zone in which to launch the instances.</p>
        pub fn availability_zone(mut self, input: impl Into<std::string::String>) -> Self {
            self.availability_zone = Some(input.into());
            self
        }
        /// <p>The Availability Zone in which to launch the instances.</p>
        pub fn set_availability_zone(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.availability_zone = input;
            self
        }
        /// <p>The number of units provided by the specified instance type.</p>
        pub fn weighted_capacity(mut self, input: f64) -> Self {
            self.weighted_capacity = Some(input);
            self
        }
        /// <p>The number of units provided by the specified instance type.</p>
        pub fn set_weighted_capacity(mut self, input: std::option::Option<f64>) -> Self {
            self.weighted_capacity = input;
            self
        }
        /// <p>The priority for the launch template override. The highest priority is launched first.</p>
        /// <p>If <code>OnDemandAllocationStrategy</code> is set to <code>prioritized</code>, Spot Fleet uses priority to determine which launch template override to use first in fulfilling On-Demand capacity.</p>
        /// <p>If the Spot <code>AllocationStrategy</code> is set to <code>capacityOptimizedPrioritized</code>, Spot Fleet uses priority on a best-effort basis to determine which launch template override to use in fulfilling Spot capacity, but optimizes for capacity first.</p>
        /// <p>Valid values are whole numbers starting at <code>0</code>. The lower the number, the higher the priority. If no number is set, the launch template override has the lowest priority. You can set the same priority for different launch template overrides.</p>
        pub fn priority(mut self, input: f64) -> Self {
            self.priority = Some(input);
            self
        }
        /// <p>The priority for the launch template override. The highest priority is launched first.</p>
        /// <p>If <code>OnDemandAllocationStrategy</code> is set to <code>prioritized</code>, Spot Fleet uses priority to determine which launch template override to use first in fulfilling On-Demand capacity.</p>
        /// <p>If the Spot <code>AllocationStrategy</code> is set to <code>capacityOptimizedPrioritized</code>, Spot Fleet uses priority on a best-effort basis to determine which launch template override to use in fulfilling Spot capacity, but optimizes for capacity first.</p>
        /// <p>Valid values are whole numbers starting at <code>0</code>. The lower the number, the higher the priority. If no number is set, the launch template override has the lowest priority. You can set the same priority for different launch template overrides.</p>
        pub fn set_priority(mut self, input: std::option::Option<f64>) -> Self {
            self.priority = input;
            self
        }
        /// <p>The instance requirements. When you specify instance requirements, Amazon EC2 will identify instance types with the provided requirements, and then use your On-Demand and Spot allocation strategies to launch instances from these instance types, in the same way as when you specify a list of instance types.</p> <note>
        /// <p>If you specify <code>InstanceRequirements</code>, you can't specify <code>InstanceType</code>.</p>
        /// </note>
        pub fn instance_requirements(mut self, input: crate::model::InstanceRequirements) -> Self {
            self.instance_requirements = Some(input);
            self
        }
        /// <p>The instance requirements. When you specify instance requirements, Amazon EC2 will identify instance types with the provided requirements, and then use your On-Demand and Spot allocation strategies to launch instances from these instance types, in the same way as when you specify a list of instance types.</p> <note>
        /// <p>If you specify <code>InstanceRequirements</code>, you can't specify <code>InstanceType</code>.</p>
        /// </note>
        pub fn set_instance_requirements(
            mut self,
            input: std::option::Option<crate::model::InstanceRequirements>,
        ) -> Self {
            self.instance_requirements = input;
            self
        }
        /// Consumes the builder and constructs a [`LaunchTemplateOverrides`](crate::model::LaunchTemplateOverrides).
        pub fn build(self) -> crate::model::LaunchTemplateOverrides {
            crate::model::LaunchTemplateOverrides {
                instance_type: self.instance_type,
                spot_price: self.spot_price,
                subnet_id: self.subnet_id,
                availability_zone: self.availability_zone,
                weighted_capacity: self.weighted_capacity,
                priority: self.priority,
                instance_requirements: self.instance_requirements,
            }
        }
    }
}
impl LaunchTemplateOverrides {
    /// Creates a new builder-style object to manufacture [`LaunchTemplateOverrides`](crate::model::LaunchTemplateOverrides).
    pub fn builder() -> crate::model::launch_template_overrides::Builder {
        crate::model::launch_template_overrides::Builder::default()
    }
}

/// <p>The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with these attributes.</p>
/// <p>When you specify multiple attributes, you get instance types that satisfy all of the specified attributes. If you specify multiple values for an attribute, you get instance types that satisfy any of the specified values.</p>
/// <p>To limit the list of instance types from which Amazon EC2 can identify matching instance types, you can use one of the following parameters, but not both in the same request:</p>
/// <ul>
/// <li> <p> <code>AllowedInstanceTypes</code> - The instance types to include in the list. All other instance types are ignored, even if they match your specified attributes.</p> </li>
/// <li> <p> <code>ExcludedInstanceTypes</code> - The instance types to exclude from the list, even if they match your specified attributes.</p> </li>
/// </ul> <note>
/// <p>You must specify <code>VCpuCount</code> and <code>MemoryMiB</code>. All other attributes are optional. Any unspecified optional attribute is set to its default.</p>
/// </note>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet-attribute-based-instance-type-selection.html">Attribute-based instance type selection for EC2 Fleet</a>, <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-fleet-attribute-based-instance-type-selection.html">Attribute-based instance type selection for Spot Fleet</a>, and <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-placement-score.html">Spot placement score</a> in the <i>Amazon EC2 User Guide</i>.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InstanceRequirements {
    /// <p>The minimum and maximum number of vCPUs.</p>
    #[doc(hidden)]
    pub v_cpu_count: std::option::Option<crate::model::VCpuCountRange>,
    /// <p>The minimum and maximum amount of memory, in MiB.</p>
    #[doc(hidden)]
    pub memory_mi_b: std::option::Option<crate::model::MemoryMiB>,
    /// <p>The CPU manufacturers to include.</p>
    /// <ul>
    /// <li> <p>For instance types with Intel CPUs, specify <code>intel</code>.</p> </li>
    /// <li> <p>For instance types with AMD CPUs, specify <code>amd</code>.</p> </li>
    /// <li> <p>For instance types with Amazon Web Services CPUs, specify <code>amazon-web-services</code>.</p> </li>
    /// </ul> <note>
    /// <p>Don't confuse the CPU manufacturer with the CPU architecture. Instances will be launched with a compatible CPU architecture based on the Amazon Machine Image (AMI) that you specify in your launch template.</p>
    /// </note>
    /// <p>Default: Any manufacturer</p>
    #[doc(hidden)]
    pub cpu_manufacturers: std::option::Option<std::vec::Vec<crate::model::CpuManufacturer>>,
    /// <p>The minimum and maximum amount of memory per vCPU, in GiB.</p>
    /// <p>Default: No minimum or maximum limits</p>
    #[doc(hidden)]
    pub memory_gi_b_per_v_cpu: std::option::Option<crate::model::MemoryGiBPerVCpu>,
    /// <p>The instance types to exclude.</p>
    /// <p>You can use strings with one or more wild cards, represented by an asterisk (<code>*</code>), to exclude an instance type, size, or generation. The following are examples: <code>m5.8xlarge</code>, <code>c5*.*</code>, <code>m5a.*</code>, <code>r*</code>, <code>*3*</code>.</p>
    /// <p>For example, if you specify <code>c5*</code>,Amazon EC2 will exclude the entire C5 instance family, which includes all C5a and C5n instance types. If you specify <code>m5a.*</code>, Amazon EC2 will exclude all the M5a instance types, but not the M5n instance types.</p> <note>
    /// <p>If you specify <code>ExcludedInstanceTypes</code>, you can't specify <code>AllowedInstanceTypes</code>.</p>
    /// </note>
    /// <p>Default: No excluded instance types</p>
    #[doc(hidden)]
    pub excluded_instance_types: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>Indicates whether current or previous generation instance types are included. The current generation instance types are recommended for use. Current generation instance types are typically the latest two to three generations in each instance family. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html">Instance types</a> in the <i>Amazon EC2 User Guide</i>.</p>
    /// <p>For current generation instance types, specify <code>current</code>.</p>
    /// <p>For previous generation instance types, specify <code>previous</code>.</p>
    /// <p>Default: Current and previous generation instance types</p>
    #[doc(hidden)]
    pub instance_generations: std::option::Option<std::vec::Vec<crate::model::InstanceGeneration>>,
    /// <p>The price protection threshold for Spot Instances. This is the maximum you’ll pay for a Spot Instance, expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.</p>
    /// <p>The parameter accepts an integer, which Amazon EC2 interprets as a percentage.</p>
    /// <p>To turn off price protection, specify a high value, such as <code>999999</code>.</p>
    /// <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetSpotPlacementScores.html">GetSpotPlacementScores</a> and <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetInstanceTypesFromInstanceRequirements.html">GetInstanceTypesFromInstanceRequirements</a>.</p> <note>
    /// <p>If you set <code>TargetCapacityUnitType</code> to <code>vcpu</code> or <code>memory-mib</code>, the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.</p>
    /// </note>
    /// <p>Default: <code>100</code> </p>
    #[doc(hidden)]
    pub spot_max_price_percentage_over_lowest_price: std::option::Option<i32>,
    /// <p>The price protection threshold for On-Demand Instances. This is the maximum you’ll pay for an On-Demand Instance, expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.</p>
    /// <p>The parameter accepts an integer, which Amazon EC2 interprets as a percentage.</p>
    /// <p>To turn off price protection, specify a high value, such as <code>999999</code>.</p>
    /// <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetSpotPlacementScores.html">GetSpotPlacementScores</a> and <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetInstanceTypesFromInstanceRequirements.html">GetInstanceTypesFromInstanceRequirements</a>.</p> <note>
    /// <p>If you set <code>TargetCapacityUnitType</code> to <code>vcpu</code> or <code>memory-mib</code>, the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.</p>
    /// </note>
    /// <p>Default: <code>20</code> </p>
    #[doc(hidden)]
    pub on_demand_max_price_percentage_over_lowest_price: std::option::Option<i32>,
    /// <p>Indicates whether bare metal instance types must be included, excluded, or required.</p>
    /// <ul>
    /// <li> <p>To include bare metal instance types, specify <code>included</code>.</p> </li>
    /// <li> <p>To require only bare metal instance types, specify <code>required</code>.</p> </li>
    /// <li> <p>To exclude bare metal instance types, specify <code>excluded</code>.</p> </li>
    /// </ul>
    /// <p>Default: <code>excluded</code> </p>
    #[doc(hidden)]
    pub bare_metal: std::option::Option<crate::model::BareMetal>,
    /// <p>Indicates whether burstable performance T instance types are included, excluded, or required. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances.html">Burstable performance instances</a>.</p>
    /// <ul>
    /// <li> <p>To include burstable performance instance types, specify <code>included</code>.</p> </li>
    /// <li> <p>To require only burstable performance instance types, specify <code>required</code>.</p> </li>
    /// <li> <p>To exclude burstable performance instance types, specify <code>excluded</code>.</p> </li>
    /// </ul>
    /// <p>Default: <code>excluded</code> </p>
    #[doc(hidden)]
    pub burstable_performance: std::option::Option<crate::model::BurstablePerformance>,
    /// <p>Indicates whether instance types must support hibernation for On-Demand Instances.</p>
    /// <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetSpotPlacementScores.html">GetSpotPlacementScores</a>.</p>
    /// <p>Default: <code>false</code> </p>
    #[doc(hidden)]
    pub require_hibernate_support: std::option::Option<bool>,
    /// <p>The minimum and maximum number of network interfaces.</p>
    /// <p>Default: No minimum or maximum limits</p>
    #[doc(hidden)]
    pub network_interface_count: std::option::Option<crate::model::NetworkInterfaceCount>,
    /// <p>Indicates whether instance types with instance store volumes are included, excluded, or required. For more information, <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/InstanceStorage.html">Amazon EC2 instance store</a> in the <i>Amazon EC2 User Guide</i>.</p>
    /// <ul>
    /// <li> <p>To include instance types with instance store volumes, specify <code>included</code>.</p> </li>
    /// <li> <p>To require only instance types with instance store volumes, specify <code>required</code>.</p> </li>
    /// <li> <p>To exclude instance types with instance store volumes, specify <code>excluded</code>.</p> </li>
    /// </ul>
    /// <p>Default: <code>included</code> </p>
    #[doc(hidden)]
    pub local_storage: std::option::Option<crate::model::LocalStorage>,
    /// <p>The type of local storage that is required.</p>
    /// <ul>
    /// <li> <p>For instance types with hard disk drive (HDD) storage, specify <code>hdd</code>.</p> </li>
    /// <li> <p>For instance types with solid state drive (SSD) storage, specify <code>ssd</code>.</p> </li>
    /// </ul>
    /// <p>Default: <code>hdd</code> and <code>ssd</code> </p>
    #[doc(hidden)]
    pub local_storage_types: std::option::Option<std::vec::Vec<crate::model::LocalStorageType>>,
    /// <p>The minimum and maximum amount of total local storage, in GB.</p>
    /// <p>Default: No minimum or maximum limits</p>
    #[doc(hidden)]
    pub total_local_storage_gb: std::option::Option<crate::model::TotalLocalStorageGb>,
    /// <p>The minimum and maximum baseline bandwidth to Amazon EBS, in Mbps. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-optimized.html">Amazon EBS–optimized instances</a> in the <i>Amazon EC2 User Guide</i>.</p>
    /// <p>Default: No minimum or maximum limits</p>
    #[doc(hidden)]
    pub baseline_ebs_bandwidth_mbps: std::option::Option<crate::model::BaselineEbsBandwidthMbps>,
    /// <p>The accelerator types that must be on the instance type.</p>
    /// <ul>
    /// <li> <p>For instance types with GPU accelerators, specify <code>gpu</code>.</p> </li>
    /// <li> <p>For instance types with FPGA accelerators, specify <code>fpga</code>.</p> </li>
    /// <li> <p>For instance types with inference accelerators, specify <code>inference</code>.</p> </li>
    /// </ul>
    /// <p>Default: Any accelerator type</p>
    #[doc(hidden)]
    pub accelerator_types: std::option::Option<std::vec::Vec<crate::model::AcceleratorType>>,
    /// <p>The minimum and maximum number of accelerators (GPUs, FPGAs, or Amazon Web Services Inferentia chips) on an instance.</p>
    /// <p>To exclude accelerator-enabled instance types, set <code>Max</code> to <code>0</code>.</p>
    /// <p>Default: No minimum or maximum limits</p>
    #[doc(hidden)]
    pub accelerator_count: std::option::Option<crate::model::AcceleratorCount>,
    /// <p>Indicates whether instance types must have accelerators by specific manufacturers.</p>
    /// <ul>
    /// <li> <p>For instance types with NVIDIA devices, specify <code>nvidia</code>.</p> </li>
    /// <li> <p>For instance types with AMD devices, specify <code>amd</code>.</p> </li>
    /// <li> <p>For instance types with Amazon Web Services devices, specify <code>amazon-web-services</code>.</p> </li>
    /// <li> <p>For instance types with Xilinx devices, specify <code>xilinx</code>.</p> </li>
    /// </ul>
    /// <p>Default: Any manufacturer</p>
    #[doc(hidden)]
    pub accelerator_manufacturers:
        std::option::Option<std::vec::Vec<crate::model::AcceleratorManufacturer>>,
    /// <p>The accelerators that must be on the instance type.</p>
    /// <ul>
    /// <li> <p>For instance types with NVIDIA A100 GPUs, specify <code>a100</code>.</p> </li>
    /// <li> <p>For instance types with NVIDIA V100 GPUs, specify <code>v100</code>.</p> </li>
    /// <li> <p>For instance types with NVIDIA K80 GPUs, specify <code>k80</code>.</p> </li>
    /// <li> <p>For instance types with NVIDIA T4 GPUs, specify <code>t4</code>.</p> </li>
    /// <li> <p>For instance types with NVIDIA M60 GPUs, specify <code>m60</code>.</p> </li>
    /// <li> <p>For instance types with AMD Radeon Pro V520 GPUs, specify <code>radeon-pro-v520</code>.</p> </li>
    /// <li> <p>For instance types with Xilinx VU9P FPGAs, specify <code>vu9p</code>.</p> </li>
    /// <li> <p>For instance types with Amazon Web Services Inferentia chips, specify <code>inferentia</code>.</p> </li>
    /// <li> <p>For instance types with NVIDIA GRID K520 GPUs, specify <code>k520</code>.</p> </li>
    /// </ul>
    /// <p>Default: Any accelerator</p>
    #[doc(hidden)]
    pub accelerator_names: std::option::Option<std::vec::Vec<crate::model::AcceleratorName>>,
    /// <p>The minimum and maximum amount of total accelerator memory, in MiB.</p>
    /// <p>Default: No minimum or maximum limits</p>
    #[doc(hidden)]
    pub accelerator_total_memory_mi_b: std::option::Option<crate::model::AcceleratorTotalMemoryMiB>,
    /// <p>The minimum and maximum amount of network bandwidth, in gigabits per second (Gbps).</p>
    /// <p>Default: No minimum or maximum limits</p>
    #[doc(hidden)]
    pub network_bandwidth_gbps: std::option::Option<crate::model::NetworkBandwidthGbps>,
    /// <p>The instance types to apply your specified attributes against. All other instance types are ignored, even if they match your specified attributes.</p>
    /// <p>You can use strings with one or more wild cards, represented by an asterisk (<code>*</code>), to allow an instance type, size, or generation. The following are examples: <code>m5.8xlarge</code>, <code>c5*.*</code>, <code>m5a.*</code>, <code>r*</code>, <code>*3*</code>.</p>
    /// <p>For example, if you specify <code>c5*</code>,Amazon EC2 will allow the entire C5 instance family, which includes all C5a and C5n instance types. If you specify <code>m5a.*</code>, Amazon EC2 will allow all the M5a instance types, but not the M5n instance types.</p> <note>
    /// <p>If you specify <code>AllowedInstanceTypes</code>, you can't specify <code>ExcludedInstanceTypes</code>.</p>
    /// </note>
    /// <p>Default: All instance types</p>
    #[doc(hidden)]
    pub allowed_instance_types: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl InstanceRequirements {
    /// <p>The minimum and maximum number of vCPUs.</p>
    pub fn v_cpu_count(&self) -> std::option::Option<&crate::model::VCpuCountRange> {
        self.v_cpu_count.as_ref()
    }
    /// <p>The minimum and maximum amount of memory, in MiB.</p>
    pub fn memory_mi_b(&self) -> std::option::Option<&crate::model::MemoryMiB> {
        self.memory_mi_b.as_ref()
    }
    /// <p>The CPU manufacturers to include.</p>
    /// <ul>
    /// <li> <p>For instance types with Intel CPUs, specify <code>intel</code>.</p> </li>
    /// <li> <p>For instance types with AMD CPUs, specify <code>amd</code>.</p> </li>
    /// <li> <p>For instance types with Amazon Web Services CPUs, specify <code>amazon-web-services</code>.</p> </li>
    /// </ul> <note>
    /// <p>Don't confuse the CPU manufacturer with the CPU architecture. Instances will be launched with a compatible CPU architecture based on the Amazon Machine Image (AMI) that you specify in your launch template.</p>
    /// </note>
    /// <p>Default: Any manufacturer</p>
    pub fn cpu_manufacturers(&self) -> std::option::Option<&[crate::model::CpuManufacturer]> {
        self.cpu_manufacturers.as_deref()
    }
    /// <p>The minimum and maximum amount of memory per vCPU, in GiB.</p>
    /// <p>Default: No minimum or maximum limits</p>
    pub fn memory_gi_b_per_v_cpu(&self) -> std::option::Option<&crate::model::MemoryGiBPerVCpu> {
        self.memory_gi_b_per_v_cpu.as_ref()
    }
    /// <p>The instance types to exclude.</p>
    /// <p>You can use strings with one or more wild cards, represented by an asterisk (<code>*</code>), to exclude an instance type, size, or generation. The following are examples: <code>m5.8xlarge</code>, <code>c5*.*</code>, <code>m5a.*</code>, <code>r*</code>, <code>*3*</code>.</p>
    /// <p>For example, if you specify <code>c5*</code>,Amazon EC2 will exclude the entire C5 instance family, which includes all C5a and C5n instance types. If you specify <code>m5a.*</code>, Amazon EC2 will exclude all the M5a instance types, but not the M5n instance types.</p> <note>
    /// <p>If you specify <code>ExcludedInstanceTypes</code>, you can't specify <code>AllowedInstanceTypes</code>.</p>
    /// </note>
    /// <p>Default: No excluded instance types</p>
    pub fn excluded_instance_types(&self) -> std::option::Option<&[std::string::String]> {
        self.excluded_instance_types.as_deref()
    }
    /// <p>Indicates whether current or previous generation instance types are included. The current generation instance types are recommended for use. Current generation instance types are typically the latest two to three generations in each instance family. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html">Instance types</a> in the <i>Amazon EC2 User Guide</i>.</p>
    /// <p>For current generation instance types, specify <code>current</code>.</p>
    /// <p>For previous generation instance types, specify <code>previous</code>.</p>
    /// <p>Default: Current and previous generation instance types</p>
    pub fn instance_generations(&self) -> std::option::Option<&[crate::model::InstanceGeneration]> {
        self.instance_generations.as_deref()
    }
    /// <p>The price protection threshold for Spot Instances. This is the maximum you’ll pay for a Spot Instance, expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.</p>
    /// <p>The parameter accepts an integer, which Amazon EC2 interprets as a percentage.</p>
    /// <p>To turn off price protection, specify a high value, such as <code>999999</code>.</p>
    /// <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetSpotPlacementScores.html">GetSpotPlacementScores</a> and <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetInstanceTypesFromInstanceRequirements.html">GetInstanceTypesFromInstanceRequirements</a>.</p> <note>
    /// <p>If you set <code>TargetCapacityUnitType</code> to <code>vcpu</code> or <code>memory-mib</code>, the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.</p>
    /// </note>
    /// <p>Default: <code>100</code> </p>
    pub fn spot_max_price_percentage_over_lowest_price(&self) -> std::option::Option<i32> {
        self.spot_max_price_percentage_over_lowest_price
    }
    /// <p>The price protection threshold for On-Demand Instances. This is the maximum you’ll pay for an On-Demand Instance, expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.</p>
    /// <p>The parameter accepts an integer, which Amazon EC2 interprets as a percentage.</p>
    /// <p>To turn off price protection, specify a high value, such as <code>999999</code>.</p>
    /// <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetSpotPlacementScores.html">GetSpotPlacementScores</a> and <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetInstanceTypesFromInstanceRequirements.html">GetInstanceTypesFromInstanceRequirements</a>.</p> <note>
    /// <p>If you set <code>TargetCapacityUnitType</code> to <code>vcpu</code> or <code>memory-mib</code>, the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.</p>
    /// </note>
    /// <p>Default: <code>20</code> </p>
    pub fn on_demand_max_price_percentage_over_lowest_price(&self) -> std::option::Option<i32> {
        self.on_demand_max_price_percentage_over_lowest_price
    }
    /// <p>Indicates whether bare metal instance types must be included, excluded, or required.</p>
    /// <ul>
    /// <li> <p>To include bare metal instance types, specify <code>included</code>.</p> </li>
    /// <li> <p>To require only bare metal instance types, specify <code>required</code>.</p> </li>
    /// <li> <p>To exclude bare metal instance types, specify <code>excluded</code>.</p> </li>
    /// </ul>
    /// <p>Default: <code>excluded</code> </p>
    pub fn bare_metal(&self) -> std::option::Option<&crate::model::BareMetal> {
        self.bare_metal.as_ref()
    }
    /// <p>Indicates whether burstable performance T instance types are included, excluded, or required. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances.html">Burstable performance instances</a>.</p>
    /// <ul>
    /// <li> <p>To include burstable performance instance types, specify <code>included</code>.</p> </li>
    /// <li> <p>To require only burstable performance instance types, specify <code>required</code>.</p> </li>
    /// <li> <p>To exclude burstable performance instance types, specify <code>excluded</code>.</p> </li>
    /// </ul>
    /// <p>Default: <code>excluded</code> </p>
    pub fn burstable_performance(
        &self,
    ) -> std::option::Option<&crate::model::BurstablePerformance> {
        self.burstable_performance.as_ref()
    }
    /// <p>Indicates whether instance types must support hibernation for On-Demand Instances.</p>
    /// <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetSpotPlacementScores.html">GetSpotPlacementScores</a>.</p>
    /// <p>Default: <code>false</code> </p>
    pub fn require_hibernate_support(&self) -> std::option::Option<bool> {
        self.require_hibernate_support
    }
    /// <p>The minimum and maximum number of network interfaces.</p>
    /// <p>Default: No minimum or maximum limits</p>
    pub fn network_interface_count(
        &self,
    ) -> std::option::Option<&crate::model::NetworkInterfaceCount> {
        self.network_interface_count.as_ref()
    }
    /// <p>Indicates whether instance types with instance store volumes are included, excluded, or required. For more information, <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/InstanceStorage.html">Amazon EC2 instance store</a> in the <i>Amazon EC2 User Guide</i>.</p>
    /// <ul>
    /// <li> <p>To include instance types with instance store volumes, specify <code>included</code>.</p> </li>
    /// <li> <p>To require only instance types with instance store volumes, specify <code>required</code>.</p> </li>
    /// <li> <p>To exclude instance types with instance store volumes, specify <code>excluded</code>.</p> </li>
    /// </ul>
    /// <p>Default: <code>included</code> </p>
    pub fn local_storage(&self) -> std::option::Option<&crate::model::LocalStorage> {
        self.local_storage.as_ref()
    }
    /// <p>The type of local storage that is required.</p>
    /// <ul>
    /// <li> <p>For instance types with hard disk drive (HDD) storage, specify <code>hdd</code>.</p> </li>
    /// <li> <p>For instance types with solid state drive (SSD) storage, specify <code>ssd</code>.</p> </li>
    /// </ul>
    /// <p>Default: <code>hdd</code> and <code>ssd</code> </p>
    pub fn local_storage_types(&self) -> std::option::Option<&[crate::model::LocalStorageType]> {
        self.local_storage_types.as_deref()
    }
    /// <p>The minimum and maximum amount of total local storage, in GB.</p>
    /// <p>Default: No minimum or maximum limits</p>
    pub fn total_local_storage_gb(
        &self,
    ) -> std::option::Option<&crate::model::TotalLocalStorageGb> {
        self.total_local_storage_gb.as_ref()
    }
    /// <p>The minimum and maximum baseline bandwidth to Amazon EBS, in Mbps. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-optimized.html">Amazon EBS–optimized instances</a> in the <i>Amazon EC2 User Guide</i>.</p>
    /// <p>Default: No minimum or maximum limits</p>
    pub fn baseline_ebs_bandwidth_mbps(
        &self,
    ) -> std::option::Option<&crate::model::BaselineEbsBandwidthMbps> {
        self.baseline_ebs_bandwidth_mbps.as_ref()
    }
    /// <p>The accelerator types that must be on the instance type.</p>
    /// <ul>
    /// <li> <p>For instance types with GPU accelerators, specify <code>gpu</code>.</p> </li>
    /// <li> <p>For instance types with FPGA accelerators, specify <code>fpga</code>.</p> </li>
    /// <li> <p>For instance types with inference accelerators, specify <code>inference</code>.</p> </li>
    /// </ul>
    /// <p>Default: Any accelerator type</p>
    pub fn accelerator_types(&self) -> std::option::Option<&[crate::model::AcceleratorType]> {
        self.accelerator_types.as_deref()
    }
    /// <p>The minimum and maximum number of accelerators (GPUs, FPGAs, or Amazon Web Services Inferentia chips) on an instance.</p>
    /// <p>To exclude accelerator-enabled instance types, set <code>Max</code> to <code>0</code>.</p>
    /// <p>Default: No minimum or maximum limits</p>
    pub fn accelerator_count(&self) -> std::option::Option<&crate::model::AcceleratorCount> {
        self.accelerator_count.as_ref()
    }
    /// <p>Indicates whether instance types must have accelerators by specific manufacturers.</p>
    /// <ul>
    /// <li> <p>For instance types with NVIDIA devices, specify <code>nvidia</code>.</p> </li>
    /// <li> <p>For instance types with AMD devices, specify <code>amd</code>.</p> </li>
    /// <li> <p>For instance types with Amazon Web Services devices, specify <code>amazon-web-services</code>.</p> </li>
    /// <li> <p>For instance types with Xilinx devices, specify <code>xilinx</code>.</p> </li>
    /// </ul>
    /// <p>Default: Any manufacturer</p>
    pub fn accelerator_manufacturers(
        &self,
    ) -> std::option::Option<&[crate::model::AcceleratorManufacturer]> {
        self.accelerator_manufacturers.as_deref()
    }
    /// <p>The accelerators that must be on the instance type.</p>
    /// <ul>
    /// <li> <p>For instance types with NVIDIA A100 GPUs, specify <code>a100</code>.</p> </li>
    /// <li> <p>For instance types with NVIDIA V100 GPUs, specify <code>v100</code>.</p> </li>
    /// <li> <p>For instance types with NVIDIA K80 GPUs, specify <code>k80</code>.</p> </li>
    /// <li> <p>For instance types with NVIDIA T4 GPUs, specify <code>t4</code>.</p> </li>
    /// <li> <p>For instance types with NVIDIA M60 GPUs, specify <code>m60</code>.</p> </li>
    /// <li> <p>For instance types with AMD Radeon Pro V520 GPUs, specify <code>radeon-pro-v520</code>.</p> </li>
    /// <li> <p>For instance types with Xilinx VU9P FPGAs, specify <code>vu9p</code>.</p> </li>
    /// <li> <p>For instance types with Amazon Web Services Inferentia chips, specify <code>inferentia</code>.</p> </li>
    /// <li> <p>For instance types with NVIDIA GRID K520 GPUs, specify <code>k520</code>.</p> </li>
    /// </ul>
    /// <p>Default: Any accelerator</p>
    pub fn accelerator_names(&self) -> std::option::Option<&[crate::model::AcceleratorName]> {
        self.accelerator_names.as_deref()
    }
    /// <p>The minimum and maximum amount of total accelerator memory, in MiB.</p>
    /// <p>Default: No minimum or maximum limits</p>
    pub fn accelerator_total_memory_mi_b(
        &self,
    ) -> std::option::Option<&crate::model::AcceleratorTotalMemoryMiB> {
        self.accelerator_total_memory_mi_b.as_ref()
    }
    /// <p>The minimum and maximum amount of network bandwidth, in gigabits per second (Gbps).</p>
    /// <p>Default: No minimum or maximum limits</p>
    pub fn network_bandwidth_gbps(
        &self,
    ) -> std::option::Option<&crate::model::NetworkBandwidthGbps> {
        self.network_bandwidth_gbps.as_ref()
    }
    /// <p>The instance types to apply your specified attributes against. All other instance types are ignored, even if they match your specified attributes.</p>
    /// <p>You can use strings with one or more wild cards, represented by an asterisk (<code>*</code>), to allow an instance type, size, or generation. The following are examples: <code>m5.8xlarge</code>, <code>c5*.*</code>, <code>m5a.*</code>, <code>r*</code>, <code>*3*</code>.</p>
    /// <p>For example, if you specify <code>c5*</code>,Amazon EC2 will allow the entire C5 instance family, which includes all C5a and C5n instance types. If you specify <code>m5a.*</code>, Amazon EC2 will allow all the M5a instance types, but not the M5n instance types.</p> <note>
    /// <p>If you specify <code>AllowedInstanceTypes</code>, you can't specify <code>ExcludedInstanceTypes</code>.</p>
    /// </note>
    /// <p>Default: All instance types</p>
    pub fn allowed_instance_types(&self) -> std::option::Option<&[std::string::String]> {
        self.allowed_instance_types.as_deref()
    }
}
/// See [`InstanceRequirements`](crate::model::InstanceRequirements).
pub mod instance_requirements {

    /// A builder for [`InstanceRequirements`](crate::model::InstanceRequirements).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) v_cpu_count: std::option::Option<crate::model::VCpuCountRange>,
        pub(crate) memory_mi_b: std::option::Option<crate::model::MemoryMiB>,
        pub(crate) cpu_manufacturers:
            std::option::Option<std::vec::Vec<crate::model::CpuManufacturer>>,
        pub(crate) memory_gi_b_per_v_cpu: std::option::Option<crate::model::MemoryGiBPerVCpu>,
        pub(crate) excluded_instance_types: std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) instance_generations:
            std::option::Option<std::vec::Vec<crate::model::InstanceGeneration>>,
        pub(crate) spot_max_price_percentage_over_lowest_price: std::option::Option<i32>,
        pub(crate) on_demand_max_price_percentage_over_lowest_price: std::option::Option<i32>,
        pub(crate) bare_metal: std::option::Option<crate::model::BareMetal>,
        pub(crate) burstable_performance: std::option::Option<crate::model::BurstablePerformance>,
        pub(crate) require_hibernate_support: std::option::Option<bool>,
        pub(crate) network_interface_count:
            std::option::Option<crate::model::NetworkInterfaceCount>,
        pub(crate) local_storage: std::option::Option<crate::model::LocalStorage>,
        pub(crate) local_storage_types:
            std::option::Option<std::vec::Vec<crate::model::LocalStorageType>>,
        pub(crate) total_local_storage_gb: std::option::Option<crate::model::TotalLocalStorageGb>,
        pub(crate) baseline_ebs_bandwidth_mbps:
            std::option::Option<crate::model::BaselineEbsBandwidthMbps>,
        pub(crate) accelerator_types:
            std::option::Option<std::vec::Vec<crate::model::AcceleratorType>>,
        pub(crate) accelerator_count: std::option::Option<crate::model::AcceleratorCount>,
        pub(crate) accelerator_manufacturers:
            std::option::Option<std::vec::Vec<crate::model::AcceleratorManufacturer>>,
        pub(crate) accelerator_names:
            std::option::Option<std::vec::Vec<crate::model::AcceleratorName>>,
        pub(crate) accelerator_total_memory_mi_b:
            std::option::Option<crate::model::AcceleratorTotalMemoryMiB>,
        pub(crate) network_bandwidth_gbps: std::option::Option<crate::model::NetworkBandwidthGbps>,
        pub(crate) allowed_instance_types: std::option::Option<std::vec::Vec<std::string::String>>,
    }
    impl Builder {
        /// <p>The minimum and maximum number of vCPUs.</p>
        pub fn v_cpu_count(mut self, input: crate::model::VCpuCountRange) -> Self {
            self.v_cpu_count = Some(input);
            self
        }
        /// <p>The minimum and maximum number of vCPUs.</p>
        pub fn set_v_cpu_count(
            mut self,
            input: std::option::Option<crate::model::VCpuCountRange>,
        ) -> Self {
            self.v_cpu_count = input;
            self
        }
        /// <p>The minimum and maximum amount of memory, in MiB.</p>
        pub fn memory_mi_b(mut self, input: crate::model::MemoryMiB) -> Self {
            self.memory_mi_b = Some(input);
            self
        }
        /// <p>The minimum and maximum amount of memory, in MiB.</p>
        pub fn set_memory_mi_b(
            mut self,
            input: std::option::Option<crate::model::MemoryMiB>,
        ) -> Self {
            self.memory_mi_b = input;
            self
        }
        /// Appends an item to `cpu_manufacturers`.
        ///
        /// To override the contents of this collection use [`set_cpu_manufacturers`](Self::set_cpu_manufacturers).
        ///
        /// <p>The CPU manufacturers to include.</p>
        /// <ul>
        /// <li> <p>For instance types with Intel CPUs, specify <code>intel</code>.</p> </li>
        /// <li> <p>For instance types with AMD CPUs, specify <code>amd</code>.</p> </li>
        /// <li> <p>For instance types with Amazon Web Services CPUs, specify <code>amazon-web-services</code>.</p> </li>
        /// </ul> <note>
        /// <p>Don't confuse the CPU manufacturer with the CPU architecture. Instances will be launched with a compatible CPU architecture based on the Amazon Machine Image (AMI) that you specify in your launch template.</p>
        /// </note>
        /// <p>Default: Any manufacturer</p>
        pub fn cpu_manufacturers(mut self, input: crate::model::CpuManufacturer) -> Self {
            let mut v = self.cpu_manufacturers.unwrap_or_default();
            v.push(input);
            self.cpu_manufacturers = Some(v);
            self
        }
        /// <p>The CPU manufacturers to include.</p>
        /// <ul>
        /// <li> <p>For instance types with Intel CPUs, specify <code>intel</code>.</p> </li>
        /// <li> <p>For instance types with AMD CPUs, specify <code>amd</code>.</p> </li>
        /// <li> <p>For instance types with Amazon Web Services CPUs, specify <code>amazon-web-services</code>.</p> </li>
        /// </ul> <note>
        /// <p>Don't confuse the CPU manufacturer with the CPU architecture. Instances will be launched with a compatible CPU architecture based on the Amazon Machine Image (AMI) that you specify in your launch template.</p>
        /// </note>
        /// <p>Default: Any manufacturer</p>
        pub fn set_cpu_manufacturers(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::CpuManufacturer>>,
        ) -> Self {
            self.cpu_manufacturers = input;
            self
        }
        /// <p>The minimum and maximum amount of memory per vCPU, in GiB.</p>
        /// <p>Default: No minimum or maximum limits</p>
        pub fn memory_gi_b_per_v_cpu(mut self, input: crate::model::MemoryGiBPerVCpu) -> Self {
            self.memory_gi_b_per_v_cpu = Some(input);
            self
        }
        /// <p>The minimum and maximum amount of memory per vCPU, in GiB.</p>
        /// <p>Default: No minimum or maximum limits</p>
        pub fn set_memory_gi_b_per_v_cpu(
            mut self,
            input: std::option::Option<crate::model::MemoryGiBPerVCpu>,
        ) -> Self {
            self.memory_gi_b_per_v_cpu = input;
            self
        }
        /// Appends an item to `excluded_instance_types`.
        ///
        /// To override the contents of this collection use [`set_excluded_instance_types`](Self::set_excluded_instance_types).
        ///
        /// <p>The instance types to exclude.</p>
        /// <p>You can use strings with one or more wild cards, represented by an asterisk (<code>*</code>), to exclude an instance type, size, or generation. The following are examples: <code>m5.8xlarge</code>, <code>c5*.*</code>, <code>m5a.*</code>, <code>r*</code>, <code>*3*</code>.</p>
        /// <p>For example, if you specify <code>c5*</code>,Amazon EC2 will exclude the entire C5 instance family, which includes all C5a and C5n instance types. If you specify <code>m5a.*</code>, Amazon EC2 will exclude all the M5a instance types, but not the M5n instance types.</p> <note>
        /// <p>If you specify <code>ExcludedInstanceTypes</code>, you can't specify <code>AllowedInstanceTypes</code>.</p>
        /// </note>
        /// <p>Default: No excluded instance types</p>
        pub fn excluded_instance_types(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.excluded_instance_types.unwrap_or_default();
            v.push(input.into());
            self.excluded_instance_types = Some(v);
            self
        }
        /// <p>The instance types to exclude.</p>
        /// <p>You can use strings with one or more wild cards, represented by an asterisk (<code>*</code>), to exclude an instance type, size, or generation. The following are examples: <code>m5.8xlarge</code>, <code>c5*.*</code>, <code>m5a.*</code>, <code>r*</code>, <code>*3*</code>.</p>
        /// <p>For example, if you specify <code>c5*</code>,Amazon EC2 will exclude the entire C5 instance family, which includes all C5a and C5n instance types. If you specify <code>m5a.*</code>, Amazon EC2 will exclude all the M5a instance types, but not the M5n instance types.</p> <note>
        /// <p>If you specify <code>ExcludedInstanceTypes</code>, you can't specify <code>AllowedInstanceTypes</code>.</p>
        /// </note>
        /// <p>Default: No excluded instance types</p>
        pub fn set_excluded_instance_types(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.excluded_instance_types = input;
            self
        }
        /// Appends an item to `instance_generations`.
        ///
        /// To override the contents of this collection use [`set_instance_generations`](Self::set_instance_generations).
        ///
        /// <p>Indicates whether current or previous generation instance types are included. The current generation instance types are recommended for use. Current generation instance types are typically the latest two to three generations in each instance family. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html">Instance types</a> in the <i>Amazon EC2 User Guide</i>.</p>
        /// <p>For current generation instance types, specify <code>current</code>.</p>
        /// <p>For previous generation instance types, specify <code>previous</code>.</p>
        /// <p>Default: Current and previous generation instance types</p>
        pub fn instance_generations(mut self, input: crate::model::InstanceGeneration) -> Self {
            let mut v = self.instance_generations.unwrap_or_default();
            v.push(input);
            self.instance_generations = Some(v);
            self
        }
        /// <p>Indicates whether current or previous generation instance types are included. The current generation instance types are recommended for use. Current generation instance types are typically the latest two to three generations in each instance family. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html">Instance types</a> in the <i>Amazon EC2 User Guide</i>.</p>
        /// <p>For current generation instance types, specify <code>current</code>.</p>
        /// <p>For previous generation instance types, specify <code>previous</code>.</p>
        /// <p>Default: Current and previous generation instance types</p>
        pub fn set_instance_generations(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::InstanceGeneration>>,
        ) -> Self {
            self.instance_generations = input;
            self
        }
        /// <p>The price protection threshold for Spot Instances. This is the maximum you’ll pay for a Spot Instance, expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.</p>
        /// <p>The parameter accepts an integer, which Amazon EC2 interprets as a percentage.</p>
        /// <p>To turn off price protection, specify a high value, such as <code>999999</code>.</p>
        /// <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetSpotPlacementScores.html">GetSpotPlacementScores</a> and <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetInstanceTypesFromInstanceRequirements.html">GetInstanceTypesFromInstanceRequirements</a>.</p> <note>
        /// <p>If you set <code>TargetCapacityUnitType</code> to <code>vcpu</code> or <code>memory-mib</code>, the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.</p>
        /// </note>
        /// <p>Default: <code>100</code> </p>
        pub fn spot_max_price_percentage_over_lowest_price(mut self, input: i32) -> Self {
            self.spot_max_price_percentage_over_lowest_price = Some(input);
            self
        }
        /// <p>The price protection threshold for Spot Instances. This is the maximum you’ll pay for a Spot Instance, expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.</p>
        /// <p>The parameter accepts an integer, which Amazon EC2 interprets as a percentage.</p>
        /// <p>To turn off price protection, specify a high value, such as <code>999999</code>.</p>
        /// <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetSpotPlacementScores.html">GetSpotPlacementScores</a> and <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetInstanceTypesFromInstanceRequirements.html">GetInstanceTypesFromInstanceRequirements</a>.</p> <note>
        /// <p>If you set <code>TargetCapacityUnitType</code> to <code>vcpu</code> or <code>memory-mib</code>, the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.</p>
        /// </note>
        /// <p>Default: <code>100</code> </p>
        pub fn set_spot_max_price_percentage_over_lowest_price(
            mut self,
            input: std::option::Option<i32>,
        ) -> Self {
            self.spot_max_price_percentage_over_lowest_price = input;
            self
        }
        /// <p>The price protection threshold for On-Demand Instances. This is the maximum you’ll pay for an On-Demand Instance, expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.</p>
        /// <p>The parameter accepts an integer, which Amazon EC2 interprets as a percentage.</p>
        /// <p>To turn off price protection, specify a high value, such as <code>999999</code>.</p>
        /// <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetSpotPlacementScores.html">GetSpotPlacementScores</a> and <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetInstanceTypesFromInstanceRequirements.html">GetInstanceTypesFromInstanceRequirements</a>.</p> <note>
        /// <p>If you set <code>TargetCapacityUnitType</code> to <code>vcpu</code> or <code>memory-mib</code>, the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.</p>
        /// </note>
        /// <p>Default: <code>20</code> </p>
        pub fn on_demand_max_price_percentage_over_lowest_price(mut self, input: i32) -> Self {
            self.on_demand_max_price_percentage_over_lowest_price = Some(input);
            self
        }
        /// <p>The price protection threshold for On-Demand Instances. This is the maximum you’ll pay for an On-Demand Instance, expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.</p>
        /// <p>The parameter accepts an integer, which Amazon EC2 interprets as a percentage.</p>
        /// <p>To turn off price protection, specify a high value, such as <code>999999</code>.</p>
        /// <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetSpotPlacementScores.html">GetSpotPlacementScores</a> and <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetInstanceTypesFromInstanceRequirements.html">GetInstanceTypesFromInstanceRequirements</a>.</p> <note>
        /// <p>If you set <code>TargetCapacityUnitType</code> to <code>vcpu</code> or <code>memory-mib</code>, the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.</p>
        /// </note>
        /// <p>Default: <code>20</code> </p>
        pub fn set_on_demand_max_price_percentage_over_lowest_price(
            mut self,
            input: std::option::Option<i32>,
        ) -> Self {
            self.on_demand_max_price_percentage_over_lowest_price = input;
            self
        }
        /// <p>Indicates whether bare metal instance types must be included, excluded, or required.</p>
        /// <ul>
        /// <li> <p>To include bare metal instance types, specify <code>included</code>.</p> </li>
        /// <li> <p>To require only bare metal instance types, specify <code>required</code>.</p> </li>
        /// <li> <p>To exclude bare metal instance types, specify <code>excluded</code>.</p> </li>
        /// </ul>
        /// <p>Default: <code>excluded</code> </p>
        pub fn bare_metal(mut self, input: crate::model::BareMetal) -> Self {
            self.bare_metal = Some(input);
            self
        }
        /// <p>Indicates whether bare metal instance types must be included, excluded, or required.</p>
        /// <ul>
        /// <li> <p>To include bare metal instance types, specify <code>included</code>.</p> </li>
        /// <li> <p>To require only bare metal instance types, specify <code>required</code>.</p> </li>
        /// <li> <p>To exclude bare metal instance types, specify <code>excluded</code>.</p> </li>
        /// </ul>
        /// <p>Default: <code>excluded</code> </p>
        pub fn set_bare_metal(
            mut self,
            input: std::option::Option<crate::model::BareMetal>,
        ) -> Self {
            self.bare_metal = input;
            self
        }
        /// <p>Indicates whether burstable performance T instance types are included, excluded, or required. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances.html">Burstable performance instances</a>.</p>
        /// <ul>
        /// <li> <p>To include burstable performance instance types, specify <code>included</code>.</p> </li>
        /// <li> <p>To require only burstable performance instance types, specify <code>required</code>.</p> </li>
        /// <li> <p>To exclude burstable performance instance types, specify <code>excluded</code>.</p> </li>
        /// </ul>
        /// <p>Default: <code>excluded</code> </p>
        pub fn burstable_performance(mut self, input: crate::model::BurstablePerformance) -> Self {
            self.burstable_performance = Some(input);
            self
        }
        /// <p>Indicates whether burstable performance T instance types are included, excluded, or required. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances.html">Burstable performance instances</a>.</p>
        /// <ul>
        /// <li> <p>To include burstable performance instance types, specify <code>included</code>.</p> </li>
        /// <li> <p>To require only burstable performance instance types, specify <code>required</code>.</p> </li>
        /// <li> <p>To exclude burstable performance instance types, specify <code>excluded</code>.</p> </li>
        /// </ul>
        /// <p>Default: <code>excluded</code> </p>
        pub fn set_burstable_performance(
            mut self,
            input: std::option::Option<crate::model::BurstablePerformance>,
        ) -> Self {
            self.burstable_performance = input;
            self
        }
        /// <p>Indicates whether instance types must support hibernation for On-Demand Instances.</p>
        /// <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetSpotPlacementScores.html">GetSpotPlacementScores</a>.</p>
        /// <p>Default: <code>false</code> </p>
        pub fn require_hibernate_support(mut self, input: bool) -> Self {
            self.require_hibernate_support = Some(input);
            self
        }
        /// <p>Indicates whether instance types must support hibernation for On-Demand Instances.</p>
        /// <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetSpotPlacementScores.html">GetSpotPlacementScores</a>.</p>
        /// <p>Default: <code>false</code> </p>
        pub fn set_require_hibernate_support(mut self, input: std::option::Option<bool>) -> Self {
            self.require_hibernate_support = input;
            self
        }
        /// <p>The minimum and maximum number of network interfaces.</p>
        /// <p>Default: No minimum or maximum limits</p>
        pub fn network_interface_count(
            mut self,
            input: crate::model::NetworkInterfaceCount,
        ) -> Self {
            self.network_interface_count = Some(input);
            self
        }
        /// <p>The minimum and maximum number of network interfaces.</p>
        /// <p>Default: No minimum or maximum limits</p>
        pub fn set_network_interface_count(
            mut self,
            input: std::option::Option<crate::model::NetworkInterfaceCount>,
        ) -> Self {
            self.network_interface_count = input;
            self
        }
        /// <p>Indicates whether instance types with instance store volumes are included, excluded, or required. For more information, <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/InstanceStorage.html">Amazon EC2 instance store</a> in the <i>Amazon EC2 User Guide</i>.</p>
        /// <ul>
        /// <li> <p>To include instance types with instance store volumes, specify <code>included</code>.</p> </li>
        /// <li> <p>To require only instance types with instance store volumes, specify <code>required</code>.</p> </li>
        /// <li> <p>To exclude instance types with instance store volumes, specify <code>excluded</code>.</p> </li>
        /// </ul>
        /// <p>Default: <code>included</code> </p>
        pub fn local_storage(mut self, input: crate::model::LocalStorage) -> Self {
            self.local_storage = Some(input);
            self
        }
        /// <p>Indicates whether instance types with instance store volumes are included, excluded, or required. For more information, <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/InstanceStorage.html">Amazon EC2 instance store</a> in the <i>Amazon EC2 User Guide</i>.</p>
        /// <ul>
        /// <li> <p>To include instance types with instance store volumes, specify <code>included</code>.</p> </li>
        /// <li> <p>To require only instance types with instance store volumes, specify <code>required</code>.</p> </li>
        /// <li> <p>To exclude instance types with instance store volumes, specify <code>excluded</code>.</p> </li>
        /// </ul>
        /// <p>Default: <code>included</code> </p>
        pub fn set_local_storage(
            mut self,
            input: std::option::Option<crate::model::LocalStorage>,
        ) -> Self {
            self.local_storage = input;
            self
        }
        /// Appends an item to `local_storage_types`.
        ///
        /// To override the contents of this collection use [`set_local_storage_types`](Self::set_local_storage_types).
        ///
        /// <p>The type of local storage that is required.</p>
        /// <ul>
        /// <li> <p>For instance types with hard disk drive (HDD) storage, specify <code>hdd</code>.</p> </li>
        /// <li> <p>For instance types with solid state drive (SSD) storage, specify <code>ssd</code>.</p> </li>
        /// </ul>
        /// <p>Default: <code>hdd</code> and <code>ssd</code> </p>
        pub fn local_storage_types(mut self, input: crate::model::LocalStorageType) -> Self {
            let mut v = self.local_storage_types.unwrap_or_default();
            v.push(input);
            self.local_storage_types = Some(v);
            self
        }
        /// <p>The type of local storage that is required.</p>
        /// <ul>
        /// <li> <p>For instance types with hard disk drive (HDD) storage, specify <code>hdd</code>.</p> </li>
        /// <li> <p>For instance types with solid state drive (SSD) storage, specify <code>ssd</code>.</p> </li>
        /// </ul>
        /// <p>Default: <code>hdd</code> and <code>ssd</code> </p>
        pub fn set_local_storage_types(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::LocalStorageType>>,
        ) -> Self {
            self.local_storage_types = input;
            self
        }
        /// <p>The minimum and maximum amount of total local storage, in GB.</p>
        /// <p>Default: No minimum or maximum limits</p>
        pub fn total_local_storage_gb(mut self, input: crate::model::TotalLocalStorageGb) -> Self {
            self.total_local_storage_gb = Some(input);
            self
        }
        /// <p>The minimum and maximum amount of total local storage, in GB.</p>
        /// <p>Default: No minimum or maximum limits</p>
        pub fn set_total_local_storage_gb(
            mut self,
            input: std::option::Option<crate::model::TotalLocalStorageGb>,
        ) -> Self {
            self.total_local_storage_gb = input;
            self
        }
        /// <p>The minimum and maximum baseline bandwidth to Amazon EBS, in Mbps. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-optimized.html">Amazon EBS–optimized instances</a> in the <i>Amazon EC2 User Guide</i>.</p>
        /// <p>Default: No minimum or maximum limits</p>
        pub fn baseline_ebs_bandwidth_mbps(
            mut self,
            input: crate::model::BaselineEbsBandwidthMbps,
        ) -> Self {
            self.baseline_ebs_bandwidth_mbps = Some(input);
            self
        }
        /// <p>The minimum and maximum baseline bandwidth to Amazon EBS, in Mbps. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-optimized.html">Amazon EBS–optimized instances</a> in the <i>Amazon EC2 User Guide</i>.</p>
        /// <p>Default: No minimum or maximum limits</p>
        pub fn set_baseline_ebs_bandwidth_mbps(
            mut self,
            input: std::option::Option<crate::model::BaselineEbsBandwidthMbps>,
        ) -> Self {
            self.baseline_ebs_bandwidth_mbps = input;
            self
        }
        /// Appends an item to `accelerator_types`.
        ///
        /// To override the contents of this collection use [`set_accelerator_types`](Self::set_accelerator_types).
        ///
        /// <p>The accelerator types that must be on the instance type.</p>
        /// <ul>
        /// <li> <p>For instance types with GPU accelerators, specify <code>gpu</code>.</p> </li>
        /// <li> <p>For instance types with FPGA accelerators, specify <code>fpga</code>.</p> </li>
        /// <li> <p>For instance types with inference accelerators, specify <code>inference</code>.</p> </li>
        /// </ul>
        /// <p>Default: Any accelerator type</p>
        pub fn accelerator_types(mut self, input: crate::model::AcceleratorType) -> Self {
            let mut v = self.accelerator_types.unwrap_or_default();
            v.push(input);
            self.accelerator_types = Some(v);
            self
        }
        /// <p>The accelerator types that must be on the instance type.</p>
        /// <ul>
        /// <li> <p>For instance types with GPU accelerators, specify <code>gpu</code>.</p> </li>
        /// <li> <p>For instance types with FPGA accelerators, specify <code>fpga</code>.</p> </li>
        /// <li> <p>For instance types with inference accelerators, specify <code>inference</code>.</p> </li>
        /// </ul>
        /// <p>Default: Any accelerator type</p>
        pub fn set_accelerator_types(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::AcceleratorType>>,
        ) -> Self {
            self.accelerator_types = input;
            self
        }
        /// <p>The minimum and maximum number of accelerators (GPUs, FPGAs, or Amazon Web Services Inferentia chips) on an instance.</p>
        /// <p>To exclude accelerator-enabled instance types, set <code>Max</code> to <code>0</code>.</p>
        /// <p>Default: No minimum or maximum limits</p>
        pub fn accelerator_count(mut self, input: crate::model::AcceleratorCount) -> Self {
            self.accelerator_count = Some(input);
            self
        }
        /// <p>The minimum and maximum number of accelerators (GPUs, FPGAs, or Amazon Web Services Inferentia chips) on an instance.</p>
        /// <p>To exclude accelerator-enabled instance types, set <code>Max</code> to <code>0</code>.</p>
        /// <p>Default: No minimum or maximum limits</p>
        pub fn set_accelerator_count(
            mut self,
            input: std::option::Option<crate::model::AcceleratorCount>,
        ) -> Self {
            self.accelerator_count = input;
            self
        }
        /// Appends an item to `accelerator_manufacturers`.
        ///
        /// To override the contents of this collection use [`set_accelerator_manufacturers`](Self::set_accelerator_manufacturers).
        ///
        /// <p>Indicates whether instance types must have accelerators by specific manufacturers.</p>
        /// <ul>
        /// <li> <p>For instance types with NVIDIA devices, specify <code>nvidia</code>.</p> </li>
        /// <li> <p>For instance types with AMD devices, specify <code>amd</code>.</p> </li>
        /// <li> <p>For instance types with Amazon Web Services devices, specify <code>amazon-web-services</code>.</p> </li>
        /// <li> <p>For instance types with Xilinx devices, specify <code>xilinx</code>.</p> </li>
        /// </ul>
        /// <p>Default: Any manufacturer</p>
        pub fn accelerator_manufacturers(
            mut self,
            input: crate::model::AcceleratorManufacturer,
        ) -> Self {
            let mut v = self.accelerator_manufacturers.unwrap_or_default();
            v.push(input);
            self.accelerator_manufacturers = Some(v);
            self
        }
        /// <p>Indicates whether instance types must have accelerators by specific manufacturers.</p>
        /// <ul>
        /// <li> <p>For instance types with NVIDIA devices, specify <code>nvidia</code>.</p> </li>
        /// <li> <p>For instance types with AMD devices, specify <code>amd</code>.</p> </li>
        /// <li> <p>For instance types with Amazon Web Services devices, specify <code>amazon-web-services</code>.</p> </li>
        /// <li> <p>For instance types with Xilinx devices, specify <code>xilinx</code>.</p> </li>
        /// </ul>
        /// <p>Default: Any manufacturer</p>
        pub fn set_accelerator_manufacturers(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::AcceleratorManufacturer>>,
        ) -> Self {
            self.accelerator_manufacturers = input;
            self
        }
        /// Appends an item to `accelerator_names`.
        ///
        /// To override the contents of this collection use [`set_accelerator_names`](Self::set_accelerator_names).
        ///
        /// <p>The accelerators that must be on the instance type.</p>
        /// <ul>
        /// <li> <p>For instance types with NVIDIA A100 GPUs, specify <code>a100</code>.</p> </li>
        /// <li> <p>For instance types with NVIDIA V100 GPUs, specify <code>v100</code>.</p> </li>
        /// <li> <p>For instance types with NVIDIA K80 GPUs, specify <code>k80</code>.</p> </li>
        /// <li> <p>For instance types with NVIDIA T4 GPUs, specify <code>t4</code>.</p> </li>
        /// <li> <p>For instance types with NVIDIA M60 GPUs, specify <code>m60</code>.</p> </li>
        /// <li> <p>For instance types with AMD Radeon Pro V520 GPUs, specify <code>radeon-pro-v520</code>.</p> </li>
        /// <li> <p>For instance types with Xilinx VU9P FPGAs, specify <code>vu9p</code>.</p> </li>
        /// <li> <p>For instance types with Amazon Web Services Inferentia chips, specify <code>inferentia</code>.</p> </li>
        /// <li> <p>For instance types with NVIDIA GRID K520 GPUs, specify <code>k520</code>.</p> </li>
        /// </ul>
        /// <p>Default: Any accelerator</p>
        pub fn accelerator_names(mut self, input: crate::model::AcceleratorName) -> Self {
            let mut v = self.accelerator_names.unwrap_or_default();
            v.push(input);
            self.accelerator_names = Some(v);
            self
        }
        /// <p>The accelerators that must be on the instance type.</p>
        /// <ul>
        /// <li> <p>For instance types with NVIDIA A100 GPUs, specify <code>a100</code>.</p> </li>
        /// <li> <p>For instance types with NVIDIA V100 GPUs, specify <code>v100</code>.</p> </li>
        /// <li> <p>For instance types with NVIDIA K80 GPUs, specify <code>k80</code>.</p> </li>
        /// <li> <p>For instance types with NVIDIA T4 GPUs, specify <code>t4</code>.</p> </li>
        /// <li> <p>For instance types with NVIDIA M60 GPUs, specify <code>m60</code>.</p> </li>
        /// <li> <p>For instance types with AMD Radeon Pro V520 GPUs, specify <code>radeon-pro-v520</code>.</p> </li>
        /// <li> <p>For instance types with Xilinx VU9P FPGAs, specify <code>vu9p</code>.</p> </li>
        /// <li> <p>For instance types with Amazon Web Services Inferentia chips, specify <code>inferentia</code>.</p> </li>
        /// <li> <p>For instance types with NVIDIA GRID K520 GPUs, specify <code>k520</code>.</p> </li>
        /// </ul>
        /// <p>Default: Any accelerator</p>
        pub fn set_accelerator_names(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::AcceleratorName>>,
        ) -> Self {
            self.accelerator_names = input;
            self
        }
        /// <p>The minimum and maximum amount of total accelerator memory, in MiB.</p>
        /// <p>Default: No minimum or maximum limits</p>
        pub fn accelerator_total_memory_mi_b(
            mut self,
            input: crate::model::AcceleratorTotalMemoryMiB,
        ) -> Self {
            self.accelerator_total_memory_mi_b = Some(input);
            self
        }
        /// <p>The minimum and maximum amount of total accelerator memory, in MiB.</p>
        /// <p>Default: No minimum or maximum limits</p>
        pub fn set_accelerator_total_memory_mi_b(
            mut self,
            input: std::option::Option<crate::model::AcceleratorTotalMemoryMiB>,
        ) -> Self {
            self.accelerator_total_memory_mi_b = input;
            self
        }
        /// <p>The minimum and maximum amount of network bandwidth, in gigabits per second (Gbps).</p>
        /// <p>Default: No minimum or maximum limits</p>
        pub fn network_bandwidth_gbps(mut self, input: crate::model::NetworkBandwidthGbps) -> Self {
            self.network_bandwidth_gbps = Some(input);
            self
        }
        /// <p>The minimum and maximum amount of network bandwidth, in gigabits per second (Gbps).</p>
        /// <p>Default: No minimum or maximum limits</p>
        pub fn set_network_bandwidth_gbps(
            mut self,
            input: std::option::Option<crate::model::NetworkBandwidthGbps>,
        ) -> Self {
            self.network_bandwidth_gbps = input;
            self
        }
        /// Appends an item to `allowed_instance_types`.
        ///
        /// To override the contents of this collection use [`set_allowed_instance_types`](Self::set_allowed_instance_types).
        ///
        /// <p>The instance types to apply your specified attributes against. All other instance types are ignored, even if they match your specified attributes.</p>
        /// <p>You can use strings with one or more wild cards, represented by an asterisk (<code>*</code>), to allow an instance type, size, or generation. The following are examples: <code>m5.8xlarge</code>, <code>c5*.*</code>, <code>m5a.*</code>, <code>r*</code>, <code>*3*</code>.</p>
        /// <p>For example, if you specify <code>c5*</code>,Amazon EC2 will allow the entire C5 instance family, which includes all C5a and C5n instance types. If you specify <code>m5a.*</code>, Amazon EC2 will allow all the M5a instance types, but not the M5n instance types.</p> <note>
        /// <p>If you specify <code>AllowedInstanceTypes</code>, you can't specify <code>ExcludedInstanceTypes</code>.</p>
        /// </note>
        /// <p>Default: All instance types</p>
        pub fn allowed_instance_types(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.allowed_instance_types.unwrap_or_default();
            v.push(input.into());
            self.allowed_instance_types = Some(v);
            self
        }
        /// <p>The instance types to apply your specified attributes against. All other instance types are ignored, even if they match your specified attributes.</p>
        /// <p>You can use strings with one or more wild cards, represented by an asterisk (<code>*</code>), to allow an instance type, size, or generation. The following are examples: <code>m5.8xlarge</code>, <code>c5*.*</code>, <code>m5a.*</code>, <code>r*</code>, <code>*3*</code>.</p>
        /// <p>For example, if you specify <code>c5*</code>,Amazon EC2 will allow the entire C5 instance family, which includes all C5a and C5n instance types. If you specify <code>m5a.*</code>, Amazon EC2 will allow all the M5a instance types, but not the M5n instance types.</p> <note>
        /// <p>If you specify <code>AllowedInstanceTypes</code>, you can't specify <code>ExcludedInstanceTypes</code>.</p>
        /// </note>
        /// <p>Default: All instance types</p>
        pub fn set_allowed_instance_types(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.allowed_instance_types = input;
            self
        }
        /// Consumes the builder and constructs a [`InstanceRequirements`](crate::model::InstanceRequirements).
        pub fn build(self) -> crate::model::InstanceRequirements {
            crate::model::InstanceRequirements {
                v_cpu_count: self.v_cpu_count,
                memory_mi_b: self.memory_mi_b,
                cpu_manufacturers: self.cpu_manufacturers,
                memory_gi_b_per_v_cpu: self.memory_gi_b_per_v_cpu,
                excluded_instance_types: self.excluded_instance_types,
                instance_generations: self.instance_generations,
                spot_max_price_percentage_over_lowest_price: self
                    .spot_max_price_percentage_over_lowest_price,
                on_demand_max_price_percentage_over_lowest_price: self
                    .on_demand_max_price_percentage_over_lowest_price,
                bare_metal: self.bare_metal,
                burstable_performance: self.burstable_performance,
                require_hibernate_support: self.require_hibernate_support,
                network_interface_count: self.network_interface_count,
                local_storage: self.local_storage,
                local_storage_types: self.local_storage_types,
                total_local_storage_gb: self.total_local_storage_gb,
                baseline_ebs_bandwidth_mbps: self.baseline_ebs_bandwidth_mbps,
                accelerator_types: self.accelerator_types,
                accelerator_count: self.accelerator_count,
                accelerator_manufacturers: self.accelerator_manufacturers,
                accelerator_names: self.accelerator_names,
                accelerator_total_memory_mi_b: self.accelerator_total_memory_mi_b,
                network_bandwidth_gbps: self.network_bandwidth_gbps,
                allowed_instance_types: self.allowed_instance_types,
            }
        }
    }
}
impl InstanceRequirements {
    /// Creates a new builder-style object to manufacture [`InstanceRequirements`](crate::model::InstanceRequirements).
    pub fn builder() -> crate::model::instance_requirements::Builder {
        crate::model::instance_requirements::Builder::default()
    }
}

/// <p>The minimum and maximum amount of network bandwidth, in gigabits per second (Gbps).</p> <note>
/// <p>Setting the minimum bandwidth does not guarantee that your instance will achieve the minimum bandwidth. Amazon EC2 will identify instance types that support the specified minimum bandwidth, but the actual bandwidth of your instance might go below the specified minimum at times. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-network-bandwidth.html#available-instance-bandwidth">Available instance bandwidth</a> in the <i>Amazon EC2 User Guide</i>.</p>
/// </note>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct NetworkBandwidthGbps {
    /// <p>The minimum amount of network bandwidth, in Gbps. If this parameter is not specified, there is no minimum limit.</p>
    #[doc(hidden)]
    pub min: std::option::Option<f64>,
    /// <p>The maximum amount of network bandwidth, in Gbps. If this parameter is not specified, there is no maximum limit.</p>
    #[doc(hidden)]
    pub max: std::option::Option<f64>,
}
impl NetworkBandwidthGbps {
    /// <p>The minimum amount of network bandwidth, in Gbps. If this parameter is not specified, there is no minimum limit.</p>
    pub fn min(&self) -> std::option::Option<f64> {
        self.min
    }
    /// <p>The maximum amount of network bandwidth, in Gbps. If this parameter is not specified, there is no maximum limit.</p>
    pub fn max(&self) -> std::option::Option<f64> {
        self.max
    }
}
/// See [`NetworkBandwidthGbps`](crate::model::NetworkBandwidthGbps).
pub mod network_bandwidth_gbps {

    /// A builder for [`NetworkBandwidthGbps`](crate::model::NetworkBandwidthGbps).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) min: std::option::Option<f64>,
        pub(crate) max: std::option::Option<f64>,
    }
    impl Builder {
        /// <p>The minimum amount of network bandwidth, in Gbps. If this parameter is not specified, there is no minimum limit.</p>
        pub fn min(mut self, input: f64) -> Self {
            self.min = Some(input);
            self
        }
        /// <p>The minimum amount of network bandwidth, in Gbps. If this parameter is not specified, there is no minimum limit.</p>
        pub fn set_min(mut self, input: std::option::Option<f64>) -> Self {
            self.min = input;
            self
        }
        /// <p>The maximum amount of network bandwidth, in Gbps. If this parameter is not specified, there is no maximum limit.</p>
        pub fn max(mut self, input: f64) -> Self {
            self.max = Some(input);
            self
        }
        /// <p>The maximum amount of network bandwidth, in Gbps. If this parameter is not specified, there is no maximum limit.</p>
        pub fn set_max(mut self, input: std::option::Option<f64>) -> Self {
            self.max = input;
            self
        }
        /// Consumes the builder and constructs a [`NetworkBandwidthGbps`](crate::model::NetworkBandwidthGbps).
        pub fn build(self) -> crate::model::NetworkBandwidthGbps {
            crate::model::NetworkBandwidthGbps {
                min: self.min,
                max: self.max,
            }
        }
    }
}
impl NetworkBandwidthGbps {
    /// Creates a new builder-style object to manufacture [`NetworkBandwidthGbps`](crate::model::NetworkBandwidthGbps).
    pub fn builder() -> crate::model::network_bandwidth_gbps::Builder {
        crate::model::network_bandwidth_gbps::Builder::default()
    }
}

/// <p>The minimum and maximum amount of total accelerator memory, in MiB.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AcceleratorTotalMemoryMiB {
    /// <p>The minimum amount of accelerator memory, in MiB. If this parameter is not specified, there is no minimum limit.</p>
    #[doc(hidden)]
    pub min: std::option::Option<i32>,
    /// <p>The maximum amount of accelerator memory, in MiB. If this parameter is not specified, there is no maximum limit.</p>
    #[doc(hidden)]
    pub max: std::option::Option<i32>,
}
impl AcceleratorTotalMemoryMiB {
    /// <p>The minimum amount of accelerator memory, in MiB. If this parameter is not specified, there is no minimum limit.</p>
    pub fn min(&self) -> std::option::Option<i32> {
        self.min
    }
    /// <p>The maximum amount of accelerator memory, in MiB. If this parameter is not specified, there is no maximum limit.</p>
    pub fn max(&self) -> std::option::Option<i32> {
        self.max
    }
}
/// See [`AcceleratorTotalMemoryMiB`](crate::model::AcceleratorTotalMemoryMiB).
pub mod accelerator_total_memory_mi_b {

    /// A builder for [`AcceleratorTotalMemoryMiB`](crate::model::AcceleratorTotalMemoryMiB).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) min: std::option::Option<i32>,
        pub(crate) max: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>The minimum amount of accelerator memory, in MiB. If this parameter is not specified, there is no minimum limit.</p>
        pub fn min(mut self, input: i32) -> Self {
            self.min = Some(input);
            self
        }
        /// <p>The minimum amount of accelerator memory, in MiB. If this parameter is not specified, there is no minimum limit.</p>
        pub fn set_min(mut self, input: std::option::Option<i32>) -> Self {
            self.min = input;
            self
        }
        /// <p>The maximum amount of accelerator memory, in MiB. If this parameter is not specified, there is no maximum limit.</p>
        pub fn max(mut self, input: i32) -> Self {
            self.max = Some(input);
            self
        }
        /// <p>The maximum amount of accelerator memory, in MiB. If this parameter is not specified, there is no maximum limit.</p>
        pub fn set_max(mut self, input: std::option::Option<i32>) -> Self {
            self.max = input;
            self
        }
        /// Consumes the builder and constructs a [`AcceleratorTotalMemoryMiB`](crate::model::AcceleratorTotalMemoryMiB).
        pub fn build(self) -> crate::model::AcceleratorTotalMemoryMiB {
            crate::model::AcceleratorTotalMemoryMiB {
                min: self.min,
                max: self.max,
            }
        }
    }
}
impl AcceleratorTotalMemoryMiB {
    /// Creates a new builder-style object to manufacture [`AcceleratorTotalMemoryMiB`](crate::model::AcceleratorTotalMemoryMiB).
    pub fn builder() -> crate::model::accelerator_total_memory_mi_b::Builder {
        crate::model::accelerator_total_memory_mi_b::Builder::default()
    }
}

/// When writing a match expression against `AcceleratorName`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let acceleratorname = unimplemented!();
/// match acceleratorname {
///     AcceleratorName::A100 => { /* ... */ },
///     AcceleratorName::Inferentia => { /* ... */ },
///     AcceleratorName::K520 => { /* ... */ },
///     AcceleratorName::K80 => { /* ... */ },
///     AcceleratorName::M60 => { /* ... */ },
///     AcceleratorName::RadeonProV520 => { /* ... */ },
///     AcceleratorName::T4 => { /* ... */ },
///     AcceleratorName::V100 => { /* ... */ },
///     AcceleratorName::Vu9P => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `acceleratorname` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `AcceleratorName::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `AcceleratorName::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `AcceleratorName::NewFeature` is defined.
/// Specifically, when `acceleratorname` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `AcceleratorName::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 AcceleratorName {
    #[allow(missing_docs)] // documentation missing in model
    A100,
    #[allow(missing_docs)] // documentation missing in model
    Inferentia,
    #[allow(missing_docs)] // documentation missing in model
    K520,
    #[allow(missing_docs)] // documentation missing in model
    K80,
    #[allow(missing_docs)] // documentation missing in model
    M60,
    #[allow(missing_docs)] // documentation missing in model
    RadeonProV520,
    #[allow(missing_docs)] // documentation missing in model
    T4,
    #[allow(missing_docs)] // documentation missing in model
    V100,
    #[allow(missing_docs)] // documentation missing in model
    Vu9P,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for AcceleratorName {
    fn from(s: &str) -> Self {
        match s {
            "a100" => AcceleratorName::A100,
            "inferentia" => AcceleratorName::Inferentia,
            "k520" => AcceleratorName::K520,
            "k80" => AcceleratorName::K80,
            "m60" => AcceleratorName::M60,
            "radeon-pro-v520" => AcceleratorName::RadeonProV520,
            "t4" => AcceleratorName::T4,
            "v100" => AcceleratorName::V100,
            "vu9p" => AcceleratorName::Vu9P,
            other => AcceleratorName::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for AcceleratorName {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(AcceleratorName::from(s))
    }
}
impl AcceleratorName {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            AcceleratorName::A100 => "a100",
            AcceleratorName::Inferentia => "inferentia",
            AcceleratorName::K520 => "k520",
            AcceleratorName::K80 => "k80",
            AcceleratorName::M60 => "m60",
            AcceleratorName::RadeonProV520 => "radeon-pro-v520",
            AcceleratorName::T4 => "t4",
            AcceleratorName::V100 => "v100",
            AcceleratorName::Vu9P => "vu9p",
            AcceleratorName::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &[
            "a100",
            "inferentia",
            "k520",
            "k80",
            "m60",
            "radeon-pro-v520",
            "t4",
            "v100",
            "vu9p",
        ]
    }
}
impl AsRef<str> for AcceleratorName {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `AcceleratorManufacturer`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let acceleratormanufacturer = unimplemented!();
/// match acceleratormanufacturer {
///     AcceleratorManufacturer::AmazonWebServices => { /* ... */ },
///     AcceleratorManufacturer::Amd => { /* ... */ },
///     AcceleratorManufacturer::Nvidia => { /* ... */ },
///     AcceleratorManufacturer::Xilinx => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `acceleratormanufacturer` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `AcceleratorManufacturer::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `AcceleratorManufacturer::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `AcceleratorManufacturer::NewFeature` is defined.
/// Specifically, when `acceleratormanufacturer` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `AcceleratorManufacturer::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 AcceleratorManufacturer {
    #[allow(missing_docs)] // documentation missing in model
    AmazonWebServices,
    #[allow(missing_docs)] // documentation missing in model
    Amd,
    #[allow(missing_docs)] // documentation missing in model
    Nvidia,
    #[allow(missing_docs)] // documentation missing in model
    Xilinx,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for AcceleratorManufacturer {
    fn from(s: &str) -> Self {
        match s {
            "amazon-web-services" => AcceleratorManufacturer::AmazonWebServices,
            "amd" => AcceleratorManufacturer::Amd,
            "nvidia" => AcceleratorManufacturer::Nvidia,
            "xilinx" => AcceleratorManufacturer::Xilinx,
            other => AcceleratorManufacturer::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for AcceleratorManufacturer {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(AcceleratorManufacturer::from(s))
    }
}
impl AcceleratorManufacturer {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            AcceleratorManufacturer::AmazonWebServices => "amazon-web-services",
            AcceleratorManufacturer::Amd => "amd",
            AcceleratorManufacturer::Nvidia => "nvidia",
            AcceleratorManufacturer::Xilinx => "xilinx",
            AcceleratorManufacturer::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["amazon-web-services", "amd", "nvidia", "xilinx"]
    }
}
impl AsRef<str> for AcceleratorManufacturer {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>The minimum and maximum number of accelerators (GPUs, FPGAs, or Amazon Web Services Inferentia chips) on an instance.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AcceleratorCount {
    /// <p>The minimum number of accelerators. If this parameter is not specified, there is no minimum limit.</p>
    #[doc(hidden)]
    pub min: std::option::Option<i32>,
    /// <p>The maximum number of accelerators. If this parameter is not specified, there is no maximum limit.</p>
    #[doc(hidden)]
    pub max: std::option::Option<i32>,
}
impl AcceleratorCount {
    /// <p>The minimum number of accelerators. If this parameter is not specified, there is no minimum limit.</p>
    pub fn min(&self) -> std::option::Option<i32> {
        self.min
    }
    /// <p>The maximum number of accelerators. If this parameter is not specified, there is no maximum limit.</p>
    pub fn max(&self) -> std::option::Option<i32> {
        self.max
    }
}
/// See [`AcceleratorCount`](crate::model::AcceleratorCount).
pub mod accelerator_count {

    /// A builder for [`AcceleratorCount`](crate::model::AcceleratorCount).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) min: std::option::Option<i32>,
        pub(crate) max: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>The minimum number of accelerators. If this parameter is not specified, there is no minimum limit.</p>
        pub fn min(mut self, input: i32) -> Self {
            self.min = Some(input);
            self
        }
        /// <p>The minimum number of accelerators. If this parameter is not specified, there is no minimum limit.</p>
        pub fn set_min(mut self, input: std::option::Option<i32>) -> Self {
            self.min = input;
            self
        }
        /// <p>The maximum number of accelerators. If this parameter is not specified, there is no maximum limit.</p>
        pub fn max(mut self, input: i32) -> Self {
            self.max = Some(input);
            self
        }
        /// <p>The maximum number of accelerators. If this parameter is not specified, there is no maximum limit.</p>
        pub fn set_max(mut self, input: std::option::Option<i32>) -> Self {
            self.max = input;
            self
        }
        /// Consumes the builder and constructs a [`AcceleratorCount`](crate::model::AcceleratorCount).
        pub fn build(self) -> crate::model::AcceleratorCount {
            crate::model::AcceleratorCount {
                min: self.min,
                max: self.max,
            }
        }
    }
}
impl AcceleratorCount {
    /// Creates a new builder-style object to manufacture [`AcceleratorCount`](crate::model::AcceleratorCount).
    pub fn builder() -> crate::model::accelerator_count::Builder {
        crate::model::accelerator_count::Builder::default()
    }
}

/// When writing a match expression against `AcceleratorType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let acceleratortype = unimplemented!();
/// match acceleratortype {
///     AcceleratorType::Fpga => { /* ... */ },
///     AcceleratorType::Gpu => { /* ... */ },
///     AcceleratorType::Inference => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `acceleratortype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `AcceleratorType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `AcceleratorType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `AcceleratorType::NewFeature` is defined.
/// Specifically, when `acceleratortype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `AcceleratorType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 AcceleratorType {
    #[allow(missing_docs)] // documentation missing in model
    Fpga,
    #[allow(missing_docs)] // documentation missing in model
    Gpu,
    #[allow(missing_docs)] // documentation missing in model
    Inference,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for AcceleratorType {
    fn from(s: &str) -> Self {
        match s {
            "fpga" => AcceleratorType::Fpga,
            "gpu" => AcceleratorType::Gpu,
            "inference" => AcceleratorType::Inference,
            other => AcceleratorType::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for AcceleratorType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(AcceleratorType::from(s))
    }
}
impl AcceleratorType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            AcceleratorType::Fpga => "fpga",
            AcceleratorType::Gpu => "gpu",
            AcceleratorType::Inference => "inference",
            AcceleratorType::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["fpga", "gpu", "inference"]
    }
}
impl AsRef<str> for AcceleratorType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>The minimum and maximum baseline bandwidth to Amazon EBS, in Mbps. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-optimized.html">Amazon EBS–optimized instances</a> in the <i>Amazon EC2 User Guide</i>.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct BaselineEbsBandwidthMbps {
    /// <p>The minimum baseline bandwidth, in Mbps. If this parameter is not specified, there is no minimum limit.</p>
    #[doc(hidden)]
    pub min: std::option::Option<i32>,
    /// <p>The maximum baseline bandwidth, in Mbps. If this parameter is not specified, there is no maximum limit.</p>
    #[doc(hidden)]
    pub max: std::option::Option<i32>,
}
impl BaselineEbsBandwidthMbps {
    /// <p>The minimum baseline bandwidth, in Mbps. If this parameter is not specified, there is no minimum limit.</p>
    pub fn min(&self) -> std::option::Option<i32> {
        self.min
    }
    /// <p>The maximum baseline bandwidth, in Mbps. If this parameter is not specified, there is no maximum limit.</p>
    pub fn max(&self) -> std::option::Option<i32> {
        self.max
    }
}
/// See [`BaselineEbsBandwidthMbps`](crate::model::BaselineEbsBandwidthMbps).
pub mod baseline_ebs_bandwidth_mbps {

    /// A builder for [`BaselineEbsBandwidthMbps`](crate::model::BaselineEbsBandwidthMbps).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) min: std::option::Option<i32>,
        pub(crate) max: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>The minimum baseline bandwidth, in Mbps. If this parameter is not specified, there is no minimum limit.</p>
        pub fn min(mut self, input: i32) -> Self {
            self.min = Some(input);
            self
        }
        /// <p>The minimum baseline bandwidth, in Mbps. If this parameter is not specified, there is no minimum limit.</p>
        pub fn set_min(mut self, input: std::option::Option<i32>) -> Self {
            self.min = input;
            self
        }
        /// <p>The maximum baseline bandwidth, in Mbps. If this parameter is not specified, there is no maximum limit.</p>
        pub fn max(mut self, input: i32) -> Self {
            self.max = Some(input);
            self
        }
        /// <p>The maximum baseline bandwidth, in Mbps. If this parameter is not specified, there is no maximum limit.</p>
        pub fn set_max(mut self, input: std::option::Option<i32>) -> Self {
            self.max = input;
            self
        }
        /// Consumes the builder and constructs a [`BaselineEbsBandwidthMbps`](crate::model::BaselineEbsBandwidthMbps).
        pub fn build(self) -> crate::model::BaselineEbsBandwidthMbps {
            crate::model::BaselineEbsBandwidthMbps {
                min: self.min,
                max: self.max,
            }
        }
    }
}
impl BaselineEbsBandwidthMbps {
    /// Creates a new builder-style object to manufacture [`BaselineEbsBandwidthMbps`](crate::model::BaselineEbsBandwidthMbps).
    pub fn builder() -> crate::model::baseline_ebs_bandwidth_mbps::Builder {
        crate::model::baseline_ebs_bandwidth_mbps::Builder::default()
    }
}

/// <p>The minimum and maximum amount of total local storage, in GB.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TotalLocalStorageGb {
    /// <p>The minimum amount of total local storage, in GB. If this parameter is not specified, there is no minimum limit.</p>
    #[doc(hidden)]
    pub min: std::option::Option<f64>,
    /// <p>The maximum amount of total local storage, in GB. If this parameter is not specified, there is no maximum limit.</p>
    #[doc(hidden)]
    pub max: std::option::Option<f64>,
}
impl TotalLocalStorageGb {
    /// <p>The minimum amount of total local storage, in GB. If this parameter is not specified, there is no minimum limit.</p>
    pub fn min(&self) -> std::option::Option<f64> {
        self.min
    }
    /// <p>The maximum amount of total local storage, in GB. If this parameter is not specified, there is no maximum limit.</p>
    pub fn max(&self) -> std::option::Option<f64> {
        self.max
    }
}
/// See [`TotalLocalStorageGb`](crate::model::TotalLocalStorageGb).
pub mod total_local_storage_gb {

    /// A builder for [`TotalLocalStorageGb`](crate::model::TotalLocalStorageGb).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) min: std::option::Option<f64>,
        pub(crate) max: std::option::Option<f64>,
    }
    impl Builder {
        /// <p>The minimum amount of total local storage, in GB. If this parameter is not specified, there is no minimum limit.</p>
        pub fn min(mut self, input: f64) -> Self {
            self.min = Some(input);
            self
        }
        /// <p>The minimum amount of total local storage, in GB. If this parameter is not specified, there is no minimum limit.</p>
        pub fn set_min(mut self, input: std::option::Option<f64>) -> Self {
            self.min = input;
            self
        }
        /// <p>The maximum amount of total local storage, in GB. If this parameter is not specified, there is no maximum limit.</p>
        pub fn max(mut self, input: f64) -> Self {
            self.max = Some(input);
            self
        }
        /// <p>The maximum amount of total local storage, in GB. If this parameter is not specified, there is no maximum limit.</p>
        pub fn set_max(mut self, input: std::option::Option<f64>) -> Self {
            self.max = input;
            self
        }
        /// Consumes the builder and constructs a [`TotalLocalStorageGb`](crate::model::TotalLocalStorageGb).
        pub fn build(self) -> crate::model::TotalLocalStorageGb {
            crate::model::TotalLocalStorageGb {
                min: self.min,
                max: self.max,
            }
        }
    }
}
impl TotalLocalStorageGb {
    /// Creates a new builder-style object to manufacture [`TotalLocalStorageGb`](crate::model::TotalLocalStorageGb).
    pub fn builder() -> crate::model::total_local_storage_gb::Builder {
        crate::model::total_local_storage_gb::Builder::default()
    }
}

/// When writing a match expression against `LocalStorageType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let localstoragetype = unimplemented!();
/// match localstoragetype {
///     LocalStorageType::Hdd => { /* ... */ },
///     LocalStorageType::Ssd => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `localstoragetype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `LocalStorageType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `LocalStorageType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `LocalStorageType::NewFeature` is defined.
/// Specifically, when `localstoragetype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `LocalStorageType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 LocalStorageType {
    #[allow(missing_docs)] // documentation missing in model
    Hdd,
    #[allow(missing_docs)] // documentation missing in model
    Ssd,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for LocalStorageType {
    fn from(s: &str) -> Self {
        match s {
            "hdd" => LocalStorageType::Hdd,
            "ssd" => LocalStorageType::Ssd,
            other => LocalStorageType::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for LocalStorageType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(LocalStorageType::from(s))
    }
}
impl LocalStorageType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            LocalStorageType::Hdd => "hdd",
            LocalStorageType::Ssd => "ssd",
            LocalStorageType::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["hdd", "ssd"]
    }
}
impl AsRef<str> for LocalStorageType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `LocalStorage`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let localstorage = unimplemented!();
/// match localstorage {
///     LocalStorage::Excluded => { /* ... */ },
///     LocalStorage::Included => { /* ... */ },
///     LocalStorage::Required => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `localstorage` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `LocalStorage::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `LocalStorage::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `LocalStorage::NewFeature` is defined.
/// Specifically, when `localstorage` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `LocalStorage::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 LocalStorage {
    #[allow(missing_docs)] // documentation missing in model
    Excluded,
    #[allow(missing_docs)] // documentation missing in model
    Included,
    #[allow(missing_docs)] // documentation missing in model
    Required,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for LocalStorage {
    fn from(s: &str) -> Self {
        match s {
            "excluded" => LocalStorage::Excluded,
            "included" => LocalStorage::Included,
            "required" => LocalStorage::Required,
            other => LocalStorage::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for LocalStorage {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(LocalStorage::from(s))
    }
}
impl LocalStorage {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            LocalStorage::Excluded => "excluded",
            LocalStorage::Included => "included",
            LocalStorage::Required => "required",
            LocalStorage::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["excluded", "included", "required"]
    }
}
impl AsRef<str> for LocalStorage {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>The minimum and maximum number of network interfaces.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct NetworkInterfaceCount {
    /// <p>The minimum number of network interfaces. If this parameter is not specified, there is no minimum limit.</p>
    #[doc(hidden)]
    pub min: std::option::Option<i32>,
    /// <p>The maximum number of network interfaces. If this parameter is not specified, there is no maximum limit.</p>
    #[doc(hidden)]
    pub max: std::option::Option<i32>,
}
impl NetworkInterfaceCount {
    /// <p>The minimum number of network interfaces. If this parameter is not specified, there is no minimum limit.</p>
    pub fn min(&self) -> std::option::Option<i32> {
        self.min
    }
    /// <p>The maximum number of network interfaces. If this parameter is not specified, there is no maximum limit.</p>
    pub fn max(&self) -> std::option::Option<i32> {
        self.max
    }
}
/// See [`NetworkInterfaceCount`](crate::model::NetworkInterfaceCount).
pub mod network_interface_count {

    /// A builder for [`NetworkInterfaceCount`](crate::model::NetworkInterfaceCount).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) min: std::option::Option<i32>,
        pub(crate) max: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>The minimum number of network interfaces. If this parameter is not specified, there is no minimum limit.</p>
        pub fn min(mut self, input: i32) -> Self {
            self.min = Some(input);
            self
        }
        /// <p>The minimum number of network interfaces. If this parameter is not specified, there is no minimum limit.</p>
        pub fn set_min(mut self, input: std::option::Option<i32>) -> Self {
            self.min = input;
            self
        }
        /// <p>The maximum number of network interfaces. If this parameter is not specified, there is no maximum limit.</p>
        pub fn max(mut self, input: i32) -> Self {
            self.max = Some(input);
            self
        }
        /// <p>The maximum number of network interfaces. If this parameter is not specified, there is no maximum limit.</p>
        pub fn set_max(mut self, input: std::option::Option<i32>) -> Self {
            self.max = input;
            self
        }
        /// Consumes the builder and constructs a [`NetworkInterfaceCount`](crate::model::NetworkInterfaceCount).
        pub fn build(self) -> crate::model::NetworkInterfaceCount {
            crate::model::NetworkInterfaceCount {
                min: self.min,
                max: self.max,
            }
        }
    }
}
impl NetworkInterfaceCount {
    /// Creates a new builder-style object to manufacture [`NetworkInterfaceCount`](crate::model::NetworkInterfaceCount).
    pub fn builder() -> crate::model::network_interface_count::Builder {
        crate::model::network_interface_count::Builder::default()
    }
}

/// When writing a match expression against `BurstablePerformance`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let burstableperformance = unimplemented!();
/// match burstableperformance {
///     BurstablePerformance::Excluded => { /* ... */ },
///     BurstablePerformance::Included => { /* ... */ },
///     BurstablePerformance::Required => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `burstableperformance` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `BurstablePerformance::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `BurstablePerformance::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `BurstablePerformance::NewFeature` is defined.
/// Specifically, when `burstableperformance` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `BurstablePerformance::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 BurstablePerformance {
    #[allow(missing_docs)] // documentation missing in model
    Excluded,
    #[allow(missing_docs)] // documentation missing in model
    Included,
    #[allow(missing_docs)] // documentation missing in model
    Required,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for BurstablePerformance {
    fn from(s: &str) -> Self {
        match s {
            "excluded" => BurstablePerformance::Excluded,
            "included" => BurstablePerformance::Included,
            "required" => BurstablePerformance::Required,
            other => {
                BurstablePerformance::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for BurstablePerformance {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(BurstablePerformance::from(s))
    }
}
impl BurstablePerformance {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            BurstablePerformance::Excluded => "excluded",
            BurstablePerformance::Included => "included",
            BurstablePerformance::Required => "required",
            BurstablePerformance::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["excluded", "included", "required"]
    }
}
impl AsRef<str> for BurstablePerformance {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `BareMetal`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let baremetal = unimplemented!();
/// match baremetal {
///     BareMetal::Excluded => { /* ... */ },
///     BareMetal::Included => { /* ... */ },
///     BareMetal::Required => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `baremetal` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `BareMetal::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `BareMetal::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `BareMetal::NewFeature` is defined.
/// Specifically, when `baremetal` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `BareMetal::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 BareMetal {
    #[allow(missing_docs)] // documentation missing in model
    Excluded,
    #[allow(missing_docs)] // documentation missing in model
    Included,
    #[allow(missing_docs)] // documentation missing in model
    Required,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for BareMetal {
    fn from(s: &str) -> Self {
        match s {
            "excluded" => BareMetal::Excluded,
            "included" => BareMetal::Included,
            "required" => BareMetal::Required,
            other => BareMetal::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for BareMetal {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(BareMetal::from(s))
    }
}
impl BareMetal {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            BareMetal::Excluded => "excluded",
            BareMetal::Included => "included",
            BareMetal::Required => "required",
            BareMetal::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["excluded", "included", "required"]
    }
}
impl AsRef<str> for BareMetal {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `InstanceGeneration`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let instancegeneration = unimplemented!();
/// match instancegeneration {
///     InstanceGeneration::Current => { /* ... */ },
///     InstanceGeneration::Previous => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `instancegeneration` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `InstanceGeneration::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `InstanceGeneration::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `InstanceGeneration::NewFeature` is defined.
/// Specifically, when `instancegeneration` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `InstanceGeneration::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 InstanceGeneration {
    #[allow(missing_docs)] // documentation missing in model
    Current,
    #[allow(missing_docs)] // documentation missing in model
    Previous,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for InstanceGeneration {
    fn from(s: &str) -> Self {
        match s {
            "current" => InstanceGeneration::Current,
            "previous" => InstanceGeneration::Previous,
            other => {
                InstanceGeneration::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for InstanceGeneration {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(InstanceGeneration::from(s))
    }
}
impl InstanceGeneration {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            InstanceGeneration::Current => "current",
            InstanceGeneration::Previous => "previous",
            InstanceGeneration::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["current", "previous"]
    }
}
impl AsRef<str> for InstanceGeneration {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>The minimum and maximum amount of memory per vCPU, in GiB.</p>
/// <p></p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct MemoryGiBPerVCpu {
    /// <p>The minimum amount of memory per vCPU, in GiB. If this parameter is not specified, there is no minimum limit.</p>
    #[doc(hidden)]
    pub min: std::option::Option<f64>,
    /// <p>The maximum amount of memory per vCPU, in GiB. If this parameter is not specified, there is no maximum limit.</p>
    #[doc(hidden)]
    pub max: std::option::Option<f64>,
}
impl MemoryGiBPerVCpu {
    /// <p>The minimum amount of memory per vCPU, in GiB. If this parameter is not specified, there is no minimum limit.</p>
    pub fn min(&self) -> std::option::Option<f64> {
        self.min
    }
    /// <p>The maximum amount of memory per vCPU, in GiB. If this parameter is not specified, there is no maximum limit.</p>
    pub fn max(&self) -> std::option::Option<f64> {
        self.max
    }
}
/// See [`MemoryGiBPerVCpu`](crate::model::MemoryGiBPerVCpu).
pub mod memory_gi_b_per_v_cpu {

    /// A builder for [`MemoryGiBPerVCpu`](crate::model::MemoryGiBPerVCpu).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) min: std::option::Option<f64>,
        pub(crate) max: std::option::Option<f64>,
    }
    impl Builder {
        /// <p>The minimum amount of memory per vCPU, in GiB. If this parameter is not specified, there is no minimum limit.</p>
        pub fn min(mut self, input: f64) -> Self {
            self.min = Some(input);
            self
        }
        /// <p>The minimum amount of memory per vCPU, in GiB. If this parameter is not specified, there is no minimum limit.</p>
        pub fn set_min(mut self, input: std::option::Option<f64>) -> Self {
            self.min = input;
            self
        }
        /// <p>The maximum amount of memory per vCPU, in GiB. If this parameter is not specified, there is no maximum limit.</p>
        pub fn max(mut self, input: f64) -> Self {
            self.max = Some(input);
            self
        }
        /// <p>The maximum amount of memory per vCPU, in GiB. If this parameter is not specified, there is no maximum limit.</p>
        pub fn set_max(mut self, input: std::option::Option<f64>) -> Self {
            self.max = input;
            self
        }
        /// Consumes the builder and constructs a [`MemoryGiBPerVCpu`](crate::model::MemoryGiBPerVCpu).
        pub fn build(self) -> crate::model::MemoryGiBPerVCpu {
            crate::model::MemoryGiBPerVCpu {
                min: self.min,
                max: self.max,
            }
        }
    }
}
impl MemoryGiBPerVCpu {
    /// Creates a new builder-style object to manufacture [`MemoryGiBPerVCpu`](crate::model::MemoryGiBPerVCpu).
    pub fn builder() -> crate::model::memory_gi_b_per_v_cpu::Builder {
        crate::model::memory_gi_b_per_v_cpu::Builder::default()
    }
}

/// When writing a match expression against `CpuManufacturer`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let cpumanufacturer = unimplemented!();
/// match cpumanufacturer {
///     CpuManufacturer::AmazonWebServices => { /* ... */ },
///     CpuManufacturer::Amd => { /* ... */ },
///     CpuManufacturer::Intel => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `cpumanufacturer` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `CpuManufacturer::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `CpuManufacturer::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `CpuManufacturer::NewFeature` is defined.
/// Specifically, when `cpumanufacturer` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `CpuManufacturer::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 CpuManufacturer {
    #[allow(missing_docs)] // documentation missing in model
    AmazonWebServices,
    #[allow(missing_docs)] // documentation missing in model
    Amd,
    #[allow(missing_docs)] // documentation missing in model
    Intel,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for CpuManufacturer {
    fn from(s: &str) -> Self {
        match s {
            "amazon-web-services" => CpuManufacturer::AmazonWebServices,
            "amd" => CpuManufacturer::Amd,
            "intel" => CpuManufacturer::Intel,
            other => CpuManufacturer::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for CpuManufacturer {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(CpuManufacturer::from(s))
    }
}
impl CpuManufacturer {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            CpuManufacturer::AmazonWebServices => "amazon-web-services",
            CpuManufacturer::Amd => "amd",
            CpuManufacturer::Intel => "intel",
            CpuManufacturer::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["amazon-web-services", "amd", "intel"]
    }
}
impl AsRef<str> for CpuManufacturer {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>The minimum and maximum amount of memory, in MiB.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct MemoryMiB {
    /// <p>The minimum amount of memory, in MiB. If this parameter is not specified, there is no minimum limit.</p>
    #[doc(hidden)]
    pub min: std::option::Option<i32>,
    /// <p>The maximum amount of memory, in MiB. If this parameter is not specified, there is no maximum limit.</p>
    #[doc(hidden)]
    pub max: std::option::Option<i32>,
}
impl MemoryMiB {
    /// <p>The minimum amount of memory, in MiB. If this parameter is not specified, there is no minimum limit.</p>
    pub fn min(&self) -> std::option::Option<i32> {
        self.min
    }
    /// <p>The maximum amount of memory, in MiB. If this parameter is not specified, there is no maximum limit.</p>
    pub fn max(&self) -> std::option::Option<i32> {
        self.max
    }
}
/// See [`MemoryMiB`](crate::model::MemoryMiB).
pub mod memory_mi_b {

    /// A builder for [`MemoryMiB`](crate::model::MemoryMiB).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) min: std::option::Option<i32>,
        pub(crate) max: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>The minimum amount of memory, in MiB. If this parameter is not specified, there is no minimum limit.</p>
        pub fn min(mut self, input: i32) -> Self {
            self.min = Some(input);
            self
        }
        /// <p>The minimum amount of memory, in MiB. If this parameter is not specified, there is no minimum limit.</p>
        pub fn set_min(mut self, input: std::option::Option<i32>) -> Self {
            self.min = input;
            self
        }
        /// <p>The maximum amount of memory, in MiB. If this parameter is not specified, there is no maximum limit.</p>
        pub fn max(mut self, input: i32) -> Self {
            self.max = Some(input);
            self
        }
        /// <p>The maximum amount of memory, in MiB. If this parameter is not specified, there is no maximum limit.</p>
        pub fn set_max(mut self, input: std::option::Option<i32>) -> Self {
            self.max = input;
            self
        }
        /// Consumes the builder and constructs a [`MemoryMiB`](crate::model::MemoryMiB).
        pub fn build(self) -> crate::model::MemoryMiB {
            crate::model::MemoryMiB {
                min: self.min,
                max: self.max,
            }
        }
    }
}
impl MemoryMiB {
    /// Creates a new builder-style object to manufacture [`MemoryMiB`](crate::model::MemoryMiB).
    pub fn builder() -> crate::model::memory_mi_b::Builder {
        crate::model::memory_mi_b::Builder::default()
    }
}

/// <p>The minimum and maximum number of vCPUs.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct VCpuCountRange {
    /// <p>The minimum number of vCPUs. If the value is <code>0</code>, there is no minimum limit.</p>
    #[doc(hidden)]
    pub min: std::option::Option<i32>,
    /// <p>The maximum number of vCPUs. If this parameter is not specified, there is no maximum limit.</p>
    #[doc(hidden)]
    pub max: std::option::Option<i32>,
}
impl VCpuCountRange {
    /// <p>The minimum number of vCPUs. If the value is <code>0</code>, there is no minimum limit.</p>
    pub fn min(&self) -> std::option::Option<i32> {
        self.min
    }
    /// <p>The maximum number of vCPUs. If this parameter is not specified, there is no maximum limit.</p>
    pub fn max(&self) -> std::option::Option<i32> {
        self.max
    }
}
/// See [`VCpuCountRange`](crate::model::VCpuCountRange).
pub mod v_cpu_count_range {

    /// A builder for [`VCpuCountRange`](crate::model::VCpuCountRange).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) min: std::option::Option<i32>,
        pub(crate) max: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>The minimum number of vCPUs. If the value is <code>0</code>, there is no minimum limit.</p>
        pub fn min(mut self, input: i32) -> Self {
            self.min = Some(input);
            self
        }
        /// <p>The minimum number of vCPUs. If the value is <code>0</code>, there is no minimum limit.</p>
        pub fn set_min(mut self, input: std::option::Option<i32>) -> Self {
            self.min = input;
            self
        }
        /// <p>The maximum number of vCPUs. If this parameter is not specified, there is no maximum limit.</p>
        pub fn max(mut self, input: i32) -> Self {
            self.max = Some(input);
            self
        }
        /// <p>The maximum number of vCPUs. If this parameter is not specified, there is no maximum limit.</p>
        pub fn set_max(mut self, input: std::option::Option<i32>) -> Self {
            self.max = input;
            self
        }
        /// Consumes the builder and constructs a [`VCpuCountRange`](crate::model::VCpuCountRange).
        pub fn build(self) -> crate::model::VCpuCountRange {
            crate::model::VCpuCountRange {
                min: self.min,
                max: self.max,
            }
        }
    }
}
impl VCpuCountRange {
    /// Creates a new builder-style object to manufacture [`VCpuCountRange`](crate::model::VCpuCountRange).
    pub fn builder() -> crate::model::v_cpu_count_range::Builder {
        crate::model::v_cpu_count_range::Builder::default()
    }
}

/// <p>The Amazon EC2 launch template that can be used by a Spot Fleet to configure Amazon EC2 instances. You must specify either the ID or name of the launch template in the request, but not both.</p>
/// <p>For information about launch templates, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html">Launch an instance from a launch template</a> in the <i>Amazon EC2 User Guide</i>.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct FleetLaunchTemplateSpecification {
    /// <p>The ID of the launch template.</p>
    /// <p>You must specify the <code>LaunchTemplateId</code> or the <code>LaunchTemplateName</code>, but not both.</p>
    #[doc(hidden)]
    pub launch_template_id: std::option::Option<std::string::String>,
    /// <p>The name of the launch template.</p>
    /// <p>You must specify the <code>LaunchTemplateName</code> or the <code>LaunchTemplateId</code>, but not both.</p>
    #[doc(hidden)]
    pub launch_template_name: std::option::Option<std::string::String>,
    /// <p>The launch template version number, <code>$Latest</code>, or <code>$Default</code>. You must specify a value, otherwise the request fails.</p>
    /// <p>If the value is <code>$Latest</code>, Amazon EC2 uses the latest version of the launch template.</p>
    /// <p>If the value is <code>$Default</code>, Amazon EC2 uses the default version of the launch template.</p>
    #[doc(hidden)]
    pub version: std::option::Option<std::string::String>,
}
impl FleetLaunchTemplateSpecification {
    /// <p>The ID of the launch template.</p>
    /// <p>You must specify the <code>LaunchTemplateId</code> or the <code>LaunchTemplateName</code>, but not both.</p>
    pub fn launch_template_id(&self) -> std::option::Option<&str> {
        self.launch_template_id.as_deref()
    }
    /// <p>The name of the launch template.</p>
    /// <p>You must specify the <code>LaunchTemplateName</code> or the <code>LaunchTemplateId</code>, but not both.</p>
    pub fn launch_template_name(&self) -> std::option::Option<&str> {
        self.launch_template_name.as_deref()
    }
    /// <p>The launch template version number, <code>$Latest</code>, or <code>$Default</code>. You must specify a value, otherwise the request fails.</p>
    /// <p>If the value is <code>$Latest</code>, Amazon EC2 uses the latest version of the launch template.</p>
    /// <p>If the value is <code>$Default</code>, Amazon EC2 uses the default version of the launch template.</p>
    pub fn version(&self) -> std::option::Option<&str> {
        self.version.as_deref()
    }
}
/// See [`FleetLaunchTemplateSpecification`](crate::model::FleetLaunchTemplateSpecification).
pub mod fleet_launch_template_specification {

    /// A builder for [`FleetLaunchTemplateSpecification`](crate::model::FleetLaunchTemplateSpecification).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) launch_template_id: std::option::Option<std::string::String>,
        pub(crate) launch_template_name: std::option::Option<std::string::String>,
        pub(crate) version: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The ID of the launch template.</p>
        /// <p>You must specify the <code>LaunchTemplateId</code> or the <code>LaunchTemplateName</code>, but not both.</p>
        pub fn launch_template_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.launch_template_id = Some(input.into());
            self
        }
        /// <p>The ID of the launch template.</p>
        /// <p>You must specify the <code>LaunchTemplateId</code> or the <code>LaunchTemplateName</code>, but not both.</p>
        pub fn set_launch_template_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.launch_template_id = input;
            self
        }
        /// <p>The name of the launch template.</p>
        /// <p>You must specify the <code>LaunchTemplateName</code> or the <code>LaunchTemplateId</code>, but not both.</p>
        pub fn launch_template_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.launch_template_name = Some(input.into());
            self
        }
        /// <p>The name of the launch template.</p>
        /// <p>You must specify the <code>LaunchTemplateName</code> or the <code>LaunchTemplateId</code>, but not both.</p>
        pub fn set_launch_template_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.launch_template_name = input;
            self
        }
        /// <p>The launch template version number, <code>$Latest</code>, or <code>$Default</code>. You must specify a value, otherwise the request fails.</p>
        /// <p>If the value is <code>$Latest</code>, Amazon EC2 uses the latest version of the launch template.</p>
        /// <p>If the value is <code>$Default</code>, Amazon EC2 uses the default version of the launch template.</p>
        pub fn version(mut self, input: impl Into<std::string::String>) -> Self {
            self.version = Some(input.into());
            self
        }
        /// <p>The launch template version number, <code>$Latest</code>, or <code>$Default</code>. You must specify a value, otherwise the request fails.</p>
        /// <p>If the value is <code>$Latest</code>, Amazon EC2 uses the latest version of the launch template.</p>
        /// <p>If the value is <code>$Default</code>, Amazon EC2 uses the default version of the launch template.</p>
        pub fn set_version(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.version = input;
            self
        }
        /// Consumes the builder and constructs a [`FleetLaunchTemplateSpecification`](crate::model::FleetLaunchTemplateSpecification).
        pub fn build(self) -> crate::model::FleetLaunchTemplateSpecification {
            crate::model::FleetLaunchTemplateSpecification {
                launch_template_id: self.launch_template_id,
                launch_template_name: self.launch_template_name,
                version: self.version,
            }
        }
    }
}
impl FleetLaunchTemplateSpecification {
    /// Creates a new builder-style object to manufacture [`FleetLaunchTemplateSpecification`](crate::model::FleetLaunchTemplateSpecification).
    pub fn builder() -> crate::model::fleet_launch_template_specification::Builder {
        crate::model::fleet_launch_template_specification::Builder::default()
    }
}

/// <p>Describes the launch specification for one or more Spot Instances. If you include On-Demand capacity in your fleet request or want to specify an EFA network device, you can't use <code>SpotFleetLaunchSpecification</code>; you must use <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_LaunchTemplateConfig.html">LaunchTemplateConfig</a>.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SpotFleetLaunchSpecification {
    /// <p>One or more security groups. When requesting instances in a VPC, you must specify the IDs of the security groups. When requesting instances in EC2-Classic, you can specify the names or the IDs of the security groups.</p>
    #[doc(hidden)]
    pub security_groups: std::option::Option<std::vec::Vec<crate::model::GroupIdentifier>>,
    /// <p>Deprecated.</p>
    #[doc(hidden)]
    pub addressing_type: std::option::Option<std::string::String>,
    /// <p>One or more block devices that are mapped to the Spot Instances. You can't specify both a snapshot ID and an encryption value. This is because only blank volumes can be encrypted on creation. If a snapshot is the basis for a volume, it is not blank and its encryption status is used for the volume encryption status.</p>
    #[doc(hidden)]
    pub block_device_mappings: std::option::Option<std::vec::Vec<crate::model::BlockDeviceMapping>>,
    /// <p>Indicates whether the instances are optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.</p>
    /// <p>Default: <code>false</code> </p>
    #[doc(hidden)]
    pub ebs_optimized: std::option::Option<bool>,
    /// <p>The IAM instance profile.</p>
    #[doc(hidden)]
    pub iam_instance_profile: std::option::Option<crate::model::IamInstanceProfileSpecification>,
    /// <p>The ID of the AMI.</p>
    #[doc(hidden)]
    pub image_id: std::option::Option<std::string::String>,
    /// <p>The instance type.</p>
    #[doc(hidden)]
    pub instance_type: std::option::Option<crate::model::InstanceType>,
    /// <p>The ID of the kernel.</p>
    #[doc(hidden)]
    pub kernel_id: std::option::Option<std::string::String>,
    /// <p>The name of the key pair.</p>
    #[doc(hidden)]
    pub key_name: std::option::Option<std::string::String>,
    /// <p>Enable or disable monitoring for the instances.</p>
    #[doc(hidden)]
    pub monitoring: std::option::Option<crate::model::SpotFleetMonitoring>,
    /// <p>One or more network interfaces. If you specify a network interface, you must specify subnet IDs and security group IDs using the network interface.</p> <note>
    /// <p> <code>SpotFleetLaunchSpecification</code> currently does not support Elastic Fabric Adapter (EFA). To specify an EFA, you must use <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_LaunchTemplateConfig.html">LaunchTemplateConfig</a>.</p>
    /// </note>
    #[doc(hidden)]
    pub network_interfaces:
        std::option::Option<std::vec::Vec<crate::model::InstanceNetworkInterfaceSpecification>>,
    /// <p>The placement information.</p>
    #[doc(hidden)]
    pub placement: std::option::Option<crate::model::SpotPlacement>,
    /// <p>The ID of the RAM disk. Some kernels require additional drivers at launch. Check the kernel requirements for information about whether you need to specify a RAM disk. To find kernel requirements, refer to the Amazon Web Services Resource Center and search for the kernel ID.</p>
    #[doc(hidden)]
    pub ramdisk_id: std::option::Option<std::string::String>,
    /// <p>The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.</p> <important>
    /// <p>If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.</p>
    /// </important>
    #[doc(hidden)]
    pub spot_price: std::option::Option<std::string::String>,
    /// <p>The IDs of the subnets in which to launch the instances. To specify multiple subnets, separate them using commas; for example, "subnet-1234abcdeexample1, subnet-0987cdef6example2".</p>
    #[doc(hidden)]
    pub subnet_id: std::option::Option<std::string::String>,
    /// <p>The Base64-encoded user data that instances use when starting up.</p>
    #[doc(hidden)]
    pub user_data: std::option::Option<std::string::String>,
    /// <p>The number of units provided by the specified instance type. These are the same units that you chose to set the target capacity in terms of instances, or a performance characteristic such as vCPUs, memory, or I/O.</p>
    /// <p>If the target capacity divided by this value is not a whole number, Amazon EC2 rounds the number of instances to the next whole number. If this value is not specified, the default is 1.</p>
    #[doc(hidden)]
    pub weighted_capacity: std::option::Option<f64>,
    /// <p>The tags to apply during creation.</p>
    #[doc(hidden)]
    pub tag_specifications:
        std::option::Option<std::vec::Vec<crate::model::SpotFleetTagSpecification>>,
    /// <p>The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with those attributes.</p> <note>
    /// <p>If you specify <code>InstanceRequirements</code>, you can't specify <code>InstanceType</code>.</p>
    /// </note>
    #[doc(hidden)]
    pub instance_requirements: std::option::Option<crate::model::InstanceRequirements>,
}
impl SpotFleetLaunchSpecification {
    /// <p>One or more security groups. When requesting instances in a VPC, you must specify the IDs of the security groups. When requesting instances in EC2-Classic, you can specify the names or the IDs of the security groups.</p>
    pub fn security_groups(&self) -> std::option::Option<&[crate::model::GroupIdentifier]> {
        self.security_groups.as_deref()
    }
    /// <p>Deprecated.</p>
    pub fn addressing_type(&self) -> std::option::Option<&str> {
        self.addressing_type.as_deref()
    }
    /// <p>One or more block devices that are mapped to the Spot Instances. You can't specify both a snapshot ID and an encryption value. This is because only blank volumes can be encrypted on creation. If a snapshot is the basis for a volume, it is not blank and its encryption status is used for the volume encryption status.</p>
    pub fn block_device_mappings(
        &self,
    ) -> std::option::Option<&[crate::model::BlockDeviceMapping]> {
        self.block_device_mappings.as_deref()
    }
    /// <p>Indicates whether the instances are optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.</p>
    /// <p>Default: <code>false</code> </p>
    pub fn ebs_optimized(&self) -> std::option::Option<bool> {
        self.ebs_optimized
    }
    /// <p>The IAM instance profile.</p>
    pub fn iam_instance_profile(
        &self,
    ) -> std::option::Option<&crate::model::IamInstanceProfileSpecification> {
        self.iam_instance_profile.as_ref()
    }
    /// <p>The ID of the AMI.</p>
    pub fn image_id(&self) -> std::option::Option<&str> {
        self.image_id.as_deref()
    }
    /// <p>The instance type.</p>
    pub fn instance_type(&self) -> std::option::Option<&crate::model::InstanceType> {
        self.instance_type.as_ref()
    }
    /// <p>The ID of the kernel.</p>
    pub fn kernel_id(&self) -> std::option::Option<&str> {
        self.kernel_id.as_deref()
    }
    /// <p>The name of the key pair.</p>
    pub fn key_name(&self) -> std::option::Option<&str> {
        self.key_name.as_deref()
    }
    /// <p>Enable or disable monitoring for the instances.</p>
    pub fn monitoring(&self) -> std::option::Option<&crate::model::SpotFleetMonitoring> {
        self.monitoring.as_ref()
    }
    /// <p>One or more network interfaces. If you specify a network interface, you must specify subnet IDs and security group IDs using the network interface.</p> <note>
    /// <p> <code>SpotFleetLaunchSpecification</code> currently does not support Elastic Fabric Adapter (EFA). To specify an EFA, you must use <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_LaunchTemplateConfig.html">LaunchTemplateConfig</a>.</p>
    /// </note>
    pub fn network_interfaces(
        &self,
    ) -> std::option::Option<&[crate::model::InstanceNetworkInterfaceSpecification]> {
        self.network_interfaces.as_deref()
    }
    /// <p>The placement information.</p>
    pub fn placement(&self) -> std::option::Option<&crate::model::SpotPlacement> {
        self.placement.as_ref()
    }
    /// <p>The ID of the RAM disk. Some kernels require additional drivers at launch. Check the kernel requirements for information about whether you need to specify a RAM disk. To find kernel requirements, refer to the Amazon Web Services Resource Center and search for the kernel ID.</p>
    pub fn ramdisk_id(&self) -> std::option::Option<&str> {
        self.ramdisk_id.as_deref()
    }
    /// <p>The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.</p> <important>
    /// <p>If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.</p>
    /// </important>
    pub fn spot_price(&self) -> std::option::Option<&str> {
        self.spot_price.as_deref()
    }
    /// <p>The IDs of the subnets in which to launch the instances. To specify multiple subnets, separate them using commas; for example, "subnet-1234abcdeexample1, subnet-0987cdef6example2".</p>
    pub fn subnet_id(&self) -> std::option::Option<&str> {
        self.subnet_id.as_deref()
    }
    /// <p>The Base64-encoded user data that instances use when starting up.</p>
    pub fn user_data(&self) -> std::option::Option<&str> {
        self.user_data.as_deref()
    }
    /// <p>The number of units provided by the specified instance type. These are the same units that you chose to set the target capacity in terms of instances, or a performance characteristic such as vCPUs, memory, or I/O.</p>
    /// <p>If the target capacity divided by this value is not a whole number, Amazon EC2 rounds the number of instances to the next whole number. If this value is not specified, the default is 1.</p>
    pub fn weighted_capacity(&self) -> std::option::Option<f64> {
        self.weighted_capacity
    }
    /// <p>The tags to apply during creation.</p>
    pub fn tag_specifications(
        &self,
    ) -> std::option::Option<&[crate::model::SpotFleetTagSpecification]> {
        self.tag_specifications.as_deref()
    }
    /// <p>The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with those attributes.</p> <note>
    /// <p>If you specify <code>InstanceRequirements</code>, you can't specify <code>InstanceType</code>.</p>
    /// </note>
    pub fn instance_requirements(
        &self,
    ) -> std::option::Option<&crate::model::InstanceRequirements> {
        self.instance_requirements.as_ref()
    }
}
/// See [`SpotFleetLaunchSpecification`](crate::model::SpotFleetLaunchSpecification).
pub mod spot_fleet_launch_specification {

    /// A builder for [`SpotFleetLaunchSpecification`](crate::model::SpotFleetLaunchSpecification).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) security_groups:
            std::option::Option<std::vec::Vec<crate::model::GroupIdentifier>>,
        pub(crate) addressing_type: std::option::Option<std::string::String>,
        pub(crate) block_device_mappings:
            std::option::Option<std::vec::Vec<crate::model::BlockDeviceMapping>>,
        pub(crate) ebs_optimized: std::option::Option<bool>,
        pub(crate) iam_instance_profile:
            std::option::Option<crate::model::IamInstanceProfileSpecification>,
        pub(crate) image_id: std::option::Option<std::string::String>,
        pub(crate) instance_type: std::option::Option<crate::model::InstanceType>,
        pub(crate) kernel_id: std::option::Option<std::string::String>,
        pub(crate) key_name: std::option::Option<std::string::String>,
        pub(crate) monitoring: std::option::Option<crate::model::SpotFleetMonitoring>,
        pub(crate) network_interfaces:
            std::option::Option<std::vec::Vec<crate::model::InstanceNetworkInterfaceSpecification>>,
        pub(crate) placement: std::option::Option<crate::model::SpotPlacement>,
        pub(crate) ramdisk_id: std::option::Option<std::string::String>,
        pub(crate) spot_price: std::option::Option<std::string::String>,
        pub(crate) subnet_id: std::option::Option<std::string::String>,
        pub(crate) user_data: std::option::Option<std::string::String>,
        pub(crate) weighted_capacity: std::option::Option<f64>,
        pub(crate) tag_specifications:
            std::option::Option<std::vec::Vec<crate::model::SpotFleetTagSpecification>>,
        pub(crate) instance_requirements: std::option::Option<crate::model::InstanceRequirements>,
    }
    impl Builder {
        /// Appends an item to `security_groups`.
        ///
        /// To override the contents of this collection use [`set_security_groups`](Self::set_security_groups).
        ///
        /// <p>One or more security groups. When requesting instances in a VPC, you must specify the IDs of the security groups. When requesting instances in EC2-Classic, you can specify the names or the IDs of the security groups.</p>
        pub fn security_groups(mut self, input: crate::model::GroupIdentifier) -> Self {
            let mut v = self.security_groups.unwrap_or_default();
            v.push(input);
            self.security_groups = Some(v);
            self
        }
        /// <p>One or more security groups. When requesting instances in a VPC, you must specify the IDs of the security groups. When requesting instances in EC2-Classic, you can specify the names or the IDs of the security groups.</p>
        pub fn set_security_groups(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::GroupIdentifier>>,
        ) -> Self {
            self.security_groups = input;
            self
        }
        /// <p>Deprecated.</p>
        pub fn addressing_type(mut self, input: impl Into<std::string::String>) -> Self {
            self.addressing_type = Some(input.into());
            self
        }
        /// <p>Deprecated.</p>
        pub fn set_addressing_type(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.addressing_type = input;
            self
        }
        /// Appends an item to `block_device_mappings`.
        ///
        /// To override the contents of this collection use [`set_block_device_mappings`](Self::set_block_device_mappings).
        ///
        /// <p>One or more block devices that are mapped to the Spot Instances. You can't specify both a snapshot ID and an encryption value. This is because only blank volumes can be encrypted on creation. If a snapshot is the basis for a volume, it is not blank and its encryption status is used for the volume encryption status.</p>
        pub fn block_device_mappings(mut self, input: crate::model::BlockDeviceMapping) -> Self {
            let mut v = self.block_device_mappings.unwrap_or_default();
            v.push(input);
            self.block_device_mappings = Some(v);
            self
        }
        /// <p>One or more block devices that are mapped to the Spot Instances. You can't specify both a snapshot ID and an encryption value. This is because only blank volumes can be encrypted on creation. If a snapshot is the basis for a volume, it is not blank and its encryption status is used for the volume encryption status.</p>
        pub fn set_block_device_mappings(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::BlockDeviceMapping>>,
        ) -> Self {
            self.block_device_mappings = input;
            self
        }
        /// <p>Indicates whether the instances are optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.</p>
        /// <p>Default: <code>false</code> </p>
        pub fn ebs_optimized(mut self, input: bool) -> Self {
            self.ebs_optimized = Some(input);
            self
        }
        /// <p>Indicates whether the instances are optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.</p>
        /// <p>Default: <code>false</code> </p>
        pub fn set_ebs_optimized(mut self, input: std::option::Option<bool>) -> Self {
            self.ebs_optimized = input;
            self
        }
        /// <p>The IAM instance profile.</p>
        pub fn iam_instance_profile(
            mut self,
            input: crate::model::IamInstanceProfileSpecification,
        ) -> Self {
            self.iam_instance_profile = Some(input);
            self
        }
        /// <p>The IAM instance profile.</p>
        pub fn set_iam_instance_profile(
            mut self,
            input: std::option::Option<crate::model::IamInstanceProfileSpecification>,
        ) -> Self {
            self.iam_instance_profile = input;
            self
        }
        /// <p>The ID of the AMI.</p>
        pub fn image_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.image_id = Some(input.into());
            self
        }
        /// <p>The ID of the AMI.</p>
        pub fn set_image_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.image_id = input;
            self
        }
        /// <p>The instance type.</p>
        pub fn instance_type(mut self, input: crate::model::InstanceType) -> Self {
            self.instance_type = Some(input);
            self
        }
        /// <p>The instance type.</p>
        pub fn set_instance_type(
            mut self,
            input: std::option::Option<crate::model::InstanceType>,
        ) -> Self {
            self.instance_type = input;
            self
        }
        /// <p>The ID of the kernel.</p>
        pub fn kernel_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.kernel_id = Some(input.into());
            self
        }
        /// <p>The ID of the kernel.</p>
        pub fn set_kernel_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.kernel_id = input;
            self
        }
        /// <p>The name of the key pair.</p>
        pub fn key_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.key_name = Some(input.into());
            self
        }
        /// <p>The name of the key pair.</p>
        pub fn set_key_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.key_name = input;
            self
        }
        /// <p>Enable or disable monitoring for the instances.</p>
        pub fn monitoring(mut self, input: crate::model::SpotFleetMonitoring) -> Self {
            self.monitoring = Some(input);
            self
        }
        /// <p>Enable or disable monitoring for the instances.</p>
        pub fn set_monitoring(
            mut self,
            input: std::option::Option<crate::model::SpotFleetMonitoring>,
        ) -> Self {
            self.monitoring = input;
            self
        }
        /// Appends an item to `network_interfaces`.
        ///
        /// To override the contents of this collection use [`set_network_interfaces`](Self::set_network_interfaces).
        ///
        /// <p>One or more network interfaces. If you specify a network interface, you must specify subnet IDs and security group IDs using the network interface.</p> <note>
        /// <p> <code>SpotFleetLaunchSpecification</code> currently does not support Elastic Fabric Adapter (EFA). To specify an EFA, you must use <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_LaunchTemplateConfig.html">LaunchTemplateConfig</a>.</p>
        /// </note>
        pub fn network_interfaces(
            mut self,
            input: crate::model::InstanceNetworkInterfaceSpecification,
        ) -> Self {
            let mut v = self.network_interfaces.unwrap_or_default();
            v.push(input);
            self.network_interfaces = Some(v);
            self
        }
        /// <p>One or more network interfaces. If you specify a network interface, you must specify subnet IDs and security group IDs using the network interface.</p> <note>
        /// <p> <code>SpotFleetLaunchSpecification</code> currently does not support Elastic Fabric Adapter (EFA). To specify an EFA, you must use <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_LaunchTemplateConfig.html">LaunchTemplateConfig</a>.</p>
        /// </note>
        pub fn set_network_interfaces(
            mut self,
            input: std::option::Option<
                std::vec::Vec<crate::model::InstanceNetworkInterfaceSpecification>,
            >,
        ) -> Self {
            self.network_interfaces = input;
            self
        }
        /// <p>The placement information.</p>
        pub fn placement(mut self, input: crate::model::SpotPlacement) -> Self {
            self.placement = Some(input);
            self
        }
        /// <p>The placement information.</p>
        pub fn set_placement(
            mut self,
            input: std::option::Option<crate::model::SpotPlacement>,
        ) -> Self {
            self.placement = input;
            self
        }
        /// <p>The ID of the RAM disk. Some kernels require additional drivers at launch. Check the kernel requirements for information about whether you need to specify a RAM disk. To find kernel requirements, refer to the Amazon Web Services Resource Center and search for the kernel ID.</p>
        pub fn ramdisk_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.ramdisk_id = Some(input.into());
            self
        }
        /// <p>The ID of the RAM disk. Some kernels require additional drivers at launch. Check the kernel requirements for information about whether you need to specify a RAM disk. To find kernel requirements, refer to the Amazon Web Services Resource Center and search for the kernel ID.</p>
        pub fn set_ramdisk_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.ramdisk_id = input;
            self
        }
        /// <p>The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.</p> <important>
        /// <p>If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.</p>
        /// </important>
        pub fn spot_price(mut self, input: impl Into<std::string::String>) -> Self {
            self.spot_price = Some(input.into());
            self
        }
        /// <p>The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.</p> <important>
        /// <p>If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.</p>
        /// </important>
        pub fn set_spot_price(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.spot_price = input;
            self
        }
        /// <p>The IDs of the subnets in which to launch the instances. To specify multiple subnets, separate them using commas; for example, "subnet-1234abcdeexample1, subnet-0987cdef6example2".</p>
        pub fn subnet_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.subnet_id = Some(input.into());
            self
        }
        /// <p>The IDs of the subnets in which to launch the instances. To specify multiple subnets, separate them using commas; for example, "subnet-1234abcdeexample1, subnet-0987cdef6example2".</p>
        pub fn set_subnet_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.subnet_id = input;
            self
        }
        /// <p>The Base64-encoded user data that instances use when starting up.</p>
        pub fn user_data(mut self, input: impl Into<std::string::String>) -> Self {
            self.user_data = Some(input.into());
            self
        }
        /// <p>The Base64-encoded user data that instances use when starting up.</p>
        pub fn set_user_data(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.user_data = input;
            self
        }
        /// <p>The number of units provided by the specified instance type. These are the same units that you chose to set the target capacity in terms of instances, or a performance characteristic such as vCPUs, memory, or I/O.</p>
        /// <p>If the target capacity divided by this value is not a whole number, Amazon EC2 rounds the number of instances to the next whole number. If this value is not specified, the default is 1.</p>
        pub fn weighted_capacity(mut self, input: f64) -> Self {
            self.weighted_capacity = Some(input);
            self
        }
        /// <p>The number of units provided by the specified instance type. These are the same units that you chose to set the target capacity in terms of instances, or a performance characteristic such as vCPUs, memory, or I/O.</p>
        /// <p>If the target capacity divided by this value is not a whole number, Amazon EC2 rounds the number of instances to the next whole number. If this value is not specified, the default is 1.</p>
        pub fn set_weighted_capacity(mut self, input: std::option::Option<f64>) -> Self {
            self.weighted_capacity = input;
            self
        }
        /// Appends an item to `tag_specifications`.
        ///
        /// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
        ///
        /// <p>The tags to apply during creation.</p>
        pub fn tag_specifications(
            mut self,
            input: crate::model::SpotFleetTagSpecification,
        ) -> Self {
            let mut v = self.tag_specifications.unwrap_or_default();
            v.push(input);
            self.tag_specifications = Some(v);
            self
        }
        /// <p>The tags to apply during creation.</p>
        pub fn set_tag_specifications(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::SpotFleetTagSpecification>>,
        ) -> Self {
            self.tag_specifications = input;
            self
        }
        /// <p>The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with those attributes.</p> <note>
        /// <p>If you specify <code>InstanceRequirements</code>, you can't specify <code>InstanceType</code>.</p>
        /// </note>
        pub fn instance_requirements(mut self, input: crate::model::InstanceRequirements) -> Self {
            self.instance_requirements = Some(input);
            self
        }
        /// <p>The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with those attributes.</p> <note>
        /// <p>If you specify <code>InstanceRequirements</code>, you can't specify <code>InstanceType</code>.</p>
        /// </note>
        pub fn set_instance_requirements(
            mut self,
            input: std::option::Option<crate::model::InstanceRequirements>,
        ) -> Self {
            self.instance_requirements = input;
            self
        }
        /// Consumes the builder and constructs a [`SpotFleetLaunchSpecification`](crate::model::SpotFleetLaunchSpecification).
        pub fn build(self) -> crate::model::SpotFleetLaunchSpecification {
            crate::model::SpotFleetLaunchSpecification {
                security_groups: self.security_groups,
                addressing_type: self.addressing_type,
                block_device_mappings: self.block_device_mappings,
                ebs_optimized: self.ebs_optimized,
                iam_instance_profile: self.iam_instance_profile,
                image_id: self.image_id,
                instance_type: self.instance_type,
                kernel_id: self.kernel_id,
                key_name: self.key_name,
                monitoring: self.monitoring,
                network_interfaces: self.network_interfaces,
                placement: self.placement,
                ramdisk_id: self.ramdisk_id,
                spot_price: self.spot_price,
                subnet_id: self.subnet_id,
                user_data: self.user_data,
                weighted_capacity: self.weighted_capacity,
                tag_specifications: self.tag_specifications,
                instance_requirements: self.instance_requirements,
            }
        }
    }
}
impl SpotFleetLaunchSpecification {
    /// Creates a new builder-style object to manufacture [`SpotFleetLaunchSpecification`](crate::model::SpotFleetLaunchSpecification).
    pub fn builder() -> crate::model::spot_fleet_launch_specification::Builder {
        crate::model::spot_fleet_launch_specification::Builder::default()
    }
}

/// <p>The tags for a Spot Fleet resource.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SpotFleetTagSpecification {
    /// <p>The type of resource. Currently, the only resource type that is supported is <code>instance</code>. To tag the Spot Fleet request on creation, use the <code>TagSpecifications</code> parameter in <code> <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_SpotFleetRequestConfigData.html">SpotFleetRequestConfigData</a> </code>.</p>
    #[doc(hidden)]
    pub resource_type: std::option::Option<crate::model::ResourceType>,
    /// <p>The tags.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl SpotFleetTagSpecification {
    /// <p>The type of resource. Currently, the only resource type that is supported is <code>instance</code>. To tag the Spot Fleet request on creation, use the <code>TagSpecifications</code> parameter in <code> <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_SpotFleetRequestConfigData.html">SpotFleetRequestConfigData</a> </code>.</p>
    pub fn resource_type(&self) -> std::option::Option<&crate::model::ResourceType> {
        self.resource_type.as_ref()
    }
    /// <p>The tags.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
}
/// See [`SpotFleetTagSpecification`](crate::model::SpotFleetTagSpecification).
pub mod spot_fleet_tag_specification {

    /// A builder for [`SpotFleetTagSpecification`](crate::model::SpotFleetTagSpecification).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) resource_type: std::option::Option<crate::model::ResourceType>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    }
    impl Builder {
        /// <p>The type of resource. Currently, the only resource type that is supported is <code>instance</code>. To tag the Spot Fleet request on creation, use the <code>TagSpecifications</code> parameter in <code> <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_SpotFleetRequestConfigData.html">SpotFleetRequestConfigData</a> </code>.</p>
        pub fn resource_type(mut self, input: crate::model::ResourceType) -> Self {
            self.resource_type = Some(input);
            self
        }
        /// <p>The type of resource. Currently, the only resource type that is supported is <code>instance</code>. To tag the Spot Fleet request on creation, use the <code>TagSpecifications</code> parameter in <code> <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_SpotFleetRequestConfigData.html">SpotFleetRequestConfigData</a> </code>.</p>
        pub fn set_resource_type(
            mut self,
            input: std::option::Option<crate::model::ResourceType>,
        ) -> Self {
            self.resource_type = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>The tags.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>The tags.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// Consumes the builder and constructs a [`SpotFleetTagSpecification`](crate::model::SpotFleetTagSpecification).
        pub fn build(self) -> crate::model::SpotFleetTagSpecification {
            crate::model::SpotFleetTagSpecification {
                resource_type: self.resource_type,
                tags: self.tags,
            }
        }
    }
}
impl SpotFleetTagSpecification {
    /// Creates a new builder-style object to manufacture [`SpotFleetTagSpecification`](crate::model::SpotFleetTagSpecification).
    pub fn builder() -> crate::model::spot_fleet_tag_specification::Builder {
        crate::model::spot_fleet_tag_specification::Builder::default()
    }
}

/// <p>Describes whether monitoring is enabled.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SpotFleetMonitoring {
    /// <p>Enables monitoring for the instance.</p>
    /// <p>Default: <code>false</code> </p>
    #[doc(hidden)]
    pub enabled: std::option::Option<bool>,
}
impl SpotFleetMonitoring {
    /// <p>Enables monitoring for the instance.</p>
    /// <p>Default: <code>false</code> </p>
    pub fn enabled(&self) -> std::option::Option<bool> {
        self.enabled
    }
}
/// See [`SpotFleetMonitoring`](crate::model::SpotFleetMonitoring).
pub mod spot_fleet_monitoring {

    /// A builder for [`SpotFleetMonitoring`](crate::model::SpotFleetMonitoring).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) enabled: std::option::Option<bool>,
    }
    impl Builder {
        /// <p>Enables monitoring for the instance.</p>
        /// <p>Default: <code>false</code> </p>
        pub fn enabled(mut self, input: bool) -> Self {
            self.enabled = Some(input);
            self
        }
        /// <p>Enables monitoring for the instance.</p>
        /// <p>Default: <code>false</code> </p>
        pub fn set_enabled(mut self, input: std::option::Option<bool>) -> Self {
            self.enabled = input;
            self
        }
        /// Consumes the builder and constructs a [`SpotFleetMonitoring`](crate::model::SpotFleetMonitoring).
        pub fn build(self) -> crate::model::SpotFleetMonitoring {
            crate::model::SpotFleetMonitoring {
                enabled: self.enabled,
            }
        }
    }
}
impl SpotFleetMonitoring {
    /// Creates a new builder-style object to manufacture [`SpotFleetMonitoring`](crate::model::SpotFleetMonitoring).
    pub fn builder() -> crate::model::spot_fleet_monitoring::Builder {
        crate::model::spot_fleet_monitoring::Builder::default()
    }
}

/// When writing a match expression against `ExcessCapacityTerminationPolicy`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let excesscapacityterminationpolicy = unimplemented!();
/// match excesscapacityterminationpolicy {
///     ExcessCapacityTerminationPolicy::Default => { /* ... */ },
///     ExcessCapacityTerminationPolicy::NoTermination => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `excesscapacityterminationpolicy` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `ExcessCapacityTerminationPolicy::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `ExcessCapacityTerminationPolicy::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `ExcessCapacityTerminationPolicy::NewFeature` is defined.
/// Specifically, when `excesscapacityterminationpolicy` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `ExcessCapacityTerminationPolicy::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 ExcessCapacityTerminationPolicy {
    #[allow(missing_docs)] // documentation missing in model
    Default,
    #[allow(missing_docs)] // documentation missing in model
    NoTermination,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for ExcessCapacityTerminationPolicy {
    fn from(s: &str) -> Self {
        match s {
            "default" => ExcessCapacityTerminationPolicy::Default,
            "noTermination" => ExcessCapacityTerminationPolicy::NoTermination,
            other => ExcessCapacityTerminationPolicy::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for ExcessCapacityTerminationPolicy {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(ExcessCapacityTerminationPolicy::from(s))
    }
}
impl ExcessCapacityTerminationPolicy {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            ExcessCapacityTerminationPolicy::Default => "default",
            ExcessCapacityTerminationPolicy::NoTermination => "noTermination",
            ExcessCapacityTerminationPolicy::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["default", "noTermination"]
    }
}
impl AsRef<str> for ExcessCapacityTerminationPolicy {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>The strategies for managing your Spot Instances that are at an elevated risk of being interrupted.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SpotMaintenanceStrategies {
    /// <p>The Spot Instance replacement strategy to use when Amazon EC2 emits a signal that your Spot Instance is at an elevated risk of being interrupted. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-fleet-capacity-rebalance.html">Capacity rebalancing</a> in the <i>Amazon EC2 User Guide for Linux Instances</i>.</p>
    #[doc(hidden)]
    pub capacity_rebalance: std::option::Option<crate::model::SpotCapacityRebalance>,
}
impl SpotMaintenanceStrategies {
    /// <p>The Spot Instance replacement strategy to use when Amazon EC2 emits a signal that your Spot Instance is at an elevated risk of being interrupted. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-fleet-capacity-rebalance.html">Capacity rebalancing</a> in the <i>Amazon EC2 User Guide for Linux Instances</i>.</p>
    pub fn capacity_rebalance(&self) -> std::option::Option<&crate::model::SpotCapacityRebalance> {
        self.capacity_rebalance.as_ref()
    }
}
/// See [`SpotMaintenanceStrategies`](crate::model::SpotMaintenanceStrategies).
pub mod spot_maintenance_strategies {

    /// A builder for [`SpotMaintenanceStrategies`](crate::model::SpotMaintenanceStrategies).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) capacity_rebalance: std::option::Option<crate::model::SpotCapacityRebalance>,
    }
    impl Builder {
        /// <p>The Spot Instance replacement strategy to use when Amazon EC2 emits a signal that your Spot Instance is at an elevated risk of being interrupted. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-fleet-capacity-rebalance.html">Capacity rebalancing</a> in the <i>Amazon EC2 User Guide for Linux Instances</i>.</p>
        pub fn capacity_rebalance(mut self, input: crate::model::SpotCapacityRebalance) -> Self {
            self.capacity_rebalance = Some(input);
            self
        }
        /// <p>The Spot Instance replacement strategy to use when Amazon EC2 emits a signal that your Spot Instance is at an elevated risk of being interrupted. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-fleet-capacity-rebalance.html">Capacity rebalancing</a> in the <i>Amazon EC2 User Guide for Linux Instances</i>.</p>
        pub fn set_capacity_rebalance(
            mut self,
            input: std::option::Option<crate::model::SpotCapacityRebalance>,
        ) -> Self {
            self.capacity_rebalance = input;
            self
        }
        /// Consumes the builder and constructs a [`SpotMaintenanceStrategies`](crate::model::SpotMaintenanceStrategies).
        pub fn build(self) -> crate::model::SpotMaintenanceStrategies {
            crate::model::SpotMaintenanceStrategies {
                capacity_rebalance: self.capacity_rebalance,
            }
        }
    }
}
impl SpotMaintenanceStrategies {
    /// Creates a new builder-style object to manufacture [`SpotMaintenanceStrategies`](crate::model::SpotMaintenanceStrategies).
    pub fn builder() -> crate::model::spot_maintenance_strategies::Builder {
        crate::model::spot_maintenance_strategies::Builder::default()
    }
}

/// <p>The Spot Instance replacement strategy to use when Amazon EC2 emits a signal that your Spot Instance is at an elevated risk of being interrupted. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-fleet-capacity-rebalance.html">Capacity rebalancing</a> in the <i>Amazon EC2 User Guide for Linux Instances</i>.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SpotCapacityRebalance {
    /// <p>The replacement strategy to use. Only available for fleets of type <code>maintain</code>.</p>
    /// <p> <code>launch</code> - Spot Fleet launches a new replacement Spot Instance when a rebalance notification is emitted for an existing Spot Instance in the fleet. Spot Fleet does not terminate the instances that receive a rebalance notification. You can terminate the old instances, or you can leave them running. You are charged for all instances while they are running. </p>
    /// <p> <code>launch-before-terminate</code> - Spot Fleet launches a new replacement Spot Instance when a rebalance notification is emitted for an existing Spot Instance in the fleet, and then, after a delay that you specify (in <code>TerminationDelay</code>), terminates the instances that received a rebalance notification.</p>
    #[doc(hidden)]
    pub replacement_strategy: std::option::Option<crate::model::ReplacementStrategy>,
    /// <p>The amount of time (in seconds) that Amazon EC2 waits before terminating the old Spot Instance after launching a new replacement Spot Instance.</p>
    /// <p>Required when <code>ReplacementStrategy</code> is set to <code>launch-before-terminate</code>.</p>
    /// <p>Not valid when <code>ReplacementStrategy</code> is set to <code>launch</code>.</p>
    /// <p>Valid values: Minimum value of <code>120</code> seconds. Maximum value of <code>7200</code> seconds.</p>
    #[doc(hidden)]
    pub termination_delay: std::option::Option<i32>,
}
impl SpotCapacityRebalance {
    /// <p>The replacement strategy to use. Only available for fleets of type <code>maintain</code>.</p>
    /// <p> <code>launch</code> - Spot Fleet launches a new replacement Spot Instance when a rebalance notification is emitted for an existing Spot Instance in the fleet. Spot Fleet does not terminate the instances that receive a rebalance notification. You can terminate the old instances, or you can leave them running. You are charged for all instances while they are running. </p>
    /// <p> <code>launch-before-terminate</code> - Spot Fleet launches a new replacement Spot Instance when a rebalance notification is emitted for an existing Spot Instance in the fleet, and then, after a delay that you specify (in <code>TerminationDelay</code>), terminates the instances that received a rebalance notification.</p>
    pub fn replacement_strategy(&self) -> std::option::Option<&crate::model::ReplacementStrategy> {
        self.replacement_strategy.as_ref()
    }
    /// <p>The amount of time (in seconds) that Amazon EC2 waits before terminating the old Spot Instance after launching a new replacement Spot Instance.</p>
    /// <p>Required when <code>ReplacementStrategy</code> is set to <code>launch-before-terminate</code>.</p>
    /// <p>Not valid when <code>ReplacementStrategy</code> is set to <code>launch</code>.</p>
    /// <p>Valid values: Minimum value of <code>120</code> seconds. Maximum value of <code>7200</code> seconds.</p>
    pub fn termination_delay(&self) -> std::option::Option<i32> {
        self.termination_delay
    }
}
/// See [`SpotCapacityRebalance`](crate::model::SpotCapacityRebalance).
pub mod spot_capacity_rebalance {

    /// A builder for [`SpotCapacityRebalance`](crate::model::SpotCapacityRebalance).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) replacement_strategy: std::option::Option<crate::model::ReplacementStrategy>,
        pub(crate) termination_delay: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>The replacement strategy to use. Only available for fleets of type <code>maintain</code>.</p>
        /// <p> <code>launch</code> - Spot Fleet launches a new replacement Spot Instance when a rebalance notification is emitted for an existing Spot Instance in the fleet. Spot Fleet does not terminate the instances that receive a rebalance notification. You can terminate the old instances, or you can leave them running. You are charged for all instances while they are running. </p>
        /// <p> <code>launch-before-terminate</code> - Spot Fleet launches a new replacement Spot Instance when a rebalance notification is emitted for an existing Spot Instance in the fleet, and then, after a delay that you specify (in <code>TerminationDelay</code>), terminates the instances that received a rebalance notification.</p>
        pub fn replacement_strategy(mut self, input: crate::model::ReplacementStrategy) -> Self {
            self.replacement_strategy = Some(input);
            self
        }
        /// <p>The replacement strategy to use. Only available for fleets of type <code>maintain</code>.</p>
        /// <p> <code>launch</code> - Spot Fleet launches a new replacement Spot Instance when a rebalance notification is emitted for an existing Spot Instance in the fleet. Spot Fleet does not terminate the instances that receive a rebalance notification. You can terminate the old instances, or you can leave them running. You are charged for all instances while they are running. </p>
        /// <p> <code>launch-before-terminate</code> - Spot Fleet launches a new replacement Spot Instance when a rebalance notification is emitted for an existing Spot Instance in the fleet, and then, after a delay that you specify (in <code>TerminationDelay</code>), terminates the instances that received a rebalance notification.</p>
        pub fn set_replacement_strategy(
            mut self,
            input: std::option::Option<crate::model::ReplacementStrategy>,
        ) -> Self {
            self.replacement_strategy = input;
            self
        }
        /// <p>The amount of time (in seconds) that Amazon EC2 waits before terminating the old Spot Instance after launching a new replacement Spot Instance.</p>
        /// <p>Required when <code>ReplacementStrategy</code> is set to <code>launch-before-terminate</code>.</p>
        /// <p>Not valid when <code>ReplacementStrategy</code> is set to <code>launch</code>.</p>
        /// <p>Valid values: Minimum value of <code>120</code> seconds. Maximum value of <code>7200</code> seconds.</p>
        pub fn termination_delay(mut self, input: i32) -> Self {
            self.termination_delay = Some(input);
            self
        }
        /// <p>The amount of time (in seconds) that Amazon EC2 waits before terminating the old Spot Instance after launching a new replacement Spot Instance.</p>
        /// <p>Required when <code>ReplacementStrategy</code> is set to <code>launch-before-terminate</code>.</p>
        /// <p>Not valid when <code>ReplacementStrategy</code> is set to <code>launch</code>.</p>
        /// <p>Valid values: Minimum value of <code>120</code> seconds. Maximum value of <code>7200</code> seconds.</p>
        pub fn set_termination_delay(mut self, input: std::option::Option<i32>) -> Self {
            self.termination_delay = input;
            self
        }
        /// Consumes the builder and constructs a [`SpotCapacityRebalance`](crate::model::SpotCapacityRebalance).
        pub fn build(self) -> crate::model::SpotCapacityRebalance {
            crate::model::SpotCapacityRebalance {
                replacement_strategy: self.replacement_strategy,
                termination_delay: self.termination_delay,
            }
        }
    }
}
impl SpotCapacityRebalance {
    /// Creates a new builder-style object to manufacture [`SpotCapacityRebalance`](crate::model::SpotCapacityRebalance).
    pub fn builder() -> crate::model::spot_capacity_rebalance::Builder {
        crate::model::spot_capacity_rebalance::Builder::default()
    }
}

/// When writing a match expression against `ReplacementStrategy`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let replacementstrategy = unimplemented!();
/// match replacementstrategy {
///     ReplacementStrategy::Launch => { /* ... */ },
///     ReplacementStrategy::LaunchBeforeTerminate => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `replacementstrategy` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `ReplacementStrategy::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `ReplacementStrategy::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `ReplacementStrategy::NewFeature` is defined.
/// Specifically, when `replacementstrategy` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `ReplacementStrategy::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 ReplacementStrategy {
    #[allow(missing_docs)] // documentation missing in model
    Launch,
    #[allow(missing_docs)] // documentation missing in model
    LaunchBeforeTerminate,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for ReplacementStrategy {
    fn from(s: &str) -> Self {
        match s {
            "launch" => ReplacementStrategy::Launch,
            "launch-before-terminate" => ReplacementStrategy::LaunchBeforeTerminate,
            other => {
                ReplacementStrategy::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for ReplacementStrategy {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(ReplacementStrategy::from(s))
    }
}
impl ReplacementStrategy {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            ReplacementStrategy::Launch => "launch",
            ReplacementStrategy::LaunchBeforeTerminate => "launch-before-terminate",
            ReplacementStrategy::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["launch", "launch-before-terminate"]
    }
}
impl AsRef<str> for ReplacementStrategy {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `OnDemandAllocationStrategy`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let ondemandallocationstrategy = unimplemented!();
/// match ondemandallocationstrategy {
///     OnDemandAllocationStrategy::LowestPrice => { /* ... */ },
///     OnDemandAllocationStrategy::Prioritized => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `ondemandallocationstrategy` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `OnDemandAllocationStrategy::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `OnDemandAllocationStrategy::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `OnDemandAllocationStrategy::NewFeature` is defined.
/// Specifically, when `ondemandallocationstrategy` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `OnDemandAllocationStrategy::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 OnDemandAllocationStrategy {
    #[allow(missing_docs)] // documentation missing in model
    LowestPrice,
    #[allow(missing_docs)] // documentation missing in model
    Prioritized,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for OnDemandAllocationStrategy {
    fn from(s: &str) -> Self {
        match s {
            "lowestPrice" => OnDemandAllocationStrategy::LowestPrice,
            "prioritized" => OnDemandAllocationStrategy::Prioritized,
            other => OnDemandAllocationStrategy::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for OnDemandAllocationStrategy {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(OnDemandAllocationStrategy::from(s))
    }
}
impl OnDemandAllocationStrategy {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            OnDemandAllocationStrategy::LowestPrice => "lowestPrice",
            OnDemandAllocationStrategy::Prioritized => "prioritized",
            OnDemandAllocationStrategy::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["lowestPrice", "prioritized"]
    }
}
impl AsRef<str> for OnDemandAllocationStrategy {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `AllocationStrategy`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let allocationstrategy = unimplemented!();
/// match allocationstrategy {
///     AllocationStrategy::CapacityOptimized => { /* ... */ },
///     AllocationStrategy::CapacityOptimizedPrioritized => { /* ... */ },
///     AllocationStrategy::Diversified => { /* ... */ },
///     AllocationStrategy::LowestPrice => { /* ... */ },
///     AllocationStrategy::PriceCapacityOptimized => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `allocationstrategy` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `AllocationStrategy::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `AllocationStrategy::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `AllocationStrategy::NewFeature` is defined.
/// Specifically, when `allocationstrategy` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `AllocationStrategy::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 AllocationStrategy {
    #[allow(missing_docs)] // documentation missing in model
    CapacityOptimized,
    #[allow(missing_docs)] // documentation missing in model
    CapacityOptimizedPrioritized,
    #[allow(missing_docs)] // documentation missing in model
    Diversified,
    #[allow(missing_docs)] // documentation missing in model
    LowestPrice,
    #[allow(missing_docs)] // documentation missing in model
    PriceCapacityOptimized,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for AllocationStrategy {
    fn from(s: &str) -> Self {
        match s {
            "capacityOptimized" => AllocationStrategy::CapacityOptimized,
            "capacityOptimizedPrioritized" => AllocationStrategy::CapacityOptimizedPrioritized,
            "diversified" => AllocationStrategy::Diversified,
            "lowestPrice" => AllocationStrategy::LowestPrice,
            "priceCapacityOptimized" => AllocationStrategy::PriceCapacityOptimized,
            other => {
                AllocationStrategy::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for AllocationStrategy {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(AllocationStrategy::from(s))
    }
}
impl AllocationStrategy {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            AllocationStrategy::CapacityOptimized => "capacityOptimized",
            AllocationStrategy::CapacityOptimizedPrioritized => "capacityOptimizedPrioritized",
            AllocationStrategy::Diversified => "diversified",
            AllocationStrategy::LowestPrice => "lowestPrice",
            AllocationStrategy::PriceCapacityOptimized => "priceCapacityOptimized",
            AllocationStrategy::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &[
            "capacityOptimized",
            "capacityOptimizedPrioritized",
            "diversified",
            "lowestPrice",
            "priceCapacityOptimized",
        ]
    }
}
impl AsRef<str> for AllocationStrategy {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `ReportStatusType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let reportstatustype = unimplemented!();
/// match reportstatustype {
///     ReportStatusType::Impaired => { /* ... */ },
///     ReportStatusType::Ok => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `reportstatustype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `ReportStatusType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `ReportStatusType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `ReportStatusType::NewFeature` is defined.
/// Specifically, when `reportstatustype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `ReportStatusType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 ReportStatusType {
    #[allow(missing_docs)] // documentation missing in model
    Impaired,
    #[allow(missing_docs)] // documentation missing in model
    Ok,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for ReportStatusType {
    fn from(s: &str) -> Self {
        match s {
            "impaired" => ReportStatusType::Impaired,
            "ok" => ReportStatusType::Ok,
            other => ReportStatusType::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for ReportStatusType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(ReportStatusType::from(s))
    }
}
impl ReportStatusType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            ReportStatusType::Impaired => "impaired",
            ReportStatusType::Ok => "ok",
            ReportStatusType::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["impaired", "ok"]
    }
}
impl AsRef<str> for ReportStatusType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `ReportInstanceReasonCodes`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let reportinstancereasoncodes = unimplemented!();
/// match reportinstancereasoncodes {
///     ReportInstanceReasonCodes::InstanceStuckInState => { /* ... */ },
///     ReportInstanceReasonCodes::NotAcceptingCredentials => { /* ... */ },
///     ReportInstanceReasonCodes::Other => { /* ... */ },
///     ReportInstanceReasonCodes::PasswordNotAvailable => { /* ... */ },
///     ReportInstanceReasonCodes::PerformanceEbsVolume => { /* ... */ },
///     ReportInstanceReasonCodes::PerformanceInstanceStore => { /* ... */ },
///     ReportInstanceReasonCodes::PerformanceNetwork => { /* ... */ },
///     ReportInstanceReasonCodes::PerformanceOther => { /* ... */ },
///     ReportInstanceReasonCodes::Unresponsive => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `reportinstancereasoncodes` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `ReportInstanceReasonCodes::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `ReportInstanceReasonCodes::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `ReportInstanceReasonCodes::NewFeature` is defined.
/// Specifically, when `reportinstancereasoncodes` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `ReportInstanceReasonCodes::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 ReportInstanceReasonCodes {
    #[allow(missing_docs)] // documentation missing in model
    InstanceStuckInState,
    #[allow(missing_docs)] // documentation missing in model
    NotAcceptingCredentials,
    #[allow(missing_docs)] // documentation missing in model
    Other,
    #[allow(missing_docs)] // documentation missing in model
    PasswordNotAvailable,
    #[allow(missing_docs)] // documentation missing in model
    PerformanceEbsVolume,
    #[allow(missing_docs)] // documentation missing in model
    PerformanceInstanceStore,
    #[allow(missing_docs)] // documentation missing in model
    PerformanceNetwork,
    #[allow(missing_docs)] // documentation missing in model
    PerformanceOther,
    #[allow(missing_docs)] // documentation missing in model
    Unresponsive,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for ReportInstanceReasonCodes {
    fn from(s: &str) -> Self {
        match s {
            "instance-stuck-in-state" => ReportInstanceReasonCodes::InstanceStuckInState,
            "not-accepting-credentials" => ReportInstanceReasonCodes::NotAcceptingCredentials,
            "other" => ReportInstanceReasonCodes::Other,
            "password-not-available" => ReportInstanceReasonCodes::PasswordNotAvailable,
            "performance-ebs-volume" => ReportInstanceReasonCodes::PerformanceEbsVolume,
            "performance-instance-store" => ReportInstanceReasonCodes::PerformanceInstanceStore,
            "performance-network" => ReportInstanceReasonCodes::PerformanceNetwork,
            "performance-other" => ReportInstanceReasonCodes::PerformanceOther,
            "unresponsive" => ReportInstanceReasonCodes::Unresponsive,
            other => ReportInstanceReasonCodes::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for ReportInstanceReasonCodes {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(ReportInstanceReasonCodes::from(s))
    }
}
impl ReportInstanceReasonCodes {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            ReportInstanceReasonCodes::InstanceStuckInState => "instance-stuck-in-state",
            ReportInstanceReasonCodes::NotAcceptingCredentials => "not-accepting-credentials",
            ReportInstanceReasonCodes::Other => "other",
            ReportInstanceReasonCodes::PasswordNotAvailable => "password-not-available",
            ReportInstanceReasonCodes::PerformanceEbsVolume => "performance-ebs-volume",
            ReportInstanceReasonCodes::PerformanceInstanceStore => "performance-instance-store",
            ReportInstanceReasonCodes::PerformanceNetwork => "performance-network",
            ReportInstanceReasonCodes::PerformanceOther => "performance-other",
            ReportInstanceReasonCodes::Unresponsive => "unresponsive",
            ReportInstanceReasonCodes::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &[
            "instance-stuck-in-state",
            "not-accepting-credentials",
            "other",
            "password-not-available",
            "performance-ebs-volume",
            "performance-instance-store",
            "performance-network",
            "performance-other",
            "unresponsive",
        ]
    }
}
impl AsRef<str> for ReportInstanceReasonCodes {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes the state of an association between a route table and a subnet or gateway.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct RouteTableAssociationState {
    /// <p>The state of the association.</p>
    #[doc(hidden)]
    pub state: std::option::Option<crate::model::RouteTableAssociationStateCode>,
    /// <p>The status message, if applicable.</p>
    #[doc(hidden)]
    pub status_message: std::option::Option<std::string::String>,
}
impl RouteTableAssociationState {
    /// <p>The state of the association.</p>
    pub fn state(&self) -> std::option::Option<&crate::model::RouteTableAssociationStateCode> {
        self.state.as_ref()
    }
    /// <p>The status message, if applicable.</p>
    pub fn status_message(&self) -> std::option::Option<&str> {
        self.status_message.as_deref()
    }
}
/// See [`RouteTableAssociationState`](crate::model::RouteTableAssociationState).
pub mod route_table_association_state {

    /// A builder for [`RouteTableAssociationState`](crate::model::RouteTableAssociationState).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) state: std::option::Option<crate::model::RouteTableAssociationStateCode>,
        pub(crate) status_message: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The state of the association.</p>
        pub fn state(mut self, input: crate::model::RouteTableAssociationStateCode) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>The state of the association.</p>
        pub fn set_state(
            mut self,
            input: std::option::Option<crate::model::RouteTableAssociationStateCode>,
        ) -> Self {
            self.state = input;
            self
        }
        /// <p>The status message, if applicable.</p>
        pub fn status_message(mut self, input: impl Into<std::string::String>) -> Self {
            self.status_message = Some(input.into());
            self
        }
        /// <p>The status message, if applicable.</p>
        pub fn set_status_message(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.status_message = input;
            self
        }
        /// Consumes the builder and constructs a [`RouteTableAssociationState`](crate::model::RouteTableAssociationState).
        pub fn build(self) -> crate::model::RouteTableAssociationState {
            crate::model::RouteTableAssociationState {
                state: self.state,
                status_message: self.status_message,
            }
        }
    }
}
impl RouteTableAssociationState {
    /// Creates a new builder-style object to manufacture [`RouteTableAssociationState`](crate::model::RouteTableAssociationState).
    pub fn builder() -> crate::model::route_table_association_state::Builder {
        crate::model::route_table_association_state::Builder::default()
    }
}

/// When writing a match expression against `RouteTableAssociationStateCode`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let routetableassociationstatecode = unimplemented!();
/// match routetableassociationstatecode {
///     RouteTableAssociationStateCode::Associated => { /* ... */ },
///     RouteTableAssociationStateCode::Associating => { /* ... */ },
///     RouteTableAssociationStateCode::Disassociated => { /* ... */ },
///     RouteTableAssociationStateCode::Disassociating => { /* ... */ },
///     RouteTableAssociationStateCode::Failed => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `routetableassociationstatecode` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `RouteTableAssociationStateCode::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `RouteTableAssociationStateCode::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `RouteTableAssociationStateCode::NewFeature` is defined.
/// Specifically, when `routetableassociationstatecode` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `RouteTableAssociationStateCode::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 RouteTableAssociationStateCode {
    #[allow(missing_docs)] // documentation missing in model
    Associated,
    #[allow(missing_docs)] // documentation missing in model
    Associating,
    #[allow(missing_docs)] // documentation missing in model
    Disassociated,
    #[allow(missing_docs)] // documentation missing in model
    Disassociating,
    #[allow(missing_docs)] // documentation missing in model
    Failed,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for RouteTableAssociationStateCode {
    fn from(s: &str) -> Self {
        match s {
            "associated" => RouteTableAssociationStateCode::Associated,
            "associating" => RouteTableAssociationStateCode::Associating,
            "disassociated" => RouteTableAssociationStateCode::Disassociated,
            "disassociating" => RouteTableAssociationStateCode::Disassociating,
            "failed" => RouteTableAssociationStateCode::Failed,
            other => RouteTableAssociationStateCode::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for RouteTableAssociationStateCode {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(RouteTableAssociationStateCode::from(s))
    }
}
impl RouteTableAssociationStateCode {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            RouteTableAssociationStateCode::Associated => "associated",
            RouteTableAssociationStateCode::Associating => "associating",
            RouteTableAssociationStateCode::Disassociated => "disassociated",
            RouteTableAssociationStateCode::Disassociating => "disassociating",
            RouteTableAssociationStateCode::Failed => "failed",
            RouteTableAssociationStateCode::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &[
            "associated",
            "associating",
            "disassociated",
            "disassociating",
            "failed",
        ]
    }
}
impl AsRef<str> for RouteTableAssociationStateCode {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `RuleAction`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let ruleaction = unimplemented!();
/// match ruleaction {
///     RuleAction::Allow => { /* ... */ },
///     RuleAction::Deny => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `ruleaction` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `RuleAction::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `RuleAction::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `RuleAction::NewFeature` is defined.
/// Specifically, when `ruleaction` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `RuleAction::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 RuleAction {
    #[allow(missing_docs)] // documentation missing in model
    Allow,
    #[allow(missing_docs)] // documentation missing in model
    Deny,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for RuleAction {
    fn from(s: &str) -> Self {
        match s {
            "allow" => RuleAction::Allow,
            "deny" => RuleAction::Deny,
            other => RuleAction::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for RuleAction {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(RuleAction::from(s))
    }
}
impl RuleAction {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            RuleAction::Allow => "allow",
            RuleAction::Deny => "deny",
            RuleAction::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["allow", "deny"]
    }
}
impl AsRef<str> for RuleAction {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes the ICMP type and code.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct IcmpTypeCode {
    /// <p>The ICMP code. A value of -1 means all codes for the specified ICMP type.</p>
    #[doc(hidden)]
    pub code: std::option::Option<i32>,
    /// <p>The ICMP type. A value of -1 means all types.</p>
    #[doc(hidden)]
    pub r#type: std::option::Option<i32>,
}
impl IcmpTypeCode {
    /// <p>The ICMP code. A value of -1 means all codes for the specified ICMP type.</p>
    pub fn code(&self) -> std::option::Option<i32> {
        self.code
    }
    /// <p>The ICMP type. A value of -1 means all types.</p>
    pub fn r#type(&self) -> std::option::Option<i32> {
        self.r#type
    }
}
/// See [`IcmpTypeCode`](crate::model::IcmpTypeCode).
pub mod icmp_type_code {

    /// A builder for [`IcmpTypeCode`](crate::model::IcmpTypeCode).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) code: std::option::Option<i32>,
        pub(crate) r#type: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>The ICMP code. A value of -1 means all codes for the specified ICMP type.</p>
        pub fn code(mut self, input: i32) -> Self {
            self.code = Some(input);
            self
        }
        /// <p>The ICMP code. A value of -1 means all codes for the specified ICMP type.</p>
        pub fn set_code(mut self, input: std::option::Option<i32>) -> Self {
            self.code = input;
            self
        }
        /// <p>The ICMP type. A value of -1 means all types.</p>
        pub fn r#type(mut self, input: i32) -> Self {
            self.r#type = Some(input);
            self
        }
        /// <p>The ICMP type. A value of -1 means all types.</p>
        pub fn set_type(mut self, input: std::option::Option<i32>) -> Self {
            self.r#type = input;
            self
        }
        /// Consumes the builder and constructs a [`IcmpTypeCode`](crate::model::IcmpTypeCode).
        pub fn build(self) -> crate::model::IcmpTypeCode {
            crate::model::IcmpTypeCode {
                code: self.code,
                r#type: self.r#type,
            }
        }
    }
}
impl IcmpTypeCode {
    /// Creates a new builder-style object to manufacture [`IcmpTypeCode`](crate::model::IcmpTypeCode).
    pub fn builder() -> crate::model::icmp_type_code::Builder {
        crate::model::icmp_type_code::Builder::default()
    }
}

/// <p>Describes an association between an IAM instance profile and an instance.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct IamInstanceProfileAssociation {
    /// <p>The ID of the association.</p>
    #[doc(hidden)]
    pub association_id: std::option::Option<std::string::String>,
    /// <p>The ID of the instance.</p>
    #[doc(hidden)]
    pub instance_id: std::option::Option<std::string::String>,
    /// <p>The IAM instance profile.</p>
    #[doc(hidden)]
    pub iam_instance_profile: std::option::Option<crate::model::IamInstanceProfile>,
    /// <p>The state of the association.</p>
    #[doc(hidden)]
    pub state: std::option::Option<crate::model::IamInstanceProfileAssociationState>,
    /// <p>The time the IAM instance profile was associated with the instance.</p>
    #[doc(hidden)]
    pub timestamp: std::option::Option<aws_smithy_types::DateTime>,
}
impl IamInstanceProfileAssociation {
    /// <p>The ID of the association.</p>
    pub fn association_id(&self) -> std::option::Option<&str> {
        self.association_id.as_deref()
    }
    /// <p>The ID of the instance.</p>
    pub fn instance_id(&self) -> std::option::Option<&str> {
        self.instance_id.as_deref()
    }
    /// <p>The IAM instance profile.</p>
    pub fn iam_instance_profile(&self) -> std::option::Option<&crate::model::IamInstanceProfile> {
        self.iam_instance_profile.as_ref()
    }
    /// <p>The state of the association.</p>
    pub fn state(&self) -> std::option::Option<&crate::model::IamInstanceProfileAssociationState> {
        self.state.as_ref()
    }
    /// <p>The time the IAM instance profile was associated with the instance.</p>
    pub fn timestamp(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.timestamp.as_ref()
    }
}
/// See [`IamInstanceProfileAssociation`](crate::model::IamInstanceProfileAssociation).
pub mod iam_instance_profile_association {

    /// A builder for [`IamInstanceProfileAssociation`](crate::model::IamInstanceProfileAssociation).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) association_id: std::option::Option<std::string::String>,
        pub(crate) instance_id: std::option::Option<std::string::String>,
        pub(crate) iam_instance_profile: std::option::Option<crate::model::IamInstanceProfile>,
        pub(crate) state: std::option::Option<crate::model::IamInstanceProfileAssociationState>,
        pub(crate) timestamp: std::option::Option<aws_smithy_types::DateTime>,
    }
    impl Builder {
        /// <p>The ID of the association.</p>
        pub fn association_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.association_id = Some(input.into());
            self
        }
        /// <p>The ID of the association.</p>
        pub fn set_association_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.association_id = input;
            self
        }
        /// <p>The ID of the instance.</p>
        pub fn instance_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.instance_id = Some(input.into());
            self
        }
        /// <p>The ID of the instance.</p>
        pub fn set_instance_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.instance_id = input;
            self
        }
        /// <p>The IAM instance profile.</p>
        pub fn iam_instance_profile(mut self, input: crate::model::IamInstanceProfile) -> Self {
            self.iam_instance_profile = Some(input);
            self
        }
        /// <p>The IAM instance profile.</p>
        pub fn set_iam_instance_profile(
            mut self,
            input: std::option::Option<crate::model::IamInstanceProfile>,
        ) -> Self {
            self.iam_instance_profile = input;
            self
        }
        /// <p>The state of the association.</p>
        pub fn state(mut self, input: crate::model::IamInstanceProfileAssociationState) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>The state of the association.</p>
        pub fn set_state(
            mut self,
            input: std::option::Option<crate::model::IamInstanceProfileAssociationState>,
        ) -> Self {
            self.state = input;
            self
        }
        /// <p>The time the IAM instance profile was associated with the instance.</p>
        pub fn timestamp(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.timestamp = Some(input);
            self
        }
        /// <p>The time the IAM instance profile was associated with the instance.</p>
        pub fn set_timestamp(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.timestamp = input;
            self
        }
        /// Consumes the builder and constructs a [`IamInstanceProfileAssociation`](crate::model::IamInstanceProfileAssociation).
        pub fn build(self) -> crate::model::IamInstanceProfileAssociation {
            crate::model::IamInstanceProfileAssociation {
                association_id: self.association_id,
                instance_id: self.instance_id,
                iam_instance_profile: self.iam_instance_profile,
                state: self.state,
                timestamp: self.timestamp,
            }
        }
    }
}
impl IamInstanceProfileAssociation {
    /// Creates a new builder-style object to manufacture [`IamInstanceProfileAssociation`](crate::model::IamInstanceProfileAssociation).
    pub fn builder() -> crate::model::iam_instance_profile_association::Builder {
        crate::model::iam_instance_profile_association::Builder::default()
    }
}

/// When writing a match expression against `IamInstanceProfileAssociationState`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let iaminstanceprofileassociationstate = unimplemented!();
/// match iaminstanceprofileassociationstate {
///     IamInstanceProfileAssociationState::Associated => { /* ... */ },
///     IamInstanceProfileAssociationState::Associating => { /* ... */ },
///     IamInstanceProfileAssociationState::Disassociated => { /* ... */ },
///     IamInstanceProfileAssociationState::Disassociating => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `iaminstanceprofileassociationstate` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `IamInstanceProfileAssociationState::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `IamInstanceProfileAssociationState::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `IamInstanceProfileAssociationState::NewFeature` is defined.
/// Specifically, when `iaminstanceprofileassociationstate` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `IamInstanceProfileAssociationState::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 IamInstanceProfileAssociationState {
    #[allow(missing_docs)] // documentation missing in model
    Associated,
    #[allow(missing_docs)] // documentation missing in model
    Associating,
    #[allow(missing_docs)] // documentation missing in model
    Disassociated,
    #[allow(missing_docs)] // documentation missing in model
    Disassociating,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for IamInstanceProfileAssociationState {
    fn from(s: &str) -> Self {
        match s {
            "associated" => IamInstanceProfileAssociationState::Associated,
            "associating" => IamInstanceProfileAssociationState::Associating,
            "disassociated" => IamInstanceProfileAssociationState::Disassociated,
            "disassociating" => IamInstanceProfileAssociationState::Disassociating,
            other => IamInstanceProfileAssociationState::Unknown(
                crate::types::UnknownVariantValue(other.to_owned()),
            ),
        }
    }
}
impl std::str::FromStr for IamInstanceProfileAssociationState {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(IamInstanceProfileAssociationState::from(s))
    }
}
impl IamInstanceProfileAssociationState {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            IamInstanceProfileAssociationState::Associated => "associated",
            IamInstanceProfileAssociationState::Associating => "associating",
            IamInstanceProfileAssociationState::Disassociated => "disassociated",
            IamInstanceProfileAssociationState::Disassociating => "disassociating",
            IamInstanceProfileAssociationState::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &[
            "associated",
            "associating",
            "disassociated",
            "disassociating",
        ]
    }
}
impl AsRef<str> for IamInstanceProfileAssociationState {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Information about items that were not successfully processed in a batch call.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UnsuccessfulItem {
    /// <p>Information about the error.</p>
    #[doc(hidden)]
    pub error: std::option::Option<crate::model::UnsuccessfulItemError>,
    /// <p>The ID of the resource.</p>
    #[doc(hidden)]
    pub resource_id: std::option::Option<std::string::String>,
}
impl UnsuccessfulItem {
    /// <p>Information about the error.</p>
    pub fn error(&self) -> std::option::Option<&crate::model::UnsuccessfulItemError> {
        self.error.as_ref()
    }
    /// <p>The ID of the resource.</p>
    pub fn resource_id(&self) -> std::option::Option<&str> {
        self.resource_id.as_deref()
    }
}
/// See [`UnsuccessfulItem`](crate::model::UnsuccessfulItem).
pub mod unsuccessful_item {

    /// A builder for [`UnsuccessfulItem`](crate::model::UnsuccessfulItem).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) error: std::option::Option<crate::model::UnsuccessfulItemError>,
        pub(crate) resource_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>Information about the error.</p>
        pub fn error(mut self, input: crate::model::UnsuccessfulItemError) -> Self {
            self.error = Some(input);
            self
        }
        /// <p>Information about the error.</p>
        pub fn set_error(
            mut self,
            input: std::option::Option<crate::model::UnsuccessfulItemError>,
        ) -> Self {
            self.error = input;
            self
        }
        /// <p>The ID of the resource.</p>
        pub fn resource_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.resource_id = Some(input.into());
            self
        }
        /// <p>The ID of the resource.</p>
        pub fn set_resource_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.resource_id = input;
            self
        }
        /// Consumes the builder and constructs a [`UnsuccessfulItem`](crate::model::UnsuccessfulItem).
        pub fn build(self) -> crate::model::UnsuccessfulItem {
            crate::model::UnsuccessfulItem {
                error: self.error,
                resource_id: self.resource_id,
            }
        }
    }
}
impl UnsuccessfulItem {
    /// Creates a new builder-style object to manufacture [`UnsuccessfulItem`](crate::model::UnsuccessfulItem).
    pub fn builder() -> crate::model::unsuccessful_item::Builder {
        crate::model::unsuccessful_item::Builder::default()
    }
}

/// <p>Information about the error that occurred. For more information about errors, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/errors-overview.html">Error codes</a>.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UnsuccessfulItemError {
    /// <p>The error code.</p>
    #[doc(hidden)]
    pub code: std::option::Option<std::string::String>,
    /// <p>The error message accompanying the error code.</p>
    #[doc(hidden)]
    pub message: std::option::Option<std::string::String>,
}
impl UnsuccessfulItemError {
    /// <p>The error code.</p>
    pub fn code(&self) -> std::option::Option<&str> {
        self.code.as_deref()
    }
    /// <p>The error message accompanying the error code.</p>
    pub fn message(&self) -> std::option::Option<&str> {
        self.message.as_deref()
    }
}
/// See [`UnsuccessfulItemError`](crate::model::UnsuccessfulItemError).
pub mod unsuccessful_item_error {

    /// A builder for [`UnsuccessfulItemError`](crate::model::UnsuccessfulItemError).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) code: std::option::Option<std::string::String>,
        pub(crate) message: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The error code.</p>
        pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
            self.code = Some(input.into());
            self
        }
        /// <p>The error code.</p>
        pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.code = input;
            self
        }
        /// <p>The error message accompanying the error code.</p>
        pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
            self.message = Some(input.into());
            self
        }
        /// <p>The error message accompanying the error code.</p>
        pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.message = input;
            self
        }
        /// Consumes the builder and constructs a [`UnsuccessfulItemError`](crate::model::UnsuccessfulItemError).
        pub fn build(self) -> crate::model::UnsuccessfulItemError {
            crate::model::UnsuccessfulItemError {
                code: self.code,
                message: self.message,
            }
        }
    }
}
impl UnsuccessfulItemError {
    /// Creates a new builder-style object to manufacture [`UnsuccessfulItemError`](crate::model::UnsuccessfulItemError).
    pub fn builder() -> crate::model::unsuccessful_item_error::Builder {
        crate::model::unsuccessful_item_error::Builder::default()
    }
}

/// <p>Describes a VPC attachment.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TransitGatewayVpcAttachment {
    /// <p>The ID of the attachment.</p>
    #[doc(hidden)]
    pub transit_gateway_attachment_id: std::option::Option<std::string::String>,
    /// <p>The ID of the transit gateway.</p>
    #[doc(hidden)]
    pub transit_gateway_id: std::option::Option<std::string::String>,
    /// <p>The ID of the VPC.</p>
    #[doc(hidden)]
    pub vpc_id: std::option::Option<std::string::String>,
    /// <p>The ID of the Amazon Web Services account that owns the VPC.</p>
    #[doc(hidden)]
    pub vpc_owner_id: std::option::Option<std::string::String>,
    /// <p>The state of the VPC attachment. Note that the <code>initiating</code> state has been deprecated.</p>
    #[doc(hidden)]
    pub state: std::option::Option<crate::model::TransitGatewayAttachmentState>,
    /// <p>The IDs of the subnets.</p>
    #[doc(hidden)]
    pub subnet_ids: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>The creation time.</p>
    #[doc(hidden)]
    pub creation_time: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The VPC attachment options.</p>
    #[doc(hidden)]
    pub options: std::option::Option<crate::model::TransitGatewayVpcAttachmentOptions>,
    /// <p>The tags for the VPC attachment.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl TransitGatewayVpcAttachment {
    /// <p>The ID of the attachment.</p>
    pub fn transit_gateway_attachment_id(&self) -> std::option::Option<&str> {
        self.transit_gateway_attachment_id.as_deref()
    }
    /// <p>The ID of the transit gateway.</p>
    pub fn transit_gateway_id(&self) -> std::option::Option<&str> {
        self.transit_gateway_id.as_deref()
    }
    /// <p>The ID of the VPC.</p>
    pub fn vpc_id(&self) -> std::option::Option<&str> {
        self.vpc_id.as_deref()
    }
    /// <p>The ID of the Amazon Web Services account that owns the VPC.</p>
    pub fn vpc_owner_id(&self) -> std::option::Option<&str> {
        self.vpc_owner_id.as_deref()
    }
    /// <p>The state of the VPC attachment. Note that the <code>initiating</code> state has been deprecated.</p>
    pub fn state(&self) -> std::option::Option<&crate::model::TransitGatewayAttachmentState> {
        self.state.as_ref()
    }
    /// <p>The IDs of the subnets.</p>
    pub fn subnet_ids(&self) -> std::option::Option<&[std::string::String]> {
        self.subnet_ids.as_deref()
    }
    /// <p>The creation time.</p>
    pub fn creation_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.creation_time.as_ref()
    }
    /// <p>The VPC attachment options.</p>
    pub fn options(
        &self,
    ) -> std::option::Option<&crate::model::TransitGatewayVpcAttachmentOptions> {
        self.options.as_ref()
    }
    /// <p>The tags for the VPC attachment.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
}
/// See [`TransitGatewayVpcAttachment`](crate::model::TransitGatewayVpcAttachment).
pub mod transit_gateway_vpc_attachment {

    /// A builder for [`TransitGatewayVpcAttachment`](crate::model::TransitGatewayVpcAttachment).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) transit_gateway_attachment_id: std::option::Option<std::string::String>,
        pub(crate) transit_gateway_id: std::option::Option<std::string::String>,
        pub(crate) vpc_id: std::option::Option<std::string::String>,
        pub(crate) vpc_owner_id: std::option::Option<std::string::String>,
        pub(crate) state: std::option::Option<crate::model::TransitGatewayAttachmentState>,
        pub(crate) subnet_ids: std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) creation_time: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) options: std::option::Option<crate::model::TransitGatewayVpcAttachmentOptions>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    }
    impl Builder {
        /// <p>The ID of the attachment.</p>
        pub fn transit_gateway_attachment_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.transit_gateway_attachment_id = Some(input.into());
            self
        }
        /// <p>The ID of the attachment.</p>
        pub fn set_transit_gateway_attachment_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.transit_gateway_attachment_id = input;
            self
        }
        /// <p>The ID of the transit gateway.</p>
        pub fn transit_gateway_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.transit_gateway_id = Some(input.into());
            self
        }
        /// <p>The ID of the transit gateway.</p>
        pub fn set_transit_gateway_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.transit_gateway_id = input;
            self
        }
        /// <p>The ID of the VPC.</p>
        pub fn vpc_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.vpc_id = Some(input.into());
            self
        }
        /// <p>The ID of the VPC.</p>
        pub fn set_vpc_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.vpc_id = input;
            self
        }
        /// <p>The ID of the Amazon Web Services account that owns the VPC.</p>
        pub fn vpc_owner_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.vpc_owner_id = Some(input.into());
            self
        }
        /// <p>The ID of the Amazon Web Services account that owns the VPC.</p>
        pub fn set_vpc_owner_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.vpc_owner_id = input;
            self
        }
        /// <p>The state of the VPC attachment. Note that the <code>initiating</code> state has been deprecated.</p>
        pub fn state(mut self, input: crate::model::TransitGatewayAttachmentState) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>The state of the VPC attachment. Note that the <code>initiating</code> state has been deprecated.</p>
        pub fn set_state(
            mut self,
            input: std::option::Option<crate::model::TransitGatewayAttachmentState>,
        ) -> Self {
            self.state = input;
            self
        }
        /// Appends an item to `subnet_ids`.
        ///
        /// To override the contents of this collection use [`set_subnet_ids`](Self::set_subnet_ids).
        ///
        /// <p>The IDs of the subnets.</p>
        pub fn subnet_ids(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.subnet_ids.unwrap_or_default();
            v.push(input.into());
            self.subnet_ids = Some(v);
            self
        }
        /// <p>The IDs of the subnets.</p>
        pub fn set_subnet_ids(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.subnet_ids = input;
            self
        }
        /// <p>The creation time.</p>
        pub fn creation_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.creation_time = Some(input);
            self
        }
        /// <p>The creation time.</p>
        pub fn set_creation_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.creation_time = input;
            self
        }
        /// <p>The VPC attachment options.</p>
        pub fn options(mut self, input: crate::model::TransitGatewayVpcAttachmentOptions) -> Self {
            self.options = Some(input);
            self
        }
        /// <p>The VPC attachment options.</p>
        pub fn set_options(
            mut self,
            input: std::option::Option<crate::model::TransitGatewayVpcAttachmentOptions>,
        ) -> Self {
            self.options = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>The tags for the VPC attachment.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>The tags for the VPC attachment.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// Consumes the builder and constructs a [`TransitGatewayVpcAttachment`](crate::model::TransitGatewayVpcAttachment).
        pub fn build(self) -> crate::model::TransitGatewayVpcAttachment {
            crate::model::TransitGatewayVpcAttachment {
                transit_gateway_attachment_id: self.transit_gateway_attachment_id,
                transit_gateway_id: self.transit_gateway_id,
                vpc_id: self.vpc_id,
                vpc_owner_id: self.vpc_owner_id,
                state: self.state,
                subnet_ids: self.subnet_ids,
                creation_time: self.creation_time,
                options: self.options,
                tags: self.tags,
            }
        }
    }
}
impl TransitGatewayVpcAttachment {
    /// Creates a new builder-style object to manufacture [`TransitGatewayVpcAttachment`](crate::model::TransitGatewayVpcAttachment).
    pub fn builder() -> crate::model::transit_gateway_vpc_attachment::Builder {
        crate::model::transit_gateway_vpc_attachment::Builder::default()
    }
}

/// <p>Describes the VPC attachment options.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TransitGatewayVpcAttachmentOptions {
    /// <p>Indicates whether DNS support is enabled.</p>
    #[doc(hidden)]
    pub dns_support: std::option::Option<crate::model::DnsSupportValue>,
    /// <p>Indicates whether IPv6 support is disabled.</p>
    #[doc(hidden)]
    pub ipv6_support: std::option::Option<crate::model::Ipv6SupportValue>,
    /// <p>Indicates whether appliance mode support is enabled.</p>
    #[doc(hidden)]
    pub appliance_mode_support: std::option::Option<crate::model::ApplianceModeSupportValue>,
}
impl TransitGatewayVpcAttachmentOptions {
    /// <p>Indicates whether DNS support is enabled.</p>
    pub fn dns_support(&self) -> std::option::Option<&crate::model::DnsSupportValue> {
        self.dns_support.as_ref()
    }
    /// <p>Indicates whether IPv6 support is disabled.</p>
    pub fn ipv6_support(&self) -> std::option::Option<&crate::model::Ipv6SupportValue> {
        self.ipv6_support.as_ref()
    }
    /// <p>Indicates whether appliance mode support is enabled.</p>
    pub fn appliance_mode_support(
        &self,
    ) -> std::option::Option<&crate::model::ApplianceModeSupportValue> {
        self.appliance_mode_support.as_ref()
    }
}
/// See [`TransitGatewayVpcAttachmentOptions`](crate::model::TransitGatewayVpcAttachmentOptions).
pub mod transit_gateway_vpc_attachment_options {

    /// A builder for [`TransitGatewayVpcAttachmentOptions`](crate::model::TransitGatewayVpcAttachmentOptions).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) dns_support: std::option::Option<crate::model::DnsSupportValue>,
        pub(crate) ipv6_support: std::option::Option<crate::model::Ipv6SupportValue>,
        pub(crate) appliance_mode_support:
            std::option::Option<crate::model::ApplianceModeSupportValue>,
    }
    impl Builder {
        /// <p>Indicates whether DNS support is enabled.</p>
        pub fn dns_support(mut self, input: crate::model::DnsSupportValue) -> Self {
            self.dns_support = Some(input);
            self
        }
        /// <p>Indicates whether DNS support is enabled.</p>
        pub fn set_dns_support(
            mut self,
            input: std::option::Option<crate::model::DnsSupportValue>,
        ) -> Self {
            self.dns_support = input;
            self
        }
        /// <p>Indicates whether IPv6 support is disabled.</p>
        pub fn ipv6_support(mut self, input: crate::model::Ipv6SupportValue) -> Self {
            self.ipv6_support = Some(input);
            self
        }
        /// <p>Indicates whether IPv6 support is disabled.</p>
        pub fn set_ipv6_support(
            mut self,
            input: std::option::Option<crate::model::Ipv6SupportValue>,
        ) -> Self {
            self.ipv6_support = input;
            self
        }
        /// <p>Indicates whether appliance mode support is enabled.</p>
        pub fn appliance_mode_support(
            mut self,
            input: crate::model::ApplianceModeSupportValue,
        ) -> Self {
            self.appliance_mode_support = Some(input);
            self
        }
        /// <p>Indicates whether appliance mode support is enabled.</p>
        pub fn set_appliance_mode_support(
            mut self,
            input: std::option::Option<crate::model::ApplianceModeSupportValue>,
        ) -> Self {
            self.appliance_mode_support = input;
            self
        }
        /// Consumes the builder and constructs a [`TransitGatewayVpcAttachmentOptions`](crate::model::TransitGatewayVpcAttachmentOptions).
        pub fn build(self) -> crate::model::TransitGatewayVpcAttachmentOptions {
            crate::model::TransitGatewayVpcAttachmentOptions {
                dns_support: self.dns_support,
                ipv6_support: self.ipv6_support,
                appliance_mode_support: self.appliance_mode_support,
            }
        }
    }
}
impl TransitGatewayVpcAttachmentOptions {
    /// Creates a new builder-style object to manufacture [`TransitGatewayVpcAttachmentOptions`](crate::model::TransitGatewayVpcAttachmentOptions).
    pub fn builder() -> crate::model::transit_gateway_vpc_attachment_options::Builder {
        crate::model::transit_gateway_vpc_attachment_options::Builder::default()
    }
}

/// When writing a match expression against `ApplianceModeSupportValue`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let appliancemodesupportvalue = unimplemented!();
/// match appliancemodesupportvalue {
///     ApplianceModeSupportValue::Disable => { /* ... */ },
///     ApplianceModeSupportValue::Enable => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `appliancemodesupportvalue` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `ApplianceModeSupportValue::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `ApplianceModeSupportValue::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `ApplianceModeSupportValue::NewFeature` is defined.
/// Specifically, when `appliancemodesupportvalue` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `ApplianceModeSupportValue::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 ApplianceModeSupportValue {
    #[allow(missing_docs)] // documentation missing in model
    Disable,
    #[allow(missing_docs)] // documentation missing in model
    Enable,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for ApplianceModeSupportValue {
    fn from(s: &str) -> Self {
        match s {
            "disable" => ApplianceModeSupportValue::Disable,
            "enable" => ApplianceModeSupportValue::Enable,
            other => ApplianceModeSupportValue::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for ApplianceModeSupportValue {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(ApplianceModeSupportValue::from(s))
    }
}
impl ApplianceModeSupportValue {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            ApplianceModeSupportValue::Disable => "disable",
            ApplianceModeSupportValue::Enable => "enable",
            ApplianceModeSupportValue::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["disable", "enable"]
    }
}
impl AsRef<str> for ApplianceModeSupportValue {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `Ipv6SupportValue`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let ipv6supportvalue = unimplemented!();
/// match ipv6supportvalue {
///     Ipv6SupportValue::Disable => { /* ... */ },
///     Ipv6SupportValue::Enable => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `ipv6supportvalue` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `Ipv6SupportValue::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `Ipv6SupportValue::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `Ipv6SupportValue::NewFeature` is defined.
/// Specifically, when `ipv6supportvalue` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `Ipv6SupportValue::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 Ipv6SupportValue {
    #[allow(missing_docs)] // documentation missing in model
    Disable,
    #[allow(missing_docs)] // documentation missing in model
    Enable,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for Ipv6SupportValue {
    fn from(s: &str) -> Self {
        match s {
            "disable" => Ipv6SupportValue::Disable,
            "enable" => Ipv6SupportValue::Enable,
            other => Ipv6SupportValue::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for Ipv6SupportValue {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(Ipv6SupportValue::from(s))
    }
}
impl Ipv6SupportValue {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            Ipv6SupportValue::Disable => "disable",
            Ipv6SupportValue::Enable => "enable",
            Ipv6SupportValue::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["disable", "enable"]
    }
}
impl AsRef<str> for Ipv6SupportValue {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `DnsSupportValue`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let dnssupportvalue = unimplemented!();
/// match dnssupportvalue {
///     DnsSupportValue::Disable => { /* ... */ },
///     DnsSupportValue::Enable => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `dnssupportvalue` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `DnsSupportValue::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `DnsSupportValue::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `DnsSupportValue::NewFeature` is defined.
/// Specifically, when `dnssupportvalue` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `DnsSupportValue::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 DnsSupportValue {
    #[allow(missing_docs)] // documentation missing in model
    Disable,
    #[allow(missing_docs)] // documentation missing in model
    Enable,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for DnsSupportValue {
    fn from(s: &str) -> Self {
        match s {
            "disable" => DnsSupportValue::Disable,
            "enable" => DnsSupportValue::Enable,
            other => DnsSupportValue::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for DnsSupportValue {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(DnsSupportValue::from(s))
    }
}
impl DnsSupportValue {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            DnsSupportValue::Disable => "disable",
            DnsSupportValue::Enable => "enable",
            DnsSupportValue::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["disable", "enable"]
    }
}
impl AsRef<str> for DnsSupportValue {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `TransitGatewayAttachmentState`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let transitgatewayattachmentstate = unimplemented!();
/// match transitgatewayattachmentstate {
///     TransitGatewayAttachmentState::Available => { /* ... */ },
///     TransitGatewayAttachmentState::Deleted => { /* ... */ },
///     TransitGatewayAttachmentState::Deleting => { /* ... */ },
///     TransitGatewayAttachmentState::Failed => { /* ... */ },
///     TransitGatewayAttachmentState::Failing => { /* ... */ },
///     TransitGatewayAttachmentState::Initiating => { /* ... */ },
///     TransitGatewayAttachmentState::InitiatingRequest => { /* ... */ },
///     TransitGatewayAttachmentState::Modifying => { /* ... */ },
///     TransitGatewayAttachmentState::Pending => { /* ... */ },
///     TransitGatewayAttachmentState::PendingAcceptance => { /* ... */ },
///     TransitGatewayAttachmentState::Rejected => { /* ... */ },
///     TransitGatewayAttachmentState::Rejecting => { /* ... */ },
///     TransitGatewayAttachmentState::RollingBack => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `transitgatewayattachmentstate` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `TransitGatewayAttachmentState::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `TransitGatewayAttachmentState::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `TransitGatewayAttachmentState::NewFeature` is defined.
/// Specifically, when `transitgatewayattachmentstate` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `TransitGatewayAttachmentState::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 TransitGatewayAttachmentState {
    #[allow(missing_docs)] // documentation missing in model
    Available,
    #[allow(missing_docs)] // documentation missing in model
    Deleted,
    #[allow(missing_docs)] // documentation missing in model
    Deleting,
    #[allow(missing_docs)] // documentation missing in model
    Failed,
    #[allow(missing_docs)] // documentation missing in model
    Failing,
    #[allow(missing_docs)] // documentation missing in model
    Initiating,
    #[allow(missing_docs)] // documentation missing in model
    InitiatingRequest,
    #[allow(missing_docs)] // documentation missing in model
    Modifying,
    #[allow(missing_docs)] // documentation missing in model
    Pending,
    #[allow(missing_docs)] // documentation missing in model
    PendingAcceptance,
    #[allow(missing_docs)] // documentation missing in model
    Rejected,
    #[allow(missing_docs)] // documentation missing in model
    Rejecting,
    #[allow(missing_docs)] // documentation missing in model
    RollingBack,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for TransitGatewayAttachmentState {
    fn from(s: &str) -> Self {
        match s {
            "available" => TransitGatewayAttachmentState::Available,
            "deleted" => TransitGatewayAttachmentState::Deleted,
            "deleting" => TransitGatewayAttachmentState::Deleting,
            "failed" => TransitGatewayAttachmentState::Failed,
            "failing" => TransitGatewayAttachmentState::Failing,
            "initiating" => TransitGatewayAttachmentState::Initiating,
            "initiatingRequest" => TransitGatewayAttachmentState::InitiatingRequest,
            "modifying" => TransitGatewayAttachmentState::Modifying,
            "pending" => TransitGatewayAttachmentState::Pending,
            "pendingAcceptance" => TransitGatewayAttachmentState::PendingAcceptance,
            "rejected" => TransitGatewayAttachmentState::Rejected,
            "rejecting" => TransitGatewayAttachmentState::Rejecting,
            "rollingBack" => TransitGatewayAttachmentState::RollingBack,
            other => TransitGatewayAttachmentState::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for TransitGatewayAttachmentState {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(TransitGatewayAttachmentState::from(s))
    }
}
impl TransitGatewayAttachmentState {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            TransitGatewayAttachmentState::Available => "available",
            TransitGatewayAttachmentState::Deleted => "deleted",
            TransitGatewayAttachmentState::Deleting => "deleting",
            TransitGatewayAttachmentState::Failed => "failed",
            TransitGatewayAttachmentState::Failing => "failing",
            TransitGatewayAttachmentState::Initiating => "initiating",
            TransitGatewayAttachmentState::InitiatingRequest => "initiatingRequest",
            TransitGatewayAttachmentState::Modifying => "modifying",
            TransitGatewayAttachmentState::Pending => "pending",
            TransitGatewayAttachmentState::PendingAcceptance => "pendingAcceptance",
            TransitGatewayAttachmentState::Rejected => "rejected",
            TransitGatewayAttachmentState::Rejecting => "rejecting",
            TransitGatewayAttachmentState::RollingBack => "rollingBack",
            TransitGatewayAttachmentState::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &[
            "available",
            "deleted",
            "deleting",
            "failed",
            "failing",
            "initiating",
            "initiatingRequest",
            "modifying",
            "pending",
            "pendingAcceptance",
            "rejected",
            "rejecting",
            "rollingBack",
        ]
    }
}
impl AsRef<str> for TransitGatewayAttachmentState {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes the transit gateway peering attachment.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TransitGatewayPeeringAttachment {
    /// <p>The ID of the transit gateway peering attachment.</p>
    #[doc(hidden)]
    pub transit_gateway_attachment_id: std::option::Option<std::string::String>,
    /// <p>The ID of the accepter transit gateway attachment.</p>
    #[doc(hidden)]
    pub accepter_transit_gateway_attachment_id: std::option::Option<std::string::String>,
    /// <p>Information about the requester transit gateway.</p>
    #[doc(hidden)]
    pub requester_tgw_info: std::option::Option<crate::model::PeeringTgwInfo>,
    /// <p>Information about the accepter transit gateway.</p>
    #[doc(hidden)]
    pub accepter_tgw_info: std::option::Option<crate::model::PeeringTgwInfo>,
    /// <p>Details about the transit gateway peering attachment.</p>
    #[doc(hidden)]
    pub options: std::option::Option<crate::model::TransitGatewayPeeringAttachmentOptions>,
    /// <p>The status of the transit gateway peering attachment.</p>
    #[doc(hidden)]
    pub status: std::option::Option<crate::model::PeeringAttachmentStatus>,
    /// <p>The state of the transit gateway peering attachment. Note that the <code>initiating</code> state has been deprecated.</p>
    #[doc(hidden)]
    pub state: std::option::Option<crate::model::TransitGatewayAttachmentState>,
    /// <p>The time the transit gateway peering attachment was created.</p>
    #[doc(hidden)]
    pub creation_time: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The tags for the transit gateway peering attachment.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl TransitGatewayPeeringAttachment {
    /// <p>The ID of the transit gateway peering attachment.</p>
    pub fn transit_gateway_attachment_id(&self) -> std::option::Option<&str> {
        self.transit_gateway_attachment_id.as_deref()
    }
    /// <p>The ID of the accepter transit gateway attachment.</p>
    pub fn accepter_transit_gateway_attachment_id(&self) -> std::option::Option<&str> {
        self.accepter_transit_gateway_attachment_id.as_deref()
    }
    /// <p>Information about the requester transit gateway.</p>
    pub fn requester_tgw_info(&self) -> std::option::Option<&crate::model::PeeringTgwInfo> {
        self.requester_tgw_info.as_ref()
    }
    /// <p>Information about the accepter transit gateway.</p>
    pub fn accepter_tgw_info(&self) -> std::option::Option<&crate::model::PeeringTgwInfo> {
        self.accepter_tgw_info.as_ref()
    }
    /// <p>Details about the transit gateway peering attachment.</p>
    pub fn options(
        &self,
    ) -> std::option::Option<&crate::model::TransitGatewayPeeringAttachmentOptions> {
        self.options.as_ref()
    }
    /// <p>The status of the transit gateway peering attachment.</p>
    pub fn status(&self) -> std::option::Option<&crate::model::PeeringAttachmentStatus> {
        self.status.as_ref()
    }
    /// <p>The state of the transit gateway peering attachment. Note that the <code>initiating</code> state has been deprecated.</p>
    pub fn state(&self) -> std::option::Option<&crate::model::TransitGatewayAttachmentState> {
        self.state.as_ref()
    }
    /// <p>The time the transit gateway peering attachment was created.</p>
    pub fn creation_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.creation_time.as_ref()
    }
    /// <p>The tags for the transit gateway peering attachment.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
}
/// See [`TransitGatewayPeeringAttachment`](crate::model::TransitGatewayPeeringAttachment).
pub mod transit_gateway_peering_attachment {

    /// A builder for [`TransitGatewayPeeringAttachment`](crate::model::TransitGatewayPeeringAttachment).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) transit_gateway_attachment_id: std::option::Option<std::string::String>,
        pub(crate) accepter_transit_gateway_attachment_id: std::option::Option<std::string::String>,
        pub(crate) requester_tgw_info: std::option::Option<crate::model::PeeringTgwInfo>,
        pub(crate) accepter_tgw_info: std::option::Option<crate::model::PeeringTgwInfo>,
        pub(crate) options:
            std::option::Option<crate::model::TransitGatewayPeeringAttachmentOptions>,
        pub(crate) status: std::option::Option<crate::model::PeeringAttachmentStatus>,
        pub(crate) state: std::option::Option<crate::model::TransitGatewayAttachmentState>,
        pub(crate) creation_time: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    }
    impl Builder {
        /// <p>The ID of the transit gateway peering attachment.</p>
        pub fn transit_gateway_attachment_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.transit_gateway_attachment_id = Some(input.into());
            self
        }
        /// <p>The ID of the transit gateway peering attachment.</p>
        pub fn set_transit_gateway_attachment_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.transit_gateway_attachment_id = input;
            self
        }
        /// <p>The ID of the accepter transit gateway attachment.</p>
        pub fn accepter_transit_gateway_attachment_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.accepter_transit_gateway_attachment_id = Some(input.into());
            self
        }
        /// <p>The ID of the accepter transit gateway attachment.</p>
        pub fn set_accepter_transit_gateway_attachment_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.accepter_transit_gateway_attachment_id = input;
            self
        }
        /// <p>Information about the requester transit gateway.</p>
        pub fn requester_tgw_info(mut self, input: crate::model::PeeringTgwInfo) -> Self {
            self.requester_tgw_info = Some(input);
            self
        }
        /// <p>Information about the requester transit gateway.</p>
        pub fn set_requester_tgw_info(
            mut self,
            input: std::option::Option<crate::model::PeeringTgwInfo>,
        ) -> Self {
            self.requester_tgw_info = input;
            self
        }
        /// <p>Information about the accepter transit gateway.</p>
        pub fn accepter_tgw_info(mut self, input: crate::model::PeeringTgwInfo) -> Self {
            self.accepter_tgw_info = Some(input);
            self
        }
        /// <p>Information about the accepter transit gateway.</p>
        pub fn set_accepter_tgw_info(
            mut self,
            input: std::option::Option<crate::model::PeeringTgwInfo>,
        ) -> Self {
            self.accepter_tgw_info = input;
            self
        }
        /// <p>Details about the transit gateway peering attachment.</p>
        pub fn options(
            mut self,
            input: crate::model::TransitGatewayPeeringAttachmentOptions,
        ) -> Self {
            self.options = Some(input);
            self
        }
        /// <p>Details about the transit gateway peering attachment.</p>
        pub fn set_options(
            mut self,
            input: std::option::Option<crate::model::TransitGatewayPeeringAttachmentOptions>,
        ) -> Self {
            self.options = input;
            self
        }
        /// <p>The status of the transit gateway peering attachment.</p>
        pub fn status(mut self, input: crate::model::PeeringAttachmentStatus) -> Self {
            self.status = Some(input);
            self
        }
        /// <p>The status of the transit gateway peering attachment.</p>
        pub fn set_status(
            mut self,
            input: std::option::Option<crate::model::PeeringAttachmentStatus>,
        ) -> Self {
            self.status = input;
            self
        }
        /// <p>The state of the transit gateway peering attachment. Note that the <code>initiating</code> state has been deprecated.</p>
        pub fn state(mut self, input: crate::model::TransitGatewayAttachmentState) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>The state of the transit gateway peering attachment. Note that the <code>initiating</code> state has been deprecated.</p>
        pub fn set_state(
            mut self,
            input: std::option::Option<crate::model::TransitGatewayAttachmentState>,
        ) -> Self {
            self.state = input;
            self
        }
        /// <p>The time the transit gateway peering attachment was created.</p>
        pub fn creation_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.creation_time = Some(input);
            self
        }
        /// <p>The time the transit gateway peering attachment was created.</p>
        pub fn set_creation_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.creation_time = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>The tags for the transit gateway peering attachment.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>The tags for the transit gateway peering attachment.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// Consumes the builder and constructs a [`TransitGatewayPeeringAttachment`](crate::model::TransitGatewayPeeringAttachment).
        pub fn build(self) -> crate::model::TransitGatewayPeeringAttachment {
            crate::model::TransitGatewayPeeringAttachment {
                transit_gateway_attachment_id: self.transit_gateway_attachment_id,
                accepter_transit_gateway_attachment_id: self.accepter_transit_gateway_attachment_id,
                requester_tgw_info: self.requester_tgw_info,
                accepter_tgw_info: self.accepter_tgw_info,
                options: self.options,
                status: self.status,
                state: self.state,
                creation_time: self.creation_time,
                tags: self.tags,
            }
        }
    }
}
impl TransitGatewayPeeringAttachment {
    /// Creates a new builder-style object to manufacture [`TransitGatewayPeeringAttachment`](crate::model::TransitGatewayPeeringAttachment).
    pub fn builder() -> crate::model::transit_gateway_peering_attachment::Builder {
        crate::model::transit_gateway_peering_attachment::Builder::default()
    }
}

/// <p>The status of the transit gateway peering attachment.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct PeeringAttachmentStatus {
    /// <p>The status code.</p>
    #[doc(hidden)]
    pub code: std::option::Option<std::string::String>,
    /// <p>The status message, if applicable.</p>
    #[doc(hidden)]
    pub message: std::option::Option<std::string::String>,
}
impl PeeringAttachmentStatus {
    /// <p>The status code.</p>
    pub fn code(&self) -> std::option::Option<&str> {
        self.code.as_deref()
    }
    /// <p>The status message, if applicable.</p>
    pub fn message(&self) -> std::option::Option<&str> {
        self.message.as_deref()
    }
}
/// See [`PeeringAttachmentStatus`](crate::model::PeeringAttachmentStatus).
pub mod peering_attachment_status {

    /// A builder for [`PeeringAttachmentStatus`](crate::model::PeeringAttachmentStatus).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) code: std::option::Option<std::string::String>,
        pub(crate) message: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The status code.</p>
        pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
            self.code = Some(input.into());
            self
        }
        /// <p>The status code.</p>
        pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.code = input;
            self
        }
        /// <p>The status message, if applicable.</p>
        pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
            self.message = Some(input.into());
            self
        }
        /// <p>The status message, if applicable.</p>
        pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.message = input;
            self
        }
        /// Consumes the builder and constructs a [`PeeringAttachmentStatus`](crate::model::PeeringAttachmentStatus).
        pub fn build(self) -> crate::model::PeeringAttachmentStatus {
            crate::model::PeeringAttachmentStatus {
                code: self.code,
                message: self.message,
            }
        }
    }
}
impl PeeringAttachmentStatus {
    /// Creates a new builder-style object to manufacture [`PeeringAttachmentStatus`](crate::model::PeeringAttachmentStatus).
    pub fn builder() -> crate::model::peering_attachment_status::Builder {
        crate::model::peering_attachment_status::Builder::default()
    }
}

/// <p>Describes dynamic routing for the transit gateway peering attachment.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TransitGatewayPeeringAttachmentOptions {
    /// <p>Describes whether dynamic routing is enabled or disabled for the transit gateway peering attachment.</p>
    #[doc(hidden)]
    pub dynamic_routing: std::option::Option<crate::model::DynamicRoutingValue>,
}
impl TransitGatewayPeeringAttachmentOptions {
    /// <p>Describes whether dynamic routing is enabled or disabled for the transit gateway peering attachment.</p>
    pub fn dynamic_routing(&self) -> std::option::Option<&crate::model::DynamicRoutingValue> {
        self.dynamic_routing.as_ref()
    }
}
/// See [`TransitGatewayPeeringAttachmentOptions`](crate::model::TransitGatewayPeeringAttachmentOptions).
pub mod transit_gateway_peering_attachment_options {

    /// A builder for [`TransitGatewayPeeringAttachmentOptions`](crate::model::TransitGatewayPeeringAttachmentOptions).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) dynamic_routing: std::option::Option<crate::model::DynamicRoutingValue>,
    }
    impl Builder {
        /// <p>Describes whether dynamic routing is enabled or disabled for the transit gateway peering attachment.</p>
        pub fn dynamic_routing(mut self, input: crate::model::DynamicRoutingValue) -> Self {
            self.dynamic_routing = Some(input);
            self
        }
        /// <p>Describes whether dynamic routing is enabled or disabled for the transit gateway peering attachment.</p>
        pub fn set_dynamic_routing(
            mut self,
            input: std::option::Option<crate::model::DynamicRoutingValue>,
        ) -> Self {
            self.dynamic_routing = input;
            self
        }
        /// Consumes the builder and constructs a [`TransitGatewayPeeringAttachmentOptions`](crate::model::TransitGatewayPeeringAttachmentOptions).
        pub fn build(self) -> crate::model::TransitGatewayPeeringAttachmentOptions {
            crate::model::TransitGatewayPeeringAttachmentOptions {
                dynamic_routing: self.dynamic_routing,
            }
        }
    }
}
impl TransitGatewayPeeringAttachmentOptions {
    /// Creates a new builder-style object to manufacture [`TransitGatewayPeeringAttachmentOptions`](crate::model::TransitGatewayPeeringAttachmentOptions).
    pub fn builder() -> crate::model::transit_gateway_peering_attachment_options::Builder {
        crate::model::transit_gateway_peering_attachment_options::Builder::default()
    }
}

/// When writing a match expression against `DynamicRoutingValue`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let dynamicroutingvalue = unimplemented!();
/// match dynamicroutingvalue {
///     DynamicRoutingValue::Disable => { /* ... */ },
///     DynamicRoutingValue::Enable => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `dynamicroutingvalue` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `DynamicRoutingValue::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `DynamicRoutingValue::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `DynamicRoutingValue::NewFeature` is defined.
/// Specifically, when `dynamicroutingvalue` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `DynamicRoutingValue::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 DynamicRoutingValue {
    #[allow(missing_docs)] // documentation missing in model
    Disable,
    #[allow(missing_docs)] // documentation missing in model
    Enable,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for DynamicRoutingValue {
    fn from(s: &str) -> Self {
        match s {
            "disable" => DynamicRoutingValue::Disable,
            "enable" => DynamicRoutingValue::Enable,
            other => {
                DynamicRoutingValue::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for DynamicRoutingValue {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(DynamicRoutingValue::from(s))
    }
}
impl DynamicRoutingValue {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            DynamicRoutingValue::Disable => "disable",
            DynamicRoutingValue::Enable => "enable",
            DynamicRoutingValue::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["disable", "enable"]
    }
}
impl AsRef<str> for DynamicRoutingValue {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Information about the transit gateway in the peering attachment.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct PeeringTgwInfo {
    /// <p>The ID of the transit gateway.</p>
    #[doc(hidden)]
    pub transit_gateway_id: std::option::Option<std::string::String>,
    /// <p>The ID of the core network where the transit gateway peer is located.</p>
    #[doc(hidden)]
    pub core_network_id: std::option::Option<std::string::String>,
    /// <p>The ID of the Amazon Web Services account that owns the transit gateway.</p>
    #[doc(hidden)]
    pub owner_id: std::option::Option<std::string::String>,
    /// <p>The Region of the transit gateway.</p>
    #[doc(hidden)]
    pub region: std::option::Option<std::string::String>,
}
impl PeeringTgwInfo {
    /// <p>The ID of the transit gateway.</p>
    pub fn transit_gateway_id(&self) -> std::option::Option<&str> {
        self.transit_gateway_id.as_deref()
    }
    /// <p>The ID of the core network where the transit gateway peer is located.</p>
    pub fn core_network_id(&self) -> std::option::Option<&str> {
        self.core_network_id.as_deref()
    }
    /// <p>The ID of the Amazon Web Services account that owns the transit gateway.</p>
    pub fn owner_id(&self) -> std::option::Option<&str> {
        self.owner_id.as_deref()
    }
    /// <p>The Region of the transit gateway.</p>
    pub fn region(&self) -> std::option::Option<&str> {
        self.region.as_deref()
    }
}
/// See [`PeeringTgwInfo`](crate::model::PeeringTgwInfo).
pub mod peering_tgw_info {

    /// A builder for [`PeeringTgwInfo`](crate::model::PeeringTgwInfo).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) transit_gateway_id: std::option::Option<std::string::String>,
        pub(crate) core_network_id: std::option::Option<std::string::String>,
        pub(crate) owner_id: std::option::Option<std::string::String>,
        pub(crate) region: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The ID of the transit gateway.</p>
        pub fn transit_gateway_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.transit_gateway_id = Some(input.into());
            self
        }
        /// <p>The ID of the transit gateway.</p>
        pub fn set_transit_gateway_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.transit_gateway_id = input;
            self
        }
        /// <p>The ID of the core network where the transit gateway peer is located.</p>
        pub fn core_network_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.core_network_id = Some(input.into());
            self
        }
        /// <p>The ID of the core network where the transit gateway peer is located.</p>
        pub fn set_core_network_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.core_network_id = input;
            self
        }
        /// <p>The ID of the Amazon Web Services account that owns the transit gateway.</p>
        pub fn owner_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.owner_id = Some(input.into());
            self
        }
        /// <p>The ID of the Amazon Web Services account that owns the transit gateway.</p>
        pub fn set_owner_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.owner_id = input;
            self
        }
        /// <p>The Region of the transit gateway.</p>
        pub fn region(mut self, input: impl Into<std::string::String>) -> Self {
            self.region = Some(input.into());
            self
        }
        /// <p>The Region of the transit gateway.</p>
        pub fn set_region(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.region = input;
            self
        }
        /// Consumes the builder and constructs a [`PeeringTgwInfo`](crate::model::PeeringTgwInfo).
        pub fn build(self) -> crate::model::PeeringTgwInfo {
            crate::model::PeeringTgwInfo {
                transit_gateway_id: self.transit_gateway_id,
                core_network_id: self.core_network_id,
                owner_id: self.owner_id,
                region: self.region,
            }
        }
    }
}
impl PeeringTgwInfo {
    /// Creates a new builder-style object to manufacture [`PeeringTgwInfo`](crate::model::PeeringTgwInfo).
    pub fn builder() -> crate::model::peering_tgw_info::Builder {
        crate::model::peering_tgw_info::Builder::default()
    }
}

/// <p>Describes the multicast domain associations.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TransitGatewayMulticastDomainAssociations {
    /// <p>The ID of the transit gateway multicast domain.</p>
    #[doc(hidden)]
    pub transit_gateway_multicast_domain_id: std::option::Option<std::string::String>,
    /// <p>The ID of the transit gateway attachment.</p>
    #[doc(hidden)]
    pub transit_gateway_attachment_id: std::option::Option<std::string::String>,
    /// <p>The ID of the resource.</p>
    #[doc(hidden)]
    pub resource_id: std::option::Option<std::string::String>,
    /// <p>The type of resource, for example a VPC attachment.</p>
    #[doc(hidden)]
    pub resource_type: std::option::Option<crate::model::TransitGatewayAttachmentResourceType>,
    /// <p> The ID of the Amazon Web Services account that owns the resource.</p>
    #[doc(hidden)]
    pub resource_owner_id: std::option::Option<std::string::String>,
    /// <p>The subnets associated with the multicast domain.</p>
    #[doc(hidden)]
    pub subnets: std::option::Option<std::vec::Vec<crate::model::SubnetAssociation>>,
}
impl TransitGatewayMulticastDomainAssociations {
    /// <p>The ID of the transit gateway multicast domain.</p>
    pub fn transit_gateway_multicast_domain_id(&self) -> std::option::Option<&str> {
        self.transit_gateway_multicast_domain_id.as_deref()
    }
    /// <p>The ID of the transit gateway attachment.</p>
    pub fn transit_gateway_attachment_id(&self) -> std::option::Option<&str> {
        self.transit_gateway_attachment_id.as_deref()
    }
    /// <p>The ID of the resource.</p>
    pub fn resource_id(&self) -> std::option::Option<&str> {
        self.resource_id.as_deref()
    }
    /// <p>The type of resource, for example a VPC attachment.</p>
    pub fn resource_type(
        &self,
    ) -> std::option::Option<&crate::model::TransitGatewayAttachmentResourceType> {
        self.resource_type.as_ref()
    }
    /// <p> The ID of the Amazon Web Services account that owns the resource.</p>
    pub fn resource_owner_id(&self) -> std::option::Option<&str> {
        self.resource_owner_id.as_deref()
    }
    /// <p>The subnets associated with the multicast domain.</p>
    pub fn subnets(&self) -> std::option::Option<&[crate::model::SubnetAssociation]> {
        self.subnets.as_deref()
    }
}
/// See [`TransitGatewayMulticastDomainAssociations`](crate::model::TransitGatewayMulticastDomainAssociations).
pub mod transit_gateway_multicast_domain_associations {

    /// A builder for [`TransitGatewayMulticastDomainAssociations`](crate::model::TransitGatewayMulticastDomainAssociations).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) transit_gateway_multicast_domain_id: std::option::Option<std::string::String>,
        pub(crate) transit_gateway_attachment_id: std::option::Option<std::string::String>,
        pub(crate) resource_id: std::option::Option<std::string::String>,
        pub(crate) resource_type:
            std::option::Option<crate::model::TransitGatewayAttachmentResourceType>,
        pub(crate) resource_owner_id: std::option::Option<std::string::String>,
        pub(crate) subnets: std::option::Option<std::vec::Vec<crate::model::SubnetAssociation>>,
    }
    impl Builder {
        /// <p>The ID of the transit gateway multicast domain.</p>
        pub fn transit_gateway_multicast_domain_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.transit_gateway_multicast_domain_id = Some(input.into());
            self
        }
        /// <p>The ID of the transit gateway multicast domain.</p>
        pub fn set_transit_gateway_multicast_domain_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.transit_gateway_multicast_domain_id = input;
            self
        }
        /// <p>The ID of the transit gateway attachment.</p>
        pub fn transit_gateway_attachment_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.transit_gateway_attachment_id = Some(input.into());
            self
        }
        /// <p>The ID of the transit gateway attachment.</p>
        pub fn set_transit_gateway_attachment_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.transit_gateway_attachment_id = input;
            self
        }
        /// <p>The ID of the resource.</p>
        pub fn resource_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.resource_id = Some(input.into());
            self
        }
        /// <p>The ID of the resource.</p>
        pub fn set_resource_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.resource_id = input;
            self
        }
        /// <p>The type of resource, for example a VPC attachment.</p>
        pub fn resource_type(
            mut self,
            input: crate::model::TransitGatewayAttachmentResourceType,
        ) -> Self {
            self.resource_type = Some(input);
            self
        }
        /// <p>The type of resource, for example a VPC attachment.</p>
        pub fn set_resource_type(
            mut self,
            input: std::option::Option<crate::model::TransitGatewayAttachmentResourceType>,
        ) -> Self {
            self.resource_type = input;
            self
        }
        /// <p> The ID of the Amazon Web Services account that owns the resource.</p>
        pub fn resource_owner_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.resource_owner_id = Some(input.into());
            self
        }
        /// <p> The ID of the Amazon Web Services account that owns the resource.</p>
        pub fn set_resource_owner_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.resource_owner_id = input;
            self
        }
        /// Appends an item to `subnets`.
        ///
        /// To override the contents of this collection use [`set_subnets`](Self::set_subnets).
        ///
        /// <p>The subnets associated with the multicast domain.</p>
        pub fn subnets(mut self, input: crate::model::SubnetAssociation) -> Self {
            let mut v = self.subnets.unwrap_or_default();
            v.push(input);
            self.subnets = Some(v);
            self
        }
        /// <p>The subnets associated with the multicast domain.</p>
        pub fn set_subnets(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::SubnetAssociation>>,
        ) -> Self {
            self.subnets = input;
            self
        }
        /// Consumes the builder and constructs a [`TransitGatewayMulticastDomainAssociations`](crate::model::TransitGatewayMulticastDomainAssociations).
        pub fn build(self) -> crate::model::TransitGatewayMulticastDomainAssociations {
            crate::model::TransitGatewayMulticastDomainAssociations {
                transit_gateway_multicast_domain_id: self.transit_gateway_multicast_domain_id,
                transit_gateway_attachment_id: self.transit_gateway_attachment_id,
                resource_id: self.resource_id,
                resource_type: self.resource_type,
                resource_owner_id: self.resource_owner_id,
                subnets: self.subnets,
            }
        }
    }
}
impl TransitGatewayMulticastDomainAssociations {
    /// Creates a new builder-style object to manufacture [`TransitGatewayMulticastDomainAssociations`](crate::model::TransitGatewayMulticastDomainAssociations).
    pub fn builder() -> crate::model::transit_gateway_multicast_domain_associations::Builder {
        crate::model::transit_gateway_multicast_domain_associations::Builder::default()
    }
}

/// <p>Describes the subnet association with the transit gateway multicast domain.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SubnetAssociation {
    /// <p>The ID of the subnet.</p>
    #[doc(hidden)]
    pub subnet_id: std::option::Option<std::string::String>,
    /// <p>The state of the subnet association.</p>
    #[doc(hidden)]
    pub state: std::option::Option<crate::model::TransitGatewayMulitcastDomainAssociationState>,
}
impl SubnetAssociation {
    /// <p>The ID of the subnet.</p>
    pub fn subnet_id(&self) -> std::option::Option<&str> {
        self.subnet_id.as_deref()
    }
    /// <p>The state of the subnet association.</p>
    pub fn state(
        &self,
    ) -> std::option::Option<&crate::model::TransitGatewayMulitcastDomainAssociationState> {
        self.state.as_ref()
    }
}
/// See [`SubnetAssociation`](crate::model::SubnetAssociation).
pub mod subnet_association {

    /// A builder for [`SubnetAssociation`](crate::model::SubnetAssociation).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) subnet_id: std::option::Option<std::string::String>,
        pub(crate) state:
            std::option::Option<crate::model::TransitGatewayMulitcastDomainAssociationState>,
    }
    impl Builder {
        /// <p>The ID of the subnet.</p>
        pub fn subnet_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.subnet_id = Some(input.into());
            self
        }
        /// <p>The ID of the subnet.</p>
        pub fn set_subnet_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.subnet_id = input;
            self
        }
        /// <p>The state of the subnet association.</p>
        pub fn state(
            mut self,
            input: crate::model::TransitGatewayMulitcastDomainAssociationState,
        ) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>The state of the subnet association.</p>
        pub fn set_state(
            mut self,
            input: std::option::Option<crate::model::TransitGatewayMulitcastDomainAssociationState>,
        ) -> Self {
            self.state = input;
            self
        }
        /// Consumes the builder and constructs a [`SubnetAssociation`](crate::model::SubnetAssociation).
        pub fn build(self) -> crate::model::SubnetAssociation {
            crate::model::SubnetAssociation {
                subnet_id: self.subnet_id,
                state: self.state,
            }
        }
    }
}
impl SubnetAssociation {
    /// Creates a new builder-style object to manufacture [`SubnetAssociation`](crate::model::SubnetAssociation).
    pub fn builder() -> crate::model::subnet_association::Builder {
        crate::model::subnet_association::Builder::default()
    }
}

/// When writing a match expression against `TransitGatewayMulitcastDomainAssociationState`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let transitgatewaymulitcastdomainassociationstate = unimplemented!();
/// match transitgatewaymulitcastdomainassociationstate {
///     TransitGatewayMulitcastDomainAssociationState::Associated => { /* ... */ },
///     TransitGatewayMulitcastDomainAssociationState::Associating => { /* ... */ },
///     TransitGatewayMulitcastDomainAssociationState::Disassociated => { /* ... */ },
///     TransitGatewayMulitcastDomainAssociationState::Disassociating => { /* ... */ },
///     TransitGatewayMulitcastDomainAssociationState::Failed => { /* ... */ },
///     TransitGatewayMulitcastDomainAssociationState::PendingAcceptance => { /* ... */ },
///     TransitGatewayMulitcastDomainAssociationState::Rejected => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `transitgatewaymulitcastdomainassociationstate` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `TransitGatewayMulitcastDomainAssociationState::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `TransitGatewayMulitcastDomainAssociationState::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `TransitGatewayMulitcastDomainAssociationState::NewFeature` is defined.
/// Specifically, when `transitgatewaymulitcastdomainassociationstate` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `TransitGatewayMulitcastDomainAssociationState::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 TransitGatewayMulitcastDomainAssociationState {
    #[allow(missing_docs)] // documentation missing in model
    Associated,
    #[allow(missing_docs)] // documentation missing in model
    Associating,
    #[allow(missing_docs)] // documentation missing in model
    Disassociated,
    #[allow(missing_docs)] // documentation missing in model
    Disassociating,
    #[allow(missing_docs)] // documentation missing in model
    Failed,
    #[allow(missing_docs)] // documentation missing in model
    PendingAcceptance,
    #[allow(missing_docs)] // documentation missing in model
    Rejected,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for TransitGatewayMulitcastDomainAssociationState {
    fn from(s: &str) -> Self {
        match s {
            "associated" => TransitGatewayMulitcastDomainAssociationState::Associated,
            "associating" => TransitGatewayMulitcastDomainAssociationState::Associating,
            "disassociated" => TransitGatewayMulitcastDomainAssociationState::Disassociated,
            "disassociating" => TransitGatewayMulitcastDomainAssociationState::Disassociating,
            "failed" => TransitGatewayMulitcastDomainAssociationState::Failed,
            "pendingAcceptance" => TransitGatewayMulitcastDomainAssociationState::PendingAcceptance,
            "rejected" => TransitGatewayMulitcastDomainAssociationState::Rejected,
            other => TransitGatewayMulitcastDomainAssociationState::Unknown(
                crate::types::UnknownVariantValue(other.to_owned()),
            ),
        }
    }
}
impl std::str::FromStr for TransitGatewayMulitcastDomainAssociationState {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(TransitGatewayMulitcastDomainAssociationState::from(s))
    }
}
impl TransitGatewayMulitcastDomainAssociationState {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            TransitGatewayMulitcastDomainAssociationState::Associated => "associated",
            TransitGatewayMulitcastDomainAssociationState::Associating => "associating",
            TransitGatewayMulitcastDomainAssociationState::Disassociated => "disassociated",
            TransitGatewayMulitcastDomainAssociationState::Disassociating => "disassociating",
            TransitGatewayMulitcastDomainAssociationState::Failed => "failed",
            TransitGatewayMulitcastDomainAssociationState::PendingAcceptance => "pendingAcceptance",
            TransitGatewayMulitcastDomainAssociationState::Rejected => "rejected",
            TransitGatewayMulitcastDomainAssociationState::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &[
            "associated",
            "associating",
            "disassociated",
            "disassociating",
            "failed",
            "pendingAcceptance",
            "rejected",
        ]
    }
}
impl AsRef<str> for TransitGatewayMulitcastDomainAssociationState {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes the members registered with the transit gateway multicast group.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TransitGatewayMulticastRegisteredGroupSources {
    /// <p>The ID of the transit gateway multicast domain.</p>
    #[doc(hidden)]
    pub transit_gateway_multicast_domain_id: std::option::Option<std::string::String>,
    /// <p>The IDs of the network interfaces members registered with the transit gateway multicast group.</p>
    #[doc(hidden)]
    pub registered_network_interface_ids: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>The IP address assigned to the transit gateway multicast group.</p>
    #[doc(hidden)]
    pub group_ip_address: std::option::Option<std::string::String>,
}
impl TransitGatewayMulticastRegisteredGroupSources {
    /// <p>The ID of the transit gateway multicast domain.</p>
    pub fn transit_gateway_multicast_domain_id(&self) -> std::option::Option<&str> {
        self.transit_gateway_multicast_domain_id.as_deref()
    }
    /// <p>The IDs of the network interfaces members registered with the transit gateway multicast group.</p>
    pub fn registered_network_interface_ids(&self) -> std::option::Option<&[std::string::String]> {
        self.registered_network_interface_ids.as_deref()
    }
    /// <p>The IP address assigned to the transit gateway multicast group.</p>
    pub fn group_ip_address(&self) -> std::option::Option<&str> {
        self.group_ip_address.as_deref()
    }
}
/// See [`TransitGatewayMulticastRegisteredGroupSources`](crate::model::TransitGatewayMulticastRegisteredGroupSources).
pub mod transit_gateway_multicast_registered_group_sources {

    /// A builder for [`TransitGatewayMulticastRegisteredGroupSources`](crate::model::TransitGatewayMulticastRegisteredGroupSources).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) transit_gateway_multicast_domain_id: std::option::Option<std::string::String>,
        pub(crate) registered_network_interface_ids:
            std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) group_ip_address: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The ID of the transit gateway multicast domain.</p>
        pub fn transit_gateway_multicast_domain_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.transit_gateway_multicast_domain_id = Some(input.into());
            self
        }
        /// <p>The ID of the transit gateway multicast domain.</p>
        pub fn set_transit_gateway_multicast_domain_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.transit_gateway_multicast_domain_id = input;
            self
        }
        /// Appends an item to `registered_network_interface_ids`.
        ///
        /// To override the contents of this collection use [`set_registered_network_interface_ids`](Self::set_registered_network_interface_ids).
        ///
        /// <p>The IDs of the network interfaces members registered with the transit gateway multicast group.</p>
        pub fn registered_network_interface_ids(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            let mut v = self.registered_network_interface_ids.unwrap_or_default();
            v.push(input.into());
            self.registered_network_interface_ids = Some(v);
            self
        }
        /// <p>The IDs of the network interfaces members registered with the transit gateway multicast group.</p>
        pub fn set_registered_network_interface_ids(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.registered_network_interface_ids = input;
            self
        }
        /// <p>The IP address assigned to the transit gateway multicast group.</p>
        pub fn group_ip_address(mut self, input: impl Into<std::string::String>) -> Self {
            self.group_ip_address = Some(input.into());
            self
        }
        /// <p>The IP address assigned to the transit gateway multicast group.</p>
        pub fn set_group_ip_address(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.group_ip_address = input;
            self
        }
        /// Consumes the builder and constructs a [`TransitGatewayMulticastRegisteredGroupSources`](crate::model::TransitGatewayMulticastRegisteredGroupSources).
        pub fn build(self) -> crate::model::TransitGatewayMulticastRegisteredGroupSources {
            crate::model::TransitGatewayMulticastRegisteredGroupSources {
                transit_gateway_multicast_domain_id: self.transit_gateway_multicast_domain_id,
                registered_network_interface_ids: self.registered_network_interface_ids,
                group_ip_address: self.group_ip_address,
            }
        }
    }
}
impl TransitGatewayMulticastRegisteredGroupSources {
    /// Creates a new builder-style object to manufacture [`TransitGatewayMulticastRegisteredGroupSources`](crate::model::TransitGatewayMulticastRegisteredGroupSources).
    pub fn builder() -> crate::model::transit_gateway_multicast_registered_group_sources::Builder {
        crate::model::transit_gateway_multicast_registered_group_sources::Builder::default()
    }
}

/// <p>Describes the registered transit gateway multicast group members.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TransitGatewayMulticastRegisteredGroupMembers {
    /// <p>The ID of the transit gateway multicast domain.</p>
    #[doc(hidden)]
    pub transit_gateway_multicast_domain_id: std::option::Option<std::string::String>,
    /// <p>The ID of the registered network interfaces.</p>
    #[doc(hidden)]
    pub registered_network_interface_ids: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>The IP address assigned to the transit gateway multicast group.</p>
    #[doc(hidden)]
    pub group_ip_address: std::option::Option<std::string::String>,
}
impl TransitGatewayMulticastRegisteredGroupMembers {
    /// <p>The ID of the transit gateway multicast domain.</p>
    pub fn transit_gateway_multicast_domain_id(&self) -> std::option::Option<&str> {
        self.transit_gateway_multicast_domain_id.as_deref()
    }
    /// <p>The ID of the registered network interfaces.</p>
    pub fn registered_network_interface_ids(&self) -> std::option::Option<&[std::string::String]> {
        self.registered_network_interface_ids.as_deref()
    }
    /// <p>The IP address assigned to the transit gateway multicast group.</p>
    pub fn group_ip_address(&self) -> std::option::Option<&str> {
        self.group_ip_address.as_deref()
    }
}
/// See [`TransitGatewayMulticastRegisteredGroupMembers`](crate::model::TransitGatewayMulticastRegisteredGroupMembers).
pub mod transit_gateway_multicast_registered_group_members {

    /// A builder for [`TransitGatewayMulticastRegisteredGroupMembers`](crate::model::TransitGatewayMulticastRegisteredGroupMembers).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) transit_gateway_multicast_domain_id: std::option::Option<std::string::String>,
        pub(crate) registered_network_interface_ids:
            std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) group_ip_address: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The ID of the transit gateway multicast domain.</p>
        pub fn transit_gateway_multicast_domain_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.transit_gateway_multicast_domain_id = Some(input.into());
            self
        }
        /// <p>The ID of the transit gateway multicast domain.</p>
        pub fn set_transit_gateway_multicast_domain_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.transit_gateway_multicast_domain_id = input;
            self
        }
        /// Appends an item to `registered_network_interface_ids`.
        ///
        /// To override the contents of this collection use [`set_registered_network_interface_ids`](Self::set_registered_network_interface_ids).
        ///
        /// <p>The ID of the registered network interfaces.</p>
        pub fn registered_network_interface_ids(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            let mut v = self.registered_network_interface_ids.unwrap_or_default();
            v.push(input.into());
            self.registered_network_interface_ids = Some(v);
            self
        }
        /// <p>The ID of the registered network interfaces.</p>
        pub fn set_registered_network_interface_ids(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.registered_network_interface_ids = input;
            self
        }
        /// <p>The IP address assigned to the transit gateway multicast group.</p>
        pub fn group_ip_address(mut self, input: impl Into<std::string::String>) -> Self {
            self.group_ip_address = Some(input.into());
            self
        }
        /// <p>The IP address assigned to the transit gateway multicast group.</p>
        pub fn set_group_ip_address(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.group_ip_address = input;
            self
        }
        /// Consumes the builder and constructs a [`TransitGatewayMulticastRegisteredGroupMembers`](crate::model::TransitGatewayMulticastRegisteredGroupMembers).
        pub fn build(self) -> crate::model::TransitGatewayMulticastRegisteredGroupMembers {
            crate::model::TransitGatewayMulticastRegisteredGroupMembers {
                transit_gateway_multicast_domain_id: self.transit_gateway_multicast_domain_id,
                registered_network_interface_ids: self.registered_network_interface_ids,
                group_ip_address: self.group_ip_address,
            }
        }
    }
}
impl TransitGatewayMulticastRegisteredGroupMembers {
    /// Creates a new builder-style object to manufacture [`TransitGatewayMulticastRegisteredGroupMembers`](crate::model::TransitGatewayMulticastRegisteredGroupMembers).
    pub fn builder() -> crate::model::transit_gateway_multicast_registered_group_members::Builder {
        crate::model::transit_gateway_multicast_registered_group_members::Builder::default()
    }
}

/// <p>Describes the registered tag keys for the current Region.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InstanceTagNotificationAttribute {
    /// <p>The registered tag keys.</p>
    #[doc(hidden)]
    pub instance_tag_keys: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>Indicates wheter all tag keys in the current Region are registered to appear in scheduled event notifications. <code>true</code> indicates that all tag keys in the current Region are registered.</p>
    #[doc(hidden)]
    pub include_all_tags_of_instance: std::option::Option<bool>,
}
impl InstanceTagNotificationAttribute {
    /// <p>The registered tag keys.</p>
    pub fn instance_tag_keys(&self) -> std::option::Option<&[std::string::String]> {
        self.instance_tag_keys.as_deref()
    }
    /// <p>Indicates wheter all tag keys in the current Region are registered to appear in scheduled event notifications. <code>true</code> indicates that all tag keys in the current Region are registered.</p>
    pub fn include_all_tags_of_instance(&self) -> std::option::Option<bool> {
        self.include_all_tags_of_instance
    }
}
/// See [`InstanceTagNotificationAttribute`](crate::model::InstanceTagNotificationAttribute).
pub mod instance_tag_notification_attribute {

    /// A builder for [`InstanceTagNotificationAttribute`](crate::model::InstanceTagNotificationAttribute).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) instance_tag_keys: std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) include_all_tags_of_instance: std::option::Option<bool>,
    }
    impl Builder {
        /// Appends an item to `instance_tag_keys`.
        ///
        /// To override the contents of this collection use [`set_instance_tag_keys`](Self::set_instance_tag_keys).
        ///
        /// <p>The registered tag keys.</p>
        pub fn instance_tag_keys(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.instance_tag_keys.unwrap_or_default();
            v.push(input.into());
            self.instance_tag_keys = Some(v);
            self
        }
        /// <p>The registered tag keys.</p>
        pub fn set_instance_tag_keys(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.instance_tag_keys = input;
            self
        }
        /// <p>Indicates wheter all tag keys in the current Region are registered to appear in scheduled event notifications. <code>true</code> indicates that all tag keys in the current Region are registered.</p>
        pub fn include_all_tags_of_instance(mut self, input: bool) -> Self {
            self.include_all_tags_of_instance = Some(input);
            self
        }
        /// <p>Indicates wheter all tag keys in the current Region are registered to appear in scheduled event notifications. <code>true</code> indicates that all tag keys in the current Region are registered.</p>
        pub fn set_include_all_tags_of_instance(
            mut self,
            input: std::option::Option<bool>,
        ) -> Self {
            self.include_all_tags_of_instance = input;
            self
        }
        /// Consumes the builder and constructs a [`InstanceTagNotificationAttribute`](crate::model::InstanceTagNotificationAttribute).
        pub fn build(self) -> crate::model::InstanceTagNotificationAttribute {
            crate::model::InstanceTagNotificationAttribute {
                instance_tag_keys: self.instance_tag_keys,
                include_all_tags_of_instance: self.include_all_tags_of_instance,
            }
        }
    }
}
impl InstanceTagNotificationAttribute {
    /// Creates a new builder-style object to manufacture [`InstanceTagNotificationAttribute`](crate::model::InstanceTagNotificationAttribute).
    pub fn builder() -> crate::model::instance_tag_notification_attribute::Builder {
        crate::model::instance_tag_notification_attribute::Builder::default()
    }
}

/// <p>Information about the tag keys to register for the current Region. You can either specify individual tag keys or register all tag keys in the current Region. You must specify either <code>IncludeAllTagsOfInstance</code> or <code>InstanceTagKeys</code> in the request</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct RegisterInstanceTagAttributeRequest {
    /// <p>Indicates whether to register all tag keys in the current Region. Specify <code>true</code> to register all tag keys.</p>
    #[doc(hidden)]
    pub include_all_tags_of_instance: std::option::Option<bool>,
    /// <p>The tag keys to register.</p>
    #[doc(hidden)]
    pub instance_tag_keys: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl RegisterInstanceTagAttributeRequest {
    /// <p>Indicates whether to register all tag keys in the current Region. Specify <code>true</code> to register all tag keys.</p>
    pub fn include_all_tags_of_instance(&self) -> std::option::Option<bool> {
        self.include_all_tags_of_instance
    }
    /// <p>The tag keys to register.</p>
    pub fn instance_tag_keys(&self) -> std::option::Option<&[std::string::String]> {
        self.instance_tag_keys.as_deref()
    }
}
/// See [`RegisterInstanceTagAttributeRequest`](crate::model::RegisterInstanceTagAttributeRequest).
pub mod register_instance_tag_attribute_request {

    /// A builder for [`RegisterInstanceTagAttributeRequest`](crate::model::RegisterInstanceTagAttributeRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) include_all_tags_of_instance: std::option::Option<bool>,
        pub(crate) instance_tag_keys: std::option::Option<std::vec::Vec<std::string::String>>,
    }
    impl Builder {
        /// <p>Indicates whether to register all tag keys in the current Region. Specify <code>true</code> to register all tag keys.</p>
        pub fn include_all_tags_of_instance(mut self, input: bool) -> Self {
            self.include_all_tags_of_instance = Some(input);
            self
        }
        /// <p>Indicates whether to register all tag keys in the current Region. Specify <code>true</code> to register all tag keys.</p>
        pub fn set_include_all_tags_of_instance(
            mut self,
            input: std::option::Option<bool>,
        ) -> Self {
            self.include_all_tags_of_instance = input;
            self
        }
        /// Appends an item to `instance_tag_keys`.
        ///
        /// To override the contents of this collection use [`set_instance_tag_keys`](Self::set_instance_tag_keys).
        ///
        /// <p>The tag keys to register.</p>
        pub fn instance_tag_keys(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.instance_tag_keys.unwrap_or_default();
            v.push(input.into());
            self.instance_tag_keys = Some(v);
            self
        }
        /// <p>The tag keys to register.</p>
        pub fn set_instance_tag_keys(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.instance_tag_keys = input;
            self
        }
        /// Consumes the builder and constructs a [`RegisterInstanceTagAttributeRequest`](crate::model::RegisterInstanceTagAttributeRequest).
        pub fn build(self) -> crate::model::RegisterInstanceTagAttributeRequest {
            crate::model::RegisterInstanceTagAttributeRequest {
                include_all_tags_of_instance: self.include_all_tags_of_instance,
                instance_tag_keys: self.instance_tag_keys,
            }
        }
    }
}
impl RegisterInstanceTagAttributeRequest {
    /// Creates a new builder-style object to manufacture [`RegisterInstanceTagAttributeRequest`](crate::model::RegisterInstanceTagAttributeRequest).
    pub fn builder() -> crate::model::register_instance_tag_attribute_request::Builder {
        crate::model::register_instance_tag_attribute_request::Builder::default()
    }
}

/// When writing a match expression against `ImdsSupportValues`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let imdssupportvalues = unimplemented!();
/// match imdssupportvalues {
///     ImdsSupportValues::V20 => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `imdssupportvalues` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `ImdsSupportValues::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `ImdsSupportValues::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `ImdsSupportValues::NewFeature` is defined.
/// Specifically, when `imdssupportvalues` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `ImdsSupportValues::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 ImdsSupportValues {
    #[allow(missing_docs)] // documentation missing in model
    V20,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for ImdsSupportValues {
    fn from(s: &str) -> Self {
        match s {
            "v2.0" => ImdsSupportValues::V20,
            other => {
                ImdsSupportValues::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for ImdsSupportValues {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(ImdsSupportValues::from(s))
    }
}
impl ImdsSupportValues {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            ImdsSupportValues::V20 => "v2.0",
            ImdsSupportValues::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["v2.0"]
    }
}
impl AsRef<str> for ImdsSupportValues {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `TpmSupportValues`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let tpmsupportvalues = unimplemented!();
/// match tpmsupportvalues {
///     TpmSupportValues::V20 => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `tpmsupportvalues` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `TpmSupportValues::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `TpmSupportValues::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `TpmSupportValues::NewFeature` is defined.
/// Specifically, when `tpmsupportvalues` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `TpmSupportValues::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 TpmSupportValues {
    #[allow(missing_docs)] // documentation missing in model
    V20,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for TpmSupportValues {
    fn from(s: &str) -> Self {
        match s {
            "v2.0" => TpmSupportValues::V20,
            other => TpmSupportValues::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for TpmSupportValues {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(TpmSupportValues::from(s))
    }
}
impl TpmSupportValues {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            TpmSupportValues::V20 => "v2.0",
            TpmSupportValues::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["v2.0"]
    }
}
impl AsRef<str> for TpmSupportValues {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes a Scheduled Instance.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ScheduledInstance {
    /// <p>The Availability Zone.</p>
    #[doc(hidden)]
    pub availability_zone: std::option::Option<std::string::String>,
    /// <p>The date when the Scheduled Instance was purchased.</p>
    #[doc(hidden)]
    pub create_date: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The hourly price for a single instance.</p>
    #[doc(hidden)]
    pub hourly_price: std::option::Option<std::string::String>,
    /// <p>The number of instances.</p>
    #[doc(hidden)]
    pub instance_count: std::option::Option<i32>,
    /// <p>The instance type.</p>
    #[doc(hidden)]
    pub instance_type: std::option::Option<std::string::String>,
    /// <p>The network platform (<code>EC2-Classic</code> or <code>EC2-VPC</code>).</p>
    #[doc(hidden)]
    pub network_platform: std::option::Option<std::string::String>,
    /// <p>The time for the next schedule to start.</p>
    #[doc(hidden)]
    pub next_slot_start_time: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The platform (<code>Linux/UNIX</code> or <code>Windows</code>).</p>
    #[doc(hidden)]
    pub platform: std::option::Option<std::string::String>,
    /// <p>The time that the previous schedule ended or will end.</p>
    #[doc(hidden)]
    pub previous_slot_end_time: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The schedule recurrence.</p>
    #[doc(hidden)]
    pub recurrence: std::option::Option<crate::model::ScheduledInstanceRecurrence>,
    /// <p>The Scheduled Instance ID.</p>
    #[doc(hidden)]
    pub scheduled_instance_id: std::option::Option<std::string::String>,
    /// <p>The number of hours in the schedule.</p>
    #[doc(hidden)]
    pub slot_duration_in_hours: std::option::Option<i32>,
    /// <p>The end date for the Scheduled Instance.</p>
    #[doc(hidden)]
    pub term_end_date: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The start date for the Scheduled Instance.</p>
    #[doc(hidden)]
    pub term_start_date: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The total number of hours for a single instance for the entire term.</p>
    #[doc(hidden)]
    pub total_scheduled_instance_hours: std::option::Option<i32>,
}
impl ScheduledInstance {
    /// <p>The Availability Zone.</p>
    pub fn availability_zone(&self) -> std::option::Option<&str> {
        self.availability_zone.as_deref()
    }
    /// <p>The date when the Scheduled Instance was purchased.</p>
    pub fn create_date(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.create_date.as_ref()
    }
    /// <p>The hourly price for a single instance.</p>
    pub fn hourly_price(&self) -> std::option::Option<&str> {
        self.hourly_price.as_deref()
    }
    /// <p>The number of instances.</p>
    pub fn instance_count(&self) -> std::option::Option<i32> {
        self.instance_count
    }
    /// <p>The instance type.</p>
    pub fn instance_type(&self) -> std::option::Option<&str> {
        self.instance_type.as_deref()
    }
    /// <p>The network platform (<code>EC2-Classic</code> or <code>EC2-VPC</code>).</p>
    pub fn network_platform(&self) -> std::option::Option<&str> {
        self.network_platform.as_deref()
    }
    /// <p>The time for the next schedule to start.</p>
    pub fn next_slot_start_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.next_slot_start_time.as_ref()
    }
    /// <p>The platform (<code>Linux/UNIX</code> or <code>Windows</code>).</p>
    pub fn platform(&self) -> std::option::Option<&str> {
        self.platform.as_deref()
    }
    /// <p>The time that the previous schedule ended or will end.</p>
    pub fn previous_slot_end_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.previous_slot_end_time.as_ref()
    }
    /// <p>The schedule recurrence.</p>
    pub fn recurrence(&self) -> std::option::Option<&crate::model::ScheduledInstanceRecurrence> {
        self.recurrence.as_ref()
    }
    /// <p>The Scheduled Instance ID.</p>
    pub fn scheduled_instance_id(&self) -> std::option::Option<&str> {
        self.scheduled_instance_id.as_deref()
    }
    /// <p>The number of hours in the schedule.</p>
    pub fn slot_duration_in_hours(&self) -> std::option::Option<i32> {
        self.slot_duration_in_hours
    }
    /// <p>The end date for the Scheduled Instance.</p>
    pub fn term_end_date(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.term_end_date.as_ref()
    }
    /// <p>The start date for the Scheduled Instance.</p>
    pub fn term_start_date(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.term_start_date.as_ref()
    }
    /// <p>The total number of hours for a single instance for the entire term.</p>
    pub fn total_scheduled_instance_hours(&self) -> std::option::Option<i32> {
        self.total_scheduled_instance_hours
    }
}
/// See [`ScheduledInstance`](crate::model::ScheduledInstance).
pub mod scheduled_instance {

    /// A builder for [`ScheduledInstance`](crate::model::ScheduledInstance).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) availability_zone: std::option::Option<std::string::String>,
        pub(crate) create_date: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) hourly_price: std::option::Option<std::string::String>,
        pub(crate) instance_count: std::option::Option<i32>,
        pub(crate) instance_type: std::option::Option<std::string::String>,
        pub(crate) network_platform: std::option::Option<std::string::String>,
        pub(crate) next_slot_start_time: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) platform: std::option::Option<std::string::String>,
        pub(crate) previous_slot_end_time: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) recurrence: std::option::Option<crate::model::ScheduledInstanceRecurrence>,
        pub(crate) scheduled_instance_id: std::option::Option<std::string::String>,
        pub(crate) slot_duration_in_hours: std::option::Option<i32>,
        pub(crate) term_end_date: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) term_start_date: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) total_scheduled_instance_hours: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>The Availability Zone.</p>
        pub fn availability_zone(mut self, input: impl Into<std::string::String>) -> Self {
            self.availability_zone = Some(input.into());
            self
        }
        /// <p>The Availability Zone.</p>
        pub fn set_availability_zone(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.availability_zone = input;
            self
        }
        /// <p>The date when the Scheduled Instance was purchased.</p>
        pub fn create_date(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.create_date = Some(input);
            self
        }
        /// <p>The date when the Scheduled Instance was purchased.</p>
        pub fn set_create_date(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.create_date = input;
            self
        }
        /// <p>The hourly price for a single instance.</p>
        pub fn hourly_price(mut self, input: impl Into<std::string::String>) -> Self {
            self.hourly_price = Some(input.into());
            self
        }
        /// <p>The hourly price for a single instance.</p>
        pub fn set_hourly_price(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.hourly_price = input;
            self
        }
        /// <p>The number of instances.</p>
        pub fn instance_count(mut self, input: i32) -> Self {
            self.instance_count = Some(input);
            self
        }
        /// <p>The number of instances.</p>
        pub fn set_instance_count(mut self, input: std::option::Option<i32>) -> Self {
            self.instance_count = input;
            self
        }
        /// <p>The instance type.</p>
        pub fn instance_type(mut self, input: impl Into<std::string::String>) -> Self {
            self.instance_type = Some(input.into());
            self
        }
        /// <p>The instance type.</p>
        pub fn set_instance_type(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.instance_type = input;
            self
        }
        /// <p>The network platform (<code>EC2-Classic</code> or <code>EC2-VPC</code>).</p>
        pub fn network_platform(mut self, input: impl Into<std::string::String>) -> Self {
            self.network_platform = Some(input.into());
            self
        }
        /// <p>The network platform (<code>EC2-Classic</code> or <code>EC2-VPC</code>).</p>
        pub fn set_network_platform(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.network_platform = input;
            self
        }
        /// <p>The time for the next schedule to start.</p>
        pub fn next_slot_start_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.next_slot_start_time = Some(input);
            self
        }
        /// <p>The time for the next schedule to start.</p>
        pub fn set_next_slot_start_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.next_slot_start_time = input;
            self
        }
        /// <p>The platform (<code>Linux/UNIX</code> or <code>Windows</code>).</p>
        pub fn platform(mut self, input: impl Into<std::string::String>) -> Self {
            self.platform = Some(input.into());
            self
        }
        /// <p>The platform (<code>Linux/UNIX</code> or <code>Windows</code>).</p>
        pub fn set_platform(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.platform = input;
            self
        }
        /// <p>The time that the previous schedule ended or will end.</p>
        pub fn previous_slot_end_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.previous_slot_end_time = Some(input);
            self
        }
        /// <p>The time that the previous schedule ended or will end.</p>
        pub fn set_previous_slot_end_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.previous_slot_end_time = input;
            self
        }
        /// <p>The schedule recurrence.</p>
        pub fn recurrence(mut self, input: crate::model::ScheduledInstanceRecurrence) -> Self {
            self.recurrence = Some(input);
            self
        }
        /// <p>The schedule recurrence.</p>
        pub fn set_recurrence(
            mut self,
            input: std::option::Option<crate::model::ScheduledInstanceRecurrence>,
        ) -> Self {
            self.recurrence = input;
            self
        }
        /// <p>The Scheduled Instance ID.</p>
        pub fn scheduled_instance_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.scheduled_instance_id = Some(input.into());
            self
        }
        /// <p>The Scheduled Instance ID.</p>
        pub fn set_scheduled_instance_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.scheduled_instance_id = input;
            self
        }
        /// <p>The number of hours in the schedule.</p>
        pub fn slot_duration_in_hours(mut self, input: i32) -> Self {
            self.slot_duration_in_hours = Some(input);
            self
        }
        /// <p>The number of hours in the schedule.</p>
        pub fn set_slot_duration_in_hours(mut self, input: std::option::Option<i32>) -> Self {
            self.slot_duration_in_hours = input;
            self
        }
        /// <p>The end date for the Scheduled Instance.</p>
        pub fn term_end_date(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.term_end_date = Some(input);
            self
        }
        /// <p>The end date for the Scheduled Instance.</p>
        pub fn set_term_end_date(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.term_end_date = input;
            self
        }
        /// <p>The start date for the Scheduled Instance.</p>
        pub fn term_start_date(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.term_start_date = Some(input);
            self
        }
        /// <p>The start date for the Scheduled Instance.</p>
        pub fn set_term_start_date(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.term_start_date = input;
            self
        }
        /// <p>The total number of hours for a single instance for the entire term.</p>
        pub fn total_scheduled_instance_hours(mut self, input: i32) -> Self {
            self.total_scheduled_instance_hours = Some(input);
            self
        }
        /// <p>The total number of hours for a single instance for the entire term.</p>
        pub fn set_total_scheduled_instance_hours(
            mut self,
            input: std::option::Option<i32>,
        ) -> Self {
            self.total_scheduled_instance_hours = input;
            self
        }
        /// Consumes the builder and constructs a [`ScheduledInstance`](crate::model::ScheduledInstance).
        pub fn build(self) -> crate::model::ScheduledInstance {
            crate::model::ScheduledInstance {
                availability_zone: self.availability_zone,
                create_date: self.create_date,
                hourly_price: self.hourly_price,
                instance_count: self.instance_count,
                instance_type: self.instance_type,
                network_platform: self.network_platform,
                next_slot_start_time: self.next_slot_start_time,
                platform: self.platform,
                previous_slot_end_time: self.previous_slot_end_time,
                recurrence: self.recurrence,
                scheduled_instance_id: self.scheduled_instance_id,
                slot_duration_in_hours: self.slot_duration_in_hours,
                term_end_date: self.term_end_date,
                term_start_date: self.term_start_date,
                total_scheduled_instance_hours: self.total_scheduled_instance_hours,
            }
        }
    }
}
impl ScheduledInstance {
    /// Creates a new builder-style object to manufacture [`ScheduledInstance`](crate::model::ScheduledInstance).
    pub fn builder() -> crate::model::scheduled_instance::Builder {
        crate::model::scheduled_instance::Builder::default()
    }
}

/// <p>Describes the recurring schedule for a Scheduled Instance.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ScheduledInstanceRecurrence {
    /// <p>The frequency (<code>Daily</code>, <code>Weekly</code>, or <code>Monthly</code>).</p>
    #[doc(hidden)]
    pub frequency: std::option::Option<std::string::String>,
    /// <p>The interval quantity. The interval unit depends on the value of <code>frequency</code>. For example, every 2 weeks or every 2 months.</p>
    #[doc(hidden)]
    pub interval: std::option::Option<i32>,
    /// <p>The days. For a monthly schedule, this is one or more days of the month (1-31). For a weekly schedule, this is one or more days of the week (1-7, where 1 is Sunday).</p>
    #[doc(hidden)]
    pub occurrence_day_set: std::option::Option<std::vec::Vec<i32>>,
    /// <p>Indicates whether the occurrence is relative to the end of the specified week or month.</p>
    #[doc(hidden)]
    pub occurrence_relative_to_end: std::option::Option<bool>,
    /// <p>The unit for <code>occurrenceDaySet</code> (<code>DayOfWeek</code> or <code>DayOfMonth</code>).</p>
    #[doc(hidden)]
    pub occurrence_unit: std::option::Option<std::string::String>,
}
impl ScheduledInstanceRecurrence {
    /// <p>The frequency (<code>Daily</code>, <code>Weekly</code>, or <code>Monthly</code>).</p>
    pub fn frequency(&self) -> std::option::Option<&str> {
        self.frequency.as_deref()
    }
    /// <p>The interval quantity. The interval unit depends on the value of <code>frequency</code>. For example, every 2 weeks or every 2 months.</p>
    pub fn interval(&self) -> std::option::Option<i32> {
        self.interval
    }
    /// <p>The days. For a monthly schedule, this is one or more days of the month (1-31). For a weekly schedule, this is one or more days of the week (1-7, where 1 is Sunday).</p>
    pub fn occurrence_day_set(&self) -> std::option::Option<&[i32]> {
        self.occurrence_day_set.as_deref()
    }
    /// <p>Indicates whether the occurrence is relative to the end of the specified week or month.</p>
    pub fn occurrence_relative_to_end(&self) -> std::option::Option<bool> {
        self.occurrence_relative_to_end
    }
    /// <p>The unit for <code>occurrenceDaySet</code> (<code>DayOfWeek</code> or <code>DayOfMonth</code>).</p>
    pub fn occurrence_unit(&self) -> std::option::Option<&str> {
        self.occurrence_unit.as_deref()
    }
}
/// See [`ScheduledInstanceRecurrence`](crate::model::ScheduledInstanceRecurrence).
pub mod scheduled_instance_recurrence {

    /// A builder for [`ScheduledInstanceRecurrence`](crate::model::ScheduledInstanceRecurrence).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) frequency: std::option::Option<std::string::String>,
        pub(crate) interval: std::option::Option<i32>,
        pub(crate) occurrence_day_set: std::option::Option<std::vec::Vec<i32>>,
        pub(crate) occurrence_relative_to_end: std::option::Option<bool>,
        pub(crate) occurrence_unit: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The frequency (<code>Daily</code>, <code>Weekly</code>, or <code>Monthly</code>).</p>
        pub fn frequency(mut self, input: impl Into<std::string::String>) -> Self {
            self.frequency = Some(input.into());
            self
        }
        /// <p>The frequency (<code>Daily</code>, <code>Weekly</code>, or <code>Monthly</code>).</p>
        pub fn set_frequency(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.frequency = input;
            self
        }
        /// <p>The interval quantity. The interval unit depends on the value of <code>frequency</code>. For example, every 2 weeks or every 2 months.</p>
        pub fn interval(mut self, input: i32) -> Self {
            self.interval = Some(input);
            self
        }
        /// <p>The interval quantity. The interval unit depends on the value of <code>frequency</code>. For example, every 2 weeks or every 2 months.</p>
        pub fn set_interval(mut self, input: std::option::Option<i32>) -> Self {
            self.interval = input;
            self
        }
        /// Appends an item to `occurrence_day_set`.
        ///
        /// To override the contents of this collection use [`set_occurrence_day_set`](Self::set_occurrence_day_set).
        ///
        /// <p>The days. For a monthly schedule, this is one or more days of the month (1-31). For a weekly schedule, this is one or more days of the week (1-7, where 1 is Sunday).</p>
        pub fn occurrence_day_set(mut self, input: i32) -> Self {
            let mut v = self.occurrence_day_set.unwrap_or_default();
            v.push(input);
            self.occurrence_day_set = Some(v);
            self
        }
        /// <p>The days. For a monthly schedule, this is one or more days of the month (1-31). For a weekly schedule, this is one or more days of the week (1-7, where 1 is Sunday).</p>
        pub fn set_occurrence_day_set(
            mut self,
            input: std::option::Option<std::vec::Vec<i32>>,
        ) -> Self {
            self.occurrence_day_set = input;
            self
        }
        /// <p>Indicates whether the occurrence is relative to the end of the specified week or month.</p>
        pub fn occurrence_relative_to_end(mut self, input: bool) -> Self {
            self.occurrence_relative_to_end = Some(input);
            self
        }
        /// <p>Indicates whether the occurrence is relative to the end of the specified week or month.</p>
        pub fn set_occurrence_relative_to_end(mut self, input: std::option::Option<bool>) -> Self {
            self.occurrence_relative_to_end = input;
            self
        }
        /// <p>The unit for <code>occurrenceDaySet</code> (<code>DayOfWeek</code> or <code>DayOfMonth</code>).</p>
        pub fn occurrence_unit(mut self, input: impl Into<std::string::String>) -> Self {
            self.occurrence_unit = Some(input.into());
            self
        }
        /// <p>The unit for <code>occurrenceDaySet</code> (<code>DayOfWeek</code> or <code>DayOfMonth</code>).</p>
        pub fn set_occurrence_unit(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.occurrence_unit = input;
            self
        }
        /// Consumes the builder and constructs a [`ScheduledInstanceRecurrence`](crate::model::ScheduledInstanceRecurrence).
        pub fn build(self) -> crate::model::ScheduledInstanceRecurrence {
            crate::model::ScheduledInstanceRecurrence {
                frequency: self.frequency,
                interval: self.interval,
                occurrence_day_set: self.occurrence_day_set,
                occurrence_relative_to_end: self.occurrence_relative_to_end,
                occurrence_unit: self.occurrence_unit,
            }
        }
    }
}
impl ScheduledInstanceRecurrence {
    /// Creates a new builder-style object to manufacture [`ScheduledInstanceRecurrence`](crate::model::ScheduledInstanceRecurrence).
    pub fn builder() -> crate::model::scheduled_instance_recurrence::Builder {
        crate::model::scheduled_instance_recurrence::Builder::default()
    }
}

/// <p>Describes a request to purchase Scheduled Instances.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct PurchaseRequest {
    /// <p>The number of instances.</p>
    #[doc(hidden)]
    pub instance_count: std::option::Option<i32>,
    /// <p>The purchase token.</p>
    #[doc(hidden)]
    pub purchase_token: std::option::Option<std::string::String>,
}
impl PurchaseRequest {
    /// <p>The number of instances.</p>
    pub fn instance_count(&self) -> std::option::Option<i32> {
        self.instance_count
    }
    /// <p>The purchase token.</p>
    pub fn purchase_token(&self) -> std::option::Option<&str> {
        self.purchase_token.as_deref()
    }
}
/// See [`PurchaseRequest`](crate::model::PurchaseRequest).
pub mod purchase_request {

    /// A builder for [`PurchaseRequest`](crate::model::PurchaseRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) instance_count: std::option::Option<i32>,
        pub(crate) purchase_token: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The number of instances.</p>
        pub fn instance_count(mut self, input: i32) -> Self {
            self.instance_count = Some(input);
            self
        }
        /// <p>The number of instances.</p>
        pub fn set_instance_count(mut self, input: std::option::Option<i32>) -> Self {
            self.instance_count = input;
            self
        }
        /// <p>The purchase token.</p>
        pub fn purchase_token(mut self, input: impl Into<std::string::String>) -> Self {
            self.purchase_token = Some(input.into());
            self
        }
        /// <p>The purchase token.</p>
        pub fn set_purchase_token(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.purchase_token = input;
            self
        }
        /// Consumes the builder and constructs a [`PurchaseRequest`](crate::model::PurchaseRequest).
        pub fn build(self) -> crate::model::PurchaseRequest {
            crate::model::PurchaseRequest {
                instance_count: self.instance_count,
                purchase_token: self.purchase_token,
            }
        }
    }
}
impl PurchaseRequest {
    /// Creates a new builder-style object to manufacture [`PurchaseRequest`](crate::model::PurchaseRequest).
    pub fn builder() -> crate::model::purchase_request::Builder {
        crate::model::purchase_request::Builder::default()
    }
}

/// <p>Describes the limit price of a Reserved Instance offering.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ReservedInstanceLimitPrice {
    /// <p>Used for Reserved Instance Marketplace offerings. Specifies the limit price on the total order (instanceCount * price).</p>
    #[doc(hidden)]
    pub amount: std::option::Option<f64>,
    /// <p>The currency in which the <code>limitPrice</code> amount is specified. At this time, the only supported currency is <code>USD</code>.</p>
    #[doc(hidden)]
    pub currency_code: std::option::Option<crate::model::CurrencyCodeValues>,
}
impl ReservedInstanceLimitPrice {
    /// <p>Used for Reserved Instance Marketplace offerings. Specifies the limit price on the total order (instanceCount * price).</p>
    pub fn amount(&self) -> std::option::Option<f64> {
        self.amount
    }
    /// <p>The currency in which the <code>limitPrice</code> amount is specified. At this time, the only supported currency is <code>USD</code>.</p>
    pub fn currency_code(&self) -> std::option::Option<&crate::model::CurrencyCodeValues> {
        self.currency_code.as_ref()
    }
}
/// See [`ReservedInstanceLimitPrice`](crate::model::ReservedInstanceLimitPrice).
pub mod reserved_instance_limit_price {

    /// A builder for [`ReservedInstanceLimitPrice`](crate::model::ReservedInstanceLimitPrice).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) amount: std::option::Option<f64>,
        pub(crate) currency_code: std::option::Option<crate::model::CurrencyCodeValues>,
    }
    impl Builder {
        /// <p>Used for Reserved Instance Marketplace offerings. Specifies the limit price on the total order (instanceCount * price).</p>
        pub fn amount(mut self, input: f64) -> Self {
            self.amount = Some(input);
            self
        }
        /// <p>Used for Reserved Instance Marketplace offerings. Specifies the limit price on the total order (instanceCount * price).</p>
        pub fn set_amount(mut self, input: std::option::Option<f64>) -> Self {
            self.amount = input;
            self
        }
        /// <p>The currency in which the <code>limitPrice</code> amount is specified. At this time, the only supported currency is <code>USD</code>.</p>
        pub fn currency_code(mut self, input: crate::model::CurrencyCodeValues) -> Self {
            self.currency_code = Some(input);
            self
        }
        /// <p>The currency in which the <code>limitPrice</code> amount is specified. At this time, the only supported currency is <code>USD</code>.</p>
        pub fn set_currency_code(
            mut self,
            input: std::option::Option<crate::model::CurrencyCodeValues>,
        ) -> Self {
            self.currency_code = input;
            self
        }
        /// Consumes the builder and constructs a [`ReservedInstanceLimitPrice`](crate::model::ReservedInstanceLimitPrice).
        pub fn build(self) -> crate::model::ReservedInstanceLimitPrice {
            crate::model::ReservedInstanceLimitPrice {
                amount: self.amount,
                currency_code: self.currency_code,
            }
        }
    }
}
impl ReservedInstanceLimitPrice {
    /// Creates a new builder-style object to manufacture [`ReservedInstanceLimitPrice`](crate::model::ReservedInstanceLimitPrice).
    pub fn builder() -> crate::model::reserved_instance_limit_price::Builder {
        crate::model::reserved_instance_limit_price::Builder::default()
    }
}

/// When writing a match expression against `CurrencyCodeValues`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let currencycodevalues = unimplemented!();
/// match currencycodevalues {
///     CurrencyCodeValues::Usd => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `currencycodevalues` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `CurrencyCodeValues::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `CurrencyCodeValues::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `CurrencyCodeValues::NewFeature` is defined.
/// Specifically, when `currencycodevalues` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `CurrencyCodeValues::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 CurrencyCodeValues {
    #[allow(missing_docs)] // documentation missing in model
    Usd,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for CurrencyCodeValues {
    fn from(s: &str) -> Self {
        match s {
            "USD" => CurrencyCodeValues::Usd,
            other => {
                CurrencyCodeValues::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for CurrencyCodeValues {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(CurrencyCodeValues::from(s))
    }
}
impl CurrencyCodeValues {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            CurrencyCodeValues::Usd => "USD",
            CurrencyCodeValues::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["USD"]
    }
}
impl AsRef<str> for CurrencyCodeValues {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes the result of the purchase.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Purchase {
    /// <p>The currency in which the <code>UpfrontPrice</code> and <code>HourlyPrice</code> amounts are specified. At this time, the only supported currency is <code>USD</code>.</p>
    #[doc(hidden)]
    pub currency_code: std::option::Option<crate::model::CurrencyCodeValues>,
    /// <p>The duration of the reservation's term in seconds.</p>
    #[doc(hidden)]
    pub duration: std::option::Option<i32>,
    /// <p>The IDs of the Dedicated Hosts associated with the reservation.</p>
    #[doc(hidden)]
    pub host_id_set: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>The ID of the reservation.</p>
    #[doc(hidden)]
    pub host_reservation_id: std::option::Option<std::string::String>,
    /// <p>The hourly price of the reservation per hour.</p>
    #[doc(hidden)]
    pub hourly_price: std::option::Option<std::string::String>,
    /// <p>The instance family on the Dedicated Host that the reservation can be associated with.</p>
    #[doc(hidden)]
    pub instance_family: std::option::Option<std::string::String>,
    /// <p>The payment option for the reservation.</p>
    #[doc(hidden)]
    pub payment_option: std::option::Option<crate::model::PaymentOption>,
    /// <p>The upfront price of the reservation.</p>
    #[doc(hidden)]
    pub upfront_price: std::option::Option<std::string::String>,
}
impl Purchase {
    /// <p>The currency in which the <code>UpfrontPrice</code> and <code>HourlyPrice</code> amounts are specified. At this time, the only supported currency is <code>USD</code>.</p>
    pub fn currency_code(&self) -> std::option::Option<&crate::model::CurrencyCodeValues> {
        self.currency_code.as_ref()
    }
    /// <p>The duration of the reservation's term in seconds.</p>
    pub fn duration(&self) -> std::option::Option<i32> {
        self.duration
    }
    /// <p>The IDs of the Dedicated Hosts associated with the reservation.</p>
    pub fn host_id_set(&self) -> std::option::Option<&[std::string::String]> {
        self.host_id_set.as_deref()
    }
    /// <p>The ID of the reservation.</p>
    pub fn host_reservation_id(&self) -> std::option::Option<&str> {
        self.host_reservation_id.as_deref()
    }
    /// <p>The hourly price of the reservation per hour.</p>
    pub fn hourly_price(&self) -> std::option::Option<&str> {
        self.hourly_price.as_deref()
    }
    /// <p>The instance family on the Dedicated Host that the reservation can be associated with.</p>
    pub fn instance_family(&self) -> std::option::Option<&str> {
        self.instance_family.as_deref()
    }
    /// <p>The payment option for the reservation.</p>
    pub fn payment_option(&self) -> std::option::Option<&crate::model::PaymentOption> {
        self.payment_option.as_ref()
    }
    /// <p>The upfront price of the reservation.</p>
    pub fn upfront_price(&self) -> std::option::Option<&str> {
        self.upfront_price.as_deref()
    }
}
/// See [`Purchase`](crate::model::Purchase).
pub mod purchase {

    /// A builder for [`Purchase`](crate::model::Purchase).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) currency_code: std::option::Option<crate::model::CurrencyCodeValues>,
        pub(crate) duration: std::option::Option<i32>,
        pub(crate) host_id_set: std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) host_reservation_id: std::option::Option<std::string::String>,
        pub(crate) hourly_price: std::option::Option<std::string::String>,
        pub(crate) instance_family: std::option::Option<std::string::String>,
        pub(crate) payment_option: std::option::Option<crate::model::PaymentOption>,
        pub(crate) upfront_price: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The currency in which the <code>UpfrontPrice</code> and <code>HourlyPrice</code> amounts are specified. At this time, the only supported currency is <code>USD</code>.</p>
        pub fn currency_code(mut self, input: crate::model::CurrencyCodeValues) -> Self {
            self.currency_code = Some(input);
            self
        }
        /// <p>The currency in which the <code>UpfrontPrice</code> and <code>HourlyPrice</code> amounts are specified. At this time, the only supported currency is <code>USD</code>.</p>
        pub fn set_currency_code(
            mut self,
            input: std::option::Option<crate::model::CurrencyCodeValues>,
        ) -> Self {
            self.currency_code = input;
            self
        }
        /// <p>The duration of the reservation's term in seconds.</p>
        pub fn duration(mut self, input: i32) -> Self {
            self.duration = Some(input);
            self
        }
        /// <p>The duration of the reservation's term in seconds.</p>
        pub fn set_duration(mut self, input: std::option::Option<i32>) -> Self {
            self.duration = input;
            self
        }
        /// Appends an item to `host_id_set`.
        ///
        /// To override the contents of this collection use [`set_host_id_set`](Self::set_host_id_set).
        ///
        /// <p>The IDs of the Dedicated Hosts associated with the reservation.</p>
        pub fn host_id_set(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.host_id_set.unwrap_or_default();
            v.push(input.into());
            self.host_id_set = Some(v);
            self
        }
        /// <p>The IDs of the Dedicated Hosts associated with the reservation.</p>
        pub fn set_host_id_set(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.host_id_set = input;
            self
        }
        /// <p>The ID of the reservation.</p>
        pub fn host_reservation_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.host_reservation_id = Some(input.into());
            self
        }
        /// <p>The ID of the reservation.</p>
        pub fn set_host_reservation_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.host_reservation_id = input;
            self
        }
        /// <p>The hourly price of the reservation per hour.</p>
        pub fn hourly_price(mut self, input: impl Into<std::string::String>) -> Self {
            self.hourly_price = Some(input.into());
            self
        }
        /// <p>The hourly price of the reservation per hour.</p>
        pub fn set_hourly_price(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.hourly_price = input;
            self
        }
        /// <p>The instance family on the Dedicated Host that the reservation can be associated with.</p>
        pub fn instance_family(mut self, input: impl Into<std::string::String>) -> Self {
            self.instance_family = Some(input.into());
            self
        }
        /// <p>The instance family on the Dedicated Host that the reservation can be associated with.</p>
        pub fn set_instance_family(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.instance_family = input;
            self
        }
        /// <p>The payment option for the reservation.</p>
        pub fn payment_option(mut self, input: crate::model::PaymentOption) -> Self {
            self.payment_option = Some(input);
            self
        }
        /// <p>The payment option for the reservation.</p>
        pub fn set_payment_option(
            mut self,
            input: std::option::Option<crate::model::PaymentOption>,
        ) -> Self {
            self.payment_option = input;
            self
        }
        /// <p>The upfront price of the reservation.</p>
        pub fn upfront_price(mut self, input: impl Into<std::string::String>) -> Self {
            self.upfront_price = Some(input.into());
            self
        }
        /// <p>The upfront price of the reservation.</p>
        pub fn set_upfront_price(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.upfront_price = input;
            self
        }
        /// Consumes the builder and constructs a [`Purchase`](crate::model::Purchase).
        pub fn build(self) -> crate::model::Purchase {
            crate::model::Purchase {
                currency_code: self.currency_code,
                duration: self.duration,
                host_id_set: self.host_id_set,
                host_reservation_id: self.host_reservation_id,
                hourly_price: self.hourly_price,
                instance_family: self.instance_family,
                payment_option: self.payment_option,
                upfront_price: self.upfront_price,
            }
        }
    }
}
impl Purchase {
    /// Creates a new builder-style object to manufacture [`Purchase`](crate::model::Purchase).
    pub fn builder() -> crate::model::purchase::Builder {
        crate::model::purchase::Builder::default()
    }
}

/// When writing a match expression against `PaymentOption`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let paymentoption = unimplemented!();
/// match paymentoption {
///     PaymentOption::AllUpfront => { /* ... */ },
///     PaymentOption::NoUpfront => { /* ... */ },
///     PaymentOption::PartialUpfront => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `paymentoption` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `PaymentOption::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `PaymentOption::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `PaymentOption::NewFeature` is defined.
/// Specifically, when `paymentoption` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `PaymentOption::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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)] // documentation missing in model
    AllUpfront,
    #[allow(missing_docs)] // documentation missing in model
    NoUpfront,
    #[allow(missing_docs)] // documentation missing in model
    PartialUpfront,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for PaymentOption {
    fn from(s: &str) -> Self {
        match s {
            "AllUpfront" => PaymentOption::AllUpfront,
            "NoUpfront" => PaymentOption::NoUpfront,
            "PartialUpfront" => 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 {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            PaymentOption::AllUpfront => "AllUpfront",
            PaymentOption::NoUpfront => "NoUpfront",
            PaymentOption::PartialUpfront => "PartialUpfront",
            PaymentOption::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["AllUpfront", "NoUpfront", "PartialUpfront"]
    }
}
impl AsRef<str> for PaymentOption {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes an address range of an IPv4 address pool.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct PublicIpv4PoolRange {
    /// <p>The first IP address in the range.</p>
    #[doc(hidden)]
    pub first_address: std::option::Option<std::string::String>,
    /// <p>The last IP address in the range.</p>
    #[doc(hidden)]
    pub last_address: std::option::Option<std::string::String>,
    /// <p>The number of addresses in the range.</p>
    #[doc(hidden)]
    pub address_count: std::option::Option<i32>,
    /// <p>The number of available addresses in the range.</p>
    #[doc(hidden)]
    pub available_address_count: std::option::Option<i32>,
}
impl PublicIpv4PoolRange {
    /// <p>The first IP address in the range.</p>
    pub fn first_address(&self) -> std::option::Option<&str> {
        self.first_address.as_deref()
    }
    /// <p>The last IP address in the range.</p>
    pub fn last_address(&self) -> std::option::Option<&str> {
        self.last_address.as_deref()
    }
    /// <p>The number of addresses in the range.</p>
    pub fn address_count(&self) -> std::option::Option<i32> {
        self.address_count
    }
    /// <p>The number of available addresses in the range.</p>
    pub fn available_address_count(&self) -> std::option::Option<i32> {
        self.available_address_count
    }
}
/// See [`PublicIpv4PoolRange`](crate::model::PublicIpv4PoolRange).
pub mod public_ipv4_pool_range {

    /// A builder for [`PublicIpv4PoolRange`](crate::model::PublicIpv4PoolRange).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) first_address: std::option::Option<std::string::String>,
        pub(crate) last_address: std::option::Option<std::string::String>,
        pub(crate) address_count: std::option::Option<i32>,
        pub(crate) available_address_count: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>The first IP address in the range.</p>
        pub fn first_address(mut self, input: impl Into<std::string::String>) -> Self {
            self.first_address = Some(input.into());
            self
        }
        /// <p>The first IP address in the range.</p>
        pub fn set_first_address(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.first_address = input;
            self
        }
        /// <p>The last IP address in the range.</p>
        pub fn last_address(mut self, input: impl Into<std::string::String>) -> Self {
            self.last_address = Some(input.into());
            self
        }
        /// <p>The last IP address in the range.</p>
        pub fn set_last_address(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.last_address = input;
            self
        }
        /// <p>The number of addresses in the range.</p>
        pub fn address_count(mut self, input: i32) -> Self {
            self.address_count = Some(input);
            self
        }
        /// <p>The number of addresses in the range.</p>
        pub fn set_address_count(mut self, input: std::option::Option<i32>) -> Self {
            self.address_count = input;
            self
        }
        /// <p>The number of available addresses in the range.</p>
        pub fn available_address_count(mut self, input: i32) -> Self {
            self.available_address_count = Some(input);
            self
        }
        /// <p>The number of available addresses in the range.</p>
        pub fn set_available_address_count(mut self, input: std::option::Option<i32>) -> Self {
            self.available_address_count = input;
            self
        }
        /// Consumes the builder and constructs a [`PublicIpv4PoolRange`](crate::model::PublicIpv4PoolRange).
        pub fn build(self) -> crate::model::PublicIpv4PoolRange {
            crate::model::PublicIpv4PoolRange {
                first_address: self.first_address,
                last_address: self.last_address,
                address_count: self.address_count,
                available_address_count: self.available_address_count,
            }
        }
    }
}
impl PublicIpv4PoolRange {
    /// Creates a new builder-style object to manufacture [`PublicIpv4PoolRange`](crate::model::PublicIpv4PoolRange).
    pub fn builder() -> crate::model::public_ipv4_pool_range::Builder {
        crate::model::public_ipv4_pool_range::Builder::default()
    }
}

/// <p>A CIDR provisioned to an IPAM pool.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct IpamPoolCidr {
    /// <p>The CIDR provisioned to the IPAM pool. A CIDR is a representation of an IP address and its associated network mask (or netmask) and refers to a range of IP addresses. An IPv4 CIDR example is <code>10.24.34.0/23</code>. An IPv6 CIDR example is <code>2001:DB8::/32</code>.</p>
    #[doc(hidden)]
    pub cidr: std::option::Option<std::string::String>,
    /// <p>The state of the CIDR.</p>
    #[doc(hidden)]
    pub state: std::option::Option<crate::model::IpamPoolCidrState>,
    /// <p>Details related to why an IPAM pool CIDR failed to be provisioned.</p>
    #[doc(hidden)]
    pub failure_reason: std::option::Option<crate::model::IpamPoolCidrFailureReason>,
}
impl IpamPoolCidr {
    /// <p>The CIDR provisioned to the IPAM pool. A CIDR is a representation of an IP address and its associated network mask (or netmask) and refers to a range of IP addresses. An IPv4 CIDR example is <code>10.24.34.0/23</code>. An IPv6 CIDR example is <code>2001:DB8::/32</code>.</p>
    pub fn cidr(&self) -> std::option::Option<&str> {
        self.cidr.as_deref()
    }
    /// <p>The state of the CIDR.</p>
    pub fn state(&self) -> std::option::Option<&crate::model::IpamPoolCidrState> {
        self.state.as_ref()
    }
    /// <p>Details related to why an IPAM pool CIDR failed to be provisioned.</p>
    pub fn failure_reason(&self) -> std::option::Option<&crate::model::IpamPoolCidrFailureReason> {
        self.failure_reason.as_ref()
    }
}
/// See [`IpamPoolCidr`](crate::model::IpamPoolCidr).
pub mod ipam_pool_cidr {

    /// A builder for [`IpamPoolCidr`](crate::model::IpamPoolCidr).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) cidr: std::option::Option<std::string::String>,
        pub(crate) state: std::option::Option<crate::model::IpamPoolCidrState>,
        pub(crate) failure_reason: std::option::Option<crate::model::IpamPoolCidrFailureReason>,
    }
    impl Builder {
        /// <p>The CIDR provisioned to the IPAM pool. A CIDR is a representation of an IP address and its associated network mask (or netmask) and refers to a range of IP addresses. An IPv4 CIDR example is <code>10.24.34.0/23</code>. An IPv6 CIDR example is <code>2001:DB8::/32</code>.</p>
        pub fn cidr(mut self, input: impl Into<std::string::String>) -> Self {
            self.cidr = Some(input.into());
            self
        }
        /// <p>The CIDR provisioned to the IPAM pool. A CIDR is a representation of an IP address and its associated network mask (or netmask) and refers to a range of IP addresses. An IPv4 CIDR example is <code>10.24.34.0/23</code>. An IPv6 CIDR example is <code>2001:DB8::/32</code>.</p>
        pub fn set_cidr(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.cidr = input;
            self
        }
        /// <p>The state of the CIDR.</p>
        pub fn state(mut self, input: crate::model::IpamPoolCidrState) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>The state of the CIDR.</p>
        pub fn set_state(
            mut self,
            input: std::option::Option<crate::model::IpamPoolCidrState>,
        ) -> Self {
            self.state = input;
            self
        }
        /// <p>Details related to why an IPAM pool CIDR failed to be provisioned.</p>
        pub fn failure_reason(mut self, input: crate::model::IpamPoolCidrFailureReason) -> Self {
            self.failure_reason = Some(input);
            self
        }
        /// <p>Details related to why an IPAM pool CIDR failed to be provisioned.</p>
        pub fn set_failure_reason(
            mut self,
            input: std::option::Option<crate::model::IpamPoolCidrFailureReason>,
        ) -> Self {
            self.failure_reason = input;
            self
        }
        /// Consumes the builder and constructs a [`IpamPoolCidr`](crate::model::IpamPoolCidr).
        pub fn build(self) -> crate::model::IpamPoolCidr {
            crate::model::IpamPoolCidr {
                cidr: self.cidr,
                state: self.state,
                failure_reason: self.failure_reason,
            }
        }
    }
}
impl IpamPoolCidr {
    /// Creates a new builder-style object to manufacture [`IpamPoolCidr`](crate::model::IpamPoolCidr).
    pub fn builder() -> crate::model::ipam_pool_cidr::Builder {
        crate::model::ipam_pool_cidr::Builder::default()
    }
}

/// <p>Details related to why an IPAM pool CIDR failed to be provisioned.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct IpamPoolCidrFailureReason {
    /// <p>An error code related to why an IPAM pool CIDR failed to be provisioned.</p>
    #[doc(hidden)]
    pub code: std::option::Option<crate::model::IpamPoolCidrFailureCode>,
    /// <p>A message related to why an IPAM pool CIDR failed to be provisioned.</p>
    #[doc(hidden)]
    pub message: std::option::Option<std::string::String>,
}
impl IpamPoolCidrFailureReason {
    /// <p>An error code related to why an IPAM pool CIDR failed to be provisioned.</p>
    pub fn code(&self) -> std::option::Option<&crate::model::IpamPoolCidrFailureCode> {
        self.code.as_ref()
    }
    /// <p>A message related to why an IPAM pool CIDR failed to be provisioned.</p>
    pub fn message(&self) -> std::option::Option<&str> {
        self.message.as_deref()
    }
}
/// See [`IpamPoolCidrFailureReason`](crate::model::IpamPoolCidrFailureReason).
pub mod ipam_pool_cidr_failure_reason {

    /// A builder for [`IpamPoolCidrFailureReason`](crate::model::IpamPoolCidrFailureReason).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) code: std::option::Option<crate::model::IpamPoolCidrFailureCode>,
        pub(crate) message: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>An error code related to why an IPAM pool CIDR failed to be provisioned.</p>
        pub fn code(mut self, input: crate::model::IpamPoolCidrFailureCode) -> Self {
            self.code = Some(input);
            self
        }
        /// <p>An error code related to why an IPAM pool CIDR failed to be provisioned.</p>
        pub fn set_code(
            mut self,
            input: std::option::Option<crate::model::IpamPoolCidrFailureCode>,
        ) -> Self {
            self.code = input;
            self
        }
        /// <p>A message related to why an IPAM pool CIDR failed to be provisioned.</p>
        pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
            self.message = Some(input.into());
            self
        }
        /// <p>A message related to why an IPAM pool CIDR failed to be provisioned.</p>
        pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.message = input;
            self
        }
        /// Consumes the builder and constructs a [`IpamPoolCidrFailureReason`](crate::model::IpamPoolCidrFailureReason).
        pub fn build(self) -> crate::model::IpamPoolCidrFailureReason {
            crate::model::IpamPoolCidrFailureReason {
                code: self.code,
                message: self.message,
            }
        }
    }
}
impl IpamPoolCidrFailureReason {
    /// Creates a new builder-style object to manufacture [`IpamPoolCidrFailureReason`](crate::model::IpamPoolCidrFailureReason).
    pub fn builder() -> crate::model::ipam_pool_cidr_failure_reason::Builder {
        crate::model::ipam_pool_cidr_failure_reason::Builder::default()
    }
}

/// When writing a match expression against `IpamPoolCidrFailureCode`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let ipampoolcidrfailurecode = unimplemented!();
/// match ipampoolcidrfailurecode {
///     IpamPoolCidrFailureCode::CidrNotAvailable => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `ipampoolcidrfailurecode` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `IpamPoolCidrFailureCode::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `IpamPoolCidrFailureCode::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `IpamPoolCidrFailureCode::NewFeature` is defined.
/// Specifically, when `ipampoolcidrfailurecode` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `IpamPoolCidrFailureCode::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 IpamPoolCidrFailureCode {
    #[allow(missing_docs)] // documentation missing in model
    CidrNotAvailable,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for IpamPoolCidrFailureCode {
    fn from(s: &str) -> Self {
        match s {
            "cidr-not-available" => IpamPoolCidrFailureCode::CidrNotAvailable,
            other => IpamPoolCidrFailureCode::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for IpamPoolCidrFailureCode {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(IpamPoolCidrFailureCode::from(s))
    }
}
impl IpamPoolCidrFailureCode {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            IpamPoolCidrFailureCode::CidrNotAvailable => "cidr-not-available",
            IpamPoolCidrFailureCode::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["cidr-not-available"]
    }
}
impl AsRef<str> for IpamPoolCidrFailureCode {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `IpamPoolCidrState`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let ipampoolcidrstate = unimplemented!();
/// match ipampoolcidrstate {
///     IpamPoolCidrState::Deprovisioned => { /* ... */ },
///     IpamPoolCidrState::FailedDeprovision => { /* ... */ },
///     IpamPoolCidrState::FailedImport => { /* ... */ },
///     IpamPoolCidrState::FailedProvision => { /* ... */ },
///     IpamPoolCidrState::PendingDeprovision => { /* ... */ },
///     IpamPoolCidrState::PendingImport => { /* ... */ },
///     IpamPoolCidrState::PendingProvision => { /* ... */ },
///     IpamPoolCidrState::Provisioned => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `ipampoolcidrstate` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `IpamPoolCidrState::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `IpamPoolCidrState::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `IpamPoolCidrState::NewFeature` is defined.
/// Specifically, when `ipampoolcidrstate` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `IpamPoolCidrState::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 IpamPoolCidrState {
    #[allow(missing_docs)] // documentation missing in model
    Deprovisioned,
    #[allow(missing_docs)] // documentation missing in model
    FailedDeprovision,
    #[allow(missing_docs)] // documentation missing in model
    FailedImport,
    #[allow(missing_docs)] // documentation missing in model
    FailedProvision,
    #[allow(missing_docs)] // documentation missing in model
    PendingDeprovision,
    #[allow(missing_docs)] // documentation missing in model
    PendingImport,
    #[allow(missing_docs)] // documentation missing in model
    PendingProvision,
    #[allow(missing_docs)] // documentation missing in model
    Provisioned,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for IpamPoolCidrState {
    fn from(s: &str) -> Self {
        match s {
            "deprovisioned" => IpamPoolCidrState::Deprovisioned,
            "failed-deprovision" => IpamPoolCidrState::FailedDeprovision,
            "failed-import" => IpamPoolCidrState::FailedImport,
            "failed-provision" => IpamPoolCidrState::FailedProvision,
            "pending-deprovision" => IpamPoolCidrState::PendingDeprovision,
            "pending-import" => IpamPoolCidrState::PendingImport,
            "pending-provision" => IpamPoolCidrState::PendingProvision,
            "provisioned" => IpamPoolCidrState::Provisioned,
            other => {
                IpamPoolCidrState::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for IpamPoolCidrState {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(IpamPoolCidrState::from(s))
    }
}
impl IpamPoolCidrState {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            IpamPoolCidrState::Deprovisioned => "deprovisioned",
            IpamPoolCidrState::FailedDeprovision => "failed-deprovision",
            IpamPoolCidrState::FailedImport => "failed-import",
            IpamPoolCidrState::FailedProvision => "failed-provision",
            IpamPoolCidrState::PendingDeprovision => "pending-deprovision",
            IpamPoolCidrState::PendingImport => "pending-import",
            IpamPoolCidrState::PendingProvision => "pending-provision",
            IpamPoolCidrState::Provisioned => "provisioned",
            IpamPoolCidrState::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &[
            "deprovisioned",
            "failed-deprovision",
            "failed-import",
            "failed-provision",
            "pending-deprovision",
            "pending-import",
            "pending-provision",
            "provisioned",
        ]
    }
}
impl AsRef<str> for IpamPoolCidrState {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>A signed document that proves that you are authorized to bring the specified IP address range to Amazon using BYOIP.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct IpamCidrAuthorizationContext {
    /// <p>The plain-text authorization message for the prefix and account.</p>
    #[doc(hidden)]
    pub message: std::option::Option<std::string::String>,
    /// <p>The signed authorization message for the prefix and account.</p>
    #[doc(hidden)]
    pub signature: std::option::Option<std::string::String>,
}
impl IpamCidrAuthorizationContext {
    /// <p>The plain-text authorization message for the prefix and account.</p>
    pub fn message(&self) -> std::option::Option<&str> {
        self.message.as_deref()
    }
    /// <p>The signed authorization message for the prefix and account.</p>
    pub fn signature(&self) -> std::option::Option<&str> {
        self.signature.as_deref()
    }
}
/// See [`IpamCidrAuthorizationContext`](crate::model::IpamCidrAuthorizationContext).
pub mod ipam_cidr_authorization_context {

    /// A builder for [`IpamCidrAuthorizationContext`](crate::model::IpamCidrAuthorizationContext).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) message: std::option::Option<std::string::String>,
        pub(crate) signature: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The plain-text authorization message for the prefix and account.</p>
        pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
            self.message = Some(input.into());
            self
        }
        /// <p>The plain-text authorization message for the prefix and account.</p>
        pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.message = input;
            self
        }
        /// <p>The signed authorization message for the prefix and account.</p>
        pub fn signature(mut self, input: impl Into<std::string::String>) -> Self {
            self.signature = Some(input.into());
            self
        }
        /// <p>The signed authorization message for the prefix and account.</p>
        pub fn set_signature(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.signature = input;
            self
        }
        /// Consumes the builder and constructs a [`IpamCidrAuthorizationContext`](crate::model::IpamCidrAuthorizationContext).
        pub fn build(self) -> crate::model::IpamCidrAuthorizationContext {
            crate::model::IpamCidrAuthorizationContext {
                message: self.message,
                signature: self.signature,
            }
        }
    }
}
impl IpamCidrAuthorizationContext {
    /// Creates a new builder-style object to manufacture [`IpamCidrAuthorizationContext`](crate::model::IpamCidrAuthorizationContext).
    pub fn builder() -> crate::model::ipam_cidr_authorization_context::Builder {
        crate::model::ipam_cidr_authorization_context::Builder::default()
    }
}

/// <p>Provides authorization for Amazon to bring a specific IP address range to a specific Amazon Web Services account using bring your own IP addresses (BYOIP). For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-byoip.html#prepare-for-byoip">Configuring your BYOIP address range</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CidrAuthorizationContext {
    /// <p>The plain-text authorization message for the prefix and account.</p>
    #[doc(hidden)]
    pub message: std::option::Option<std::string::String>,
    /// <p>The signed authorization message for the prefix and account.</p>
    #[doc(hidden)]
    pub signature: std::option::Option<std::string::String>,
}
impl CidrAuthorizationContext {
    /// <p>The plain-text authorization message for the prefix and account.</p>
    pub fn message(&self) -> std::option::Option<&str> {
        self.message.as_deref()
    }
    /// <p>The signed authorization message for the prefix and account.</p>
    pub fn signature(&self) -> std::option::Option<&str> {
        self.signature.as_deref()
    }
}
/// See [`CidrAuthorizationContext`](crate::model::CidrAuthorizationContext).
pub mod cidr_authorization_context {

    /// A builder for [`CidrAuthorizationContext`](crate::model::CidrAuthorizationContext).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) message: std::option::Option<std::string::String>,
        pub(crate) signature: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The plain-text authorization message for the prefix and account.</p>
        pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
            self.message = Some(input.into());
            self
        }
        /// <p>The plain-text authorization message for the prefix and account.</p>
        pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.message = input;
            self
        }
        /// <p>The signed authorization message for the prefix and account.</p>
        pub fn signature(mut self, input: impl Into<std::string::String>) -> Self {
            self.signature = Some(input.into());
            self
        }
        /// <p>The signed authorization message for the prefix and account.</p>
        pub fn set_signature(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.signature = input;
            self
        }
        /// Consumes the builder and constructs a [`CidrAuthorizationContext`](crate::model::CidrAuthorizationContext).
        pub fn build(self) -> crate::model::CidrAuthorizationContext {
            crate::model::CidrAuthorizationContext {
                message: self.message,
                signature: self.signature,
            }
        }
    }
}
impl CidrAuthorizationContext {
    /// Creates a new builder-style object to manufacture [`CidrAuthorizationContext`](crate::model::CidrAuthorizationContext).
    pub fn builder() -> crate::model::cidr_authorization_context::Builder {
        crate::model::cidr_authorization_context::Builder::default()
    }
}

/// <p>Describes a VPN connection.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct VpnConnection {
    /// <p>The configuration information for the VPN connection's customer gateway (in the native XML format). This element is always present in the <code>CreateVpnConnection</code> response; however, it's present in the <code>DescribeVpnConnections</code> response only if the VPN connection is in the <code>pending</code> or <code>available</code> state.</p>
    #[doc(hidden)]
    pub customer_gateway_configuration: std::option::Option<std::string::String>,
    /// <p>The ID of the customer gateway at your end of the VPN connection.</p>
    #[doc(hidden)]
    pub customer_gateway_id: std::option::Option<std::string::String>,
    /// <p>The category of the VPN connection. A value of <code>VPN</code> indicates an Amazon Web Services VPN connection. A value of <code>VPN-Classic</code> indicates an Amazon Web Services Classic VPN connection.</p>
    #[doc(hidden)]
    pub category: std::option::Option<std::string::String>,
    /// <p>The current state of the VPN connection.</p>
    #[doc(hidden)]
    pub state: std::option::Option<crate::model::VpnState>,
    /// <p>The type of VPN connection.</p>
    #[doc(hidden)]
    pub r#type: std::option::Option<crate::model::GatewayType>,
    /// <p>The ID of the VPN connection.</p>
    #[doc(hidden)]
    pub vpn_connection_id: std::option::Option<std::string::String>,
    /// <p>The ID of the virtual private gateway at the Amazon Web Services side of the VPN connection.</p>
    #[doc(hidden)]
    pub vpn_gateway_id: std::option::Option<std::string::String>,
    /// <p>The ID of the transit gateway associated with the VPN connection.</p>
    #[doc(hidden)]
    pub transit_gateway_id: std::option::Option<std::string::String>,
    /// <p>The ARN of the core network.</p>
    #[doc(hidden)]
    pub core_network_arn: std::option::Option<std::string::String>,
    /// <p>The ARN of the core network attachment.</p>
    #[doc(hidden)]
    pub core_network_attachment_arn: std::option::Option<std::string::String>,
    /// <p>The current state of the gateway association.</p>
    #[doc(hidden)]
    pub gateway_association_state: std::option::Option<crate::model::GatewayAssociationState>,
    /// <p>The VPN connection options.</p>
    #[doc(hidden)]
    pub options: std::option::Option<crate::model::VpnConnectionOptions>,
    /// <p>The static routes associated with the VPN connection.</p>
    #[doc(hidden)]
    pub routes: std::option::Option<std::vec::Vec<crate::model::VpnStaticRoute>>,
    /// <p>Any tags assigned to the VPN connection.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    /// <p>Information about the VPN tunnel.</p>
    #[doc(hidden)]
    pub vgw_telemetry: std::option::Option<std::vec::Vec<crate::model::VgwTelemetry>>,
}
impl VpnConnection {
    /// <p>The configuration information for the VPN connection's customer gateway (in the native XML format). This element is always present in the <code>CreateVpnConnection</code> response; however, it's present in the <code>DescribeVpnConnections</code> response only if the VPN connection is in the <code>pending</code> or <code>available</code> state.</p>
    pub fn customer_gateway_configuration(&self) -> std::option::Option<&str> {
        self.customer_gateway_configuration.as_deref()
    }
    /// <p>The ID of the customer gateway at your end of the VPN connection.</p>
    pub fn customer_gateway_id(&self) -> std::option::Option<&str> {
        self.customer_gateway_id.as_deref()
    }
    /// <p>The category of the VPN connection. A value of <code>VPN</code> indicates an Amazon Web Services VPN connection. A value of <code>VPN-Classic</code> indicates an Amazon Web Services Classic VPN connection.</p>
    pub fn category(&self) -> std::option::Option<&str> {
        self.category.as_deref()
    }
    /// <p>The current state of the VPN connection.</p>
    pub fn state(&self) -> std::option::Option<&crate::model::VpnState> {
        self.state.as_ref()
    }
    /// <p>The type of VPN connection.</p>
    pub fn r#type(&self) -> std::option::Option<&crate::model::GatewayType> {
        self.r#type.as_ref()
    }
    /// <p>The ID of the VPN connection.</p>
    pub fn vpn_connection_id(&self) -> std::option::Option<&str> {
        self.vpn_connection_id.as_deref()
    }
    /// <p>The ID of the virtual private gateway at the Amazon Web Services side of the VPN connection.</p>
    pub fn vpn_gateway_id(&self) -> std::option::Option<&str> {
        self.vpn_gateway_id.as_deref()
    }
    /// <p>The ID of the transit gateway associated with the VPN connection.</p>
    pub fn transit_gateway_id(&self) -> std::option::Option<&str> {
        self.transit_gateway_id.as_deref()
    }
    /// <p>The ARN of the core network.</p>
    pub fn core_network_arn(&self) -> std::option::Option<&str> {
        self.core_network_arn.as_deref()
    }
    /// <p>The ARN of the core network attachment.</p>
    pub fn core_network_attachment_arn(&self) -> std::option::Option<&str> {
        self.core_network_attachment_arn.as_deref()
    }
    /// <p>The current state of the gateway association.</p>
    pub fn gateway_association_state(
        &self,
    ) -> std::option::Option<&crate::model::GatewayAssociationState> {
        self.gateway_association_state.as_ref()
    }
    /// <p>The VPN connection options.</p>
    pub fn options(&self) -> std::option::Option<&crate::model::VpnConnectionOptions> {
        self.options.as_ref()
    }
    /// <p>The static routes associated with the VPN connection.</p>
    pub fn routes(&self) -> std::option::Option<&[crate::model::VpnStaticRoute]> {
        self.routes.as_deref()
    }
    /// <p>Any tags assigned to the VPN connection.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
    /// <p>Information about the VPN tunnel.</p>
    pub fn vgw_telemetry(&self) -> std::option::Option<&[crate::model::VgwTelemetry]> {
        self.vgw_telemetry.as_deref()
    }
}
/// See [`VpnConnection`](crate::model::VpnConnection).
pub mod vpn_connection {

    /// A builder for [`VpnConnection`](crate::model::VpnConnection).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) customer_gateway_configuration: std::option::Option<std::string::String>,
        pub(crate) customer_gateway_id: std::option::Option<std::string::String>,
        pub(crate) category: std::option::Option<std::string::String>,
        pub(crate) state: std::option::Option<crate::model::VpnState>,
        pub(crate) r#type: std::option::Option<crate::model::GatewayType>,
        pub(crate) vpn_connection_id: std::option::Option<std::string::String>,
        pub(crate) vpn_gateway_id: std::option::Option<std::string::String>,
        pub(crate) transit_gateway_id: std::option::Option<std::string::String>,
        pub(crate) core_network_arn: std::option::Option<std::string::String>,
        pub(crate) core_network_attachment_arn: std::option::Option<std::string::String>,
        pub(crate) gateway_association_state:
            std::option::Option<crate::model::GatewayAssociationState>,
        pub(crate) options: std::option::Option<crate::model::VpnConnectionOptions>,
        pub(crate) routes: std::option::Option<std::vec::Vec<crate::model::VpnStaticRoute>>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        pub(crate) vgw_telemetry: std::option::Option<std::vec::Vec<crate::model::VgwTelemetry>>,
    }
    impl Builder {
        /// <p>The configuration information for the VPN connection's customer gateway (in the native XML format). This element is always present in the <code>CreateVpnConnection</code> response; however, it's present in the <code>DescribeVpnConnections</code> response only if the VPN connection is in the <code>pending</code> or <code>available</code> state.</p>
        pub fn customer_gateway_configuration(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.customer_gateway_configuration = Some(input.into());
            self
        }
        /// <p>The configuration information for the VPN connection's customer gateway (in the native XML format). This element is always present in the <code>CreateVpnConnection</code> response; however, it's present in the <code>DescribeVpnConnections</code> response only if the VPN connection is in the <code>pending</code> or <code>available</code> state.</p>
        pub fn set_customer_gateway_configuration(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.customer_gateway_configuration = input;
            self
        }
        /// <p>The ID of the customer gateway at your end of the VPN connection.</p>
        pub fn customer_gateway_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.customer_gateway_id = Some(input.into());
            self
        }
        /// <p>The ID of the customer gateway at your end of the VPN connection.</p>
        pub fn set_customer_gateway_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.customer_gateway_id = input;
            self
        }
        /// <p>The category of the VPN connection. A value of <code>VPN</code> indicates an Amazon Web Services VPN connection. A value of <code>VPN-Classic</code> indicates an Amazon Web Services Classic VPN connection.</p>
        pub fn category(mut self, input: impl Into<std::string::String>) -> Self {
            self.category = Some(input.into());
            self
        }
        /// <p>The category of the VPN connection. A value of <code>VPN</code> indicates an Amazon Web Services VPN connection. A value of <code>VPN-Classic</code> indicates an Amazon Web Services Classic VPN connection.</p>
        pub fn set_category(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.category = input;
            self
        }
        /// <p>The current state of the VPN connection.</p>
        pub fn state(mut self, input: crate::model::VpnState) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>The current state of the VPN connection.</p>
        pub fn set_state(mut self, input: std::option::Option<crate::model::VpnState>) -> Self {
            self.state = input;
            self
        }
        /// <p>The type of VPN connection.</p>
        pub fn r#type(mut self, input: crate::model::GatewayType) -> Self {
            self.r#type = Some(input);
            self
        }
        /// <p>The type of VPN connection.</p>
        pub fn set_type(mut self, input: std::option::Option<crate::model::GatewayType>) -> Self {
            self.r#type = input;
            self
        }
        /// <p>The ID of the VPN connection.</p>
        pub fn vpn_connection_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.vpn_connection_id = Some(input.into());
            self
        }
        /// <p>The ID of the VPN connection.</p>
        pub fn set_vpn_connection_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.vpn_connection_id = input;
            self
        }
        /// <p>The ID of the virtual private gateway at the Amazon Web Services side of the VPN connection.</p>
        pub fn vpn_gateway_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.vpn_gateway_id = Some(input.into());
            self
        }
        /// <p>The ID of the virtual private gateway at the Amazon Web Services side of the VPN connection.</p>
        pub fn set_vpn_gateway_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.vpn_gateway_id = input;
            self
        }
        /// <p>The ID of the transit gateway associated with the VPN connection.</p>
        pub fn transit_gateway_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.transit_gateway_id = Some(input.into());
            self
        }
        /// <p>The ID of the transit gateway associated with the VPN connection.</p>
        pub fn set_transit_gateway_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.transit_gateway_id = input;
            self
        }
        /// <p>The ARN of the core network.</p>
        pub fn core_network_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.core_network_arn = Some(input.into());
            self
        }
        /// <p>The ARN of the core network.</p>
        pub fn set_core_network_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.core_network_arn = input;
            self
        }
        /// <p>The ARN of the core network attachment.</p>
        pub fn core_network_attachment_arn(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.core_network_attachment_arn = Some(input.into());
            self
        }
        /// <p>The ARN of the core network attachment.</p>
        pub fn set_core_network_attachment_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.core_network_attachment_arn = input;
            self
        }
        /// <p>The current state of the gateway association.</p>
        pub fn gateway_association_state(
            mut self,
            input: crate::model::GatewayAssociationState,
        ) -> Self {
            self.gateway_association_state = Some(input);
            self
        }
        /// <p>The current state of the gateway association.</p>
        pub fn set_gateway_association_state(
            mut self,
            input: std::option::Option<crate::model::GatewayAssociationState>,
        ) -> Self {
            self.gateway_association_state = input;
            self
        }
        /// <p>The VPN connection options.</p>
        pub fn options(mut self, input: crate::model::VpnConnectionOptions) -> Self {
            self.options = Some(input);
            self
        }
        /// <p>The VPN connection options.</p>
        pub fn set_options(
            mut self,
            input: std::option::Option<crate::model::VpnConnectionOptions>,
        ) -> Self {
            self.options = input;
            self
        }
        /// Appends an item to `routes`.
        ///
        /// To override the contents of this collection use [`set_routes`](Self::set_routes).
        ///
        /// <p>The static routes associated with the VPN connection.</p>
        pub fn routes(mut self, input: crate::model::VpnStaticRoute) -> Self {
            let mut v = self.routes.unwrap_or_default();
            v.push(input);
            self.routes = Some(v);
            self
        }
        /// <p>The static routes associated with the VPN connection.</p>
        pub fn set_routes(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::VpnStaticRoute>>,
        ) -> Self {
            self.routes = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>Any tags assigned to the VPN connection.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>Any tags assigned to the VPN connection.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// Appends an item to `vgw_telemetry`.
        ///
        /// To override the contents of this collection use [`set_vgw_telemetry`](Self::set_vgw_telemetry).
        ///
        /// <p>Information about the VPN tunnel.</p>
        pub fn vgw_telemetry(mut self, input: crate::model::VgwTelemetry) -> Self {
            let mut v = self.vgw_telemetry.unwrap_or_default();
            v.push(input);
            self.vgw_telemetry = Some(v);
            self
        }
        /// <p>Information about the VPN tunnel.</p>
        pub fn set_vgw_telemetry(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::VgwTelemetry>>,
        ) -> Self {
            self.vgw_telemetry = input;
            self
        }
        /// Consumes the builder and constructs a [`VpnConnection`](crate::model::VpnConnection).
        pub fn build(self) -> crate::model::VpnConnection {
            crate::model::VpnConnection {
                customer_gateway_configuration: self.customer_gateway_configuration,
                customer_gateway_id: self.customer_gateway_id,
                category: self.category,
                state: self.state,
                r#type: self.r#type,
                vpn_connection_id: self.vpn_connection_id,
                vpn_gateway_id: self.vpn_gateway_id,
                transit_gateway_id: self.transit_gateway_id,
                core_network_arn: self.core_network_arn,
                core_network_attachment_arn: self.core_network_attachment_arn,
                gateway_association_state: self.gateway_association_state,
                options: self.options,
                routes: self.routes,
                tags: self.tags,
                vgw_telemetry: self.vgw_telemetry,
            }
        }
    }
}
impl VpnConnection {
    /// Creates a new builder-style object to manufacture [`VpnConnection`](crate::model::VpnConnection).
    pub fn builder() -> crate::model::vpn_connection::Builder {
        crate::model::vpn_connection::Builder::default()
    }
}

/// <p>Describes telemetry for a VPN tunnel.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct VgwTelemetry {
    /// <p>The number of accepted routes.</p>
    #[doc(hidden)]
    pub accepted_route_count: std::option::Option<i32>,
    /// <p>The date and time of the last change in status.</p>
    #[doc(hidden)]
    pub last_status_change: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The Internet-routable IP address of the virtual private gateway's outside interface.</p>
    #[doc(hidden)]
    pub outside_ip_address: std::option::Option<std::string::String>,
    /// <p>The status of the VPN tunnel.</p>
    #[doc(hidden)]
    pub status: std::option::Option<crate::model::TelemetryStatus>,
    /// <p>If an error occurs, a description of the error.</p>
    #[doc(hidden)]
    pub status_message: std::option::Option<std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the VPN tunnel endpoint certificate.</p>
    #[doc(hidden)]
    pub certificate_arn: std::option::Option<std::string::String>,
}
impl VgwTelemetry {
    /// <p>The number of accepted routes.</p>
    pub fn accepted_route_count(&self) -> std::option::Option<i32> {
        self.accepted_route_count
    }
    /// <p>The date and time of the last change in status.</p>
    pub fn last_status_change(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.last_status_change.as_ref()
    }
    /// <p>The Internet-routable IP address of the virtual private gateway's outside interface.</p>
    pub fn outside_ip_address(&self) -> std::option::Option<&str> {
        self.outside_ip_address.as_deref()
    }
    /// <p>The status of the VPN tunnel.</p>
    pub fn status(&self) -> std::option::Option<&crate::model::TelemetryStatus> {
        self.status.as_ref()
    }
    /// <p>If an error occurs, a description of the error.</p>
    pub fn status_message(&self) -> std::option::Option<&str> {
        self.status_message.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the VPN tunnel endpoint certificate.</p>
    pub fn certificate_arn(&self) -> std::option::Option<&str> {
        self.certificate_arn.as_deref()
    }
}
/// See [`VgwTelemetry`](crate::model::VgwTelemetry).
pub mod vgw_telemetry {

    /// A builder for [`VgwTelemetry`](crate::model::VgwTelemetry).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) accepted_route_count: std::option::Option<i32>,
        pub(crate) last_status_change: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) outside_ip_address: std::option::Option<std::string::String>,
        pub(crate) status: std::option::Option<crate::model::TelemetryStatus>,
        pub(crate) status_message: std::option::Option<std::string::String>,
        pub(crate) certificate_arn: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The number of accepted routes.</p>
        pub fn accepted_route_count(mut self, input: i32) -> Self {
            self.accepted_route_count = Some(input);
            self
        }
        /// <p>The number of accepted routes.</p>
        pub fn set_accepted_route_count(mut self, input: std::option::Option<i32>) -> Self {
            self.accepted_route_count = input;
            self
        }
        /// <p>The date and time of the last change in status.</p>
        pub fn last_status_change(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.last_status_change = Some(input);
            self
        }
        /// <p>The date and time of the last change in status.</p>
        pub fn set_last_status_change(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.last_status_change = input;
            self
        }
        /// <p>The Internet-routable IP address of the virtual private gateway's outside interface.</p>
        pub fn outside_ip_address(mut self, input: impl Into<std::string::String>) -> Self {
            self.outside_ip_address = Some(input.into());
            self
        }
        /// <p>The Internet-routable IP address of the virtual private gateway's outside interface.</p>
        pub fn set_outside_ip_address(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.outside_ip_address = input;
            self
        }
        /// <p>The status of the VPN tunnel.</p>
        pub fn status(mut self, input: crate::model::TelemetryStatus) -> Self {
            self.status = Some(input);
            self
        }
        /// <p>The status of the VPN tunnel.</p>
        pub fn set_status(
            mut self,
            input: std::option::Option<crate::model::TelemetryStatus>,
        ) -> Self {
            self.status = input;
            self
        }
        /// <p>If an error occurs, a description of the error.</p>
        pub fn status_message(mut self, input: impl Into<std::string::String>) -> Self {
            self.status_message = Some(input.into());
            self
        }
        /// <p>If an error occurs, a description of the error.</p>
        pub fn set_status_message(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.status_message = input;
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the VPN tunnel endpoint certificate.</p>
        pub fn certificate_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.certificate_arn = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the VPN tunnel endpoint certificate.</p>
        pub fn set_certificate_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.certificate_arn = input;
            self
        }
        /// Consumes the builder and constructs a [`VgwTelemetry`](crate::model::VgwTelemetry).
        pub fn build(self) -> crate::model::VgwTelemetry {
            crate::model::VgwTelemetry {
                accepted_route_count: self.accepted_route_count,
                last_status_change: self.last_status_change,
                outside_ip_address: self.outside_ip_address,
                status: self.status,
                status_message: self.status_message,
                certificate_arn: self.certificate_arn,
            }
        }
    }
}
impl VgwTelemetry {
    /// Creates a new builder-style object to manufacture [`VgwTelemetry`](crate::model::VgwTelemetry).
    pub fn builder() -> crate::model::vgw_telemetry::Builder {
        crate::model::vgw_telemetry::Builder::default()
    }
}

/// When writing a match expression against `TelemetryStatus`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let telemetrystatus = unimplemented!();
/// match telemetrystatus {
///     TelemetryStatus::Down => { /* ... */ },
///     TelemetryStatus::Up => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `telemetrystatus` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `TelemetryStatus::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `TelemetryStatus::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `TelemetryStatus::NewFeature` is defined.
/// Specifically, when `telemetrystatus` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `TelemetryStatus::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 TelemetryStatus {
    #[allow(missing_docs)] // documentation missing in model
    Down,
    #[allow(missing_docs)] // documentation missing in model
    Up,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for TelemetryStatus {
    fn from(s: &str) -> Self {
        match s {
            "DOWN" => TelemetryStatus::Down,
            "UP" => TelemetryStatus::Up,
            other => TelemetryStatus::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for TelemetryStatus {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(TelemetryStatus::from(s))
    }
}
impl TelemetryStatus {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            TelemetryStatus::Down => "DOWN",
            TelemetryStatus::Up => "UP",
            TelemetryStatus::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["DOWN", "UP"]
    }
}
impl AsRef<str> for TelemetryStatus {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes a static route for a VPN connection.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct VpnStaticRoute {
    /// <p>The CIDR block associated with the local subnet of the customer data center.</p>
    #[doc(hidden)]
    pub destination_cidr_block: std::option::Option<std::string::String>,
    /// <p>Indicates how the routes were provided.</p>
    #[doc(hidden)]
    pub source: std::option::Option<crate::model::VpnStaticRouteSource>,
    /// <p>The current state of the static route.</p>
    #[doc(hidden)]
    pub state: std::option::Option<crate::model::VpnState>,
}
impl VpnStaticRoute {
    /// <p>The CIDR block associated with the local subnet of the customer data center.</p>
    pub fn destination_cidr_block(&self) -> std::option::Option<&str> {
        self.destination_cidr_block.as_deref()
    }
    /// <p>Indicates how the routes were provided.</p>
    pub fn source(&self) -> std::option::Option<&crate::model::VpnStaticRouteSource> {
        self.source.as_ref()
    }
    /// <p>The current state of the static route.</p>
    pub fn state(&self) -> std::option::Option<&crate::model::VpnState> {
        self.state.as_ref()
    }
}
/// See [`VpnStaticRoute`](crate::model::VpnStaticRoute).
pub mod vpn_static_route {

    /// A builder for [`VpnStaticRoute`](crate::model::VpnStaticRoute).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) destination_cidr_block: std::option::Option<std::string::String>,
        pub(crate) source: std::option::Option<crate::model::VpnStaticRouteSource>,
        pub(crate) state: std::option::Option<crate::model::VpnState>,
    }
    impl Builder {
        /// <p>The CIDR block associated with the local subnet of the customer data center.</p>
        pub fn destination_cidr_block(mut self, input: impl Into<std::string::String>) -> Self {
            self.destination_cidr_block = Some(input.into());
            self
        }
        /// <p>The CIDR block associated with the local subnet of the customer data center.</p>
        pub fn set_destination_cidr_block(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.destination_cidr_block = input;
            self
        }
        /// <p>Indicates how the routes were provided.</p>
        pub fn source(mut self, input: crate::model::VpnStaticRouteSource) -> Self {
            self.source = Some(input);
            self
        }
        /// <p>Indicates how the routes were provided.</p>
        pub fn set_source(
            mut self,
            input: std::option::Option<crate::model::VpnStaticRouteSource>,
        ) -> Self {
            self.source = input;
            self
        }
        /// <p>The current state of the static route.</p>
        pub fn state(mut self, input: crate::model::VpnState) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>The current state of the static route.</p>
        pub fn set_state(mut self, input: std::option::Option<crate::model::VpnState>) -> Self {
            self.state = input;
            self
        }
        /// Consumes the builder and constructs a [`VpnStaticRoute`](crate::model::VpnStaticRoute).
        pub fn build(self) -> crate::model::VpnStaticRoute {
            crate::model::VpnStaticRoute {
                destination_cidr_block: self.destination_cidr_block,
                source: self.source,
                state: self.state,
            }
        }
    }
}
impl VpnStaticRoute {
    /// Creates a new builder-style object to manufacture [`VpnStaticRoute`](crate::model::VpnStaticRoute).
    pub fn builder() -> crate::model::vpn_static_route::Builder {
        crate::model::vpn_static_route::Builder::default()
    }
}

/// When writing a match expression against `VpnState`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let vpnstate = unimplemented!();
/// match vpnstate {
///     VpnState::Available => { /* ... */ },
///     VpnState::Deleted => { /* ... */ },
///     VpnState::Deleting => { /* ... */ },
///     VpnState::Pending => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `vpnstate` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `VpnState::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `VpnState::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `VpnState::NewFeature` is defined.
/// Specifically, when `vpnstate` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `VpnState::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 VpnState {
    #[allow(missing_docs)] // documentation missing in model
    Available,
    #[allow(missing_docs)] // documentation missing in model
    Deleted,
    #[allow(missing_docs)] // documentation missing in model
    Deleting,
    #[allow(missing_docs)] // documentation missing in model
    Pending,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for VpnState {
    fn from(s: &str) -> Self {
        match s {
            "available" => VpnState::Available,
            "deleted" => VpnState::Deleted,
            "deleting" => VpnState::Deleting,
            "pending" => VpnState::Pending,
            other => VpnState::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for VpnState {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(VpnState::from(s))
    }
}
impl VpnState {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            VpnState::Available => "available",
            VpnState::Deleted => "deleted",
            VpnState::Deleting => "deleting",
            VpnState::Pending => "pending",
            VpnState::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["available", "deleted", "deleting", "pending"]
    }
}
impl AsRef<str> for VpnState {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `VpnStaticRouteSource`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let vpnstaticroutesource = unimplemented!();
/// match vpnstaticroutesource {
///     VpnStaticRouteSource::Static => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `vpnstaticroutesource` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `VpnStaticRouteSource::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `VpnStaticRouteSource::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `VpnStaticRouteSource::NewFeature` is defined.
/// Specifically, when `vpnstaticroutesource` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `VpnStaticRouteSource::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 VpnStaticRouteSource {
    #[allow(missing_docs)] // documentation missing in model
    Static,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for VpnStaticRouteSource {
    fn from(s: &str) -> Self {
        match s {
            "Static" => VpnStaticRouteSource::Static,
            other => {
                VpnStaticRouteSource::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for VpnStaticRouteSource {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(VpnStaticRouteSource::from(s))
    }
}
impl VpnStaticRouteSource {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            VpnStaticRouteSource::Static => "Static",
            VpnStaticRouteSource::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["Static"]
    }
}
impl AsRef<str> for VpnStaticRouteSource {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes VPN connection options.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct VpnConnectionOptions {
    /// <p>Indicates whether acceleration is enabled for the VPN connection.</p>
    #[doc(hidden)]
    pub enable_acceleration: std::option::Option<bool>,
    /// <p>Indicates whether the VPN connection uses static routes only. Static routes must be used for devices that don't support BGP.</p>
    #[doc(hidden)]
    pub static_routes_only: std::option::Option<bool>,
    /// <p>The IPv4 CIDR on the customer gateway (on-premises) side of the VPN connection.</p>
    #[doc(hidden)]
    pub local_ipv4_network_cidr: std::option::Option<std::string::String>,
    /// <p>The IPv4 CIDR on the Amazon Web Services side of the VPN connection.</p>
    #[doc(hidden)]
    pub remote_ipv4_network_cidr: std::option::Option<std::string::String>,
    /// <p>The IPv6 CIDR on the customer gateway (on-premises) side of the VPN connection.</p>
    #[doc(hidden)]
    pub local_ipv6_network_cidr: std::option::Option<std::string::String>,
    /// <p>The IPv6 CIDR on the Amazon Web Services side of the VPN connection.</p>
    #[doc(hidden)]
    pub remote_ipv6_network_cidr: std::option::Option<std::string::String>,
    /// <p>The type of IPv4 address assigned to the outside interface of the customer gateway.</p>
    /// <p>Valid values: <code>PrivateIpv4</code> | <code>PublicIpv4</code> </p>
    /// <p>Default: <code>PublicIpv4</code> </p>
    #[doc(hidden)]
    pub outside_ip_address_type: std::option::Option<std::string::String>,
    /// <p>The transit gateway attachment ID in use for the VPN tunnel.</p>
    #[doc(hidden)]
    pub transport_transit_gateway_attachment_id: std::option::Option<std::string::String>,
    /// <p>Indicates whether the VPN tunnels process IPv4 or IPv6 traffic.</p>
    #[doc(hidden)]
    pub tunnel_inside_ip_version: std::option::Option<crate::model::TunnelInsideIpVersion>,
    /// <p>Indicates the VPN tunnel options.</p>
    #[doc(hidden)]
    pub tunnel_options: std::option::Option<std::vec::Vec<crate::model::TunnelOption>>,
}
impl VpnConnectionOptions {
    /// <p>Indicates whether acceleration is enabled for the VPN connection.</p>
    pub fn enable_acceleration(&self) -> std::option::Option<bool> {
        self.enable_acceleration
    }
    /// <p>Indicates whether the VPN connection uses static routes only. Static routes must be used for devices that don't support BGP.</p>
    pub fn static_routes_only(&self) -> std::option::Option<bool> {
        self.static_routes_only
    }
    /// <p>The IPv4 CIDR on the customer gateway (on-premises) side of the VPN connection.</p>
    pub fn local_ipv4_network_cidr(&self) -> std::option::Option<&str> {
        self.local_ipv4_network_cidr.as_deref()
    }
    /// <p>The IPv4 CIDR on the Amazon Web Services side of the VPN connection.</p>
    pub fn remote_ipv4_network_cidr(&self) -> std::option::Option<&str> {
        self.remote_ipv4_network_cidr.as_deref()
    }
    /// <p>The IPv6 CIDR on the customer gateway (on-premises) side of the VPN connection.</p>
    pub fn local_ipv6_network_cidr(&self) -> std::option::Option<&str> {
        self.local_ipv6_network_cidr.as_deref()
    }
    /// <p>The IPv6 CIDR on the Amazon Web Services side of the VPN connection.</p>
    pub fn remote_ipv6_network_cidr(&self) -> std::option::Option<&str> {
        self.remote_ipv6_network_cidr.as_deref()
    }
    /// <p>The type of IPv4 address assigned to the outside interface of the customer gateway.</p>
    /// <p>Valid values: <code>PrivateIpv4</code> | <code>PublicIpv4</code> </p>
    /// <p>Default: <code>PublicIpv4</code> </p>
    pub fn outside_ip_address_type(&self) -> std::option::Option<&str> {
        self.outside_ip_address_type.as_deref()
    }
    /// <p>The transit gateway attachment ID in use for the VPN tunnel.</p>
    pub fn transport_transit_gateway_attachment_id(&self) -> std::option::Option<&str> {
        self.transport_transit_gateway_attachment_id.as_deref()
    }
    /// <p>Indicates whether the VPN tunnels process IPv4 or IPv6 traffic.</p>
    pub fn tunnel_inside_ip_version(
        &self,
    ) -> std::option::Option<&crate::model::TunnelInsideIpVersion> {
        self.tunnel_inside_ip_version.as_ref()
    }
    /// <p>Indicates the VPN tunnel options.</p>
    pub fn tunnel_options(&self) -> std::option::Option<&[crate::model::TunnelOption]> {
        self.tunnel_options.as_deref()
    }
}
/// See [`VpnConnectionOptions`](crate::model::VpnConnectionOptions).
pub mod vpn_connection_options {

    /// A builder for [`VpnConnectionOptions`](crate::model::VpnConnectionOptions).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) enable_acceleration: std::option::Option<bool>,
        pub(crate) static_routes_only: std::option::Option<bool>,
        pub(crate) local_ipv4_network_cidr: std::option::Option<std::string::String>,
        pub(crate) remote_ipv4_network_cidr: std::option::Option<std::string::String>,
        pub(crate) local_ipv6_network_cidr: std::option::Option<std::string::String>,
        pub(crate) remote_ipv6_network_cidr: std::option::Option<std::string::String>,
        pub(crate) outside_ip_address_type: std::option::Option<std::string::String>,
        pub(crate) transport_transit_gateway_attachment_id:
            std::option::Option<std::string::String>,
        pub(crate) tunnel_inside_ip_version:
            std::option::Option<crate::model::TunnelInsideIpVersion>,
        pub(crate) tunnel_options: std::option::Option<std::vec::Vec<crate::model::TunnelOption>>,
    }
    impl Builder {
        /// <p>Indicates whether acceleration is enabled for the VPN connection.</p>
        pub fn enable_acceleration(mut self, input: bool) -> Self {
            self.enable_acceleration = Some(input);
            self
        }
        /// <p>Indicates whether acceleration is enabled for the VPN connection.</p>
        pub fn set_enable_acceleration(mut self, input: std::option::Option<bool>) -> Self {
            self.enable_acceleration = input;
            self
        }
        /// <p>Indicates whether the VPN connection uses static routes only. Static routes must be used for devices that don't support BGP.</p>
        pub fn static_routes_only(mut self, input: bool) -> Self {
            self.static_routes_only = Some(input);
            self
        }
        /// <p>Indicates whether the VPN connection uses static routes only. Static routes must be used for devices that don't support BGP.</p>
        pub fn set_static_routes_only(mut self, input: std::option::Option<bool>) -> Self {
            self.static_routes_only = input;
            self
        }
        /// <p>The IPv4 CIDR on the customer gateway (on-premises) side of the VPN connection.</p>
        pub fn local_ipv4_network_cidr(mut self, input: impl Into<std::string::String>) -> Self {
            self.local_ipv4_network_cidr = Some(input.into());
            self
        }
        /// <p>The IPv4 CIDR on the customer gateway (on-premises) side of the VPN connection.</p>
        pub fn set_local_ipv4_network_cidr(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.local_ipv4_network_cidr = input;
            self
        }
        /// <p>The IPv4 CIDR on the Amazon Web Services side of the VPN connection.</p>
        pub fn remote_ipv4_network_cidr(mut self, input: impl Into<std::string::String>) -> Self {
            self.remote_ipv4_network_cidr = Some(input.into());
            self
        }
        /// <p>The IPv4 CIDR on the Amazon Web Services side of the VPN connection.</p>
        pub fn set_remote_ipv4_network_cidr(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.remote_ipv4_network_cidr = input;
            self
        }
        /// <p>The IPv6 CIDR on the customer gateway (on-premises) side of the VPN connection.</p>
        pub fn local_ipv6_network_cidr(mut self, input: impl Into<std::string::String>) -> Self {
            self.local_ipv6_network_cidr = Some(input.into());
            self
        }
        /// <p>The IPv6 CIDR on the customer gateway (on-premises) side of the VPN connection.</p>
        pub fn set_local_ipv6_network_cidr(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.local_ipv6_network_cidr = input;
            self
        }
        /// <p>The IPv6 CIDR on the Amazon Web Services side of the VPN connection.</p>
        pub fn remote_ipv6_network_cidr(mut self, input: impl Into<std::string::String>) -> Self {
            self.remote_ipv6_network_cidr = Some(input.into());
            self
        }
        /// <p>The IPv6 CIDR on the Amazon Web Services side of the VPN connection.</p>
        pub fn set_remote_ipv6_network_cidr(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.remote_ipv6_network_cidr = input;
            self
        }
        /// <p>The type of IPv4 address assigned to the outside interface of the customer gateway.</p>
        /// <p>Valid values: <code>PrivateIpv4</code> | <code>PublicIpv4</code> </p>
        /// <p>Default: <code>PublicIpv4</code> </p>
        pub fn outside_ip_address_type(mut self, input: impl Into<std::string::String>) -> Self {
            self.outside_ip_address_type = Some(input.into());
            self
        }
        /// <p>The type of IPv4 address assigned to the outside interface of the customer gateway.</p>
        /// <p>Valid values: <code>PrivateIpv4</code> | <code>PublicIpv4</code> </p>
        /// <p>Default: <code>PublicIpv4</code> </p>
        pub fn set_outside_ip_address_type(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.outside_ip_address_type = input;
            self
        }
        /// <p>The transit gateway attachment ID in use for the VPN tunnel.</p>
        pub fn transport_transit_gateway_attachment_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.transport_transit_gateway_attachment_id = Some(input.into());
            self
        }
        /// <p>The transit gateway attachment ID in use for the VPN tunnel.</p>
        pub fn set_transport_transit_gateway_attachment_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.transport_transit_gateway_attachment_id = input;
            self
        }
        /// <p>Indicates whether the VPN tunnels process IPv4 or IPv6 traffic.</p>
        pub fn tunnel_inside_ip_version(
            mut self,
            input: crate::model::TunnelInsideIpVersion,
        ) -> Self {
            self.tunnel_inside_ip_version = Some(input);
            self
        }
        /// <p>Indicates whether the VPN tunnels process IPv4 or IPv6 traffic.</p>
        pub fn set_tunnel_inside_ip_version(
            mut self,
            input: std::option::Option<crate::model::TunnelInsideIpVersion>,
        ) -> Self {
            self.tunnel_inside_ip_version = input;
            self
        }
        /// Appends an item to `tunnel_options`.
        ///
        /// To override the contents of this collection use [`set_tunnel_options`](Self::set_tunnel_options).
        ///
        /// <p>Indicates the VPN tunnel options.</p>
        pub fn tunnel_options(mut self, input: crate::model::TunnelOption) -> Self {
            let mut v = self.tunnel_options.unwrap_or_default();
            v.push(input);
            self.tunnel_options = Some(v);
            self
        }
        /// <p>Indicates the VPN tunnel options.</p>
        pub fn set_tunnel_options(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::TunnelOption>>,
        ) -> Self {
            self.tunnel_options = input;
            self
        }
        /// Consumes the builder and constructs a [`VpnConnectionOptions`](crate::model::VpnConnectionOptions).
        pub fn build(self) -> crate::model::VpnConnectionOptions {
            crate::model::VpnConnectionOptions {
                enable_acceleration: self.enable_acceleration,
                static_routes_only: self.static_routes_only,
                local_ipv4_network_cidr: self.local_ipv4_network_cidr,
                remote_ipv4_network_cidr: self.remote_ipv4_network_cidr,
                local_ipv6_network_cidr: self.local_ipv6_network_cidr,
                remote_ipv6_network_cidr: self.remote_ipv6_network_cidr,
                outside_ip_address_type: self.outside_ip_address_type,
                transport_transit_gateway_attachment_id: self
                    .transport_transit_gateway_attachment_id,
                tunnel_inside_ip_version: self.tunnel_inside_ip_version,
                tunnel_options: self.tunnel_options,
            }
        }
    }
}
impl VpnConnectionOptions {
    /// Creates a new builder-style object to manufacture [`VpnConnectionOptions`](crate::model::VpnConnectionOptions).
    pub fn builder() -> crate::model::vpn_connection_options::Builder {
        crate::model::vpn_connection_options::Builder::default()
    }
}

/// <p>The VPN tunnel options.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TunnelOption {
    /// <p>The external IP address of the VPN tunnel.</p>
    #[doc(hidden)]
    pub outside_ip_address: std::option::Option<std::string::String>,
    /// <p>The range of inside IPv4 addresses for the tunnel.</p>
    #[doc(hidden)]
    pub tunnel_inside_cidr: std::option::Option<std::string::String>,
    /// <p>The range of inside IPv6 addresses for the tunnel.</p>
    #[doc(hidden)]
    pub tunnel_inside_ipv6_cidr: std::option::Option<std::string::String>,
    /// <p>The pre-shared key (PSK) to establish initial authentication between the virtual private gateway and the customer gateway.</p>
    #[doc(hidden)]
    pub pre_shared_key: std::option::Option<std::string::String>,
    /// <p>The lifetime for phase 1 of the IKE negotiation, in seconds.</p>
    #[doc(hidden)]
    pub phase1_lifetime_seconds: std::option::Option<i32>,
    /// <p>The lifetime for phase 2 of the IKE negotiation, in seconds.</p>
    #[doc(hidden)]
    pub phase2_lifetime_seconds: std::option::Option<i32>,
    /// <p>The margin time, in seconds, before the phase 2 lifetime expires, during which the Amazon Web Services side of the VPN connection performs an IKE rekey.</p>
    #[doc(hidden)]
    pub rekey_margin_time_seconds: std::option::Option<i32>,
    /// <p>The percentage of the rekey window determined by <code>RekeyMarginTimeSeconds</code> during which the rekey time is randomly selected.</p>
    #[doc(hidden)]
    pub rekey_fuzz_percentage: std::option::Option<i32>,
    /// <p>The number of packets in an IKE replay window.</p>
    #[doc(hidden)]
    pub replay_window_size: std::option::Option<i32>,
    /// <p>The number of seconds after which a DPD timeout occurs.</p>
    #[doc(hidden)]
    pub dpd_timeout_seconds: std::option::Option<i32>,
    /// <p>The action to take after a DPD timeout occurs.</p>
    #[doc(hidden)]
    pub dpd_timeout_action: std::option::Option<std::string::String>,
    /// <p>The permitted encryption algorithms for the VPN tunnel for phase 1 IKE negotiations.</p>
    #[doc(hidden)]
    pub phase1_encryption_algorithms:
        std::option::Option<std::vec::Vec<crate::model::Phase1EncryptionAlgorithmsListValue>>,
    /// <p>The permitted encryption algorithms for the VPN tunnel for phase 2 IKE negotiations.</p>
    #[doc(hidden)]
    pub phase2_encryption_algorithms:
        std::option::Option<std::vec::Vec<crate::model::Phase2EncryptionAlgorithmsListValue>>,
    /// <p>The permitted integrity algorithms for the VPN tunnel for phase 1 IKE negotiations.</p>
    #[doc(hidden)]
    pub phase1_integrity_algorithms:
        std::option::Option<std::vec::Vec<crate::model::Phase1IntegrityAlgorithmsListValue>>,
    /// <p>The permitted integrity algorithms for the VPN tunnel for phase 2 IKE negotiations.</p>
    #[doc(hidden)]
    pub phase2_integrity_algorithms:
        std::option::Option<std::vec::Vec<crate::model::Phase2IntegrityAlgorithmsListValue>>,
    /// <p>The permitted Diffie-Hellman group numbers for the VPN tunnel for phase 1 IKE negotiations.</p>
    #[doc(hidden)]
    pub phase1_dh_group_numbers:
        std::option::Option<std::vec::Vec<crate::model::Phase1DhGroupNumbersListValue>>,
    /// <p>The permitted Diffie-Hellman group numbers for the VPN tunnel for phase 2 IKE negotiations.</p>
    #[doc(hidden)]
    pub phase2_dh_group_numbers:
        std::option::Option<std::vec::Vec<crate::model::Phase2DhGroupNumbersListValue>>,
    /// <p>The IKE versions that are permitted for the VPN tunnel.</p>
    #[doc(hidden)]
    pub ike_versions: std::option::Option<std::vec::Vec<crate::model::IkeVersionsListValue>>,
    /// <p>The action to take when the establishing the VPN tunnels for a VPN connection.</p>
    #[doc(hidden)]
    pub startup_action: std::option::Option<std::string::String>,
    /// <p>Options for logging VPN tunnel activity.</p>
    #[doc(hidden)]
    pub log_options: std::option::Option<crate::model::VpnTunnelLogOptions>,
}
impl TunnelOption {
    /// <p>The external IP address of the VPN tunnel.</p>
    pub fn outside_ip_address(&self) -> std::option::Option<&str> {
        self.outside_ip_address.as_deref()
    }
    /// <p>The range of inside IPv4 addresses for the tunnel.</p>
    pub fn tunnel_inside_cidr(&self) -> std::option::Option<&str> {
        self.tunnel_inside_cidr.as_deref()
    }
    /// <p>The range of inside IPv6 addresses for the tunnel.</p>
    pub fn tunnel_inside_ipv6_cidr(&self) -> std::option::Option<&str> {
        self.tunnel_inside_ipv6_cidr.as_deref()
    }
    /// <p>The pre-shared key (PSK) to establish initial authentication between the virtual private gateway and the customer gateway.</p>
    pub fn pre_shared_key(&self) -> std::option::Option<&str> {
        self.pre_shared_key.as_deref()
    }
    /// <p>The lifetime for phase 1 of the IKE negotiation, in seconds.</p>
    pub fn phase1_lifetime_seconds(&self) -> std::option::Option<i32> {
        self.phase1_lifetime_seconds
    }
    /// <p>The lifetime for phase 2 of the IKE negotiation, in seconds.</p>
    pub fn phase2_lifetime_seconds(&self) -> std::option::Option<i32> {
        self.phase2_lifetime_seconds
    }
    /// <p>The margin time, in seconds, before the phase 2 lifetime expires, during which the Amazon Web Services side of the VPN connection performs an IKE rekey.</p>
    pub fn rekey_margin_time_seconds(&self) -> std::option::Option<i32> {
        self.rekey_margin_time_seconds
    }
    /// <p>The percentage of the rekey window determined by <code>RekeyMarginTimeSeconds</code> during which the rekey time is randomly selected.</p>
    pub fn rekey_fuzz_percentage(&self) -> std::option::Option<i32> {
        self.rekey_fuzz_percentage
    }
    /// <p>The number of packets in an IKE replay window.</p>
    pub fn replay_window_size(&self) -> std::option::Option<i32> {
        self.replay_window_size
    }
    /// <p>The number of seconds after which a DPD timeout occurs.</p>
    pub fn dpd_timeout_seconds(&self) -> std::option::Option<i32> {
        self.dpd_timeout_seconds
    }
    /// <p>The action to take after a DPD timeout occurs.</p>
    pub fn dpd_timeout_action(&self) -> std::option::Option<&str> {
        self.dpd_timeout_action.as_deref()
    }
    /// <p>The permitted encryption algorithms for the VPN tunnel for phase 1 IKE negotiations.</p>
    pub fn phase1_encryption_algorithms(
        &self,
    ) -> std::option::Option<&[crate::model::Phase1EncryptionAlgorithmsListValue]> {
        self.phase1_encryption_algorithms.as_deref()
    }
    /// <p>The permitted encryption algorithms for the VPN tunnel for phase 2 IKE negotiations.</p>
    pub fn phase2_encryption_algorithms(
        &self,
    ) -> std::option::Option<&[crate::model::Phase2EncryptionAlgorithmsListValue]> {
        self.phase2_encryption_algorithms.as_deref()
    }
    /// <p>The permitted integrity algorithms for the VPN tunnel for phase 1 IKE negotiations.</p>
    pub fn phase1_integrity_algorithms(
        &self,
    ) -> std::option::Option<&[crate::model::Phase1IntegrityAlgorithmsListValue]> {
        self.phase1_integrity_algorithms.as_deref()
    }
    /// <p>The permitted integrity algorithms for the VPN tunnel for phase 2 IKE negotiations.</p>
    pub fn phase2_integrity_algorithms(
        &self,
    ) -> std::option::Option<&[crate::model::Phase2IntegrityAlgorithmsListValue]> {
        self.phase2_integrity_algorithms.as_deref()
    }
    /// <p>The permitted Diffie-Hellman group numbers for the VPN tunnel for phase 1 IKE negotiations.</p>
    pub fn phase1_dh_group_numbers(
        &self,
    ) -> std::option::Option<&[crate::model::Phase1DhGroupNumbersListValue]> {
        self.phase1_dh_group_numbers.as_deref()
    }
    /// <p>The permitted Diffie-Hellman group numbers for the VPN tunnel for phase 2 IKE negotiations.</p>
    pub fn phase2_dh_group_numbers(
        &self,
    ) -> std::option::Option<&[crate::model::Phase2DhGroupNumbersListValue]> {
        self.phase2_dh_group_numbers.as_deref()
    }
    /// <p>The IKE versions that are permitted for the VPN tunnel.</p>
    pub fn ike_versions(&self) -> std::option::Option<&[crate::model::IkeVersionsListValue]> {
        self.ike_versions.as_deref()
    }
    /// <p>The action to take when the establishing the VPN tunnels for a VPN connection.</p>
    pub fn startup_action(&self) -> std::option::Option<&str> {
        self.startup_action.as_deref()
    }
    /// <p>Options for logging VPN tunnel activity.</p>
    pub fn log_options(&self) -> std::option::Option<&crate::model::VpnTunnelLogOptions> {
        self.log_options.as_ref()
    }
}
/// See [`TunnelOption`](crate::model::TunnelOption).
pub mod tunnel_option {

    /// A builder for [`TunnelOption`](crate::model::TunnelOption).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) outside_ip_address: std::option::Option<std::string::String>,
        pub(crate) tunnel_inside_cidr: std::option::Option<std::string::String>,
        pub(crate) tunnel_inside_ipv6_cidr: std::option::Option<std::string::String>,
        pub(crate) pre_shared_key: std::option::Option<std::string::String>,
        pub(crate) phase1_lifetime_seconds: std::option::Option<i32>,
        pub(crate) phase2_lifetime_seconds: std::option::Option<i32>,
        pub(crate) rekey_margin_time_seconds: std::option::Option<i32>,
        pub(crate) rekey_fuzz_percentage: std::option::Option<i32>,
        pub(crate) replay_window_size: std::option::Option<i32>,
        pub(crate) dpd_timeout_seconds: std::option::Option<i32>,
        pub(crate) dpd_timeout_action: std::option::Option<std::string::String>,
        pub(crate) phase1_encryption_algorithms:
            std::option::Option<std::vec::Vec<crate::model::Phase1EncryptionAlgorithmsListValue>>,
        pub(crate) phase2_encryption_algorithms:
            std::option::Option<std::vec::Vec<crate::model::Phase2EncryptionAlgorithmsListValue>>,
        pub(crate) phase1_integrity_algorithms:
            std::option::Option<std::vec::Vec<crate::model::Phase1IntegrityAlgorithmsListValue>>,
        pub(crate) phase2_integrity_algorithms:
            std::option::Option<std::vec::Vec<crate::model::Phase2IntegrityAlgorithmsListValue>>,
        pub(crate) phase1_dh_group_numbers:
            std::option::Option<std::vec::Vec<crate::model::Phase1DhGroupNumbersListValue>>,
        pub(crate) phase2_dh_group_numbers:
            std::option::Option<std::vec::Vec<crate::model::Phase2DhGroupNumbersListValue>>,
        pub(crate) ike_versions:
            std::option::Option<std::vec::Vec<crate::model::IkeVersionsListValue>>,
        pub(crate) startup_action: std::option::Option<std::string::String>,
        pub(crate) log_options: std::option::Option<crate::model::VpnTunnelLogOptions>,
    }
    impl Builder {
        /// <p>The external IP address of the VPN tunnel.</p>
        pub fn outside_ip_address(mut self, input: impl Into<std::string::String>) -> Self {
            self.outside_ip_address = Some(input.into());
            self
        }
        /// <p>The external IP address of the VPN tunnel.</p>
        pub fn set_outside_ip_address(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.outside_ip_address = input;
            self
        }
        /// <p>The range of inside IPv4 addresses for the tunnel.</p>
        pub fn tunnel_inside_cidr(mut self, input: impl Into<std::string::String>) -> Self {
            self.tunnel_inside_cidr = Some(input.into());
            self
        }
        /// <p>The range of inside IPv4 addresses for the tunnel.</p>
        pub fn set_tunnel_inside_cidr(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.tunnel_inside_cidr = input;
            self
        }
        /// <p>The range of inside IPv6 addresses for the tunnel.</p>
        pub fn tunnel_inside_ipv6_cidr(mut self, input: impl Into<std::string::String>) -> Self {
            self.tunnel_inside_ipv6_cidr = Some(input.into());
            self
        }
        /// <p>The range of inside IPv6 addresses for the tunnel.</p>
        pub fn set_tunnel_inside_ipv6_cidr(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.tunnel_inside_ipv6_cidr = input;
            self
        }
        /// <p>The pre-shared key (PSK) to establish initial authentication between the virtual private gateway and the customer gateway.</p>
        pub fn pre_shared_key(mut self, input: impl Into<std::string::String>) -> Self {
            self.pre_shared_key = Some(input.into());
            self
        }
        /// <p>The pre-shared key (PSK) to establish initial authentication between the virtual private gateway and the customer gateway.</p>
        pub fn set_pre_shared_key(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.pre_shared_key = input;
            self
        }
        /// <p>The lifetime for phase 1 of the IKE negotiation, in seconds.</p>
        pub fn phase1_lifetime_seconds(mut self, input: i32) -> Self {
            self.phase1_lifetime_seconds = Some(input);
            self
        }
        /// <p>The lifetime for phase 1 of the IKE negotiation, in seconds.</p>
        pub fn set_phase1_lifetime_seconds(mut self, input: std::option::Option<i32>) -> Self {
            self.phase1_lifetime_seconds = input;
            self
        }
        /// <p>The lifetime for phase 2 of the IKE negotiation, in seconds.</p>
        pub fn phase2_lifetime_seconds(mut self, input: i32) -> Self {
            self.phase2_lifetime_seconds = Some(input);
            self
        }
        /// <p>The lifetime for phase 2 of the IKE negotiation, in seconds.</p>
        pub fn set_phase2_lifetime_seconds(mut self, input: std::option::Option<i32>) -> Self {
            self.phase2_lifetime_seconds = input;
            self
        }
        /// <p>The margin time, in seconds, before the phase 2 lifetime expires, during which the Amazon Web Services side of the VPN connection performs an IKE rekey.</p>
        pub fn rekey_margin_time_seconds(mut self, input: i32) -> Self {
            self.rekey_margin_time_seconds = Some(input);
            self
        }
        /// <p>The margin time, in seconds, before the phase 2 lifetime expires, during which the Amazon Web Services side of the VPN connection performs an IKE rekey.</p>
        pub fn set_rekey_margin_time_seconds(mut self, input: std::option::Option<i32>) -> Self {
            self.rekey_margin_time_seconds = input;
            self
        }
        /// <p>The percentage of the rekey window determined by <code>RekeyMarginTimeSeconds</code> during which the rekey time is randomly selected.</p>
        pub fn rekey_fuzz_percentage(mut self, input: i32) -> Self {
            self.rekey_fuzz_percentage = Some(input);
            self
        }
        /// <p>The percentage of the rekey window determined by <code>RekeyMarginTimeSeconds</code> during which the rekey time is randomly selected.</p>
        pub fn set_rekey_fuzz_percentage(mut self, input: std::option::Option<i32>) -> Self {
            self.rekey_fuzz_percentage = input;
            self
        }
        /// <p>The number of packets in an IKE replay window.</p>
        pub fn replay_window_size(mut self, input: i32) -> Self {
            self.replay_window_size = Some(input);
            self
        }
        /// <p>The number of packets in an IKE replay window.</p>
        pub fn set_replay_window_size(mut self, input: std::option::Option<i32>) -> Self {
            self.replay_window_size = input;
            self
        }
        /// <p>The number of seconds after which a DPD timeout occurs.</p>
        pub fn dpd_timeout_seconds(mut self, input: i32) -> Self {
            self.dpd_timeout_seconds = Some(input);
            self
        }
        /// <p>The number of seconds after which a DPD timeout occurs.</p>
        pub fn set_dpd_timeout_seconds(mut self, input: std::option::Option<i32>) -> Self {
            self.dpd_timeout_seconds = input;
            self
        }
        /// <p>The action to take after a DPD timeout occurs.</p>
        pub fn dpd_timeout_action(mut self, input: impl Into<std::string::String>) -> Self {
            self.dpd_timeout_action = Some(input.into());
            self
        }
        /// <p>The action to take after a DPD timeout occurs.</p>
        pub fn set_dpd_timeout_action(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.dpd_timeout_action = input;
            self
        }
        /// Appends an item to `phase1_encryption_algorithms`.
        ///
        /// To override the contents of this collection use [`set_phase1_encryption_algorithms`](Self::set_phase1_encryption_algorithms).
        ///
        /// <p>The permitted encryption algorithms for the VPN tunnel for phase 1 IKE negotiations.</p>
        pub fn phase1_encryption_algorithms(
            mut self,
            input: crate::model::Phase1EncryptionAlgorithmsListValue,
        ) -> Self {
            let mut v = self.phase1_encryption_algorithms.unwrap_or_default();
            v.push(input);
            self.phase1_encryption_algorithms = Some(v);
            self
        }
        /// <p>The permitted encryption algorithms for the VPN tunnel for phase 1 IKE negotiations.</p>
        pub fn set_phase1_encryption_algorithms(
            mut self,
            input: std::option::Option<
                std::vec::Vec<crate::model::Phase1EncryptionAlgorithmsListValue>,
            >,
        ) -> Self {
            self.phase1_encryption_algorithms = input;
            self
        }
        /// Appends an item to `phase2_encryption_algorithms`.
        ///
        /// To override the contents of this collection use [`set_phase2_encryption_algorithms`](Self::set_phase2_encryption_algorithms).
        ///
        /// <p>The permitted encryption algorithms for the VPN tunnel for phase 2 IKE negotiations.</p>
        pub fn phase2_encryption_algorithms(
            mut self,
            input: crate::model::Phase2EncryptionAlgorithmsListValue,
        ) -> Self {
            let mut v = self.phase2_encryption_algorithms.unwrap_or_default();
            v.push(input);
            self.phase2_encryption_algorithms = Some(v);
            self
        }
        /// <p>The permitted encryption algorithms for the VPN tunnel for phase 2 IKE negotiations.</p>
        pub fn set_phase2_encryption_algorithms(
            mut self,
            input: std::option::Option<
                std::vec::Vec<crate::model::Phase2EncryptionAlgorithmsListValue>,
            >,
        ) -> Self {
            self.phase2_encryption_algorithms = input;
            self
        }
        /// Appends an item to `phase1_integrity_algorithms`.
        ///
        /// To override the contents of this collection use [`set_phase1_integrity_algorithms`](Self::set_phase1_integrity_algorithms).
        ///
        /// <p>The permitted integrity algorithms for the VPN tunnel for phase 1 IKE negotiations.</p>
        pub fn phase1_integrity_algorithms(
            mut self,
            input: crate::model::Phase1IntegrityAlgorithmsListValue,
        ) -> Self {
            let mut v = self.phase1_integrity_algorithms.unwrap_or_default();
            v.push(input);
            self.phase1_integrity_algorithms = Some(v);
            self
        }
        /// <p>The permitted integrity algorithms for the VPN tunnel for phase 1 IKE negotiations.</p>
        pub fn set_phase1_integrity_algorithms(
            mut self,
            input: std::option::Option<
                std::vec::Vec<crate::model::Phase1IntegrityAlgorithmsListValue>,
            >,
        ) -> Self {
            self.phase1_integrity_algorithms = input;
            self
        }
        /// Appends an item to `phase2_integrity_algorithms`.
        ///
        /// To override the contents of this collection use [`set_phase2_integrity_algorithms`](Self::set_phase2_integrity_algorithms).
        ///
        /// <p>The permitted integrity algorithms for the VPN tunnel for phase 2 IKE negotiations.</p>
        pub fn phase2_integrity_algorithms(
            mut self,
            input: crate::model::Phase2IntegrityAlgorithmsListValue,
        ) -> Self {
            let mut v = self.phase2_integrity_algorithms.unwrap_or_default();
            v.push(input);
            self.phase2_integrity_algorithms = Some(v);
            self
        }
        /// <p>The permitted integrity algorithms for the VPN tunnel for phase 2 IKE negotiations.</p>
        pub fn set_phase2_integrity_algorithms(
            mut self,
            input: std::option::Option<
                std::vec::Vec<crate::model::Phase2IntegrityAlgorithmsListValue>,
            >,
        ) -> Self {
            self.phase2_integrity_algorithms = input;
            self
        }
        /// Appends an item to `phase1_dh_group_numbers`.
        ///
        /// To override the contents of this collection use [`set_phase1_dh_group_numbers`](Self::set_phase1_dh_group_numbers).
        ///
        /// <p>The permitted Diffie-Hellman group numbers for the VPN tunnel for phase 1 IKE negotiations.</p>
        pub fn phase1_dh_group_numbers(
            mut self,
            input: crate::model::Phase1DhGroupNumbersListValue,
        ) -> Self {
            let mut v = self.phase1_dh_group_numbers.unwrap_or_default();
            v.push(input);
            self.phase1_dh_group_numbers = Some(v);
            self
        }
        /// <p>The permitted Diffie-Hellman group numbers for the VPN tunnel for phase 1 IKE negotiations.</p>
        pub fn set_phase1_dh_group_numbers(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Phase1DhGroupNumbersListValue>>,
        ) -> Self {
            self.phase1_dh_group_numbers = input;
            self
        }
        /// Appends an item to `phase2_dh_group_numbers`.
        ///
        /// To override the contents of this collection use [`set_phase2_dh_group_numbers`](Self::set_phase2_dh_group_numbers).
        ///
        /// <p>The permitted Diffie-Hellman group numbers for the VPN tunnel for phase 2 IKE negotiations.</p>
        pub fn phase2_dh_group_numbers(
            mut self,
            input: crate::model::Phase2DhGroupNumbersListValue,
        ) -> Self {
            let mut v = self.phase2_dh_group_numbers.unwrap_or_default();
            v.push(input);
            self.phase2_dh_group_numbers = Some(v);
            self
        }
        /// <p>The permitted Diffie-Hellman group numbers for the VPN tunnel for phase 2 IKE negotiations.</p>
        pub fn set_phase2_dh_group_numbers(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Phase2DhGroupNumbersListValue>>,
        ) -> Self {
            self.phase2_dh_group_numbers = input;
            self
        }
        /// Appends an item to `ike_versions`.
        ///
        /// To override the contents of this collection use [`set_ike_versions`](Self::set_ike_versions).
        ///
        /// <p>The IKE versions that are permitted for the VPN tunnel.</p>
        pub fn ike_versions(mut self, input: crate::model::IkeVersionsListValue) -> Self {
            let mut v = self.ike_versions.unwrap_or_default();
            v.push(input);
            self.ike_versions = Some(v);
            self
        }
        /// <p>The IKE versions that are permitted for the VPN tunnel.</p>
        pub fn set_ike_versions(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::IkeVersionsListValue>>,
        ) -> Self {
            self.ike_versions = input;
            self
        }
        /// <p>The action to take when the establishing the VPN tunnels for a VPN connection.</p>
        pub fn startup_action(mut self, input: impl Into<std::string::String>) -> Self {
            self.startup_action = Some(input.into());
            self
        }
        /// <p>The action to take when the establishing the VPN tunnels for a VPN connection.</p>
        pub fn set_startup_action(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.startup_action = input;
            self
        }
        /// <p>Options for logging VPN tunnel activity.</p>
        pub fn log_options(mut self, input: crate::model::VpnTunnelLogOptions) -> Self {
            self.log_options = Some(input);
            self
        }
        /// <p>Options for logging VPN tunnel activity.</p>
        pub fn set_log_options(
            mut self,
            input: std::option::Option<crate::model::VpnTunnelLogOptions>,
        ) -> Self {
            self.log_options = input;
            self
        }
        /// Consumes the builder and constructs a [`TunnelOption`](crate::model::TunnelOption).
        pub fn build(self) -> crate::model::TunnelOption {
            crate::model::TunnelOption {
                outside_ip_address: self.outside_ip_address,
                tunnel_inside_cidr: self.tunnel_inside_cidr,
                tunnel_inside_ipv6_cidr: self.tunnel_inside_ipv6_cidr,
                pre_shared_key: self.pre_shared_key,
                phase1_lifetime_seconds: self.phase1_lifetime_seconds,
                phase2_lifetime_seconds: self.phase2_lifetime_seconds,
                rekey_margin_time_seconds: self.rekey_margin_time_seconds,
                rekey_fuzz_percentage: self.rekey_fuzz_percentage,
                replay_window_size: self.replay_window_size,
                dpd_timeout_seconds: self.dpd_timeout_seconds,
                dpd_timeout_action: self.dpd_timeout_action,
                phase1_encryption_algorithms: self.phase1_encryption_algorithms,
                phase2_encryption_algorithms: self.phase2_encryption_algorithms,
                phase1_integrity_algorithms: self.phase1_integrity_algorithms,
                phase2_integrity_algorithms: self.phase2_integrity_algorithms,
                phase1_dh_group_numbers: self.phase1_dh_group_numbers,
                phase2_dh_group_numbers: self.phase2_dh_group_numbers,
                ike_versions: self.ike_versions,
                startup_action: self.startup_action,
                log_options: self.log_options,
            }
        }
    }
}
impl TunnelOption {
    /// Creates a new builder-style object to manufacture [`TunnelOption`](crate::model::TunnelOption).
    pub fn builder() -> crate::model::tunnel_option::Builder {
        crate::model::tunnel_option::Builder::default()
    }
}

/// <p>Options for logging VPN tunnel activity.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct VpnTunnelLogOptions {
    /// <p>Options for sending VPN tunnel logs to CloudWatch.</p>
    #[doc(hidden)]
    pub cloud_watch_log_options: std::option::Option<crate::model::CloudWatchLogOptions>,
}
impl VpnTunnelLogOptions {
    /// <p>Options for sending VPN tunnel logs to CloudWatch.</p>
    pub fn cloud_watch_log_options(
        &self,
    ) -> std::option::Option<&crate::model::CloudWatchLogOptions> {
        self.cloud_watch_log_options.as_ref()
    }
}
/// See [`VpnTunnelLogOptions`](crate::model::VpnTunnelLogOptions).
pub mod vpn_tunnel_log_options {

    /// A builder for [`VpnTunnelLogOptions`](crate::model::VpnTunnelLogOptions).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) cloud_watch_log_options: std::option::Option<crate::model::CloudWatchLogOptions>,
    }
    impl Builder {
        /// <p>Options for sending VPN tunnel logs to CloudWatch.</p>
        pub fn cloud_watch_log_options(
            mut self,
            input: crate::model::CloudWatchLogOptions,
        ) -> Self {
            self.cloud_watch_log_options = Some(input);
            self
        }
        /// <p>Options for sending VPN tunnel logs to CloudWatch.</p>
        pub fn set_cloud_watch_log_options(
            mut self,
            input: std::option::Option<crate::model::CloudWatchLogOptions>,
        ) -> Self {
            self.cloud_watch_log_options = input;
            self
        }
        /// Consumes the builder and constructs a [`VpnTunnelLogOptions`](crate::model::VpnTunnelLogOptions).
        pub fn build(self) -> crate::model::VpnTunnelLogOptions {
            crate::model::VpnTunnelLogOptions {
                cloud_watch_log_options: self.cloud_watch_log_options,
            }
        }
    }
}
impl VpnTunnelLogOptions {
    /// Creates a new builder-style object to manufacture [`VpnTunnelLogOptions`](crate::model::VpnTunnelLogOptions).
    pub fn builder() -> crate::model::vpn_tunnel_log_options::Builder {
        crate::model::vpn_tunnel_log_options::Builder::default()
    }
}

/// <p>Options for sending VPN tunnel logs to CloudWatch.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CloudWatchLogOptions {
    /// <p>Status of VPN tunnel logging feature. Default value is <code>False</code>.</p>
    /// <p>Valid values: <code>True</code> | <code>False</code> </p>
    #[doc(hidden)]
    pub log_enabled: std::option::Option<bool>,
    /// <p>The Amazon Resource Name (ARN) of the CloudWatch log group to send logs to.</p>
    #[doc(hidden)]
    pub log_group_arn: std::option::Option<std::string::String>,
    /// <p>Configured log format. Default format is <code>json</code>.</p>
    /// <p>Valid values: <code>json</code> | <code>text</code> </p>
    #[doc(hidden)]
    pub log_output_format: std::option::Option<std::string::String>,
}
impl CloudWatchLogOptions {
    /// <p>Status of VPN tunnel logging feature. Default value is <code>False</code>.</p>
    /// <p>Valid values: <code>True</code> | <code>False</code> </p>
    pub fn log_enabled(&self) -> std::option::Option<bool> {
        self.log_enabled
    }
    /// <p>The Amazon Resource Name (ARN) of the CloudWatch log group to send logs to.</p>
    pub fn log_group_arn(&self) -> std::option::Option<&str> {
        self.log_group_arn.as_deref()
    }
    /// <p>Configured log format. Default format is <code>json</code>.</p>
    /// <p>Valid values: <code>json</code> | <code>text</code> </p>
    pub fn log_output_format(&self) -> std::option::Option<&str> {
        self.log_output_format.as_deref()
    }
}
/// See [`CloudWatchLogOptions`](crate::model::CloudWatchLogOptions).
pub mod cloud_watch_log_options {

    /// A builder for [`CloudWatchLogOptions`](crate::model::CloudWatchLogOptions).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) log_enabled: std::option::Option<bool>,
        pub(crate) log_group_arn: std::option::Option<std::string::String>,
        pub(crate) log_output_format: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>Status of VPN tunnel logging feature. Default value is <code>False</code>.</p>
        /// <p>Valid values: <code>True</code> | <code>False</code> </p>
        pub fn log_enabled(mut self, input: bool) -> Self {
            self.log_enabled = Some(input);
            self
        }
        /// <p>Status of VPN tunnel logging feature. Default value is <code>False</code>.</p>
        /// <p>Valid values: <code>True</code> | <code>False</code> </p>
        pub fn set_log_enabled(mut self, input: std::option::Option<bool>) -> Self {
            self.log_enabled = input;
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the CloudWatch log group to send logs to.</p>
        pub fn log_group_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.log_group_arn = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the CloudWatch log group to send logs to.</p>
        pub fn set_log_group_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.log_group_arn = input;
            self
        }
        /// <p>Configured log format. Default format is <code>json</code>.</p>
        /// <p>Valid values: <code>json</code> | <code>text</code> </p>
        pub fn log_output_format(mut self, input: impl Into<std::string::String>) -> Self {
            self.log_output_format = Some(input.into());
            self
        }
        /// <p>Configured log format. Default format is <code>json</code>.</p>
        /// <p>Valid values: <code>json</code> | <code>text</code> </p>
        pub fn set_log_output_format(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.log_output_format = input;
            self
        }
        /// Consumes the builder and constructs a [`CloudWatchLogOptions`](crate::model::CloudWatchLogOptions).
        pub fn build(self) -> crate::model::CloudWatchLogOptions {
            crate::model::CloudWatchLogOptions {
                log_enabled: self.log_enabled,
                log_group_arn: self.log_group_arn,
                log_output_format: self.log_output_format,
            }
        }
    }
}
impl CloudWatchLogOptions {
    /// Creates a new builder-style object to manufacture [`CloudWatchLogOptions`](crate::model::CloudWatchLogOptions).
    pub fn builder() -> crate::model::cloud_watch_log_options::Builder {
        crate::model::cloud_watch_log_options::Builder::default()
    }
}

/// <p>The internet key exchange (IKE) version permitted for the VPN tunnel.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct IkeVersionsListValue {
    /// <p>The IKE version.</p>
    #[doc(hidden)]
    pub value: std::option::Option<std::string::String>,
}
impl IkeVersionsListValue {
    /// <p>The IKE version.</p>
    pub fn value(&self) -> std::option::Option<&str> {
        self.value.as_deref()
    }
}
/// See [`IkeVersionsListValue`](crate::model::IkeVersionsListValue).
pub mod ike_versions_list_value {

    /// A builder for [`IkeVersionsListValue`](crate::model::IkeVersionsListValue).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) value: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The IKE version.</p>
        pub fn value(mut self, input: impl Into<std::string::String>) -> Self {
            self.value = Some(input.into());
            self
        }
        /// <p>The IKE version.</p>
        pub fn set_value(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.value = input;
            self
        }
        /// Consumes the builder and constructs a [`IkeVersionsListValue`](crate::model::IkeVersionsListValue).
        pub fn build(self) -> crate::model::IkeVersionsListValue {
            crate::model::IkeVersionsListValue { value: self.value }
        }
    }
}
impl IkeVersionsListValue {
    /// Creates a new builder-style object to manufacture [`IkeVersionsListValue`](crate::model::IkeVersionsListValue).
    pub fn builder() -> crate::model::ike_versions_list_value::Builder {
        crate::model::ike_versions_list_value::Builder::default()
    }
}

/// <p>The Diffie-Hellmann group number for phase 2 IKE negotiations.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Phase2DhGroupNumbersListValue {
    /// <p>The Diffie-Hellmann group number.</p>
    #[doc(hidden)]
    pub value: std::option::Option<i32>,
}
impl Phase2DhGroupNumbersListValue {
    /// <p>The Diffie-Hellmann group number.</p>
    pub fn value(&self) -> std::option::Option<i32> {
        self.value
    }
}
/// See [`Phase2DhGroupNumbersListValue`](crate::model::Phase2DhGroupNumbersListValue).
pub mod phase2_dh_group_numbers_list_value {

    /// A builder for [`Phase2DhGroupNumbersListValue`](crate::model::Phase2DhGroupNumbersListValue).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) value: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>The Diffie-Hellmann group number.</p>
        pub fn value(mut self, input: i32) -> Self {
            self.value = Some(input);
            self
        }
        /// <p>The Diffie-Hellmann group number.</p>
        pub fn set_value(mut self, input: std::option::Option<i32>) -> Self {
            self.value = input;
            self
        }
        /// Consumes the builder and constructs a [`Phase2DhGroupNumbersListValue`](crate::model::Phase2DhGroupNumbersListValue).
        pub fn build(self) -> crate::model::Phase2DhGroupNumbersListValue {
            crate::model::Phase2DhGroupNumbersListValue { value: self.value }
        }
    }
}
impl Phase2DhGroupNumbersListValue {
    /// Creates a new builder-style object to manufacture [`Phase2DhGroupNumbersListValue`](crate::model::Phase2DhGroupNumbersListValue).
    pub fn builder() -> crate::model::phase2_dh_group_numbers_list_value::Builder {
        crate::model::phase2_dh_group_numbers_list_value::Builder::default()
    }
}

/// <p>The Diffie-Hellmann group number for phase 1 IKE negotiations.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Phase1DhGroupNumbersListValue {
    /// <p>The Diffie-Hellmann group number.</p>
    #[doc(hidden)]
    pub value: std::option::Option<i32>,
}
impl Phase1DhGroupNumbersListValue {
    /// <p>The Diffie-Hellmann group number.</p>
    pub fn value(&self) -> std::option::Option<i32> {
        self.value
    }
}
/// See [`Phase1DhGroupNumbersListValue`](crate::model::Phase1DhGroupNumbersListValue).
pub mod phase1_dh_group_numbers_list_value {

    /// A builder for [`Phase1DhGroupNumbersListValue`](crate::model::Phase1DhGroupNumbersListValue).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) value: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>The Diffie-Hellmann group number.</p>
        pub fn value(mut self, input: i32) -> Self {
            self.value = Some(input);
            self
        }
        /// <p>The Diffie-Hellmann group number.</p>
        pub fn set_value(mut self, input: std::option::Option<i32>) -> Self {
            self.value = input;
            self
        }
        /// Consumes the builder and constructs a [`Phase1DhGroupNumbersListValue`](crate::model::Phase1DhGroupNumbersListValue).
        pub fn build(self) -> crate::model::Phase1DhGroupNumbersListValue {
            crate::model::Phase1DhGroupNumbersListValue { value: self.value }
        }
    }
}
impl Phase1DhGroupNumbersListValue {
    /// Creates a new builder-style object to manufacture [`Phase1DhGroupNumbersListValue`](crate::model::Phase1DhGroupNumbersListValue).
    pub fn builder() -> crate::model::phase1_dh_group_numbers_list_value::Builder {
        crate::model::phase1_dh_group_numbers_list_value::Builder::default()
    }
}

/// <p>The integrity algorithm for phase 2 IKE negotiations.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Phase2IntegrityAlgorithmsListValue {
    /// <p>The integrity algorithm.</p>
    #[doc(hidden)]
    pub value: std::option::Option<std::string::String>,
}
impl Phase2IntegrityAlgorithmsListValue {
    /// <p>The integrity algorithm.</p>
    pub fn value(&self) -> std::option::Option<&str> {
        self.value.as_deref()
    }
}
/// See [`Phase2IntegrityAlgorithmsListValue`](crate::model::Phase2IntegrityAlgorithmsListValue).
pub mod phase2_integrity_algorithms_list_value {

    /// A builder for [`Phase2IntegrityAlgorithmsListValue`](crate::model::Phase2IntegrityAlgorithmsListValue).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) value: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The integrity algorithm.</p>
        pub fn value(mut self, input: impl Into<std::string::String>) -> Self {
            self.value = Some(input.into());
            self
        }
        /// <p>The integrity algorithm.</p>
        pub fn set_value(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.value = input;
            self
        }
        /// Consumes the builder and constructs a [`Phase2IntegrityAlgorithmsListValue`](crate::model::Phase2IntegrityAlgorithmsListValue).
        pub fn build(self) -> crate::model::Phase2IntegrityAlgorithmsListValue {
            crate::model::Phase2IntegrityAlgorithmsListValue { value: self.value }
        }
    }
}
impl Phase2IntegrityAlgorithmsListValue {
    /// Creates a new builder-style object to manufacture [`Phase2IntegrityAlgorithmsListValue`](crate::model::Phase2IntegrityAlgorithmsListValue).
    pub fn builder() -> crate::model::phase2_integrity_algorithms_list_value::Builder {
        crate::model::phase2_integrity_algorithms_list_value::Builder::default()
    }
}

/// <p>The integrity algorithm for phase 1 IKE negotiations.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Phase1IntegrityAlgorithmsListValue {
    /// <p>The value for the integrity algorithm.</p>
    #[doc(hidden)]
    pub value: std::option::Option<std::string::String>,
}
impl Phase1IntegrityAlgorithmsListValue {
    /// <p>The value for the integrity algorithm.</p>
    pub fn value(&self) -> std::option::Option<&str> {
        self.value.as_deref()
    }
}
/// See [`Phase1IntegrityAlgorithmsListValue`](crate::model::Phase1IntegrityAlgorithmsListValue).
pub mod phase1_integrity_algorithms_list_value {

    /// A builder for [`Phase1IntegrityAlgorithmsListValue`](crate::model::Phase1IntegrityAlgorithmsListValue).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) value: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The value for the integrity algorithm.</p>
        pub fn value(mut self, input: impl Into<std::string::String>) -> Self {
            self.value = Some(input.into());
            self
        }
        /// <p>The value for the integrity algorithm.</p>
        pub fn set_value(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.value = input;
            self
        }
        /// Consumes the builder and constructs a [`Phase1IntegrityAlgorithmsListValue`](crate::model::Phase1IntegrityAlgorithmsListValue).
        pub fn build(self) -> crate::model::Phase1IntegrityAlgorithmsListValue {
            crate::model::Phase1IntegrityAlgorithmsListValue { value: self.value }
        }
    }
}
impl Phase1IntegrityAlgorithmsListValue {
    /// Creates a new builder-style object to manufacture [`Phase1IntegrityAlgorithmsListValue`](crate::model::Phase1IntegrityAlgorithmsListValue).
    pub fn builder() -> crate::model::phase1_integrity_algorithms_list_value::Builder {
        crate::model::phase1_integrity_algorithms_list_value::Builder::default()
    }
}

/// <p>The encryption algorithm for phase 2 IKE negotiations.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Phase2EncryptionAlgorithmsListValue {
    /// <p>The encryption algorithm.</p>
    #[doc(hidden)]
    pub value: std::option::Option<std::string::String>,
}
impl Phase2EncryptionAlgorithmsListValue {
    /// <p>The encryption algorithm.</p>
    pub fn value(&self) -> std::option::Option<&str> {
        self.value.as_deref()
    }
}
/// See [`Phase2EncryptionAlgorithmsListValue`](crate::model::Phase2EncryptionAlgorithmsListValue).
pub mod phase2_encryption_algorithms_list_value {

    /// A builder for [`Phase2EncryptionAlgorithmsListValue`](crate::model::Phase2EncryptionAlgorithmsListValue).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) value: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The encryption algorithm.</p>
        pub fn value(mut self, input: impl Into<std::string::String>) -> Self {
            self.value = Some(input.into());
            self
        }
        /// <p>The encryption algorithm.</p>
        pub fn set_value(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.value = input;
            self
        }
        /// Consumes the builder and constructs a [`Phase2EncryptionAlgorithmsListValue`](crate::model::Phase2EncryptionAlgorithmsListValue).
        pub fn build(self) -> crate::model::Phase2EncryptionAlgorithmsListValue {
            crate::model::Phase2EncryptionAlgorithmsListValue { value: self.value }
        }
    }
}
impl Phase2EncryptionAlgorithmsListValue {
    /// Creates a new builder-style object to manufacture [`Phase2EncryptionAlgorithmsListValue`](crate::model::Phase2EncryptionAlgorithmsListValue).
    pub fn builder() -> crate::model::phase2_encryption_algorithms_list_value::Builder {
        crate::model::phase2_encryption_algorithms_list_value::Builder::default()
    }
}

/// <p>The encryption algorithm for phase 1 IKE negotiations.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Phase1EncryptionAlgorithmsListValue {
    /// <p>The value for the encryption algorithm.</p>
    #[doc(hidden)]
    pub value: std::option::Option<std::string::String>,
}
impl Phase1EncryptionAlgorithmsListValue {
    /// <p>The value for the encryption algorithm.</p>
    pub fn value(&self) -> std::option::Option<&str> {
        self.value.as_deref()
    }
}
/// See [`Phase1EncryptionAlgorithmsListValue`](crate::model::Phase1EncryptionAlgorithmsListValue).
pub mod phase1_encryption_algorithms_list_value {

    /// A builder for [`Phase1EncryptionAlgorithmsListValue`](crate::model::Phase1EncryptionAlgorithmsListValue).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) value: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The value for the encryption algorithm.</p>
        pub fn value(mut self, input: impl Into<std::string::String>) -> Self {
            self.value = Some(input.into());
            self
        }
        /// <p>The value for the encryption algorithm.</p>
        pub fn set_value(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.value = input;
            self
        }
        /// Consumes the builder and constructs a [`Phase1EncryptionAlgorithmsListValue`](crate::model::Phase1EncryptionAlgorithmsListValue).
        pub fn build(self) -> crate::model::Phase1EncryptionAlgorithmsListValue {
            crate::model::Phase1EncryptionAlgorithmsListValue { value: self.value }
        }
    }
}
impl Phase1EncryptionAlgorithmsListValue {
    /// Creates a new builder-style object to manufacture [`Phase1EncryptionAlgorithmsListValue`](crate::model::Phase1EncryptionAlgorithmsListValue).
    pub fn builder() -> crate::model::phase1_encryption_algorithms_list_value::Builder {
        crate::model::phase1_encryption_algorithms_list_value::Builder::default()
    }
}

/// When writing a match expression against `TunnelInsideIpVersion`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let tunnelinsideipversion = unimplemented!();
/// match tunnelinsideipversion {
///     TunnelInsideIpVersion::Ipv4 => { /* ... */ },
///     TunnelInsideIpVersion::Ipv6 => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `tunnelinsideipversion` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `TunnelInsideIpVersion::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `TunnelInsideIpVersion::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `TunnelInsideIpVersion::NewFeature` is defined.
/// Specifically, when `tunnelinsideipversion` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `TunnelInsideIpVersion::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 TunnelInsideIpVersion {
    #[allow(missing_docs)] // documentation missing in model
    Ipv4,
    #[allow(missing_docs)] // documentation missing in model
    Ipv6,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for TunnelInsideIpVersion {
    fn from(s: &str) -> Self {
        match s {
            "ipv4" => TunnelInsideIpVersion::Ipv4,
            "ipv6" => TunnelInsideIpVersion::Ipv6,
            other => {
                TunnelInsideIpVersion::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for TunnelInsideIpVersion {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(TunnelInsideIpVersion::from(s))
    }
}
impl TunnelInsideIpVersion {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            TunnelInsideIpVersion::Ipv4 => "ipv4",
            TunnelInsideIpVersion::Ipv6 => "ipv6",
            TunnelInsideIpVersion::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["ipv4", "ipv6"]
    }
}
impl AsRef<str> for TunnelInsideIpVersion {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `GatewayAssociationState`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let gatewayassociationstate = unimplemented!();
/// match gatewayassociationstate {
///     GatewayAssociationState::Associated => { /* ... */ },
///     GatewayAssociationState::Associating => { /* ... */ },
///     GatewayAssociationState::Disassociating => { /* ... */ },
///     GatewayAssociationState::NotAssociated => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `gatewayassociationstate` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `GatewayAssociationState::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `GatewayAssociationState::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `GatewayAssociationState::NewFeature` is defined.
/// Specifically, when `gatewayassociationstate` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `GatewayAssociationState::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 GatewayAssociationState {
    #[allow(missing_docs)] // documentation missing in model
    Associated,
    #[allow(missing_docs)] // documentation missing in model
    Associating,
    #[allow(missing_docs)] // documentation missing in model
    Disassociating,
    #[allow(missing_docs)] // documentation missing in model
    NotAssociated,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for GatewayAssociationState {
    fn from(s: &str) -> Self {
        match s {
            "associated" => GatewayAssociationState::Associated,
            "associating" => GatewayAssociationState::Associating,
            "disassociating" => GatewayAssociationState::Disassociating,
            "not-associated" => GatewayAssociationState::NotAssociated,
            other => GatewayAssociationState::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for GatewayAssociationState {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(GatewayAssociationState::from(s))
    }
}
impl GatewayAssociationState {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            GatewayAssociationState::Associated => "associated",
            GatewayAssociationState::Associating => "associating",
            GatewayAssociationState::Disassociating => "disassociating",
            GatewayAssociationState::NotAssociated => "not-associated",
            GatewayAssociationState::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &[
            "associated",
            "associating",
            "disassociating",
            "not-associated",
        ]
    }
}
impl AsRef<str> for GatewayAssociationState {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `GatewayType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let gatewaytype = unimplemented!();
/// match gatewaytype {
///     GatewayType::Ipsec1 => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `gatewaytype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `GatewayType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `GatewayType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `GatewayType::NewFeature` is defined.
/// Specifically, when `gatewaytype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `GatewayType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 GatewayType {
    #[allow(missing_docs)] // documentation missing in model
    Ipsec1,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for GatewayType {
    fn from(s: &str) -> Self {
        match s {
            "ipsec.1" => GatewayType::Ipsec1,
            other => GatewayType::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for GatewayType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(GatewayType::from(s))
    }
}
impl GatewayType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            GatewayType::Ipsec1 => "ipsec.1",
            GatewayType::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["ipsec.1"]
    }
}
impl AsRef<str> for GatewayType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>The Amazon Web Services Site-to-Site VPN tunnel options to modify.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ModifyVpnTunnelOptionsSpecification {
    /// <p>The range of inside IPv4 addresses for the tunnel. Any specified CIDR blocks must be unique across all VPN connections that use the same virtual private gateway. </p>
    /// <p>Constraints: A size /30 CIDR block from the <code>169.254.0.0/16</code> range. The following CIDR blocks are reserved and cannot be used:</p>
    /// <ul>
    /// <li> <p> <code>169.254.0.0/30</code> </p> </li>
    /// <li> <p> <code>169.254.1.0/30</code> </p> </li>
    /// <li> <p> <code>169.254.2.0/30</code> </p> </li>
    /// <li> <p> <code>169.254.3.0/30</code> </p> </li>
    /// <li> <p> <code>169.254.4.0/30</code> </p> </li>
    /// <li> <p> <code>169.254.5.0/30</code> </p> </li>
    /// <li> <p> <code>169.254.169.252/30</code> </p> </li>
    /// </ul>
    #[doc(hidden)]
    pub tunnel_inside_cidr: std::option::Option<std::string::String>,
    /// <p>The range of inside IPv6 addresses for the tunnel. Any specified CIDR blocks must be unique across all VPN connections that use the same transit gateway.</p>
    /// <p>Constraints: A size /126 CIDR block from the local <code>fd00::/8</code> range.</p>
    #[doc(hidden)]
    pub tunnel_inside_ipv6_cidr: std::option::Option<std::string::String>,
    /// <p>The pre-shared key (PSK) to establish initial authentication between the virtual private gateway and the customer gateway.</p>
    /// <p>Constraints: Allowed characters are alphanumeric characters, periods (.), and underscores (_). Must be between 8 and 64 characters in length and cannot start with zero (0).</p>
    #[doc(hidden)]
    pub pre_shared_key: std::option::Option<std::string::String>,
    /// <p>The lifetime for phase 1 of the IKE negotiation, in seconds.</p>
    /// <p>Constraints: A value between 900 and 28,800.</p>
    /// <p>Default: <code>28800</code> </p>
    #[doc(hidden)]
    pub phase1_lifetime_seconds: std::option::Option<i32>,
    /// <p>The lifetime for phase 2 of the IKE negotiation, in seconds.</p>
    /// <p>Constraints: A value between 900 and 3,600. The value must be less than the value for <code>Phase1LifetimeSeconds</code>.</p>
    /// <p>Default: <code>3600</code> </p>
    #[doc(hidden)]
    pub phase2_lifetime_seconds: std::option::Option<i32>,
    /// <p>The margin time, in seconds, before the phase 2 lifetime expires, during which the Amazon Web Services side of the VPN connection performs an IKE rekey. The exact time of the rekey is randomly selected based on the value for <code>RekeyFuzzPercentage</code>.</p>
    /// <p>Constraints: A value between 60 and half of <code>Phase2LifetimeSeconds</code>.</p>
    /// <p>Default: <code>540</code> </p>
    #[doc(hidden)]
    pub rekey_margin_time_seconds: std::option::Option<i32>,
    /// <p>The percentage of the rekey window (determined by <code>RekeyMarginTimeSeconds</code>) during which the rekey time is randomly selected.</p>
    /// <p>Constraints: A value between 0 and 100.</p>
    /// <p>Default: <code>100</code> </p>
    #[doc(hidden)]
    pub rekey_fuzz_percentage: std::option::Option<i32>,
    /// <p>The number of packets in an IKE replay window.</p>
    /// <p>Constraints: A value between 64 and 2048.</p>
    /// <p>Default: <code>1024</code> </p>
    #[doc(hidden)]
    pub replay_window_size: std::option::Option<i32>,
    /// <p>The number of seconds after which a DPD timeout occurs.</p>
    /// <p>Constraints: A value greater than or equal to 30.</p>
    /// <p>Default: <code>30</code> </p>
    #[doc(hidden)]
    pub dpd_timeout_seconds: std::option::Option<i32>,
    /// <p>The action to take after DPD timeout occurs. Specify <code>restart</code> to restart the IKE initiation. Specify <code>clear</code> to end the IKE session.</p>
    /// <p>Valid Values: <code>clear</code> | <code>none</code> | <code>restart</code> </p>
    /// <p>Default: <code>clear</code> </p>
    #[doc(hidden)]
    pub dpd_timeout_action: std::option::Option<std::string::String>,
    /// <p>One or more encryption algorithms that are permitted for the VPN tunnel for phase 1 IKE negotiations.</p>
    /// <p>Valid values: <code>AES128</code> | <code>AES256</code> | <code>AES128-GCM-16</code> | <code>AES256-GCM-16</code> </p>
    #[doc(hidden)]
    pub phase1_encryption_algorithms: std::option::Option<
        std::vec::Vec<crate::model::Phase1EncryptionAlgorithmsRequestListValue>,
    >,
    /// <p>One or more encryption algorithms that are permitted for the VPN tunnel for phase 2 IKE negotiations.</p>
    /// <p>Valid values: <code>AES128</code> | <code>AES256</code> | <code>AES128-GCM-16</code> | <code>AES256-GCM-16</code> </p>
    #[doc(hidden)]
    pub phase2_encryption_algorithms: std::option::Option<
        std::vec::Vec<crate::model::Phase2EncryptionAlgorithmsRequestListValue>,
    >,
    /// <p>One or more integrity algorithms that are permitted for the VPN tunnel for phase 1 IKE negotiations.</p>
    /// <p>Valid values: <code>SHA1</code> | <code>SHA2-256</code> | <code>SHA2-384</code> | <code>SHA2-512</code> </p>
    #[doc(hidden)]
    pub phase1_integrity_algorithms:
        std::option::Option<std::vec::Vec<crate::model::Phase1IntegrityAlgorithmsRequestListValue>>,
    /// <p>One or more integrity algorithms that are permitted for the VPN tunnel for phase 2 IKE negotiations.</p>
    /// <p>Valid values: <code>SHA1</code> | <code>SHA2-256</code> | <code>SHA2-384</code> | <code>SHA2-512</code> </p>
    #[doc(hidden)]
    pub phase2_integrity_algorithms:
        std::option::Option<std::vec::Vec<crate::model::Phase2IntegrityAlgorithmsRequestListValue>>,
    /// <p>One or more Diffie-Hellman group numbers that are permitted for the VPN tunnel for phase 1 IKE negotiations.</p>
    /// <p>Valid values: <code>2</code> | <code>14</code> | <code>15</code> | <code>16</code> | <code>17</code> | <code>18</code> | <code>19</code> | <code>20</code> | <code>21</code> | <code>22</code> | <code>23</code> | <code>24</code> </p>
    #[doc(hidden)]
    pub phase1_dh_group_numbers:
        std::option::Option<std::vec::Vec<crate::model::Phase1DhGroupNumbersRequestListValue>>,
    /// <p>One or more Diffie-Hellman group numbers that are permitted for the VPN tunnel for phase 2 IKE negotiations.</p>
    /// <p>Valid values: <code>2</code> | <code>5</code> | <code>14</code> | <code>15</code> | <code>16</code> | <code>17</code> | <code>18</code> | <code>19</code> | <code>20</code> | <code>21</code> | <code>22</code> | <code>23</code> | <code>24</code> </p>
    #[doc(hidden)]
    pub phase2_dh_group_numbers:
        std::option::Option<std::vec::Vec<crate::model::Phase2DhGroupNumbersRequestListValue>>,
    /// <p>The IKE versions that are permitted for the VPN tunnel.</p>
    /// <p>Valid values: <code>ikev1</code> | <code>ikev2</code> </p>
    #[doc(hidden)]
    pub ike_versions: std::option::Option<std::vec::Vec<crate::model::IkeVersionsRequestListValue>>,
    /// <p>The action to take when the establishing the tunnel for the VPN connection. By default, your customer gateway device must initiate the IKE negotiation and bring up the tunnel. Specify <code>start</code> for Amazon Web Services to initiate the IKE negotiation.</p>
    /// <p>Valid Values: <code>add</code> | <code>start</code> </p>
    /// <p>Default: <code>add</code> </p>
    #[doc(hidden)]
    pub startup_action: std::option::Option<std::string::String>,
    /// <p>Options for logging VPN tunnel activity.</p>
    #[doc(hidden)]
    pub log_options: std::option::Option<crate::model::VpnTunnelLogOptionsSpecification>,
}
impl ModifyVpnTunnelOptionsSpecification {
    /// <p>The range of inside IPv4 addresses for the tunnel. Any specified CIDR blocks must be unique across all VPN connections that use the same virtual private gateway. </p>
    /// <p>Constraints: A size /30 CIDR block from the <code>169.254.0.0/16</code> range. The following CIDR blocks are reserved and cannot be used:</p>
    /// <ul>
    /// <li> <p> <code>169.254.0.0/30</code> </p> </li>
    /// <li> <p> <code>169.254.1.0/30</code> </p> </li>
    /// <li> <p> <code>169.254.2.0/30</code> </p> </li>
    /// <li> <p> <code>169.254.3.0/30</code> </p> </li>
    /// <li> <p> <code>169.254.4.0/30</code> </p> </li>
    /// <li> <p> <code>169.254.5.0/30</code> </p> </li>
    /// <li> <p> <code>169.254.169.252/30</code> </p> </li>
    /// </ul>
    pub fn tunnel_inside_cidr(&self) -> std::option::Option<&str> {
        self.tunnel_inside_cidr.as_deref()
    }
    /// <p>The range of inside IPv6 addresses for the tunnel. Any specified CIDR blocks must be unique across all VPN connections that use the same transit gateway.</p>
    /// <p>Constraints: A size /126 CIDR block from the local <code>fd00::/8</code> range.</p>
    pub fn tunnel_inside_ipv6_cidr(&self) -> std::option::Option<&str> {
        self.tunnel_inside_ipv6_cidr.as_deref()
    }
    /// <p>The pre-shared key (PSK) to establish initial authentication between the virtual private gateway and the customer gateway.</p>
    /// <p>Constraints: Allowed characters are alphanumeric characters, periods (.), and underscores (_). Must be between 8 and 64 characters in length and cannot start with zero (0).</p>
    pub fn pre_shared_key(&self) -> std::option::Option<&str> {
        self.pre_shared_key.as_deref()
    }
    /// <p>The lifetime for phase 1 of the IKE negotiation, in seconds.</p>
    /// <p>Constraints: A value between 900 and 28,800.</p>
    /// <p>Default: <code>28800</code> </p>
    pub fn phase1_lifetime_seconds(&self) -> std::option::Option<i32> {
        self.phase1_lifetime_seconds
    }
    /// <p>The lifetime for phase 2 of the IKE negotiation, in seconds.</p>
    /// <p>Constraints: A value between 900 and 3,600. The value must be less than the value for <code>Phase1LifetimeSeconds</code>.</p>
    /// <p>Default: <code>3600</code> </p>
    pub fn phase2_lifetime_seconds(&self) -> std::option::Option<i32> {
        self.phase2_lifetime_seconds
    }
    /// <p>The margin time, in seconds, before the phase 2 lifetime expires, during which the Amazon Web Services side of the VPN connection performs an IKE rekey. The exact time of the rekey is randomly selected based on the value for <code>RekeyFuzzPercentage</code>.</p>
    /// <p>Constraints: A value between 60 and half of <code>Phase2LifetimeSeconds</code>.</p>
    /// <p>Default: <code>540</code> </p>
    pub fn rekey_margin_time_seconds(&self) -> std::option::Option<i32> {
        self.rekey_margin_time_seconds
    }
    /// <p>The percentage of the rekey window (determined by <code>RekeyMarginTimeSeconds</code>) during which the rekey time is randomly selected.</p>
    /// <p>Constraints: A value between 0 and 100.</p>
    /// <p>Default: <code>100</code> </p>
    pub fn rekey_fuzz_percentage(&self) -> std::option::Option<i32> {
        self.rekey_fuzz_percentage
    }
    /// <p>The number of packets in an IKE replay window.</p>
    /// <p>Constraints: A value between 64 and 2048.</p>
    /// <p>Default: <code>1024</code> </p>
    pub fn replay_window_size(&self) -> std::option::Option<i32> {
        self.replay_window_size
    }
    /// <p>The number of seconds after which a DPD timeout occurs.</p>
    /// <p>Constraints: A value greater than or equal to 30.</p>
    /// <p>Default: <code>30</code> </p>
    pub fn dpd_timeout_seconds(&self) -> std::option::Option<i32> {
        self.dpd_timeout_seconds
    }
    /// <p>The action to take after DPD timeout occurs. Specify <code>restart</code> to restart the IKE initiation. Specify <code>clear</code> to end the IKE session.</p>
    /// <p>Valid Values: <code>clear</code> | <code>none</code> | <code>restart</code> </p>
    /// <p>Default: <code>clear</code> </p>
    pub fn dpd_timeout_action(&self) -> std::option::Option<&str> {
        self.dpd_timeout_action.as_deref()
    }
    /// <p>One or more encryption algorithms that are permitted for the VPN tunnel for phase 1 IKE negotiations.</p>
    /// <p>Valid values: <code>AES128</code> | <code>AES256</code> | <code>AES128-GCM-16</code> | <code>AES256-GCM-16</code> </p>
    pub fn phase1_encryption_algorithms(
        &self,
    ) -> std::option::Option<&[crate::model::Phase1EncryptionAlgorithmsRequestListValue]> {
        self.phase1_encryption_algorithms.as_deref()
    }
    /// <p>One or more encryption algorithms that are permitted for the VPN tunnel for phase 2 IKE negotiations.</p>
    /// <p>Valid values: <code>AES128</code> | <code>AES256</code> | <code>AES128-GCM-16</code> | <code>AES256-GCM-16</code> </p>
    pub fn phase2_encryption_algorithms(
        &self,
    ) -> std::option::Option<&[crate::model::Phase2EncryptionAlgorithmsRequestListValue]> {
        self.phase2_encryption_algorithms.as_deref()
    }
    /// <p>One or more integrity algorithms that are permitted for the VPN tunnel for phase 1 IKE negotiations.</p>
    /// <p>Valid values: <code>SHA1</code> | <code>SHA2-256</code> | <code>SHA2-384</code> | <code>SHA2-512</code> </p>
    pub fn phase1_integrity_algorithms(
        &self,
    ) -> std::option::Option<&[crate::model::Phase1IntegrityAlgorithmsRequestListValue]> {
        self.phase1_integrity_algorithms.as_deref()
    }
    /// <p>One or more integrity algorithms that are permitted for the VPN tunnel for phase 2 IKE negotiations.</p>
    /// <p>Valid values: <code>SHA1</code> | <code>SHA2-256</code> | <code>SHA2-384</code> | <code>SHA2-512</code> </p>
    pub fn phase2_integrity_algorithms(
        &self,
    ) -> std::option::Option<&[crate::model::Phase2IntegrityAlgorithmsRequestListValue]> {
        self.phase2_integrity_algorithms.as_deref()
    }
    /// <p>One or more Diffie-Hellman group numbers that are permitted for the VPN tunnel for phase 1 IKE negotiations.</p>
    /// <p>Valid values: <code>2</code> | <code>14</code> | <code>15</code> | <code>16</code> | <code>17</code> | <code>18</code> | <code>19</code> | <code>20</code> | <code>21</code> | <code>22</code> | <code>23</code> | <code>24</code> </p>
    pub fn phase1_dh_group_numbers(
        &self,
    ) -> std::option::Option<&[crate::model::Phase1DhGroupNumbersRequestListValue]> {
        self.phase1_dh_group_numbers.as_deref()
    }
    /// <p>One or more Diffie-Hellman group numbers that are permitted for the VPN tunnel for phase 2 IKE negotiations.</p>
    /// <p>Valid values: <code>2</code> | <code>5</code> | <code>14</code> | <code>15</code> | <code>16</code> | <code>17</code> | <code>18</code> | <code>19</code> | <code>20</code> | <code>21</code> | <code>22</code> | <code>23</code> | <code>24</code> </p>
    pub fn phase2_dh_group_numbers(
        &self,
    ) -> std::option::Option<&[crate::model::Phase2DhGroupNumbersRequestListValue]> {
        self.phase2_dh_group_numbers.as_deref()
    }
    /// <p>The IKE versions that are permitted for the VPN tunnel.</p>
    /// <p>Valid values: <code>ikev1</code> | <code>ikev2</code> </p>
    pub fn ike_versions(
        &self,
    ) -> std::option::Option<&[crate::model::IkeVersionsRequestListValue]> {
        self.ike_versions.as_deref()
    }
    /// <p>The action to take when the establishing the tunnel for the VPN connection. By default, your customer gateway device must initiate the IKE negotiation and bring up the tunnel. Specify <code>start</code> for Amazon Web Services to initiate the IKE negotiation.</p>
    /// <p>Valid Values: <code>add</code> | <code>start</code> </p>
    /// <p>Default: <code>add</code> </p>
    pub fn startup_action(&self) -> std::option::Option<&str> {
        self.startup_action.as_deref()
    }
    /// <p>Options for logging VPN tunnel activity.</p>
    pub fn log_options(
        &self,
    ) -> std::option::Option<&crate::model::VpnTunnelLogOptionsSpecification> {
        self.log_options.as_ref()
    }
}
/// See [`ModifyVpnTunnelOptionsSpecification`](crate::model::ModifyVpnTunnelOptionsSpecification).
pub mod modify_vpn_tunnel_options_specification {

    /// A builder for [`ModifyVpnTunnelOptionsSpecification`](crate::model::ModifyVpnTunnelOptionsSpecification).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) tunnel_inside_cidr: std::option::Option<std::string::String>,
        pub(crate) tunnel_inside_ipv6_cidr: std::option::Option<std::string::String>,
        pub(crate) pre_shared_key: std::option::Option<std::string::String>,
        pub(crate) phase1_lifetime_seconds: std::option::Option<i32>,
        pub(crate) phase2_lifetime_seconds: std::option::Option<i32>,
        pub(crate) rekey_margin_time_seconds: std::option::Option<i32>,
        pub(crate) rekey_fuzz_percentage: std::option::Option<i32>,
        pub(crate) replay_window_size: std::option::Option<i32>,
        pub(crate) dpd_timeout_seconds: std::option::Option<i32>,
        pub(crate) dpd_timeout_action: std::option::Option<std::string::String>,
        pub(crate) phase1_encryption_algorithms: std::option::Option<
            std::vec::Vec<crate::model::Phase1EncryptionAlgorithmsRequestListValue>,
        >,
        pub(crate) phase2_encryption_algorithms: std::option::Option<
            std::vec::Vec<crate::model::Phase2EncryptionAlgorithmsRequestListValue>,
        >,
        pub(crate) phase1_integrity_algorithms: std::option::Option<
            std::vec::Vec<crate::model::Phase1IntegrityAlgorithmsRequestListValue>,
        >,
        pub(crate) phase2_integrity_algorithms: std::option::Option<
            std::vec::Vec<crate::model::Phase2IntegrityAlgorithmsRequestListValue>,
        >,
        pub(crate) phase1_dh_group_numbers:
            std::option::Option<std::vec::Vec<crate::model::Phase1DhGroupNumbersRequestListValue>>,
        pub(crate) phase2_dh_group_numbers:
            std::option::Option<std::vec::Vec<crate::model::Phase2DhGroupNumbersRequestListValue>>,
        pub(crate) ike_versions:
            std::option::Option<std::vec::Vec<crate::model::IkeVersionsRequestListValue>>,
        pub(crate) startup_action: std::option::Option<std::string::String>,
        pub(crate) log_options: std::option::Option<crate::model::VpnTunnelLogOptionsSpecification>,
    }
    impl Builder {
        /// <p>The range of inside IPv4 addresses for the tunnel. Any specified CIDR blocks must be unique across all VPN connections that use the same virtual private gateway. </p>
        /// <p>Constraints: A size /30 CIDR block from the <code>169.254.0.0/16</code> range. The following CIDR blocks are reserved and cannot be used:</p>
        /// <ul>
        /// <li> <p> <code>169.254.0.0/30</code> </p> </li>
        /// <li> <p> <code>169.254.1.0/30</code> </p> </li>
        /// <li> <p> <code>169.254.2.0/30</code> </p> </li>
        /// <li> <p> <code>169.254.3.0/30</code> </p> </li>
        /// <li> <p> <code>169.254.4.0/30</code> </p> </li>
        /// <li> <p> <code>169.254.5.0/30</code> </p> </li>
        /// <li> <p> <code>169.254.169.252/30</code> </p> </li>
        /// </ul>
        pub fn tunnel_inside_cidr(mut self, input: impl Into<std::string::String>) -> Self {
            self.tunnel_inside_cidr = Some(input.into());
            self
        }
        /// <p>The range of inside IPv4 addresses for the tunnel. Any specified CIDR blocks must be unique across all VPN connections that use the same virtual private gateway. </p>
        /// <p>Constraints: A size /30 CIDR block from the <code>169.254.0.0/16</code> range. The following CIDR blocks are reserved and cannot be used:</p>
        /// <ul>
        /// <li> <p> <code>169.254.0.0/30</code> </p> </li>
        /// <li> <p> <code>169.254.1.0/30</code> </p> </li>
        /// <li> <p> <code>169.254.2.0/30</code> </p> </li>
        /// <li> <p> <code>169.254.3.0/30</code> </p> </li>
        /// <li> <p> <code>169.254.4.0/30</code> </p> </li>
        /// <li> <p> <code>169.254.5.0/30</code> </p> </li>
        /// <li> <p> <code>169.254.169.252/30</code> </p> </li>
        /// </ul>
        pub fn set_tunnel_inside_cidr(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.tunnel_inside_cidr = input;
            self
        }
        /// <p>The range of inside IPv6 addresses for the tunnel. Any specified CIDR blocks must be unique across all VPN connections that use the same transit gateway.</p>
        /// <p>Constraints: A size /126 CIDR block from the local <code>fd00::/8</code> range.</p>
        pub fn tunnel_inside_ipv6_cidr(mut self, input: impl Into<std::string::String>) -> Self {
            self.tunnel_inside_ipv6_cidr = Some(input.into());
            self
        }
        /// <p>The range of inside IPv6 addresses for the tunnel. Any specified CIDR blocks must be unique across all VPN connections that use the same transit gateway.</p>
        /// <p>Constraints: A size /126 CIDR block from the local <code>fd00::/8</code> range.</p>
        pub fn set_tunnel_inside_ipv6_cidr(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.tunnel_inside_ipv6_cidr = input;
            self
        }
        /// <p>The pre-shared key (PSK) to establish initial authentication between the virtual private gateway and the customer gateway.</p>
        /// <p>Constraints: Allowed characters are alphanumeric characters, periods (.), and underscores (_). Must be between 8 and 64 characters in length and cannot start with zero (0).</p>
        pub fn pre_shared_key(mut self, input: impl Into<std::string::String>) -> Self {
            self.pre_shared_key = Some(input.into());
            self
        }
        /// <p>The pre-shared key (PSK) to establish initial authentication between the virtual private gateway and the customer gateway.</p>
        /// <p>Constraints: Allowed characters are alphanumeric characters, periods (.), and underscores (_). Must be between 8 and 64 characters in length and cannot start with zero (0).</p>
        pub fn set_pre_shared_key(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.pre_shared_key = input;
            self
        }
        /// <p>The lifetime for phase 1 of the IKE negotiation, in seconds.</p>
        /// <p>Constraints: A value between 900 and 28,800.</p>
        /// <p>Default: <code>28800</code> </p>
        pub fn phase1_lifetime_seconds(mut self, input: i32) -> Self {
            self.phase1_lifetime_seconds = Some(input);
            self
        }
        /// <p>The lifetime for phase 1 of the IKE negotiation, in seconds.</p>
        /// <p>Constraints: A value between 900 and 28,800.</p>
        /// <p>Default: <code>28800</code> </p>
        pub fn set_phase1_lifetime_seconds(mut self, input: std::option::Option<i32>) -> Self {
            self.phase1_lifetime_seconds = input;
            self
        }
        /// <p>The lifetime for phase 2 of the IKE negotiation, in seconds.</p>
        /// <p>Constraints: A value between 900 and 3,600. The value must be less than the value for <code>Phase1LifetimeSeconds</code>.</p>
        /// <p>Default: <code>3600</code> </p>
        pub fn phase2_lifetime_seconds(mut self, input: i32) -> Self {
            self.phase2_lifetime_seconds = Some(input);
            self
        }
        /// <p>The lifetime for phase 2 of the IKE negotiation, in seconds.</p>
        /// <p>Constraints: A value between 900 and 3,600. The value must be less than the value for <code>Phase1LifetimeSeconds</code>.</p>
        /// <p>Default: <code>3600</code> </p>
        pub fn set_phase2_lifetime_seconds(mut self, input: std::option::Option<i32>) -> Self {
            self.phase2_lifetime_seconds = input;
            self
        }
        /// <p>The margin time, in seconds, before the phase 2 lifetime expires, during which the Amazon Web Services side of the VPN connection performs an IKE rekey. The exact time of the rekey is randomly selected based on the value for <code>RekeyFuzzPercentage</code>.</p>
        /// <p>Constraints: A value between 60 and half of <code>Phase2LifetimeSeconds</code>.</p>
        /// <p>Default: <code>540</code> </p>
        pub fn rekey_margin_time_seconds(mut self, input: i32) -> Self {
            self.rekey_margin_time_seconds = Some(input);
            self
        }
        /// <p>The margin time, in seconds, before the phase 2 lifetime expires, during which the Amazon Web Services side of the VPN connection performs an IKE rekey. The exact time of the rekey is randomly selected based on the value for <code>RekeyFuzzPercentage</code>.</p>
        /// <p>Constraints: A value between 60 and half of <code>Phase2LifetimeSeconds</code>.</p>
        /// <p>Default: <code>540</code> </p>
        pub fn set_rekey_margin_time_seconds(mut self, input: std::option::Option<i32>) -> Self {
            self.rekey_margin_time_seconds = input;
            self
        }
        /// <p>The percentage of the rekey window (determined by <code>RekeyMarginTimeSeconds</code>) during which the rekey time is randomly selected.</p>
        /// <p>Constraints: A value between 0 and 100.</p>
        /// <p>Default: <code>100</code> </p>
        pub fn rekey_fuzz_percentage(mut self, input: i32) -> Self {
            self.rekey_fuzz_percentage = Some(input);
            self
        }
        /// <p>The percentage of the rekey window (determined by <code>RekeyMarginTimeSeconds</code>) during which the rekey time is randomly selected.</p>
        /// <p>Constraints: A value between 0 and 100.</p>
        /// <p>Default: <code>100</code> </p>
        pub fn set_rekey_fuzz_percentage(mut self, input: std::option::Option<i32>) -> Self {
            self.rekey_fuzz_percentage = input;
            self
        }
        /// <p>The number of packets in an IKE replay window.</p>
        /// <p>Constraints: A value between 64 and 2048.</p>
        /// <p>Default: <code>1024</code> </p>
        pub fn replay_window_size(mut self, input: i32) -> Self {
            self.replay_window_size = Some(input);
            self
        }
        /// <p>The number of packets in an IKE replay window.</p>
        /// <p>Constraints: A value between 64 and 2048.</p>
        /// <p>Default: <code>1024</code> </p>
        pub fn set_replay_window_size(mut self, input: std::option::Option<i32>) -> Self {
            self.replay_window_size = input;
            self
        }
        /// <p>The number of seconds after which a DPD timeout occurs.</p>
        /// <p>Constraints: A value greater than or equal to 30.</p>
        /// <p>Default: <code>30</code> </p>
        pub fn dpd_timeout_seconds(mut self, input: i32) -> Self {
            self.dpd_timeout_seconds = Some(input);
            self
        }
        /// <p>The number of seconds after which a DPD timeout occurs.</p>
        /// <p>Constraints: A value greater than or equal to 30.</p>
        /// <p>Default: <code>30</code> </p>
        pub fn set_dpd_timeout_seconds(mut self, input: std::option::Option<i32>) -> Self {
            self.dpd_timeout_seconds = input;
            self
        }
        /// <p>The action to take after DPD timeout occurs. Specify <code>restart</code> to restart the IKE initiation. Specify <code>clear</code> to end the IKE session.</p>
        /// <p>Valid Values: <code>clear</code> | <code>none</code> | <code>restart</code> </p>
        /// <p>Default: <code>clear</code> </p>
        pub fn dpd_timeout_action(mut self, input: impl Into<std::string::String>) -> Self {
            self.dpd_timeout_action = Some(input.into());
            self
        }
        /// <p>The action to take after DPD timeout occurs. Specify <code>restart</code> to restart the IKE initiation. Specify <code>clear</code> to end the IKE session.</p>
        /// <p>Valid Values: <code>clear</code> | <code>none</code> | <code>restart</code> </p>
        /// <p>Default: <code>clear</code> </p>
        pub fn set_dpd_timeout_action(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.dpd_timeout_action = input;
            self
        }
        /// Appends an item to `phase1_encryption_algorithms`.
        ///
        /// To override the contents of this collection use [`set_phase1_encryption_algorithms`](Self::set_phase1_encryption_algorithms).
        ///
        /// <p>One or more encryption algorithms that are permitted for the VPN tunnel for phase 1 IKE negotiations.</p>
        /// <p>Valid values: <code>AES128</code> | <code>AES256</code> | <code>AES128-GCM-16</code> | <code>AES256-GCM-16</code> </p>
        pub fn phase1_encryption_algorithms(
            mut self,
            input: crate::model::Phase1EncryptionAlgorithmsRequestListValue,
        ) -> Self {
            let mut v = self.phase1_encryption_algorithms.unwrap_or_default();
            v.push(input);
            self.phase1_encryption_algorithms = Some(v);
            self
        }
        /// <p>One or more encryption algorithms that are permitted for the VPN tunnel for phase 1 IKE negotiations.</p>
        /// <p>Valid values: <code>AES128</code> | <code>AES256</code> | <code>AES128-GCM-16</code> | <code>AES256-GCM-16</code> </p>
        pub fn set_phase1_encryption_algorithms(
            mut self,
            input: std::option::Option<
                std::vec::Vec<crate::model::Phase1EncryptionAlgorithmsRequestListValue>,
            >,
        ) -> Self {
            self.phase1_encryption_algorithms = input;
            self
        }
        /// Appends an item to `phase2_encryption_algorithms`.
        ///
        /// To override the contents of this collection use [`set_phase2_encryption_algorithms`](Self::set_phase2_encryption_algorithms).
        ///
        /// <p>One or more encryption algorithms that are permitted for the VPN tunnel for phase 2 IKE negotiations.</p>
        /// <p>Valid values: <code>AES128</code> | <code>AES256</code> | <code>AES128-GCM-16</code> | <code>AES256-GCM-16</code> </p>
        pub fn phase2_encryption_algorithms(
            mut self,
            input: crate::model::Phase2EncryptionAlgorithmsRequestListValue,
        ) -> Self {
            let mut v = self.phase2_encryption_algorithms.unwrap_or_default();
            v.push(input);
            self.phase2_encryption_algorithms = Some(v);
            self
        }
        /// <p>One or more encryption algorithms that are permitted for the VPN tunnel for phase 2 IKE negotiations.</p>
        /// <p>Valid values: <code>AES128</code> | <code>AES256</code> | <code>AES128-GCM-16</code> | <code>AES256-GCM-16</code> </p>
        pub fn set_phase2_encryption_algorithms(
            mut self,
            input: std::option::Option<
                std::vec::Vec<crate::model::Phase2EncryptionAlgorithmsRequestListValue>,
            >,
        ) -> Self {
            self.phase2_encryption_algorithms = input;
            self
        }
        /// Appends an item to `phase1_integrity_algorithms`.
        ///
        /// To override the contents of this collection use [`set_phase1_integrity_algorithms`](Self::set_phase1_integrity_algorithms).
        ///
        /// <p>One or more integrity algorithms that are permitted for the VPN tunnel for phase 1 IKE negotiations.</p>
        /// <p>Valid values: <code>SHA1</code> | <code>SHA2-256</code> | <code>SHA2-384</code> | <code>SHA2-512</code> </p>
        pub fn phase1_integrity_algorithms(
            mut self,
            input: crate::model::Phase1IntegrityAlgorithmsRequestListValue,
        ) -> Self {
            let mut v = self.phase1_integrity_algorithms.unwrap_or_default();
            v.push(input);
            self.phase1_integrity_algorithms = Some(v);
            self
        }
        /// <p>One or more integrity algorithms that are permitted for the VPN tunnel for phase 1 IKE negotiations.</p>
        /// <p>Valid values: <code>SHA1</code> | <code>SHA2-256</code> | <code>SHA2-384</code> | <code>SHA2-512</code> </p>
        pub fn set_phase1_integrity_algorithms(
            mut self,
            input: std::option::Option<
                std::vec::Vec<crate::model::Phase1IntegrityAlgorithmsRequestListValue>,
            >,
        ) -> Self {
            self.phase1_integrity_algorithms = input;
            self
        }
        /// Appends an item to `phase2_integrity_algorithms`.
        ///
        /// To override the contents of this collection use [`set_phase2_integrity_algorithms`](Self::set_phase2_integrity_algorithms).
        ///
        /// <p>One or more integrity algorithms that are permitted for the VPN tunnel for phase 2 IKE negotiations.</p>
        /// <p>Valid values: <code>SHA1</code> | <code>SHA2-256</code> | <code>SHA2-384</code> | <code>SHA2-512</code> </p>
        pub fn phase2_integrity_algorithms(
            mut self,
            input: crate::model::Phase2IntegrityAlgorithmsRequestListValue,
        ) -> Self {
            let mut v = self.phase2_integrity_algorithms.unwrap_or_default();
            v.push(input);
            self.phase2_integrity_algorithms = Some(v);
            self
        }
        /// <p>One or more integrity algorithms that are permitted for the VPN tunnel for phase 2 IKE negotiations.</p>
        /// <p>Valid values: <code>SHA1</code> | <code>SHA2-256</code> | <code>SHA2-384</code> | <code>SHA2-512</code> </p>
        pub fn set_phase2_integrity_algorithms(
            mut self,
            input: std::option::Option<
                std::vec::Vec<crate::model::Phase2IntegrityAlgorithmsRequestListValue>,
            >,
        ) -> Self {
            self.phase2_integrity_algorithms = input;
            self
        }
        /// Appends an item to `phase1_dh_group_numbers`.
        ///
        /// To override the contents of this collection use [`set_phase1_dh_group_numbers`](Self::set_phase1_dh_group_numbers).
        ///
        /// <p>One or more Diffie-Hellman group numbers that are permitted for the VPN tunnel for phase 1 IKE negotiations.</p>
        /// <p>Valid values: <code>2</code> | <code>14</code> | <code>15</code> | <code>16</code> | <code>17</code> | <code>18</code> | <code>19</code> | <code>20</code> | <code>21</code> | <code>22</code> | <code>23</code> | <code>24</code> </p>
        pub fn phase1_dh_group_numbers(
            mut self,
            input: crate::model::Phase1DhGroupNumbersRequestListValue,
        ) -> Self {
            let mut v = self.phase1_dh_group_numbers.unwrap_or_default();
            v.push(input);
            self.phase1_dh_group_numbers = Some(v);
            self
        }
        /// <p>One or more Diffie-Hellman group numbers that are permitted for the VPN tunnel for phase 1 IKE negotiations.</p>
        /// <p>Valid values: <code>2</code> | <code>14</code> | <code>15</code> | <code>16</code> | <code>17</code> | <code>18</code> | <code>19</code> | <code>20</code> | <code>21</code> | <code>22</code> | <code>23</code> | <code>24</code> </p>
        pub fn set_phase1_dh_group_numbers(
            mut self,
            input: std::option::Option<
                std::vec::Vec<crate::model::Phase1DhGroupNumbersRequestListValue>,
            >,
        ) -> Self {
            self.phase1_dh_group_numbers = input;
            self
        }
        /// Appends an item to `phase2_dh_group_numbers`.
        ///
        /// To override the contents of this collection use [`set_phase2_dh_group_numbers`](Self::set_phase2_dh_group_numbers).
        ///
        /// <p>One or more Diffie-Hellman group numbers that are permitted for the VPN tunnel for phase 2 IKE negotiations.</p>
        /// <p>Valid values: <code>2</code> | <code>5</code> | <code>14</code> | <code>15</code> | <code>16</code> | <code>17</code> | <code>18</code> | <code>19</code> | <code>20</code> | <code>21</code> | <code>22</code> | <code>23</code> | <code>24</code> </p>
        pub fn phase2_dh_group_numbers(
            mut self,
            input: crate::model::Phase2DhGroupNumbersRequestListValue,
        ) -> Self {
            let mut v = self.phase2_dh_group_numbers.unwrap_or_default();
            v.push(input);
            self.phase2_dh_group_numbers = Some(v);
            self
        }
        /// <p>One or more Diffie-Hellman group numbers that are permitted for the VPN tunnel for phase 2 IKE negotiations.</p>
        /// <p>Valid values: <code>2</code> | <code>5</code> | <code>14</code> | <code>15</code> | <code>16</code> | <code>17</code> | <code>18</code> | <code>19</code> | <code>20</code> | <code>21</code> | <code>22</code> | <code>23</code> | <code>24</code> </p>
        pub fn set_phase2_dh_group_numbers(
            mut self,
            input: std::option::Option<
                std::vec::Vec<crate::model::Phase2DhGroupNumbersRequestListValue>,
            >,
        ) -> Self {
            self.phase2_dh_group_numbers = input;
            self
        }
        /// Appends an item to `ike_versions`.
        ///
        /// To override the contents of this collection use [`set_ike_versions`](Self::set_ike_versions).
        ///
        /// <p>The IKE versions that are permitted for the VPN tunnel.</p>
        /// <p>Valid values: <code>ikev1</code> | <code>ikev2</code> </p>
        pub fn ike_versions(mut self, input: crate::model::IkeVersionsRequestListValue) -> Self {
            let mut v = self.ike_versions.unwrap_or_default();
            v.push(input);
            self.ike_versions = Some(v);
            self
        }
        /// <p>The IKE versions that are permitted for the VPN tunnel.</p>
        /// <p>Valid values: <code>ikev1</code> | <code>ikev2</code> </p>
        pub fn set_ike_versions(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::IkeVersionsRequestListValue>>,
        ) -> Self {
            self.ike_versions = input;
            self
        }
        /// <p>The action to take when the establishing the tunnel for the VPN connection. By default, your customer gateway device must initiate the IKE negotiation and bring up the tunnel. Specify <code>start</code> for Amazon Web Services to initiate the IKE negotiation.</p>
        /// <p>Valid Values: <code>add</code> | <code>start</code> </p>
        /// <p>Default: <code>add</code> </p>
        pub fn startup_action(mut self, input: impl Into<std::string::String>) -> Self {
            self.startup_action = Some(input.into());
            self
        }
        /// <p>The action to take when the establishing the tunnel for the VPN connection. By default, your customer gateway device must initiate the IKE negotiation and bring up the tunnel. Specify <code>start</code> for Amazon Web Services to initiate the IKE negotiation.</p>
        /// <p>Valid Values: <code>add</code> | <code>start</code> </p>
        /// <p>Default: <code>add</code> </p>
        pub fn set_startup_action(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.startup_action = input;
            self
        }
        /// <p>Options for logging VPN tunnel activity.</p>
        pub fn log_options(
            mut self,
            input: crate::model::VpnTunnelLogOptionsSpecification,
        ) -> Self {
            self.log_options = Some(input);
            self
        }
        /// <p>Options for logging VPN tunnel activity.</p>
        pub fn set_log_options(
            mut self,
            input: std::option::Option<crate::model::VpnTunnelLogOptionsSpecification>,
        ) -> Self {
            self.log_options = input;
            self
        }
        /// Consumes the builder and constructs a [`ModifyVpnTunnelOptionsSpecification`](crate::model::ModifyVpnTunnelOptionsSpecification).
        pub fn build(self) -> crate::model::ModifyVpnTunnelOptionsSpecification {
            crate::model::ModifyVpnTunnelOptionsSpecification {
                tunnel_inside_cidr: self.tunnel_inside_cidr,
                tunnel_inside_ipv6_cidr: self.tunnel_inside_ipv6_cidr,
                pre_shared_key: self.pre_shared_key,
                phase1_lifetime_seconds: self.phase1_lifetime_seconds,
                phase2_lifetime_seconds: self.phase2_lifetime_seconds,
                rekey_margin_time_seconds: self.rekey_margin_time_seconds,
                rekey_fuzz_percentage: self.rekey_fuzz_percentage,
                replay_window_size: self.replay_window_size,
                dpd_timeout_seconds: self.dpd_timeout_seconds,
                dpd_timeout_action: self.dpd_timeout_action,
                phase1_encryption_algorithms: self.phase1_encryption_algorithms,
                phase2_encryption_algorithms: self.phase2_encryption_algorithms,
                phase1_integrity_algorithms: self.phase1_integrity_algorithms,
                phase2_integrity_algorithms: self.phase2_integrity_algorithms,
                phase1_dh_group_numbers: self.phase1_dh_group_numbers,
                phase2_dh_group_numbers: self.phase2_dh_group_numbers,
                ike_versions: self.ike_versions,
                startup_action: self.startup_action,
                log_options: self.log_options,
            }
        }
    }
}
impl ModifyVpnTunnelOptionsSpecification {
    /// Creates a new builder-style object to manufacture [`ModifyVpnTunnelOptionsSpecification`](crate::model::ModifyVpnTunnelOptionsSpecification).
    pub fn builder() -> crate::model::modify_vpn_tunnel_options_specification::Builder {
        crate::model::modify_vpn_tunnel_options_specification::Builder::default()
    }
}

/// <p>Options for logging VPN tunnel activity.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct VpnTunnelLogOptionsSpecification {
    /// <p>Options for sending VPN tunnel logs to CloudWatch.</p>
    #[doc(hidden)]
    pub cloud_watch_log_options:
        std::option::Option<crate::model::CloudWatchLogOptionsSpecification>,
}
impl VpnTunnelLogOptionsSpecification {
    /// <p>Options for sending VPN tunnel logs to CloudWatch.</p>
    pub fn cloud_watch_log_options(
        &self,
    ) -> std::option::Option<&crate::model::CloudWatchLogOptionsSpecification> {
        self.cloud_watch_log_options.as_ref()
    }
}
/// See [`VpnTunnelLogOptionsSpecification`](crate::model::VpnTunnelLogOptionsSpecification).
pub mod vpn_tunnel_log_options_specification {

    /// A builder for [`VpnTunnelLogOptionsSpecification`](crate::model::VpnTunnelLogOptionsSpecification).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) cloud_watch_log_options:
            std::option::Option<crate::model::CloudWatchLogOptionsSpecification>,
    }
    impl Builder {
        /// <p>Options for sending VPN tunnel logs to CloudWatch.</p>
        pub fn cloud_watch_log_options(
            mut self,
            input: crate::model::CloudWatchLogOptionsSpecification,
        ) -> Self {
            self.cloud_watch_log_options = Some(input);
            self
        }
        /// <p>Options for sending VPN tunnel logs to CloudWatch.</p>
        pub fn set_cloud_watch_log_options(
            mut self,
            input: std::option::Option<crate::model::CloudWatchLogOptionsSpecification>,
        ) -> Self {
            self.cloud_watch_log_options = input;
            self
        }
        /// Consumes the builder and constructs a [`VpnTunnelLogOptionsSpecification`](crate::model::VpnTunnelLogOptionsSpecification).
        pub fn build(self) -> crate::model::VpnTunnelLogOptionsSpecification {
            crate::model::VpnTunnelLogOptionsSpecification {
                cloud_watch_log_options: self.cloud_watch_log_options,
            }
        }
    }
}
impl VpnTunnelLogOptionsSpecification {
    /// Creates a new builder-style object to manufacture [`VpnTunnelLogOptionsSpecification`](crate::model::VpnTunnelLogOptionsSpecification).
    pub fn builder() -> crate::model::vpn_tunnel_log_options_specification::Builder {
        crate::model::vpn_tunnel_log_options_specification::Builder::default()
    }
}

/// <p>Options for sending VPN tunnel logs to CloudWatch.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CloudWatchLogOptionsSpecification {
    /// <p>Enable or disable VPN tunnel logging feature. Default value is <code>False</code>.</p>
    /// <p>Valid values: <code>True</code> | <code>False</code> </p>
    #[doc(hidden)]
    pub log_enabled: std::option::Option<bool>,
    /// <p>The Amazon Resource Name (ARN) of the CloudWatch log group to send logs to.</p>
    #[doc(hidden)]
    pub log_group_arn: std::option::Option<std::string::String>,
    /// <p>Set log format. Default format is <code>json</code>.</p>
    /// <p>Valid values: <code>json</code> | <code>text</code> </p>
    #[doc(hidden)]
    pub log_output_format: std::option::Option<std::string::String>,
}
impl CloudWatchLogOptionsSpecification {
    /// <p>Enable or disable VPN tunnel logging feature. Default value is <code>False</code>.</p>
    /// <p>Valid values: <code>True</code> | <code>False</code> </p>
    pub fn log_enabled(&self) -> std::option::Option<bool> {
        self.log_enabled
    }
    /// <p>The Amazon Resource Name (ARN) of the CloudWatch log group to send logs to.</p>
    pub fn log_group_arn(&self) -> std::option::Option<&str> {
        self.log_group_arn.as_deref()
    }
    /// <p>Set log format. Default format is <code>json</code>.</p>
    /// <p>Valid values: <code>json</code> | <code>text</code> </p>
    pub fn log_output_format(&self) -> std::option::Option<&str> {
        self.log_output_format.as_deref()
    }
}
/// See [`CloudWatchLogOptionsSpecification`](crate::model::CloudWatchLogOptionsSpecification).
pub mod cloud_watch_log_options_specification {

    /// A builder for [`CloudWatchLogOptionsSpecification`](crate::model::CloudWatchLogOptionsSpecification).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) log_enabled: std::option::Option<bool>,
        pub(crate) log_group_arn: std::option::Option<std::string::String>,
        pub(crate) log_output_format: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>Enable or disable VPN tunnel logging feature. Default value is <code>False</code>.</p>
        /// <p>Valid values: <code>True</code> | <code>False</code> </p>
        pub fn log_enabled(mut self, input: bool) -> Self {
            self.log_enabled = Some(input);
            self
        }
        /// <p>Enable or disable VPN tunnel logging feature. Default value is <code>False</code>.</p>
        /// <p>Valid values: <code>True</code> | <code>False</code> </p>
        pub fn set_log_enabled(mut self, input: std::option::Option<bool>) -> Self {
            self.log_enabled = input;
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the CloudWatch log group to send logs to.</p>
        pub fn log_group_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.log_group_arn = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the CloudWatch log group to send logs to.</p>
        pub fn set_log_group_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.log_group_arn = input;
            self
        }
        /// <p>Set log format. Default format is <code>json</code>.</p>
        /// <p>Valid values: <code>json</code> | <code>text</code> </p>
        pub fn log_output_format(mut self, input: impl Into<std::string::String>) -> Self {
            self.log_output_format = Some(input.into());
            self
        }
        /// <p>Set log format. Default format is <code>json</code>.</p>
        /// <p>Valid values: <code>json</code> | <code>text</code> </p>
        pub fn set_log_output_format(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.log_output_format = input;
            self
        }
        /// Consumes the builder and constructs a [`CloudWatchLogOptionsSpecification`](crate::model::CloudWatchLogOptionsSpecification).
        pub fn build(self) -> crate::model::CloudWatchLogOptionsSpecification {
            crate::model::CloudWatchLogOptionsSpecification {
                log_enabled: self.log_enabled,
                log_group_arn: self.log_group_arn,
                log_output_format: self.log_output_format,
            }
        }
    }
}
impl CloudWatchLogOptionsSpecification {
    /// Creates a new builder-style object to manufacture [`CloudWatchLogOptionsSpecification`](crate::model::CloudWatchLogOptionsSpecification).
    pub fn builder() -> crate::model::cloud_watch_log_options_specification::Builder {
        crate::model::cloud_watch_log_options_specification::Builder::default()
    }
}

/// <p>The IKE version that is permitted for the VPN tunnel.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct IkeVersionsRequestListValue {
    /// <p>The IKE version.</p>
    #[doc(hidden)]
    pub value: std::option::Option<std::string::String>,
}
impl IkeVersionsRequestListValue {
    /// <p>The IKE version.</p>
    pub fn value(&self) -> std::option::Option<&str> {
        self.value.as_deref()
    }
}
/// See [`IkeVersionsRequestListValue`](crate::model::IkeVersionsRequestListValue).
pub mod ike_versions_request_list_value {

    /// A builder for [`IkeVersionsRequestListValue`](crate::model::IkeVersionsRequestListValue).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) value: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The IKE version.</p>
        pub fn value(mut self, input: impl Into<std::string::String>) -> Self {
            self.value = Some(input.into());
            self
        }
        /// <p>The IKE version.</p>
        pub fn set_value(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.value = input;
            self
        }
        /// Consumes the builder and constructs a [`IkeVersionsRequestListValue`](crate::model::IkeVersionsRequestListValue).
        pub fn build(self) -> crate::model::IkeVersionsRequestListValue {
            crate::model::IkeVersionsRequestListValue { value: self.value }
        }
    }
}
impl IkeVersionsRequestListValue {
    /// Creates a new builder-style object to manufacture [`IkeVersionsRequestListValue`](crate::model::IkeVersionsRequestListValue).
    pub fn builder() -> crate::model::ike_versions_request_list_value::Builder {
        crate::model::ike_versions_request_list_value::Builder::default()
    }
}

/// <p>Specifies a Diffie-Hellman group number for the VPN tunnel for phase 2 IKE negotiations.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Phase2DhGroupNumbersRequestListValue {
    /// <p>The Diffie-Hellmann group number.</p>
    #[doc(hidden)]
    pub value: std::option::Option<i32>,
}
impl Phase2DhGroupNumbersRequestListValue {
    /// <p>The Diffie-Hellmann group number.</p>
    pub fn value(&self) -> std::option::Option<i32> {
        self.value
    }
}
/// See [`Phase2DhGroupNumbersRequestListValue`](crate::model::Phase2DhGroupNumbersRequestListValue).
pub mod phase2_dh_group_numbers_request_list_value {

    /// A builder for [`Phase2DhGroupNumbersRequestListValue`](crate::model::Phase2DhGroupNumbersRequestListValue).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) value: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>The Diffie-Hellmann group number.</p>
        pub fn value(mut self, input: i32) -> Self {
            self.value = Some(input);
            self
        }
        /// <p>The Diffie-Hellmann group number.</p>
        pub fn set_value(mut self, input: std::option::Option<i32>) -> Self {
            self.value = input;
            self
        }
        /// Consumes the builder and constructs a [`Phase2DhGroupNumbersRequestListValue`](crate::model::Phase2DhGroupNumbersRequestListValue).
        pub fn build(self) -> crate::model::Phase2DhGroupNumbersRequestListValue {
            crate::model::Phase2DhGroupNumbersRequestListValue { value: self.value }
        }
    }
}
impl Phase2DhGroupNumbersRequestListValue {
    /// Creates a new builder-style object to manufacture [`Phase2DhGroupNumbersRequestListValue`](crate::model::Phase2DhGroupNumbersRequestListValue).
    pub fn builder() -> crate::model::phase2_dh_group_numbers_request_list_value::Builder {
        crate::model::phase2_dh_group_numbers_request_list_value::Builder::default()
    }
}

/// <p>Specifies a Diffie-Hellman group number for the VPN tunnel for phase 1 IKE negotiations.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Phase1DhGroupNumbersRequestListValue {
    /// <p>The Diffie-Hellmann group number.</p>
    #[doc(hidden)]
    pub value: std::option::Option<i32>,
}
impl Phase1DhGroupNumbersRequestListValue {
    /// <p>The Diffie-Hellmann group number.</p>
    pub fn value(&self) -> std::option::Option<i32> {
        self.value
    }
}
/// See [`Phase1DhGroupNumbersRequestListValue`](crate::model::Phase1DhGroupNumbersRequestListValue).
pub mod phase1_dh_group_numbers_request_list_value {

    /// A builder for [`Phase1DhGroupNumbersRequestListValue`](crate::model::Phase1DhGroupNumbersRequestListValue).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) value: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>The Diffie-Hellmann group number.</p>
        pub fn value(mut self, input: i32) -> Self {
            self.value = Some(input);
            self
        }
        /// <p>The Diffie-Hellmann group number.</p>
        pub fn set_value(mut self, input: std::option::Option<i32>) -> Self {
            self.value = input;
            self
        }
        /// Consumes the builder and constructs a [`Phase1DhGroupNumbersRequestListValue`](crate::model::Phase1DhGroupNumbersRequestListValue).
        pub fn build(self) -> crate::model::Phase1DhGroupNumbersRequestListValue {
            crate::model::Phase1DhGroupNumbersRequestListValue { value: self.value }
        }
    }
}
impl Phase1DhGroupNumbersRequestListValue {
    /// Creates a new builder-style object to manufacture [`Phase1DhGroupNumbersRequestListValue`](crate::model::Phase1DhGroupNumbersRequestListValue).
    pub fn builder() -> crate::model::phase1_dh_group_numbers_request_list_value::Builder {
        crate::model::phase1_dh_group_numbers_request_list_value::Builder::default()
    }
}

/// <p>Specifies the integrity algorithm for the VPN tunnel for phase 2 IKE negotiations.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Phase2IntegrityAlgorithmsRequestListValue {
    /// <p>The integrity algorithm.</p>
    #[doc(hidden)]
    pub value: std::option::Option<std::string::String>,
}
impl Phase2IntegrityAlgorithmsRequestListValue {
    /// <p>The integrity algorithm.</p>
    pub fn value(&self) -> std::option::Option<&str> {
        self.value.as_deref()
    }
}
/// See [`Phase2IntegrityAlgorithmsRequestListValue`](crate::model::Phase2IntegrityAlgorithmsRequestListValue).
pub mod phase2_integrity_algorithms_request_list_value {

    /// A builder for [`Phase2IntegrityAlgorithmsRequestListValue`](crate::model::Phase2IntegrityAlgorithmsRequestListValue).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) value: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The integrity algorithm.</p>
        pub fn value(mut self, input: impl Into<std::string::String>) -> Self {
            self.value = Some(input.into());
            self
        }
        /// <p>The integrity algorithm.</p>
        pub fn set_value(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.value = input;
            self
        }
        /// Consumes the builder and constructs a [`Phase2IntegrityAlgorithmsRequestListValue`](crate::model::Phase2IntegrityAlgorithmsRequestListValue).
        pub fn build(self) -> crate::model::Phase2IntegrityAlgorithmsRequestListValue {
            crate::model::Phase2IntegrityAlgorithmsRequestListValue { value: self.value }
        }
    }
}
impl Phase2IntegrityAlgorithmsRequestListValue {
    /// Creates a new builder-style object to manufacture [`Phase2IntegrityAlgorithmsRequestListValue`](crate::model::Phase2IntegrityAlgorithmsRequestListValue).
    pub fn builder() -> crate::model::phase2_integrity_algorithms_request_list_value::Builder {
        crate::model::phase2_integrity_algorithms_request_list_value::Builder::default()
    }
}

/// <p>Specifies the integrity algorithm for the VPN tunnel for phase 1 IKE negotiations.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Phase1IntegrityAlgorithmsRequestListValue {
    /// <p>The value for the integrity algorithm.</p>
    #[doc(hidden)]
    pub value: std::option::Option<std::string::String>,
}
impl Phase1IntegrityAlgorithmsRequestListValue {
    /// <p>The value for the integrity algorithm.</p>
    pub fn value(&self) -> std::option::Option<&str> {
        self.value.as_deref()
    }
}
/// See [`Phase1IntegrityAlgorithmsRequestListValue`](crate::model::Phase1IntegrityAlgorithmsRequestListValue).
pub mod phase1_integrity_algorithms_request_list_value {

    /// A builder for [`Phase1IntegrityAlgorithmsRequestListValue`](crate::model::Phase1IntegrityAlgorithmsRequestListValue).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) value: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The value for the integrity algorithm.</p>
        pub fn value(mut self, input: impl Into<std::string::String>) -> Self {
            self.value = Some(input.into());
            self
        }
        /// <p>The value for the integrity algorithm.</p>
        pub fn set_value(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.value = input;
            self
        }
        /// Consumes the builder and constructs a [`Phase1IntegrityAlgorithmsRequestListValue`](crate::model::Phase1IntegrityAlgorithmsRequestListValue).
        pub fn build(self) -> crate::model::Phase1IntegrityAlgorithmsRequestListValue {
            crate::model::Phase1IntegrityAlgorithmsRequestListValue { value: self.value }
        }
    }
}
impl Phase1IntegrityAlgorithmsRequestListValue {
    /// Creates a new builder-style object to manufacture [`Phase1IntegrityAlgorithmsRequestListValue`](crate::model::Phase1IntegrityAlgorithmsRequestListValue).
    pub fn builder() -> crate::model::phase1_integrity_algorithms_request_list_value::Builder {
        crate::model::phase1_integrity_algorithms_request_list_value::Builder::default()
    }
}

/// <p>Specifies the encryption algorithm for the VPN tunnel for phase 2 IKE negotiations.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Phase2EncryptionAlgorithmsRequestListValue {
    /// <p>The encryption algorithm.</p>
    #[doc(hidden)]
    pub value: std::option::Option<std::string::String>,
}
impl Phase2EncryptionAlgorithmsRequestListValue {
    /// <p>The encryption algorithm.</p>
    pub fn value(&self) -> std::option::Option<&str> {
        self.value.as_deref()
    }
}
/// See [`Phase2EncryptionAlgorithmsRequestListValue`](crate::model::Phase2EncryptionAlgorithmsRequestListValue).
pub mod phase2_encryption_algorithms_request_list_value {

    /// A builder for [`Phase2EncryptionAlgorithmsRequestListValue`](crate::model::Phase2EncryptionAlgorithmsRequestListValue).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) value: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The encryption algorithm.</p>
        pub fn value(mut self, input: impl Into<std::string::String>) -> Self {
            self.value = Some(input.into());
            self
        }
        /// <p>The encryption algorithm.</p>
        pub fn set_value(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.value = input;
            self
        }
        /// Consumes the builder and constructs a [`Phase2EncryptionAlgorithmsRequestListValue`](crate::model::Phase2EncryptionAlgorithmsRequestListValue).
        pub fn build(self) -> crate::model::Phase2EncryptionAlgorithmsRequestListValue {
            crate::model::Phase2EncryptionAlgorithmsRequestListValue { value: self.value }
        }
    }
}
impl Phase2EncryptionAlgorithmsRequestListValue {
    /// Creates a new builder-style object to manufacture [`Phase2EncryptionAlgorithmsRequestListValue`](crate::model::Phase2EncryptionAlgorithmsRequestListValue).
    pub fn builder() -> crate::model::phase2_encryption_algorithms_request_list_value::Builder {
        crate::model::phase2_encryption_algorithms_request_list_value::Builder::default()
    }
}

/// <p>Specifies the encryption algorithm for the VPN tunnel for phase 1 IKE negotiations.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Phase1EncryptionAlgorithmsRequestListValue {
    /// <p>The value for the encryption algorithm.</p>
    #[doc(hidden)]
    pub value: std::option::Option<std::string::String>,
}
impl Phase1EncryptionAlgorithmsRequestListValue {
    /// <p>The value for the encryption algorithm.</p>
    pub fn value(&self) -> std::option::Option<&str> {
        self.value.as_deref()
    }
}
/// See [`Phase1EncryptionAlgorithmsRequestListValue`](crate::model::Phase1EncryptionAlgorithmsRequestListValue).
pub mod phase1_encryption_algorithms_request_list_value {

    /// A builder for [`Phase1EncryptionAlgorithmsRequestListValue`](crate::model::Phase1EncryptionAlgorithmsRequestListValue).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) value: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The value for the encryption algorithm.</p>
        pub fn value(mut self, input: impl Into<std::string::String>) -> Self {
            self.value = Some(input.into());
            self
        }
        /// <p>The value for the encryption algorithm.</p>
        pub fn set_value(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.value = input;
            self
        }
        /// Consumes the builder and constructs a [`Phase1EncryptionAlgorithmsRequestListValue`](crate::model::Phase1EncryptionAlgorithmsRequestListValue).
        pub fn build(self) -> crate::model::Phase1EncryptionAlgorithmsRequestListValue {
            crate::model::Phase1EncryptionAlgorithmsRequestListValue { value: self.value }
        }
    }
}
impl Phase1EncryptionAlgorithmsRequestListValue {
    /// Creates a new builder-style object to manufacture [`Phase1EncryptionAlgorithmsRequestListValue`](crate::model::Phase1EncryptionAlgorithmsRequestListValue).
    pub fn builder() -> crate::model::phase1_encryption_algorithms_request_list_value::Builder {
        crate::model::phase1_encryption_algorithms_request_list_value::Builder::default()
    }
}

/// When writing a match expression against `VpcTenancy`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let vpctenancy = unimplemented!();
/// match vpctenancy {
///     VpcTenancy::Default => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `vpctenancy` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `VpcTenancy::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `VpcTenancy::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `VpcTenancy::NewFeature` is defined.
/// Specifically, when `vpctenancy` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `VpcTenancy::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 VpcTenancy {
    #[allow(missing_docs)] // documentation missing in model
    Default,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for VpcTenancy {
    fn from(s: &str) -> Self {
        match s {
            "default" => VpcTenancy::Default,
            other => VpcTenancy::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for VpcTenancy {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(VpcTenancy::from(s))
    }
}
impl VpcTenancy {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            VpcTenancy::Default => "default",
            VpcTenancy::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["default"]
    }
}
impl AsRef<str> for VpcTenancy {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <note>
/// <p>We are retiring EC2-Classic. We recommend that you migrate from EC2-Classic to a VPC. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html">Migrate from EC2-Classic to a VPC</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
/// </note>
/// <p>Describes the VPC peering connection options.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct PeeringConnectionOptions {
    /// <p>If true, the public DNS hostnames of instances in the specified VPC resolve to private IP addresses when queried from instances in the peer VPC.</p>
    #[doc(hidden)]
    pub allow_dns_resolution_from_remote_vpc: std::option::Option<bool>,
    /// <p>If true, enables outbound communication from an EC2-Classic instance that's linked to a local VPC using ClassicLink to instances in a peer VPC.</p>
    #[doc(hidden)]
    pub allow_egress_from_local_classic_link_to_remote_vpc: std::option::Option<bool>,
    /// <p>If true, enables outbound communication from instances in a local VPC to an EC2-Classic instance that's linked to a peer VPC using ClassicLink.</p>
    #[doc(hidden)]
    pub allow_egress_from_local_vpc_to_remote_classic_link: std::option::Option<bool>,
}
impl PeeringConnectionOptions {
    /// <p>If true, the public DNS hostnames of instances in the specified VPC resolve to private IP addresses when queried from instances in the peer VPC.</p>
    pub fn allow_dns_resolution_from_remote_vpc(&self) -> std::option::Option<bool> {
        self.allow_dns_resolution_from_remote_vpc
    }
    /// <p>If true, enables outbound communication from an EC2-Classic instance that's linked to a local VPC using ClassicLink to instances in a peer VPC.</p>
    pub fn allow_egress_from_local_classic_link_to_remote_vpc(&self) -> std::option::Option<bool> {
        self.allow_egress_from_local_classic_link_to_remote_vpc
    }
    /// <p>If true, enables outbound communication from instances in a local VPC to an EC2-Classic instance that's linked to a peer VPC using ClassicLink.</p>
    pub fn allow_egress_from_local_vpc_to_remote_classic_link(&self) -> std::option::Option<bool> {
        self.allow_egress_from_local_vpc_to_remote_classic_link
    }
}
/// See [`PeeringConnectionOptions`](crate::model::PeeringConnectionOptions).
pub mod peering_connection_options {

    /// A builder for [`PeeringConnectionOptions`](crate::model::PeeringConnectionOptions).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) allow_dns_resolution_from_remote_vpc: std::option::Option<bool>,
        pub(crate) allow_egress_from_local_classic_link_to_remote_vpc: std::option::Option<bool>,
        pub(crate) allow_egress_from_local_vpc_to_remote_classic_link: std::option::Option<bool>,
    }
    impl Builder {
        /// <p>If true, the public DNS hostnames of instances in the specified VPC resolve to private IP addresses when queried from instances in the peer VPC.</p>
        pub fn allow_dns_resolution_from_remote_vpc(mut self, input: bool) -> Self {
            self.allow_dns_resolution_from_remote_vpc = Some(input);
            self
        }
        /// <p>If true, the public DNS hostnames of instances in the specified VPC resolve to private IP addresses when queried from instances in the peer VPC.</p>
        pub fn set_allow_dns_resolution_from_remote_vpc(
            mut self,
            input: std::option::Option<bool>,
        ) -> Self {
            self.allow_dns_resolution_from_remote_vpc = input;
            self
        }
        /// <p>If true, enables outbound communication from an EC2-Classic instance that's linked to a local VPC using ClassicLink to instances in a peer VPC.</p>
        pub fn allow_egress_from_local_classic_link_to_remote_vpc(mut self, input: bool) -> Self {
            self.allow_egress_from_local_classic_link_to_remote_vpc = Some(input);
            self
        }
        /// <p>If true, enables outbound communication from an EC2-Classic instance that's linked to a local VPC using ClassicLink to instances in a peer VPC.</p>
        pub fn set_allow_egress_from_local_classic_link_to_remote_vpc(
            mut self,
            input: std::option::Option<bool>,
        ) -> Self {
            self.allow_egress_from_local_classic_link_to_remote_vpc = input;
            self
        }
        /// <p>If true, enables outbound communication from instances in a local VPC to an EC2-Classic instance that's linked to a peer VPC using ClassicLink.</p>
        pub fn allow_egress_from_local_vpc_to_remote_classic_link(mut self, input: bool) -> Self {
            self.allow_egress_from_local_vpc_to_remote_classic_link = Some(input);
            self
        }
        /// <p>If true, enables outbound communication from instances in a local VPC to an EC2-Classic instance that's linked to a peer VPC using ClassicLink.</p>
        pub fn set_allow_egress_from_local_vpc_to_remote_classic_link(
            mut self,
            input: std::option::Option<bool>,
        ) -> Self {
            self.allow_egress_from_local_vpc_to_remote_classic_link = input;
            self
        }
        /// Consumes the builder and constructs a [`PeeringConnectionOptions`](crate::model::PeeringConnectionOptions).
        pub fn build(self) -> crate::model::PeeringConnectionOptions {
            crate::model::PeeringConnectionOptions {
                allow_dns_resolution_from_remote_vpc: self.allow_dns_resolution_from_remote_vpc,
                allow_egress_from_local_classic_link_to_remote_vpc: self
                    .allow_egress_from_local_classic_link_to_remote_vpc,
                allow_egress_from_local_vpc_to_remote_classic_link: self
                    .allow_egress_from_local_vpc_to_remote_classic_link,
            }
        }
    }
}
impl PeeringConnectionOptions {
    /// Creates a new builder-style object to manufacture [`PeeringConnectionOptions`](crate::model::PeeringConnectionOptions).
    pub fn builder() -> crate::model::peering_connection_options::Builder {
        crate::model::peering_connection_options::Builder::default()
    }
}

/// <note>
/// <p>We are retiring EC2-Classic. We recommend that you migrate from EC2-Classic to a VPC. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html">Migrate from EC2-Classic to a VPC</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
/// </note>
/// <p>The VPC peering connection options.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct PeeringConnectionOptionsRequest {
    /// <p>If true, enables a local VPC to resolve public DNS hostnames to private IP addresses when queried from instances in the peer VPC.</p>
    #[doc(hidden)]
    pub allow_dns_resolution_from_remote_vpc: std::option::Option<bool>,
    /// <p>If true, enables outbound communication from an EC2-Classic instance that's linked to a local VPC using ClassicLink to instances in a peer VPC.</p>
    #[doc(hidden)]
    pub allow_egress_from_local_classic_link_to_remote_vpc: std::option::Option<bool>,
    /// <p>If true, enables outbound communication from instances in a local VPC to an EC2-Classic instance that's linked to a peer VPC using ClassicLink.</p>
    #[doc(hidden)]
    pub allow_egress_from_local_vpc_to_remote_classic_link: std::option::Option<bool>,
}
impl PeeringConnectionOptionsRequest {
    /// <p>If true, enables a local VPC to resolve public DNS hostnames to private IP addresses when queried from instances in the peer VPC.</p>
    pub fn allow_dns_resolution_from_remote_vpc(&self) -> std::option::Option<bool> {
        self.allow_dns_resolution_from_remote_vpc
    }
    /// <p>If true, enables outbound communication from an EC2-Classic instance that's linked to a local VPC using ClassicLink to instances in a peer VPC.</p>
    pub fn allow_egress_from_local_classic_link_to_remote_vpc(&self) -> std::option::Option<bool> {
        self.allow_egress_from_local_classic_link_to_remote_vpc
    }
    /// <p>If true, enables outbound communication from instances in a local VPC to an EC2-Classic instance that's linked to a peer VPC using ClassicLink.</p>
    pub fn allow_egress_from_local_vpc_to_remote_classic_link(&self) -> std::option::Option<bool> {
        self.allow_egress_from_local_vpc_to_remote_classic_link
    }
}
/// See [`PeeringConnectionOptionsRequest`](crate::model::PeeringConnectionOptionsRequest).
pub mod peering_connection_options_request {

    /// A builder for [`PeeringConnectionOptionsRequest`](crate::model::PeeringConnectionOptionsRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) allow_dns_resolution_from_remote_vpc: std::option::Option<bool>,
        pub(crate) allow_egress_from_local_classic_link_to_remote_vpc: std::option::Option<bool>,
        pub(crate) allow_egress_from_local_vpc_to_remote_classic_link: std::option::Option<bool>,
    }
    impl Builder {
        /// <p>If true, enables a local VPC to resolve public DNS hostnames to private IP addresses when queried from instances in the peer VPC.</p>
        pub fn allow_dns_resolution_from_remote_vpc(mut self, input: bool) -> Self {
            self.allow_dns_resolution_from_remote_vpc = Some(input);
            self
        }
        /// <p>If true, enables a local VPC to resolve public DNS hostnames to private IP addresses when queried from instances in the peer VPC.</p>
        pub fn set_allow_dns_resolution_from_remote_vpc(
            mut self,
            input: std::option::Option<bool>,
        ) -> Self {
            self.allow_dns_resolution_from_remote_vpc = input;
            self
        }
        /// <p>If true, enables outbound communication from an EC2-Classic instance that's linked to a local VPC using ClassicLink to instances in a peer VPC.</p>
        pub fn allow_egress_from_local_classic_link_to_remote_vpc(mut self, input: bool) -> Self {
            self.allow_egress_from_local_classic_link_to_remote_vpc = Some(input);
            self
        }
        /// <p>If true, enables outbound communication from an EC2-Classic instance that's linked to a local VPC using ClassicLink to instances in a peer VPC.</p>
        pub fn set_allow_egress_from_local_classic_link_to_remote_vpc(
            mut self,
            input: std::option::Option<bool>,
        ) -> Self {
            self.allow_egress_from_local_classic_link_to_remote_vpc = input;
            self
        }
        /// <p>If true, enables outbound communication from instances in a local VPC to an EC2-Classic instance that's linked to a peer VPC using ClassicLink.</p>
        pub fn allow_egress_from_local_vpc_to_remote_classic_link(mut self, input: bool) -> Self {
            self.allow_egress_from_local_vpc_to_remote_classic_link = Some(input);
            self
        }
        /// <p>If true, enables outbound communication from instances in a local VPC to an EC2-Classic instance that's linked to a peer VPC using ClassicLink.</p>
        pub fn set_allow_egress_from_local_vpc_to_remote_classic_link(
            mut self,
            input: std::option::Option<bool>,
        ) -> Self {
            self.allow_egress_from_local_vpc_to_remote_classic_link = input;
            self
        }
        /// Consumes the builder and constructs a [`PeeringConnectionOptionsRequest`](crate::model::PeeringConnectionOptionsRequest).
        pub fn build(self) -> crate::model::PeeringConnectionOptionsRequest {
            crate::model::PeeringConnectionOptionsRequest {
                allow_dns_resolution_from_remote_vpc: self.allow_dns_resolution_from_remote_vpc,
                allow_egress_from_local_classic_link_to_remote_vpc: self
                    .allow_egress_from_local_classic_link_to_remote_vpc,
                allow_egress_from_local_vpc_to_remote_classic_link: self
                    .allow_egress_from_local_vpc_to_remote_classic_link,
            }
        }
    }
}
impl PeeringConnectionOptionsRequest {
    /// Creates a new builder-style object to manufacture [`PeeringConnectionOptionsRequest`](crate::model::PeeringConnectionOptionsRequest).
    pub fn builder() -> crate::model::peering_connection_options_request::Builder {
        crate::model::peering_connection_options_request::Builder::default()
    }
}

/// <p>Describes a principal.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AddedPrincipal {
    /// <p>The type of principal.</p>
    #[doc(hidden)]
    pub principal_type: std::option::Option<crate::model::PrincipalType>,
    /// <p>The Amazon Resource Name (ARN) of the principal.</p>
    #[doc(hidden)]
    pub principal: std::option::Option<std::string::String>,
    /// <p>The ID of the service permission.</p>
    #[doc(hidden)]
    pub service_permission_id: std::option::Option<std::string::String>,
    /// <p>The ID of the service.</p>
    #[doc(hidden)]
    pub service_id: std::option::Option<std::string::String>,
}
impl AddedPrincipal {
    /// <p>The type of principal.</p>
    pub fn principal_type(&self) -> std::option::Option<&crate::model::PrincipalType> {
        self.principal_type.as_ref()
    }
    /// <p>The Amazon Resource Name (ARN) of the principal.</p>
    pub fn principal(&self) -> std::option::Option<&str> {
        self.principal.as_deref()
    }
    /// <p>The ID of the service permission.</p>
    pub fn service_permission_id(&self) -> std::option::Option<&str> {
        self.service_permission_id.as_deref()
    }
    /// <p>The ID of the service.</p>
    pub fn service_id(&self) -> std::option::Option<&str> {
        self.service_id.as_deref()
    }
}
/// See [`AddedPrincipal`](crate::model::AddedPrincipal).
pub mod added_principal {

    /// A builder for [`AddedPrincipal`](crate::model::AddedPrincipal).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) principal_type: std::option::Option<crate::model::PrincipalType>,
        pub(crate) principal: std::option::Option<std::string::String>,
        pub(crate) service_permission_id: std::option::Option<std::string::String>,
        pub(crate) service_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The type of principal.</p>
        pub fn principal_type(mut self, input: crate::model::PrincipalType) -> Self {
            self.principal_type = Some(input);
            self
        }
        /// <p>The type of principal.</p>
        pub fn set_principal_type(
            mut self,
            input: std::option::Option<crate::model::PrincipalType>,
        ) -> Self {
            self.principal_type = input;
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the principal.</p>
        pub fn principal(mut self, input: impl Into<std::string::String>) -> Self {
            self.principal = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the principal.</p>
        pub fn set_principal(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.principal = input;
            self
        }
        /// <p>The ID of the service permission.</p>
        pub fn service_permission_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.service_permission_id = Some(input.into());
            self
        }
        /// <p>The ID of the service permission.</p>
        pub fn set_service_permission_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.service_permission_id = input;
            self
        }
        /// <p>The ID of the service.</p>
        pub fn service_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.service_id = Some(input.into());
            self
        }
        /// <p>The ID of the service.</p>
        pub fn set_service_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.service_id = input;
            self
        }
        /// Consumes the builder and constructs a [`AddedPrincipal`](crate::model::AddedPrincipal).
        pub fn build(self) -> crate::model::AddedPrincipal {
            crate::model::AddedPrincipal {
                principal_type: self.principal_type,
                principal: self.principal,
                service_permission_id: self.service_permission_id,
                service_id: self.service_id,
            }
        }
    }
}
impl AddedPrincipal {
    /// Creates a new builder-style object to manufacture [`AddedPrincipal`](crate::model::AddedPrincipal).
    pub fn builder() -> crate::model::added_principal::Builder {
        crate::model::added_principal::Builder::default()
    }
}

/// When writing a match expression against `PrincipalType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let principaltype = unimplemented!();
/// match principaltype {
///     PrincipalType::Account => { /* ... */ },
///     PrincipalType::All => { /* ... */ },
///     PrincipalType::OrganizationUnit => { /* ... */ },
///     PrincipalType::Role => { /* ... */ },
///     PrincipalType::Service => { /* ... */ },
///     PrincipalType::User => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `principaltype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `PrincipalType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `PrincipalType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `PrincipalType::NewFeature` is defined.
/// Specifically, when `principaltype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `PrincipalType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 PrincipalType {
    #[allow(missing_docs)] // documentation missing in model
    Account,
    #[allow(missing_docs)] // documentation missing in model
    All,
    #[allow(missing_docs)] // documentation missing in model
    OrganizationUnit,
    #[allow(missing_docs)] // documentation missing in model
    Role,
    #[allow(missing_docs)] // documentation missing in model
    Service,
    #[allow(missing_docs)] // documentation missing in model
    User,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for PrincipalType {
    fn from(s: &str) -> Self {
        match s {
            "Account" => PrincipalType::Account,
            "All" => PrincipalType::All,
            "OrganizationUnit" => PrincipalType::OrganizationUnit,
            "Role" => PrincipalType::Role,
            "Service" => PrincipalType::Service,
            "User" => PrincipalType::User,
            other => PrincipalType::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for PrincipalType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(PrincipalType::from(s))
    }
}
impl PrincipalType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            PrincipalType::Account => "Account",
            PrincipalType::All => "All",
            PrincipalType::OrganizationUnit => "OrganizationUnit",
            PrincipalType::Role => "Role",
            PrincipalType::Service => "Service",
            PrincipalType::User => "User",
            PrincipalType::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &[
            "Account",
            "All",
            "OrganizationUnit",
            "Role",
            "Service",
            "User",
        ]
    }
}
impl AsRef<str> for PrincipalType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `PayerResponsibility`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let payerresponsibility = unimplemented!();
/// match payerresponsibility {
///     PayerResponsibility::ServiceOwner => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `payerresponsibility` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `PayerResponsibility::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `PayerResponsibility::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `PayerResponsibility::NewFeature` is defined.
/// Specifically, when `payerresponsibility` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `PayerResponsibility::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 PayerResponsibility {
    #[allow(missing_docs)] // documentation missing in model
    ServiceOwner,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for PayerResponsibility {
    fn from(s: &str) -> Self {
        match s {
            "ServiceOwner" => PayerResponsibility::ServiceOwner,
            other => {
                PayerResponsibility::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for PayerResponsibility {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(PayerResponsibility::from(s))
    }
}
impl PayerResponsibility {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            PayerResponsibility::ServiceOwner => "ServiceOwner",
            PayerResponsibility::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["ServiceOwner"]
    }
}
impl AsRef<str> for PayerResponsibility {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes the DNS options for an endpoint.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DnsOptionsSpecification {
    /// <p>The DNS records created for the endpoint.</p>
    #[doc(hidden)]
    pub dns_record_ip_type: std::option::Option<crate::model::DnsRecordIpType>,
}
impl DnsOptionsSpecification {
    /// <p>The DNS records created for the endpoint.</p>
    pub fn dns_record_ip_type(&self) -> std::option::Option<&crate::model::DnsRecordIpType> {
        self.dns_record_ip_type.as_ref()
    }
}
/// See [`DnsOptionsSpecification`](crate::model::DnsOptionsSpecification).
pub mod dns_options_specification {

    /// A builder for [`DnsOptionsSpecification`](crate::model::DnsOptionsSpecification).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) dns_record_ip_type: std::option::Option<crate::model::DnsRecordIpType>,
    }
    impl Builder {
        /// <p>The DNS records created for the endpoint.</p>
        pub fn dns_record_ip_type(mut self, input: crate::model::DnsRecordIpType) -> Self {
            self.dns_record_ip_type = Some(input);
            self
        }
        /// <p>The DNS records created for the endpoint.</p>
        pub fn set_dns_record_ip_type(
            mut self,
            input: std::option::Option<crate::model::DnsRecordIpType>,
        ) -> Self {
            self.dns_record_ip_type = input;
            self
        }
        /// Consumes the builder and constructs a [`DnsOptionsSpecification`](crate::model::DnsOptionsSpecification).
        pub fn build(self) -> crate::model::DnsOptionsSpecification {
            crate::model::DnsOptionsSpecification {
                dns_record_ip_type: self.dns_record_ip_type,
            }
        }
    }
}
impl DnsOptionsSpecification {
    /// Creates a new builder-style object to manufacture [`DnsOptionsSpecification`](crate::model::DnsOptionsSpecification).
    pub fn builder() -> crate::model::dns_options_specification::Builder {
        crate::model::dns_options_specification::Builder::default()
    }
}

/// When writing a match expression against `DnsRecordIpType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let dnsrecordiptype = unimplemented!();
/// match dnsrecordiptype {
///     DnsRecordIpType::Dualstack => { /* ... */ },
///     DnsRecordIpType::Ipv4 => { /* ... */ },
///     DnsRecordIpType::Ipv6 => { /* ... */ },
///     DnsRecordIpType::ServiceDefined => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `dnsrecordiptype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `DnsRecordIpType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `DnsRecordIpType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `DnsRecordIpType::NewFeature` is defined.
/// Specifically, when `dnsrecordiptype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `DnsRecordIpType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 DnsRecordIpType {
    #[allow(missing_docs)] // documentation missing in model
    Dualstack,
    #[allow(missing_docs)] // documentation missing in model
    Ipv4,
    #[allow(missing_docs)] // documentation missing in model
    Ipv6,
    #[allow(missing_docs)] // documentation missing in model
    ServiceDefined,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for DnsRecordIpType {
    fn from(s: &str) -> Self {
        match s {
            "dualstack" => DnsRecordIpType::Dualstack,
            "ipv4" => DnsRecordIpType::Ipv4,
            "ipv6" => DnsRecordIpType::Ipv6,
            "service-defined" => DnsRecordIpType::ServiceDefined,
            other => DnsRecordIpType::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for DnsRecordIpType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(DnsRecordIpType::from(s))
    }
}
impl DnsRecordIpType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            DnsRecordIpType::Dualstack => "dualstack",
            DnsRecordIpType::Ipv4 => "ipv4",
            DnsRecordIpType::Ipv6 => "ipv6",
            DnsRecordIpType::ServiceDefined => "service-defined",
            DnsRecordIpType::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["dualstack", "ipv4", "ipv6", "service-defined"]
    }
}
impl AsRef<str> for DnsRecordIpType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `IpAddressType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let ipaddresstype = unimplemented!();
/// match ipaddresstype {
///     IpAddressType::Dualstack => { /* ... */ },
///     IpAddressType::Ipv4 => { /* ... */ },
///     IpAddressType::Ipv6 => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `ipaddresstype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `IpAddressType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `IpAddressType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `IpAddressType::NewFeature` is defined.
/// Specifically, when `ipaddresstype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `IpAddressType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 IpAddressType {
    #[allow(missing_docs)] // documentation missing in model
    Dualstack,
    #[allow(missing_docs)] // documentation missing in model
    Ipv4,
    #[allow(missing_docs)] // documentation missing in model
    Ipv6,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for IpAddressType {
    fn from(s: &str) -> Self {
        match s {
            "dualstack" => IpAddressType::Dualstack,
            "ipv4" => IpAddressType::Ipv4,
            "ipv6" => IpAddressType::Ipv6,
            other => IpAddressType::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for IpAddressType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(IpAddressType::from(s))
    }
}
impl IpAddressType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            IpAddressType::Dualstack => "dualstack",
            IpAddressType::Ipv4 => "ipv4",
            IpAddressType::Ipv6 => "ipv6",
            IpAddressType::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["dualstack", "ipv4", "ipv6"]
    }
}
impl AsRef<str> for IpAddressType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes a value for a resource attribute that is a Boolean value.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AttributeBooleanValue {
    /// <p>The attribute value. The valid values are <code>true</code> or <code>false</code>.</p>
    #[doc(hidden)]
    pub value: std::option::Option<bool>,
}
impl AttributeBooleanValue {
    /// <p>The attribute value. The valid values are <code>true</code> or <code>false</code>.</p>
    pub fn value(&self) -> std::option::Option<bool> {
        self.value
    }
}
/// See [`AttributeBooleanValue`](crate::model::AttributeBooleanValue).
pub mod attribute_boolean_value {

    /// A builder for [`AttributeBooleanValue`](crate::model::AttributeBooleanValue).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) value: std::option::Option<bool>,
    }
    impl Builder {
        /// <p>The attribute value. The valid values are <code>true</code> or <code>false</code>.</p>
        pub fn value(mut self, input: bool) -> Self {
            self.value = Some(input);
            self
        }
        /// <p>The attribute value. The valid values are <code>true</code> or <code>false</code>.</p>
        pub fn set_value(mut self, input: std::option::Option<bool>) -> Self {
            self.value = input;
            self
        }
        /// Consumes the builder and constructs a [`AttributeBooleanValue`](crate::model::AttributeBooleanValue).
        pub fn build(self) -> crate::model::AttributeBooleanValue {
            crate::model::AttributeBooleanValue { value: self.value }
        }
    }
}
impl AttributeBooleanValue {
    /// Creates a new builder-style object to manufacture [`AttributeBooleanValue`](crate::model::AttributeBooleanValue).
    pub fn builder() -> crate::model::attribute_boolean_value::Builder {
        crate::model::attribute_boolean_value::Builder::default()
    }
}

/// <p>Describes the modification status of an EBS volume.</p>
/// <p>If the volume has never been modified, some element values will be null.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct VolumeModification {
    /// <p>The ID of the volume.</p>
    #[doc(hidden)]
    pub volume_id: std::option::Option<std::string::String>,
    /// <p>The current modification state. The modification state is null for unmodified volumes.</p>
    #[doc(hidden)]
    pub modification_state: std::option::Option<crate::model::VolumeModificationState>,
    /// <p>A status message about the modification progress or failure.</p>
    #[doc(hidden)]
    pub status_message: std::option::Option<std::string::String>,
    /// <p>The target size of the volume, in GiB.</p>
    #[doc(hidden)]
    pub target_size: std::option::Option<i32>,
    /// <p>The target IOPS rate of the volume.</p>
    #[doc(hidden)]
    pub target_iops: std::option::Option<i32>,
    /// <p>The target EBS volume type of the volume.</p>
    #[doc(hidden)]
    pub target_volume_type: std::option::Option<crate::model::VolumeType>,
    /// <p>The target throughput of the volume, in MiB/s.</p>
    #[doc(hidden)]
    pub target_throughput: std::option::Option<i32>,
    /// <p>The target setting for Amazon EBS Multi-Attach.</p>
    #[doc(hidden)]
    pub target_multi_attach_enabled: std::option::Option<bool>,
    /// <p>The original size of the volume, in GiB.</p>
    #[doc(hidden)]
    pub original_size: std::option::Option<i32>,
    /// <p>The original IOPS rate of the volume.</p>
    #[doc(hidden)]
    pub original_iops: std::option::Option<i32>,
    /// <p>The original EBS volume type of the volume.</p>
    #[doc(hidden)]
    pub original_volume_type: std::option::Option<crate::model::VolumeType>,
    /// <p>The original throughput of the volume, in MiB/s.</p>
    #[doc(hidden)]
    pub original_throughput: std::option::Option<i32>,
    /// <p>The original setting for Amazon EBS Multi-Attach.</p>
    #[doc(hidden)]
    pub original_multi_attach_enabled: std::option::Option<bool>,
    /// <p>The modification progress, from 0 to 100 percent complete.</p>
    #[doc(hidden)]
    pub progress: std::option::Option<i64>,
    /// <p>The modification start time.</p>
    #[doc(hidden)]
    pub start_time: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The modification completion or failure time.</p>
    #[doc(hidden)]
    pub end_time: std::option::Option<aws_smithy_types::DateTime>,
}
impl VolumeModification {
    /// <p>The ID of the volume.</p>
    pub fn volume_id(&self) -> std::option::Option<&str> {
        self.volume_id.as_deref()
    }
    /// <p>The current modification state. The modification state is null for unmodified volumes.</p>
    pub fn modification_state(
        &self,
    ) -> std::option::Option<&crate::model::VolumeModificationState> {
        self.modification_state.as_ref()
    }
    /// <p>A status message about the modification progress or failure.</p>
    pub fn status_message(&self) -> std::option::Option<&str> {
        self.status_message.as_deref()
    }
    /// <p>The target size of the volume, in GiB.</p>
    pub fn target_size(&self) -> std::option::Option<i32> {
        self.target_size
    }
    /// <p>The target IOPS rate of the volume.</p>
    pub fn target_iops(&self) -> std::option::Option<i32> {
        self.target_iops
    }
    /// <p>The target EBS volume type of the volume.</p>
    pub fn target_volume_type(&self) -> std::option::Option<&crate::model::VolumeType> {
        self.target_volume_type.as_ref()
    }
    /// <p>The target throughput of the volume, in MiB/s.</p>
    pub fn target_throughput(&self) -> std::option::Option<i32> {
        self.target_throughput
    }
    /// <p>The target setting for Amazon EBS Multi-Attach.</p>
    pub fn target_multi_attach_enabled(&self) -> std::option::Option<bool> {
        self.target_multi_attach_enabled
    }
    /// <p>The original size of the volume, in GiB.</p>
    pub fn original_size(&self) -> std::option::Option<i32> {
        self.original_size
    }
    /// <p>The original IOPS rate of the volume.</p>
    pub fn original_iops(&self) -> std::option::Option<i32> {
        self.original_iops
    }
    /// <p>The original EBS volume type of the volume.</p>
    pub fn original_volume_type(&self) -> std::option::Option<&crate::model::VolumeType> {
        self.original_volume_type.as_ref()
    }
    /// <p>The original throughput of the volume, in MiB/s.</p>
    pub fn original_throughput(&self) -> std::option::Option<i32> {
        self.original_throughput
    }
    /// <p>The original setting for Amazon EBS Multi-Attach.</p>
    pub fn original_multi_attach_enabled(&self) -> std::option::Option<bool> {
        self.original_multi_attach_enabled
    }
    /// <p>The modification progress, from 0 to 100 percent complete.</p>
    pub fn progress(&self) -> std::option::Option<i64> {
        self.progress
    }
    /// <p>The modification start time.</p>
    pub fn start_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.start_time.as_ref()
    }
    /// <p>The modification completion or failure time.</p>
    pub fn end_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.end_time.as_ref()
    }
}
/// See [`VolumeModification`](crate::model::VolumeModification).
pub mod volume_modification {

    /// A builder for [`VolumeModification`](crate::model::VolumeModification).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) volume_id: std::option::Option<std::string::String>,
        pub(crate) modification_state: std::option::Option<crate::model::VolumeModificationState>,
        pub(crate) status_message: std::option::Option<std::string::String>,
        pub(crate) target_size: std::option::Option<i32>,
        pub(crate) target_iops: std::option::Option<i32>,
        pub(crate) target_volume_type: std::option::Option<crate::model::VolumeType>,
        pub(crate) target_throughput: std::option::Option<i32>,
        pub(crate) target_multi_attach_enabled: std::option::Option<bool>,
        pub(crate) original_size: std::option::Option<i32>,
        pub(crate) original_iops: std::option::Option<i32>,
        pub(crate) original_volume_type: std::option::Option<crate::model::VolumeType>,
        pub(crate) original_throughput: std::option::Option<i32>,
        pub(crate) original_multi_attach_enabled: std::option::Option<bool>,
        pub(crate) progress: std::option::Option<i64>,
        pub(crate) start_time: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) end_time: std::option::Option<aws_smithy_types::DateTime>,
    }
    impl Builder {
        /// <p>The ID of the volume.</p>
        pub fn volume_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.volume_id = Some(input.into());
            self
        }
        /// <p>The ID of the volume.</p>
        pub fn set_volume_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.volume_id = input;
            self
        }
        /// <p>The current modification state. The modification state is null for unmodified volumes.</p>
        pub fn modification_state(mut self, input: crate::model::VolumeModificationState) -> Self {
            self.modification_state = Some(input);
            self
        }
        /// <p>The current modification state. The modification state is null for unmodified volumes.</p>
        pub fn set_modification_state(
            mut self,
            input: std::option::Option<crate::model::VolumeModificationState>,
        ) -> Self {
            self.modification_state = input;
            self
        }
        /// <p>A status message about the modification progress or failure.</p>
        pub fn status_message(mut self, input: impl Into<std::string::String>) -> Self {
            self.status_message = Some(input.into());
            self
        }
        /// <p>A status message about the modification progress or failure.</p>
        pub fn set_status_message(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.status_message = input;
            self
        }
        /// <p>The target size of the volume, in GiB.</p>
        pub fn target_size(mut self, input: i32) -> Self {
            self.target_size = Some(input);
            self
        }
        /// <p>The target size of the volume, in GiB.</p>
        pub fn set_target_size(mut self, input: std::option::Option<i32>) -> Self {
            self.target_size = input;
            self
        }
        /// <p>The target IOPS rate of the volume.</p>
        pub fn target_iops(mut self, input: i32) -> Self {
            self.target_iops = Some(input);
            self
        }
        /// <p>The target IOPS rate of the volume.</p>
        pub fn set_target_iops(mut self, input: std::option::Option<i32>) -> Self {
            self.target_iops = input;
            self
        }
        /// <p>The target EBS volume type of the volume.</p>
        pub fn target_volume_type(mut self, input: crate::model::VolumeType) -> Self {
            self.target_volume_type = Some(input);
            self
        }
        /// <p>The target EBS volume type of the volume.</p>
        pub fn set_target_volume_type(
            mut self,
            input: std::option::Option<crate::model::VolumeType>,
        ) -> Self {
            self.target_volume_type = input;
            self
        }
        /// <p>The target throughput of the volume, in MiB/s.</p>
        pub fn target_throughput(mut self, input: i32) -> Self {
            self.target_throughput = Some(input);
            self
        }
        /// <p>The target throughput of the volume, in MiB/s.</p>
        pub fn set_target_throughput(mut self, input: std::option::Option<i32>) -> Self {
            self.target_throughput = input;
            self
        }
        /// <p>The target setting for Amazon EBS Multi-Attach.</p>
        pub fn target_multi_attach_enabled(mut self, input: bool) -> Self {
            self.target_multi_attach_enabled = Some(input);
            self
        }
        /// <p>The target setting for Amazon EBS Multi-Attach.</p>
        pub fn set_target_multi_attach_enabled(mut self, input: std::option::Option<bool>) -> Self {
            self.target_multi_attach_enabled = input;
            self
        }
        /// <p>The original size of the volume, in GiB.</p>
        pub fn original_size(mut self, input: i32) -> Self {
            self.original_size = Some(input);
            self
        }
        /// <p>The original size of the volume, in GiB.</p>
        pub fn set_original_size(mut self, input: std::option::Option<i32>) -> Self {
            self.original_size = input;
            self
        }
        /// <p>The original IOPS rate of the volume.</p>
        pub fn original_iops(mut self, input: i32) -> Self {
            self.original_iops = Some(input);
            self
        }
        /// <p>The original IOPS rate of the volume.</p>
        pub fn set_original_iops(mut self, input: std::option::Option<i32>) -> Self {
            self.original_iops = input;
            self
        }
        /// <p>The original EBS volume type of the volume.</p>
        pub fn original_volume_type(mut self, input: crate::model::VolumeType) -> Self {
            self.original_volume_type = Some(input);
            self
        }
        /// <p>The original EBS volume type of the volume.</p>
        pub fn set_original_volume_type(
            mut self,
            input: std::option::Option<crate::model::VolumeType>,
        ) -> Self {
            self.original_volume_type = input;
            self
        }
        /// <p>The original throughput of the volume, in MiB/s.</p>
        pub fn original_throughput(mut self, input: i32) -> Self {
            self.original_throughput = Some(input);
            self
        }
        /// <p>The original throughput of the volume, in MiB/s.</p>
        pub fn set_original_throughput(mut self, input: std::option::Option<i32>) -> Self {
            self.original_throughput = input;
            self
        }
        /// <p>The original setting for Amazon EBS Multi-Attach.</p>
        pub fn original_multi_attach_enabled(mut self, input: bool) -> Self {
            self.original_multi_attach_enabled = Some(input);
            self
        }
        /// <p>The original setting for Amazon EBS Multi-Attach.</p>
        pub fn set_original_multi_attach_enabled(
            mut self,
            input: std::option::Option<bool>,
        ) -> Self {
            self.original_multi_attach_enabled = input;
            self
        }
        /// <p>The modification progress, from 0 to 100 percent complete.</p>
        pub fn progress(mut self, input: i64) -> Self {
            self.progress = Some(input);
            self
        }
        /// <p>The modification progress, from 0 to 100 percent complete.</p>
        pub fn set_progress(mut self, input: std::option::Option<i64>) -> Self {
            self.progress = input;
            self
        }
        /// <p>The modification start time.</p>
        pub fn start_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.start_time = Some(input);
            self
        }
        /// <p>The modification start time.</p>
        pub fn set_start_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.start_time = input;
            self
        }
        /// <p>The modification completion or failure time.</p>
        pub fn end_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.end_time = Some(input);
            self
        }
        /// <p>The modification completion or failure time.</p>
        pub fn set_end_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.end_time = input;
            self
        }
        /// Consumes the builder and constructs a [`VolumeModification`](crate::model::VolumeModification).
        pub fn build(self) -> crate::model::VolumeModification {
            crate::model::VolumeModification {
                volume_id: self.volume_id,
                modification_state: self.modification_state,
                status_message: self.status_message,
                target_size: self.target_size,
                target_iops: self.target_iops,
                target_volume_type: self.target_volume_type,
                target_throughput: self.target_throughput,
                target_multi_attach_enabled: self.target_multi_attach_enabled,
                original_size: self.original_size,
                original_iops: self.original_iops,
                original_volume_type: self.original_volume_type,
                original_throughput: self.original_throughput,
                original_multi_attach_enabled: self.original_multi_attach_enabled,
                progress: self.progress,
                start_time: self.start_time,
                end_time: self.end_time,
            }
        }
    }
}
impl VolumeModification {
    /// Creates a new builder-style object to manufacture [`VolumeModification`](crate::model::VolumeModification).
    pub fn builder() -> crate::model::volume_modification::Builder {
        crate::model::volume_modification::Builder::default()
    }
}

/// When writing a match expression against `VolumeModificationState`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let volumemodificationstate = unimplemented!();
/// match volumemodificationstate {
///     VolumeModificationState::Completed => { /* ... */ },
///     VolumeModificationState::Failed => { /* ... */ },
///     VolumeModificationState::Modifying => { /* ... */ },
///     VolumeModificationState::Optimizing => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `volumemodificationstate` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `VolumeModificationState::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `VolumeModificationState::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `VolumeModificationState::NewFeature` is defined.
/// Specifically, when `volumemodificationstate` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `VolumeModificationState::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 VolumeModificationState {
    #[allow(missing_docs)] // documentation missing in model
    Completed,
    #[allow(missing_docs)] // documentation missing in model
    Failed,
    #[allow(missing_docs)] // documentation missing in model
    Modifying,
    #[allow(missing_docs)] // documentation missing in model
    Optimizing,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for VolumeModificationState {
    fn from(s: &str) -> Self {
        match s {
            "completed" => VolumeModificationState::Completed,
            "failed" => VolumeModificationState::Failed,
            "modifying" => VolumeModificationState::Modifying,
            "optimizing" => VolumeModificationState::Optimizing,
            other => VolumeModificationState::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for VolumeModificationState {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(VolumeModificationState::from(s))
    }
}
impl VolumeModificationState {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            VolumeModificationState::Completed => "completed",
            VolumeModificationState::Failed => "failed",
            VolumeModificationState::Modifying => "modifying",
            VolumeModificationState::Optimizing => "optimizing",
            VolumeModificationState::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["completed", "failed", "modifying", "optimizing"]
    }
}
impl AsRef<str> for VolumeModificationState {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes a Verified Access trust provider.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct VerifiedAccessTrustProvider {
    /// <p>The ID of the Amazon Web Services Verified Access trust provider.</p>
    #[doc(hidden)]
    pub verified_access_trust_provider_id: std::option::Option<std::string::String>,
    /// <p>A description for the Amazon Web Services Verified Access trust provider.</p>
    #[doc(hidden)]
    pub description: std::option::Option<std::string::String>,
    /// <p>The type of Verified Access trust provider.</p>
    #[doc(hidden)]
    pub trust_provider_type: std::option::Option<crate::model::TrustProviderType>,
    /// <p>The type of user-based trust provider.</p>
    #[doc(hidden)]
    pub user_trust_provider_type: std::option::Option<crate::model::UserTrustProviderType>,
    /// <p>The type of device-based trust provider.</p>
    #[doc(hidden)]
    pub device_trust_provider_type: std::option::Option<crate::model::DeviceTrustProviderType>,
    /// <p>The OpenID Connect details for an <code>oidc</code>-type, user-identity based trust provider.</p>
    #[doc(hidden)]
    pub oidc_options: std::option::Option<crate::model::OidcOptions>,
    /// <p>The options for device-identity type trust provider.</p>
    #[doc(hidden)]
    pub device_options: std::option::Option<crate::model::DeviceOptions>,
    /// <p>The identifier to be used when working with policy rules.</p>
    #[doc(hidden)]
    pub policy_reference_name: std::option::Option<std::string::String>,
    /// <p>The creation time.</p>
    #[doc(hidden)]
    pub creation_time: std::option::Option<std::string::String>,
    /// <p>The last updated time.</p>
    #[doc(hidden)]
    pub last_updated_time: std::option::Option<std::string::String>,
    /// <p>The tags.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl VerifiedAccessTrustProvider {
    /// <p>The ID of the Amazon Web Services Verified Access trust provider.</p>
    pub fn verified_access_trust_provider_id(&self) -> std::option::Option<&str> {
        self.verified_access_trust_provider_id.as_deref()
    }
    /// <p>A description for the Amazon Web Services Verified Access trust provider.</p>
    pub fn description(&self) -> std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The type of Verified Access trust provider.</p>
    pub fn trust_provider_type(&self) -> std::option::Option<&crate::model::TrustProviderType> {
        self.trust_provider_type.as_ref()
    }
    /// <p>The type of user-based trust provider.</p>
    pub fn user_trust_provider_type(
        &self,
    ) -> std::option::Option<&crate::model::UserTrustProviderType> {
        self.user_trust_provider_type.as_ref()
    }
    /// <p>The type of device-based trust provider.</p>
    pub fn device_trust_provider_type(
        &self,
    ) -> std::option::Option<&crate::model::DeviceTrustProviderType> {
        self.device_trust_provider_type.as_ref()
    }
    /// <p>The OpenID Connect details for an <code>oidc</code>-type, user-identity based trust provider.</p>
    pub fn oidc_options(&self) -> std::option::Option<&crate::model::OidcOptions> {
        self.oidc_options.as_ref()
    }
    /// <p>The options for device-identity type trust provider.</p>
    pub fn device_options(&self) -> std::option::Option<&crate::model::DeviceOptions> {
        self.device_options.as_ref()
    }
    /// <p>The identifier to be used when working with policy rules.</p>
    pub fn policy_reference_name(&self) -> std::option::Option<&str> {
        self.policy_reference_name.as_deref()
    }
    /// <p>The creation time.</p>
    pub fn creation_time(&self) -> std::option::Option<&str> {
        self.creation_time.as_deref()
    }
    /// <p>The last updated time.</p>
    pub fn last_updated_time(&self) -> std::option::Option<&str> {
        self.last_updated_time.as_deref()
    }
    /// <p>The tags.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
}
/// See [`VerifiedAccessTrustProvider`](crate::model::VerifiedAccessTrustProvider).
pub mod verified_access_trust_provider {

    /// A builder for [`VerifiedAccessTrustProvider`](crate::model::VerifiedAccessTrustProvider).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) verified_access_trust_provider_id: std::option::Option<std::string::String>,
        pub(crate) description: std::option::Option<std::string::String>,
        pub(crate) trust_provider_type: std::option::Option<crate::model::TrustProviderType>,
        pub(crate) user_trust_provider_type:
            std::option::Option<crate::model::UserTrustProviderType>,
        pub(crate) device_trust_provider_type:
            std::option::Option<crate::model::DeviceTrustProviderType>,
        pub(crate) oidc_options: std::option::Option<crate::model::OidcOptions>,
        pub(crate) device_options: std::option::Option<crate::model::DeviceOptions>,
        pub(crate) policy_reference_name: std::option::Option<std::string::String>,
        pub(crate) creation_time: std::option::Option<std::string::String>,
        pub(crate) last_updated_time: std::option::Option<std::string::String>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    }
    impl Builder {
        /// <p>The ID of the Amazon Web Services Verified Access trust provider.</p>
        pub fn verified_access_trust_provider_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.verified_access_trust_provider_id = Some(input.into());
            self
        }
        /// <p>The ID of the Amazon Web Services Verified Access trust provider.</p>
        pub fn set_verified_access_trust_provider_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.verified_access_trust_provider_id = input;
            self
        }
        /// <p>A description for the Amazon Web Services Verified Access trust provider.</p>
        pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
            self.description = Some(input.into());
            self
        }
        /// <p>A description for the Amazon Web Services Verified Access trust provider.</p>
        pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.description = input;
            self
        }
        /// <p>The type of Verified Access trust provider.</p>
        pub fn trust_provider_type(mut self, input: crate::model::TrustProviderType) -> Self {
            self.trust_provider_type = Some(input);
            self
        }
        /// <p>The type of Verified Access trust provider.</p>
        pub fn set_trust_provider_type(
            mut self,
            input: std::option::Option<crate::model::TrustProviderType>,
        ) -> Self {
            self.trust_provider_type = input;
            self
        }
        /// <p>The type of user-based trust provider.</p>
        pub fn user_trust_provider_type(
            mut self,
            input: crate::model::UserTrustProviderType,
        ) -> Self {
            self.user_trust_provider_type = Some(input);
            self
        }
        /// <p>The type of user-based trust provider.</p>
        pub fn set_user_trust_provider_type(
            mut self,
            input: std::option::Option<crate::model::UserTrustProviderType>,
        ) -> Self {
            self.user_trust_provider_type = input;
            self
        }
        /// <p>The type of device-based trust provider.</p>
        pub fn device_trust_provider_type(
            mut self,
            input: crate::model::DeviceTrustProviderType,
        ) -> Self {
            self.device_trust_provider_type = Some(input);
            self
        }
        /// <p>The type of device-based trust provider.</p>
        pub fn set_device_trust_provider_type(
            mut self,
            input: std::option::Option<crate::model::DeviceTrustProviderType>,
        ) -> Self {
            self.device_trust_provider_type = input;
            self
        }
        /// <p>The OpenID Connect details for an <code>oidc</code>-type, user-identity based trust provider.</p>
        pub fn oidc_options(mut self, input: crate::model::OidcOptions) -> Self {
            self.oidc_options = Some(input);
            self
        }
        /// <p>The OpenID Connect details for an <code>oidc</code>-type, user-identity based trust provider.</p>
        pub fn set_oidc_options(
            mut self,
            input: std::option::Option<crate::model::OidcOptions>,
        ) -> Self {
            self.oidc_options = input;
            self
        }
        /// <p>The options for device-identity type trust provider.</p>
        pub fn device_options(mut self, input: crate::model::DeviceOptions) -> Self {
            self.device_options = Some(input);
            self
        }
        /// <p>The options for device-identity type trust provider.</p>
        pub fn set_device_options(
            mut self,
            input: std::option::Option<crate::model::DeviceOptions>,
        ) -> Self {
            self.device_options = input;
            self
        }
        /// <p>The identifier to be used when working with policy rules.</p>
        pub fn policy_reference_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.policy_reference_name = Some(input.into());
            self
        }
        /// <p>The identifier to be used when working with policy rules.</p>
        pub fn set_policy_reference_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.policy_reference_name = input;
            self
        }
        /// <p>The creation time.</p>
        pub fn creation_time(mut self, input: impl Into<std::string::String>) -> Self {
            self.creation_time = Some(input.into());
            self
        }
        /// <p>The creation time.</p>
        pub fn set_creation_time(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.creation_time = input;
            self
        }
        /// <p>The last updated time.</p>
        pub fn last_updated_time(mut self, input: impl Into<std::string::String>) -> Self {
            self.last_updated_time = Some(input.into());
            self
        }
        /// <p>The last updated time.</p>
        pub fn set_last_updated_time(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.last_updated_time = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>The tags.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>The tags.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// Consumes the builder and constructs a [`VerifiedAccessTrustProvider`](crate::model::VerifiedAccessTrustProvider).
        pub fn build(self) -> crate::model::VerifiedAccessTrustProvider {
            crate::model::VerifiedAccessTrustProvider {
                verified_access_trust_provider_id: self.verified_access_trust_provider_id,
                description: self.description,
                trust_provider_type: self.trust_provider_type,
                user_trust_provider_type: self.user_trust_provider_type,
                device_trust_provider_type: self.device_trust_provider_type,
                oidc_options: self.oidc_options,
                device_options: self.device_options,
                policy_reference_name: self.policy_reference_name,
                creation_time: self.creation_time,
                last_updated_time: self.last_updated_time,
                tags: self.tags,
            }
        }
    }
}
impl VerifiedAccessTrustProvider {
    /// Creates a new builder-style object to manufacture [`VerifiedAccessTrustProvider`](crate::model::VerifiedAccessTrustProvider).
    pub fn builder() -> crate::model::verified_access_trust_provider::Builder {
        crate::model::verified_access_trust_provider::Builder::default()
    }
}

/// <p>Options for an Amazon Web Services Verified Access device-identity based trust provider.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeviceOptions {
    /// <p>The ID of the tenant application with the device-identity provider.</p>
    #[doc(hidden)]
    pub tenant_id: std::option::Option<std::string::String>,
}
impl DeviceOptions {
    /// <p>The ID of the tenant application with the device-identity provider.</p>
    pub fn tenant_id(&self) -> std::option::Option<&str> {
        self.tenant_id.as_deref()
    }
}
/// See [`DeviceOptions`](crate::model::DeviceOptions).
pub mod device_options {

    /// A builder for [`DeviceOptions`](crate::model::DeviceOptions).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) tenant_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The ID of the tenant application with the device-identity provider.</p>
        pub fn tenant_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.tenant_id = Some(input.into());
            self
        }
        /// <p>The ID of the tenant application with the device-identity provider.</p>
        pub fn set_tenant_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.tenant_id = input;
            self
        }
        /// Consumes the builder and constructs a [`DeviceOptions`](crate::model::DeviceOptions).
        pub fn build(self) -> crate::model::DeviceOptions {
            crate::model::DeviceOptions {
                tenant_id: self.tenant_id,
            }
        }
    }
}
impl DeviceOptions {
    /// Creates a new builder-style object to manufacture [`DeviceOptions`](crate::model::DeviceOptions).
    pub fn builder() -> crate::model::device_options::Builder {
        crate::model::device_options::Builder::default()
    }
}

/// <p>Options for OIDC-based, user-identity type trust provider.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct OidcOptions {
    /// <p>The OIDC issuer.</p>
    #[doc(hidden)]
    pub issuer: std::option::Option<std::string::String>,
    /// <p>The OIDC authorization endpoint.</p>
    #[doc(hidden)]
    pub authorization_endpoint: std::option::Option<std::string::String>,
    /// <p>The OIDC token endpoint.</p>
    #[doc(hidden)]
    pub token_endpoint: std::option::Option<std::string::String>,
    /// <p>The OIDC user info endpoint.</p>
    #[doc(hidden)]
    pub user_info_endpoint: std::option::Option<std::string::String>,
    /// <p>The client identifier.</p>
    #[doc(hidden)]
    pub client_id: std::option::Option<std::string::String>,
    /// <p>The client secret.</p>
    #[doc(hidden)]
    pub client_secret: std::option::Option<std::string::String>,
    /// <p>The OpenID Connect (OIDC) scope specified.</p>
    #[doc(hidden)]
    pub scope: std::option::Option<std::string::String>,
}
impl OidcOptions {
    /// <p>The OIDC issuer.</p>
    pub fn issuer(&self) -> std::option::Option<&str> {
        self.issuer.as_deref()
    }
    /// <p>The OIDC authorization endpoint.</p>
    pub fn authorization_endpoint(&self) -> std::option::Option<&str> {
        self.authorization_endpoint.as_deref()
    }
    /// <p>The OIDC token endpoint.</p>
    pub fn token_endpoint(&self) -> std::option::Option<&str> {
        self.token_endpoint.as_deref()
    }
    /// <p>The OIDC user info endpoint.</p>
    pub fn user_info_endpoint(&self) -> std::option::Option<&str> {
        self.user_info_endpoint.as_deref()
    }
    /// <p>The client identifier.</p>
    pub fn client_id(&self) -> std::option::Option<&str> {
        self.client_id.as_deref()
    }
    /// <p>The client secret.</p>
    pub fn client_secret(&self) -> std::option::Option<&str> {
        self.client_secret.as_deref()
    }
    /// <p>The OpenID Connect (OIDC) scope specified.</p>
    pub fn scope(&self) -> std::option::Option<&str> {
        self.scope.as_deref()
    }
}
/// See [`OidcOptions`](crate::model::OidcOptions).
pub mod oidc_options {

    /// A builder for [`OidcOptions`](crate::model::OidcOptions).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) issuer: std::option::Option<std::string::String>,
        pub(crate) authorization_endpoint: std::option::Option<std::string::String>,
        pub(crate) token_endpoint: std::option::Option<std::string::String>,
        pub(crate) user_info_endpoint: std::option::Option<std::string::String>,
        pub(crate) client_id: std::option::Option<std::string::String>,
        pub(crate) client_secret: std::option::Option<std::string::String>,
        pub(crate) scope: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The OIDC issuer.</p>
        pub fn issuer(mut self, input: impl Into<std::string::String>) -> Self {
            self.issuer = Some(input.into());
            self
        }
        /// <p>The OIDC issuer.</p>
        pub fn set_issuer(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.issuer = input;
            self
        }
        /// <p>The OIDC authorization endpoint.</p>
        pub fn authorization_endpoint(mut self, input: impl Into<std::string::String>) -> Self {
            self.authorization_endpoint = Some(input.into());
            self
        }
        /// <p>The OIDC authorization endpoint.</p>
        pub fn set_authorization_endpoint(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.authorization_endpoint = input;
            self
        }
        /// <p>The OIDC token endpoint.</p>
        pub fn token_endpoint(mut self, input: impl Into<std::string::String>) -> Self {
            self.token_endpoint = Some(input.into());
            self
        }
        /// <p>The OIDC token endpoint.</p>
        pub fn set_token_endpoint(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.token_endpoint = input;
            self
        }
        /// <p>The OIDC user info endpoint.</p>
        pub fn user_info_endpoint(mut self, input: impl Into<std::string::String>) -> Self {
            self.user_info_endpoint = Some(input.into());
            self
        }
        /// <p>The OIDC user info endpoint.</p>
        pub fn set_user_info_endpoint(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.user_info_endpoint = input;
            self
        }
        /// <p>The client identifier.</p>
        pub fn client_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.client_id = Some(input.into());
            self
        }
        /// <p>The client identifier.</p>
        pub fn set_client_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.client_id = input;
            self
        }
        /// <p>The client secret.</p>
        pub fn client_secret(mut self, input: impl Into<std::string::String>) -> Self {
            self.client_secret = Some(input.into());
            self
        }
        /// <p>The client secret.</p>
        pub fn set_client_secret(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.client_secret = input;
            self
        }
        /// <p>The OpenID Connect (OIDC) scope specified.</p>
        pub fn scope(mut self, input: impl Into<std::string::String>) -> Self {
            self.scope = Some(input.into());
            self
        }
        /// <p>The OpenID Connect (OIDC) scope specified.</p>
        pub fn set_scope(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.scope = input;
            self
        }
        /// Consumes the builder and constructs a [`OidcOptions`](crate::model::OidcOptions).
        pub fn build(self) -> crate::model::OidcOptions {
            crate::model::OidcOptions {
                issuer: self.issuer,
                authorization_endpoint: self.authorization_endpoint,
                token_endpoint: self.token_endpoint,
                user_info_endpoint: self.user_info_endpoint,
                client_id: self.client_id,
                client_secret: self.client_secret,
                scope: self.scope,
            }
        }
    }
}
impl OidcOptions {
    /// Creates a new builder-style object to manufacture [`OidcOptions`](crate::model::OidcOptions).
    pub fn builder() -> crate::model::oidc_options::Builder {
        crate::model::oidc_options::Builder::default()
    }
}

/// When writing a match expression against `DeviceTrustProviderType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let devicetrustprovidertype = unimplemented!();
/// match devicetrustprovidertype {
///     DeviceTrustProviderType::Crowdstrike => { /* ... */ },
///     DeviceTrustProviderType::Jamf => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `devicetrustprovidertype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `DeviceTrustProviderType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `DeviceTrustProviderType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `DeviceTrustProviderType::NewFeature` is defined.
/// Specifically, when `devicetrustprovidertype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `DeviceTrustProviderType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 DeviceTrustProviderType {
    #[allow(missing_docs)] // documentation missing in model
    Crowdstrike,
    #[allow(missing_docs)] // documentation missing in model
    Jamf,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for DeviceTrustProviderType {
    fn from(s: &str) -> Self {
        match s {
            "crowdstrike" => DeviceTrustProviderType::Crowdstrike,
            "jamf" => DeviceTrustProviderType::Jamf,
            other => DeviceTrustProviderType::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for DeviceTrustProviderType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(DeviceTrustProviderType::from(s))
    }
}
impl DeviceTrustProviderType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            DeviceTrustProviderType::Crowdstrike => "crowdstrike",
            DeviceTrustProviderType::Jamf => "jamf",
            DeviceTrustProviderType::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["crowdstrike", "jamf"]
    }
}
impl AsRef<str> for DeviceTrustProviderType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `UserTrustProviderType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let usertrustprovidertype = unimplemented!();
/// match usertrustprovidertype {
///     UserTrustProviderType::IamIdentityCenter => { /* ... */ },
///     UserTrustProviderType::Oidc => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `usertrustprovidertype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `UserTrustProviderType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `UserTrustProviderType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `UserTrustProviderType::NewFeature` is defined.
/// Specifically, when `usertrustprovidertype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `UserTrustProviderType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 UserTrustProviderType {
    #[allow(missing_docs)] // documentation missing in model
    IamIdentityCenter,
    #[allow(missing_docs)] // documentation missing in model
    Oidc,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for UserTrustProviderType {
    fn from(s: &str) -> Self {
        match s {
            "iam-identity-center" => UserTrustProviderType::IamIdentityCenter,
            "oidc" => UserTrustProviderType::Oidc,
            other => {
                UserTrustProviderType::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for UserTrustProviderType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(UserTrustProviderType::from(s))
    }
}
impl UserTrustProviderType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            UserTrustProviderType::IamIdentityCenter => "iam-identity-center",
            UserTrustProviderType::Oidc => "oidc",
            UserTrustProviderType::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["iam-identity-center", "oidc"]
    }
}
impl AsRef<str> for UserTrustProviderType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `TrustProviderType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let trustprovidertype = unimplemented!();
/// match trustprovidertype {
///     TrustProviderType::Device => { /* ... */ },
///     TrustProviderType::User => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `trustprovidertype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `TrustProviderType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `TrustProviderType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `TrustProviderType::NewFeature` is defined.
/// Specifically, when `trustprovidertype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `TrustProviderType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 TrustProviderType {
    #[allow(missing_docs)] // documentation missing in model
    Device,
    #[allow(missing_docs)] // documentation missing in model
    User,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for TrustProviderType {
    fn from(s: &str) -> Self {
        match s {
            "device" => TrustProviderType::Device,
            "user" => TrustProviderType::User,
            other => {
                TrustProviderType::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for TrustProviderType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(TrustProviderType::from(s))
    }
}
impl TrustProviderType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            TrustProviderType::Device => "device",
            TrustProviderType::User => "user",
            TrustProviderType::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["device", "user"]
    }
}
impl AsRef<str> for TrustProviderType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>OpenID Connect options for an <code>oidc</code>-type, user-identity based trust provider.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ModifyVerifiedAccessTrustProviderOidcOptions {
    /// <p>OpenID Connect (OIDC) scopes are used by an application during authentication to authorize access to a user's details. Each scope returns a specific set of user attributes.</p>
    #[doc(hidden)]
    pub scope: std::option::Option<std::string::String>,
}
impl ModifyVerifiedAccessTrustProviderOidcOptions {
    /// <p>OpenID Connect (OIDC) scopes are used by an application during authentication to authorize access to a user's details. Each scope returns a specific set of user attributes.</p>
    pub fn scope(&self) -> std::option::Option<&str> {
        self.scope.as_deref()
    }
}
/// See [`ModifyVerifiedAccessTrustProviderOidcOptions`](crate::model::ModifyVerifiedAccessTrustProviderOidcOptions).
pub mod modify_verified_access_trust_provider_oidc_options {

    /// A builder for [`ModifyVerifiedAccessTrustProviderOidcOptions`](crate::model::ModifyVerifiedAccessTrustProviderOidcOptions).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) scope: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>OpenID Connect (OIDC) scopes are used by an application during authentication to authorize access to a user's details. Each scope returns a specific set of user attributes.</p>
        pub fn scope(mut self, input: impl Into<std::string::String>) -> Self {
            self.scope = Some(input.into());
            self
        }
        /// <p>OpenID Connect (OIDC) scopes are used by an application during authentication to authorize access to a user's details. Each scope returns a specific set of user attributes.</p>
        pub fn set_scope(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.scope = input;
            self
        }
        /// Consumes the builder and constructs a [`ModifyVerifiedAccessTrustProviderOidcOptions`](crate::model::ModifyVerifiedAccessTrustProviderOidcOptions).
        pub fn build(self) -> crate::model::ModifyVerifiedAccessTrustProviderOidcOptions {
            crate::model::ModifyVerifiedAccessTrustProviderOidcOptions { scope: self.scope }
        }
    }
}
impl ModifyVerifiedAccessTrustProviderOidcOptions {
    /// Creates a new builder-style object to manufacture [`ModifyVerifiedAccessTrustProviderOidcOptions`](crate::model::ModifyVerifiedAccessTrustProviderOidcOptions).
    pub fn builder() -> crate::model::modify_verified_access_trust_provider_oidc_options::Builder {
        crate::model::modify_verified_access_trust_provider_oidc_options::Builder::default()
    }
}

/// <p>Describes logging options for an Amazon Web Services Verified Access instance.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct VerifiedAccessInstanceLoggingConfiguration {
    /// <p>The ID of the Amazon Web Services Verified Access instance.</p>
    #[doc(hidden)]
    pub verified_access_instance_id: std::option::Option<std::string::String>,
    /// <p>Details about the logging options.</p>
    #[doc(hidden)]
    pub access_logs: std::option::Option<crate::model::VerifiedAccessLogs>,
}
impl VerifiedAccessInstanceLoggingConfiguration {
    /// <p>The ID of the Amazon Web Services Verified Access instance.</p>
    pub fn verified_access_instance_id(&self) -> std::option::Option<&str> {
        self.verified_access_instance_id.as_deref()
    }
    /// <p>Details about the logging options.</p>
    pub fn access_logs(&self) -> std::option::Option<&crate::model::VerifiedAccessLogs> {
        self.access_logs.as_ref()
    }
}
/// See [`VerifiedAccessInstanceLoggingConfiguration`](crate::model::VerifiedAccessInstanceLoggingConfiguration).
pub mod verified_access_instance_logging_configuration {

    /// A builder for [`VerifiedAccessInstanceLoggingConfiguration`](crate::model::VerifiedAccessInstanceLoggingConfiguration).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) verified_access_instance_id: std::option::Option<std::string::String>,
        pub(crate) access_logs: std::option::Option<crate::model::VerifiedAccessLogs>,
    }
    impl Builder {
        /// <p>The ID of the Amazon Web Services Verified Access instance.</p>
        pub fn verified_access_instance_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.verified_access_instance_id = Some(input.into());
            self
        }
        /// <p>The ID of the Amazon Web Services Verified Access instance.</p>
        pub fn set_verified_access_instance_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.verified_access_instance_id = input;
            self
        }
        /// <p>Details about the logging options.</p>
        pub fn access_logs(mut self, input: crate::model::VerifiedAccessLogs) -> Self {
            self.access_logs = Some(input);
            self
        }
        /// <p>Details about the logging options.</p>
        pub fn set_access_logs(
            mut self,
            input: std::option::Option<crate::model::VerifiedAccessLogs>,
        ) -> Self {
            self.access_logs = input;
            self
        }
        /// Consumes the builder and constructs a [`VerifiedAccessInstanceLoggingConfiguration`](crate::model::VerifiedAccessInstanceLoggingConfiguration).
        pub fn build(self) -> crate::model::VerifiedAccessInstanceLoggingConfiguration {
            crate::model::VerifiedAccessInstanceLoggingConfiguration {
                verified_access_instance_id: self.verified_access_instance_id,
                access_logs: self.access_logs,
            }
        }
    }
}
impl VerifiedAccessInstanceLoggingConfiguration {
    /// Creates a new builder-style object to manufacture [`VerifiedAccessInstanceLoggingConfiguration`](crate::model::VerifiedAccessInstanceLoggingConfiguration).
    pub fn builder() -> crate::model::verified_access_instance_logging_configuration::Builder {
        crate::model::verified_access_instance_logging_configuration::Builder::default()
    }
}

/// <p>Describes the destinations for Verified Access logs.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct VerifiedAccessLogs {
    /// <p>Amazon S3 logging options.</p>
    #[doc(hidden)]
    pub s3: std::option::Option<crate::model::VerifiedAccessLogS3Destination>,
    /// <p>CloudWatch Logs logging destination.</p>
    #[doc(hidden)]
    pub cloud_watch_logs:
        std::option::Option<crate::model::VerifiedAccessLogCloudWatchLogsDestination>,
    /// <p>Kinesis logging destination.</p>
    #[doc(hidden)]
    pub kinesis_data_firehose:
        std::option::Option<crate::model::VerifiedAccessLogKinesisDataFirehoseDestination>,
}
impl VerifiedAccessLogs {
    /// <p>Amazon S3 logging options.</p>
    pub fn s3(&self) -> std::option::Option<&crate::model::VerifiedAccessLogS3Destination> {
        self.s3.as_ref()
    }
    /// <p>CloudWatch Logs logging destination.</p>
    pub fn cloud_watch_logs(
        &self,
    ) -> std::option::Option<&crate::model::VerifiedAccessLogCloudWatchLogsDestination> {
        self.cloud_watch_logs.as_ref()
    }
    /// <p>Kinesis logging destination.</p>
    pub fn kinesis_data_firehose(
        &self,
    ) -> std::option::Option<&crate::model::VerifiedAccessLogKinesisDataFirehoseDestination> {
        self.kinesis_data_firehose.as_ref()
    }
}
/// See [`VerifiedAccessLogs`](crate::model::VerifiedAccessLogs).
pub mod verified_access_logs {

    /// A builder for [`VerifiedAccessLogs`](crate::model::VerifiedAccessLogs).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) s3: std::option::Option<crate::model::VerifiedAccessLogS3Destination>,
        pub(crate) cloud_watch_logs:
            std::option::Option<crate::model::VerifiedAccessLogCloudWatchLogsDestination>,
        pub(crate) kinesis_data_firehose:
            std::option::Option<crate::model::VerifiedAccessLogKinesisDataFirehoseDestination>,
    }
    impl Builder {
        /// <p>Amazon S3 logging options.</p>
        pub fn s3(mut self, input: crate::model::VerifiedAccessLogS3Destination) -> Self {
            self.s3 = Some(input);
            self
        }
        /// <p>Amazon S3 logging options.</p>
        pub fn set_s3(
            mut self,
            input: std::option::Option<crate::model::VerifiedAccessLogS3Destination>,
        ) -> Self {
            self.s3 = input;
            self
        }
        /// <p>CloudWatch Logs logging destination.</p>
        pub fn cloud_watch_logs(
            mut self,
            input: crate::model::VerifiedAccessLogCloudWatchLogsDestination,
        ) -> Self {
            self.cloud_watch_logs = Some(input);
            self
        }
        /// <p>CloudWatch Logs logging destination.</p>
        pub fn set_cloud_watch_logs(
            mut self,
            input: std::option::Option<crate::model::VerifiedAccessLogCloudWatchLogsDestination>,
        ) -> Self {
            self.cloud_watch_logs = input;
            self
        }
        /// <p>Kinesis logging destination.</p>
        pub fn kinesis_data_firehose(
            mut self,
            input: crate::model::VerifiedAccessLogKinesisDataFirehoseDestination,
        ) -> Self {
            self.kinesis_data_firehose = Some(input);
            self
        }
        /// <p>Kinesis logging destination.</p>
        pub fn set_kinesis_data_firehose(
            mut self,
            input: std::option::Option<
                crate::model::VerifiedAccessLogKinesisDataFirehoseDestination,
            >,
        ) -> Self {
            self.kinesis_data_firehose = input;
            self
        }
        /// Consumes the builder and constructs a [`VerifiedAccessLogs`](crate::model::VerifiedAccessLogs).
        pub fn build(self) -> crate::model::VerifiedAccessLogs {
            crate::model::VerifiedAccessLogs {
                s3: self.s3,
                cloud_watch_logs: self.cloud_watch_logs,
                kinesis_data_firehose: self.kinesis_data_firehose,
            }
        }
    }
}
impl VerifiedAccessLogs {
    /// Creates a new builder-style object to manufacture [`VerifiedAccessLogs`](crate::model::VerifiedAccessLogs).
    pub fn builder() -> crate::model::verified_access_logs::Builder {
        crate::model::verified_access_logs::Builder::default()
    }
}

/// <p>Options for Kinesis as a logging destination.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct VerifiedAccessLogKinesisDataFirehoseDestination {
    /// <p>Indicates whether logging is enabled.</p>
    #[doc(hidden)]
    pub enabled: std::option::Option<bool>,
    /// <p>The delivery status.</p>
    #[doc(hidden)]
    pub delivery_status: std::option::Option<crate::model::VerifiedAccessLogDeliveryStatus>,
    /// <p>The ID of the delivery stream.</p>
    #[doc(hidden)]
    pub delivery_stream: std::option::Option<std::string::String>,
}
impl VerifiedAccessLogKinesisDataFirehoseDestination {
    /// <p>Indicates whether logging is enabled.</p>
    pub fn enabled(&self) -> std::option::Option<bool> {
        self.enabled
    }
    /// <p>The delivery status.</p>
    pub fn delivery_status(
        &self,
    ) -> std::option::Option<&crate::model::VerifiedAccessLogDeliveryStatus> {
        self.delivery_status.as_ref()
    }
    /// <p>The ID of the delivery stream.</p>
    pub fn delivery_stream(&self) -> std::option::Option<&str> {
        self.delivery_stream.as_deref()
    }
}
/// See [`VerifiedAccessLogKinesisDataFirehoseDestination`](crate::model::VerifiedAccessLogKinesisDataFirehoseDestination).
pub mod verified_access_log_kinesis_data_firehose_destination {

    /// A builder for [`VerifiedAccessLogKinesisDataFirehoseDestination`](crate::model::VerifiedAccessLogKinesisDataFirehoseDestination).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) enabled: std::option::Option<bool>,
        pub(crate) delivery_status:
            std::option::Option<crate::model::VerifiedAccessLogDeliveryStatus>,
        pub(crate) delivery_stream: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>Indicates whether logging is enabled.</p>
        pub fn enabled(mut self, input: bool) -> Self {
            self.enabled = Some(input);
            self
        }
        /// <p>Indicates whether logging is enabled.</p>
        pub fn set_enabled(mut self, input: std::option::Option<bool>) -> Self {
            self.enabled = input;
            self
        }
        /// <p>The delivery status.</p>
        pub fn delivery_status(
            mut self,
            input: crate::model::VerifiedAccessLogDeliveryStatus,
        ) -> Self {
            self.delivery_status = Some(input);
            self
        }
        /// <p>The delivery status.</p>
        pub fn set_delivery_status(
            mut self,
            input: std::option::Option<crate::model::VerifiedAccessLogDeliveryStatus>,
        ) -> Self {
            self.delivery_status = input;
            self
        }
        /// <p>The ID of the delivery stream.</p>
        pub fn delivery_stream(mut self, input: impl Into<std::string::String>) -> Self {
            self.delivery_stream = Some(input.into());
            self
        }
        /// <p>The ID of the delivery stream.</p>
        pub fn set_delivery_stream(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.delivery_stream = input;
            self
        }
        /// Consumes the builder and constructs a [`VerifiedAccessLogKinesisDataFirehoseDestination`](crate::model::VerifiedAccessLogKinesisDataFirehoseDestination).
        pub fn build(self) -> crate::model::VerifiedAccessLogKinesisDataFirehoseDestination {
            crate::model::VerifiedAccessLogKinesisDataFirehoseDestination {
                enabled: self.enabled,
                delivery_status: self.delivery_status,
                delivery_stream: self.delivery_stream,
            }
        }
    }
}
impl VerifiedAccessLogKinesisDataFirehoseDestination {
    /// Creates a new builder-style object to manufacture [`VerifiedAccessLogKinesisDataFirehoseDestination`](crate::model::VerifiedAccessLogKinesisDataFirehoseDestination).
    pub fn builder() -> crate::model::verified_access_log_kinesis_data_firehose_destination::Builder
    {
        crate::model::verified_access_log_kinesis_data_firehose_destination::Builder::default()
    }
}

/// <p>Describes a log delivery status.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct VerifiedAccessLogDeliveryStatus {
    /// <p>The status code.</p>
    #[doc(hidden)]
    pub code: std::option::Option<crate::model::VerifiedAccessLogDeliveryStatusCode>,
    /// <p>The status message.</p>
    #[doc(hidden)]
    pub message: std::option::Option<std::string::String>,
}
impl VerifiedAccessLogDeliveryStatus {
    /// <p>The status code.</p>
    pub fn code(&self) -> std::option::Option<&crate::model::VerifiedAccessLogDeliveryStatusCode> {
        self.code.as_ref()
    }
    /// <p>The status message.</p>
    pub fn message(&self) -> std::option::Option<&str> {
        self.message.as_deref()
    }
}
/// See [`VerifiedAccessLogDeliveryStatus`](crate::model::VerifiedAccessLogDeliveryStatus).
pub mod verified_access_log_delivery_status {

    /// A builder for [`VerifiedAccessLogDeliveryStatus`](crate::model::VerifiedAccessLogDeliveryStatus).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) code: std::option::Option<crate::model::VerifiedAccessLogDeliveryStatusCode>,
        pub(crate) message: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The status code.</p>
        pub fn code(mut self, input: crate::model::VerifiedAccessLogDeliveryStatusCode) -> Self {
            self.code = Some(input);
            self
        }
        /// <p>The status code.</p>
        pub fn set_code(
            mut self,
            input: std::option::Option<crate::model::VerifiedAccessLogDeliveryStatusCode>,
        ) -> Self {
            self.code = input;
            self
        }
        /// <p>The status message.</p>
        pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
            self.message = Some(input.into());
            self
        }
        /// <p>The status message.</p>
        pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.message = input;
            self
        }
        /// Consumes the builder and constructs a [`VerifiedAccessLogDeliveryStatus`](crate::model::VerifiedAccessLogDeliveryStatus).
        pub fn build(self) -> crate::model::VerifiedAccessLogDeliveryStatus {
            crate::model::VerifiedAccessLogDeliveryStatus {
                code: self.code,
                message: self.message,
            }
        }
    }
}
impl VerifiedAccessLogDeliveryStatus {
    /// Creates a new builder-style object to manufacture [`VerifiedAccessLogDeliveryStatus`](crate::model::VerifiedAccessLogDeliveryStatus).
    pub fn builder() -> crate::model::verified_access_log_delivery_status::Builder {
        crate::model::verified_access_log_delivery_status::Builder::default()
    }
}

/// When writing a match expression against `VerifiedAccessLogDeliveryStatusCode`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let verifiedaccesslogdeliverystatuscode = unimplemented!();
/// match verifiedaccesslogdeliverystatuscode {
///     VerifiedAccessLogDeliveryStatusCode::Failed => { /* ... */ },
///     VerifiedAccessLogDeliveryStatusCode::Success => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `verifiedaccesslogdeliverystatuscode` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `VerifiedAccessLogDeliveryStatusCode::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `VerifiedAccessLogDeliveryStatusCode::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `VerifiedAccessLogDeliveryStatusCode::NewFeature` is defined.
/// Specifically, when `verifiedaccesslogdeliverystatuscode` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `VerifiedAccessLogDeliveryStatusCode::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 VerifiedAccessLogDeliveryStatusCode {
    #[allow(missing_docs)] // documentation missing in model
    Failed,
    #[allow(missing_docs)] // documentation missing in model
    Success,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for VerifiedAccessLogDeliveryStatusCode {
    fn from(s: &str) -> Self {
        match s {
            "failed" => VerifiedAccessLogDeliveryStatusCode::Failed,
            "success" => VerifiedAccessLogDeliveryStatusCode::Success,
            other => VerifiedAccessLogDeliveryStatusCode::Unknown(
                crate::types::UnknownVariantValue(other.to_owned()),
            ),
        }
    }
}
impl std::str::FromStr for VerifiedAccessLogDeliveryStatusCode {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(VerifiedAccessLogDeliveryStatusCode::from(s))
    }
}
impl VerifiedAccessLogDeliveryStatusCode {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            VerifiedAccessLogDeliveryStatusCode::Failed => "failed",
            VerifiedAccessLogDeliveryStatusCode::Success => "success",
            VerifiedAccessLogDeliveryStatusCode::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["failed", "success"]
    }
}
impl AsRef<str> for VerifiedAccessLogDeliveryStatusCode {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Options for CloudWatch Logs as a logging destination.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct VerifiedAccessLogCloudWatchLogsDestination {
    /// <p>Indicates whether logging is enabled.</p>
    #[doc(hidden)]
    pub enabled: std::option::Option<bool>,
    /// <p>The delivery status for access logs.</p>
    #[doc(hidden)]
    pub delivery_status: std::option::Option<crate::model::VerifiedAccessLogDeliveryStatus>,
    /// <p>The ID of the CloudWatch Logs log group.</p>
    #[doc(hidden)]
    pub log_group: std::option::Option<std::string::String>,
}
impl VerifiedAccessLogCloudWatchLogsDestination {
    /// <p>Indicates whether logging is enabled.</p>
    pub fn enabled(&self) -> std::option::Option<bool> {
        self.enabled
    }
    /// <p>The delivery status for access logs.</p>
    pub fn delivery_status(
        &self,
    ) -> std::option::Option<&crate::model::VerifiedAccessLogDeliveryStatus> {
        self.delivery_status.as_ref()
    }
    /// <p>The ID of the CloudWatch Logs log group.</p>
    pub fn log_group(&self) -> std::option::Option<&str> {
        self.log_group.as_deref()
    }
}
/// See [`VerifiedAccessLogCloudWatchLogsDestination`](crate::model::VerifiedAccessLogCloudWatchLogsDestination).
pub mod verified_access_log_cloud_watch_logs_destination {

    /// A builder for [`VerifiedAccessLogCloudWatchLogsDestination`](crate::model::VerifiedAccessLogCloudWatchLogsDestination).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) enabled: std::option::Option<bool>,
        pub(crate) delivery_status:
            std::option::Option<crate::model::VerifiedAccessLogDeliveryStatus>,
        pub(crate) log_group: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>Indicates whether logging is enabled.</p>
        pub fn enabled(mut self, input: bool) -> Self {
            self.enabled = Some(input);
            self
        }
        /// <p>Indicates whether logging is enabled.</p>
        pub fn set_enabled(mut self, input: std::option::Option<bool>) -> Self {
            self.enabled = input;
            self
        }
        /// <p>The delivery status for access logs.</p>
        pub fn delivery_status(
            mut self,
            input: crate::model::VerifiedAccessLogDeliveryStatus,
        ) -> Self {
            self.delivery_status = Some(input);
            self
        }
        /// <p>The delivery status for access logs.</p>
        pub fn set_delivery_status(
            mut self,
            input: std::option::Option<crate::model::VerifiedAccessLogDeliveryStatus>,
        ) -> Self {
            self.delivery_status = input;
            self
        }
        /// <p>The ID of the CloudWatch Logs log group.</p>
        pub fn log_group(mut self, input: impl Into<std::string::String>) -> Self {
            self.log_group = Some(input.into());
            self
        }
        /// <p>The ID of the CloudWatch Logs log group.</p>
        pub fn set_log_group(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.log_group = input;
            self
        }
        /// Consumes the builder and constructs a [`VerifiedAccessLogCloudWatchLogsDestination`](crate::model::VerifiedAccessLogCloudWatchLogsDestination).
        pub fn build(self) -> crate::model::VerifiedAccessLogCloudWatchLogsDestination {
            crate::model::VerifiedAccessLogCloudWatchLogsDestination {
                enabled: self.enabled,
                delivery_status: self.delivery_status,
                log_group: self.log_group,
            }
        }
    }
}
impl VerifiedAccessLogCloudWatchLogsDestination {
    /// Creates a new builder-style object to manufacture [`VerifiedAccessLogCloudWatchLogsDestination`](crate::model::VerifiedAccessLogCloudWatchLogsDestination).
    pub fn builder() -> crate::model::verified_access_log_cloud_watch_logs_destination::Builder {
        crate::model::verified_access_log_cloud_watch_logs_destination::Builder::default()
    }
}

/// <p>Options for Amazon S3 as a logging destination.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct VerifiedAccessLogS3Destination {
    /// <p>Indicates whether logging is enabled.</p>
    #[doc(hidden)]
    pub enabled: std::option::Option<bool>,
    /// <p>The delivery status.</p>
    #[doc(hidden)]
    pub delivery_status: std::option::Option<crate::model::VerifiedAccessLogDeliveryStatus>,
    /// <p>The bucket name.</p>
    #[doc(hidden)]
    pub bucket_name: std::option::Option<std::string::String>,
    /// <p>The bucket prefix.</p>
    #[doc(hidden)]
    pub prefix: std::option::Option<std::string::String>,
    /// <p>The Amazon Web Services account number that owns the bucket.</p>
    #[doc(hidden)]
    pub bucket_owner: std::option::Option<std::string::String>,
}
impl VerifiedAccessLogS3Destination {
    /// <p>Indicates whether logging is enabled.</p>
    pub fn enabled(&self) -> std::option::Option<bool> {
        self.enabled
    }
    /// <p>The delivery status.</p>
    pub fn delivery_status(
        &self,
    ) -> std::option::Option<&crate::model::VerifiedAccessLogDeliveryStatus> {
        self.delivery_status.as_ref()
    }
    /// <p>The bucket name.</p>
    pub fn bucket_name(&self) -> std::option::Option<&str> {
        self.bucket_name.as_deref()
    }
    /// <p>The bucket prefix.</p>
    pub fn prefix(&self) -> std::option::Option<&str> {
        self.prefix.as_deref()
    }
    /// <p>The Amazon Web Services account number that owns the bucket.</p>
    pub fn bucket_owner(&self) -> std::option::Option<&str> {
        self.bucket_owner.as_deref()
    }
}
/// See [`VerifiedAccessLogS3Destination`](crate::model::VerifiedAccessLogS3Destination).
pub mod verified_access_log_s3_destination {

    /// A builder for [`VerifiedAccessLogS3Destination`](crate::model::VerifiedAccessLogS3Destination).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) enabled: std::option::Option<bool>,
        pub(crate) delivery_status:
            std::option::Option<crate::model::VerifiedAccessLogDeliveryStatus>,
        pub(crate) bucket_name: std::option::Option<std::string::String>,
        pub(crate) prefix: std::option::Option<std::string::String>,
        pub(crate) bucket_owner: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>Indicates whether logging is enabled.</p>
        pub fn enabled(mut self, input: bool) -> Self {
            self.enabled = Some(input);
            self
        }
        /// <p>Indicates whether logging is enabled.</p>
        pub fn set_enabled(mut self, input: std::option::Option<bool>) -> Self {
            self.enabled = input;
            self
        }
        /// <p>The delivery status.</p>
        pub fn delivery_status(
            mut self,
            input: crate::model::VerifiedAccessLogDeliveryStatus,
        ) -> Self {
            self.delivery_status = Some(input);
            self
        }
        /// <p>The delivery status.</p>
        pub fn set_delivery_status(
            mut self,
            input: std::option::Option<crate::model::VerifiedAccessLogDeliveryStatus>,
        ) -> Self {
            self.delivery_status = input;
            self
        }
        /// <p>The bucket name.</p>
        pub fn bucket_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.bucket_name = Some(input.into());
            self
        }
        /// <p>The bucket name.</p>
        pub fn set_bucket_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.bucket_name = input;
            self
        }
        /// <p>The bucket prefix.</p>
        pub fn prefix(mut self, input: impl Into<std::string::String>) -> Self {
            self.prefix = Some(input.into());
            self
        }
        /// <p>The bucket prefix.</p>
        pub fn set_prefix(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.prefix = input;
            self
        }
        /// <p>The Amazon Web Services account number that owns the bucket.</p>
        pub fn bucket_owner(mut self, input: impl Into<std::string::String>) -> Self {
            self.bucket_owner = Some(input.into());
            self
        }
        /// <p>The Amazon Web Services account number that owns the bucket.</p>
        pub fn set_bucket_owner(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.bucket_owner = input;
            self
        }
        /// Consumes the builder and constructs a [`VerifiedAccessLogS3Destination`](crate::model::VerifiedAccessLogS3Destination).
        pub fn build(self) -> crate::model::VerifiedAccessLogS3Destination {
            crate::model::VerifiedAccessLogS3Destination {
                enabled: self.enabled,
                delivery_status: self.delivery_status,
                bucket_name: self.bucket_name,
                prefix: self.prefix,
                bucket_owner: self.bucket_owner,
            }
        }
    }
}
impl VerifiedAccessLogS3Destination {
    /// Creates a new builder-style object to manufacture [`VerifiedAccessLogS3Destination`](crate::model::VerifiedAccessLogS3Destination).
    pub fn builder() -> crate::model::verified_access_log_s3_destination::Builder {
        crate::model::verified_access_log_s3_destination::Builder::default()
    }
}

/// <p>Describes the destinations for Verified Access logs.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct VerifiedAccessLogOptions {
    /// <p>Sends Verified Access logs to Amazon S3.</p>
    #[doc(hidden)]
    pub s3: std::option::Option<crate::model::VerifiedAccessLogS3DestinationOptions>,
    /// <p>Sends Verified Access logs to CloudWatch Logs.</p>
    #[doc(hidden)]
    pub cloud_watch_logs:
        std::option::Option<crate::model::VerifiedAccessLogCloudWatchLogsDestinationOptions>,
    /// <p>Sends Verified Access logs to Kinesis.</p>
    #[doc(hidden)]
    pub kinesis_data_firehose:
        std::option::Option<crate::model::VerifiedAccessLogKinesisDataFirehoseDestinationOptions>,
}
impl VerifiedAccessLogOptions {
    /// <p>Sends Verified Access logs to Amazon S3.</p>
    pub fn s3(&self) -> std::option::Option<&crate::model::VerifiedAccessLogS3DestinationOptions> {
        self.s3.as_ref()
    }
    /// <p>Sends Verified Access logs to CloudWatch Logs.</p>
    pub fn cloud_watch_logs(
        &self,
    ) -> std::option::Option<&crate::model::VerifiedAccessLogCloudWatchLogsDestinationOptions> {
        self.cloud_watch_logs.as_ref()
    }
    /// <p>Sends Verified Access logs to Kinesis.</p>
    pub fn kinesis_data_firehose(
        &self,
    ) -> std::option::Option<&crate::model::VerifiedAccessLogKinesisDataFirehoseDestinationOptions>
    {
        self.kinesis_data_firehose.as_ref()
    }
}
/// See [`VerifiedAccessLogOptions`](crate::model::VerifiedAccessLogOptions).
pub mod verified_access_log_options {

    /// A builder for [`VerifiedAccessLogOptions`](crate::model::VerifiedAccessLogOptions).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) s3: std::option::Option<crate::model::VerifiedAccessLogS3DestinationOptions>,
        pub(crate) cloud_watch_logs:
            std::option::Option<crate::model::VerifiedAccessLogCloudWatchLogsDestinationOptions>,
        pub(crate) kinesis_data_firehose: std::option::Option<
            crate::model::VerifiedAccessLogKinesisDataFirehoseDestinationOptions,
        >,
    }
    impl Builder {
        /// <p>Sends Verified Access logs to Amazon S3.</p>
        pub fn s3(mut self, input: crate::model::VerifiedAccessLogS3DestinationOptions) -> Self {
            self.s3 = Some(input);
            self
        }
        /// <p>Sends Verified Access logs to Amazon S3.</p>
        pub fn set_s3(
            mut self,
            input: std::option::Option<crate::model::VerifiedAccessLogS3DestinationOptions>,
        ) -> Self {
            self.s3 = input;
            self
        }
        /// <p>Sends Verified Access logs to CloudWatch Logs.</p>
        pub fn cloud_watch_logs(
            mut self,
            input: crate::model::VerifiedAccessLogCloudWatchLogsDestinationOptions,
        ) -> Self {
            self.cloud_watch_logs = Some(input);
            self
        }
        /// <p>Sends Verified Access logs to CloudWatch Logs.</p>
        pub fn set_cloud_watch_logs(
            mut self,
            input: std::option::Option<
                crate::model::VerifiedAccessLogCloudWatchLogsDestinationOptions,
            >,
        ) -> Self {
            self.cloud_watch_logs = input;
            self
        }
        /// <p>Sends Verified Access logs to Kinesis.</p>
        pub fn kinesis_data_firehose(
            mut self,
            input: crate::model::VerifiedAccessLogKinesisDataFirehoseDestinationOptions,
        ) -> Self {
            self.kinesis_data_firehose = Some(input);
            self
        }
        /// <p>Sends Verified Access logs to Kinesis.</p>
        pub fn set_kinesis_data_firehose(
            mut self,
            input: std::option::Option<
                crate::model::VerifiedAccessLogKinesisDataFirehoseDestinationOptions,
            >,
        ) -> Self {
            self.kinesis_data_firehose = input;
            self
        }
        /// Consumes the builder and constructs a [`VerifiedAccessLogOptions`](crate::model::VerifiedAccessLogOptions).
        pub fn build(self) -> crate::model::VerifiedAccessLogOptions {
            crate::model::VerifiedAccessLogOptions {
                s3: self.s3,
                cloud_watch_logs: self.cloud_watch_logs,
                kinesis_data_firehose: self.kinesis_data_firehose,
            }
        }
    }
}
impl VerifiedAccessLogOptions {
    /// Creates a new builder-style object to manufacture [`VerifiedAccessLogOptions`](crate::model::VerifiedAccessLogOptions).
    pub fn builder() -> crate::model::verified_access_log_options::Builder {
        crate::model::verified_access_log_options::Builder::default()
    }
}

/// <p>Describes Amazon Kinesis Data Firehose logging options.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct VerifiedAccessLogKinesisDataFirehoseDestinationOptions {
    /// <p>Indicates whether logging is enabled.</p>
    #[doc(hidden)]
    pub enabled: std::option::Option<bool>,
    /// <p>The ID of the delivery stream.</p>
    #[doc(hidden)]
    pub delivery_stream: std::option::Option<std::string::String>,
}
impl VerifiedAccessLogKinesisDataFirehoseDestinationOptions {
    /// <p>Indicates whether logging is enabled.</p>
    pub fn enabled(&self) -> std::option::Option<bool> {
        self.enabled
    }
    /// <p>The ID of the delivery stream.</p>
    pub fn delivery_stream(&self) -> std::option::Option<&str> {
        self.delivery_stream.as_deref()
    }
}
/// See [`VerifiedAccessLogKinesisDataFirehoseDestinationOptions`](crate::model::VerifiedAccessLogKinesisDataFirehoseDestinationOptions).
pub mod verified_access_log_kinesis_data_firehose_destination_options {

    /// A builder for [`VerifiedAccessLogKinesisDataFirehoseDestinationOptions`](crate::model::VerifiedAccessLogKinesisDataFirehoseDestinationOptions).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) enabled: std::option::Option<bool>,
        pub(crate) delivery_stream: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>Indicates whether logging is enabled.</p>
        pub fn enabled(mut self, input: bool) -> Self {
            self.enabled = Some(input);
            self
        }
        /// <p>Indicates whether logging is enabled.</p>
        pub fn set_enabled(mut self, input: std::option::Option<bool>) -> Self {
            self.enabled = input;
            self
        }
        /// <p>The ID of the delivery stream.</p>
        pub fn delivery_stream(mut self, input: impl Into<std::string::String>) -> Self {
            self.delivery_stream = Some(input.into());
            self
        }
        /// <p>The ID of the delivery stream.</p>
        pub fn set_delivery_stream(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.delivery_stream = input;
            self
        }
        /// Consumes the builder and constructs a [`VerifiedAccessLogKinesisDataFirehoseDestinationOptions`](crate::model::VerifiedAccessLogKinesisDataFirehoseDestinationOptions).
        pub fn build(self) -> crate::model::VerifiedAccessLogKinesisDataFirehoseDestinationOptions {
            crate::model::VerifiedAccessLogKinesisDataFirehoseDestinationOptions {
                enabled: self.enabled,
                delivery_stream: self.delivery_stream,
            }
        }
    }
}
impl VerifiedAccessLogKinesisDataFirehoseDestinationOptions {
    /// Creates a new builder-style object to manufacture [`VerifiedAccessLogKinesisDataFirehoseDestinationOptions`](crate::model::VerifiedAccessLogKinesisDataFirehoseDestinationOptions).
    pub fn builder(
    ) -> crate::model::verified_access_log_kinesis_data_firehose_destination_options::Builder {
        crate::model::verified_access_log_kinesis_data_firehose_destination_options::Builder::default()
    }
}

/// <p>Options for CloudWatch Logs as a logging destination.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct VerifiedAccessLogCloudWatchLogsDestinationOptions {
    /// <p>Indicates whether logging is enabled.</p>
    #[doc(hidden)]
    pub enabled: std::option::Option<bool>,
    /// <p>The ID of the CloudWatch Logs log group.</p>
    #[doc(hidden)]
    pub log_group: std::option::Option<std::string::String>,
}
impl VerifiedAccessLogCloudWatchLogsDestinationOptions {
    /// <p>Indicates whether logging is enabled.</p>
    pub fn enabled(&self) -> std::option::Option<bool> {
        self.enabled
    }
    /// <p>The ID of the CloudWatch Logs log group.</p>
    pub fn log_group(&self) -> std::option::Option<&str> {
        self.log_group.as_deref()
    }
}
/// See [`VerifiedAccessLogCloudWatchLogsDestinationOptions`](crate::model::VerifiedAccessLogCloudWatchLogsDestinationOptions).
pub mod verified_access_log_cloud_watch_logs_destination_options {

    /// A builder for [`VerifiedAccessLogCloudWatchLogsDestinationOptions`](crate::model::VerifiedAccessLogCloudWatchLogsDestinationOptions).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) enabled: std::option::Option<bool>,
        pub(crate) log_group: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>Indicates whether logging is enabled.</p>
        pub fn enabled(mut self, input: bool) -> Self {
            self.enabled = Some(input);
            self
        }
        /// <p>Indicates whether logging is enabled.</p>
        pub fn set_enabled(mut self, input: std::option::Option<bool>) -> Self {
            self.enabled = input;
            self
        }
        /// <p>The ID of the CloudWatch Logs log group.</p>
        pub fn log_group(mut self, input: impl Into<std::string::String>) -> Self {
            self.log_group = Some(input.into());
            self
        }
        /// <p>The ID of the CloudWatch Logs log group.</p>
        pub fn set_log_group(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.log_group = input;
            self
        }
        /// Consumes the builder and constructs a [`VerifiedAccessLogCloudWatchLogsDestinationOptions`](crate::model::VerifiedAccessLogCloudWatchLogsDestinationOptions).
        pub fn build(self) -> crate::model::VerifiedAccessLogCloudWatchLogsDestinationOptions {
            crate::model::VerifiedAccessLogCloudWatchLogsDestinationOptions {
                enabled: self.enabled,
                log_group: self.log_group,
            }
        }
    }
}
impl VerifiedAccessLogCloudWatchLogsDestinationOptions {
    /// Creates a new builder-style object to manufacture [`VerifiedAccessLogCloudWatchLogsDestinationOptions`](crate::model::VerifiedAccessLogCloudWatchLogsDestinationOptions).
    pub fn builder(
    ) -> crate::model::verified_access_log_cloud_watch_logs_destination_options::Builder {
        crate::model::verified_access_log_cloud_watch_logs_destination_options::Builder::default()
    }
}

/// <p>Options for Amazon S3 as a logging destination.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct VerifiedAccessLogS3DestinationOptions {
    /// <p>Indicates whether logging is enabled.</p>
    #[doc(hidden)]
    pub enabled: std::option::Option<bool>,
    /// <p>The bucket name.</p>
    #[doc(hidden)]
    pub bucket_name: std::option::Option<std::string::String>,
    /// <p>The bucket prefix.</p>
    #[doc(hidden)]
    pub prefix: std::option::Option<std::string::String>,
    /// <p>The ID of the Amazon Web Services account that owns the Amazon S3 bucket.</p>
    #[doc(hidden)]
    pub bucket_owner: std::option::Option<std::string::String>,
}
impl VerifiedAccessLogS3DestinationOptions {
    /// <p>Indicates whether logging is enabled.</p>
    pub fn enabled(&self) -> std::option::Option<bool> {
        self.enabled
    }
    /// <p>The bucket name.</p>
    pub fn bucket_name(&self) -> std::option::Option<&str> {
        self.bucket_name.as_deref()
    }
    /// <p>The bucket prefix.</p>
    pub fn prefix(&self) -> std::option::Option<&str> {
        self.prefix.as_deref()
    }
    /// <p>The ID of the Amazon Web Services account that owns the Amazon S3 bucket.</p>
    pub fn bucket_owner(&self) -> std::option::Option<&str> {
        self.bucket_owner.as_deref()
    }
}
/// See [`VerifiedAccessLogS3DestinationOptions`](crate::model::VerifiedAccessLogS3DestinationOptions).
pub mod verified_access_log_s3_destination_options {

    /// A builder for [`VerifiedAccessLogS3DestinationOptions`](crate::model::VerifiedAccessLogS3DestinationOptions).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) enabled: std::option::Option<bool>,
        pub(crate) bucket_name: std::option::Option<std::string::String>,
        pub(crate) prefix: std::option::Option<std::string::String>,
        pub(crate) bucket_owner: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>Indicates whether logging is enabled.</p>
        pub fn enabled(mut self, input: bool) -> Self {
            self.enabled = Some(input);
            self
        }
        /// <p>Indicates whether logging is enabled.</p>
        pub fn set_enabled(mut self, input: std::option::Option<bool>) -> Self {
            self.enabled = input;
            self
        }
        /// <p>The bucket name.</p>
        pub fn bucket_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.bucket_name = Some(input.into());
            self
        }
        /// <p>The bucket name.</p>
        pub fn set_bucket_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.bucket_name = input;
            self
        }
        /// <p>The bucket prefix.</p>
        pub fn prefix(mut self, input: impl Into<std::string::String>) -> Self {
            self.prefix = Some(input.into());
            self
        }
        /// <p>The bucket prefix.</p>
        pub fn set_prefix(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.prefix = input;
            self
        }
        /// <p>The ID of the Amazon Web Services account that owns the Amazon S3 bucket.</p>
        pub fn bucket_owner(mut self, input: impl Into<std::string::String>) -> Self {
            self.bucket_owner = Some(input.into());
            self
        }
        /// <p>The ID of the Amazon Web Services account that owns the Amazon S3 bucket.</p>
        pub fn set_bucket_owner(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.bucket_owner = input;
            self
        }
        /// Consumes the builder and constructs a [`VerifiedAccessLogS3DestinationOptions`](crate::model::VerifiedAccessLogS3DestinationOptions).
        pub fn build(self) -> crate::model::VerifiedAccessLogS3DestinationOptions {
            crate::model::VerifiedAccessLogS3DestinationOptions {
                enabled: self.enabled,
                bucket_name: self.bucket_name,
                prefix: self.prefix,
                bucket_owner: self.bucket_owner,
            }
        }
    }
}
impl VerifiedAccessLogS3DestinationOptions {
    /// Creates a new builder-style object to manufacture [`VerifiedAccessLogS3DestinationOptions`](crate::model::VerifiedAccessLogS3DestinationOptions).
    pub fn builder() -> crate::model::verified_access_log_s3_destination_options::Builder {
        crate::model::verified_access_log_s3_destination_options::Builder::default()
    }
}

/// <p>Describes a Verified Access instance.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct VerifiedAccessInstance {
    /// <p>The ID of the Amazon Web Services Verified Access instance.</p>
    #[doc(hidden)]
    pub verified_access_instance_id: std::option::Option<std::string::String>,
    /// <p>A description for the Amazon Web Services Verified Access instance.</p>
    #[doc(hidden)]
    pub description: std::option::Option<std::string::String>,
    /// <p>The IDs of the Amazon Web Services Verified Access trust providers.</p>
    #[doc(hidden)]
    pub verified_access_trust_providers:
        std::option::Option<std::vec::Vec<crate::model::VerifiedAccessTrustProviderCondensed>>,
    /// <p>The creation time.</p>
    #[doc(hidden)]
    pub creation_time: std::option::Option<std::string::String>,
    /// <p>The last updated time.</p>
    #[doc(hidden)]
    pub last_updated_time: std::option::Option<std::string::String>,
    /// <p>The tags.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl VerifiedAccessInstance {
    /// <p>The ID of the Amazon Web Services Verified Access instance.</p>
    pub fn verified_access_instance_id(&self) -> std::option::Option<&str> {
        self.verified_access_instance_id.as_deref()
    }
    /// <p>A description for the Amazon Web Services Verified Access instance.</p>
    pub fn description(&self) -> std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The IDs of the Amazon Web Services Verified Access trust providers.</p>
    pub fn verified_access_trust_providers(
        &self,
    ) -> std::option::Option<&[crate::model::VerifiedAccessTrustProviderCondensed]> {
        self.verified_access_trust_providers.as_deref()
    }
    /// <p>The creation time.</p>
    pub fn creation_time(&self) -> std::option::Option<&str> {
        self.creation_time.as_deref()
    }
    /// <p>The last updated time.</p>
    pub fn last_updated_time(&self) -> std::option::Option<&str> {
        self.last_updated_time.as_deref()
    }
    /// <p>The tags.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
}
/// See [`VerifiedAccessInstance`](crate::model::VerifiedAccessInstance).
pub mod verified_access_instance {

    /// A builder for [`VerifiedAccessInstance`](crate::model::VerifiedAccessInstance).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) verified_access_instance_id: std::option::Option<std::string::String>,
        pub(crate) description: std::option::Option<std::string::String>,
        pub(crate) verified_access_trust_providers:
            std::option::Option<std::vec::Vec<crate::model::VerifiedAccessTrustProviderCondensed>>,
        pub(crate) creation_time: std::option::Option<std::string::String>,
        pub(crate) last_updated_time: std::option::Option<std::string::String>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    }
    impl Builder {
        /// <p>The ID of the Amazon Web Services Verified Access instance.</p>
        pub fn verified_access_instance_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.verified_access_instance_id = Some(input.into());
            self
        }
        /// <p>The ID of the Amazon Web Services Verified Access instance.</p>
        pub fn set_verified_access_instance_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.verified_access_instance_id = input;
            self
        }
        /// <p>A description for the Amazon Web Services Verified Access instance.</p>
        pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
            self.description = Some(input.into());
            self
        }
        /// <p>A description for the Amazon Web Services Verified Access instance.</p>
        pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.description = input;
            self
        }
        /// Appends an item to `verified_access_trust_providers`.
        ///
        /// To override the contents of this collection use [`set_verified_access_trust_providers`](Self::set_verified_access_trust_providers).
        ///
        /// <p>The IDs of the Amazon Web Services Verified Access trust providers.</p>
        pub fn verified_access_trust_providers(
            mut self,
            input: crate::model::VerifiedAccessTrustProviderCondensed,
        ) -> Self {
            let mut v = self.verified_access_trust_providers.unwrap_or_default();
            v.push(input);
            self.verified_access_trust_providers = Some(v);
            self
        }
        /// <p>The IDs of the Amazon Web Services Verified Access trust providers.</p>
        pub fn set_verified_access_trust_providers(
            mut self,
            input: std::option::Option<
                std::vec::Vec<crate::model::VerifiedAccessTrustProviderCondensed>,
            >,
        ) -> Self {
            self.verified_access_trust_providers = input;
            self
        }
        /// <p>The creation time.</p>
        pub fn creation_time(mut self, input: impl Into<std::string::String>) -> Self {
            self.creation_time = Some(input.into());
            self
        }
        /// <p>The creation time.</p>
        pub fn set_creation_time(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.creation_time = input;
            self
        }
        /// <p>The last updated time.</p>
        pub fn last_updated_time(mut self, input: impl Into<std::string::String>) -> Self {
            self.last_updated_time = Some(input.into());
            self
        }
        /// <p>The last updated time.</p>
        pub fn set_last_updated_time(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.last_updated_time = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>The tags.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>The tags.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// Consumes the builder and constructs a [`VerifiedAccessInstance`](crate::model::VerifiedAccessInstance).
        pub fn build(self) -> crate::model::VerifiedAccessInstance {
            crate::model::VerifiedAccessInstance {
                verified_access_instance_id: self.verified_access_instance_id,
                description: self.description,
                verified_access_trust_providers: self.verified_access_trust_providers,
                creation_time: self.creation_time,
                last_updated_time: self.last_updated_time,
                tags: self.tags,
            }
        }
    }
}
impl VerifiedAccessInstance {
    /// Creates a new builder-style object to manufacture [`VerifiedAccessInstance`](crate::model::VerifiedAccessInstance).
    pub fn builder() -> crate::model::verified_access_instance::Builder {
        crate::model::verified_access_instance::Builder::default()
    }
}

/// <p>Condensed information about a trust provider.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct VerifiedAccessTrustProviderCondensed {
    /// <p>The ID of the trust provider.</p>
    #[doc(hidden)]
    pub verified_access_trust_provider_id: std::option::Option<std::string::String>,
    /// <p>The description of trust provider.</p>
    #[doc(hidden)]
    pub description: std::option::Option<std::string::String>,
    /// <p>The type of trust provider (user- or device-based).</p>
    #[doc(hidden)]
    pub trust_provider_type: std::option::Option<crate::model::TrustProviderType>,
    /// <p>The type of user-based trust provider.</p>
    #[doc(hidden)]
    pub user_trust_provider_type: std::option::Option<crate::model::UserTrustProviderType>,
    /// <p>The type of device-based trust provider.</p>
    #[doc(hidden)]
    pub device_trust_provider_type: std::option::Option<crate::model::DeviceTrustProviderType>,
}
impl VerifiedAccessTrustProviderCondensed {
    /// <p>The ID of the trust provider.</p>
    pub fn verified_access_trust_provider_id(&self) -> std::option::Option<&str> {
        self.verified_access_trust_provider_id.as_deref()
    }
    /// <p>The description of trust provider.</p>
    pub fn description(&self) -> std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The type of trust provider (user- or device-based).</p>
    pub fn trust_provider_type(&self) -> std::option::Option<&crate::model::TrustProviderType> {
        self.trust_provider_type.as_ref()
    }
    /// <p>The type of user-based trust provider.</p>
    pub fn user_trust_provider_type(
        &self,
    ) -> std::option::Option<&crate::model::UserTrustProviderType> {
        self.user_trust_provider_type.as_ref()
    }
    /// <p>The type of device-based trust provider.</p>
    pub fn device_trust_provider_type(
        &self,
    ) -> std::option::Option<&crate::model::DeviceTrustProviderType> {
        self.device_trust_provider_type.as_ref()
    }
}
/// See [`VerifiedAccessTrustProviderCondensed`](crate::model::VerifiedAccessTrustProviderCondensed).
pub mod verified_access_trust_provider_condensed {

    /// A builder for [`VerifiedAccessTrustProviderCondensed`](crate::model::VerifiedAccessTrustProviderCondensed).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) verified_access_trust_provider_id: std::option::Option<std::string::String>,
        pub(crate) description: std::option::Option<std::string::String>,
        pub(crate) trust_provider_type: std::option::Option<crate::model::TrustProviderType>,
        pub(crate) user_trust_provider_type:
            std::option::Option<crate::model::UserTrustProviderType>,
        pub(crate) device_trust_provider_type:
            std::option::Option<crate::model::DeviceTrustProviderType>,
    }
    impl Builder {
        /// <p>The ID of the trust provider.</p>
        pub fn verified_access_trust_provider_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.verified_access_trust_provider_id = Some(input.into());
            self
        }
        /// <p>The ID of the trust provider.</p>
        pub fn set_verified_access_trust_provider_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.verified_access_trust_provider_id = input;
            self
        }
        /// <p>The description of trust provider.</p>
        pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
            self.description = Some(input.into());
            self
        }
        /// <p>The description of trust provider.</p>
        pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.description = input;
            self
        }
        /// <p>The type of trust provider (user- or device-based).</p>
        pub fn trust_provider_type(mut self, input: crate::model::TrustProviderType) -> Self {
            self.trust_provider_type = Some(input);
            self
        }
        /// <p>The type of trust provider (user- or device-based).</p>
        pub fn set_trust_provider_type(
            mut self,
            input: std::option::Option<crate::model::TrustProviderType>,
        ) -> Self {
            self.trust_provider_type = input;
            self
        }
        /// <p>The type of user-based trust provider.</p>
        pub fn user_trust_provider_type(
            mut self,
            input: crate::model::UserTrustProviderType,
        ) -> Self {
            self.user_trust_provider_type = Some(input);
            self
        }
        /// <p>The type of user-based trust provider.</p>
        pub fn set_user_trust_provider_type(
            mut self,
            input: std::option::Option<crate::model::UserTrustProviderType>,
        ) -> Self {
            self.user_trust_provider_type = input;
            self
        }
        /// <p>The type of device-based trust provider.</p>
        pub fn device_trust_provider_type(
            mut self,
            input: crate::model::DeviceTrustProviderType,
        ) -> Self {
            self.device_trust_provider_type = Some(input);
            self
        }
        /// <p>The type of device-based trust provider.</p>
        pub fn set_device_trust_provider_type(
            mut self,
            input: std::option::Option<crate::model::DeviceTrustProviderType>,
        ) -> Self {
            self.device_trust_provider_type = input;
            self
        }
        /// Consumes the builder and constructs a [`VerifiedAccessTrustProviderCondensed`](crate::model::VerifiedAccessTrustProviderCondensed).
        pub fn build(self) -> crate::model::VerifiedAccessTrustProviderCondensed {
            crate::model::VerifiedAccessTrustProviderCondensed {
                verified_access_trust_provider_id: self.verified_access_trust_provider_id,
                description: self.description,
                trust_provider_type: self.trust_provider_type,
                user_trust_provider_type: self.user_trust_provider_type,
                device_trust_provider_type: self.device_trust_provider_type,
            }
        }
    }
}
impl VerifiedAccessTrustProviderCondensed {
    /// Creates a new builder-style object to manufacture [`VerifiedAccessTrustProviderCondensed`](crate::model::VerifiedAccessTrustProviderCondensed).
    pub fn builder() -> crate::model::verified_access_trust_provider_condensed::Builder {
        crate::model::verified_access_trust_provider_condensed::Builder::default()
    }
}

/// <p>Describes a Verified Access group.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct VerifiedAccessGroup {
    /// <p>The ID of the Verified Access group.</p>
    #[doc(hidden)]
    pub verified_access_group_id: std::option::Option<std::string::String>,
    /// <p>The ID of the Amazon Web Services Verified Access instance.</p>
    #[doc(hidden)]
    pub verified_access_instance_id: std::option::Option<std::string::String>,
    /// <p>A description for the Amazon Web Services Verified Access group.</p>
    #[doc(hidden)]
    pub description: std::option::Option<std::string::String>,
    /// <p>The Amazon Web Services account number that owns the group.</p>
    #[doc(hidden)]
    pub owner: std::option::Option<std::string::String>,
    /// <p>The ARN of the Verified Access group.</p>
    #[doc(hidden)]
    pub verified_access_group_arn: std::option::Option<std::string::String>,
    /// <p>The creation time.</p>
    #[doc(hidden)]
    pub creation_time: std::option::Option<std::string::String>,
    /// <p>The last updated time.</p>
    #[doc(hidden)]
    pub last_updated_time: std::option::Option<std::string::String>,
    /// <p>The deletion time.</p>
    #[doc(hidden)]
    pub deletion_time: std::option::Option<std::string::String>,
    /// <p>The tags.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl VerifiedAccessGroup {
    /// <p>The ID of the Verified Access group.</p>
    pub fn verified_access_group_id(&self) -> std::option::Option<&str> {
        self.verified_access_group_id.as_deref()
    }
    /// <p>The ID of the Amazon Web Services Verified Access instance.</p>
    pub fn verified_access_instance_id(&self) -> std::option::Option<&str> {
        self.verified_access_instance_id.as_deref()
    }
    /// <p>A description for the Amazon Web Services Verified Access group.</p>
    pub fn description(&self) -> std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The Amazon Web Services account number that owns the group.</p>
    pub fn owner(&self) -> std::option::Option<&str> {
        self.owner.as_deref()
    }
    /// <p>The ARN of the Verified Access group.</p>
    pub fn verified_access_group_arn(&self) -> std::option::Option<&str> {
        self.verified_access_group_arn.as_deref()
    }
    /// <p>The creation time.</p>
    pub fn creation_time(&self) -> std::option::Option<&str> {
        self.creation_time.as_deref()
    }
    /// <p>The last updated time.</p>
    pub fn last_updated_time(&self) -> std::option::Option<&str> {
        self.last_updated_time.as_deref()
    }
    /// <p>The deletion time.</p>
    pub fn deletion_time(&self) -> std::option::Option<&str> {
        self.deletion_time.as_deref()
    }
    /// <p>The tags.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
}
/// See [`VerifiedAccessGroup`](crate::model::VerifiedAccessGroup).
pub mod verified_access_group {

    /// A builder for [`VerifiedAccessGroup`](crate::model::VerifiedAccessGroup).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) verified_access_group_id: std::option::Option<std::string::String>,
        pub(crate) verified_access_instance_id: std::option::Option<std::string::String>,
        pub(crate) description: std::option::Option<std::string::String>,
        pub(crate) owner: std::option::Option<std::string::String>,
        pub(crate) verified_access_group_arn: std::option::Option<std::string::String>,
        pub(crate) creation_time: std::option::Option<std::string::String>,
        pub(crate) last_updated_time: std::option::Option<std::string::String>,
        pub(crate) deletion_time: std::option::Option<std::string::String>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    }
    impl Builder {
        /// <p>The ID of the Verified Access group.</p>
        pub fn verified_access_group_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.verified_access_group_id = Some(input.into());
            self
        }
        /// <p>The ID of the Verified Access group.</p>
        pub fn set_verified_access_group_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.verified_access_group_id = input;
            self
        }
        /// <p>The ID of the Amazon Web Services Verified Access instance.</p>
        pub fn verified_access_instance_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.verified_access_instance_id = Some(input.into());
            self
        }
        /// <p>The ID of the Amazon Web Services Verified Access instance.</p>
        pub fn set_verified_access_instance_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.verified_access_instance_id = input;
            self
        }
        /// <p>A description for the Amazon Web Services Verified Access group.</p>
        pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
            self.description = Some(input.into());
            self
        }
        /// <p>A description for the Amazon Web Services Verified Access group.</p>
        pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.description = input;
            self
        }
        /// <p>The Amazon Web Services account number that owns the group.</p>
        pub fn owner(mut self, input: impl Into<std::string::String>) -> Self {
            self.owner = Some(input.into());
            self
        }
        /// <p>The Amazon Web Services account number that owns the group.</p>
        pub fn set_owner(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.owner = input;
            self
        }
        /// <p>The ARN of the Verified Access group.</p>
        pub fn verified_access_group_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.verified_access_group_arn = Some(input.into());
            self
        }
        /// <p>The ARN of the Verified Access group.</p>
        pub fn set_verified_access_group_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.verified_access_group_arn = input;
            self
        }
        /// <p>The creation time.</p>
        pub fn creation_time(mut self, input: impl Into<std::string::String>) -> Self {
            self.creation_time = Some(input.into());
            self
        }
        /// <p>The creation time.</p>
        pub fn set_creation_time(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.creation_time = input;
            self
        }
        /// <p>The last updated time.</p>
        pub fn last_updated_time(mut self, input: impl Into<std::string::String>) -> Self {
            self.last_updated_time = Some(input.into());
            self
        }
        /// <p>The last updated time.</p>
        pub fn set_last_updated_time(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.last_updated_time = input;
            self
        }
        /// <p>The deletion time.</p>
        pub fn deletion_time(mut self, input: impl Into<std::string::String>) -> Self {
            self.deletion_time = Some(input.into());
            self
        }
        /// <p>The deletion time.</p>
        pub fn set_deletion_time(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.deletion_time = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>The tags.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>The tags.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// Consumes the builder and constructs a [`VerifiedAccessGroup`](crate::model::VerifiedAccessGroup).
        pub fn build(self) -> crate::model::VerifiedAccessGroup {
            crate::model::VerifiedAccessGroup {
                verified_access_group_id: self.verified_access_group_id,
                verified_access_instance_id: self.verified_access_instance_id,
                description: self.description,
                owner: self.owner,
                verified_access_group_arn: self.verified_access_group_arn,
                creation_time: self.creation_time,
                last_updated_time: self.last_updated_time,
                deletion_time: self.deletion_time,
                tags: self.tags,
            }
        }
    }
}
impl VerifiedAccessGroup {
    /// Creates a new builder-style object to manufacture [`VerifiedAccessGroup`](crate::model::VerifiedAccessGroup).
    pub fn builder() -> crate::model::verified_access_group::Builder {
        crate::model::verified_access_group::Builder::default()
    }
}

/// <p>An Amazon Web Services Verified Access endpoint specifies the application that Amazon Web Services Verified Access provides access to. It must be attached to an Amazon Web Services Verified Access group. An Amazon Web Services Verified Access endpoint must also have an attached access policy before you attached it to a group.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct VerifiedAccessEndpoint {
    /// <p>The ID of the Amazon Web Services Verified Access instance.</p>
    #[doc(hidden)]
    pub verified_access_instance_id: std::option::Option<std::string::String>,
    /// <p>The ID of the Amazon Web Services Verified Access group.</p>
    #[doc(hidden)]
    pub verified_access_group_id: std::option::Option<std::string::String>,
    /// <p>The ID of the Amazon Web Services Verified Access endpoint.</p>
    #[doc(hidden)]
    pub verified_access_endpoint_id: std::option::Option<std::string::String>,
    /// <p>The DNS name for users to reach your application.</p>
    #[doc(hidden)]
    pub application_domain: std::option::Option<std::string::String>,
    /// <p>The type of Amazon Web Services Verified Access endpoint. Incoming application requests will be sent to an IP address, load balancer or a network interface depending on the endpoint type specified.</p>
    #[doc(hidden)]
    pub endpoint_type: std::option::Option<crate::model::VerifiedAccessEndpointType>,
    /// <p>The type of attachment used to provide connectivity between the Amazon Web Services Verified Access endpoint and the application.</p>
    #[doc(hidden)]
    pub attachment_type: std::option::Option<crate::model::VerifiedAccessEndpointAttachmentType>,
    /// <p>The ARN of a public TLS/SSL certificate imported into or created with ACM.</p>
    #[doc(hidden)]
    pub domain_certificate_arn: std::option::Option<std::string::String>,
    /// <p>A DNS name that is generated for the endpoint.</p>
    #[doc(hidden)]
    pub endpoint_domain: std::option::Option<std::string::String>,
    /// <p>Returned if endpoint has a device trust provider attached.</p>
    #[doc(hidden)]
    pub device_validation_domain: std::option::Option<std::string::String>,
    /// <p>The IDs of the security groups for the endpoint.</p>
    #[doc(hidden)]
    pub security_group_ids: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>The load balancer details if creating the Amazon Web Services Verified Access endpoint as <code>load-balancer</code>type.</p>
    #[doc(hidden)]
    pub load_balancer_options:
        std::option::Option<crate::model::VerifiedAccessEndpointLoadBalancerOptions>,
    /// <p>The options for network-interface type endpoint.</p>
    #[doc(hidden)]
    pub network_interface_options:
        std::option::Option<crate::model::VerifiedAccessEndpointEniOptions>,
    /// <p>The endpoint status.</p>
    #[doc(hidden)]
    pub status: std::option::Option<crate::model::VerifiedAccessEndpointStatus>,
    /// <p>A description for the Amazon Web Services Verified Access endpoint.</p>
    #[doc(hidden)]
    pub description: std::option::Option<std::string::String>,
    /// <p>The creation time.</p>
    #[doc(hidden)]
    pub creation_time: std::option::Option<std::string::String>,
    /// <p>The last updated time.</p>
    #[doc(hidden)]
    pub last_updated_time: std::option::Option<std::string::String>,
    /// <p>The deletion time.</p>
    #[doc(hidden)]
    pub deletion_time: std::option::Option<std::string::String>,
    /// <p>The tags.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl VerifiedAccessEndpoint {
    /// <p>The ID of the Amazon Web Services Verified Access instance.</p>
    pub fn verified_access_instance_id(&self) -> std::option::Option<&str> {
        self.verified_access_instance_id.as_deref()
    }
    /// <p>The ID of the Amazon Web Services Verified Access group.</p>
    pub fn verified_access_group_id(&self) -> std::option::Option<&str> {
        self.verified_access_group_id.as_deref()
    }
    /// <p>The ID of the Amazon Web Services Verified Access endpoint.</p>
    pub fn verified_access_endpoint_id(&self) -> std::option::Option<&str> {
        self.verified_access_endpoint_id.as_deref()
    }
    /// <p>The DNS name for users to reach your application.</p>
    pub fn application_domain(&self) -> std::option::Option<&str> {
        self.application_domain.as_deref()
    }
    /// <p>The type of Amazon Web Services Verified Access endpoint. Incoming application requests will be sent to an IP address, load balancer or a network interface depending on the endpoint type specified.</p>
    pub fn endpoint_type(&self) -> std::option::Option<&crate::model::VerifiedAccessEndpointType> {
        self.endpoint_type.as_ref()
    }
    /// <p>The type of attachment used to provide connectivity between the Amazon Web Services Verified Access endpoint and the application.</p>
    pub fn attachment_type(
        &self,
    ) -> std::option::Option<&crate::model::VerifiedAccessEndpointAttachmentType> {
        self.attachment_type.as_ref()
    }
    /// <p>The ARN of a public TLS/SSL certificate imported into or created with ACM.</p>
    pub fn domain_certificate_arn(&self) -> std::option::Option<&str> {
        self.domain_certificate_arn.as_deref()
    }
    /// <p>A DNS name that is generated for the endpoint.</p>
    pub fn endpoint_domain(&self) -> std::option::Option<&str> {
        self.endpoint_domain.as_deref()
    }
    /// <p>Returned if endpoint has a device trust provider attached.</p>
    pub fn device_validation_domain(&self) -> std::option::Option<&str> {
        self.device_validation_domain.as_deref()
    }
    /// <p>The IDs of the security groups for the endpoint.</p>
    pub fn security_group_ids(&self) -> std::option::Option<&[std::string::String]> {
        self.security_group_ids.as_deref()
    }
    /// <p>The load balancer details if creating the Amazon Web Services Verified Access endpoint as <code>load-balancer</code>type.</p>
    pub fn load_balancer_options(
        &self,
    ) -> std::option::Option<&crate::model::VerifiedAccessEndpointLoadBalancerOptions> {
        self.load_balancer_options.as_ref()
    }
    /// <p>The options for network-interface type endpoint.</p>
    pub fn network_interface_options(
        &self,
    ) -> std::option::Option<&crate::model::VerifiedAccessEndpointEniOptions> {
        self.network_interface_options.as_ref()
    }
    /// <p>The endpoint status.</p>
    pub fn status(&self) -> std::option::Option<&crate::model::VerifiedAccessEndpointStatus> {
        self.status.as_ref()
    }
    /// <p>A description for the Amazon Web Services Verified Access endpoint.</p>
    pub fn description(&self) -> std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The creation time.</p>
    pub fn creation_time(&self) -> std::option::Option<&str> {
        self.creation_time.as_deref()
    }
    /// <p>The last updated time.</p>
    pub fn last_updated_time(&self) -> std::option::Option<&str> {
        self.last_updated_time.as_deref()
    }
    /// <p>The deletion time.</p>
    pub fn deletion_time(&self) -> std::option::Option<&str> {
        self.deletion_time.as_deref()
    }
    /// <p>The tags.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
}
/// See [`VerifiedAccessEndpoint`](crate::model::VerifiedAccessEndpoint).
pub mod verified_access_endpoint {

    /// A builder for [`VerifiedAccessEndpoint`](crate::model::VerifiedAccessEndpoint).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) verified_access_instance_id: std::option::Option<std::string::String>,
        pub(crate) verified_access_group_id: std::option::Option<std::string::String>,
        pub(crate) verified_access_endpoint_id: std::option::Option<std::string::String>,
        pub(crate) application_domain: std::option::Option<std::string::String>,
        pub(crate) endpoint_type: std::option::Option<crate::model::VerifiedAccessEndpointType>,
        pub(crate) attachment_type:
            std::option::Option<crate::model::VerifiedAccessEndpointAttachmentType>,
        pub(crate) domain_certificate_arn: std::option::Option<std::string::String>,
        pub(crate) endpoint_domain: std::option::Option<std::string::String>,
        pub(crate) device_validation_domain: std::option::Option<std::string::String>,
        pub(crate) security_group_ids: std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) load_balancer_options:
            std::option::Option<crate::model::VerifiedAccessEndpointLoadBalancerOptions>,
        pub(crate) network_interface_options:
            std::option::Option<crate::model::VerifiedAccessEndpointEniOptions>,
        pub(crate) status: std::option::Option<crate::model::VerifiedAccessEndpointStatus>,
        pub(crate) description: std::option::Option<std::string::String>,
        pub(crate) creation_time: std::option::Option<std::string::String>,
        pub(crate) last_updated_time: std::option::Option<std::string::String>,
        pub(crate) deletion_time: std::option::Option<std::string::String>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    }
    impl Builder {
        /// <p>The ID of the Amazon Web Services Verified Access instance.</p>
        pub fn verified_access_instance_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.verified_access_instance_id = Some(input.into());
            self
        }
        /// <p>The ID of the Amazon Web Services Verified Access instance.</p>
        pub fn set_verified_access_instance_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.verified_access_instance_id = input;
            self
        }
        /// <p>The ID of the Amazon Web Services Verified Access group.</p>
        pub fn verified_access_group_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.verified_access_group_id = Some(input.into());
            self
        }
        /// <p>The ID of the Amazon Web Services Verified Access group.</p>
        pub fn set_verified_access_group_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.verified_access_group_id = input;
            self
        }
        /// <p>The ID of the Amazon Web Services Verified Access endpoint.</p>
        pub fn verified_access_endpoint_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.verified_access_endpoint_id = Some(input.into());
            self
        }
        /// <p>The ID of the Amazon Web Services Verified Access endpoint.</p>
        pub fn set_verified_access_endpoint_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.verified_access_endpoint_id = input;
            self
        }
        /// <p>The DNS name for users to reach your application.</p>
        pub fn application_domain(mut self, input: impl Into<std::string::String>) -> Self {
            self.application_domain = Some(input.into());
            self
        }
        /// <p>The DNS name for users to reach your application.</p>
        pub fn set_application_domain(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.application_domain = input;
            self
        }
        /// <p>The type of Amazon Web Services Verified Access endpoint. Incoming application requests will be sent to an IP address, load balancer or a network interface depending on the endpoint type specified.</p>
        pub fn endpoint_type(mut self, input: crate::model::VerifiedAccessEndpointType) -> Self {
            self.endpoint_type = Some(input);
            self
        }
        /// <p>The type of Amazon Web Services Verified Access endpoint. Incoming application requests will be sent to an IP address, load balancer or a network interface depending on the endpoint type specified.</p>
        pub fn set_endpoint_type(
            mut self,
            input: std::option::Option<crate::model::VerifiedAccessEndpointType>,
        ) -> Self {
            self.endpoint_type = input;
            self
        }
        /// <p>The type of attachment used to provide connectivity between the Amazon Web Services Verified Access endpoint and the application.</p>
        pub fn attachment_type(
            mut self,
            input: crate::model::VerifiedAccessEndpointAttachmentType,
        ) -> Self {
            self.attachment_type = Some(input);
            self
        }
        /// <p>The type of attachment used to provide connectivity between the Amazon Web Services Verified Access endpoint and the application.</p>
        pub fn set_attachment_type(
            mut self,
            input: std::option::Option<crate::model::VerifiedAccessEndpointAttachmentType>,
        ) -> Self {
            self.attachment_type = input;
            self
        }
        /// <p>The ARN of a public TLS/SSL certificate imported into or created with ACM.</p>
        pub fn domain_certificate_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.domain_certificate_arn = Some(input.into());
            self
        }
        /// <p>The ARN of a public TLS/SSL certificate imported into or created with ACM.</p>
        pub fn set_domain_certificate_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.domain_certificate_arn = input;
            self
        }
        /// <p>A DNS name that is generated for the endpoint.</p>
        pub fn endpoint_domain(mut self, input: impl Into<std::string::String>) -> Self {
            self.endpoint_domain = Some(input.into());
            self
        }
        /// <p>A DNS name that is generated for the endpoint.</p>
        pub fn set_endpoint_domain(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.endpoint_domain = input;
            self
        }
        /// <p>Returned if endpoint has a device trust provider attached.</p>
        pub fn device_validation_domain(mut self, input: impl Into<std::string::String>) -> Self {
            self.device_validation_domain = Some(input.into());
            self
        }
        /// <p>Returned if endpoint has a device trust provider attached.</p>
        pub fn set_device_validation_domain(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.device_validation_domain = input;
            self
        }
        /// Appends an item to `security_group_ids`.
        ///
        /// To override the contents of this collection use [`set_security_group_ids`](Self::set_security_group_ids).
        ///
        /// <p>The IDs of the security groups for the endpoint.</p>
        pub fn security_group_ids(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.security_group_ids.unwrap_or_default();
            v.push(input.into());
            self.security_group_ids = Some(v);
            self
        }
        /// <p>The IDs of the security groups for the endpoint.</p>
        pub fn set_security_group_ids(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.security_group_ids = input;
            self
        }
        /// <p>The load balancer details if creating the Amazon Web Services Verified Access endpoint as <code>load-balancer</code>type.</p>
        pub fn load_balancer_options(
            mut self,
            input: crate::model::VerifiedAccessEndpointLoadBalancerOptions,
        ) -> Self {
            self.load_balancer_options = Some(input);
            self
        }
        /// <p>The load balancer details if creating the Amazon Web Services Verified Access endpoint as <code>load-balancer</code>type.</p>
        pub fn set_load_balancer_options(
            mut self,
            input: std::option::Option<crate::model::VerifiedAccessEndpointLoadBalancerOptions>,
        ) -> Self {
            self.load_balancer_options = input;
            self
        }
        /// <p>The options for network-interface type endpoint.</p>
        pub fn network_interface_options(
            mut self,
            input: crate::model::VerifiedAccessEndpointEniOptions,
        ) -> Self {
            self.network_interface_options = Some(input);
            self
        }
        /// <p>The options for network-interface type endpoint.</p>
        pub fn set_network_interface_options(
            mut self,
            input: std::option::Option<crate::model::VerifiedAccessEndpointEniOptions>,
        ) -> Self {
            self.network_interface_options = input;
            self
        }
        /// <p>The endpoint status.</p>
        pub fn status(mut self, input: crate::model::VerifiedAccessEndpointStatus) -> Self {
            self.status = Some(input);
            self
        }
        /// <p>The endpoint status.</p>
        pub fn set_status(
            mut self,
            input: std::option::Option<crate::model::VerifiedAccessEndpointStatus>,
        ) -> Self {
            self.status = input;
            self
        }
        /// <p>A description for the Amazon Web Services Verified Access endpoint.</p>
        pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
            self.description = Some(input.into());
            self
        }
        /// <p>A description for the Amazon Web Services Verified Access endpoint.</p>
        pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.description = input;
            self
        }
        /// <p>The creation time.</p>
        pub fn creation_time(mut self, input: impl Into<std::string::String>) -> Self {
            self.creation_time = Some(input.into());
            self
        }
        /// <p>The creation time.</p>
        pub fn set_creation_time(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.creation_time = input;
            self
        }
        /// <p>The last updated time.</p>
        pub fn last_updated_time(mut self, input: impl Into<std::string::String>) -> Self {
            self.last_updated_time = Some(input.into());
            self
        }
        /// <p>The last updated time.</p>
        pub fn set_last_updated_time(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.last_updated_time = input;
            self
        }
        /// <p>The deletion time.</p>
        pub fn deletion_time(mut self, input: impl Into<std::string::String>) -> Self {
            self.deletion_time = Some(input.into());
            self
        }
        /// <p>The deletion time.</p>
        pub fn set_deletion_time(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.deletion_time = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>The tags.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>The tags.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// Consumes the builder and constructs a [`VerifiedAccessEndpoint`](crate::model::VerifiedAccessEndpoint).
        pub fn build(self) -> crate::model::VerifiedAccessEndpoint {
            crate::model::VerifiedAccessEndpoint {
                verified_access_instance_id: self.verified_access_instance_id,
                verified_access_group_id: self.verified_access_group_id,
                verified_access_endpoint_id: self.verified_access_endpoint_id,
                application_domain: self.application_domain,
                endpoint_type: self.endpoint_type,
                attachment_type: self.attachment_type,
                domain_certificate_arn: self.domain_certificate_arn,
                endpoint_domain: self.endpoint_domain,
                device_validation_domain: self.device_validation_domain,
                security_group_ids: self.security_group_ids,
                load_balancer_options: self.load_balancer_options,
                network_interface_options: self.network_interface_options,
                status: self.status,
                description: self.description,
                creation_time: self.creation_time,
                last_updated_time: self.last_updated_time,
                deletion_time: self.deletion_time,
                tags: self.tags,
            }
        }
    }
}
impl VerifiedAccessEndpoint {
    /// Creates a new builder-style object to manufacture [`VerifiedAccessEndpoint`](crate::model::VerifiedAccessEndpoint).
    pub fn builder() -> crate::model::verified_access_endpoint::Builder {
        crate::model::verified_access_endpoint::Builder::default()
    }
}

/// <p>Describes the status of a Verified Access endpoint.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct VerifiedAccessEndpointStatus {
    /// <p>The status code of the Verified Access endpoint.</p>
    #[doc(hidden)]
    pub code: std::option::Option<crate::model::VerifiedAccessEndpointStatusCode>,
    /// <p>The status message of the Verified Access endpoint.</p>
    #[doc(hidden)]
    pub message: std::option::Option<std::string::String>,
}
impl VerifiedAccessEndpointStatus {
    /// <p>The status code of the Verified Access endpoint.</p>
    pub fn code(&self) -> std::option::Option<&crate::model::VerifiedAccessEndpointStatusCode> {
        self.code.as_ref()
    }
    /// <p>The status message of the Verified Access endpoint.</p>
    pub fn message(&self) -> std::option::Option<&str> {
        self.message.as_deref()
    }
}
/// See [`VerifiedAccessEndpointStatus`](crate::model::VerifiedAccessEndpointStatus).
pub mod verified_access_endpoint_status {

    /// A builder for [`VerifiedAccessEndpointStatus`](crate::model::VerifiedAccessEndpointStatus).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) code: std::option::Option<crate::model::VerifiedAccessEndpointStatusCode>,
        pub(crate) message: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The status code of the Verified Access endpoint.</p>
        pub fn code(mut self, input: crate::model::VerifiedAccessEndpointStatusCode) -> Self {
            self.code = Some(input);
            self
        }
        /// <p>The status code of the Verified Access endpoint.</p>
        pub fn set_code(
            mut self,
            input: std::option::Option<crate::model::VerifiedAccessEndpointStatusCode>,
        ) -> Self {
            self.code = input;
            self
        }
        /// <p>The status message of the Verified Access endpoint.</p>
        pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
            self.message = Some(input.into());
            self
        }
        /// <p>The status message of the Verified Access endpoint.</p>
        pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.message = input;
            self
        }
        /// Consumes the builder and constructs a [`VerifiedAccessEndpointStatus`](crate::model::VerifiedAccessEndpointStatus).
        pub fn build(self) -> crate::model::VerifiedAccessEndpointStatus {
            crate::model::VerifiedAccessEndpointStatus {
                code: self.code,
                message: self.message,
            }
        }
    }
}
impl VerifiedAccessEndpointStatus {
    /// Creates a new builder-style object to manufacture [`VerifiedAccessEndpointStatus`](crate::model::VerifiedAccessEndpointStatus).
    pub fn builder() -> crate::model::verified_access_endpoint_status::Builder {
        crate::model::verified_access_endpoint_status::Builder::default()
    }
}

/// When writing a match expression against `VerifiedAccessEndpointStatusCode`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let verifiedaccessendpointstatuscode = unimplemented!();
/// match verifiedaccessendpointstatuscode {
///     VerifiedAccessEndpointStatusCode::Active => { /* ... */ },
///     VerifiedAccessEndpointStatusCode::Deleted => { /* ... */ },
///     VerifiedAccessEndpointStatusCode::Deleting => { /* ... */ },
///     VerifiedAccessEndpointStatusCode::Pending => { /* ... */ },
///     VerifiedAccessEndpointStatusCode::Updating => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `verifiedaccessendpointstatuscode` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `VerifiedAccessEndpointStatusCode::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `VerifiedAccessEndpointStatusCode::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `VerifiedAccessEndpointStatusCode::NewFeature` is defined.
/// Specifically, when `verifiedaccessendpointstatuscode` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `VerifiedAccessEndpointStatusCode::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 VerifiedAccessEndpointStatusCode {
    #[allow(missing_docs)] // documentation missing in model
    Active,
    #[allow(missing_docs)] // documentation missing in model
    Deleted,
    #[allow(missing_docs)] // documentation missing in model
    Deleting,
    #[allow(missing_docs)] // documentation missing in model
    Pending,
    #[allow(missing_docs)] // documentation missing in model
    Updating,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for VerifiedAccessEndpointStatusCode {
    fn from(s: &str) -> Self {
        match s {
            "active" => VerifiedAccessEndpointStatusCode::Active,
            "deleted" => VerifiedAccessEndpointStatusCode::Deleted,
            "deleting" => VerifiedAccessEndpointStatusCode::Deleting,
            "pending" => VerifiedAccessEndpointStatusCode::Pending,
            "updating" => VerifiedAccessEndpointStatusCode::Updating,
            other => VerifiedAccessEndpointStatusCode::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for VerifiedAccessEndpointStatusCode {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(VerifiedAccessEndpointStatusCode::from(s))
    }
}
impl VerifiedAccessEndpointStatusCode {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            VerifiedAccessEndpointStatusCode::Active => "active",
            VerifiedAccessEndpointStatusCode::Deleted => "deleted",
            VerifiedAccessEndpointStatusCode::Deleting => "deleting",
            VerifiedAccessEndpointStatusCode::Pending => "pending",
            VerifiedAccessEndpointStatusCode::Updating => "updating",
            VerifiedAccessEndpointStatusCode::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["active", "deleted", "deleting", "pending", "updating"]
    }
}
impl AsRef<str> for VerifiedAccessEndpointStatusCode {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Options for a network-interface type endpoint.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct VerifiedAccessEndpointEniOptions {
    /// <p>The ID of the network interface.</p>
    #[doc(hidden)]
    pub network_interface_id: std::option::Option<std::string::String>,
    /// <p>The IP protocol.</p>
    #[doc(hidden)]
    pub protocol: std::option::Option<crate::model::VerifiedAccessEndpointProtocol>,
    /// <p>The IP port number.</p>
    #[doc(hidden)]
    pub port: std::option::Option<i32>,
}
impl VerifiedAccessEndpointEniOptions {
    /// <p>The ID of the network interface.</p>
    pub fn network_interface_id(&self) -> std::option::Option<&str> {
        self.network_interface_id.as_deref()
    }
    /// <p>The IP protocol.</p>
    pub fn protocol(&self) -> std::option::Option<&crate::model::VerifiedAccessEndpointProtocol> {
        self.protocol.as_ref()
    }
    /// <p>The IP port number.</p>
    pub fn port(&self) -> std::option::Option<i32> {
        self.port
    }
}
/// See [`VerifiedAccessEndpointEniOptions`](crate::model::VerifiedAccessEndpointEniOptions).
pub mod verified_access_endpoint_eni_options {

    /// A builder for [`VerifiedAccessEndpointEniOptions`](crate::model::VerifiedAccessEndpointEniOptions).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) network_interface_id: std::option::Option<std::string::String>,
        pub(crate) protocol: std::option::Option<crate::model::VerifiedAccessEndpointProtocol>,
        pub(crate) port: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>The ID of the network interface.</p>
        pub fn network_interface_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.network_interface_id = Some(input.into());
            self
        }
        /// <p>The ID of the network interface.</p>
        pub fn set_network_interface_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.network_interface_id = input;
            self
        }
        /// <p>The IP protocol.</p>
        pub fn protocol(mut self, input: crate::model::VerifiedAccessEndpointProtocol) -> Self {
            self.protocol = Some(input);
            self
        }
        /// <p>The IP protocol.</p>
        pub fn set_protocol(
            mut self,
            input: std::option::Option<crate::model::VerifiedAccessEndpointProtocol>,
        ) -> Self {
            self.protocol = input;
            self
        }
        /// <p>The IP port number.</p>
        pub fn port(mut self, input: i32) -> Self {
            self.port = Some(input);
            self
        }
        /// <p>The IP port number.</p>
        pub fn set_port(mut self, input: std::option::Option<i32>) -> Self {
            self.port = input;
            self
        }
        /// Consumes the builder and constructs a [`VerifiedAccessEndpointEniOptions`](crate::model::VerifiedAccessEndpointEniOptions).
        pub fn build(self) -> crate::model::VerifiedAccessEndpointEniOptions {
            crate::model::VerifiedAccessEndpointEniOptions {
                network_interface_id: self.network_interface_id,
                protocol: self.protocol,
                port: self.port,
            }
        }
    }
}
impl VerifiedAccessEndpointEniOptions {
    /// Creates a new builder-style object to manufacture [`VerifiedAccessEndpointEniOptions`](crate::model::VerifiedAccessEndpointEniOptions).
    pub fn builder() -> crate::model::verified_access_endpoint_eni_options::Builder {
        crate::model::verified_access_endpoint_eni_options::Builder::default()
    }
}

/// When writing a match expression against `VerifiedAccessEndpointProtocol`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let verifiedaccessendpointprotocol = unimplemented!();
/// match verifiedaccessendpointprotocol {
///     VerifiedAccessEndpointProtocol::Http => { /* ... */ },
///     VerifiedAccessEndpointProtocol::Https => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `verifiedaccessendpointprotocol` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `VerifiedAccessEndpointProtocol::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `VerifiedAccessEndpointProtocol::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `VerifiedAccessEndpointProtocol::NewFeature` is defined.
/// Specifically, when `verifiedaccessendpointprotocol` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `VerifiedAccessEndpointProtocol::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 VerifiedAccessEndpointProtocol {
    #[allow(missing_docs)] // documentation missing in model
    Http,
    #[allow(missing_docs)] // documentation missing in model
    Https,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for VerifiedAccessEndpointProtocol {
    fn from(s: &str) -> Self {
        match s {
            "http" => VerifiedAccessEndpointProtocol::Http,
            "https" => VerifiedAccessEndpointProtocol::Https,
            other => VerifiedAccessEndpointProtocol::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for VerifiedAccessEndpointProtocol {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(VerifiedAccessEndpointProtocol::from(s))
    }
}
impl VerifiedAccessEndpointProtocol {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            VerifiedAccessEndpointProtocol::Http => "http",
            VerifiedAccessEndpointProtocol::Https => "https",
            VerifiedAccessEndpointProtocol::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["http", "https"]
    }
}
impl AsRef<str> for VerifiedAccessEndpointProtocol {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes a load balancer when creating an Amazon Web Services Verified Access endpoint using the <code>load-balancer</code> type.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct VerifiedAccessEndpointLoadBalancerOptions {
    /// <p>The IP protocol.</p>
    #[doc(hidden)]
    pub protocol: std::option::Option<crate::model::VerifiedAccessEndpointProtocol>,
    /// <p>The IP port number.</p>
    #[doc(hidden)]
    pub port: std::option::Option<i32>,
    /// <p>The ARN of the load balancer.</p>
    #[doc(hidden)]
    pub load_balancer_arn: std::option::Option<std::string::String>,
    /// <p>The IDs of the subnets.</p>
    #[doc(hidden)]
    pub subnet_ids: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl VerifiedAccessEndpointLoadBalancerOptions {
    /// <p>The IP protocol.</p>
    pub fn protocol(&self) -> std::option::Option<&crate::model::VerifiedAccessEndpointProtocol> {
        self.protocol.as_ref()
    }
    /// <p>The IP port number.</p>
    pub fn port(&self) -> std::option::Option<i32> {
        self.port
    }
    /// <p>The ARN of the load balancer.</p>
    pub fn load_balancer_arn(&self) -> std::option::Option<&str> {
        self.load_balancer_arn.as_deref()
    }
    /// <p>The IDs of the subnets.</p>
    pub fn subnet_ids(&self) -> std::option::Option<&[std::string::String]> {
        self.subnet_ids.as_deref()
    }
}
/// See [`VerifiedAccessEndpointLoadBalancerOptions`](crate::model::VerifiedAccessEndpointLoadBalancerOptions).
pub mod verified_access_endpoint_load_balancer_options {

    /// A builder for [`VerifiedAccessEndpointLoadBalancerOptions`](crate::model::VerifiedAccessEndpointLoadBalancerOptions).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) protocol: std::option::Option<crate::model::VerifiedAccessEndpointProtocol>,
        pub(crate) port: std::option::Option<i32>,
        pub(crate) load_balancer_arn: std::option::Option<std::string::String>,
        pub(crate) subnet_ids: std::option::Option<std::vec::Vec<std::string::String>>,
    }
    impl Builder {
        /// <p>The IP protocol.</p>
        pub fn protocol(mut self, input: crate::model::VerifiedAccessEndpointProtocol) -> Self {
            self.protocol = Some(input);
            self
        }
        /// <p>The IP protocol.</p>
        pub fn set_protocol(
            mut self,
            input: std::option::Option<crate::model::VerifiedAccessEndpointProtocol>,
        ) -> Self {
            self.protocol = input;
            self
        }
        /// <p>The IP port number.</p>
        pub fn port(mut self, input: i32) -> Self {
            self.port = Some(input);
            self
        }
        /// <p>The IP port number.</p>
        pub fn set_port(mut self, input: std::option::Option<i32>) -> Self {
            self.port = input;
            self
        }
        /// <p>The ARN of the load balancer.</p>
        pub fn load_balancer_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.load_balancer_arn = Some(input.into());
            self
        }
        /// <p>The ARN of the load balancer.</p>
        pub fn set_load_balancer_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.load_balancer_arn = input;
            self
        }
        /// Appends an item to `subnet_ids`.
        ///
        /// To override the contents of this collection use [`set_subnet_ids`](Self::set_subnet_ids).
        ///
        /// <p>The IDs of the subnets.</p>
        pub fn subnet_ids(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.subnet_ids.unwrap_or_default();
            v.push(input.into());
            self.subnet_ids = Some(v);
            self
        }
        /// <p>The IDs of the subnets.</p>
        pub fn set_subnet_ids(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.subnet_ids = input;
            self
        }
        /// Consumes the builder and constructs a [`VerifiedAccessEndpointLoadBalancerOptions`](crate::model::VerifiedAccessEndpointLoadBalancerOptions).
        pub fn build(self) -> crate::model::VerifiedAccessEndpointLoadBalancerOptions {
            crate::model::VerifiedAccessEndpointLoadBalancerOptions {
                protocol: self.protocol,
                port: self.port,
                load_balancer_arn: self.load_balancer_arn,
                subnet_ids: self.subnet_ids,
            }
        }
    }
}
impl VerifiedAccessEndpointLoadBalancerOptions {
    /// Creates a new builder-style object to manufacture [`VerifiedAccessEndpointLoadBalancerOptions`](crate::model::VerifiedAccessEndpointLoadBalancerOptions).
    pub fn builder() -> crate::model::verified_access_endpoint_load_balancer_options::Builder {
        crate::model::verified_access_endpoint_load_balancer_options::Builder::default()
    }
}

/// When writing a match expression against `VerifiedAccessEndpointAttachmentType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let verifiedaccessendpointattachmenttype = unimplemented!();
/// match verifiedaccessendpointattachmenttype {
///     VerifiedAccessEndpointAttachmentType::Vpc => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `verifiedaccessendpointattachmenttype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `VerifiedAccessEndpointAttachmentType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `VerifiedAccessEndpointAttachmentType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `VerifiedAccessEndpointAttachmentType::NewFeature` is defined.
/// Specifically, when `verifiedaccessendpointattachmenttype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `VerifiedAccessEndpointAttachmentType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 VerifiedAccessEndpointAttachmentType {
    #[allow(missing_docs)] // documentation missing in model
    Vpc,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for VerifiedAccessEndpointAttachmentType {
    fn from(s: &str) -> Self {
        match s {
            "vpc" => VerifiedAccessEndpointAttachmentType::Vpc,
            other => VerifiedAccessEndpointAttachmentType::Unknown(
                crate::types::UnknownVariantValue(other.to_owned()),
            ),
        }
    }
}
impl std::str::FromStr for VerifiedAccessEndpointAttachmentType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(VerifiedAccessEndpointAttachmentType::from(s))
    }
}
impl VerifiedAccessEndpointAttachmentType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            VerifiedAccessEndpointAttachmentType::Vpc => "vpc",
            VerifiedAccessEndpointAttachmentType::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["vpc"]
    }
}
impl AsRef<str> for VerifiedAccessEndpointAttachmentType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `VerifiedAccessEndpointType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let verifiedaccessendpointtype = unimplemented!();
/// match verifiedaccessendpointtype {
///     VerifiedAccessEndpointType::LoadBalancer => { /* ... */ },
///     VerifiedAccessEndpointType::NetworkInterface => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `verifiedaccessendpointtype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `VerifiedAccessEndpointType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `VerifiedAccessEndpointType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `VerifiedAccessEndpointType::NewFeature` is defined.
/// Specifically, when `verifiedaccessendpointtype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `VerifiedAccessEndpointType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 VerifiedAccessEndpointType {
    #[allow(missing_docs)] // documentation missing in model
    LoadBalancer,
    #[allow(missing_docs)] // documentation missing in model
    NetworkInterface,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for VerifiedAccessEndpointType {
    fn from(s: &str) -> Self {
        match s {
            "load-balancer" => VerifiedAccessEndpointType::LoadBalancer,
            "network-interface" => VerifiedAccessEndpointType::NetworkInterface,
            other => VerifiedAccessEndpointType::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for VerifiedAccessEndpointType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(VerifiedAccessEndpointType::from(s))
    }
}
impl VerifiedAccessEndpointType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            VerifiedAccessEndpointType::LoadBalancer => "load-balancer",
            VerifiedAccessEndpointType::NetworkInterface => "network-interface",
            VerifiedAccessEndpointType::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["load-balancer", "network-interface"]
    }
}
impl AsRef<str> for VerifiedAccessEndpointType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Options for a network-interface type Verified Access endpoint.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ModifyVerifiedAccessEndpointEniOptions {
    /// <p>The IP protocol.</p>
    #[doc(hidden)]
    pub protocol: std::option::Option<crate::model::VerifiedAccessEndpointProtocol>,
    /// <p>The IP port number.</p>
    #[doc(hidden)]
    pub port: std::option::Option<i32>,
}
impl ModifyVerifiedAccessEndpointEniOptions {
    /// <p>The IP protocol.</p>
    pub fn protocol(&self) -> std::option::Option<&crate::model::VerifiedAccessEndpointProtocol> {
        self.protocol.as_ref()
    }
    /// <p>The IP port number.</p>
    pub fn port(&self) -> std::option::Option<i32> {
        self.port
    }
}
/// See [`ModifyVerifiedAccessEndpointEniOptions`](crate::model::ModifyVerifiedAccessEndpointEniOptions).
pub mod modify_verified_access_endpoint_eni_options {

    /// A builder for [`ModifyVerifiedAccessEndpointEniOptions`](crate::model::ModifyVerifiedAccessEndpointEniOptions).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) protocol: std::option::Option<crate::model::VerifiedAccessEndpointProtocol>,
        pub(crate) port: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>The IP protocol.</p>
        pub fn protocol(mut self, input: crate::model::VerifiedAccessEndpointProtocol) -> Self {
            self.protocol = Some(input);
            self
        }
        /// <p>The IP protocol.</p>
        pub fn set_protocol(
            mut self,
            input: std::option::Option<crate::model::VerifiedAccessEndpointProtocol>,
        ) -> Self {
            self.protocol = input;
            self
        }
        /// <p>The IP port number.</p>
        pub fn port(mut self, input: i32) -> Self {
            self.port = Some(input);
            self
        }
        /// <p>The IP port number.</p>
        pub fn set_port(mut self, input: std::option::Option<i32>) -> Self {
            self.port = input;
            self
        }
        /// Consumes the builder and constructs a [`ModifyVerifiedAccessEndpointEniOptions`](crate::model::ModifyVerifiedAccessEndpointEniOptions).
        pub fn build(self) -> crate::model::ModifyVerifiedAccessEndpointEniOptions {
            crate::model::ModifyVerifiedAccessEndpointEniOptions {
                protocol: self.protocol,
                port: self.port,
            }
        }
    }
}
impl ModifyVerifiedAccessEndpointEniOptions {
    /// Creates a new builder-style object to manufacture [`ModifyVerifiedAccessEndpointEniOptions`](crate::model::ModifyVerifiedAccessEndpointEniOptions).
    pub fn builder() -> crate::model::modify_verified_access_endpoint_eni_options::Builder {
        crate::model::modify_verified_access_endpoint_eni_options::Builder::default()
    }
}

/// <p>Describes a load balancer when creating an Amazon Web Services Verified Access endpoint using the <code>load-balancer</code> type.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ModifyVerifiedAccessEndpointLoadBalancerOptions {
    /// <p>The IDs of the subnets.</p>
    #[doc(hidden)]
    pub subnet_ids: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>The IP protocol.</p>
    #[doc(hidden)]
    pub protocol: std::option::Option<crate::model::VerifiedAccessEndpointProtocol>,
    /// <p>The IP port number.</p>
    #[doc(hidden)]
    pub port: std::option::Option<i32>,
}
impl ModifyVerifiedAccessEndpointLoadBalancerOptions {
    /// <p>The IDs of the subnets.</p>
    pub fn subnet_ids(&self) -> std::option::Option<&[std::string::String]> {
        self.subnet_ids.as_deref()
    }
    /// <p>The IP protocol.</p>
    pub fn protocol(&self) -> std::option::Option<&crate::model::VerifiedAccessEndpointProtocol> {
        self.protocol.as_ref()
    }
    /// <p>The IP port number.</p>
    pub fn port(&self) -> std::option::Option<i32> {
        self.port
    }
}
/// See [`ModifyVerifiedAccessEndpointLoadBalancerOptions`](crate::model::ModifyVerifiedAccessEndpointLoadBalancerOptions).
pub mod modify_verified_access_endpoint_load_balancer_options {

    /// A builder for [`ModifyVerifiedAccessEndpointLoadBalancerOptions`](crate::model::ModifyVerifiedAccessEndpointLoadBalancerOptions).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) subnet_ids: std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) protocol: std::option::Option<crate::model::VerifiedAccessEndpointProtocol>,
        pub(crate) port: std::option::Option<i32>,
    }
    impl Builder {
        /// Appends an item to `subnet_ids`.
        ///
        /// To override the contents of this collection use [`set_subnet_ids`](Self::set_subnet_ids).
        ///
        /// <p>The IDs of the subnets.</p>
        pub fn subnet_ids(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.subnet_ids.unwrap_or_default();
            v.push(input.into());
            self.subnet_ids = Some(v);
            self
        }
        /// <p>The IDs of the subnets.</p>
        pub fn set_subnet_ids(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.subnet_ids = input;
            self
        }
        /// <p>The IP protocol.</p>
        pub fn protocol(mut self, input: crate::model::VerifiedAccessEndpointProtocol) -> Self {
            self.protocol = Some(input);
            self
        }
        /// <p>The IP protocol.</p>
        pub fn set_protocol(
            mut self,
            input: std::option::Option<crate::model::VerifiedAccessEndpointProtocol>,
        ) -> Self {
            self.protocol = input;
            self
        }
        /// <p>The IP port number.</p>
        pub fn port(mut self, input: i32) -> Self {
            self.port = Some(input);
            self
        }
        /// <p>The IP port number.</p>
        pub fn set_port(mut self, input: std::option::Option<i32>) -> Self {
            self.port = input;
            self
        }
        /// Consumes the builder and constructs a [`ModifyVerifiedAccessEndpointLoadBalancerOptions`](crate::model::ModifyVerifiedAccessEndpointLoadBalancerOptions).
        pub fn build(self) -> crate::model::ModifyVerifiedAccessEndpointLoadBalancerOptions {
            crate::model::ModifyVerifiedAccessEndpointLoadBalancerOptions {
                subnet_ids: self.subnet_ids,
                protocol: self.protocol,
                port: self.port,
            }
        }
    }
}
impl ModifyVerifiedAccessEndpointLoadBalancerOptions {
    /// Creates a new builder-style object to manufacture [`ModifyVerifiedAccessEndpointLoadBalancerOptions`](crate::model::ModifyVerifiedAccessEndpointLoadBalancerOptions).
    pub fn builder() -> crate::model::modify_verified_access_endpoint_load_balancer_options::Builder
    {
        crate::model::modify_verified_access_endpoint_load_balancer_options::Builder::default()
    }
}

/// <p>Describes the options for a VPC attachment.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ModifyTransitGatewayVpcAttachmentRequestOptions {
    /// <p>Enable or disable DNS support. The default is <code>enable</code>.</p>
    #[doc(hidden)]
    pub dns_support: std::option::Option<crate::model::DnsSupportValue>,
    /// <p>Enable or disable IPv6 support. The default is <code>enable</code>.</p>
    #[doc(hidden)]
    pub ipv6_support: std::option::Option<crate::model::Ipv6SupportValue>,
    /// <p>Enable or disable support for appliance mode. If enabled, a traffic flow between a source and destination uses the same Availability Zone for the VPC attachment for the lifetime of that flow. The default is <code>disable</code>.</p>
    #[doc(hidden)]
    pub appliance_mode_support: std::option::Option<crate::model::ApplianceModeSupportValue>,
}
impl ModifyTransitGatewayVpcAttachmentRequestOptions {
    /// <p>Enable or disable DNS support. The default is <code>enable</code>.</p>
    pub fn dns_support(&self) -> std::option::Option<&crate::model::DnsSupportValue> {
        self.dns_support.as_ref()
    }
    /// <p>Enable or disable IPv6 support. The default is <code>enable</code>.</p>
    pub fn ipv6_support(&self) -> std::option::Option<&crate::model::Ipv6SupportValue> {
        self.ipv6_support.as_ref()
    }
    /// <p>Enable or disable support for appliance mode. If enabled, a traffic flow between a source and destination uses the same Availability Zone for the VPC attachment for the lifetime of that flow. The default is <code>disable</code>.</p>
    pub fn appliance_mode_support(
        &self,
    ) -> std::option::Option<&crate::model::ApplianceModeSupportValue> {
        self.appliance_mode_support.as_ref()
    }
}
/// See [`ModifyTransitGatewayVpcAttachmentRequestOptions`](crate::model::ModifyTransitGatewayVpcAttachmentRequestOptions).
pub mod modify_transit_gateway_vpc_attachment_request_options {

    /// A builder for [`ModifyTransitGatewayVpcAttachmentRequestOptions`](crate::model::ModifyTransitGatewayVpcAttachmentRequestOptions).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) dns_support: std::option::Option<crate::model::DnsSupportValue>,
        pub(crate) ipv6_support: std::option::Option<crate::model::Ipv6SupportValue>,
        pub(crate) appliance_mode_support:
            std::option::Option<crate::model::ApplianceModeSupportValue>,
    }
    impl Builder {
        /// <p>Enable or disable DNS support. The default is <code>enable</code>.</p>
        pub fn dns_support(mut self, input: crate::model::DnsSupportValue) -> Self {
            self.dns_support = Some(input);
            self
        }
        /// <p>Enable or disable DNS support. The default is <code>enable</code>.</p>
        pub fn set_dns_support(
            mut self,
            input: std::option::Option<crate::model::DnsSupportValue>,
        ) -> Self {
            self.dns_support = input;
            self
        }
        /// <p>Enable or disable IPv6 support. The default is <code>enable</code>.</p>
        pub fn ipv6_support(mut self, input: crate::model::Ipv6SupportValue) -> Self {
            self.ipv6_support = Some(input);
            self
        }
        /// <p>Enable or disable IPv6 support. The default is <code>enable</code>.</p>
        pub fn set_ipv6_support(
            mut self,
            input: std::option::Option<crate::model::Ipv6SupportValue>,
        ) -> Self {
            self.ipv6_support = input;
            self
        }
        /// <p>Enable or disable support for appliance mode. If enabled, a traffic flow between a source and destination uses the same Availability Zone for the VPC attachment for the lifetime of that flow. The default is <code>disable</code>.</p>
        pub fn appliance_mode_support(
            mut self,
            input: crate::model::ApplianceModeSupportValue,
        ) -> Self {
            self.appliance_mode_support = Some(input);
            self
        }
        /// <p>Enable or disable support for appliance mode. If enabled, a traffic flow between a source and destination uses the same Availability Zone for the VPC attachment for the lifetime of that flow. The default is <code>disable</code>.</p>
        pub fn set_appliance_mode_support(
            mut self,
            input: std::option::Option<crate::model::ApplianceModeSupportValue>,
        ) -> Self {
            self.appliance_mode_support = input;
            self
        }
        /// Consumes the builder and constructs a [`ModifyTransitGatewayVpcAttachmentRequestOptions`](crate::model::ModifyTransitGatewayVpcAttachmentRequestOptions).
        pub fn build(self) -> crate::model::ModifyTransitGatewayVpcAttachmentRequestOptions {
            crate::model::ModifyTransitGatewayVpcAttachmentRequestOptions {
                dns_support: self.dns_support,
                ipv6_support: self.ipv6_support,
                appliance_mode_support: self.appliance_mode_support,
            }
        }
    }
}
impl ModifyTransitGatewayVpcAttachmentRequestOptions {
    /// Creates a new builder-style object to manufacture [`ModifyTransitGatewayVpcAttachmentRequestOptions`](crate::model::ModifyTransitGatewayVpcAttachmentRequestOptions).
    pub fn builder() -> crate::model::modify_transit_gateway_vpc_attachment_request_options::Builder
    {
        crate::model::modify_transit_gateway_vpc_attachment_request_options::Builder::default()
    }
}

/// <p>Describes a prefix list reference.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TransitGatewayPrefixListReference {
    /// <p>The ID of the transit gateway route table.</p>
    #[doc(hidden)]
    pub transit_gateway_route_table_id: std::option::Option<std::string::String>,
    /// <p>The ID of the prefix list.</p>
    #[doc(hidden)]
    pub prefix_list_id: std::option::Option<std::string::String>,
    /// <p>The ID of the prefix list owner.</p>
    #[doc(hidden)]
    pub prefix_list_owner_id: std::option::Option<std::string::String>,
    /// <p>The state of the prefix list reference.</p>
    #[doc(hidden)]
    pub state: std::option::Option<crate::model::TransitGatewayPrefixListReferenceState>,
    /// <p>Indicates whether traffic that matches this route is dropped.</p>
    #[doc(hidden)]
    pub blackhole: std::option::Option<bool>,
    /// <p>Information about the transit gateway attachment.</p>
    #[doc(hidden)]
    pub transit_gateway_attachment:
        std::option::Option<crate::model::TransitGatewayPrefixListAttachment>,
}
impl TransitGatewayPrefixListReference {
    /// <p>The ID of the transit gateway route table.</p>
    pub fn transit_gateway_route_table_id(&self) -> std::option::Option<&str> {
        self.transit_gateway_route_table_id.as_deref()
    }
    /// <p>The ID of the prefix list.</p>
    pub fn prefix_list_id(&self) -> std::option::Option<&str> {
        self.prefix_list_id.as_deref()
    }
    /// <p>The ID of the prefix list owner.</p>
    pub fn prefix_list_owner_id(&self) -> std::option::Option<&str> {
        self.prefix_list_owner_id.as_deref()
    }
    /// <p>The state of the prefix list reference.</p>
    pub fn state(
        &self,
    ) -> std::option::Option<&crate::model::TransitGatewayPrefixListReferenceState> {
        self.state.as_ref()
    }
    /// <p>Indicates whether traffic that matches this route is dropped.</p>
    pub fn blackhole(&self) -> std::option::Option<bool> {
        self.blackhole
    }
    /// <p>Information about the transit gateway attachment.</p>
    pub fn transit_gateway_attachment(
        &self,
    ) -> std::option::Option<&crate::model::TransitGatewayPrefixListAttachment> {
        self.transit_gateway_attachment.as_ref()
    }
}
/// See [`TransitGatewayPrefixListReference`](crate::model::TransitGatewayPrefixListReference).
pub mod transit_gateway_prefix_list_reference {

    /// A builder for [`TransitGatewayPrefixListReference`](crate::model::TransitGatewayPrefixListReference).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) transit_gateway_route_table_id: std::option::Option<std::string::String>,
        pub(crate) prefix_list_id: std::option::Option<std::string::String>,
        pub(crate) prefix_list_owner_id: std::option::Option<std::string::String>,
        pub(crate) state: std::option::Option<crate::model::TransitGatewayPrefixListReferenceState>,
        pub(crate) blackhole: std::option::Option<bool>,
        pub(crate) transit_gateway_attachment:
            std::option::Option<crate::model::TransitGatewayPrefixListAttachment>,
    }
    impl Builder {
        /// <p>The ID of the transit gateway route table.</p>
        pub fn transit_gateway_route_table_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.transit_gateway_route_table_id = Some(input.into());
            self
        }
        /// <p>The ID of the transit gateway route table.</p>
        pub fn set_transit_gateway_route_table_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.transit_gateway_route_table_id = input;
            self
        }
        /// <p>The ID of the prefix list.</p>
        pub fn prefix_list_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.prefix_list_id = Some(input.into());
            self
        }
        /// <p>The ID of the prefix list.</p>
        pub fn set_prefix_list_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.prefix_list_id = input;
            self
        }
        /// <p>The ID of the prefix list owner.</p>
        pub fn prefix_list_owner_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.prefix_list_owner_id = Some(input.into());
            self
        }
        /// <p>The ID of the prefix list owner.</p>
        pub fn set_prefix_list_owner_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.prefix_list_owner_id = input;
            self
        }
        /// <p>The state of the prefix list reference.</p>
        pub fn state(
            mut self,
            input: crate::model::TransitGatewayPrefixListReferenceState,
        ) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>The state of the prefix list reference.</p>
        pub fn set_state(
            mut self,
            input: std::option::Option<crate::model::TransitGatewayPrefixListReferenceState>,
        ) -> Self {
            self.state = input;
            self
        }
        /// <p>Indicates whether traffic that matches this route is dropped.</p>
        pub fn blackhole(mut self, input: bool) -> Self {
            self.blackhole = Some(input);
            self
        }
        /// <p>Indicates whether traffic that matches this route is dropped.</p>
        pub fn set_blackhole(mut self, input: std::option::Option<bool>) -> Self {
            self.blackhole = input;
            self
        }
        /// <p>Information about the transit gateway attachment.</p>
        pub fn transit_gateway_attachment(
            mut self,
            input: crate::model::TransitGatewayPrefixListAttachment,
        ) -> Self {
            self.transit_gateway_attachment = Some(input);
            self
        }
        /// <p>Information about the transit gateway attachment.</p>
        pub fn set_transit_gateway_attachment(
            mut self,
            input: std::option::Option<crate::model::TransitGatewayPrefixListAttachment>,
        ) -> Self {
            self.transit_gateway_attachment = input;
            self
        }
        /// Consumes the builder and constructs a [`TransitGatewayPrefixListReference`](crate::model::TransitGatewayPrefixListReference).
        pub fn build(self) -> crate::model::TransitGatewayPrefixListReference {
            crate::model::TransitGatewayPrefixListReference {
                transit_gateway_route_table_id: self.transit_gateway_route_table_id,
                prefix_list_id: self.prefix_list_id,
                prefix_list_owner_id: self.prefix_list_owner_id,
                state: self.state,
                blackhole: self.blackhole,
                transit_gateway_attachment: self.transit_gateway_attachment,
            }
        }
    }
}
impl TransitGatewayPrefixListReference {
    /// Creates a new builder-style object to manufacture [`TransitGatewayPrefixListReference`](crate::model::TransitGatewayPrefixListReference).
    pub fn builder() -> crate::model::transit_gateway_prefix_list_reference::Builder {
        crate::model::transit_gateway_prefix_list_reference::Builder::default()
    }
}

/// <p>Describes a transit gateway prefix list attachment.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TransitGatewayPrefixListAttachment {
    /// <p>The ID of the attachment.</p>
    #[doc(hidden)]
    pub transit_gateway_attachment_id: std::option::Option<std::string::String>,
    /// <p>The resource type. Note that the <code>tgw-peering</code> resource type has been deprecated.</p>
    #[doc(hidden)]
    pub resource_type: std::option::Option<crate::model::TransitGatewayAttachmentResourceType>,
    /// <p>The ID of the resource.</p>
    #[doc(hidden)]
    pub resource_id: std::option::Option<std::string::String>,
}
impl TransitGatewayPrefixListAttachment {
    /// <p>The ID of the attachment.</p>
    pub fn transit_gateway_attachment_id(&self) -> std::option::Option<&str> {
        self.transit_gateway_attachment_id.as_deref()
    }
    /// <p>The resource type. Note that the <code>tgw-peering</code> resource type has been deprecated.</p>
    pub fn resource_type(
        &self,
    ) -> std::option::Option<&crate::model::TransitGatewayAttachmentResourceType> {
        self.resource_type.as_ref()
    }
    /// <p>The ID of the resource.</p>
    pub fn resource_id(&self) -> std::option::Option<&str> {
        self.resource_id.as_deref()
    }
}
/// See [`TransitGatewayPrefixListAttachment`](crate::model::TransitGatewayPrefixListAttachment).
pub mod transit_gateway_prefix_list_attachment {

    /// A builder for [`TransitGatewayPrefixListAttachment`](crate::model::TransitGatewayPrefixListAttachment).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) transit_gateway_attachment_id: std::option::Option<std::string::String>,
        pub(crate) resource_type:
            std::option::Option<crate::model::TransitGatewayAttachmentResourceType>,
        pub(crate) resource_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The ID of the attachment.</p>
        pub fn transit_gateway_attachment_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.transit_gateway_attachment_id = Some(input.into());
            self
        }
        /// <p>The ID of the attachment.</p>
        pub fn set_transit_gateway_attachment_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.transit_gateway_attachment_id = input;
            self
        }
        /// <p>The resource type. Note that the <code>tgw-peering</code> resource type has been deprecated.</p>
        pub fn resource_type(
            mut self,
            input: crate::model::TransitGatewayAttachmentResourceType,
        ) -> Self {
            self.resource_type = Some(input);
            self
        }
        /// <p>The resource type. Note that the <code>tgw-peering</code> resource type has been deprecated.</p>
        pub fn set_resource_type(
            mut self,
            input: std::option::Option<crate::model::TransitGatewayAttachmentResourceType>,
        ) -> Self {
            self.resource_type = input;
            self
        }
        /// <p>The ID of the resource.</p>
        pub fn resource_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.resource_id = Some(input.into());
            self
        }
        /// <p>The ID of the resource.</p>
        pub fn set_resource_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.resource_id = input;
            self
        }
        /// Consumes the builder and constructs a [`TransitGatewayPrefixListAttachment`](crate::model::TransitGatewayPrefixListAttachment).
        pub fn build(self) -> crate::model::TransitGatewayPrefixListAttachment {
            crate::model::TransitGatewayPrefixListAttachment {
                transit_gateway_attachment_id: self.transit_gateway_attachment_id,
                resource_type: self.resource_type,
                resource_id: self.resource_id,
            }
        }
    }
}
impl TransitGatewayPrefixListAttachment {
    /// Creates a new builder-style object to manufacture [`TransitGatewayPrefixListAttachment`](crate::model::TransitGatewayPrefixListAttachment).
    pub fn builder() -> crate::model::transit_gateway_prefix_list_attachment::Builder {
        crate::model::transit_gateway_prefix_list_attachment::Builder::default()
    }
}

/// When writing a match expression against `TransitGatewayPrefixListReferenceState`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let transitgatewayprefixlistreferencestate = unimplemented!();
/// match transitgatewayprefixlistreferencestate {
///     TransitGatewayPrefixListReferenceState::Available => { /* ... */ },
///     TransitGatewayPrefixListReferenceState::Deleting => { /* ... */ },
///     TransitGatewayPrefixListReferenceState::Modifying => { /* ... */ },
///     TransitGatewayPrefixListReferenceState::Pending => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `transitgatewayprefixlistreferencestate` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `TransitGatewayPrefixListReferenceState::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `TransitGatewayPrefixListReferenceState::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `TransitGatewayPrefixListReferenceState::NewFeature` is defined.
/// Specifically, when `transitgatewayprefixlistreferencestate` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `TransitGatewayPrefixListReferenceState::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 TransitGatewayPrefixListReferenceState {
    #[allow(missing_docs)] // documentation missing in model
    Available,
    #[allow(missing_docs)] // documentation missing in model
    Deleting,
    #[allow(missing_docs)] // documentation missing in model
    Modifying,
    #[allow(missing_docs)] // documentation missing in model
    Pending,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for TransitGatewayPrefixListReferenceState {
    fn from(s: &str) -> Self {
        match s {
            "available" => TransitGatewayPrefixListReferenceState::Available,
            "deleting" => TransitGatewayPrefixListReferenceState::Deleting,
            "modifying" => TransitGatewayPrefixListReferenceState::Modifying,
            "pending" => TransitGatewayPrefixListReferenceState::Pending,
            other => TransitGatewayPrefixListReferenceState::Unknown(
                crate::types::UnknownVariantValue(other.to_owned()),
            ),
        }
    }
}
impl std::str::FromStr for TransitGatewayPrefixListReferenceState {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(TransitGatewayPrefixListReferenceState::from(s))
    }
}
impl TransitGatewayPrefixListReferenceState {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            TransitGatewayPrefixListReferenceState::Available => "available",
            TransitGatewayPrefixListReferenceState::Deleting => "deleting",
            TransitGatewayPrefixListReferenceState::Modifying => "modifying",
            TransitGatewayPrefixListReferenceState::Pending => "pending",
            TransitGatewayPrefixListReferenceState::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["available", "deleting", "modifying", "pending"]
    }
}
impl AsRef<str> for TransitGatewayPrefixListReferenceState {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes a transit gateway.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TransitGateway {
    /// <p>The ID of the transit gateway.</p>
    #[doc(hidden)]
    pub transit_gateway_id: std::option::Option<std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the transit gateway.</p>
    #[doc(hidden)]
    pub transit_gateway_arn: std::option::Option<std::string::String>,
    /// <p>The state of the transit gateway.</p>
    #[doc(hidden)]
    pub state: std::option::Option<crate::model::TransitGatewayState>,
    /// <p>The ID of the Amazon Web Services account that owns the transit gateway.</p>
    #[doc(hidden)]
    pub owner_id: std::option::Option<std::string::String>,
    /// <p>The description of the transit gateway.</p>
    #[doc(hidden)]
    pub description: std::option::Option<std::string::String>,
    /// <p>The creation time.</p>
    #[doc(hidden)]
    pub creation_time: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The transit gateway options.</p>
    #[doc(hidden)]
    pub options: std::option::Option<crate::model::TransitGatewayOptions>,
    /// <p>The tags for the transit gateway.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl TransitGateway {
    /// <p>The ID of the transit gateway.</p>
    pub fn transit_gateway_id(&self) -> std::option::Option<&str> {
        self.transit_gateway_id.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the transit gateway.</p>
    pub fn transit_gateway_arn(&self) -> std::option::Option<&str> {
        self.transit_gateway_arn.as_deref()
    }
    /// <p>The state of the transit gateway.</p>
    pub fn state(&self) -> std::option::Option<&crate::model::TransitGatewayState> {
        self.state.as_ref()
    }
    /// <p>The ID of the Amazon Web Services account that owns the transit gateway.</p>
    pub fn owner_id(&self) -> std::option::Option<&str> {
        self.owner_id.as_deref()
    }
    /// <p>The description of the transit gateway.</p>
    pub fn description(&self) -> std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The creation time.</p>
    pub fn creation_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.creation_time.as_ref()
    }
    /// <p>The transit gateway options.</p>
    pub fn options(&self) -> std::option::Option<&crate::model::TransitGatewayOptions> {
        self.options.as_ref()
    }
    /// <p>The tags for the transit gateway.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
}
/// See [`TransitGateway`](crate::model::TransitGateway).
pub mod transit_gateway {

    /// A builder for [`TransitGateway`](crate::model::TransitGateway).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) transit_gateway_id: std::option::Option<std::string::String>,
        pub(crate) transit_gateway_arn: std::option::Option<std::string::String>,
        pub(crate) state: std::option::Option<crate::model::TransitGatewayState>,
        pub(crate) owner_id: std::option::Option<std::string::String>,
        pub(crate) description: std::option::Option<std::string::String>,
        pub(crate) creation_time: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) options: std::option::Option<crate::model::TransitGatewayOptions>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    }
    impl Builder {
        /// <p>The ID of the transit gateway.</p>
        pub fn transit_gateway_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.transit_gateway_id = Some(input.into());
            self
        }
        /// <p>The ID of the transit gateway.</p>
        pub fn set_transit_gateway_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.transit_gateway_id = input;
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the transit gateway.</p>
        pub fn transit_gateway_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.transit_gateway_arn = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the transit gateway.</p>
        pub fn set_transit_gateway_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.transit_gateway_arn = input;
            self
        }
        /// <p>The state of the transit gateway.</p>
        pub fn state(mut self, input: crate::model::TransitGatewayState) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>The state of the transit gateway.</p>
        pub fn set_state(
            mut self,
            input: std::option::Option<crate::model::TransitGatewayState>,
        ) -> Self {
            self.state = input;
            self
        }
        /// <p>The ID of the Amazon Web Services account that owns the transit gateway.</p>
        pub fn owner_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.owner_id = Some(input.into());
            self
        }
        /// <p>The ID of the Amazon Web Services account that owns the transit gateway.</p>
        pub fn set_owner_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.owner_id = input;
            self
        }
        /// <p>The description of the transit gateway.</p>
        pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
            self.description = Some(input.into());
            self
        }
        /// <p>The description of the transit gateway.</p>
        pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.description = input;
            self
        }
        /// <p>The creation time.</p>
        pub fn creation_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.creation_time = Some(input);
            self
        }
        /// <p>The creation time.</p>
        pub fn set_creation_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.creation_time = input;
            self
        }
        /// <p>The transit gateway options.</p>
        pub fn options(mut self, input: crate::model::TransitGatewayOptions) -> Self {
            self.options = Some(input);
            self
        }
        /// <p>The transit gateway options.</p>
        pub fn set_options(
            mut self,
            input: std::option::Option<crate::model::TransitGatewayOptions>,
        ) -> Self {
            self.options = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>The tags for the transit gateway.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>The tags for the transit gateway.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// Consumes the builder and constructs a [`TransitGateway`](crate::model::TransitGateway).
        pub fn build(self) -> crate::model::TransitGateway {
            crate::model::TransitGateway {
                transit_gateway_id: self.transit_gateway_id,
                transit_gateway_arn: self.transit_gateway_arn,
                state: self.state,
                owner_id: self.owner_id,
                description: self.description,
                creation_time: self.creation_time,
                options: self.options,
                tags: self.tags,
            }
        }
    }
}
impl TransitGateway {
    /// Creates a new builder-style object to manufacture [`TransitGateway`](crate::model::TransitGateway).
    pub fn builder() -> crate::model::transit_gateway::Builder {
        crate::model::transit_gateway::Builder::default()
    }
}

/// <p>Describes the options for a transit gateway.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TransitGatewayOptions {
    /// <p>A private Autonomous System Number (ASN) for the Amazon side of a BGP session. The range is 64512 to 65534 for 16-bit ASNs and 4200000000 to 4294967294 for 32-bit ASNs.</p>
    #[doc(hidden)]
    pub amazon_side_asn: std::option::Option<i64>,
    /// <p>The transit gateway CIDR blocks.</p>
    #[doc(hidden)]
    pub transit_gateway_cidr_blocks: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>Indicates whether attachment requests are automatically accepted.</p>
    #[doc(hidden)]
    pub auto_accept_shared_attachments:
        std::option::Option<crate::model::AutoAcceptSharedAttachmentsValue>,
    /// <p>Indicates whether resource attachments are automatically associated with the default association route table.</p>
    #[doc(hidden)]
    pub default_route_table_association:
        std::option::Option<crate::model::DefaultRouteTableAssociationValue>,
    /// <p>The ID of the default association route table.</p>
    #[doc(hidden)]
    pub association_default_route_table_id: std::option::Option<std::string::String>,
    /// <p>Indicates whether resource attachments automatically propagate routes to the default propagation route table.</p>
    #[doc(hidden)]
    pub default_route_table_propagation:
        std::option::Option<crate::model::DefaultRouteTablePropagationValue>,
    /// <p>The ID of the default propagation route table.</p>
    #[doc(hidden)]
    pub propagation_default_route_table_id: std::option::Option<std::string::String>,
    /// <p>Indicates whether Equal Cost Multipath Protocol support is enabled.</p>
    #[doc(hidden)]
    pub vpn_ecmp_support: std::option::Option<crate::model::VpnEcmpSupportValue>,
    /// <p>Indicates whether DNS support is enabled.</p>
    #[doc(hidden)]
    pub dns_support: std::option::Option<crate::model::DnsSupportValue>,
    /// <p>Indicates whether multicast is enabled on the transit gateway</p>
    #[doc(hidden)]
    pub multicast_support: std::option::Option<crate::model::MulticastSupportValue>,
}
impl TransitGatewayOptions {
    /// <p>A private Autonomous System Number (ASN) for the Amazon side of a BGP session. The range is 64512 to 65534 for 16-bit ASNs and 4200000000 to 4294967294 for 32-bit ASNs.</p>
    pub fn amazon_side_asn(&self) -> std::option::Option<i64> {
        self.amazon_side_asn
    }
    /// <p>The transit gateway CIDR blocks.</p>
    pub fn transit_gateway_cidr_blocks(&self) -> std::option::Option<&[std::string::String]> {
        self.transit_gateway_cidr_blocks.as_deref()
    }
    /// <p>Indicates whether attachment requests are automatically accepted.</p>
    pub fn auto_accept_shared_attachments(
        &self,
    ) -> std::option::Option<&crate::model::AutoAcceptSharedAttachmentsValue> {
        self.auto_accept_shared_attachments.as_ref()
    }
    /// <p>Indicates whether resource attachments are automatically associated with the default association route table.</p>
    pub fn default_route_table_association(
        &self,
    ) -> std::option::Option<&crate::model::DefaultRouteTableAssociationValue> {
        self.default_route_table_association.as_ref()
    }
    /// <p>The ID of the default association route table.</p>
    pub fn association_default_route_table_id(&self) -> std::option::Option<&str> {
        self.association_default_route_table_id.as_deref()
    }
    /// <p>Indicates whether resource attachments automatically propagate routes to the default propagation route table.</p>
    pub fn default_route_table_propagation(
        &self,
    ) -> std::option::Option<&crate::model::DefaultRouteTablePropagationValue> {
        self.default_route_table_propagation.as_ref()
    }
    /// <p>The ID of the default propagation route table.</p>
    pub fn propagation_default_route_table_id(&self) -> std::option::Option<&str> {
        self.propagation_default_route_table_id.as_deref()
    }
    /// <p>Indicates whether Equal Cost Multipath Protocol support is enabled.</p>
    pub fn vpn_ecmp_support(&self) -> std::option::Option<&crate::model::VpnEcmpSupportValue> {
        self.vpn_ecmp_support.as_ref()
    }
    /// <p>Indicates whether DNS support is enabled.</p>
    pub fn dns_support(&self) -> std::option::Option<&crate::model::DnsSupportValue> {
        self.dns_support.as_ref()
    }
    /// <p>Indicates whether multicast is enabled on the transit gateway</p>
    pub fn multicast_support(&self) -> std::option::Option<&crate::model::MulticastSupportValue> {
        self.multicast_support.as_ref()
    }
}
/// See [`TransitGatewayOptions`](crate::model::TransitGatewayOptions).
pub mod transit_gateway_options {

    /// A builder for [`TransitGatewayOptions`](crate::model::TransitGatewayOptions).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) amazon_side_asn: std::option::Option<i64>,
        pub(crate) transit_gateway_cidr_blocks:
            std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) auto_accept_shared_attachments:
            std::option::Option<crate::model::AutoAcceptSharedAttachmentsValue>,
        pub(crate) default_route_table_association:
            std::option::Option<crate::model::DefaultRouteTableAssociationValue>,
        pub(crate) association_default_route_table_id: std::option::Option<std::string::String>,
        pub(crate) default_route_table_propagation:
            std::option::Option<crate::model::DefaultRouteTablePropagationValue>,
        pub(crate) propagation_default_route_table_id: std::option::Option<std::string::String>,
        pub(crate) vpn_ecmp_support: std::option::Option<crate::model::VpnEcmpSupportValue>,
        pub(crate) dns_support: std::option::Option<crate::model::DnsSupportValue>,
        pub(crate) multicast_support: std::option::Option<crate::model::MulticastSupportValue>,
    }
    impl Builder {
        /// <p>A private Autonomous System Number (ASN) for the Amazon side of a BGP session. The range is 64512 to 65534 for 16-bit ASNs and 4200000000 to 4294967294 for 32-bit ASNs.</p>
        pub fn amazon_side_asn(mut self, input: i64) -> Self {
            self.amazon_side_asn = Some(input);
            self
        }
        /// <p>A private Autonomous System Number (ASN) for the Amazon side of a BGP session. The range is 64512 to 65534 for 16-bit ASNs and 4200000000 to 4294967294 for 32-bit ASNs.</p>
        pub fn set_amazon_side_asn(mut self, input: std::option::Option<i64>) -> Self {
            self.amazon_side_asn = input;
            self
        }
        /// Appends an item to `transit_gateway_cidr_blocks`.
        ///
        /// To override the contents of this collection use [`set_transit_gateway_cidr_blocks`](Self::set_transit_gateway_cidr_blocks).
        ///
        /// <p>The transit gateway CIDR blocks.</p>
        pub fn transit_gateway_cidr_blocks(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            let mut v = self.transit_gateway_cidr_blocks.unwrap_or_default();
            v.push(input.into());
            self.transit_gateway_cidr_blocks = Some(v);
            self
        }
        /// <p>The transit gateway CIDR blocks.</p>
        pub fn set_transit_gateway_cidr_blocks(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.transit_gateway_cidr_blocks = input;
            self
        }
        /// <p>Indicates whether attachment requests are automatically accepted.</p>
        pub fn auto_accept_shared_attachments(
            mut self,
            input: crate::model::AutoAcceptSharedAttachmentsValue,
        ) -> Self {
            self.auto_accept_shared_attachments = Some(input);
            self
        }
        /// <p>Indicates whether attachment requests are automatically accepted.</p>
        pub fn set_auto_accept_shared_attachments(
            mut self,
            input: std::option::Option<crate::model::AutoAcceptSharedAttachmentsValue>,
        ) -> Self {
            self.auto_accept_shared_attachments = input;
            self
        }
        /// <p>Indicates whether resource attachments are automatically associated with the default association route table.</p>
        pub fn default_route_table_association(
            mut self,
            input: crate::model::DefaultRouteTableAssociationValue,
        ) -> Self {
            self.default_route_table_association = Some(input);
            self
        }
        /// <p>Indicates whether resource attachments are automatically associated with the default association route table.</p>
        pub fn set_default_route_table_association(
            mut self,
            input: std::option::Option<crate::model::DefaultRouteTableAssociationValue>,
        ) -> Self {
            self.default_route_table_association = input;
            self
        }
        /// <p>The ID of the default association route table.</p>
        pub fn association_default_route_table_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.association_default_route_table_id = Some(input.into());
            self
        }
        /// <p>The ID of the default association route table.</p>
        pub fn set_association_default_route_table_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.association_default_route_table_id = input;
            self
        }
        /// <p>Indicates whether resource attachments automatically propagate routes to the default propagation route table.</p>
        pub fn default_route_table_propagation(
            mut self,
            input: crate::model::DefaultRouteTablePropagationValue,
        ) -> Self {
            self.default_route_table_propagation = Some(input);
            self
        }
        /// <p>Indicates whether resource attachments automatically propagate routes to the default propagation route table.</p>
        pub fn set_default_route_table_propagation(
            mut self,
            input: std::option::Option<crate::model::DefaultRouteTablePropagationValue>,
        ) -> Self {
            self.default_route_table_propagation = input;
            self
        }
        /// <p>The ID of the default propagation route table.</p>
        pub fn propagation_default_route_table_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.propagation_default_route_table_id = Some(input.into());
            self
        }
        /// <p>The ID of the default propagation route table.</p>
        pub fn set_propagation_default_route_table_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.propagation_default_route_table_id = input;
            self
        }
        /// <p>Indicates whether Equal Cost Multipath Protocol support is enabled.</p>
        pub fn vpn_ecmp_support(mut self, input: crate::model::VpnEcmpSupportValue) -> Self {
            self.vpn_ecmp_support = Some(input);
            self
        }
        /// <p>Indicates whether Equal Cost Multipath Protocol support is enabled.</p>
        pub fn set_vpn_ecmp_support(
            mut self,
            input: std::option::Option<crate::model::VpnEcmpSupportValue>,
        ) -> Self {
            self.vpn_ecmp_support = input;
            self
        }
        /// <p>Indicates whether DNS support is enabled.</p>
        pub fn dns_support(mut self, input: crate::model::DnsSupportValue) -> Self {
            self.dns_support = Some(input);
            self
        }
        /// <p>Indicates whether DNS support is enabled.</p>
        pub fn set_dns_support(
            mut self,
            input: std::option::Option<crate::model::DnsSupportValue>,
        ) -> Self {
            self.dns_support = input;
            self
        }
        /// <p>Indicates whether multicast is enabled on the transit gateway</p>
        pub fn multicast_support(mut self, input: crate::model::MulticastSupportValue) -> Self {
            self.multicast_support = Some(input);
            self
        }
        /// <p>Indicates whether multicast is enabled on the transit gateway</p>
        pub fn set_multicast_support(
            mut self,
            input: std::option::Option<crate::model::MulticastSupportValue>,
        ) -> Self {
            self.multicast_support = input;
            self
        }
        /// Consumes the builder and constructs a [`TransitGatewayOptions`](crate::model::TransitGatewayOptions).
        pub fn build(self) -> crate::model::TransitGatewayOptions {
            crate::model::TransitGatewayOptions {
                amazon_side_asn: self.amazon_side_asn,
                transit_gateway_cidr_blocks: self.transit_gateway_cidr_blocks,
                auto_accept_shared_attachments: self.auto_accept_shared_attachments,
                default_route_table_association: self.default_route_table_association,
                association_default_route_table_id: self.association_default_route_table_id,
                default_route_table_propagation: self.default_route_table_propagation,
                propagation_default_route_table_id: self.propagation_default_route_table_id,
                vpn_ecmp_support: self.vpn_ecmp_support,
                dns_support: self.dns_support,
                multicast_support: self.multicast_support,
            }
        }
    }
}
impl TransitGatewayOptions {
    /// Creates a new builder-style object to manufacture [`TransitGatewayOptions`](crate::model::TransitGatewayOptions).
    pub fn builder() -> crate::model::transit_gateway_options::Builder {
        crate::model::transit_gateway_options::Builder::default()
    }
}

/// When writing a match expression against `MulticastSupportValue`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let multicastsupportvalue = unimplemented!();
/// match multicastsupportvalue {
///     MulticastSupportValue::Disable => { /* ... */ },
///     MulticastSupportValue::Enable => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `multicastsupportvalue` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `MulticastSupportValue::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `MulticastSupportValue::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `MulticastSupportValue::NewFeature` is defined.
/// Specifically, when `multicastsupportvalue` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `MulticastSupportValue::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 MulticastSupportValue {
    #[allow(missing_docs)] // documentation missing in model
    Disable,
    #[allow(missing_docs)] // documentation missing in model
    Enable,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for MulticastSupportValue {
    fn from(s: &str) -> Self {
        match s {
            "disable" => MulticastSupportValue::Disable,
            "enable" => MulticastSupportValue::Enable,
            other => {
                MulticastSupportValue::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for MulticastSupportValue {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(MulticastSupportValue::from(s))
    }
}
impl MulticastSupportValue {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            MulticastSupportValue::Disable => "disable",
            MulticastSupportValue::Enable => "enable",
            MulticastSupportValue::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["disable", "enable"]
    }
}
impl AsRef<str> for MulticastSupportValue {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `VpnEcmpSupportValue`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let vpnecmpsupportvalue = unimplemented!();
/// match vpnecmpsupportvalue {
///     VpnEcmpSupportValue::Disable => { /* ... */ },
///     VpnEcmpSupportValue::Enable => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `vpnecmpsupportvalue` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `VpnEcmpSupportValue::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `VpnEcmpSupportValue::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `VpnEcmpSupportValue::NewFeature` is defined.
/// Specifically, when `vpnecmpsupportvalue` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `VpnEcmpSupportValue::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 VpnEcmpSupportValue {
    #[allow(missing_docs)] // documentation missing in model
    Disable,
    #[allow(missing_docs)] // documentation missing in model
    Enable,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for VpnEcmpSupportValue {
    fn from(s: &str) -> Self {
        match s {
            "disable" => VpnEcmpSupportValue::Disable,
            "enable" => VpnEcmpSupportValue::Enable,
            other => {
                VpnEcmpSupportValue::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for VpnEcmpSupportValue {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(VpnEcmpSupportValue::from(s))
    }
}
impl VpnEcmpSupportValue {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            VpnEcmpSupportValue::Disable => "disable",
            VpnEcmpSupportValue::Enable => "enable",
            VpnEcmpSupportValue::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["disable", "enable"]
    }
}
impl AsRef<str> for VpnEcmpSupportValue {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `DefaultRouteTablePropagationValue`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let defaultroutetablepropagationvalue = unimplemented!();
/// match defaultroutetablepropagationvalue {
///     DefaultRouteTablePropagationValue::Disable => { /* ... */ },
///     DefaultRouteTablePropagationValue::Enable => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `defaultroutetablepropagationvalue` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `DefaultRouteTablePropagationValue::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `DefaultRouteTablePropagationValue::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `DefaultRouteTablePropagationValue::NewFeature` is defined.
/// Specifically, when `defaultroutetablepropagationvalue` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `DefaultRouteTablePropagationValue::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 DefaultRouteTablePropagationValue {
    #[allow(missing_docs)] // documentation missing in model
    Disable,
    #[allow(missing_docs)] // documentation missing in model
    Enable,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for DefaultRouteTablePropagationValue {
    fn from(s: &str) -> Self {
        match s {
            "disable" => DefaultRouteTablePropagationValue::Disable,
            "enable" => DefaultRouteTablePropagationValue::Enable,
            other => DefaultRouteTablePropagationValue::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for DefaultRouteTablePropagationValue {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(DefaultRouteTablePropagationValue::from(s))
    }
}
impl DefaultRouteTablePropagationValue {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            DefaultRouteTablePropagationValue::Disable => "disable",
            DefaultRouteTablePropagationValue::Enable => "enable",
            DefaultRouteTablePropagationValue::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["disable", "enable"]
    }
}
impl AsRef<str> for DefaultRouteTablePropagationValue {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `DefaultRouteTableAssociationValue`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let defaultroutetableassociationvalue = unimplemented!();
/// match defaultroutetableassociationvalue {
///     DefaultRouteTableAssociationValue::Disable => { /* ... */ },
///     DefaultRouteTableAssociationValue::Enable => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `defaultroutetableassociationvalue` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `DefaultRouteTableAssociationValue::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `DefaultRouteTableAssociationValue::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `DefaultRouteTableAssociationValue::NewFeature` is defined.
/// Specifically, when `defaultroutetableassociationvalue` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `DefaultRouteTableAssociationValue::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 DefaultRouteTableAssociationValue {
    #[allow(missing_docs)] // documentation missing in model
    Disable,
    #[allow(missing_docs)] // documentation missing in model
    Enable,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for DefaultRouteTableAssociationValue {
    fn from(s: &str) -> Self {
        match s {
            "disable" => DefaultRouteTableAssociationValue::Disable,
            "enable" => DefaultRouteTableAssociationValue::Enable,
            other => DefaultRouteTableAssociationValue::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for DefaultRouteTableAssociationValue {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(DefaultRouteTableAssociationValue::from(s))
    }
}
impl DefaultRouteTableAssociationValue {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            DefaultRouteTableAssociationValue::Disable => "disable",
            DefaultRouteTableAssociationValue::Enable => "enable",
            DefaultRouteTableAssociationValue::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["disable", "enable"]
    }
}
impl AsRef<str> for DefaultRouteTableAssociationValue {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `AutoAcceptSharedAttachmentsValue`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let autoacceptsharedattachmentsvalue = unimplemented!();
/// match autoacceptsharedattachmentsvalue {
///     AutoAcceptSharedAttachmentsValue::Disable => { /* ... */ },
///     AutoAcceptSharedAttachmentsValue::Enable => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `autoacceptsharedattachmentsvalue` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `AutoAcceptSharedAttachmentsValue::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `AutoAcceptSharedAttachmentsValue::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `AutoAcceptSharedAttachmentsValue::NewFeature` is defined.
/// Specifically, when `autoacceptsharedattachmentsvalue` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `AutoAcceptSharedAttachmentsValue::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 AutoAcceptSharedAttachmentsValue {
    #[allow(missing_docs)] // documentation missing in model
    Disable,
    #[allow(missing_docs)] // documentation missing in model
    Enable,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for AutoAcceptSharedAttachmentsValue {
    fn from(s: &str) -> Self {
        match s {
            "disable" => AutoAcceptSharedAttachmentsValue::Disable,
            "enable" => AutoAcceptSharedAttachmentsValue::Enable,
            other => AutoAcceptSharedAttachmentsValue::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for AutoAcceptSharedAttachmentsValue {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(AutoAcceptSharedAttachmentsValue::from(s))
    }
}
impl AutoAcceptSharedAttachmentsValue {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            AutoAcceptSharedAttachmentsValue::Disable => "disable",
            AutoAcceptSharedAttachmentsValue::Enable => "enable",
            AutoAcceptSharedAttachmentsValue::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["disable", "enable"]
    }
}
impl AsRef<str> for AutoAcceptSharedAttachmentsValue {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `TransitGatewayState`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let transitgatewaystate = unimplemented!();
/// match transitgatewaystate {
///     TransitGatewayState::Available => { /* ... */ },
///     TransitGatewayState::Deleted => { /* ... */ },
///     TransitGatewayState::Deleting => { /* ... */ },
///     TransitGatewayState::Modifying => { /* ... */ },
///     TransitGatewayState::Pending => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `transitgatewaystate` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `TransitGatewayState::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `TransitGatewayState::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `TransitGatewayState::NewFeature` is defined.
/// Specifically, when `transitgatewaystate` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `TransitGatewayState::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 TransitGatewayState {
    #[allow(missing_docs)] // documentation missing in model
    Available,
    #[allow(missing_docs)] // documentation missing in model
    Deleted,
    #[allow(missing_docs)] // documentation missing in model
    Deleting,
    #[allow(missing_docs)] // documentation missing in model
    Modifying,
    #[allow(missing_docs)] // documentation missing in model
    Pending,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for TransitGatewayState {
    fn from(s: &str) -> Self {
        match s {
            "available" => TransitGatewayState::Available,
            "deleted" => TransitGatewayState::Deleted,
            "deleting" => TransitGatewayState::Deleting,
            "modifying" => TransitGatewayState::Modifying,
            "pending" => TransitGatewayState::Pending,
            other => {
                TransitGatewayState::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for TransitGatewayState {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(TransitGatewayState::from(s))
    }
}
impl TransitGatewayState {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            TransitGatewayState::Available => "available",
            TransitGatewayState::Deleted => "deleted",
            TransitGatewayState::Deleting => "deleting",
            TransitGatewayState::Modifying => "modifying",
            TransitGatewayState::Pending => "pending",
            TransitGatewayState::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["available", "deleted", "deleting", "modifying", "pending"]
    }
}
impl AsRef<str> for TransitGatewayState {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>The transit gateway options.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ModifyTransitGatewayOptions {
    /// <p>Adds IPv4 or IPv6 CIDR blocks for the transit gateway. Must be a size /24 CIDR block or larger for IPv4, or a size /64 CIDR block or larger for IPv6.</p>
    #[doc(hidden)]
    pub add_transit_gateway_cidr_blocks: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>Removes CIDR blocks for the transit gateway.</p>
    #[doc(hidden)]
    pub remove_transit_gateway_cidr_blocks: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>Enable or disable Equal Cost Multipath Protocol support.</p>
    #[doc(hidden)]
    pub vpn_ecmp_support: std::option::Option<crate::model::VpnEcmpSupportValue>,
    /// <p>Enable or disable DNS support.</p>
    #[doc(hidden)]
    pub dns_support: std::option::Option<crate::model::DnsSupportValue>,
    /// <p>Enable or disable automatic acceptance of attachment requests.</p>
    #[doc(hidden)]
    pub auto_accept_shared_attachments:
        std::option::Option<crate::model::AutoAcceptSharedAttachmentsValue>,
    /// <p>Enable or disable automatic association with the default association route table.</p>
    #[doc(hidden)]
    pub default_route_table_association:
        std::option::Option<crate::model::DefaultRouteTableAssociationValue>,
    /// <p>The ID of the default association route table.</p>
    #[doc(hidden)]
    pub association_default_route_table_id: std::option::Option<std::string::String>,
    /// <p>Enable or disable automatic propagation of routes to the default propagation route table.</p>
    #[doc(hidden)]
    pub default_route_table_propagation:
        std::option::Option<crate::model::DefaultRouteTablePropagationValue>,
    /// <p>The ID of the default propagation route table.</p>
    #[doc(hidden)]
    pub propagation_default_route_table_id: std::option::Option<std::string::String>,
    /// <p>A private Autonomous System Number (ASN) for the Amazon side of a BGP session. The range is 64512 to 65534 for 16-bit ASNs and 4200000000 to 4294967294 for 32-bit ASNs.</p>
    /// <p>The modify ASN operation is not allowed on a transit gateway with active BGP sessions. You must first delete all transit gateway attachments that have BGP configured prior to modifying the ASN on the transit gateway.</p>
    #[doc(hidden)]
    pub amazon_side_asn: std::option::Option<i64>,
}
impl ModifyTransitGatewayOptions {
    /// <p>Adds IPv4 or IPv6 CIDR blocks for the transit gateway. Must be a size /24 CIDR block or larger for IPv4, or a size /64 CIDR block or larger for IPv6.</p>
    pub fn add_transit_gateway_cidr_blocks(&self) -> std::option::Option<&[std::string::String]> {
        self.add_transit_gateway_cidr_blocks.as_deref()
    }
    /// <p>Removes CIDR blocks for the transit gateway.</p>
    pub fn remove_transit_gateway_cidr_blocks(
        &self,
    ) -> std::option::Option<&[std::string::String]> {
        self.remove_transit_gateway_cidr_blocks.as_deref()
    }
    /// <p>Enable or disable Equal Cost Multipath Protocol support.</p>
    pub fn vpn_ecmp_support(&self) -> std::option::Option<&crate::model::VpnEcmpSupportValue> {
        self.vpn_ecmp_support.as_ref()
    }
    /// <p>Enable or disable DNS support.</p>
    pub fn dns_support(&self) -> std::option::Option<&crate::model::DnsSupportValue> {
        self.dns_support.as_ref()
    }
    /// <p>Enable or disable automatic acceptance of attachment requests.</p>
    pub fn auto_accept_shared_attachments(
        &self,
    ) -> std::option::Option<&crate::model::AutoAcceptSharedAttachmentsValue> {
        self.auto_accept_shared_attachments.as_ref()
    }
    /// <p>Enable or disable automatic association with the default association route table.</p>
    pub fn default_route_table_association(
        &self,
    ) -> std::option::Option<&crate::model::DefaultRouteTableAssociationValue> {
        self.default_route_table_association.as_ref()
    }
    /// <p>The ID of the default association route table.</p>
    pub fn association_default_route_table_id(&self) -> std::option::Option<&str> {
        self.association_default_route_table_id.as_deref()
    }
    /// <p>Enable or disable automatic propagation of routes to the default propagation route table.</p>
    pub fn default_route_table_propagation(
        &self,
    ) -> std::option::Option<&crate::model::DefaultRouteTablePropagationValue> {
        self.default_route_table_propagation.as_ref()
    }
    /// <p>The ID of the default propagation route table.</p>
    pub fn propagation_default_route_table_id(&self) -> std::option::Option<&str> {
        self.propagation_default_route_table_id.as_deref()
    }
    /// <p>A private Autonomous System Number (ASN) for the Amazon side of a BGP session. The range is 64512 to 65534 for 16-bit ASNs and 4200000000 to 4294967294 for 32-bit ASNs.</p>
    /// <p>The modify ASN operation is not allowed on a transit gateway with active BGP sessions. You must first delete all transit gateway attachments that have BGP configured prior to modifying the ASN on the transit gateway.</p>
    pub fn amazon_side_asn(&self) -> std::option::Option<i64> {
        self.amazon_side_asn
    }
}
/// See [`ModifyTransitGatewayOptions`](crate::model::ModifyTransitGatewayOptions).
pub mod modify_transit_gateway_options {

    /// A builder for [`ModifyTransitGatewayOptions`](crate::model::ModifyTransitGatewayOptions).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) add_transit_gateway_cidr_blocks:
            std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) remove_transit_gateway_cidr_blocks:
            std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) vpn_ecmp_support: std::option::Option<crate::model::VpnEcmpSupportValue>,
        pub(crate) dns_support: std::option::Option<crate::model::DnsSupportValue>,
        pub(crate) auto_accept_shared_attachments:
            std::option::Option<crate::model::AutoAcceptSharedAttachmentsValue>,
        pub(crate) default_route_table_association:
            std::option::Option<crate::model::DefaultRouteTableAssociationValue>,
        pub(crate) association_default_route_table_id: std::option::Option<std::string::String>,
        pub(crate) default_route_table_propagation:
            std::option::Option<crate::model::DefaultRouteTablePropagationValue>,
        pub(crate) propagation_default_route_table_id: std::option::Option<std::string::String>,
        pub(crate) amazon_side_asn: std::option::Option<i64>,
    }
    impl Builder {
        /// Appends an item to `add_transit_gateway_cidr_blocks`.
        ///
        /// To override the contents of this collection use [`set_add_transit_gateway_cidr_blocks`](Self::set_add_transit_gateway_cidr_blocks).
        ///
        /// <p>Adds IPv4 or IPv6 CIDR blocks for the transit gateway. Must be a size /24 CIDR block or larger for IPv4, or a size /64 CIDR block or larger for IPv6.</p>
        pub fn add_transit_gateway_cidr_blocks(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            let mut v = self.add_transit_gateway_cidr_blocks.unwrap_or_default();
            v.push(input.into());
            self.add_transit_gateway_cidr_blocks = Some(v);
            self
        }
        /// <p>Adds IPv4 or IPv6 CIDR blocks for the transit gateway. Must be a size /24 CIDR block or larger for IPv4, or a size /64 CIDR block or larger for IPv6.</p>
        pub fn set_add_transit_gateway_cidr_blocks(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.add_transit_gateway_cidr_blocks = input;
            self
        }
        /// Appends an item to `remove_transit_gateway_cidr_blocks`.
        ///
        /// To override the contents of this collection use [`set_remove_transit_gateway_cidr_blocks`](Self::set_remove_transit_gateway_cidr_blocks).
        ///
        /// <p>Removes CIDR blocks for the transit gateway.</p>
        pub fn remove_transit_gateway_cidr_blocks(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            let mut v = self.remove_transit_gateway_cidr_blocks.unwrap_or_default();
            v.push(input.into());
            self.remove_transit_gateway_cidr_blocks = Some(v);
            self
        }
        /// <p>Removes CIDR blocks for the transit gateway.</p>
        pub fn set_remove_transit_gateway_cidr_blocks(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.remove_transit_gateway_cidr_blocks = input;
            self
        }
        /// <p>Enable or disable Equal Cost Multipath Protocol support.</p>
        pub fn vpn_ecmp_support(mut self, input: crate::model::VpnEcmpSupportValue) -> Self {
            self.vpn_ecmp_support = Some(input);
            self
        }
        /// <p>Enable or disable Equal Cost Multipath Protocol support.</p>
        pub fn set_vpn_ecmp_support(
            mut self,
            input: std::option::Option<crate::model::VpnEcmpSupportValue>,
        ) -> Self {
            self.vpn_ecmp_support = input;
            self
        }
        /// <p>Enable or disable DNS support.</p>
        pub fn dns_support(mut self, input: crate::model::DnsSupportValue) -> Self {
            self.dns_support = Some(input);
            self
        }
        /// <p>Enable or disable DNS support.</p>
        pub fn set_dns_support(
            mut self,
            input: std::option::Option<crate::model::DnsSupportValue>,
        ) -> Self {
            self.dns_support = input;
            self
        }
        /// <p>Enable or disable automatic acceptance of attachment requests.</p>
        pub fn auto_accept_shared_attachments(
            mut self,
            input: crate::model::AutoAcceptSharedAttachmentsValue,
        ) -> Self {
            self.auto_accept_shared_attachments = Some(input);
            self
        }
        /// <p>Enable or disable automatic acceptance of attachment requests.</p>
        pub fn set_auto_accept_shared_attachments(
            mut self,
            input: std::option::Option<crate::model::AutoAcceptSharedAttachmentsValue>,
        ) -> Self {
            self.auto_accept_shared_attachments = input;
            self
        }
        /// <p>Enable or disable automatic association with the default association route table.</p>
        pub fn default_route_table_association(
            mut self,
            input: crate::model::DefaultRouteTableAssociationValue,
        ) -> Self {
            self.default_route_table_association = Some(input);
            self
        }
        /// <p>Enable or disable automatic association with the default association route table.</p>
        pub fn set_default_route_table_association(
            mut self,
            input: std::option::Option<crate::model::DefaultRouteTableAssociationValue>,
        ) -> Self {
            self.default_route_table_association = input;
            self
        }
        /// <p>The ID of the default association route table.</p>
        pub fn association_default_route_table_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.association_default_route_table_id = Some(input.into());
            self
        }
        /// <p>The ID of the default association route table.</p>
        pub fn set_association_default_route_table_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.association_default_route_table_id = input;
            self
        }
        /// <p>Enable or disable automatic propagation of routes to the default propagation route table.</p>
        pub fn default_route_table_propagation(
            mut self,
            input: crate::model::DefaultRouteTablePropagationValue,
        ) -> Self {
            self.default_route_table_propagation = Some(input);
            self
        }
        /// <p>Enable or disable automatic propagation of routes to the default propagation route table.</p>
        pub fn set_default_route_table_propagation(
            mut self,
            input: std::option::Option<crate::model::DefaultRouteTablePropagationValue>,
        ) -> Self {
            self.default_route_table_propagation = input;
            self
        }
        /// <p>The ID of the default propagation route table.</p>
        pub fn propagation_default_route_table_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.propagation_default_route_table_id = Some(input.into());
            self
        }
        /// <p>The ID of the default propagation route table.</p>
        pub fn set_propagation_default_route_table_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.propagation_default_route_table_id = input;
            self
        }
        /// <p>A private Autonomous System Number (ASN) for the Amazon side of a BGP session. The range is 64512 to 65534 for 16-bit ASNs and 4200000000 to 4294967294 for 32-bit ASNs.</p>
        /// <p>The modify ASN operation is not allowed on a transit gateway with active BGP sessions. You must first delete all transit gateway attachments that have BGP configured prior to modifying the ASN on the transit gateway.</p>
        pub fn amazon_side_asn(mut self, input: i64) -> Self {
            self.amazon_side_asn = Some(input);
            self
        }
        /// <p>A private Autonomous System Number (ASN) for the Amazon side of a BGP session. The range is 64512 to 65534 for 16-bit ASNs and 4200000000 to 4294967294 for 32-bit ASNs.</p>
        /// <p>The modify ASN operation is not allowed on a transit gateway with active BGP sessions. You must first delete all transit gateway attachments that have BGP configured prior to modifying the ASN on the transit gateway.</p>
        pub fn set_amazon_side_asn(mut self, input: std::option::Option<i64>) -> Self {
            self.amazon_side_asn = input;
            self
        }
        /// Consumes the builder and constructs a [`ModifyTransitGatewayOptions`](crate::model::ModifyTransitGatewayOptions).
        pub fn build(self) -> crate::model::ModifyTransitGatewayOptions {
            crate::model::ModifyTransitGatewayOptions {
                add_transit_gateway_cidr_blocks: self.add_transit_gateway_cidr_blocks,
                remove_transit_gateway_cidr_blocks: self.remove_transit_gateway_cidr_blocks,
                vpn_ecmp_support: self.vpn_ecmp_support,
                dns_support: self.dns_support,
                auto_accept_shared_attachments: self.auto_accept_shared_attachments,
                default_route_table_association: self.default_route_table_association,
                association_default_route_table_id: self.association_default_route_table_id,
                default_route_table_propagation: self.default_route_table_propagation,
                propagation_default_route_table_id: self.propagation_default_route_table_id,
                amazon_side_asn: self.amazon_side_asn,
            }
        }
    }
}
impl ModifyTransitGatewayOptions {
    /// Creates a new builder-style object to manufacture [`ModifyTransitGatewayOptions`](crate::model::ModifyTransitGatewayOptions).
    pub fn builder() -> crate::model::modify_transit_gateway_options::Builder {
        crate::model::modify_transit_gateway_options::Builder::default()
    }
}

/// <p>Describes a Traffic Mirror session.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TrafficMirrorSession {
    /// <p>The ID for the Traffic Mirror session.</p>
    #[doc(hidden)]
    pub traffic_mirror_session_id: std::option::Option<std::string::String>,
    /// <p>The ID of the Traffic Mirror target.</p>
    #[doc(hidden)]
    pub traffic_mirror_target_id: std::option::Option<std::string::String>,
    /// <p>The ID of the Traffic Mirror filter.</p>
    #[doc(hidden)]
    pub traffic_mirror_filter_id: std::option::Option<std::string::String>,
    /// <p>The ID of the Traffic Mirror session's network interface.</p>
    #[doc(hidden)]
    pub network_interface_id: std::option::Option<std::string::String>,
    /// <p>The ID of the account that owns the Traffic Mirror session.</p>
    #[doc(hidden)]
    pub owner_id: std::option::Option<std::string::String>,
    /// <p>The number of bytes in each packet to mirror. These are the bytes after the VXLAN header. To mirror a subset, set this to the length (in bytes) to mirror. For example, if you set this value to 100, then the first 100 bytes that meet the filter criteria are copied to the target. Do not specify this parameter when you want to mirror the entire packet</p>
    #[doc(hidden)]
    pub packet_length: std::option::Option<i32>,
    /// <p>The session number determines the order in which sessions are evaluated when an interface is used by multiple sessions. The first session with a matching filter is the one that mirrors the packets.</p>
    /// <p>Valid values are 1-32766.</p>
    #[doc(hidden)]
    pub session_number: std::option::Option<i32>,
    /// <p>The virtual network ID associated with the Traffic Mirror session.</p>
    #[doc(hidden)]
    pub virtual_network_id: std::option::Option<i32>,
    /// <p>The description of the Traffic Mirror session.</p>
    #[doc(hidden)]
    pub description: std::option::Option<std::string::String>,
    /// <p>The tags assigned to the Traffic Mirror session.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl TrafficMirrorSession {
    /// <p>The ID for the Traffic Mirror session.</p>
    pub fn traffic_mirror_session_id(&self) -> std::option::Option<&str> {
        self.traffic_mirror_session_id.as_deref()
    }
    /// <p>The ID of the Traffic Mirror target.</p>
    pub fn traffic_mirror_target_id(&self) -> std::option::Option<&str> {
        self.traffic_mirror_target_id.as_deref()
    }
    /// <p>The ID of the Traffic Mirror filter.</p>
    pub fn traffic_mirror_filter_id(&self) -> std::option::Option<&str> {
        self.traffic_mirror_filter_id.as_deref()
    }
    /// <p>The ID of the Traffic Mirror session's network interface.</p>
    pub fn network_interface_id(&self) -> std::option::Option<&str> {
        self.network_interface_id.as_deref()
    }
    /// <p>The ID of the account that owns the Traffic Mirror session.</p>
    pub fn owner_id(&self) -> std::option::Option<&str> {
        self.owner_id.as_deref()
    }
    /// <p>The number of bytes in each packet to mirror. These are the bytes after the VXLAN header. To mirror a subset, set this to the length (in bytes) to mirror. For example, if you set this value to 100, then the first 100 bytes that meet the filter criteria are copied to the target. Do not specify this parameter when you want to mirror the entire packet</p>
    pub fn packet_length(&self) -> std::option::Option<i32> {
        self.packet_length
    }
    /// <p>The session number determines the order in which sessions are evaluated when an interface is used by multiple sessions. The first session with a matching filter is the one that mirrors the packets.</p>
    /// <p>Valid values are 1-32766.</p>
    pub fn session_number(&self) -> std::option::Option<i32> {
        self.session_number
    }
    /// <p>The virtual network ID associated with the Traffic Mirror session.</p>
    pub fn virtual_network_id(&self) -> std::option::Option<i32> {
        self.virtual_network_id
    }
    /// <p>The description of the Traffic Mirror session.</p>
    pub fn description(&self) -> std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The tags assigned to the Traffic Mirror session.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
}
/// See [`TrafficMirrorSession`](crate::model::TrafficMirrorSession).
pub mod traffic_mirror_session {

    /// A builder for [`TrafficMirrorSession`](crate::model::TrafficMirrorSession).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) traffic_mirror_session_id: std::option::Option<std::string::String>,
        pub(crate) traffic_mirror_target_id: std::option::Option<std::string::String>,
        pub(crate) traffic_mirror_filter_id: std::option::Option<std::string::String>,
        pub(crate) network_interface_id: std::option::Option<std::string::String>,
        pub(crate) owner_id: std::option::Option<std::string::String>,
        pub(crate) packet_length: std::option::Option<i32>,
        pub(crate) session_number: std::option::Option<i32>,
        pub(crate) virtual_network_id: std::option::Option<i32>,
        pub(crate) description: std::option::Option<std::string::String>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    }
    impl Builder {
        /// <p>The ID for the Traffic Mirror session.</p>
        pub fn traffic_mirror_session_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.traffic_mirror_session_id = Some(input.into());
            self
        }
        /// <p>The ID for the Traffic Mirror session.</p>
        pub fn set_traffic_mirror_session_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.traffic_mirror_session_id = input;
            self
        }
        /// <p>The ID of the Traffic Mirror target.</p>
        pub fn traffic_mirror_target_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.traffic_mirror_target_id = Some(input.into());
            self
        }
        /// <p>The ID of the Traffic Mirror target.</p>
        pub fn set_traffic_mirror_target_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.traffic_mirror_target_id = input;
            self
        }
        /// <p>The ID of the Traffic Mirror filter.</p>
        pub fn traffic_mirror_filter_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.traffic_mirror_filter_id = Some(input.into());
            self
        }
        /// <p>The ID of the Traffic Mirror filter.</p>
        pub fn set_traffic_mirror_filter_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.traffic_mirror_filter_id = input;
            self
        }
        /// <p>The ID of the Traffic Mirror session's network interface.</p>
        pub fn network_interface_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.network_interface_id = Some(input.into());
            self
        }
        /// <p>The ID of the Traffic Mirror session's network interface.</p>
        pub fn set_network_interface_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.network_interface_id = input;
            self
        }
        /// <p>The ID of the account that owns the Traffic Mirror session.</p>
        pub fn owner_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.owner_id = Some(input.into());
            self
        }
        /// <p>The ID of the account that owns the Traffic Mirror session.</p>
        pub fn set_owner_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.owner_id = input;
            self
        }
        /// <p>The number of bytes in each packet to mirror. These are the bytes after the VXLAN header. To mirror a subset, set this to the length (in bytes) to mirror. For example, if you set this value to 100, then the first 100 bytes that meet the filter criteria are copied to the target. Do not specify this parameter when you want to mirror the entire packet</p>
        pub fn packet_length(mut self, input: i32) -> Self {
            self.packet_length = Some(input);
            self
        }
        /// <p>The number of bytes in each packet to mirror. These are the bytes after the VXLAN header. To mirror a subset, set this to the length (in bytes) to mirror. For example, if you set this value to 100, then the first 100 bytes that meet the filter criteria are copied to the target. Do not specify this parameter when you want to mirror the entire packet</p>
        pub fn set_packet_length(mut self, input: std::option::Option<i32>) -> Self {
            self.packet_length = input;
            self
        }
        /// <p>The session number determines the order in which sessions are evaluated when an interface is used by multiple sessions. The first session with a matching filter is the one that mirrors the packets.</p>
        /// <p>Valid values are 1-32766.</p>
        pub fn session_number(mut self, input: i32) -> Self {
            self.session_number = Some(input);
            self
        }
        /// <p>The session number determines the order in which sessions are evaluated when an interface is used by multiple sessions. The first session with a matching filter is the one that mirrors the packets.</p>
        /// <p>Valid values are 1-32766.</p>
        pub fn set_session_number(mut self, input: std::option::Option<i32>) -> Self {
            self.session_number = input;
            self
        }
        /// <p>The virtual network ID associated with the Traffic Mirror session.</p>
        pub fn virtual_network_id(mut self, input: i32) -> Self {
            self.virtual_network_id = Some(input);
            self
        }
        /// <p>The virtual network ID associated with the Traffic Mirror session.</p>
        pub fn set_virtual_network_id(mut self, input: std::option::Option<i32>) -> Self {
            self.virtual_network_id = input;
            self
        }
        /// <p>The description of the Traffic Mirror session.</p>
        pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
            self.description = Some(input.into());
            self
        }
        /// <p>The description of the Traffic Mirror session.</p>
        pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.description = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>The tags assigned to the Traffic Mirror session.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>The tags assigned to the Traffic Mirror session.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// Consumes the builder and constructs a [`TrafficMirrorSession`](crate::model::TrafficMirrorSession).
        pub fn build(self) -> crate::model::TrafficMirrorSession {
            crate::model::TrafficMirrorSession {
                traffic_mirror_session_id: self.traffic_mirror_session_id,
                traffic_mirror_target_id: self.traffic_mirror_target_id,
                traffic_mirror_filter_id: self.traffic_mirror_filter_id,
                network_interface_id: self.network_interface_id,
                owner_id: self.owner_id,
                packet_length: self.packet_length,
                session_number: self.session_number,
                virtual_network_id: self.virtual_network_id,
                description: self.description,
                tags: self.tags,
            }
        }
    }
}
impl TrafficMirrorSession {
    /// Creates a new builder-style object to manufacture [`TrafficMirrorSession`](crate::model::TrafficMirrorSession).
    pub fn builder() -> crate::model::traffic_mirror_session::Builder {
        crate::model::traffic_mirror_session::Builder::default()
    }
}

/// When writing a match expression against `TrafficMirrorSessionField`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let trafficmirrorsessionfield = unimplemented!();
/// match trafficmirrorsessionfield {
///     TrafficMirrorSessionField::Description => { /* ... */ },
///     TrafficMirrorSessionField::PacketLength => { /* ... */ },
///     TrafficMirrorSessionField::VirtualNetworkId => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `trafficmirrorsessionfield` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `TrafficMirrorSessionField::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `TrafficMirrorSessionField::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `TrafficMirrorSessionField::NewFeature` is defined.
/// Specifically, when `trafficmirrorsessionfield` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `TrafficMirrorSessionField::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 TrafficMirrorSessionField {
    #[allow(missing_docs)] // documentation missing in model
    Description,
    #[allow(missing_docs)] // documentation missing in model
    PacketLength,
    #[allow(missing_docs)] // documentation missing in model
    VirtualNetworkId,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for TrafficMirrorSessionField {
    fn from(s: &str) -> Self {
        match s {
            "description" => TrafficMirrorSessionField::Description,
            "packet-length" => TrafficMirrorSessionField::PacketLength,
            "virtual-network-id" => TrafficMirrorSessionField::VirtualNetworkId,
            other => TrafficMirrorSessionField::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for TrafficMirrorSessionField {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(TrafficMirrorSessionField::from(s))
    }
}
impl TrafficMirrorSessionField {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            TrafficMirrorSessionField::Description => "description",
            TrafficMirrorSessionField::PacketLength => "packet-length",
            TrafficMirrorSessionField::VirtualNetworkId => "virtual-network-id",
            TrafficMirrorSessionField::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["description", "packet-length", "virtual-network-id"]
    }
}
impl AsRef<str> for TrafficMirrorSessionField {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes the Traffic Mirror rule.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TrafficMirrorFilterRule {
    /// <p>The ID of the Traffic Mirror rule.</p>
    #[doc(hidden)]
    pub traffic_mirror_filter_rule_id: std::option::Option<std::string::String>,
    /// <p>The ID of the Traffic Mirror filter that the rule is associated with.</p>
    #[doc(hidden)]
    pub traffic_mirror_filter_id: std::option::Option<std::string::String>,
    /// <p>The traffic direction assigned to the Traffic Mirror rule.</p>
    #[doc(hidden)]
    pub traffic_direction: std::option::Option<crate::model::TrafficDirection>,
    /// <p>The rule number of the Traffic Mirror rule.</p>
    #[doc(hidden)]
    pub rule_number: std::option::Option<i32>,
    /// <p>The action assigned to the Traffic Mirror rule.</p>
    #[doc(hidden)]
    pub rule_action: std::option::Option<crate::model::TrafficMirrorRuleAction>,
    /// <p>The protocol assigned to the Traffic Mirror rule.</p>
    #[doc(hidden)]
    pub protocol: std::option::Option<i32>,
    /// <p>The destination port range assigned to the Traffic Mirror rule.</p>
    #[doc(hidden)]
    pub destination_port_range: std::option::Option<crate::model::TrafficMirrorPortRange>,
    /// <p>The source port range assigned to the Traffic Mirror rule.</p>
    #[doc(hidden)]
    pub source_port_range: std::option::Option<crate::model::TrafficMirrorPortRange>,
    /// <p>The destination CIDR block assigned to the Traffic Mirror rule.</p>
    #[doc(hidden)]
    pub destination_cidr_block: std::option::Option<std::string::String>,
    /// <p>The source CIDR block assigned to the Traffic Mirror rule.</p>
    #[doc(hidden)]
    pub source_cidr_block: std::option::Option<std::string::String>,
    /// <p>The description of the Traffic Mirror rule.</p>
    #[doc(hidden)]
    pub description: std::option::Option<std::string::String>,
}
impl TrafficMirrorFilterRule {
    /// <p>The ID of the Traffic Mirror rule.</p>
    pub fn traffic_mirror_filter_rule_id(&self) -> std::option::Option<&str> {
        self.traffic_mirror_filter_rule_id.as_deref()
    }
    /// <p>The ID of the Traffic Mirror filter that the rule is associated with.</p>
    pub fn traffic_mirror_filter_id(&self) -> std::option::Option<&str> {
        self.traffic_mirror_filter_id.as_deref()
    }
    /// <p>The traffic direction assigned to the Traffic Mirror rule.</p>
    pub fn traffic_direction(&self) -> std::option::Option<&crate::model::TrafficDirection> {
        self.traffic_direction.as_ref()
    }
    /// <p>The rule number of the Traffic Mirror rule.</p>
    pub fn rule_number(&self) -> std::option::Option<i32> {
        self.rule_number
    }
    /// <p>The action assigned to the Traffic Mirror rule.</p>
    pub fn rule_action(&self) -> std::option::Option<&crate::model::TrafficMirrorRuleAction> {
        self.rule_action.as_ref()
    }
    /// <p>The protocol assigned to the Traffic Mirror rule.</p>
    pub fn protocol(&self) -> std::option::Option<i32> {
        self.protocol
    }
    /// <p>The destination port range assigned to the Traffic Mirror rule.</p>
    pub fn destination_port_range(
        &self,
    ) -> std::option::Option<&crate::model::TrafficMirrorPortRange> {
        self.destination_port_range.as_ref()
    }
    /// <p>The source port range assigned to the Traffic Mirror rule.</p>
    pub fn source_port_range(&self) -> std::option::Option<&crate::model::TrafficMirrorPortRange> {
        self.source_port_range.as_ref()
    }
    /// <p>The destination CIDR block assigned to the Traffic Mirror rule.</p>
    pub fn destination_cidr_block(&self) -> std::option::Option<&str> {
        self.destination_cidr_block.as_deref()
    }
    /// <p>The source CIDR block assigned to the Traffic Mirror rule.</p>
    pub fn source_cidr_block(&self) -> std::option::Option<&str> {
        self.source_cidr_block.as_deref()
    }
    /// <p>The description of the Traffic Mirror rule.</p>
    pub fn description(&self) -> std::option::Option<&str> {
        self.description.as_deref()
    }
}
/// See [`TrafficMirrorFilterRule`](crate::model::TrafficMirrorFilterRule).
pub mod traffic_mirror_filter_rule {

    /// A builder for [`TrafficMirrorFilterRule`](crate::model::TrafficMirrorFilterRule).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) traffic_mirror_filter_rule_id: std::option::Option<std::string::String>,
        pub(crate) traffic_mirror_filter_id: std::option::Option<std::string::String>,
        pub(crate) traffic_direction: std::option::Option<crate::model::TrafficDirection>,
        pub(crate) rule_number: std::option::Option<i32>,
        pub(crate) rule_action: std::option::Option<crate::model::TrafficMirrorRuleAction>,
        pub(crate) protocol: std::option::Option<i32>,
        pub(crate) destination_port_range:
            std::option::Option<crate::model::TrafficMirrorPortRange>,
        pub(crate) source_port_range: std::option::Option<crate::model::TrafficMirrorPortRange>,
        pub(crate) destination_cidr_block: std::option::Option<std::string::String>,
        pub(crate) source_cidr_block: std::option::Option<std::string::String>,
        pub(crate) description: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The ID of the Traffic Mirror rule.</p>
        pub fn traffic_mirror_filter_rule_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.traffic_mirror_filter_rule_id = Some(input.into());
            self
        }
        /// <p>The ID of the Traffic Mirror rule.</p>
        pub fn set_traffic_mirror_filter_rule_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.traffic_mirror_filter_rule_id = input;
            self
        }
        /// <p>The ID of the Traffic Mirror filter that the rule is associated with.</p>
        pub fn traffic_mirror_filter_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.traffic_mirror_filter_id = Some(input.into());
            self
        }
        /// <p>The ID of the Traffic Mirror filter that the rule is associated with.</p>
        pub fn set_traffic_mirror_filter_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.traffic_mirror_filter_id = input;
            self
        }
        /// <p>The traffic direction assigned to the Traffic Mirror rule.</p>
        pub fn traffic_direction(mut self, input: crate::model::TrafficDirection) -> Self {
            self.traffic_direction = Some(input);
            self
        }
        /// <p>The traffic direction assigned to the Traffic Mirror rule.</p>
        pub fn set_traffic_direction(
            mut self,
            input: std::option::Option<crate::model::TrafficDirection>,
        ) -> Self {
            self.traffic_direction = input;
            self
        }
        /// <p>The rule number of the Traffic Mirror rule.</p>
        pub fn rule_number(mut self, input: i32) -> Self {
            self.rule_number = Some(input);
            self
        }
        /// <p>The rule number of the Traffic Mirror rule.</p>
        pub fn set_rule_number(mut self, input: std::option::Option<i32>) -> Self {
            self.rule_number = input;
            self
        }
        /// <p>The action assigned to the Traffic Mirror rule.</p>
        pub fn rule_action(mut self, input: crate::model::TrafficMirrorRuleAction) -> Self {
            self.rule_action = Some(input);
            self
        }
        /// <p>The action assigned to the Traffic Mirror rule.</p>
        pub fn set_rule_action(
            mut self,
            input: std::option::Option<crate::model::TrafficMirrorRuleAction>,
        ) -> Self {
            self.rule_action = input;
            self
        }
        /// <p>The protocol assigned to the Traffic Mirror rule.</p>
        pub fn protocol(mut self, input: i32) -> Self {
            self.protocol = Some(input);
            self
        }
        /// <p>The protocol assigned to the Traffic Mirror rule.</p>
        pub fn set_protocol(mut self, input: std::option::Option<i32>) -> Self {
            self.protocol = input;
            self
        }
        /// <p>The destination port range assigned to the Traffic Mirror rule.</p>
        pub fn destination_port_range(
            mut self,
            input: crate::model::TrafficMirrorPortRange,
        ) -> Self {
            self.destination_port_range = Some(input);
            self
        }
        /// <p>The destination port range assigned to the Traffic Mirror rule.</p>
        pub fn set_destination_port_range(
            mut self,
            input: std::option::Option<crate::model::TrafficMirrorPortRange>,
        ) -> Self {
            self.destination_port_range = input;
            self
        }
        /// <p>The source port range assigned to the Traffic Mirror rule.</p>
        pub fn source_port_range(mut self, input: crate::model::TrafficMirrorPortRange) -> Self {
            self.source_port_range = Some(input);
            self
        }
        /// <p>The source port range assigned to the Traffic Mirror rule.</p>
        pub fn set_source_port_range(
            mut self,
            input: std::option::Option<crate::model::TrafficMirrorPortRange>,
        ) -> Self {
            self.source_port_range = input;
            self
        }
        /// <p>The destination CIDR block assigned to the Traffic Mirror rule.</p>
        pub fn destination_cidr_block(mut self, input: impl Into<std::string::String>) -> Self {
            self.destination_cidr_block = Some(input.into());
            self
        }
        /// <p>The destination CIDR block assigned to the Traffic Mirror rule.</p>
        pub fn set_destination_cidr_block(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.destination_cidr_block = input;
            self
        }
        /// <p>The source CIDR block assigned to the Traffic Mirror rule.</p>
        pub fn source_cidr_block(mut self, input: impl Into<std::string::String>) -> Self {
            self.source_cidr_block = Some(input.into());
            self
        }
        /// <p>The source CIDR block assigned to the Traffic Mirror rule.</p>
        pub fn set_source_cidr_block(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.source_cidr_block = input;
            self
        }
        /// <p>The description of the Traffic Mirror rule.</p>
        pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
            self.description = Some(input.into());
            self
        }
        /// <p>The description of the Traffic Mirror rule.</p>
        pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.description = input;
            self
        }
        /// Consumes the builder and constructs a [`TrafficMirrorFilterRule`](crate::model::TrafficMirrorFilterRule).
        pub fn build(self) -> crate::model::TrafficMirrorFilterRule {
            crate::model::TrafficMirrorFilterRule {
                traffic_mirror_filter_rule_id: self.traffic_mirror_filter_rule_id,
                traffic_mirror_filter_id: self.traffic_mirror_filter_id,
                traffic_direction: self.traffic_direction,
                rule_number: self.rule_number,
                rule_action: self.rule_action,
                protocol: self.protocol,
                destination_port_range: self.destination_port_range,
                source_port_range: self.source_port_range,
                destination_cidr_block: self.destination_cidr_block,
                source_cidr_block: self.source_cidr_block,
                description: self.description,
            }
        }
    }
}
impl TrafficMirrorFilterRule {
    /// Creates a new builder-style object to manufacture [`TrafficMirrorFilterRule`](crate::model::TrafficMirrorFilterRule).
    pub fn builder() -> crate::model::traffic_mirror_filter_rule::Builder {
        crate::model::traffic_mirror_filter_rule::Builder::default()
    }
}

/// <p>Describes the Traffic Mirror port range.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TrafficMirrorPortRange {
    /// <p>The start of the Traffic Mirror port range. This applies to the TCP and UDP protocols.</p>
    #[doc(hidden)]
    pub from_port: std::option::Option<i32>,
    /// <p>The end of the Traffic Mirror port range. This applies to the TCP and UDP protocols.</p>
    #[doc(hidden)]
    pub to_port: std::option::Option<i32>,
}
impl TrafficMirrorPortRange {
    /// <p>The start of the Traffic Mirror port range. This applies to the TCP and UDP protocols.</p>
    pub fn from_port(&self) -> std::option::Option<i32> {
        self.from_port
    }
    /// <p>The end of the Traffic Mirror port range. This applies to the TCP and UDP protocols.</p>
    pub fn to_port(&self) -> std::option::Option<i32> {
        self.to_port
    }
}
/// See [`TrafficMirrorPortRange`](crate::model::TrafficMirrorPortRange).
pub mod traffic_mirror_port_range {

    /// A builder for [`TrafficMirrorPortRange`](crate::model::TrafficMirrorPortRange).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) from_port: std::option::Option<i32>,
        pub(crate) to_port: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>The start of the Traffic Mirror port range. This applies to the TCP and UDP protocols.</p>
        pub fn from_port(mut self, input: i32) -> Self {
            self.from_port = Some(input);
            self
        }
        /// <p>The start of the Traffic Mirror port range. This applies to the TCP and UDP protocols.</p>
        pub fn set_from_port(mut self, input: std::option::Option<i32>) -> Self {
            self.from_port = input;
            self
        }
        /// <p>The end of the Traffic Mirror port range. This applies to the TCP and UDP protocols.</p>
        pub fn to_port(mut self, input: i32) -> Self {
            self.to_port = Some(input);
            self
        }
        /// <p>The end of the Traffic Mirror port range. This applies to the TCP and UDP protocols.</p>
        pub fn set_to_port(mut self, input: std::option::Option<i32>) -> Self {
            self.to_port = input;
            self
        }
        /// Consumes the builder and constructs a [`TrafficMirrorPortRange`](crate::model::TrafficMirrorPortRange).
        pub fn build(self) -> crate::model::TrafficMirrorPortRange {
            crate::model::TrafficMirrorPortRange {
                from_port: self.from_port,
                to_port: self.to_port,
            }
        }
    }
}
impl TrafficMirrorPortRange {
    /// Creates a new builder-style object to manufacture [`TrafficMirrorPortRange`](crate::model::TrafficMirrorPortRange).
    pub fn builder() -> crate::model::traffic_mirror_port_range::Builder {
        crate::model::traffic_mirror_port_range::Builder::default()
    }
}

/// When writing a match expression against `TrafficMirrorRuleAction`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let trafficmirrorruleaction = unimplemented!();
/// match trafficmirrorruleaction {
///     TrafficMirrorRuleAction::Accept => { /* ... */ },
///     TrafficMirrorRuleAction::Reject => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `trafficmirrorruleaction` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `TrafficMirrorRuleAction::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `TrafficMirrorRuleAction::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `TrafficMirrorRuleAction::NewFeature` is defined.
/// Specifically, when `trafficmirrorruleaction` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `TrafficMirrorRuleAction::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 TrafficMirrorRuleAction {
    #[allow(missing_docs)] // documentation missing in model
    Accept,
    #[allow(missing_docs)] // documentation missing in model
    Reject,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for TrafficMirrorRuleAction {
    fn from(s: &str) -> Self {
        match s {
            "accept" => TrafficMirrorRuleAction::Accept,
            "reject" => TrafficMirrorRuleAction::Reject,
            other => TrafficMirrorRuleAction::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for TrafficMirrorRuleAction {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(TrafficMirrorRuleAction::from(s))
    }
}
impl TrafficMirrorRuleAction {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            TrafficMirrorRuleAction::Accept => "accept",
            TrafficMirrorRuleAction::Reject => "reject",
            TrafficMirrorRuleAction::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["accept", "reject"]
    }
}
impl AsRef<str> for TrafficMirrorRuleAction {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `TrafficDirection`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let trafficdirection = unimplemented!();
/// match trafficdirection {
///     TrafficDirection::Egress => { /* ... */ },
///     TrafficDirection::Ingress => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `trafficdirection` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `TrafficDirection::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `TrafficDirection::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `TrafficDirection::NewFeature` is defined.
/// Specifically, when `trafficdirection` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `TrafficDirection::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 TrafficDirection {
    #[allow(missing_docs)] // documentation missing in model
    Egress,
    #[allow(missing_docs)] // documentation missing in model
    Ingress,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for TrafficDirection {
    fn from(s: &str) -> Self {
        match s {
            "egress" => TrafficDirection::Egress,
            "ingress" => TrafficDirection::Ingress,
            other => TrafficDirection::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for TrafficDirection {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(TrafficDirection::from(s))
    }
}
impl TrafficDirection {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            TrafficDirection::Egress => "egress",
            TrafficDirection::Ingress => "ingress",
            TrafficDirection::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["egress", "ingress"]
    }
}
impl AsRef<str> for TrafficDirection {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `TrafficMirrorFilterRuleField`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let trafficmirrorfilterrulefield = unimplemented!();
/// match trafficmirrorfilterrulefield {
///     TrafficMirrorFilterRuleField::Description => { /* ... */ },
///     TrafficMirrorFilterRuleField::DestinationPortRange => { /* ... */ },
///     TrafficMirrorFilterRuleField::Protocol => { /* ... */ },
///     TrafficMirrorFilterRuleField::SourcePortRange => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `trafficmirrorfilterrulefield` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `TrafficMirrorFilterRuleField::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `TrafficMirrorFilterRuleField::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `TrafficMirrorFilterRuleField::NewFeature` is defined.
/// Specifically, when `trafficmirrorfilterrulefield` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `TrafficMirrorFilterRuleField::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 TrafficMirrorFilterRuleField {
    #[allow(missing_docs)] // documentation missing in model
    Description,
    #[allow(missing_docs)] // documentation missing in model
    DestinationPortRange,
    #[allow(missing_docs)] // documentation missing in model
    Protocol,
    #[allow(missing_docs)] // documentation missing in model
    SourcePortRange,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for TrafficMirrorFilterRuleField {
    fn from(s: &str) -> Self {
        match s {
            "description" => TrafficMirrorFilterRuleField::Description,
            "destination-port-range" => TrafficMirrorFilterRuleField::DestinationPortRange,
            "protocol" => TrafficMirrorFilterRuleField::Protocol,
            "source-port-range" => TrafficMirrorFilterRuleField::SourcePortRange,
            other => TrafficMirrorFilterRuleField::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for TrafficMirrorFilterRuleField {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(TrafficMirrorFilterRuleField::from(s))
    }
}
impl TrafficMirrorFilterRuleField {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            TrafficMirrorFilterRuleField::Description => "description",
            TrafficMirrorFilterRuleField::DestinationPortRange => "destination-port-range",
            TrafficMirrorFilterRuleField::Protocol => "protocol",
            TrafficMirrorFilterRuleField::SourcePortRange => "source-port-range",
            TrafficMirrorFilterRuleField::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &[
            "description",
            "destination-port-range",
            "protocol",
            "source-port-range",
        ]
    }
}
impl AsRef<str> for TrafficMirrorFilterRuleField {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Information about the Traffic Mirror filter rule port range.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TrafficMirrorPortRangeRequest {
    /// <p>The first port in the Traffic Mirror port range. This applies to the TCP and UDP protocols.</p>
    #[doc(hidden)]
    pub from_port: std::option::Option<i32>,
    /// <p>The last port in the Traffic Mirror port range. This applies to the TCP and UDP protocols.</p>
    #[doc(hidden)]
    pub to_port: std::option::Option<i32>,
}
impl TrafficMirrorPortRangeRequest {
    /// <p>The first port in the Traffic Mirror port range. This applies to the TCP and UDP protocols.</p>
    pub fn from_port(&self) -> std::option::Option<i32> {
        self.from_port
    }
    /// <p>The last port in the Traffic Mirror port range. This applies to the TCP and UDP protocols.</p>
    pub fn to_port(&self) -> std::option::Option<i32> {
        self.to_port
    }
}
/// See [`TrafficMirrorPortRangeRequest`](crate::model::TrafficMirrorPortRangeRequest).
pub mod traffic_mirror_port_range_request {

    /// A builder for [`TrafficMirrorPortRangeRequest`](crate::model::TrafficMirrorPortRangeRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) from_port: std::option::Option<i32>,
        pub(crate) to_port: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>The first port in the Traffic Mirror port range. This applies to the TCP and UDP protocols.</p>
        pub fn from_port(mut self, input: i32) -> Self {
            self.from_port = Some(input);
            self
        }
        /// <p>The first port in the Traffic Mirror port range. This applies to the TCP and UDP protocols.</p>
        pub fn set_from_port(mut self, input: std::option::Option<i32>) -> Self {
            self.from_port = input;
            self
        }
        /// <p>The last port in the Traffic Mirror port range. This applies to the TCP and UDP protocols.</p>
        pub fn to_port(mut self, input: i32) -> Self {
            self.to_port = Some(input);
            self
        }
        /// <p>The last port in the Traffic Mirror port range. This applies to the TCP and UDP protocols.</p>
        pub fn set_to_port(mut self, input: std::option::Option<i32>) -> Self {
            self.to_port = input;
            self
        }
        /// Consumes the builder and constructs a [`TrafficMirrorPortRangeRequest`](crate::model::TrafficMirrorPortRangeRequest).
        pub fn build(self) -> crate::model::TrafficMirrorPortRangeRequest {
            crate::model::TrafficMirrorPortRangeRequest {
                from_port: self.from_port,
                to_port: self.to_port,
            }
        }
    }
}
impl TrafficMirrorPortRangeRequest {
    /// Creates a new builder-style object to manufacture [`TrafficMirrorPortRangeRequest`](crate::model::TrafficMirrorPortRangeRequest).
    pub fn builder() -> crate::model::traffic_mirror_port_range_request::Builder {
        crate::model::traffic_mirror_port_range_request::Builder::default()
    }
}

/// <p>Describes the Traffic Mirror filter.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TrafficMirrorFilter {
    /// <p>The ID of the Traffic Mirror filter.</p>
    #[doc(hidden)]
    pub traffic_mirror_filter_id: std::option::Option<std::string::String>,
    /// <p>Information about the ingress rules that are associated with the Traffic Mirror filter.</p>
    #[doc(hidden)]
    pub ingress_filter_rules:
        std::option::Option<std::vec::Vec<crate::model::TrafficMirrorFilterRule>>,
    /// <p>Information about the egress rules that are associated with the Traffic Mirror filter.</p>
    #[doc(hidden)]
    pub egress_filter_rules:
        std::option::Option<std::vec::Vec<crate::model::TrafficMirrorFilterRule>>,
    /// <p>The network service traffic that is associated with the Traffic Mirror filter.</p>
    #[doc(hidden)]
    pub network_services:
        std::option::Option<std::vec::Vec<crate::model::TrafficMirrorNetworkService>>,
    /// <p>The description of the Traffic Mirror filter.</p>
    #[doc(hidden)]
    pub description: std::option::Option<std::string::String>,
    /// <p>The tags assigned to the Traffic Mirror filter.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl TrafficMirrorFilter {
    /// <p>The ID of the Traffic Mirror filter.</p>
    pub fn traffic_mirror_filter_id(&self) -> std::option::Option<&str> {
        self.traffic_mirror_filter_id.as_deref()
    }
    /// <p>Information about the ingress rules that are associated with the Traffic Mirror filter.</p>
    pub fn ingress_filter_rules(
        &self,
    ) -> std::option::Option<&[crate::model::TrafficMirrorFilterRule]> {
        self.ingress_filter_rules.as_deref()
    }
    /// <p>Information about the egress rules that are associated with the Traffic Mirror filter.</p>
    pub fn egress_filter_rules(
        &self,
    ) -> std::option::Option<&[crate::model::TrafficMirrorFilterRule]> {
        self.egress_filter_rules.as_deref()
    }
    /// <p>The network service traffic that is associated with the Traffic Mirror filter.</p>
    pub fn network_services(
        &self,
    ) -> std::option::Option<&[crate::model::TrafficMirrorNetworkService]> {
        self.network_services.as_deref()
    }
    /// <p>The description of the Traffic Mirror filter.</p>
    pub fn description(&self) -> std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The tags assigned to the Traffic Mirror filter.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
}
/// See [`TrafficMirrorFilter`](crate::model::TrafficMirrorFilter).
pub mod traffic_mirror_filter {

    /// A builder for [`TrafficMirrorFilter`](crate::model::TrafficMirrorFilter).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) traffic_mirror_filter_id: std::option::Option<std::string::String>,
        pub(crate) ingress_filter_rules:
            std::option::Option<std::vec::Vec<crate::model::TrafficMirrorFilterRule>>,
        pub(crate) egress_filter_rules:
            std::option::Option<std::vec::Vec<crate::model::TrafficMirrorFilterRule>>,
        pub(crate) network_services:
            std::option::Option<std::vec::Vec<crate::model::TrafficMirrorNetworkService>>,
        pub(crate) description: std::option::Option<std::string::String>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    }
    impl Builder {
        /// <p>The ID of the Traffic Mirror filter.</p>
        pub fn traffic_mirror_filter_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.traffic_mirror_filter_id = Some(input.into());
            self
        }
        /// <p>The ID of the Traffic Mirror filter.</p>
        pub fn set_traffic_mirror_filter_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.traffic_mirror_filter_id = input;
            self
        }
        /// Appends an item to `ingress_filter_rules`.
        ///
        /// To override the contents of this collection use [`set_ingress_filter_rules`](Self::set_ingress_filter_rules).
        ///
        /// <p>Information about the ingress rules that are associated with the Traffic Mirror filter.</p>
        pub fn ingress_filter_rules(
            mut self,
            input: crate::model::TrafficMirrorFilterRule,
        ) -> Self {
            let mut v = self.ingress_filter_rules.unwrap_or_default();
            v.push(input);
            self.ingress_filter_rules = Some(v);
            self
        }
        /// <p>Information about the ingress rules that are associated with the Traffic Mirror filter.</p>
        pub fn set_ingress_filter_rules(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::TrafficMirrorFilterRule>>,
        ) -> Self {
            self.ingress_filter_rules = input;
            self
        }
        /// Appends an item to `egress_filter_rules`.
        ///
        /// To override the contents of this collection use [`set_egress_filter_rules`](Self::set_egress_filter_rules).
        ///
        /// <p>Information about the egress rules that are associated with the Traffic Mirror filter.</p>
        pub fn egress_filter_rules(mut self, input: crate::model::TrafficMirrorFilterRule) -> Self {
            let mut v = self.egress_filter_rules.unwrap_or_default();
            v.push(input);
            self.egress_filter_rules = Some(v);
            self
        }
        /// <p>Information about the egress rules that are associated with the Traffic Mirror filter.</p>
        pub fn set_egress_filter_rules(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::TrafficMirrorFilterRule>>,
        ) -> Self {
            self.egress_filter_rules = input;
            self
        }
        /// Appends an item to `network_services`.
        ///
        /// To override the contents of this collection use [`set_network_services`](Self::set_network_services).
        ///
        /// <p>The network service traffic that is associated with the Traffic Mirror filter.</p>
        pub fn network_services(
            mut self,
            input: crate::model::TrafficMirrorNetworkService,
        ) -> Self {
            let mut v = self.network_services.unwrap_or_default();
            v.push(input);
            self.network_services = Some(v);
            self
        }
        /// <p>The network service traffic that is associated with the Traffic Mirror filter.</p>
        pub fn set_network_services(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::TrafficMirrorNetworkService>>,
        ) -> Self {
            self.network_services = input;
            self
        }
        /// <p>The description of the Traffic Mirror filter.</p>
        pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
            self.description = Some(input.into());
            self
        }
        /// <p>The description of the Traffic Mirror filter.</p>
        pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.description = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>The tags assigned to the Traffic Mirror filter.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>The tags assigned to the Traffic Mirror filter.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// Consumes the builder and constructs a [`TrafficMirrorFilter`](crate::model::TrafficMirrorFilter).
        pub fn build(self) -> crate::model::TrafficMirrorFilter {
            crate::model::TrafficMirrorFilter {
                traffic_mirror_filter_id: self.traffic_mirror_filter_id,
                ingress_filter_rules: self.ingress_filter_rules,
                egress_filter_rules: self.egress_filter_rules,
                network_services: self.network_services,
                description: self.description,
                tags: self.tags,
            }
        }
    }
}
impl TrafficMirrorFilter {
    /// Creates a new builder-style object to manufacture [`TrafficMirrorFilter`](crate::model::TrafficMirrorFilter).
    pub fn builder() -> crate::model::traffic_mirror_filter::Builder {
        crate::model::traffic_mirror_filter::Builder::default()
    }
}

/// When writing a match expression against `TrafficMirrorNetworkService`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let trafficmirrornetworkservice = unimplemented!();
/// match trafficmirrornetworkservice {
///     TrafficMirrorNetworkService::AmazonDns => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `trafficmirrornetworkservice` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `TrafficMirrorNetworkService::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `TrafficMirrorNetworkService::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `TrafficMirrorNetworkService::NewFeature` is defined.
/// Specifically, when `trafficmirrornetworkservice` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `TrafficMirrorNetworkService::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 TrafficMirrorNetworkService {
    #[allow(missing_docs)] // documentation missing in model
    AmazonDns,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for TrafficMirrorNetworkService {
    fn from(s: &str) -> Self {
        match s {
            "amazon-dns" => TrafficMirrorNetworkService::AmazonDns,
            other => TrafficMirrorNetworkService::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for TrafficMirrorNetworkService {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(TrafficMirrorNetworkService::from(s))
    }
}
impl TrafficMirrorNetworkService {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            TrafficMirrorNetworkService::AmazonDns => "amazon-dns",
            TrafficMirrorNetworkService::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["amazon-dns"]
    }
}
impl AsRef<str> for TrafficMirrorNetworkService {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `TargetStorageTier`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let targetstoragetier = unimplemented!();
/// match targetstoragetier {
///     TargetStorageTier::Archive => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `targetstoragetier` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `TargetStorageTier::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `TargetStorageTier::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `TargetStorageTier::NewFeature` is defined.
/// Specifically, when `targetstoragetier` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `TargetStorageTier::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 TargetStorageTier {
    #[allow(missing_docs)] // documentation missing in model
    Archive,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for TargetStorageTier {
    fn from(s: &str) -> Self {
        match s {
            "archive" => TargetStorageTier::Archive,
            other => {
                TargetStorageTier::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for TargetStorageTier {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(TargetStorageTier::from(s))
    }
}
impl TargetStorageTier {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            TargetStorageTier::Archive => "archive",
            TargetStorageTier::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["archive"]
    }
}
impl AsRef<str> for TargetStorageTier {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `OperationType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let operationtype = unimplemented!();
/// match operationtype {
///     OperationType::Add => { /* ... */ },
///     OperationType::Remove => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `operationtype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `OperationType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `OperationType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `OperationType::NewFeature` is defined.
/// Specifically, when `operationtype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `OperationType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 OperationType {
    #[allow(missing_docs)] // documentation missing in model
    Add,
    #[allow(missing_docs)] // documentation missing in model
    Remove,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for OperationType {
    fn from(s: &str) -> Self {
        match s {
            "add" => OperationType::Add,
            "remove" => OperationType::Remove,
            other => OperationType::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for OperationType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(OperationType::from(s))
    }
}
impl OperationType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            OperationType::Add => "add",
            OperationType::Remove => "remove",
            OperationType::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["add", "remove"]
    }
}
impl AsRef<str> for OperationType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes modifications to the list of create volume permissions for a volume.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CreateVolumePermissionModifications {
    /// <p>Adds the specified Amazon Web Services account ID or group to the list.</p>
    #[doc(hidden)]
    pub add: std::option::Option<std::vec::Vec<crate::model::CreateVolumePermission>>,
    /// <p>Removes the specified Amazon Web Services account ID or group from the list.</p>
    #[doc(hidden)]
    pub remove: std::option::Option<std::vec::Vec<crate::model::CreateVolumePermission>>,
}
impl CreateVolumePermissionModifications {
    /// <p>Adds the specified Amazon Web Services account ID or group to the list.</p>
    pub fn add(&self) -> std::option::Option<&[crate::model::CreateVolumePermission]> {
        self.add.as_deref()
    }
    /// <p>Removes the specified Amazon Web Services account ID or group from the list.</p>
    pub fn remove(&self) -> std::option::Option<&[crate::model::CreateVolumePermission]> {
        self.remove.as_deref()
    }
}
/// See [`CreateVolumePermissionModifications`](crate::model::CreateVolumePermissionModifications).
pub mod create_volume_permission_modifications {

    /// A builder for [`CreateVolumePermissionModifications`](crate::model::CreateVolumePermissionModifications).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) add: std::option::Option<std::vec::Vec<crate::model::CreateVolumePermission>>,
        pub(crate) remove: std::option::Option<std::vec::Vec<crate::model::CreateVolumePermission>>,
    }
    impl Builder {
        /// Appends an item to `add`.
        ///
        /// To override the contents of this collection use [`set_add`](Self::set_add).
        ///
        /// <p>Adds the specified Amazon Web Services account ID or group to the list.</p>
        pub fn add(mut self, input: crate::model::CreateVolumePermission) -> Self {
            let mut v = self.add.unwrap_or_default();
            v.push(input);
            self.add = Some(v);
            self
        }
        /// <p>Adds the specified Amazon Web Services account ID or group to the list.</p>
        pub fn set_add(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::CreateVolumePermission>>,
        ) -> Self {
            self.add = input;
            self
        }
        /// Appends an item to `remove`.
        ///
        /// To override the contents of this collection use [`set_remove`](Self::set_remove).
        ///
        /// <p>Removes the specified Amazon Web Services account ID or group from the list.</p>
        pub fn remove(mut self, input: crate::model::CreateVolumePermission) -> Self {
            let mut v = self.remove.unwrap_or_default();
            v.push(input);
            self.remove = Some(v);
            self
        }
        /// <p>Removes the specified Amazon Web Services account ID or group from the list.</p>
        pub fn set_remove(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::CreateVolumePermission>>,
        ) -> Self {
            self.remove = input;
            self
        }
        /// Consumes the builder and constructs a [`CreateVolumePermissionModifications`](crate::model::CreateVolumePermissionModifications).
        pub fn build(self) -> crate::model::CreateVolumePermissionModifications {
            crate::model::CreateVolumePermissionModifications {
                add: self.add,
                remove: self.remove,
            }
        }
    }
}
impl CreateVolumePermissionModifications {
    /// Creates a new builder-style object to manufacture [`CreateVolumePermissionModifications`](crate::model::CreateVolumePermissionModifications).
    pub fn builder() -> crate::model::create_volume_permission_modifications::Builder {
        crate::model::create_volume_permission_modifications::Builder::default()
    }
}

/// <p>Describes the user or group to be added or removed from the list of create volume permissions for a volume.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CreateVolumePermission {
    /// <p>The group to be added or removed. The possible value is <code>all</code>.</p>
    #[doc(hidden)]
    pub group: std::option::Option<crate::model::PermissionGroup>,
    /// <p>The ID of the Amazon Web Services account to be added or removed.</p>
    #[doc(hidden)]
    pub user_id: std::option::Option<std::string::String>,
}
impl CreateVolumePermission {
    /// <p>The group to be added or removed. The possible value is <code>all</code>.</p>
    pub fn group(&self) -> std::option::Option<&crate::model::PermissionGroup> {
        self.group.as_ref()
    }
    /// <p>The ID of the Amazon Web Services account to be added or removed.</p>
    pub fn user_id(&self) -> std::option::Option<&str> {
        self.user_id.as_deref()
    }
}
/// See [`CreateVolumePermission`](crate::model::CreateVolumePermission).
pub mod create_volume_permission {

    /// A builder for [`CreateVolumePermission`](crate::model::CreateVolumePermission).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) group: std::option::Option<crate::model::PermissionGroup>,
        pub(crate) user_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The group to be added or removed. The possible value is <code>all</code>.</p>
        pub fn group(mut self, input: crate::model::PermissionGroup) -> Self {
            self.group = Some(input);
            self
        }
        /// <p>The group to be added or removed. The possible value is <code>all</code>.</p>
        pub fn set_group(
            mut self,
            input: std::option::Option<crate::model::PermissionGroup>,
        ) -> Self {
            self.group = input;
            self
        }
        /// <p>The ID of the Amazon Web Services account to be added or removed.</p>
        pub fn user_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.user_id = Some(input.into());
            self
        }
        /// <p>The ID of the Amazon Web Services account to be added or removed.</p>
        pub fn set_user_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.user_id = input;
            self
        }
        /// Consumes the builder and constructs a [`CreateVolumePermission`](crate::model::CreateVolumePermission).
        pub fn build(self) -> crate::model::CreateVolumePermission {
            crate::model::CreateVolumePermission {
                group: self.group,
                user_id: self.user_id,
            }
        }
    }
}
impl CreateVolumePermission {
    /// Creates a new builder-style object to manufacture [`CreateVolumePermission`](crate::model::CreateVolumePermission).
    pub fn builder() -> crate::model::create_volume_permission::Builder {
        crate::model::create_volume_permission::Builder::default()
    }
}

/// When writing a match expression against `PermissionGroup`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let permissiongroup = unimplemented!();
/// match permissiongroup {
///     PermissionGroup::All => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `permissiongroup` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `PermissionGroup::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `PermissionGroup::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `PermissionGroup::NewFeature` is defined.
/// Specifically, when `permissiongroup` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `PermissionGroup::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 PermissionGroup {
    #[allow(missing_docs)] // documentation missing in model
    All,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for PermissionGroup {
    fn from(s: &str) -> Self {
        match s {
            "all" => PermissionGroup::All,
            other => PermissionGroup::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for PermissionGroup {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(PermissionGroup::from(s))
    }
}
impl PermissionGroup {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            PermissionGroup::All => "all",
            PermissionGroup::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["all"]
    }
}
impl AsRef<str> for PermissionGroup {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes an update to a security group rule.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SecurityGroupRuleUpdate {
    /// <p>The ID of the security group rule.</p>
    #[doc(hidden)]
    pub security_group_rule_id: std::option::Option<std::string::String>,
    /// <p>Information about the security group rule.</p>
    #[doc(hidden)]
    pub security_group_rule: std::option::Option<crate::model::SecurityGroupRuleRequest>,
}
impl SecurityGroupRuleUpdate {
    /// <p>The ID of the security group rule.</p>
    pub fn security_group_rule_id(&self) -> std::option::Option<&str> {
        self.security_group_rule_id.as_deref()
    }
    /// <p>Information about the security group rule.</p>
    pub fn security_group_rule(
        &self,
    ) -> std::option::Option<&crate::model::SecurityGroupRuleRequest> {
        self.security_group_rule.as_ref()
    }
}
/// See [`SecurityGroupRuleUpdate`](crate::model::SecurityGroupRuleUpdate).
pub mod security_group_rule_update {

    /// A builder for [`SecurityGroupRuleUpdate`](crate::model::SecurityGroupRuleUpdate).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) security_group_rule_id: std::option::Option<std::string::String>,
        pub(crate) security_group_rule: std::option::Option<crate::model::SecurityGroupRuleRequest>,
    }
    impl Builder {
        /// <p>The ID of the security group rule.</p>
        pub fn security_group_rule_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.security_group_rule_id = Some(input.into());
            self
        }
        /// <p>The ID of the security group rule.</p>
        pub fn set_security_group_rule_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.security_group_rule_id = input;
            self
        }
        /// <p>Information about the security group rule.</p>
        pub fn security_group_rule(
            mut self,
            input: crate::model::SecurityGroupRuleRequest,
        ) -> Self {
            self.security_group_rule = Some(input);
            self
        }
        /// <p>Information about the security group rule.</p>
        pub fn set_security_group_rule(
            mut self,
            input: std::option::Option<crate::model::SecurityGroupRuleRequest>,
        ) -> Self {
            self.security_group_rule = input;
            self
        }
        /// Consumes the builder and constructs a [`SecurityGroupRuleUpdate`](crate::model::SecurityGroupRuleUpdate).
        pub fn build(self) -> crate::model::SecurityGroupRuleUpdate {
            crate::model::SecurityGroupRuleUpdate {
                security_group_rule_id: self.security_group_rule_id,
                security_group_rule: self.security_group_rule,
            }
        }
    }
}
impl SecurityGroupRuleUpdate {
    /// Creates a new builder-style object to manufacture [`SecurityGroupRuleUpdate`](crate::model::SecurityGroupRuleUpdate).
    pub fn builder() -> crate::model::security_group_rule_update::Builder {
        crate::model::security_group_rule_update::Builder::default()
    }
}

/// <p>Describes a security group rule.</p>
/// <p>You must specify exactly one of the following parameters, based on the rule type:</p>
/// <ul>
/// <li> <p>CidrIpv4</p> </li>
/// <li> <p>CidrIpv6</p> </li>
/// <li> <p>PrefixListId</p> </li>
/// <li> <p>ReferencedGroupId</p> </li>
/// </ul>
/// <p>When you modify a rule, you cannot change the rule type. For example, if the rule uses an IPv4 address range, you must use <code>CidrIpv4</code> to specify a new IPv4 address range.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SecurityGroupRuleRequest {
    /// <p>The IP protocol name (<code>tcp</code>, <code>udp</code>, <code>icmp</code>, <code>icmpv6</code>) or number (see <a href="http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml">Protocol Numbers</a>). </p>
    /// <p>Use <code>-1</code> to specify all protocols.</p>
    #[doc(hidden)]
    pub ip_protocol: std::option::Option<std::string::String>,
    /// <p>If the protocol is TCP or UDP, this is the start of the port range. If the protocol is ICMP or ICMPv6, this is the type number. A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all ICMP/ICMPv6 codes.</p>
    #[doc(hidden)]
    pub from_port: std::option::Option<i32>,
    /// <p>If the protocol is TCP or UDP, this is the end of the port range. If the protocol is ICMP or ICMPv6, this is the code. A value of -1 indicates all ICMP/ICMPv6 codes. If you specify all ICMP/ICMPv6 types, you must specify all ICMP/ICMPv6 codes.</p>
    #[doc(hidden)]
    pub to_port: std::option::Option<i32>,
    /// <p>The IPv4 CIDR range. To specify a single IPv4 address, use the /32 prefix length. </p>
    #[doc(hidden)]
    pub cidr_ipv4: std::option::Option<std::string::String>,
    /// <p>The IPv6 CIDR range. To specify a single IPv6 address, use the /128 prefix length.</p>
    #[doc(hidden)]
    pub cidr_ipv6: std::option::Option<std::string::String>,
    /// <p>The ID of the prefix list.</p>
    #[doc(hidden)]
    pub prefix_list_id: std::option::Option<std::string::String>,
    /// <p>The ID of the security group that is referenced in the security group rule.</p>
    #[doc(hidden)]
    pub referenced_group_id: std::option::Option<std::string::String>,
    /// <p>The description of the security group rule.</p>
    #[doc(hidden)]
    pub description: std::option::Option<std::string::String>,
}
impl SecurityGroupRuleRequest {
    /// <p>The IP protocol name (<code>tcp</code>, <code>udp</code>, <code>icmp</code>, <code>icmpv6</code>) or number (see <a href="http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml">Protocol Numbers</a>). </p>
    /// <p>Use <code>-1</code> to specify all protocols.</p>
    pub fn ip_protocol(&self) -> std::option::Option<&str> {
        self.ip_protocol.as_deref()
    }
    /// <p>If the protocol is TCP or UDP, this is the start of the port range. If the protocol is ICMP or ICMPv6, this is the type number. A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all ICMP/ICMPv6 codes.</p>
    pub fn from_port(&self) -> std::option::Option<i32> {
        self.from_port
    }
    /// <p>If the protocol is TCP or UDP, this is the end of the port range. If the protocol is ICMP or ICMPv6, this is the code. A value of -1 indicates all ICMP/ICMPv6 codes. If you specify all ICMP/ICMPv6 types, you must specify all ICMP/ICMPv6 codes.</p>
    pub fn to_port(&self) -> std::option::Option<i32> {
        self.to_port
    }
    /// <p>The IPv4 CIDR range. To specify a single IPv4 address, use the /32 prefix length. </p>
    pub fn cidr_ipv4(&self) -> std::option::Option<&str> {
        self.cidr_ipv4.as_deref()
    }
    /// <p>The IPv6 CIDR range. To specify a single IPv6 address, use the /128 prefix length.</p>
    pub fn cidr_ipv6(&self) -> std::option::Option<&str> {
        self.cidr_ipv6.as_deref()
    }
    /// <p>The ID of the prefix list.</p>
    pub fn prefix_list_id(&self) -> std::option::Option<&str> {
        self.prefix_list_id.as_deref()
    }
    /// <p>The ID of the security group that is referenced in the security group rule.</p>
    pub fn referenced_group_id(&self) -> std::option::Option<&str> {
        self.referenced_group_id.as_deref()
    }
    /// <p>The description of the security group rule.</p>
    pub fn description(&self) -> std::option::Option<&str> {
        self.description.as_deref()
    }
}
/// See [`SecurityGroupRuleRequest`](crate::model::SecurityGroupRuleRequest).
pub mod security_group_rule_request {

    /// A builder for [`SecurityGroupRuleRequest`](crate::model::SecurityGroupRuleRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) ip_protocol: std::option::Option<std::string::String>,
        pub(crate) from_port: std::option::Option<i32>,
        pub(crate) to_port: std::option::Option<i32>,
        pub(crate) cidr_ipv4: std::option::Option<std::string::String>,
        pub(crate) cidr_ipv6: std::option::Option<std::string::String>,
        pub(crate) prefix_list_id: std::option::Option<std::string::String>,
        pub(crate) referenced_group_id: std::option::Option<std::string::String>,
        pub(crate) description: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The IP protocol name (<code>tcp</code>, <code>udp</code>, <code>icmp</code>, <code>icmpv6</code>) or number (see <a href="http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml">Protocol Numbers</a>). </p>
        /// <p>Use <code>-1</code> to specify all protocols.</p>
        pub fn ip_protocol(mut self, input: impl Into<std::string::String>) -> Self {
            self.ip_protocol = Some(input.into());
            self
        }
        /// <p>The IP protocol name (<code>tcp</code>, <code>udp</code>, <code>icmp</code>, <code>icmpv6</code>) or number (see <a href="http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml">Protocol Numbers</a>). </p>
        /// <p>Use <code>-1</code> to specify all protocols.</p>
        pub fn set_ip_protocol(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.ip_protocol = input;
            self
        }
        /// <p>If the protocol is TCP or UDP, this is the start of the port range. If the protocol is ICMP or ICMPv6, this is the type number. A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all ICMP/ICMPv6 codes.</p>
        pub fn from_port(mut self, input: i32) -> Self {
            self.from_port = Some(input);
            self
        }
        /// <p>If the protocol is TCP or UDP, this is the start of the port range. If the protocol is ICMP or ICMPv6, this is the type number. A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all ICMP/ICMPv6 codes.</p>
        pub fn set_from_port(mut self, input: std::option::Option<i32>) -> Self {
            self.from_port = input;
            self
        }
        /// <p>If the protocol is TCP or UDP, this is the end of the port range. If the protocol is ICMP or ICMPv6, this is the code. A value of -1 indicates all ICMP/ICMPv6 codes. If you specify all ICMP/ICMPv6 types, you must specify all ICMP/ICMPv6 codes.</p>
        pub fn to_port(mut self, input: i32) -> Self {
            self.to_port = Some(input);
            self
        }
        /// <p>If the protocol is TCP or UDP, this is the end of the port range. If the protocol is ICMP or ICMPv6, this is the code. A value of -1 indicates all ICMP/ICMPv6 codes. If you specify all ICMP/ICMPv6 types, you must specify all ICMP/ICMPv6 codes.</p>
        pub fn set_to_port(mut self, input: std::option::Option<i32>) -> Self {
            self.to_port = input;
            self
        }
        /// <p>The IPv4 CIDR range. To specify a single IPv4 address, use the /32 prefix length. </p>
        pub fn cidr_ipv4(mut self, input: impl Into<std::string::String>) -> Self {
            self.cidr_ipv4 = Some(input.into());
            self
        }
        /// <p>The IPv4 CIDR range. To specify a single IPv4 address, use the /32 prefix length. </p>
        pub fn set_cidr_ipv4(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.cidr_ipv4 = input;
            self
        }
        /// <p>The IPv6 CIDR range. To specify a single IPv6 address, use the /128 prefix length.</p>
        pub fn cidr_ipv6(mut self, input: impl Into<std::string::String>) -> Self {
            self.cidr_ipv6 = Some(input.into());
            self
        }
        /// <p>The IPv6 CIDR range. To specify a single IPv6 address, use the /128 prefix length.</p>
        pub fn set_cidr_ipv6(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.cidr_ipv6 = input;
            self
        }
        /// <p>The ID of the prefix list.</p>
        pub fn prefix_list_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.prefix_list_id = Some(input.into());
            self
        }
        /// <p>The ID of the prefix list.</p>
        pub fn set_prefix_list_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.prefix_list_id = input;
            self
        }
        /// <p>The ID of the security group that is referenced in the security group rule.</p>
        pub fn referenced_group_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.referenced_group_id = Some(input.into());
            self
        }
        /// <p>The ID of the security group that is referenced in the security group rule.</p>
        pub fn set_referenced_group_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.referenced_group_id = input;
            self
        }
        /// <p>The description of the security group rule.</p>
        pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
            self.description = Some(input.into());
            self
        }
        /// <p>The description of the security group rule.</p>
        pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.description = input;
            self
        }
        /// Consumes the builder and constructs a [`SecurityGroupRuleRequest`](crate::model::SecurityGroupRuleRequest).
        pub fn build(self) -> crate::model::SecurityGroupRuleRequest {
            crate::model::SecurityGroupRuleRequest {
                ip_protocol: self.ip_protocol,
                from_port: self.from_port,
                to_port: self.to_port,
                cidr_ipv4: self.cidr_ipv4,
                cidr_ipv6: self.cidr_ipv6,
                prefix_list_id: self.prefix_list_id,
                referenced_group_id: self.referenced_group_id,
                description: self.description,
            }
        }
    }
}
impl SecurityGroupRuleRequest {
    /// Creates a new builder-style object to manufacture [`SecurityGroupRuleRequest`](crate::model::SecurityGroupRuleRequest).
    pub fn builder() -> crate::model::security_group_rule_request::Builder {
        crate::model::security_group_rule_request::Builder::default()
    }
}

/// <p>Describes the configuration settings for the modified Reserved Instances.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ReservedInstancesConfiguration {
    /// <p>The Availability Zone for the modified Reserved Instances.</p>
    #[doc(hidden)]
    pub availability_zone: std::option::Option<std::string::String>,
    /// <p>The number of modified Reserved Instances.</p> <note>
    /// <p>This is a required field for a request.</p>
    /// </note>
    #[doc(hidden)]
    pub instance_count: std::option::Option<i32>,
    /// <p>The instance type for the modified Reserved Instances.</p>
    #[doc(hidden)]
    pub instance_type: std::option::Option<crate::model::InstanceType>,
    /// <p>The network platform of the modified Reserved Instances, which is either EC2-Classic or EC2-VPC.</p>
    #[doc(hidden)]
    pub platform: std::option::Option<std::string::String>,
    /// <p>Whether the Reserved Instance is applied to instances in a Region or instances in a specific Availability Zone.</p>
    #[doc(hidden)]
    pub scope: std::option::Option<crate::model::Scope>,
}
impl ReservedInstancesConfiguration {
    /// <p>The Availability Zone for the modified Reserved Instances.</p>
    pub fn availability_zone(&self) -> std::option::Option<&str> {
        self.availability_zone.as_deref()
    }
    /// <p>The number of modified Reserved Instances.</p> <note>
    /// <p>This is a required field for a request.</p>
    /// </note>
    pub fn instance_count(&self) -> std::option::Option<i32> {
        self.instance_count
    }
    /// <p>The instance type for the modified Reserved Instances.</p>
    pub fn instance_type(&self) -> std::option::Option<&crate::model::InstanceType> {
        self.instance_type.as_ref()
    }
    /// <p>The network platform of the modified Reserved Instances, which is either EC2-Classic or EC2-VPC.</p>
    pub fn platform(&self) -> std::option::Option<&str> {
        self.platform.as_deref()
    }
    /// <p>Whether the Reserved Instance is applied to instances in a Region or instances in a specific Availability Zone.</p>
    pub fn scope(&self) -> std::option::Option<&crate::model::Scope> {
        self.scope.as_ref()
    }
}
/// See [`ReservedInstancesConfiguration`](crate::model::ReservedInstancesConfiguration).
pub mod reserved_instances_configuration {

    /// A builder for [`ReservedInstancesConfiguration`](crate::model::ReservedInstancesConfiguration).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) availability_zone: std::option::Option<std::string::String>,
        pub(crate) instance_count: std::option::Option<i32>,
        pub(crate) instance_type: std::option::Option<crate::model::InstanceType>,
        pub(crate) platform: std::option::Option<std::string::String>,
        pub(crate) scope: std::option::Option<crate::model::Scope>,
    }
    impl Builder {
        /// <p>The Availability Zone for the modified Reserved Instances.</p>
        pub fn availability_zone(mut self, input: impl Into<std::string::String>) -> Self {
            self.availability_zone = Some(input.into());
            self
        }
        /// <p>The Availability Zone for the modified Reserved Instances.</p>
        pub fn set_availability_zone(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.availability_zone = input;
            self
        }
        /// <p>The number of modified Reserved Instances.</p> <note>
        /// <p>This is a required field for a request.</p>
        /// </note>
        pub fn instance_count(mut self, input: i32) -> Self {
            self.instance_count = Some(input);
            self
        }
        /// <p>The number of modified Reserved Instances.</p> <note>
        /// <p>This is a required field for a request.</p>
        /// </note>
        pub fn set_instance_count(mut self, input: std::option::Option<i32>) -> Self {
            self.instance_count = input;
            self
        }
        /// <p>The instance type for the modified Reserved Instances.</p>
        pub fn instance_type(mut self, input: crate::model::InstanceType) -> Self {
            self.instance_type = Some(input);
            self
        }
        /// <p>The instance type for the modified Reserved Instances.</p>
        pub fn set_instance_type(
            mut self,
            input: std::option::Option<crate::model::InstanceType>,
        ) -> Self {
            self.instance_type = input;
            self
        }
        /// <p>The network platform of the modified Reserved Instances, which is either EC2-Classic or EC2-VPC.</p>
        pub fn platform(mut self, input: impl Into<std::string::String>) -> Self {
            self.platform = Some(input.into());
            self
        }
        /// <p>The network platform of the modified Reserved Instances, which is either EC2-Classic or EC2-VPC.</p>
        pub fn set_platform(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.platform = input;
            self
        }
        /// <p>Whether the Reserved Instance is applied to instances in a Region or instances in a specific Availability Zone.</p>
        pub fn scope(mut self, input: crate::model::Scope) -> Self {
            self.scope = Some(input);
            self
        }
        /// <p>Whether the Reserved Instance is applied to instances in a Region or instances in a specific Availability Zone.</p>
        pub fn set_scope(mut self, input: std::option::Option<crate::model::Scope>) -> Self {
            self.scope = input;
            self
        }
        /// Consumes the builder and constructs a [`ReservedInstancesConfiguration`](crate::model::ReservedInstancesConfiguration).
        pub fn build(self) -> crate::model::ReservedInstancesConfiguration {
            crate::model::ReservedInstancesConfiguration {
                availability_zone: self.availability_zone,
                instance_count: self.instance_count,
                instance_type: self.instance_type,
                platform: self.platform,
                scope: self.scope,
            }
        }
    }
}
impl ReservedInstancesConfiguration {
    /// Creates a new builder-style object to manufacture [`ReservedInstancesConfiguration`](crate::model::ReservedInstancesConfiguration).
    pub fn builder() -> crate::model::reserved_instances_configuration::Builder {
        crate::model::reserved_instances_configuration::Builder::default()
    }
}

/// When writing a match expression against `Scope`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let scope = unimplemented!();
/// match scope {
///     Scope::AvailabilityZone => { /* ... */ },
///     Scope::Regional => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `scope` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `Scope::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `Scope::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `Scope::NewFeature` is defined.
/// Specifically, when `scope` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `Scope::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 Scope {
    #[allow(missing_docs)] // documentation missing in model
    AvailabilityZone,
    #[allow(missing_docs)] // documentation missing in model
    Regional,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for Scope {
    fn from(s: &str) -> Self {
        match s {
            "Availability Zone" => Scope::AvailabilityZone,
            "Region" => Scope::Regional,
            other => Scope::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for Scope {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(Scope::from(s))
    }
}
impl Scope {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            Scope::AvailabilityZone => "Availability Zone",
            Scope::Regional => "Region",
            Scope::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["Availability Zone", "Region"]
    }
}
impl AsRef<str> for Scope {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>ENA Express uses Amazon Web Services Scalable Reliable Datagram (SRD) technology to increase the maximum bandwidth used per stream and minimize tail latency of network traffic between EC2 instances. With ENA Express, you can communicate between two EC2 instances in the same subnet within the same account, or in different accounts. Both sending and receiving instances must have ENA Express enabled.</p>
/// <p>To improve the reliability of network packet delivery, ENA Express reorders network packets on the receiving end by default. However, some UDP-based applications are designed to handle network packets that are out of order to reduce the overhead for packet delivery at the network layer. When ENA Express is enabled, you can specify whether UDP network traffic uses it.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct EnaSrdSpecification {
    /// <p>Indicates whether ENA Express is enabled for the network interface.</p>
    #[doc(hidden)]
    pub ena_srd_enabled: std::option::Option<bool>,
    /// <p>Configures ENA Express for UDP network traffic.</p>
    #[doc(hidden)]
    pub ena_srd_udp_specification: std::option::Option<crate::model::EnaSrdUdpSpecification>,
}
impl EnaSrdSpecification {
    /// <p>Indicates whether ENA Express is enabled for the network interface.</p>
    pub fn ena_srd_enabled(&self) -> std::option::Option<bool> {
        self.ena_srd_enabled
    }
    /// <p>Configures ENA Express for UDP network traffic.</p>
    pub fn ena_srd_udp_specification(
        &self,
    ) -> std::option::Option<&crate::model::EnaSrdUdpSpecification> {
        self.ena_srd_udp_specification.as_ref()
    }
}
/// See [`EnaSrdSpecification`](crate::model::EnaSrdSpecification).
pub mod ena_srd_specification {

    /// A builder for [`EnaSrdSpecification`](crate::model::EnaSrdSpecification).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) ena_srd_enabled: std::option::Option<bool>,
        pub(crate) ena_srd_udp_specification:
            std::option::Option<crate::model::EnaSrdUdpSpecification>,
    }
    impl Builder {
        /// <p>Indicates whether ENA Express is enabled for the network interface.</p>
        pub fn ena_srd_enabled(mut self, input: bool) -> Self {
            self.ena_srd_enabled = Some(input);
            self
        }
        /// <p>Indicates whether ENA Express is enabled for the network interface.</p>
        pub fn set_ena_srd_enabled(mut self, input: std::option::Option<bool>) -> Self {
            self.ena_srd_enabled = input;
            self
        }
        /// <p>Configures ENA Express for UDP network traffic.</p>
        pub fn ena_srd_udp_specification(
            mut self,
            input: crate::model::EnaSrdUdpSpecification,
        ) -> Self {
            self.ena_srd_udp_specification = Some(input);
            self
        }
        /// <p>Configures ENA Express for UDP network traffic.</p>
        pub fn set_ena_srd_udp_specification(
            mut self,
            input: std::option::Option<crate::model::EnaSrdUdpSpecification>,
        ) -> Self {
            self.ena_srd_udp_specification = input;
            self
        }
        /// Consumes the builder and constructs a [`EnaSrdSpecification`](crate::model::EnaSrdSpecification).
        pub fn build(self) -> crate::model::EnaSrdSpecification {
            crate::model::EnaSrdSpecification {
                ena_srd_enabled: self.ena_srd_enabled,
                ena_srd_udp_specification: self.ena_srd_udp_specification,
            }
        }
    }
}
impl EnaSrdSpecification {
    /// Creates a new builder-style object to manufacture [`EnaSrdSpecification`](crate::model::EnaSrdSpecification).
    pub fn builder() -> crate::model::ena_srd_specification::Builder {
        crate::model::ena_srd_specification::Builder::default()
    }
}

/// <p>ENA Express is compatible with both TCP and UDP transport protocols. When it’s enabled, TCP traffic automatically uses it. However, some UDP-based applications are designed to handle network packets that are out of order, without a need for retransmission, such as live video broadcasting or other near-real-time applications. For UDP traffic, you can specify whether to use ENA Express, based on your application environment needs.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct EnaSrdUdpSpecification {
    /// <p>Indicates whether UDP traffic uses ENA Express. To specify this setting, you must first enable ENA Express.</p>
    #[doc(hidden)]
    pub ena_srd_udp_enabled: std::option::Option<bool>,
}
impl EnaSrdUdpSpecification {
    /// <p>Indicates whether UDP traffic uses ENA Express. To specify this setting, you must first enable ENA Express.</p>
    pub fn ena_srd_udp_enabled(&self) -> std::option::Option<bool> {
        self.ena_srd_udp_enabled
    }
}
/// See [`EnaSrdUdpSpecification`](crate::model::EnaSrdUdpSpecification).
pub mod ena_srd_udp_specification {

    /// A builder for [`EnaSrdUdpSpecification`](crate::model::EnaSrdUdpSpecification).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) ena_srd_udp_enabled: std::option::Option<bool>,
    }
    impl Builder {
        /// <p>Indicates whether UDP traffic uses ENA Express. To specify this setting, you must first enable ENA Express.</p>
        pub fn ena_srd_udp_enabled(mut self, input: bool) -> Self {
            self.ena_srd_udp_enabled = Some(input);
            self
        }
        /// <p>Indicates whether UDP traffic uses ENA Express. To specify this setting, you must first enable ENA Express.</p>
        pub fn set_ena_srd_udp_enabled(mut self, input: std::option::Option<bool>) -> Self {
            self.ena_srd_udp_enabled = input;
            self
        }
        /// Consumes the builder and constructs a [`EnaSrdUdpSpecification`](crate::model::EnaSrdUdpSpecification).
        pub fn build(self) -> crate::model::EnaSrdUdpSpecification {
            crate::model::EnaSrdUdpSpecification {
                ena_srd_udp_enabled: self.ena_srd_udp_enabled,
            }
        }
    }
}
impl EnaSrdUdpSpecification {
    /// Creates a new builder-style object to manufacture [`EnaSrdUdpSpecification`](crate::model::EnaSrdUdpSpecification).
    pub fn builder() -> crate::model::ena_srd_udp_specification::Builder {
        crate::model::ena_srd_udp_specification::Builder::default()
    }
}

/// <p>Describes a value for a resource attribute that is a String.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AttributeValue {
    /// <p>The attribute value. The value is case-sensitive.</p>
    #[doc(hidden)]
    pub value: std::option::Option<std::string::String>,
}
impl AttributeValue {
    /// <p>The attribute value. The value is case-sensitive.</p>
    pub fn value(&self) -> std::option::Option<&str> {
        self.value.as_deref()
    }
}
/// See [`AttributeValue`](crate::model::AttributeValue).
pub mod attribute_value {

    /// A builder for [`AttributeValue`](crate::model::AttributeValue).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) value: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The attribute value. The value is case-sensitive.</p>
        pub fn value(mut self, input: impl Into<std::string::String>) -> Self {
            self.value = Some(input.into());
            self
        }
        /// <p>The attribute value. The value is case-sensitive.</p>
        pub fn set_value(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.value = input;
            self
        }
        /// Consumes the builder and constructs a [`AttributeValue`](crate::model::AttributeValue).
        pub fn build(self) -> crate::model::AttributeValue {
            crate::model::AttributeValue { value: self.value }
        }
    }
}
impl AttributeValue {
    /// Creates a new builder-style object to manufacture [`AttributeValue`](crate::model::AttributeValue).
    pub fn builder() -> crate::model::attribute_value::Builder {
        crate::model::attribute_value::Builder::default()
    }
}

/// <p>Describes an attachment change.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct NetworkInterfaceAttachmentChanges {
    /// <p>The ID of the network interface attachment.</p>
    #[doc(hidden)]
    pub attachment_id: std::option::Option<std::string::String>,
    /// <p>Indicates whether the network interface is deleted when the instance is terminated.</p>
    #[doc(hidden)]
    pub delete_on_termination: std::option::Option<bool>,
}
impl NetworkInterfaceAttachmentChanges {
    /// <p>The ID of the network interface attachment.</p>
    pub fn attachment_id(&self) -> std::option::Option<&str> {
        self.attachment_id.as_deref()
    }
    /// <p>Indicates whether the network interface is deleted when the instance is terminated.</p>
    pub fn delete_on_termination(&self) -> std::option::Option<bool> {
        self.delete_on_termination
    }
}
/// See [`NetworkInterfaceAttachmentChanges`](crate::model::NetworkInterfaceAttachmentChanges).
pub mod network_interface_attachment_changes {

    /// A builder for [`NetworkInterfaceAttachmentChanges`](crate::model::NetworkInterfaceAttachmentChanges).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) attachment_id: std::option::Option<std::string::String>,
        pub(crate) delete_on_termination: std::option::Option<bool>,
    }
    impl Builder {
        /// <p>The ID of the network interface attachment.</p>
        pub fn attachment_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.attachment_id = Some(input.into());
            self
        }
        /// <p>The ID of the network interface attachment.</p>
        pub fn set_attachment_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.attachment_id = input;
            self
        }
        /// <p>Indicates whether the network interface is deleted when the instance is terminated.</p>
        pub fn delete_on_termination(mut self, input: bool) -> Self {
            self.delete_on_termination = Some(input);
            self
        }
        /// <p>Indicates whether the network interface is deleted when the instance is terminated.</p>
        pub fn set_delete_on_termination(mut self, input: std::option::Option<bool>) -> Self {
            self.delete_on_termination = input;
            self
        }
        /// Consumes the builder and constructs a [`NetworkInterfaceAttachmentChanges`](crate::model::NetworkInterfaceAttachmentChanges).
        pub fn build(self) -> crate::model::NetworkInterfaceAttachmentChanges {
            crate::model::NetworkInterfaceAttachmentChanges {
                attachment_id: self.attachment_id,
                delete_on_termination: self.delete_on_termination,
            }
        }
    }
}
impl NetworkInterfaceAttachmentChanges {
    /// Creates a new builder-style object to manufacture [`NetworkInterfaceAttachmentChanges`](crate::model::NetworkInterfaceAttachmentChanges).
    pub fn builder() -> crate::model::network_interface_attachment_changes::Builder {
        crate::model::network_interface_attachment_changes::Builder::default()
    }
}

/// <p>An entry for a prefix list.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct RemovePrefixListEntry {
    /// <p>The CIDR block.</p>
    #[doc(hidden)]
    pub cidr: std::option::Option<std::string::String>,
}
impl RemovePrefixListEntry {
    /// <p>The CIDR block.</p>
    pub fn cidr(&self) -> std::option::Option<&str> {
        self.cidr.as_deref()
    }
}
/// See [`RemovePrefixListEntry`](crate::model::RemovePrefixListEntry).
pub mod remove_prefix_list_entry {

    /// A builder for [`RemovePrefixListEntry`](crate::model::RemovePrefixListEntry).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) cidr: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The CIDR block.</p>
        pub fn cidr(mut self, input: impl Into<std::string::String>) -> Self {
            self.cidr = Some(input.into());
            self
        }
        /// <p>The CIDR block.</p>
        pub fn set_cidr(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.cidr = input;
            self
        }
        /// Consumes the builder and constructs a [`RemovePrefixListEntry`](crate::model::RemovePrefixListEntry).
        pub fn build(self) -> crate::model::RemovePrefixListEntry {
            crate::model::RemovePrefixListEntry { cidr: self.cidr }
        }
    }
}
impl RemovePrefixListEntry {
    /// Creates a new builder-style object to manufacture [`RemovePrefixListEntry`](crate::model::RemovePrefixListEntry).
    pub fn builder() -> crate::model::remove_prefix_list_entry::Builder {
        crate::model::remove_prefix_list_entry::Builder::default()
    }
}

/// <p>An entry for a prefix list.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AddPrefixListEntry {
    /// <p>The CIDR block.</p>
    #[doc(hidden)]
    pub cidr: std::option::Option<std::string::String>,
    /// <p>A description for the entry.</p>
    /// <p>Constraints: Up to 255 characters in length.</p>
    #[doc(hidden)]
    pub description: std::option::Option<std::string::String>,
}
impl AddPrefixListEntry {
    /// <p>The CIDR block.</p>
    pub fn cidr(&self) -> std::option::Option<&str> {
        self.cidr.as_deref()
    }
    /// <p>A description for the entry.</p>
    /// <p>Constraints: Up to 255 characters in length.</p>
    pub fn description(&self) -> std::option::Option<&str> {
        self.description.as_deref()
    }
}
/// See [`AddPrefixListEntry`](crate::model::AddPrefixListEntry).
pub mod add_prefix_list_entry {

    /// A builder for [`AddPrefixListEntry`](crate::model::AddPrefixListEntry).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) cidr: std::option::Option<std::string::String>,
        pub(crate) description: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The CIDR block.</p>
        pub fn cidr(mut self, input: impl Into<std::string::String>) -> Self {
            self.cidr = Some(input.into());
            self
        }
        /// <p>The CIDR block.</p>
        pub fn set_cidr(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.cidr = input;
            self
        }
        /// <p>A description for the entry.</p>
        /// <p>Constraints: Up to 255 characters in length.</p>
        pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
            self.description = Some(input.into());
            self
        }
        /// <p>A description for the entry.</p>
        /// <p>Constraints: Up to 255 characters in length.</p>
        pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.description = input;
            self
        }
        /// Consumes the builder and constructs a [`AddPrefixListEntry`](crate::model::AddPrefixListEntry).
        pub fn build(self) -> crate::model::AddPrefixListEntry {
            crate::model::AddPrefixListEntry {
                cidr: self.cidr,
                description: self.description,
            }
        }
    }
}
impl AddPrefixListEntry {
    /// Creates a new builder-style object to manufacture [`AddPrefixListEntry`](crate::model::AddPrefixListEntry).
    pub fn builder() -> crate::model::add_prefix_list_entry::Builder {
        crate::model::add_prefix_list_entry::Builder::default()
    }
}

/// <p>Describes a launch template.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LaunchTemplate {
    /// <p>The ID of the launch template.</p>
    #[doc(hidden)]
    pub launch_template_id: std::option::Option<std::string::String>,
    /// <p>The name of the launch template.</p>
    #[doc(hidden)]
    pub launch_template_name: std::option::Option<std::string::String>,
    /// <p>The time launch template was created.</p>
    #[doc(hidden)]
    pub create_time: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The principal that created the launch template. </p>
    #[doc(hidden)]
    pub created_by: std::option::Option<std::string::String>,
    /// <p>The version number of the default version of the launch template.</p>
    #[doc(hidden)]
    pub default_version_number: std::option::Option<i64>,
    /// <p>The version number of the latest version of the launch template.</p>
    #[doc(hidden)]
    pub latest_version_number: std::option::Option<i64>,
    /// <p>The tags for the launch template.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl LaunchTemplate {
    /// <p>The ID of the launch template.</p>
    pub fn launch_template_id(&self) -> std::option::Option<&str> {
        self.launch_template_id.as_deref()
    }
    /// <p>The name of the launch template.</p>
    pub fn launch_template_name(&self) -> std::option::Option<&str> {
        self.launch_template_name.as_deref()
    }
    /// <p>The time launch template was created.</p>
    pub fn create_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.create_time.as_ref()
    }
    /// <p>The principal that created the launch template. </p>
    pub fn created_by(&self) -> std::option::Option<&str> {
        self.created_by.as_deref()
    }
    /// <p>The version number of the default version of the launch template.</p>
    pub fn default_version_number(&self) -> std::option::Option<i64> {
        self.default_version_number
    }
    /// <p>The version number of the latest version of the launch template.</p>
    pub fn latest_version_number(&self) -> std::option::Option<i64> {
        self.latest_version_number
    }
    /// <p>The tags for the launch template.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
}
/// See [`LaunchTemplate`](crate::model::LaunchTemplate).
pub mod launch_template {

    /// A builder for [`LaunchTemplate`](crate::model::LaunchTemplate).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) launch_template_id: std::option::Option<std::string::String>,
        pub(crate) launch_template_name: std::option::Option<std::string::String>,
        pub(crate) create_time: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) created_by: std::option::Option<std::string::String>,
        pub(crate) default_version_number: std::option::Option<i64>,
        pub(crate) latest_version_number: std::option::Option<i64>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    }
    impl Builder {
        /// <p>The ID of the launch template.</p>
        pub fn launch_template_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.launch_template_id = Some(input.into());
            self
        }
        /// <p>The ID of the launch template.</p>
        pub fn set_launch_template_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.launch_template_id = input;
            self
        }
        /// <p>The name of the launch template.</p>
        pub fn launch_template_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.launch_template_name = Some(input.into());
            self
        }
        /// <p>The name of the launch template.</p>
        pub fn set_launch_template_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.launch_template_name = input;
            self
        }
        /// <p>The time launch template was created.</p>
        pub fn create_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.create_time = Some(input);
            self
        }
        /// <p>The time launch template was created.</p>
        pub fn set_create_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.create_time = input;
            self
        }
        /// <p>The principal that created the launch template. </p>
        pub fn created_by(mut self, input: impl Into<std::string::String>) -> Self {
            self.created_by = Some(input.into());
            self
        }
        /// <p>The principal that created the launch template. </p>
        pub fn set_created_by(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.created_by = input;
            self
        }
        /// <p>The version number of the default version of the launch template.</p>
        pub fn default_version_number(mut self, input: i64) -> Self {
            self.default_version_number = Some(input);
            self
        }
        /// <p>The version number of the default version of the launch template.</p>
        pub fn set_default_version_number(mut self, input: std::option::Option<i64>) -> Self {
            self.default_version_number = input;
            self
        }
        /// <p>The version number of the latest version of the launch template.</p>
        pub fn latest_version_number(mut self, input: i64) -> Self {
            self.latest_version_number = Some(input);
            self
        }
        /// <p>The version number of the latest version of the launch template.</p>
        pub fn set_latest_version_number(mut self, input: std::option::Option<i64>) -> Self {
            self.latest_version_number = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>The tags for the launch template.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>The tags for the launch template.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// Consumes the builder and constructs a [`LaunchTemplate`](crate::model::LaunchTemplate).
        pub fn build(self) -> crate::model::LaunchTemplate {
            crate::model::LaunchTemplate {
                launch_template_id: self.launch_template_id,
                launch_template_name: self.launch_template_name,
                create_time: self.create_time,
                created_by: self.created_by,
                default_version_number: self.default_version_number,
                latest_version_number: self.latest_version_number,
                tags: self.tags,
            }
        }
    }
}
impl LaunchTemplate {
    /// Creates a new builder-style object to manufacture [`LaunchTemplate`](crate::model::LaunchTemplate).
    pub fn builder() -> crate::model::launch_template::Builder {
        crate::model::launch_template::Builder::default()
    }
}

/// <p>In IPAM, a scope is the highest-level container within IPAM. An IPAM contains two default scopes. Each scope represents the IP space for a single network. The private scope is intended for all private IP address space. The public scope is intended for all public IP address space. Scopes enable you to reuse IP addresses across multiple unconnected networks without causing IP address overlap or conflict.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/ipam/how-it-works-ipam.html">How IPAM works</a> in the <i>Amazon VPC IPAM User Guide</i>.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct IpamScope {
    /// <p>The Amazon Web Services account ID of the owner of the scope.</p>
    #[doc(hidden)]
    pub owner_id: std::option::Option<std::string::String>,
    /// <p>The ID of the scope.</p>
    #[doc(hidden)]
    pub ipam_scope_id: std::option::Option<std::string::String>,
    /// <p>The ARN of the scope.</p>
    #[doc(hidden)]
    pub ipam_scope_arn: std::option::Option<std::string::String>,
    /// <p>The ARN of the IPAM.</p>
    #[doc(hidden)]
    pub ipam_arn: std::option::Option<std::string::String>,
    /// <p>The Amazon Web Services Region of the IPAM scope.</p>
    #[doc(hidden)]
    pub ipam_region: std::option::Option<std::string::String>,
    /// <p>The type of the scope.</p>
    #[doc(hidden)]
    pub ipam_scope_type: std::option::Option<crate::model::IpamScopeType>,
    /// <p>Defines if the scope is the default scope or not.</p>
    #[doc(hidden)]
    pub is_default: std::option::Option<bool>,
    /// <p>The description of the scope.</p>
    #[doc(hidden)]
    pub description: std::option::Option<std::string::String>,
    /// <p>The number of pools in the scope.</p>
    #[doc(hidden)]
    pub pool_count: std::option::Option<i32>,
    /// <p>The state of the IPAM scope.</p>
    #[doc(hidden)]
    pub state: std::option::Option<crate::model::IpamScopeState>,
    /// <p>The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl IpamScope {
    /// <p>The Amazon Web Services account ID of the owner of the scope.</p>
    pub fn owner_id(&self) -> std::option::Option<&str> {
        self.owner_id.as_deref()
    }
    /// <p>The ID of the scope.</p>
    pub fn ipam_scope_id(&self) -> std::option::Option<&str> {
        self.ipam_scope_id.as_deref()
    }
    /// <p>The ARN of the scope.</p>
    pub fn ipam_scope_arn(&self) -> std::option::Option<&str> {
        self.ipam_scope_arn.as_deref()
    }
    /// <p>The ARN of the IPAM.</p>
    pub fn ipam_arn(&self) -> std::option::Option<&str> {
        self.ipam_arn.as_deref()
    }
    /// <p>The Amazon Web Services Region of the IPAM scope.</p>
    pub fn ipam_region(&self) -> std::option::Option<&str> {
        self.ipam_region.as_deref()
    }
    /// <p>The type of the scope.</p>
    pub fn ipam_scope_type(&self) -> std::option::Option<&crate::model::IpamScopeType> {
        self.ipam_scope_type.as_ref()
    }
    /// <p>Defines if the scope is the default scope or not.</p>
    pub fn is_default(&self) -> std::option::Option<bool> {
        self.is_default
    }
    /// <p>The description of the scope.</p>
    pub fn description(&self) -> std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The number of pools in the scope.</p>
    pub fn pool_count(&self) -> std::option::Option<i32> {
        self.pool_count
    }
    /// <p>The state of the IPAM scope.</p>
    pub fn state(&self) -> std::option::Option<&crate::model::IpamScopeState> {
        self.state.as_ref()
    }
    /// <p>The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
}
/// See [`IpamScope`](crate::model::IpamScope).
pub mod ipam_scope {

    /// A builder for [`IpamScope`](crate::model::IpamScope).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) owner_id: std::option::Option<std::string::String>,
        pub(crate) ipam_scope_id: std::option::Option<std::string::String>,
        pub(crate) ipam_scope_arn: std::option::Option<std::string::String>,
        pub(crate) ipam_arn: std::option::Option<std::string::String>,
        pub(crate) ipam_region: std::option::Option<std::string::String>,
        pub(crate) ipam_scope_type: std::option::Option<crate::model::IpamScopeType>,
        pub(crate) is_default: std::option::Option<bool>,
        pub(crate) description: std::option::Option<std::string::String>,
        pub(crate) pool_count: std::option::Option<i32>,
        pub(crate) state: std::option::Option<crate::model::IpamScopeState>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    }
    impl Builder {
        /// <p>The Amazon Web Services account ID of the owner of the scope.</p>
        pub fn owner_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.owner_id = Some(input.into());
            self
        }
        /// <p>The Amazon Web Services account ID of the owner of the scope.</p>
        pub fn set_owner_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.owner_id = input;
            self
        }
        /// <p>The ID of the scope.</p>
        pub fn ipam_scope_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.ipam_scope_id = Some(input.into());
            self
        }
        /// <p>The ID of the scope.</p>
        pub fn set_ipam_scope_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.ipam_scope_id = input;
            self
        }
        /// <p>The ARN of the scope.</p>
        pub fn ipam_scope_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.ipam_scope_arn = Some(input.into());
            self
        }
        /// <p>The ARN of the scope.</p>
        pub fn set_ipam_scope_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.ipam_scope_arn = input;
            self
        }
        /// <p>The ARN of the IPAM.</p>
        pub fn ipam_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.ipam_arn = Some(input.into());
            self
        }
        /// <p>The ARN of the IPAM.</p>
        pub fn set_ipam_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.ipam_arn = input;
            self
        }
        /// <p>The Amazon Web Services Region of the IPAM scope.</p>
        pub fn ipam_region(mut self, input: impl Into<std::string::String>) -> Self {
            self.ipam_region = Some(input.into());
            self
        }
        /// <p>The Amazon Web Services Region of the IPAM scope.</p>
        pub fn set_ipam_region(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.ipam_region = input;
            self
        }
        /// <p>The type of the scope.</p>
        pub fn ipam_scope_type(mut self, input: crate::model::IpamScopeType) -> Self {
            self.ipam_scope_type = Some(input);
            self
        }
        /// <p>The type of the scope.</p>
        pub fn set_ipam_scope_type(
            mut self,
            input: std::option::Option<crate::model::IpamScopeType>,
        ) -> Self {
            self.ipam_scope_type = input;
            self
        }
        /// <p>Defines if the scope is the default scope or not.</p>
        pub fn is_default(mut self, input: bool) -> Self {
            self.is_default = Some(input);
            self
        }
        /// <p>Defines if the scope is the default scope or not.</p>
        pub fn set_is_default(mut self, input: std::option::Option<bool>) -> Self {
            self.is_default = input;
            self
        }
        /// <p>The description of the scope.</p>
        pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
            self.description = Some(input.into());
            self
        }
        /// <p>The description of the scope.</p>
        pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.description = input;
            self
        }
        /// <p>The number of pools in the scope.</p>
        pub fn pool_count(mut self, input: i32) -> Self {
            self.pool_count = Some(input);
            self
        }
        /// <p>The number of pools in the scope.</p>
        pub fn set_pool_count(mut self, input: std::option::Option<i32>) -> Self {
            self.pool_count = input;
            self
        }
        /// <p>The state of the IPAM scope.</p>
        pub fn state(mut self, input: crate::model::IpamScopeState) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>The state of the IPAM scope.</p>
        pub fn set_state(
            mut self,
            input: std::option::Option<crate::model::IpamScopeState>,
        ) -> Self {
            self.state = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// Consumes the builder and constructs a [`IpamScope`](crate::model::IpamScope).
        pub fn build(self) -> crate::model::IpamScope {
            crate::model::IpamScope {
                owner_id: self.owner_id,
                ipam_scope_id: self.ipam_scope_id,
                ipam_scope_arn: self.ipam_scope_arn,
                ipam_arn: self.ipam_arn,
                ipam_region: self.ipam_region,
                ipam_scope_type: self.ipam_scope_type,
                is_default: self.is_default,
                description: self.description,
                pool_count: self.pool_count,
                state: self.state,
                tags: self.tags,
            }
        }
    }
}
impl IpamScope {
    /// Creates a new builder-style object to manufacture [`IpamScope`](crate::model::IpamScope).
    pub fn builder() -> crate::model::ipam_scope::Builder {
        crate::model::ipam_scope::Builder::default()
    }
}

/// When writing a match expression against `IpamScopeState`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let ipamscopestate = unimplemented!();
/// match ipamscopestate {
///     IpamScopeState::CreateComplete => { /* ... */ },
///     IpamScopeState::CreateFailed => { /* ... */ },
///     IpamScopeState::CreateInProgress => { /* ... */ },
///     IpamScopeState::DeleteComplete => { /* ... */ },
///     IpamScopeState::DeleteFailed => { /* ... */ },
///     IpamScopeState::DeleteInProgress => { /* ... */ },
///     IpamScopeState::IsolateComplete => { /* ... */ },
///     IpamScopeState::IsolateInProgress => { /* ... */ },
///     IpamScopeState::ModifyComplete => { /* ... */ },
///     IpamScopeState::ModifyFailed => { /* ... */ },
///     IpamScopeState::ModifyInProgress => { /* ... */ },
///     IpamScopeState::RestoreInProgress => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `ipamscopestate` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `IpamScopeState::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `IpamScopeState::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `IpamScopeState::NewFeature` is defined.
/// Specifically, when `ipamscopestate` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `IpamScopeState::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 IpamScopeState {
    #[allow(missing_docs)] // documentation missing in model
    CreateComplete,
    #[allow(missing_docs)] // documentation missing in model
    CreateFailed,
    #[allow(missing_docs)] // documentation missing in model
    CreateInProgress,
    #[allow(missing_docs)] // documentation missing in model
    DeleteComplete,
    #[allow(missing_docs)] // documentation missing in model
    DeleteFailed,
    #[allow(missing_docs)] // documentation missing in model
    DeleteInProgress,
    #[allow(missing_docs)] // documentation missing in model
    IsolateComplete,
    #[allow(missing_docs)] // documentation missing in model
    IsolateInProgress,
    #[allow(missing_docs)] // documentation missing in model
    ModifyComplete,
    #[allow(missing_docs)] // documentation missing in model
    ModifyFailed,
    #[allow(missing_docs)] // documentation missing in model
    ModifyInProgress,
    #[allow(missing_docs)] // documentation missing in model
    RestoreInProgress,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for IpamScopeState {
    fn from(s: &str) -> Self {
        match s {
            "create-complete" => IpamScopeState::CreateComplete,
            "create-failed" => IpamScopeState::CreateFailed,
            "create-in-progress" => IpamScopeState::CreateInProgress,
            "delete-complete" => IpamScopeState::DeleteComplete,
            "delete-failed" => IpamScopeState::DeleteFailed,
            "delete-in-progress" => IpamScopeState::DeleteInProgress,
            "isolate-complete" => IpamScopeState::IsolateComplete,
            "isolate-in-progress" => IpamScopeState::IsolateInProgress,
            "modify-complete" => IpamScopeState::ModifyComplete,
            "modify-failed" => IpamScopeState::ModifyFailed,
            "modify-in-progress" => IpamScopeState::ModifyInProgress,
            "restore-in-progress" => IpamScopeState::RestoreInProgress,
            other => IpamScopeState::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for IpamScopeState {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(IpamScopeState::from(s))
    }
}
impl IpamScopeState {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            IpamScopeState::CreateComplete => "create-complete",
            IpamScopeState::CreateFailed => "create-failed",
            IpamScopeState::CreateInProgress => "create-in-progress",
            IpamScopeState::DeleteComplete => "delete-complete",
            IpamScopeState::DeleteFailed => "delete-failed",
            IpamScopeState::DeleteInProgress => "delete-in-progress",
            IpamScopeState::IsolateComplete => "isolate-complete",
            IpamScopeState::IsolateInProgress => "isolate-in-progress",
            IpamScopeState::ModifyComplete => "modify-complete",
            IpamScopeState::ModifyFailed => "modify-failed",
            IpamScopeState::ModifyInProgress => "modify-in-progress",
            IpamScopeState::RestoreInProgress => "restore-in-progress",
            IpamScopeState::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &[
            "create-complete",
            "create-failed",
            "create-in-progress",
            "delete-complete",
            "delete-failed",
            "delete-in-progress",
            "isolate-complete",
            "isolate-in-progress",
            "modify-complete",
            "modify-failed",
            "modify-in-progress",
            "restore-in-progress",
        ]
    }
}
impl AsRef<str> for IpamScopeState {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `IpamScopeType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let ipamscopetype = unimplemented!();
/// match ipamscopetype {
///     IpamScopeType::Private => { /* ... */ },
///     IpamScopeType::Public => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `ipamscopetype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `IpamScopeType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `IpamScopeType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `IpamScopeType::NewFeature` is defined.
/// Specifically, when `ipamscopetype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `IpamScopeType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 IpamScopeType {
    #[allow(missing_docs)] // documentation missing in model
    Private,
    #[allow(missing_docs)] // documentation missing in model
    Public,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for IpamScopeType {
    fn from(s: &str) -> Self {
        match s {
            "private" => IpamScopeType::Private,
            "public" => IpamScopeType::Public,
            other => IpamScopeType::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for IpamScopeType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(IpamScopeType::from(s))
    }
}
impl IpamScopeType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            IpamScopeType::Private => "private",
            IpamScopeType::Public => "public",
            IpamScopeType::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["private", "public"]
    }
}
impl AsRef<str> for IpamScopeType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>The CIDR for an IPAM resource.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct IpamResourceCidr {
    /// <p>The IPAM ID for an IPAM resource.</p>
    #[doc(hidden)]
    pub ipam_id: std::option::Option<std::string::String>,
    /// <p>The scope ID for an IPAM resource.</p>
    #[doc(hidden)]
    pub ipam_scope_id: std::option::Option<std::string::String>,
    /// <p>The pool ID for an IPAM resource.</p>
    #[doc(hidden)]
    pub ipam_pool_id: std::option::Option<std::string::String>,
    /// <p>The Amazon Web Services Region for an IPAM resource.</p>
    #[doc(hidden)]
    pub resource_region: std::option::Option<std::string::String>,
    /// <p>The Amazon Web Services account number of the owner of an IPAM resource.</p>
    #[doc(hidden)]
    pub resource_owner_id: std::option::Option<std::string::String>,
    /// <p>The ID of an IPAM resource.</p>
    #[doc(hidden)]
    pub resource_id: std::option::Option<std::string::String>,
    /// <p>The name of an IPAM resource.</p>
    #[doc(hidden)]
    pub resource_name: std::option::Option<std::string::String>,
    /// <p>The CIDR for an IPAM resource.</p>
    #[doc(hidden)]
    pub resource_cidr: std::option::Option<std::string::String>,
    /// <p>The type of IPAM resource.</p>
    #[doc(hidden)]
    pub resource_type: std::option::Option<crate::model::IpamResourceType>,
    /// <p>The tags for an IPAM resource.</p>
    #[doc(hidden)]
    pub resource_tags: std::option::Option<std::vec::Vec<crate::model::IpamResourceTag>>,
    /// <p>The percentage of IP address space in use. To convert the decimal to a percentage, multiply the decimal by 100. Note the following:</p>
    /// <ul>
    /// <li> <p>For a resources that are VPCs, this is the percentage of IP address space in the VPC that's taken up by subnet CIDRs. </p> </li>
    /// <li> <p>For resources that are subnets, if the subnet has an IPv4 CIDR provisioned to it, this is the percentage of IPv4 address space in the subnet that's in use. If the subnet has an IPv6 CIDR provisioned to it, the percentage of IPv6 address space in use is not represented. The percentage of IPv6 address space in use cannot currently be calculated. </p> </li>
    /// <li> <p>For resources that are public IPv4 pools, this is the percentage of IP address space in the pool that's been allocated to Elastic IP addresses (EIPs). </p> </li>
    /// </ul>
    #[doc(hidden)]
    pub ip_usage: std::option::Option<f64>,
    /// <p>The compliance status of the IPAM resource. For more information on compliance statuses, see <a href="https://docs.aws.amazon.com/vpc/latest/ipam/monitor-cidr-compliance-ipam.html">Monitor CIDR usage by resource</a> in the <i>Amazon VPC IPAM User Guide</i>.</p>
    #[doc(hidden)]
    pub compliance_status: std::option::Option<crate::model::IpamComplianceStatus>,
    /// <p>The management state of the resource. For more information about management states, see <a href="https://docs.aws.amazon.com/vpc/latest/ipam/monitor-cidr-compliance-ipam.html">Monitor CIDR usage by resource</a> in the <i>Amazon VPC IPAM User Guide</i>.</p>
    #[doc(hidden)]
    pub management_state: std::option::Option<crate::model::IpamManagementState>,
    /// <p>The overlap status of an IPAM resource. The overlap status tells you if the CIDR for a resource overlaps with another CIDR in the scope. For more information on overlap statuses, see <a href="https://docs.aws.amazon.com/vpc/latest/ipam/monitor-cidr-compliance-ipam.html">Monitor CIDR usage by resource</a> in the <i>Amazon VPC IPAM User Guide</i>.</p>
    #[doc(hidden)]
    pub overlap_status: std::option::Option<crate::model::IpamOverlapStatus>,
    /// <p>The ID of a VPC.</p>
    #[doc(hidden)]
    pub vpc_id: std::option::Option<std::string::String>,
}
impl IpamResourceCidr {
    /// <p>The IPAM ID for an IPAM resource.</p>
    pub fn ipam_id(&self) -> std::option::Option<&str> {
        self.ipam_id.as_deref()
    }
    /// <p>The scope ID for an IPAM resource.</p>
    pub fn ipam_scope_id(&self) -> std::option::Option<&str> {
        self.ipam_scope_id.as_deref()
    }
    /// <p>The pool ID for an IPAM resource.</p>
    pub fn ipam_pool_id(&self) -> std::option::Option<&str> {
        self.ipam_pool_id.as_deref()
    }
    /// <p>The Amazon Web Services Region for an IPAM resource.</p>
    pub fn resource_region(&self) -> std::option::Option<&str> {
        self.resource_region.as_deref()
    }
    /// <p>The Amazon Web Services account number of the owner of an IPAM resource.</p>
    pub fn resource_owner_id(&self) -> std::option::Option<&str> {
        self.resource_owner_id.as_deref()
    }
    /// <p>The ID of an IPAM resource.</p>
    pub fn resource_id(&self) -> std::option::Option<&str> {
        self.resource_id.as_deref()
    }
    /// <p>The name of an IPAM resource.</p>
    pub fn resource_name(&self) -> std::option::Option<&str> {
        self.resource_name.as_deref()
    }
    /// <p>The CIDR for an IPAM resource.</p>
    pub fn resource_cidr(&self) -> std::option::Option<&str> {
        self.resource_cidr.as_deref()
    }
    /// <p>The type of IPAM resource.</p>
    pub fn resource_type(&self) -> std::option::Option<&crate::model::IpamResourceType> {
        self.resource_type.as_ref()
    }
    /// <p>The tags for an IPAM resource.</p>
    pub fn resource_tags(&self) -> std::option::Option<&[crate::model::IpamResourceTag]> {
        self.resource_tags.as_deref()
    }
    /// <p>The percentage of IP address space in use. To convert the decimal to a percentage, multiply the decimal by 100. Note the following:</p>
    /// <ul>
    /// <li> <p>For a resources that are VPCs, this is the percentage of IP address space in the VPC that's taken up by subnet CIDRs. </p> </li>
    /// <li> <p>For resources that are subnets, if the subnet has an IPv4 CIDR provisioned to it, this is the percentage of IPv4 address space in the subnet that's in use. If the subnet has an IPv6 CIDR provisioned to it, the percentage of IPv6 address space in use is not represented. The percentage of IPv6 address space in use cannot currently be calculated. </p> </li>
    /// <li> <p>For resources that are public IPv4 pools, this is the percentage of IP address space in the pool that's been allocated to Elastic IP addresses (EIPs). </p> </li>
    /// </ul>
    pub fn ip_usage(&self) -> std::option::Option<f64> {
        self.ip_usage
    }
    /// <p>The compliance status of the IPAM resource. For more information on compliance statuses, see <a href="https://docs.aws.amazon.com/vpc/latest/ipam/monitor-cidr-compliance-ipam.html">Monitor CIDR usage by resource</a> in the <i>Amazon VPC IPAM User Guide</i>.</p>
    pub fn compliance_status(&self) -> std::option::Option<&crate::model::IpamComplianceStatus> {
        self.compliance_status.as_ref()
    }
    /// <p>The management state of the resource. For more information about management states, see <a href="https://docs.aws.amazon.com/vpc/latest/ipam/monitor-cidr-compliance-ipam.html">Monitor CIDR usage by resource</a> in the <i>Amazon VPC IPAM User Guide</i>.</p>
    pub fn management_state(&self) -> std::option::Option<&crate::model::IpamManagementState> {
        self.management_state.as_ref()
    }
    /// <p>The overlap status of an IPAM resource. The overlap status tells you if the CIDR for a resource overlaps with another CIDR in the scope. For more information on overlap statuses, see <a href="https://docs.aws.amazon.com/vpc/latest/ipam/monitor-cidr-compliance-ipam.html">Monitor CIDR usage by resource</a> in the <i>Amazon VPC IPAM User Guide</i>.</p>
    pub fn overlap_status(&self) -> std::option::Option<&crate::model::IpamOverlapStatus> {
        self.overlap_status.as_ref()
    }
    /// <p>The ID of a VPC.</p>
    pub fn vpc_id(&self) -> std::option::Option<&str> {
        self.vpc_id.as_deref()
    }
}
/// See [`IpamResourceCidr`](crate::model::IpamResourceCidr).
pub mod ipam_resource_cidr {

    /// A builder for [`IpamResourceCidr`](crate::model::IpamResourceCidr).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) ipam_id: std::option::Option<std::string::String>,
        pub(crate) ipam_scope_id: std::option::Option<std::string::String>,
        pub(crate) ipam_pool_id: std::option::Option<std::string::String>,
        pub(crate) resource_region: std::option::Option<std::string::String>,
        pub(crate) resource_owner_id: std::option::Option<std::string::String>,
        pub(crate) resource_id: std::option::Option<std::string::String>,
        pub(crate) resource_name: std::option::Option<std::string::String>,
        pub(crate) resource_cidr: std::option::Option<std::string::String>,
        pub(crate) resource_type: std::option::Option<crate::model::IpamResourceType>,
        pub(crate) resource_tags: std::option::Option<std::vec::Vec<crate::model::IpamResourceTag>>,
        pub(crate) ip_usage: std::option::Option<f64>,
        pub(crate) compliance_status: std::option::Option<crate::model::IpamComplianceStatus>,
        pub(crate) management_state: std::option::Option<crate::model::IpamManagementState>,
        pub(crate) overlap_status: std::option::Option<crate::model::IpamOverlapStatus>,
        pub(crate) vpc_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The IPAM ID for an IPAM resource.</p>
        pub fn ipam_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.ipam_id = Some(input.into());
            self
        }
        /// <p>The IPAM ID for an IPAM resource.</p>
        pub fn set_ipam_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.ipam_id = input;
            self
        }
        /// <p>The scope ID for an IPAM resource.</p>
        pub fn ipam_scope_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.ipam_scope_id = Some(input.into());
            self
        }
        /// <p>The scope ID for an IPAM resource.</p>
        pub fn set_ipam_scope_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.ipam_scope_id = input;
            self
        }
        /// <p>The pool ID for an IPAM resource.</p>
        pub fn ipam_pool_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.ipam_pool_id = Some(input.into());
            self
        }
        /// <p>The pool ID for an IPAM resource.</p>
        pub fn set_ipam_pool_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.ipam_pool_id = input;
            self
        }
        /// <p>The Amazon Web Services Region for an IPAM resource.</p>
        pub fn resource_region(mut self, input: impl Into<std::string::String>) -> Self {
            self.resource_region = Some(input.into());
            self
        }
        /// <p>The Amazon Web Services Region for an IPAM resource.</p>
        pub fn set_resource_region(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.resource_region = input;
            self
        }
        /// <p>The Amazon Web Services account number of the owner of an IPAM resource.</p>
        pub fn resource_owner_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.resource_owner_id = Some(input.into());
            self
        }
        /// <p>The Amazon Web Services account number of the owner of an IPAM resource.</p>
        pub fn set_resource_owner_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.resource_owner_id = input;
            self
        }
        /// <p>The ID of an IPAM resource.</p>
        pub fn resource_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.resource_id = Some(input.into());
            self
        }
        /// <p>The ID of an IPAM resource.</p>
        pub fn set_resource_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.resource_id = input;
            self
        }
        /// <p>The name of an IPAM resource.</p>
        pub fn resource_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.resource_name = Some(input.into());
            self
        }
        /// <p>The name of an IPAM resource.</p>
        pub fn set_resource_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.resource_name = input;
            self
        }
        /// <p>The CIDR for an IPAM resource.</p>
        pub fn resource_cidr(mut self, input: impl Into<std::string::String>) -> Self {
            self.resource_cidr = Some(input.into());
            self
        }
        /// <p>The CIDR for an IPAM resource.</p>
        pub fn set_resource_cidr(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.resource_cidr = input;
            self
        }
        /// <p>The type of IPAM resource.</p>
        pub fn resource_type(mut self, input: crate::model::IpamResourceType) -> Self {
            self.resource_type = Some(input);
            self
        }
        /// <p>The type of IPAM resource.</p>
        pub fn set_resource_type(
            mut self,
            input: std::option::Option<crate::model::IpamResourceType>,
        ) -> Self {
            self.resource_type = input;
            self
        }
        /// Appends an item to `resource_tags`.
        ///
        /// To override the contents of this collection use [`set_resource_tags`](Self::set_resource_tags).
        ///
        /// <p>The tags for an IPAM resource.</p>
        pub fn resource_tags(mut self, input: crate::model::IpamResourceTag) -> Self {
            let mut v = self.resource_tags.unwrap_or_default();
            v.push(input);
            self.resource_tags = Some(v);
            self
        }
        /// <p>The tags for an IPAM resource.</p>
        pub fn set_resource_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::IpamResourceTag>>,
        ) -> Self {
            self.resource_tags = input;
            self
        }
        /// <p>The percentage of IP address space in use. To convert the decimal to a percentage, multiply the decimal by 100. Note the following:</p>
        /// <ul>
        /// <li> <p>For a resources that are VPCs, this is the percentage of IP address space in the VPC that's taken up by subnet CIDRs. </p> </li>
        /// <li> <p>For resources that are subnets, if the subnet has an IPv4 CIDR provisioned to it, this is the percentage of IPv4 address space in the subnet that's in use. If the subnet has an IPv6 CIDR provisioned to it, the percentage of IPv6 address space in use is not represented. The percentage of IPv6 address space in use cannot currently be calculated. </p> </li>
        /// <li> <p>For resources that are public IPv4 pools, this is the percentage of IP address space in the pool that's been allocated to Elastic IP addresses (EIPs). </p> </li>
        /// </ul>
        pub fn ip_usage(mut self, input: f64) -> Self {
            self.ip_usage = Some(input);
            self
        }
        /// <p>The percentage of IP address space in use. To convert the decimal to a percentage, multiply the decimal by 100. Note the following:</p>
        /// <ul>
        /// <li> <p>For a resources that are VPCs, this is the percentage of IP address space in the VPC that's taken up by subnet CIDRs. </p> </li>
        /// <li> <p>For resources that are subnets, if the subnet has an IPv4 CIDR provisioned to it, this is the percentage of IPv4 address space in the subnet that's in use. If the subnet has an IPv6 CIDR provisioned to it, the percentage of IPv6 address space in use is not represented. The percentage of IPv6 address space in use cannot currently be calculated. </p> </li>
        /// <li> <p>For resources that are public IPv4 pools, this is the percentage of IP address space in the pool that's been allocated to Elastic IP addresses (EIPs). </p> </li>
        /// </ul>
        pub fn set_ip_usage(mut self, input: std::option::Option<f64>) -> Self {
            self.ip_usage = input;
            self
        }
        /// <p>The compliance status of the IPAM resource. For more information on compliance statuses, see <a href="https://docs.aws.amazon.com/vpc/latest/ipam/monitor-cidr-compliance-ipam.html">Monitor CIDR usage by resource</a> in the <i>Amazon VPC IPAM User Guide</i>.</p>
        pub fn compliance_status(mut self, input: crate::model::IpamComplianceStatus) -> Self {
            self.compliance_status = Some(input);
            self
        }
        /// <p>The compliance status of the IPAM resource. For more information on compliance statuses, see <a href="https://docs.aws.amazon.com/vpc/latest/ipam/monitor-cidr-compliance-ipam.html">Monitor CIDR usage by resource</a> in the <i>Amazon VPC IPAM User Guide</i>.</p>
        pub fn set_compliance_status(
            mut self,
            input: std::option::Option<crate::model::IpamComplianceStatus>,
        ) -> Self {
            self.compliance_status = input;
            self
        }
        /// <p>The management state of the resource. For more information about management states, see <a href="https://docs.aws.amazon.com/vpc/latest/ipam/monitor-cidr-compliance-ipam.html">Monitor CIDR usage by resource</a> in the <i>Amazon VPC IPAM User Guide</i>.</p>
        pub fn management_state(mut self, input: crate::model::IpamManagementState) -> Self {
            self.management_state = Some(input);
            self
        }
        /// <p>The management state of the resource. For more information about management states, see <a href="https://docs.aws.amazon.com/vpc/latest/ipam/monitor-cidr-compliance-ipam.html">Monitor CIDR usage by resource</a> in the <i>Amazon VPC IPAM User Guide</i>.</p>
        pub fn set_management_state(
            mut self,
            input: std::option::Option<crate::model::IpamManagementState>,
        ) -> Self {
            self.management_state = input;
            self
        }
        /// <p>The overlap status of an IPAM resource. The overlap status tells you if the CIDR for a resource overlaps with another CIDR in the scope. For more information on overlap statuses, see <a href="https://docs.aws.amazon.com/vpc/latest/ipam/monitor-cidr-compliance-ipam.html">Monitor CIDR usage by resource</a> in the <i>Amazon VPC IPAM User Guide</i>.</p>
        pub fn overlap_status(mut self, input: crate::model::IpamOverlapStatus) -> Self {
            self.overlap_status = Some(input);
            self
        }
        /// <p>The overlap status of an IPAM resource. The overlap status tells you if the CIDR for a resource overlaps with another CIDR in the scope. For more information on overlap statuses, see <a href="https://docs.aws.amazon.com/vpc/latest/ipam/monitor-cidr-compliance-ipam.html">Monitor CIDR usage by resource</a> in the <i>Amazon VPC IPAM User Guide</i>.</p>
        pub fn set_overlap_status(
            mut self,
            input: std::option::Option<crate::model::IpamOverlapStatus>,
        ) -> Self {
            self.overlap_status = input;
            self
        }
        /// <p>The ID of a VPC.</p>
        pub fn vpc_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.vpc_id = Some(input.into());
            self
        }
        /// <p>The ID of a VPC.</p>
        pub fn set_vpc_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.vpc_id = input;
            self
        }
        /// Consumes the builder and constructs a [`IpamResourceCidr`](crate::model::IpamResourceCidr).
        pub fn build(self) -> crate::model::IpamResourceCidr {
            crate::model::IpamResourceCidr {
                ipam_id: self.ipam_id,
                ipam_scope_id: self.ipam_scope_id,
                ipam_pool_id: self.ipam_pool_id,
                resource_region: self.resource_region,
                resource_owner_id: self.resource_owner_id,
                resource_id: self.resource_id,
                resource_name: self.resource_name,
                resource_cidr: self.resource_cidr,
                resource_type: self.resource_type,
                resource_tags: self.resource_tags,
                ip_usage: self.ip_usage,
                compliance_status: self.compliance_status,
                management_state: self.management_state,
                overlap_status: self.overlap_status,
                vpc_id: self.vpc_id,
            }
        }
    }
}
impl IpamResourceCidr {
    /// Creates a new builder-style object to manufacture [`IpamResourceCidr`](crate::model::IpamResourceCidr).
    pub fn builder() -> crate::model::ipam_resource_cidr::Builder {
        crate::model::ipam_resource_cidr::Builder::default()
    }
}

/// When writing a match expression against `IpamOverlapStatus`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let ipamoverlapstatus = unimplemented!();
/// match ipamoverlapstatus {
///     IpamOverlapStatus::Ignored => { /* ... */ },
///     IpamOverlapStatus::Nonoverlapping => { /* ... */ },
///     IpamOverlapStatus::Overlapping => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `ipamoverlapstatus` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `IpamOverlapStatus::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `IpamOverlapStatus::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `IpamOverlapStatus::NewFeature` is defined.
/// Specifically, when `ipamoverlapstatus` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `IpamOverlapStatus::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 IpamOverlapStatus {
    #[allow(missing_docs)] // documentation missing in model
    Ignored,
    #[allow(missing_docs)] // documentation missing in model
    Nonoverlapping,
    #[allow(missing_docs)] // documentation missing in model
    Overlapping,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for IpamOverlapStatus {
    fn from(s: &str) -> Self {
        match s {
            "ignored" => IpamOverlapStatus::Ignored,
            "nonoverlapping" => IpamOverlapStatus::Nonoverlapping,
            "overlapping" => IpamOverlapStatus::Overlapping,
            other => {
                IpamOverlapStatus::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for IpamOverlapStatus {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(IpamOverlapStatus::from(s))
    }
}
impl IpamOverlapStatus {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            IpamOverlapStatus::Ignored => "ignored",
            IpamOverlapStatus::Nonoverlapping => "nonoverlapping",
            IpamOverlapStatus::Overlapping => "overlapping",
            IpamOverlapStatus::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["ignored", "nonoverlapping", "overlapping"]
    }
}
impl AsRef<str> for IpamOverlapStatus {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `IpamManagementState`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let ipammanagementstate = unimplemented!();
/// match ipammanagementstate {
///     IpamManagementState::Ignored => { /* ... */ },
///     IpamManagementState::Managed => { /* ... */ },
///     IpamManagementState::Unmanaged => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `ipammanagementstate` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `IpamManagementState::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `IpamManagementState::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `IpamManagementState::NewFeature` is defined.
/// Specifically, when `ipammanagementstate` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `IpamManagementState::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 IpamManagementState {
    #[allow(missing_docs)] // documentation missing in model
    Ignored,
    #[allow(missing_docs)] // documentation missing in model
    Managed,
    #[allow(missing_docs)] // documentation missing in model
    Unmanaged,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for IpamManagementState {
    fn from(s: &str) -> Self {
        match s {
            "ignored" => IpamManagementState::Ignored,
            "managed" => IpamManagementState::Managed,
            "unmanaged" => IpamManagementState::Unmanaged,
            other => {
                IpamManagementState::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for IpamManagementState {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(IpamManagementState::from(s))
    }
}
impl IpamManagementState {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            IpamManagementState::Ignored => "ignored",
            IpamManagementState::Managed => "managed",
            IpamManagementState::Unmanaged => "unmanaged",
            IpamManagementState::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["ignored", "managed", "unmanaged"]
    }
}
impl AsRef<str> for IpamManagementState {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `IpamComplianceStatus`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let ipamcompliancestatus = unimplemented!();
/// match ipamcompliancestatus {
///     IpamComplianceStatus::Compliant => { /* ... */ },
///     IpamComplianceStatus::Ignored => { /* ... */ },
///     IpamComplianceStatus::Noncompliant => { /* ... */ },
///     IpamComplianceStatus::Unmanaged => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `ipamcompliancestatus` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `IpamComplianceStatus::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `IpamComplianceStatus::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `IpamComplianceStatus::NewFeature` is defined.
/// Specifically, when `ipamcompliancestatus` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `IpamComplianceStatus::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 IpamComplianceStatus {
    #[allow(missing_docs)] // documentation missing in model
    Compliant,
    #[allow(missing_docs)] // documentation missing in model
    Ignored,
    #[allow(missing_docs)] // documentation missing in model
    Noncompliant,
    #[allow(missing_docs)] // documentation missing in model
    Unmanaged,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for IpamComplianceStatus {
    fn from(s: &str) -> Self {
        match s {
            "compliant" => IpamComplianceStatus::Compliant,
            "ignored" => IpamComplianceStatus::Ignored,
            "noncompliant" => IpamComplianceStatus::Noncompliant,
            "unmanaged" => IpamComplianceStatus::Unmanaged,
            other => {
                IpamComplianceStatus::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for IpamComplianceStatus {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(IpamComplianceStatus::from(s))
    }
}
impl IpamComplianceStatus {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            IpamComplianceStatus::Compliant => "compliant",
            IpamComplianceStatus::Ignored => "ignored",
            IpamComplianceStatus::Noncompliant => "noncompliant",
            IpamComplianceStatus::Unmanaged => "unmanaged",
            IpamComplianceStatus::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["compliant", "ignored", "noncompliant", "unmanaged"]
    }
}
impl AsRef<str> for IpamComplianceStatus {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct IpamResourceTag {
    /// <p>The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p>
    #[doc(hidden)]
    pub key: std::option::Option<std::string::String>,
    /// <p>The value of the tag.</p>
    #[doc(hidden)]
    pub value: std::option::Option<std::string::String>,
}
impl IpamResourceTag {
    /// <p>The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p>
    pub fn key(&self) -> std::option::Option<&str> {
        self.key.as_deref()
    }
    /// <p>The value of the tag.</p>
    pub fn value(&self) -> std::option::Option<&str> {
        self.value.as_deref()
    }
}
/// See [`IpamResourceTag`](crate::model::IpamResourceTag).
pub mod ipam_resource_tag {

    /// A builder for [`IpamResourceTag`](crate::model::IpamResourceTag).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) key: std::option::Option<std::string::String>,
        pub(crate) value: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p>
        pub fn key(mut self, input: impl Into<std::string::String>) -> Self {
            self.key = Some(input.into());
            self
        }
        /// <p>The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p>
        pub fn set_key(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.key = input;
            self
        }
        /// <p>The value of the tag.</p>
        pub fn value(mut self, input: impl Into<std::string::String>) -> Self {
            self.value = Some(input.into());
            self
        }
        /// <p>The value of the tag.</p>
        pub fn set_value(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.value = input;
            self
        }
        /// Consumes the builder and constructs a [`IpamResourceTag`](crate::model::IpamResourceTag).
        pub fn build(self) -> crate::model::IpamResourceTag {
            crate::model::IpamResourceTag {
                key: self.key,
                value: self.value,
            }
        }
    }
}
impl IpamResourceTag {
    /// Creates a new builder-style object to manufacture [`IpamResourceTag`](crate::model::IpamResourceTag).
    pub fn builder() -> crate::model::ipam_resource_tag::Builder {
        crate::model::ipam_resource_tag::Builder::default()
    }
}

/// When writing a match expression against `IpamResourceType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let ipamresourcetype = unimplemented!();
/// match ipamresourcetype {
///     IpamResourceType::Eip => { /* ... */ },
///     IpamResourceType::Ipv6Pool => { /* ... */ },
///     IpamResourceType::PublicIpv4Pool => { /* ... */ },
///     IpamResourceType::Subnet => { /* ... */ },
///     IpamResourceType::Vpc => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `ipamresourcetype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `IpamResourceType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `IpamResourceType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `IpamResourceType::NewFeature` is defined.
/// Specifically, when `ipamresourcetype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `IpamResourceType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 IpamResourceType {
    #[allow(missing_docs)] // documentation missing in model
    Eip,
    #[allow(missing_docs)] // documentation missing in model
    Ipv6Pool,
    #[allow(missing_docs)] // documentation missing in model
    PublicIpv4Pool,
    #[allow(missing_docs)] // documentation missing in model
    Subnet,
    #[allow(missing_docs)] // documentation missing in model
    Vpc,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for IpamResourceType {
    fn from(s: &str) -> Self {
        match s {
            "eip" => IpamResourceType::Eip,
            "ipv6-pool" => IpamResourceType::Ipv6Pool,
            "public-ipv4-pool" => IpamResourceType::PublicIpv4Pool,
            "subnet" => IpamResourceType::Subnet,
            "vpc" => IpamResourceType::Vpc,
            other => IpamResourceType::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for IpamResourceType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(IpamResourceType::from(s))
    }
}
impl IpamResourceType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            IpamResourceType::Eip => "eip",
            IpamResourceType::Ipv6Pool => "ipv6-pool",
            IpamResourceType::PublicIpv4Pool => "public-ipv4-pool",
            IpamResourceType::Subnet => "subnet",
            IpamResourceType::Vpc => "vpc",
            IpamResourceType::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["eip", "ipv6-pool", "public-ipv4-pool", "subnet", "vpc"]
    }
}
impl AsRef<str> for IpamResourceType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>In IPAM, a pool is a collection of contiguous IP addresses CIDRs. Pools enable you to organize your IP addresses according to your routing and security needs. For example, if you have separate routing and security needs for development and production applications, you can create a pool for each.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct IpamPool {
    /// <p>The Amazon Web Services account ID of the owner of the IPAM pool.</p>
    #[doc(hidden)]
    pub owner_id: std::option::Option<std::string::String>,
    /// <p>The ID of the IPAM pool.</p>
    #[doc(hidden)]
    pub ipam_pool_id: std::option::Option<std::string::String>,
    /// <p>The ID of the source IPAM pool. You can use this option to create an IPAM pool within an existing source pool.</p>
    #[doc(hidden)]
    pub source_ipam_pool_id: std::option::Option<std::string::String>,
    /// <p>The ARN of the IPAM pool.</p>
    #[doc(hidden)]
    pub ipam_pool_arn: std::option::Option<std::string::String>,
    /// <p>The ARN of the scope of the IPAM pool.</p>
    #[doc(hidden)]
    pub ipam_scope_arn: std::option::Option<std::string::String>,
    /// <p>In IPAM, a scope is the highest-level container within IPAM. An IPAM contains two default scopes. Each scope represents the IP space for a single network. The private scope is intended for all private IP address space. The public scope is intended for all public IP address space. Scopes enable you to reuse IP addresses across multiple unconnected networks without causing IP address overlap or conflict.</p>
    #[doc(hidden)]
    pub ipam_scope_type: std::option::Option<crate::model::IpamScopeType>,
    /// <p>The ARN of the IPAM.</p>
    #[doc(hidden)]
    pub ipam_arn: std::option::Option<std::string::String>,
    /// <p>The Amazon Web Services Region of the IPAM pool.</p>
    #[doc(hidden)]
    pub ipam_region: std::option::Option<std::string::String>,
    /// <p>The locale of the IPAM pool. In IPAM, the locale is the Amazon Web Services Region where you want to make an IPAM pool available for allocations. Only resources in the same Region as the locale of the pool can get IP address allocations from the pool. You can only allocate a CIDR for a VPC, for example, from an IPAM pool that shares a locale with the VPC’s Region. Note that once you choose a Locale for a pool, you cannot modify it. If you choose an Amazon Web Services Region for locale that has not been configured as an operating Region for the IPAM, you'll get an error.</p>
    #[doc(hidden)]
    pub locale: std::option::Option<std::string::String>,
    /// <p>The depth of pools in your IPAM pool. The pool depth quota is 10. For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/ipam/quotas-ipam.html">Quotas in IPAM</a> in the <i>Amazon VPC IPAM User Guide</i>. </p>
    #[doc(hidden)]
    pub pool_depth: std::option::Option<i32>,
    /// <p>The state of the IPAM pool.</p>
    #[doc(hidden)]
    pub state: std::option::Option<crate::model::IpamPoolState>,
    /// <p>A message related to the failed creation of an IPAM pool.</p>
    #[doc(hidden)]
    pub state_message: std::option::Option<std::string::String>,
    /// <p>The description of the IPAM pool.</p>
    #[doc(hidden)]
    pub description: std::option::Option<std::string::String>,
    /// <p>If selected, IPAM will continuously look for resources within the CIDR range of this pool and automatically import them as allocations into your IPAM. The CIDRs that will be allocated for these resources must not already be allocated to other resources in order for the import to succeed. IPAM will import a CIDR regardless of its compliance with the pool's allocation rules, so a resource might be imported and subsequently marked as noncompliant. If IPAM discovers multiple CIDRs that overlap, IPAM will import the largest CIDR only. If IPAM discovers multiple CIDRs with matching CIDRs, IPAM will randomly import one of them only. </p>
    /// <p>A locale must be set on the pool for this feature to work.</p>
    #[doc(hidden)]
    pub auto_import: std::option::Option<bool>,
    /// <p>Determines if a pool is publicly advertisable. This option is not available for pools with AddressFamily set to <code>ipv4</code>.</p>
    #[doc(hidden)]
    pub publicly_advertisable: std::option::Option<bool>,
    /// <p>The address family of the pool.</p>
    #[doc(hidden)]
    pub address_family: std::option::Option<crate::model::AddressFamily>,
    /// <p>The minimum netmask length required for CIDR allocations in this IPAM pool to be compliant. The minimum netmask length must be less than the maximum netmask length. Possible netmask lengths for IPv4 addresses are 0 - 32. Possible netmask lengths for IPv6 addresses are 0 - 128.</p>
    #[doc(hidden)]
    pub allocation_min_netmask_length: std::option::Option<i32>,
    /// <p>The maximum netmask length possible for CIDR allocations in this IPAM pool to be compliant. The maximum netmask length must be greater than the minimum netmask length. Possible netmask lengths for IPv4 addresses are 0 - 32. Possible netmask lengths for IPv6 addresses are 0 - 128.</p>
    #[doc(hidden)]
    pub allocation_max_netmask_length: std::option::Option<i32>,
    /// <p>The default netmask length for allocations added to this pool. If, for example, the CIDR assigned to this pool is 10.0.0.0/8 and you enter 16 here, new allocations will default to 10.0.0.0/16.</p>
    #[doc(hidden)]
    pub allocation_default_netmask_length: std::option::Option<i32>,
    /// <p>Tags that are required for resources that use CIDRs from this IPAM pool. Resources that do not have these tags will not be allowed to allocate space from the pool. If the resources have their tags changed after they have allocated space or if the allocation tagging requirements are changed on the pool, the resource may be marked as noncompliant.</p>
    #[doc(hidden)]
    pub allocation_resource_tags: std::option::Option<std::vec::Vec<crate::model::IpamResourceTag>>,
    /// <p>The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    /// <p>Limits which service in Amazon Web Services that the pool can be used in. "ec2", for example, allows users to use space for Elastic IP addresses and VPCs.</p>
    #[doc(hidden)]
    pub aws_service: std::option::Option<crate::model::IpamPoolAwsService>,
}
impl IpamPool {
    /// <p>The Amazon Web Services account ID of the owner of the IPAM pool.</p>
    pub fn owner_id(&self) -> std::option::Option<&str> {
        self.owner_id.as_deref()
    }
    /// <p>The ID of the IPAM pool.</p>
    pub fn ipam_pool_id(&self) -> std::option::Option<&str> {
        self.ipam_pool_id.as_deref()
    }
    /// <p>The ID of the source IPAM pool. You can use this option to create an IPAM pool within an existing source pool.</p>
    pub fn source_ipam_pool_id(&self) -> std::option::Option<&str> {
        self.source_ipam_pool_id.as_deref()
    }
    /// <p>The ARN of the IPAM pool.</p>
    pub fn ipam_pool_arn(&self) -> std::option::Option<&str> {
        self.ipam_pool_arn.as_deref()
    }
    /// <p>The ARN of the scope of the IPAM pool.</p>
    pub fn ipam_scope_arn(&self) -> std::option::Option<&str> {
        self.ipam_scope_arn.as_deref()
    }
    /// <p>In IPAM, a scope is the highest-level container within IPAM. An IPAM contains two default scopes. Each scope represents the IP space for a single network. The private scope is intended for all private IP address space. The public scope is intended for all public IP address space. Scopes enable you to reuse IP addresses across multiple unconnected networks without causing IP address overlap or conflict.</p>
    pub fn ipam_scope_type(&self) -> std::option::Option<&crate::model::IpamScopeType> {
        self.ipam_scope_type.as_ref()
    }
    /// <p>The ARN of the IPAM.</p>
    pub fn ipam_arn(&self) -> std::option::Option<&str> {
        self.ipam_arn.as_deref()
    }
    /// <p>The Amazon Web Services Region of the IPAM pool.</p>
    pub fn ipam_region(&self) -> std::option::Option<&str> {
        self.ipam_region.as_deref()
    }
    /// <p>The locale of the IPAM pool. In IPAM, the locale is the Amazon Web Services Region where you want to make an IPAM pool available for allocations. Only resources in the same Region as the locale of the pool can get IP address allocations from the pool. You can only allocate a CIDR for a VPC, for example, from an IPAM pool that shares a locale with the VPC’s Region. Note that once you choose a Locale for a pool, you cannot modify it. If you choose an Amazon Web Services Region for locale that has not been configured as an operating Region for the IPAM, you'll get an error.</p>
    pub fn locale(&self) -> std::option::Option<&str> {
        self.locale.as_deref()
    }
    /// <p>The depth of pools in your IPAM pool. The pool depth quota is 10. For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/ipam/quotas-ipam.html">Quotas in IPAM</a> in the <i>Amazon VPC IPAM User Guide</i>. </p>
    pub fn pool_depth(&self) -> std::option::Option<i32> {
        self.pool_depth
    }
    /// <p>The state of the IPAM pool.</p>
    pub fn state(&self) -> std::option::Option<&crate::model::IpamPoolState> {
        self.state.as_ref()
    }
    /// <p>A message related to the failed creation of an IPAM pool.</p>
    pub fn state_message(&self) -> std::option::Option<&str> {
        self.state_message.as_deref()
    }
    /// <p>The description of the IPAM pool.</p>
    pub fn description(&self) -> std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>If selected, IPAM will continuously look for resources within the CIDR range of this pool and automatically import them as allocations into your IPAM. The CIDRs that will be allocated for these resources must not already be allocated to other resources in order for the import to succeed. IPAM will import a CIDR regardless of its compliance with the pool's allocation rules, so a resource might be imported and subsequently marked as noncompliant. If IPAM discovers multiple CIDRs that overlap, IPAM will import the largest CIDR only. If IPAM discovers multiple CIDRs with matching CIDRs, IPAM will randomly import one of them only. </p>
    /// <p>A locale must be set on the pool for this feature to work.</p>
    pub fn auto_import(&self) -> std::option::Option<bool> {
        self.auto_import
    }
    /// <p>Determines if a pool is publicly advertisable. This option is not available for pools with AddressFamily set to <code>ipv4</code>.</p>
    pub fn publicly_advertisable(&self) -> std::option::Option<bool> {
        self.publicly_advertisable
    }
    /// <p>The address family of the pool.</p>
    pub fn address_family(&self) -> std::option::Option<&crate::model::AddressFamily> {
        self.address_family.as_ref()
    }
    /// <p>The minimum netmask length required for CIDR allocations in this IPAM pool to be compliant. The minimum netmask length must be less than the maximum netmask length. Possible netmask lengths for IPv4 addresses are 0 - 32. Possible netmask lengths for IPv6 addresses are 0 - 128.</p>
    pub fn allocation_min_netmask_length(&self) -> std::option::Option<i32> {
        self.allocation_min_netmask_length
    }
    /// <p>The maximum netmask length possible for CIDR allocations in this IPAM pool to be compliant. The maximum netmask length must be greater than the minimum netmask length. Possible netmask lengths for IPv4 addresses are 0 - 32. Possible netmask lengths for IPv6 addresses are 0 - 128.</p>
    pub fn allocation_max_netmask_length(&self) -> std::option::Option<i32> {
        self.allocation_max_netmask_length
    }
    /// <p>The default netmask length for allocations added to this pool. If, for example, the CIDR assigned to this pool is 10.0.0.0/8 and you enter 16 here, new allocations will default to 10.0.0.0/16.</p>
    pub fn allocation_default_netmask_length(&self) -> std::option::Option<i32> {
        self.allocation_default_netmask_length
    }
    /// <p>Tags that are required for resources that use CIDRs from this IPAM pool. Resources that do not have these tags will not be allowed to allocate space from the pool. If the resources have their tags changed after they have allocated space or if the allocation tagging requirements are changed on the pool, the resource may be marked as noncompliant.</p>
    pub fn allocation_resource_tags(
        &self,
    ) -> std::option::Option<&[crate::model::IpamResourceTag]> {
        self.allocation_resource_tags.as_deref()
    }
    /// <p>The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
    /// <p>Limits which service in Amazon Web Services that the pool can be used in. "ec2", for example, allows users to use space for Elastic IP addresses and VPCs.</p>
    pub fn aws_service(&self) -> std::option::Option<&crate::model::IpamPoolAwsService> {
        self.aws_service.as_ref()
    }
}
/// See [`IpamPool`](crate::model::IpamPool).
pub mod ipam_pool {

    /// A builder for [`IpamPool`](crate::model::IpamPool).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) owner_id: std::option::Option<std::string::String>,
        pub(crate) ipam_pool_id: std::option::Option<std::string::String>,
        pub(crate) source_ipam_pool_id: std::option::Option<std::string::String>,
        pub(crate) ipam_pool_arn: std::option::Option<std::string::String>,
        pub(crate) ipam_scope_arn: std::option::Option<std::string::String>,
        pub(crate) ipam_scope_type: std::option::Option<crate::model::IpamScopeType>,
        pub(crate) ipam_arn: std::option::Option<std::string::String>,
        pub(crate) ipam_region: std::option::Option<std::string::String>,
        pub(crate) locale: std::option::Option<std::string::String>,
        pub(crate) pool_depth: std::option::Option<i32>,
        pub(crate) state: std::option::Option<crate::model::IpamPoolState>,
        pub(crate) state_message: std::option::Option<std::string::String>,
        pub(crate) description: std::option::Option<std::string::String>,
        pub(crate) auto_import: std::option::Option<bool>,
        pub(crate) publicly_advertisable: std::option::Option<bool>,
        pub(crate) address_family: std::option::Option<crate::model::AddressFamily>,
        pub(crate) allocation_min_netmask_length: std::option::Option<i32>,
        pub(crate) allocation_max_netmask_length: std::option::Option<i32>,
        pub(crate) allocation_default_netmask_length: std::option::Option<i32>,
        pub(crate) allocation_resource_tags:
            std::option::Option<std::vec::Vec<crate::model::IpamResourceTag>>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        pub(crate) aws_service: std::option::Option<crate::model::IpamPoolAwsService>,
    }
    impl Builder {
        /// <p>The Amazon Web Services account ID of the owner of the IPAM pool.</p>
        pub fn owner_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.owner_id = Some(input.into());
            self
        }
        /// <p>The Amazon Web Services account ID of the owner of the IPAM pool.</p>
        pub fn set_owner_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.owner_id = input;
            self
        }
        /// <p>The ID of the IPAM pool.</p>
        pub fn ipam_pool_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.ipam_pool_id = Some(input.into());
            self
        }
        /// <p>The ID of the IPAM pool.</p>
        pub fn set_ipam_pool_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.ipam_pool_id = input;
            self
        }
        /// <p>The ID of the source IPAM pool. You can use this option to create an IPAM pool within an existing source pool.</p>
        pub fn source_ipam_pool_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.source_ipam_pool_id = Some(input.into());
            self
        }
        /// <p>The ID of the source IPAM pool. You can use this option to create an IPAM pool within an existing source pool.</p>
        pub fn set_source_ipam_pool_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.source_ipam_pool_id = input;
            self
        }
        /// <p>The ARN of the IPAM pool.</p>
        pub fn ipam_pool_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.ipam_pool_arn = Some(input.into());
            self
        }
        /// <p>The ARN of the IPAM pool.</p>
        pub fn set_ipam_pool_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.ipam_pool_arn = input;
            self
        }
        /// <p>The ARN of the scope of the IPAM pool.</p>
        pub fn ipam_scope_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.ipam_scope_arn = Some(input.into());
            self
        }
        /// <p>The ARN of the scope of the IPAM pool.</p>
        pub fn set_ipam_scope_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.ipam_scope_arn = input;
            self
        }
        /// <p>In IPAM, a scope is the highest-level container within IPAM. An IPAM contains two default scopes. Each scope represents the IP space for a single network. The private scope is intended for all private IP address space. The public scope is intended for all public IP address space. Scopes enable you to reuse IP addresses across multiple unconnected networks without causing IP address overlap or conflict.</p>
        pub fn ipam_scope_type(mut self, input: crate::model::IpamScopeType) -> Self {
            self.ipam_scope_type = Some(input);
            self
        }
        /// <p>In IPAM, a scope is the highest-level container within IPAM. An IPAM contains two default scopes. Each scope represents the IP space for a single network. The private scope is intended for all private IP address space. The public scope is intended for all public IP address space. Scopes enable you to reuse IP addresses across multiple unconnected networks without causing IP address overlap or conflict.</p>
        pub fn set_ipam_scope_type(
            mut self,
            input: std::option::Option<crate::model::IpamScopeType>,
        ) -> Self {
            self.ipam_scope_type = input;
            self
        }
        /// <p>The ARN of the IPAM.</p>
        pub fn ipam_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.ipam_arn = Some(input.into());
            self
        }
        /// <p>The ARN of the IPAM.</p>
        pub fn set_ipam_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.ipam_arn = input;
            self
        }
        /// <p>The Amazon Web Services Region of the IPAM pool.</p>
        pub fn ipam_region(mut self, input: impl Into<std::string::String>) -> Self {
            self.ipam_region = Some(input.into());
            self
        }
        /// <p>The Amazon Web Services Region of the IPAM pool.</p>
        pub fn set_ipam_region(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.ipam_region = input;
            self
        }
        /// <p>The locale of the IPAM pool. In IPAM, the locale is the Amazon Web Services Region where you want to make an IPAM pool available for allocations. Only resources in the same Region as the locale of the pool can get IP address allocations from the pool. You can only allocate a CIDR for a VPC, for example, from an IPAM pool that shares a locale with the VPC’s Region. Note that once you choose a Locale for a pool, you cannot modify it. If you choose an Amazon Web Services Region for locale that has not been configured as an operating Region for the IPAM, you'll get an error.</p>
        pub fn locale(mut self, input: impl Into<std::string::String>) -> Self {
            self.locale = Some(input.into());
            self
        }
        /// <p>The locale of the IPAM pool. In IPAM, the locale is the Amazon Web Services Region where you want to make an IPAM pool available for allocations. Only resources in the same Region as the locale of the pool can get IP address allocations from the pool. You can only allocate a CIDR for a VPC, for example, from an IPAM pool that shares a locale with the VPC’s Region. Note that once you choose a Locale for a pool, you cannot modify it. If you choose an Amazon Web Services Region for locale that has not been configured as an operating Region for the IPAM, you'll get an error.</p>
        pub fn set_locale(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.locale = input;
            self
        }
        /// <p>The depth of pools in your IPAM pool. The pool depth quota is 10. For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/ipam/quotas-ipam.html">Quotas in IPAM</a> in the <i>Amazon VPC IPAM User Guide</i>. </p>
        pub fn pool_depth(mut self, input: i32) -> Self {
            self.pool_depth = Some(input);
            self
        }
        /// <p>The depth of pools in your IPAM pool. The pool depth quota is 10. For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/ipam/quotas-ipam.html">Quotas in IPAM</a> in the <i>Amazon VPC IPAM User Guide</i>. </p>
        pub fn set_pool_depth(mut self, input: std::option::Option<i32>) -> Self {
            self.pool_depth = input;
            self
        }
        /// <p>The state of the IPAM pool.</p>
        pub fn state(mut self, input: crate::model::IpamPoolState) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>The state of the IPAM pool.</p>
        pub fn set_state(
            mut self,
            input: std::option::Option<crate::model::IpamPoolState>,
        ) -> Self {
            self.state = input;
            self
        }
        /// <p>A message related to the failed creation of an IPAM pool.</p>
        pub fn state_message(mut self, input: impl Into<std::string::String>) -> Self {
            self.state_message = Some(input.into());
            self
        }
        /// <p>A message related to the failed creation of an IPAM pool.</p>
        pub fn set_state_message(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.state_message = input;
            self
        }
        /// <p>The description of the IPAM pool.</p>
        pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
            self.description = Some(input.into());
            self
        }
        /// <p>The description of the IPAM pool.</p>
        pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.description = input;
            self
        }
        /// <p>If selected, IPAM will continuously look for resources within the CIDR range of this pool and automatically import them as allocations into your IPAM. The CIDRs that will be allocated for these resources must not already be allocated to other resources in order for the import to succeed. IPAM will import a CIDR regardless of its compliance with the pool's allocation rules, so a resource might be imported and subsequently marked as noncompliant. If IPAM discovers multiple CIDRs that overlap, IPAM will import the largest CIDR only. If IPAM discovers multiple CIDRs with matching CIDRs, IPAM will randomly import one of them only. </p>
        /// <p>A locale must be set on the pool for this feature to work.</p>
        pub fn auto_import(mut self, input: bool) -> Self {
            self.auto_import = Some(input);
            self
        }
        /// <p>If selected, IPAM will continuously look for resources within the CIDR range of this pool and automatically import them as allocations into your IPAM. The CIDRs that will be allocated for these resources must not already be allocated to other resources in order for the import to succeed. IPAM will import a CIDR regardless of its compliance with the pool's allocation rules, so a resource might be imported and subsequently marked as noncompliant. If IPAM discovers multiple CIDRs that overlap, IPAM will import the largest CIDR only. If IPAM discovers multiple CIDRs with matching CIDRs, IPAM will randomly import one of them only. </p>
        /// <p>A locale must be set on the pool for this feature to work.</p>
        pub fn set_auto_import(mut self, input: std::option::Option<bool>) -> Self {
            self.auto_import = input;
            self
        }
        /// <p>Determines if a pool is publicly advertisable. This option is not available for pools with AddressFamily set to <code>ipv4</code>.</p>
        pub fn publicly_advertisable(mut self, input: bool) -> Self {
            self.publicly_advertisable = Some(input);
            self
        }
        /// <p>Determines if a pool is publicly advertisable. This option is not available for pools with AddressFamily set to <code>ipv4</code>.</p>
        pub fn set_publicly_advertisable(mut self, input: std::option::Option<bool>) -> Self {
            self.publicly_advertisable = input;
            self
        }
        /// <p>The address family of the pool.</p>
        pub fn address_family(mut self, input: crate::model::AddressFamily) -> Self {
            self.address_family = Some(input);
            self
        }
        /// <p>The address family of the pool.</p>
        pub fn set_address_family(
            mut self,
            input: std::option::Option<crate::model::AddressFamily>,
        ) -> Self {
            self.address_family = input;
            self
        }
        /// <p>The minimum netmask length required for CIDR allocations in this IPAM pool to be compliant. The minimum netmask length must be less than the maximum netmask length. Possible netmask lengths for IPv4 addresses are 0 - 32. Possible netmask lengths for IPv6 addresses are 0 - 128.</p>
        pub fn allocation_min_netmask_length(mut self, input: i32) -> Self {
            self.allocation_min_netmask_length = Some(input);
            self
        }
        /// <p>The minimum netmask length required for CIDR allocations in this IPAM pool to be compliant. The minimum netmask length must be less than the maximum netmask length. Possible netmask lengths for IPv4 addresses are 0 - 32. Possible netmask lengths for IPv6 addresses are 0 - 128.</p>
        pub fn set_allocation_min_netmask_length(
            mut self,
            input: std::option::Option<i32>,
        ) -> Self {
            self.allocation_min_netmask_length = input;
            self
        }
        /// <p>The maximum netmask length possible for CIDR allocations in this IPAM pool to be compliant. The maximum netmask length must be greater than the minimum netmask length. Possible netmask lengths for IPv4 addresses are 0 - 32. Possible netmask lengths for IPv6 addresses are 0 - 128.</p>
        pub fn allocation_max_netmask_length(mut self, input: i32) -> Self {
            self.allocation_max_netmask_length = Some(input);
            self
        }
        /// <p>The maximum netmask length possible for CIDR allocations in this IPAM pool to be compliant. The maximum netmask length must be greater than the minimum netmask length. Possible netmask lengths for IPv4 addresses are 0 - 32. Possible netmask lengths for IPv6 addresses are 0 - 128.</p>
        pub fn set_allocation_max_netmask_length(
            mut self,
            input: std::option::Option<i32>,
        ) -> Self {
            self.allocation_max_netmask_length = input;
            self
        }
        /// <p>The default netmask length for allocations added to this pool. If, for example, the CIDR assigned to this pool is 10.0.0.0/8 and you enter 16 here, new allocations will default to 10.0.0.0/16.</p>
        pub fn allocation_default_netmask_length(mut self, input: i32) -> Self {
            self.allocation_default_netmask_length = Some(input);
            self
        }
        /// <p>The default netmask length for allocations added to this pool. If, for example, the CIDR assigned to this pool is 10.0.0.0/8 and you enter 16 here, new allocations will default to 10.0.0.0/16.</p>
        pub fn set_allocation_default_netmask_length(
            mut self,
            input: std::option::Option<i32>,
        ) -> Self {
            self.allocation_default_netmask_length = input;
            self
        }
        /// Appends an item to `allocation_resource_tags`.
        ///
        /// To override the contents of this collection use [`set_allocation_resource_tags`](Self::set_allocation_resource_tags).
        ///
        /// <p>Tags that are required for resources that use CIDRs from this IPAM pool. Resources that do not have these tags will not be allowed to allocate space from the pool. If the resources have their tags changed after they have allocated space or if the allocation tagging requirements are changed on the pool, the resource may be marked as noncompliant.</p>
        pub fn allocation_resource_tags(mut self, input: crate::model::IpamResourceTag) -> Self {
            let mut v = self.allocation_resource_tags.unwrap_or_default();
            v.push(input);
            self.allocation_resource_tags = Some(v);
            self
        }
        /// <p>Tags that are required for resources that use CIDRs from this IPAM pool. Resources that do not have these tags will not be allowed to allocate space from the pool. If the resources have their tags changed after they have allocated space or if the allocation tagging requirements are changed on the pool, the resource may be marked as noncompliant.</p>
        pub fn set_allocation_resource_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::IpamResourceTag>>,
        ) -> Self {
            self.allocation_resource_tags = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// <p>Limits which service in Amazon Web Services that the pool can be used in. "ec2", for example, allows users to use space for Elastic IP addresses and VPCs.</p>
        pub fn aws_service(mut self, input: crate::model::IpamPoolAwsService) -> Self {
            self.aws_service = Some(input);
            self
        }
        /// <p>Limits which service in Amazon Web Services that the pool can be used in. "ec2", for example, allows users to use space for Elastic IP addresses and VPCs.</p>
        pub fn set_aws_service(
            mut self,
            input: std::option::Option<crate::model::IpamPoolAwsService>,
        ) -> Self {
            self.aws_service = input;
            self
        }
        /// Consumes the builder and constructs a [`IpamPool`](crate::model::IpamPool).
        pub fn build(self) -> crate::model::IpamPool {
            crate::model::IpamPool {
                owner_id: self.owner_id,
                ipam_pool_id: self.ipam_pool_id,
                source_ipam_pool_id: self.source_ipam_pool_id,
                ipam_pool_arn: self.ipam_pool_arn,
                ipam_scope_arn: self.ipam_scope_arn,
                ipam_scope_type: self.ipam_scope_type,
                ipam_arn: self.ipam_arn,
                ipam_region: self.ipam_region,
                locale: self.locale,
                pool_depth: self.pool_depth,
                state: self.state,
                state_message: self.state_message,
                description: self.description,
                auto_import: self.auto_import,
                publicly_advertisable: self.publicly_advertisable,
                address_family: self.address_family,
                allocation_min_netmask_length: self.allocation_min_netmask_length,
                allocation_max_netmask_length: self.allocation_max_netmask_length,
                allocation_default_netmask_length: self.allocation_default_netmask_length,
                allocation_resource_tags: self.allocation_resource_tags,
                tags: self.tags,
                aws_service: self.aws_service,
            }
        }
    }
}
impl IpamPool {
    /// Creates a new builder-style object to manufacture [`IpamPool`](crate::model::IpamPool).
    pub fn builder() -> crate::model::ipam_pool::Builder {
        crate::model::ipam_pool::Builder::default()
    }
}

/// When writing a match expression against `IpamPoolAwsService`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let ipampoolawsservice = unimplemented!();
/// match ipampoolawsservice {
///     IpamPoolAwsService::Ec2 => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `ipampoolawsservice` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `IpamPoolAwsService::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `IpamPoolAwsService::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `IpamPoolAwsService::NewFeature` is defined.
/// Specifically, when `ipampoolawsservice` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `IpamPoolAwsService::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 IpamPoolAwsService {
    #[allow(missing_docs)] // documentation missing in model
    Ec2,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for IpamPoolAwsService {
    fn from(s: &str) -> Self {
        match s {
            "ec2" => IpamPoolAwsService::Ec2,
            other => {
                IpamPoolAwsService::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for IpamPoolAwsService {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(IpamPoolAwsService::from(s))
    }
}
impl IpamPoolAwsService {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            IpamPoolAwsService::Ec2 => "ec2",
            IpamPoolAwsService::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["ec2"]
    }
}
impl AsRef<str> for IpamPoolAwsService {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `AddressFamily`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let addressfamily = unimplemented!();
/// match addressfamily {
///     AddressFamily::Ipv4 => { /* ... */ },
///     AddressFamily::Ipv6 => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `addressfamily` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `AddressFamily::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `AddressFamily::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `AddressFamily::NewFeature` is defined.
/// Specifically, when `addressfamily` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `AddressFamily::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 AddressFamily {
    #[allow(missing_docs)] // documentation missing in model
    Ipv4,
    #[allow(missing_docs)] // documentation missing in model
    Ipv6,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for AddressFamily {
    fn from(s: &str) -> Self {
        match s {
            "ipv4" => AddressFamily::Ipv4,
            "ipv6" => AddressFamily::Ipv6,
            other => AddressFamily::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for AddressFamily {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(AddressFamily::from(s))
    }
}
impl AddressFamily {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            AddressFamily::Ipv4 => "ipv4",
            AddressFamily::Ipv6 => "ipv6",
            AddressFamily::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["ipv4", "ipv6"]
    }
}
impl AsRef<str> for AddressFamily {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `IpamPoolState`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let ipampoolstate = unimplemented!();
/// match ipampoolstate {
///     IpamPoolState::CreateComplete => { /* ... */ },
///     IpamPoolState::CreateFailed => { /* ... */ },
///     IpamPoolState::CreateInProgress => { /* ... */ },
///     IpamPoolState::DeleteComplete => { /* ... */ },
///     IpamPoolState::DeleteFailed => { /* ... */ },
///     IpamPoolState::DeleteInProgress => { /* ... */ },
///     IpamPoolState::IsolateComplete => { /* ... */ },
///     IpamPoolState::IsolateInProgress => { /* ... */ },
///     IpamPoolState::ModifyComplete => { /* ... */ },
///     IpamPoolState::ModifyFailed => { /* ... */ },
///     IpamPoolState::ModifyInProgress => { /* ... */ },
///     IpamPoolState::RestoreInProgress => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `ipampoolstate` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `IpamPoolState::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `IpamPoolState::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `IpamPoolState::NewFeature` is defined.
/// Specifically, when `ipampoolstate` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `IpamPoolState::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 IpamPoolState {
    #[allow(missing_docs)] // documentation missing in model
    CreateComplete,
    #[allow(missing_docs)] // documentation missing in model
    CreateFailed,
    #[allow(missing_docs)] // documentation missing in model
    CreateInProgress,
    #[allow(missing_docs)] // documentation missing in model
    DeleteComplete,
    #[allow(missing_docs)] // documentation missing in model
    DeleteFailed,
    #[allow(missing_docs)] // documentation missing in model
    DeleteInProgress,
    #[allow(missing_docs)] // documentation missing in model
    IsolateComplete,
    #[allow(missing_docs)] // documentation missing in model
    IsolateInProgress,
    #[allow(missing_docs)] // documentation missing in model
    ModifyComplete,
    #[allow(missing_docs)] // documentation missing in model
    ModifyFailed,
    #[allow(missing_docs)] // documentation missing in model
    ModifyInProgress,
    #[allow(missing_docs)] // documentation missing in model
    RestoreInProgress,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for IpamPoolState {
    fn from(s: &str) -> Self {
        match s {
            "create-complete" => IpamPoolState::CreateComplete,
            "create-failed" => IpamPoolState::CreateFailed,
            "create-in-progress" => IpamPoolState::CreateInProgress,
            "delete-complete" => IpamPoolState::DeleteComplete,
            "delete-failed" => IpamPoolState::DeleteFailed,
            "delete-in-progress" => IpamPoolState::DeleteInProgress,
            "isolate-complete" => IpamPoolState::IsolateComplete,
            "isolate-in-progress" => IpamPoolState::IsolateInProgress,
            "modify-complete" => IpamPoolState::ModifyComplete,
            "modify-failed" => IpamPoolState::ModifyFailed,
            "modify-in-progress" => IpamPoolState::ModifyInProgress,
            "restore-in-progress" => IpamPoolState::RestoreInProgress,
            other => IpamPoolState::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for IpamPoolState {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(IpamPoolState::from(s))
    }
}
impl IpamPoolState {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            IpamPoolState::CreateComplete => "create-complete",
            IpamPoolState::CreateFailed => "create-failed",
            IpamPoolState::CreateInProgress => "create-in-progress",
            IpamPoolState::DeleteComplete => "delete-complete",
            IpamPoolState::DeleteFailed => "delete-failed",
            IpamPoolState::DeleteInProgress => "delete-in-progress",
            IpamPoolState::IsolateComplete => "isolate-complete",
            IpamPoolState::IsolateInProgress => "isolate-in-progress",
            IpamPoolState::ModifyComplete => "modify-complete",
            IpamPoolState::ModifyFailed => "modify-failed",
            IpamPoolState::ModifyInProgress => "modify-in-progress",
            IpamPoolState::RestoreInProgress => "restore-in-progress",
            IpamPoolState::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &[
            "create-complete",
            "create-failed",
            "create-in-progress",
            "delete-complete",
            "delete-failed",
            "delete-in-progress",
            "isolate-complete",
            "isolate-in-progress",
            "modify-complete",
            "modify-failed",
            "modify-in-progress",
            "restore-in-progress",
        ]
    }
}
impl AsRef<str> for IpamPoolState {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>A tag on an IPAM resource.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct RequestIpamResourceTag {
    /// <p>The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p>
    #[doc(hidden)]
    pub key: std::option::Option<std::string::String>,
    /// <p>The value for the tag.</p>
    #[doc(hidden)]
    pub value: std::option::Option<std::string::String>,
}
impl RequestIpamResourceTag {
    /// <p>The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p>
    pub fn key(&self) -> std::option::Option<&str> {
        self.key.as_deref()
    }
    /// <p>The value for the tag.</p>
    pub fn value(&self) -> std::option::Option<&str> {
        self.value.as_deref()
    }
}
/// See [`RequestIpamResourceTag`](crate::model::RequestIpamResourceTag).
pub mod request_ipam_resource_tag {

    /// A builder for [`RequestIpamResourceTag`](crate::model::RequestIpamResourceTag).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) key: std::option::Option<std::string::String>,
        pub(crate) value: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p>
        pub fn key(mut self, input: impl Into<std::string::String>) -> Self {
            self.key = Some(input.into());
            self
        }
        /// <p>The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p>
        pub fn set_key(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.key = input;
            self
        }
        /// <p>The value for the tag.</p>
        pub fn value(mut self, input: impl Into<std::string::String>) -> Self {
            self.value = Some(input.into());
            self
        }
        /// <p>The value for the tag.</p>
        pub fn set_value(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.value = input;
            self
        }
        /// Consumes the builder and constructs a [`RequestIpamResourceTag`](crate::model::RequestIpamResourceTag).
        pub fn build(self) -> crate::model::RequestIpamResourceTag {
            crate::model::RequestIpamResourceTag {
                key: self.key,
                value: self.value,
            }
        }
    }
}
impl RequestIpamResourceTag {
    /// Creates a new builder-style object to manufacture [`RequestIpamResourceTag`](crate::model::RequestIpamResourceTag).
    pub fn builder() -> crate::model::request_ipam_resource_tag::Builder {
        crate::model::request_ipam_resource_tag::Builder::default()
    }
}

/// <p>IPAM is a VPC feature that you can use to automate your IP address management workflows including assigning, tracking, troubleshooting, and auditing IP addresses across Amazon Web Services Regions and accounts throughout your Amazon Web Services Organization. For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/ipam/what-is-it-ipam.html">What is IPAM?</a> in the <i>Amazon VPC IPAM User Guide</i>.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Ipam {
    /// <p>The Amazon Web Services account ID of the owner of the IPAM.</p>
    #[doc(hidden)]
    pub owner_id: std::option::Option<std::string::String>,
    /// <p>The ID of the IPAM.</p>
    #[doc(hidden)]
    pub ipam_id: std::option::Option<std::string::String>,
    /// <p>The ARN of the IPAM.</p>
    #[doc(hidden)]
    pub ipam_arn: std::option::Option<std::string::String>,
    /// <p>The Amazon Web Services Region of the IPAM.</p>
    #[doc(hidden)]
    pub ipam_region: std::option::Option<std::string::String>,
    /// <p>The ID of the IPAM's default public scope.</p>
    #[doc(hidden)]
    pub public_default_scope_id: std::option::Option<std::string::String>,
    /// <p>The ID of the IPAM's default private scope.</p>
    #[doc(hidden)]
    pub private_default_scope_id: std::option::Option<std::string::String>,
    /// <p>The number of scopes in the IPAM. The scope quota is 5. For more information on quotas, see <a href="https://docs.aws.amazon.com/vpc/latest/ipam/quotas-ipam.html">Quotas in IPAM</a> in the <i>Amazon VPC IPAM User Guide</i>. </p>
    #[doc(hidden)]
    pub scope_count: std::option::Option<i32>,
    /// <p>The description for the IPAM.</p>
    #[doc(hidden)]
    pub description: std::option::Option<std::string::String>,
    /// <p>The operating Regions for an IPAM. Operating Regions are Amazon Web Services Regions where the IPAM is allowed to manage IP address CIDRs. IPAM only discovers and monitors resources in the Amazon Web Services Regions you select as operating Regions.</p>
    /// <p>For more information about operating Regions, see <a href="https://docs.aws.amazon.com/vpc/latest/ipam/create-ipam.html">Create an IPAM</a> in the <i>Amazon VPC IPAM User Guide</i>.</p>
    #[doc(hidden)]
    pub operating_regions: std::option::Option<std::vec::Vec<crate::model::IpamOperatingRegion>>,
    /// <p>The state of the IPAM.</p>
    #[doc(hidden)]
    pub state: std::option::Option<crate::model::IpamState>,
    /// <p>The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl Ipam {
    /// <p>The Amazon Web Services account ID of the owner of the IPAM.</p>
    pub fn owner_id(&self) -> std::option::Option<&str> {
        self.owner_id.as_deref()
    }
    /// <p>The ID of the IPAM.</p>
    pub fn ipam_id(&self) -> std::option::Option<&str> {
        self.ipam_id.as_deref()
    }
    /// <p>The ARN of the IPAM.</p>
    pub fn ipam_arn(&self) -> std::option::Option<&str> {
        self.ipam_arn.as_deref()
    }
    /// <p>The Amazon Web Services Region of the IPAM.</p>
    pub fn ipam_region(&self) -> std::option::Option<&str> {
        self.ipam_region.as_deref()
    }
    /// <p>The ID of the IPAM's default public scope.</p>
    pub fn public_default_scope_id(&self) -> std::option::Option<&str> {
        self.public_default_scope_id.as_deref()
    }
    /// <p>The ID of the IPAM's default private scope.</p>
    pub fn private_default_scope_id(&self) -> std::option::Option<&str> {
        self.private_default_scope_id.as_deref()
    }
    /// <p>The number of scopes in the IPAM. The scope quota is 5. For more information on quotas, see <a href="https://docs.aws.amazon.com/vpc/latest/ipam/quotas-ipam.html">Quotas in IPAM</a> in the <i>Amazon VPC IPAM User Guide</i>. </p>
    pub fn scope_count(&self) -> std::option::Option<i32> {
        self.scope_count
    }
    /// <p>The description for the IPAM.</p>
    pub fn description(&self) -> std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The operating Regions for an IPAM. Operating Regions are Amazon Web Services Regions where the IPAM is allowed to manage IP address CIDRs. IPAM only discovers and monitors resources in the Amazon Web Services Regions you select as operating Regions.</p>
    /// <p>For more information about operating Regions, see <a href="https://docs.aws.amazon.com/vpc/latest/ipam/create-ipam.html">Create an IPAM</a> in the <i>Amazon VPC IPAM User Guide</i>.</p>
    pub fn operating_regions(&self) -> std::option::Option<&[crate::model::IpamOperatingRegion]> {
        self.operating_regions.as_deref()
    }
    /// <p>The state of the IPAM.</p>
    pub fn state(&self) -> std::option::Option<&crate::model::IpamState> {
        self.state.as_ref()
    }
    /// <p>The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
}
/// See [`Ipam`](crate::model::Ipam).
pub mod ipam {

    /// A builder for [`Ipam`](crate::model::Ipam).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) owner_id: std::option::Option<std::string::String>,
        pub(crate) ipam_id: std::option::Option<std::string::String>,
        pub(crate) ipam_arn: std::option::Option<std::string::String>,
        pub(crate) ipam_region: std::option::Option<std::string::String>,
        pub(crate) public_default_scope_id: std::option::Option<std::string::String>,
        pub(crate) private_default_scope_id: std::option::Option<std::string::String>,
        pub(crate) scope_count: std::option::Option<i32>,
        pub(crate) description: std::option::Option<std::string::String>,
        pub(crate) operating_regions:
            std::option::Option<std::vec::Vec<crate::model::IpamOperatingRegion>>,
        pub(crate) state: std::option::Option<crate::model::IpamState>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    }
    impl Builder {
        /// <p>The Amazon Web Services account ID of the owner of the IPAM.</p>
        pub fn owner_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.owner_id = Some(input.into());
            self
        }
        /// <p>The Amazon Web Services account ID of the owner of the IPAM.</p>
        pub fn set_owner_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.owner_id = input;
            self
        }
        /// <p>The ID of the IPAM.</p>
        pub fn ipam_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.ipam_id = Some(input.into());
            self
        }
        /// <p>The ID of the IPAM.</p>
        pub fn set_ipam_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.ipam_id = input;
            self
        }
        /// <p>The ARN of the IPAM.</p>
        pub fn ipam_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.ipam_arn = Some(input.into());
            self
        }
        /// <p>The ARN of the IPAM.</p>
        pub fn set_ipam_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.ipam_arn = input;
            self
        }
        /// <p>The Amazon Web Services Region of the IPAM.</p>
        pub fn ipam_region(mut self, input: impl Into<std::string::String>) -> Self {
            self.ipam_region = Some(input.into());
            self
        }
        /// <p>The Amazon Web Services Region of the IPAM.</p>
        pub fn set_ipam_region(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.ipam_region = input;
            self
        }
        /// <p>The ID of the IPAM's default public scope.</p>
        pub fn public_default_scope_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.public_default_scope_id = Some(input.into());
            self
        }
        /// <p>The ID of the IPAM's default public scope.</p>
        pub fn set_public_default_scope_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.public_default_scope_id = input;
            self
        }
        /// <p>The ID of the IPAM's default private scope.</p>
        pub fn private_default_scope_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.private_default_scope_id = Some(input.into());
            self
        }
        /// <p>The ID of the IPAM's default private scope.</p>
        pub fn set_private_default_scope_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.private_default_scope_id = input;
            self
        }
        /// <p>The number of scopes in the IPAM. The scope quota is 5. For more information on quotas, see <a href="https://docs.aws.amazon.com/vpc/latest/ipam/quotas-ipam.html">Quotas in IPAM</a> in the <i>Amazon VPC IPAM User Guide</i>. </p>
        pub fn scope_count(mut self, input: i32) -> Self {
            self.scope_count = Some(input);
            self
        }
        /// <p>The number of scopes in the IPAM. The scope quota is 5. For more information on quotas, see <a href="https://docs.aws.amazon.com/vpc/latest/ipam/quotas-ipam.html">Quotas in IPAM</a> in the <i>Amazon VPC IPAM User Guide</i>. </p>
        pub fn set_scope_count(mut self, input: std::option::Option<i32>) -> Self {
            self.scope_count = input;
            self
        }
        /// <p>The description for the IPAM.</p>
        pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
            self.description = Some(input.into());
            self
        }
        /// <p>The description for the IPAM.</p>
        pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.description = input;
            self
        }
        /// Appends an item to `operating_regions`.
        ///
        /// To override the contents of this collection use [`set_operating_regions`](Self::set_operating_regions).
        ///
        /// <p>The operating Regions for an IPAM. Operating Regions are Amazon Web Services Regions where the IPAM is allowed to manage IP address CIDRs. IPAM only discovers and monitors resources in the Amazon Web Services Regions you select as operating Regions.</p>
        /// <p>For more information about operating Regions, see <a href="https://docs.aws.amazon.com/vpc/latest/ipam/create-ipam.html">Create an IPAM</a> in the <i>Amazon VPC IPAM User Guide</i>.</p>
        pub fn operating_regions(mut self, input: crate::model::IpamOperatingRegion) -> Self {
            let mut v = self.operating_regions.unwrap_or_default();
            v.push(input);
            self.operating_regions = Some(v);
            self
        }
        /// <p>The operating Regions for an IPAM. Operating Regions are Amazon Web Services Regions where the IPAM is allowed to manage IP address CIDRs. IPAM only discovers and monitors resources in the Amazon Web Services Regions you select as operating Regions.</p>
        /// <p>For more information about operating Regions, see <a href="https://docs.aws.amazon.com/vpc/latest/ipam/create-ipam.html">Create an IPAM</a> in the <i>Amazon VPC IPAM User Guide</i>.</p>
        pub fn set_operating_regions(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::IpamOperatingRegion>>,
        ) -> Self {
            self.operating_regions = input;
            self
        }
        /// <p>The state of the IPAM.</p>
        pub fn state(mut self, input: crate::model::IpamState) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>The state of the IPAM.</p>
        pub fn set_state(mut self, input: std::option::Option<crate::model::IpamState>) -> Self {
            self.state = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// Consumes the builder and constructs a [`Ipam`](crate::model::Ipam).
        pub fn build(self) -> crate::model::Ipam {
            crate::model::Ipam {
                owner_id: self.owner_id,
                ipam_id: self.ipam_id,
                ipam_arn: self.ipam_arn,
                ipam_region: self.ipam_region,
                public_default_scope_id: self.public_default_scope_id,
                private_default_scope_id: self.private_default_scope_id,
                scope_count: self.scope_count,
                description: self.description,
                operating_regions: self.operating_regions,
                state: self.state,
                tags: self.tags,
            }
        }
    }
}
impl Ipam {
    /// Creates a new builder-style object to manufacture [`Ipam`](crate::model::Ipam).
    pub fn builder() -> crate::model::ipam::Builder {
        crate::model::ipam::Builder::default()
    }
}

/// When writing a match expression against `IpamState`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let ipamstate = unimplemented!();
/// match ipamstate {
///     IpamState::CreateComplete => { /* ... */ },
///     IpamState::CreateFailed => { /* ... */ },
///     IpamState::CreateInProgress => { /* ... */ },
///     IpamState::DeleteComplete => { /* ... */ },
///     IpamState::DeleteFailed => { /* ... */ },
///     IpamState::DeleteInProgress => { /* ... */ },
///     IpamState::IsolateComplete => { /* ... */ },
///     IpamState::IsolateInProgress => { /* ... */ },
///     IpamState::ModifyComplete => { /* ... */ },
///     IpamState::ModifyFailed => { /* ... */ },
///     IpamState::ModifyInProgress => { /* ... */ },
///     IpamState::RestoreInProgress => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `ipamstate` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `IpamState::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `IpamState::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `IpamState::NewFeature` is defined.
/// Specifically, when `ipamstate` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `IpamState::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 IpamState {
    #[allow(missing_docs)] // documentation missing in model
    CreateComplete,
    #[allow(missing_docs)] // documentation missing in model
    CreateFailed,
    #[allow(missing_docs)] // documentation missing in model
    CreateInProgress,
    #[allow(missing_docs)] // documentation missing in model
    DeleteComplete,
    #[allow(missing_docs)] // documentation missing in model
    DeleteFailed,
    #[allow(missing_docs)] // documentation missing in model
    DeleteInProgress,
    #[allow(missing_docs)] // documentation missing in model
    IsolateComplete,
    #[allow(missing_docs)] // documentation missing in model
    IsolateInProgress,
    #[allow(missing_docs)] // documentation missing in model
    ModifyComplete,
    #[allow(missing_docs)] // documentation missing in model
    ModifyFailed,
    #[allow(missing_docs)] // documentation missing in model
    ModifyInProgress,
    #[allow(missing_docs)] // documentation missing in model
    RestoreInProgress,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for IpamState {
    fn from(s: &str) -> Self {
        match s {
            "create-complete" => IpamState::CreateComplete,
            "create-failed" => IpamState::CreateFailed,
            "create-in-progress" => IpamState::CreateInProgress,
            "delete-complete" => IpamState::DeleteComplete,
            "delete-failed" => IpamState::DeleteFailed,
            "delete-in-progress" => IpamState::DeleteInProgress,
            "isolate-complete" => IpamState::IsolateComplete,
            "isolate-in-progress" => IpamState::IsolateInProgress,
            "modify-complete" => IpamState::ModifyComplete,
            "modify-failed" => IpamState::ModifyFailed,
            "modify-in-progress" => IpamState::ModifyInProgress,
            "restore-in-progress" => IpamState::RestoreInProgress,
            other => IpamState::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for IpamState {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(IpamState::from(s))
    }
}
impl IpamState {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            IpamState::CreateComplete => "create-complete",
            IpamState::CreateFailed => "create-failed",
            IpamState::CreateInProgress => "create-in-progress",
            IpamState::DeleteComplete => "delete-complete",
            IpamState::DeleteFailed => "delete-failed",
            IpamState::DeleteInProgress => "delete-in-progress",
            IpamState::IsolateComplete => "isolate-complete",
            IpamState::IsolateInProgress => "isolate-in-progress",
            IpamState::ModifyComplete => "modify-complete",
            IpamState::ModifyFailed => "modify-failed",
            IpamState::ModifyInProgress => "modify-in-progress",
            IpamState::RestoreInProgress => "restore-in-progress",
            IpamState::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &[
            "create-complete",
            "create-failed",
            "create-in-progress",
            "delete-complete",
            "delete-failed",
            "delete-in-progress",
            "isolate-complete",
            "isolate-in-progress",
            "modify-complete",
            "modify-failed",
            "modify-in-progress",
            "restore-in-progress",
        ]
    }
}
impl AsRef<str> for IpamState {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>The operating Regions for an IPAM. Operating Regions are Amazon Web Services Regions where the IPAM is allowed to manage IP address CIDRs. IPAM only discovers and monitors resources in the Amazon Web Services Regions you select as operating Regions.</p>
/// <p>For more information about operating Regions, see <a href="https://docs.aws.amazon.com/vpc/latest/ipam/create-ipam.html">Create an IPAM</a> in the <i>Amazon VPC IPAM User Guide</i>.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct IpamOperatingRegion {
    /// <p>The name of the operating Region.</p>
    #[doc(hidden)]
    pub region_name: std::option::Option<std::string::String>,
}
impl IpamOperatingRegion {
    /// <p>The name of the operating Region.</p>
    pub fn region_name(&self) -> std::option::Option<&str> {
        self.region_name.as_deref()
    }
}
/// See [`IpamOperatingRegion`](crate::model::IpamOperatingRegion).
pub mod ipam_operating_region {

    /// A builder for [`IpamOperatingRegion`](crate::model::IpamOperatingRegion).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) region_name: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The name of the operating Region.</p>
        pub fn region_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.region_name = Some(input.into());
            self
        }
        /// <p>The name of the operating Region.</p>
        pub fn set_region_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.region_name = input;
            self
        }
        /// Consumes the builder and constructs a [`IpamOperatingRegion`](crate::model::IpamOperatingRegion).
        pub fn build(self) -> crate::model::IpamOperatingRegion {
            crate::model::IpamOperatingRegion {
                region_name: self.region_name,
            }
        }
    }
}
impl IpamOperatingRegion {
    /// Creates a new builder-style object to manufacture [`IpamOperatingRegion`](crate::model::IpamOperatingRegion).
    pub fn builder() -> crate::model::ipam_operating_region::Builder {
        crate::model::ipam_operating_region::Builder::default()
    }
}

/// <p>Remove an operating Region from an IPAM. Operating Regions are Amazon Web Services Regions where the IPAM is allowed to manage IP address CIDRs. IPAM only discovers and monitors resources in the Amazon Web Services Regions you select as operating Regions.</p>
/// <p>For more information about operating Regions, see <a href="https://docs.aws.amazon.com/vpc/latest/ipam/create-ipam.html">Create an IPAM</a> in the <i>Amazon VPC IPAM User Guide</i> </p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct RemoveIpamOperatingRegion {
    /// <p>The name of the operating Region you want to remove.</p>
    #[doc(hidden)]
    pub region_name: std::option::Option<std::string::String>,
}
impl RemoveIpamOperatingRegion {
    /// <p>The name of the operating Region you want to remove.</p>
    pub fn region_name(&self) -> std::option::Option<&str> {
        self.region_name.as_deref()
    }
}
/// See [`RemoveIpamOperatingRegion`](crate::model::RemoveIpamOperatingRegion).
pub mod remove_ipam_operating_region {

    /// A builder for [`RemoveIpamOperatingRegion`](crate::model::RemoveIpamOperatingRegion).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) region_name: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The name of the operating Region you want to remove.</p>
        pub fn region_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.region_name = Some(input.into());
            self
        }
        /// <p>The name of the operating Region you want to remove.</p>
        pub fn set_region_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.region_name = input;
            self
        }
        /// Consumes the builder and constructs a [`RemoveIpamOperatingRegion`](crate::model::RemoveIpamOperatingRegion).
        pub fn build(self) -> crate::model::RemoveIpamOperatingRegion {
            crate::model::RemoveIpamOperatingRegion {
                region_name: self.region_name,
            }
        }
    }
}
impl RemoveIpamOperatingRegion {
    /// Creates a new builder-style object to manufacture [`RemoveIpamOperatingRegion`](crate::model::RemoveIpamOperatingRegion).
    pub fn builder() -> crate::model::remove_ipam_operating_region::Builder {
        crate::model::remove_ipam_operating_region::Builder::default()
    }
}

/// <p>Add an operating Region to an IPAM. Operating Regions are Amazon Web Services Regions where the IPAM is allowed to manage IP address CIDRs. IPAM only discovers and monitors resources in the Amazon Web Services Regions you select as operating Regions.</p>
/// <p>For more information about operating Regions, see <a href="https://docs.aws.amazon.com/vpc/latest/ipam/create-ipam.html">Create an IPAM</a> in the <i>Amazon VPC IPAM User Guide</i>. </p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AddIpamOperatingRegion {
    /// <p>The name of the operating Region.</p>
    #[doc(hidden)]
    pub region_name: std::option::Option<std::string::String>,
}
impl AddIpamOperatingRegion {
    /// <p>The name of the operating Region.</p>
    pub fn region_name(&self) -> std::option::Option<&str> {
        self.region_name.as_deref()
    }
}
/// See [`AddIpamOperatingRegion`](crate::model::AddIpamOperatingRegion).
pub mod add_ipam_operating_region {

    /// A builder for [`AddIpamOperatingRegion`](crate::model::AddIpamOperatingRegion).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) region_name: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The name of the operating Region.</p>
        pub fn region_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.region_name = Some(input.into());
            self
        }
        /// <p>The name of the operating Region.</p>
        pub fn set_region_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.region_name = input;
            self
        }
        /// Consumes the builder and constructs a [`AddIpamOperatingRegion`](crate::model::AddIpamOperatingRegion).
        pub fn build(self) -> crate::model::AddIpamOperatingRegion {
            crate::model::AddIpamOperatingRegion {
                region_name: self.region_name,
            }
        }
    }
}
impl AddIpamOperatingRegion {
    /// Creates a new builder-style object to manufacture [`AddIpamOperatingRegion`](crate::model::AddIpamOperatingRegion).
    pub fn builder() -> crate::model::add_ipam_operating_region::Builder {
        crate::model::add_ipam_operating_region::Builder::default()
    }
}

/// When writing a match expression against `HostTenancy`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let hosttenancy = unimplemented!();
/// match hosttenancy {
///     HostTenancy::Dedicated => { /* ... */ },
///     HostTenancy::Host => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `hosttenancy` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `HostTenancy::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `HostTenancy::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `HostTenancy::NewFeature` is defined.
/// Specifically, when `hosttenancy` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `HostTenancy::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 HostTenancy {
    #[allow(missing_docs)] // documentation missing in model
    Dedicated,
    #[allow(missing_docs)] // documentation missing in model
    Host,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for HostTenancy {
    fn from(s: &str) -> Self {
        match s {
            "dedicated" => HostTenancy::Dedicated,
            "host" => HostTenancy::Host,
            other => HostTenancy::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for HostTenancy {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(HostTenancy::from(s))
    }
}
impl HostTenancy {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            HostTenancy::Dedicated => "dedicated",
            HostTenancy::Host => "host",
            HostTenancy::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["dedicated", "host"]
    }
}
impl AsRef<str> for HostTenancy {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `Affinity`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let affinity = unimplemented!();
/// match affinity {
///     Affinity::Default => { /* ... */ },
///     Affinity::Host => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `affinity` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `Affinity::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `Affinity::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `Affinity::NewFeature` is defined.
/// Specifically, when `affinity` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `Affinity::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 Affinity {
    #[allow(missing_docs)] // documentation missing in model
    Default,
    #[allow(missing_docs)] // documentation missing in model
    Host,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for Affinity {
    fn from(s: &str) -> Self {
        match s {
            "default" => Affinity::Default,
            "host" => Affinity::Host,
            other => Affinity::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for Affinity {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(Affinity::from(s))
    }
}
impl Affinity {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            Affinity::Default => "default",
            Affinity::Host => "host",
            Affinity::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["default", "host"]
    }
}
impl AsRef<str> for Affinity {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>The event window.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InstanceEventWindow {
    /// <p>The ID of the event window.</p>
    #[doc(hidden)]
    pub instance_event_window_id: std::option::Option<std::string::String>,
    /// <p>One or more time ranges defined for the event window.</p>
    #[doc(hidden)]
    pub time_ranges: std::option::Option<std::vec::Vec<crate::model::InstanceEventWindowTimeRange>>,
    /// <p>The name of the event window.</p>
    #[doc(hidden)]
    pub name: std::option::Option<std::string::String>,
    /// <p>The cron expression defined for the event window.</p>
    #[doc(hidden)]
    pub cron_expression: std::option::Option<std::string::String>,
    /// <p>One or more targets associated with the event window.</p>
    #[doc(hidden)]
    pub association_target: std::option::Option<crate::model::InstanceEventWindowAssociationTarget>,
    /// <p>The current state of the event window.</p>
    #[doc(hidden)]
    pub state: std::option::Option<crate::model::InstanceEventWindowState>,
    /// <p>The instance tags associated with the event window.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl InstanceEventWindow {
    /// <p>The ID of the event window.</p>
    pub fn instance_event_window_id(&self) -> std::option::Option<&str> {
        self.instance_event_window_id.as_deref()
    }
    /// <p>One or more time ranges defined for the event window.</p>
    pub fn time_ranges(
        &self,
    ) -> std::option::Option<&[crate::model::InstanceEventWindowTimeRange]> {
        self.time_ranges.as_deref()
    }
    /// <p>The name of the event window.</p>
    pub fn name(&self) -> std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The cron expression defined for the event window.</p>
    pub fn cron_expression(&self) -> std::option::Option<&str> {
        self.cron_expression.as_deref()
    }
    /// <p>One or more targets associated with the event window.</p>
    pub fn association_target(
        &self,
    ) -> std::option::Option<&crate::model::InstanceEventWindowAssociationTarget> {
        self.association_target.as_ref()
    }
    /// <p>The current state of the event window.</p>
    pub fn state(&self) -> std::option::Option<&crate::model::InstanceEventWindowState> {
        self.state.as_ref()
    }
    /// <p>The instance tags associated with the event window.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
}
/// See [`InstanceEventWindow`](crate::model::InstanceEventWindow).
pub mod instance_event_window {

    /// A builder for [`InstanceEventWindow`](crate::model::InstanceEventWindow).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) instance_event_window_id: std::option::Option<std::string::String>,
        pub(crate) time_ranges:
            std::option::Option<std::vec::Vec<crate::model::InstanceEventWindowTimeRange>>,
        pub(crate) name: std::option::Option<std::string::String>,
        pub(crate) cron_expression: std::option::Option<std::string::String>,
        pub(crate) association_target:
            std::option::Option<crate::model::InstanceEventWindowAssociationTarget>,
        pub(crate) state: std::option::Option<crate::model::InstanceEventWindowState>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    }
    impl Builder {
        /// <p>The ID of the event window.</p>
        pub fn instance_event_window_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.instance_event_window_id = Some(input.into());
            self
        }
        /// <p>The ID of the event window.</p>
        pub fn set_instance_event_window_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.instance_event_window_id = input;
            self
        }
        /// Appends an item to `time_ranges`.
        ///
        /// To override the contents of this collection use [`set_time_ranges`](Self::set_time_ranges).
        ///
        /// <p>One or more time ranges defined for the event window.</p>
        pub fn time_ranges(mut self, input: crate::model::InstanceEventWindowTimeRange) -> Self {
            let mut v = self.time_ranges.unwrap_or_default();
            v.push(input);
            self.time_ranges = Some(v);
            self
        }
        /// <p>One or more time ranges defined for the event window.</p>
        pub fn set_time_ranges(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::InstanceEventWindowTimeRange>>,
        ) -> Self {
            self.time_ranges = input;
            self
        }
        /// <p>The name of the event window.</p>
        pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
            self.name = Some(input.into());
            self
        }
        /// <p>The name of the event window.</p>
        pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.name = input;
            self
        }
        /// <p>The cron expression defined for the event window.</p>
        pub fn cron_expression(mut self, input: impl Into<std::string::String>) -> Self {
            self.cron_expression = Some(input.into());
            self
        }
        /// <p>The cron expression defined for the event window.</p>
        pub fn set_cron_expression(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.cron_expression = input;
            self
        }
        /// <p>One or more targets associated with the event window.</p>
        pub fn association_target(
            mut self,
            input: crate::model::InstanceEventWindowAssociationTarget,
        ) -> Self {
            self.association_target = Some(input);
            self
        }
        /// <p>One or more targets associated with the event window.</p>
        pub fn set_association_target(
            mut self,
            input: std::option::Option<crate::model::InstanceEventWindowAssociationTarget>,
        ) -> Self {
            self.association_target = input;
            self
        }
        /// <p>The current state of the event window.</p>
        pub fn state(mut self, input: crate::model::InstanceEventWindowState) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>The current state of the event window.</p>
        pub fn set_state(
            mut self,
            input: std::option::Option<crate::model::InstanceEventWindowState>,
        ) -> Self {
            self.state = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>The instance tags associated with the event window.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>The instance tags associated with the event window.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// Consumes the builder and constructs a [`InstanceEventWindow`](crate::model::InstanceEventWindow).
        pub fn build(self) -> crate::model::InstanceEventWindow {
            crate::model::InstanceEventWindow {
                instance_event_window_id: self.instance_event_window_id,
                time_ranges: self.time_ranges,
                name: self.name,
                cron_expression: self.cron_expression,
                association_target: self.association_target,
                state: self.state,
                tags: self.tags,
            }
        }
    }
}
impl InstanceEventWindow {
    /// Creates a new builder-style object to manufacture [`InstanceEventWindow`](crate::model::InstanceEventWindow).
    pub fn builder() -> crate::model::instance_event_window::Builder {
        crate::model::instance_event_window::Builder::default()
    }
}

/// When writing a match expression against `InstanceEventWindowState`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let instanceeventwindowstate = unimplemented!();
/// match instanceeventwindowstate {
///     InstanceEventWindowState::Active => { /* ... */ },
///     InstanceEventWindowState::Creating => { /* ... */ },
///     InstanceEventWindowState::Deleted => { /* ... */ },
///     InstanceEventWindowState::Deleting => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `instanceeventwindowstate` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `InstanceEventWindowState::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `InstanceEventWindowState::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `InstanceEventWindowState::NewFeature` is defined.
/// Specifically, when `instanceeventwindowstate` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `InstanceEventWindowState::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 InstanceEventWindowState {
    #[allow(missing_docs)] // documentation missing in model
    Active,
    #[allow(missing_docs)] // documentation missing in model
    Creating,
    #[allow(missing_docs)] // documentation missing in model
    Deleted,
    #[allow(missing_docs)] // documentation missing in model
    Deleting,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for InstanceEventWindowState {
    fn from(s: &str) -> Self {
        match s {
            "active" => InstanceEventWindowState::Active,
            "creating" => InstanceEventWindowState::Creating,
            "deleted" => InstanceEventWindowState::Deleted,
            "deleting" => InstanceEventWindowState::Deleting,
            other => InstanceEventWindowState::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for InstanceEventWindowState {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(InstanceEventWindowState::from(s))
    }
}
impl InstanceEventWindowState {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            InstanceEventWindowState::Active => "active",
            InstanceEventWindowState::Creating => "creating",
            InstanceEventWindowState::Deleted => "deleted",
            InstanceEventWindowState::Deleting => "deleting",
            InstanceEventWindowState::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["active", "creating", "deleted", "deleting"]
    }
}
impl AsRef<str> for InstanceEventWindowState {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>One or more targets associated with the event window.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InstanceEventWindowAssociationTarget {
    /// <p>The IDs of the instances associated with the event window.</p>
    #[doc(hidden)]
    pub instance_ids: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>The instance tags associated with the event window. Any instances associated with the tags will be associated with the event window.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    /// <p>The IDs of the Dedicated Hosts associated with the event window.</p>
    #[doc(hidden)]
    pub dedicated_host_ids: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl InstanceEventWindowAssociationTarget {
    /// <p>The IDs of the instances associated with the event window.</p>
    pub fn instance_ids(&self) -> std::option::Option<&[std::string::String]> {
        self.instance_ids.as_deref()
    }
    /// <p>The instance tags associated with the event window. Any instances associated with the tags will be associated with the event window.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
    /// <p>The IDs of the Dedicated Hosts associated with the event window.</p>
    pub fn dedicated_host_ids(&self) -> std::option::Option<&[std::string::String]> {
        self.dedicated_host_ids.as_deref()
    }
}
/// See [`InstanceEventWindowAssociationTarget`](crate::model::InstanceEventWindowAssociationTarget).
pub mod instance_event_window_association_target {

    /// A builder for [`InstanceEventWindowAssociationTarget`](crate::model::InstanceEventWindowAssociationTarget).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) instance_ids: std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        pub(crate) dedicated_host_ids: std::option::Option<std::vec::Vec<std::string::String>>,
    }
    impl Builder {
        /// Appends an item to `instance_ids`.
        ///
        /// To override the contents of this collection use [`set_instance_ids`](Self::set_instance_ids).
        ///
        /// <p>The IDs of the instances associated with the event window.</p>
        pub fn instance_ids(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.instance_ids.unwrap_or_default();
            v.push(input.into());
            self.instance_ids = Some(v);
            self
        }
        /// <p>The IDs of the instances associated with the event window.</p>
        pub fn set_instance_ids(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.instance_ids = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>The instance tags associated with the event window. Any instances associated with the tags will be associated with the event window.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>The instance tags associated with the event window. Any instances associated with the tags will be associated with the event window.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// Appends an item to `dedicated_host_ids`.
        ///
        /// To override the contents of this collection use [`set_dedicated_host_ids`](Self::set_dedicated_host_ids).
        ///
        /// <p>The IDs of the Dedicated Hosts associated with the event window.</p>
        pub fn dedicated_host_ids(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.dedicated_host_ids.unwrap_or_default();
            v.push(input.into());
            self.dedicated_host_ids = Some(v);
            self
        }
        /// <p>The IDs of the Dedicated Hosts associated with the event window.</p>
        pub fn set_dedicated_host_ids(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.dedicated_host_ids = input;
            self
        }
        /// Consumes the builder and constructs a [`InstanceEventWindowAssociationTarget`](crate::model::InstanceEventWindowAssociationTarget).
        pub fn build(self) -> crate::model::InstanceEventWindowAssociationTarget {
            crate::model::InstanceEventWindowAssociationTarget {
                instance_ids: self.instance_ids,
                tags: self.tags,
                dedicated_host_ids: self.dedicated_host_ids,
            }
        }
    }
}
impl InstanceEventWindowAssociationTarget {
    /// Creates a new builder-style object to manufacture [`InstanceEventWindowAssociationTarget`](crate::model::InstanceEventWindowAssociationTarget).
    pub fn builder() -> crate::model::instance_event_window_association_target::Builder {
        crate::model::instance_event_window_association_target::Builder::default()
    }
}

/// <p>The start day and time and the end day and time of the time range, in UTC.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InstanceEventWindowTimeRange {
    /// <p>The day on which the time range begins.</p>
    #[doc(hidden)]
    pub start_week_day: std::option::Option<crate::model::WeekDay>,
    /// <p>The hour when the time range begins.</p>
    #[doc(hidden)]
    pub start_hour: std::option::Option<i32>,
    /// <p>The day on which the time range ends.</p>
    #[doc(hidden)]
    pub end_week_day: std::option::Option<crate::model::WeekDay>,
    /// <p>The hour when the time range ends.</p>
    #[doc(hidden)]
    pub end_hour: std::option::Option<i32>,
}
impl InstanceEventWindowTimeRange {
    /// <p>The day on which the time range begins.</p>
    pub fn start_week_day(&self) -> std::option::Option<&crate::model::WeekDay> {
        self.start_week_day.as_ref()
    }
    /// <p>The hour when the time range begins.</p>
    pub fn start_hour(&self) -> std::option::Option<i32> {
        self.start_hour
    }
    /// <p>The day on which the time range ends.</p>
    pub fn end_week_day(&self) -> std::option::Option<&crate::model::WeekDay> {
        self.end_week_day.as_ref()
    }
    /// <p>The hour when the time range ends.</p>
    pub fn end_hour(&self) -> std::option::Option<i32> {
        self.end_hour
    }
}
/// See [`InstanceEventWindowTimeRange`](crate::model::InstanceEventWindowTimeRange).
pub mod instance_event_window_time_range {

    /// A builder for [`InstanceEventWindowTimeRange`](crate::model::InstanceEventWindowTimeRange).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) start_week_day: std::option::Option<crate::model::WeekDay>,
        pub(crate) start_hour: std::option::Option<i32>,
        pub(crate) end_week_day: std::option::Option<crate::model::WeekDay>,
        pub(crate) end_hour: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>The day on which the time range begins.</p>
        pub fn start_week_day(mut self, input: crate::model::WeekDay) -> Self {
            self.start_week_day = Some(input);
            self
        }
        /// <p>The day on which the time range begins.</p>
        pub fn set_start_week_day(
            mut self,
            input: std::option::Option<crate::model::WeekDay>,
        ) -> Self {
            self.start_week_day = input;
            self
        }
        /// <p>The hour when the time range begins.</p>
        pub fn start_hour(mut self, input: i32) -> Self {
            self.start_hour = Some(input);
            self
        }
        /// <p>The hour when the time range begins.</p>
        pub fn set_start_hour(mut self, input: std::option::Option<i32>) -> Self {
            self.start_hour = input;
            self
        }
        /// <p>The day on which the time range ends.</p>
        pub fn end_week_day(mut self, input: crate::model::WeekDay) -> Self {
            self.end_week_day = Some(input);
            self
        }
        /// <p>The day on which the time range ends.</p>
        pub fn set_end_week_day(
            mut self,
            input: std::option::Option<crate::model::WeekDay>,
        ) -> Self {
            self.end_week_day = input;
            self
        }
        /// <p>The hour when the time range ends.</p>
        pub fn end_hour(mut self, input: i32) -> Self {
            self.end_hour = Some(input);
            self
        }
        /// <p>The hour when the time range ends.</p>
        pub fn set_end_hour(mut self, input: std::option::Option<i32>) -> Self {
            self.end_hour = input;
            self
        }
        /// Consumes the builder and constructs a [`InstanceEventWindowTimeRange`](crate::model::InstanceEventWindowTimeRange).
        pub fn build(self) -> crate::model::InstanceEventWindowTimeRange {
            crate::model::InstanceEventWindowTimeRange {
                start_week_day: self.start_week_day,
                start_hour: self.start_hour,
                end_week_day: self.end_week_day,
                end_hour: self.end_hour,
            }
        }
    }
}
impl InstanceEventWindowTimeRange {
    /// Creates a new builder-style object to manufacture [`InstanceEventWindowTimeRange`](crate::model::InstanceEventWindowTimeRange).
    pub fn builder() -> crate::model::instance_event_window_time_range::Builder {
        crate::model::instance_event_window_time_range::Builder::default()
    }
}

/// When writing a match expression against `WeekDay`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let weekday = unimplemented!();
/// match weekday {
///     WeekDay::Friday => { /* ... */ },
///     WeekDay::Monday => { /* ... */ },
///     WeekDay::Saturday => { /* ... */ },
///     WeekDay::Sunday => { /* ... */ },
///     WeekDay::Thursday => { /* ... */ },
///     WeekDay::Tuesday => { /* ... */ },
///     WeekDay::Wednesday => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `weekday` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `WeekDay::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `WeekDay::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `WeekDay::NewFeature` is defined.
/// Specifically, when `weekday` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `WeekDay::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 WeekDay {
    #[allow(missing_docs)] // documentation missing in model
    Friday,
    #[allow(missing_docs)] // documentation missing in model
    Monday,
    #[allow(missing_docs)] // documentation missing in model
    Saturday,
    #[allow(missing_docs)] // documentation missing in model
    Sunday,
    #[allow(missing_docs)] // documentation missing in model
    Thursday,
    #[allow(missing_docs)] // documentation missing in model
    Tuesday,
    #[allow(missing_docs)] // documentation missing in model
    Wednesday,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for WeekDay {
    fn from(s: &str) -> Self {
        match s {
            "friday" => WeekDay::Friday,
            "monday" => WeekDay::Monday,
            "saturday" => WeekDay::Saturday,
            "sunday" => WeekDay::Sunday,
            "thursday" => WeekDay::Thursday,
            "tuesday" => WeekDay::Tuesday,
            "wednesday" => WeekDay::Wednesday,
            other => WeekDay::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for WeekDay {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(WeekDay::from(s))
    }
}
impl WeekDay {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            WeekDay::Friday => "friday",
            WeekDay::Monday => "monday",
            WeekDay::Saturday => "saturday",
            WeekDay::Sunday => "sunday",
            WeekDay::Thursday => "thursday",
            WeekDay::Tuesday => "tuesday",
            WeekDay::Wednesday => "wednesday",
            WeekDay::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &[
            "friday",
            "monday",
            "saturday",
            "sunday",
            "thursday",
            "tuesday",
            "wednesday",
        ]
    }
}
impl AsRef<str> for WeekDay {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>The start day and time and the end day and time of the time range, in UTC.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InstanceEventWindowTimeRangeRequest {
    /// <p>The day on which the time range begins.</p>
    #[doc(hidden)]
    pub start_week_day: std::option::Option<crate::model::WeekDay>,
    /// <p>The hour when the time range begins.</p>
    #[doc(hidden)]
    pub start_hour: std::option::Option<i32>,
    /// <p>The day on which the time range ends.</p>
    #[doc(hidden)]
    pub end_week_day: std::option::Option<crate::model::WeekDay>,
    /// <p>The hour when the time range ends.</p>
    #[doc(hidden)]
    pub end_hour: std::option::Option<i32>,
}
impl InstanceEventWindowTimeRangeRequest {
    /// <p>The day on which the time range begins.</p>
    pub fn start_week_day(&self) -> std::option::Option<&crate::model::WeekDay> {
        self.start_week_day.as_ref()
    }
    /// <p>The hour when the time range begins.</p>
    pub fn start_hour(&self) -> std::option::Option<i32> {
        self.start_hour
    }
    /// <p>The day on which the time range ends.</p>
    pub fn end_week_day(&self) -> std::option::Option<&crate::model::WeekDay> {
        self.end_week_day.as_ref()
    }
    /// <p>The hour when the time range ends.</p>
    pub fn end_hour(&self) -> std::option::Option<i32> {
        self.end_hour
    }
}
/// See [`InstanceEventWindowTimeRangeRequest`](crate::model::InstanceEventWindowTimeRangeRequest).
pub mod instance_event_window_time_range_request {

    /// A builder for [`InstanceEventWindowTimeRangeRequest`](crate::model::InstanceEventWindowTimeRangeRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) start_week_day: std::option::Option<crate::model::WeekDay>,
        pub(crate) start_hour: std::option::Option<i32>,
        pub(crate) end_week_day: std::option::Option<crate::model::WeekDay>,
        pub(crate) end_hour: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>The day on which the time range begins.</p>
        pub fn start_week_day(mut self, input: crate::model::WeekDay) -> Self {
            self.start_week_day = Some(input);
            self
        }
        /// <p>The day on which the time range begins.</p>
        pub fn set_start_week_day(
            mut self,
            input: std::option::Option<crate::model::WeekDay>,
        ) -> Self {
            self.start_week_day = input;
            self
        }
        /// <p>The hour when the time range begins.</p>
        pub fn start_hour(mut self, input: i32) -> Self {
            self.start_hour = Some(input);
            self
        }
        /// <p>The hour when the time range begins.</p>
        pub fn set_start_hour(mut self, input: std::option::Option<i32>) -> Self {
            self.start_hour = input;
            self
        }
        /// <p>The day on which the time range ends.</p>
        pub fn end_week_day(mut self, input: crate::model::WeekDay) -> Self {
            self.end_week_day = Some(input);
            self
        }
        /// <p>The day on which the time range ends.</p>
        pub fn set_end_week_day(
            mut self,
            input: std::option::Option<crate::model::WeekDay>,
        ) -> Self {
            self.end_week_day = input;
            self
        }
        /// <p>The hour when the time range ends.</p>
        pub fn end_hour(mut self, input: i32) -> Self {
            self.end_hour = Some(input);
            self
        }
        /// <p>The hour when the time range ends.</p>
        pub fn set_end_hour(mut self, input: std::option::Option<i32>) -> Self {
            self.end_hour = input;
            self
        }
        /// Consumes the builder and constructs a [`InstanceEventWindowTimeRangeRequest`](crate::model::InstanceEventWindowTimeRangeRequest).
        pub fn build(self) -> crate::model::InstanceEventWindowTimeRangeRequest {
            crate::model::InstanceEventWindowTimeRangeRequest {
                start_week_day: self.start_week_day,
                start_hour: self.start_hour,
                end_week_day: self.end_week_day,
                end_hour: self.end_hour,
            }
        }
    }
}
impl InstanceEventWindowTimeRangeRequest {
    /// Creates a new builder-style object to manufacture [`InstanceEventWindowTimeRangeRequest`](crate::model::InstanceEventWindowTimeRangeRequest).
    pub fn builder() -> crate::model::instance_event_window_time_range_request::Builder {
        crate::model::instance_event_window_time_range_request::Builder::default()
    }
}

/// <p>Describes a scheduled event for an instance.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InstanceStatusEvent {
    /// <p>The ID of the event.</p>
    #[doc(hidden)]
    pub instance_event_id: std::option::Option<std::string::String>,
    /// <p>The event code.</p>
    #[doc(hidden)]
    pub code: std::option::Option<crate::model::EventCode>,
    /// <p>A description of the event.</p>
    /// <p>After a scheduled event is completed, it can still be described for up to a week. If the event has been completed, this description starts with the following text: [Completed].</p>
    #[doc(hidden)]
    pub description: std::option::Option<std::string::String>,
    /// <p>The latest scheduled end time for the event.</p>
    #[doc(hidden)]
    pub not_after: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The earliest scheduled start time for the event.</p>
    #[doc(hidden)]
    pub not_before: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The deadline for starting the event.</p>
    #[doc(hidden)]
    pub not_before_deadline: std::option::Option<aws_smithy_types::DateTime>,
}
impl InstanceStatusEvent {
    /// <p>The ID of the event.</p>
    pub fn instance_event_id(&self) -> std::option::Option<&str> {
        self.instance_event_id.as_deref()
    }
    /// <p>The event code.</p>
    pub fn code(&self) -> std::option::Option<&crate::model::EventCode> {
        self.code.as_ref()
    }
    /// <p>A description of the event.</p>
    /// <p>After a scheduled event is completed, it can still be described for up to a week. If the event has been completed, this description starts with the following text: [Completed].</p>
    pub fn description(&self) -> std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The latest scheduled end time for the event.</p>
    pub fn not_after(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.not_after.as_ref()
    }
    /// <p>The earliest scheduled start time for the event.</p>
    pub fn not_before(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.not_before.as_ref()
    }
    /// <p>The deadline for starting the event.</p>
    pub fn not_before_deadline(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.not_before_deadline.as_ref()
    }
}
/// See [`InstanceStatusEvent`](crate::model::InstanceStatusEvent).
pub mod instance_status_event {

    /// A builder for [`InstanceStatusEvent`](crate::model::InstanceStatusEvent).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) instance_event_id: std::option::Option<std::string::String>,
        pub(crate) code: std::option::Option<crate::model::EventCode>,
        pub(crate) description: std::option::Option<std::string::String>,
        pub(crate) not_after: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) not_before: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) not_before_deadline: std::option::Option<aws_smithy_types::DateTime>,
    }
    impl Builder {
        /// <p>The ID of the event.</p>
        pub fn instance_event_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.instance_event_id = Some(input.into());
            self
        }
        /// <p>The ID of the event.</p>
        pub fn set_instance_event_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.instance_event_id = input;
            self
        }
        /// <p>The event code.</p>
        pub fn code(mut self, input: crate::model::EventCode) -> Self {
            self.code = Some(input);
            self
        }
        /// <p>The event code.</p>
        pub fn set_code(mut self, input: std::option::Option<crate::model::EventCode>) -> Self {
            self.code = input;
            self
        }
        /// <p>A description of the event.</p>
        /// <p>After a scheduled event is completed, it can still be described for up to a week. If the event has been completed, this description starts with the following text: [Completed].</p>
        pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
            self.description = Some(input.into());
            self
        }
        /// <p>A description of the event.</p>
        /// <p>After a scheduled event is completed, it can still be described for up to a week. If the event has been completed, this description starts with the following text: [Completed].</p>
        pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.description = input;
            self
        }
        /// <p>The latest scheduled end time for the event.</p>
        pub fn not_after(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.not_after = Some(input);
            self
        }
        /// <p>The latest scheduled end time for the event.</p>
        pub fn set_not_after(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.not_after = input;
            self
        }
        /// <p>The earliest scheduled start time for the event.</p>
        pub fn not_before(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.not_before = Some(input);
            self
        }
        /// <p>The earliest scheduled start time for the event.</p>
        pub fn set_not_before(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.not_before = input;
            self
        }
        /// <p>The deadline for starting the event.</p>
        pub fn not_before_deadline(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.not_before_deadline = Some(input);
            self
        }
        /// <p>The deadline for starting the event.</p>
        pub fn set_not_before_deadline(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.not_before_deadline = input;
            self
        }
        /// Consumes the builder and constructs a [`InstanceStatusEvent`](crate::model::InstanceStatusEvent).
        pub fn build(self) -> crate::model::InstanceStatusEvent {
            crate::model::InstanceStatusEvent {
                instance_event_id: self.instance_event_id,
                code: self.code,
                description: self.description,
                not_after: self.not_after,
                not_before: self.not_before,
                not_before_deadline: self.not_before_deadline,
            }
        }
    }
}
impl InstanceStatusEvent {
    /// Creates a new builder-style object to manufacture [`InstanceStatusEvent`](crate::model::InstanceStatusEvent).
    pub fn builder() -> crate::model::instance_status_event::Builder {
        crate::model::instance_status_event::Builder::default()
    }
}

/// When writing a match expression against `EventCode`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let eventcode = unimplemented!();
/// match eventcode {
///     EventCode::InstanceReboot => { /* ... */ },
///     EventCode::InstanceRetirement => { /* ... */ },
///     EventCode::InstanceStop => { /* ... */ },
///     EventCode::SystemMaintenance => { /* ... */ },
///     EventCode::SystemReboot => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `eventcode` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `EventCode::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `EventCode::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `EventCode::NewFeature` is defined.
/// Specifically, when `eventcode` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `EventCode::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 EventCode {
    #[allow(missing_docs)] // documentation missing in model
    InstanceReboot,
    #[allow(missing_docs)] // documentation missing in model
    InstanceRetirement,
    #[allow(missing_docs)] // documentation missing in model
    InstanceStop,
    #[allow(missing_docs)] // documentation missing in model
    SystemMaintenance,
    #[allow(missing_docs)] // documentation missing in model
    SystemReboot,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for EventCode {
    fn from(s: &str) -> Self {
        match s {
            "instance-reboot" => EventCode::InstanceReboot,
            "instance-retirement" => EventCode::InstanceRetirement,
            "instance-stop" => EventCode::InstanceStop,
            "system-maintenance" => EventCode::SystemMaintenance,
            "system-reboot" => EventCode::SystemReboot,
            other => EventCode::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for EventCode {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(EventCode::from(s))
    }
}
impl EventCode {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            EventCode::InstanceReboot => "instance-reboot",
            EventCode::InstanceRetirement => "instance-retirement",
            EventCode::InstanceStop => "instance-stop",
            EventCode::SystemMaintenance => "system-maintenance",
            EventCode::SystemReboot => "system-reboot",
            EventCode::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &[
            "instance-reboot",
            "instance-retirement",
            "instance-stop",
            "system-maintenance",
            "system-reboot",
        ]
    }
}
impl AsRef<str> for EventCode {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes the burstable performance instance whose credit option for CPU usage was not modified.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UnsuccessfulInstanceCreditSpecificationItem {
    /// <p>The ID of the instance.</p>
    #[doc(hidden)]
    pub instance_id: std::option::Option<std::string::String>,
    /// <p>The applicable error for the burstable performance instance whose credit option for CPU usage was not modified.</p>
    #[doc(hidden)]
    pub error: std::option::Option<crate::model::UnsuccessfulInstanceCreditSpecificationItemError>,
}
impl UnsuccessfulInstanceCreditSpecificationItem {
    /// <p>The ID of the instance.</p>
    pub fn instance_id(&self) -> std::option::Option<&str> {
        self.instance_id.as_deref()
    }
    /// <p>The applicable error for the burstable performance instance whose credit option for CPU usage was not modified.</p>
    pub fn error(
        &self,
    ) -> std::option::Option<&crate::model::UnsuccessfulInstanceCreditSpecificationItemError> {
        self.error.as_ref()
    }
}
/// See [`UnsuccessfulInstanceCreditSpecificationItem`](crate::model::UnsuccessfulInstanceCreditSpecificationItem).
pub mod unsuccessful_instance_credit_specification_item {

    /// A builder for [`UnsuccessfulInstanceCreditSpecificationItem`](crate::model::UnsuccessfulInstanceCreditSpecificationItem).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) instance_id: std::option::Option<std::string::String>,
        pub(crate) error:
            std::option::Option<crate::model::UnsuccessfulInstanceCreditSpecificationItemError>,
    }
    impl Builder {
        /// <p>The ID of the instance.</p>
        pub fn instance_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.instance_id = Some(input.into());
            self
        }
        /// <p>The ID of the instance.</p>
        pub fn set_instance_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.instance_id = input;
            self
        }
        /// <p>The applicable error for the burstable performance instance whose credit option for CPU usage was not modified.</p>
        pub fn error(
            mut self,
            input: crate::model::UnsuccessfulInstanceCreditSpecificationItemError,
        ) -> Self {
            self.error = Some(input);
            self
        }
        /// <p>The applicable error for the burstable performance instance whose credit option for CPU usage was not modified.</p>
        pub fn set_error(
            mut self,
            input: std::option::Option<
                crate::model::UnsuccessfulInstanceCreditSpecificationItemError,
            >,
        ) -> Self {
            self.error = input;
            self
        }
        /// Consumes the builder and constructs a [`UnsuccessfulInstanceCreditSpecificationItem`](crate::model::UnsuccessfulInstanceCreditSpecificationItem).
        pub fn build(self) -> crate::model::UnsuccessfulInstanceCreditSpecificationItem {
            crate::model::UnsuccessfulInstanceCreditSpecificationItem {
                instance_id: self.instance_id,
                error: self.error,
            }
        }
    }
}
impl UnsuccessfulInstanceCreditSpecificationItem {
    /// Creates a new builder-style object to manufacture [`UnsuccessfulInstanceCreditSpecificationItem`](crate::model::UnsuccessfulInstanceCreditSpecificationItem).
    pub fn builder() -> crate::model::unsuccessful_instance_credit_specification_item::Builder {
        crate::model::unsuccessful_instance_credit_specification_item::Builder::default()
    }
}

/// <p>Information about the error for the burstable performance instance whose credit option for CPU usage was not modified.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UnsuccessfulInstanceCreditSpecificationItemError {
    /// <p>The error code.</p>
    #[doc(hidden)]
    pub code: std::option::Option<crate::model::UnsuccessfulInstanceCreditSpecificationErrorCode>,
    /// <p>The applicable error message.</p>
    #[doc(hidden)]
    pub message: std::option::Option<std::string::String>,
}
impl UnsuccessfulInstanceCreditSpecificationItemError {
    /// <p>The error code.</p>
    pub fn code(
        &self,
    ) -> std::option::Option<&crate::model::UnsuccessfulInstanceCreditSpecificationErrorCode> {
        self.code.as_ref()
    }
    /// <p>The applicable error message.</p>
    pub fn message(&self) -> std::option::Option<&str> {
        self.message.as_deref()
    }
}
/// See [`UnsuccessfulInstanceCreditSpecificationItemError`](crate::model::UnsuccessfulInstanceCreditSpecificationItemError).
pub mod unsuccessful_instance_credit_specification_item_error {

    /// A builder for [`UnsuccessfulInstanceCreditSpecificationItemError`](crate::model::UnsuccessfulInstanceCreditSpecificationItemError).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) code:
            std::option::Option<crate::model::UnsuccessfulInstanceCreditSpecificationErrorCode>,
        pub(crate) message: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The error code.</p>
        pub fn code(
            mut self,
            input: crate::model::UnsuccessfulInstanceCreditSpecificationErrorCode,
        ) -> Self {
            self.code = Some(input);
            self
        }
        /// <p>The error code.</p>
        pub fn set_code(
            mut self,
            input: std::option::Option<
                crate::model::UnsuccessfulInstanceCreditSpecificationErrorCode,
            >,
        ) -> Self {
            self.code = input;
            self
        }
        /// <p>The applicable error message.</p>
        pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
            self.message = Some(input.into());
            self
        }
        /// <p>The applicable error message.</p>
        pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.message = input;
            self
        }
        /// Consumes the builder and constructs a [`UnsuccessfulInstanceCreditSpecificationItemError`](crate::model::UnsuccessfulInstanceCreditSpecificationItemError).
        pub fn build(self) -> crate::model::UnsuccessfulInstanceCreditSpecificationItemError {
            crate::model::UnsuccessfulInstanceCreditSpecificationItemError {
                code: self.code,
                message: self.message,
            }
        }
    }
}
impl UnsuccessfulInstanceCreditSpecificationItemError {
    /// Creates a new builder-style object to manufacture [`UnsuccessfulInstanceCreditSpecificationItemError`](crate::model::UnsuccessfulInstanceCreditSpecificationItemError).
    pub fn builder() -> crate::model::unsuccessful_instance_credit_specification_item_error::Builder
    {
        crate::model::unsuccessful_instance_credit_specification_item_error::Builder::default()
    }
}

/// When writing a match expression against `UnsuccessfulInstanceCreditSpecificationErrorCode`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let unsuccessfulinstancecreditspecificationerrorcode = unimplemented!();
/// match unsuccessfulinstancecreditspecificationerrorcode {
///     UnsuccessfulInstanceCreditSpecificationErrorCode::IncorrectInstanceState => { /* ... */ },
///     UnsuccessfulInstanceCreditSpecificationErrorCode::InstanceCreditSpecificationNotSupported => { /* ... */ },
///     UnsuccessfulInstanceCreditSpecificationErrorCode::InvalidInstanceId => { /* ... */ },
///     UnsuccessfulInstanceCreditSpecificationErrorCode::InstanceNotFound => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `unsuccessfulinstancecreditspecificationerrorcode` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `UnsuccessfulInstanceCreditSpecificationErrorCode::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `UnsuccessfulInstanceCreditSpecificationErrorCode::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `UnsuccessfulInstanceCreditSpecificationErrorCode::NewFeature` is defined.
/// Specifically, when `unsuccessfulinstancecreditspecificationerrorcode` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `UnsuccessfulInstanceCreditSpecificationErrorCode::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 UnsuccessfulInstanceCreditSpecificationErrorCode {
    #[allow(missing_docs)] // documentation missing in model
    IncorrectInstanceState,
    #[allow(missing_docs)] // documentation missing in model
    InstanceCreditSpecificationNotSupported,
    #[allow(missing_docs)] // documentation missing in model
    InvalidInstanceId,
    #[allow(missing_docs)] // documentation missing in model
    InstanceNotFound,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for UnsuccessfulInstanceCreditSpecificationErrorCode {
    fn from(s: &str) -> Self {
        match s {
            "IncorrectInstanceState" => UnsuccessfulInstanceCreditSpecificationErrorCode::IncorrectInstanceState,
            "InstanceCreditSpecification.NotSupported" => UnsuccessfulInstanceCreditSpecificationErrorCode::InstanceCreditSpecificationNotSupported,
            "InvalidInstanceID.Malformed" => UnsuccessfulInstanceCreditSpecificationErrorCode::InvalidInstanceId,
            "InvalidInstanceID.NotFound" => UnsuccessfulInstanceCreditSpecificationErrorCode::InstanceNotFound,
            other => UnsuccessfulInstanceCreditSpecificationErrorCode::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
        }
    }
}
impl std::str::FromStr for UnsuccessfulInstanceCreditSpecificationErrorCode {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(UnsuccessfulInstanceCreditSpecificationErrorCode::from(s))
    }
}
impl UnsuccessfulInstanceCreditSpecificationErrorCode {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            UnsuccessfulInstanceCreditSpecificationErrorCode::IncorrectInstanceState => "IncorrectInstanceState",
            UnsuccessfulInstanceCreditSpecificationErrorCode::InstanceCreditSpecificationNotSupported => "InstanceCreditSpecification.NotSupported",
            UnsuccessfulInstanceCreditSpecificationErrorCode::InvalidInstanceId => "InvalidInstanceID.Malformed",
            UnsuccessfulInstanceCreditSpecificationErrorCode::InstanceNotFound => "InvalidInstanceID.NotFound",
            UnsuccessfulInstanceCreditSpecificationErrorCode::Unknown(value) => value.as_str()
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &[
            "IncorrectInstanceState",
            "InstanceCreditSpecification.NotSupported",
            "InvalidInstanceID.Malformed",
            "InvalidInstanceID.NotFound",
        ]
    }
}
impl AsRef<str> for UnsuccessfulInstanceCreditSpecificationErrorCode {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes the burstable performance instance whose credit option for CPU usage was successfully modified.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SuccessfulInstanceCreditSpecificationItem {
    /// <p>The ID of the instance.</p>
    #[doc(hidden)]
    pub instance_id: std::option::Option<std::string::String>,
}
impl SuccessfulInstanceCreditSpecificationItem {
    /// <p>The ID of the instance.</p>
    pub fn instance_id(&self) -> std::option::Option<&str> {
        self.instance_id.as_deref()
    }
}
/// See [`SuccessfulInstanceCreditSpecificationItem`](crate::model::SuccessfulInstanceCreditSpecificationItem).
pub mod successful_instance_credit_specification_item {

    /// A builder for [`SuccessfulInstanceCreditSpecificationItem`](crate::model::SuccessfulInstanceCreditSpecificationItem).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) instance_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The ID of the instance.</p>
        pub fn instance_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.instance_id = Some(input.into());
            self
        }
        /// <p>The ID of the instance.</p>
        pub fn set_instance_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.instance_id = input;
            self
        }
        /// Consumes the builder and constructs a [`SuccessfulInstanceCreditSpecificationItem`](crate::model::SuccessfulInstanceCreditSpecificationItem).
        pub fn build(self) -> crate::model::SuccessfulInstanceCreditSpecificationItem {
            crate::model::SuccessfulInstanceCreditSpecificationItem {
                instance_id: self.instance_id,
            }
        }
    }
}
impl SuccessfulInstanceCreditSpecificationItem {
    /// Creates a new builder-style object to manufacture [`SuccessfulInstanceCreditSpecificationItem`](crate::model::SuccessfulInstanceCreditSpecificationItem).
    pub fn builder() -> crate::model::successful_instance_credit_specification_item::Builder {
        crate::model::successful_instance_credit_specification_item::Builder::default()
    }
}

/// <p>Describes the credit option for CPU usage of a burstable performance instance.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InstanceCreditSpecificationRequest {
    /// <p>The ID of the instance.</p>
    #[doc(hidden)]
    pub instance_id: std::option::Option<std::string::String>,
    /// <p>The credit option for CPU usage of the instance.</p>
    /// <p>Valid values: <code>standard</code> | <code>unlimited</code> </p>
    /// <p>T3 instances with <code>host</code> tenancy do not support the <code>unlimited</code> CPU credit option.</p>
    #[doc(hidden)]
    pub cpu_credits: std::option::Option<std::string::String>,
}
impl InstanceCreditSpecificationRequest {
    /// <p>The ID of the instance.</p>
    pub fn instance_id(&self) -> std::option::Option<&str> {
        self.instance_id.as_deref()
    }
    /// <p>The credit option for CPU usage of the instance.</p>
    /// <p>Valid values: <code>standard</code> | <code>unlimited</code> </p>
    /// <p>T3 instances with <code>host</code> tenancy do not support the <code>unlimited</code> CPU credit option.</p>
    pub fn cpu_credits(&self) -> std::option::Option<&str> {
        self.cpu_credits.as_deref()
    }
}
/// See [`InstanceCreditSpecificationRequest`](crate::model::InstanceCreditSpecificationRequest).
pub mod instance_credit_specification_request {

    /// A builder for [`InstanceCreditSpecificationRequest`](crate::model::InstanceCreditSpecificationRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) instance_id: std::option::Option<std::string::String>,
        pub(crate) cpu_credits: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The ID of the instance.</p>
        pub fn instance_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.instance_id = Some(input.into());
            self
        }
        /// <p>The ID of the instance.</p>
        pub fn set_instance_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.instance_id = input;
            self
        }
        /// <p>The credit option for CPU usage of the instance.</p>
        /// <p>Valid values: <code>standard</code> | <code>unlimited</code> </p>
        /// <p>T3 instances with <code>host</code> tenancy do not support the <code>unlimited</code> CPU credit option.</p>
        pub fn cpu_credits(mut self, input: impl Into<std::string::String>) -> Self {
            self.cpu_credits = Some(input.into());
            self
        }
        /// <p>The credit option for CPU usage of the instance.</p>
        /// <p>Valid values: <code>standard</code> | <code>unlimited</code> </p>
        /// <p>T3 instances with <code>host</code> tenancy do not support the <code>unlimited</code> CPU credit option.</p>
        pub fn set_cpu_credits(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.cpu_credits = input;
            self
        }
        /// Consumes the builder and constructs a [`InstanceCreditSpecificationRequest`](crate::model::InstanceCreditSpecificationRequest).
        pub fn build(self) -> crate::model::InstanceCreditSpecificationRequest {
            crate::model::InstanceCreditSpecificationRequest {
                instance_id: self.instance_id,
                cpu_credits: self.cpu_credits,
            }
        }
    }
}
impl InstanceCreditSpecificationRequest {
    /// Creates a new builder-style object to manufacture [`InstanceCreditSpecificationRequest`](crate::model::InstanceCreditSpecificationRequest).
    pub fn builder() -> crate::model::instance_credit_specification_request::Builder {
        crate::model::instance_credit_specification_request::Builder::default()
    }
}

#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct BlobAttributeValue {
    #[allow(missing_docs)] // documentation missing in model
    #[doc(hidden)]
    pub value: std::option::Option<aws_smithy_types::Blob>,
}
impl BlobAttributeValue {
    #[allow(missing_docs)] // documentation missing in model
    pub fn value(&self) -> std::option::Option<&aws_smithy_types::Blob> {
        self.value.as_ref()
    }
}
/// See [`BlobAttributeValue`](crate::model::BlobAttributeValue).
pub mod blob_attribute_value {

    /// A builder for [`BlobAttributeValue`](crate::model::BlobAttributeValue).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) value: std::option::Option<aws_smithy_types::Blob>,
    }
    impl Builder {
        #[allow(missing_docs)] // documentation missing in model
        pub fn value(mut self, input: aws_smithy_types::Blob) -> Self {
            self.value = Some(input);
            self
        }
        #[allow(missing_docs)] // documentation missing in model
        pub fn set_value(mut self, input: std::option::Option<aws_smithy_types::Blob>) -> Self {
            self.value = input;
            self
        }
        /// Consumes the builder and constructs a [`BlobAttributeValue`](crate::model::BlobAttributeValue).
        pub fn build(self) -> crate::model::BlobAttributeValue {
            crate::model::BlobAttributeValue { value: self.value }
        }
    }
}
impl BlobAttributeValue {
    /// Creates a new builder-style object to manufacture [`BlobAttributeValue`](crate::model::BlobAttributeValue).
    pub fn builder() -> crate::model::blob_attribute_value::Builder {
        crate::model::blob_attribute_value::Builder::default()
    }
}

/// <p>Describes a block device mapping entry.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InstanceBlockDeviceMappingSpecification {
    /// <p>The device name (for example, <code>/dev/sdh</code> or <code>xvdh</code>).</p>
    #[doc(hidden)]
    pub device_name: std::option::Option<std::string::String>,
    /// <p>Parameters used to automatically set up EBS volumes when the instance is launched.</p>
    #[doc(hidden)]
    pub ebs: std::option::Option<crate::model::EbsInstanceBlockDeviceSpecification>,
    /// <p>suppress the specified device included in the block device mapping.</p>
    #[doc(hidden)]
    pub no_device: std::option::Option<std::string::String>,
    /// <p>The virtual device name.</p>
    #[doc(hidden)]
    pub virtual_name: std::option::Option<std::string::String>,
}
impl InstanceBlockDeviceMappingSpecification {
    /// <p>The device name (for example, <code>/dev/sdh</code> or <code>xvdh</code>).</p>
    pub fn device_name(&self) -> std::option::Option<&str> {
        self.device_name.as_deref()
    }
    /// <p>Parameters used to automatically set up EBS volumes when the instance is launched.</p>
    pub fn ebs(&self) -> std::option::Option<&crate::model::EbsInstanceBlockDeviceSpecification> {
        self.ebs.as_ref()
    }
    /// <p>suppress the specified device included in the block device mapping.</p>
    pub fn no_device(&self) -> std::option::Option<&str> {
        self.no_device.as_deref()
    }
    /// <p>The virtual device name.</p>
    pub fn virtual_name(&self) -> std::option::Option<&str> {
        self.virtual_name.as_deref()
    }
}
/// See [`InstanceBlockDeviceMappingSpecification`](crate::model::InstanceBlockDeviceMappingSpecification).
pub mod instance_block_device_mapping_specification {

    /// A builder for [`InstanceBlockDeviceMappingSpecification`](crate::model::InstanceBlockDeviceMappingSpecification).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) device_name: std::option::Option<std::string::String>,
        pub(crate) ebs: std::option::Option<crate::model::EbsInstanceBlockDeviceSpecification>,
        pub(crate) no_device: std::option::Option<std::string::String>,
        pub(crate) virtual_name: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The device name (for example, <code>/dev/sdh</code> or <code>xvdh</code>).</p>
        pub fn device_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.device_name = Some(input.into());
            self
        }
        /// <p>The device name (for example, <code>/dev/sdh</code> or <code>xvdh</code>).</p>
        pub fn set_device_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.device_name = input;
            self
        }
        /// <p>Parameters used to automatically set up EBS volumes when the instance is launched.</p>
        pub fn ebs(mut self, input: crate::model::EbsInstanceBlockDeviceSpecification) -> Self {
            self.ebs = Some(input);
            self
        }
        /// <p>Parameters used to automatically set up EBS volumes when the instance is launched.</p>
        pub fn set_ebs(
            mut self,
            input: std::option::Option<crate::model::EbsInstanceBlockDeviceSpecification>,
        ) -> Self {
            self.ebs = input;
            self
        }
        /// <p>suppress the specified device included in the block device mapping.</p>
        pub fn no_device(mut self, input: impl Into<std::string::String>) -> Self {
            self.no_device = Some(input.into());
            self
        }
        /// <p>suppress the specified device included in the block device mapping.</p>
        pub fn set_no_device(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.no_device = input;
            self
        }
        /// <p>The virtual device name.</p>
        pub fn virtual_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.virtual_name = Some(input.into());
            self
        }
        /// <p>The virtual device name.</p>
        pub fn set_virtual_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.virtual_name = input;
            self
        }
        /// Consumes the builder and constructs a [`InstanceBlockDeviceMappingSpecification`](crate::model::InstanceBlockDeviceMappingSpecification).
        pub fn build(self) -> crate::model::InstanceBlockDeviceMappingSpecification {
            crate::model::InstanceBlockDeviceMappingSpecification {
                device_name: self.device_name,
                ebs: self.ebs,
                no_device: self.no_device,
                virtual_name: self.virtual_name,
            }
        }
    }
}
impl InstanceBlockDeviceMappingSpecification {
    /// Creates a new builder-style object to manufacture [`InstanceBlockDeviceMappingSpecification`](crate::model::InstanceBlockDeviceMappingSpecification).
    pub fn builder() -> crate::model::instance_block_device_mapping_specification::Builder {
        crate::model::instance_block_device_mapping_specification::Builder::default()
    }
}

/// <p>Describes information used to set up an EBS volume specified in a block device mapping.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct EbsInstanceBlockDeviceSpecification {
    /// <p>Indicates whether the volume is deleted on instance termination.</p>
    #[doc(hidden)]
    pub delete_on_termination: std::option::Option<bool>,
    /// <p>The ID of the EBS volume.</p>
    #[doc(hidden)]
    pub volume_id: std::option::Option<std::string::String>,
}
impl EbsInstanceBlockDeviceSpecification {
    /// <p>Indicates whether the volume is deleted on instance termination.</p>
    pub fn delete_on_termination(&self) -> std::option::Option<bool> {
        self.delete_on_termination
    }
    /// <p>The ID of the EBS volume.</p>
    pub fn volume_id(&self) -> std::option::Option<&str> {
        self.volume_id.as_deref()
    }
}
/// See [`EbsInstanceBlockDeviceSpecification`](crate::model::EbsInstanceBlockDeviceSpecification).
pub mod ebs_instance_block_device_specification {

    /// A builder for [`EbsInstanceBlockDeviceSpecification`](crate::model::EbsInstanceBlockDeviceSpecification).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) delete_on_termination: std::option::Option<bool>,
        pub(crate) volume_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>Indicates whether the volume is deleted on instance termination.</p>
        pub fn delete_on_termination(mut self, input: bool) -> Self {
            self.delete_on_termination = Some(input);
            self
        }
        /// <p>Indicates whether the volume is deleted on instance termination.</p>
        pub fn set_delete_on_termination(mut self, input: std::option::Option<bool>) -> Self {
            self.delete_on_termination = input;
            self
        }
        /// <p>The ID of the EBS volume.</p>
        pub fn volume_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.volume_id = Some(input.into());
            self
        }
        /// <p>The ID of the EBS volume.</p>
        pub fn set_volume_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.volume_id = input;
            self
        }
        /// Consumes the builder and constructs a [`EbsInstanceBlockDeviceSpecification`](crate::model::EbsInstanceBlockDeviceSpecification).
        pub fn build(self) -> crate::model::EbsInstanceBlockDeviceSpecification {
            crate::model::EbsInstanceBlockDeviceSpecification {
                delete_on_termination: self.delete_on_termination,
                volume_id: self.volume_id,
            }
        }
    }
}
impl EbsInstanceBlockDeviceSpecification {
    /// Creates a new builder-style object to manufacture [`EbsInstanceBlockDeviceSpecification`](crate::model::EbsInstanceBlockDeviceSpecification).
    pub fn builder() -> crate::model::ebs_instance_block_device_specification::Builder {
        crate::model::ebs_instance_block_device_specification::Builder::default()
    }
}

/// <p>Describes a launch permission modification.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LaunchPermissionModifications {
    /// <p>The Amazon Web Services account ID, organization ARN, or OU ARN to add to the list of launch permissions for the AMI.</p>
    #[doc(hidden)]
    pub add: std::option::Option<std::vec::Vec<crate::model::LaunchPermission>>,
    /// <p>The Amazon Web Services account ID, organization ARN, or OU ARN to remove from the list of launch permissions for the AMI.</p>
    #[doc(hidden)]
    pub remove: std::option::Option<std::vec::Vec<crate::model::LaunchPermission>>,
}
impl LaunchPermissionModifications {
    /// <p>The Amazon Web Services account ID, organization ARN, or OU ARN to add to the list of launch permissions for the AMI.</p>
    pub fn add(&self) -> std::option::Option<&[crate::model::LaunchPermission]> {
        self.add.as_deref()
    }
    /// <p>The Amazon Web Services account ID, organization ARN, or OU ARN to remove from the list of launch permissions for the AMI.</p>
    pub fn remove(&self) -> std::option::Option<&[crate::model::LaunchPermission]> {
        self.remove.as_deref()
    }
}
/// See [`LaunchPermissionModifications`](crate::model::LaunchPermissionModifications).
pub mod launch_permission_modifications {

    /// A builder for [`LaunchPermissionModifications`](crate::model::LaunchPermissionModifications).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) add: std::option::Option<std::vec::Vec<crate::model::LaunchPermission>>,
        pub(crate) remove: std::option::Option<std::vec::Vec<crate::model::LaunchPermission>>,
    }
    impl Builder {
        /// Appends an item to `add`.
        ///
        /// To override the contents of this collection use [`set_add`](Self::set_add).
        ///
        /// <p>The Amazon Web Services account ID, organization ARN, or OU ARN to add to the list of launch permissions for the AMI.</p>
        pub fn add(mut self, input: crate::model::LaunchPermission) -> Self {
            let mut v = self.add.unwrap_or_default();
            v.push(input);
            self.add = Some(v);
            self
        }
        /// <p>The Amazon Web Services account ID, organization ARN, or OU ARN to add to the list of launch permissions for the AMI.</p>
        pub fn set_add(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::LaunchPermission>>,
        ) -> Self {
            self.add = input;
            self
        }
        /// Appends an item to `remove`.
        ///
        /// To override the contents of this collection use [`set_remove`](Self::set_remove).
        ///
        /// <p>The Amazon Web Services account ID, organization ARN, or OU ARN to remove from the list of launch permissions for the AMI.</p>
        pub fn remove(mut self, input: crate::model::LaunchPermission) -> Self {
            let mut v = self.remove.unwrap_or_default();
            v.push(input);
            self.remove = Some(v);
            self
        }
        /// <p>The Amazon Web Services account ID, organization ARN, or OU ARN to remove from the list of launch permissions for the AMI.</p>
        pub fn set_remove(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::LaunchPermission>>,
        ) -> Self {
            self.remove = input;
            self
        }
        /// Consumes the builder and constructs a [`LaunchPermissionModifications`](crate::model::LaunchPermissionModifications).
        pub fn build(self) -> crate::model::LaunchPermissionModifications {
            crate::model::LaunchPermissionModifications {
                add: self.add,
                remove: self.remove,
            }
        }
    }
}
impl LaunchPermissionModifications {
    /// Creates a new builder-style object to manufacture [`LaunchPermissionModifications`](crate::model::LaunchPermissionModifications).
    pub fn builder() -> crate::model::launch_permission_modifications::Builder {
        crate::model::launch_permission_modifications::Builder::default()
    }
}

/// <p>Describes a launch permission.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LaunchPermission {
    /// <p>The name of the group.</p>
    #[doc(hidden)]
    pub group: std::option::Option<crate::model::PermissionGroup>,
    /// <p>The Amazon Web Services account ID.</p>
    /// <p>Constraints: Up to 10 000 account IDs can be specified in a single request.</p>
    #[doc(hidden)]
    pub user_id: std::option::Option<std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of an organization.</p>
    #[doc(hidden)]
    pub organization_arn: std::option::Option<std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of an organizational unit (OU).</p>
    #[doc(hidden)]
    pub organizational_unit_arn: std::option::Option<std::string::String>,
}
impl LaunchPermission {
    /// <p>The name of the group.</p>
    pub fn group(&self) -> std::option::Option<&crate::model::PermissionGroup> {
        self.group.as_ref()
    }
    /// <p>The Amazon Web Services account ID.</p>
    /// <p>Constraints: Up to 10 000 account IDs can be specified in a single request.</p>
    pub fn user_id(&self) -> std::option::Option<&str> {
        self.user_id.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of an organization.</p>
    pub fn organization_arn(&self) -> std::option::Option<&str> {
        self.organization_arn.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of an organizational unit (OU).</p>
    pub fn organizational_unit_arn(&self) -> std::option::Option<&str> {
        self.organizational_unit_arn.as_deref()
    }
}
/// See [`LaunchPermission`](crate::model::LaunchPermission).
pub mod launch_permission {

    /// A builder for [`LaunchPermission`](crate::model::LaunchPermission).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) group: std::option::Option<crate::model::PermissionGroup>,
        pub(crate) user_id: std::option::Option<std::string::String>,
        pub(crate) organization_arn: std::option::Option<std::string::String>,
        pub(crate) organizational_unit_arn: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The name of the group.</p>
        pub fn group(mut self, input: crate::model::PermissionGroup) -> Self {
            self.group = Some(input);
            self
        }
        /// <p>The name of the group.</p>
        pub fn set_group(
            mut self,
            input: std::option::Option<crate::model::PermissionGroup>,
        ) -> Self {
            self.group = input;
            self
        }
        /// <p>The Amazon Web Services account ID.</p>
        /// <p>Constraints: Up to 10 000 account IDs can be specified in a single request.</p>
        pub fn user_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.user_id = Some(input.into());
            self
        }
        /// <p>The Amazon Web Services account ID.</p>
        /// <p>Constraints: Up to 10 000 account IDs can be specified in a single request.</p>
        pub fn set_user_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.user_id = input;
            self
        }
        /// <p>The Amazon Resource Name (ARN) of an organization.</p>
        pub fn organization_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.organization_arn = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of an organization.</p>
        pub fn set_organization_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.organization_arn = input;
            self
        }
        /// <p>The Amazon Resource Name (ARN) of an organizational unit (OU).</p>
        pub fn organizational_unit_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.organizational_unit_arn = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of an organizational unit (OU).</p>
        pub fn set_organizational_unit_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.organizational_unit_arn = input;
            self
        }
        /// Consumes the builder and constructs a [`LaunchPermission`](crate::model::LaunchPermission).
        pub fn build(self) -> crate::model::LaunchPermission {
            crate::model::LaunchPermission {
                group: self.group,
                user_id: self.user_id,
                organization_arn: self.organization_arn,
                organizational_unit_arn: self.organizational_unit_arn,
            }
        }
    }
}
impl LaunchPermission {
    /// Creates a new builder-style object to manufacture [`LaunchPermission`](crate::model::LaunchPermission).
    pub fn builder() -> crate::model::launch_permission::Builder {
        crate::model::launch_permission::Builder::default()
    }
}

/// When writing a match expression against `HostRecovery`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let hostrecovery = unimplemented!();
/// match hostrecovery {
///     HostRecovery::Off => { /* ... */ },
///     HostRecovery::On => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `hostrecovery` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `HostRecovery::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `HostRecovery::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `HostRecovery::NewFeature` is defined.
/// Specifically, when `hostrecovery` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `HostRecovery::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 HostRecovery {
    #[allow(missing_docs)] // documentation missing in model
    Off,
    #[allow(missing_docs)] // documentation missing in model
    On,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for HostRecovery {
    fn from(s: &str) -> Self {
        match s {
            "off" => HostRecovery::Off,
            "on" => HostRecovery::On,
            other => HostRecovery::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for HostRecovery {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(HostRecovery::from(s))
    }
}
impl HostRecovery {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            HostRecovery::Off => "off",
            HostRecovery::On => "on",
            HostRecovery::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["off", "on"]
    }
}
impl AsRef<str> for HostRecovery {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `AutoPlacement`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let autoplacement = unimplemented!();
/// match autoplacement {
///     AutoPlacement::Off => { /* ... */ },
///     AutoPlacement::On => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `autoplacement` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `AutoPlacement::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `AutoPlacement::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `AutoPlacement::NewFeature` is defined.
/// Specifically, when `autoplacement` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `AutoPlacement::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 AutoPlacement {
    #[allow(missing_docs)] // documentation missing in model
    Off,
    #[allow(missing_docs)] // documentation missing in model
    On,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for AutoPlacement {
    fn from(s: &str) -> Self {
        match s {
            "off" => AutoPlacement::Off,
            "on" => AutoPlacement::On,
            other => AutoPlacement::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for AutoPlacement {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(AutoPlacement::from(s))
    }
}
impl AutoPlacement {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            AutoPlacement::Off => "off",
            AutoPlacement::On => "on",
            AutoPlacement::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["off", "on"]
    }
}
impl AsRef<str> for AutoPlacement {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes an Amazon FPGA image (AFI) attribute.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct FpgaImageAttribute {
    /// <p>The ID of the AFI.</p>
    #[doc(hidden)]
    pub fpga_image_id: std::option::Option<std::string::String>,
    /// <p>The name of the AFI.</p>
    #[doc(hidden)]
    pub name: std::option::Option<std::string::String>,
    /// <p>The description of the AFI.</p>
    #[doc(hidden)]
    pub description: std::option::Option<std::string::String>,
    /// <p>The load permissions.</p>
    #[doc(hidden)]
    pub load_permissions: std::option::Option<std::vec::Vec<crate::model::LoadPermission>>,
    /// <p>The product codes.</p>
    #[doc(hidden)]
    pub product_codes: std::option::Option<std::vec::Vec<crate::model::ProductCode>>,
}
impl FpgaImageAttribute {
    /// <p>The ID of the AFI.</p>
    pub fn fpga_image_id(&self) -> std::option::Option<&str> {
        self.fpga_image_id.as_deref()
    }
    /// <p>The name of the AFI.</p>
    pub fn name(&self) -> std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The description of the AFI.</p>
    pub fn description(&self) -> std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The load permissions.</p>
    pub fn load_permissions(&self) -> std::option::Option<&[crate::model::LoadPermission]> {
        self.load_permissions.as_deref()
    }
    /// <p>The product codes.</p>
    pub fn product_codes(&self) -> std::option::Option<&[crate::model::ProductCode]> {
        self.product_codes.as_deref()
    }
}
/// See [`FpgaImageAttribute`](crate::model::FpgaImageAttribute).
pub mod fpga_image_attribute {

    /// A builder for [`FpgaImageAttribute`](crate::model::FpgaImageAttribute).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) fpga_image_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) load_permissions:
            std::option::Option<std::vec::Vec<crate::model::LoadPermission>>,
        pub(crate) product_codes: std::option::Option<std::vec::Vec<crate::model::ProductCode>>,
    }
    impl Builder {
        /// <p>The ID of the AFI.</p>
        pub fn fpga_image_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.fpga_image_id = Some(input.into());
            self
        }
        /// <p>The ID of the AFI.</p>
        pub fn set_fpga_image_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.fpga_image_id = input;
            self
        }
        /// <p>The name of the AFI.</p>
        pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
            self.name = Some(input.into());
            self
        }
        /// <p>The name of the AFI.</p>
        pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.name = input;
            self
        }
        /// <p>The description of the AFI.</p>
        pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
            self.description = Some(input.into());
            self
        }
        /// <p>The description of the AFI.</p>
        pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.description = input;
            self
        }
        /// Appends an item to `load_permissions`.
        ///
        /// To override the contents of this collection use [`set_load_permissions`](Self::set_load_permissions).
        ///
        /// <p>The load permissions.</p>
        pub fn load_permissions(mut self, input: crate::model::LoadPermission) -> Self {
            let mut v = self.load_permissions.unwrap_or_default();
            v.push(input);
            self.load_permissions = Some(v);
            self
        }
        /// <p>The load permissions.</p>
        pub fn set_load_permissions(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::LoadPermission>>,
        ) -> Self {
            self.load_permissions = input;
            self
        }
        /// Appends an item to `product_codes`.
        ///
        /// To override the contents of this collection use [`set_product_codes`](Self::set_product_codes).
        ///
        /// <p>The product codes.</p>
        pub fn product_codes(mut self, input: crate::model::ProductCode) -> Self {
            let mut v = self.product_codes.unwrap_or_default();
            v.push(input);
            self.product_codes = Some(v);
            self
        }
        /// <p>The product codes.</p>
        pub fn set_product_codes(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::ProductCode>>,
        ) -> Self {
            self.product_codes = input;
            self
        }
        /// Consumes the builder and constructs a [`FpgaImageAttribute`](crate::model::FpgaImageAttribute).
        pub fn build(self) -> crate::model::FpgaImageAttribute {
            crate::model::FpgaImageAttribute {
                fpga_image_id: self.fpga_image_id,
                name: self.name,
                description: self.description,
                load_permissions: self.load_permissions,
                product_codes: self.product_codes,
            }
        }
    }
}
impl FpgaImageAttribute {
    /// Creates a new builder-style object to manufacture [`FpgaImageAttribute`](crate::model::FpgaImageAttribute).
    pub fn builder() -> crate::model::fpga_image_attribute::Builder {
        crate::model::fpga_image_attribute::Builder::default()
    }
}

/// <p>Describes a load permission.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LoadPermission {
    /// <p>The Amazon Web Services account ID.</p>
    #[doc(hidden)]
    pub user_id: std::option::Option<std::string::String>,
    /// <p>The name of the group.</p>
    #[doc(hidden)]
    pub group: std::option::Option<crate::model::PermissionGroup>,
}
impl LoadPermission {
    /// <p>The Amazon Web Services account ID.</p>
    pub fn user_id(&self) -> std::option::Option<&str> {
        self.user_id.as_deref()
    }
    /// <p>The name of the group.</p>
    pub fn group(&self) -> std::option::Option<&crate::model::PermissionGroup> {
        self.group.as_ref()
    }
}
/// See [`LoadPermission`](crate::model::LoadPermission).
pub mod load_permission {

    /// A builder for [`LoadPermission`](crate::model::LoadPermission).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) user_id: std::option::Option<std::string::String>,
        pub(crate) group: std::option::Option<crate::model::PermissionGroup>,
    }
    impl Builder {
        /// <p>The Amazon Web Services account ID.</p>
        pub fn user_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.user_id = Some(input.into());
            self
        }
        /// <p>The Amazon Web Services account ID.</p>
        pub fn set_user_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.user_id = input;
            self
        }
        /// <p>The name of the group.</p>
        pub fn group(mut self, input: crate::model::PermissionGroup) -> Self {
            self.group = Some(input);
            self
        }
        /// <p>The name of the group.</p>
        pub fn set_group(
            mut self,
            input: std::option::Option<crate::model::PermissionGroup>,
        ) -> Self {
            self.group = input;
            self
        }
        /// Consumes the builder and constructs a [`LoadPermission`](crate::model::LoadPermission).
        pub fn build(self) -> crate::model::LoadPermission {
            crate::model::LoadPermission {
                user_id: self.user_id,
                group: self.group,
            }
        }
    }
}
impl LoadPermission {
    /// Creates a new builder-style object to manufacture [`LoadPermission`](crate::model::LoadPermission).
    pub fn builder() -> crate::model::load_permission::Builder {
        crate::model::load_permission::Builder::default()
    }
}

/// <p>Describes modifications to the load permissions of an Amazon FPGA image (AFI).</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LoadPermissionModifications {
    /// <p>The load permissions to add.</p>
    #[doc(hidden)]
    pub add: std::option::Option<std::vec::Vec<crate::model::LoadPermissionRequest>>,
    /// <p>The load permissions to remove.</p>
    #[doc(hidden)]
    pub remove: std::option::Option<std::vec::Vec<crate::model::LoadPermissionRequest>>,
}
impl LoadPermissionModifications {
    /// <p>The load permissions to add.</p>
    pub fn add(&self) -> std::option::Option<&[crate::model::LoadPermissionRequest]> {
        self.add.as_deref()
    }
    /// <p>The load permissions to remove.</p>
    pub fn remove(&self) -> std::option::Option<&[crate::model::LoadPermissionRequest]> {
        self.remove.as_deref()
    }
}
/// See [`LoadPermissionModifications`](crate::model::LoadPermissionModifications).
pub mod load_permission_modifications {

    /// A builder for [`LoadPermissionModifications`](crate::model::LoadPermissionModifications).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) add: std::option::Option<std::vec::Vec<crate::model::LoadPermissionRequest>>,
        pub(crate) remove: std::option::Option<std::vec::Vec<crate::model::LoadPermissionRequest>>,
    }
    impl Builder {
        /// Appends an item to `add`.
        ///
        /// To override the contents of this collection use [`set_add`](Self::set_add).
        ///
        /// <p>The load permissions to add.</p>
        pub fn add(mut self, input: crate::model::LoadPermissionRequest) -> Self {
            let mut v = self.add.unwrap_or_default();
            v.push(input);
            self.add = Some(v);
            self
        }
        /// <p>The load permissions to add.</p>
        pub fn set_add(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::LoadPermissionRequest>>,
        ) -> Self {
            self.add = input;
            self
        }
        /// Appends an item to `remove`.
        ///
        /// To override the contents of this collection use [`set_remove`](Self::set_remove).
        ///
        /// <p>The load permissions to remove.</p>
        pub fn remove(mut self, input: crate::model::LoadPermissionRequest) -> Self {
            let mut v = self.remove.unwrap_or_default();
            v.push(input);
            self.remove = Some(v);
            self
        }
        /// <p>The load permissions to remove.</p>
        pub fn set_remove(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::LoadPermissionRequest>>,
        ) -> Self {
            self.remove = input;
            self
        }
        /// Consumes the builder and constructs a [`LoadPermissionModifications`](crate::model::LoadPermissionModifications).
        pub fn build(self) -> crate::model::LoadPermissionModifications {
            crate::model::LoadPermissionModifications {
                add: self.add,
                remove: self.remove,
            }
        }
    }
}
impl LoadPermissionModifications {
    /// Creates a new builder-style object to manufacture [`LoadPermissionModifications`](crate::model::LoadPermissionModifications).
    pub fn builder() -> crate::model::load_permission_modifications::Builder {
        crate::model::load_permission_modifications::Builder::default()
    }
}

/// <p>Describes a load permission.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LoadPermissionRequest {
    /// <p>The name of the group.</p>
    #[doc(hidden)]
    pub group: std::option::Option<crate::model::PermissionGroup>,
    /// <p>The Amazon Web Services account ID.</p>
    #[doc(hidden)]
    pub user_id: std::option::Option<std::string::String>,
}
impl LoadPermissionRequest {
    /// <p>The name of the group.</p>
    pub fn group(&self) -> std::option::Option<&crate::model::PermissionGroup> {
        self.group.as_ref()
    }
    /// <p>The Amazon Web Services account ID.</p>
    pub fn user_id(&self) -> std::option::Option<&str> {
        self.user_id.as_deref()
    }
}
/// See [`LoadPermissionRequest`](crate::model::LoadPermissionRequest).
pub mod load_permission_request {

    /// A builder for [`LoadPermissionRequest`](crate::model::LoadPermissionRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) group: std::option::Option<crate::model::PermissionGroup>,
        pub(crate) user_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The name of the group.</p>
        pub fn group(mut self, input: crate::model::PermissionGroup) -> Self {
            self.group = Some(input);
            self
        }
        /// <p>The name of the group.</p>
        pub fn set_group(
            mut self,
            input: std::option::Option<crate::model::PermissionGroup>,
        ) -> Self {
            self.group = input;
            self
        }
        /// <p>The Amazon Web Services account ID.</p>
        pub fn user_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.user_id = Some(input.into());
            self
        }
        /// <p>The Amazon Web Services account ID.</p>
        pub fn set_user_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.user_id = input;
            self
        }
        /// Consumes the builder and constructs a [`LoadPermissionRequest`](crate::model::LoadPermissionRequest).
        pub fn build(self) -> crate::model::LoadPermissionRequest {
            crate::model::LoadPermissionRequest {
                group: self.group,
                user_id: self.user_id,
            }
        }
    }
}
impl LoadPermissionRequest {
    /// Creates a new builder-style object to manufacture [`LoadPermissionRequest`](crate::model::LoadPermissionRequest).
    pub fn builder() -> crate::model::load_permission_request::Builder {
        crate::model::load_permission_request::Builder::default()
    }
}

/// When writing a match expression against `FpgaImageAttributeName`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let fpgaimageattributename = unimplemented!();
/// match fpgaimageattributename {
///     FpgaImageAttributeName::Description => { /* ... */ },
///     FpgaImageAttributeName::LoadPermission => { /* ... */ },
///     FpgaImageAttributeName::Name => { /* ... */ },
///     FpgaImageAttributeName::ProductCodes => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `fpgaimageattributename` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `FpgaImageAttributeName::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `FpgaImageAttributeName::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `FpgaImageAttributeName::NewFeature` is defined.
/// Specifically, when `fpgaimageattributename` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `FpgaImageAttributeName::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 FpgaImageAttributeName {
    #[allow(missing_docs)] // documentation missing in model
    Description,
    #[allow(missing_docs)] // documentation missing in model
    LoadPermission,
    #[allow(missing_docs)] // documentation missing in model
    Name,
    #[allow(missing_docs)] // documentation missing in model
    ProductCodes,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for FpgaImageAttributeName {
    fn from(s: &str) -> Self {
        match s {
            "description" => FpgaImageAttributeName::Description,
            "loadPermission" => FpgaImageAttributeName::LoadPermission,
            "name" => FpgaImageAttributeName::Name,
            "productCodes" => FpgaImageAttributeName::ProductCodes,
            other => {
                FpgaImageAttributeName::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for FpgaImageAttributeName {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(FpgaImageAttributeName::from(s))
    }
}
impl FpgaImageAttributeName {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            FpgaImageAttributeName::Description => "description",
            FpgaImageAttributeName::LoadPermission => "loadPermission",
            FpgaImageAttributeName::Name => "name",
            FpgaImageAttributeName::ProductCodes => "productCodes",
            FpgaImageAttributeName::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["description", "loadPermission", "name", "productCodes"]
    }
}
impl AsRef<str> for FpgaImageAttributeName {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>The number of units to request. You can choose to set the target capacity as the number of instances. Or you can set the target capacity to a performance characteristic that is important to your application workload, such as vCPUs, memory, or I/O. If the request type is <code>maintain</code>, you can specify a target capacity of 0 and add capacity later.</p>
/// <p>You can use the On-Demand Instance <code>MaxTotalPrice</code> parameter, the Spot Instance <code>MaxTotalPrice</code> parameter, or both parameters to ensure that your fleet cost does not exceed your budget. If you set a maximum price per hour for the On-Demand Instances and Spot Instances in your request, EC2 Fleet will launch instances until it reaches the maximum amount that you're willing to pay. When the maximum amount you're willing to pay is reached, the fleet stops launching instances even if it hasn’t met the target capacity. The <code>MaxTotalPrice</code> parameters are located in <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_OnDemandOptionsRequest">OnDemandOptionsRequest</a> and <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_SpotOptionsRequest">SpotOptionsRequest</a>.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TargetCapacitySpecificationRequest {
    /// <p>The number of units to request, filled using <code>DefaultTargetCapacityType</code>.</p>
    #[doc(hidden)]
    pub total_target_capacity: std::option::Option<i32>,
    /// <p>The number of On-Demand units to request.</p>
    #[doc(hidden)]
    pub on_demand_target_capacity: std::option::Option<i32>,
    /// <p>The number of Spot units to request.</p>
    #[doc(hidden)]
    pub spot_target_capacity: std::option::Option<i32>,
    /// <p>The default <code>TotalTargetCapacity</code>, which is either <code>Spot</code> or <code>On-Demand</code>.</p>
    #[doc(hidden)]
    pub default_target_capacity_type: std::option::Option<crate::model::DefaultTargetCapacityType>,
    /// <p>The unit for the target capacity. <code>TargetCapacityUnitType</code> can only be specified when <code>InstanceRequirements</code> is specified.</p>
    /// <p>Default: <code>units</code> (translates to number of instances)</p>
    #[doc(hidden)]
    pub target_capacity_unit_type: std::option::Option<crate::model::TargetCapacityUnitType>,
}
impl TargetCapacitySpecificationRequest {
    /// <p>The number of units to request, filled using <code>DefaultTargetCapacityType</code>.</p>
    pub fn total_target_capacity(&self) -> std::option::Option<i32> {
        self.total_target_capacity
    }
    /// <p>The number of On-Demand units to request.</p>
    pub fn on_demand_target_capacity(&self) -> std::option::Option<i32> {
        self.on_demand_target_capacity
    }
    /// <p>The number of Spot units to request.</p>
    pub fn spot_target_capacity(&self) -> std::option::Option<i32> {
        self.spot_target_capacity
    }
    /// <p>The default <code>TotalTargetCapacity</code>, which is either <code>Spot</code> or <code>On-Demand</code>.</p>
    pub fn default_target_capacity_type(
        &self,
    ) -> std::option::Option<&crate::model::DefaultTargetCapacityType> {
        self.default_target_capacity_type.as_ref()
    }
    /// <p>The unit for the target capacity. <code>TargetCapacityUnitType</code> can only be specified when <code>InstanceRequirements</code> is specified.</p>
    /// <p>Default: <code>units</code> (translates to number of instances)</p>
    pub fn target_capacity_unit_type(
        &self,
    ) -> std::option::Option<&crate::model::TargetCapacityUnitType> {
        self.target_capacity_unit_type.as_ref()
    }
}
/// See [`TargetCapacitySpecificationRequest`](crate::model::TargetCapacitySpecificationRequest).
pub mod target_capacity_specification_request {

    /// A builder for [`TargetCapacitySpecificationRequest`](crate::model::TargetCapacitySpecificationRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) total_target_capacity: std::option::Option<i32>,
        pub(crate) on_demand_target_capacity: std::option::Option<i32>,
        pub(crate) spot_target_capacity: std::option::Option<i32>,
        pub(crate) default_target_capacity_type:
            std::option::Option<crate::model::DefaultTargetCapacityType>,
        pub(crate) target_capacity_unit_type:
            std::option::Option<crate::model::TargetCapacityUnitType>,
    }
    impl Builder {
        /// <p>The number of units to request, filled using <code>DefaultTargetCapacityType</code>.</p>
        pub fn total_target_capacity(mut self, input: i32) -> Self {
            self.total_target_capacity = Some(input);
            self
        }
        /// <p>The number of units to request, filled using <code>DefaultTargetCapacityType</code>.</p>
        pub fn set_total_target_capacity(mut self, input: std::option::Option<i32>) -> Self {
            self.total_target_capacity = input;
            self
        }
        /// <p>The number of On-Demand units to request.</p>
        pub fn on_demand_target_capacity(mut self, input: i32) -> Self {
            self.on_demand_target_capacity = Some(input);
            self
        }
        /// <p>The number of On-Demand units to request.</p>
        pub fn set_on_demand_target_capacity(mut self, input: std::option::Option<i32>) -> Self {
            self.on_demand_target_capacity = input;
            self
        }
        /// <p>The number of Spot units to request.</p>
        pub fn spot_target_capacity(mut self, input: i32) -> Self {
            self.spot_target_capacity = Some(input);
            self
        }
        /// <p>The number of Spot units to request.</p>
        pub fn set_spot_target_capacity(mut self, input: std::option::Option<i32>) -> Self {
            self.spot_target_capacity = input;
            self
        }
        /// <p>The default <code>TotalTargetCapacity</code>, which is either <code>Spot</code> or <code>On-Demand</code>.</p>
        pub fn default_target_capacity_type(
            mut self,
            input: crate::model::DefaultTargetCapacityType,
        ) -> Self {
            self.default_target_capacity_type = Some(input);
            self
        }
        /// <p>The default <code>TotalTargetCapacity</code>, which is either <code>Spot</code> or <code>On-Demand</code>.</p>
        pub fn set_default_target_capacity_type(
            mut self,
            input: std::option::Option<crate::model::DefaultTargetCapacityType>,
        ) -> Self {
            self.default_target_capacity_type = input;
            self
        }
        /// <p>The unit for the target capacity. <code>TargetCapacityUnitType</code> can only be specified when <code>InstanceRequirements</code> is specified.</p>
        /// <p>Default: <code>units</code> (translates to number of instances)</p>
        pub fn target_capacity_unit_type(
            mut self,
            input: crate::model::TargetCapacityUnitType,
        ) -> Self {
            self.target_capacity_unit_type = Some(input);
            self
        }
        /// <p>The unit for the target capacity. <code>TargetCapacityUnitType</code> can only be specified when <code>InstanceRequirements</code> is specified.</p>
        /// <p>Default: <code>units</code> (translates to number of instances)</p>
        pub fn set_target_capacity_unit_type(
            mut self,
            input: std::option::Option<crate::model::TargetCapacityUnitType>,
        ) -> Self {
            self.target_capacity_unit_type = input;
            self
        }
        /// Consumes the builder and constructs a [`TargetCapacitySpecificationRequest`](crate::model::TargetCapacitySpecificationRequest).
        pub fn build(self) -> crate::model::TargetCapacitySpecificationRequest {
            crate::model::TargetCapacitySpecificationRequest {
                total_target_capacity: self.total_target_capacity,
                on_demand_target_capacity: self.on_demand_target_capacity,
                spot_target_capacity: self.spot_target_capacity,
                default_target_capacity_type: self.default_target_capacity_type,
                target_capacity_unit_type: self.target_capacity_unit_type,
            }
        }
    }
}
impl TargetCapacitySpecificationRequest {
    /// Creates a new builder-style object to manufacture [`TargetCapacitySpecificationRequest`](crate::model::TargetCapacitySpecificationRequest).
    pub fn builder() -> crate::model::target_capacity_specification_request::Builder {
        crate::model::target_capacity_specification_request::Builder::default()
    }
}

/// When writing a match expression against `DefaultTargetCapacityType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let defaulttargetcapacitytype = unimplemented!();
/// match defaulttargetcapacitytype {
///     DefaultTargetCapacityType::OnDemand => { /* ... */ },
///     DefaultTargetCapacityType::Spot => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `defaulttargetcapacitytype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `DefaultTargetCapacityType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `DefaultTargetCapacityType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `DefaultTargetCapacityType::NewFeature` is defined.
/// Specifically, when `defaulttargetcapacitytype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `DefaultTargetCapacityType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 DefaultTargetCapacityType {
    #[allow(missing_docs)] // documentation missing in model
    OnDemand,
    #[allow(missing_docs)] // documentation missing in model
    Spot,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for DefaultTargetCapacityType {
    fn from(s: &str) -> Self {
        match s {
            "on-demand" => DefaultTargetCapacityType::OnDemand,
            "spot" => DefaultTargetCapacityType::Spot,
            other => DefaultTargetCapacityType::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for DefaultTargetCapacityType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(DefaultTargetCapacityType::from(s))
    }
}
impl DefaultTargetCapacityType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            DefaultTargetCapacityType::OnDemand => "on-demand",
            DefaultTargetCapacityType::Spot => "spot",
            DefaultTargetCapacityType::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["on-demand", "spot"]
    }
}
impl AsRef<str> for DefaultTargetCapacityType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes a launch template and overrides.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct FleetLaunchTemplateConfigRequest {
    /// <p>The launch template to use. You must specify either the launch template ID or launch template name in the request. </p>
    #[doc(hidden)]
    pub launch_template_specification:
        std::option::Option<crate::model::FleetLaunchTemplateSpecificationRequest>,
    /// <p>Any parameters that you specify override the same parameters in the launch template.</p>
    /// <p>For fleets of type <code>request</code> and <code>maintain</code>, a maximum of 300 items is allowed across all launch templates.</p>
    #[doc(hidden)]
    pub overrides:
        std::option::Option<std::vec::Vec<crate::model::FleetLaunchTemplateOverridesRequest>>,
}
impl FleetLaunchTemplateConfigRequest {
    /// <p>The launch template to use. You must specify either the launch template ID or launch template name in the request. </p>
    pub fn launch_template_specification(
        &self,
    ) -> std::option::Option<&crate::model::FleetLaunchTemplateSpecificationRequest> {
        self.launch_template_specification.as_ref()
    }
    /// <p>Any parameters that you specify override the same parameters in the launch template.</p>
    /// <p>For fleets of type <code>request</code> and <code>maintain</code>, a maximum of 300 items is allowed across all launch templates.</p>
    pub fn overrides(
        &self,
    ) -> std::option::Option<&[crate::model::FleetLaunchTemplateOverridesRequest]> {
        self.overrides.as_deref()
    }
}
/// See [`FleetLaunchTemplateConfigRequest`](crate::model::FleetLaunchTemplateConfigRequest).
pub mod fleet_launch_template_config_request {

    /// A builder for [`FleetLaunchTemplateConfigRequest`](crate::model::FleetLaunchTemplateConfigRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) launch_template_specification:
            std::option::Option<crate::model::FleetLaunchTemplateSpecificationRequest>,
        pub(crate) overrides:
            std::option::Option<std::vec::Vec<crate::model::FleetLaunchTemplateOverridesRequest>>,
    }
    impl Builder {
        /// <p>The launch template to use. You must specify either the launch template ID or launch template name in the request. </p>
        pub fn launch_template_specification(
            mut self,
            input: crate::model::FleetLaunchTemplateSpecificationRequest,
        ) -> Self {
            self.launch_template_specification = Some(input);
            self
        }
        /// <p>The launch template to use. You must specify either the launch template ID or launch template name in the request. </p>
        pub fn set_launch_template_specification(
            mut self,
            input: std::option::Option<crate::model::FleetLaunchTemplateSpecificationRequest>,
        ) -> Self {
            self.launch_template_specification = input;
            self
        }
        /// Appends an item to `overrides`.
        ///
        /// To override the contents of this collection use [`set_overrides`](Self::set_overrides).
        ///
        /// <p>Any parameters that you specify override the same parameters in the launch template.</p>
        /// <p>For fleets of type <code>request</code> and <code>maintain</code>, a maximum of 300 items is allowed across all launch templates.</p>
        pub fn overrides(
            mut self,
            input: crate::model::FleetLaunchTemplateOverridesRequest,
        ) -> Self {
            let mut v = self.overrides.unwrap_or_default();
            v.push(input);
            self.overrides = Some(v);
            self
        }
        /// <p>Any parameters that you specify override the same parameters in the launch template.</p>
        /// <p>For fleets of type <code>request</code> and <code>maintain</code>, a maximum of 300 items is allowed across all launch templates.</p>
        pub fn set_overrides(
            mut self,
            input: std::option::Option<
                std::vec::Vec<crate::model::FleetLaunchTemplateOverridesRequest>,
            >,
        ) -> Self {
            self.overrides = input;
            self
        }
        /// Consumes the builder and constructs a [`FleetLaunchTemplateConfigRequest`](crate::model::FleetLaunchTemplateConfigRequest).
        pub fn build(self) -> crate::model::FleetLaunchTemplateConfigRequest {
            crate::model::FleetLaunchTemplateConfigRequest {
                launch_template_specification: self.launch_template_specification,
                overrides: self.overrides,
            }
        }
    }
}
impl FleetLaunchTemplateConfigRequest {
    /// Creates a new builder-style object to manufacture [`FleetLaunchTemplateConfigRequest`](crate::model::FleetLaunchTemplateConfigRequest).
    pub fn builder() -> crate::model::fleet_launch_template_config_request::Builder {
        crate::model::fleet_launch_template_config_request::Builder::default()
    }
}

/// <p>Describes overrides for a launch template.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct FleetLaunchTemplateOverridesRequest {
    /// <p>The instance type.</p> <note>
    /// <p>If you specify <code>InstanceType</code>, you can't specify <code>InstanceRequirements</code>.</p>
    /// </note>
    #[doc(hidden)]
    pub instance_type: std::option::Option<crate::model::InstanceType>,
    /// <p>The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price. </p> <important>
    /// <p>If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.</p>
    /// </important>
    #[doc(hidden)]
    pub max_price: std::option::Option<std::string::String>,
    /// <p>The IDs of the subnets in which to launch the instances. Separate multiple subnet IDs using commas (for example, <code>subnet-1234abcdeexample1, subnet-0987cdef6example2</code>). A request of type <code>instant</code> can have only one subnet ID.</p>
    #[doc(hidden)]
    pub subnet_id: std::option::Option<std::string::String>,
    /// <p>The Availability Zone in which to launch the instances.</p>
    #[doc(hidden)]
    pub availability_zone: std::option::Option<std::string::String>,
    /// <p>The number of units provided by the specified instance type.</p>
    #[doc(hidden)]
    pub weighted_capacity: std::option::Option<f64>,
    /// <p>The priority for the launch template override. The highest priority is launched first.</p>
    /// <p>If the On-Demand <code>AllocationStrategy</code> is set to <code>prioritized</code>, EC2 Fleet uses priority to determine which launch template override to use first in fulfilling On-Demand capacity.</p>
    /// <p>If the Spot <code>AllocationStrategy</code> is set to <code>capacity-optimized-prioritized</code>, EC2 Fleet uses priority on a best-effort basis to determine which launch template override to use in fulfilling Spot capacity, but optimizes for capacity first.</p>
    /// <p>Valid values are whole numbers starting at <code>0</code>. The lower the number, the higher the priority. If no number is set, the launch template override has the lowest priority. You can set the same priority for different launch template overrides.</p>
    #[doc(hidden)]
    pub priority: std::option::Option<f64>,
    /// <p>The location where the instance launched, if applicable.</p>
    #[doc(hidden)]
    pub placement: std::option::Option<crate::model::Placement>,
    /// <p>The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with those attributes.</p> <note>
    /// <p>If you specify <code>InstanceRequirements</code>, you can't specify <code>InstanceType</code>.</p>
    /// </note>
    #[doc(hidden)]
    pub instance_requirements: std::option::Option<crate::model::InstanceRequirementsRequest>,
    /// <p>The ID of the AMI. An AMI is required to launch an instance. The AMI ID must be specified here or in the launch template.</p>
    #[doc(hidden)]
    pub image_id: std::option::Option<std::string::String>,
}
impl FleetLaunchTemplateOverridesRequest {
    /// <p>The instance type.</p> <note>
    /// <p>If you specify <code>InstanceType</code>, you can't specify <code>InstanceRequirements</code>.</p>
    /// </note>
    pub fn instance_type(&self) -> std::option::Option<&crate::model::InstanceType> {
        self.instance_type.as_ref()
    }
    /// <p>The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price. </p> <important>
    /// <p>If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.</p>
    /// </important>
    pub fn max_price(&self) -> std::option::Option<&str> {
        self.max_price.as_deref()
    }
    /// <p>The IDs of the subnets in which to launch the instances. Separate multiple subnet IDs using commas (for example, <code>subnet-1234abcdeexample1, subnet-0987cdef6example2</code>). A request of type <code>instant</code> can have only one subnet ID.</p>
    pub fn subnet_id(&self) -> std::option::Option<&str> {
        self.subnet_id.as_deref()
    }
    /// <p>The Availability Zone in which to launch the instances.</p>
    pub fn availability_zone(&self) -> std::option::Option<&str> {
        self.availability_zone.as_deref()
    }
    /// <p>The number of units provided by the specified instance type.</p>
    pub fn weighted_capacity(&self) -> std::option::Option<f64> {
        self.weighted_capacity
    }
    /// <p>The priority for the launch template override. The highest priority is launched first.</p>
    /// <p>If the On-Demand <code>AllocationStrategy</code> is set to <code>prioritized</code>, EC2 Fleet uses priority to determine which launch template override to use first in fulfilling On-Demand capacity.</p>
    /// <p>If the Spot <code>AllocationStrategy</code> is set to <code>capacity-optimized-prioritized</code>, EC2 Fleet uses priority on a best-effort basis to determine which launch template override to use in fulfilling Spot capacity, but optimizes for capacity first.</p>
    /// <p>Valid values are whole numbers starting at <code>0</code>. The lower the number, the higher the priority. If no number is set, the launch template override has the lowest priority. You can set the same priority for different launch template overrides.</p>
    pub fn priority(&self) -> std::option::Option<f64> {
        self.priority
    }
    /// <p>The location where the instance launched, if applicable.</p>
    pub fn placement(&self) -> std::option::Option<&crate::model::Placement> {
        self.placement.as_ref()
    }
    /// <p>The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with those attributes.</p> <note>
    /// <p>If you specify <code>InstanceRequirements</code>, you can't specify <code>InstanceType</code>.</p>
    /// </note>
    pub fn instance_requirements(
        &self,
    ) -> std::option::Option<&crate::model::InstanceRequirementsRequest> {
        self.instance_requirements.as_ref()
    }
    /// <p>The ID of the AMI. An AMI is required to launch an instance. The AMI ID must be specified here or in the launch template.</p>
    pub fn image_id(&self) -> std::option::Option<&str> {
        self.image_id.as_deref()
    }
}
/// See [`FleetLaunchTemplateOverridesRequest`](crate::model::FleetLaunchTemplateOverridesRequest).
pub mod fleet_launch_template_overrides_request {

    /// A builder for [`FleetLaunchTemplateOverridesRequest`](crate::model::FleetLaunchTemplateOverridesRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) instance_type: std::option::Option<crate::model::InstanceType>,
        pub(crate) max_price: std::option::Option<std::string::String>,
        pub(crate) subnet_id: std::option::Option<std::string::String>,
        pub(crate) availability_zone: std::option::Option<std::string::String>,
        pub(crate) weighted_capacity: std::option::Option<f64>,
        pub(crate) priority: std::option::Option<f64>,
        pub(crate) placement: std::option::Option<crate::model::Placement>,
        pub(crate) instance_requirements:
            std::option::Option<crate::model::InstanceRequirementsRequest>,
        pub(crate) image_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The instance type.</p> <note>
        /// <p>If you specify <code>InstanceType</code>, you can't specify <code>InstanceRequirements</code>.</p>
        /// </note>
        pub fn instance_type(mut self, input: crate::model::InstanceType) -> Self {
            self.instance_type = Some(input);
            self
        }
        /// <p>The instance type.</p> <note>
        /// <p>If you specify <code>InstanceType</code>, you can't specify <code>InstanceRequirements</code>.</p>
        /// </note>
        pub fn set_instance_type(
            mut self,
            input: std::option::Option<crate::model::InstanceType>,
        ) -> Self {
            self.instance_type = input;
            self
        }
        /// <p>The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price. </p> <important>
        /// <p>If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.</p>
        /// </important>
        pub fn max_price(mut self, input: impl Into<std::string::String>) -> Self {
            self.max_price = Some(input.into());
            self
        }
        /// <p>The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price. </p> <important>
        /// <p>If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.</p>
        /// </important>
        pub fn set_max_price(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.max_price = input;
            self
        }
        /// <p>The IDs of the subnets in which to launch the instances. Separate multiple subnet IDs using commas (for example, <code>subnet-1234abcdeexample1, subnet-0987cdef6example2</code>). A request of type <code>instant</code> can have only one subnet ID.</p>
        pub fn subnet_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.subnet_id = Some(input.into());
            self
        }
        /// <p>The IDs of the subnets in which to launch the instances. Separate multiple subnet IDs using commas (for example, <code>subnet-1234abcdeexample1, subnet-0987cdef6example2</code>). A request of type <code>instant</code> can have only one subnet ID.</p>
        pub fn set_subnet_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.subnet_id = input;
            self
        }
        /// <p>The Availability Zone in which to launch the instances.</p>
        pub fn availability_zone(mut self, input: impl Into<std::string::String>) -> Self {
            self.availability_zone = Some(input.into());
            self
        }
        /// <p>The Availability Zone in which to launch the instances.</p>
        pub fn set_availability_zone(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.availability_zone = input;
            self
        }
        /// <p>The number of units provided by the specified instance type.</p>
        pub fn weighted_capacity(mut self, input: f64) -> Self {
            self.weighted_capacity = Some(input);
            self
        }
        /// <p>The number of units provided by the specified instance type.</p>
        pub fn set_weighted_capacity(mut self, input: std::option::Option<f64>) -> Self {
            self.weighted_capacity = input;
            self
        }
        /// <p>The priority for the launch template override. The highest priority is launched first.</p>
        /// <p>If the On-Demand <code>AllocationStrategy</code> is set to <code>prioritized</code>, EC2 Fleet uses priority to determine which launch template override to use first in fulfilling On-Demand capacity.</p>
        /// <p>If the Spot <code>AllocationStrategy</code> is set to <code>capacity-optimized-prioritized</code>, EC2 Fleet uses priority on a best-effort basis to determine which launch template override to use in fulfilling Spot capacity, but optimizes for capacity first.</p>
        /// <p>Valid values are whole numbers starting at <code>0</code>. The lower the number, the higher the priority. If no number is set, the launch template override has the lowest priority. You can set the same priority for different launch template overrides.</p>
        pub fn priority(mut self, input: f64) -> Self {
            self.priority = Some(input);
            self
        }
        /// <p>The priority for the launch template override. The highest priority is launched first.</p>
        /// <p>If the On-Demand <code>AllocationStrategy</code> is set to <code>prioritized</code>, EC2 Fleet uses priority to determine which launch template override to use first in fulfilling On-Demand capacity.</p>
        /// <p>If the Spot <code>AllocationStrategy</code> is set to <code>capacity-optimized-prioritized</code>, EC2 Fleet uses priority on a best-effort basis to determine which launch template override to use in fulfilling Spot capacity, but optimizes for capacity first.</p>
        /// <p>Valid values are whole numbers starting at <code>0</code>. The lower the number, the higher the priority. If no number is set, the launch template override has the lowest priority. You can set the same priority for different launch template overrides.</p>
        pub fn set_priority(mut self, input: std::option::Option<f64>) -> Self {
            self.priority = input;
            self
        }
        /// <p>The location where the instance launched, if applicable.</p>
        pub fn placement(mut self, input: crate::model::Placement) -> Self {
            self.placement = Some(input);
            self
        }
        /// <p>The location where the instance launched, if applicable.</p>
        pub fn set_placement(
            mut self,
            input: std::option::Option<crate::model::Placement>,
        ) -> Self {
            self.placement = input;
            self
        }
        /// <p>The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with those attributes.</p> <note>
        /// <p>If you specify <code>InstanceRequirements</code>, you can't specify <code>InstanceType</code>.</p>
        /// </note>
        pub fn instance_requirements(
            mut self,
            input: crate::model::InstanceRequirementsRequest,
        ) -> Self {
            self.instance_requirements = Some(input);
            self
        }
        /// <p>The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with those attributes.</p> <note>
        /// <p>If you specify <code>InstanceRequirements</code>, you can't specify <code>InstanceType</code>.</p>
        /// </note>
        pub fn set_instance_requirements(
            mut self,
            input: std::option::Option<crate::model::InstanceRequirementsRequest>,
        ) -> Self {
            self.instance_requirements = input;
            self
        }
        /// <p>The ID of the AMI. An AMI is required to launch an instance. The AMI ID must be specified here or in the launch template.</p>
        pub fn image_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.image_id = Some(input.into());
            self
        }
        /// <p>The ID of the AMI. An AMI is required to launch an instance. The AMI ID must be specified here or in the launch template.</p>
        pub fn set_image_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.image_id = input;
            self
        }
        /// Consumes the builder and constructs a [`FleetLaunchTemplateOverridesRequest`](crate::model::FleetLaunchTemplateOverridesRequest).
        pub fn build(self) -> crate::model::FleetLaunchTemplateOverridesRequest {
            crate::model::FleetLaunchTemplateOverridesRequest {
                instance_type: self.instance_type,
                max_price: self.max_price,
                subnet_id: self.subnet_id,
                availability_zone: self.availability_zone,
                weighted_capacity: self.weighted_capacity,
                priority: self.priority,
                placement: self.placement,
                instance_requirements: self.instance_requirements,
                image_id: self.image_id,
            }
        }
    }
}
impl FleetLaunchTemplateOverridesRequest {
    /// Creates a new builder-style object to manufacture [`FleetLaunchTemplateOverridesRequest`](crate::model::FleetLaunchTemplateOverridesRequest).
    pub fn builder() -> crate::model::fleet_launch_template_overrides_request::Builder {
        crate::model::fleet_launch_template_overrides_request::Builder::default()
    }
}

/// <p>The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with these attributes.</p>
/// <p>When you specify multiple attributes, you get instance types that satisfy all of the specified attributes. If you specify multiple values for an attribute, you get instance types that satisfy any of the specified values.</p>
/// <p>To limit the list of instance types from which Amazon EC2 can identify matching instance types, you can use one of the following parameters, but not both in the same request:</p>
/// <ul>
/// <li> <p> <code>AllowedInstanceTypes</code> - The instance types to include in the list. All other instance types are ignored, even if they match your specified attributes.</p> </li>
/// <li> <p> <code>ExcludedInstanceTypes</code> - The instance types to exclude from the list, even if they match your specified attributes.</p> </li>
/// </ul> <note>
/// <p>You must specify <code>VCpuCount</code> and <code>MemoryMiB</code>. All other attributes are optional. Any unspecified optional attribute is set to its default.</p>
/// </note>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet-attribute-based-instance-type-selection.html">Attribute-based instance type selection for EC2 Fleet</a>, <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-fleet-attribute-based-instance-type-selection.html">Attribute-based instance type selection for Spot Fleet</a>, and <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-placement-score.html">Spot placement score</a> in the <i>Amazon EC2 User Guide</i>.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InstanceRequirementsRequest {
    /// <p>The minimum and maximum number of vCPUs.</p>
    #[doc(hidden)]
    pub v_cpu_count: std::option::Option<crate::model::VCpuCountRangeRequest>,
    /// <p>The minimum and maximum amount of memory, in MiB.</p>
    #[doc(hidden)]
    pub memory_mi_b: std::option::Option<crate::model::MemoryMiBRequest>,
    /// <p>The CPU manufacturers to include.</p>
    /// <ul>
    /// <li> <p>For instance types with Intel CPUs, specify <code>intel</code>.</p> </li>
    /// <li> <p>For instance types with AMD CPUs, specify <code>amd</code>.</p> </li>
    /// <li> <p>For instance types with Amazon Web Services CPUs, specify <code>amazon-web-services</code>.</p> </li>
    /// </ul> <note>
    /// <p>Don't confuse the CPU manufacturer with the CPU architecture. Instances will be launched with a compatible CPU architecture based on the Amazon Machine Image (AMI) that you specify in your launch template.</p>
    /// </note>
    /// <p>Default: Any manufacturer</p>
    #[doc(hidden)]
    pub cpu_manufacturers: std::option::Option<std::vec::Vec<crate::model::CpuManufacturer>>,
    /// <p>The minimum and maximum amount of memory per vCPU, in GiB.</p>
    /// <p>Default: No minimum or maximum limits</p>
    #[doc(hidden)]
    pub memory_gi_b_per_v_cpu: std::option::Option<crate::model::MemoryGiBPerVCpuRequest>,
    /// <p>The instance types to exclude.</p>
    /// <p>You can use strings with one or more wild cards, represented by an asterisk (<code>*</code>), to exclude an instance family, type, size, or generation. The following are examples: <code>m5.8xlarge</code>, <code>c5*.*</code>, <code>m5a.*</code>, <code>r*</code>, <code>*3*</code>.</p>
    /// <p>For example, if you specify <code>c5*</code>,Amazon EC2 will exclude the entire C5 instance family, which includes all C5a and C5n instance types. If you specify <code>m5a.*</code>, Amazon EC2 will exclude all the M5a instance types, but not the M5n instance types.</p> <note>
    /// <p>If you specify <code>ExcludedInstanceTypes</code>, you can't specify <code>AllowedInstanceTypes</code>.</p>
    /// </note>
    /// <p>Default: No excluded instance types</p>
    #[doc(hidden)]
    pub excluded_instance_types: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>Indicates whether current or previous generation instance types are included. The current generation instance types are recommended for use. Current generation instance types are typically the latest two to three generations in each instance family. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html">Instance types</a> in the <i>Amazon EC2 User Guide</i>.</p>
    /// <p>For current generation instance types, specify <code>current</code>.</p>
    /// <p>For previous generation instance types, specify <code>previous</code>.</p>
    /// <p>Default: Current and previous generation instance types</p>
    #[doc(hidden)]
    pub instance_generations: std::option::Option<std::vec::Vec<crate::model::InstanceGeneration>>,
    /// <p>The price protection threshold for Spot Instance. This is the maximum you’ll pay for an Spot Instance, expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.</p>
    /// <p>The parameter accepts an integer, which Amazon EC2 interprets as a percentage.</p>
    /// <p>To turn off price protection, specify a high value, such as <code>999999</code>.</p>
    /// <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetSpotPlacementScores.html">GetSpotPlacementScores</a> and <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetInstanceTypesFromInstanceRequirements.html">GetInstanceTypesFromInstanceRequirements</a>.</p> <note>
    /// <p>If you set <code>TargetCapacityUnitType</code> to <code>vcpu</code> or <code>memory-mib</code>, the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.</p>
    /// </note>
    /// <p>Default: <code>100</code> </p>
    #[doc(hidden)]
    pub spot_max_price_percentage_over_lowest_price: std::option::Option<i32>,
    /// <p>The price protection threshold for On-Demand Instances. This is the maximum you’ll pay for an On-Demand Instance, expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.</p>
    /// <p>The parameter accepts an integer, which Amazon EC2 interprets as a percentage.</p>
    /// <p>To turn off price protection, specify a high value, such as <code>999999</code>.</p>
    /// <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetSpotPlacementScores.html">GetSpotPlacementScores</a> and <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetInstanceTypesFromInstanceRequirements.html">GetInstanceTypesFromInstanceRequirements</a>.</p> <note>
    /// <p>If you set <code>TargetCapacityUnitType</code> to <code>vcpu</code> or <code>memory-mib</code>, the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.</p>
    /// </note>
    /// <p>Default: <code>20</code> </p>
    #[doc(hidden)]
    pub on_demand_max_price_percentage_over_lowest_price: std::option::Option<i32>,
    /// <p>Indicates whether bare metal instance types must be included, excluded, or required.</p>
    /// <ul>
    /// <li> <p>To include bare metal instance types, specify <code>included</code>.</p> </li>
    /// <li> <p>To require only bare metal instance types, specify <code>required</code>.</p> </li>
    /// <li> <p>To exclude bare metal instance types, specify <code>excluded</code>.</p> </li>
    /// </ul>
    /// <p>Default: <code>excluded</code> </p>
    #[doc(hidden)]
    pub bare_metal: std::option::Option<crate::model::BareMetal>,
    /// <p>Indicates whether burstable performance T instance types are included, excluded, or required. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances.html">Burstable performance instances</a>.</p>
    /// <ul>
    /// <li> <p>To include burstable performance instance types, specify <code>included</code>.</p> </li>
    /// <li> <p>To require only burstable performance instance types, specify <code>required</code>.</p> </li>
    /// <li> <p>To exclude burstable performance instance types, specify <code>excluded</code>.</p> </li>
    /// </ul>
    /// <p>Default: <code>excluded</code> </p>
    #[doc(hidden)]
    pub burstable_performance: std::option::Option<crate::model::BurstablePerformance>,
    /// <p>Indicates whether instance types must support hibernation for On-Demand Instances.</p>
    /// <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetSpotPlacementScores.html">GetSpotPlacementScores</a>.</p>
    /// <p>Default: <code>false</code> </p>
    #[doc(hidden)]
    pub require_hibernate_support: std::option::Option<bool>,
    /// <p>The minimum and maximum number of network interfaces.</p>
    /// <p>Default: No minimum or maximum limits</p>
    #[doc(hidden)]
    pub network_interface_count: std::option::Option<crate::model::NetworkInterfaceCountRequest>,
    /// <p>Indicates whether instance types with instance store volumes are included, excluded, or required. For more information, <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/InstanceStorage.html">Amazon EC2 instance store</a> in the <i>Amazon EC2 User Guide</i>.</p>
    /// <ul>
    /// <li> <p>To include instance types with instance store volumes, specify <code>included</code>.</p> </li>
    /// <li> <p>To require only instance types with instance store volumes, specify <code>required</code>.</p> </li>
    /// <li> <p>To exclude instance types with instance store volumes, specify <code>excluded</code>.</p> </li>
    /// </ul>
    /// <p>Default: <code>included</code> </p>
    #[doc(hidden)]
    pub local_storage: std::option::Option<crate::model::LocalStorage>,
    /// <p>The type of local storage that is required.</p>
    /// <ul>
    /// <li> <p>For instance types with hard disk drive (HDD) storage, specify <code>hdd</code>.</p> </li>
    /// <li> <p>For instance types with solid state drive (SSD) storage, specify <code>ssd</code>.</p> </li>
    /// </ul>
    /// <p>Default: <code>hdd</code> and <code>ssd</code> </p>
    #[doc(hidden)]
    pub local_storage_types: std::option::Option<std::vec::Vec<crate::model::LocalStorageType>>,
    /// <p>The minimum and maximum amount of total local storage, in GB.</p>
    /// <p>Default: No minimum or maximum limits</p>
    #[doc(hidden)]
    pub total_local_storage_gb: std::option::Option<crate::model::TotalLocalStorageGbRequest>,
    /// <p>The minimum and maximum baseline bandwidth to Amazon EBS, in Mbps. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-optimized.html">Amazon EBS–optimized instances</a> in the <i>Amazon EC2 User Guide</i>.</p>
    /// <p>Default: No minimum or maximum limits</p>
    #[doc(hidden)]
    pub baseline_ebs_bandwidth_mbps:
        std::option::Option<crate::model::BaselineEbsBandwidthMbpsRequest>,
    /// <p>The accelerator types that must be on the instance type.</p>
    /// <ul>
    /// <li> <p>To include instance types with GPU hardware, specify <code>gpu</code>.</p> </li>
    /// <li> <p>To include instance types with FPGA hardware, specify <code>fpga</code>.</p> </li>
    /// <li> <p>To include instance types with inference hardware, specify <code>inference</code>.</p> </li>
    /// </ul>
    /// <p>Default: Any accelerator type</p>
    #[doc(hidden)]
    pub accelerator_types: std::option::Option<std::vec::Vec<crate::model::AcceleratorType>>,
    /// <p>The minimum and maximum number of accelerators (GPUs, FPGAs, or Amazon Web Services Inferentia chips) on an instance.</p>
    /// <p>To exclude accelerator-enabled instance types, set <code>Max</code> to <code>0</code>.</p>
    /// <p>Default: No minimum or maximum limits</p>
    #[doc(hidden)]
    pub accelerator_count: std::option::Option<crate::model::AcceleratorCountRequest>,
    /// <p>Indicates whether instance types must have accelerators by specific manufacturers.</p>
    /// <ul>
    /// <li> <p>For instance types with NVIDIA devices, specify <code>nvidia</code>.</p> </li>
    /// <li> <p>For instance types with AMD devices, specify <code>amd</code>.</p> </li>
    /// <li> <p>For instance types with Amazon Web Services devices, specify <code>amazon-web-services</code>.</p> </li>
    /// <li> <p>For instance types with Xilinx devices, specify <code>xilinx</code>.</p> </li>
    /// </ul>
    /// <p>Default: Any manufacturer</p>
    #[doc(hidden)]
    pub accelerator_manufacturers:
        std::option::Option<std::vec::Vec<crate::model::AcceleratorManufacturer>>,
    /// <p>The accelerators that must be on the instance type.</p>
    /// <ul>
    /// <li> <p>For instance types with NVIDIA A100 GPUs, specify <code>a100</code>.</p> </li>
    /// <li> <p>For instance types with NVIDIA V100 GPUs, specify <code>v100</code>.</p> </li>
    /// <li> <p>For instance types with NVIDIA K80 GPUs, specify <code>k80</code>.</p> </li>
    /// <li> <p>For instance types with NVIDIA T4 GPUs, specify <code>t4</code>.</p> </li>
    /// <li> <p>For instance types with NVIDIA M60 GPUs, specify <code>m60</code>.</p> </li>
    /// <li> <p>For instance types with AMD Radeon Pro V520 GPUs, specify <code>radeon-pro-v520</code>.</p> </li>
    /// <li> <p>For instance types with Xilinx VU9P FPGAs, specify <code> vu9p</code>.</p> </li>
    /// <li> <p>For instance types with Amazon Web Services Inferentia chips, specify <code>inferentia</code>.</p> </li>
    /// <li> <p>For instance types with NVIDIA GRID K520 GPUs, specify <code>k520</code>.</p> </li>
    /// </ul>
    /// <p>Default: Any accelerator</p>
    #[doc(hidden)]
    pub accelerator_names: std::option::Option<std::vec::Vec<crate::model::AcceleratorName>>,
    /// <p>The minimum and maximum amount of total accelerator memory, in MiB.</p>
    /// <p>Default: No minimum or maximum limits</p>
    #[doc(hidden)]
    pub accelerator_total_memory_mi_b:
        std::option::Option<crate::model::AcceleratorTotalMemoryMiBRequest>,
    /// <p>The minimum and maximum amount of network bandwidth, in gigabits per second (Gbps).</p>
    /// <p>Default: No minimum or maximum limits</p>
    #[doc(hidden)]
    pub network_bandwidth_gbps: std::option::Option<crate::model::NetworkBandwidthGbpsRequest>,
    /// <p>The instance types to apply your specified attributes against. All other instance types are ignored, even if they match your specified attributes.</p>
    /// <p>You can use strings with one or more wild cards, represented by an asterisk (<code>*</code>), to allow an instance type, size, or generation. The following are examples: <code>m5.8xlarge</code>, <code>c5*.*</code>, <code>m5a.*</code>, <code>r*</code>, <code>*3*</code>.</p>
    /// <p>For example, if you specify <code>c5*</code>,Amazon EC2 will allow the entire C5 instance family, which includes all C5a and C5n instance types. If you specify <code>m5a.*</code>, Amazon EC2 will allow all the M5a instance types, but not the M5n instance types.</p> <note>
    /// <p>If you specify <code>AllowedInstanceTypes</code>, you can't specify <code>ExcludedInstanceTypes</code>.</p>
    /// </note>
    /// <p>Default: All instance types</p>
    #[doc(hidden)]
    pub allowed_instance_types: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl InstanceRequirementsRequest {
    /// <p>The minimum and maximum number of vCPUs.</p>
    pub fn v_cpu_count(&self) -> std::option::Option<&crate::model::VCpuCountRangeRequest> {
        self.v_cpu_count.as_ref()
    }
    /// <p>The minimum and maximum amount of memory, in MiB.</p>
    pub fn memory_mi_b(&self) -> std::option::Option<&crate::model::MemoryMiBRequest> {
        self.memory_mi_b.as_ref()
    }
    /// <p>The CPU manufacturers to include.</p>
    /// <ul>
    /// <li> <p>For instance types with Intel CPUs, specify <code>intel</code>.</p> </li>
    /// <li> <p>For instance types with AMD CPUs, specify <code>amd</code>.</p> </li>
    /// <li> <p>For instance types with Amazon Web Services CPUs, specify <code>amazon-web-services</code>.</p> </li>
    /// </ul> <note>
    /// <p>Don't confuse the CPU manufacturer with the CPU architecture. Instances will be launched with a compatible CPU architecture based on the Amazon Machine Image (AMI) that you specify in your launch template.</p>
    /// </note>
    /// <p>Default: Any manufacturer</p>
    pub fn cpu_manufacturers(&self) -> std::option::Option<&[crate::model::CpuManufacturer]> {
        self.cpu_manufacturers.as_deref()
    }
    /// <p>The minimum and maximum amount of memory per vCPU, in GiB.</p>
    /// <p>Default: No minimum or maximum limits</p>
    pub fn memory_gi_b_per_v_cpu(
        &self,
    ) -> std::option::Option<&crate::model::MemoryGiBPerVCpuRequest> {
        self.memory_gi_b_per_v_cpu.as_ref()
    }
    /// <p>The instance types to exclude.</p>
    /// <p>You can use strings with one or more wild cards, represented by an asterisk (<code>*</code>), to exclude an instance family, type, size, or generation. The following are examples: <code>m5.8xlarge</code>, <code>c5*.*</code>, <code>m5a.*</code>, <code>r*</code>, <code>*3*</code>.</p>
    /// <p>For example, if you specify <code>c5*</code>,Amazon EC2 will exclude the entire C5 instance family, which includes all C5a and C5n instance types. If you specify <code>m5a.*</code>, Amazon EC2 will exclude all the M5a instance types, but not the M5n instance types.</p> <note>
    /// <p>If you specify <code>ExcludedInstanceTypes</code>, you can't specify <code>AllowedInstanceTypes</code>.</p>
    /// </note>
    /// <p>Default: No excluded instance types</p>
    pub fn excluded_instance_types(&self) -> std::option::Option<&[std::string::String]> {
        self.excluded_instance_types.as_deref()
    }
    /// <p>Indicates whether current or previous generation instance types are included. The current generation instance types are recommended for use. Current generation instance types are typically the latest two to three generations in each instance family. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html">Instance types</a> in the <i>Amazon EC2 User Guide</i>.</p>
    /// <p>For current generation instance types, specify <code>current</code>.</p>
    /// <p>For previous generation instance types, specify <code>previous</code>.</p>
    /// <p>Default: Current and previous generation instance types</p>
    pub fn instance_generations(&self) -> std::option::Option<&[crate::model::InstanceGeneration]> {
        self.instance_generations.as_deref()
    }
    /// <p>The price protection threshold for Spot Instance. This is the maximum you’ll pay for an Spot Instance, expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.</p>
    /// <p>The parameter accepts an integer, which Amazon EC2 interprets as a percentage.</p>
    /// <p>To turn off price protection, specify a high value, such as <code>999999</code>.</p>
    /// <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetSpotPlacementScores.html">GetSpotPlacementScores</a> and <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetInstanceTypesFromInstanceRequirements.html">GetInstanceTypesFromInstanceRequirements</a>.</p> <note>
    /// <p>If you set <code>TargetCapacityUnitType</code> to <code>vcpu</code> or <code>memory-mib</code>, the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.</p>
    /// </note>
    /// <p>Default: <code>100</code> </p>
    pub fn spot_max_price_percentage_over_lowest_price(&self) -> std::option::Option<i32> {
        self.spot_max_price_percentage_over_lowest_price
    }
    /// <p>The price protection threshold for On-Demand Instances. This is the maximum you’ll pay for an On-Demand Instance, expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.</p>
    /// <p>The parameter accepts an integer, which Amazon EC2 interprets as a percentage.</p>
    /// <p>To turn off price protection, specify a high value, such as <code>999999</code>.</p>
    /// <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetSpotPlacementScores.html">GetSpotPlacementScores</a> and <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetInstanceTypesFromInstanceRequirements.html">GetInstanceTypesFromInstanceRequirements</a>.</p> <note>
    /// <p>If you set <code>TargetCapacityUnitType</code> to <code>vcpu</code> or <code>memory-mib</code>, the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.</p>
    /// </note>
    /// <p>Default: <code>20</code> </p>
    pub fn on_demand_max_price_percentage_over_lowest_price(&self) -> std::option::Option<i32> {
        self.on_demand_max_price_percentage_over_lowest_price
    }
    /// <p>Indicates whether bare metal instance types must be included, excluded, or required.</p>
    /// <ul>
    /// <li> <p>To include bare metal instance types, specify <code>included</code>.</p> </li>
    /// <li> <p>To require only bare metal instance types, specify <code>required</code>.</p> </li>
    /// <li> <p>To exclude bare metal instance types, specify <code>excluded</code>.</p> </li>
    /// </ul>
    /// <p>Default: <code>excluded</code> </p>
    pub fn bare_metal(&self) -> std::option::Option<&crate::model::BareMetal> {
        self.bare_metal.as_ref()
    }
    /// <p>Indicates whether burstable performance T instance types are included, excluded, or required. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances.html">Burstable performance instances</a>.</p>
    /// <ul>
    /// <li> <p>To include burstable performance instance types, specify <code>included</code>.</p> </li>
    /// <li> <p>To require only burstable performance instance types, specify <code>required</code>.</p> </li>
    /// <li> <p>To exclude burstable performance instance types, specify <code>excluded</code>.</p> </li>
    /// </ul>
    /// <p>Default: <code>excluded</code> </p>
    pub fn burstable_performance(
        &self,
    ) -> std::option::Option<&crate::model::BurstablePerformance> {
        self.burstable_performance.as_ref()
    }
    /// <p>Indicates whether instance types must support hibernation for On-Demand Instances.</p>
    /// <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetSpotPlacementScores.html">GetSpotPlacementScores</a>.</p>
    /// <p>Default: <code>false</code> </p>
    pub fn require_hibernate_support(&self) -> std::option::Option<bool> {
        self.require_hibernate_support
    }
    /// <p>The minimum and maximum number of network interfaces.</p>
    /// <p>Default: No minimum or maximum limits</p>
    pub fn network_interface_count(
        &self,
    ) -> std::option::Option<&crate::model::NetworkInterfaceCountRequest> {
        self.network_interface_count.as_ref()
    }
    /// <p>Indicates whether instance types with instance store volumes are included, excluded, or required. For more information, <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/InstanceStorage.html">Amazon EC2 instance store</a> in the <i>Amazon EC2 User Guide</i>.</p>
    /// <ul>
    /// <li> <p>To include instance types with instance store volumes, specify <code>included</code>.</p> </li>
    /// <li> <p>To require only instance types with instance store volumes, specify <code>required</code>.</p> </li>
    /// <li> <p>To exclude instance types with instance store volumes, specify <code>excluded</code>.</p> </li>
    /// </ul>
    /// <p>Default: <code>included</code> </p>
    pub fn local_storage(&self) -> std::option::Option<&crate::model::LocalStorage> {
        self.local_storage.as_ref()
    }
    /// <p>The type of local storage that is required.</p>
    /// <ul>
    /// <li> <p>For instance types with hard disk drive (HDD) storage, specify <code>hdd</code>.</p> </li>
    /// <li> <p>For instance types with solid state drive (SSD) storage, specify <code>ssd</code>.</p> </li>
    /// </ul>
    /// <p>Default: <code>hdd</code> and <code>ssd</code> </p>
    pub fn local_storage_types(&self) -> std::option::Option<&[crate::model::LocalStorageType]> {
        self.local_storage_types.as_deref()
    }
    /// <p>The minimum and maximum amount of total local storage, in GB.</p>
    /// <p>Default: No minimum or maximum limits</p>
    pub fn total_local_storage_gb(
        &self,
    ) -> std::option::Option<&crate::model::TotalLocalStorageGbRequest> {
        self.total_local_storage_gb.as_ref()
    }
    /// <p>The minimum and maximum baseline bandwidth to Amazon EBS, in Mbps. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-optimized.html">Amazon EBS–optimized instances</a> in the <i>Amazon EC2 User Guide</i>.</p>
    /// <p>Default: No minimum or maximum limits</p>
    pub fn baseline_ebs_bandwidth_mbps(
        &self,
    ) -> std::option::Option<&crate::model::BaselineEbsBandwidthMbpsRequest> {
        self.baseline_ebs_bandwidth_mbps.as_ref()
    }
    /// <p>The accelerator types that must be on the instance type.</p>
    /// <ul>
    /// <li> <p>To include instance types with GPU hardware, specify <code>gpu</code>.</p> </li>
    /// <li> <p>To include instance types with FPGA hardware, specify <code>fpga</code>.</p> </li>
    /// <li> <p>To include instance types with inference hardware, specify <code>inference</code>.</p> </li>
    /// </ul>
    /// <p>Default: Any accelerator type</p>
    pub fn accelerator_types(&self) -> std::option::Option<&[crate::model::AcceleratorType]> {
        self.accelerator_types.as_deref()
    }
    /// <p>The minimum and maximum number of accelerators (GPUs, FPGAs, or Amazon Web Services Inferentia chips) on an instance.</p>
    /// <p>To exclude accelerator-enabled instance types, set <code>Max</code> to <code>0</code>.</p>
    /// <p>Default: No minimum or maximum limits</p>
    pub fn accelerator_count(&self) -> std::option::Option<&crate::model::AcceleratorCountRequest> {
        self.accelerator_count.as_ref()
    }
    /// <p>Indicates whether instance types must have accelerators by specific manufacturers.</p>
    /// <ul>
    /// <li> <p>For instance types with NVIDIA devices, specify <code>nvidia</code>.</p> </li>
    /// <li> <p>For instance types with AMD devices, specify <code>amd</code>.</p> </li>
    /// <li> <p>For instance types with Amazon Web Services devices, specify <code>amazon-web-services</code>.</p> </li>
    /// <li> <p>For instance types with Xilinx devices, specify <code>xilinx</code>.</p> </li>
    /// </ul>
    /// <p>Default: Any manufacturer</p>
    pub fn accelerator_manufacturers(
        &self,
    ) -> std::option::Option<&[crate::model::AcceleratorManufacturer]> {
        self.accelerator_manufacturers.as_deref()
    }
    /// <p>The accelerators that must be on the instance type.</p>
    /// <ul>
    /// <li> <p>For instance types with NVIDIA A100 GPUs, specify <code>a100</code>.</p> </li>
    /// <li> <p>For instance types with NVIDIA V100 GPUs, specify <code>v100</code>.</p> </li>
    /// <li> <p>For instance types with NVIDIA K80 GPUs, specify <code>k80</code>.</p> </li>
    /// <li> <p>For instance types with NVIDIA T4 GPUs, specify <code>t4</code>.</p> </li>
    /// <li> <p>For instance types with NVIDIA M60 GPUs, specify <code>m60</code>.</p> </li>
    /// <li> <p>For instance types with AMD Radeon Pro V520 GPUs, specify <code>radeon-pro-v520</code>.</p> </li>
    /// <li> <p>For instance types with Xilinx VU9P FPGAs, specify <code> vu9p</code>.</p> </li>
    /// <li> <p>For instance types with Amazon Web Services Inferentia chips, specify <code>inferentia</code>.</p> </li>
    /// <li> <p>For instance types with NVIDIA GRID K520 GPUs, specify <code>k520</code>.</p> </li>
    /// </ul>
    /// <p>Default: Any accelerator</p>
    pub fn accelerator_names(&self) -> std::option::Option<&[crate::model::AcceleratorName]> {
        self.accelerator_names.as_deref()
    }
    /// <p>The minimum and maximum amount of total accelerator memory, in MiB.</p>
    /// <p>Default: No minimum or maximum limits</p>
    pub fn accelerator_total_memory_mi_b(
        &self,
    ) -> std::option::Option<&crate::model::AcceleratorTotalMemoryMiBRequest> {
        self.accelerator_total_memory_mi_b.as_ref()
    }
    /// <p>The minimum and maximum amount of network bandwidth, in gigabits per second (Gbps).</p>
    /// <p>Default: No minimum or maximum limits</p>
    pub fn network_bandwidth_gbps(
        &self,
    ) -> std::option::Option<&crate::model::NetworkBandwidthGbpsRequest> {
        self.network_bandwidth_gbps.as_ref()
    }
    /// <p>The instance types to apply your specified attributes against. All other instance types are ignored, even if they match your specified attributes.</p>
    /// <p>You can use strings with one or more wild cards, represented by an asterisk (<code>*</code>), to allow an instance type, size, or generation. The following are examples: <code>m5.8xlarge</code>, <code>c5*.*</code>, <code>m5a.*</code>, <code>r*</code>, <code>*3*</code>.</p>
    /// <p>For example, if you specify <code>c5*</code>,Amazon EC2 will allow the entire C5 instance family, which includes all C5a and C5n instance types. If you specify <code>m5a.*</code>, Amazon EC2 will allow all the M5a instance types, but not the M5n instance types.</p> <note>
    /// <p>If you specify <code>AllowedInstanceTypes</code>, you can't specify <code>ExcludedInstanceTypes</code>.</p>
    /// </note>
    /// <p>Default: All instance types</p>
    pub fn allowed_instance_types(&self) -> std::option::Option<&[std::string::String]> {
        self.allowed_instance_types.as_deref()
    }
}
/// See [`InstanceRequirementsRequest`](crate::model::InstanceRequirementsRequest).
pub mod instance_requirements_request {

    /// A builder for [`InstanceRequirementsRequest`](crate::model::InstanceRequirementsRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) v_cpu_count: std::option::Option<crate::model::VCpuCountRangeRequest>,
        pub(crate) memory_mi_b: std::option::Option<crate::model::MemoryMiBRequest>,
        pub(crate) cpu_manufacturers:
            std::option::Option<std::vec::Vec<crate::model::CpuManufacturer>>,
        pub(crate) memory_gi_b_per_v_cpu:
            std::option::Option<crate::model::MemoryGiBPerVCpuRequest>,
        pub(crate) excluded_instance_types: std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) instance_generations:
            std::option::Option<std::vec::Vec<crate::model::InstanceGeneration>>,
        pub(crate) spot_max_price_percentage_over_lowest_price: std::option::Option<i32>,
        pub(crate) on_demand_max_price_percentage_over_lowest_price: std::option::Option<i32>,
        pub(crate) bare_metal: std::option::Option<crate::model::BareMetal>,
        pub(crate) burstable_performance: std::option::Option<crate::model::BurstablePerformance>,
        pub(crate) require_hibernate_support: std::option::Option<bool>,
        pub(crate) network_interface_count:
            std::option::Option<crate::model::NetworkInterfaceCountRequest>,
        pub(crate) local_storage: std::option::Option<crate::model::LocalStorage>,
        pub(crate) local_storage_types:
            std::option::Option<std::vec::Vec<crate::model::LocalStorageType>>,
        pub(crate) total_local_storage_gb:
            std::option::Option<crate::model::TotalLocalStorageGbRequest>,
        pub(crate) baseline_ebs_bandwidth_mbps:
            std::option::Option<crate::model::BaselineEbsBandwidthMbpsRequest>,
        pub(crate) accelerator_types:
            std::option::Option<std::vec::Vec<crate::model::AcceleratorType>>,
        pub(crate) accelerator_count: std::option::Option<crate::model::AcceleratorCountRequest>,
        pub(crate) accelerator_manufacturers:
            std::option::Option<std::vec::Vec<crate::model::AcceleratorManufacturer>>,
        pub(crate) accelerator_names:
            std::option::Option<std::vec::Vec<crate::model::AcceleratorName>>,
        pub(crate) accelerator_total_memory_mi_b:
            std::option::Option<crate::model::AcceleratorTotalMemoryMiBRequest>,
        pub(crate) network_bandwidth_gbps:
            std::option::Option<crate::model::NetworkBandwidthGbpsRequest>,
        pub(crate) allowed_instance_types: std::option::Option<std::vec::Vec<std::string::String>>,
    }
    impl Builder {
        /// <p>The minimum and maximum number of vCPUs.</p>
        pub fn v_cpu_count(mut self, input: crate::model::VCpuCountRangeRequest) -> Self {
            self.v_cpu_count = Some(input);
            self
        }
        /// <p>The minimum and maximum number of vCPUs.</p>
        pub fn set_v_cpu_count(
            mut self,
            input: std::option::Option<crate::model::VCpuCountRangeRequest>,
        ) -> Self {
            self.v_cpu_count = input;
            self
        }
        /// <p>The minimum and maximum amount of memory, in MiB.</p>
        pub fn memory_mi_b(mut self, input: crate::model::MemoryMiBRequest) -> Self {
            self.memory_mi_b = Some(input);
            self
        }
        /// <p>The minimum and maximum amount of memory, in MiB.</p>
        pub fn set_memory_mi_b(
            mut self,
            input: std::option::Option<crate::model::MemoryMiBRequest>,
        ) -> Self {
            self.memory_mi_b = input;
            self
        }
        /// Appends an item to `cpu_manufacturers`.
        ///
        /// To override the contents of this collection use [`set_cpu_manufacturers`](Self::set_cpu_manufacturers).
        ///
        /// <p>The CPU manufacturers to include.</p>
        /// <ul>
        /// <li> <p>For instance types with Intel CPUs, specify <code>intel</code>.</p> </li>
        /// <li> <p>For instance types with AMD CPUs, specify <code>amd</code>.</p> </li>
        /// <li> <p>For instance types with Amazon Web Services CPUs, specify <code>amazon-web-services</code>.</p> </li>
        /// </ul> <note>
        /// <p>Don't confuse the CPU manufacturer with the CPU architecture. Instances will be launched with a compatible CPU architecture based on the Amazon Machine Image (AMI) that you specify in your launch template.</p>
        /// </note>
        /// <p>Default: Any manufacturer</p>
        pub fn cpu_manufacturers(mut self, input: crate::model::CpuManufacturer) -> Self {
            let mut v = self.cpu_manufacturers.unwrap_or_default();
            v.push(input);
            self.cpu_manufacturers = Some(v);
            self
        }
        /// <p>The CPU manufacturers to include.</p>
        /// <ul>
        /// <li> <p>For instance types with Intel CPUs, specify <code>intel</code>.</p> </li>
        /// <li> <p>For instance types with AMD CPUs, specify <code>amd</code>.</p> </li>
        /// <li> <p>For instance types with Amazon Web Services CPUs, specify <code>amazon-web-services</code>.</p> </li>
        /// </ul> <note>
        /// <p>Don't confuse the CPU manufacturer with the CPU architecture. Instances will be launched with a compatible CPU architecture based on the Amazon Machine Image (AMI) that you specify in your launch template.</p>
        /// </note>
        /// <p>Default: Any manufacturer</p>
        pub fn set_cpu_manufacturers(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::CpuManufacturer>>,
        ) -> Self {
            self.cpu_manufacturers = input;
            self
        }
        /// <p>The minimum and maximum amount of memory per vCPU, in GiB.</p>
        /// <p>Default: No minimum or maximum limits</p>
        pub fn memory_gi_b_per_v_cpu(
            mut self,
            input: crate::model::MemoryGiBPerVCpuRequest,
        ) -> Self {
            self.memory_gi_b_per_v_cpu = Some(input);
            self
        }
        /// <p>The minimum and maximum amount of memory per vCPU, in GiB.</p>
        /// <p>Default: No minimum or maximum limits</p>
        pub fn set_memory_gi_b_per_v_cpu(
            mut self,
            input: std::option::Option<crate::model::MemoryGiBPerVCpuRequest>,
        ) -> Self {
            self.memory_gi_b_per_v_cpu = input;
            self
        }
        /// Appends an item to `excluded_instance_types`.
        ///
        /// To override the contents of this collection use [`set_excluded_instance_types`](Self::set_excluded_instance_types).
        ///
        /// <p>The instance types to exclude.</p>
        /// <p>You can use strings with one or more wild cards, represented by an asterisk (<code>*</code>), to exclude an instance family, type, size, or generation. The following are examples: <code>m5.8xlarge</code>, <code>c5*.*</code>, <code>m5a.*</code>, <code>r*</code>, <code>*3*</code>.</p>
        /// <p>For example, if you specify <code>c5*</code>,Amazon EC2 will exclude the entire C5 instance family, which includes all C5a and C5n instance types. If you specify <code>m5a.*</code>, Amazon EC2 will exclude all the M5a instance types, but not the M5n instance types.</p> <note>
        /// <p>If you specify <code>ExcludedInstanceTypes</code>, you can't specify <code>AllowedInstanceTypes</code>.</p>
        /// </note>
        /// <p>Default: No excluded instance types</p>
        pub fn excluded_instance_types(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.excluded_instance_types.unwrap_or_default();
            v.push(input.into());
            self.excluded_instance_types = Some(v);
            self
        }
        /// <p>The instance types to exclude.</p>
        /// <p>You can use strings with one or more wild cards, represented by an asterisk (<code>*</code>), to exclude an instance family, type, size, or generation. The following are examples: <code>m5.8xlarge</code>, <code>c5*.*</code>, <code>m5a.*</code>, <code>r*</code>, <code>*3*</code>.</p>
        /// <p>For example, if you specify <code>c5*</code>,Amazon EC2 will exclude the entire C5 instance family, which includes all C5a and C5n instance types. If you specify <code>m5a.*</code>, Amazon EC2 will exclude all the M5a instance types, but not the M5n instance types.</p> <note>
        /// <p>If you specify <code>ExcludedInstanceTypes</code>, you can't specify <code>AllowedInstanceTypes</code>.</p>
        /// </note>
        /// <p>Default: No excluded instance types</p>
        pub fn set_excluded_instance_types(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.excluded_instance_types = input;
            self
        }
        /// Appends an item to `instance_generations`.
        ///
        /// To override the contents of this collection use [`set_instance_generations`](Self::set_instance_generations).
        ///
        /// <p>Indicates whether current or previous generation instance types are included. The current generation instance types are recommended for use. Current generation instance types are typically the latest two to three generations in each instance family. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html">Instance types</a> in the <i>Amazon EC2 User Guide</i>.</p>
        /// <p>For current generation instance types, specify <code>current</code>.</p>
        /// <p>For previous generation instance types, specify <code>previous</code>.</p>
        /// <p>Default: Current and previous generation instance types</p>
        pub fn instance_generations(mut self, input: crate::model::InstanceGeneration) -> Self {
            let mut v = self.instance_generations.unwrap_or_default();
            v.push(input);
            self.instance_generations = Some(v);
            self
        }
        /// <p>Indicates whether current or previous generation instance types are included. The current generation instance types are recommended for use. Current generation instance types are typically the latest two to three generations in each instance family. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html">Instance types</a> in the <i>Amazon EC2 User Guide</i>.</p>
        /// <p>For current generation instance types, specify <code>current</code>.</p>
        /// <p>For previous generation instance types, specify <code>previous</code>.</p>
        /// <p>Default: Current and previous generation instance types</p>
        pub fn set_instance_generations(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::InstanceGeneration>>,
        ) -> Self {
            self.instance_generations = input;
            self
        }
        /// <p>The price protection threshold for Spot Instance. This is the maximum you’ll pay for an Spot Instance, expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.</p>
        /// <p>The parameter accepts an integer, which Amazon EC2 interprets as a percentage.</p>
        /// <p>To turn off price protection, specify a high value, such as <code>999999</code>.</p>
        /// <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetSpotPlacementScores.html">GetSpotPlacementScores</a> and <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetInstanceTypesFromInstanceRequirements.html">GetInstanceTypesFromInstanceRequirements</a>.</p> <note>
        /// <p>If you set <code>TargetCapacityUnitType</code> to <code>vcpu</code> or <code>memory-mib</code>, the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.</p>
        /// </note>
        /// <p>Default: <code>100</code> </p>
        pub fn spot_max_price_percentage_over_lowest_price(mut self, input: i32) -> Self {
            self.spot_max_price_percentage_over_lowest_price = Some(input);
            self
        }
        /// <p>The price protection threshold for Spot Instance. This is the maximum you’ll pay for an Spot Instance, expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.</p>
        /// <p>The parameter accepts an integer, which Amazon EC2 interprets as a percentage.</p>
        /// <p>To turn off price protection, specify a high value, such as <code>999999</code>.</p>
        /// <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetSpotPlacementScores.html">GetSpotPlacementScores</a> and <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetInstanceTypesFromInstanceRequirements.html">GetInstanceTypesFromInstanceRequirements</a>.</p> <note>
        /// <p>If you set <code>TargetCapacityUnitType</code> to <code>vcpu</code> or <code>memory-mib</code>, the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.</p>
        /// </note>
        /// <p>Default: <code>100</code> </p>
        pub fn set_spot_max_price_percentage_over_lowest_price(
            mut self,
            input: std::option::Option<i32>,
        ) -> Self {
            self.spot_max_price_percentage_over_lowest_price = input;
            self
        }
        /// <p>The price protection threshold for On-Demand Instances. This is the maximum you’ll pay for an On-Demand Instance, expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.</p>
        /// <p>The parameter accepts an integer, which Amazon EC2 interprets as a percentage.</p>
        /// <p>To turn off price protection, specify a high value, such as <code>999999</code>.</p>
        /// <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetSpotPlacementScores.html">GetSpotPlacementScores</a> and <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetInstanceTypesFromInstanceRequirements.html">GetInstanceTypesFromInstanceRequirements</a>.</p> <note>
        /// <p>If you set <code>TargetCapacityUnitType</code> to <code>vcpu</code> or <code>memory-mib</code>, the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.</p>
        /// </note>
        /// <p>Default: <code>20</code> </p>
        pub fn on_demand_max_price_percentage_over_lowest_price(mut self, input: i32) -> Self {
            self.on_demand_max_price_percentage_over_lowest_price = Some(input);
            self
        }
        /// <p>The price protection threshold for On-Demand Instances. This is the maximum you’ll pay for an On-Demand Instance, expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.</p>
        /// <p>The parameter accepts an integer, which Amazon EC2 interprets as a percentage.</p>
        /// <p>To turn off price protection, specify a high value, such as <code>999999</code>.</p>
        /// <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetSpotPlacementScores.html">GetSpotPlacementScores</a> and <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetInstanceTypesFromInstanceRequirements.html">GetInstanceTypesFromInstanceRequirements</a>.</p> <note>
        /// <p>If you set <code>TargetCapacityUnitType</code> to <code>vcpu</code> or <code>memory-mib</code>, the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.</p>
        /// </note>
        /// <p>Default: <code>20</code> </p>
        pub fn set_on_demand_max_price_percentage_over_lowest_price(
            mut self,
            input: std::option::Option<i32>,
        ) -> Self {
            self.on_demand_max_price_percentage_over_lowest_price = input;
            self
        }
        /// <p>Indicates whether bare metal instance types must be included, excluded, or required.</p>
        /// <ul>
        /// <li> <p>To include bare metal instance types, specify <code>included</code>.</p> </li>
        /// <li> <p>To require only bare metal instance types, specify <code>required</code>.</p> </li>
        /// <li> <p>To exclude bare metal instance types, specify <code>excluded</code>.</p> </li>
        /// </ul>
        /// <p>Default: <code>excluded</code> </p>
        pub fn bare_metal(mut self, input: crate::model::BareMetal) -> Self {
            self.bare_metal = Some(input);
            self
        }
        /// <p>Indicates whether bare metal instance types must be included, excluded, or required.</p>
        /// <ul>
        /// <li> <p>To include bare metal instance types, specify <code>included</code>.</p> </li>
        /// <li> <p>To require only bare metal instance types, specify <code>required</code>.</p> </li>
        /// <li> <p>To exclude bare metal instance types, specify <code>excluded</code>.</p> </li>
        /// </ul>
        /// <p>Default: <code>excluded</code> </p>
        pub fn set_bare_metal(
            mut self,
            input: std::option::Option<crate::model::BareMetal>,
        ) -> Self {
            self.bare_metal = input;
            self
        }
        /// <p>Indicates whether burstable performance T instance types are included, excluded, or required. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances.html">Burstable performance instances</a>.</p>
        /// <ul>
        /// <li> <p>To include burstable performance instance types, specify <code>included</code>.</p> </li>
        /// <li> <p>To require only burstable performance instance types, specify <code>required</code>.</p> </li>
        /// <li> <p>To exclude burstable performance instance types, specify <code>excluded</code>.</p> </li>
        /// </ul>
        /// <p>Default: <code>excluded</code> </p>
        pub fn burstable_performance(mut self, input: crate::model::BurstablePerformance) -> Self {
            self.burstable_performance = Some(input);
            self
        }
        /// <p>Indicates whether burstable performance T instance types are included, excluded, or required. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances.html">Burstable performance instances</a>.</p>
        /// <ul>
        /// <li> <p>To include burstable performance instance types, specify <code>included</code>.</p> </li>
        /// <li> <p>To require only burstable performance instance types, specify <code>required</code>.</p> </li>
        /// <li> <p>To exclude burstable performance instance types, specify <code>excluded</code>.</p> </li>
        /// </ul>
        /// <p>Default: <code>excluded</code> </p>
        pub fn set_burstable_performance(
            mut self,
            input: std::option::Option<crate::model::BurstablePerformance>,
        ) -> Self {
            self.burstable_performance = input;
            self
        }
        /// <p>Indicates whether instance types must support hibernation for On-Demand Instances.</p>
        /// <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetSpotPlacementScores.html">GetSpotPlacementScores</a>.</p>
        /// <p>Default: <code>false</code> </p>
        pub fn require_hibernate_support(mut self, input: bool) -> Self {
            self.require_hibernate_support = Some(input);
            self
        }
        /// <p>Indicates whether instance types must support hibernation for On-Demand Instances.</p>
        /// <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetSpotPlacementScores.html">GetSpotPlacementScores</a>.</p>
        /// <p>Default: <code>false</code> </p>
        pub fn set_require_hibernate_support(mut self, input: std::option::Option<bool>) -> Self {
            self.require_hibernate_support = input;
            self
        }
        /// <p>The minimum and maximum number of network interfaces.</p>
        /// <p>Default: No minimum or maximum limits</p>
        pub fn network_interface_count(
            mut self,
            input: crate::model::NetworkInterfaceCountRequest,
        ) -> Self {
            self.network_interface_count = Some(input);
            self
        }
        /// <p>The minimum and maximum number of network interfaces.</p>
        /// <p>Default: No minimum or maximum limits</p>
        pub fn set_network_interface_count(
            mut self,
            input: std::option::Option<crate::model::NetworkInterfaceCountRequest>,
        ) -> Self {
            self.network_interface_count = input;
            self
        }
        /// <p>Indicates whether instance types with instance store volumes are included, excluded, or required. For more information, <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/InstanceStorage.html">Amazon EC2 instance store</a> in the <i>Amazon EC2 User Guide</i>.</p>
        /// <ul>
        /// <li> <p>To include instance types with instance store volumes, specify <code>included</code>.</p> </li>
        /// <li> <p>To require only instance types with instance store volumes, specify <code>required</code>.</p> </li>
        /// <li> <p>To exclude instance types with instance store volumes, specify <code>excluded</code>.</p> </li>
        /// </ul>
        /// <p>Default: <code>included</code> </p>
        pub fn local_storage(mut self, input: crate::model::LocalStorage) -> Self {
            self.local_storage = Some(input);
            self
        }
        /// <p>Indicates whether instance types with instance store volumes are included, excluded, or required. For more information, <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/InstanceStorage.html">Amazon EC2 instance store</a> in the <i>Amazon EC2 User Guide</i>.</p>
        /// <ul>
        /// <li> <p>To include instance types with instance store volumes, specify <code>included</code>.</p> </li>
        /// <li> <p>To require only instance types with instance store volumes, specify <code>required</code>.</p> </li>
        /// <li> <p>To exclude instance types with instance store volumes, specify <code>excluded</code>.</p> </li>
        /// </ul>
        /// <p>Default: <code>included</code> </p>
        pub fn set_local_storage(
            mut self,
            input: std::option::Option<crate::model::LocalStorage>,
        ) -> Self {
            self.local_storage = input;
            self
        }
        /// Appends an item to `local_storage_types`.
        ///
        /// To override the contents of this collection use [`set_local_storage_types`](Self::set_local_storage_types).
        ///
        /// <p>The type of local storage that is required.</p>
        /// <ul>
        /// <li> <p>For instance types with hard disk drive (HDD) storage, specify <code>hdd</code>.</p> </li>
        /// <li> <p>For instance types with solid state drive (SSD) storage, specify <code>ssd</code>.</p> </li>
        /// </ul>
        /// <p>Default: <code>hdd</code> and <code>ssd</code> </p>
        pub fn local_storage_types(mut self, input: crate::model::LocalStorageType) -> Self {
            let mut v = self.local_storage_types.unwrap_or_default();
            v.push(input);
            self.local_storage_types = Some(v);
            self
        }
        /// <p>The type of local storage that is required.</p>
        /// <ul>
        /// <li> <p>For instance types with hard disk drive (HDD) storage, specify <code>hdd</code>.</p> </li>
        /// <li> <p>For instance types with solid state drive (SSD) storage, specify <code>ssd</code>.</p> </li>
        /// </ul>
        /// <p>Default: <code>hdd</code> and <code>ssd</code> </p>
        pub fn set_local_storage_types(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::LocalStorageType>>,
        ) -> Self {
            self.local_storage_types = input;
            self
        }
        /// <p>The minimum and maximum amount of total local storage, in GB.</p>
        /// <p>Default: No minimum or maximum limits</p>
        pub fn total_local_storage_gb(
            mut self,
            input: crate::model::TotalLocalStorageGbRequest,
        ) -> Self {
            self.total_local_storage_gb = Some(input);
            self
        }
        /// <p>The minimum and maximum amount of total local storage, in GB.</p>
        /// <p>Default: No minimum or maximum limits</p>
        pub fn set_total_local_storage_gb(
            mut self,
            input: std::option::Option<crate::model::TotalLocalStorageGbRequest>,
        ) -> Self {
            self.total_local_storage_gb = input;
            self
        }
        /// <p>The minimum and maximum baseline bandwidth to Amazon EBS, in Mbps. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-optimized.html">Amazon EBS–optimized instances</a> in the <i>Amazon EC2 User Guide</i>.</p>
        /// <p>Default: No minimum or maximum limits</p>
        pub fn baseline_ebs_bandwidth_mbps(
            mut self,
            input: crate::model::BaselineEbsBandwidthMbpsRequest,
        ) -> Self {
            self.baseline_ebs_bandwidth_mbps = Some(input);
            self
        }
        /// <p>The minimum and maximum baseline bandwidth to Amazon EBS, in Mbps. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-optimized.html">Amazon EBS–optimized instances</a> in the <i>Amazon EC2 User Guide</i>.</p>
        /// <p>Default: No minimum or maximum limits</p>
        pub fn set_baseline_ebs_bandwidth_mbps(
            mut self,
            input: std::option::Option<crate::model::BaselineEbsBandwidthMbpsRequest>,
        ) -> Self {
            self.baseline_ebs_bandwidth_mbps = input;
            self
        }
        /// Appends an item to `accelerator_types`.
        ///
        /// To override the contents of this collection use [`set_accelerator_types`](Self::set_accelerator_types).
        ///
        /// <p>The accelerator types that must be on the instance type.</p>
        /// <ul>
        /// <li> <p>To include instance types with GPU hardware, specify <code>gpu</code>.</p> </li>
        /// <li> <p>To include instance types with FPGA hardware, specify <code>fpga</code>.</p> </li>
        /// <li> <p>To include instance types with inference hardware, specify <code>inference</code>.</p> </li>
        /// </ul>
        /// <p>Default: Any accelerator type</p>
        pub fn accelerator_types(mut self, input: crate::model::AcceleratorType) -> Self {
            let mut v = self.accelerator_types.unwrap_or_default();
            v.push(input);
            self.accelerator_types = Some(v);
            self
        }
        /// <p>The accelerator types that must be on the instance type.</p>
        /// <ul>
        /// <li> <p>To include instance types with GPU hardware, specify <code>gpu</code>.</p> </li>
        /// <li> <p>To include instance types with FPGA hardware, specify <code>fpga</code>.</p> </li>
        /// <li> <p>To include instance types with inference hardware, specify <code>inference</code>.</p> </li>
        /// </ul>
        /// <p>Default: Any accelerator type</p>
        pub fn set_accelerator_types(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::AcceleratorType>>,
        ) -> Self {
            self.accelerator_types = input;
            self
        }
        /// <p>The minimum and maximum number of accelerators (GPUs, FPGAs, or Amazon Web Services Inferentia chips) on an instance.</p>
        /// <p>To exclude accelerator-enabled instance types, set <code>Max</code> to <code>0</code>.</p>
        /// <p>Default: No minimum or maximum limits</p>
        pub fn accelerator_count(mut self, input: crate::model::AcceleratorCountRequest) -> Self {
            self.accelerator_count = Some(input);
            self
        }
        /// <p>The minimum and maximum number of accelerators (GPUs, FPGAs, or Amazon Web Services Inferentia chips) on an instance.</p>
        /// <p>To exclude accelerator-enabled instance types, set <code>Max</code> to <code>0</code>.</p>
        /// <p>Default: No minimum or maximum limits</p>
        pub fn set_accelerator_count(
            mut self,
            input: std::option::Option<crate::model::AcceleratorCountRequest>,
        ) -> Self {
            self.accelerator_count = input;
            self
        }
        /// Appends an item to `accelerator_manufacturers`.
        ///
        /// To override the contents of this collection use [`set_accelerator_manufacturers`](Self::set_accelerator_manufacturers).
        ///
        /// <p>Indicates whether instance types must have accelerators by specific manufacturers.</p>
        /// <ul>
        /// <li> <p>For instance types with NVIDIA devices, specify <code>nvidia</code>.</p> </li>
        /// <li> <p>For instance types with AMD devices, specify <code>amd</code>.</p> </li>
        /// <li> <p>For instance types with Amazon Web Services devices, specify <code>amazon-web-services</code>.</p> </li>
        /// <li> <p>For instance types with Xilinx devices, specify <code>xilinx</code>.</p> </li>
        /// </ul>
        /// <p>Default: Any manufacturer</p>
        pub fn accelerator_manufacturers(
            mut self,
            input: crate::model::AcceleratorManufacturer,
        ) -> Self {
            let mut v = self.accelerator_manufacturers.unwrap_or_default();
            v.push(input);
            self.accelerator_manufacturers = Some(v);
            self
        }
        /// <p>Indicates whether instance types must have accelerators by specific manufacturers.</p>
        /// <ul>
        /// <li> <p>For instance types with NVIDIA devices, specify <code>nvidia</code>.</p> </li>
        /// <li> <p>For instance types with AMD devices, specify <code>amd</code>.</p> </li>
        /// <li> <p>For instance types with Amazon Web Services devices, specify <code>amazon-web-services</code>.</p> </li>
        /// <li> <p>For instance types with Xilinx devices, specify <code>xilinx</code>.</p> </li>
        /// </ul>
        /// <p>Default: Any manufacturer</p>
        pub fn set_accelerator_manufacturers(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::AcceleratorManufacturer>>,
        ) -> Self {
            self.accelerator_manufacturers = input;
            self
        }
        /// Appends an item to `accelerator_names`.
        ///
        /// To override the contents of this collection use [`set_accelerator_names`](Self::set_accelerator_names).
        ///
        /// <p>The accelerators that must be on the instance type.</p>
        /// <ul>
        /// <li> <p>For instance types with NVIDIA A100 GPUs, specify <code>a100</code>.</p> </li>
        /// <li> <p>For instance types with NVIDIA V100 GPUs, specify <code>v100</code>.</p> </li>
        /// <li> <p>For instance types with NVIDIA K80 GPUs, specify <code>k80</code>.</p> </li>
        /// <li> <p>For instance types with NVIDIA T4 GPUs, specify <code>t4</code>.</p> </li>
        /// <li> <p>For instance types with NVIDIA M60 GPUs, specify <code>m60</code>.</p> </li>
        /// <li> <p>For instance types with AMD Radeon Pro V520 GPUs, specify <code>radeon-pro-v520</code>.</p> </li>
        /// <li> <p>For instance types with Xilinx VU9P FPGAs, specify <code> vu9p</code>.</p> </li>
        /// <li> <p>For instance types with Amazon Web Services Inferentia chips, specify <code>inferentia</code>.</p> </li>
        /// <li> <p>For instance types with NVIDIA GRID K520 GPUs, specify <code>k520</code>.</p> </li>
        /// </ul>
        /// <p>Default: Any accelerator</p>
        pub fn accelerator_names(mut self, input: crate::model::AcceleratorName) -> Self {
            let mut v = self.accelerator_names.unwrap_or_default();
            v.push(input);
            self.accelerator_names = Some(v);
            self
        }
        /// <p>The accelerators that must be on the instance type.</p>
        /// <ul>
        /// <li> <p>For instance types with NVIDIA A100 GPUs, specify <code>a100</code>.</p> </li>
        /// <li> <p>For instance types with NVIDIA V100 GPUs, specify <code>v100</code>.</p> </li>
        /// <li> <p>For instance types with NVIDIA K80 GPUs, specify <code>k80</code>.</p> </li>
        /// <li> <p>For instance types with NVIDIA T4 GPUs, specify <code>t4</code>.</p> </li>
        /// <li> <p>For instance types with NVIDIA M60 GPUs, specify <code>m60</code>.</p> </li>
        /// <li> <p>For instance types with AMD Radeon Pro V520 GPUs, specify <code>radeon-pro-v520</code>.</p> </li>
        /// <li> <p>For instance types with Xilinx VU9P FPGAs, specify <code> vu9p</code>.</p> </li>
        /// <li> <p>For instance types with Amazon Web Services Inferentia chips, specify <code>inferentia</code>.</p> </li>
        /// <li> <p>For instance types with NVIDIA GRID K520 GPUs, specify <code>k520</code>.</p> </li>
        /// </ul>
        /// <p>Default: Any accelerator</p>
        pub fn set_accelerator_names(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::AcceleratorName>>,
        ) -> Self {
            self.accelerator_names = input;
            self
        }
        /// <p>The minimum and maximum amount of total accelerator memory, in MiB.</p>
        /// <p>Default: No minimum or maximum limits</p>
        pub fn accelerator_total_memory_mi_b(
            mut self,
            input: crate::model::AcceleratorTotalMemoryMiBRequest,
        ) -> Self {
            self.accelerator_total_memory_mi_b = Some(input);
            self
        }
        /// <p>The minimum and maximum amount of total accelerator memory, in MiB.</p>
        /// <p>Default: No minimum or maximum limits</p>
        pub fn set_accelerator_total_memory_mi_b(
            mut self,
            input: std::option::Option<crate::model::AcceleratorTotalMemoryMiBRequest>,
        ) -> Self {
            self.accelerator_total_memory_mi_b = input;
            self
        }
        /// <p>The minimum and maximum amount of network bandwidth, in gigabits per second (Gbps).</p>
        /// <p>Default: No minimum or maximum limits</p>
        pub fn network_bandwidth_gbps(
            mut self,
            input: crate::model::NetworkBandwidthGbpsRequest,
        ) -> Self {
            self.network_bandwidth_gbps = Some(input);
            self
        }
        /// <p>The minimum and maximum amount of network bandwidth, in gigabits per second (Gbps).</p>
        /// <p>Default: No minimum or maximum limits</p>
        pub fn set_network_bandwidth_gbps(
            mut self,
            input: std::option::Option<crate::model::NetworkBandwidthGbpsRequest>,
        ) -> Self {
            self.network_bandwidth_gbps = input;
            self
        }
        /// Appends an item to `allowed_instance_types`.
        ///
        /// To override the contents of this collection use [`set_allowed_instance_types`](Self::set_allowed_instance_types).
        ///
        /// <p>The instance types to apply your specified attributes against. All other instance types are ignored, even if they match your specified attributes.</p>
        /// <p>You can use strings with one or more wild cards, represented by an asterisk (<code>*</code>), to allow an instance type, size, or generation. The following are examples: <code>m5.8xlarge</code>, <code>c5*.*</code>, <code>m5a.*</code>, <code>r*</code>, <code>*3*</code>.</p>
        /// <p>For example, if you specify <code>c5*</code>,Amazon EC2 will allow the entire C5 instance family, which includes all C5a and C5n instance types. If you specify <code>m5a.*</code>, Amazon EC2 will allow all the M5a instance types, but not the M5n instance types.</p> <note>
        /// <p>If you specify <code>AllowedInstanceTypes</code>, you can't specify <code>ExcludedInstanceTypes</code>.</p>
        /// </note>
        /// <p>Default: All instance types</p>
        pub fn allowed_instance_types(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.allowed_instance_types.unwrap_or_default();
            v.push(input.into());
            self.allowed_instance_types = Some(v);
            self
        }
        /// <p>The instance types to apply your specified attributes against. All other instance types are ignored, even if they match your specified attributes.</p>
        /// <p>You can use strings with one or more wild cards, represented by an asterisk (<code>*</code>), to allow an instance type, size, or generation. The following are examples: <code>m5.8xlarge</code>, <code>c5*.*</code>, <code>m5a.*</code>, <code>r*</code>, <code>*3*</code>.</p>
        /// <p>For example, if you specify <code>c5*</code>,Amazon EC2 will allow the entire C5 instance family, which includes all C5a and C5n instance types. If you specify <code>m5a.*</code>, Amazon EC2 will allow all the M5a instance types, but not the M5n instance types.</p> <note>
        /// <p>If you specify <code>AllowedInstanceTypes</code>, you can't specify <code>ExcludedInstanceTypes</code>.</p>
        /// </note>
        /// <p>Default: All instance types</p>
        pub fn set_allowed_instance_types(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.allowed_instance_types = input;
            self
        }
        /// Consumes the builder and constructs a [`InstanceRequirementsRequest`](crate::model::InstanceRequirementsRequest).
        pub fn build(self) -> crate::model::InstanceRequirementsRequest {
            crate::model::InstanceRequirementsRequest {
                v_cpu_count: self.v_cpu_count,
                memory_mi_b: self.memory_mi_b,
                cpu_manufacturers: self.cpu_manufacturers,
                memory_gi_b_per_v_cpu: self.memory_gi_b_per_v_cpu,
                excluded_instance_types: self.excluded_instance_types,
                instance_generations: self.instance_generations,
                spot_max_price_percentage_over_lowest_price: self
                    .spot_max_price_percentage_over_lowest_price,
                on_demand_max_price_percentage_over_lowest_price: self
                    .on_demand_max_price_percentage_over_lowest_price,
                bare_metal: self.bare_metal,
                burstable_performance: self.burstable_performance,
                require_hibernate_support: self.require_hibernate_support,
                network_interface_count: self.network_interface_count,
                local_storage: self.local_storage,
                local_storage_types: self.local_storage_types,
                total_local_storage_gb: self.total_local_storage_gb,
                baseline_ebs_bandwidth_mbps: self.baseline_ebs_bandwidth_mbps,
                accelerator_types: self.accelerator_types,
                accelerator_count: self.accelerator_count,
                accelerator_manufacturers: self.accelerator_manufacturers,
                accelerator_names: self.accelerator_names,
                accelerator_total_memory_mi_b: self.accelerator_total_memory_mi_b,
                network_bandwidth_gbps: self.network_bandwidth_gbps,
                allowed_instance_types: self.allowed_instance_types,
            }
        }
    }
}
impl InstanceRequirementsRequest {
    /// Creates a new builder-style object to manufacture [`InstanceRequirementsRequest`](crate::model::InstanceRequirementsRequest).
    pub fn builder() -> crate::model::instance_requirements_request::Builder {
        crate::model::instance_requirements_request::Builder::default()
    }
}

/// <p>The minimum and maximum amount of network bandwidth, in gigabits per second (Gbps).</p> <note>
/// <p>Setting the minimum bandwidth does not guarantee that your instance will achieve the minimum bandwidth. Amazon EC2 will identify instance types that support the specified minimum bandwidth, but the actual bandwidth of your instance might go below the specified minimum at times. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-network-bandwidth.html#available-instance-bandwidth">Available instance bandwidth</a> in the <i>Amazon EC2 User Guide</i>.</p>
/// </note>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct NetworkBandwidthGbpsRequest {
    /// <p>The minimum amount of network bandwidth, in Gbps. To specify no minimum limit, omit this parameter.</p>
    #[doc(hidden)]
    pub min: std::option::Option<f64>,
    /// <p>The maximum amount of network bandwidth, in Gbps. To specify no maximum limit, omit this parameter.</p>
    #[doc(hidden)]
    pub max: std::option::Option<f64>,
}
impl NetworkBandwidthGbpsRequest {
    /// <p>The minimum amount of network bandwidth, in Gbps. To specify no minimum limit, omit this parameter.</p>
    pub fn min(&self) -> std::option::Option<f64> {
        self.min
    }
    /// <p>The maximum amount of network bandwidth, in Gbps. To specify no maximum limit, omit this parameter.</p>
    pub fn max(&self) -> std::option::Option<f64> {
        self.max
    }
}
/// See [`NetworkBandwidthGbpsRequest`](crate::model::NetworkBandwidthGbpsRequest).
pub mod network_bandwidth_gbps_request {

    /// A builder for [`NetworkBandwidthGbpsRequest`](crate::model::NetworkBandwidthGbpsRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) min: std::option::Option<f64>,
        pub(crate) max: std::option::Option<f64>,
    }
    impl Builder {
        /// <p>The minimum amount of network bandwidth, in Gbps. To specify no minimum limit, omit this parameter.</p>
        pub fn min(mut self, input: f64) -> Self {
            self.min = Some(input);
            self
        }
        /// <p>The minimum amount of network bandwidth, in Gbps. To specify no minimum limit, omit this parameter.</p>
        pub fn set_min(mut self, input: std::option::Option<f64>) -> Self {
            self.min = input;
            self
        }
        /// <p>The maximum amount of network bandwidth, in Gbps. To specify no maximum limit, omit this parameter.</p>
        pub fn max(mut self, input: f64) -> Self {
            self.max = Some(input);
            self
        }
        /// <p>The maximum amount of network bandwidth, in Gbps. To specify no maximum limit, omit this parameter.</p>
        pub fn set_max(mut self, input: std::option::Option<f64>) -> Self {
            self.max = input;
            self
        }
        /// Consumes the builder and constructs a [`NetworkBandwidthGbpsRequest`](crate::model::NetworkBandwidthGbpsRequest).
        pub fn build(self) -> crate::model::NetworkBandwidthGbpsRequest {
            crate::model::NetworkBandwidthGbpsRequest {
                min: self.min,
                max: self.max,
            }
        }
    }
}
impl NetworkBandwidthGbpsRequest {
    /// Creates a new builder-style object to manufacture [`NetworkBandwidthGbpsRequest`](crate::model::NetworkBandwidthGbpsRequest).
    pub fn builder() -> crate::model::network_bandwidth_gbps_request::Builder {
        crate::model::network_bandwidth_gbps_request::Builder::default()
    }
}

/// <p>The minimum and maximum amount of total accelerator memory, in MiB.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AcceleratorTotalMemoryMiBRequest {
    /// <p>The minimum amount of accelerator memory, in MiB. To specify no minimum limit, omit this parameter.</p>
    #[doc(hidden)]
    pub min: std::option::Option<i32>,
    /// <p>The maximum amount of accelerator memory, in MiB. To specify no maximum limit, omit this parameter.</p>
    #[doc(hidden)]
    pub max: std::option::Option<i32>,
}
impl AcceleratorTotalMemoryMiBRequest {
    /// <p>The minimum amount of accelerator memory, in MiB. To specify no minimum limit, omit this parameter.</p>
    pub fn min(&self) -> std::option::Option<i32> {
        self.min
    }
    /// <p>The maximum amount of accelerator memory, in MiB. To specify no maximum limit, omit this parameter.</p>
    pub fn max(&self) -> std::option::Option<i32> {
        self.max
    }
}
/// See [`AcceleratorTotalMemoryMiBRequest`](crate::model::AcceleratorTotalMemoryMiBRequest).
pub mod accelerator_total_memory_mi_b_request {

    /// A builder for [`AcceleratorTotalMemoryMiBRequest`](crate::model::AcceleratorTotalMemoryMiBRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) min: std::option::Option<i32>,
        pub(crate) max: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>The minimum amount of accelerator memory, in MiB. To specify no minimum limit, omit this parameter.</p>
        pub fn min(mut self, input: i32) -> Self {
            self.min = Some(input);
            self
        }
        /// <p>The minimum amount of accelerator memory, in MiB. To specify no minimum limit, omit this parameter.</p>
        pub fn set_min(mut self, input: std::option::Option<i32>) -> Self {
            self.min = input;
            self
        }
        /// <p>The maximum amount of accelerator memory, in MiB. To specify no maximum limit, omit this parameter.</p>
        pub fn max(mut self, input: i32) -> Self {
            self.max = Some(input);
            self
        }
        /// <p>The maximum amount of accelerator memory, in MiB. To specify no maximum limit, omit this parameter.</p>
        pub fn set_max(mut self, input: std::option::Option<i32>) -> Self {
            self.max = input;
            self
        }
        /// Consumes the builder and constructs a [`AcceleratorTotalMemoryMiBRequest`](crate::model::AcceleratorTotalMemoryMiBRequest).
        pub fn build(self) -> crate::model::AcceleratorTotalMemoryMiBRequest {
            crate::model::AcceleratorTotalMemoryMiBRequest {
                min: self.min,
                max: self.max,
            }
        }
    }
}
impl AcceleratorTotalMemoryMiBRequest {
    /// Creates a new builder-style object to manufacture [`AcceleratorTotalMemoryMiBRequest`](crate::model::AcceleratorTotalMemoryMiBRequest).
    pub fn builder() -> crate::model::accelerator_total_memory_mi_b_request::Builder {
        crate::model::accelerator_total_memory_mi_b_request::Builder::default()
    }
}

/// <p>The minimum and maximum number of accelerators (GPUs, FPGAs, or Amazon Web Services Inferentia chips) on an instance. To exclude accelerator-enabled instance types, set <code>Max</code> to <code>0</code>.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AcceleratorCountRequest {
    /// <p>The minimum number of accelerators. To specify no minimum limit, omit this parameter.</p>
    #[doc(hidden)]
    pub min: std::option::Option<i32>,
    /// <p>The maximum number of accelerators. To specify no maximum limit, omit this parameter. To exclude accelerator-enabled instance types, set <code>Max</code> to <code>0</code>.</p>
    #[doc(hidden)]
    pub max: std::option::Option<i32>,
}
impl AcceleratorCountRequest {
    /// <p>The minimum number of accelerators. To specify no minimum limit, omit this parameter.</p>
    pub fn min(&self) -> std::option::Option<i32> {
        self.min
    }
    /// <p>The maximum number of accelerators. To specify no maximum limit, omit this parameter. To exclude accelerator-enabled instance types, set <code>Max</code> to <code>0</code>.</p>
    pub fn max(&self) -> std::option::Option<i32> {
        self.max
    }
}
/// See [`AcceleratorCountRequest`](crate::model::AcceleratorCountRequest).
pub mod accelerator_count_request {

    /// A builder for [`AcceleratorCountRequest`](crate::model::AcceleratorCountRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) min: std::option::Option<i32>,
        pub(crate) max: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>The minimum number of accelerators. To specify no minimum limit, omit this parameter.</p>
        pub fn min(mut self, input: i32) -> Self {
            self.min = Some(input);
            self
        }
        /// <p>The minimum number of accelerators. To specify no minimum limit, omit this parameter.</p>
        pub fn set_min(mut self, input: std::option::Option<i32>) -> Self {
            self.min = input;
            self
        }
        /// <p>The maximum number of accelerators. To specify no maximum limit, omit this parameter. To exclude accelerator-enabled instance types, set <code>Max</code> to <code>0</code>.</p>
        pub fn max(mut self, input: i32) -> Self {
            self.max = Some(input);
            self
        }
        /// <p>The maximum number of accelerators. To specify no maximum limit, omit this parameter. To exclude accelerator-enabled instance types, set <code>Max</code> to <code>0</code>.</p>
        pub fn set_max(mut self, input: std::option::Option<i32>) -> Self {
            self.max = input;
            self
        }
        /// Consumes the builder and constructs a [`AcceleratorCountRequest`](crate::model::AcceleratorCountRequest).
        pub fn build(self) -> crate::model::AcceleratorCountRequest {
            crate::model::AcceleratorCountRequest {
                min: self.min,
                max: self.max,
            }
        }
    }
}
impl AcceleratorCountRequest {
    /// Creates a new builder-style object to manufacture [`AcceleratorCountRequest`](crate::model::AcceleratorCountRequest).
    pub fn builder() -> crate::model::accelerator_count_request::Builder {
        crate::model::accelerator_count_request::Builder::default()
    }
}

/// <p>The minimum and maximum baseline bandwidth to Amazon EBS, in Mbps. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-optimized.html">Amazon EBS–optimized instances</a> in the <i>Amazon EC2 User Guide</i>.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct BaselineEbsBandwidthMbpsRequest {
    /// <p>The minimum baseline bandwidth, in Mbps. To specify no minimum limit, omit this parameter.</p>
    #[doc(hidden)]
    pub min: std::option::Option<i32>,
    /// <p>The maximum baseline bandwidth, in Mbps. To specify no maximum limit, omit this parameter.</p>
    #[doc(hidden)]
    pub max: std::option::Option<i32>,
}
impl BaselineEbsBandwidthMbpsRequest {
    /// <p>The minimum baseline bandwidth, in Mbps. To specify no minimum limit, omit this parameter.</p>
    pub fn min(&self) -> std::option::Option<i32> {
        self.min
    }
    /// <p>The maximum baseline bandwidth, in Mbps. To specify no maximum limit, omit this parameter.</p>
    pub fn max(&self) -> std::option::Option<i32> {
        self.max
    }
}
/// See [`BaselineEbsBandwidthMbpsRequest`](crate::model::BaselineEbsBandwidthMbpsRequest).
pub mod baseline_ebs_bandwidth_mbps_request {

    /// A builder for [`BaselineEbsBandwidthMbpsRequest`](crate::model::BaselineEbsBandwidthMbpsRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) min: std::option::Option<i32>,
        pub(crate) max: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>The minimum baseline bandwidth, in Mbps. To specify no minimum limit, omit this parameter.</p>
        pub fn min(mut self, input: i32) -> Self {
            self.min = Some(input);
            self
        }
        /// <p>The minimum baseline bandwidth, in Mbps. To specify no minimum limit, omit this parameter.</p>
        pub fn set_min(mut self, input: std::option::Option<i32>) -> Self {
            self.min = input;
            self
        }
        /// <p>The maximum baseline bandwidth, in Mbps. To specify no maximum limit, omit this parameter.</p>
        pub fn max(mut self, input: i32) -> Self {
            self.max = Some(input);
            self
        }
        /// <p>The maximum baseline bandwidth, in Mbps. To specify no maximum limit, omit this parameter.</p>
        pub fn set_max(mut self, input: std::option::Option<i32>) -> Self {
            self.max = input;
            self
        }
        /// Consumes the builder and constructs a [`BaselineEbsBandwidthMbpsRequest`](crate::model::BaselineEbsBandwidthMbpsRequest).
        pub fn build(self) -> crate::model::BaselineEbsBandwidthMbpsRequest {
            crate::model::BaselineEbsBandwidthMbpsRequest {
                min: self.min,
                max: self.max,
            }
        }
    }
}
impl BaselineEbsBandwidthMbpsRequest {
    /// Creates a new builder-style object to manufacture [`BaselineEbsBandwidthMbpsRequest`](crate::model::BaselineEbsBandwidthMbpsRequest).
    pub fn builder() -> crate::model::baseline_ebs_bandwidth_mbps_request::Builder {
        crate::model::baseline_ebs_bandwidth_mbps_request::Builder::default()
    }
}

/// <p>The minimum and maximum amount of total local storage, in GB.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TotalLocalStorageGbRequest {
    /// <p>The minimum amount of total local storage, in GB. To specify no minimum limit, omit this parameter.</p>
    #[doc(hidden)]
    pub min: std::option::Option<f64>,
    /// <p>The maximum amount of total local storage, in GB. To specify no maximum limit, omit this parameter.</p>
    #[doc(hidden)]
    pub max: std::option::Option<f64>,
}
impl TotalLocalStorageGbRequest {
    /// <p>The minimum amount of total local storage, in GB. To specify no minimum limit, omit this parameter.</p>
    pub fn min(&self) -> std::option::Option<f64> {
        self.min
    }
    /// <p>The maximum amount of total local storage, in GB. To specify no maximum limit, omit this parameter.</p>
    pub fn max(&self) -> std::option::Option<f64> {
        self.max
    }
}
/// See [`TotalLocalStorageGbRequest`](crate::model::TotalLocalStorageGbRequest).
pub mod total_local_storage_gb_request {

    /// A builder for [`TotalLocalStorageGbRequest`](crate::model::TotalLocalStorageGbRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) min: std::option::Option<f64>,
        pub(crate) max: std::option::Option<f64>,
    }
    impl Builder {
        /// <p>The minimum amount of total local storage, in GB. To specify no minimum limit, omit this parameter.</p>
        pub fn min(mut self, input: f64) -> Self {
            self.min = Some(input);
            self
        }
        /// <p>The minimum amount of total local storage, in GB. To specify no minimum limit, omit this parameter.</p>
        pub fn set_min(mut self, input: std::option::Option<f64>) -> Self {
            self.min = input;
            self
        }
        /// <p>The maximum amount of total local storage, in GB. To specify no maximum limit, omit this parameter.</p>
        pub fn max(mut self, input: f64) -> Self {
            self.max = Some(input);
            self
        }
        /// <p>The maximum amount of total local storage, in GB. To specify no maximum limit, omit this parameter.</p>
        pub fn set_max(mut self, input: std::option::Option<f64>) -> Self {
            self.max = input;
            self
        }
        /// Consumes the builder and constructs a [`TotalLocalStorageGbRequest`](crate::model::TotalLocalStorageGbRequest).
        pub fn build(self) -> crate::model::TotalLocalStorageGbRequest {
            crate::model::TotalLocalStorageGbRequest {
                min: self.min,
                max: self.max,
            }
        }
    }
}
impl TotalLocalStorageGbRequest {
    /// Creates a new builder-style object to manufacture [`TotalLocalStorageGbRequest`](crate::model::TotalLocalStorageGbRequest).
    pub fn builder() -> crate::model::total_local_storage_gb_request::Builder {
        crate::model::total_local_storage_gb_request::Builder::default()
    }
}

/// <p>The minimum and maximum number of network interfaces.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct NetworkInterfaceCountRequest {
    /// <p>The minimum number of network interfaces. To specify no minimum limit, omit this parameter.</p>
    #[doc(hidden)]
    pub min: std::option::Option<i32>,
    /// <p>The maximum number of network interfaces. To specify no maximum limit, omit this parameter.</p>
    #[doc(hidden)]
    pub max: std::option::Option<i32>,
}
impl NetworkInterfaceCountRequest {
    /// <p>The minimum number of network interfaces. To specify no minimum limit, omit this parameter.</p>
    pub fn min(&self) -> std::option::Option<i32> {
        self.min
    }
    /// <p>The maximum number of network interfaces. To specify no maximum limit, omit this parameter.</p>
    pub fn max(&self) -> std::option::Option<i32> {
        self.max
    }
}
/// See [`NetworkInterfaceCountRequest`](crate::model::NetworkInterfaceCountRequest).
pub mod network_interface_count_request {

    /// A builder for [`NetworkInterfaceCountRequest`](crate::model::NetworkInterfaceCountRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) min: std::option::Option<i32>,
        pub(crate) max: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>The minimum number of network interfaces. To specify no minimum limit, omit this parameter.</p>
        pub fn min(mut self, input: i32) -> Self {
            self.min = Some(input);
            self
        }
        /// <p>The minimum number of network interfaces. To specify no minimum limit, omit this parameter.</p>
        pub fn set_min(mut self, input: std::option::Option<i32>) -> Self {
            self.min = input;
            self
        }
        /// <p>The maximum number of network interfaces. To specify no maximum limit, omit this parameter.</p>
        pub fn max(mut self, input: i32) -> Self {
            self.max = Some(input);
            self
        }
        /// <p>The maximum number of network interfaces. To specify no maximum limit, omit this parameter.</p>
        pub fn set_max(mut self, input: std::option::Option<i32>) -> Self {
            self.max = input;
            self
        }
        /// Consumes the builder and constructs a [`NetworkInterfaceCountRequest`](crate::model::NetworkInterfaceCountRequest).
        pub fn build(self) -> crate::model::NetworkInterfaceCountRequest {
            crate::model::NetworkInterfaceCountRequest {
                min: self.min,
                max: self.max,
            }
        }
    }
}
impl NetworkInterfaceCountRequest {
    /// Creates a new builder-style object to manufacture [`NetworkInterfaceCountRequest`](crate::model::NetworkInterfaceCountRequest).
    pub fn builder() -> crate::model::network_interface_count_request::Builder {
        crate::model::network_interface_count_request::Builder::default()
    }
}

/// <p>The minimum and maximum amount of memory per vCPU, in GiB.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct MemoryGiBPerVCpuRequest {
    /// <p>The minimum amount of memory per vCPU, in GiB. To specify no minimum limit, omit this parameter.</p>
    #[doc(hidden)]
    pub min: std::option::Option<f64>,
    /// <p>The maximum amount of memory per vCPU, in GiB. To specify no maximum limit, omit this parameter.</p>
    #[doc(hidden)]
    pub max: std::option::Option<f64>,
}
impl MemoryGiBPerVCpuRequest {
    /// <p>The minimum amount of memory per vCPU, in GiB. To specify no minimum limit, omit this parameter.</p>
    pub fn min(&self) -> std::option::Option<f64> {
        self.min
    }
    /// <p>The maximum amount of memory per vCPU, in GiB. To specify no maximum limit, omit this parameter.</p>
    pub fn max(&self) -> std::option::Option<f64> {
        self.max
    }
}
/// See [`MemoryGiBPerVCpuRequest`](crate::model::MemoryGiBPerVCpuRequest).
pub mod memory_gi_b_per_v_cpu_request {

    /// A builder for [`MemoryGiBPerVCpuRequest`](crate::model::MemoryGiBPerVCpuRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) min: std::option::Option<f64>,
        pub(crate) max: std::option::Option<f64>,
    }
    impl Builder {
        /// <p>The minimum amount of memory per vCPU, in GiB. To specify no minimum limit, omit this parameter.</p>
        pub fn min(mut self, input: f64) -> Self {
            self.min = Some(input);
            self
        }
        /// <p>The minimum amount of memory per vCPU, in GiB. To specify no minimum limit, omit this parameter.</p>
        pub fn set_min(mut self, input: std::option::Option<f64>) -> Self {
            self.min = input;
            self
        }
        /// <p>The maximum amount of memory per vCPU, in GiB. To specify no maximum limit, omit this parameter.</p>
        pub fn max(mut self, input: f64) -> Self {
            self.max = Some(input);
            self
        }
        /// <p>The maximum amount of memory per vCPU, in GiB. To specify no maximum limit, omit this parameter.</p>
        pub fn set_max(mut self, input: std::option::Option<f64>) -> Self {
            self.max = input;
            self
        }
        /// Consumes the builder and constructs a [`MemoryGiBPerVCpuRequest`](crate::model::MemoryGiBPerVCpuRequest).
        pub fn build(self) -> crate::model::MemoryGiBPerVCpuRequest {
            crate::model::MemoryGiBPerVCpuRequest {
                min: self.min,
                max: self.max,
            }
        }
    }
}
impl MemoryGiBPerVCpuRequest {
    /// Creates a new builder-style object to manufacture [`MemoryGiBPerVCpuRequest`](crate::model::MemoryGiBPerVCpuRequest).
    pub fn builder() -> crate::model::memory_gi_b_per_v_cpu_request::Builder {
        crate::model::memory_gi_b_per_v_cpu_request::Builder::default()
    }
}

/// <p>The minimum and maximum amount of memory, in MiB.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct MemoryMiBRequest {
    /// <p>The minimum amount of memory, in MiB. To specify no minimum limit, specify <code>0</code>.</p>
    #[doc(hidden)]
    pub min: std::option::Option<i32>,
    /// <p>The maximum amount of memory, in MiB. To specify no maximum limit, omit this parameter.</p>
    #[doc(hidden)]
    pub max: std::option::Option<i32>,
}
impl MemoryMiBRequest {
    /// <p>The minimum amount of memory, in MiB. To specify no minimum limit, specify <code>0</code>.</p>
    pub fn min(&self) -> std::option::Option<i32> {
        self.min
    }
    /// <p>The maximum amount of memory, in MiB. To specify no maximum limit, omit this parameter.</p>
    pub fn max(&self) -> std::option::Option<i32> {
        self.max
    }
}
/// See [`MemoryMiBRequest`](crate::model::MemoryMiBRequest).
pub mod memory_mi_b_request {

    /// A builder for [`MemoryMiBRequest`](crate::model::MemoryMiBRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) min: std::option::Option<i32>,
        pub(crate) max: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>The minimum amount of memory, in MiB. To specify no minimum limit, specify <code>0</code>.</p>
        pub fn min(mut self, input: i32) -> Self {
            self.min = Some(input);
            self
        }
        /// <p>The minimum amount of memory, in MiB. To specify no minimum limit, specify <code>0</code>.</p>
        pub fn set_min(mut self, input: std::option::Option<i32>) -> Self {
            self.min = input;
            self
        }
        /// <p>The maximum amount of memory, in MiB. To specify no maximum limit, omit this parameter.</p>
        pub fn max(mut self, input: i32) -> Self {
            self.max = Some(input);
            self
        }
        /// <p>The maximum amount of memory, in MiB. To specify no maximum limit, omit this parameter.</p>
        pub fn set_max(mut self, input: std::option::Option<i32>) -> Self {
            self.max = input;
            self
        }
        /// Consumes the builder and constructs a [`MemoryMiBRequest`](crate::model::MemoryMiBRequest).
        pub fn build(self) -> crate::model::MemoryMiBRequest {
            crate::model::MemoryMiBRequest {
                min: self.min,
                max: self.max,
            }
        }
    }
}
impl MemoryMiBRequest {
    /// Creates a new builder-style object to manufacture [`MemoryMiBRequest`](crate::model::MemoryMiBRequest).
    pub fn builder() -> crate::model::memory_mi_b_request::Builder {
        crate::model::memory_mi_b_request::Builder::default()
    }
}

/// <p>The minimum and maximum number of vCPUs.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct VCpuCountRangeRequest {
    /// <p>The minimum number of vCPUs. To specify no minimum limit, specify <code>0</code>.</p>
    #[doc(hidden)]
    pub min: std::option::Option<i32>,
    /// <p>The maximum number of vCPUs. To specify no maximum limit, omit this parameter.</p>
    #[doc(hidden)]
    pub max: std::option::Option<i32>,
}
impl VCpuCountRangeRequest {
    /// <p>The minimum number of vCPUs. To specify no minimum limit, specify <code>0</code>.</p>
    pub fn min(&self) -> std::option::Option<i32> {
        self.min
    }
    /// <p>The maximum number of vCPUs. To specify no maximum limit, omit this parameter.</p>
    pub fn max(&self) -> std::option::Option<i32> {
        self.max
    }
}
/// See [`VCpuCountRangeRequest`](crate::model::VCpuCountRangeRequest).
pub mod v_cpu_count_range_request {

    /// A builder for [`VCpuCountRangeRequest`](crate::model::VCpuCountRangeRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) min: std::option::Option<i32>,
        pub(crate) max: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>The minimum number of vCPUs. To specify no minimum limit, specify <code>0</code>.</p>
        pub fn min(mut self, input: i32) -> Self {
            self.min = Some(input);
            self
        }
        /// <p>The minimum number of vCPUs. To specify no minimum limit, specify <code>0</code>.</p>
        pub fn set_min(mut self, input: std::option::Option<i32>) -> Self {
            self.min = input;
            self
        }
        /// <p>The maximum number of vCPUs. To specify no maximum limit, omit this parameter.</p>
        pub fn max(mut self, input: i32) -> Self {
            self.max = Some(input);
            self
        }
        /// <p>The maximum number of vCPUs. To specify no maximum limit, omit this parameter.</p>
        pub fn set_max(mut self, input: std::option::Option<i32>) -> Self {
            self.max = input;
            self
        }
        /// Consumes the builder and constructs a [`VCpuCountRangeRequest`](crate::model::VCpuCountRangeRequest).
        pub fn build(self) -> crate::model::VCpuCountRangeRequest {
            crate::model::VCpuCountRangeRequest {
                min: self.min,
                max: self.max,
            }
        }
    }
}
impl VCpuCountRangeRequest {
    /// Creates a new builder-style object to manufacture [`VCpuCountRangeRequest`](crate::model::VCpuCountRangeRequest).
    pub fn builder() -> crate::model::v_cpu_count_range_request::Builder {
        crate::model::v_cpu_count_range_request::Builder::default()
    }
}

/// <p>The Amazon EC2 launch template that can be used by an EC2 Fleet to configure Amazon EC2 instances. You must specify either the ID or name of the launch template in the request, but not both.</p>
/// <p>For information about launch templates, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html">Launch an instance from a launch template</a> in the <i>Amazon EC2 User Guide</i>.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct FleetLaunchTemplateSpecificationRequest {
    /// <p>The ID of the launch template.</p>
    /// <p>You must specify the <code>LaunchTemplateId</code> or the <code>LaunchTemplateName</code>, but not both.</p>
    #[doc(hidden)]
    pub launch_template_id: std::option::Option<std::string::String>,
    /// <p>The name of the launch template.</p>
    /// <p>You must specify the <code>LaunchTemplateName</code> or the <code>LaunchTemplateId</code>, but not both.</p>
    #[doc(hidden)]
    pub launch_template_name: std::option::Option<std::string::String>,
    /// <p>The launch template version number, <code>$Latest</code>, or <code>$Default</code>. You must specify a value, otherwise the request fails.</p>
    /// <p>If the value is <code>$Latest</code>, Amazon EC2 uses the latest version of the launch template.</p>
    /// <p>If the value is <code>$Default</code>, Amazon EC2 uses the default version of the launch template.</p>
    #[doc(hidden)]
    pub version: std::option::Option<std::string::String>,
}
impl FleetLaunchTemplateSpecificationRequest {
    /// <p>The ID of the launch template.</p>
    /// <p>You must specify the <code>LaunchTemplateId</code> or the <code>LaunchTemplateName</code>, but not both.</p>
    pub fn launch_template_id(&self) -> std::option::Option<&str> {
        self.launch_template_id.as_deref()
    }
    /// <p>The name of the launch template.</p>
    /// <p>You must specify the <code>LaunchTemplateName</code> or the <code>LaunchTemplateId</code>, but not both.</p>
    pub fn launch_template_name(&self) -> std::option::Option<&str> {
        self.launch_template_name.as_deref()
    }
    /// <p>The launch template version number, <code>$Latest</code>, or <code>$Default</code>. You must specify a value, otherwise the request fails.</p>
    /// <p>If the value is <code>$Latest</code>, Amazon EC2 uses the latest version of the launch template.</p>
    /// <p>If the value is <code>$Default</code>, Amazon EC2 uses the default version of the launch template.</p>
    pub fn version(&self) -> std::option::Option<&str> {
        self.version.as_deref()
    }
}
/// See [`FleetLaunchTemplateSpecificationRequest`](crate::model::FleetLaunchTemplateSpecificationRequest).
pub mod fleet_launch_template_specification_request {

    /// A builder for [`FleetLaunchTemplateSpecificationRequest`](crate::model::FleetLaunchTemplateSpecificationRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) launch_template_id: std::option::Option<std::string::String>,
        pub(crate) launch_template_name: std::option::Option<std::string::String>,
        pub(crate) version: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The ID of the launch template.</p>
        /// <p>You must specify the <code>LaunchTemplateId</code> or the <code>LaunchTemplateName</code>, but not both.</p>
        pub fn launch_template_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.launch_template_id = Some(input.into());
            self
        }
        /// <p>The ID of the launch template.</p>
        /// <p>You must specify the <code>LaunchTemplateId</code> or the <code>LaunchTemplateName</code>, but not both.</p>
        pub fn set_launch_template_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.launch_template_id = input;
            self
        }
        /// <p>The name of the launch template.</p>
        /// <p>You must specify the <code>LaunchTemplateName</code> or the <code>LaunchTemplateId</code>, but not both.</p>
        pub fn launch_template_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.launch_template_name = Some(input.into());
            self
        }
        /// <p>The name of the launch template.</p>
        /// <p>You must specify the <code>LaunchTemplateName</code> or the <code>LaunchTemplateId</code>, but not both.</p>
        pub fn set_launch_template_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.launch_template_name = input;
            self
        }
        /// <p>The launch template version number, <code>$Latest</code>, or <code>$Default</code>. You must specify a value, otherwise the request fails.</p>
        /// <p>If the value is <code>$Latest</code>, Amazon EC2 uses the latest version of the launch template.</p>
        /// <p>If the value is <code>$Default</code>, Amazon EC2 uses the default version of the launch template.</p>
        pub fn version(mut self, input: impl Into<std::string::String>) -> Self {
            self.version = Some(input.into());
            self
        }
        /// <p>The launch template version number, <code>$Latest</code>, or <code>$Default</code>. You must specify a value, otherwise the request fails.</p>
        /// <p>If the value is <code>$Latest</code>, Amazon EC2 uses the latest version of the launch template.</p>
        /// <p>If the value is <code>$Default</code>, Amazon EC2 uses the default version of the launch template.</p>
        pub fn set_version(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.version = input;
            self
        }
        /// Consumes the builder and constructs a [`FleetLaunchTemplateSpecificationRequest`](crate::model::FleetLaunchTemplateSpecificationRequest).
        pub fn build(self) -> crate::model::FleetLaunchTemplateSpecificationRequest {
            crate::model::FleetLaunchTemplateSpecificationRequest {
                launch_template_id: self.launch_template_id,
                launch_template_name: self.launch_template_name,
                version: self.version,
            }
        }
    }
}
impl FleetLaunchTemplateSpecificationRequest {
    /// Creates a new builder-style object to manufacture [`FleetLaunchTemplateSpecificationRequest`](crate::model::FleetLaunchTemplateSpecificationRequest).
    pub fn builder() -> crate::model::fleet_launch_template_specification_request::Builder {
        crate::model::fleet_launch_template_specification_request::Builder::default()
    }
}

/// When writing a match expression against `FleetExcessCapacityTerminationPolicy`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let fleetexcesscapacityterminationpolicy = unimplemented!();
/// match fleetexcesscapacityterminationpolicy {
///     FleetExcessCapacityTerminationPolicy::NoTermination => { /* ... */ },
///     FleetExcessCapacityTerminationPolicy::Termination => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `fleetexcesscapacityterminationpolicy` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `FleetExcessCapacityTerminationPolicy::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `FleetExcessCapacityTerminationPolicy::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `FleetExcessCapacityTerminationPolicy::NewFeature` is defined.
/// Specifically, when `fleetexcesscapacityterminationpolicy` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `FleetExcessCapacityTerminationPolicy::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 FleetExcessCapacityTerminationPolicy {
    #[allow(missing_docs)] // documentation missing in model
    NoTermination,
    #[allow(missing_docs)] // documentation missing in model
    Termination,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for FleetExcessCapacityTerminationPolicy {
    fn from(s: &str) -> Self {
        match s {
            "no-termination" => FleetExcessCapacityTerminationPolicy::NoTermination,
            "termination" => FleetExcessCapacityTerminationPolicy::Termination,
            other => FleetExcessCapacityTerminationPolicy::Unknown(
                crate::types::UnknownVariantValue(other.to_owned()),
            ),
        }
    }
}
impl std::str::FromStr for FleetExcessCapacityTerminationPolicy {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(FleetExcessCapacityTerminationPolicy::from(s))
    }
}
impl FleetExcessCapacityTerminationPolicy {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            FleetExcessCapacityTerminationPolicy::NoTermination => "no-termination",
            FleetExcessCapacityTerminationPolicy::Termination => "termination",
            FleetExcessCapacityTerminationPolicy::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["no-termination", "termination"]
    }
}
impl AsRef<str> for FleetExcessCapacityTerminationPolicy {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes the default credit option for CPU usage of a burstable performance instance family.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InstanceFamilyCreditSpecification {
    /// <p>The instance family.</p>
    #[doc(hidden)]
    pub instance_family: std::option::Option<crate::model::UnlimitedSupportedInstanceFamily>,
    /// <p>The default credit option for CPU usage of the instance family. Valid values are <code>standard</code> and <code>unlimited</code>.</p>
    #[doc(hidden)]
    pub cpu_credits: std::option::Option<std::string::String>,
}
impl InstanceFamilyCreditSpecification {
    /// <p>The instance family.</p>
    pub fn instance_family(
        &self,
    ) -> std::option::Option<&crate::model::UnlimitedSupportedInstanceFamily> {
        self.instance_family.as_ref()
    }
    /// <p>The default credit option for CPU usage of the instance family. Valid values are <code>standard</code> and <code>unlimited</code>.</p>
    pub fn cpu_credits(&self) -> std::option::Option<&str> {
        self.cpu_credits.as_deref()
    }
}
/// See [`InstanceFamilyCreditSpecification`](crate::model::InstanceFamilyCreditSpecification).
pub mod instance_family_credit_specification {

    /// A builder for [`InstanceFamilyCreditSpecification`](crate::model::InstanceFamilyCreditSpecification).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) instance_family:
            std::option::Option<crate::model::UnlimitedSupportedInstanceFamily>,
        pub(crate) cpu_credits: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The instance family.</p>
        pub fn instance_family(
            mut self,
            input: crate::model::UnlimitedSupportedInstanceFamily,
        ) -> Self {
            self.instance_family = Some(input);
            self
        }
        /// <p>The instance family.</p>
        pub fn set_instance_family(
            mut self,
            input: std::option::Option<crate::model::UnlimitedSupportedInstanceFamily>,
        ) -> Self {
            self.instance_family = input;
            self
        }
        /// <p>The default credit option for CPU usage of the instance family. Valid values are <code>standard</code> and <code>unlimited</code>.</p>
        pub fn cpu_credits(mut self, input: impl Into<std::string::String>) -> Self {
            self.cpu_credits = Some(input.into());
            self
        }
        /// <p>The default credit option for CPU usage of the instance family. Valid values are <code>standard</code> and <code>unlimited</code>.</p>
        pub fn set_cpu_credits(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.cpu_credits = input;
            self
        }
        /// Consumes the builder and constructs a [`InstanceFamilyCreditSpecification`](crate::model::InstanceFamilyCreditSpecification).
        pub fn build(self) -> crate::model::InstanceFamilyCreditSpecification {
            crate::model::InstanceFamilyCreditSpecification {
                instance_family: self.instance_family,
                cpu_credits: self.cpu_credits,
            }
        }
    }
}
impl InstanceFamilyCreditSpecification {
    /// Creates a new builder-style object to manufacture [`InstanceFamilyCreditSpecification`](crate::model::InstanceFamilyCreditSpecification).
    pub fn builder() -> crate::model::instance_family_credit_specification::Builder {
        crate::model::instance_family_credit_specification::Builder::default()
    }
}

/// When writing a match expression against `UnlimitedSupportedInstanceFamily`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let unlimitedsupportedinstancefamily = unimplemented!();
/// match unlimitedsupportedinstancefamily {
///     UnlimitedSupportedInstanceFamily::T2 => { /* ... */ },
///     UnlimitedSupportedInstanceFamily::T3 => { /* ... */ },
///     UnlimitedSupportedInstanceFamily::T3a => { /* ... */ },
///     UnlimitedSupportedInstanceFamily::T4g => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `unlimitedsupportedinstancefamily` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `UnlimitedSupportedInstanceFamily::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `UnlimitedSupportedInstanceFamily::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `UnlimitedSupportedInstanceFamily::NewFeature` is defined.
/// Specifically, when `unlimitedsupportedinstancefamily` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `UnlimitedSupportedInstanceFamily::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 UnlimitedSupportedInstanceFamily {
    #[allow(missing_docs)] // documentation missing in model
    T2,
    #[allow(missing_docs)] // documentation missing in model
    T3,
    #[allow(missing_docs)] // documentation missing in model
    T3a,
    #[allow(missing_docs)] // documentation missing in model
    T4g,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for UnlimitedSupportedInstanceFamily {
    fn from(s: &str) -> Self {
        match s {
            "t2" => UnlimitedSupportedInstanceFamily::T2,
            "t3" => UnlimitedSupportedInstanceFamily::T3,
            "t3a" => UnlimitedSupportedInstanceFamily::T3a,
            "t4g" => UnlimitedSupportedInstanceFamily::T4g,
            other => UnlimitedSupportedInstanceFamily::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for UnlimitedSupportedInstanceFamily {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(UnlimitedSupportedInstanceFamily::from(s))
    }
}
impl UnlimitedSupportedInstanceFamily {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            UnlimitedSupportedInstanceFamily::T2 => "t2",
            UnlimitedSupportedInstanceFamily::T3 => "t3",
            UnlimitedSupportedInstanceFamily::T3a => "t3a",
            UnlimitedSupportedInstanceFamily::T4g => "t4g",
            UnlimitedSupportedInstanceFamily::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["t2", "t3", "t3a", "t4g"]
    }
}
impl AsRef<str> for UnlimitedSupportedInstanceFamily {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Options for enabling a customizable text banner that will be displayed on Amazon Web Services provided clients when a VPN session is established.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ClientLoginBannerOptions {
    /// <p>Enable or disable a customizable text banner that will be displayed on Amazon Web Services provided clients when a VPN session is established.</p>
    /// <p>Valid values: <code>true | false</code> </p>
    /// <p>Default value: <code>false</code> </p>
    #[doc(hidden)]
    pub enabled: std::option::Option<bool>,
    /// <p>Customizable text that will be displayed in a banner on Amazon Web Services provided clients when a VPN session is established. UTF-8 encoded characters only. Maximum of 1400 characters.</p>
    #[doc(hidden)]
    pub banner_text: std::option::Option<std::string::String>,
}
impl ClientLoginBannerOptions {
    /// <p>Enable or disable a customizable text banner that will be displayed on Amazon Web Services provided clients when a VPN session is established.</p>
    /// <p>Valid values: <code>true | false</code> </p>
    /// <p>Default value: <code>false</code> </p>
    pub fn enabled(&self) -> std::option::Option<bool> {
        self.enabled
    }
    /// <p>Customizable text that will be displayed in a banner on Amazon Web Services provided clients when a VPN session is established. UTF-8 encoded characters only. Maximum of 1400 characters.</p>
    pub fn banner_text(&self) -> std::option::Option<&str> {
        self.banner_text.as_deref()
    }
}
/// See [`ClientLoginBannerOptions`](crate::model::ClientLoginBannerOptions).
pub mod client_login_banner_options {

    /// A builder for [`ClientLoginBannerOptions`](crate::model::ClientLoginBannerOptions).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) enabled: std::option::Option<bool>,
        pub(crate) banner_text: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>Enable or disable a customizable text banner that will be displayed on Amazon Web Services provided clients when a VPN session is established.</p>
        /// <p>Valid values: <code>true | false</code> </p>
        /// <p>Default value: <code>false</code> </p>
        pub fn enabled(mut self, input: bool) -> Self {
            self.enabled = Some(input);
            self
        }
        /// <p>Enable or disable a customizable text banner that will be displayed on Amazon Web Services provided clients when a VPN session is established.</p>
        /// <p>Valid values: <code>true | false</code> </p>
        /// <p>Default value: <code>false</code> </p>
        pub fn set_enabled(mut self, input: std::option::Option<bool>) -> Self {
            self.enabled = input;
            self
        }
        /// <p>Customizable text that will be displayed in a banner on Amazon Web Services provided clients when a VPN session is established. UTF-8 encoded characters only. Maximum of 1400 characters.</p>
        pub fn banner_text(mut self, input: impl Into<std::string::String>) -> Self {
            self.banner_text = Some(input.into());
            self
        }
        /// <p>Customizable text that will be displayed in a banner on Amazon Web Services provided clients when a VPN session is established. UTF-8 encoded characters only. Maximum of 1400 characters.</p>
        pub fn set_banner_text(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.banner_text = input;
            self
        }
        /// Consumes the builder and constructs a [`ClientLoginBannerOptions`](crate::model::ClientLoginBannerOptions).
        pub fn build(self) -> crate::model::ClientLoginBannerOptions {
            crate::model::ClientLoginBannerOptions {
                enabled: self.enabled,
                banner_text: self.banner_text,
            }
        }
    }
}
impl ClientLoginBannerOptions {
    /// Creates a new builder-style object to manufacture [`ClientLoginBannerOptions`](crate::model::ClientLoginBannerOptions).
    pub fn builder() -> crate::model::client_login_banner_options::Builder {
        crate::model::client_login_banner_options::Builder::default()
    }
}

/// <p>The options for managing connection authorization for new client connections.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ClientConnectOptions {
    /// <p>Indicates whether client connect options are enabled. The default is <code>false</code> (not enabled).</p>
    #[doc(hidden)]
    pub enabled: std::option::Option<bool>,
    /// <p>The Amazon Resource Name (ARN) of the Lambda function used for connection authorization.</p>
    #[doc(hidden)]
    pub lambda_function_arn: std::option::Option<std::string::String>,
}
impl ClientConnectOptions {
    /// <p>Indicates whether client connect options are enabled. The default is <code>false</code> (not enabled).</p>
    pub fn enabled(&self) -> std::option::Option<bool> {
        self.enabled
    }
    /// <p>The Amazon Resource Name (ARN) of the Lambda function used for connection authorization.</p>
    pub fn lambda_function_arn(&self) -> std::option::Option<&str> {
        self.lambda_function_arn.as_deref()
    }
}
/// See [`ClientConnectOptions`](crate::model::ClientConnectOptions).
pub mod client_connect_options {

    /// A builder for [`ClientConnectOptions`](crate::model::ClientConnectOptions).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) enabled: std::option::Option<bool>,
        pub(crate) lambda_function_arn: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>Indicates whether client connect options are enabled. The default is <code>false</code> (not enabled).</p>
        pub fn enabled(mut self, input: bool) -> Self {
            self.enabled = Some(input);
            self
        }
        /// <p>Indicates whether client connect options are enabled. The default is <code>false</code> (not enabled).</p>
        pub fn set_enabled(mut self, input: std::option::Option<bool>) -> Self {
            self.enabled = input;
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the Lambda function used for connection authorization.</p>
        pub fn lambda_function_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.lambda_function_arn = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the Lambda function used for connection authorization.</p>
        pub fn set_lambda_function_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.lambda_function_arn = input;
            self
        }
        /// Consumes the builder and constructs a [`ClientConnectOptions`](crate::model::ClientConnectOptions).
        pub fn build(self) -> crate::model::ClientConnectOptions {
            crate::model::ClientConnectOptions {
                enabled: self.enabled,
                lambda_function_arn: self.lambda_function_arn,
            }
        }
    }
}
impl ClientConnectOptions {
    /// Creates a new builder-style object to manufacture [`ClientConnectOptions`](crate::model::ClientConnectOptions).
    pub fn builder() -> crate::model::client_connect_options::Builder {
        crate::model::client_connect_options::Builder::default()
    }
}

/// When writing a match expression against `SelfServicePortal`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let selfserviceportal = unimplemented!();
/// match selfserviceportal {
///     SelfServicePortal::Disabled => { /* ... */ },
///     SelfServicePortal::Enabled => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `selfserviceportal` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `SelfServicePortal::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `SelfServicePortal::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `SelfServicePortal::NewFeature` is defined.
/// Specifically, when `selfserviceportal` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `SelfServicePortal::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 SelfServicePortal {
    #[allow(missing_docs)] // documentation missing in model
    Disabled,
    #[allow(missing_docs)] // documentation missing in model
    Enabled,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for SelfServicePortal {
    fn from(s: &str) -> Self {
        match s {
            "disabled" => SelfServicePortal::Disabled,
            "enabled" => SelfServicePortal::Enabled,
            other => {
                SelfServicePortal::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for SelfServicePortal {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(SelfServicePortal::from(s))
    }
}
impl SelfServicePortal {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            SelfServicePortal::Disabled => "disabled",
            SelfServicePortal::Enabled => "enabled",
            SelfServicePortal::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["disabled", "enabled"]
    }
}
impl AsRef<str> for SelfServicePortal {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Information about the DNS server to be used.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DnsServersOptionsModifyStructure {
    /// <p>The IPv4 address range, in CIDR notation, of the DNS servers to be used. You can specify up to two DNS servers. Ensure that the DNS servers can be reached by the clients. The specified values overwrite the existing values.</p>
    #[doc(hidden)]
    pub custom_dns_servers: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>Indicates whether DNS servers should be used. Specify <code>False</code> to delete the existing DNS servers.</p>
    #[doc(hidden)]
    pub enabled: std::option::Option<bool>,
}
impl DnsServersOptionsModifyStructure {
    /// <p>The IPv4 address range, in CIDR notation, of the DNS servers to be used. You can specify up to two DNS servers. Ensure that the DNS servers can be reached by the clients. The specified values overwrite the existing values.</p>
    pub fn custom_dns_servers(&self) -> std::option::Option<&[std::string::String]> {
        self.custom_dns_servers.as_deref()
    }
    /// <p>Indicates whether DNS servers should be used. Specify <code>False</code> to delete the existing DNS servers.</p>
    pub fn enabled(&self) -> std::option::Option<bool> {
        self.enabled
    }
}
/// See [`DnsServersOptionsModifyStructure`](crate::model::DnsServersOptionsModifyStructure).
pub mod dns_servers_options_modify_structure {

    /// A builder for [`DnsServersOptionsModifyStructure`](crate::model::DnsServersOptionsModifyStructure).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) custom_dns_servers: std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) enabled: std::option::Option<bool>,
    }
    impl Builder {
        /// Appends an item to `custom_dns_servers`.
        ///
        /// To override the contents of this collection use [`set_custom_dns_servers`](Self::set_custom_dns_servers).
        ///
        /// <p>The IPv4 address range, in CIDR notation, of the DNS servers to be used. You can specify up to two DNS servers. Ensure that the DNS servers can be reached by the clients. The specified values overwrite the existing values.</p>
        pub fn custom_dns_servers(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.custom_dns_servers.unwrap_or_default();
            v.push(input.into());
            self.custom_dns_servers = Some(v);
            self
        }
        /// <p>The IPv4 address range, in CIDR notation, of the DNS servers to be used. You can specify up to two DNS servers. Ensure that the DNS servers can be reached by the clients. The specified values overwrite the existing values.</p>
        pub fn set_custom_dns_servers(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.custom_dns_servers = input;
            self
        }
        /// <p>Indicates whether DNS servers should be used. Specify <code>False</code> to delete the existing DNS servers.</p>
        pub fn enabled(mut self, input: bool) -> Self {
            self.enabled = Some(input);
            self
        }
        /// <p>Indicates whether DNS servers should be used. Specify <code>False</code> to delete the existing DNS servers.</p>
        pub fn set_enabled(mut self, input: std::option::Option<bool>) -> Self {
            self.enabled = input;
            self
        }
        /// Consumes the builder and constructs a [`DnsServersOptionsModifyStructure`](crate::model::DnsServersOptionsModifyStructure).
        pub fn build(self) -> crate::model::DnsServersOptionsModifyStructure {
            crate::model::DnsServersOptionsModifyStructure {
                custom_dns_servers: self.custom_dns_servers,
                enabled: self.enabled,
            }
        }
    }
}
impl DnsServersOptionsModifyStructure {
    /// Creates a new builder-style object to manufacture [`DnsServersOptionsModifyStructure`](crate::model::DnsServersOptionsModifyStructure).
    pub fn builder() -> crate::model::dns_servers_options_modify_structure::Builder {
        crate::model::dns_servers_options_modify_structure::Builder::default()
    }
}

/// <p>Describes the client connection logging options for the Client VPN endpoint.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ConnectionLogOptions {
    /// <p>Indicates whether connection logging is enabled.</p>
    #[doc(hidden)]
    pub enabled: std::option::Option<bool>,
    /// <p>The name of the CloudWatch Logs log group. Required if connection logging is enabled.</p>
    #[doc(hidden)]
    pub cloudwatch_log_group: std::option::Option<std::string::String>,
    /// <p>The name of the CloudWatch Logs log stream to which the connection data is published.</p>
    #[doc(hidden)]
    pub cloudwatch_log_stream: std::option::Option<std::string::String>,
}
impl ConnectionLogOptions {
    /// <p>Indicates whether connection logging is enabled.</p>
    pub fn enabled(&self) -> std::option::Option<bool> {
        self.enabled
    }
    /// <p>The name of the CloudWatch Logs log group. Required if connection logging is enabled.</p>
    pub fn cloudwatch_log_group(&self) -> std::option::Option<&str> {
        self.cloudwatch_log_group.as_deref()
    }
    /// <p>The name of the CloudWatch Logs log stream to which the connection data is published.</p>
    pub fn cloudwatch_log_stream(&self) -> std::option::Option<&str> {
        self.cloudwatch_log_stream.as_deref()
    }
}
/// See [`ConnectionLogOptions`](crate::model::ConnectionLogOptions).
pub mod connection_log_options {

    /// A builder for [`ConnectionLogOptions`](crate::model::ConnectionLogOptions).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) enabled: std::option::Option<bool>,
        pub(crate) cloudwatch_log_group: std::option::Option<std::string::String>,
        pub(crate) cloudwatch_log_stream: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>Indicates whether connection logging is enabled.</p>
        pub fn enabled(mut self, input: bool) -> Self {
            self.enabled = Some(input);
            self
        }
        /// <p>Indicates whether connection logging is enabled.</p>
        pub fn set_enabled(mut self, input: std::option::Option<bool>) -> Self {
            self.enabled = input;
            self
        }
        /// <p>The name of the CloudWatch Logs log group. Required if connection logging is enabled.</p>
        pub fn cloudwatch_log_group(mut self, input: impl Into<std::string::String>) -> Self {
            self.cloudwatch_log_group = Some(input.into());
            self
        }
        /// <p>The name of the CloudWatch Logs log group. Required if connection logging is enabled.</p>
        pub fn set_cloudwatch_log_group(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.cloudwatch_log_group = input;
            self
        }
        /// <p>The name of the CloudWatch Logs log stream to which the connection data is published.</p>
        pub fn cloudwatch_log_stream(mut self, input: impl Into<std::string::String>) -> Self {
            self.cloudwatch_log_stream = Some(input.into());
            self
        }
        /// <p>The name of the CloudWatch Logs log stream to which the connection data is published.</p>
        pub fn set_cloudwatch_log_stream(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.cloudwatch_log_stream = input;
            self
        }
        /// Consumes the builder and constructs a [`ConnectionLogOptions`](crate::model::ConnectionLogOptions).
        pub fn build(self) -> crate::model::ConnectionLogOptions {
            crate::model::ConnectionLogOptions {
                enabled: self.enabled,
                cloudwatch_log_group: self.cloudwatch_log_group,
                cloudwatch_log_stream: self.cloudwatch_log_stream,
            }
        }
    }
}
impl ConnectionLogOptions {
    /// Creates a new builder-style object to manufacture [`ConnectionLogOptions`](crate::model::ConnectionLogOptions).
    pub fn builder() -> crate::model::connection_log_options::Builder {
        crate::model::connection_log_options::Builder::default()
    }
}

/// When writing a match expression against `EndDateType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let enddatetype = unimplemented!();
/// match enddatetype {
///     EndDateType::Limited => { /* ... */ },
///     EndDateType::Unlimited => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `enddatetype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `EndDateType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `EndDateType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `EndDateType::NewFeature` is defined.
/// Specifically, when `enddatetype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `EndDateType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 EndDateType {
    #[allow(missing_docs)] // documentation missing in model
    Limited,
    #[allow(missing_docs)] // documentation missing in model
    Unlimited,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for EndDateType {
    fn from(s: &str) -> Self {
        match s {
            "limited" => EndDateType::Limited,
            "unlimited" => EndDateType::Unlimited,
            other => EndDateType::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for EndDateType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(EndDateType::from(s))
    }
}
impl EndDateType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            EndDateType::Limited => "limited",
            EndDateType::Unlimited => "unlimited",
            EndDateType::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["limited", "unlimited"]
    }
}
impl AsRef<str> for EndDateType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `ModifyAvailabilityZoneOptInStatus`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let modifyavailabilityzoneoptinstatus = unimplemented!();
/// match modifyavailabilityzoneoptinstatus {
///     ModifyAvailabilityZoneOptInStatus::NotOptedIn => { /* ... */ },
///     ModifyAvailabilityZoneOptInStatus::OptedIn => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `modifyavailabilityzoneoptinstatus` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `ModifyAvailabilityZoneOptInStatus::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `ModifyAvailabilityZoneOptInStatus::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `ModifyAvailabilityZoneOptInStatus::NewFeature` is defined.
/// Specifically, when `modifyavailabilityzoneoptinstatus` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `ModifyAvailabilityZoneOptInStatus::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 ModifyAvailabilityZoneOptInStatus {
    #[allow(missing_docs)] // documentation missing in model
    NotOptedIn,
    #[allow(missing_docs)] // documentation missing in model
    OptedIn,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for ModifyAvailabilityZoneOptInStatus {
    fn from(s: &str) -> Self {
        match s {
            "not-opted-in" => ModifyAvailabilityZoneOptInStatus::NotOptedIn,
            "opted-in" => ModifyAvailabilityZoneOptInStatus::OptedIn,
            other => ModifyAvailabilityZoneOptInStatus::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for ModifyAvailabilityZoneOptInStatus {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(ModifyAvailabilityZoneOptInStatus::from(s))
    }
}
impl ModifyAvailabilityZoneOptInStatus {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            ModifyAvailabilityZoneOptInStatus::NotOptedIn => "not-opted-in",
            ModifyAvailabilityZoneOptInStatus::OptedIn => "opted-in",
            ModifyAvailabilityZoneOptInStatus::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["not-opted-in", "opted-in"]
    }
}
impl AsRef<str> for ModifyAvailabilityZoneOptInStatus {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Information about a snapshot that is currently in the Recycle Bin.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SnapshotRecycleBinInfo {
    /// <p>The ID of the snapshot.</p>
    #[doc(hidden)]
    pub snapshot_id: std::option::Option<std::string::String>,
    /// <p>The date and time when the snaphsot entered the Recycle Bin.</p>
    #[doc(hidden)]
    pub recycle_bin_enter_time: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The date and time when the snapshot is to be permanently deleted from the Recycle Bin.</p>
    #[doc(hidden)]
    pub recycle_bin_exit_time: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The description for the snapshot.</p>
    #[doc(hidden)]
    pub description: std::option::Option<std::string::String>,
    /// <p>The ID of the volume from which the snapshot was created.</p>
    #[doc(hidden)]
    pub volume_id: std::option::Option<std::string::String>,
}
impl SnapshotRecycleBinInfo {
    /// <p>The ID of the snapshot.</p>
    pub fn snapshot_id(&self) -> std::option::Option<&str> {
        self.snapshot_id.as_deref()
    }
    /// <p>The date and time when the snaphsot entered the Recycle Bin.</p>
    pub fn recycle_bin_enter_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.recycle_bin_enter_time.as_ref()
    }
    /// <p>The date and time when the snapshot is to be permanently deleted from the Recycle Bin.</p>
    pub fn recycle_bin_exit_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.recycle_bin_exit_time.as_ref()
    }
    /// <p>The description for the snapshot.</p>
    pub fn description(&self) -> std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The ID of the volume from which the snapshot was created.</p>
    pub fn volume_id(&self) -> std::option::Option<&str> {
        self.volume_id.as_deref()
    }
}
/// See [`SnapshotRecycleBinInfo`](crate::model::SnapshotRecycleBinInfo).
pub mod snapshot_recycle_bin_info {

    /// A builder for [`SnapshotRecycleBinInfo`](crate::model::SnapshotRecycleBinInfo).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) snapshot_id: std::option::Option<std::string::String>,
        pub(crate) recycle_bin_enter_time: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) recycle_bin_exit_time: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) description: std::option::Option<std::string::String>,
        pub(crate) volume_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The ID of the snapshot.</p>
        pub fn snapshot_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.snapshot_id = Some(input.into());
            self
        }
        /// <p>The ID of the snapshot.</p>
        pub fn set_snapshot_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.snapshot_id = input;
            self
        }
        /// <p>The date and time when the snaphsot entered the Recycle Bin.</p>
        pub fn recycle_bin_enter_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.recycle_bin_enter_time = Some(input);
            self
        }
        /// <p>The date and time when the snaphsot entered the Recycle Bin.</p>
        pub fn set_recycle_bin_enter_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.recycle_bin_enter_time = input;
            self
        }
        /// <p>The date and time when the snapshot is to be permanently deleted from the Recycle Bin.</p>
        pub fn recycle_bin_exit_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.recycle_bin_exit_time = Some(input);
            self
        }
        /// <p>The date and time when the snapshot is to be permanently deleted from the Recycle Bin.</p>
        pub fn set_recycle_bin_exit_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.recycle_bin_exit_time = input;
            self
        }
        /// <p>The description for the snapshot.</p>
        pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
            self.description = Some(input.into());
            self
        }
        /// <p>The description for the snapshot.</p>
        pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.description = input;
            self
        }
        /// <p>The ID of the volume from which the snapshot was created.</p>
        pub fn volume_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.volume_id = Some(input.into());
            self
        }
        /// <p>The ID of the volume from which the snapshot was created.</p>
        pub fn set_volume_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.volume_id = input;
            self
        }
        /// Consumes the builder and constructs a [`SnapshotRecycleBinInfo`](crate::model::SnapshotRecycleBinInfo).
        pub fn build(self) -> crate::model::SnapshotRecycleBinInfo {
            crate::model::SnapshotRecycleBinInfo {
                snapshot_id: self.snapshot_id,
                recycle_bin_enter_time: self.recycle_bin_enter_time,
                recycle_bin_exit_time: self.recycle_bin_exit_time,
                description: self.description,
                volume_id: self.volume_id,
            }
        }
    }
}
impl SnapshotRecycleBinInfo {
    /// Creates a new builder-style object to manufacture [`SnapshotRecycleBinInfo`](crate::model::SnapshotRecycleBinInfo).
    pub fn builder() -> crate::model::snapshot_recycle_bin_info::Builder {
        crate::model::snapshot_recycle_bin_info::Builder::default()
    }
}

/// <p>Information about an AMI that is currently in the Recycle Bin.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ImageRecycleBinInfo {
    /// <p>The ID of the AMI.</p>
    #[doc(hidden)]
    pub image_id: std::option::Option<std::string::String>,
    /// <p>The name of the AMI.</p>
    #[doc(hidden)]
    pub name: std::option::Option<std::string::String>,
    /// <p>The description of the AMI.</p>
    #[doc(hidden)]
    pub description: std::option::Option<std::string::String>,
    /// <p>The date and time when the AMI entered the Recycle Bin.</p>
    #[doc(hidden)]
    pub recycle_bin_enter_time: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The date and time when the AMI is to be permanently deleted from the Recycle Bin.</p>
    #[doc(hidden)]
    pub recycle_bin_exit_time: std::option::Option<aws_smithy_types::DateTime>,
}
impl ImageRecycleBinInfo {
    /// <p>The ID of the AMI.</p>
    pub fn image_id(&self) -> std::option::Option<&str> {
        self.image_id.as_deref()
    }
    /// <p>The name of the AMI.</p>
    pub fn name(&self) -> std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The description of the AMI.</p>
    pub fn description(&self) -> std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The date and time when the AMI entered the Recycle Bin.</p>
    pub fn recycle_bin_enter_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.recycle_bin_enter_time.as_ref()
    }
    /// <p>The date and time when the AMI is to be permanently deleted from the Recycle Bin.</p>
    pub fn recycle_bin_exit_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.recycle_bin_exit_time.as_ref()
    }
}
/// See [`ImageRecycleBinInfo`](crate::model::ImageRecycleBinInfo).
pub mod image_recycle_bin_info {

    /// A builder for [`ImageRecycleBinInfo`](crate::model::ImageRecycleBinInfo).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) image_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) recycle_bin_enter_time: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) recycle_bin_exit_time: std::option::Option<aws_smithy_types::DateTime>,
    }
    impl Builder {
        /// <p>The ID of the AMI.</p>
        pub fn image_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.image_id = Some(input.into());
            self
        }
        /// <p>The ID of the AMI.</p>
        pub fn set_image_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.image_id = input;
            self
        }
        /// <p>The name of the AMI.</p>
        pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
            self.name = Some(input.into());
            self
        }
        /// <p>The name of the AMI.</p>
        pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.name = input;
            self
        }
        /// <p>The description of the AMI.</p>
        pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
            self.description = Some(input.into());
            self
        }
        /// <p>The description of the AMI.</p>
        pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.description = input;
            self
        }
        /// <p>The date and time when the AMI entered the Recycle Bin.</p>
        pub fn recycle_bin_enter_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.recycle_bin_enter_time = Some(input);
            self
        }
        /// <p>The date and time when the AMI entered the Recycle Bin.</p>
        pub fn set_recycle_bin_enter_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.recycle_bin_enter_time = input;
            self
        }
        /// <p>The date and time when the AMI is to be permanently deleted from the Recycle Bin.</p>
        pub fn recycle_bin_exit_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.recycle_bin_exit_time = Some(input);
            self
        }
        /// <p>The date and time when the AMI is to be permanently deleted from the Recycle Bin.</p>
        pub fn set_recycle_bin_exit_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.recycle_bin_exit_time = input;
            self
        }
        /// Consumes the builder and constructs a [`ImageRecycleBinInfo`](crate::model::ImageRecycleBinInfo).
        pub fn build(self) -> crate::model::ImageRecycleBinInfo {
            crate::model::ImageRecycleBinInfo {
                image_id: self.image_id,
                name: self.name,
                description: self.description,
                recycle_bin_enter_time: self.recycle_bin_enter_time,
                recycle_bin_exit_time: self.recycle_bin_exit_time,
            }
        }
    }
}
impl ImageRecycleBinInfo {
    /// Creates a new builder-style object to manufacture [`ImageRecycleBinInfo`](crate::model::ImageRecycleBinInfo).
    pub fn builder() -> crate::model::image_recycle_bin_info::Builder {
        crate::model::image_recycle_bin_info::Builder::default()
    }
}

/// <p>Describes a conversion task.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ConversionTask {
    /// <p>The ID of the conversion task.</p>
    #[doc(hidden)]
    pub conversion_task_id: std::option::Option<std::string::String>,
    /// <p>The time when the task expires. If the upload isn't complete before the expiration time, we automatically cancel the task.</p>
    #[doc(hidden)]
    pub expiration_time: std::option::Option<std::string::String>,
    /// <p>If the task is for importing an instance, this contains information about the import instance task.</p>
    #[doc(hidden)]
    pub import_instance: std::option::Option<crate::model::ImportInstanceTaskDetails>,
    /// <p>If the task is for importing a volume, this contains information about the import volume task.</p>
    #[doc(hidden)]
    pub import_volume: std::option::Option<crate::model::ImportVolumeTaskDetails>,
    /// <p>The state of the conversion task.</p>
    #[doc(hidden)]
    pub state: std::option::Option<crate::model::ConversionTaskState>,
    /// <p>The status message related to the conversion task.</p>
    #[doc(hidden)]
    pub status_message: std::option::Option<std::string::String>,
    /// <p>Any tags assigned to the task.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl ConversionTask {
    /// <p>The ID of the conversion task.</p>
    pub fn conversion_task_id(&self) -> std::option::Option<&str> {
        self.conversion_task_id.as_deref()
    }
    /// <p>The time when the task expires. If the upload isn't complete before the expiration time, we automatically cancel the task.</p>
    pub fn expiration_time(&self) -> std::option::Option<&str> {
        self.expiration_time.as_deref()
    }
    /// <p>If the task is for importing an instance, this contains information about the import instance task.</p>
    pub fn import_instance(&self) -> std::option::Option<&crate::model::ImportInstanceTaskDetails> {
        self.import_instance.as_ref()
    }
    /// <p>If the task is for importing a volume, this contains information about the import volume task.</p>
    pub fn import_volume(&self) -> std::option::Option<&crate::model::ImportVolumeTaskDetails> {
        self.import_volume.as_ref()
    }
    /// <p>The state of the conversion task.</p>
    pub fn state(&self) -> std::option::Option<&crate::model::ConversionTaskState> {
        self.state.as_ref()
    }
    /// <p>The status message related to the conversion task.</p>
    pub fn status_message(&self) -> std::option::Option<&str> {
        self.status_message.as_deref()
    }
    /// <p>Any tags assigned to the task.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
}
/// See [`ConversionTask`](crate::model::ConversionTask).
pub mod conversion_task {

    /// A builder for [`ConversionTask`](crate::model::ConversionTask).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) conversion_task_id: std::option::Option<std::string::String>,
        pub(crate) expiration_time: std::option::Option<std::string::String>,
        pub(crate) import_instance: std::option::Option<crate::model::ImportInstanceTaskDetails>,
        pub(crate) import_volume: std::option::Option<crate::model::ImportVolumeTaskDetails>,
        pub(crate) state: std::option::Option<crate::model::ConversionTaskState>,
        pub(crate) status_message: std::option::Option<std::string::String>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    }
    impl Builder {
        /// <p>The ID of the conversion task.</p>
        pub fn conversion_task_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.conversion_task_id = Some(input.into());
            self
        }
        /// <p>The ID of the conversion task.</p>
        pub fn set_conversion_task_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.conversion_task_id = input;
            self
        }
        /// <p>The time when the task expires. If the upload isn't complete before the expiration time, we automatically cancel the task.</p>
        pub fn expiration_time(mut self, input: impl Into<std::string::String>) -> Self {
            self.expiration_time = Some(input.into());
            self
        }
        /// <p>The time when the task expires. If the upload isn't complete before the expiration time, we automatically cancel the task.</p>
        pub fn set_expiration_time(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.expiration_time = input;
            self
        }
        /// <p>If the task is for importing an instance, this contains information about the import instance task.</p>
        pub fn import_instance(mut self, input: crate::model::ImportInstanceTaskDetails) -> Self {
            self.import_instance = Some(input);
            self
        }
        /// <p>If the task is for importing an instance, this contains information about the import instance task.</p>
        pub fn set_import_instance(
            mut self,
            input: std::option::Option<crate::model::ImportInstanceTaskDetails>,
        ) -> Self {
            self.import_instance = input;
            self
        }
        /// <p>If the task is for importing a volume, this contains information about the import volume task.</p>
        pub fn import_volume(mut self, input: crate::model::ImportVolumeTaskDetails) -> Self {
            self.import_volume = Some(input);
            self
        }
        /// <p>If the task is for importing a volume, this contains information about the import volume task.</p>
        pub fn set_import_volume(
            mut self,
            input: std::option::Option<crate::model::ImportVolumeTaskDetails>,
        ) -> Self {
            self.import_volume = input;
            self
        }
        /// <p>The state of the conversion task.</p>
        pub fn state(mut self, input: crate::model::ConversionTaskState) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>The state of the conversion task.</p>
        pub fn set_state(
            mut self,
            input: std::option::Option<crate::model::ConversionTaskState>,
        ) -> Self {
            self.state = input;
            self
        }
        /// <p>The status message related to the conversion task.</p>
        pub fn status_message(mut self, input: impl Into<std::string::String>) -> Self {
            self.status_message = Some(input.into());
            self
        }
        /// <p>The status message related to the conversion task.</p>
        pub fn set_status_message(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.status_message = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>Any tags assigned to the task.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>Any tags assigned to the task.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// Consumes the builder and constructs a [`ConversionTask`](crate::model::ConversionTask).
        pub fn build(self) -> crate::model::ConversionTask {
            crate::model::ConversionTask {
                conversion_task_id: self.conversion_task_id,
                expiration_time: self.expiration_time,
                import_instance: self.import_instance,
                import_volume: self.import_volume,
                state: self.state,
                status_message: self.status_message,
                tags: self.tags,
            }
        }
    }
}
impl ConversionTask {
    /// Creates a new builder-style object to manufacture [`ConversionTask`](crate::model::ConversionTask).
    pub fn builder() -> crate::model::conversion_task::Builder {
        crate::model::conversion_task::Builder::default()
    }
}

/// When writing a match expression against `ConversionTaskState`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let conversiontaskstate = unimplemented!();
/// match conversiontaskstate {
///     ConversionTaskState::Active => { /* ... */ },
///     ConversionTaskState::Cancelled => { /* ... */ },
///     ConversionTaskState::Cancelling => { /* ... */ },
///     ConversionTaskState::Completed => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `conversiontaskstate` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `ConversionTaskState::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `ConversionTaskState::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `ConversionTaskState::NewFeature` is defined.
/// Specifically, when `conversiontaskstate` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `ConversionTaskState::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 ConversionTaskState {
    #[allow(missing_docs)] // documentation missing in model
    Active,
    #[allow(missing_docs)] // documentation missing in model
    Cancelled,
    #[allow(missing_docs)] // documentation missing in model
    Cancelling,
    #[allow(missing_docs)] // documentation missing in model
    Completed,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for ConversionTaskState {
    fn from(s: &str) -> Self {
        match s {
            "active" => ConversionTaskState::Active,
            "cancelled" => ConversionTaskState::Cancelled,
            "cancelling" => ConversionTaskState::Cancelling,
            "completed" => ConversionTaskState::Completed,
            other => {
                ConversionTaskState::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for ConversionTaskState {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(ConversionTaskState::from(s))
    }
}
impl ConversionTaskState {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            ConversionTaskState::Active => "active",
            ConversionTaskState::Cancelled => "cancelled",
            ConversionTaskState::Cancelling => "cancelling",
            ConversionTaskState::Completed => "completed",
            ConversionTaskState::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["active", "cancelled", "cancelling", "completed"]
    }
}
impl AsRef<str> for ConversionTaskState {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes an import volume task.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ImportVolumeTaskDetails {
    /// <p>The Availability Zone where the resulting volume will reside.</p>
    #[doc(hidden)]
    pub availability_zone: std::option::Option<std::string::String>,
    /// <p>The number of bytes converted so far.</p>
    #[doc(hidden)]
    pub bytes_converted: std::option::Option<i64>,
    /// <p>The description you provided when starting the import volume task.</p>
    #[doc(hidden)]
    pub description: std::option::Option<std::string::String>,
    /// <p>The image.</p>
    #[doc(hidden)]
    pub image: std::option::Option<crate::model::DiskImageDescription>,
    /// <p>The volume.</p>
    #[doc(hidden)]
    pub volume: std::option::Option<crate::model::DiskImageVolumeDescription>,
}
impl ImportVolumeTaskDetails {
    /// <p>The Availability Zone where the resulting volume will reside.</p>
    pub fn availability_zone(&self) -> std::option::Option<&str> {
        self.availability_zone.as_deref()
    }
    /// <p>The number of bytes converted so far.</p>
    pub fn bytes_converted(&self) -> std::option::Option<i64> {
        self.bytes_converted
    }
    /// <p>The description you provided when starting the import volume task.</p>
    pub fn description(&self) -> std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The image.</p>
    pub fn image(&self) -> std::option::Option<&crate::model::DiskImageDescription> {
        self.image.as_ref()
    }
    /// <p>The volume.</p>
    pub fn volume(&self) -> std::option::Option<&crate::model::DiskImageVolumeDescription> {
        self.volume.as_ref()
    }
}
/// See [`ImportVolumeTaskDetails`](crate::model::ImportVolumeTaskDetails).
pub mod import_volume_task_details {

    /// A builder for [`ImportVolumeTaskDetails`](crate::model::ImportVolumeTaskDetails).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) availability_zone: std::option::Option<std::string::String>,
        pub(crate) bytes_converted: std::option::Option<i64>,
        pub(crate) description: std::option::Option<std::string::String>,
        pub(crate) image: std::option::Option<crate::model::DiskImageDescription>,
        pub(crate) volume: std::option::Option<crate::model::DiskImageVolumeDescription>,
    }
    impl Builder {
        /// <p>The Availability Zone where the resulting volume will reside.</p>
        pub fn availability_zone(mut self, input: impl Into<std::string::String>) -> Self {
            self.availability_zone = Some(input.into());
            self
        }
        /// <p>The Availability Zone where the resulting volume will reside.</p>
        pub fn set_availability_zone(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.availability_zone = input;
            self
        }
        /// <p>The number of bytes converted so far.</p>
        pub fn bytes_converted(mut self, input: i64) -> Self {
            self.bytes_converted = Some(input);
            self
        }
        /// <p>The number of bytes converted so far.</p>
        pub fn set_bytes_converted(mut self, input: std::option::Option<i64>) -> Self {
            self.bytes_converted = input;
            self
        }
        /// <p>The description you provided when starting the import volume task.</p>
        pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
            self.description = Some(input.into());
            self
        }
        /// <p>The description you provided when starting the import volume task.</p>
        pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.description = input;
            self
        }
        /// <p>The image.</p>
        pub fn image(mut self, input: crate::model::DiskImageDescription) -> Self {
            self.image = Some(input);
            self
        }
        /// <p>The image.</p>
        pub fn set_image(
            mut self,
            input: std::option::Option<crate::model::DiskImageDescription>,
        ) -> Self {
            self.image = input;
            self
        }
        /// <p>The volume.</p>
        pub fn volume(mut self, input: crate::model::DiskImageVolumeDescription) -> Self {
            self.volume = Some(input);
            self
        }
        /// <p>The volume.</p>
        pub fn set_volume(
            mut self,
            input: std::option::Option<crate::model::DiskImageVolumeDescription>,
        ) -> Self {
            self.volume = input;
            self
        }
        /// Consumes the builder and constructs a [`ImportVolumeTaskDetails`](crate::model::ImportVolumeTaskDetails).
        pub fn build(self) -> crate::model::ImportVolumeTaskDetails {
            crate::model::ImportVolumeTaskDetails {
                availability_zone: self.availability_zone,
                bytes_converted: self.bytes_converted,
                description: self.description,
                image: self.image,
                volume: self.volume,
            }
        }
    }
}
impl ImportVolumeTaskDetails {
    /// Creates a new builder-style object to manufacture [`ImportVolumeTaskDetails`](crate::model::ImportVolumeTaskDetails).
    pub fn builder() -> crate::model::import_volume_task_details::Builder {
        crate::model::import_volume_task_details::Builder::default()
    }
}

/// <p>Describes a disk image volume.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DiskImageVolumeDescription {
    /// <p>The volume identifier.</p>
    #[doc(hidden)]
    pub id: std::option::Option<std::string::String>,
    /// <p>The size of the volume, in GiB.</p>
    #[doc(hidden)]
    pub size: std::option::Option<i64>,
}
impl DiskImageVolumeDescription {
    /// <p>The volume identifier.</p>
    pub fn id(&self) -> std::option::Option<&str> {
        self.id.as_deref()
    }
    /// <p>The size of the volume, in GiB.</p>
    pub fn size(&self) -> std::option::Option<i64> {
        self.size
    }
}
/// See [`DiskImageVolumeDescription`](crate::model::DiskImageVolumeDescription).
pub mod disk_image_volume_description {

    /// A builder for [`DiskImageVolumeDescription`](crate::model::DiskImageVolumeDescription).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) id: std::option::Option<std::string::String>,
        pub(crate) size: std::option::Option<i64>,
    }
    impl Builder {
        /// <p>The volume identifier.</p>
        pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
            self.id = Some(input.into());
            self
        }
        /// <p>The volume identifier.</p>
        pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.id = input;
            self
        }
        /// <p>The size of the volume, in GiB.</p>
        pub fn size(mut self, input: i64) -> Self {
            self.size = Some(input);
            self
        }
        /// <p>The size of the volume, in GiB.</p>
        pub fn set_size(mut self, input: std::option::Option<i64>) -> Self {
            self.size = input;
            self
        }
        /// Consumes the builder and constructs a [`DiskImageVolumeDescription`](crate::model::DiskImageVolumeDescription).
        pub fn build(self) -> crate::model::DiskImageVolumeDescription {
            crate::model::DiskImageVolumeDescription {
                id: self.id,
                size: self.size,
            }
        }
    }
}
impl DiskImageVolumeDescription {
    /// Creates a new builder-style object to manufacture [`DiskImageVolumeDescription`](crate::model::DiskImageVolumeDescription).
    pub fn builder() -> crate::model::disk_image_volume_description::Builder {
        crate::model::disk_image_volume_description::Builder::default()
    }
}

/// <p>Describes a disk image.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DiskImageDescription {
    /// <p>The checksum computed for the disk image.</p>
    #[doc(hidden)]
    pub checksum: std::option::Option<std::string::String>,
    /// <p>The disk image format.</p>
    #[doc(hidden)]
    pub format: std::option::Option<crate::model::DiskImageFormat>,
    /// <p>A presigned URL for the import manifest stored in Amazon S3. For information about creating a presigned URL for an Amazon S3 object, read the "Query String Request Authentication Alternative" section of the <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html">Authenticating REST Requests</a> topic in the <i>Amazon Simple Storage Service Developer Guide</i>.</p>
    /// <p>For information about the import manifest referenced by this API action, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/manifest.html">VM Import Manifest</a>.</p>
    #[doc(hidden)]
    pub import_manifest_url: std::option::Option<std::string::String>,
    /// <p>The size of the disk image, in GiB.</p>
    #[doc(hidden)]
    pub size: std::option::Option<i64>,
}
impl DiskImageDescription {
    /// <p>The checksum computed for the disk image.</p>
    pub fn checksum(&self) -> std::option::Option<&str> {
        self.checksum.as_deref()
    }
    /// <p>The disk image format.</p>
    pub fn format(&self) -> std::option::Option<&crate::model::DiskImageFormat> {
        self.format.as_ref()
    }
    /// <p>A presigned URL for the import manifest stored in Amazon S3. For information about creating a presigned URL for an Amazon S3 object, read the "Query String Request Authentication Alternative" section of the <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html">Authenticating REST Requests</a> topic in the <i>Amazon Simple Storage Service Developer Guide</i>.</p>
    /// <p>For information about the import manifest referenced by this API action, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/manifest.html">VM Import Manifest</a>.</p>
    pub fn import_manifest_url(&self) -> std::option::Option<&str> {
        self.import_manifest_url.as_deref()
    }
    /// <p>The size of the disk image, in GiB.</p>
    pub fn size(&self) -> std::option::Option<i64> {
        self.size
    }
}
/// See [`DiskImageDescription`](crate::model::DiskImageDescription).
pub mod disk_image_description {

    /// A builder for [`DiskImageDescription`](crate::model::DiskImageDescription).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) checksum: std::option::Option<std::string::String>,
        pub(crate) format: std::option::Option<crate::model::DiskImageFormat>,
        pub(crate) import_manifest_url: std::option::Option<std::string::String>,
        pub(crate) size: std::option::Option<i64>,
    }
    impl Builder {
        /// <p>The checksum computed for the disk image.</p>
        pub fn checksum(mut self, input: impl Into<std::string::String>) -> Self {
            self.checksum = Some(input.into());
            self
        }
        /// <p>The checksum computed for the disk image.</p>
        pub fn set_checksum(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.checksum = input;
            self
        }
        /// <p>The disk image format.</p>
        pub fn format(mut self, input: crate::model::DiskImageFormat) -> Self {
            self.format = Some(input);
            self
        }
        /// <p>The disk image format.</p>
        pub fn set_format(
            mut self,
            input: std::option::Option<crate::model::DiskImageFormat>,
        ) -> Self {
            self.format = input;
            self
        }
        /// <p>A presigned URL for the import manifest stored in Amazon S3. For information about creating a presigned URL for an Amazon S3 object, read the "Query String Request Authentication Alternative" section of the <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html">Authenticating REST Requests</a> topic in the <i>Amazon Simple Storage Service Developer Guide</i>.</p>
        /// <p>For information about the import manifest referenced by this API action, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/manifest.html">VM Import Manifest</a>.</p>
        pub fn import_manifest_url(mut self, input: impl Into<std::string::String>) -> Self {
            self.import_manifest_url = Some(input.into());
            self
        }
        /// <p>A presigned URL for the import manifest stored in Amazon S3. For information about creating a presigned URL for an Amazon S3 object, read the "Query String Request Authentication Alternative" section of the <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html">Authenticating REST Requests</a> topic in the <i>Amazon Simple Storage Service Developer Guide</i>.</p>
        /// <p>For information about the import manifest referenced by this API action, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/manifest.html">VM Import Manifest</a>.</p>
        pub fn set_import_manifest_url(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.import_manifest_url = input;
            self
        }
        /// <p>The size of the disk image, in GiB.</p>
        pub fn size(mut self, input: i64) -> Self {
            self.size = Some(input);
            self
        }
        /// <p>The size of the disk image, in GiB.</p>
        pub fn set_size(mut self, input: std::option::Option<i64>) -> Self {
            self.size = input;
            self
        }
        /// Consumes the builder and constructs a [`DiskImageDescription`](crate::model::DiskImageDescription).
        pub fn build(self) -> crate::model::DiskImageDescription {
            crate::model::DiskImageDescription {
                checksum: self.checksum,
                format: self.format,
                import_manifest_url: self.import_manifest_url,
                size: self.size,
            }
        }
    }
}
impl DiskImageDescription {
    /// Creates a new builder-style object to manufacture [`DiskImageDescription`](crate::model::DiskImageDescription).
    pub fn builder() -> crate::model::disk_image_description::Builder {
        crate::model::disk_image_description::Builder::default()
    }
}

/// When writing a match expression against `DiskImageFormat`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let diskimageformat = unimplemented!();
/// match diskimageformat {
///     DiskImageFormat::Raw => { /* ... */ },
///     DiskImageFormat::Vhd => { /* ... */ },
///     DiskImageFormat::Vmdk => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `diskimageformat` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `DiskImageFormat::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `DiskImageFormat::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `DiskImageFormat::NewFeature` is defined.
/// Specifically, when `diskimageformat` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `DiskImageFormat::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 DiskImageFormat {
    #[allow(missing_docs)] // documentation missing in model
    Raw,
    #[allow(missing_docs)] // documentation missing in model
    Vhd,
    #[allow(missing_docs)] // documentation missing in model
    Vmdk,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for DiskImageFormat {
    fn from(s: &str) -> Self {
        match s {
            "RAW" => DiskImageFormat::Raw,
            "VHD" => DiskImageFormat::Vhd,
            "VMDK" => DiskImageFormat::Vmdk,
            other => DiskImageFormat::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for DiskImageFormat {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(DiskImageFormat::from(s))
    }
}
impl DiskImageFormat {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            DiskImageFormat::Raw => "RAW",
            DiskImageFormat::Vhd => "VHD",
            DiskImageFormat::Vmdk => "VMDK",
            DiskImageFormat::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["RAW", "VHD", "VMDK"]
    }
}
impl AsRef<str> for DiskImageFormat {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes an import instance task.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ImportInstanceTaskDetails {
    /// <p>A description of the task.</p>
    #[doc(hidden)]
    pub description: std::option::Option<std::string::String>,
    /// <p>The ID of the instance.</p>
    #[doc(hidden)]
    pub instance_id: std::option::Option<std::string::String>,
    /// <p>The instance operating system.</p>
    #[doc(hidden)]
    pub platform: std::option::Option<crate::model::PlatformValues>,
    /// <p>The volumes.</p>
    #[doc(hidden)]
    pub volumes: std::option::Option<std::vec::Vec<crate::model::ImportInstanceVolumeDetailItem>>,
}
impl ImportInstanceTaskDetails {
    /// <p>A description of the task.</p>
    pub fn description(&self) -> std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The ID of the instance.</p>
    pub fn instance_id(&self) -> std::option::Option<&str> {
        self.instance_id.as_deref()
    }
    /// <p>The instance operating system.</p>
    pub fn platform(&self) -> std::option::Option<&crate::model::PlatformValues> {
        self.platform.as_ref()
    }
    /// <p>The volumes.</p>
    pub fn volumes(&self) -> std::option::Option<&[crate::model::ImportInstanceVolumeDetailItem]> {
        self.volumes.as_deref()
    }
}
/// See [`ImportInstanceTaskDetails`](crate::model::ImportInstanceTaskDetails).
pub mod import_instance_task_details {

    /// A builder for [`ImportInstanceTaskDetails`](crate::model::ImportInstanceTaskDetails).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) description: std::option::Option<std::string::String>,
        pub(crate) instance_id: std::option::Option<std::string::String>,
        pub(crate) platform: std::option::Option<crate::model::PlatformValues>,
        pub(crate) volumes:
            std::option::Option<std::vec::Vec<crate::model::ImportInstanceVolumeDetailItem>>,
    }
    impl Builder {
        /// <p>A description of the task.</p>
        pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
            self.description = Some(input.into());
            self
        }
        /// <p>A description of the task.</p>
        pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.description = input;
            self
        }
        /// <p>The ID of the instance.</p>
        pub fn instance_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.instance_id = Some(input.into());
            self
        }
        /// <p>The ID of the instance.</p>
        pub fn set_instance_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.instance_id = input;
            self
        }
        /// <p>The instance operating system.</p>
        pub fn platform(mut self, input: crate::model::PlatformValues) -> Self {
            self.platform = Some(input);
            self
        }
        /// <p>The instance operating system.</p>
        pub fn set_platform(
            mut self,
            input: std::option::Option<crate::model::PlatformValues>,
        ) -> Self {
            self.platform = input;
            self
        }
        /// Appends an item to `volumes`.
        ///
        /// To override the contents of this collection use [`set_volumes`](Self::set_volumes).
        ///
        /// <p>The volumes.</p>
        pub fn volumes(mut self, input: crate::model::ImportInstanceVolumeDetailItem) -> Self {
            let mut v = self.volumes.unwrap_or_default();
            v.push(input);
            self.volumes = Some(v);
            self
        }
        /// <p>The volumes.</p>
        pub fn set_volumes(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::ImportInstanceVolumeDetailItem>>,
        ) -> Self {
            self.volumes = input;
            self
        }
        /// Consumes the builder and constructs a [`ImportInstanceTaskDetails`](crate::model::ImportInstanceTaskDetails).
        pub fn build(self) -> crate::model::ImportInstanceTaskDetails {
            crate::model::ImportInstanceTaskDetails {
                description: self.description,
                instance_id: self.instance_id,
                platform: self.platform,
                volumes: self.volumes,
            }
        }
    }
}
impl ImportInstanceTaskDetails {
    /// Creates a new builder-style object to manufacture [`ImportInstanceTaskDetails`](crate::model::ImportInstanceTaskDetails).
    pub fn builder() -> crate::model::import_instance_task_details::Builder {
        crate::model::import_instance_task_details::Builder::default()
    }
}

/// <p>Describes an import volume task.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ImportInstanceVolumeDetailItem {
    /// <p>The Availability Zone where the resulting instance will reside.</p>
    #[doc(hidden)]
    pub availability_zone: std::option::Option<std::string::String>,
    /// <p>The number of bytes converted so far.</p>
    #[doc(hidden)]
    pub bytes_converted: std::option::Option<i64>,
    /// <p>A description of the task.</p>
    #[doc(hidden)]
    pub description: std::option::Option<std::string::String>,
    /// <p>The image.</p>
    #[doc(hidden)]
    pub image: std::option::Option<crate::model::DiskImageDescription>,
    /// <p>The status of the import of this particular disk image.</p>
    #[doc(hidden)]
    pub status: std::option::Option<std::string::String>,
    /// <p>The status information or errors related to the disk image.</p>
    #[doc(hidden)]
    pub status_message: std::option::Option<std::string::String>,
    /// <p>The volume.</p>
    #[doc(hidden)]
    pub volume: std::option::Option<crate::model::DiskImageVolumeDescription>,
}
impl ImportInstanceVolumeDetailItem {
    /// <p>The Availability Zone where the resulting instance will reside.</p>
    pub fn availability_zone(&self) -> std::option::Option<&str> {
        self.availability_zone.as_deref()
    }
    /// <p>The number of bytes converted so far.</p>
    pub fn bytes_converted(&self) -> std::option::Option<i64> {
        self.bytes_converted
    }
    /// <p>A description of the task.</p>
    pub fn description(&self) -> std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The image.</p>
    pub fn image(&self) -> std::option::Option<&crate::model::DiskImageDescription> {
        self.image.as_ref()
    }
    /// <p>The status of the import of this particular disk image.</p>
    pub fn status(&self) -> std::option::Option<&str> {
        self.status.as_deref()
    }
    /// <p>The status information or errors related to the disk image.</p>
    pub fn status_message(&self) -> std::option::Option<&str> {
        self.status_message.as_deref()
    }
    /// <p>The volume.</p>
    pub fn volume(&self) -> std::option::Option<&crate::model::DiskImageVolumeDescription> {
        self.volume.as_ref()
    }
}
/// See [`ImportInstanceVolumeDetailItem`](crate::model::ImportInstanceVolumeDetailItem).
pub mod import_instance_volume_detail_item {

    /// A builder for [`ImportInstanceVolumeDetailItem`](crate::model::ImportInstanceVolumeDetailItem).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) availability_zone: std::option::Option<std::string::String>,
        pub(crate) bytes_converted: std::option::Option<i64>,
        pub(crate) description: std::option::Option<std::string::String>,
        pub(crate) image: std::option::Option<crate::model::DiskImageDescription>,
        pub(crate) status: std::option::Option<std::string::String>,
        pub(crate) status_message: std::option::Option<std::string::String>,
        pub(crate) volume: std::option::Option<crate::model::DiskImageVolumeDescription>,
    }
    impl Builder {
        /// <p>The Availability Zone where the resulting instance will reside.</p>
        pub fn availability_zone(mut self, input: impl Into<std::string::String>) -> Self {
            self.availability_zone = Some(input.into());
            self
        }
        /// <p>The Availability Zone where the resulting instance will reside.</p>
        pub fn set_availability_zone(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.availability_zone = input;
            self
        }
        /// <p>The number of bytes converted so far.</p>
        pub fn bytes_converted(mut self, input: i64) -> Self {
            self.bytes_converted = Some(input);
            self
        }
        /// <p>The number of bytes converted so far.</p>
        pub fn set_bytes_converted(mut self, input: std::option::Option<i64>) -> Self {
            self.bytes_converted = input;
            self
        }
        /// <p>A description of the task.</p>
        pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
            self.description = Some(input.into());
            self
        }
        /// <p>A description of the task.</p>
        pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.description = input;
            self
        }
        /// <p>The image.</p>
        pub fn image(mut self, input: crate::model::DiskImageDescription) -> Self {
            self.image = Some(input);
            self
        }
        /// <p>The image.</p>
        pub fn set_image(
            mut self,
            input: std::option::Option<crate::model::DiskImageDescription>,
        ) -> Self {
            self.image = input;
            self
        }
        /// <p>The status of the import of this particular disk image.</p>
        pub fn status(mut self, input: impl Into<std::string::String>) -> Self {
            self.status = Some(input.into());
            self
        }
        /// <p>The status of the import of this particular disk image.</p>
        pub fn set_status(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.status = input;
            self
        }
        /// <p>The status information or errors related to the disk image.</p>
        pub fn status_message(mut self, input: impl Into<std::string::String>) -> Self {
            self.status_message = Some(input.into());
            self
        }
        /// <p>The status information or errors related to the disk image.</p>
        pub fn set_status_message(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.status_message = input;
            self
        }
        /// <p>The volume.</p>
        pub fn volume(mut self, input: crate::model::DiskImageVolumeDescription) -> Self {
            self.volume = Some(input);
            self
        }
        /// <p>The volume.</p>
        pub fn set_volume(
            mut self,
            input: std::option::Option<crate::model::DiskImageVolumeDescription>,
        ) -> Self {
            self.volume = input;
            self
        }
        /// Consumes the builder and constructs a [`ImportInstanceVolumeDetailItem`](crate::model::ImportInstanceVolumeDetailItem).
        pub fn build(self) -> crate::model::ImportInstanceVolumeDetailItem {
            crate::model::ImportInstanceVolumeDetailItem {
                availability_zone: self.availability_zone,
                bytes_converted: self.bytes_converted,
                description: self.description,
                image: self.image,
                status: self.status,
                status_message: self.status_message,
                volume: self.volume,
            }
        }
    }
}
impl ImportInstanceVolumeDetailItem {
    /// Creates a new builder-style object to manufacture [`ImportInstanceVolumeDetailItem`](crate::model::ImportInstanceVolumeDetailItem).
    pub fn builder() -> crate::model::import_instance_volume_detail_item::Builder {
        crate::model::import_instance_volume_detail_item::Builder::default()
    }
}

/// <p>Describes an EBS volume.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct VolumeDetail {
    /// <p>The size of the volume, in GiB.</p>
    #[doc(hidden)]
    pub size: std::option::Option<i64>,
}
impl VolumeDetail {
    /// <p>The size of the volume, in GiB.</p>
    pub fn size(&self) -> std::option::Option<i64> {
        self.size
    }
}
/// See [`VolumeDetail`](crate::model::VolumeDetail).
pub mod volume_detail {

    /// A builder for [`VolumeDetail`](crate::model::VolumeDetail).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) size: std::option::Option<i64>,
    }
    impl Builder {
        /// <p>The size of the volume, in GiB.</p>
        pub fn size(mut self, input: i64) -> Self {
            self.size = Some(input);
            self
        }
        /// <p>The size of the volume, in GiB.</p>
        pub fn set_size(mut self, input: std::option::Option<i64>) -> Self {
            self.size = input;
            self
        }
        /// Consumes the builder and constructs a [`VolumeDetail`](crate::model::VolumeDetail).
        pub fn build(self) -> crate::model::VolumeDetail {
            crate::model::VolumeDetail { size: self.size }
        }
    }
}
impl VolumeDetail {
    /// Creates a new builder-style object to manufacture [`VolumeDetail`](crate::model::VolumeDetail).
    pub fn builder() -> crate::model::volume_detail::Builder {
        crate::model::volume_detail::Builder::default()
    }
}

/// <p>Describes a disk image.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DiskImageDetail {
    /// <p>The size of the disk image, in GiB.</p>
    #[doc(hidden)]
    pub bytes: std::option::Option<i64>,
    /// <p>The disk image format.</p>
    #[doc(hidden)]
    pub format: std::option::Option<crate::model::DiskImageFormat>,
    /// <p>A presigned URL for the import manifest stored in Amazon S3 and presented here as an Amazon S3 presigned URL. For information about creating a presigned URL for an Amazon S3 object, read the "Query String Request Authentication Alternative" section of the <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html">Authenticating REST Requests</a> topic in the <i>Amazon Simple Storage Service Developer Guide</i>.</p>
    /// <p>For information about the import manifest referenced by this API action, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/manifest.html">VM Import Manifest</a>.</p>
    #[doc(hidden)]
    pub import_manifest_url: std::option::Option<std::string::String>,
}
impl DiskImageDetail {
    /// <p>The size of the disk image, in GiB.</p>
    pub fn bytes(&self) -> std::option::Option<i64> {
        self.bytes
    }
    /// <p>The disk image format.</p>
    pub fn format(&self) -> std::option::Option<&crate::model::DiskImageFormat> {
        self.format.as_ref()
    }
    /// <p>A presigned URL for the import manifest stored in Amazon S3 and presented here as an Amazon S3 presigned URL. For information about creating a presigned URL for an Amazon S3 object, read the "Query String Request Authentication Alternative" section of the <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html">Authenticating REST Requests</a> topic in the <i>Amazon Simple Storage Service Developer Guide</i>.</p>
    /// <p>For information about the import manifest referenced by this API action, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/manifest.html">VM Import Manifest</a>.</p>
    pub fn import_manifest_url(&self) -> std::option::Option<&str> {
        self.import_manifest_url.as_deref()
    }
}
/// See [`DiskImageDetail`](crate::model::DiskImageDetail).
pub mod disk_image_detail {

    /// A builder for [`DiskImageDetail`](crate::model::DiskImageDetail).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) bytes: std::option::Option<i64>,
        pub(crate) format: std::option::Option<crate::model::DiskImageFormat>,
        pub(crate) import_manifest_url: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The size of the disk image, in GiB.</p>
        pub fn bytes(mut self, input: i64) -> Self {
            self.bytes = Some(input);
            self
        }
        /// <p>The size of the disk image, in GiB.</p>
        pub fn set_bytes(mut self, input: std::option::Option<i64>) -> Self {
            self.bytes = input;
            self
        }
        /// <p>The disk image format.</p>
        pub fn format(mut self, input: crate::model::DiskImageFormat) -> Self {
            self.format = Some(input);
            self
        }
        /// <p>The disk image format.</p>
        pub fn set_format(
            mut self,
            input: std::option::Option<crate::model::DiskImageFormat>,
        ) -> Self {
            self.format = input;
            self
        }
        /// <p>A presigned URL for the import manifest stored in Amazon S3 and presented here as an Amazon S3 presigned URL. For information about creating a presigned URL for an Amazon S3 object, read the "Query String Request Authentication Alternative" section of the <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html">Authenticating REST Requests</a> topic in the <i>Amazon Simple Storage Service Developer Guide</i>.</p>
        /// <p>For information about the import manifest referenced by this API action, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/manifest.html">VM Import Manifest</a>.</p>
        pub fn import_manifest_url(mut self, input: impl Into<std::string::String>) -> Self {
            self.import_manifest_url = Some(input.into());
            self
        }
        /// <p>A presigned URL for the import manifest stored in Amazon S3 and presented here as an Amazon S3 presigned URL. For information about creating a presigned URL for an Amazon S3 object, read the "Query String Request Authentication Alternative" section of the <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html">Authenticating REST Requests</a> topic in the <i>Amazon Simple Storage Service Developer Guide</i>.</p>
        /// <p>For information about the import manifest referenced by this API action, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/manifest.html">VM Import Manifest</a>.</p>
        pub fn set_import_manifest_url(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.import_manifest_url = input;
            self
        }
        /// Consumes the builder and constructs a [`DiskImageDetail`](crate::model::DiskImageDetail).
        pub fn build(self) -> crate::model::DiskImageDetail {
            crate::model::DiskImageDetail {
                bytes: self.bytes,
                format: self.format,
                import_manifest_url: self.import_manifest_url,
            }
        }
    }
}
impl DiskImageDetail {
    /// Creates a new builder-style object to manufacture [`DiskImageDetail`](crate::model::DiskImageDetail).
    pub fn builder() -> crate::model::disk_image_detail::Builder {
        crate::model::disk_image_detail::Builder::default()
    }
}

/// <p>Details about the import snapshot task.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SnapshotTaskDetail {
    /// <p>The description of the snapshot.</p>
    #[doc(hidden)]
    pub description: std::option::Option<std::string::String>,
    /// <p>The size of the disk in the snapshot, in GiB.</p>
    #[doc(hidden)]
    pub disk_image_size: std::option::Option<f64>,
    /// <p>Indicates whether the snapshot is encrypted.</p>
    #[doc(hidden)]
    pub encrypted: std::option::Option<bool>,
    /// <p>The format of the disk image from which the snapshot is created.</p>
    #[doc(hidden)]
    pub format: std::option::Option<std::string::String>,
    /// <p>The identifier for the KMS key that was used to create the encrypted snapshot.</p>
    #[doc(hidden)]
    pub kms_key_id: std::option::Option<std::string::String>,
    /// <p>The percentage of completion for the import snapshot task.</p>
    #[doc(hidden)]
    pub progress: std::option::Option<std::string::String>,
    /// <p>The snapshot ID of the disk being imported.</p>
    #[doc(hidden)]
    pub snapshot_id: std::option::Option<std::string::String>,
    /// <p>A brief status for the import snapshot task.</p>
    #[doc(hidden)]
    pub status: std::option::Option<std::string::String>,
    /// <p>A detailed status message for the import snapshot task.</p>
    #[doc(hidden)]
    pub status_message: std::option::Option<std::string::String>,
    /// <p>The URL of the disk image from which the snapshot is created.</p>
    #[doc(hidden)]
    pub url: std::option::Option<std::string::String>,
    /// <p>The Amazon S3 bucket for the disk image.</p>
    #[doc(hidden)]
    pub user_bucket: std::option::Option<crate::model::UserBucketDetails>,
}
impl SnapshotTaskDetail {
    /// <p>The description of the snapshot.</p>
    pub fn description(&self) -> std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The size of the disk in the snapshot, in GiB.</p>
    pub fn disk_image_size(&self) -> std::option::Option<f64> {
        self.disk_image_size
    }
    /// <p>Indicates whether the snapshot is encrypted.</p>
    pub fn encrypted(&self) -> std::option::Option<bool> {
        self.encrypted
    }
    /// <p>The format of the disk image from which the snapshot is created.</p>
    pub fn format(&self) -> std::option::Option<&str> {
        self.format.as_deref()
    }
    /// <p>The identifier for the KMS key that was used to create the encrypted snapshot.</p>
    pub fn kms_key_id(&self) -> std::option::Option<&str> {
        self.kms_key_id.as_deref()
    }
    /// <p>The percentage of completion for the import snapshot task.</p>
    pub fn progress(&self) -> std::option::Option<&str> {
        self.progress.as_deref()
    }
    /// <p>The snapshot ID of the disk being imported.</p>
    pub fn snapshot_id(&self) -> std::option::Option<&str> {
        self.snapshot_id.as_deref()
    }
    /// <p>A brief status for the import snapshot task.</p>
    pub fn status(&self) -> std::option::Option<&str> {
        self.status.as_deref()
    }
    /// <p>A detailed status message for the import snapshot task.</p>
    pub fn status_message(&self) -> std::option::Option<&str> {
        self.status_message.as_deref()
    }
    /// <p>The URL of the disk image from which the snapshot is created.</p>
    pub fn url(&self) -> std::option::Option<&str> {
        self.url.as_deref()
    }
    /// <p>The Amazon S3 bucket for the disk image.</p>
    pub fn user_bucket(&self) -> std::option::Option<&crate::model::UserBucketDetails> {
        self.user_bucket.as_ref()
    }
}
/// See [`SnapshotTaskDetail`](crate::model::SnapshotTaskDetail).
pub mod snapshot_task_detail {

    /// A builder for [`SnapshotTaskDetail`](crate::model::SnapshotTaskDetail).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) description: std::option::Option<std::string::String>,
        pub(crate) disk_image_size: std::option::Option<f64>,
        pub(crate) encrypted: std::option::Option<bool>,
        pub(crate) format: std::option::Option<std::string::String>,
        pub(crate) kms_key_id: std::option::Option<std::string::String>,
        pub(crate) progress: std::option::Option<std::string::String>,
        pub(crate) snapshot_id: std::option::Option<std::string::String>,
        pub(crate) status: std::option::Option<std::string::String>,
        pub(crate) status_message: std::option::Option<std::string::String>,
        pub(crate) url: std::option::Option<std::string::String>,
        pub(crate) user_bucket: std::option::Option<crate::model::UserBucketDetails>,
    }
    impl Builder {
        /// <p>The description of the snapshot.</p>
        pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
            self.description = Some(input.into());
            self
        }
        /// <p>The description of the snapshot.</p>
        pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.description = input;
            self
        }
        /// <p>The size of the disk in the snapshot, in GiB.</p>
        pub fn disk_image_size(mut self, input: f64) -> Self {
            self.disk_image_size = Some(input);
            self
        }
        /// <p>The size of the disk in the snapshot, in GiB.</p>
        pub fn set_disk_image_size(mut self, input: std::option::Option<f64>) -> Self {
            self.disk_image_size = input;
            self
        }
        /// <p>Indicates whether the snapshot is encrypted.</p>
        pub fn encrypted(mut self, input: bool) -> Self {
            self.encrypted = Some(input);
            self
        }
        /// <p>Indicates whether the snapshot is encrypted.</p>
        pub fn set_encrypted(mut self, input: std::option::Option<bool>) -> Self {
            self.encrypted = input;
            self
        }
        /// <p>The format of the disk image from which the snapshot is created.</p>
        pub fn format(mut self, input: impl Into<std::string::String>) -> Self {
            self.format = Some(input.into());
            self
        }
        /// <p>The format of the disk image from which the snapshot is created.</p>
        pub fn set_format(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.format = input;
            self
        }
        /// <p>The identifier for the KMS key that was used to create the encrypted snapshot.</p>
        pub fn kms_key_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.kms_key_id = Some(input.into());
            self
        }
        /// <p>The identifier for the KMS key that was used to create the encrypted snapshot.</p>
        pub fn set_kms_key_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.kms_key_id = input;
            self
        }
        /// <p>The percentage of completion for the import snapshot task.</p>
        pub fn progress(mut self, input: impl Into<std::string::String>) -> Self {
            self.progress = Some(input.into());
            self
        }
        /// <p>The percentage of completion for the import snapshot task.</p>
        pub fn set_progress(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.progress = input;
            self
        }
        /// <p>The snapshot ID of the disk being imported.</p>
        pub fn snapshot_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.snapshot_id = Some(input.into());
            self
        }
        /// <p>The snapshot ID of the disk being imported.</p>
        pub fn set_snapshot_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.snapshot_id = input;
            self
        }
        /// <p>A brief status for the import snapshot task.</p>
        pub fn status(mut self, input: impl Into<std::string::String>) -> Self {
            self.status = Some(input.into());
            self
        }
        /// <p>A brief status for the import snapshot task.</p>
        pub fn set_status(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.status = input;
            self
        }
        /// <p>A detailed status message for the import snapshot task.</p>
        pub fn status_message(mut self, input: impl Into<std::string::String>) -> Self {
            self.status_message = Some(input.into());
            self
        }
        /// <p>A detailed status message for the import snapshot task.</p>
        pub fn set_status_message(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.status_message = input;
            self
        }
        /// <p>The URL of the disk image from which the snapshot is created.</p>
        pub fn url(mut self, input: impl Into<std::string::String>) -> Self {
            self.url = Some(input.into());
            self
        }
        /// <p>The URL of the disk image from which the snapshot is created.</p>
        pub fn set_url(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.url = input;
            self
        }
        /// <p>The Amazon S3 bucket for the disk image.</p>
        pub fn user_bucket(mut self, input: crate::model::UserBucketDetails) -> Self {
            self.user_bucket = Some(input);
            self
        }
        /// <p>The Amazon S3 bucket for the disk image.</p>
        pub fn set_user_bucket(
            mut self,
            input: std::option::Option<crate::model::UserBucketDetails>,
        ) -> Self {
            self.user_bucket = input;
            self
        }
        /// Consumes the builder and constructs a [`SnapshotTaskDetail`](crate::model::SnapshotTaskDetail).
        pub fn build(self) -> crate::model::SnapshotTaskDetail {
            crate::model::SnapshotTaskDetail {
                description: self.description,
                disk_image_size: self.disk_image_size,
                encrypted: self.encrypted,
                format: self.format,
                kms_key_id: self.kms_key_id,
                progress: self.progress,
                snapshot_id: self.snapshot_id,
                status: self.status,
                status_message: self.status_message,
                url: self.url,
                user_bucket: self.user_bucket,
            }
        }
    }
}
impl SnapshotTaskDetail {
    /// Creates a new builder-style object to manufacture [`SnapshotTaskDetail`](crate::model::SnapshotTaskDetail).
    pub fn builder() -> crate::model::snapshot_task_detail::Builder {
        crate::model::snapshot_task_detail::Builder::default()
    }
}

/// <p>Describes the Amazon S3 bucket for the disk image.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UserBucketDetails {
    /// <p>The Amazon S3 bucket from which the disk image was created.</p>
    #[doc(hidden)]
    pub s3_bucket: std::option::Option<std::string::String>,
    /// <p>The file name of the disk image.</p>
    #[doc(hidden)]
    pub s3_key: std::option::Option<std::string::String>,
}
impl UserBucketDetails {
    /// <p>The Amazon S3 bucket from which the disk image was created.</p>
    pub fn s3_bucket(&self) -> std::option::Option<&str> {
        self.s3_bucket.as_deref()
    }
    /// <p>The file name of the disk image.</p>
    pub fn s3_key(&self) -> std::option::Option<&str> {
        self.s3_key.as_deref()
    }
}
/// See [`UserBucketDetails`](crate::model::UserBucketDetails).
pub mod user_bucket_details {

    /// A builder for [`UserBucketDetails`](crate::model::UserBucketDetails).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) s3_bucket: std::option::Option<std::string::String>,
        pub(crate) s3_key: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The Amazon S3 bucket from which the disk image was created.</p>
        pub fn s3_bucket(mut self, input: impl Into<std::string::String>) -> Self {
            self.s3_bucket = Some(input.into());
            self
        }
        /// <p>The Amazon S3 bucket from which the disk image was created.</p>
        pub fn set_s3_bucket(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.s3_bucket = input;
            self
        }
        /// <p>The file name of the disk image.</p>
        pub fn s3_key(mut self, input: impl Into<std::string::String>) -> Self {
            self.s3_key = Some(input.into());
            self
        }
        /// <p>The file name of the disk image.</p>
        pub fn set_s3_key(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.s3_key = input;
            self
        }
        /// Consumes the builder and constructs a [`UserBucketDetails`](crate::model::UserBucketDetails).
        pub fn build(self) -> crate::model::UserBucketDetails {
            crate::model::UserBucketDetails {
                s3_bucket: self.s3_bucket,
                s3_key: self.s3_key,
            }
        }
    }
}
impl UserBucketDetails {
    /// Creates a new builder-style object to manufacture [`UserBucketDetails`](crate::model::UserBucketDetails).
    pub fn builder() -> crate::model::user_bucket_details::Builder {
        crate::model::user_bucket_details::Builder::default()
    }
}

/// <p>The disk container object for the import snapshot request.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SnapshotDiskContainer {
    /// <p>The description of the disk image being imported.</p>
    #[doc(hidden)]
    pub description: std::option::Option<std::string::String>,
    /// <p>The format of the disk image being imported.</p>
    /// <p>Valid values: <code>VHD</code> | <code>VMDK</code> | <code>RAW</code> </p>
    #[doc(hidden)]
    pub format: std::option::Option<std::string::String>,
    /// <p>The URL to the Amazon S3-based disk image being imported. It can either be a https URL (https://..) or an Amazon S3 URL (s3://..).</p>
    #[doc(hidden)]
    pub url: std::option::Option<std::string::String>,
    /// <p>The Amazon S3 bucket for the disk image.</p>
    #[doc(hidden)]
    pub user_bucket: std::option::Option<crate::model::UserBucket>,
}
impl SnapshotDiskContainer {
    /// <p>The description of the disk image being imported.</p>
    pub fn description(&self) -> std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The format of the disk image being imported.</p>
    /// <p>Valid values: <code>VHD</code> | <code>VMDK</code> | <code>RAW</code> </p>
    pub fn format(&self) -> std::option::Option<&str> {
        self.format.as_deref()
    }
    /// <p>The URL to the Amazon S3-based disk image being imported. It can either be a https URL (https://..) or an Amazon S3 URL (s3://..).</p>
    pub fn url(&self) -> std::option::Option<&str> {
        self.url.as_deref()
    }
    /// <p>The Amazon S3 bucket for the disk image.</p>
    pub fn user_bucket(&self) -> std::option::Option<&crate::model::UserBucket> {
        self.user_bucket.as_ref()
    }
}
/// See [`SnapshotDiskContainer`](crate::model::SnapshotDiskContainer).
pub mod snapshot_disk_container {

    /// A builder for [`SnapshotDiskContainer`](crate::model::SnapshotDiskContainer).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) description: std::option::Option<std::string::String>,
        pub(crate) format: std::option::Option<std::string::String>,
        pub(crate) url: std::option::Option<std::string::String>,
        pub(crate) user_bucket: std::option::Option<crate::model::UserBucket>,
    }
    impl Builder {
        /// <p>The description of the disk image being imported.</p>
        pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
            self.description = Some(input.into());
            self
        }
        /// <p>The description of the disk image being imported.</p>
        pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.description = input;
            self
        }
        /// <p>The format of the disk image being imported.</p>
        /// <p>Valid values: <code>VHD</code> | <code>VMDK</code> | <code>RAW</code> </p>
        pub fn format(mut self, input: impl Into<std::string::String>) -> Self {
            self.format = Some(input.into());
            self
        }
        /// <p>The format of the disk image being imported.</p>
        /// <p>Valid values: <code>VHD</code> | <code>VMDK</code> | <code>RAW</code> </p>
        pub fn set_format(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.format = input;
            self
        }
        /// <p>The URL to the Amazon S3-based disk image being imported. It can either be a https URL (https://..) or an Amazon S3 URL (s3://..).</p>
        pub fn url(mut self, input: impl Into<std::string::String>) -> Self {
            self.url = Some(input.into());
            self
        }
        /// <p>The URL to the Amazon S3-based disk image being imported. It can either be a https URL (https://..) or an Amazon S3 URL (s3://..).</p>
        pub fn set_url(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.url = input;
            self
        }
        /// <p>The Amazon S3 bucket for the disk image.</p>
        pub fn user_bucket(mut self, input: crate::model::UserBucket) -> Self {
            self.user_bucket = Some(input);
            self
        }
        /// <p>The Amazon S3 bucket for the disk image.</p>
        pub fn set_user_bucket(
            mut self,
            input: std::option::Option<crate::model::UserBucket>,
        ) -> Self {
            self.user_bucket = input;
            self
        }
        /// Consumes the builder and constructs a [`SnapshotDiskContainer`](crate::model::SnapshotDiskContainer).
        pub fn build(self) -> crate::model::SnapshotDiskContainer {
            crate::model::SnapshotDiskContainer {
                description: self.description,
                format: self.format,
                url: self.url,
                user_bucket: self.user_bucket,
            }
        }
    }
}
impl SnapshotDiskContainer {
    /// Creates a new builder-style object to manufacture [`SnapshotDiskContainer`](crate::model::SnapshotDiskContainer).
    pub fn builder() -> crate::model::snapshot_disk_container::Builder {
        crate::model::snapshot_disk_container::Builder::default()
    }
}

/// <p>Describes the Amazon S3 bucket for the disk image.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UserBucket {
    /// <p>The name of the Amazon S3 bucket where the disk image is located.</p>
    #[doc(hidden)]
    pub s3_bucket: std::option::Option<std::string::String>,
    /// <p>The file name of the disk image.</p>
    #[doc(hidden)]
    pub s3_key: std::option::Option<std::string::String>,
}
impl UserBucket {
    /// <p>The name of the Amazon S3 bucket where the disk image is located.</p>
    pub fn s3_bucket(&self) -> std::option::Option<&str> {
        self.s3_bucket.as_deref()
    }
    /// <p>The file name of the disk image.</p>
    pub fn s3_key(&self) -> std::option::Option<&str> {
        self.s3_key.as_deref()
    }
}
/// See [`UserBucket`](crate::model::UserBucket).
pub mod user_bucket {

    /// A builder for [`UserBucket`](crate::model::UserBucket).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) s3_bucket: std::option::Option<std::string::String>,
        pub(crate) s3_key: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The name of the Amazon S3 bucket where the disk image is located.</p>
        pub fn s3_bucket(mut self, input: impl Into<std::string::String>) -> Self {
            self.s3_bucket = Some(input.into());
            self
        }
        /// <p>The name of the Amazon S3 bucket where the disk image is located.</p>
        pub fn set_s3_bucket(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.s3_bucket = input;
            self
        }
        /// <p>The file name of the disk image.</p>
        pub fn s3_key(mut self, input: impl Into<std::string::String>) -> Self {
            self.s3_key = Some(input.into());
            self
        }
        /// <p>The file name of the disk image.</p>
        pub fn set_s3_key(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.s3_key = input;
            self
        }
        /// Consumes the builder and constructs a [`UserBucket`](crate::model::UserBucket).
        pub fn build(self) -> crate::model::UserBucket {
            crate::model::UserBucket {
                s3_bucket: self.s3_bucket,
                s3_key: self.s3_key,
            }
        }
    }
}
impl UserBucket {
    /// Creates a new builder-style object to manufacture [`UserBucket`](crate::model::UserBucket).
    pub fn builder() -> crate::model::user_bucket::Builder {
        crate::model::user_bucket::Builder::default()
    }
}

/// <p>Describes the client-specific data.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ClientData {
    /// <p>A user-defined comment about the disk upload.</p>
    #[doc(hidden)]
    pub comment: std::option::Option<std::string::String>,
    /// <p>The time that the disk upload ends.</p>
    #[doc(hidden)]
    pub upload_end: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The size of the uploaded disk image, in GiB.</p>
    #[doc(hidden)]
    pub upload_size: std::option::Option<f64>,
    /// <p>The time that the disk upload starts.</p>
    #[doc(hidden)]
    pub upload_start: std::option::Option<aws_smithy_types::DateTime>,
}
impl ClientData {
    /// <p>A user-defined comment about the disk upload.</p>
    pub fn comment(&self) -> std::option::Option<&str> {
        self.comment.as_deref()
    }
    /// <p>The time that the disk upload ends.</p>
    pub fn upload_end(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.upload_end.as_ref()
    }
    /// <p>The size of the uploaded disk image, in GiB.</p>
    pub fn upload_size(&self) -> std::option::Option<f64> {
        self.upload_size
    }
    /// <p>The time that the disk upload starts.</p>
    pub fn upload_start(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.upload_start.as_ref()
    }
}
/// See [`ClientData`](crate::model::ClientData).
pub mod client_data {

    /// A builder for [`ClientData`](crate::model::ClientData).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) comment: std::option::Option<std::string::String>,
        pub(crate) upload_end: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) upload_size: std::option::Option<f64>,
        pub(crate) upload_start: std::option::Option<aws_smithy_types::DateTime>,
    }
    impl Builder {
        /// <p>A user-defined comment about the disk upload.</p>
        pub fn comment(mut self, input: impl Into<std::string::String>) -> Self {
            self.comment = Some(input.into());
            self
        }
        /// <p>A user-defined comment about the disk upload.</p>
        pub fn set_comment(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.comment = input;
            self
        }
        /// <p>The time that the disk upload ends.</p>
        pub fn upload_end(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.upload_end = Some(input);
            self
        }
        /// <p>The time that the disk upload ends.</p>
        pub fn set_upload_end(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.upload_end = input;
            self
        }
        /// <p>The size of the uploaded disk image, in GiB.</p>
        pub fn upload_size(mut self, input: f64) -> Self {
            self.upload_size = Some(input);
            self
        }
        /// <p>The size of the uploaded disk image, in GiB.</p>
        pub fn set_upload_size(mut self, input: std::option::Option<f64>) -> Self {
            self.upload_size = input;
            self
        }
        /// <p>The time that the disk upload starts.</p>
        pub fn upload_start(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.upload_start = Some(input);
            self
        }
        /// <p>The time that the disk upload starts.</p>
        pub fn set_upload_start(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.upload_start = input;
            self
        }
        /// Consumes the builder and constructs a [`ClientData`](crate::model::ClientData).
        pub fn build(self) -> crate::model::ClientData {
            crate::model::ClientData {
                comment: self.comment,
                upload_end: self.upload_end,
                upload_size: self.upload_size,
                upload_start: self.upload_start,
            }
        }
    }
}
impl ClientData {
    /// Creates a new builder-style object to manufacture [`ClientData`](crate::model::ClientData).
    pub fn builder() -> crate::model::client_data::Builder {
        crate::model::client_data::Builder::default()
    }
}

/// <p>Describes the launch specification for VM import.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ImportInstanceLaunchSpecification {
    /// <p>Reserved.</p>
    #[doc(hidden)]
    pub additional_info: std::option::Option<std::string::String>,
    /// <p>The architecture of the instance.</p>
    #[doc(hidden)]
    pub architecture: std::option::Option<crate::model::ArchitectureValues>,
    /// <p>The security group IDs.</p>
    #[doc(hidden)]
    pub group_ids: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>The security group names.</p>
    #[doc(hidden)]
    pub group_names: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).</p>
    #[doc(hidden)]
    pub instance_initiated_shutdown_behavior: std::option::Option<crate::model::ShutdownBehavior>,
    /// <p>The instance type. For more information about the instance types that you can import, see <a href="https://docs.aws.amazon.com/vm-import/latest/userguide/vmie_prereqs.html#vmimport-instance-types">Instance Types</a> in the VM Import/Export User Guide.</p>
    #[doc(hidden)]
    pub instance_type: std::option::Option<crate::model::InstanceType>,
    /// <p>Indicates whether monitoring is enabled.</p>
    #[doc(hidden)]
    pub monitoring: std::option::Option<bool>,
    /// <p>The placement information for the instance.</p>
    #[doc(hidden)]
    pub placement: std::option::Option<crate::model::Placement>,
    /// <p>[EC2-VPC] An available IP address from the IP address range of the subnet.</p>
    #[doc(hidden)]
    pub private_ip_address: std::option::Option<std::string::String>,
    /// <p>[EC2-VPC] The ID of the subnet in which to launch the instance.</p>
    #[doc(hidden)]
    pub subnet_id: std::option::Option<std::string::String>,
    /// <p>The Base64-encoded user data to make available to the instance.</p>
    #[doc(hidden)]
    pub user_data: std::option::Option<crate::model::UserData>,
}
impl ImportInstanceLaunchSpecification {
    /// <p>Reserved.</p>
    pub fn additional_info(&self) -> std::option::Option<&str> {
        self.additional_info.as_deref()
    }
    /// <p>The architecture of the instance.</p>
    pub fn architecture(&self) -> std::option::Option<&crate::model::ArchitectureValues> {
        self.architecture.as_ref()
    }
    /// <p>The security group IDs.</p>
    pub fn group_ids(&self) -> std::option::Option<&[std::string::String]> {
        self.group_ids.as_deref()
    }
    /// <p>The security group names.</p>
    pub fn group_names(&self) -> std::option::Option<&[std::string::String]> {
        self.group_names.as_deref()
    }
    /// <p>Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).</p>
    pub fn instance_initiated_shutdown_behavior(
        &self,
    ) -> std::option::Option<&crate::model::ShutdownBehavior> {
        self.instance_initiated_shutdown_behavior.as_ref()
    }
    /// <p>The instance type. For more information about the instance types that you can import, see <a href="https://docs.aws.amazon.com/vm-import/latest/userguide/vmie_prereqs.html#vmimport-instance-types">Instance Types</a> in the VM Import/Export User Guide.</p>
    pub fn instance_type(&self) -> std::option::Option<&crate::model::InstanceType> {
        self.instance_type.as_ref()
    }
    /// <p>Indicates whether monitoring is enabled.</p>
    pub fn monitoring(&self) -> std::option::Option<bool> {
        self.monitoring
    }
    /// <p>The placement information for the instance.</p>
    pub fn placement(&self) -> std::option::Option<&crate::model::Placement> {
        self.placement.as_ref()
    }
    /// <p>[EC2-VPC] An available IP address from the IP address range of the subnet.</p>
    pub fn private_ip_address(&self) -> std::option::Option<&str> {
        self.private_ip_address.as_deref()
    }
    /// <p>[EC2-VPC] The ID of the subnet in which to launch the instance.</p>
    pub fn subnet_id(&self) -> std::option::Option<&str> {
        self.subnet_id.as_deref()
    }
    /// <p>The Base64-encoded user data to make available to the instance.</p>
    pub fn user_data(&self) -> std::option::Option<&crate::model::UserData> {
        self.user_data.as_ref()
    }
}
impl std::fmt::Debug for ImportInstanceLaunchSpecification {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("ImportInstanceLaunchSpecification");
        formatter.field("additional_info", &self.additional_info);
        formatter.field("architecture", &self.architecture);
        formatter.field("group_ids", &self.group_ids);
        formatter.field("group_names", &self.group_names);
        formatter.field(
            "instance_initiated_shutdown_behavior",
            &self.instance_initiated_shutdown_behavior,
        );
        formatter.field("instance_type", &self.instance_type);
        formatter.field("monitoring", &self.monitoring);
        formatter.field("placement", &self.placement);
        formatter.field("private_ip_address", &self.private_ip_address);
        formatter.field("subnet_id", &self.subnet_id);
        formatter.field("user_data", &"*** Sensitive Data Redacted ***");
        formatter.finish()
    }
}
/// See [`ImportInstanceLaunchSpecification`](crate::model::ImportInstanceLaunchSpecification).
pub mod import_instance_launch_specification {

    /// A builder for [`ImportInstanceLaunchSpecification`](crate::model::ImportInstanceLaunchSpecification).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default)]
    pub struct Builder {
        pub(crate) additional_info: std::option::Option<std::string::String>,
        pub(crate) architecture: std::option::Option<crate::model::ArchitectureValues>,
        pub(crate) group_ids: std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) group_names: std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) instance_initiated_shutdown_behavior:
            std::option::Option<crate::model::ShutdownBehavior>,
        pub(crate) instance_type: std::option::Option<crate::model::InstanceType>,
        pub(crate) monitoring: std::option::Option<bool>,
        pub(crate) placement: std::option::Option<crate::model::Placement>,
        pub(crate) private_ip_address: std::option::Option<std::string::String>,
        pub(crate) subnet_id: std::option::Option<std::string::String>,
        pub(crate) user_data: std::option::Option<crate::model::UserData>,
    }
    impl Builder {
        /// <p>Reserved.</p>
        pub fn additional_info(mut self, input: impl Into<std::string::String>) -> Self {
            self.additional_info = Some(input.into());
            self
        }
        /// <p>Reserved.</p>
        pub fn set_additional_info(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.additional_info = input;
            self
        }
        /// <p>The architecture of the instance.</p>
        pub fn architecture(mut self, input: crate::model::ArchitectureValues) -> Self {
            self.architecture = Some(input);
            self
        }
        /// <p>The architecture of the instance.</p>
        pub fn set_architecture(
            mut self,
            input: std::option::Option<crate::model::ArchitectureValues>,
        ) -> Self {
            self.architecture = input;
            self
        }
        /// Appends an item to `group_ids`.
        ///
        /// To override the contents of this collection use [`set_group_ids`](Self::set_group_ids).
        ///
        /// <p>The security group IDs.</p>
        pub fn group_ids(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.group_ids.unwrap_or_default();
            v.push(input.into());
            self.group_ids = Some(v);
            self
        }
        /// <p>The security group IDs.</p>
        pub fn set_group_ids(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.group_ids = input;
            self
        }
        /// Appends an item to `group_names`.
        ///
        /// To override the contents of this collection use [`set_group_names`](Self::set_group_names).
        ///
        /// <p>The security group names.</p>
        pub fn group_names(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.group_names.unwrap_or_default();
            v.push(input.into());
            self.group_names = Some(v);
            self
        }
        /// <p>The security group names.</p>
        pub fn set_group_names(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.group_names = input;
            self
        }
        /// <p>Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).</p>
        pub fn instance_initiated_shutdown_behavior(
            mut self,
            input: crate::model::ShutdownBehavior,
        ) -> Self {
            self.instance_initiated_shutdown_behavior = Some(input);
            self
        }
        /// <p>Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).</p>
        pub fn set_instance_initiated_shutdown_behavior(
            mut self,
            input: std::option::Option<crate::model::ShutdownBehavior>,
        ) -> Self {
            self.instance_initiated_shutdown_behavior = input;
            self
        }
        /// <p>The instance type. For more information about the instance types that you can import, see <a href="https://docs.aws.amazon.com/vm-import/latest/userguide/vmie_prereqs.html#vmimport-instance-types">Instance Types</a> in the VM Import/Export User Guide.</p>
        pub fn instance_type(mut self, input: crate::model::InstanceType) -> Self {
            self.instance_type = Some(input);
            self
        }
        /// <p>The instance type. For more information about the instance types that you can import, see <a href="https://docs.aws.amazon.com/vm-import/latest/userguide/vmie_prereqs.html#vmimport-instance-types">Instance Types</a> in the VM Import/Export User Guide.</p>
        pub fn set_instance_type(
            mut self,
            input: std::option::Option<crate::model::InstanceType>,
        ) -> Self {
            self.instance_type = input;
            self
        }
        /// <p>Indicates whether monitoring is enabled.</p>
        pub fn monitoring(mut self, input: bool) -> Self {
            self.monitoring = Some(input);
            self
        }
        /// <p>Indicates whether monitoring is enabled.</p>
        pub fn set_monitoring(mut self, input: std::option::Option<bool>) -> Self {
            self.monitoring = input;
            self
        }
        /// <p>The placement information for the instance.</p>
        pub fn placement(mut self, input: crate::model::Placement) -> Self {
            self.placement = Some(input);
            self
        }
        /// <p>The placement information for the instance.</p>
        pub fn set_placement(
            mut self,
            input: std::option::Option<crate::model::Placement>,
        ) -> Self {
            self.placement = input;
            self
        }
        /// <p>[EC2-VPC] An available IP address from the IP address range of the subnet.</p>
        pub fn private_ip_address(mut self, input: impl Into<std::string::String>) -> Self {
            self.private_ip_address = Some(input.into());
            self
        }
        /// <p>[EC2-VPC] An available IP address from the IP address range of the subnet.</p>
        pub fn set_private_ip_address(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.private_ip_address = input;
            self
        }
        /// <p>[EC2-VPC] The ID of the subnet in which to launch the instance.</p>
        pub fn subnet_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.subnet_id = Some(input.into());
            self
        }
        /// <p>[EC2-VPC] The ID of the subnet in which to launch the instance.</p>
        pub fn set_subnet_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.subnet_id = input;
            self
        }
        /// <p>The Base64-encoded user data to make available to the instance.</p>
        pub fn user_data(mut self, input: crate::model::UserData) -> Self {
            self.user_data = Some(input);
            self
        }
        /// <p>The Base64-encoded user data to make available to the instance.</p>
        pub fn set_user_data(mut self, input: std::option::Option<crate::model::UserData>) -> Self {
            self.user_data = input;
            self
        }
        /// Consumes the builder and constructs a [`ImportInstanceLaunchSpecification`](crate::model::ImportInstanceLaunchSpecification).
        pub fn build(self) -> crate::model::ImportInstanceLaunchSpecification {
            crate::model::ImportInstanceLaunchSpecification {
                additional_info: self.additional_info,
                architecture: self.architecture,
                group_ids: self.group_ids,
                group_names: self.group_names,
                instance_initiated_shutdown_behavior: self.instance_initiated_shutdown_behavior,
                instance_type: self.instance_type,
                monitoring: self.monitoring,
                placement: self.placement,
                private_ip_address: self.private_ip_address,
                subnet_id: self.subnet_id,
                user_data: self.user_data,
            }
        }
    }
    impl std::fmt::Debug for Builder {
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
            let mut formatter = f.debug_struct("Builder");
            formatter.field("additional_info", &self.additional_info);
            formatter.field("architecture", &self.architecture);
            formatter.field("group_ids", &self.group_ids);
            formatter.field("group_names", &self.group_names);
            formatter.field(
                "instance_initiated_shutdown_behavior",
                &self.instance_initiated_shutdown_behavior,
            );
            formatter.field("instance_type", &self.instance_type);
            formatter.field("monitoring", &self.monitoring);
            formatter.field("placement", &self.placement);
            formatter.field("private_ip_address", &self.private_ip_address);
            formatter.field("subnet_id", &self.subnet_id);
            formatter.field("user_data", &"*** Sensitive Data Redacted ***");
            formatter.finish()
        }
    }
}
impl ImportInstanceLaunchSpecification {
    /// Creates a new builder-style object to manufacture [`ImportInstanceLaunchSpecification`](crate::model::ImportInstanceLaunchSpecification).
    pub fn builder() -> crate::model::import_instance_launch_specification::Builder {
        crate::model::import_instance_launch_specification::Builder::default()
    }
}

/// <p>Describes the user data for an instance.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UserData {
    /// <p>The user data. If you are using an Amazon Web Services SDK or command line tool, Base64-encoding is performed for you, and you can load the text from a file. Otherwise, you must provide Base64-encoded text.</p>
    #[doc(hidden)]
    pub data: std::option::Option<std::string::String>,
}
impl UserData {
    /// <p>The user data. If you are using an Amazon Web Services SDK or command line tool, Base64-encoding is performed for you, and you can load the text from a file. Otherwise, you must provide Base64-encoded text.</p>
    pub fn data(&self) -> std::option::Option<&str> {
        self.data.as_deref()
    }
}
impl std::fmt::Debug for UserData {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("UserData");
        formatter.field("data", &"*** Sensitive Data Redacted ***");
        formatter.finish()
    }
}
/// See [`UserData`](crate::model::UserData).
pub mod user_data {

    /// A builder for [`UserData`](crate::model::UserData).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default)]
    pub struct Builder {
        pub(crate) data: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The user data. If you are using an Amazon Web Services SDK or command line tool, Base64-encoding is performed for you, and you can load the text from a file. Otherwise, you must provide Base64-encoded text.</p>
        pub fn data(mut self, input: impl Into<std::string::String>) -> Self {
            self.data = Some(input.into());
            self
        }
        /// <p>The user data. If you are using an Amazon Web Services SDK or command line tool, Base64-encoding is performed for you, and you can load the text from a file. Otherwise, you must provide Base64-encoded text.</p>
        pub fn set_data(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.data = input;
            self
        }
        /// Consumes the builder and constructs a [`UserData`](crate::model::UserData).
        pub fn build(self) -> crate::model::UserData {
            crate::model::UserData { data: self.data }
        }
    }
    impl std::fmt::Debug for Builder {
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
            let mut formatter = f.debug_struct("Builder");
            formatter.field("data", &"*** Sensitive Data Redacted ***");
            formatter.finish()
        }
    }
}
impl UserData {
    /// Creates a new builder-style object to manufacture [`UserData`](crate::model::UserData).
    pub fn builder() -> crate::model::user_data::Builder {
        crate::model::user_data::Builder::default()
    }
}

/// <p>Describes a disk image.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DiskImage {
    /// <p>A description of the disk image.</p>
    #[doc(hidden)]
    pub description: std::option::Option<std::string::String>,
    /// <p>Information about the disk image.</p>
    #[doc(hidden)]
    pub image: std::option::Option<crate::model::DiskImageDetail>,
    /// <p>Information about the volume.</p>
    #[doc(hidden)]
    pub volume: std::option::Option<crate::model::VolumeDetail>,
}
impl DiskImage {
    /// <p>A description of the disk image.</p>
    pub fn description(&self) -> std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>Information about the disk image.</p>
    pub fn image(&self) -> std::option::Option<&crate::model::DiskImageDetail> {
        self.image.as_ref()
    }
    /// <p>Information about the volume.</p>
    pub fn volume(&self) -> std::option::Option<&crate::model::VolumeDetail> {
        self.volume.as_ref()
    }
}
/// See [`DiskImage`](crate::model::DiskImage).
pub mod disk_image {

    /// A builder for [`DiskImage`](crate::model::DiskImage).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) description: std::option::Option<std::string::String>,
        pub(crate) image: std::option::Option<crate::model::DiskImageDetail>,
        pub(crate) volume: std::option::Option<crate::model::VolumeDetail>,
    }
    impl Builder {
        /// <p>A description of the disk image.</p>
        pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
            self.description = Some(input.into());
            self
        }
        /// <p>A description of the disk image.</p>
        pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.description = input;
            self
        }
        /// <p>Information about the disk image.</p>
        pub fn image(mut self, input: crate::model::DiskImageDetail) -> Self {
            self.image = Some(input);
            self
        }
        /// <p>Information about the disk image.</p>
        pub fn set_image(
            mut self,
            input: std::option::Option<crate::model::DiskImageDetail>,
        ) -> Self {
            self.image = input;
            self
        }
        /// <p>Information about the volume.</p>
        pub fn volume(mut self, input: crate::model::VolumeDetail) -> Self {
            self.volume = Some(input);
            self
        }
        /// <p>Information about the volume.</p>
        pub fn set_volume(
            mut self,
            input: std::option::Option<crate::model::VolumeDetail>,
        ) -> Self {
            self.volume = input;
            self
        }
        /// Consumes the builder and constructs a [`DiskImage`](crate::model::DiskImage).
        pub fn build(self) -> crate::model::DiskImage {
            crate::model::DiskImage {
                description: self.description,
                image: self.image,
                volume: self.volume,
            }
        }
    }
}
impl DiskImage {
    /// Creates a new builder-style object to manufacture [`DiskImage`](crate::model::DiskImage).
    pub fn builder() -> crate::model::disk_image::Builder {
        crate::model::disk_image::Builder::default()
    }
}

/// <p> The response information for license configurations.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ImportImageLicenseConfigurationResponse {
    /// <p>The ARN of a license configuration.</p>
    #[doc(hidden)]
    pub license_configuration_arn: std::option::Option<std::string::String>,
}
impl ImportImageLicenseConfigurationResponse {
    /// <p>The ARN of a license configuration.</p>
    pub fn license_configuration_arn(&self) -> std::option::Option<&str> {
        self.license_configuration_arn.as_deref()
    }
}
/// See [`ImportImageLicenseConfigurationResponse`](crate::model::ImportImageLicenseConfigurationResponse).
pub mod import_image_license_configuration_response {

    /// A builder for [`ImportImageLicenseConfigurationResponse`](crate::model::ImportImageLicenseConfigurationResponse).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) license_configuration_arn: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The ARN of a license configuration.</p>
        pub fn license_configuration_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.license_configuration_arn = Some(input.into());
            self
        }
        /// <p>The ARN of a license configuration.</p>
        pub fn set_license_configuration_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.license_configuration_arn = input;
            self
        }
        /// Consumes the builder and constructs a [`ImportImageLicenseConfigurationResponse`](crate::model::ImportImageLicenseConfigurationResponse).
        pub fn build(self) -> crate::model::ImportImageLicenseConfigurationResponse {
            crate::model::ImportImageLicenseConfigurationResponse {
                license_configuration_arn: self.license_configuration_arn,
            }
        }
    }
}
impl ImportImageLicenseConfigurationResponse {
    /// Creates a new builder-style object to manufacture [`ImportImageLicenseConfigurationResponse`](crate::model::ImportImageLicenseConfigurationResponse).
    pub fn builder() -> crate::model::import_image_license_configuration_response::Builder {
        crate::model::import_image_license_configuration_response::Builder::default()
    }
}

/// <p>Describes the snapshot created from the imported disk.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SnapshotDetail {
    /// <p>A description for the snapshot.</p>
    #[doc(hidden)]
    pub description: std::option::Option<std::string::String>,
    /// <p>The block device mapping for the snapshot.</p>
    #[doc(hidden)]
    pub device_name: std::option::Option<std::string::String>,
    /// <p>The size of the disk in the snapshot, in GiB.</p>
    #[doc(hidden)]
    pub disk_image_size: std::option::Option<f64>,
    /// <p>The format of the disk image from which the snapshot is created.</p>
    #[doc(hidden)]
    pub format: std::option::Option<std::string::String>,
    /// <p>The percentage of progress for the task.</p>
    #[doc(hidden)]
    pub progress: std::option::Option<std::string::String>,
    /// <p>The snapshot ID of the disk being imported.</p>
    #[doc(hidden)]
    pub snapshot_id: std::option::Option<std::string::String>,
    /// <p>A brief status of the snapshot creation.</p>
    #[doc(hidden)]
    pub status: std::option::Option<std::string::String>,
    /// <p>A detailed status message for the snapshot creation.</p>
    #[doc(hidden)]
    pub status_message: std::option::Option<std::string::String>,
    /// <p>The URL used to access the disk image.</p>
    #[doc(hidden)]
    pub url: std::option::Option<std::string::String>,
    /// <p>The Amazon S3 bucket for the disk image.</p>
    #[doc(hidden)]
    pub user_bucket: std::option::Option<crate::model::UserBucketDetails>,
}
impl SnapshotDetail {
    /// <p>A description for the snapshot.</p>
    pub fn description(&self) -> std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The block device mapping for the snapshot.</p>
    pub fn device_name(&self) -> std::option::Option<&str> {
        self.device_name.as_deref()
    }
    /// <p>The size of the disk in the snapshot, in GiB.</p>
    pub fn disk_image_size(&self) -> std::option::Option<f64> {
        self.disk_image_size
    }
    /// <p>The format of the disk image from which the snapshot is created.</p>
    pub fn format(&self) -> std::option::Option<&str> {
        self.format.as_deref()
    }
    /// <p>The percentage of progress for the task.</p>
    pub fn progress(&self) -> std::option::Option<&str> {
        self.progress.as_deref()
    }
    /// <p>The snapshot ID of the disk being imported.</p>
    pub fn snapshot_id(&self) -> std::option::Option<&str> {
        self.snapshot_id.as_deref()
    }
    /// <p>A brief status of the snapshot creation.</p>
    pub fn status(&self) -> std::option::Option<&str> {
        self.status.as_deref()
    }
    /// <p>A detailed status message for the snapshot creation.</p>
    pub fn status_message(&self) -> std::option::Option<&str> {
        self.status_message.as_deref()
    }
    /// <p>The URL used to access the disk image.</p>
    pub fn url(&self) -> std::option::Option<&str> {
        self.url.as_deref()
    }
    /// <p>The Amazon S3 bucket for the disk image.</p>
    pub fn user_bucket(&self) -> std::option::Option<&crate::model::UserBucketDetails> {
        self.user_bucket.as_ref()
    }
}
/// See [`SnapshotDetail`](crate::model::SnapshotDetail).
pub mod snapshot_detail {

    /// A builder for [`SnapshotDetail`](crate::model::SnapshotDetail).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) description: std::option::Option<std::string::String>,
        pub(crate) device_name: std::option::Option<std::string::String>,
        pub(crate) disk_image_size: std::option::Option<f64>,
        pub(crate) format: std::option::Option<std::string::String>,
        pub(crate) progress: std::option::Option<std::string::String>,
        pub(crate) snapshot_id: std::option::Option<std::string::String>,
        pub(crate) status: std::option::Option<std::string::String>,
        pub(crate) status_message: std::option::Option<std::string::String>,
        pub(crate) url: std::option::Option<std::string::String>,
        pub(crate) user_bucket: std::option::Option<crate::model::UserBucketDetails>,
    }
    impl Builder {
        /// <p>A description for the snapshot.</p>
        pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
            self.description = Some(input.into());
            self
        }
        /// <p>A description for the snapshot.</p>
        pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.description = input;
            self
        }
        /// <p>The block device mapping for the snapshot.</p>
        pub fn device_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.device_name = Some(input.into());
            self
        }
        /// <p>The block device mapping for the snapshot.</p>
        pub fn set_device_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.device_name = input;
            self
        }
        /// <p>The size of the disk in the snapshot, in GiB.</p>
        pub fn disk_image_size(mut self, input: f64) -> Self {
            self.disk_image_size = Some(input);
            self
        }
        /// <p>The size of the disk in the snapshot, in GiB.</p>
        pub fn set_disk_image_size(mut self, input: std::option::Option<f64>) -> Self {
            self.disk_image_size = input;
            self
        }
        /// <p>The format of the disk image from which the snapshot is created.</p>
        pub fn format(mut self, input: impl Into<std::string::String>) -> Self {
            self.format = Some(input.into());
            self
        }
        /// <p>The format of the disk image from which the snapshot is created.</p>
        pub fn set_format(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.format = input;
            self
        }
        /// <p>The percentage of progress for the task.</p>
        pub fn progress(mut self, input: impl Into<std::string::String>) -> Self {
            self.progress = Some(input.into());
            self
        }
        /// <p>The percentage of progress for the task.</p>
        pub fn set_progress(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.progress = input;
            self
        }
        /// <p>The snapshot ID of the disk being imported.</p>
        pub fn snapshot_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.snapshot_id = Some(input.into());
            self
        }
        /// <p>The snapshot ID of the disk being imported.</p>
        pub fn set_snapshot_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.snapshot_id = input;
            self
        }
        /// <p>A brief status of the snapshot creation.</p>
        pub fn status(mut self, input: impl Into<std::string::String>) -> Self {
            self.status = Some(input.into());
            self
        }
        /// <p>A brief status of the snapshot creation.</p>
        pub fn set_status(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.status = input;
            self
        }
        /// <p>A detailed status message for the snapshot creation.</p>
        pub fn status_message(mut self, input: impl Into<std::string::String>) -> Self {
            self.status_message = Some(input.into());
            self
        }
        /// <p>A detailed status message for the snapshot creation.</p>
        pub fn set_status_message(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.status_message = input;
            self
        }
        /// <p>The URL used to access the disk image.</p>
        pub fn url(mut self, input: impl Into<std::string::String>) -> Self {
            self.url = Some(input.into());
            self
        }
        /// <p>The URL used to access the disk image.</p>
        pub fn set_url(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.url = input;
            self
        }
        /// <p>The Amazon S3 bucket for the disk image.</p>
        pub fn user_bucket(mut self, input: crate::model::UserBucketDetails) -> Self {
            self.user_bucket = Some(input);
            self
        }
        /// <p>The Amazon S3 bucket for the disk image.</p>
        pub fn set_user_bucket(
            mut self,
            input: std::option::Option<crate::model::UserBucketDetails>,
        ) -> Self {
            self.user_bucket = input;
            self
        }
        /// Consumes the builder and constructs a [`SnapshotDetail`](crate::model::SnapshotDetail).
        pub fn build(self) -> crate::model::SnapshotDetail {
            crate::model::SnapshotDetail {
                description: self.description,
                device_name: self.device_name,
                disk_image_size: self.disk_image_size,
                format: self.format,
                progress: self.progress,
                snapshot_id: self.snapshot_id,
                status: self.status,
                status_message: self.status_message,
                url: self.url,
                user_bucket: self.user_bucket,
            }
        }
    }
}
impl SnapshotDetail {
    /// Creates a new builder-style object to manufacture [`SnapshotDetail`](crate::model::SnapshotDetail).
    pub fn builder() -> crate::model::snapshot_detail::Builder {
        crate::model::snapshot_detail::Builder::default()
    }
}

/// <p>The request information of license configurations.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ImportImageLicenseConfigurationRequest {
    /// <p>The ARN of a license configuration.</p>
    #[doc(hidden)]
    pub license_configuration_arn: std::option::Option<std::string::String>,
}
impl ImportImageLicenseConfigurationRequest {
    /// <p>The ARN of a license configuration.</p>
    pub fn license_configuration_arn(&self) -> std::option::Option<&str> {
        self.license_configuration_arn.as_deref()
    }
}
/// See [`ImportImageLicenseConfigurationRequest`](crate::model::ImportImageLicenseConfigurationRequest).
pub mod import_image_license_configuration_request {

    /// A builder for [`ImportImageLicenseConfigurationRequest`](crate::model::ImportImageLicenseConfigurationRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) license_configuration_arn: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The ARN of a license configuration.</p>
        pub fn license_configuration_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.license_configuration_arn = Some(input.into());
            self
        }
        /// <p>The ARN of a license configuration.</p>
        pub fn set_license_configuration_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.license_configuration_arn = input;
            self
        }
        /// Consumes the builder and constructs a [`ImportImageLicenseConfigurationRequest`](crate::model::ImportImageLicenseConfigurationRequest).
        pub fn build(self) -> crate::model::ImportImageLicenseConfigurationRequest {
            crate::model::ImportImageLicenseConfigurationRequest {
                license_configuration_arn: self.license_configuration_arn,
            }
        }
    }
}
impl ImportImageLicenseConfigurationRequest {
    /// Creates a new builder-style object to manufacture [`ImportImageLicenseConfigurationRequest`](crate::model::ImportImageLicenseConfigurationRequest).
    pub fn builder() -> crate::model::import_image_license_configuration_request::Builder {
        crate::model::import_image_license_configuration_request::Builder::default()
    }
}

/// <p>Describes the disk container object for an import image task.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ImageDiskContainer {
    /// <p>The description of the disk image.</p>
    #[doc(hidden)]
    pub description: std::option::Option<std::string::String>,
    /// <p>The block device mapping for the disk.</p>
    #[doc(hidden)]
    pub device_name: std::option::Option<std::string::String>,
    /// <p>The format of the disk image being imported.</p>
    /// <p>Valid values: <code>OVA</code> | <code>VHD</code> | <code>VHDX</code> | <code>VMDK</code> | <code>RAW</code> </p>
    #[doc(hidden)]
    pub format: std::option::Option<std::string::String>,
    /// <p>The ID of the EBS snapshot to be used for importing the snapshot.</p>
    #[doc(hidden)]
    pub snapshot_id: std::option::Option<std::string::String>,
    /// <p>The URL to the Amazon S3-based disk image being imported. The URL can either be a https URL (https://..) or an Amazon S3 URL (s3://..)</p>
    #[doc(hidden)]
    pub url: std::option::Option<std::string::String>,
    /// <p>The S3 bucket for the disk image.</p>
    #[doc(hidden)]
    pub user_bucket: std::option::Option<crate::model::UserBucket>,
}
impl ImageDiskContainer {
    /// <p>The description of the disk image.</p>
    pub fn description(&self) -> std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The block device mapping for the disk.</p>
    pub fn device_name(&self) -> std::option::Option<&str> {
        self.device_name.as_deref()
    }
    /// <p>The format of the disk image being imported.</p>
    /// <p>Valid values: <code>OVA</code> | <code>VHD</code> | <code>VHDX</code> | <code>VMDK</code> | <code>RAW</code> </p>
    pub fn format(&self) -> std::option::Option<&str> {
        self.format.as_deref()
    }
    /// <p>The ID of the EBS snapshot to be used for importing the snapshot.</p>
    pub fn snapshot_id(&self) -> std::option::Option<&str> {
        self.snapshot_id.as_deref()
    }
    /// <p>The URL to the Amazon S3-based disk image being imported. The URL can either be a https URL (https://..) or an Amazon S3 URL (s3://..)</p>
    pub fn url(&self) -> std::option::Option<&str> {
        self.url.as_deref()
    }
    /// <p>The S3 bucket for the disk image.</p>
    pub fn user_bucket(&self) -> std::option::Option<&crate::model::UserBucket> {
        self.user_bucket.as_ref()
    }
}
/// See [`ImageDiskContainer`](crate::model::ImageDiskContainer).
pub mod image_disk_container {

    /// A builder for [`ImageDiskContainer`](crate::model::ImageDiskContainer).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) description: std::option::Option<std::string::String>,
        pub(crate) device_name: std::option::Option<std::string::String>,
        pub(crate) format: std::option::Option<std::string::String>,
        pub(crate) snapshot_id: std::option::Option<std::string::String>,
        pub(crate) url: std::option::Option<std::string::String>,
        pub(crate) user_bucket: std::option::Option<crate::model::UserBucket>,
    }
    impl Builder {
        /// <p>The description of the disk image.</p>
        pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
            self.description = Some(input.into());
            self
        }
        /// <p>The description of the disk image.</p>
        pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.description = input;
            self
        }
        /// <p>The block device mapping for the disk.</p>
        pub fn device_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.device_name = Some(input.into());
            self
        }
        /// <p>The block device mapping for the disk.</p>
        pub fn set_device_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.device_name = input;
            self
        }
        /// <p>The format of the disk image being imported.</p>
        /// <p>Valid values: <code>OVA</code> | <code>VHD</code> | <code>VHDX</code> | <code>VMDK</code> | <code>RAW</code> </p>
        pub fn format(mut self, input: impl Into<std::string::String>) -> Self {
            self.format = Some(input.into());
            self
        }
        /// <p>The format of the disk image being imported.</p>
        /// <p>Valid values: <code>OVA</code> | <code>VHD</code> | <code>VHDX</code> | <code>VMDK</code> | <code>RAW</code> </p>
        pub fn set_format(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.format = input;
            self
        }
        /// <p>The ID of the EBS snapshot to be used for importing the snapshot.</p>
        pub fn snapshot_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.snapshot_id = Some(input.into());
            self
        }
        /// <p>The ID of the EBS snapshot to be used for importing the snapshot.</p>
        pub fn set_snapshot_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.snapshot_id = input;
            self
        }
        /// <p>The URL to the Amazon S3-based disk image being imported. The URL can either be a https URL (https://..) or an Amazon S3 URL (s3://..)</p>
        pub fn url(mut self, input: impl Into<std::string::String>) -> Self {
            self.url = Some(input.into());
            self
        }
        /// <p>The URL to the Amazon S3-based disk image being imported. The URL can either be a https URL (https://..) or an Amazon S3 URL (s3://..)</p>
        pub fn set_url(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.url = input;
            self
        }
        /// <p>The S3 bucket for the disk image.</p>
        pub fn user_bucket(mut self, input: crate::model::UserBucket) -> Self {
            self.user_bucket = Some(input);
            self
        }
        /// <p>The S3 bucket for the disk image.</p>
        pub fn set_user_bucket(
            mut self,
            input: std::option::Option<crate::model::UserBucket>,
        ) -> Self {
            self.user_bucket = input;
            self
        }
        /// Consumes the builder and constructs a [`ImageDiskContainer`](crate::model::ImageDiskContainer).
        pub fn build(self) -> crate::model::ImageDiskContainer {
            crate::model::ImageDiskContainer {
                description: self.description,
                device_name: self.device_name,
                format: self.format,
                snapshot_id: self.snapshot_id,
                url: self.url,
                user_bucket: self.user_bucket,
            }
        }
    }
}
impl ImageDiskContainer {
    /// Creates a new builder-style object to manufacture [`ImageDiskContainer`](crate::model::ImageDiskContainer).
    pub fn builder() -> crate::model::image_disk_container::Builder {
        crate::model::image_disk_container::Builder::default()
    }
}

/// <p>List of customer gateway devices that have a sample configuration file available for use. You can also see the list of device types with sample configuration files available under <a href="https://docs.aws.amazon.com/vpn/latest/s2svpn/your-cgw.html">Your customer gateway device</a> in the <i>Amazon Web Services Site-to-Site VPN User Guide</i>.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct VpnConnectionDeviceType {
    /// <p>Customer gateway device identifier.</p>
    #[doc(hidden)]
    pub vpn_connection_device_type_id: std::option::Option<std::string::String>,
    /// <p>Customer gateway device vendor.</p>
    #[doc(hidden)]
    pub vendor: std::option::Option<std::string::String>,
    /// <p>Customer gateway device platform.</p>
    #[doc(hidden)]
    pub platform: std::option::Option<std::string::String>,
    /// <p>Customer gateway device software version.</p>
    #[doc(hidden)]
    pub software: std::option::Option<std::string::String>,
}
impl VpnConnectionDeviceType {
    /// <p>Customer gateway device identifier.</p>
    pub fn vpn_connection_device_type_id(&self) -> std::option::Option<&str> {
        self.vpn_connection_device_type_id.as_deref()
    }
    /// <p>Customer gateway device vendor.</p>
    pub fn vendor(&self) -> std::option::Option<&str> {
        self.vendor.as_deref()
    }
    /// <p>Customer gateway device platform.</p>
    pub fn platform(&self) -> std::option::Option<&str> {
        self.platform.as_deref()
    }
    /// <p>Customer gateway device software version.</p>
    pub fn software(&self) -> std::option::Option<&str> {
        self.software.as_deref()
    }
}
/// See [`VpnConnectionDeviceType`](crate::model::VpnConnectionDeviceType).
pub mod vpn_connection_device_type {

    /// A builder for [`VpnConnectionDeviceType`](crate::model::VpnConnectionDeviceType).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) vpn_connection_device_type_id: std::option::Option<std::string::String>,
        pub(crate) vendor: std::option::Option<std::string::String>,
        pub(crate) platform: std::option::Option<std::string::String>,
        pub(crate) software: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>Customer gateway device identifier.</p>
        pub fn vpn_connection_device_type_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.vpn_connection_device_type_id = Some(input.into());
            self
        }
        /// <p>Customer gateway device identifier.</p>
        pub fn set_vpn_connection_device_type_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.vpn_connection_device_type_id = input;
            self
        }
        /// <p>Customer gateway device vendor.</p>
        pub fn vendor(mut self, input: impl Into<std::string::String>) -> Self {
            self.vendor = Some(input.into());
            self
        }
        /// <p>Customer gateway device vendor.</p>
        pub fn set_vendor(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.vendor = input;
            self
        }
        /// <p>Customer gateway device platform.</p>
        pub fn platform(mut self, input: impl Into<std::string::String>) -> Self {
            self.platform = Some(input.into());
            self
        }
        /// <p>Customer gateway device platform.</p>
        pub fn set_platform(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.platform = input;
            self
        }
        /// <p>Customer gateway device software version.</p>
        pub fn software(mut self, input: impl Into<std::string::String>) -> Self {
            self.software = Some(input.into());
            self
        }
        /// <p>Customer gateway device software version.</p>
        pub fn set_software(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.software = input;
            self
        }
        /// Consumes the builder and constructs a [`VpnConnectionDeviceType`](crate::model::VpnConnectionDeviceType).
        pub fn build(self) -> crate::model::VpnConnectionDeviceType {
            crate::model::VpnConnectionDeviceType {
                vpn_connection_device_type_id: self.vpn_connection_device_type_id,
                vendor: self.vendor,
                platform: self.platform,
                software: self.software,
            }
        }
    }
}
impl VpnConnectionDeviceType {
    /// Creates a new builder-style object to manufacture [`VpnConnectionDeviceType`](crate::model::VpnConnectionDeviceType).
    pub fn builder() -> crate::model::vpn_connection_device_type::Builder {
        crate::model::vpn_connection_device_type::Builder::default()
    }
}

/// <p>Describes a route table propagation.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TransitGatewayRouteTablePropagation {
    /// <p>The ID of the attachment.</p>
    #[doc(hidden)]
    pub transit_gateway_attachment_id: std::option::Option<std::string::String>,
    /// <p>The ID of the resource.</p>
    #[doc(hidden)]
    pub resource_id: std::option::Option<std::string::String>,
    /// <p>The type of resource. Note that the <code>tgw-peering</code> resource type has been deprecated.</p>
    #[doc(hidden)]
    pub resource_type: std::option::Option<crate::model::TransitGatewayAttachmentResourceType>,
    /// <p>The state of the resource.</p>
    #[doc(hidden)]
    pub state: std::option::Option<crate::model::TransitGatewayPropagationState>,
    /// <p>The ID of the transit gateway route table announcement.</p>
    #[doc(hidden)]
    pub transit_gateway_route_table_announcement_id: std::option::Option<std::string::String>,
}
impl TransitGatewayRouteTablePropagation {
    /// <p>The ID of the attachment.</p>
    pub fn transit_gateway_attachment_id(&self) -> std::option::Option<&str> {
        self.transit_gateway_attachment_id.as_deref()
    }
    /// <p>The ID of the resource.</p>
    pub fn resource_id(&self) -> std::option::Option<&str> {
        self.resource_id.as_deref()
    }
    /// <p>The type of resource. Note that the <code>tgw-peering</code> resource type has been deprecated.</p>
    pub fn resource_type(
        &self,
    ) -> std::option::Option<&crate::model::TransitGatewayAttachmentResourceType> {
        self.resource_type.as_ref()
    }
    /// <p>The state of the resource.</p>
    pub fn state(&self) -> std::option::Option<&crate::model::TransitGatewayPropagationState> {
        self.state.as_ref()
    }
    /// <p>The ID of the transit gateway route table announcement.</p>
    pub fn transit_gateway_route_table_announcement_id(&self) -> std::option::Option<&str> {
        self.transit_gateway_route_table_announcement_id.as_deref()
    }
}
/// See [`TransitGatewayRouteTablePropagation`](crate::model::TransitGatewayRouteTablePropagation).
pub mod transit_gateway_route_table_propagation {

    /// A builder for [`TransitGatewayRouteTablePropagation`](crate::model::TransitGatewayRouteTablePropagation).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) transit_gateway_attachment_id: std::option::Option<std::string::String>,
        pub(crate) resource_id: std::option::Option<std::string::String>,
        pub(crate) resource_type:
            std::option::Option<crate::model::TransitGatewayAttachmentResourceType>,
        pub(crate) state: std::option::Option<crate::model::TransitGatewayPropagationState>,
        pub(crate) transit_gateway_route_table_announcement_id:
            std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The ID of the attachment.</p>
        pub fn transit_gateway_attachment_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.transit_gateway_attachment_id = Some(input.into());
            self
        }
        /// <p>The ID of the attachment.</p>
        pub fn set_transit_gateway_attachment_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.transit_gateway_attachment_id = input;
            self
        }
        /// <p>The ID of the resource.</p>
        pub fn resource_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.resource_id = Some(input.into());
            self
        }
        /// <p>The ID of the resource.</p>
        pub fn set_resource_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.resource_id = input;
            self
        }
        /// <p>The type of resource. Note that the <code>tgw-peering</code> resource type has been deprecated.</p>
        pub fn resource_type(
            mut self,
            input: crate::model::TransitGatewayAttachmentResourceType,
        ) -> Self {
            self.resource_type = Some(input);
            self
        }
        /// <p>The type of resource. Note that the <code>tgw-peering</code> resource type has been deprecated.</p>
        pub fn set_resource_type(
            mut self,
            input: std::option::Option<crate::model::TransitGatewayAttachmentResourceType>,
        ) -> Self {
            self.resource_type = input;
            self
        }
        /// <p>The state of the resource.</p>
        pub fn state(mut self, input: crate::model::TransitGatewayPropagationState) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>The state of the resource.</p>
        pub fn set_state(
            mut self,
            input: std::option::Option<crate::model::TransitGatewayPropagationState>,
        ) -> Self {
            self.state = input;
            self
        }
        /// <p>The ID of the transit gateway route table announcement.</p>
        pub fn transit_gateway_route_table_announcement_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.transit_gateway_route_table_announcement_id = Some(input.into());
            self
        }
        /// <p>The ID of the transit gateway route table announcement.</p>
        pub fn set_transit_gateway_route_table_announcement_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.transit_gateway_route_table_announcement_id = input;
            self
        }
        /// Consumes the builder and constructs a [`TransitGatewayRouteTablePropagation`](crate::model::TransitGatewayRouteTablePropagation).
        pub fn build(self) -> crate::model::TransitGatewayRouteTablePropagation {
            crate::model::TransitGatewayRouteTablePropagation {
                transit_gateway_attachment_id: self.transit_gateway_attachment_id,
                resource_id: self.resource_id,
                resource_type: self.resource_type,
                state: self.state,
                transit_gateway_route_table_announcement_id: self
                    .transit_gateway_route_table_announcement_id,
            }
        }
    }
}
impl TransitGatewayRouteTablePropagation {
    /// Creates a new builder-style object to manufacture [`TransitGatewayRouteTablePropagation`](crate::model::TransitGatewayRouteTablePropagation).
    pub fn builder() -> crate::model::transit_gateway_route_table_propagation::Builder {
        crate::model::transit_gateway_route_table_propagation::Builder::default()
    }
}

/// When writing a match expression against `TransitGatewayPropagationState`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let transitgatewaypropagationstate = unimplemented!();
/// match transitgatewaypropagationstate {
///     TransitGatewayPropagationState::Disabled => { /* ... */ },
///     TransitGatewayPropagationState::Disabling => { /* ... */ },
///     TransitGatewayPropagationState::Enabled => { /* ... */ },
///     TransitGatewayPropagationState::Enabling => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `transitgatewaypropagationstate` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `TransitGatewayPropagationState::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `TransitGatewayPropagationState::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `TransitGatewayPropagationState::NewFeature` is defined.
/// Specifically, when `transitgatewaypropagationstate` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `TransitGatewayPropagationState::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 TransitGatewayPropagationState {
    #[allow(missing_docs)] // documentation missing in model
    Disabled,
    #[allow(missing_docs)] // documentation missing in model
    Disabling,
    #[allow(missing_docs)] // documentation missing in model
    Enabled,
    #[allow(missing_docs)] // documentation missing in model
    Enabling,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for TransitGatewayPropagationState {
    fn from(s: &str) -> Self {
        match s {
            "disabled" => TransitGatewayPropagationState::Disabled,
            "disabling" => TransitGatewayPropagationState::Disabling,
            "enabled" => TransitGatewayPropagationState::Enabled,
            "enabling" => TransitGatewayPropagationState::Enabling,
            other => TransitGatewayPropagationState::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for TransitGatewayPropagationState {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(TransitGatewayPropagationState::from(s))
    }
}
impl TransitGatewayPropagationState {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            TransitGatewayPropagationState::Disabled => "disabled",
            TransitGatewayPropagationState::Disabling => "disabling",
            TransitGatewayPropagationState::Enabled => "enabled",
            TransitGatewayPropagationState::Enabling => "enabling",
            TransitGatewayPropagationState::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["disabled", "disabling", "enabled", "enabling"]
    }
}
impl AsRef<str> for TransitGatewayPropagationState {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes an association between a route table and a resource attachment.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TransitGatewayRouteTableAssociation {
    /// <p>The ID of the attachment.</p>
    #[doc(hidden)]
    pub transit_gateway_attachment_id: std::option::Option<std::string::String>,
    /// <p>The ID of the resource.</p>
    #[doc(hidden)]
    pub resource_id: std::option::Option<std::string::String>,
    /// <p>The resource type. Note that the <code>tgw-peering</code> resource type has been deprecated.</p>
    #[doc(hidden)]
    pub resource_type: std::option::Option<crate::model::TransitGatewayAttachmentResourceType>,
    /// <p>The state of the association.</p>
    #[doc(hidden)]
    pub state: std::option::Option<crate::model::TransitGatewayAssociationState>,
}
impl TransitGatewayRouteTableAssociation {
    /// <p>The ID of the attachment.</p>
    pub fn transit_gateway_attachment_id(&self) -> std::option::Option<&str> {
        self.transit_gateway_attachment_id.as_deref()
    }
    /// <p>The ID of the resource.</p>
    pub fn resource_id(&self) -> std::option::Option<&str> {
        self.resource_id.as_deref()
    }
    /// <p>The resource type. Note that the <code>tgw-peering</code> resource type has been deprecated.</p>
    pub fn resource_type(
        &self,
    ) -> std::option::Option<&crate::model::TransitGatewayAttachmentResourceType> {
        self.resource_type.as_ref()
    }
    /// <p>The state of the association.</p>
    pub fn state(&self) -> std::option::Option<&crate::model::TransitGatewayAssociationState> {
        self.state.as_ref()
    }
}
/// See [`TransitGatewayRouteTableAssociation`](crate::model::TransitGatewayRouteTableAssociation).
pub mod transit_gateway_route_table_association {

    /// A builder for [`TransitGatewayRouteTableAssociation`](crate::model::TransitGatewayRouteTableAssociation).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) transit_gateway_attachment_id: std::option::Option<std::string::String>,
        pub(crate) resource_id: std::option::Option<std::string::String>,
        pub(crate) resource_type:
            std::option::Option<crate::model::TransitGatewayAttachmentResourceType>,
        pub(crate) state: std::option::Option<crate::model::TransitGatewayAssociationState>,
    }
    impl Builder {
        /// <p>The ID of the attachment.</p>
        pub fn transit_gateway_attachment_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.transit_gateway_attachment_id = Some(input.into());
            self
        }
        /// <p>The ID of the attachment.</p>
        pub fn set_transit_gateway_attachment_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.transit_gateway_attachment_id = input;
            self
        }
        /// <p>The ID of the resource.</p>
        pub fn resource_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.resource_id = Some(input.into());
            self
        }
        /// <p>The ID of the resource.</p>
        pub fn set_resource_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.resource_id = input;
            self
        }
        /// <p>The resource type. Note that the <code>tgw-peering</code> resource type has been deprecated.</p>
        pub fn resource_type(
            mut self,
            input: crate::model::TransitGatewayAttachmentResourceType,
        ) -> Self {
            self.resource_type = Some(input);
            self
        }
        /// <p>The resource type. Note that the <code>tgw-peering</code> resource type has been deprecated.</p>
        pub fn set_resource_type(
            mut self,
            input: std::option::Option<crate::model::TransitGatewayAttachmentResourceType>,
        ) -> Self {
            self.resource_type = input;
            self
        }
        /// <p>The state of the association.</p>
        pub fn state(mut self, input: crate::model::TransitGatewayAssociationState) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>The state of the association.</p>
        pub fn set_state(
            mut self,
            input: std::option::Option<crate::model::TransitGatewayAssociationState>,
        ) -> Self {
            self.state = input;
            self
        }
        /// Consumes the builder and constructs a [`TransitGatewayRouteTableAssociation`](crate::model::TransitGatewayRouteTableAssociation).
        pub fn build(self) -> crate::model::TransitGatewayRouteTableAssociation {
            crate::model::TransitGatewayRouteTableAssociation {
                transit_gateway_attachment_id: self.transit_gateway_attachment_id,
                resource_id: self.resource_id,
                resource_type: self.resource_type,
                state: self.state,
            }
        }
    }
}
impl TransitGatewayRouteTableAssociation {
    /// Creates a new builder-style object to manufacture [`TransitGatewayRouteTableAssociation`](crate::model::TransitGatewayRouteTableAssociation).
    pub fn builder() -> crate::model::transit_gateway_route_table_association::Builder {
        crate::model::transit_gateway_route_table_association::Builder::default()
    }
}

/// When writing a match expression against `TransitGatewayAssociationState`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let transitgatewayassociationstate = unimplemented!();
/// match transitgatewayassociationstate {
///     TransitGatewayAssociationState::Associated => { /* ... */ },
///     TransitGatewayAssociationState::Associating => { /* ... */ },
///     TransitGatewayAssociationState::Disassociated => { /* ... */ },
///     TransitGatewayAssociationState::Disassociating => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `transitgatewayassociationstate` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `TransitGatewayAssociationState::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `TransitGatewayAssociationState::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `TransitGatewayAssociationState::NewFeature` is defined.
/// Specifically, when `transitgatewayassociationstate` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `TransitGatewayAssociationState::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 TransitGatewayAssociationState {
    #[allow(missing_docs)] // documentation missing in model
    Associated,
    #[allow(missing_docs)] // documentation missing in model
    Associating,
    #[allow(missing_docs)] // documentation missing in model
    Disassociated,
    #[allow(missing_docs)] // documentation missing in model
    Disassociating,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for TransitGatewayAssociationState {
    fn from(s: &str) -> Self {
        match s {
            "associated" => TransitGatewayAssociationState::Associated,
            "associating" => TransitGatewayAssociationState::Associating,
            "disassociated" => TransitGatewayAssociationState::Disassociated,
            "disassociating" => TransitGatewayAssociationState::Disassociating,
            other => TransitGatewayAssociationState::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for TransitGatewayAssociationState {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(TransitGatewayAssociationState::from(s))
    }
}
impl TransitGatewayAssociationState {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            TransitGatewayAssociationState::Associated => "associated",
            TransitGatewayAssociationState::Associating => "associating",
            TransitGatewayAssociationState::Disassociated => "disassociated",
            TransitGatewayAssociationState::Disassociating => "disassociating",
            TransitGatewayAssociationState::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &[
            "associated",
            "associating",
            "disassociated",
            "disassociating",
        ]
    }
}
impl AsRef<str> for TransitGatewayAssociationState {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes a transit gateway policy table entry</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TransitGatewayPolicyTableEntry {
    /// <p>The rule number for the transit gateway policy table entry.</p>
    #[doc(hidden)]
    pub policy_rule_number: std::option::Option<std::string::String>,
    /// <p>The policy rule associated with the transit gateway policy table.</p>
    #[doc(hidden)]
    pub policy_rule: std::option::Option<crate::model::TransitGatewayPolicyRule>,
    /// <p>The ID of the target route table.</p>
    #[doc(hidden)]
    pub target_route_table_id: std::option::Option<std::string::String>,
}
impl TransitGatewayPolicyTableEntry {
    /// <p>The rule number for the transit gateway policy table entry.</p>
    pub fn policy_rule_number(&self) -> std::option::Option<&str> {
        self.policy_rule_number.as_deref()
    }
    /// <p>The policy rule associated with the transit gateway policy table.</p>
    pub fn policy_rule(&self) -> std::option::Option<&crate::model::TransitGatewayPolicyRule> {
        self.policy_rule.as_ref()
    }
    /// <p>The ID of the target route table.</p>
    pub fn target_route_table_id(&self) -> std::option::Option<&str> {
        self.target_route_table_id.as_deref()
    }
}
/// See [`TransitGatewayPolicyTableEntry`](crate::model::TransitGatewayPolicyTableEntry).
pub mod transit_gateway_policy_table_entry {

    /// A builder for [`TransitGatewayPolicyTableEntry`](crate::model::TransitGatewayPolicyTableEntry).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) policy_rule_number: std::option::Option<std::string::String>,
        pub(crate) policy_rule: std::option::Option<crate::model::TransitGatewayPolicyRule>,
        pub(crate) target_route_table_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The rule number for the transit gateway policy table entry.</p>
        pub fn policy_rule_number(mut self, input: impl Into<std::string::String>) -> Self {
            self.policy_rule_number = Some(input.into());
            self
        }
        /// <p>The rule number for the transit gateway policy table entry.</p>
        pub fn set_policy_rule_number(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.policy_rule_number = input;
            self
        }
        /// <p>The policy rule associated with the transit gateway policy table.</p>
        pub fn policy_rule(mut self, input: crate::model::TransitGatewayPolicyRule) -> Self {
            self.policy_rule = Some(input);
            self
        }
        /// <p>The policy rule associated with the transit gateway policy table.</p>
        pub fn set_policy_rule(
            mut self,
            input: std::option::Option<crate::model::TransitGatewayPolicyRule>,
        ) -> Self {
            self.policy_rule = input;
            self
        }
        /// <p>The ID of the target route table.</p>
        pub fn target_route_table_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.target_route_table_id = Some(input.into());
            self
        }
        /// <p>The ID of the target route table.</p>
        pub fn set_target_route_table_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.target_route_table_id = input;
            self
        }
        /// Consumes the builder and constructs a [`TransitGatewayPolicyTableEntry`](crate::model::TransitGatewayPolicyTableEntry).
        pub fn build(self) -> crate::model::TransitGatewayPolicyTableEntry {
            crate::model::TransitGatewayPolicyTableEntry {
                policy_rule_number: self.policy_rule_number,
                policy_rule: self.policy_rule,
                target_route_table_id: self.target_route_table_id,
            }
        }
    }
}
impl TransitGatewayPolicyTableEntry {
    /// Creates a new builder-style object to manufacture [`TransitGatewayPolicyTableEntry`](crate::model::TransitGatewayPolicyTableEntry).
    pub fn builder() -> crate::model::transit_gateway_policy_table_entry::Builder {
        crate::model::transit_gateway_policy_table_entry::Builder::default()
    }
}

/// <p>Describes a rule associated with a transit gateway policy.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TransitGatewayPolicyRule {
    /// <p>The source CIDR block for the transit gateway policy rule.</p>
    #[doc(hidden)]
    pub source_cidr_block: std::option::Option<std::string::String>,
    /// <p>The port range for the transit gateway policy rule. Currently this is set to * (all).</p>
    #[doc(hidden)]
    pub source_port_range: std::option::Option<std::string::String>,
    /// <p>The destination CIDR block for the transit gateway policy rule.</p>
    #[doc(hidden)]
    pub destination_cidr_block: std::option::Option<std::string::String>,
    /// <p>The port range for the transit gateway policy rule. Currently this is set to * (all).</p>
    #[doc(hidden)]
    pub destination_port_range: std::option::Option<std::string::String>,
    /// <p>The protocol used by the transit gateway policy rule.</p>
    #[doc(hidden)]
    pub protocol: std::option::Option<std::string::String>,
    /// <p>The meta data tags used for the transit gateway policy rule.</p>
    #[doc(hidden)]
    pub meta_data: std::option::Option<crate::model::TransitGatewayPolicyRuleMetaData>,
}
impl TransitGatewayPolicyRule {
    /// <p>The source CIDR block for the transit gateway policy rule.</p>
    pub fn source_cidr_block(&self) -> std::option::Option<&str> {
        self.source_cidr_block.as_deref()
    }
    /// <p>The port range for the transit gateway policy rule. Currently this is set to * (all).</p>
    pub fn source_port_range(&self) -> std::option::Option<&str> {
        self.source_port_range.as_deref()
    }
    /// <p>The destination CIDR block for the transit gateway policy rule.</p>
    pub fn destination_cidr_block(&self) -> std::option::Option<&str> {
        self.destination_cidr_block.as_deref()
    }
    /// <p>The port range for the transit gateway policy rule. Currently this is set to * (all).</p>
    pub fn destination_port_range(&self) -> std::option::Option<&str> {
        self.destination_port_range.as_deref()
    }
    /// <p>The protocol used by the transit gateway policy rule.</p>
    pub fn protocol(&self) -> std::option::Option<&str> {
        self.protocol.as_deref()
    }
    /// <p>The meta data tags used for the transit gateway policy rule.</p>
    pub fn meta_data(
        &self,
    ) -> std::option::Option<&crate::model::TransitGatewayPolicyRuleMetaData> {
        self.meta_data.as_ref()
    }
}
/// See [`TransitGatewayPolicyRule`](crate::model::TransitGatewayPolicyRule).
pub mod transit_gateway_policy_rule {

    /// A builder for [`TransitGatewayPolicyRule`](crate::model::TransitGatewayPolicyRule).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) source_cidr_block: std::option::Option<std::string::String>,
        pub(crate) source_port_range: std::option::Option<std::string::String>,
        pub(crate) destination_cidr_block: std::option::Option<std::string::String>,
        pub(crate) destination_port_range: std::option::Option<std::string::String>,
        pub(crate) protocol: std::option::Option<std::string::String>,
        pub(crate) meta_data: std::option::Option<crate::model::TransitGatewayPolicyRuleMetaData>,
    }
    impl Builder {
        /// <p>The source CIDR block for the transit gateway policy rule.</p>
        pub fn source_cidr_block(mut self, input: impl Into<std::string::String>) -> Self {
            self.source_cidr_block = Some(input.into());
            self
        }
        /// <p>The source CIDR block for the transit gateway policy rule.</p>
        pub fn set_source_cidr_block(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.source_cidr_block = input;
            self
        }
        /// <p>The port range for the transit gateway policy rule. Currently this is set to * (all).</p>
        pub fn source_port_range(mut self, input: impl Into<std::string::String>) -> Self {
            self.source_port_range = Some(input.into());
            self
        }
        /// <p>The port range for the transit gateway policy rule. Currently this is set to * (all).</p>
        pub fn set_source_port_range(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.source_port_range = input;
            self
        }
        /// <p>The destination CIDR block for the transit gateway policy rule.</p>
        pub fn destination_cidr_block(mut self, input: impl Into<std::string::String>) -> Self {
            self.destination_cidr_block = Some(input.into());
            self
        }
        /// <p>The destination CIDR block for the transit gateway policy rule.</p>
        pub fn set_destination_cidr_block(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.destination_cidr_block = input;
            self
        }
        /// <p>The port range for the transit gateway policy rule. Currently this is set to * (all).</p>
        pub fn destination_port_range(mut self, input: impl Into<std::string::String>) -> Self {
            self.destination_port_range = Some(input.into());
            self
        }
        /// <p>The port range for the transit gateway policy rule. Currently this is set to * (all).</p>
        pub fn set_destination_port_range(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.destination_port_range = input;
            self
        }
        /// <p>The protocol used by the transit gateway policy rule.</p>
        pub fn protocol(mut self, input: impl Into<std::string::String>) -> Self {
            self.protocol = Some(input.into());
            self
        }
        /// <p>The protocol used by the transit gateway policy rule.</p>
        pub fn set_protocol(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.protocol = input;
            self
        }
        /// <p>The meta data tags used for the transit gateway policy rule.</p>
        pub fn meta_data(mut self, input: crate::model::TransitGatewayPolicyRuleMetaData) -> Self {
            self.meta_data = Some(input);
            self
        }
        /// <p>The meta data tags used for the transit gateway policy rule.</p>
        pub fn set_meta_data(
            mut self,
            input: std::option::Option<crate::model::TransitGatewayPolicyRuleMetaData>,
        ) -> Self {
            self.meta_data = input;
            self
        }
        /// Consumes the builder and constructs a [`TransitGatewayPolicyRule`](crate::model::TransitGatewayPolicyRule).
        pub fn build(self) -> crate::model::TransitGatewayPolicyRule {
            crate::model::TransitGatewayPolicyRule {
                source_cidr_block: self.source_cidr_block,
                source_port_range: self.source_port_range,
                destination_cidr_block: self.destination_cidr_block,
                destination_port_range: self.destination_port_range,
                protocol: self.protocol,
                meta_data: self.meta_data,
            }
        }
    }
}
impl TransitGatewayPolicyRule {
    /// Creates a new builder-style object to manufacture [`TransitGatewayPolicyRule`](crate::model::TransitGatewayPolicyRule).
    pub fn builder() -> crate::model::transit_gateway_policy_rule::Builder {
        crate::model::transit_gateway_policy_rule::Builder::default()
    }
}

/// <p>Describes the meta data tags associated with a transit gateway policy rule.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TransitGatewayPolicyRuleMetaData {
    /// <p>The key name for the transit gateway policy rule meta data tag.</p>
    #[doc(hidden)]
    pub meta_data_key: std::option::Option<std::string::String>,
    /// <p>The value of the key for the transit gateway policy rule meta data tag.</p>
    #[doc(hidden)]
    pub meta_data_value: std::option::Option<std::string::String>,
}
impl TransitGatewayPolicyRuleMetaData {
    /// <p>The key name for the transit gateway policy rule meta data tag.</p>
    pub fn meta_data_key(&self) -> std::option::Option<&str> {
        self.meta_data_key.as_deref()
    }
    /// <p>The value of the key for the transit gateway policy rule meta data tag.</p>
    pub fn meta_data_value(&self) -> std::option::Option<&str> {
        self.meta_data_value.as_deref()
    }
}
/// See [`TransitGatewayPolicyRuleMetaData`](crate::model::TransitGatewayPolicyRuleMetaData).
pub mod transit_gateway_policy_rule_meta_data {

    /// A builder for [`TransitGatewayPolicyRuleMetaData`](crate::model::TransitGatewayPolicyRuleMetaData).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) meta_data_key: std::option::Option<std::string::String>,
        pub(crate) meta_data_value: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The key name for the transit gateway policy rule meta data tag.</p>
        pub fn meta_data_key(mut self, input: impl Into<std::string::String>) -> Self {
            self.meta_data_key = Some(input.into());
            self
        }
        /// <p>The key name for the transit gateway policy rule meta data tag.</p>
        pub fn set_meta_data_key(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.meta_data_key = input;
            self
        }
        /// <p>The value of the key for the transit gateway policy rule meta data tag.</p>
        pub fn meta_data_value(mut self, input: impl Into<std::string::String>) -> Self {
            self.meta_data_value = Some(input.into());
            self
        }
        /// <p>The value of the key for the transit gateway policy rule meta data tag.</p>
        pub fn set_meta_data_value(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.meta_data_value = input;
            self
        }
        /// Consumes the builder and constructs a [`TransitGatewayPolicyRuleMetaData`](crate::model::TransitGatewayPolicyRuleMetaData).
        pub fn build(self) -> crate::model::TransitGatewayPolicyRuleMetaData {
            crate::model::TransitGatewayPolicyRuleMetaData {
                meta_data_key: self.meta_data_key,
                meta_data_value: self.meta_data_value,
            }
        }
    }
}
impl TransitGatewayPolicyRuleMetaData {
    /// Creates a new builder-style object to manufacture [`TransitGatewayPolicyRuleMetaData`](crate::model::TransitGatewayPolicyRuleMetaData).
    pub fn builder() -> crate::model::transit_gateway_policy_rule_meta_data::Builder {
        crate::model::transit_gateway_policy_rule_meta_data::Builder::default()
    }
}

/// <p>Describes a transit gateway policy table association.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TransitGatewayPolicyTableAssociation {
    /// <p>The ID of the transit gateway policy table.</p>
    #[doc(hidden)]
    pub transit_gateway_policy_table_id: std::option::Option<std::string::String>,
    /// <p>The ID of the transit gateway attachment.</p>
    #[doc(hidden)]
    pub transit_gateway_attachment_id: std::option::Option<std::string::String>,
    /// <p>The resource ID of the transit gateway attachment.</p>
    #[doc(hidden)]
    pub resource_id: std::option::Option<std::string::String>,
    /// <p>The resource type for the transit gateway policy table association.</p>
    #[doc(hidden)]
    pub resource_type: std::option::Option<crate::model::TransitGatewayAttachmentResourceType>,
    /// <p>The state of the transit gateway policy table association.</p>
    #[doc(hidden)]
    pub state: std::option::Option<crate::model::TransitGatewayAssociationState>,
}
impl TransitGatewayPolicyTableAssociation {
    /// <p>The ID of the transit gateway policy table.</p>
    pub fn transit_gateway_policy_table_id(&self) -> std::option::Option<&str> {
        self.transit_gateway_policy_table_id.as_deref()
    }
    /// <p>The ID of the transit gateway attachment.</p>
    pub fn transit_gateway_attachment_id(&self) -> std::option::Option<&str> {
        self.transit_gateway_attachment_id.as_deref()
    }
    /// <p>The resource ID of the transit gateway attachment.</p>
    pub fn resource_id(&self) -> std::option::Option<&str> {
        self.resource_id.as_deref()
    }
    /// <p>The resource type for the transit gateway policy table association.</p>
    pub fn resource_type(
        &self,
    ) -> std::option::Option<&crate::model::TransitGatewayAttachmentResourceType> {
        self.resource_type.as_ref()
    }
    /// <p>The state of the transit gateway policy table association.</p>
    pub fn state(&self) -> std::option::Option<&crate::model::TransitGatewayAssociationState> {
        self.state.as_ref()
    }
}
/// See [`TransitGatewayPolicyTableAssociation`](crate::model::TransitGatewayPolicyTableAssociation).
pub mod transit_gateway_policy_table_association {

    /// A builder for [`TransitGatewayPolicyTableAssociation`](crate::model::TransitGatewayPolicyTableAssociation).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) transit_gateway_policy_table_id: std::option::Option<std::string::String>,
        pub(crate) transit_gateway_attachment_id: std::option::Option<std::string::String>,
        pub(crate) resource_id: std::option::Option<std::string::String>,
        pub(crate) resource_type:
            std::option::Option<crate::model::TransitGatewayAttachmentResourceType>,
        pub(crate) state: std::option::Option<crate::model::TransitGatewayAssociationState>,
    }
    impl Builder {
        /// <p>The ID of the transit gateway policy table.</p>
        pub fn transit_gateway_policy_table_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.transit_gateway_policy_table_id = Some(input.into());
            self
        }
        /// <p>The ID of the transit gateway policy table.</p>
        pub fn set_transit_gateway_policy_table_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.transit_gateway_policy_table_id = input;
            self
        }
        /// <p>The ID of the transit gateway attachment.</p>
        pub fn transit_gateway_attachment_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.transit_gateway_attachment_id = Some(input.into());
            self
        }
        /// <p>The ID of the transit gateway attachment.</p>
        pub fn set_transit_gateway_attachment_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.transit_gateway_attachment_id = input;
            self
        }
        /// <p>The resource ID of the transit gateway attachment.</p>
        pub fn resource_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.resource_id = Some(input.into());
            self
        }
        /// <p>The resource ID of the transit gateway attachment.</p>
        pub fn set_resource_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.resource_id = input;
            self
        }
        /// <p>The resource type for the transit gateway policy table association.</p>
        pub fn resource_type(
            mut self,
            input: crate::model::TransitGatewayAttachmentResourceType,
        ) -> Self {
            self.resource_type = Some(input);
            self
        }
        /// <p>The resource type for the transit gateway policy table association.</p>
        pub fn set_resource_type(
            mut self,
            input: std::option::Option<crate::model::TransitGatewayAttachmentResourceType>,
        ) -> Self {
            self.resource_type = input;
            self
        }
        /// <p>The state of the transit gateway policy table association.</p>
        pub fn state(mut self, input: crate::model::TransitGatewayAssociationState) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>The state of the transit gateway policy table association.</p>
        pub fn set_state(
            mut self,
            input: std::option::Option<crate::model::TransitGatewayAssociationState>,
        ) -> Self {
            self.state = input;
            self
        }
        /// Consumes the builder and constructs a [`TransitGatewayPolicyTableAssociation`](crate::model::TransitGatewayPolicyTableAssociation).
        pub fn build(self) -> crate::model::TransitGatewayPolicyTableAssociation {
            crate::model::TransitGatewayPolicyTableAssociation {
                transit_gateway_policy_table_id: self.transit_gateway_policy_table_id,
                transit_gateway_attachment_id: self.transit_gateway_attachment_id,
                resource_id: self.resource_id,
                resource_type: self.resource_type,
                state: self.state,
            }
        }
    }
}
impl TransitGatewayPolicyTableAssociation {
    /// Creates a new builder-style object to manufacture [`TransitGatewayPolicyTableAssociation`](crate::model::TransitGatewayPolicyTableAssociation).
    pub fn builder() -> crate::model::transit_gateway_policy_table_association::Builder {
        crate::model::transit_gateway_policy_table_association::Builder::default()
    }
}

/// <p>Describes the resources associated with the transit gateway multicast domain.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TransitGatewayMulticastDomainAssociation {
    /// <p>The ID of the transit gateway attachment.</p>
    #[doc(hidden)]
    pub transit_gateway_attachment_id: std::option::Option<std::string::String>,
    /// <p>The ID of the resource.</p>
    #[doc(hidden)]
    pub resource_id: std::option::Option<std::string::String>,
    /// <p>The type of resource, for example a VPC attachment.</p>
    #[doc(hidden)]
    pub resource_type: std::option::Option<crate::model::TransitGatewayAttachmentResourceType>,
    /// <p> The ID of the Amazon Web Services account that owns the transit gateway multicast domain association resource.</p>
    #[doc(hidden)]
    pub resource_owner_id: std::option::Option<std::string::String>,
    /// <p>The subnet associated with the transit gateway multicast domain.</p>
    #[doc(hidden)]
    pub subnet: std::option::Option<crate::model::SubnetAssociation>,
}
impl TransitGatewayMulticastDomainAssociation {
    /// <p>The ID of the transit gateway attachment.</p>
    pub fn transit_gateway_attachment_id(&self) -> std::option::Option<&str> {
        self.transit_gateway_attachment_id.as_deref()
    }
    /// <p>The ID of the resource.</p>
    pub fn resource_id(&self) -> std::option::Option<&str> {
        self.resource_id.as_deref()
    }
    /// <p>The type of resource, for example a VPC attachment.</p>
    pub fn resource_type(
        &self,
    ) -> std::option::Option<&crate::model::TransitGatewayAttachmentResourceType> {
        self.resource_type.as_ref()
    }
    /// <p> The ID of the Amazon Web Services account that owns the transit gateway multicast domain association resource.</p>
    pub fn resource_owner_id(&self) -> std::option::Option<&str> {
        self.resource_owner_id.as_deref()
    }
    /// <p>The subnet associated with the transit gateway multicast domain.</p>
    pub fn subnet(&self) -> std::option::Option<&crate::model::SubnetAssociation> {
        self.subnet.as_ref()
    }
}
/// See [`TransitGatewayMulticastDomainAssociation`](crate::model::TransitGatewayMulticastDomainAssociation).
pub mod transit_gateway_multicast_domain_association {

    /// A builder for [`TransitGatewayMulticastDomainAssociation`](crate::model::TransitGatewayMulticastDomainAssociation).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) transit_gateway_attachment_id: std::option::Option<std::string::String>,
        pub(crate) resource_id: std::option::Option<std::string::String>,
        pub(crate) resource_type:
            std::option::Option<crate::model::TransitGatewayAttachmentResourceType>,
        pub(crate) resource_owner_id: std::option::Option<std::string::String>,
        pub(crate) subnet: std::option::Option<crate::model::SubnetAssociation>,
    }
    impl Builder {
        /// <p>The ID of the transit gateway attachment.</p>
        pub fn transit_gateway_attachment_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.transit_gateway_attachment_id = Some(input.into());
            self
        }
        /// <p>The ID of the transit gateway attachment.</p>
        pub fn set_transit_gateway_attachment_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.transit_gateway_attachment_id = input;
            self
        }
        /// <p>The ID of the resource.</p>
        pub fn resource_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.resource_id = Some(input.into());
            self
        }
        /// <p>The ID of the resource.</p>
        pub fn set_resource_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.resource_id = input;
            self
        }
        /// <p>The type of resource, for example a VPC attachment.</p>
        pub fn resource_type(
            mut self,
            input: crate::model::TransitGatewayAttachmentResourceType,
        ) -> Self {
            self.resource_type = Some(input);
            self
        }
        /// <p>The type of resource, for example a VPC attachment.</p>
        pub fn set_resource_type(
            mut self,
            input: std::option::Option<crate::model::TransitGatewayAttachmentResourceType>,
        ) -> Self {
            self.resource_type = input;
            self
        }
        /// <p> The ID of the Amazon Web Services account that owns the transit gateway multicast domain association resource.</p>
        pub fn resource_owner_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.resource_owner_id = Some(input.into());
            self
        }
        /// <p> The ID of the Amazon Web Services account that owns the transit gateway multicast domain association resource.</p>
        pub fn set_resource_owner_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.resource_owner_id = input;
            self
        }
        /// <p>The subnet associated with the transit gateway multicast domain.</p>
        pub fn subnet(mut self, input: crate::model::SubnetAssociation) -> Self {
            self.subnet = Some(input);
            self
        }
        /// <p>The subnet associated with the transit gateway multicast domain.</p>
        pub fn set_subnet(
            mut self,
            input: std::option::Option<crate::model::SubnetAssociation>,
        ) -> Self {
            self.subnet = input;
            self
        }
        /// Consumes the builder and constructs a [`TransitGatewayMulticastDomainAssociation`](crate::model::TransitGatewayMulticastDomainAssociation).
        pub fn build(self) -> crate::model::TransitGatewayMulticastDomainAssociation {
            crate::model::TransitGatewayMulticastDomainAssociation {
                transit_gateway_attachment_id: self.transit_gateway_attachment_id,
                resource_id: self.resource_id,
                resource_type: self.resource_type,
                resource_owner_id: self.resource_owner_id,
                subnet: self.subnet,
            }
        }
    }
}
impl TransitGatewayMulticastDomainAssociation {
    /// Creates a new builder-style object to manufacture [`TransitGatewayMulticastDomainAssociation`](crate::model::TransitGatewayMulticastDomainAssociation).
    pub fn builder() -> crate::model::transit_gateway_multicast_domain_association::Builder {
        crate::model::transit_gateway_multicast_domain_association::Builder::default()
    }
}

/// <p>Describes a propagation route table.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TransitGatewayAttachmentPropagation {
    /// <p>The ID of the propagation route table.</p>
    #[doc(hidden)]
    pub transit_gateway_route_table_id: std::option::Option<std::string::String>,
    /// <p>The state of the propagation route table.</p>
    #[doc(hidden)]
    pub state: std::option::Option<crate::model::TransitGatewayPropagationState>,
}
impl TransitGatewayAttachmentPropagation {
    /// <p>The ID of the propagation route table.</p>
    pub fn transit_gateway_route_table_id(&self) -> std::option::Option<&str> {
        self.transit_gateway_route_table_id.as_deref()
    }
    /// <p>The state of the propagation route table.</p>
    pub fn state(&self) -> std::option::Option<&crate::model::TransitGatewayPropagationState> {
        self.state.as_ref()
    }
}
/// See [`TransitGatewayAttachmentPropagation`](crate::model::TransitGatewayAttachmentPropagation).
pub mod transit_gateway_attachment_propagation {

    /// A builder for [`TransitGatewayAttachmentPropagation`](crate::model::TransitGatewayAttachmentPropagation).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) transit_gateway_route_table_id: std::option::Option<std::string::String>,
        pub(crate) state: std::option::Option<crate::model::TransitGatewayPropagationState>,
    }
    impl Builder {
        /// <p>The ID of the propagation route table.</p>
        pub fn transit_gateway_route_table_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.transit_gateway_route_table_id = Some(input.into());
            self
        }
        /// <p>The ID of the propagation route table.</p>
        pub fn set_transit_gateway_route_table_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.transit_gateway_route_table_id = input;
            self
        }
        /// <p>The state of the propagation route table.</p>
        pub fn state(mut self, input: crate::model::TransitGatewayPropagationState) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>The state of the propagation route table.</p>
        pub fn set_state(
            mut self,
            input: std::option::Option<crate::model::TransitGatewayPropagationState>,
        ) -> Self {
            self.state = input;
            self
        }
        /// Consumes the builder and constructs a [`TransitGatewayAttachmentPropagation`](crate::model::TransitGatewayAttachmentPropagation).
        pub fn build(self) -> crate::model::TransitGatewayAttachmentPropagation {
            crate::model::TransitGatewayAttachmentPropagation {
                transit_gateway_route_table_id: self.transit_gateway_route_table_id,
                state: self.state,
            }
        }
    }
}
impl TransitGatewayAttachmentPropagation {
    /// Creates a new builder-style object to manufacture [`TransitGatewayAttachmentPropagation`](crate::model::TransitGatewayAttachmentPropagation).
    pub fn builder() -> crate::model::transit_gateway_attachment_propagation::Builder {
        crate::model::transit_gateway_attachment_propagation::Builder::default()
    }
}

/// <p>Describes a subnet CIDR reservation.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SubnetCidrReservation {
    /// <p>The ID of the subnet CIDR reservation.</p>
    #[doc(hidden)]
    pub subnet_cidr_reservation_id: std::option::Option<std::string::String>,
    /// <p>The ID of the subnet.</p>
    #[doc(hidden)]
    pub subnet_id: std::option::Option<std::string::String>,
    /// <p>The CIDR that has been reserved.</p>
    #[doc(hidden)]
    pub cidr: std::option::Option<std::string::String>,
    /// <p>The type of reservation. </p>
    #[doc(hidden)]
    pub reservation_type: std::option::Option<crate::model::SubnetCidrReservationType>,
    /// <p>The ID of the account that owns the subnet CIDR reservation. </p>
    #[doc(hidden)]
    pub owner_id: std::option::Option<std::string::String>,
    /// <p>The description assigned to the subnet CIDR reservation.</p>
    #[doc(hidden)]
    pub description: std::option::Option<std::string::String>,
    /// <p>The tags assigned to the subnet CIDR reservation.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl SubnetCidrReservation {
    /// <p>The ID of the subnet CIDR reservation.</p>
    pub fn subnet_cidr_reservation_id(&self) -> std::option::Option<&str> {
        self.subnet_cidr_reservation_id.as_deref()
    }
    /// <p>The ID of the subnet.</p>
    pub fn subnet_id(&self) -> std::option::Option<&str> {
        self.subnet_id.as_deref()
    }
    /// <p>The CIDR that has been reserved.</p>
    pub fn cidr(&self) -> std::option::Option<&str> {
        self.cidr.as_deref()
    }
    /// <p>The type of reservation. </p>
    pub fn reservation_type(
        &self,
    ) -> std::option::Option<&crate::model::SubnetCidrReservationType> {
        self.reservation_type.as_ref()
    }
    /// <p>The ID of the account that owns the subnet CIDR reservation. </p>
    pub fn owner_id(&self) -> std::option::Option<&str> {
        self.owner_id.as_deref()
    }
    /// <p>The description assigned to the subnet CIDR reservation.</p>
    pub fn description(&self) -> std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The tags assigned to the subnet CIDR reservation.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
}
/// See [`SubnetCidrReservation`](crate::model::SubnetCidrReservation).
pub mod subnet_cidr_reservation {

    /// A builder for [`SubnetCidrReservation`](crate::model::SubnetCidrReservation).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) subnet_cidr_reservation_id: std::option::Option<std::string::String>,
        pub(crate) subnet_id: std::option::Option<std::string::String>,
        pub(crate) cidr: std::option::Option<std::string::String>,
        pub(crate) reservation_type: std::option::Option<crate::model::SubnetCidrReservationType>,
        pub(crate) owner_id: std::option::Option<std::string::String>,
        pub(crate) description: std::option::Option<std::string::String>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    }
    impl Builder {
        /// <p>The ID of the subnet CIDR reservation.</p>
        pub fn subnet_cidr_reservation_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.subnet_cidr_reservation_id = Some(input.into());
            self
        }
        /// <p>The ID of the subnet CIDR reservation.</p>
        pub fn set_subnet_cidr_reservation_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.subnet_cidr_reservation_id = input;
            self
        }
        /// <p>The ID of the subnet.</p>
        pub fn subnet_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.subnet_id = Some(input.into());
            self
        }
        /// <p>The ID of the subnet.</p>
        pub fn set_subnet_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.subnet_id = input;
            self
        }
        /// <p>The CIDR that has been reserved.</p>
        pub fn cidr(mut self, input: impl Into<std::string::String>) -> Self {
            self.cidr = Some(input.into());
            self
        }
        /// <p>The CIDR that has been reserved.</p>
        pub fn set_cidr(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.cidr = input;
            self
        }
        /// <p>The type of reservation. </p>
        pub fn reservation_type(mut self, input: crate::model::SubnetCidrReservationType) -> Self {
            self.reservation_type = Some(input);
            self
        }
        /// <p>The type of reservation. </p>
        pub fn set_reservation_type(
            mut self,
            input: std::option::Option<crate::model::SubnetCidrReservationType>,
        ) -> Self {
            self.reservation_type = input;
            self
        }
        /// <p>The ID of the account that owns the subnet CIDR reservation. </p>
        pub fn owner_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.owner_id = Some(input.into());
            self
        }
        /// <p>The ID of the account that owns the subnet CIDR reservation. </p>
        pub fn set_owner_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.owner_id = input;
            self
        }
        /// <p>The description assigned to the subnet CIDR reservation.</p>
        pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
            self.description = Some(input.into());
            self
        }
        /// <p>The description assigned to the subnet CIDR reservation.</p>
        pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.description = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>The tags assigned to the subnet CIDR reservation.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>The tags assigned to the subnet CIDR reservation.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// Consumes the builder and constructs a [`SubnetCidrReservation`](crate::model::SubnetCidrReservation).
        pub fn build(self) -> crate::model::SubnetCidrReservation {
            crate::model::SubnetCidrReservation {
                subnet_cidr_reservation_id: self.subnet_cidr_reservation_id,
                subnet_id: self.subnet_id,
                cidr: self.cidr,
                reservation_type: self.reservation_type,
                owner_id: self.owner_id,
                description: self.description,
                tags: self.tags,
            }
        }
    }
}
impl SubnetCidrReservation {
    /// Creates a new builder-style object to manufacture [`SubnetCidrReservation`](crate::model::SubnetCidrReservation).
    pub fn builder() -> crate::model::subnet_cidr_reservation::Builder {
        crate::model::subnet_cidr_reservation::Builder::default()
    }
}

/// When writing a match expression against `SubnetCidrReservationType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let subnetcidrreservationtype = unimplemented!();
/// match subnetcidrreservationtype {
///     SubnetCidrReservationType::Explicit => { /* ... */ },
///     SubnetCidrReservationType::Prefix => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `subnetcidrreservationtype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `SubnetCidrReservationType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `SubnetCidrReservationType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `SubnetCidrReservationType::NewFeature` is defined.
/// Specifically, when `subnetcidrreservationtype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `SubnetCidrReservationType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 SubnetCidrReservationType {
    #[allow(missing_docs)] // documentation missing in model
    Explicit,
    #[allow(missing_docs)] // documentation missing in model
    Prefix,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for SubnetCidrReservationType {
    fn from(s: &str) -> Self {
        match s {
            "explicit" => SubnetCidrReservationType::Explicit,
            "prefix" => SubnetCidrReservationType::Prefix,
            other => SubnetCidrReservationType::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for SubnetCidrReservationType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(SubnetCidrReservationType::from(s))
    }
}
impl SubnetCidrReservationType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            SubnetCidrReservationType::Explicit => "explicit",
            SubnetCidrReservationType::Prefix => "prefix",
            SubnetCidrReservationType::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["explicit", "prefix"]
    }
}
impl AsRef<str> for SubnetCidrReservationType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>The Spot placement score for this Region or Availability Zone. The score is calculated based on the assumption that the <code>capacity-optimized</code> allocation strategy is used and that all of the Availability Zones in the Region can be used.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SpotPlacementScore {
    /// <p>The Region.</p>
    #[doc(hidden)]
    pub region: std::option::Option<std::string::String>,
    /// <p>The Availability Zone.</p>
    #[doc(hidden)]
    pub availability_zone_id: std::option::Option<std::string::String>,
    /// <p>The placement score, on a scale from <code>1</code> to <code>10</code>. A score of <code>10</code> indicates that your Spot request is highly likely to succeed in this Region or Availability Zone. A score of <code>1</code> indicates that your Spot request is not likely to succeed. </p>
    #[doc(hidden)]
    pub score: std::option::Option<i32>,
}
impl SpotPlacementScore {
    /// <p>The Region.</p>
    pub fn region(&self) -> std::option::Option<&str> {
        self.region.as_deref()
    }
    /// <p>The Availability Zone.</p>
    pub fn availability_zone_id(&self) -> std::option::Option<&str> {
        self.availability_zone_id.as_deref()
    }
    /// <p>The placement score, on a scale from <code>1</code> to <code>10</code>. A score of <code>10</code> indicates that your Spot request is highly likely to succeed in this Region or Availability Zone. A score of <code>1</code> indicates that your Spot request is not likely to succeed. </p>
    pub fn score(&self) -> std::option::Option<i32> {
        self.score
    }
}
/// See [`SpotPlacementScore`](crate::model::SpotPlacementScore).
pub mod spot_placement_score {

    /// A builder for [`SpotPlacementScore`](crate::model::SpotPlacementScore).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) region: std::option::Option<std::string::String>,
        pub(crate) availability_zone_id: std::option::Option<std::string::String>,
        pub(crate) score: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>The Region.</p>
        pub fn region(mut self, input: impl Into<std::string::String>) -> Self {
            self.region = Some(input.into());
            self
        }
        /// <p>The Region.</p>
        pub fn set_region(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.region = input;
            self
        }
        /// <p>The Availability Zone.</p>
        pub fn availability_zone_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.availability_zone_id = Some(input.into());
            self
        }
        /// <p>The Availability Zone.</p>
        pub fn set_availability_zone_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.availability_zone_id = input;
            self
        }
        /// <p>The placement score, on a scale from <code>1</code> to <code>10</code>. A score of <code>10</code> indicates that your Spot request is highly likely to succeed in this Region or Availability Zone. A score of <code>1</code> indicates that your Spot request is not likely to succeed. </p>
        pub fn score(mut self, input: i32) -> Self {
            self.score = Some(input);
            self
        }
        /// <p>The placement score, on a scale from <code>1</code> to <code>10</code>. A score of <code>10</code> indicates that your Spot request is highly likely to succeed in this Region or Availability Zone. A score of <code>1</code> indicates that your Spot request is not likely to succeed. </p>
        pub fn set_score(mut self, input: std::option::Option<i32>) -> Self {
            self.score = input;
            self
        }
        /// Consumes the builder and constructs a [`SpotPlacementScore`](crate::model::SpotPlacementScore).
        pub fn build(self) -> crate::model::SpotPlacementScore {
            crate::model::SpotPlacementScore {
                region: self.region,
                availability_zone_id: self.availability_zone_id,
                score: self.score,
            }
        }
    }
}
impl SpotPlacementScore {
    /// Creates a new builder-style object to manufacture [`SpotPlacementScore`](crate::model::SpotPlacementScore).
    pub fn builder() -> crate::model::spot_placement_score::Builder {
        crate::model::spot_placement_score::Builder::default()
    }
}

/// <p>The architecture type, virtualization type, and other attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with those attributes.</p>
/// <p>If you specify <code>InstanceRequirementsWithMetadataRequest</code>, you can't specify <code>InstanceTypes</code>.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InstanceRequirementsWithMetadataRequest {
    /// <p>The architecture type.</p>
    #[doc(hidden)]
    pub architecture_types: std::option::Option<std::vec::Vec<crate::model::ArchitectureType>>,
    /// <p>The virtualization type.</p>
    #[doc(hidden)]
    pub virtualization_types: std::option::Option<std::vec::Vec<crate::model::VirtualizationType>>,
    /// <p>The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with those attributes.</p>
    #[doc(hidden)]
    pub instance_requirements: std::option::Option<crate::model::InstanceRequirementsRequest>,
}
impl InstanceRequirementsWithMetadataRequest {
    /// <p>The architecture type.</p>
    pub fn architecture_types(&self) -> std::option::Option<&[crate::model::ArchitectureType]> {
        self.architecture_types.as_deref()
    }
    /// <p>The virtualization type.</p>
    pub fn virtualization_types(&self) -> std::option::Option<&[crate::model::VirtualizationType]> {
        self.virtualization_types.as_deref()
    }
    /// <p>The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with those attributes.</p>
    pub fn instance_requirements(
        &self,
    ) -> std::option::Option<&crate::model::InstanceRequirementsRequest> {
        self.instance_requirements.as_ref()
    }
}
/// See [`InstanceRequirementsWithMetadataRequest`](crate::model::InstanceRequirementsWithMetadataRequest).
pub mod instance_requirements_with_metadata_request {

    /// A builder for [`InstanceRequirementsWithMetadataRequest`](crate::model::InstanceRequirementsWithMetadataRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) architecture_types:
            std::option::Option<std::vec::Vec<crate::model::ArchitectureType>>,
        pub(crate) virtualization_types:
            std::option::Option<std::vec::Vec<crate::model::VirtualizationType>>,
        pub(crate) instance_requirements:
            std::option::Option<crate::model::InstanceRequirementsRequest>,
    }
    impl Builder {
        /// Appends an item to `architecture_types`.
        ///
        /// To override the contents of this collection use [`set_architecture_types`](Self::set_architecture_types).
        ///
        /// <p>The architecture type.</p>
        pub fn architecture_types(mut self, input: crate::model::ArchitectureType) -> Self {
            let mut v = self.architecture_types.unwrap_or_default();
            v.push(input);
            self.architecture_types = Some(v);
            self
        }
        /// <p>The architecture type.</p>
        pub fn set_architecture_types(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::ArchitectureType>>,
        ) -> Self {
            self.architecture_types = input;
            self
        }
        /// Appends an item to `virtualization_types`.
        ///
        /// To override the contents of this collection use [`set_virtualization_types`](Self::set_virtualization_types).
        ///
        /// <p>The virtualization type.</p>
        pub fn virtualization_types(mut self, input: crate::model::VirtualizationType) -> Self {
            let mut v = self.virtualization_types.unwrap_or_default();
            v.push(input);
            self.virtualization_types = Some(v);
            self
        }
        /// <p>The virtualization type.</p>
        pub fn set_virtualization_types(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::VirtualizationType>>,
        ) -> Self {
            self.virtualization_types = input;
            self
        }
        /// <p>The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with those attributes.</p>
        pub fn instance_requirements(
            mut self,
            input: crate::model::InstanceRequirementsRequest,
        ) -> Self {
            self.instance_requirements = Some(input);
            self
        }
        /// <p>The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with those attributes.</p>
        pub fn set_instance_requirements(
            mut self,
            input: std::option::Option<crate::model::InstanceRequirementsRequest>,
        ) -> Self {
            self.instance_requirements = input;
            self
        }
        /// Consumes the builder and constructs a [`InstanceRequirementsWithMetadataRequest`](crate::model::InstanceRequirementsWithMetadataRequest).
        pub fn build(self) -> crate::model::InstanceRequirementsWithMetadataRequest {
            crate::model::InstanceRequirementsWithMetadataRequest {
                architecture_types: self.architecture_types,
                virtualization_types: self.virtualization_types,
                instance_requirements: self.instance_requirements,
            }
        }
    }
}
impl InstanceRequirementsWithMetadataRequest {
    /// Creates a new builder-style object to manufacture [`InstanceRequirementsWithMetadataRequest`](crate::model::InstanceRequirementsWithMetadataRequest).
    pub fn builder() -> crate::model::instance_requirements_with_metadata_request::Builder {
        crate::model::instance_requirements_with_metadata_request::Builder::default()
    }
}

/// When writing a match expression against `ArchitectureType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let architecturetype = unimplemented!();
/// match architecturetype {
///     ArchitectureType::Arm64 => { /* ... */ },
///     ArchitectureType::Arm64Mac => { /* ... */ },
///     ArchitectureType::I386 => { /* ... */ },
///     ArchitectureType::X8664 => { /* ... */ },
///     ArchitectureType::X8664Mac => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `architecturetype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `ArchitectureType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `ArchitectureType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `ArchitectureType::NewFeature` is defined.
/// Specifically, when `architecturetype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `ArchitectureType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 ArchitectureType {
    #[allow(missing_docs)] // documentation missing in model
    Arm64,
    #[allow(missing_docs)] // documentation missing in model
    Arm64Mac,
    #[allow(missing_docs)] // documentation missing in model
    I386,
    #[allow(missing_docs)] // documentation missing in model
    X8664,
    #[allow(missing_docs)] // documentation missing in model
    X8664Mac,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for ArchitectureType {
    fn from(s: &str) -> Self {
        match s {
            "arm64" => ArchitectureType::Arm64,
            "arm64_mac" => ArchitectureType::Arm64Mac,
            "i386" => ArchitectureType::I386,
            "x86_64" => ArchitectureType::X8664,
            "x86_64_mac" => ArchitectureType::X8664Mac,
            other => ArchitectureType::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for ArchitectureType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(ArchitectureType::from(s))
    }
}
impl ArchitectureType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            ArchitectureType::Arm64 => "arm64",
            ArchitectureType::Arm64Mac => "arm64_mac",
            ArchitectureType::I386 => "i386",
            ArchitectureType::X8664 => "x86_64",
            ArchitectureType::X8664Mac => "x86_64_mac",
            ArchitectureType::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["arm64", "arm64_mac", "i386", "x86_64", "x86_64_mac"]
    }
}
impl AsRef<str> for ArchitectureType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>The total value of the new Convertible Reserved Instances.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TargetReservationValue {
    /// <p>The total value of the Convertible Reserved Instances that make up the exchange. This is the sum of the list value, remaining upfront price, and additional upfront cost of the exchange.</p>
    #[doc(hidden)]
    pub reservation_value: std::option::Option<crate::model::ReservationValue>,
    /// <p>The configuration of the Convertible Reserved Instances that make up the exchange.</p>
    #[doc(hidden)]
    pub target_configuration: std::option::Option<crate::model::TargetConfiguration>,
}
impl TargetReservationValue {
    /// <p>The total value of the Convertible Reserved Instances that make up the exchange. This is the sum of the list value, remaining upfront price, and additional upfront cost of the exchange.</p>
    pub fn reservation_value(&self) -> std::option::Option<&crate::model::ReservationValue> {
        self.reservation_value.as_ref()
    }
    /// <p>The configuration of the Convertible Reserved Instances that make up the exchange.</p>
    pub fn target_configuration(&self) -> std::option::Option<&crate::model::TargetConfiguration> {
        self.target_configuration.as_ref()
    }
}
/// See [`TargetReservationValue`](crate::model::TargetReservationValue).
pub mod target_reservation_value {

    /// A builder for [`TargetReservationValue`](crate::model::TargetReservationValue).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) reservation_value: std::option::Option<crate::model::ReservationValue>,
        pub(crate) target_configuration: std::option::Option<crate::model::TargetConfiguration>,
    }
    impl Builder {
        /// <p>The total value of the Convertible Reserved Instances that make up the exchange. This is the sum of the list value, remaining upfront price, and additional upfront cost of the exchange.</p>
        pub fn reservation_value(mut self, input: crate::model::ReservationValue) -> Self {
            self.reservation_value = Some(input);
            self
        }
        /// <p>The total value of the Convertible Reserved Instances that make up the exchange. This is the sum of the list value, remaining upfront price, and additional upfront cost of the exchange.</p>
        pub fn set_reservation_value(
            mut self,
            input: std::option::Option<crate::model::ReservationValue>,
        ) -> Self {
            self.reservation_value = input;
            self
        }
        /// <p>The configuration of the Convertible Reserved Instances that make up the exchange.</p>
        pub fn target_configuration(mut self, input: crate::model::TargetConfiguration) -> Self {
            self.target_configuration = Some(input);
            self
        }
        /// <p>The configuration of the Convertible Reserved Instances that make up the exchange.</p>
        pub fn set_target_configuration(
            mut self,
            input: std::option::Option<crate::model::TargetConfiguration>,
        ) -> Self {
            self.target_configuration = input;
            self
        }
        /// Consumes the builder and constructs a [`TargetReservationValue`](crate::model::TargetReservationValue).
        pub fn build(self) -> crate::model::TargetReservationValue {
            crate::model::TargetReservationValue {
                reservation_value: self.reservation_value,
                target_configuration: self.target_configuration,
            }
        }
    }
}
impl TargetReservationValue {
    /// Creates a new builder-style object to manufacture [`TargetReservationValue`](crate::model::TargetReservationValue).
    pub fn builder() -> crate::model::target_reservation_value::Builder {
        crate::model::target_reservation_value::Builder::default()
    }
}

/// <p>Information about the Convertible Reserved Instance offering.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TargetConfiguration {
    /// <p>The number of instances the Convertible Reserved Instance offering can be applied to. This parameter is reserved and cannot be specified in a request</p>
    #[doc(hidden)]
    pub instance_count: std::option::Option<i32>,
    /// <p>The ID of the Convertible Reserved Instance offering.</p>
    #[doc(hidden)]
    pub offering_id: std::option::Option<std::string::String>,
}
impl TargetConfiguration {
    /// <p>The number of instances the Convertible Reserved Instance offering can be applied to. This parameter is reserved and cannot be specified in a request</p>
    pub fn instance_count(&self) -> std::option::Option<i32> {
        self.instance_count
    }
    /// <p>The ID of the Convertible Reserved Instance offering.</p>
    pub fn offering_id(&self) -> std::option::Option<&str> {
        self.offering_id.as_deref()
    }
}
/// See [`TargetConfiguration`](crate::model::TargetConfiguration).
pub mod target_configuration {

    /// A builder for [`TargetConfiguration`](crate::model::TargetConfiguration).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) instance_count: std::option::Option<i32>,
        pub(crate) offering_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The number of instances the Convertible Reserved Instance offering can be applied to. This parameter is reserved and cannot be specified in a request</p>
        pub fn instance_count(mut self, input: i32) -> Self {
            self.instance_count = Some(input);
            self
        }
        /// <p>The number of instances the Convertible Reserved Instance offering can be applied to. This parameter is reserved and cannot be specified in a request</p>
        pub fn set_instance_count(mut self, input: std::option::Option<i32>) -> Self {
            self.instance_count = input;
            self
        }
        /// <p>The ID of the Convertible Reserved Instance offering.</p>
        pub fn offering_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.offering_id = Some(input.into());
            self
        }
        /// <p>The ID of the Convertible Reserved Instance offering.</p>
        pub fn set_offering_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.offering_id = input;
            self
        }
        /// Consumes the builder and constructs a [`TargetConfiguration`](crate::model::TargetConfiguration).
        pub fn build(self) -> crate::model::TargetConfiguration {
            crate::model::TargetConfiguration {
                instance_count: self.instance_count,
                offering_id: self.offering_id,
            }
        }
    }
}
impl TargetConfiguration {
    /// Creates a new builder-style object to manufacture [`TargetConfiguration`](crate::model::TargetConfiguration).
    pub fn builder() -> crate::model::target_configuration::Builder {
        crate::model::target_configuration::Builder::default()
    }
}

/// <p>The cost associated with the Reserved Instance.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ReservationValue {
    /// <p>The hourly rate of the reservation.</p>
    #[doc(hidden)]
    pub hourly_price: std::option::Option<std::string::String>,
    /// <p>The balance of the total value (the sum of remainingUpfrontValue + hourlyPrice * number of hours remaining).</p>
    #[doc(hidden)]
    pub remaining_total_value: std::option::Option<std::string::String>,
    /// <p>The remaining upfront cost of the reservation.</p>
    #[doc(hidden)]
    pub remaining_upfront_value: std::option::Option<std::string::String>,
}
impl ReservationValue {
    /// <p>The hourly rate of the reservation.</p>
    pub fn hourly_price(&self) -> std::option::Option<&str> {
        self.hourly_price.as_deref()
    }
    /// <p>The balance of the total value (the sum of remainingUpfrontValue + hourlyPrice * number of hours remaining).</p>
    pub fn remaining_total_value(&self) -> std::option::Option<&str> {
        self.remaining_total_value.as_deref()
    }
    /// <p>The remaining upfront cost of the reservation.</p>
    pub fn remaining_upfront_value(&self) -> std::option::Option<&str> {
        self.remaining_upfront_value.as_deref()
    }
}
/// See [`ReservationValue`](crate::model::ReservationValue).
pub mod reservation_value {

    /// A builder for [`ReservationValue`](crate::model::ReservationValue).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) hourly_price: std::option::Option<std::string::String>,
        pub(crate) remaining_total_value: std::option::Option<std::string::String>,
        pub(crate) remaining_upfront_value: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The hourly rate of the reservation.</p>
        pub fn hourly_price(mut self, input: impl Into<std::string::String>) -> Self {
            self.hourly_price = Some(input.into());
            self
        }
        /// <p>The hourly rate of the reservation.</p>
        pub fn set_hourly_price(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.hourly_price = input;
            self
        }
        /// <p>The balance of the total value (the sum of remainingUpfrontValue + hourlyPrice * number of hours remaining).</p>
        pub fn remaining_total_value(mut self, input: impl Into<std::string::String>) -> Self {
            self.remaining_total_value = Some(input.into());
            self
        }
        /// <p>The balance of the total value (the sum of remainingUpfrontValue + hourlyPrice * number of hours remaining).</p>
        pub fn set_remaining_total_value(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.remaining_total_value = input;
            self
        }
        /// <p>The remaining upfront cost of the reservation.</p>
        pub fn remaining_upfront_value(mut self, input: impl Into<std::string::String>) -> Self {
            self.remaining_upfront_value = Some(input.into());
            self
        }
        /// <p>The remaining upfront cost of the reservation.</p>
        pub fn set_remaining_upfront_value(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.remaining_upfront_value = input;
            self
        }
        /// Consumes the builder and constructs a [`ReservationValue`](crate::model::ReservationValue).
        pub fn build(self) -> crate::model::ReservationValue {
            crate::model::ReservationValue {
                hourly_price: self.hourly_price,
                remaining_total_value: self.remaining_total_value,
                remaining_upfront_value: self.remaining_upfront_value,
            }
        }
    }
}
impl ReservationValue {
    /// Creates a new builder-style object to manufacture [`ReservationValue`](crate::model::ReservationValue).
    pub fn builder() -> crate::model::reservation_value::Builder {
        crate::model::reservation_value::Builder::default()
    }
}

/// <p>The total value of the Convertible Reserved Instance.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ReservedInstanceReservationValue {
    /// <p>The total value of the Convertible Reserved Instance that you are exchanging.</p>
    #[doc(hidden)]
    pub reservation_value: std::option::Option<crate::model::ReservationValue>,
    /// <p>The ID of the Convertible Reserved Instance that you are exchanging.</p>
    #[doc(hidden)]
    pub reserved_instance_id: std::option::Option<std::string::String>,
}
impl ReservedInstanceReservationValue {
    /// <p>The total value of the Convertible Reserved Instance that you are exchanging.</p>
    pub fn reservation_value(&self) -> std::option::Option<&crate::model::ReservationValue> {
        self.reservation_value.as_ref()
    }
    /// <p>The ID of the Convertible Reserved Instance that you are exchanging.</p>
    pub fn reserved_instance_id(&self) -> std::option::Option<&str> {
        self.reserved_instance_id.as_deref()
    }
}
/// See [`ReservedInstanceReservationValue`](crate::model::ReservedInstanceReservationValue).
pub mod reserved_instance_reservation_value {

    /// A builder for [`ReservedInstanceReservationValue`](crate::model::ReservedInstanceReservationValue).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) reservation_value: std::option::Option<crate::model::ReservationValue>,
        pub(crate) reserved_instance_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The total value of the Convertible Reserved Instance that you are exchanging.</p>
        pub fn reservation_value(mut self, input: crate::model::ReservationValue) -> Self {
            self.reservation_value = Some(input);
            self
        }
        /// <p>The total value of the Convertible Reserved Instance that you are exchanging.</p>
        pub fn set_reservation_value(
            mut self,
            input: std::option::Option<crate::model::ReservationValue>,
        ) -> Self {
            self.reservation_value = input;
            self
        }
        /// <p>The ID of the Convertible Reserved Instance that you are exchanging.</p>
        pub fn reserved_instance_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.reserved_instance_id = Some(input.into());
            self
        }
        /// <p>The ID of the Convertible Reserved Instance that you are exchanging.</p>
        pub fn set_reserved_instance_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.reserved_instance_id = input;
            self
        }
        /// Consumes the builder and constructs a [`ReservedInstanceReservationValue`](crate::model::ReservedInstanceReservationValue).
        pub fn build(self) -> crate::model::ReservedInstanceReservationValue {
            crate::model::ReservedInstanceReservationValue {
                reservation_value: self.reservation_value,
                reserved_instance_id: self.reserved_instance_id,
            }
        }
    }
}
impl ReservedInstanceReservationValue {
    /// Creates a new builder-style object to manufacture [`ReservedInstanceReservationValue`](crate::model::ReservedInstanceReservationValue).
    pub fn builder() -> crate::model::reserved_instance_reservation_value::Builder {
        crate::model::reserved_instance_reservation_value::Builder::default()
    }
}

/// <p>Details about the target configuration.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TargetConfigurationRequest {
    /// <p>The number of instances the Convertible Reserved Instance offering can be applied to. This parameter is reserved and cannot be specified in a request</p>
    #[doc(hidden)]
    pub instance_count: std::option::Option<i32>,
    /// <p>The Convertible Reserved Instance offering ID.</p>
    #[doc(hidden)]
    pub offering_id: std::option::Option<std::string::String>,
}
impl TargetConfigurationRequest {
    /// <p>The number of instances the Convertible Reserved Instance offering can be applied to. This parameter is reserved and cannot be specified in a request</p>
    pub fn instance_count(&self) -> std::option::Option<i32> {
        self.instance_count
    }
    /// <p>The Convertible Reserved Instance offering ID.</p>
    pub fn offering_id(&self) -> std::option::Option<&str> {
        self.offering_id.as_deref()
    }
}
/// See [`TargetConfigurationRequest`](crate::model::TargetConfigurationRequest).
pub mod target_configuration_request {

    /// A builder for [`TargetConfigurationRequest`](crate::model::TargetConfigurationRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) instance_count: std::option::Option<i32>,
        pub(crate) offering_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The number of instances the Convertible Reserved Instance offering can be applied to. This parameter is reserved and cannot be specified in a request</p>
        pub fn instance_count(mut self, input: i32) -> Self {
            self.instance_count = Some(input);
            self
        }
        /// <p>The number of instances the Convertible Reserved Instance offering can be applied to. This parameter is reserved and cannot be specified in a request</p>
        pub fn set_instance_count(mut self, input: std::option::Option<i32>) -> Self {
            self.instance_count = input;
            self
        }
        /// <p>The Convertible Reserved Instance offering ID.</p>
        pub fn offering_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.offering_id = Some(input.into());
            self
        }
        /// <p>The Convertible Reserved Instance offering ID.</p>
        pub fn set_offering_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.offering_id = input;
            self
        }
        /// Consumes the builder and constructs a [`TargetConfigurationRequest`](crate::model::TargetConfigurationRequest).
        pub fn build(self) -> crate::model::TargetConfigurationRequest {
            crate::model::TargetConfigurationRequest {
                instance_count: self.instance_count,
                offering_id: self.offering_id,
            }
        }
    }
}
impl TargetConfigurationRequest {
    /// Creates a new builder-style object to manufacture [`TargetConfigurationRequest`](crate::model::TargetConfigurationRequest).
    pub fn builder() -> crate::model::target_configuration_request::Builder {
        crate::model::target_configuration_request::Builder::default()
    }
}

/// <p>Describes the Network Access Scope content.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct NetworkInsightsAccessScopeContent {
    /// <p>The ID of the Network Access Scope.</p>
    #[doc(hidden)]
    pub network_insights_access_scope_id: std::option::Option<std::string::String>,
    /// <p>The paths to match.</p>
    #[doc(hidden)]
    pub match_paths: std::option::Option<std::vec::Vec<crate::model::AccessScopePath>>,
    /// <p>The paths to exclude.</p>
    #[doc(hidden)]
    pub exclude_paths: std::option::Option<std::vec::Vec<crate::model::AccessScopePath>>,
}
impl NetworkInsightsAccessScopeContent {
    /// <p>The ID of the Network Access Scope.</p>
    pub fn network_insights_access_scope_id(&self) -> std::option::Option<&str> {
        self.network_insights_access_scope_id.as_deref()
    }
    /// <p>The paths to match.</p>
    pub fn match_paths(&self) -> std::option::Option<&[crate::model::AccessScopePath]> {
        self.match_paths.as_deref()
    }
    /// <p>The paths to exclude.</p>
    pub fn exclude_paths(&self) -> std::option::Option<&[crate::model::AccessScopePath]> {
        self.exclude_paths.as_deref()
    }
}
/// See [`NetworkInsightsAccessScopeContent`](crate::model::NetworkInsightsAccessScopeContent).
pub mod network_insights_access_scope_content {

    /// A builder for [`NetworkInsightsAccessScopeContent`](crate::model::NetworkInsightsAccessScopeContent).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) network_insights_access_scope_id: std::option::Option<std::string::String>,
        pub(crate) match_paths: std::option::Option<std::vec::Vec<crate::model::AccessScopePath>>,
        pub(crate) exclude_paths: std::option::Option<std::vec::Vec<crate::model::AccessScopePath>>,
    }
    impl Builder {
        /// <p>The ID of the Network Access Scope.</p>
        pub fn network_insights_access_scope_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.network_insights_access_scope_id = Some(input.into());
            self
        }
        /// <p>The ID of the Network Access Scope.</p>
        pub fn set_network_insights_access_scope_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.network_insights_access_scope_id = input;
            self
        }
        /// Appends an item to `match_paths`.
        ///
        /// To override the contents of this collection use [`set_match_paths`](Self::set_match_paths).
        ///
        /// <p>The paths to match.</p>
        pub fn match_paths(mut self, input: crate::model::AccessScopePath) -> Self {
            let mut v = self.match_paths.unwrap_or_default();
            v.push(input);
            self.match_paths = Some(v);
            self
        }
        /// <p>The paths to match.</p>
        pub fn set_match_paths(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::AccessScopePath>>,
        ) -> Self {
            self.match_paths = input;
            self
        }
        /// Appends an item to `exclude_paths`.
        ///
        /// To override the contents of this collection use [`set_exclude_paths`](Self::set_exclude_paths).
        ///
        /// <p>The paths to exclude.</p>
        pub fn exclude_paths(mut self, input: crate::model::AccessScopePath) -> Self {
            let mut v = self.exclude_paths.unwrap_or_default();
            v.push(input);
            self.exclude_paths = Some(v);
            self
        }
        /// <p>The paths to exclude.</p>
        pub fn set_exclude_paths(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::AccessScopePath>>,
        ) -> Self {
            self.exclude_paths = input;
            self
        }
        /// Consumes the builder and constructs a [`NetworkInsightsAccessScopeContent`](crate::model::NetworkInsightsAccessScopeContent).
        pub fn build(self) -> crate::model::NetworkInsightsAccessScopeContent {
            crate::model::NetworkInsightsAccessScopeContent {
                network_insights_access_scope_id: self.network_insights_access_scope_id,
                match_paths: self.match_paths,
                exclude_paths: self.exclude_paths,
            }
        }
    }
}
impl NetworkInsightsAccessScopeContent {
    /// Creates a new builder-style object to manufacture [`NetworkInsightsAccessScopeContent`](crate::model::NetworkInsightsAccessScopeContent).
    pub fn builder() -> crate::model::network_insights_access_scope_content::Builder {
        crate::model::network_insights_access_scope_content::Builder::default()
    }
}

/// <p>Describes a path.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AccessScopePath {
    /// <p>The source.</p>
    #[doc(hidden)]
    pub source: std::option::Option<crate::model::PathStatement>,
    /// <p>The destination.</p>
    #[doc(hidden)]
    pub destination: std::option::Option<crate::model::PathStatement>,
    /// <p>The through resources.</p>
    #[doc(hidden)]
    pub through_resources:
        std::option::Option<std::vec::Vec<crate::model::ThroughResourcesStatement>>,
}
impl AccessScopePath {
    /// <p>The source.</p>
    pub fn source(&self) -> std::option::Option<&crate::model::PathStatement> {
        self.source.as_ref()
    }
    /// <p>The destination.</p>
    pub fn destination(&self) -> std::option::Option<&crate::model::PathStatement> {
        self.destination.as_ref()
    }
    /// <p>The through resources.</p>
    pub fn through_resources(
        &self,
    ) -> std::option::Option<&[crate::model::ThroughResourcesStatement]> {
        self.through_resources.as_deref()
    }
}
/// See [`AccessScopePath`](crate::model::AccessScopePath).
pub mod access_scope_path {

    /// A builder for [`AccessScopePath`](crate::model::AccessScopePath).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) source: std::option::Option<crate::model::PathStatement>,
        pub(crate) destination: std::option::Option<crate::model::PathStatement>,
        pub(crate) through_resources:
            std::option::Option<std::vec::Vec<crate::model::ThroughResourcesStatement>>,
    }
    impl Builder {
        /// <p>The source.</p>
        pub fn source(mut self, input: crate::model::PathStatement) -> Self {
            self.source = Some(input);
            self
        }
        /// <p>The source.</p>
        pub fn set_source(
            mut self,
            input: std::option::Option<crate::model::PathStatement>,
        ) -> Self {
            self.source = input;
            self
        }
        /// <p>The destination.</p>
        pub fn destination(mut self, input: crate::model::PathStatement) -> Self {
            self.destination = Some(input);
            self
        }
        /// <p>The destination.</p>
        pub fn set_destination(
            mut self,
            input: std::option::Option<crate::model::PathStatement>,
        ) -> Self {
            self.destination = input;
            self
        }
        /// Appends an item to `through_resources`.
        ///
        /// To override the contents of this collection use [`set_through_resources`](Self::set_through_resources).
        ///
        /// <p>The through resources.</p>
        pub fn through_resources(mut self, input: crate::model::ThroughResourcesStatement) -> Self {
            let mut v = self.through_resources.unwrap_or_default();
            v.push(input);
            self.through_resources = Some(v);
            self
        }
        /// <p>The through resources.</p>
        pub fn set_through_resources(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::ThroughResourcesStatement>>,
        ) -> Self {
            self.through_resources = input;
            self
        }
        /// Consumes the builder and constructs a [`AccessScopePath`](crate::model::AccessScopePath).
        pub fn build(self) -> crate::model::AccessScopePath {
            crate::model::AccessScopePath {
                source: self.source,
                destination: self.destination,
                through_resources: self.through_resources,
            }
        }
    }
}
impl AccessScopePath {
    /// Creates a new builder-style object to manufacture [`AccessScopePath`](crate::model::AccessScopePath).
    pub fn builder() -> crate::model::access_scope_path::Builder {
        crate::model::access_scope_path::Builder::default()
    }
}

/// <p>Describes a through resource statement.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ThroughResourcesStatement {
    /// <p>The resource statement.</p>
    #[doc(hidden)]
    pub resource_statement: std::option::Option<crate::model::ResourceStatement>,
}
impl ThroughResourcesStatement {
    /// <p>The resource statement.</p>
    pub fn resource_statement(&self) -> std::option::Option<&crate::model::ResourceStatement> {
        self.resource_statement.as_ref()
    }
}
/// See [`ThroughResourcesStatement`](crate::model::ThroughResourcesStatement).
pub mod through_resources_statement {

    /// A builder for [`ThroughResourcesStatement`](crate::model::ThroughResourcesStatement).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) resource_statement: std::option::Option<crate::model::ResourceStatement>,
    }
    impl Builder {
        /// <p>The resource statement.</p>
        pub fn resource_statement(mut self, input: crate::model::ResourceStatement) -> Self {
            self.resource_statement = Some(input);
            self
        }
        /// <p>The resource statement.</p>
        pub fn set_resource_statement(
            mut self,
            input: std::option::Option<crate::model::ResourceStatement>,
        ) -> Self {
            self.resource_statement = input;
            self
        }
        /// Consumes the builder and constructs a [`ThroughResourcesStatement`](crate::model::ThroughResourcesStatement).
        pub fn build(self) -> crate::model::ThroughResourcesStatement {
            crate::model::ThroughResourcesStatement {
                resource_statement: self.resource_statement,
            }
        }
    }
}
impl ThroughResourcesStatement {
    /// Creates a new builder-style object to manufacture [`ThroughResourcesStatement`](crate::model::ThroughResourcesStatement).
    pub fn builder() -> crate::model::through_resources_statement::Builder {
        crate::model::through_resources_statement::Builder::default()
    }
}

/// <p>Describes a resource statement.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ResourceStatement {
    /// <p>The resources.</p>
    #[doc(hidden)]
    pub resources: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>The resource types.</p>
    #[doc(hidden)]
    pub resource_types: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl ResourceStatement {
    /// <p>The resources.</p>
    pub fn resources(&self) -> std::option::Option<&[std::string::String]> {
        self.resources.as_deref()
    }
    /// <p>The resource types.</p>
    pub fn resource_types(&self) -> std::option::Option<&[std::string::String]> {
        self.resource_types.as_deref()
    }
}
/// See [`ResourceStatement`](crate::model::ResourceStatement).
pub mod resource_statement {

    /// A builder for [`ResourceStatement`](crate::model::ResourceStatement).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) resources: std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) resource_types: std::option::Option<std::vec::Vec<std::string::String>>,
    }
    impl Builder {
        /// Appends an item to `resources`.
        ///
        /// To override the contents of this collection use [`set_resources`](Self::set_resources).
        ///
        /// <p>The resources.</p>
        pub fn resources(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.resources.unwrap_or_default();
            v.push(input.into());
            self.resources = Some(v);
            self
        }
        /// <p>The resources.</p>
        pub fn set_resources(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.resources = input;
            self
        }
        /// Appends an item to `resource_types`.
        ///
        /// To override the contents of this collection use [`set_resource_types`](Self::set_resource_types).
        ///
        /// <p>The resource types.</p>
        pub fn resource_types(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.resource_types.unwrap_or_default();
            v.push(input.into());
            self.resource_types = Some(v);
            self
        }
        /// <p>The resource types.</p>
        pub fn set_resource_types(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.resource_types = input;
            self
        }
        /// Consumes the builder and constructs a [`ResourceStatement`](crate::model::ResourceStatement).
        pub fn build(self) -> crate::model::ResourceStatement {
            crate::model::ResourceStatement {
                resources: self.resources,
                resource_types: self.resource_types,
            }
        }
    }
}
impl ResourceStatement {
    /// Creates a new builder-style object to manufacture [`ResourceStatement`](crate::model::ResourceStatement).
    pub fn builder() -> crate::model::resource_statement::Builder {
        crate::model::resource_statement::Builder::default()
    }
}

/// <p>Describes a path statement.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct PathStatement {
    /// <p>The packet header statement.</p>
    #[doc(hidden)]
    pub packet_header_statement: std::option::Option<crate::model::PacketHeaderStatement>,
    /// <p>The resource statement.</p>
    #[doc(hidden)]
    pub resource_statement: std::option::Option<crate::model::ResourceStatement>,
}
impl PathStatement {
    /// <p>The packet header statement.</p>
    pub fn packet_header_statement(
        &self,
    ) -> std::option::Option<&crate::model::PacketHeaderStatement> {
        self.packet_header_statement.as_ref()
    }
    /// <p>The resource statement.</p>
    pub fn resource_statement(&self) -> std::option::Option<&crate::model::ResourceStatement> {
        self.resource_statement.as_ref()
    }
}
/// See [`PathStatement`](crate::model::PathStatement).
pub mod path_statement {

    /// A builder for [`PathStatement`](crate::model::PathStatement).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) packet_header_statement:
            std::option::Option<crate::model::PacketHeaderStatement>,
        pub(crate) resource_statement: std::option::Option<crate::model::ResourceStatement>,
    }
    impl Builder {
        /// <p>The packet header statement.</p>
        pub fn packet_header_statement(
            mut self,
            input: crate::model::PacketHeaderStatement,
        ) -> Self {
            self.packet_header_statement = Some(input);
            self
        }
        /// <p>The packet header statement.</p>
        pub fn set_packet_header_statement(
            mut self,
            input: std::option::Option<crate::model::PacketHeaderStatement>,
        ) -> Self {
            self.packet_header_statement = input;
            self
        }
        /// <p>The resource statement.</p>
        pub fn resource_statement(mut self, input: crate::model::ResourceStatement) -> Self {
            self.resource_statement = Some(input);
            self
        }
        /// <p>The resource statement.</p>
        pub fn set_resource_statement(
            mut self,
            input: std::option::Option<crate::model::ResourceStatement>,
        ) -> Self {
            self.resource_statement = input;
            self
        }
        /// Consumes the builder and constructs a [`PathStatement`](crate::model::PathStatement).
        pub fn build(self) -> crate::model::PathStatement {
            crate::model::PathStatement {
                packet_header_statement: self.packet_header_statement,
                resource_statement: self.resource_statement,
            }
        }
    }
}
impl PathStatement {
    /// Creates a new builder-style object to manufacture [`PathStatement`](crate::model::PathStatement).
    pub fn builder() -> crate::model::path_statement::Builder {
        crate::model::path_statement::Builder::default()
    }
}

/// <p>Describes a packet header statement.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct PacketHeaderStatement {
    /// <p>The source addresses.</p>
    #[doc(hidden)]
    pub source_addresses: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>The destination addresses.</p>
    #[doc(hidden)]
    pub destination_addresses: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>The source ports.</p>
    #[doc(hidden)]
    pub source_ports: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>The destination ports.</p>
    #[doc(hidden)]
    pub destination_ports: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>The source prefix lists.</p>
    #[doc(hidden)]
    pub source_prefix_lists: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>The destination prefix lists.</p>
    #[doc(hidden)]
    pub destination_prefix_lists: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>The protocols.</p>
    #[doc(hidden)]
    pub protocols: std::option::Option<std::vec::Vec<crate::model::Protocol>>,
}
impl PacketHeaderStatement {
    /// <p>The source addresses.</p>
    pub fn source_addresses(&self) -> std::option::Option<&[std::string::String]> {
        self.source_addresses.as_deref()
    }
    /// <p>The destination addresses.</p>
    pub fn destination_addresses(&self) -> std::option::Option<&[std::string::String]> {
        self.destination_addresses.as_deref()
    }
    /// <p>The source ports.</p>
    pub fn source_ports(&self) -> std::option::Option<&[std::string::String]> {
        self.source_ports.as_deref()
    }
    /// <p>The destination ports.</p>
    pub fn destination_ports(&self) -> std::option::Option<&[std::string::String]> {
        self.destination_ports.as_deref()
    }
    /// <p>The source prefix lists.</p>
    pub fn source_prefix_lists(&self) -> std::option::Option<&[std::string::String]> {
        self.source_prefix_lists.as_deref()
    }
    /// <p>The destination prefix lists.</p>
    pub fn destination_prefix_lists(&self) -> std::option::Option<&[std::string::String]> {
        self.destination_prefix_lists.as_deref()
    }
    /// <p>The protocols.</p>
    pub fn protocols(&self) -> std::option::Option<&[crate::model::Protocol]> {
        self.protocols.as_deref()
    }
}
/// See [`PacketHeaderStatement`](crate::model::PacketHeaderStatement).
pub mod packet_header_statement {

    /// A builder for [`PacketHeaderStatement`](crate::model::PacketHeaderStatement).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) source_addresses: std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) destination_addresses: std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) source_ports: std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) destination_ports: std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) source_prefix_lists: std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) destination_prefix_lists:
            std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) protocols: std::option::Option<std::vec::Vec<crate::model::Protocol>>,
    }
    impl Builder {
        /// Appends an item to `source_addresses`.
        ///
        /// To override the contents of this collection use [`set_source_addresses`](Self::set_source_addresses).
        ///
        /// <p>The source addresses.</p>
        pub fn source_addresses(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.source_addresses.unwrap_or_default();
            v.push(input.into());
            self.source_addresses = Some(v);
            self
        }
        /// <p>The source addresses.</p>
        pub fn set_source_addresses(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.source_addresses = input;
            self
        }
        /// Appends an item to `destination_addresses`.
        ///
        /// To override the contents of this collection use [`set_destination_addresses`](Self::set_destination_addresses).
        ///
        /// <p>The destination addresses.</p>
        pub fn destination_addresses(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.destination_addresses.unwrap_or_default();
            v.push(input.into());
            self.destination_addresses = Some(v);
            self
        }
        /// <p>The destination addresses.</p>
        pub fn set_destination_addresses(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.destination_addresses = input;
            self
        }
        /// Appends an item to `source_ports`.
        ///
        /// To override the contents of this collection use [`set_source_ports`](Self::set_source_ports).
        ///
        /// <p>The source ports.</p>
        pub fn source_ports(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.source_ports.unwrap_or_default();
            v.push(input.into());
            self.source_ports = Some(v);
            self
        }
        /// <p>The source ports.</p>
        pub fn set_source_ports(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.source_ports = input;
            self
        }
        /// Appends an item to `destination_ports`.
        ///
        /// To override the contents of this collection use [`set_destination_ports`](Self::set_destination_ports).
        ///
        /// <p>The destination ports.</p>
        pub fn destination_ports(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.destination_ports.unwrap_or_default();
            v.push(input.into());
            self.destination_ports = Some(v);
            self
        }
        /// <p>The destination ports.</p>
        pub fn set_destination_ports(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.destination_ports = input;
            self
        }
        /// Appends an item to `source_prefix_lists`.
        ///
        /// To override the contents of this collection use [`set_source_prefix_lists`](Self::set_source_prefix_lists).
        ///
        /// <p>The source prefix lists.</p>
        pub fn source_prefix_lists(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.source_prefix_lists.unwrap_or_default();
            v.push(input.into());
            self.source_prefix_lists = Some(v);
            self
        }
        /// <p>The source prefix lists.</p>
        pub fn set_source_prefix_lists(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.source_prefix_lists = input;
            self
        }
        /// Appends an item to `destination_prefix_lists`.
        ///
        /// To override the contents of this collection use [`set_destination_prefix_lists`](Self::set_destination_prefix_lists).
        ///
        /// <p>The destination prefix lists.</p>
        pub fn destination_prefix_lists(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.destination_prefix_lists.unwrap_or_default();
            v.push(input.into());
            self.destination_prefix_lists = Some(v);
            self
        }
        /// <p>The destination prefix lists.</p>
        pub fn set_destination_prefix_lists(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.destination_prefix_lists = input;
            self
        }
        /// Appends an item to `protocols`.
        ///
        /// To override the contents of this collection use [`set_protocols`](Self::set_protocols).
        ///
        /// <p>The protocols.</p>
        pub fn protocols(mut self, input: crate::model::Protocol) -> Self {
            let mut v = self.protocols.unwrap_or_default();
            v.push(input);
            self.protocols = Some(v);
            self
        }
        /// <p>The protocols.</p>
        pub fn set_protocols(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Protocol>>,
        ) -> Self {
            self.protocols = input;
            self
        }
        /// Consumes the builder and constructs a [`PacketHeaderStatement`](crate::model::PacketHeaderStatement).
        pub fn build(self) -> crate::model::PacketHeaderStatement {
            crate::model::PacketHeaderStatement {
                source_addresses: self.source_addresses,
                destination_addresses: self.destination_addresses,
                source_ports: self.source_ports,
                destination_ports: self.destination_ports,
                source_prefix_lists: self.source_prefix_lists,
                destination_prefix_lists: self.destination_prefix_lists,
                protocols: self.protocols,
            }
        }
    }
}
impl PacketHeaderStatement {
    /// Creates a new builder-style object to manufacture [`PacketHeaderStatement`](crate::model::PacketHeaderStatement).
    pub fn builder() -> crate::model::packet_header_statement::Builder {
        crate::model::packet_header_statement::Builder::default()
    }
}

/// When writing a match expression against `Protocol`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let protocol = unimplemented!();
/// match protocol {
///     Protocol::Tcp => { /* ... */ },
///     Protocol::Udp => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `protocol` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `Protocol::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `Protocol::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `Protocol::NewFeature` is defined.
/// Specifically, when `protocol` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `Protocol::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 Protocol {
    #[allow(missing_docs)] // documentation missing in model
    Tcp,
    #[allow(missing_docs)] // documentation missing in model
    Udp,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for Protocol {
    fn from(s: &str) -> Self {
        match s {
            "tcp" => Protocol::Tcp,
            "udp" => Protocol::Udp,
            other => Protocol::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for Protocol {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(Protocol::from(s))
    }
}
impl Protocol {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            Protocol::Tcp => "tcp",
            Protocol::Udp => "udp",
            Protocol::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["tcp", "udp"]
    }
}
impl AsRef<str> for Protocol {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes a finding for a Network Access Scope.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AccessScopeAnalysisFinding {
    /// <p>The ID of the Network Access Scope analysis.</p>
    #[doc(hidden)]
    pub network_insights_access_scope_analysis_id: std::option::Option<std::string::String>,
    /// <p>The ID of the Network Access Scope.</p>
    #[doc(hidden)]
    pub network_insights_access_scope_id: std::option::Option<std::string::String>,
    /// <p>The ID of the finding.</p>
    #[doc(hidden)]
    pub finding_id: std::option::Option<std::string::String>,
    /// <p>The finding components.</p>
    #[doc(hidden)]
    pub finding_components: std::option::Option<std::vec::Vec<crate::model::PathComponent>>,
}
impl AccessScopeAnalysisFinding {
    /// <p>The ID of the Network Access Scope analysis.</p>
    pub fn network_insights_access_scope_analysis_id(&self) -> std::option::Option<&str> {
        self.network_insights_access_scope_analysis_id.as_deref()
    }
    /// <p>The ID of the Network Access Scope.</p>
    pub fn network_insights_access_scope_id(&self) -> std::option::Option<&str> {
        self.network_insights_access_scope_id.as_deref()
    }
    /// <p>The ID of the finding.</p>
    pub fn finding_id(&self) -> std::option::Option<&str> {
        self.finding_id.as_deref()
    }
    /// <p>The finding components.</p>
    pub fn finding_components(&self) -> std::option::Option<&[crate::model::PathComponent]> {
        self.finding_components.as_deref()
    }
}
/// See [`AccessScopeAnalysisFinding`](crate::model::AccessScopeAnalysisFinding).
pub mod access_scope_analysis_finding {

    /// A builder for [`AccessScopeAnalysisFinding`](crate::model::AccessScopeAnalysisFinding).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) network_insights_access_scope_analysis_id:
            std::option::Option<std::string::String>,
        pub(crate) network_insights_access_scope_id: std::option::Option<std::string::String>,
        pub(crate) finding_id: std::option::Option<std::string::String>,
        pub(crate) finding_components:
            std::option::Option<std::vec::Vec<crate::model::PathComponent>>,
    }
    impl Builder {
        /// <p>The ID of the Network Access Scope analysis.</p>
        pub fn network_insights_access_scope_analysis_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.network_insights_access_scope_analysis_id = Some(input.into());
            self
        }
        /// <p>The ID of the Network Access Scope analysis.</p>
        pub fn set_network_insights_access_scope_analysis_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.network_insights_access_scope_analysis_id = input;
            self
        }
        /// <p>The ID of the Network Access Scope.</p>
        pub fn network_insights_access_scope_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.network_insights_access_scope_id = Some(input.into());
            self
        }
        /// <p>The ID of the Network Access Scope.</p>
        pub fn set_network_insights_access_scope_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.network_insights_access_scope_id = input;
            self
        }
        /// <p>The ID of the finding.</p>
        pub fn finding_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.finding_id = Some(input.into());
            self
        }
        /// <p>The ID of the finding.</p>
        pub fn set_finding_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.finding_id = input;
            self
        }
        /// Appends an item to `finding_components`.
        ///
        /// To override the contents of this collection use [`set_finding_components`](Self::set_finding_components).
        ///
        /// <p>The finding components.</p>
        pub fn finding_components(mut self, input: crate::model::PathComponent) -> Self {
            let mut v = self.finding_components.unwrap_or_default();
            v.push(input);
            self.finding_components = Some(v);
            self
        }
        /// <p>The finding components.</p>
        pub fn set_finding_components(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::PathComponent>>,
        ) -> Self {
            self.finding_components = input;
            self
        }
        /// Consumes the builder and constructs a [`AccessScopeAnalysisFinding`](crate::model::AccessScopeAnalysisFinding).
        pub fn build(self) -> crate::model::AccessScopeAnalysisFinding {
            crate::model::AccessScopeAnalysisFinding {
                network_insights_access_scope_analysis_id: self
                    .network_insights_access_scope_analysis_id,
                network_insights_access_scope_id: self.network_insights_access_scope_id,
                finding_id: self.finding_id,
                finding_components: self.finding_components,
            }
        }
    }
}
impl AccessScopeAnalysisFinding {
    /// Creates a new builder-style object to manufacture [`AccessScopeAnalysisFinding`](crate::model::AccessScopeAnalysisFinding).
    pub fn builder() -> crate::model::access_scope_analysis_finding::Builder {
        crate::model::access_scope_analysis_finding::Builder::default()
    }
}

/// <p>Describes a prefix list entry.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct PrefixListEntry {
    /// <p>The CIDR block.</p>
    #[doc(hidden)]
    pub cidr: std::option::Option<std::string::String>,
    /// <p>The description.</p>
    #[doc(hidden)]
    pub description: std::option::Option<std::string::String>,
}
impl PrefixListEntry {
    /// <p>The CIDR block.</p>
    pub fn cidr(&self) -> std::option::Option<&str> {
        self.cidr.as_deref()
    }
    /// <p>The description.</p>
    pub fn description(&self) -> std::option::Option<&str> {
        self.description.as_deref()
    }
}
/// See [`PrefixListEntry`](crate::model::PrefixListEntry).
pub mod prefix_list_entry {

    /// A builder for [`PrefixListEntry`](crate::model::PrefixListEntry).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) cidr: std::option::Option<std::string::String>,
        pub(crate) description: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The CIDR block.</p>
        pub fn cidr(mut self, input: impl Into<std::string::String>) -> Self {
            self.cidr = Some(input.into());
            self
        }
        /// <p>The CIDR block.</p>
        pub fn set_cidr(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.cidr = input;
            self
        }
        /// <p>The description.</p>
        pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
            self.description = Some(input.into());
            self
        }
        /// <p>The description.</p>
        pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.description = input;
            self
        }
        /// Consumes the builder and constructs a [`PrefixListEntry`](crate::model::PrefixListEntry).
        pub fn build(self) -> crate::model::PrefixListEntry {
            crate::model::PrefixListEntry {
                cidr: self.cidr,
                description: self.description,
            }
        }
    }
}
impl PrefixListEntry {
    /// Creates a new builder-style object to manufacture [`PrefixListEntry`](crate::model::PrefixListEntry).
    pub fn builder() -> crate::model::prefix_list_entry::Builder {
        crate::model::prefix_list_entry::Builder::default()
    }
}

/// <p>Describes the resource with which a prefix list is associated.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct PrefixListAssociation {
    /// <p>The ID of the resource.</p>
    #[doc(hidden)]
    pub resource_id: std::option::Option<std::string::String>,
    /// <p>The owner of the resource.</p>
    #[doc(hidden)]
    pub resource_owner: std::option::Option<std::string::String>,
}
impl PrefixListAssociation {
    /// <p>The ID of the resource.</p>
    pub fn resource_id(&self) -> std::option::Option<&str> {
        self.resource_id.as_deref()
    }
    /// <p>The owner of the resource.</p>
    pub fn resource_owner(&self) -> std::option::Option<&str> {
        self.resource_owner.as_deref()
    }
}
/// See [`PrefixListAssociation`](crate::model::PrefixListAssociation).
pub mod prefix_list_association {

    /// A builder for [`PrefixListAssociation`](crate::model::PrefixListAssociation).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) resource_id: std::option::Option<std::string::String>,
        pub(crate) resource_owner: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The ID of the resource.</p>
        pub fn resource_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.resource_id = Some(input.into());
            self
        }
        /// <p>The ID of the resource.</p>
        pub fn set_resource_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.resource_id = input;
            self
        }
        /// <p>The owner of the resource.</p>
        pub fn resource_owner(mut self, input: impl Into<std::string::String>) -> Self {
            self.resource_owner = Some(input.into());
            self
        }
        /// <p>The owner of the resource.</p>
        pub fn set_resource_owner(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.resource_owner = input;
            self
        }
        /// Consumes the builder and constructs a [`PrefixListAssociation`](crate::model::PrefixListAssociation).
        pub fn build(self) -> crate::model::PrefixListAssociation {
            crate::model::PrefixListAssociation {
                resource_id: self.resource_id,
                resource_owner: self.resource_owner,
            }
        }
    }
}
impl PrefixListAssociation {
    /// Creates a new builder-style object to manufacture [`PrefixListAssociation`](crate::model::PrefixListAssociation).
    pub fn builder() -> crate::model::prefix_list_association::Builder {
        crate::model::prefix_list_association::Builder::default()
    }
}

/// <p>The information for a launch template. </p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ResponseLaunchTemplateData {
    /// <p>The ID of the kernel, if applicable.</p>
    #[doc(hidden)]
    pub kernel_id: std::option::Option<std::string::String>,
    /// <p>Indicates whether the instance is optimized for Amazon EBS I/O. </p>
    #[doc(hidden)]
    pub ebs_optimized: std::option::Option<bool>,
    /// <p>The IAM instance profile.</p>
    #[doc(hidden)]
    pub iam_instance_profile:
        std::option::Option<crate::model::LaunchTemplateIamInstanceProfileSpecification>,
    /// <p>The block device mappings.</p>
    #[doc(hidden)]
    pub block_device_mappings:
        std::option::Option<std::vec::Vec<crate::model::LaunchTemplateBlockDeviceMapping>>,
    /// <p>The network interfaces.</p>
    #[doc(hidden)]
    pub network_interfaces: std::option::Option<
        std::vec::Vec<crate::model::LaunchTemplateInstanceNetworkInterfaceSpecification>,
    >,
    /// <p>The ID of the AMI or a Systems Manager parameter. The Systems Manager parameter will resolve to the ID of the AMI at instance launch.</p>
    /// <p>The value depends on what you specified in the request. The possible values are:</p>
    /// <ul>
    /// <li> <p>If an AMI ID was specified in the request, then this is the AMI ID.</p> </li>
    /// <li> <p>If a Systems Manager parameter was specified in the request, and <code>ResolveAlias</code> was configured as <code>true</code>, then this is the AMI ID that the parameter is mapped to in the Parameter Store.</p> </li>
    /// <li> <p>If a Systems Manager parameter was specified in the request, and <code>ResolveAlias</code> was configured as <code>false</code>, then this is the parameter value.</p> </li>
    /// </ul>
    /// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html#use-an-ssm-parameter-instead-of-an-ami-id">Use a Systems Manager parameter instead of an AMI ID</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
    #[doc(hidden)]
    pub image_id: std::option::Option<std::string::String>,
    /// <p>The instance type.</p>
    #[doc(hidden)]
    pub instance_type: std::option::Option<crate::model::InstanceType>,
    /// <p>The name of the key pair.</p>
    #[doc(hidden)]
    pub key_name: std::option::Option<std::string::String>,
    /// <p>The monitoring for the instance.</p>
    #[doc(hidden)]
    pub monitoring: std::option::Option<crate::model::LaunchTemplatesMonitoring>,
    /// <p>The placement of the instance.</p>
    #[doc(hidden)]
    pub placement: std::option::Option<crate::model::LaunchTemplatePlacement>,
    /// <p>The ID of the RAM disk, if applicable.</p>
    #[doc(hidden)]
    pub ram_disk_id: std::option::Option<std::string::String>,
    /// <p>If set to <code>true</code>, indicates that the instance cannot be terminated using the Amazon EC2 console, command line tool, or API.</p>
    #[doc(hidden)]
    pub disable_api_termination: std::option::Option<bool>,
    /// <p>Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).</p>
    #[doc(hidden)]
    pub instance_initiated_shutdown_behavior: std::option::Option<crate::model::ShutdownBehavior>,
    /// <p>The user data for the instance. </p>
    #[doc(hidden)]
    pub user_data: std::option::Option<std::string::String>,
    /// <p>The tags that are applied to the resources that are created during instance launch.</p>
    #[doc(hidden)]
    pub tag_specifications:
        std::option::Option<std::vec::Vec<crate::model::LaunchTemplateTagSpecification>>,
    /// <p>The elastic GPU specification.</p>
    #[doc(hidden)]
    pub elastic_gpu_specifications:
        std::option::Option<std::vec::Vec<crate::model::ElasticGpuSpecificationResponse>>,
    /// <p> The elastic inference accelerator for the instance. </p>
    #[doc(hidden)]
    pub elastic_inference_accelerators: std::option::Option<
        std::vec::Vec<crate::model::LaunchTemplateElasticInferenceAcceleratorResponse>,
    >,
    /// <p>The security group IDs.</p>
    #[doc(hidden)]
    pub security_group_ids: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>The security group names.</p>
    #[doc(hidden)]
    pub security_groups: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>The market (purchasing) option for the instances.</p>
    #[doc(hidden)]
    pub instance_market_options:
        std::option::Option<crate::model::LaunchTemplateInstanceMarketOptions>,
    /// <p>The credit option for CPU usage of the instance.</p>
    #[doc(hidden)]
    pub credit_specification: std::option::Option<crate::model::CreditSpecification>,
    /// <p>The CPU options for the instance. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html">Optimizing CPU options</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
    #[doc(hidden)]
    pub cpu_options: std::option::Option<crate::model::LaunchTemplateCpuOptions>,
    /// <p>Information about the Capacity Reservation targeting option.</p>
    #[doc(hidden)]
    pub capacity_reservation_specification:
        std::option::Option<crate::model::LaunchTemplateCapacityReservationSpecificationResponse>,
    /// <p>The license configurations.</p>
    #[doc(hidden)]
    pub license_specifications:
        std::option::Option<std::vec::Vec<crate::model::LaunchTemplateLicenseConfiguration>>,
    /// <p>Indicates whether an instance is configured for hibernation. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html">Hibernate your instance</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
    #[doc(hidden)]
    pub hibernation_options: std::option::Option<crate::model::LaunchTemplateHibernationOptions>,
    /// <p>The metadata options for the instance. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html">Instance metadata and user data</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
    #[doc(hidden)]
    pub metadata_options: std::option::Option<crate::model::LaunchTemplateInstanceMetadataOptions>,
    /// <p>Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves.</p>
    #[doc(hidden)]
    pub enclave_options: std::option::Option<crate::model::LaunchTemplateEnclaveOptions>,
    /// <p>The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with these attributes.</p>
    /// <p>If you specify <code>InstanceRequirements</code>, you can't specify <code>InstanceTypes</code>.</p>
    #[doc(hidden)]
    pub instance_requirements: std::option::Option<crate::model::InstanceRequirements>,
    /// <p>The options for the instance hostname.</p>
    #[doc(hidden)]
    pub private_dns_name_options:
        std::option::Option<crate::model::LaunchTemplatePrivateDnsNameOptions>,
    /// <p>The maintenance options for your instance.</p>
    #[doc(hidden)]
    pub maintenance_options:
        std::option::Option<crate::model::LaunchTemplateInstanceMaintenanceOptions>,
    /// <p>Indicates whether the instance is enabled for stop protection. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Stop_Start.html#Using_StopProtection">Stop protection</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
    #[doc(hidden)]
    pub disable_api_stop: std::option::Option<bool>,
}
impl ResponseLaunchTemplateData {
    /// <p>The ID of the kernel, if applicable.</p>
    pub fn kernel_id(&self) -> std::option::Option<&str> {
        self.kernel_id.as_deref()
    }
    /// <p>Indicates whether the instance is optimized for Amazon EBS I/O. </p>
    pub fn ebs_optimized(&self) -> std::option::Option<bool> {
        self.ebs_optimized
    }
    /// <p>The IAM instance profile.</p>
    pub fn iam_instance_profile(
        &self,
    ) -> std::option::Option<&crate::model::LaunchTemplateIamInstanceProfileSpecification> {
        self.iam_instance_profile.as_ref()
    }
    /// <p>The block device mappings.</p>
    pub fn block_device_mappings(
        &self,
    ) -> std::option::Option<&[crate::model::LaunchTemplateBlockDeviceMapping]> {
        self.block_device_mappings.as_deref()
    }
    /// <p>The network interfaces.</p>
    pub fn network_interfaces(
        &self,
    ) -> std::option::Option<&[crate::model::LaunchTemplateInstanceNetworkInterfaceSpecification]>
    {
        self.network_interfaces.as_deref()
    }
    /// <p>The ID of the AMI or a Systems Manager parameter. The Systems Manager parameter will resolve to the ID of the AMI at instance launch.</p>
    /// <p>The value depends on what you specified in the request. The possible values are:</p>
    /// <ul>
    /// <li> <p>If an AMI ID was specified in the request, then this is the AMI ID.</p> </li>
    /// <li> <p>If a Systems Manager parameter was specified in the request, and <code>ResolveAlias</code> was configured as <code>true</code>, then this is the AMI ID that the parameter is mapped to in the Parameter Store.</p> </li>
    /// <li> <p>If a Systems Manager parameter was specified in the request, and <code>ResolveAlias</code> was configured as <code>false</code>, then this is the parameter value.</p> </li>
    /// </ul>
    /// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html#use-an-ssm-parameter-instead-of-an-ami-id">Use a Systems Manager parameter instead of an AMI ID</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
    pub fn image_id(&self) -> std::option::Option<&str> {
        self.image_id.as_deref()
    }
    /// <p>The instance type.</p>
    pub fn instance_type(&self) -> std::option::Option<&crate::model::InstanceType> {
        self.instance_type.as_ref()
    }
    /// <p>The name of the key pair.</p>
    pub fn key_name(&self) -> std::option::Option<&str> {
        self.key_name.as_deref()
    }
    /// <p>The monitoring for the instance.</p>
    pub fn monitoring(&self) -> std::option::Option<&crate::model::LaunchTemplatesMonitoring> {
        self.monitoring.as_ref()
    }
    /// <p>The placement of the instance.</p>
    pub fn placement(&self) -> std::option::Option<&crate::model::LaunchTemplatePlacement> {
        self.placement.as_ref()
    }
    /// <p>The ID of the RAM disk, if applicable.</p>
    pub fn ram_disk_id(&self) -> std::option::Option<&str> {
        self.ram_disk_id.as_deref()
    }
    /// <p>If set to <code>true</code>, indicates that the instance cannot be terminated using the Amazon EC2 console, command line tool, or API.</p>
    pub fn disable_api_termination(&self) -> std::option::Option<bool> {
        self.disable_api_termination
    }
    /// <p>Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).</p>
    pub fn instance_initiated_shutdown_behavior(
        &self,
    ) -> std::option::Option<&crate::model::ShutdownBehavior> {
        self.instance_initiated_shutdown_behavior.as_ref()
    }
    /// <p>The user data for the instance. </p>
    pub fn user_data(&self) -> std::option::Option<&str> {
        self.user_data.as_deref()
    }
    /// <p>The tags that are applied to the resources that are created during instance launch.</p>
    pub fn tag_specifications(
        &self,
    ) -> std::option::Option<&[crate::model::LaunchTemplateTagSpecification]> {
        self.tag_specifications.as_deref()
    }
    /// <p>The elastic GPU specification.</p>
    pub fn elastic_gpu_specifications(
        &self,
    ) -> std::option::Option<&[crate::model::ElasticGpuSpecificationResponse]> {
        self.elastic_gpu_specifications.as_deref()
    }
    /// <p> The elastic inference accelerator for the instance. </p>
    pub fn elastic_inference_accelerators(
        &self,
    ) -> std::option::Option<&[crate::model::LaunchTemplateElasticInferenceAcceleratorResponse]>
    {
        self.elastic_inference_accelerators.as_deref()
    }
    /// <p>The security group IDs.</p>
    pub fn security_group_ids(&self) -> std::option::Option<&[std::string::String]> {
        self.security_group_ids.as_deref()
    }
    /// <p>The security group names.</p>
    pub fn security_groups(&self) -> std::option::Option<&[std::string::String]> {
        self.security_groups.as_deref()
    }
    /// <p>The market (purchasing) option for the instances.</p>
    pub fn instance_market_options(
        &self,
    ) -> std::option::Option<&crate::model::LaunchTemplateInstanceMarketOptions> {
        self.instance_market_options.as_ref()
    }
    /// <p>The credit option for CPU usage of the instance.</p>
    pub fn credit_specification(&self) -> std::option::Option<&crate::model::CreditSpecification> {
        self.credit_specification.as_ref()
    }
    /// <p>The CPU options for the instance. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html">Optimizing CPU options</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
    pub fn cpu_options(&self) -> std::option::Option<&crate::model::LaunchTemplateCpuOptions> {
        self.cpu_options.as_ref()
    }
    /// <p>Information about the Capacity Reservation targeting option.</p>
    pub fn capacity_reservation_specification(
        &self,
    ) -> std::option::Option<&crate::model::LaunchTemplateCapacityReservationSpecificationResponse>
    {
        self.capacity_reservation_specification.as_ref()
    }
    /// <p>The license configurations.</p>
    pub fn license_specifications(
        &self,
    ) -> std::option::Option<&[crate::model::LaunchTemplateLicenseConfiguration]> {
        self.license_specifications.as_deref()
    }
    /// <p>Indicates whether an instance is configured for hibernation. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html">Hibernate your instance</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
    pub fn hibernation_options(
        &self,
    ) -> std::option::Option<&crate::model::LaunchTemplateHibernationOptions> {
        self.hibernation_options.as_ref()
    }
    /// <p>The metadata options for the instance. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html">Instance metadata and user data</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
    pub fn metadata_options(
        &self,
    ) -> std::option::Option<&crate::model::LaunchTemplateInstanceMetadataOptions> {
        self.metadata_options.as_ref()
    }
    /// <p>Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves.</p>
    pub fn enclave_options(
        &self,
    ) -> std::option::Option<&crate::model::LaunchTemplateEnclaveOptions> {
        self.enclave_options.as_ref()
    }
    /// <p>The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with these attributes.</p>
    /// <p>If you specify <code>InstanceRequirements</code>, you can't specify <code>InstanceTypes</code>.</p>
    pub fn instance_requirements(
        &self,
    ) -> std::option::Option<&crate::model::InstanceRequirements> {
        self.instance_requirements.as_ref()
    }
    /// <p>The options for the instance hostname.</p>
    pub fn private_dns_name_options(
        &self,
    ) -> std::option::Option<&crate::model::LaunchTemplatePrivateDnsNameOptions> {
        self.private_dns_name_options.as_ref()
    }
    /// <p>The maintenance options for your instance.</p>
    pub fn maintenance_options(
        &self,
    ) -> std::option::Option<&crate::model::LaunchTemplateInstanceMaintenanceOptions> {
        self.maintenance_options.as_ref()
    }
    /// <p>Indicates whether the instance is enabled for stop protection. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Stop_Start.html#Using_StopProtection">Stop protection</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
    pub fn disable_api_stop(&self) -> std::option::Option<bool> {
        self.disable_api_stop
    }
}
/// See [`ResponseLaunchTemplateData`](crate::model::ResponseLaunchTemplateData).
pub mod response_launch_template_data {

    /// A builder for [`ResponseLaunchTemplateData`](crate::model::ResponseLaunchTemplateData).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) kernel_id: std::option::Option<std::string::String>,
        pub(crate) ebs_optimized: std::option::Option<bool>,
        pub(crate) iam_instance_profile:
            std::option::Option<crate::model::LaunchTemplateIamInstanceProfileSpecification>,
        pub(crate) block_device_mappings:
            std::option::Option<std::vec::Vec<crate::model::LaunchTemplateBlockDeviceMapping>>,
        pub(crate) network_interfaces: std::option::Option<
            std::vec::Vec<crate::model::LaunchTemplateInstanceNetworkInterfaceSpecification>,
        >,
        pub(crate) image_id: std::option::Option<std::string::String>,
        pub(crate) instance_type: std::option::Option<crate::model::InstanceType>,
        pub(crate) key_name: std::option::Option<std::string::String>,
        pub(crate) monitoring: std::option::Option<crate::model::LaunchTemplatesMonitoring>,
        pub(crate) placement: std::option::Option<crate::model::LaunchTemplatePlacement>,
        pub(crate) ram_disk_id: std::option::Option<std::string::String>,
        pub(crate) disable_api_termination: std::option::Option<bool>,
        pub(crate) instance_initiated_shutdown_behavior:
            std::option::Option<crate::model::ShutdownBehavior>,
        pub(crate) user_data: std::option::Option<std::string::String>,
        pub(crate) tag_specifications:
            std::option::Option<std::vec::Vec<crate::model::LaunchTemplateTagSpecification>>,
        pub(crate) elastic_gpu_specifications:
            std::option::Option<std::vec::Vec<crate::model::ElasticGpuSpecificationResponse>>,
        pub(crate) elastic_inference_accelerators: std::option::Option<
            std::vec::Vec<crate::model::LaunchTemplateElasticInferenceAcceleratorResponse>,
        >,
        pub(crate) security_group_ids: std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) security_groups: std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) instance_market_options:
            std::option::Option<crate::model::LaunchTemplateInstanceMarketOptions>,
        pub(crate) credit_specification: std::option::Option<crate::model::CreditSpecification>,
        pub(crate) cpu_options: std::option::Option<crate::model::LaunchTemplateCpuOptions>,
        pub(crate) capacity_reservation_specification: std::option::Option<
            crate::model::LaunchTemplateCapacityReservationSpecificationResponse,
        >,
        pub(crate) license_specifications:
            std::option::Option<std::vec::Vec<crate::model::LaunchTemplateLicenseConfiguration>>,
        pub(crate) hibernation_options:
            std::option::Option<crate::model::LaunchTemplateHibernationOptions>,
        pub(crate) metadata_options:
            std::option::Option<crate::model::LaunchTemplateInstanceMetadataOptions>,
        pub(crate) enclave_options: std::option::Option<crate::model::LaunchTemplateEnclaveOptions>,
        pub(crate) instance_requirements: std::option::Option<crate::model::InstanceRequirements>,
        pub(crate) private_dns_name_options:
            std::option::Option<crate::model::LaunchTemplatePrivateDnsNameOptions>,
        pub(crate) maintenance_options:
            std::option::Option<crate::model::LaunchTemplateInstanceMaintenanceOptions>,
        pub(crate) disable_api_stop: std::option::Option<bool>,
    }
    impl Builder {
        /// <p>The ID of the kernel, if applicable.</p>
        pub fn kernel_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.kernel_id = Some(input.into());
            self
        }
        /// <p>The ID of the kernel, if applicable.</p>
        pub fn set_kernel_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.kernel_id = input;
            self
        }
        /// <p>Indicates whether the instance is optimized for Amazon EBS I/O. </p>
        pub fn ebs_optimized(mut self, input: bool) -> Self {
            self.ebs_optimized = Some(input);
            self
        }
        /// <p>Indicates whether the instance is optimized for Amazon EBS I/O. </p>
        pub fn set_ebs_optimized(mut self, input: std::option::Option<bool>) -> Self {
            self.ebs_optimized = input;
            self
        }
        /// <p>The IAM instance profile.</p>
        pub fn iam_instance_profile(
            mut self,
            input: crate::model::LaunchTemplateIamInstanceProfileSpecification,
        ) -> Self {
            self.iam_instance_profile = Some(input);
            self
        }
        /// <p>The IAM instance profile.</p>
        pub fn set_iam_instance_profile(
            mut self,
            input: std::option::Option<crate::model::LaunchTemplateIamInstanceProfileSpecification>,
        ) -> Self {
            self.iam_instance_profile = input;
            self
        }
        /// Appends an item to `block_device_mappings`.
        ///
        /// To override the contents of this collection use [`set_block_device_mappings`](Self::set_block_device_mappings).
        ///
        /// <p>The block device mappings.</p>
        pub fn block_device_mappings(
            mut self,
            input: crate::model::LaunchTemplateBlockDeviceMapping,
        ) -> Self {
            let mut v = self.block_device_mappings.unwrap_or_default();
            v.push(input);
            self.block_device_mappings = Some(v);
            self
        }
        /// <p>The block device mappings.</p>
        pub fn set_block_device_mappings(
            mut self,
            input: std::option::Option<
                std::vec::Vec<crate::model::LaunchTemplateBlockDeviceMapping>,
            >,
        ) -> Self {
            self.block_device_mappings = input;
            self
        }
        /// Appends an item to `network_interfaces`.
        ///
        /// To override the contents of this collection use [`set_network_interfaces`](Self::set_network_interfaces).
        ///
        /// <p>The network interfaces.</p>
        pub fn network_interfaces(
            mut self,
            input: crate::model::LaunchTemplateInstanceNetworkInterfaceSpecification,
        ) -> Self {
            let mut v = self.network_interfaces.unwrap_or_default();
            v.push(input);
            self.network_interfaces = Some(v);
            self
        }
        /// <p>The network interfaces.</p>
        pub fn set_network_interfaces(
            mut self,
            input: std::option::Option<
                std::vec::Vec<crate::model::LaunchTemplateInstanceNetworkInterfaceSpecification>,
            >,
        ) -> Self {
            self.network_interfaces = input;
            self
        }
        /// <p>The ID of the AMI or a Systems Manager parameter. The Systems Manager parameter will resolve to the ID of the AMI at instance launch.</p>
        /// <p>The value depends on what you specified in the request. The possible values are:</p>
        /// <ul>
        /// <li> <p>If an AMI ID was specified in the request, then this is the AMI ID.</p> </li>
        /// <li> <p>If a Systems Manager parameter was specified in the request, and <code>ResolveAlias</code> was configured as <code>true</code>, then this is the AMI ID that the parameter is mapped to in the Parameter Store.</p> </li>
        /// <li> <p>If a Systems Manager parameter was specified in the request, and <code>ResolveAlias</code> was configured as <code>false</code>, then this is the parameter value.</p> </li>
        /// </ul>
        /// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html#use-an-ssm-parameter-instead-of-an-ami-id">Use a Systems Manager parameter instead of an AMI ID</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
        pub fn image_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.image_id = Some(input.into());
            self
        }
        /// <p>The ID of the AMI or a Systems Manager parameter. The Systems Manager parameter will resolve to the ID of the AMI at instance launch.</p>
        /// <p>The value depends on what you specified in the request. The possible values are:</p>
        /// <ul>
        /// <li> <p>If an AMI ID was specified in the request, then this is the AMI ID.</p> </li>
        /// <li> <p>If a Systems Manager parameter was specified in the request, and <code>ResolveAlias</code> was configured as <code>true</code>, then this is the AMI ID that the parameter is mapped to in the Parameter Store.</p> </li>
        /// <li> <p>If a Systems Manager parameter was specified in the request, and <code>ResolveAlias</code> was configured as <code>false</code>, then this is the parameter value.</p> </li>
        /// </ul>
        /// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html#use-an-ssm-parameter-instead-of-an-ami-id">Use a Systems Manager parameter instead of an AMI ID</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
        pub fn set_image_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.image_id = input;
            self
        }
        /// <p>The instance type.</p>
        pub fn instance_type(mut self, input: crate::model::InstanceType) -> Self {
            self.instance_type = Some(input);
            self
        }
        /// <p>The instance type.</p>
        pub fn set_instance_type(
            mut self,
            input: std::option::Option<crate::model::InstanceType>,
        ) -> Self {
            self.instance_type = input;
            self
        }
        /// <p>The name of the key pair.</p>
        pub fn key_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.key_name = Some(input.into());
            self
        }
        /// <p>The name of the key pair.</p>
        pub fn set_key_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.key_name = input;
            self
        }
        /// <p>The monitoring for the instance.</p>
        pub fn monitoring(mut self, input: crate::model::LaunchTemplatesMonitoring) -> Self {
            self.monitoring = Some(input);
            self
        }
        /// <p>The monitoring for the instance.</p>
        pub fn set_monitoring(
            mut self,
            input: std::option::Option<crate::model::LaunchTemplatesMonitoring>,
        ) -> Self {
            self.monitoring = input;
            self
        }
        /// <p>The placement of the instance.</p>
        pub fn placement(mut self, input: crate::model::LaunchTemplatePlacement) -> Self {
            self.placement = Some(input);
            self
        }
        /// <p>The placement of the instance.</p>
        pub fn set_placement(
            mut self,
            input: std::option::Option<crate::model::LaunchTemplatePlacement>,
        ) -> Self {
            self.placement = input;
            self
        }
        /// <p>The ID of the RAM disk, if applicable.</p>
        pub fn ram_disk_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.ram_disk_id = Some(input.into());
            self
        }
        /// <p>The ID of the RAM disk, if applicable.</p>
        pub fn set_ram_disk_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.ram_disk_id = input;
            self
        }
        /// <p>If set to <code>true</code>, indicates that the instance cannot be terminated using the Amazon EC2 console, command line tool, or API.</p>
        pub fn disable_api_termination(mut self, input: bool) -> Self {
            self.disable_api_termination = Some(input);
            self
        }
        /// <p>If set to <code>true</code>, indicates that the instance cannot be terminated using the Amazon EC2 console, command line tool, or API.</p>
        pub fn set_disable_api_termination(mut self, input: std::option::Option<bool>) -> Self {
            self.disable_api_termination = input;
            self
        }
        /// <p>Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).</p>
        pub fn instance_initiated_shutdown_behavior(
            mut self,
            input: crate::model::ShutdownBehavior,
        ) -> Self {
            self.instance_initiated_shutdown_behavior = Some(input);
            self
        }
        /// <p>Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).</p>
        pub fn set_instance_initiated_shutdown_behavior(
            mut self,
            input: std::option::Option<crate::model::ShutdownBehavior>,
        ) -> Self {
            self.instance_initiated_shutdown_behavior = input;
            self
        }
        /// <p>The user data for the instance. </p>
        pub fn user_data(mut self, input: impl Into<std::string::String>) -> Self {
            self.user_data = Some(input.into());
            self
        }
        /// <p>The user data for the instance. </p>
        pub fn set_user_data(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.user_data = input;
            self
        }
        /// Appends an item to `tag_specifications`.
        ///
        /// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
        ///
        /// <p>The tags that are applied to the resources that are created during instance launch.</p>
        pub fn tag_specifications(
            mut self,
            input: crate::model::LaunchTemplateTagSpecification,
        ) -> Self {
            let mut v = self.tag_specifications.unwrap_or_default();
            v.push(input);
            self.tag_specifications = Some(v);
            self
        }
        /// <p>The tags that are applied to the resources that are created during instance launch.</p>
        pub fn set_tag_specifications(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::LaunchTemplateTagSpecification>>,
        ) -> Self {
            self.tag_specifications = input;
            self
        }
        /// Appends an item to `elastic_gpu_specifications`.
        ///
        /// To override the contents of this collection use [`set_elastic_gpu_specifications`](Self::set_elastic_gpu_specifications).
        ///
        /// <p>The elastic GPU specification.</p>
        pub fn elastic_gpu_specifications(
            mut self,
            input: crate::model::ElasticGpuSpecificationResponse,
        ) -> Self {
            let mut v = self.elastic_gpu_specifications.unwrap_or_default();
            v.push(input);
            self.elastic_gpu_specifications = Some(v);
            self
        }
        /// <p>The elastic GPU specification.</p>
        pub fn set_elastic_gpu_specifications(
            mut self,
            input: std::option::Option<
                std::vec::Vec<crate::model::ElasticGpuSpecificationResponse>,
            >,
        ) -> Self {
            self.elastic_gpu_specifications = input;
            self
        }
        /// Appends an item to `elastic_inference_accelerators`.
        ///
        /// To override the contents of this collection use [`set_elastic_inference_accelerators`](Self::set_elastic_inference_accelerators).
        ///
        /// <p> The elastic inference accelerator for the instance. </p>
        pub fn elastic_inference_accelerators(
            mut self,
            input: crate::model::LaunchTemplateElasticInferenceAcceleratorResponse,
        ) -> Self {
            let mut v = self.elastic_inference_accelerators.unwrap_or_default();
            v.push(input);
            self.elastic_inference_accelerators = Some(v);
            self
        }
        /// <p> The elastic inference accelerator for the instance. </p>
        pub fn set_elastic_inference_accelerators(
            mut self,
            input: std::option::Option<
                std::vec::Vec<crate::model::LaunchTemplateElasticInferenceAcceleratorResponse>,
            >,
        ) -> Self {
            self.elastic_inference_accelerators = input;
            self
        }
        /// Appends an item to `security_group_ids`.
        ///
        /// To override the contents of this collection use [`set_security_group_ids`](Self::set_security_group_ids).
        ///
        /// <p>The security group IDs.</p>
        pub fn security_group_ids(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.security_group_ids.unwrap_or_default();
            v.push(input.into());
            self.security_group_ids = Some(v);
            self
        }
        /// <p>The security group IDs.</p>
        pub fn set_security_group_ids(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.security_group_ids = input;
            self
        }
        /// Appends an item to `security_groups`.
        ///
        /// To override the contents of this collection use [`set_security_groups`](Self::set_security_groups).
        ///
        /// <p>The security group names.</p>
        pub fn security_groups(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.security_groups.unwrap_or_default();
            v.push(input.into());
            self.security_groups = Some(v);
            self
        }
        /// <p>The security group names.</p>
        pub fn set_security_groups(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.security_groups = input;
            self
        }
        /// <p>The market (purchasing) option for the instances.</p>
        pub fn instance_market_options(
            mut self,
            input: crate::model::LaunchTemplateInstanceMarketOptions,
        ) -> Self {
            self.instance_market_options = Some(input);
            self
        }
        /// <p>The market (purchasing) option for the instances.</p>
        pub fn set_instance_market_options(
            mut self,
            input: std::option::Option<crate::model::LaunchTemplateInstanceMarketOptions>,
        ) -> Self {
            self.instance_market_options = input;
            self
        }
        /// <p>The credit option for CPU usage of the instance.</p>
        pub fn credit_specification(mut self, input: crate::model::CreditSpecification) -> Self {
            self.credit_specification = Some(input);
            self
        }
        /// <p>The credit option for CPU usage of the instance.</p>
        pub fn set_credit_specification(
            mut self,
            input: std::option::Option<crate::model::CreditSpecification>,
        ) -> Self {
            self.credit_specification = input;
            self
        }
        /// <p>The CPU options for the instance. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html">Optimizing CPU options</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
        pub fn cpu_options(mut self, input: crate::model::LaunchTemplateCpuOptions) -> Self {
            self.cpu_options = Some(input);
            self
        }
        /// <p>The CPU options for the instance. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html">Optimizing CPU options</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
        pub fn set_cpu_options(
            mut self,
            input: std::option::Option<crate::model::LaunchTemplateCpuOptions>,
        ) -> Self {
            self.cpu_options = input;
            self
        }
        /// <p>Information about the Capacity Reservation targeting option.</p>
        pub fn capacity_reservation_specification(
            mut self,
            input: crate::model::LaunchTemplateCapacityReservationSpecificationResponse,
        ) -> Self {
            self.capacity_reservation_specification = Some(input);
            self
        }
        /// <p>Information about the Capacity Reservation targeting option.</p>
        pub fn set_capacity_reservation_specification(
            mut self,
            input: std::option::Option<
                crate::model::LaunchTemplateCapacityReservationSpecificationResponse,
            >,
        ) -> Self {
            self.capacity_reservation_specification = input;
            self
        }
        /// Appends an item to `license_specifications`.
        ///
        /// To override the contents of this collection use [`set_license_specifications`](Self::set_license_specifications).
        ///
        /// <p>The license configurations.</p>
        pub fn license_specifications(
            mut self,
            input: crate::model::LaunchTemplateLicenseConfiguration,
        ) -> Self {
            let mut v = self.license_specifications.unwrap_or_default();
            v.push(input);
            self.license_specifications = Some(v);
            self
        }
        /// <p>The license configurations.</p>
        pub fn set_license_specifications(
            mut self,
            input: std::option::Option<
                std::vec::Vec<crate::model::LaunchTemplateLicenseConfiguration>,
            >,
        ) -> Self {
            self.license_specifications = input;
            self
        }
        /// <p>Indicates whether an instance is configured for hibernation. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html">Hibernate your instance</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
        pub fn hibernation_options(
            mut self,
            input: crate::model::LaunchTemplateHibernationOptions,
        ) -> Self {
            self.hibernation_options = Some(input);
            self
        }
        /// <p>Indicates whether an instance is configured for hibernation. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html">Hibernate your instance</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
        pub fn set_hibernation_options(
            mut self,
            input: std::option::Option<crate::model::LaunchTemplateHibernationOptions>,
        ) -> Self {
            self.hibernation_options = input;
            self
        }
        /// <p>The metadata options for the instance. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html">Instance metadata and user data</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
        pub fn metadata_options(
            mut self,
            input: crate::model::LaunchTemplateInstanceMetadataOptions,
        ) -> Self {
            self.metadata_options = Some(input);
            self
        }
        /// <p>The metadata options for the instance. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html">Instance metadata and user data</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
        pub fn set_metadata_options(
            mut self,
            input: std::option::Option<crate::model::LaunchTemplateInstanceMetadataOptions>,
        ) -> Self {
            self.metadata_options = input;
            self
        }
        /// <p>Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves.</p>
        pub fn enclave_options(
            mut self,
            input: crate::model::LaunchTemplateEnclaveOptions,
        ) -> Self {
            self.enclave_options = Some(input);
            self
        }
        /// <p>Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves.</p>
        pub fn set_enclave_options(
            mut self,
            input: std::option::Option<crate::model::LaunchTemplateEnclaveOptions>,
        ) -> Self {
            self.enclave_options = input;
            self
        }
        /// <p>The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with these attributes.</p>
        /// <p>If you specify <code>InstanceRequirements</code>, you can't specify <code>InstanceTypes</code>.</p>
        pub fn instance_requirements(mut self, input: crate::model::InstanceRequirements) -> Self {
            self.instance_requirements = Some(input);
            self
        }
        /// <p>The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with these attributes.</p>
        /// <p>If you specify <code>InstanceRequirements</code>, you can't specify <code>InstanceTypes</code>.</p>
        pub fn set_instance_requirements(
            mut self,
            input: std::option::Option<crate::model::InstanceRequirements>,
        ) -> Self {
            self.instance_requirements = input;
            self
        }
        /// <p>The options for the instance hostname.</p>
        pub fn private_dns_name_options(
            mut self,
            input: crate::model::LaunchTemplatePrivateDnsNameOptions,
        ) -> Self {
            self.private_dns_name_options = Some(input);
            self
        }
        /// <p>The options for the instance hostname.</p>
        pub fn set_private_dns_name_options(
            mut self,
            input: std::option::Option<crate::model::LaunchTemplatePrivateDnsNameOptions>,
        ) -> Self {
            self.private_dns_name_options = input;
            self
        }
        /// <p>The maintenance options for your instance.</p>
        pub fn maintenance_options(
            mut self,
            input: crate::model::LaunchTemplateInstanceMaintenanceOptions,
        ) -> Self {
            self.maintenance_options = Some(input);
            self
        }
        /// <p>The maintenance options for your instance.</p>
        pub fn set_maintenance_options(
            mut self,
            input: std::option::Option<crate::model::LaunchTemplateInstanceMaintenanceOptions>,
        ) -> Self {
            self.maintenance_options = input;
            self
        }
        /// <p>Indicates whether the instance is enabled for stop protection. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Stop_Start.html#Using_StopProtection">Stop protection</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
        pub fn disable_api_stop(mut self, input: bool) -> Self {
            self.disable_api_stop = Some(input);
            self
        }
        /// <p>Indicates whether the instance is enabled for stop protection. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Stop_Start.html#Using_StopProtection">Stop protection</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
        pub fn set_disable_api_stop(mut self, input: std::option::Option<bool>) -> Self {
            self.disable_api_stop = input;
            self
        }
        /// Consumes the builder and constructs a [`ResponseLaunchTemplateData`](crate::model::ResponseLaunchTemplateData).
        pub fn build(self) -> crate::model::ResponseLaunchTemplateData {
            crate::model::ResponseLaunchTemplateData {
                kernel_id: self.kernel_id,
                ebs_optimized: self.ebs_optimized,
                iam_instance_profile: self.iam_instance_profile,
                block_device_mappings: self.block_device_mappings,
                network_interfaces: self.network_interfaces,
                image_id: self.image_id,
                instance_type: self.instance_type,
                key_name: self.key_name,
                monitoring: self.monitoring,
                placement: self.placement,
                ram_disk_id: self.ram_disk_id,
                disable_api_termination: self.disable_api_termination,
                instance_initiated_shutdown_behavior: self.instance_initiated_shutdown_behavior,
                user_data: self.user_data,
                tag_specifications: self.tag_specifications,
                elastic_gpu_specifications: self.elastic_gpu_specifications,
                elastic_inference_accelerators: self.elastic_inference_accelerators,
                security_group_ids: self.security_group_ids,
                security_groups: self.security_groups,
                instance_market_options: self.instance_market_options,
                credit_specification: self.credit_specification,
                cpu_options: self.cpu_options,
                capacity_reservation_specification: self.capacity_reservation_specification,
                license_specifications: self.license_specifications,
                hibernation_options: self.hibernation_options,
                metadata_options: self.metadata_options,
                enclave_options: self.enclave_options,
                instance_requirements: self.instance_requirements,
                private_dns_name_options: self.private_dns_name_options,
                maintenance_options: self.maintenance_options,
                disable_api_stop: self.disable_api_stop,
            }
        }
    }
}
impl ResponseLaunchTemplateData {
    /// Creates a new builder-style object to manufacture [`ResponseLaunchTemplateData`](crate::model::ResponseLaunchTemplateData).
    pub fn builder() -> crate::model::response_launch_template_data::Builder {
        crate::model::response_launch_template_data::Builder::default()
    }
}

/// <p>The maintenance options of your instance.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LaunchTemplateInstanceMaintenanceOptions {
    /// <p>Disables the automatic recovery behavior of your instance or sets it to default.</p>
    #[doc(hidden)]
    pub auto_recovery: std::option::Option<crate::model::LaunchTemplateAutoRecoveryState>,
}
impl LaunchTemplateInstanceMaintenanceOptions {
    /// <p>Disables the automatic recovery behavior of your instance or sets it to default.</p>
    pub fn auto_recovery(
        &self,
    ) -> std::option::Option<&crate::model::LaunchTemplateAutoRecoveryState> {
        self.auto_recovery.as_ref()
    }
}
/// See [`LaunchTemplateInstanceMaintenanceOptions`](crate::model::LaunchTemplateInstanceMaintenanceOptions).
pub mod launch_template_instance_maintenance_options {

    /// A builder for [`LaunchTemplateInstanceMaintenanceOptions`](crate::model::LaunchTemplateInstanceMaintenanceOptions).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) auto_recovery:
            std::option::Option<crate::model::LaunchTemplateAutoRecoveryState>,
    }
    impl Builder {
        /// <p>Disables the automatic recovery behavior of your instance or sets it to default.</p>
        pub fn auto_recovery(
            mut self,
            input: crate::model::LaunchTemplateAutoRecoveryState,
        ) -> Self {
            self.auto_recovery = Some(input);
            self
        }
        /// <p>Disables the automatic recovery behavior of your instance or sets it to default.</p>
        pub fn set_auto_recovery(
            mut self,
            input: std::option::Option<crate::model::LaunchTemplateAutoRecoveryState>,
        ) -> Self {
            self.auto_recovery = input;
            self
        }
        /// Consumes the builder and constructs a [`LaunchTemplateInstanceMaintenanceOptions`](crate::model::LaunchTemplateInstanceMaintenanceOptions).
        pub fn build(self) -> crate::model::LaunchTemplateInstanceMaintenanceOptions {
            crate::model::LaunchTemplateInstanceMaintenanceOptions {
                auto_recovery: self.auto_recovery,
            }
        }
    }
}
impl LaunchTemplateInstanceMaintenanceOptions {
    /// Creates a new builder-style object to manufacture [`LaunchTemplateInstanceMaintenanceOptions`](crate::model::LaunchTemplateInstanceMaintenanceOptions).
    pub fn builder() -> crate::model::launch_template_instance_maintenance_options::Builder {
        crate::model::launch_template_instance_maintenance_options::Builder::default()
    }
}

/// When writing a match expression against `LaunchTemplateAutoRecoveryState`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let launchtemplateautorecoverystate = unimplemented!();
/// match launchtemplateautorecoverystate {
///     LaunchTemplateAutoRecoveryState::Default => { /* ... */ },
///     LaunchTemplateAutoRecoveryState::Disabled => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `launchtemplateautorecoverystate` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `LaunchTemplateAutoRecoveryState::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `LaunchTemplateAutoRecoveryState::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `LaunchTemplateAutoRecoveryState::NewFeature` is defined.
/// Specifically, when `launchtemplateautorecoverystate` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `LaunchTemplateAutoRecoveryState::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 LaunchTemplateAutoRecoveryState {
    #[allow(missing_docs)] // documentation missing in model
    Default,
    #[allow(missing_docs)] // documentation missing in model
    Disabled,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for LaunchTemplateAutoRecoveryState {
    fn from(s: &str) -> Self {
        match s {
            "default" => LaunchTemplateAutoRecoveryState::Default,
            "disabled" => LaunchTemplateAutoRecoveryState::Disabled,
            other => LaunchTemplateAutoRecoveryState::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for LaunchTemplateAutoRecoveryState {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(LaunchTemplateAutoRecoveryState::from(s))
    }
}
impl LaunchTemplateAutoRecoveryState {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            LaunchTemplateAutoRecoveryState::Default => "default",
            LaunchTemplateAutoRecoveryState::Disabled => "disabled",
            LaunchTemplateAutoRecoveryState::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["default", "disabled"]
    }
}
impl AsRef<str> for LaunchTemplateAutoRecoveryState {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes the options for instance hostnames.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LaunchTemplatePrivateDnsNameOptions {
    /// <p>The type of hostname to assign to an instance.</p>
    #[doc(hidden)]
    pub hostname_type: std::option::Option<crate::model::HostnameType>,
    /// <p>Indicates whether to respond to DNS queries for instance hostnames with DNS A records.</p>
    #[doc(hidden)]
    pub enable_resource_name_dns_a_record: std::option::Option<bool>,
    /// <p>Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records.</p>
    #[doc(hidden)]
    pub enable_resource_name_dns_aaaa_record: std::option::Option<bool>,
}
impl LaunchTemplatePrivateDnsNameOptions {
    /// <p>The type of hostname to assign to an instance.</p>
    pub fn hostname_type(&self) -> std::option::Option<&crate::model::HostnameType> {
        self.hostname_type.as_ref()
    }
    /// <p>Indicates whether to respond to DNS queries for instance hostnames with DNS A records.</p>
    pub fn enable_resource_name_dns_a_record(&self) -> std::option::Option<bool> {
        self.enable_resource_name_dns_a_record
    }
    /// <p>Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records.</p>
    pub fn enable_resource_name_dns_aaaa_record(&self) -> std::option::Option<bool> {
        self.enable_resource_name_dns_aaaa_record
    }
}
/// See [`LaunchTemplatePrivateDnsNameOptions`](crate::model::LaunchTemplatePrivateDnsNameOptions).
pub mod launch_template_private_dns_name_options {

    /// A builder for [`LaunchTemplatePrivateDnsNameOptions`](crate::model::LaunchTemplatePrivateDnsNameOptions).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) hostname_type: std::option::Option<crate::model::HostnameType>,
        pub(crate) enable_resource_name_dns_a_record: std::option::Option<bool>,
        pub(crate) enable_resource_name_dns_aaaa_record: std::option::Option<bool>,
    }
    impl Builder {
        /// <p>The type of hostname to assign to an instance.</p>
        pub fn hostname_type(mut self, input: crate::model::HostnameType) -> Self {
            self.hostname_type = Some(input);
            self
        }
        /// <p>The type of hostname to assign to an instance.</p>
        pub fn set_hostname_type(
            mut self,
            input: std::option::Option<crate::model::HostnameType>,
        ) -> Self {
            self.hostname_type = input;
            self
        }
        /// <p>Indicates whether to respond to DNS queries for instance hostnames with DNS A records.</p>
        pub fn enable_resource_name_dns_a_record(mut self, input: bool) -> Self {
            self.enable_resource_name_dns_a_record = Some(input);
            self
        }
        /// <p>Indicates whether to respond to DNS queries for instance hostnames with DNS A records.</p>
        pub fn set_enable_resource_name_dns_a_record(
            mut self,
            input: std::option::Option<bool>,
        ) -> Self {
            self.enable_resource_name_dns_a_record = input;
            self
        }
        /// <p>Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records.</p>
        pub fn enable_resource_name_dns_aaaa_record(mut self, input: bool) -> Self {
            self.enable_resource_name_dns_aaaa_record = Some(input);
            self
        }
        /// <p>Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records.</p>
        pub fn set_enable_resource_name_dns_aaaa_record(
            mut self,
            input: std::option::Option<bool>,
        ) -> Self {
            self.enable_resource_name_dns_aaaa_record = input;
            self
        }
        /// Consumes the builder and constructs a [`LaunchTemplatePrivateDnsNameOptions`](crate::model::LaunchTemplatePrivateDnsNameOptions).
        pub fn build(self) -> crate::model::LaunchTemplatePrivateDnsNameOptions {
            crate::model::LaunchTemplatePrivateDnsNameOptions {
                hostname_type: self.hostname_type,
                enable_resource_name_dns_a_record: self.enable_resource_name_dns_a_record,
                enable_resource_name_dns_aaaa_record: self.enable_resource_name_dns_aaaa_record,
            }
        }
    }
}
impl LaunchTemplatePrivateDnsNameOptions {
    /// Creates a new builder-style object to manufacture [`LaunchTemplatePrivateDnsNameOptions`](crate::model::LaunchTemplatePrivateDnsNameOptions).
    pub fn builder() -> crate::model::launch_template_private_dns_name_options::Builder {
        crate::model::launch_template_private_dns_name_options::Builder::default()
    }
}

/// <p>Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LaunchTemplateEnclaveOptions {
    /// <p>If this parameter is set to <code>true</code>, the instance is enabled for Amazon Web Services Nitro Enclaves; otherwise, it is not enabled for Amazon Web Services Nitro Enclaves.</p>
    #[doc(hidden)]
    pub enabled: std::option::Option<bool>,
}
impl LaunchTemplateEnclaveOptions {
    /// <p>If this parameter is set to <code>true</code>, the instance is enabled for Amazon Web Services Nitro Enclaves; otherwise, it is not enabled for Amazon Web Services Nitro Enclaves.</p>
    pub fn enabled(&self) -> std::option::Option<bool> {
        self.enabled
    }
}
/// See [`LaunchTemplateEnclaveOptions`](crate::model::LaunchTemplateEnclaveOptions).
pub mod launch_template_enclave_options {

    /// A builder for [`LaunchTemplateEnclaveOptions`](crate::model::LaunchTemplateEnclaveOptions).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) enabled: std::option::Option<bool>,
    }
    impl Builder {
        /// <p>If this parameter is set to <code>true</code>, the instance is enabled for Amazon Web Services Nitro Enclaves; otherwise, it is not enabled for Amazon Web Services Nitro Enclaves.</p>
        pub fn enabled(mut self, input: bool) -> Self {
            self.enabled = Some(input);
            self
        }
        /// <p>If this parameter is set to <code>true</code>, the instance is enabled for Amazon Web Services Nitro Enclaves; otherwise, it is not enabled for Amazon Web Services Nitro Enclaves.</p>
        pub fn set_enabled(mut self, input: std::option::Option<bool>) -> Self {
            self.enabled = input;
            self
        }
        /// Consumes the builder and constructs a [`LaunchTemplateEnclaveOptions`](crate::model::LaunchTemplateEnclaveOptions).
        pub fn build(self) -> crate::model::LaunchTemplateEnclaveOptions {
            crate::model::LaunchTemplateEnclaveOptions {
                enabled: self.enabled,
            }
        }
    }
}
impl LaunchTemplateEnclaveOptions {
    /// Creates a new builder-style object to manufacture [`LaunchTemplateEnclaveOptions`](crate::model::LaunchTemplateEnclaveOptions).
    pub fn builder() -> crate::model::launch_template_enclave_options::Builder {
        crate::model::launch_template_enclave_options::Builder::default()
    }
}

/// <p>The metadata options for the instance. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html">Instance metadata and user data</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LaunchTemplateInstanceMetadataOptions {
    /// <p>The state of the metadata option changes.</p>
    /// <p> <code>pending</code> - The metadata options are being updated and the instance is not ready to process metadata traffic with the new selection.</p>
    /// <p> <code>applied</code> - The metadata options have been successfully applied on the instance.</p>
    #[doc(hidden)]
    pub state: std::option::Option<crate::model::LaunchTemplateInstanceMetadataOptionsState>,
    /// <p>Indicates whether IMDSv2 is <code>optional</code> or <code>required</code>.</p>
    /// <p> <code>optional</code> - When IMDSv2 is optional, you can choose to retrieve instance metadata with or without a session token in your request. If you retrieve the IAM role credentials without a token, the IMDSv1 role credentials are returned. If you retrieve the IAM role credentials using a valid session token, the IMDSv2 role credentials are returned.</p>
    /// <p> <code>required</code> - When IMDSv2 is required, you must send a session token with any instance metadata retrieval requests. In this state, retrieving the IAM role credentials always returns IMDSv2 credentials; IMDSv1 credentials are not available.</p>
    /// <p>Default: <code>optional</code> </p>
    #[doc(hidden)]
    pub http_tokens: std::option::Option<crate::model::LaunchTemplateHttpTokensState>,
    /// <p>The desired HTTP PUT response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel.</p>
    /// <p>Default: 1</p>
    /// <p>Possible values: Integers from 1 to 64</p>
    #[doc(hidden)]
    pub http_put_response_hop_limit: std::option::Option<i32>,
    /// <p>Enables or disables the HTTP metadata endpoint on your instances. If the parameter is not specified, the default state is <code>enabled</code>.</p> <note>
    /// <p>If you specify a value of <code>disabled</code>, you will not be able to access your instance metadata. </p>
    /// </note>
    #[doc(hidden)]
    pub http_endpoint:
        std::option::Option<crate::model::LaunchTemplateInstanceMetadataEndpointState>,
    /// <p>Enables or disables the IPv6 endpoint for the instance metadata service.</p>
    /// <p>Default: <code>disabled</code> </p>
    #[doc(hidden)]
    pub http_protocol_ipv6:
        std::option::Option<crate::model::LaunchTemplateInstanceMetadataProtocolIpv6>,
    /// <p>Set to <code>enabled</code> to allow access to instance tags from the instance metadata. Set to <code>disabled</code> to turn off access to instance tags from the instance metadata. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html#work-with-tags-in-IMDS">Work with instance tags using the instance metadata</a>.</p>
    /// <p>Default: <code>disabled</code> </p>
    #[doc(hidden)]
    pub instance_metadata_tags:
        std::option::Option<crate::model::LaunchTemplateInstanceMetadataTagsState>,
}
impl LaunchTemplateInstanceMetadataOptions {
    /// <p>The state of the metadata option changes.</p>
    /// <p> <code>pending</code> - The metadata options are being updated and the instance is not ready to process metadata traffic with the new selection.</p>
    /// <p> <code>applied</code> - The metadata options have been successfully applied on the instance.</p>
    pub fn state(
        &self,
    ) -> std::option::Option<&crate::model::LaunchTemplateInstanceMetadataOptionsState> {
        self.state.as_ref()
    }
    /// <p>Indicates whether IMDSv2 is <code>optional</code> or <code>required</code>.</p>
    /// <p> <code>optional</code> - When IMDSv2 is optional, you can choose to retrieve instance metadata with or without a session token in your request. If you retrieve the IAM role credentials without a token, the IMDSv1 role credentials are returned. If you retrieve the IAM role credentials using a valid session token, the IMDSv2 role credentials are returned.</p>
    /// <p> <code>required</code> - When IMDSv2 is required, you must send a session token with any instance metadata retrieval requests. In this state, retrieving the IAM role credentials always returns IMDSv2 credentials; IMDSv1 credentials are not available.</p>
    /// <p>Default: <code>optional</code> </p>
    pub fn http_tokens(&self) -> std::option::Option<&crate::model::LaunchTemplateHttpTokensState> {
        self.http_tokens.as_ref()
    }
    /// <p>The desired HTTP PUT response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel.</p>
    /// <p>Default: 1</p>
    /// <p>Possible values: Integers from 1 to 64</p>
    pub fn http_put_response_hop_limit(&self) -> std::option::Option<i32> {
        self.http_put_response_hop_limit
    }
    /// <p>Enables or disables the HTTP metadata endpoint on your instances. If the parameter is not specified, the default state is <code>enabled</code>.</p> <note>
    /// <p>If you specify a value of <code>disabled</code>, you will not be able to access your instance metadata. </p>
    /// </note>
    pub fn http_endpoint(
        &self,
    ) -> std::option::Option<&crate::model::LaunchTemplateInstanceMetadataEndpointState> {
        self.http_endpoint.as_ref()
    }
    /// <p>Enables or disables the IPv6 endpoint for the instance metadata service.</p>
    /// <p>Default: <code>disabled</code> </p>
    pub fn http_protocol_ipv6(
        &self,
    ) -> std::option::Option<&crate::model::LaunchTemplateInstanceMetadataProtocolIpv6> {
        self.http_protocol_ipv6.as_ref()
    }
    /// <p>Set to <code>enabled</code> to allow access to instance tags from the instance metadata. Set to <code>disabled</code> to turn off access to instance tags from the instance metadata. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html#work-with-tags-in-IMDS">Work with instance tags using the instance metadata</a>.</p>
    /// <p>Default: <code>disabled</code> </p>
    pub fn instance_metadata_tags(
        &self,
    ) -> std::option::Option<&crate::model::LaunchTemplateInstanceMetadataTagsState> {
        self.instance_metadata_tags.as_ref()
    }
}
/// See [`LaunchTemplateInstanceMetadataOptions`](crate::model::LaunchTemplateInstanceMetadataOptions).
pub mod launch_template_instance_metadata_options {

    /// A builder for [`LaunchTemplateInstanceMetadataOptions`](crate::model::LaunchTemplateInstanceMetadataOptions).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) state:
            std::option::Option<crate::model::LaunchTemplateInstanceMetadataOptionsState>,
        pub(crate) http_tokens: std::option::Option<crate::model::LaunchTemplateHttpTokensState>,
        pub(crate) http_put_response_hop_limit: std::option::Option<i32>,
        pub(crate) http_endpoint:
            std::option::Option<crate::model::LaunchTemplateInstanceMetadataEndpointState>,
        pub(crate) http_protocol_ipv6:
            std::option::Option<crate::model::LaunchTemplateInstanceMetadataProtocolIpv6>,
        pub(crate) instance_metadata_tags:
            std::option::Option<crate::model::LaunchTemplateInstanceMetadataTagsState>,
    }
    impl Builder {
        /// <p>The state of the metadata option changes.</p>
        /// <p> <code>pending</code> - The metadata options are being updated and the instance is not ready to process metadata traffic with the new selection.</p>
        /// <p> <code>applied</code> - The metadata options have been successfully applied on the instance.</p>
        pub fn state(
            mut self,
            input: crate::model::LaunchTemplateInstanceMetadataOptionsState,
        ) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>The state of the metadata option changes.</p>
        /// <p> <code>pending</code> - The metadata options are being updated and the instance is not ready to process metadata traffic with the new selection.</p>
        /// <p> <code>applied</code> - The metadata options have been successfully applied on the instance.</p>
        pub fn set_state(
            mut self,
            input: std::option::Option<crate::model::LaunchTemplateInstanceMetadataOptionsState>,
        ) -> Self {
            self.state = input;
            self
        }
        /// <p>Indicates whether IMDSv2 is <code>optional</code> or <code>required</code>.</p>
        /// <p> <code>optional</code> - When IMDSv2 is optional, you can choose to retrieve instance metadata with or without a session token in your request. If you retrieve the IAM role credentials without a token, the IMDSv1 role credentials are returned. If you retrieve the IAM role credentials using a valid session token, the IMDSv2 role credentials are returned.</p>
        /// <p> <code>required</code> - When IMDSv2 is required, you must send a session token with any instance metadata retrieval requests. In this state, retrieving the IAM role credentials always returns IMDSv2 credentials; IMDSv1 credentials are not available.</p>
        /// <p>Default: <code>optional</code> </p>
        pub fn http_tokens(mut self, input: crate::model::LaunchTemplateHttpTokensState) -> Self {
            self.http_tokens = Some(input);
            self
        }
        /// <p>Indicates whether IMDSv2 is <code>optional</code> or <code>required</code>.</p>
        /// <p> <code>optional</code> - When IMDSv2 is optional, you can choose to retrieve instance metadata with or without a session token in your request. If you retrieve the IAM role credentials without a token, the IMDSv1 role credentials are returned. If you retrieve the IAM role credentials using a valid session token, the IMDSv2 role credentials are returned.</p>
        /// <p> <code>required</code> - When IMDSv2 is required, you must send a session token with any instance metadata retrieval requests. In this state, retrieving the IAM role credentials always returns IMDSv2 credentials; IMDSv1 credentials are not available.</p>
        /// <p>Default: <code>optional</code> </p>
        pub fn set_http_tokens(
            mut self,
            input: std::option::Option<crate::model::LaunchTemplateHttpTokensState>,
        ) -> Self {
            self.http_tokens = input;
            self
        }
        /// <p>The desired HTTP PUT response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel.</p>
        /// <p>Default: 1</p>
        /// <p>Possible values: Integers from 1 to 64</p>
        pub fn http_put_response_hop_limit(mut self, input: i32) -> Self {
            self.http_put_response_hop_limit = Some(input);
            self
        }
        /// <p>The desired HTTP PUT response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel.</p>
        /// <p>Default: 1</p>
        /// <p>Possible values: Integers from 1 to 64</p>
        pub fn set_http_put_response_hop_limit(mut self, input: std::option::Option<i32>) -> Self {
            self.http_put_response_hop_limit = input;
            self
        }
        /// <p>Enables or disables the HTTP metadata endpoint on your instances. If the parameter is not specified, the default state is <code>enabled</code>.</p> <note>
        /// <p>If you specify a value of <code>disabled</code>, you will not be able to access your instance metadata. </p>
        /// </note>
        pub fn http_endpoint(
            mut self,
            input: crate::model::LaunchTemplateInstanceMetadataEndpointState,
        ) -> Self {
            self.http_endpoint = Some(input);
            self
        }
        /// <p>Enables or disables the HTTP metadata endpoint on your instances. If the parameter is not specified, the default state is <code>enabled</code>.</p> <note>
        /// <p>If you specify a value of <code>disabled</code>, you will not be able to access your instance metadata. </p>
        /// </note>
        pub fn set_http_endpoint(
            mut self,
            input: std::option::Option<crate::model::LaunchTemplateInstanceMetadataEndpointState>,
        ) -> Self {
            self.http_endpoint = input;
            self
        }
        /// <p>Enables or disables the IPv6 endpoint for the instance metadata service.</p>
        /// <p>Default: <code>disabled</code> </p>
        pub fn http_protocol_ipv6(
            mut self,
            input: crate::model::LaunchTemplateInstanceMetadataProtocolIpv6,
        ) -> Self {
            self.http_protocol_ipv6 = Some(input);
            self
        }
        /// <p>Enables or disables the IPv6 endpoint for the instance metadata service.</p>
        /// <p>Default: <code>disabled</code> </p>
        pub fn set_http_protocol_ipv6(
            mut self,
            input: std::option::Option<crate::model::LaunchTemplateInstanceMetadataProtocolIpv6>,
        ) -> Self {
            self.http_protocol_ipv6 = input;
            self
        }
        /// <p>Set to <code>enabled</code> to allow access to instance tags from the instance metadata. Set to <code>disabled</code> to turn off access to instance tags from the instance metadata. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html#work-with-tags-in-IMDS">Work with instance tags using the instance metadata</a>.</p>
        /// <p>Default: <code>disabled</code> </p>
        pub fn instance_metadata_tags(
            mut self,
            input: crate::model::LaunchTemplateInstanceMetadataTagsState,
        ) -> Self {
            self.instance_metadata_tags = Some(input);
            self
        }
        /// <p>Set to <code>enabled</code> to allow access to instance tags from the instance metadata. Set to <code>disabled</code> to turn off access to instance tags from the instance metadata. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html#work-with-tags-in-IMDS">Work with instance tags using the instance metadata</a>.</p>
        /// <p>Default: <code>disabled</code> </p>
        pub fn set_instance_metadata_tags(
            mut self,
            input: std::option::Option<crate::model::LaunchTemplateInstanceMetadataTagsState>,
        ) -> Self {
            self.instance_metadata_tags = input;
            self
        }
        /// Consumes the builder and constructs a [`LaunchTemplateInstanceMetadataOptions`](crate::model::LaunchTemplateInstanceMetadataOptions).
        pub fn build(self) -> crate::model::LaunchTemplateInstanceMetadataOptions {
            crate::model::LaunchTemplateInstanceMetadataOptions {
                state: self.state,
                http_tokens: self.http_tokens,
                http_put_response_hop_limit: self.http_put_response_hop_limit,
                http_endpoint: self.http_endpoint,
                http_protocol_ipv6: self.http_protocol_ipv6,
                instance_metadata_tags: self.instance_metadata_tags,
            }
        }
    }
}
impl LaunchTemplateInstanceMetadataOptions {
    /// Creates a new builder-style object to manufacture [`LaunchTemplateInstanceMetadataOptions`](crate::model::LaunchTemplateInstanceMetadataOptions).
    pub fn builder() -> crate::model::launch_template_instance_metadata_options::Builder {
        crate::model::launch_template_instance_metadata_options::Builder::default()
    }
}

/// When writing a match expression against `LaunchTemplateInstanceMetadataTagsState`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let launchtemplateinstancemetadatatagsstate = unimplemented!();
/// match launchtemplateinstancemetadatatagsstate {
///     LaunchTemplateInstanceMetadataTagsState::Disabled => { /* ... */ },
///     LaunchTemplateInstanceMetadataTagsState::Enabled => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `launchtemplateinstancemetadatatagsstate` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `LaunchTemplateInstanceMetadataTagsState::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `LaunchTemplateInstanceMetadataTagsState::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `LaunchTemplateInstanceMetadataTagsState::NewFeature` is defined.
/// Specifically, when `launchtemplateinstancemetadatatagsstate` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `LaunchTemplateInstanceMetadataTagsState::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 LaunchTemplateInstanceMetadataTagsState {
    #[allow(missing_docs)] // documentation missing in model
    Disabled,
    #[allow(missing_docs)] // documentation missing in model
    Enabled,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for LaunchTemplateInstanceMetadataTagsState {
    fn from(s: &str) -> Self {
        match s {
            "disabled" => LaunchTemplateInstanceMetadataTagsState::Disabled,
            "enabled" => LaunchTemplateInstanceMetadataTagsState::Enabled,
            other => LaunchTemplateInstanceMetadataTagsState::Unknown(
                crate::types::UnknownVariantValue(other.to_owned()),
            ),
        }
    }
}
impl std::str::FromStr for LaunchTemplateInstanceMetadataTagsState {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(LaunchTemplateInstanceMetadataTagsState::from(s))
    }
}
impl LaunchTemplateInstanceMetadataTagsState {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            LaunchTemplateInstanceMetadataTagsState::Disabled => "disabled",
            LaunchTemplateInstanceMetadataTagsState::Enabled => "enabled",
            LaunchTemplateInstanceMetadataTagsState::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["disabled", "enabled"]
    }
}
impl AsRef<str> for LaunchTemplateInstanceMetadataTagsState {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `LaunchTemplateInstanceMetadataProtocolIpv6`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let launchtemplateinstancemetadataprotocolipv6 = unimplemented!();
/// match launchtemplateinstancemetadataprotocolipv6 {
///     LaunchTemplateInstanceMetadataProtocolIpv6::Disabled => { /* ... */ },
///     LaunchTemplateInstanceMetadataProtocolIpv6::Enabled => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `launchtemplateinstancemetadataprotocolipv6` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `LaunchTemplateInstanceMetadataProtocolIpv6::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `LaunchTemplateInstanceMetadataProtocolIpv6::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `LaunchTemplateInstanceMetadataProtocolIpv6::NewFeature` is defined.
/// Specifically, when `launchtemplateinstancemetadataprotocolipv6` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `LaunchTemplateInstanceMetadataProtocolIpv6::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 LaunchTemplateInstanceMetadataProtocolIpv6 {
    #[allow(missing_docs)] // documentation missing in model
    Disabled,
    #[allow(missing_docs)] // documentation missing in model
    Enabled,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for LaunchTemplateInstanceMetadataProtocolIpv6 {
    fn from(s: &str) -> Self {
        match s {
            "disabled" => LaunchTemplateInstanceMetadataProtocolIpv6::Disabled,
            "enabled" => LaunchTemplateInstanceMetadataProtocolIpv6::Enabled,
            other => LaunchTemplateInstanceMetadataProtocolIpv6::Unknown(
                crate::types::UnknownVariantValue(other.to_owned()),
            ),
        }
    }
}
impl std::str::FromStr for LaunchTemplateInstanceMetadataProtocolIpv6 {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(LaunchTemplateInstanceMetadataProtocolIpv6::from(s))
    }
}
impl LaunchTemplateInstanceMetadataProtocolIpv6 {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            LaunchTemplateInstanceMetadataProtocolIpv6::Disabled => "disabled",
            LaunchTemplateInstanceMetadataProtocolIpv6::Enabled => "enabled",
            LaunchTemplateInstanceMetadataProtocolIpv6::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["disabled", "enabled"]
    }
}
impl AsRef<str> for LaunchTemplateInstanceMetadataProtocolIpv6 {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `LaunchTemplateInstanceMetadataEndpointState`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let launchtemplateinstancemetadataendpointstate = unimplemented!();
/// match launchtemplateinstancemetadataendpointstate {
///     LaunchTemplateInstanceMetadataEndpointState::Disabled => { /* ... */ },
///     LaunchTemplateInstanceMetadataEndpointState::Enabled => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `launchtemplateinstancemetadataendpointstate` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `LaunchTemplateInstanceMetadataEndpointState::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `LaunchTemplateInstanceMetadataEndpointState::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `LaunchTemplateInstanceMetadataEndpointState::NewFeature` is defined.
/// Specifically, when `launchtemplateinstancemetadataendpointstate` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `LaunchTemplateInstanceMetadataEndpointState::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 LaunchTemplateInstanceMetadataEndpointState {
    #[allow(missing_docs)] // documentation missing in model
    Disabled,
    #[allow(missing_docs)] // documentation missing in model
    Enabled,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for LaunchTemplateInstanceMetadataEndpointState {
    fn from(s: &str) -> Self {
        match s {
            "disabled" => LaunchTemplateInstanceMetadataEndpointState::Disabled,
            "enabled" => LaunchTemplateInstanceMetadataEndpointState::Enabled,
            other => LaunchTemplateInstanceMetadataEndpointState::Unknown(
                crate::types::UnknownVariantValue(other.to_owned()),
            ),
        }
    }
}
impl std::str::FromStr for LaunchTemplateInstanceMetadataEndpointState {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(LaunchTemplateInstanceMetadataEndpointState::from(s))
    }
}
impl LaunchTemplateInstanceMetadataEndpointState {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            LaunchTemplateInstanceMetadataEndpointState::Disabled => "disabled",
            LaunchTemplateInstanceMetadataEndpointState::Enabled => "enabled",
            LaunchTemplateInstanceMetadataEndpointState::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["disabled", "enabled"]
    }
}
impl AsRef<str> for LaunchTemplateInstanceMetadataEndpointState {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `LaunchTemplateHttpTokensState`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let launchtemplatehttptokensstate = unimplemented!();
/// match launchtemplatehttptokensstate {
///     LaunchTemplateHttpTokensState::Optional => { /* ... */ },
///     LaunchTemplateHttpTokensState::Required => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `launchtemplatehttptokensstate` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `LaunchTemplateHttpTokensState::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `LaunchTemplateHttpTokensState::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `LaunchTemplateHttpTokensState::NewFeature` is defined.
/// Specifically, when `launchtemplatehttptokensstate` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `LaunchTemplateHttpTokensState::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 LaunchTemplateHttpTokensState {
    #[allow(missing_docs)] // documentation missing in model
    Optional,
    #[allow(missing_docs)] // documentation missing in model
    Required,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for LaunchTemplateHttpTokensState {
    fn from(s: &str) -> Self {
        match s {
            "optional" => LaunchTemplateHttpTokensState::Optional,
            "required" => LaunchTemplateHttpTokensState::Required,
            other => LaunchTemplateHttpTokensState::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for LaunchTemplateHttpTokensState {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(LaunchTemplateHttpTokensState::from(s))
    }
}
impl LaunchTemplateHttpTokensState {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            LaunchTemplateHttpTokensState::Optional => "optional",
            LaunchTemplateHttpTokensState::Required => "required",
            LaunchTemplateHttpTokensState::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["optional", "required"]
    }
}
impl AsRef<str> for LaunchTemplateHttpTokensState {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `LaunchTemplateInstanceMetadataOptionsState`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let launchtemplateinstancemetadataoptionsstate = unimplemented!();
/// match launchtemplateinstancemetadataoptionsstate {
///     LaunchTemplateInstanceMetadataOptionsState::Applied => { /* ... */ },
///     LaunchTemplateInstanceMetadataOptionsState::Pending => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `launchtemplateinstancemetadataoptionsstate` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `LaunchTemplateInstanceMetadataOptionsState::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `LaunchTemplateInstanceMetadataOptionsState::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `LaunchTemplateInstanceMetadataOptionsState::NewFeature` is defined.
/// Specifically, when `launchtemplateinstancemetadataoptionsstate` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `LaunchTemplateInstanceMetadataOptionsState::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 LaunchTemplateInstanceMetadataOptionsState {
    #[allow(missing_docs)] // documentation missing in model
    Applied,
    #[allow(missing_docs)] // documentation missing in model
    Pending,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for LaunchTemplateInstanceMetadataOptionsState {
    fn from(s: &str) -> Self {
        match s {
            "applied" => LaunchTemplateInstanceMetadataOptionsState::Applied,
            "pending" => LaunchTemplateInstanceMetadataOptionsState::Pending,
            other => LaunchTemplateInstanceMetadataOptionsState::Unknown(
                crate::types::UnknownVariantValue(other.to_owned()),
            ),
        }
    }
}
impl std::str::FromStr for LaunchTemplateInstanceMetadataOptionsState {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(LaunchTemplateInstanceMetadataOptionsState::from(s))
    }
}
impl LaunchTemplateInstanceMetadataOptionsState {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            LaunchTemplateInstanceMetadataOptionsState::Applied => "applied",
            LaunchTemplateInstanceMetadataOptionsState::Pending => "pending",
            LaunchTemplateInstanceMetadataOptionsState::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["applied", "pending"]
    }
}
impl AsRef<str> for LaunchTemplateInstanceMetadataOptionsState {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Indicates whether an instance is configured for hibernation.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LaunchTemplateHibernationOptions {
    /// <p>If this parameter is set to <code>true</code>, the instance is enabled for hibernation; otherwise, it is not enabled for hibernation.</p>
    #[doc(hidden)]
    pub configured: std::option::Option<bool>,
}
impl LaunchTemplateHibernationOptions {
    /// <p>If this parameter is set to <code>true</code>, the instance is enabled for hibernation; otherwise, it is not enabled for hibernation.</p>
    pub fn configured(&self) -> std::option::Option<bool> {
        self.configured
    }
}
/// See [`LaunchTemplateHibernationOptions`](crate::model::LaunchTemplateHibernationOptions).
pub mod launch_template_hibernation_options {

    /// A builder for [`LaunchTemplateHibernationOptions`](crate::model::LaunchTemplateHibernationOptions).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) configured: std::option::Option<bool>,
    }
    impl Builder {
        /// <p>If this parameter is set to <code>true</code>, the instance is enabled for hibernation; otherwise, it is not enabled for hibernation.</p>
        pub fn configured(mut self, input: bool) -> Self {
            self.configured = Some(input);
            self
        }
        /// <p>If this parameter is set to <code>true</code>, the instance is enabled for hibernation; otherwise, it is not enabled for hibernation.</p>
        pub fn set_configured(mut self, input: std::option::Option<bool>) -> Self {
            self.configured = input;
            self
        }
        /// Consumes the builder and constructs a [`LaunchTemplateHibernationOptions`](crate::model::LaunchTemplateHibernationOptions).
        pub fn build(self) -> crate::model::LaunchTemplateHibernationOptions {
            crate::model::LaunchTemplateHibernationOptions {
                configured: self.configured,
            }
        }
    }
}
impl LaunchTemplateHibernationOptions {
    /// Creates a new builder-style object to manufacture [`LaunchTemplateHibernationOptions`](crate::model::LaunchTemplateHibernationOptions).
    pub fn builder() -> crate::model::launch_template_hibernation_options::Builder {
        crate::model::launch_template_hibernation_options::Builder::default()
    }
}

/// <p>Describes a license configuration.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LaunchTemplateLicenseConfiguration {
    /// <p>The Amazon Resource Name (ARN) of the license configuration.</p>
    #[doc(hidden)]
    pub license_configuration_arn: std::option::Option<std::string::String>,
}
impl LaunchTemplateLicenseConfiguration {
    /// <p>The Amazon Resource Name (ARN) of the license configuration.</p>
    pub fn license_configuration_arn(&self) -> std::option::Option<&str> {
        self.license_configuration_arn.as_deref()
    }
}
/// See [`LaunchTemplateLicenseConfiguration`](crate::model::LaunchTemplateLicenseConfiguration).
pub mod launch_template_license_configuration {

    /// A builder for [`LaunchTemplateLicenseConfiguration`](crate::model::LaunchTemplateLicenseConfiguration).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) license_configuration_arn: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The Amazon Resource Name (ARN) of the license configuration.</p>
        pub fn license_configuration_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.license_configuration_arn = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the license configuration.</p>
        pub fn set_license_configuration_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.license_configuration_arn = input;
            self
        }
        /// Consumes the builder and constructs a [`LaunchTemplateLicenseConfiguration`](crate::model::LaunchTemplateLicenseConfiguration).
        pub fn build(self) -> crate::model::LaunchTemplateLicenseConfiguration {
            crate::model::LaunchTemplateLicenseConfiguration {
                license_configuration_arn: self.license_configuration_arn,
            }
        }
    }
}
impl LaunchTemplateLicenseConfiguration {
    /// Creates a new builder-style object to manufacture [`LaunchTemplateLicenseConfiguration`](crate::model::LaunchTemplateLicenseConfiguration).
    pub fn builder() -> crate::model::launch_template_license_configuration::Builder {
        crate::model::launch_template_license_configuration::Builder::default()
    }
}

/// <p>Information about the Capacity Reservation targeting option.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LaunchTemplateCapacityReservationSpecificationResponse {
    /// <p>Indicates the instance's Capacity Reservation preferences. Possible preferences include:</p>
    /// <ul>
    /// <li> <p> <code>open</code> - The instance can run in any <code>open</code> Capacity Reservation that has matching attributes (instance type, platform, Availability Zone).</p> </li>
    /// <li> <p> <code>none</code> - The instance avoids running in a Capacity Reservation even if one is available. The instance runs in On-Demand capacity.</p> </li>
    /// </ul>
    #[doc(hidden)]
    pub capacity_reservation_preference:
        std::option::Option<crate::model::CapacityReservationPreference>,
    /// <p>Information about the target Capacity Reservation or Capacity Reservation group.</p>
    #[doc(hidden)]
    pub capacity_reservation_target:
        std::option::Option<crate::model::CapacityReservationTargetResponse>,
}
impl LaunchTemplateCapacityReservationSpecificationResponse {
    /// <p>Indicates the instance's Capacity Reservation preferences. Possible preferences include:</p>
    /// <ul>
    /// <li> <p> <code>open</code> - The instance can run in any <code>open</code> Capacity Reservation that has matching attributes (instance type, platform, Availability Zone).</p> </li>
    /// <li> <p> <code>none</code> - The instance avoids running in a Capacity Reservation even if one is available. The instance runs in On-Demand capacity.</p> </li>
    /// </ul>
    pub fn capacity_reservation_preference(
        &self,
    ) -> std::option::Option<&crate::model::CapacityReservationPreference> {
        self.capacity_reservation_preference.as_ref()
    }
    /// <p>Information about the target Capacity Reservation or Capacity Reservation group.</p>
    pub fn capacity_reservation_target(
        &self,
    ) -> std::option::Option<&crate::model::CapacityReservationTargetResponse> {
        self.capacity_reservation_target.as_ref()
    }
}
/// See [`LaunchTemplateCapacityReservationSpecificationResponse`](crate::model::LaunchTemplateCapacityReservationSpecificationResponse).
pub mod launch_template_capacity_reservation_specification_response {

    /// A builder for [`LaunchTemplateCapacityReservationSpecificationResponse`](crate::model::LaunchTemplateCapacityReservationSpecificationResponse).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) capacity_reservation_preference:
            std::option::Option<crate::model::CapacityReservationPreference>,
        pub(crate) capacity_reservation_target:
            std::option::Option<crate::model::CapacityReservationTargetResponse>,
    }
    impl Builder {
        /// <p>Indicates the instance's Capacity Reservation preferences. Possible preferences include:</p>
        /// <ul>
        /// <li> <p> <code>open</code> - The instance can run in any <code>open</code> Capacity Reservation that has matching attributes (instance type, platform, Availability Zone).</p> </li>
        /// <li> <p> <code>none</code> - The instance avoids running in a Capacity Reservation even if one is available. The instance runs in On-Demand capacity.</p> </li>
        /// </ul>
        pub fn capacity_reservation_preference(
            mut self,
            input: crate::model::CapacityReservationPreference,
        ) -> Self {
            self.capacity_reservation_preference = Some(input);
            self
        }
        /// <p>Indicates the instance's Capacity Reservation preferences. Possible preferences include:</p>
        /// <ul>
        /// <li> <p> <code>open</code> - The instance can run in any <code>open</code> Capacity Reservation that has matching attributes (instance type, platform, Availability Zone).</p> </li>
        /// <li> <p> <code>none</code> - The instance avoids running in a Capacity Reservation even if one is available. The instance runs in On-Demand capacity.</p> </li>
        /// </ul>
        pub fn set_capacity_reservation_preference(
            mut self,
            input: std::option::Option<crate::model::CapacityReservationPreference>,
        ) -> Self {
            self.capacity_reservation_preference = input;
            self
        }
        /// <p>Information about the target Capacity Reservation or Capacity Reservation group.</p>
        pub fn capacity_reservation_target(
            mut self,
            input: crate::model::CapacityReservationTargetResponse,
        ) -> Self {
            self.capacity_reservation_target = Some(input);
            self
        }
        /// <p>Information about the target Capacity Reservation or Capacity Reservation group.</p>
        pub fn set_capacity_reservation_target(
            mut self,
            input: std::option::Option<crate::model::CapacityReservationTargetResponse>,
        ) -> Self {
            self.capacity_reservation_target = input;
            self
        }
        /// Consumes the builder and constructs a [`LaunchTemplateCapacityReservationSpecificationResponse`](crate::model::LaunchTemplateCapacityReservationSpecificationResponse).
        pub fn build(self) -> crate::model::LaunchTemplateCapacityReservationSpecificationResponse {
            crate::model::LaunchTemplateCapacityReservationSpecificationResponse {
                capacity_reservation_preference: self.capacity_reservation_preference,
                capacity_reservation_target: self.capacity_reservation_target,
            }
        }
    }
}
impl LaunchTemplateCapacityReservationSpecificationResponse {
    /// Creates a new builder-style object to manufacture [`LaunchTemplateCapacityReservationSpecificationResponse`](crate::model::LaunchTemplateCapacityReservationSpecificationResponse).
    pub fn builder(
    ) -> crate::model::launch_template_capacity_reservation_specification_response::Builder {
        crate::model::launch_template_capacity_reservation_specification_response::Builder::default(
        )
    }
}

/// <p>The CPU options for the instance.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LaunchTemplateCpuOptions {
    /// <p>The number of CPU cores for the instance.</p>
    #[doc(hidden)]
    pub core_count: std::option::Option<i32>,
    /// <p>The number of threads per CPU core.</p>
    #[doc(hidden)]
    pub threads_per_core: std::option::Option<i32>,
}
impl LaunchTemplateCpuOptions {
    /// <p>The number of CPU cores for the instance.</p>
    pub fn core_count(&self) -> std::option::Option<i32> {
        self.core_count
    }
    /// <p>The number of threads per CPU core.</p>
    pub fn threads_per_core(&self) -> std::option::Option<i32> {
        self.threads_per_core
    }
}
/// See [`LaunchTemplateCpuOptions`](crate::model::LaunchTemplateCpuOptions).
pub mod launch_template_cpu_options {

    /// A builder for [`LaunchTemplateCpuOptions`](crate::model::LaunchTemplateCpuOptions).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) core_count: std::option::Option<i32>,
        pub(crate) threads_per_core: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>The number of CPU cores for the instance.</p>
        pub fn core_count(mut self, input: i32) -> Self {
            self.core_count = Some(input);
            self
        }
        /// <p>The number of CPU cores for the instance.</p>
        pub fn set_core_count(mut self, input: std::option::Option<i32>) -> Self {
            self.core_count = input;
            self
        }
        /// <p>The number of threads per CPU core.</p>
        pub fn threads_per_core(mut self, input: i32) -> Self {
            self.threads_per_core = Some(input);
            self
        }
        /// <p>The number of threads per CPU core.</p>
        pub fn set_threads_per_core(mut self, input: std::option::Option<i32>) -> Self {
            self.threads_per_core = input;
            self
        }
        /// Consumes the builder and constructs a [`LaunchTemplateCpuOptions`](crate::model::LaunchTemplateCpuOptions).
        pub fn build(self) -> crate::model::LaunchTemplateCpuOptions {
            crate::model::LaunchTemplateCpuOptions {
                core_count: self.core_count,
                threads_per_core: self.threads_per_core,
            }
        }
    }
}
impl LaunchTemplateCpuOptions {
    /// Creates a new builder-style object to manufacture [`LaunchTemplateCpuOptions`](crate::model::LaunchTemplateCpuOptions).
    pub fn builder() -> crate::model::launch_template_cpu_options::Builder {
        crate::model::launch_template_cpu_options::Builder::default()
    }
}

/// <p>Describes the credit option for CPU usage of a T instance.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CreditSpecification {
    /// <p>The credit option for CPU usage of a T instance.</p>
    /// <p>Valid values: <code>standard</code> | <code>unlimited</code> </p>
    #[doc(hidden)]
    pub cpu_credits: std::option::Option<std::string::String>,
}
impl CreditSpecification {
    /// <p>The credit option for CPU usage of a T instance.</p>
    /// <p>Valid values: <code>standard</code> | <code>unlimited</code> </p>
    pub fn cpu_credits(&self) -> std::option::Option<&str> {
        self.cpu_credits.as_deref()
    }
}
/// See [`CreditSpecification`](crate::model::CreditSpecification).
pub mod credit_specification {

    /// A builder for [`CreditSpecification`](crate::model::CreditSpecification).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) cpu_credits: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The credit option for CPU usage of a T instance.</p>
        /// <p>Valid values: <code>standard</code> | <code>unlimited</code> </p>
        pub fn cpu_credits(mut self, input: impl Into<std::string::String>) -> Self {
            self.cpu_credits = Some(input.into());
            self
        }
        /// <p>The credit option for CPU usage of a T instance.</p>
        /// <p>Valid values: <code>standard</code> | <code>unlimited</code> </p>
        pub fn set_cpu_credits(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.cpu_credits = input;
            self
        }
        /// Consumes the builder and constructs a [`CreditSpecification`](crate::model::CreditSpecification).
        pub fn build(self) -> crate::model::CreditSpecification {
            crate::model::CreditSpecification {
                cpu_credits: self.cpu_credits,
            }
        }
    }
}
impl CreditSpecification {
    /// Creates a new builder-style object to manufacture [`CreditSpecification`](crate::model::CreditSpecification).
    pub fn builder() -> crate::model::credit_specification::Builder {
        crate::model::credit_specification::Builder::default()
    }
}

/// <p>The market (purchasing) option for the instances.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LaunchTemplateInstanceMarketOptions {
    /// <p>The market type.</p>
    #[doc(hidden)]
    pub market_type: std::option::Option<crate::model::MarketType>,
    /// <p>The options for Spot Instances.</p>
    #[doc(hidden)]
    pub spot_options: std::option::Option<crate::model::LaunchTemplateSpotMarketOptions>,
}
impl LaunchTemplateInstanceMarketOptions {
    /// <p>The market type.</p>
    pub fn market_type(&self) -> std::option::Option<&crate::model::MarketType> {
        self.market_type.as_ref()
    }
    /// <p>The options for Spot Instances.</p>
    pub fn spot_options(
        &self,
    ) -> std::option::Option<&crate::model::LaunchTemplateSpotMarketOptions> {
        self.spot_options.as_ref()
    }
}
/// See [`LaunchTemplateInstanceMarketOptions`](crate::model::LaunchTemplateInstanceMarketOptions).
pub mod launch_template_instance_market_options {

    /// A builder for [`LaunchTemplateInstanceMarketOptions`](crate::model::LaunchTemplateInstanceMarketOptions).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) market_type: std::option::Option<crate::model::MarketType>,
        pub(crate) spot_options: std::option::Option<crate::model::LaunchTemplateSpotMarketOptions>,
    }
    impl Builder {
        /// <p>The market type.</p>
        pub fn market_type(mut self, input: crate::model::MarketType) -> Self {
            self.market_type = Some(input);
            self
        }
        /// <p>The market type.</p>
        pub fn set_market_type(
            mut self,
            input: std::option::Option<crate::model::MarketType>,
        ) -> Self {
            self.market_type = input;
            self
        }
        /// <p>The options for Spot Instances.</p>
        pub fn spot_options(
            mut self,
            input: crate::model::LaunchTemplateSpotMarketOptions,
        ) -> Self {
            self.spot_options = Some(input);
            self
        }
        /// <p>The options for Spot Instances.</p>
        pub fn set_spot_options(
            mut self,
            input: std::option::Option<crate::model::LaunchTemplateSpotMarketOptions>,
        ) -> Self {
            self.spot_options = input;
            self
        }
        /// Consumes the builder and constructs a [`LaunchTemplateInstanceMarketOptions`](crate::model::LaunchTemplateInstanceMarketOptions).
        pub fn build(self) -> crate::model::LaunchTemplateInstanceMarketOptions {
            crate::model::LaunchTemplateInstanceMarketOptions {
                market_type: self.market_type,
                spot_options: self.spot_options,
            }
        }
    }
}
impl LaunchTemplateInstanceMarketOptions {
    /// Creates a new builder-style object to manufacture [`LaunchTemplateInstanceMarketOptions`](crate::model::LaunchTemplateInstanceMarketOptions).
    pub fn builder() -> crate::model::launch_template_instance_market_options::Builder {
        crate::model::launch_template_instance_market_options::Builder::default()
    }
}

/// <p>The options for Spot Instances.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LaunchTemplateSpotMarketOptions {
    /// <p>The maximum hourly price you're willing to pay for the Spot Instances. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.</p> <important>
    /// <p>If you specify a maximum price, your Spot Instances will be interrupted more frequently than if you do not specify this parameter.</p>
    /// </important>
    #[doc(hidden)]
    pub max_price: std::option::Option<std::string::String>,
    /// <p>The Spot Instance request type.</p>
    #[doc(hidden)]
    pub spot_instance_type: std::option::Option<crate::model::SpotInstanceType>,
    /// <p>The required duration for the Spot Instances (also known as Spot blocks), in minutes. This value must be a multiple of 60 (60, 120, 180, 240, 300, or 360).</p>
    #[doc(hidden)]
    pub block_duration_minutes: std::option::Option<i32>,
    /// <p>The end date of the request. For a one-time request, the request remains active until all instances launch, the request is canceled, or this date is reached. If the request is persistent, it remains active until it is canceled or this date and time is reached.</p>
    #[doc(hidden)]
    pub valid_until: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The behavior when a Spot Instance is interrupted.</p>
    #[doc(hidden)]
    pub instance_interruption_behavior:
        std::option::Option<crate::model::InstanceInterruptionBehavior>,
}
impl LaunchTemplateSpotMarketOptions {
    /// <p>The maximum hourly price you're willing to pay for the Spot Instances. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.</p> <important>
    /// <p>If you specify a maximum price, your Spot Instances will be interrupted more frequently than if you do not specify this parameter.</p>
    /// </important>
    pub fn max_price(&self) -> std::option::Option<&str> {
        self.max_price.as_deref()
    }
    /// <p>The Spot Instance request type.</p>
    pub fn spot_instance_type(&self) -> std::option::Option<&crate::model::SpotInstanceType> {
        self.spot_instance_type.as_ref()
    }
    /// <p>The required duration for the Spot Instances (also known as Spot blocks), in minutes. This value must be a multiple of 60 (60, 120, 180, 240, 300, or 360).</p>
    pub fn block_duration_minutes(&self) -> std::option::Option<i32> {
        self.block_duration_minutes
    }
    /// <p>The end date of the request. For a one-time request, the request remains active until all instances launch, the request is canceled, or this date is reached. If the request is persistent, it remains active until it is canceled or this date and time is reached.</p>
    pub fn valid_until(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.valid_until.as_ref()
    }
    /// <p>The behavior when a Spot Instance is interrupted.</p>
    pub fn instance_interruption_behavior(
        &self,
    ) -> std::option::Option<&crate::model::InstanceInterruptionBehavior> {
        self.instance_interruption_behavior.as_ref()
    }
}
/// See [`LaunchTemplateSpotMarketOptions`](crate::model::LaunchTemplateSpotMarketOptions).
pub mod launch_template_spot_market_options {

    /// A builder for [`LaunchTemplateSpotMarketOptions`](crate::model::LaunchTemplateSpotMarketOptions).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) max_price: std::option::Option<std::string::String>,
        pub(crate) spot_instance_type: std::option::Option<crate::model::SpotInstanceType>,
        pub(crate) block_duration_minutes: std::option::Option<i32>,
        pub(crate) valid_until: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) instance_interruption_behavior:
            std::option::Option<crate::model::InstanceInterruptionBehavior>,
    }
    impl Builder {
        /// <p>The maximum hourly price you're willing to pay for the Spot Instances. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.</p> <important>
        /// <p>If you specify a maximum price, your Spot Instances will be interrupted more frequently than if you do not specify this parameter.</p>
        /// </important>
        pub fn max_price(mut self, input: impl Into<std::string::String>) -> Self {
            self.max_price = Some(input.into());
            self
        }
        /// <p>The maximum hourly price you're willing to pay for the Spot Instances. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.</p> <important>
        /// <p>If you specify a maximum price, your Spot Instances will be interrupted more frequently than if you do not specify this parameter.</p>
        /// </important>
        pub fn set_max_price(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.max_price = input;
            self
        }
        /// <p>The Spot Instance request type.</p>
        pub fn spot_instance_type(mut self, input: crate::model::SpotInstanceType) -> Self {
            self.spot_instance_type = Some(input);
            self
        }
        /// <p>The Spot Instance request type.</p>
        pub fn set_spot_instance_type(
            mut self,
            input: std::option::Option<crate::model::SpotInstanceType>,
        ) -> Self {
            self.spot_instance_type = input;
            self
        }
        /// <p>The required duration for the Spot Instances (also known as Spot blocks), in minutes. This value must be a multiple of 60 (60, 120, 180, 240, 300, or 360).</p>
        pub fn block_duration_minutes(mut self, input: i32) -> Self {
            self.block_duration_minutes = Some(input);
            self
        }
        /// <p>The required duration for the Spot Instances (also known as Spot blocks), in minutes. This value must be a multiple of 60 (60, 120, 180, 240, 300, or 360).</p>
        pub fn set_block_duration_minutes(mut self, input: std::option::Option<i32>) -> Self {
            self.block_duration_minutes = input;
            self
        }
        /// <p>The end date of the request. For a one-time request, the request remains active until all instances launch, the request is canceled, or this date is reached. If the request is persistent, it remains active until it is canceled or this date and time is reached.</p>
        pub fn valid_until(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.valid_until = Some(input);
            self
        }
        /// <p>The end date of the request. For a one-time request, the request remains active until all instances launch, the request is canceled, or this date is reached. If the request is persistent, it remains active until it is canceled or this date and time is reached.</p>
        pub fn set_valid_until(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.valid_until = input;
            self
        }
        /// <p>The behavior when a Spot Instance is interrupted.</p>
        pub fn instance_interruption_behavior(
            mut self,
            input: crate::model::InstanceInterruptionBehavior,
        ) -> Self {
            self.instance_interruption_behavior = Some(input);
            self
        }
        /// <p>The behavior when a Spot Instance is interrupted.</p>
        pub fn set_instance_interruption_behavior(
            mut self,
            input: std::option::Option<crate::model::InstanceInterruptionBehavior>,
        ) -> Self {
            self.instance_interruption_behavior = input;
            self
        }
        /// Consumes the builder and constructs a [`LaunchTemplateSpotMarketOptions`](crate::model::LaunchTemplateSpotMarketOptions).
        pub fn build(self) -> crate::model::LaunchTemplateSpotMarketOptions {
            crate::model::LaunchTemplateSpotMarketOptions {
                max_price: self.max_price,
                spot_instance_type: self.spot_instance_type,
                block_duration_minutes: self.block_duration_minutes,
                valid_until: self.valid_until,
                instance_interruption_behavior: self.instance_interruption_behavior,
            }
        }
    }
}
impl LaunchTemplateSpotMarketOptions {
    /// Creates a new builder-style object to manufacture [`LaunchTemplateSpotMarketOptions`](crate::model::LaunchTemplateSpotMarketOptions).
    pub fn builder() -> crate::model::launch_template_spot_market_options::Builder {
        crate::model::launch_template_spot_market_options::Builder::default()
    }
}

/// <p> Describes an elastic inference accelerator. </p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LaunchTemplateElasticInferenceAcceleratorResponse {
    /// <p> The type of elastic inference accelerator. The possible values are eia1.medium, eia1.large, and eia1.xlarge. </p>
    #[doc(hidden)]
    pub r#type: std::option::Option<std::string::String>,
    /// <p> The number of elastic inference accelerators to attach to the instance. </p>
    /// <p>Default: 1</p>
    #[doc(hidden)]
    pub count: std::option::Option<i32>,
}
impl LaunchTemplateElasticInferenceAcceleratorResponse {
    /// <p> The type of elastic inference accelerator. The possible values are eia1.medium, eia1.large, and eia1.xlarge. </p>
    pub fn r#type(&self) -> std::option::Option<&str> {
        self.r#type.as_deref()
    }
    /// <p> The number of elastic inference accelerators to attach to the instance. </p>
    /// <p>Default: 1</p>
    pub fn count(&self) -> std::option::Option<i32> {
        self.count
    }
}
/// See [`LaunchTemplateElasticInferenceAcceleratorResponse`](crate::model::LaunchTemplateElasticInferenceAcceleratorResponse).
pub mod launch_template_elastic_inference_accelerator_response {

    /// A builder for [`LaunchTemplateElasticInferenceAcceleratorResponse`](crate::model::LaunchTemplateElasticInferenceAcceleratorResponse).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) r#type: std::option::Option<std::string::String>,
        pub(crate) count: std::option::Option<i32>,
    }
    impl Builder {
        /// <p> The type of elastic inference accelerator. The possible values are eia1.medium, eia1.large, and eia1.xlarge. </p>
        pub fn r#type(mut self, input: impl Into<std::string::String>) -> Self {
            self.r#type = Some(input.into());
            self
        }
        /// <p> The type of elastic inference accelerator. The possible values are eia1.medium, eia1.large, and eia1.xlarge. </p>
        pub fn set_type(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.r#type = input;
            self
        }
        /// <p> The number of elastic inference accelerators to attach to the instance. </p>
        /// <p>Default: 1</p>
        pub fn count(mut self, input: i32) -> Self {
            self.count = Some(input);
            self
        }
        /// <p> The number of elastic inference accelerators to attach to the instance. </p>
        /// <p>Default: 1</p>
        pub fn set_count(mut self, input: std::option::Option<i32>) -> Self {
            self.count = input;
            self
        }
        /// Consumes the builder and constructs a [`LaunchTemplateElasticInferenceAcceleratorResponse`](crate::model::LaunchTemplateElasticInferenceAcceleratorResponse).
        pub fn build(self) -> crate::model::LaunchTemplateElasticInferenceAcceleratorResponse {
            crate::model::LaunchTemplateElasticInferenceAcceleratorResponse {
                r#type: self.r#type,
                count: self.count,
            }
        }
    }
}
impl LaunchTemplateElasticInferenceAcceleratorResponse {
    /// Creates a new builder-style object to manufacture [`LaunchTemplateElasticInferenceAcceleratorResponse`](crate::model::LaunchTemplateElasticInferenceAcceleratorResponse).
    pub fn builder() -> crate::model::launch_template_elastic_inference_accelerator_response::Builder
    {
        crate::model::launch_template_elastic_inference_accelerator_response::Builder::default()
    }
}

/// <p>Describes an elastic GPU.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ElasticGpuSpecificationResponse {
    /// <p>The elastic GPU type.</p>
    #[doc(hidden)]
    pub r#type: std::option::Option<std::string::String>,
}
impl ElasticGpuSpecificationResponse {
    /// <p>The elastic GPU type.</p>
    pub fn r#type(&self) -> std::option::Option<&str> {
        self.r#type.as_deref()
    }
}
/// See [`ElasticGpuSpecificationResponse`](crate::model::ElasticGpuSpecificationResponse).
pub mod elastic_gpu_specification_response {

    /// A builder for [`ElasticGpuSpecificationResponse`](crate::model::ElasticGpuSpecificationResponse).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) r#type: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The elastic GPU type.</p>
        pub fn r#type(mut self, input: impl Into<std::string::String>) -> Self {
            self.r#type = Some(input.into());
            self
        }
        /// <p>The elastic GPU type.</p>
        pub fn set_type(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.r#type = input;
            self
        }
        /// Consumes the builder and constructs a [`ElasticGpuSpecificationResponse`](crate::model::ElasticGpuSpecificationResponse).
        pub fn build(self) -> crate::model::ElasticGpuSpecificationResponse {
            crate::model::ElasticGpuSpecificationResponse {
                r#type: self.r#type,
            }
        }
    }
}
impl ElasticGpuSpecificationResponse {
    /// Creates a new builder-style object to manufacture [`ElasticGpuSpecificationResponse`](crate::model::ElasticGpuSpecificationResponse).
    pub fn builder() -> crate::model::elastic_gpu_specification_response::Builder {
        crate::model::elastic_gpu_specification_response::Builder::default()
    }
}

/// <p>The tags specification for the launch template.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LaunchTemplateTagSpecification {
    /// <p>The type of resource to tag.</p>
    #[doc(hidden)]
    pub resource_type: std::option::Option<crate::model::ResourceType>,
    /// <p>The tags for the resource.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl LaunchTemplateTagSpecification {
    /// <p>The type of resource to tag.</p>
    pub fn resource_type(&self) -> std::option::Option<&crate::model::ResourceType> {
        self.resource_type.as_ref()
    }
    /// <p>The tags for the resource.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
}
/// See [`LaunchTemplateTagSpecification`](crate::model::LaunchTemplateTagSpecification).
pub mod launch_template_tag_specification {

    /// A builder for [`LaunchTemplateTagSpecification`](crate::model::LaunchTemplateTagSpecification).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) resource_type: std::option::Option<crate::model::ResourceType>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    }
    impl Builder {
        /// <p>The type of resource to tag.</p>
        pub fn resource_type(mut self, input: crate::model::ResourceType) -> Self {
            self.resource_type = Some(input);
            self
        }
        /// <p>The type of resource to tag.</p>
        pub fn set_resource_type(
            mut self,
            input: std::option::Option<crate::model::ResourceType>,
        ) -> Self {
            self.resource_type = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>The tags for the resource.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>The tags for the resource.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// Consumes the builder and constructs a [`LaunchTemplateTagSpecification`](crate::model::LaunchTemplateTagSpecification).
        pub fn build(self) -> crate::model::LaunchTemplateTagSpecification {
            crate::model::LaunchTemplateTagSpecification {
                resource_type: self.resource_type,
                tags: self.tags,
            }
        }
    }
}
impl LaunchTemplateTagSpecification {
    /// Creates a new builder-style object to manufacture [`LaunchTemplateTagSpecification`](crate::model::LaunchTemplateTagSpecification).
    pub fn builder() -> crate::model::launch_template_tag_specification::Builder {
        crate::model::launch_template_tag_specification::Builder::default()
    }
}

/// <p>Describes the placement of an instance.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LaunchTemplatePlacement {
    /// <p>The Availability Zone of the instance.</p>
    #[doc(hidden)]
    pub availability_zone: std::option::Option<std::string::String>,
    /// <p>The affinity setting for the instance on the Dedicated Host.</p>
    #[doc(hidden)]
    pub affinity: std::option::Option<std::string::String>,
    /// <p>The name of the placement group for the instance.</p>
    #[doc(hidden)]
    pub group_name: std::option::Option<std::string::String>,
    /// <p>The ID of the Dedicated Host for the instance.</p>
    #[doc(hidden)]
    pub host_id: std::option::Option<std::string::String>,
    /// <p>The tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of <code>dedicated</code> runs on single-tenant hardware. </p>
    #[doc(hidden)]
    pub tenancy: std::option::Option<crate::model::Tenancy>,
    /// <p>Reserved for future use.</p>
    #[doc(hidden)]
    pub spread_domain: std::option::Option<std::string::String>,
    /// <p>The ARN of the host resource group in which to launch the instances. </p>
    #[doc(hidden)]
    pub host_resource_group_arn: std::option::Option<std::string::String>,
    /// <p>The number of the partition the instance should launch in. Valid only if the placement group strategy is set to <code>partition</code>.</p>
    #[doc(hidden)]
    pub partition_number: std::option::Option<i32>,
    /// <p>The Group ID of the placement group. You must specify the Placement Group <b>Group ID</b> to launch an instance in a shared placement group.</p>
    #[doc(hidden)]
    pub group_id: std::option::Option<std::string::String>,
}
impl LaunchTemplatePlacement {
    /// <p>The Availability Zone of the instance.</p>
    pub fn availability_zone(&self) -> std::option::Option<&str> {
        self.availability_zone.as_deref()
    }
    /// <p>The affinity setting for the instance on the Dedicated Host.</p>
    pub fn affinity(&self) -> std::option::Option<&str> {
        self.affinity.as_deref()
    }
    /// <p>The name of the placement group for the instance.</p>
    pub fn group_name(&self) -> std::option::Option<&str> {
        self.group_name.as_deref()
    }
    /// <p>The ID of the Dedicated Host for the instance.</p>
    pub fn host_id(&self) -> std::option::Option<&str> {
        self.host_id.as_deref()
    }
    /// <p>The tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of <code>dedicated</code> runs on single-tenant hardware. </p>
    pub fn tenancy(&self) -> std::option::Option<&crate::model::Tenancy> {
        self.tenancy.as_ref()
    }
    /// <p>Reserved for future use.</p>
    pub fn spread_domain(&self) -> std::option::Option<&str> {
        self.spread_domain.as_deref()
    }
    /// <p>The ARN of the host resource group in which to launch the instances. </p>
    pub fn host_resource_group_arn(&self) -> std::option::Option<&str> {
        self.host_resource_group_arn.as_deref()
    }
    /// <p>The number of the partition the instance should launch in. Valid only if the placement group strategy is set to <code>partition</code>.</p>
    pub fn partition_number(&self) -> std::option::Option<i32> {
        self.partition_number
    }
    /// <p>The Group ID of the placement group. You must specify the Placement Group <b>Group ID</b> to launch an instance in a shared placement group.</p>
    pub fn group_id(&self) -> std::option::Option<&str> {
        self.group_id.as_deref()
    }
}
/// See [`LaunchTemplatePlacement`](crate::model::LaunchTemplatePlacement).
pub mod launch_template_placement {

    /// A builder for [`LaunchTemplatePlacement`](crate::model::LaunchTemplatePlacement).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) availability_zone: std::option::Option<std::string::String>,
        pub(crate) affinity: std::option::Option<std::string::String>,
        pub(crate) group_name: std::option::Option<std::string::String>,
        pub(crate) host_id: std::option::Option<std::string::String>,
        pub(crate) tenancy: std::option::Option<crate::model::Tenancy>,
        pub(crate) spread_domain: std::option::Option<std::string::String>,
        pub(crate) host_resource_group_arn: std::option::Option<std::string::String>,
        pub(crate) partition_number: std::option::Option<i32>,
        pub(crate) group_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The Availability Zone of the instance.</p>
        pub fn availability_zone(mut self, input: impl Into<std::string::String>) -> Self {
            self.availability_zone = Some(input.into());
            self
        }
        /// <p>The Availability Zone of the instance.</p>
        pub fn set_availability_zone(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.availability_zone = input;
            self
        }
        /// <p>The affinity setting for the instance on the Dedicated Host.</p>
        pub fn affinity(mut self, input: impl Into<std::string::String>) -> Self {
            self.affinity = Some(input.into());
            self
        }
        /// <p>The affinity setting for the instance on the Dedicated Host.</p>
        pub fn set_affinity(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.affinity = input;
            self
        }
        /// <p>The name of the placement group for the instance.</p>
        pub fn group_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.group_name = Some(input.into());
            self
        }
        /// <p>The name of the placement group for the instance.</p>
        pub fn set_group_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.group_name = input;
            self
        }
        /// <p>The ID of the Dedicated Host for the instance.</p>
        pub fn host_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.host_id = Some(input.into());
            self
        }
        /// <p>The ID of the Dedicated Host for the instance.</p>
        pub fn set_host_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.host_id = input;
            self
        }
        /// <p>The tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of <code>dedicated</code> runs on single-tenant hardware. </p>
        pub fn tenancy(mut self, input: crate::model::Tenancy) -> Self {
            self.tenancy = Some(input);
            self
        }
        /// <p>The tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of <code>dedicated</code> runs on single-tenant hardware. </p>
        pub fn set_tenancy(mut self, input: std::option::Option<crate::model::Tenancy>) -> Self {
            self.tenancy = input;
            self
        }
        /// <p>Reserved for future use.</p>
        pub fn spread_domain(mut self, input: impl Into<std::string::String>) -> Self {
            self.spread_domain = Some(input.into());
            self
        }
        /// <p>Reserved for future use.</p>
        pub fn set_spread_domain(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.spread_domain = input;
            self
        }
        /// <p>The ARN of the host resource group in which to launch the instances. </p>
        pub fn host_resource_group_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.host_resource_group_arn = Some(input.into());
            self
        }
        /// <p>The ARN of the host resource group in which to launch the instances. </p>
        pub fn set_host_resource_group_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.host_resource_group_arn = input;
            self
        }
        /// <p>The number of the partition the instance should launch in. Valid only if the placement group strategy is set to <code>partition</code>.</p>
        pub fn partition_number(mut self, input: i32) -> Self {
            self.partition_number = Some(input);
            self
        }
        /// <p>The number of the partition the instance should launch in. Valid only if the placement group strategy is set to <code>partition</code>.</p>
        pub fn set_partition_number(mut self, input: std::option::Option<i32>) -> Self {
            self.partition_number = input;
            self
        }
        /// <p>The Group ID of the placement group. You must specify the Placement Group <b>Group ID</b> to launch an instance in a shared placement group.</p>
        pub fn group_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.group_id = Some(input.into());
            self
        }
        /// <p>The Group ID of the placement group. You must specify the Placement Group <b>Group ID</b> to launch an instance in a shared placement group.</p>
        pub fn set_group_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.group_id = input;
            self
        }
        /// Consumes the builder and constructs a [`LaunchTemplatePlacement`](crate::model::LaunchTemplatePlacement).
        pub fn build(self) -> crate::model::LaunchTemplatePlacement {
            crate::model::LaunchTemplatePlacement {
                availability_zone: self.availability_zone,
                affinity: self.affinity,
                group_name: self.group_name,
                host_id: self.host_id,
                tenancy: self.tenancy,
                spread_domain: self.spread_domain,
                host_resource_group_arn: self.host_resource_group_arn,
                partition_number: self.partition_number,
                group_id: self.group_id,
            }
        }
    }
}
impl LaunchTemplatePlacement {
    /// Creates a new builder-style object to manufacture [`LaunchTemplatePlacement`](crate::model::LaunchTemplatePlacement).
    pub fn builder() -> crate::model::launch_template_placement::Builder {
        crate::model::launch_template_placement::Builder::default()
    }
}

/// <p>Describes the monitoring for the instance.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LaunchTemplatesMonitoring {
    /// <p>Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.</p>
    #[doc(hidden)]
    pub enabled: std::option::Option<bool>,
}
impl LaunchTemplatesMonitoring {
    /// <p>Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.</p>
    pub fn enabled(&self) -> std::option::Option<bool> {
        self.enabled
    }
}
/// See [`LaunchTemplatesMonitoring`](crate::model::LaunchTemplatesMonitoring).
pub mod launch_templates_monitoring {

    /// A builder for [`LaunchTemplatesMonitoring`](crate::model::LaunchTemplatesMonitoring).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) enabled: std::option::Option<bool>,
    }
    impl Builder {
        /// <p>Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.</p>
        pub fn enabled(mut self, input: bool) -> Self {
            self.enabled = Some(input);
            self
        }
        /// <p>Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.</p>
        pub fn set_enabled(mut self, input: std::option::Option<bool>) -> Self {
            self.enabled = input;
            self
        }
        /// Consumes the builder and constructs a [`LaunchTemplatesMonitoring`](crate::model::LaunchTemplatesMonitoring).
        pub fn build(self) -> crate::model::LaunchTemplatesMonitoring {
            crate::model::LaunchTemplatesMonitoring {
                enabled: self.enabled,
            }
        }
    }
}
impl LaunchTemplatesMonitoring {
    /// Creates a new builder-style object to manufacture [`LaunchTemplatesMonitoring`](crate::model::LaunchTemplatesMonitoring).
    pub fn builder() -> crate::model::launch_templates_monitoring::Builder {
        crate::model::launch_templates_monitoring::Builder::default()
    }
}

/// <p>Describes a network interface.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LaunchTemplateInstanceNetworkInterfaceSpecification {
    /// <p>Indicates whether to associate a Carrier IP address with eth0 for a new network interface.</p>
    /// <p>Use this option when you launch an instance in a Wavelength Zone and want to associate a Carrier IP address with the network interface. For more information about Carrier IP addresses, see <a href="https://docs.aws.amazon.com/wavelength/latest/developerguide/how-wavelengths-work.html#provider-owned-ip">Carrier IP addresses</a> in the <i>Wavelength Developer Guide</i>.</p>
    #[doc(hidden)]
    pub associate_carrier_ip_address: std::option::Option<bool>,
    /// <p>Indicates whether to associate a public IPv4 address with eth0 for a new network interface.</p>
    #[doc(hidden)]
    pub associate_public_ip_address: std::option::Option<bool>,
    /// <p>Indicates whether the network interface is deleted when the instance is terminated.</p>
    #[doc(hidden)]
    pub delete_on_termination: std::option::Option<bool>,
    /// <p>A description for the network interface.</p>
    #[doc(hidden)]
    pub description: std::option::Option<std::string::String>,
    /// <p>The device index for the network interface attachment.</p>
    #[doc(hidden)]
    pub device_index: std::option::Option<i32>,
    /// <p>The IDs of one or more security groups.</p>
    #[doc(hidden)]
    pub groups: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>The type of network interface.</p>
    #[doc(hidden)]
    pub interface_type: std::option::Option<std::string::String>,
    /// <p>The number of IPv6 addresses for the network interface.</p>
    #[doc(hidden)]
    pub ipv6_address_count: std::option::Option<i32>,
    /// <p>The IPv6 addresses for the network interface.</p>
    #[doc(hidden)]
    pub ipv6_addresses: std::option::Option<std::vec::Vec<crate::model::InstanceIpv6Address>>,
    /// <p>The ID of the network interface.</p>
    #[doc(hidden)]
    pub network_interface_id: std::option::Option<std::string::String>,
    /// <p>The primary private IPv4 address of the network interface.</p>
    #[doc(hidden)]
    pub private_ip_address: std::option::Option<std::string::String>,
    /// <p>One or more private IPv4 addresses.</p>
    #[doc(hidden)]
    pub private_ip_addresses:
        std::option::Option<std::vec::Vec<crate::model::PrivateIpAddressSpecification>>,
    /// <p>The number of secondary private IPv4 addresses for the network interface.</p>
    #[doc(hidden)]
    pub secondary_private_ip_address_count: std::option::Option<i32>,
    /// <p>The ID of the subnet for the network interface.</p>
    #[doc(hidden)]
    pub subnet_id: std::option::Option<std::string::String>,
    /// <p>The index of the network card.</p>
    #[doc(hidden)]
    pub network_card_index: std::option::Option<i32>,
    /// <p>One or more IPv4 prefixes assigned to the network interface.</p>
    #[doc(hidden)]
    pub ipv4_prefixes:
        std::option::Option<std::vec::Vec<crate::model::Ipv4PrefixSpecificationResponse>>,
    /// <p>The number of IPv4 prefixes that Amazon Web Services automatically assigned to the network interface.</p>
    #[doc(hidden)]
    pub ipv4_prefix_count: std::option::Option<i32>,
    /// <p>One or more IPv6 prefixes assigned to the network interface.</p>
    #[doc(hidden)]
    pub ipv6_prefixes:
        std::option::Option<std::vec::Vec<crate::model::Ipv6PrefixSpecificationResponse>>,
    /// <p>The number of IPv6 prefixes that Amazon Web Services automatically assigned to the network interface.</p>
    #[doc(hidden)]
    pub ipv6_prefix_count: std::option::Option<i32>,
}
impl LaunchTemplateInstanceNetworkInterfaceSpecification {
    /// <p>Indicates whether to associate a Carrier IP address with eth0 for a new network interface.</p>
    /// <p>Use this option when you launch an instance in a Wavelength Zone and want to associate a Carrier IP address with the network interface. For more information about Carrier IP addresses, see <a href="https://docs.aws.amazon.com/wavelength/latest/developerguide/how-wavelengths-work.html#provider-owned-ip">Carrier IP addresses</a> in the <i>Wavelength Developer Guide</i>.</p>
    pub fn associate_carrier_ip_address(&self) -> std::option::Option<bool> {
        self.associate_carrier_ip_address
    }
    /// <p>Indicates whether to associate a public IPv4 address with eth0 for a new network interface.</p>
    pub fn associate_public_ip_address(&self) -> std::option::Option<bool> {
        self.associate_public_ip_address
    }
    /// <p>Indicates whether the network interface is deleted when the instance is terminated.</p>
    pub fn delete_on_termination(&self) -> std::option::Option<bool> {
        self.delete_on_termination
    }
    /// <p>A description for the network interface.</p>
    pub fn description(&self) -> std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The device index for the network interface attachment.</p>
    pub fn device_index(&self) -> std::option::Option<i32> {
        self.device_index
    }
    /// <p>The IDs of one or more security groups.</p>
    pub fn groups(&self) -> std::option::Option<&[std::string::String]> {
        self.groups.as_deref()
    }
    /// <p>The type of network interface.</p>
    pub fn interface_type(&self) -> std::option::Option<&str> {
        self.interface_type.as_deref()
    }
    /// <p>The number of IPv6 addresses for the network interface.</p>
    pub fn ipv6_address_count(&self) -> std::option::Option<i32> {
        self.ipv6_address_count
    }
    /// <p>The IPv6 addresses for the network interface.</p>
    pub fn ipv6_addresses(&self) -> std::option::Option<&[crate::model::InstanceIpv6Address]> {
        self.ipv6_addresses.as_deref()
    }
    /// <p>The ID of the network interface.</p>
    pub fn network_interface_id(&self) -> std::option::Option<&str> {
        self.network_interface_id.as_deref()
    }
    /// <p>The primary private IPv4 address of the network interface.</p>
    pub fn private_ip_address(&self) -> std::option::Option<&str> {
        self.private_ip_address.as_deref()
    }
    /// <p>One or more private IPv4 addresses.</p>
    pub fn private_ip_addresses(
        &self,
    ) -> std::option::Option<&[crate::model::PrivateIpAddressSpecification]> {
        self.private_ip_addresses.as_deref()
    }
    /// <p>The number of secondary private IPv4 addresses for the network interface.</p>
    pub fn secondary_private_ip_address_count(&self) -> std::option::Option<i32> {
        self.secondary_private_ip_address_count
    }
    /// <p>The ID of the subnet for the network interface.</p>
    pub fn subnet_id(&self) -> std::option::Option<&str> {
        self.subnet_id.as_deref()
    }
    /// <p>The index of the network card.</p>
    pub fn network_card_index(&self) -> std::option::Option<i32> {
        self.network_card_index
    }
    /// <p>One or more IPv4 prefixes assigned to the network interface.</p>
    pub fn ipv4_prefixes(
        &self,
    ) -> std::option::Option<&[crate::model::Ipv4PrefixSpecificationResponse]> {
        self.ipv4_prefixes.as_deref()
    }
    /// <p>The number of IPv4 prefixes that Amazon Web Services automatically assigned to the network interface.</p>
    pub fn ipv4_prefix_count(&self) -> std::option::Option<i32> {
        self.ipv4_prefix_count
    }
    /// <p>One or more IPv6 prefixes assigned to the network interface.</p>
    pub fn ipv6_prefixes(
        &self,
    ) -> std::option::Option<&[crate::model::Ipv6PrefixSpecificationResponse]> {
        self.ipv6_prefixes.as_deref()
    }
    /// <p>The number of IPv6 prefixes that Amazon Web Services automatically assigned to the network interface.</p>
    pub fn ipv6_prefix_count(&self) -> std::option::Option<i32> {
        self.ipv6_prefix_count
    }
}
/// See [`LaunchTemplateInstanceNetworkInterfaceSpecification`](crate::model::LaunchTemplateInstanceNetworkInterfaceSpecification).
pub mod launch_template_instance_network_interface_specification {

    /// A builder for [`LaunchTemplateInstanceNetworkInterfaceSpecification`](crate::model::LaunchTemplateInstanceNetworkInterfaceSpecification).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) associate_carrier_ip_address: std::option::Option<bool>,
        pub(crate) associate_public_ip_address: std::option::Option<bool>,
        pub(crate) delete_on_termination: std::option::Option<bool>,
        pub(crate) description: std::option::Option<std::string::String>,
        pub(crate) device_index: std::option::Option<i32>,
        pub(crate) groups: std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) interface_type: std::option::Option<std::string::String>,
        pub(crate) ipv6_address_count: std::option::Option<i32>,
        pub(crate) ipv6_addresses:
            std::option::Option<std::vec::Vec<crate::model::InstanceIpv6Address>>,
        pub(crate) network_interface_id: std::option::Option<std::string::String>,
        pub(crate) private_ip_address: std::option::Option<std::string::String>,
        pub(crate) private_ip_addresses:
            std::option::Option<std::vec::Vec<crate::model::PrivateIpAddressSpecification>>,
        pub(crate) secondary_private_ip_address_count: std::option::Option<i32>,
        pub(crate) subnet_id: std::option::Option<std::string::String>,
        pub(crate) network_card_index: std::option::Option<i32>,
        pub(crate) ipv4_prefixes:
            std::option::Option<std::vec::Vec<crate::model::Ipv4PrefixSpecificationResponse>>,
        pub(crate) ipv4_prefix_count: std::option::Option<i32>,
        pub(crate) ipv6_prefixes:
            std::option::Option<std::vec::Vec<crate::model::Ipv6PrefixSpecificationResponse>>,
        pub(crate) ipv6_prefix_count: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>Indicates whether to associate a Carrier IP address with eth0 for a new network interface.</p>
        /// <p>Use this option when you launch an instance in a Wavelength Zone and want to associate a Carrier IP address with the network interface. For more information about Carrier IP addresses, see <a href="https://docs.aws.amazon.com/wavelength/latest/developerguide/how-wavelengths-work.html#provider-owned-ip">Carrier IP addresses</a> in the <i>Wavelength Developer Guide</i>.</p>
        pub fn associate_carrier_ip_address(mut self, input: bool) -> Self {
            self.associate_carrier_ip_address = Some(input);
            self
        }
        /// <p>Indicates whether to associate a Carrier IP address with eth0 for a new network interface.</p>
        /// <p>Use this option when you launch an instance in a Wavelength Zone and want to associate a Carrier IP address with the network interface. For more information about Carrier IP addresses, see <a href="https://docs.aws.amazon.com/wavelength/latest/developerguide/how-wavelengths-work.html#provider-owned-ip">Carrier IP addresses</a> in the <i>Wavelength Developer Guide</i>.</p>
        pub fn set_associate_carrier_ip_address(
            mut self,
            input: std::option::Option<bool>,
        ) -> Self {
            self.associate_carrier_ip_address = input;
            self
        }
        /// <p>Indicates whether to associate a public IPv4 address with eth0 for a new network interface.</p>
        pub fn associate_public_ip_address(mut self, input: bool) -> Self {
            self.associate_public_ip_address = Some(input);
            self
        }
        /// <p>Indicates whether to associate a public IPv4 address with eth0 for a new network interface.</p>
        pub fn set_associate_public_ip_address(mut self, input: std::option::Option<bool>) -> Self {
            self.associate_public_ip_address = input;
            self
        }
        /// <p>Indicates whether the network interface is deleted when the instance is terminated.</p>
        pub fn delete_on_termination(mut self, input: bool) -> Self {
            self.delete_on_termination = Some(input);
            self
        }
        /// <p>Indicates whether the network interface is deleted when the instance is terminated.</p>
        pub fn set_delete_on_termination(mut self, input: std::option::Option<bool>) -> Self {
            self.delete_on_termination = input;
            self
        }
        /// <p>A description for the network interface.</p>
        pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
            self.description = Some(input.into());
            self
        }
        /// <p>A description for the network interface.</p>
        pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.description = input;
            self
        }
        /// <p>The device index for the network interface attachment.</p>
        pub fn device_index(mut self, input: i32) -> Self {
            self.device_index = Some(input);
            self
        }
        /// <p>The device index for the network interface attachment.</p>
        pub fn set_device_index(mut self, input: std::option::Option<i32>) -> Self {
            self.device_index = input;
            self
        }
        /// Appends an item to `groups`.
        ///
        /// To override the contents of this collection use [`set_groups`](Self::set_groups).
        ///
        /// <p>The IDs of one or more security groups.</p>
        pub fn groups(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.groups.unwrap_or_default();
            v.push(input.into());
            self.groups = Some(v);
            self
        }
        /// <p>The IDs of one or more security groups.</p>
        pub fn set_groups(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.groups = input;
            self
        }
        /// <p>The type of network interface.</p>
        pub fn interface_type(mut self, input: impl Into<std::string::String>) -> Self {
            self.interface_type = Some(input.into());
            self
        }
        /// <p>The type of network interface.</p>
        pub fn set_interface_type(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.interface_type = input;
            self
        }
        /// <p>The number of IPv6 addresses for the network interface.</p>
        pub fn ipv6_address_count(mut self, input: i32) -> Self {
            self.ipv6_address_count = Some(input);
            self
        }
        /// <p>The number of IPv6 addresses for the network interface.</p>
        pub fn set_ipv6_address_count(mut self, input: std::option::Option<i32>) -> Self {
            self.ipv6_address_count = input;
            self
        }
        /// Appends an item to `ipv6_addresses`.
        ///
        /// To override the contents of this collection use [`set_ipv6_addresses`](Self::set_ipv6_addresses).
        ///
        /// <p>The IPv6 addresses for the network interface.</p>
        pub fn ipv6_addresses(mut self, input: crate::model::InstanceIpv6Address) -> Self {
            let mut v = self.ipv6_addresses.unwrap_or_default();
            v.push(input);
            self.ipv6_addresses = Some(v);
            self
        }
        /// <p>The IPv6 addresses for the network interface.</p>
        pub fn set_ipv6_addresses(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::InstanceIpv6Address>>,
        ) -> Self {
            self.ipv6_addresses = input;
            self
        }
        /// <p>The ID of the network interface.</p>
        pub fn network_interface_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.network_interface_id = Some(input.into());
            self
        }
        /// <p>The ID of the network interface.</p>
        pub fn set_network_interface_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.network_interface_id = input;
            self
        }
        /// <p>The primary private IPv4 address of the network interface.</p>
        pub fn private_ip_address(mut self, input: impl Into<std::string::String>) -> Self {
            self.private_ip_address = Some(input.into());
            self
        }
        /// <p>The primary private IPv4 address of the network interface.</p>
        pub fn set_private_ip_address(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.private_ip_address = input;
            self
        }
        /// Appends an item to `private_ip_addresses`.
        ///
        /// To override the contents of this collection use [`set_private_ip_addresses`](Self::set_private_ip_addresses).
        ///
        /// <p>One or more private IPv4 addresses.</p>
        pub fn private_ip_addresses(
            mut self,
            input: crate::model::PrivateIpAddressSpecification,
        ) -> Self {
            let mut v = self.private_ip_addresses.unwrap_or_default();
            v.push(input);
            self.private_ip_addresses = Some(v);
            self
        }
        /// <p>One or more private IPv4 addresses.</p>
        pub fn set_private_ip_addresses(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::PrivateIpAddressSpecification>>,
        ) -> Self {
            self.private_ip_addresses = input;
            self
        }
        /// <p>The number of secondary private IPv4 addresses for the network interface.</p>
        pub fn secondary_private_ip_address_count(mut self, input: i32) -> Self {
            self.secondary_private_ip_address_count = Some(input);
            self
        }
        /// <p>The number of secondary private IPv4 addresses for the network interface.</p>
        pub fn set_secondary_private_ip_address_count(
            mut self,
            input: std::option::Option<i32>,
        ) -> Self {
            self.secondary_private_ip_address_count = input;
            self
        }
        /// <p>The ID of the subnet for the network interface.</p>
        pub fn subnet_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.subnet_id = Some(input.into());
            self
        }
        /// <p>The ID of the subnet for the network interface.</p>
        pub fn set_subnet_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.subnet_id = input;
            self
        }
        /// <p>The index of the network card.</p>
        pub fn network_card_index(mut self, input: i32) -> Self {
            self.network_card_index = Some(input);
            self
        }
        /// <p>The index of the network card.</p>
        pub fn set_network_card_index(mut self, input: std::option::Option<i32>) -> Self {
            self.network_card_index = input;
            self
        }
        /// Appends an item to `ipv4_prefixes`.
        ///
        /// To override the contents of this collection use [`set_ipv4_prefixes`](Self::set_ipv4_prefixes).
        ///
        /// <p>One or more IPv4 prefixes assigned to the network interface.</p>
        pub fn ipv4_prefixes(
            mut self,
            input: crate::model::Ipv4PrefixSpecificationResponse,
        ) -> Self {
            let mut v = self.ipv4_prefixes.unwrap_or_default();
            v.push(input);
            self.ipv4_prefixes = Some(v);
            self
        }
        /// <p>One or more IPv4 prefixes assigned to the network interface.</p>
        pub fn set_ipv4_prefixes(
            mut self,
            input: std::option::Option<
                std::vec::Vec<crate::model::Ipv4PrefixSpecificationResponse>,
            >,
        ) -> Self {
            self.ipv4_prefixes = input;
            self
        }
        /// <p>The number of IPv4 prefixes that Amazon Web Services automatically assigned to the network interface.</p>
        pub fn ipv4_prefix_count(mut self, input: i32) -> Self {
            self.ipv4_prefix_count = Some(input);
            self
        }
        /// <p>The number of IPv4 prefixes that Amazon Web Services automatically assigned to the network interface.</p>
        pub fn set_ipv4_prefix_count(mut self, input: std::option::Option<i32>) -> Self {
            self.ipv4_prefix_count = input;
            self
        }
        /// Appends an item to `ipv6_prefixes`.
        ///
        /// To override the contents of this collection use [`set_ipv6_prefixes`](Self::set_ipv6_prefixes).
        ///
        /// <p>One or more IPv6 prefixes assigned to the network interface.</p>
        pub fn ipv6_prefixes(
            mut self,
            input: crate::model::Ipv6PrefixSpecificationResponse,
        ) -> Self {
            let mut v = self.ipv6_prefixes.unwrap_or_default();
            v.push(input);
            self.ipv6_prefixes = Some(v);
            self
        }
        /// <p>One or more IPv6 prefixes assigned to the network interface.</p>
        pub fn set_ipv6_prefixes(
            mut self,
            input: std::option::Option<
                std::vec::Vec<crate::model::Ipv6PrefixSpecificationResponse>,
            >,
        ) -> Self {
            self.ipv6_prefixes = input;
            self
        }
        /// <p>The number of IPv6 prefixes that Amazon Web Services automatically assigned to the network interface.</p>
        pub fn ipv6_prefix_count(mut self, input: i32) -> Self {
            self.ipv6_prefix_count = Some(input);
            self
        }
        /// <p>The number of IPv6 prefixes that Amazon Web Services automatically assigned to the network interface.</p>
        pub fn set_ipv6_prefix_count(mut self, input: std::option::Option<i32>) -> Self {
            self.ipv6_prefix_count = input;
            self
        }
        /// Consumes the builder and constructs a [`LaunchTemplateInstanceNetworkInterfaceSpecification`](crate::model::LaunchTemplateInstanceNetworkInterfaceSpecification).
        pub fn build(self) -> crate::model::LaunchTemplateInstanceNetworkInterfaceSpecification {
            crate::model::LaunchTemplateInstanceNetworkInterfaceSpecification {
                associate_carrier_ip_address: self.associate_carrier_ip_address,
                associate_public_ip_address: self.associate_public_ip_address,
                delete_on_termination: self.delete_on_termination,
                description: self.description,
                device_index: self.device_index,
                groups: self.groups,
                interface_type: self.interface_type,
                ipv6_address_count: self.ipv6_address_count,
                ipv6_addresses: self.ipv6_addresses,
                network_interface_id: self.network_interface_id,
                private_ip_address: self.private_ip_address,
                private_ip_addresses: self.private_ip_addresses,
                secondary_private_ip_address_count: self.secondary_private_ip_address_count,
                subnet_id: self.subnet_id,
                network_card_index: self.network_card_index,
                ipv4_prefixes: self.ipv4_prefixes,
                ipv4_prefix_count: self.ipv4_prefix_count,
                ipv6_prefixes: self.ipv6_prefixes,
                ipv6_prefix_count: self.ipv6_prefix_count,
            }
        }
    }
}
impl LaunchTemplateInstanceNetworkInterfaceSpecification {
    /// Creates a new builder-style object to manufacture [`LaunchTemplateInstanceNetworkInterfaceSpecification`](crate::model::LaunchTemplateInstanceNetworkInterfaceSpecification).
    pub fn builder(
    ) -> crate::model::launch_template_instance_network_interface_specification::Builder {
        crate::model::launch_template_instance_network_interface_specification::Builder::default()
    }
}

/// <p>Information about the IPv6 delegated prefixes assigned to a network interface.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Ipv6PrefixSpecificationResponse {
    /// <p>The IPv6 delegated prefixes assigned to the network interface.</p>
    #[doc(hidden)]
    pub ipv6_prefix: std::option::Option<std::string::String>,
}
impl Ipv6PrefixSpecificationResponse {
    /// <p>The IPv6 delegated prefixes assigned to the network interface.</p>
    pub fn ipv6_prefix(&self) -> std::option::Option<&str> {
        self.ipv6_prefix.as_deref()
    }
}
/// See [`Ipv6PrefixSpecificationResponse`](crate::model::Ipv6PrefixSpecificationResponse).
pub mod ipv6_prefix_specification_response {

    /// A builder for [`Ipv6PrefixSpecificationResponse`](crate::model::Ipv6PrefixSpecificationResponse).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) ipv6_prefix: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The IPv6 delegated prefixes assigned to the network interface.</p>
        pub fn ipv6_prefix(mut self, input: impl Into<std::string::String>) -> Self {
            self.ipv6_prefix = Some(input.into());
            self
        }
        /// <p>The IPv6 delegated prefixes assigned to the network interface.</p>
        pub fn set_ipv6_prefix(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.ipv6_prefix = input;
            self
        }
        /// Consumes the builder and constructs a [`Ipv6PrefixSpecificationResponse`](crate::model::Ipv6PrefixSpecificationResponse).
        pub fn build(self) -> crate::model::Ipv6PrefixSpecificationResponse {
            crate::model::Ipv6PrefixSpecificationResponse {
                ipv6_prefix: self.ipv6_prefix,
            }
        }
    }
}
impl Ipv6PrefixSpecificationResponse {
    /// Creates a new builder-style object to manufacture [`Ipv6PrefixSpecificationResponse`](crate::model::Ipv6PrefixSpecificationResponse).
    pub fn builder() -> crate::model::ipv6_prefix_specification_response::Builder {
        crate::model::ipv6_prefix_specification_response::Builder::default()
    }
}

/// <p>Information about the IPv4 delegated prefixes assigned to a network interface.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Ipv4PrefixSpecificationResponse {
    /// <p>The IPv4 delegated prefixes assigned to the network interface.</p>
    #[doc(hidden)]
    pub ipv4_prefix: std::option::Option<std::string::String>,
}
impl Ipv4PrefixSpecificationResponse {
    /// <p>The IPv4 delegated prefixes assigned to the network interface.</p>
    pub fn ipv4_prefix(&self) -> std::option::Option<&str> {
        self.ipv4_prefix.as_deref()
    }
}
/// See [`Ipv4PrefixSpecificationResponse`](crate::model::Ipv4PrefixSpecificationResponse).
pub mod ipv4_prefix_specification_response {

    /// A builder for [`Ipv4PrefixSpecificationResponse`](crate::model::Ipv4PrefixSpecificationResponse).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) ipv4_prefix: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The IPv4 delegated prefixes assigned to the network interface.</p>
        pub fn ipv4_prefix(mut self, input: impl Into<std::string::String>) -> Self {
            self.ipv4_prefix = Some(input.into());
            self
        }
        /// <p>The IPv4 delegated prefixes assigned to the network interface.</p>
        pub fn set_ipv4_prefix(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.ipv4_prefix = input;
            self
        }
        /// Consumes the builder and constructs a [`Ipv4PrefixSpecificationResponse`](crate::model::Ipv4PrefixSpecificationResponse).
        pub fn build(self) -> crate::model::Ipv4PrefixSpecificationResponse {
            crate::model::Ipv4PrefixSpecificationResponse {
                ipv4_prefix: self.ipv4_prefix,
            }
        }
    }
}
impl Ipv4PrefixSpecificationResponse {
    /// Creates a new builder-style object to manufacture [`Ipv4PrefixSpecificationResponse`](crate::model::Ipv4PrefixSpecificationResponse).
    pub fn builder() -> crate::model::ipv4_prefix_specification_response::Builder {
        crate::model::ipv4_prefix_specification_response::Builder::default()
    }
}

/// <p>Describes a block device mapping.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LaunchTemplateBlockDeviceMapping {
    /// <p>The device name.</p>
    #[doc(hidden)]
    pub device_name: std::option::Option<std::string::String>,
    /// <p>The virtual device name (ephemeralN).</p>
    #[doc(hidden)]
    pub virtual_name: std::option::Option<std::string::String>,
    /// <p>Information about the block device for an EBS volume.</p>
    #[doc(hidden)]
    pub ebs: std::option::Option<crate::model::LaunchTemplateEbsBlockDevice>,
    /// <p>To omit the device from the block device mapping, specify an empty string.</p>
    #[doc(hidden)]
    pub no_device: std::option::Option<std::string::String>,
}
impl LaunchTemplateBlockDeviceMapping {
    /// <p>The device name.</p>
    pub fn device_name(&self) -> std::option::Option<&str> {
        self.device_name.as_deref()
    }
    /// <p>The virtual device name (ephemeralN).</p>
    pub fn virtual_name(&self) -> std::option::Option<&str> {
        self.virtual_name.as_deref()
    }
    /// <p>Information about the block device for an EBS volume.</p>
    pub fn ebs(&self) -> std::option::Option<&crate::model::LaunchTemplateEbsBlockDevice> {
        self.ebs.as_ref()
    }
    /// <p>To omit the device from the block device mapping, specify an empty string.</p>
    pub fn no_device(&self) -> std::option::Option<&str> {
        self.no_device.as_deref()
    }
}
/// See [`LaunchTemplateBlockDeviceMapping`](crate::model::LaunchTemplateBlockDeviceMapping).
pub mod launch_template_block_device_mapping {

    /// A builder for [`LaunchTemplateBlockDeviceMapping`](crate::model::LaunchTemplateBlockDeviceMapping).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) device_name: std::option::Option<std::string::String>,
        pub(crate) virtual_name: std::option::Option<std::string::String>,
        pub(crate) ebs: std::option::Option<crate::model::LaunchTemplateEbsBlockDevice>,
        pub(crate) no_device: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The device name.</p>
        pub fn device_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.device_name = Some(input.into());
            self
        }
        /// <p>The device name.</p>
        pub fn set_device_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.device_name = input;
            self
        }
        /// <p>The virtual device name (ephemeralN).</p>
        pub fn virtual_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.virtual_name = Some(input.into());
            self
        }
        /// <p>The virtual device name (ephemeralN).</p>
        pub fn set_virtual_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.virtual_name = input;
            self
        }
        /// <p>Information about the block device for an EBS volume.</p>
        pub fn ebs(mut self, input: crate::model::LaunchTemplateEbsBlockDevice) -> Self {
            self.ebs = Some(input);
            self
        }
        /// <p>Information about the block device for an EBS volume.</p>
        pub fn set_ebs(
            mut self,
            input: std::option::Option<crate::model::LaunchTemplateEbsBlockDevice>,
        ) -> Self {
            self.ebs = input;
            self
        }
        /// <p>To omit the device from the block device mapping, specify an empty string.</p>
        pub fn no_device(mut self, input: impl Into<std::string::String>) -> Self {
            self.no_device = Some(input.into());
            self
        }
        /// <p>To omit the device from the block device mapping, specify an empty string.</p>
        pub fn set_no_device(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.no_device = input;
            self
        }
        /// Consumes the builder and constructs a [`LaunchTemplateBlockDeviceMapping`](crate::model::LaunchTemplateBlockDeviceMapping).
        pub fn build(self) -> crate::model::LaunchTemplateBlockDeviceMapping {
            crate::model::LaunchTemplateBlockDeviceMapping {
                device_name: self.device_name,
                virtual_name: self.virtual_name,
                ebs: self.ebs,
                no_device: self.no_device,
            }
        }
    }
}
impl LaunchTemplateBlockDeviceMapping {
    /// Creates a new builder-style object to manufacture [`LaunchTemplateBlockDeviceMapping`](crate::model::LaunchTemplateBlockDeviceMapping).
    pub fn builder() -> crate::model::launch_template_block_device_mapping::Builder {
        crate::model::launch_template_block_device_mapping::Builder::default()
    }
}

/// <p>Describes a block device for an EBS volume.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LaunchTemplateEbsBlockDevice {
    /// <p>Indicates whether the EBS volume is encrypted.</p>
    #[doc(hidden)]
    pub encrypted: std::option::Option<bool>,
    /// <p>Indicates whether the EBS volume is deleted on instance termination.</p>
    #[doc(hidden)]
    pub delete_on_termination: std::option::Option<bool>,
    /// <p>The number of I/O operations per second (IOPS) that the volume supports. </p>
    #[doc(hidden)]
    pub iops: std::option::Option<i32>,
    /// <p>The ARN of the Key Management Service (KMS) CMK used for encryption.</p>
    #[doc(hidden)]
    pub kms_key_id: std::option::Option<std::string::String>,
    /// <p>The ID of the snapshot.</p>
    #[doc(hidden)]
    pub snapshot_id: std::option::Option<std::string::String>,
    /// <p>The size of the volume, in GiB.</p>
    #[doc(hidden)]
    pub volume_size: std::option::Option<i32>,
    /// <p>The volume type.</p>
    #[doc(hidden)]
    pub volume_type: std::option::Option<crate::model::VolumeType>,
    /// <p>The throughput that the volume supports, in MiB/s.</p>
    #[doc(hidden)]
    pub throughput: std::option::Option<i32>,
}
impl LaunchTemplateEbsBlockDevice {
    /// <p>Indicates whether the EBS volume is encrypted.</p>
    pub fn encrypted(&self) -> std::option::Option<bool> {
        self.encrypted
    }
    /// <p>Indicates whether the EBS volume is deleted on instance termination.</p>
    pub fn delete_on_termination(&self) -> std::option::Option<bool> {
        self.delete_on_termination
    }
    /// <p>The number of I/O operations per second (IOPS) that the volume supports. </p>
    pub fn iops(&self) -> std::option::Option<i32> {
        self.iops
    }
    /// <p>The ARN of the Key Management Service (KMS) CMK used for encryption.</p>
    pub fn kms_key_id(&self) -> std::option::Option<&str> {
        self.kms_key_id.as_deref()
    }
    /// <p>The ID of the snapshot.</p>
    pub fn snapshot_id(&self) -> std::option::Option<&str> {
        self.snapshot_id.as_deref()
    }
    /// <p>The size of the volume, in GiB.</p>
    pub fn volume_size(&self) -> std::option::Option<i32> {
        self.volume_size
    }
    /// <p>The volume type.</p>
    pub fn volume_type(&self) -> std::option::Option<&crate::model::VolumeType> {
        self.volume_type.as_ref()
    }
    /// <p>The throughput that the volume supports, in MiB/s.</p>
    pub fn throughput(&self) -> std::option::Option<i32> {
        self.throughput
    }
}
/// See [`LaunchTemplateEbsBlockDevice`](crate::model::LaunchTemplateEbsBlockDevice).
pub mod launch_template_ebs_block_device {

    /// A builder for [`LaunchTemplateEbsBlockDevice`](crate::model::LaunchTemplateEbsBlockDevice).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) encrypted: std::option::Option<bool>,
        pub(crate) delete_on_termination: std::option::Option<bool>,
        pub(crate) iops: std::option::Option<i32>,
        pub(crate) kms_key_id: std::option::Option<std::string::String>,
        pub(crate) snapshot_id: std::option::Option<std::string::String>,
        pub(crate) volume_size: std::option::Option<i32>,
        pub(crate) volume_type: std::option::Option<crate::model::VolumeType>,
        pub(crate) throughput: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>Indicates whether the EBS volume is encrypted.</p>
        pub fn encrypted(mut self, input: bool) -> Self {
            self.encrypted = Some(input);
            self
        }
        /// <p>Indicates whether the EBS volume is encrypted.</p>
        pub fn set_encrypted(mut self, input: std::option::Option<bool>) -> Self {
            self.encrypted = input;
            self
        }
        /// <p>Indicates whether the EBS volume is deleted on instance termination.</p>
        pub fn delete_on_termination(mut self, input: bool) -> Self {
            self.delete_on_termination = Some(input);
            self
        }
        /// <p>Indicates whether the EBS volume is deleted on instance termination.</p>
        pub fn set_delete_on_termination(mut self, input: std::option::Option<bool>) -> Self {
            self.delete_on_termination = input;
            self
        }
        /// <p>The number of I/O operations per second (IOPS) that the volume supports. </p>
        pub fn iops(mut self, input: i32) -> Self {
            self.iops = Some(input);
            self
        }
        /// <p>The number of I/O operations per second (IOPS) that the volume supports. </p>
        pub fn set_iops(mut self, input: std::option::Option<i32>) -> Self {
            self.iops = input;
            self
        }
        /// <p>The ARN of the Key Management Service (KMS) CMK used for encryption.</p>
        pub fn kms_key_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.kms_key_id = Some(input.into());
            self
        }
        /// <p>The ARN of the Key Management Service (KMS) CMK used for encryption.</p>
        pub fn set_kms_key_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.kms_key_id = input;
            self
        }
        /// <p>The ID of the snapshot.</p>
        pub fn snapshot_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.snapshot_id = Some(input.into());
            self
        }
        /// <p>The ID of the snapshot.</p>
        pub fn set_snapshot_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.snapshot_id = input;
            self
        }
        /// <p>The size of the volume, in GiB.</p>
        pub fn volume_size(mut self, input: i32) -> Self {
            self.volume_size = Some(input);
            self
        }
        /// <p>The size of the volume, in GiB.</p>
        pub fn set_volume_size(mut self, input: std::option::Option<i32>) -> Self {
            self.volume_size = input;
            self
        }
        /// <p>The volume type.</p>
        pub fn volume_type(mut self, input: crate::model::VolumeType) -> Self {
            self.volume_type = Some(input);
            self
        }
        /// <p>The volume type.</p>
        pub fn set_volume_type(
            mut self,
            input: std::option::Option<crate::model::VolumeType>,
        ) -> Self {
            self.volume_type = input;
            self
        }
        /// <p>The throughput that the volume supports, in MiB/s.</p>
        pub fn throughput(mut self, input: i32) -> Self {
            self.throughput = Some(input);
            self
        }
        /// <p>The throughput that the volume supports, in MiB/s.</p>
        pub fn set_throughput(mut self, input: std::option::Option<i32>) -> Self {
            self.throughput = input;
            self
        }
        /// Consumes the builder and constructs a [`LaunchTemplateEbsBlockDevice`](crate::model::LaunchTemplateEbsBlockDevice).
        pub fn build(self) -> crate::model::LaunchTemplateEbsBlockDevice {
            crate::model::LaunchTemplateEbsBlockDevice {
                encrypted: self.encrypted,
                delete_on_termination: self.delete_on_termination,
                iops: self.iops,
                kms_key_id: self.kms_key_id,
                snapshot_id: self.snapshot_id,
                volume_size: self.volume_size,
                volume_type: self.volume_type,
                throughput: self.throughput,
            }
        }
    }
}
impl LaunchTemplateEbsBlockDevice {
    /// Creates a new builder-style object to manufacture [`LaunchTemplateEbsBlockDevice`](crate::model::LaunchTemplateEbsBlockDevice).
    pub fn builder() -> crate::model::launch_template_ebs_block_device::Builder {
        crate::model::launch_template_ebs_block_device::Builder::default()
    }
}

/// <p>Describes an IAM instance profile.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LaunchTemplateIamInstanceProfileSpecification {
    /// <p>The Amazon Resource Name (ARN) of the instance profile.</p>
    #[doc(hidden)]
    pub arn: std::option::Option<std::string::String>,
    /// <p>The name of the instance profile.</p>
    #[doc(hidden)]
    pub name: std::option::Option<std::string::String>,
}
impl LaunchTemplateIamInstanceProfileSpecification {
    /// <p>The Amazon Resource Name (ARN) of the instance profile.</p>
    pub fn arn(&self) -> std::option::Option<&str> {
        self.arn.as_deref()
    }
    /// <p>The name of the instance profile.</p>
    pub fn name(&self) -> std::option::Option<&str> {
        self.name.as_deref()
    }
}
/// See [`LaunchTemplateIamInstanceProfileSpecification`](crate::model::LaunchTemplateIamInstanceProfileSpecification).
pub mod launch_template_iam_instance_profile_specification {

    /// A builder for [`LaunchTemplateIamInstanceProfileSpecification`](crate::model::LaunchTemplateIamInstanceProfileSpecification).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) arn: std::option::Option<std::string::String>,
        pub(crate) name: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The Amazon Resource Name (ARN) of the instance profile.</p>
        pub fn arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.arn = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the instance profile.</p>
        pub fn set_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.arn = input;
            self
        }
        /// <p>The name of the instance profile.</p>
        pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
            self.name = Some(input.into());
            self
        }
        /// <p>The name of the instance profile.</p>
        pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.name = input;
            self
        }
        /// Consumes the builder and constructs a [`LaunchTemplateIamInstanceProfileSpecification`](crate::model::LaunchTemplateIamInstanceProfileSpecification).
        pub fn build(self) -> crate::model::LaunchTemplateIamInstanceProfileSpecification {
            crate::model::LaunchTemplateIamInstanceProfileSpecification {
                arn: self.arn,
                name: self.name,
            }
        }
    }
}
impl LaunchTemplateIamInstanceProfileSpecification {
    /// Creates a new builder-style object to manufacture [`LaunchTemplateIamInstanceProfileSpecification`](crate::model::LaunchTemplateIamInstanceProfileSpecification).
    pub fn builder() -> crate::model::launch_template_iam_instance_profile_specification::Builder {
        crate::model::launch_template_iam_instance_profile_specification::Builder::default()
    }
}

/// <p>In IPAM, an allocation is a CIDR assignment from an IPAM pool to another resource or IPAM pool.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct IpamPoolAllocation {
    /// <p>The CIDR for the allocation. A CIDR is a representation of an IP address and its associated network mask (or netmask) and refers to a range of IP addresses. An IPv4 CIDR example is <code>10.24.34.0/23</code>. An IPv6 CIDR example is <code>2001:DB8::/32</code>.</p>
    #[doc(hidden)]
    pub cidr: std::option::Option<std::string::String>,
    /// <p>The ID of an allocation.</p>
    #[doc(hidden)]
    pub ipam_pool_allocation_id: std::option::Option<std::string::String>,
    /// <p>A description of the pool allocation.</p>
    #[doc(hidden)]
    pub description: std::option::Option<std::string::String>,
    /// <p>The ID of the resource.</p>
    #[doc(hidden)]
    pub resource_id: std::option::Option<std::string::String>,
    /// <p>The type of the resource.</p>
    #[doc(hidden)]
    pub resource_type: std::option::Option<crate::model::IpamPoolAllocationResourceType>,
    /// <p>The Amazon Web Services Region of the resource.</p>
    #[doc(hidden)]
    pub resource_region: std::option::Option<std::string::String>,
    /// <p>The owner of the resource.</p>
    #[doc(hidden)]
    pub resource_owner: std::option::Option<std::string::String>,
}
impl IpamPoolAllocation {
    /// <p>The CIDR for the allocation. A CIDR is a representation of an IP address and its associated network mask (or netmask) and refers to a range of IP addresses. An IPv4 CIDR example is <code>10.24.34.0/23</code>. An IPv6 CIDR example is <code>2001:DB8::/32</code>.</p>
    pub fn cidr(&self) -> std::option::Option<&str> {
        self.cidr.as_deref()
    }
    /// <p>The ID of an allocation.</p>
    pub fn ipam_pool_allocation_id(&self) -> std::option::Option<&str> {
        self.ipam_pool_allocation_id.as_deref()
    }
    /// <p>A description of the pool allocation.</p>
    pub fn description(&self) -> std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The ID of the resource.</p>
    pub fn resource_id(&self) -> std::option::Option<&str> {
        self.resource_id.as_deref()
    }
    /// <p>The type of the resource.</p>
    pub fn resource_type(
        &self,
    ) -> std::option::Option<&crate::model::IpamPoolAllocationResourceType> {
        self.resource_type.as_ref()
    }
    /// <p>The Amazon Web Services Region of the resource.</p>
    pub fn resource_region(&self) -> std::option::Option<&str> {
        self.resource_region.as_deref()
    }
    /// <p>The owner of the resource.</p>
    pub fn resource_owner(&self) -> std::option::Option<&str> {
        self.resource_owner.as_deref()
    }
}
/// See [`IpamPoolAllocation`](crate::model::IpamPoolAllocation).
pub mod ipam_pool_allocation {

    /// A builder for [`IpamPoolAllocation`](crate::model::IpamPoolAllocation).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) cidr: std::option::Option<std::string::String>,
        pub(crate) ipam_pool_allocation_id: std::option::Option<std::string::String>,
        pub(crate) description: std::option::Option<std::string::String>,
        pub(crate) resource_id: std::option::Option<std::string::String>,
        pub(crate) resource_type: std::option::Option<crate::model::IpamPoolAllocationResourceType>,
        pub(crate) resource_region: std::option::Option<std::string::String>,
        pub(crate) resource_owner: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The CIDR for the allocation. A CIDR is a representation of an IP address and its associated network mask (or netmask) and refers to a range of IP addresses. An IPv4 CIDR example is <code>10.24.34.0/23</code>. An IPv6 CIDR example is <code>2001:DB8::/32</code>.</p>
        pub fn cidr(mut self, input: impl Into<std::string::String>) -> Self {
            self.cidr = Some(input.into());
            self
        }
        /// <p>The CIDR for the allocation. A CIDR is a representation of an IP address and its associated network mask (or netmask) and refers to a range of IP addresses. An IPv4 CIDR example is <code>10.24.34.0/23</code>. An IPv6 CIDR example is <code>2001:DB8::/32</code>.</p>
        pub fn set_cidr(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.cidr = input;
            self
        }
        /// <p>The ID of an allocation.</p>
        pub fn ipam_pool_allocation_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.ipam_pool_allocation_id = Some(input.into());
            self
        }
        /// <p>The ID of an allocation.</p>
        pub fn set_ipam_pool_allocation_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.ipam_pool_allocation_id = input;
            self
        }
        /// <p>A description of the pool allocation.</p>
        pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
            self.description = Some(input.into());
            self
        }
        /// <p>A description of the pool allocation.</p>
        pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.description = input;
            self
        }
        /// <p>The ID of the resource.</p>
        pub fn resource_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.resource_id = Some(input.into());
            self
        }
        /// <p>The ID of the resource.</p>
        pub fn set_resource_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.resource_id = input;
            self
        }
        /// <p>The type of the resource.</p>
        pub fn resource_type(
            mut self,
            input: crate::model::IpamPoolAllocationResourceType,
        ) -> Self {
            self.resource_type = Some(input);
            self
        }
        /// <p>The type of the resource.</p>
        pub fn set_resource_type(
            mut self,
            input: std::option::Option<crate::model::IpamPoolAllocationResourceType>,
        ) -> Self {
            self.resource_type = input;
            self
        }
        /// <p>The Amazon Web Services Region of the resource.</p>
        pub fn resource_region(mut self, input: impl Into<std::string::String>) -> Self {
            self.resource_region = Some(input.into());
            self
        }
        /// <p>The Amazon Web Services Region of the resource.</p>
        pub fn set_resource_region(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.resource_region = input;
            self
        }
        /// <p>The owner of the resource.</p>
        pub fn resource_owner(mut self, input: impl Into<std::string::String>) -> Self {
            self.resource_owner = Some(input.into());
            self
        }
        /// <p>The owner of the resource.</p>
        pub fn set_resource_owner(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.resource_owner = input;
            self
        }
        /// Consumes the builder and constructs a [`IpamPoolAllocation`](crate::model::IpamPoolAllocation).
        pub fn build(self) -> crate::model::IpamPoolAllocation {
            crate::model::IpamPoolAllocation {
                cidr: self.cidr,
                ipam_pool_allocation_id: self.ipam_pool_allocation_id,
                description: self.description,
                resource_id: self.resource_id,
                resource_type: self.resource_type,
                resource_region: self.resource_region,
                resource_owner: self.resource_owner,
            }
        }
    }
}
impl IpamPoolAllocation {
    /// Creates a new builder-style object to manufacture [`IpamPoolAllocation`](crate::model::IpamPoolAllocation).
    pub fn builder() -> crate::model::ipam_pool_allocation::Builder {
        crate::model::ipam_pool_allocation::Builder::default()
    }
}

/// When writing a match expression against `IpamPoolAllocationResourceType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let ipampoolallocationresourcetype = unimplemented!();
/// match ipampoolallocationresourcetype {
///     IpamPoolAllocationResourceType::Custom => { /* ... */ },
///     IpamPoolAllocationResourceType::Ec2PublicIpv4Pool => { /* ... */ },
///     IpamPoolAllocationResourceType::IpamPool => { /* ... */ },
///     IpamPoolAllocationResourceType::Vpc => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `ipampoolallocationresourcetype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `IpamPoolAllocationResourceType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `IpamPoolAllocationResourceType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `IpamPoolAllocationResourceType::NewFeature` is defined.
/// Specifically, when `ipampoolallocationresourcetype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `IpamPoolAllocationResourceType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 IpamPoolAllocationResourceType {
    #[allow(missing_docs)] // documentation missing in model
    Custom,
    #[allow(missing_docs)] // documentation missing in model
    Ec2PublicIpv4Pool,
    #[allow(missing_docs)] // documentation missing in model
    IpamPool,
    #[allow(missing_docs)] // documentation missing in model
    Vpc,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for IpamPoolAllocationResourceType {
    fn from(s: &str) -> Self {
        match s {
            "custom" => IpamPoolAllocationResourceType::Custom,
            "ec2-public-ipv4-pool" => IpamPoolAllocationResourceType::Ec2PublicIpv4Pool,
            "ipam-pool" => IpamPoolAllocationResourceType::IpamPool,
            "vpc" => IpamPoolAllocationResourceType::Vpc,
            other => IpamPoolAllocationResourceType::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for IpamPoolAllocationResourceType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(IpamPoolAllocationResourceType::from(s))
    }
}
impl IpamPoolAllocationResourceType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            IpamPoolAllocationResourceType::Custom => "custom",
            IpamPoolAllocationResourceType::Ec2PublicIpv4Pool => "ec2-public-ipv4-pool",
            IpamPoolAllocationResourceType::IpamPool => "ipam-pool",
            IpamPoolAllocationResourceType::Vpc => "vpc",
            IpamPoolAllocationResourceType::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["custom", "ec2-public-ipv4-pool", "ipam-pool", "vpc"]
    }
}
impl AsRef<str> for IpamPoolAllocationResourceType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>The historical record of a CIDR within an IPAM scope. For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/ipam/view-history-cidr-ipam.html">View the history of IP addresses</a> in the <i>Amazon VPC IPAM User Guide</i>. </p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct IpamAddressHistoryRecord {
    /// <p>The ID of the resource owner.</p>
    #[doc(hidden)]
    pub resource_owner_id: std::option::Option<std::string::String>,
    /// <p>The Amazon Web Services Region of the resource.</p>
    #[doc(hidden)]
    pub resource_region: std::option::Option<std::string::String>,
    /// <p>The type of the resource.</p>
    #[doc(hidden)]
    pub resource_type: std::option::Option<crate::model::IpamAddressHistoryResourceType>,
    /// <p>The ID of the resource.</p>
    #[doc(hidden)]
    pub resource_id: std::option::Option<std::string::String>,
    /// <p>The CIDR of the resource.</p>
    #[doc(hidden)]
    pub resource_cidr: std::option::Option<std::string::String>,
    /// <p>The name of the resource.</p>
    #[doc(hidden)]
    pub resource_name: std::option::Option<std::string::String>,
    /// <p>The compliance status of a resource. For more information on compliance statuses, see <a href="https://docs.aws.amazon.com/vpc/latest/ipam/monitor-cidr-compliance-ipam.html">Monitor CIDR usage by resource</a> in the <i>Amazon VPC IPAM User Guide</i>.</p>
    #[doc(hidden)]
    pub resource_compliance_status: std::option::Option<crate::model::IpamComplianceStatus>,
    /// <p>The overlap status of an IPAM resource. The overlap status tells you if the CIDR for a resource overlaps with another CIDR in the scope. For more information on overlap statuses, see <a href="https://docs.aws.amazon.com/vpc/latest/ipam/monitor-cidr-compliance-ipam.html">Monitor CIDR usage by resource</a> in the <i>Amazon VPC IPAM User Guide</i>.</p>
    #[doc(hidden)]
    pub resource_overlap_status: std::option::Option<crate::model::IpamOverlapStatus>,
    /// <p>The VPC ID of the resource.</p>
    #[doc(hidden)]
    pub vpc_id: std::option::Option<std::string::String>,
    /// <p>Sampled start time of the resource-to-CIDR association within the IPAM scope. Changes are picked up in periodic snapshots, so the start time may have occurred before this specific time.</p>
    #[doc(hidden)]
    pub sampled_start_time: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>Sampled end time of the resource-to-CIDR association within the IPAM scope. Changes are picked up in periodic snapshots, so the end time may have occurred before this specific time.</p>
    #[doc(hidden)]
    pub sampled_end_time: std::option::Option<aws_smithy_types::DateTime>,
}
impl IpamAddressHistoryRecord {
    /// <p>The ID of the resource owner.</p>
    pub fn resource_owner_id(&self) -> std::option::Option<&str> {
        self.resource_owner_id.as_deref()
    }
    /// <p>The Amazon Web Services Region of the resource.</p>
    pub fn resource_region(&self) -> std::option::Option<&str> {
        self.resource_region.as_deref()
    }
    /// <p>The type of the resource.</p>
    pub fn resource_type(
        &self,
    ) -> std::option::Option<&crate::model::IpamAddressHistoryResourceType> {
        self.resource_type.as_ref()
    }
    /// <p>The ID of the resource.</p>
    pub fn resource_id(&self) -> std::option::Option<&str> {
        self.resource_id.as_deref()
    }
    /// <p>The CIDR of the resource.</p>
    pub fn resource_cidr(&self) -> std::option::Option<&str> {
        self.resource_cidr.as_deref()
    }
    /// <p>The name of the resource.</p>
    pub fn resource_name(&self) -> std::option::Option<&str> {
        self.resource_name.as_deref()
    }
    /// <p>The compliance status of a resource. For more information on compliance statuses, see <a href="https://docs.aws.amazon.com/vpc/latest/ipam/monitor-cidr-compliance-ipam.html">Monitor CIDR usage by resource</a> in the <i>Amazon VPC IPAM User Guide</i>.</p>
    pub fn resource_compliance_status(
        &self,
    ) -> std::option::Option<&crate::model::IpamComplianceStatus> {
        self.resource_compliance_status.as_ref()
    }
    /// <p>The overlap status of an IPAM resource. The overlap status tells you if the CIDR for a resource overlaps with another CIDR in the scope. For more information on overlap statuses, see <a href="https://docs.aws.amazon.com/vpc/latest/ipam/monitor-cidr-compliance-ipam.html">Monitor CIDR usage by resource</a> in the <i>Amazon VPC IPAM User Guide</i>.</p>
    pub fn resource_overlap_status(&self) -> std::option::Option<&crate::model::IpamOverlapStatus> {
        self.resource_overlap_status.as_ref()
    }
    /// <p>The VPC ID of the resource.</p>
    pub fn vpc_id(&self) -> std::option::Option<&str> {
        self.vpc_id.as_deref()
    }
    /// <p>Sampled start time of the resource-to-CIDR association within the IPAM scope. Changes are picked up in periodic snapshots, so the start time may have occurred before this specific time.</p>
    pub fn sampled_start_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.sampled_start_time.as_ref()
    }
    /// <p>Sampled end time of the resource-to-CIDR association within the IPAM scope. Changes are picked up in periodic snapshots, so the end time may have occurred before this specific time.</p>
    pub fn sampled_end_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.sampled_end_time.as_ref()
    }
}
/// See [`IpamAddressHistoryRecord`](crate::model::IpamAddressHistoryRecord).
pub mod ipam_address_history_record {

    /// A builder for [`IpamAddressHistoryRecord`](crate::model::IpamAddressHistoryRecord).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) resource_owner_id: std::option::Option<std::string::String>,
        pub(crate) resource_region: std::option::Option<std::string::String>,
        pub(crate) resource_type: std::option::Option<crate::model::IpamAddressHistoryResourceType>,
        pub(crate) resource_id: std::option::Option<std::string::String>,
        pub(crate) resource_cidr: std::option::Option<std::string::String>,
        pub(crate) resource_name: std::option::Option<std::string::String>,
        pub(crate) resource_compliance_status:
            std::option::Option<crate::model::IpamComplianceStatus>,
        pub(crate) resource_overlap_status: std::option::Option<crate::model::IpamOverlapStatus>,
        pub(crate) vpc_id: std::option::Option<std::string::String>,
        pub(crate) sampled_start_time: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) sampled_end_time: std::option::Option<aws_smithy_types::DateTime>,
    }
    impl Builder {
        /// <p>The ID of the resource owner.</p>
        pub fn resource_owner_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.resource_owner_id = Some(input.into());
            self
        }
        /// <p>The ID of the resource owner.</p>
        pub fn set_resource_owner_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.resource_owner_id = input;
            self
        }
        /// <p>The Amazon Web Services Region of the resource.</p>
        pub fn resource_region(mut self, input: impl Into<std::string::String>) -> Self {
            self.resource_region = Some(input.into());
            self
        }
        /// <p>The Amazon Web Services Region of the resource.</p>
        pub fn set_resource_region(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.resource_region = input;
            self
        }
        /// <p>The type of the resource.</p>
        pub fn resource_type(
            mut self,
            input: crate::model::IpamAddressHistoryResourceType,
        ) -> Self {
            self.resource_type = Some(input);
            self
        }
        /// <p>The type of the resource.</p>
        pub fn set_resource_type(
            mut self,
            input: std::option::Option<crate::model::IpamAddressHistoryResourceType>,
        ) -> Self {
            self.resource_type = input;
            self
        }
        /// <p>The ID of the resource.</p>
        pub fn resource_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.resource_id = Some(input.into());
            self
        }
        /// <p>The ID of the resource.</p>
        pub fn set_resource_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.resource_id = input;
            self
        }
        /// <p>The CIDR of the resource.</p>
        pub fn resource_cidr(mut self, input: impl Into<std::string::String>) -> Self {
            self.resource_cidr = Some(input.into());
            self
        }
        /// <p>The CIDR of the resource.</p>
        pub fn set_resource_cidr(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.resource_cidr = input;
            self
        }
        /// <p>The name of the resource.</p>
        pub fn resource_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.resource_name = Some(input.into());
            self
        }
        /// <p>The name of the resource.</p>
        pub fn set_resource_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.resource_name = input;
            self
        }
        /// <p>The compliance status of a resource. For more information on compliance statuses, see <a href="https://docs.aws.amazon.com/vpc/latest/ipam/monitor-cidr-compliance-ipam.html">Monitor CIDR usage by resource</a> in the <i>Amazon VPC IPAM User Guide</i>.</p>
        pub fn resource_compliance_status(
            mut self,
            input: crate::model::IpamComplianceStatus,
        ) -> Self {
            self.resource_compliance_status = Some(input);
            self
        }
        /// <p>The compliance status of a resource. For more information on compliance statuses, see <a href="https://docs.aws.amazon.com/vpc/latest/ipam/monitor-cidr-compliance-ipam.html">Monitor CIDR usage by resource</a> in the <i>Amazon VPC IPAM User Guide</i>.</p>
        pub fn set_resource_compliance_status(
            mut self,
            input: std::option::Option<crate::model::IpamComplianceStatus>,
        ) -> Self {
            self.resource_compliance_status = input;
            self
        }
        /// <p>The overlap status of an IPAM resource. The overlap status tells you if the CIDR for a resource overlaps with another CIDR in the scope. For more information on overlap statuses, see <a href="https://docs.aws.amazon.com/vpc/latest/ipam/monitor-cidr-compliance-ipam.html">Monitor CIDR usage by resource</a> in the <i>Amazon VPC IPAM User Guide</i>.</p>
        pub fn resource_overlap_status(mut self, input: crate::model::IpamOverlapStatus) -> Self {
            self.resource_overlap_status = Some(input);
            self
        }
        /// <p>The overlap status of an IPAM resource. The overlap status tells you if the CIDR for a resource overlaps with another CIDR in the scope. For more information on overlap statuses, see <a href="https://docs.aws.amazon.com/vpc/latest/ipam/monitor-cidr-compliance-ipam.html">Monitor CIDR usage by resource</a> in the <i>Amazon VPC IPAM User Guide</i>.</p>
        pub fn set_resource_overlap_status(
            mut self,
            input: std::option::Option<crate::model::IpamOverlapStatus>,
        ) -> Self {
            self.resource_overlap_status = input;
            self
        }
        /// <p>The VPC ID of the resource.</p>
        pub fn vpc_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.vpc_id = Some(input.into());
            self
        }
        /// <p>The VPC ID of the resource.</p>
        pub fn set_vpc_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.vpc_id = input;
            self
        }
        /// <p>Sampled start time of the resource-to-CIDR association within the IPAM scope. Changes are picked up in periodic snapshots, so the start time may have occurred before this specific time.</p>
        pub fn sampled_start_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.sampled_start_time = Some(input);
            self
        }
        /// <p>Sampled start time of the resource-to-CIDR association within the IPAM scope. Changes are picked up in periodic snapshots, so the start time may have occurred before this specific time.</p>
        pub fn set_sampled_start_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.sampled_start_time = input;
            self
        }
        /// <p>Sampled end time of the resource-to-CIDR association within the IPAM scope. Changes are picked up in periodic snapshots, so the end time may have occurred before this specific time.</p>
        pub fn sampled_end_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.sampled_end_time = Some(input);
            self
        }
        /// <p>Sampled end time of the resource-to-CIDR association within the IPAM scope. Changes are picked up in periodic snapshots, so the end time may have occurred before this specific time.</p>
        pub fn set_sampled_end_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.sampled_end_time = input;
            self
        }
        /// Consumes the builder and constructs a [`IpamAddressHistoryRecord`](crate::model::IpamAddressHistoryRecord).
        pub fn build(self) -> crate::model::IpamAddressHistoryRecord {
            crate::model::IpamAddressHistoryRecord {
                resource_owner_id: self.resource_owner_id,
                resource_region: self.resource_region,
                resource_type: self.resource_type,
                resource_id: self.resource_id,
                resource_cidr: self.resource_cidr,
                resource_name: self.resource_name,
                resource_compliance_status: self.resource_compliance_status,
                resource_overlap_status: self.resource_overlap_status,
                vpc_id: self.vpc_id,
                sampled_start_time: self.sampled_start_time,
                sampled_end_time: self.sampled_end_time,
            }
        }
    }
}
impl IpamAddressHistoryRecord {
    /// Creates a new builder-style object to manufacture [`IpamAddressHistoryRecord`](crate::model::IpamAddressHistoryRecord).
    pub fn builder() -> crate::model::ipam_address_history_record::Builder {
        crate::model::ipam_address_history_record::Builder::default()
    }
}

/// When writing a match expression against `IpamAddressHistoryResourceType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let ipamaddresshistoryresourcetype = unimplemented!();
/// match ipamaddresshistoryresourcetype {
///     IpamAddressHistoryResourceType::Eip => { /* ... */ },
///     IpamAddressHistoryResourceType::Instance => { /* ... */ },
///     IpamAddressHistoryResourceType::NetworkInterface => { /* ... */ },
///     IpamAddressHistoryResourceType::Subnet => { /* ... */ },
///     IpamAddressHistoryResourceType::Vpc => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `ipamaddresshistoryresourcetype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `IpamAddressHistoryResourceType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `IpamAddressHistoryResourceType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `IpamAddressHistoryResourceType::NewFeature` is defined.
/// Specifically, when `ipamaddresshistoryresourcetype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `IpamAddressHistoryResourceType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 IpamAddressHistoryResourceType {
    #[allow(missing_docs)] // documentation missing in model
    Eip,
    #[allow(missing_docs)] // documentation missing in model
    Instance,
    #[allow(missing_docs)] // documentation missing in model
    NetworkInterface,
    #[allow(missing_docs)] // documentation missing in model
    Subnet,
    #[allow(missing_docs)] // documentation missing in model
    Vpc,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for IpamAddressHistoryResourceType {
    fn from(s: &str) -> Self {
        match s {
            "eip" => IpamAddressHistoryResourceType::Eip,
            "instance" => IpamAddressHistoryResourceType::Instance,
            "network-interface" => IpamAddressHistoryResourceType::NetworkInterface,
            "subnet" => IpamAddressHistoryResourceType::Subnet,
            "vpc" => IpamAddressHistoryResourceType::Vpc,
            other => IpamAddressHistoryResourceType::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for IpamAddressHistoryResourceType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(IpamAddressHistoryResourceType::from(s))
    }
}
impl IpamAddressHistoryResourceType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            IpamAddressHistoryResourceType::Eip => "eip",
            IpamAddressHistoryResourceType::Instance => "instance",
            IpamAddressHistoryResourceType::NetworkInterface => "network-interface",
            IpamAddressHistoryResourceType::Subnet => "subnet",
            IpamAddressHistoryResourceType::Vpc => "vpc",
            IpamAddressHistoryResourceType::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["eip", "instance", "network-interface", "subnet", "vpc"]
    }
}
impl AsRef<str> for IpamAddressHistoryResourceType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>The list of instance types with the specified instance attributes.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InstanceTypeInfoFromInstanceRequirements {
    /// <p>The matching instance type.</p>
    #[doc(hidden)]
    pub instance_type: std::option::Option<std::string::String>,
}
impl InstanceTypeInfoFromInstanceRequirements {
    /// <p>The matching instance type.</p>
    pub fn instance_type(&self) -> std::option::Option<&str> {
        self.instance_type.as_deref()
    }
}
/// See [`InstanceTypeInfoFromInstanceRequirements`](crate::model::InstanceTypeInfoFromInstanceRequirements).
pub mod instance_type_info_from_instance_requirements {

    /// A builder for [`InstanceTypeInfoFromInstanceRequirements`](crate::model::InstanceTypeInfoFromInstanceRequirements).
    #[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 {
        /// <p>The matching instance type.</p>
        pub fn instance_type(mut self, input: impl Into<std::string::String>) -> Self {
            self.instance_type = Some(input.into());
            self
        }
        /// <p>The matching instance type.</p>
        pub fn set_instance_type(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.instance_type = input;
            self
        }
        /// Consumes the builder and constructs a [`InstanceTypeInfoFromInstanceRequirements`](crate::model::InstanceTypeInfoFromInstanceRequirements).
        pub fn build(self) -> crate::model::InstanceTypeInfoFromInstanceRequirements {
            crate::model::InstanceTypeInfoFromInstanceRequirements {
                instance_type: self.instance_type,
            }
        }
    }
}
impl InstanceTypeInfoFromInstanceRequirements {
    /// Creates a new builder-style object to manufacture [`InstanceTypeInfoFromInstanceRequirements`](crate::model::InstanceTypeInfoFromInstanceRequirements).
    pub fn builder() -> crate::model::instance_type_info_from_instance_requirements::Builder {
        crate::model::instance_type_info_from_instance_requirements::Builder::default()
    }
}

/// <p>Describes a resource group to which a Capacity Reservation has been added.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CapacityReservationGroup {
    /// <p>The ARN of the resource group.</p>
    #[doc(hidden)]
    pub group_arn: std::option::Option<std::string::String>,
    /// <p>The ID of the Amazon Web Services account that owns the resource group.</p>
    #[doc(hidden)]
    pub owner_id: std::option::Option<std::string::String>,
}
impl CapacityReservationGroup {
    /// <p>The ARN of the resource group.</p>
    pub fn group_arn(&self) -> std::option::Option<&str> {
        self.group_arn.as_deref()
    }
    /// <p>The ID of the Amazon Web Services account that owns the resource group.</p>
    pub fn owner_id(&self) -> std::option::Option<&str> {
        self.owner_id.as_deref()
    }
}
/// See [`CapacityReservationGroup`](crate::model::CapacityReservationGroup).
pub mod capacity_reservation_group {

    /// A builder for [`CapacityReservationGroup`](crate::model::CapacityReservationGroup).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) group_arn: std::option::Option<std::string::String>,
        pub(crate) owner_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The ARN of the resource group.</p>
        pub fn group_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.group_arn = Some(input.into());
            self
        }
        /// <p>The ARN of the resource group.</p>
        pub fn set_group_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.group_arn = input;
            self
        }
        /// <p>The ID of the Amazon Web Services account that owns the resource group.</p>
        pub fn owner_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.owner_id = Some(input.into());
            self
        }
        /// <p>The ID of the Amazon Web Services account that owns the resource group.</p>
        pub fn set_owner_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.owner_id = input;
            self
        }
        /// Consumes the builder and constructs a [`CapacityReservationGroup`](crate::model::CapacityReservationGroup).
        pub fn build(self) -> crate::model::CapacityReservationGroup {
            crate::model::CapacityReservationGroup {
                group_arn: self.group_arn,
                owner_id: self.owner_id,
            }
        }
    }
}
impl CapacityReservationGroup {
    /// Creates a new builder-style object to manufacture [`CapacityReservationGroup`](crate::model::CapacityReservationGroup).
    pub fn builder() -> crate::model::capacity_reservation_group::Builder {
        crate::model::capacity_reservation_group::Builder::default()
    }
}

/// <p>Describes service integrations with VPC Flow logs.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct IntegrateServices {
    /// <p>Information about the integration with Amazon Athena.</p>
    #[doc(hidden)]
    pub athena_integrations: std::option::Option<std::vec::Vec<crate::model::AthenaIntegration>>,
}
impl IntegrateServices {
    /// <p>Information about the integration with Amazon Athena.</p>
    pub fn athena_integrations(&self) -> std::option::Option<&[crate::model::AthenaIntegration]> {
        self.athena_integrations.as_deref()
    }
}
/// See [`IntegrateServices`](crate::model::IntegrateServices).
pub mod integrate_services {

    /// A builder for [`IntegrateServices`](crate::model::IntegrateServices).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) athena_integrations:
            std::option::Option<std::vec::Vec<crate::model::AthenaIntegration>>,
    }
    impl Builder {
        /// Appends an item to `athena_integrations`.
        ///
        /// To override the contents of this collection use [`set_athena_integrations`](Self::set_athena_integrations).
        ///
        /// <p>Information about the integration with Amazon Athena.</p>
        pub fn athena_integrations(mut self, input: crate::model::AthenaIntegration) -> Self {
            let mut v = self.athena_integrations.unwrap_or_default();
            v.push(input);
            self.athena_integrations = Some(v);
            self
        }
        /// <p>Information about the integration with Amazon Athena.</p>
        pub fn set_athena_integrations(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::AthenaIntegration>>,
        ) -> Self {
            self.athena_integrations = input;
            self
        }
        /// Consumes the builder and constructs a [`IntegrateServices`](crate::model::IntegrateServices).
        pub fn build(self) -> crate::model::IntegrateServices {
            crate::model::IntegrateServices {
                athena_integrations: self.athena_integrations,
            }
        }
    }
}
impl IntegrateServices {
    /// Creates a new builder-style object to manufacture [`IntegrateServices`](crate::model::IntegrateServices).
    pub fn builder() -> crate::model::integrate_services::Builder {
        crate::model::integrate_services::Builder::default()
    }
}

/// <p>Describes integration options for Amazon Athena.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AthenaIntegration {
    /// <p>The location in Amazon S3 to store the generated CloudFormation template.</p>
    #[doc(hidden)]
    pub integration_result_s3_destination_arn: std::option::Option<std::string::String>,
    /// <p>The schedule for adding new partitions to the table.</p>
    #[doc(hidden)]
    pub partition_load_frequency: std::option::Option<crate::model::PartitionLoadFrequency>,
    /// <p>The start date for the partition.</p>
    #[doc(hidden)]
    pub partition_start_date: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The end date for the partition.</p>
    #[doc(hidden)]
    pub partition_end_date: std::option::Option<aws_smithy_types::DateTime>,
}
impl AthenaIntegration {
    /// <p>The location in Amazon S3 to store the generated CloudFormation template.</p>
    pub fn integration_result_s3_destination_arn(&self) -> std::option::Option<&str> {
        self.integration_result_s3_destination_arn.as_deref()
    }
    /// <p>The schedule for adding new partitions to the table.</p>
    pub fn partition_load_frequency(
        &self,
    ) -> std::option::Option<&crate::model::PartitionLoadFrequency> {
        self.partition_load_frequency.as_ref()
    }
    /// <p>The start date for the partition.</p>
    pub fn partition_start_date(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.partition_start_date.as_ref()
    }
    /// <p>The end date for the partition.</p>
    pub fn partition_end_date(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.partition_end_date.as_ref()
    }
}
/// See [`AthenaIntegration`](crate::model::AthenaIntegration).
pub mod athena_integration {

    /// A builder for [`AthenaIntegration`](crate::model::AthenaIntegration).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) integration_result_s3_destination_arn: std::option::Option<std::string::String>,
        pub(crate) partition_load_frequency:
            std::option::Option<crate::model::PartitionLoadFrequency>,
        pub(crate) partition_start_date: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) partition_end_date: std::option::Option<aws_smithy_types::DateTime>,
    }
    impl Builder {
        /// <p>The location in Amazon S3 to store the generated CloudFormation template.</p>
        pub fn integration_result_s3_destination_arn(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.integration_result_s3_destination_arn = Some(input.into());
            self
        }
        /// <p>The location in Amazon S3 to store the generated CloudFormation template.</p>
        pub fn set_integration_result_s3_destination_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.integration_result_s3_destination_arn = input;
            self
        }
        /// <p>The schedule for adding new partitions to the table.</p>
        pub fn partition_load_frequency(
            mut self,
            input: crate::model::PartitionLoadFrequency,
        ) -> Self {
            self.partition_load_frequency = Some(input);
            self
        }
        /// <p>The schedule for adding new partitions to the table.</p>
        pub fn set_partition_load_frequency(
            mut self,
            input: std::option::Option<crate::model::PartitionLoadFrequency>,
        ) -> Self {
            self.partition_load_frequency = input;
            self
        }
        /// <p>The start date for the partition.</p>
        pub fn partition_start_date(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.partition_start_date = Some(input);
            self
        }
        /// <p>The start date for the partition.</p>
        pub fn set_partition_start_date(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.partition_start_date = input;
            self
        }
        /// <p>The end date for the partition.</p>
        pub fn partition_end_date(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.partition_end_date = Some(input);
            self
        }
        /// <p>The end date for the partition.</p>
        pub fn set_partition_end_date(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.partition_end_date = input;
            self
        }
        /// Consumes the builder and constructs a [`AthenaIntegration`](crate::model::AthenaIntegration).
        pub fn build(self) -> crate::model::AthenaIntegration {
            crate::model::AthenaIntegration {
                integration_result_s3_destination_arn: self.integration_result_s3_destination_arn,
                partition_load_frequency: self.partition_load_frequency,
                partition_start_date: self.partition_start_date,
                partition_end_date: self.partition_end_date,
            }
        }
    }
}
impl AthenaIntegration {
    /// Creates a new builder-style object to manufacture [`AthenaIntegration`](crate::model::AthenaIntegration).
    pub fn builder() -> crate::model::athena_integration::Builder {
        crate::model::athena_integration::Builder::default()
    }
}

/// When writing a match expression against `PartitionLoadFrequency`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let partitionloadfrequency = unimplemented!();
/// match partitionloadfrequency {
///     PartitionLoadFrequency::Daily => { /* ... */ },
///     PartitionLoadFrequency::Monthly => { /* ... */ },
///     PartitionLoadFrequency::None => { /* ... */ },
///     PartitionLoadFrequency::Weekly => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `partitionloadfrequency` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `PartitionLoadFrequency::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `PartitionLoadFrequency::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `PartitionLoadFrequency::NewFeature` is defined.
/// Specifically, when `partitionloadfrequency` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `PartitionLoadFrequency::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 PartitionLoadFrequency {
    #[allow(missing_docs)] // documentation missing in model
    Daily,
    #[allow(missing_docs)] // documentation missing in model
    Monthly,
    #[allow(missing_docs)] // documentation missing in model
    None,
    #[allow(missing_docs)] // documentation missing in model
    Weekly,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for PartitionLoadFrequency {
    fn from(s: &str) -> Self {
        match s {
            "daily" => PartitionLoadFrequency::Daily,
            "monthly" => PartitionLoadFrequency::Monthly,
            "none" => PartitionLoadFrequency::None,
            "weekly" => PartitionLoadFrequency::Weekly,
            other => {
                PartitionLoadFrequency::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for PartitionLoadFrequency {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(PartitionLoadFrequency::from(s))
    }
}
impl PartitionLoadFrequency {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            PartitionLoadFrequency::Daily => "daily",
            PartitionLoadFrequency::Monthly => "monthly",
            PartitionLoadFrequency::None => "none",
            PartitionLoadFrequency::Weekly => "weekly",
            PartitionLoadFrequency::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["daily", "monthly", "none", "weekly"]
    }
}
impl AsRef<str> for PartitionLoadFrequency {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes address usage for a customer-owned address pool.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CoipAddressUsage {
    /// <p>The allocation ID of the address.</p>
    #[doc(hidden)]
    pub allocation_id: std::option::Option<std::string::String>,
    /// <p>The Amazon Web Services account ID.</p>
    #[doc(hidden)]
    pub aws_account_id: std::option::Option<std::string::String>,
    /// <p>The Amazon Web Services service.</p>
    #[doc(hidden)]
    pub aws_service: std::option::Option<std::string::String>,
    /// <p>The customer-owned IP address.</p>
    #[doc(hidden)]
    pub co_ip: std::option::Option<std::string::String>,
}
impl CoipAddressUsage {
    /// <p>The allocation ID of the address.</p>
    pub fn allocation_id(&self) -> std::option::Option<&str> {
        self.allocation_id.as_deref()
    }
    /// <p>The Amazon Web Services account ID.</p>
    pub fn aws_account_id(&self) -> std::option::Option<&str> {
        self.aws_account_id.as_deref()
    }
    /// <p>The Amazon Web Services service.</p>
    pub fn aws_service(&self) -> std::option::Option<&str> {
        self.aws_service.as_deref()
    }
    /// <p>The customer-owned IP address.</p>
    pub fn co_ip(&self) -> std::option::Option<&str> {
        self.co_ip.as_deref()
    }
}
/// See [`CoipAddressUsage`](crate::model::CoipAddressUsage).
pub mod coip_address_usage {

    /// A builder for [`CoipAddressUsage`](crate::model::CoipAddressUsage).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) allocation_id: std::option::Option<std::string::String>,
        pub(crate) aws_account_id: std::option::Option<std::string::String>,
        pub(crate) aws_service: std::option::Option<std::string::String>,
        pub(crate) co_ip: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The allocation ID of the address.</p>
        pub fn allocation_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.allocation_id = Some(input.into());
            self
        }
        /// <p>The allocation ID of the address.</p>
        pub fn set_allocation_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.allocation_id = input;
            self
        }
        /// <p>The Amazon Web Services account ID.</p>
        pub fn aws_account_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.aws_account_id = Some(input.into());
            self
        }
        /// <p>The Amazon Web Services account ID.</p>
        pub fn set_aws_account_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.aws_account_id = input;
            self
        }
        /// <p>The Amazon Web Services service.</p>
        pub fn aws_service(mut self, input: impl Into<std::string::String>) -> Self {
            self.aws_service = Some(input.into());
            self
        }
        /// <p>The Amazon Web Services service.</p>
        pub fn set_aws_service(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.aws_service = input;
            self
        }
        /// <p>The customer-owned IP address.</p>
        pub fn co_ip(mut self, input: impl Into<std::string::String>) -> Self {
            self.co_ip = Some(input.into());
            self
        }
        /// <p>The customer-owned IP address.</p>
        pub fn set_co_ip(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.co_ip = input;
            self
        }
        /// Consumes the builder and constructs a [`CoipAddressUsage`](crate::model::CoipAddressUsage).
        pub fn build(self) -> crate::model::CoipAddressUsage {
            crate::model::CoipAddressUsage {
                allocation_id: self.allocation_id,
                aws_account_id: self.aws_account_id,
                aws_service: self.aws_service,
                co_ip: self.co_ip,
            }
        }
    }
}
impl CoipAddressUsage {
    /// Creates a new builder-style object to manufacture [`CoipAddressUsage`](crate::model::CoipAddressUsage).
    pub fn builder() -> crate::model::coip_address_usage::Builder {
        crate::model::coip_address_usage::Builder::default()
    }
}

/// <p>Information about the Capacity Reservation usage.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InstanceUsage {
    /// <p>The ID of the Amazon Web Services account that is making use of the Capacity Reservation.</p>
    #[doc(hidden)]
    pub account_id: std::option::Option<std::string::String>,
    /// <p>The number of instances the Amazon Web Services account currently has in the Capacity Reservation.</p>
    #[doc(hidden)]
    pub used_instance_count: std::option::Option<i32>,
}
impl InstanceUsage {
    /// <p>The ID of the Amazon Web Services account that is making use of the Capacity Reservation.</p>
    pub fn account_id(&self) -> std::option::Option<&str> {
        self.account_id.as_deref()
    }
    /// <p>The number of instances the Amazon Web Services account currently has in the Capacity Reservation.</p>
    pub fn used_instance_count(&self) -> std::option::Option<i32> {
        self.used_instance_count
    }
}
/// See [`InstanceUsage`](crate::model::InstanceUsage).
pub mod instance_usage {

    /// A builder for [`InstanceUsage`](crate::model::InstanceUsage).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) account_id: std::option::Option<std::string::String>,
        pub(crate) used_instance_count: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>The ID of the Amazon Web Services account that is making use of the Capacity Reservation.</p>
        pub fn account_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.account_id = Some(input.into());
            self
        }
        /// <p>The ID of the Amazon Web Services account that is making use of the Capacity Reservation.</p>
        pub fn set_account_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.account_id = input;
            self
        }
        /// <p>The number of instances the Amazon Web Services account currently has in the Capacity Reservation.</p>
        pub fn used_instance_count(mut self, input: i32) -> Self {
            self.used_instance_count = Some(input);
            self
        }
        /// <p>The number of instances the Amazon Web Services account currently has in the Capacity Reservation.</p>
        pub fn set_used_instance_count(mut self, input: std::option::Option<i32>) -> Self {
            self.used_instance_count = input;
            self
        }
        /// Consumes the builder and constructs a [`InstanceUsage`](crate::model::InstanceUsage).
        pub fn build(self) -> crate::model::InstanceUsage {
            crate::model::InstanceUsage {
                account_id: self.account_id,
                used_instance_count: self.used_instance_count,
            }
        }
    }
}
impl InstanceUsage {
    /// Creates a new builder-style object to manufacture [`InstanceUsage`](crate::model::InstanceUsage).
    pub fn builder() -> crate::model::instance_usage::Builder {
        crate::model::instance_usage::Builder::default()
    }
}

/// When writing a match expression against `CapacityReservationState`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let capacityreservationstate = unimplemented!();
/// match capacityreservationstate {
///     CapacityReservationState::Active => { /* ... */ },
///     CapacityReservationState::Cancelled => { /* ... */ },
///     CapacityReservationState::Expired => { /* ... */ },
///     CapacityReservationState::Failed => { /* ... */ },
///     CapacityReservationState::Pending => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `capacityreservationstate` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `CapacityReservationState::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `CapacityReservationState::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `CapacityReservationState::NewFeature` is defined.
/// Specifically, when `capacityreservationstate` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `CapacityReservationState::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 CapacityReservationState {
    #[allow(missing_docs)] // documentation missing in model
    Active,
    #[allow(missing_docs)] // documentation missing in model
    Cancelled,
    #[allow(missing_docs)] // documentation missing in model
    Expired,
    #[allow(missing_docs)] // documentation missing in model
    Failed,
    #[allow(missing_docs)] // documentation missing in model
    Pending,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for CapacityReservationState {
    fn from(s: &str) -> Self {
        match s {
            "active" => CapacityReservationState::Active,
            "cancelled" => CapacityReservationState::Cancelled,
            "expired" => CapacityReservationState::Expired,
            "failed" => CapacityReservationState::Failed,
            "pending" => CapacityReservationState::Pending,
            other => CapacityReservationState::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for CapacityReservationState {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(CapacityReservationState::from(s))
    }
}
impl CapacityReservationState {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            CapacityReservationState::Active => "active",
            CapacityReservationState::Cancelled => "cancelled",
            CapacityReservationState::Expired => "expired",
            CapacityReservationState::Failed => "failed",
            CapacityReservationState::Pending => "pending",
            CapacityReservationState::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["active", "cancelled", "expired", "failed", "pending"]
    }
}
impl AsRef<str> for CapacityReservationState {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>The response to a <code>DataQuery</code>.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DataResponse {
    /// <p>The ID passed in the <code>DataQuery</code>.</p>
    #[doc(hidden)]
    pub id: std::option::Option<std::string::String>,
    /// <p>The Region or Availability Zone that's the source for the data query. For example, <code>us-east-1</code>.</p>
    #[doc(hidden)]
    pub source: std::option::Option<std::string::String>,
    /// <p>The Region or Availability Zone that's the destination for the data query. For example, <code>eu-west-1</code>.</p>
    #[doc(hidden)]
    pub destination: std::option::Option<std::string::String>,
    /// <p>The metric used for the network performance request. Only <code>aggregate-latency</code> is supported, which shows network latency during a specified period. </p>
    #[doc(hidden)]
    pub metric: std::option::Option<crate::model::MetricType>,
    /// <p>The statistic used for the network performance request.</p>
    #[doc(hidden)]
    pub statistic: std::option::Option<crate::model::StatisticType>,
    /// <p>The period used for the network performance request.</p>
    #[doc(hidden)]
    pub period: std::option::Option<crate::model::PeriodType>,
    /// <p>A list of <code>MetricPoint</code> objects.</p>
    #[doc(hidden)]
    pub metric_points: std::option::Option<std::vec::Vec<crate::model::MetricPoint>>,
}
impl DataResponse {
    /// <p>The ID passed in the <code>DataQuery</code>.</p>
    pub fn id(&self) -> std::option::Option<&str> {
        self.id.as_deref()
    }
    /// <p>The Region or Availability Zone that's the source for the data query. For example, <code>us-east-1</code>.</p>
    pub fn source(&self) -> std::option::Option<&str> {
        self.source.as_deref()
    }
    /// <p>The Region or Availability Zone that's the destination for the data query. For example, <code>eu-west-1</code>.</p>
    pub fn destination(&self) -> std::option::Option<&str> {
        self.destination.as_deref()
    }
    /// <p>The metric used for the network performance request. Only <code>aggregate-latency</code> is supported, which shows network latency during a specified period. </p>
    pub fn metric(&self) -> std::option::Option<&crate::model::MetricType> {
        self.metric.as_ref()
    }
    /// <p>The statistic used for the network performance request.</p>
    pub fn statistic(&self) -> std::option::Option<&crate::model::StatisticType> {
        self.statistic.as_ref()
    }
    /// <p>The period used for the network performance request.</p>
    pub fn period(&self) -> std::option::Option<&crate::model::PeriodType> {
        self.period.as_ref()
    }
    /// <p>A list of <code>MetricPoint</code> objects.</p>
    pub fn metric_points(&self) -> std::option::Option<&[crate::model::MetricPoint]> {
        self.metric_points.as_deref()
    }
}
/// See [`DataResponse`](crate::model::DataResponse).
pub mod data_response {

    /// A builder for [`DataResponse`](crate::model::DataResponse).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) id: std::option::Option<std::string::String>,
        pub(crate) source: std::option::Option<std::string::String>,
        pub(crate) destination: std::option::Option<std::string::String>,
        pub(crate) metric: std::option::Option<crate::model::MetricType>,
        pub(crate) statistic: std::option::Option<crate::model::StatisticType>,
        pub(crate) period: std::option::Option<crate::model::PeriodType>,
        pub(crate) metric_points: std::option::Option<std::vec::Vec<crate::model::MetricPoint>>,
    }
    impl Builder {
        /// <p>The ID passed in the <code>DataQuery</code>.</p>
        pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
            self.id = Some(input.into());
            self
        }
        /// <p>The ID passed in the <code>DataQuery</code>.</p>
        pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.id = input;
            self
        }
        /// <p>The Region or Availability Zone that's the source for the data query. For example, <code>us-east-1</code>.</p>
        pub fn source(mut self, input: impl Into<std::string::String>) -> Self {
            self.source = Some(input.into());
            self
        }
        /// <p>The Region or Availability Zone that's the source for the data query. For example, <code>us-east-1</code>.</p>
        pub fn set_source(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.source = input;
            self
        }
        /// <p>The Region or Availability Zone that's the destination for the data query. For example, <code>eu-west-1</code>.</p>
        pub fn destination(mut self, input: impl Into<std::string::String>) -> Self {
            self.destination = Some(input.into());
            self
        }
        /// <p>The Region or Availability Zone that's the destination for the data query. For example, <code>eu-west-1</code>.</p>
        pub fn set_destination(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.destination = input;
            self
        }
        /// <p>The metric used for the network performance request. Only <code>aggregate-latency</code> is supported, which shows network latency during a specified period. </p>
        pub fn metric(mut self, input: crate::model::MetricType) -> Self {
            self.metric = Some(input);
            self
        }
        /// <p>The metric used for the network performance request. Only <code>aggregate-latency</code> is supported, which shows network latency during a specified period. </p>
        pub fn set_metric(mut self, input: std::option::Option<crate::model::MetricType>) -> Self {
            self.metric = input;
            self
        }
        /// <p>The statistic used for the network performance request.</p>
        pub fn statistic(mut self, input: crate::model::StatisticType) -> Self {
            self.statistic = Some(input);
            self
        }
        /// <p>The statistic used for the network performance request.</p>
        pub fn set_statistic(
            mut self,
            input: std::option::Option<crate::model::StatisticType>,
        ) -> Self {
            self.statistic = input;
            self
        }
        /// <p>The period used for the network performance request.</p>
        pub fn period(mut self, input: crate::model::PeriodType) -> Self {
            self.period = Some(input);
            self
        }
        /// <p>The period used for the network performance request.</p>
        pub fn set_period(mut self, input: std::option::Option<crate::model::PeriodType>) -> Self {
            self.period = input;
            self
        }
        /// Appends an item to `metric_points`.
        ///
        /// To override the contents of this collection use [`set_metric_points`](Self::set_metric_points).
        ///
        /// <p>A list of <code>MetricPoint</code> objects.</p>
        pub fn metric_points(mut self, input: crate::model::MetricPoint) -> Self {
            let mut v = self.metric_points.unwrap_or_default();
            v.push(input);
            self.metric_points = Some(v);
            self
        }
        /// <p>A list of <code>MetricPoint</code> objects.</p>
        pub fn set_metric_points(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::MetricPoint>>,
        ) -> Self {
            self.metric_points = input;
            self
        }
        /// Consumes the builder and constructs a [`DataResponse`](crate::model::DataResponse).
        pub fn build(self) -> crate::model::DataResponse {
            crate::model::DataResponse {
                id: self.id,
                source: self.source,
                destination: self.destination,
                metric: self.metric,
                statistic: self.statistic,
                period: self.period,
                metric_points: self.metric_points,
            }
        }
    }
}
impl DataResponse {
    /// Creates a new builder-style object to manufacture [`DataResponse`](crate::model::DataResponse).
    pub fn builder() -> crate::model::data_response::Builder {
        crate::model::data_response::Builder::default()
    }
}

/// <p>Indicates whether the network was healthy or degraded at a particular point. The value is aggregated from the <code>startDate</code> to the <code>endDate</code>. Currently only <code>five_minutes</code> is supported.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct MetricPoint {
    /// <p>The start date for the metric point. The starting date for the metric point. The starting time must be formatted as <code>yyyy-mm-ddThh:mm:ss</code>. For example, <code>2022-06-10T12:00:00.000Z</code>.</p>
    #[doc(hidden)]
    pub start_date: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The end date for the metric point. The ending time must be formatted as <code>yyyy-mm-ddThh:mm:ss</code>. For example, <code>2022-06-12T12:00:00.000Z</code>.</p>
    #[doc(hidden)]
    pub end_date: std::option::Option<aws_smithy_types::DateTime>,
    #[allow(missing_docs)] // documentation missing in model
    #[doc(hidden)]
    pub value: std::option::Option<f32>,
    /// <p>The status of the metric point.</p>
    #[doc(hidden)]
    pub status: std::option::Option<std::string::String>,
}
impl MetricPoint {
    /// <p>The start date for the metric point. The starting date for the metric point. The starting time must be formatted as <code>yyyy-mm-ddThh:mm:ss</code>. For example, <code>2022-06-10T12:00:00.000Z</code>.</p>
    pub fn start_date(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.start_date.as_ref()
    }
    /// <p>The end date for the metric point. The ending time must be formatted as <code>yyyy-mm-ddThh:mm:ss</code>. For example, <code>2022-06-12T12:00:00.000Z</code>.</p>
    pub fn end_date(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.end_date.as_ref()
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn value(&self) -> std::option::Option<f32> {
        self.value
    }
    /// <p>The status of the metric point.</p>
    pub fn status(&self) -> std::option::Option<&str> {
        self.status.as_deref()
    }
}
/// See [`MetricPoint`](crate::model::MetricPoint).
pub mod metric_point {

    /// A builder for [`MetricPoint`](crate::model::MetricPoint).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) start_date: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) end_date: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) value: std::option::Option<f32>,
        pub(crate) status: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The start date for the metric point. The starting date for the metric point. The starting time must be formatted as <code>yyyy-mm-ddThh:mm:ss</code>. For example, <code>2022-06-10T12:00:00.000Z</code>.</p>
        pub fn start_date(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.start_date = Some(input);
            self
        }
        /// <p>The start date for the metric point. The starting date for the metric point. The starting time must be formatted as <code>yyyy-mm-ddThh:mm:ss</code>. For example, <code>2022-06-10T12:00:00.000Z</code>.</p>
        pub fn set_start_date(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.start_date = input;
            self
        }
        /// <p>The end date for the metric point. The ending time must be formatted as <code>yyyy-mm-ddThh:mm:ss</code>. For example, <code>2022-06-12T12:00:00.000Z</code>.</p>
        pub fn end_date(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.end_date = Some(input);
            self
        }
        /// <p>The end date for the metric point. The ending time must be formatted as <code>yyyy-mm-ddThh:mm:ss</code>. For example, <code>2022-06-12T12:00:00.000Z</code>.</p>
        pub fn set_end_date(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.end_date = input;
            self
        }
        #[allow(missing_docs)] // documentation missing in model
        pub fn value(mut self, input: f32) -> Self {
            self.value = Some(input);
            self
        }
        #[allow(missing_docs)] // documentation missing in model
        pub fn set_value(mut self, input: std::option::Option<f32>) -> Self {
            self.value = input;
            self
        }
        /// <p>The status of the metric point.</p>
        pub fn status(mut self, input: impl Into<std::string::String>) -> Self {
            self.status = Some(input.into());
            self
        }
        /// <p>The status of the metric point.</p>
        pub fn set_status(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.status = input;
            self
        }
        /// Consumes the builder and constructs a [`MetricPoint`](crate::model::MetricPoint).
        pub fn build(self) -> crate::model::MetricPoint {
            crate::model::MetricPoint {
                start_date: self.start_date,
                end_date: self.end_date,
                value: self.value,
                status: self.status,
            }
        }
    }
}
impl MetricPoint {
    /// Creates a new builder-style object to manufacture [`MetricPoint`](crate::model::MetricPoint).
    pub fn builder() -> crate::model::metric_point::Builder {
        crate::model::metric_point::Builder::default()
    }
}

/// When writing a match expression against `PeriodType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let periodtype = unimplemented!();
/// match periodtype {
///     PeriodType::FifteenMinutes => { /* ... */ },
///     PeriodType::FiveMinutes => { /* ... */ },
///     PeriodType::OneDay => { /* ... */ },
///     PeriodType::OneHour => { /* ... */ },
///     PeriodType::OneWeek => { /* ... */ },
///     PeriodType::ThreeHours => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `periodtype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `PeriodType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `PeriodType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `PeriodType::NewFeature` is defined.
/// Specifically, when `periodtype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `PeriodType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 PeriodType {
    #[allow(missing_docs)] // documentation missing in model
    FifteenMinutes,
    #[allow(missing_docs)] // documentation missing in model
    FiveMinutes,
    #[allow(missing_docs)] // documentation missing in model
    OneDay,
    #[allow(missing_docs)] // documentation missing in model
    OneHour,
    #[allow(missing_docs)] // documentation missing in model
    OneWeek,
    #[allow(missing_docs)] // documentation missing in model
    ThreeHours,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for PeriodType {
    fn from(s: &str) -> Self {
        match s {
            "fifteen-minutes" => PeriodType::FifteenMinutes,
            "five-minutes" => PeriodType::FiveMinutes,
            "one-day" => PeriodType::OneDay,
            "one-hour" => PeriodType::OneHour,
            "one-week" => PeriodType::OneWeek,
            "three-hours" => PeriodType::ThreeHours,
            other => PeriodType::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for PeriodType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(PeriodType::from(s))
    }
}
impl PeriodType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            PeriodType::FifteenMinutes => "fifteen-minutes",
            PeriodType::FiveMinutes => "five-minutes",
            PeriodType::OneDay => "one-day",
            PeriodType::OneHour => "one-hour",
            PeriodType::OneWeek => "one-week",
            PeriodType::ThreeHours => "three-hours",
            PeriodType::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &[
            "fifteen-minutes",
            "five-minutes",
            "one-day",
            "one-hour",
            "one-week",
            "three-hours",
        ]
    }
}
impl AsRef<str> for PeriodType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `StatisticType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let statistictype = unimplemented!();
/// match statistictype {
///     StatisticType::P50 => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `statistictype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `StatisticType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `StatisticType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `StatisticType::NewFeature` is defined.
/// Specifically, when `statistictype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `StatisticType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 StatisticType {
    #[allow(missing_docs)] // documentation missing in model
    P50,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for StatisticType {
    fn from(s: &str) -> Self {
        match s {
            "p50" => StatisticType::P50,
            other => StatisticType::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for StatisticType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(StatisticType::from(s))
    }
}
impl StatisticType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            StatisticType::P50 => "p50",
            StatisticType::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["p50"]
    }
}
impl AsRef<str> for StatisticType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `MetricType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let metrictype = unimplemented!();
/// match metrictype {
///     MetricType::AggregateLatency => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `metrictype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `MetricType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `MetricType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `MetricType::NewFeature` is defined.
/// Specifically, when `metrictype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `MetricType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 MetricType {
    #[allow(missing_docs)] // documentation missing in model
    AggregateLatency,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for MetricType {
    fn from(s: &str) -> Self {
        match s {
            "aggregate-latency" => MetricType::AggregateLatency,
            other => MetricType::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for MetricType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(MetricType::from(s))
    }
}
impl MetricType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            MetricType::AggregateLatency => "aggregate-latency",
            MetricType::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["aggregate-latency"]
    }
}
impl AsRef<str> for MetricType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>A query used for retrieving network health data. </p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DataQuery {
    /// <p>A user-defined ID associated with a data query that's returned in the <code>dataResponse</code> identifying the query. For example, if you set the Id to <code>MyQuery01</code>in the query, the <code>dataResponse</code> identifies the query as <code>MyQuery01</code>.</p>
    #[doc(hidden)]
    pub id: std::option::Option<std::string::String>,
    /// <p>The Region or Availability Zone that's the source for the data query. For example, <code>us-east-1</code>.</p>
    #[doc(hidden)]
    pub source: std::option::Option<std::string::String>,
    /// <p>The Region or Availability Zone that's the target for the data query. For example, <code>eu-north-1</code>.</p>
    #[doc(hidden)]
    pub destination: std::option::Option<std::string::String>,
    /// <p>The metric, <code>aggregation-latency</code>, indicating that network latency is aggregated for the query. This is the only supported metric.</p>
    #[doc(hidden)]
    pub metric: std::option::Option<crate::model::MetricType>,
    /// <p>The metric data aggregation period, <code>p50</code>, between the specified <code>startDate</code> and <code>endDate</code>. For example, a metric of <code>five_minutes</code> is the median of all the data points gathered within those five minutes. <code>p50</code> is the only supported metric.</p>
    #[doc(hidden)]
    pub statistic: std::option::Option<crate::model::StatisticType>,
    /// <p>The aggregation period used for the data query.</p>
    #[doc(hidden)]
    pub period: std::option::Option<crate::model::PeriodType>,
}
impl DataQuery {
    /// <p>A user-defined ID associated with a data query that's returned in the <code>dataResponse</code> identifying the query. For example, if you set the Id to <code>MyQuery01</code>in the query, the <code>dataResponse</code> identifies the query as <code>MyQuery01</code>.</p>
    pub fn id(&self) -> std::option::Option<&str> {
        self.id.as_deref()
    }
    /// <p>The Region or Availability Zone that's the source for the data query. For example, <code>us-east-1</code>.</p>
    pub fn source(&self) -> std::option::Option<&str> {
        self.source.as_deref()
    }
    /// <p>The Region or Availability Zone that's the target for the data query. For example, <code>eu-north-1</code>.</p>
    pub fn destination(&self) -> std::option::Option<&str> {
        self.destination.as_deref()
    }
    /// <p>The metric, <code>aggregation-latency</code>, indicating that network latency is aggregated for the query. This is the only supported metric.</p>
    pub fn metric(&self) -> std::option::Option<&crate::model::MetricType> {
        self.metric.as_ref()
    }
    /// <p>The metric data aggregation period, <code>p50</code>, between the specified <code>startDate</code> and <code>endDate</code>. For example, a metric of <code>five_minutes</code> is the median of all the data points gathered within those five minutes. <code>p50</code> is the only supported metric.</p>
    pub fn statistic(&self) -> std::option::Option<&crate::model::StatisticType> {
        self.statistic.as_ref()
    }
    /// <p>The aggregation period used for the data query.</p>
    pub fn period(&self) -> std::option::Option<&crate::model::PeriodType> {
        self.period.as_ref()
    }
}
/// See [`DataQuery`](crate::model::DataQuery).
pub mod data_query {

    /// A builder for [`DataQuery`](crate::model::DataQuery).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) id: std::option::Option<std::string::String>,
        pub(crate) source: std::option::Option<std::string::String>,
        pub(crate) destination: std::option::Option<std::string::String>,
        pub(crate) metric: std::option::Option<crate::model::MetricType>,
        pub(crate) statistic: std::option::Option<crate::model::StatisticType>,
        pub(crate) period: std::option::Option<crate::model::PeriodType>,
    }
    impl Builder {
        /// <p>A user-defined ID associated with a data query that's returned in the <code>dataResponse</code> identifying the query. For example, if you set the Id to <code>MyQuery01</code>in the query, the <code>dataResponse</code> identifies the query as <code>MyQuery01</code>.</p>
        pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
            self.id = Some(input.into());
            self
        }
        /// <p>A user-defined ID associated with a data query that's returned in the <code>dataResponse</code> identifying the query. For example, if you set the Id to <code>MyQuery01</code>in the query, the <code>dataResponse</code> identifies the query as <code>MyQuery01</code>.</p>
        pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.id = input;
            self
        }
        /// <p>The Region or Availability Zone that's the source for the data query. For example, <code>us-east-1</code>.</p>
        pub fn source(mut self, input: impl Into<std::string::String>) -> Self {
            self.source = Some(input.into());
            self
        }
        /// <p>The Region or Availability Zone that's the source for the data query. For example, <code>us-east-1</code>.</p>
        pub fn set_source(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.source = input;
            self
        }
        /// <p>The Region or Availability Zone that's the target for the data query. For example, <code>eu-north-1</code>.</p>
        pub fn destination(mut self, input: impl Into<std::string::String>) -> Self {
            self.destination = Some(input.into());
            self
        }
        /// <p>The Region or Availability Zone that's the target for the data query. For example, <code>eu-north-1</code>.</p>
        pub fn set_destination(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.destination = input;
            self
        }
        /// <p>The metric, <code>aggregation-latency</code>, indicating that network latency is aggregated for the query. This is the only supported metric.</p>
        pub fn metric(mut self, input: crate::model::MetricType) -> Self {
            self.metric = Some(input);
            self
        }
        /// <p>The metric, <code>aggregation-latency</code>, indicating that network latency is aggregated for the query. This is the only supported metric.</p>
        pub fn set_metric(mut self, input: std::option::Option<crate::model::MetricType>) -> Self {
            self.metric = input;
            self
        }
        /// <p>The metric data aggregation period, <code>p50</code>, between the specified <code>startDate</code> and <code>endDate</code>. For example, a metric of <code>five_minutes</code> is the median of all the data points gathered within those five minutes. <code>p50</code> is the only supported metric.</p>
        pub fn statistic(mut self, input: crate::model::StatisticType) -> Self {
            self.statistic = Some(input);
            self
        }
        /// <p>The metric data aggregation period, <code>p50</code>, between the specified <code>startDate</code> and <code>endDate</code>. For example, a metric of <code>five_minutes</code> is the median of all the data points gathered within those five minutes. <code>p50</code> is the only supported metric.</p>
        pub fn set_statistic(
            mut self,
            input: std::option::Option<crate::model::StatisticType>,
        ) -> Self {
            self.statistic = input;
            self
        }
        /// <p>The aggregation period used for the data query.</p>
        pub fn period(mut self, input: crate::model::PeriodType) -> Self {
            self.period = Some(input);
            self
        }
        /// <p>The aggregation period used for the data query.</p>
        pub fn set_period(mut self, input: std::option::Option<crate::model::PeriodType>) -> Self {
            self.period = input;
            self
        }
        /// Consumes the builder and constructs a [`DataQuery`](crate::model::DataQuery).
        pub fn build(self) -> crate::model::DataQuery {
            crate::model::DataQuery {
                id: self.id,
                source: self.source,
                destination: self.destination,
                metric: self.metric,
                statistic: self.statistic,
                period: self.period,
            }
        }
    }
}
impl DataQuery {
    /// Creates a new builder-style object to manufacture [`DataQuery`](crate::model::DataQuery).
    pub fn builder() -> crate::model::data_query::Builder {
        crate::model::data_query::Builder::default()
    }
}

/// <p>Describes an IPv6 CIDR block association.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Ipv6CidrAssociation {
    /// <p>The IPv6 CIDR block.</p>
    #[doc(hidden)]
    pub ipv6_cidr: std::option::Option<std::string::String>,
    /// <p>The resource that's associated with the IPv6 CIDR block.</p>
    #[doc(hidden)]
    pub associated_resource: std::option::Option<std::string::String>,
}
impl Ipv6CidrAssociation {
    /// <p>The IPv6 CIDR block.</p>
    pub fn ipv6_cidr(&self) -> std::option::Option<&str> {
        self.ipv6_cidr.as_deref()
    }
    /// <p>The resource that's associated with the IPv6 CIDR block.</p>
    pub fn associated_resource(&self) -> std::option::Option<&str> {
        self.associated_resource.as_deref()
    }
}
/// See [`Ipv6CidrAssociation`](crate::model::Ipv6CidrAssociation).
pub mod ipv6_cidr_association {

    /// A builder for [`Ipv6CidrAssociation`](crate::model::Ipv6CidrAssociation).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) ipv6_cidr: std::option::Option<std::string::String>,
        pub(crate) associated_resource: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The IPv6 CIDR block.</p>
        pub fn ipv6_cidr(mut self, input: impl Into<std::string::String>) -> Self {
            self.ipv6_cidr = Some(input.into());
            self
        }
        /// <p>The IPv6 CIDR block.</p>
        pub fn set_ipv6_cidr(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.ipv6_cidr = input;
            self
        }
        /// <p>The resource that's associated with the IPv6 CIDR block.</p>
        pub fn associated_resource(mut self, input: impl Into<std::string::String>) -> Self {
            self.associated_resource = Some(input.into());
            self
        }
        /// <p>The resource that's associated with the IPv6 CIDR block.</p>
        pub fn set_associated_resource(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.associated_resource = input;
            self
        }
        /// Consumes the builder and constructs a [`Ipv6CidrAssociation`](crate::model::Ipv6CidrAssociation).
        pub fn build(self) -> crate::model::Ipv6CidrAssociation {
            crate::model::Ipv6CidrAssociation {
                ipv6_cidr: self.ipv6_cidr,
                associated_resource: self.associated_resource,
            }
        }
    }
}
impl Ipv6CidrAssociation {
    /// Creates a new builder-style object to manufacture [`Ipv6CidrAssociation`](crate::model::Ipv6CidrAssociation).
    pub fn builder() -> crate::model::ipv6_cidr_association::Builder {
        crate::model::ipv6_cidr_association::Builder::default()
    }
}

/// <p>Information about the associated IAM roles.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AssociatedRole {
    /// <p>The ARN of the associated IAM role.</p>
    #[doc(hidden)]
    pub associated_role_arn: std::option::Option<std::string::String>,
    /// <p>The name of the Amazon S3 bucket in which the Amazon S3 object is stored.</p>
    #[doc(hidden)]
    pub certificate_s3_bucket_name: std::option::Option<std::string::String>,
    /// <p>The key of the Amazon S3 object ey where the certificate, certificate chain, and encrypted private key bundle is stored. The object key is formated as follows: <code>role_arn</code>/<code>certificate_arn</code>. </p>
    #[doc(hidden)]
    pub certificate_s3_object_key: std::option::Option<std::string::String>,
    /// <p>The ID of the KMS customer master key (CMK) used to encrypt the private key.</p>
    #[doc(hidden)]
    pub encryption_kms_key_id: std::option::Option<std::string::String>,
}
impl AssociatedRole {
    /// <p>The ARN of the associated IAM role.</p>
    pub fn associated_role_arn(&self) -> std::option::Option<&str> {
        self.associated_role_arn.as_deref()
    }
    /// <p>The name of the Amazon S3 bucket in which the Amazon S3 object is stored.</p>
    pub fn certificate_s3_bucket_name(&self) -> std::option::Option<&str> {
        self.certificate_s3_bucket_name.as_deref()
    }
    /// <p>The key of the Amazon S3 object ey where the certificate, certificate chain, and encrypted private key bundle is stored. The object key is formated as follows: <code>role_arn</code>/<code>certificate_arn</code>. </p>
    pub fn certificate_s3_object_key(&self) -> std::option::Option<&str> {
        self.certificate_s3_object_key.as_deref()
    }
    /// <p>The ID of the KMS customer master key (CMK) used to encrypt the private key.</p>
    pub fn encryption_kms_key_id(&self) -> std::option::Option<&str> {
        self.encryption_kms_key_id.as_deref()
    }
}
/// See [`AssociatedRole`](crate::model::AssociatedRole).
pub mod associated_role {

    /// A builder for [`AssociatedRole`](crate::model::AssociatedRole).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) associated_role_arn: std::option::Option<std::string::String>,
        pub(crate) certificate_s3_bucket_name: std::option::Option<std::string::String>,
        pub(crate) certificate_s3_object_key: std::option::Option<std::string::String>,
        pub(crate) encryption_kms_key_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The ARN of the associated IAM role.</p>
        pub fn associated_role_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.associated_role_arn = Some(input.into());
            self
        }
        /// <p>The ARN of the associated IAM role.</p>
        pub fn set_associated_role_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.associated_role_arn = input;
            self
        }
        /// <p>The name of the Amazon S3 bucket in which the Amazon S3 object is stored.</p>
        pub fn certificate_s3_bucket_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.certificate_s3_bucket_name = Some(input.into());
            self
        }
        /// <p>The name of the Amazon S3 bucket in which the Amazon S3 object is stored.</p>
        pub fn set_certificate_s3_bucket_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.certificate_s3_bucket_name = input;
            self
        }
        /// <p>The key of the Amazon S3 object ey where the certificate, certificate chain, and encrypted private key bundle is stored. The object key is formated as follows: <code>role_arn</code>/<code>certificate_arn</code>. </p>
        pub fn certificate_s3_object_key(mut self, input: impl Into<std::string::String>) -> Self {
            self.certificate_s3_object_key = Some(input.into());
            self
        }
        /// <p>The key of the Amazon S3 object ey where the certificate, certificate chain, and encrypted private key bundle is stored. The object key is formated as follows: <code>role_arn</code>/<code>certificate_arn</code>. </p>
        pub fn set_certificate_s3_object_key(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.certificate_s3_object_key = input;
            self
        }
        /// <p>The ID of the KMS customer master key (CMK) used to encrypt the private key.</p>
        pub fn encryption_kms_key_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.encryption_kms_key_id = Some(input.into());
            self
        }
        /// <p>The ID of the KMS customer master key (CMK) used to encrypt the private key.</p>
        pub fn set_encryption_kms_key_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.encryption_kms_key_id = input;
            self
        }
        /// Consumes the builder and constructs a [`AssociatedRole`](crate::model::AssociatedRole).
        pub fn build(self) -> crate::model::AssociatedRole {
            crate::model::AssociatedRole {
                associated_role_arn: self.associated_role_arn,
                certificate_s3_bucket_name: self.certificate_s3_bucket_name,
                certificate_s3_object_key: self.certificate_s3_object_key,
                encryption_kms_key_id: self.encryption_kms_key_id,
            }
        }
    }
}
impl AssociatedRole {
    /// Creates a new builder-style object to manufacture [`AssociatedRole`](crate::model::AssociatedRole).
    pub fn builder() -> crate::model::associated_role::Builder {
        crate::model::associated_role::Builder::default()
    }
}

/// <p>Describes the destination for an export image task.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ExportTaskS3Location {
    /// <p>The destination Amazon S3 bucket.</p>
    #[doc(hidden)]
    pub s3_bucket: std::option::Option<std::string::String>,
    /// <p>The prefix (logical hierarchy) in the bucket.</p>
    #[doc(hidden)]
    pub s3_prefix: std::option::Option<std::string::String>,
}
impl ExportTaskS3Location {
    /// <p>The destination Amazon S3 bucket.</p>
    pub fn s3_bucket(&self) -> std::option::Option<&str> {
        self.s3_bucket.as_deref()
    }
    /// <p>The prefix (logical hierarchy) in the bucket.</p>
    pub fn s3_prefix(&self) -> std::option::Option<&str> {
        self.s3_prefix.as_deref()
    }
}
/// See [`ExportTaskS3Location`](crate::model::ExportTaskS3Location).
pub mod export_task_s3_location {

    /// A builder for [`ExportTaskS3Location`](crate::model::ExportTaskS3Location).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) s3_bucket: std::option::Option<std::string::String>,
        pub(crate) s3_prefix: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The destination Amazon S3 bucket.</p>
        pub fn s3_bucket(mut self, input: impl Into<std::string::String>) -> Self {
            self.s3_bucket = Some(input.into());
            self
        }
        /// <p>The destination Amazon S3 bucket.</p>
        pub fn set_s3_bucket(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.s3_bucket = input;
            self
        }
        /// <p>The prefix (logical hierarchy) in the bucket.</p>
        pub fn s3_prefix(mut self, input: impl Into<std::string::String>) -> Self {
            self.s3_prefix = Some(input.into());
            self
        }
        /// <p>The prefix (logical hierarchy) in the bucket.</p>
        pub fn set_s3_prefix(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.s3_prefix = input;
            self
        }
        /// Consumes the builder and constructs a [`ExportTaskS3Location`](crate::model::ExportTaskS3Location).
        pub fn build(self) -> crate::model::ExportTaskS3Location {
            crate::model::ExportTaskS3Location {
                s3_bucket: self.s3_bucket,
                s3_prefix: self.s3_prefix,
            }
        }
    }
}
impl ExportTaskS3Location {
    /// Creates a new builder-style object to manufacture [`ExportTaskS3Location`](crate::model::ExportTaskS3Location).
    pub fn builder() -> crate::model::export_task_s3_location::Builder {
        crate::model::export_task_s3_location::Builder::default()
    }
}

/// <p>Describes the destination for an export image task.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ExportTaskS3LocationRequest {
    /// <p>The destination Amazon S3 bucket.</p>
    #[doc(hidden)]
    pub s3_bucket: std::option::Option<std::string::String>,
    /// <p>The prefix (logical hierarchy) in the bucket.</p>
    #[doc(hidden)]
    pub s3_prefix: std::option::Option<std::string::String>,
}
impl ExportTaskS3LocationRequest {
    /// <p>The destination Amazon S3 bucket.</p>
    pub fn s3_bucket(&self) -> std::option::Option<&str> {
        self.s3_bucket.as_deref()
    }
    /// <p>The prefix (logical hierarchy) in the bucket.</p>
    pub fn s3_prefix(&self) -> std::option::Option<&str> {
        self.s3_prefix.as_deref()
    }
}
/// See [`ExportTaskS3LocationRequest`](crate::model::ExportTaskS3LocationRequest).
pub mod export_task_s3_location_request {

    /// A builder for [`ExportTaskS3LocationRequest`](crate::model::ExportTaskS3LocationRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) s3_bucket: std::option::Option<std::string::String>,
        pub(crate) s3_prefix: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The destination Amazon S3 bucket.</p>
        pub fn s3_bucket(mut self, input: impl Into<std::string::String>) -> Self {
            self.s3_bucket = Some(input.into());
            self
        }
        /// <p>The destination Amazon S3 bucket.</p>
        pub fn set_s3_bucket(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.s3_bucket = input;
            self
        }
        /// <p>The prefix (logical hierarchy) in the bucket.</p>
        pub fn s3_prefix(mut self, input: impl Into<std::string::String>) -> Self {
            self.s3_prefix = Some(input.into());
            self
        }
        /// <p>The prefix (logical hierarchy) in the bucket.</p>
        pub fn set_s3_prefix(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.s3_prefix = input;
            self
        }
        /// Consumes the builder and constructs a [`ExportTaskS3LocationRequest`](crate::model::ExportTaskS3LocationRequest).
        pub fn build(self) -> crate::model::ExportTaskS3LocationRequest {
            crate::model::ExportTaskS3LocationRequest {
                s3_bucket: self.s3_bucket,
                s3_prefix: self.s3_prefix,
            }
        }
    }
}
impl ExportTaskS3LocationRequest {
    /// Creates a new builder-style object to manufacture [`ExportTaskS3LocationRequest`](crate::model::ExportTaskS3LocationRequest).
    pub fn builder() -> crate::model::export_task_s3_location_request::Builder {
        crate::model::export_task_s3_location_request::Builder::default()
    }
}

/// <p>Describes the state of a client certificate revocation list.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ClientCertificateRevocationListStatus {
    /// <p>The state of the client certificate revocation list.</p>
    #[doc(hidden)]
    pub code: std::option::Option<crate::model::ClientCertificateRevocationListStatusCode>,
    /// <p>A message about the status of the client certificate revocation list, if applicable.</p>
    #[doc(hidden)]
    pub message: std::option::Option<std::string::String>,
}
impl ClientCertificateRevocationListStatus {
    /// <p>The state of the client certificate revocation list.</p>
    pub fn code(
        &self,
    ) -> std::option::Option<&crate::model::ClientCertificateRevocationListStatusCode> {
        self.code.as_ref()
    }
    /// <p>A message about the status of the client certificate revocation list, if applicable.</p>
    pub fn message(&self) -> std::option::Option<&str> {
        self.message.as_deref()
    }
}
/// See [`ClientCertificateRevocationListStatus`](crate::model::ClientCertificateRevocationListStatus).
pub mod client_certificate_revocation_list_status {

    /// A builder for [`ClientCertificateRevocationListStatus`](crate::model::ClientCertificateRevocationListStatus).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) code:
            std::option::Option<crate::model::ClientCertificateRevocationListStatusCode>,
        pub(crate) message: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The state of the client certificate revocation list.</p>
        pub fn code(
            mut self,
            input: crate::model::ClientCertificateRevocationListStatusCode,
        ) -> Self {
            self.code = Some(input);
            self
        }
        /// <p>The state of the client certificate revocation list.</p>
        pub fn set_code(
            mut self,
            input: std::option::Option<crate::model::ClientCertificateRevocationListStatusCode>,
        ) -> Self {
            self.code = input;
            self
        }
        /// <p>A message about the status of the client certificate revocation list, if applicable.</p>
        pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
            self.message = Some(input.into());
            self
        }
        /// <p>A message about the status of the client certificate revocation list, if applicable.</p>
        pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.message = input;
            self
        }
        /// Consumes the builder and constructs a [`ClientCertificateRevocationListStatus`](crate::model::ClientCertificateRevocationListStatus).
        pub fn build(self) -> crate::model::ClientCertificateRevocationListStatus {
            crate::model::ClientCertificateRevocationListStatus {
                code: self.code,
                message: self.message,
            }
        }
    }
}
impl ClientCertificateRevocationListStatus {
    /// Creates a new builder-style object to manufacture [`ClientCertificateRevocationListStatus`](crate::model::ClientCertificateRevocationListStatus).
    pub fn builder() -> crate::model::client_certificate_revocation_list_status::Builder {
        crate::model::client_certificate_revocation_list_status::Builder::default()
    }
}

/// When writing a match expression against `ClientCertificateRevocationListStatusCode`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let clientcertificaterevocationliststatuscode = unimplemented!();
/// match clientcertificaterevocationliststatuscode {
///     ClientCertificateRevocationListStatusCode::Active => { /* ... */ },
///     ClientCertificateRevocationListStatusCode::Pending => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `clientcertificaterevocationliststatuscode` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `ClientCertificateRevocationListStatusCode::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `ClientCertificateRevocationListStatusCode::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `ClientCertificateRevocationListStatusCode::NewFeature` is defined.
/// Specifically, when `clientcertificaterevocationliststatuscode` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `ClientCertificateRevocationListStatusCode::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 ClientCertificateRevocationListStatusCode {
    #[allow(missing_docs)] // documentation missing in model
    Active,
    #[allow(missing_docs)] // documentation missing in model
    Pending,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for ClientCertificateRevocationListStatusCode {
    fn from(s: &str) -> Self {
        match s {
            "active" => ClientCertificateRevocationListStatusCode::Active,
            "pending" => ClientCertificateRevocationListStatusCode::Pending,
            other => ClientCertificateRevocationListStatusCode::Unknown(
                crate::types::UnknownVariantValue(other.to_owned()),
            ),
        }
    }
}
impl std::str::FromStr for ClientCertificateRevocationListStatusCode {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(ClientCertificateRevocationListStatusCode::from(s))
    }
}
impl ClientCertificateRevocationListStatusCode {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            ClientCertificateRevocationListStatusCode::Active => "active",
            ClientCertificateRevocationListStatusCode::Pending => "pending",
            ClientCertificateRevocationListStatusCode::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["active", "pending"]
    }
}
impl AsRef<str> for ClientCertificateRevocationListStatusCode {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes route propagation.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TransitGatewayPropagation {
    /// <p>The ID of the attachment.</p>
    #[doc(hidden)]
    pub transit_gateway_attachment_id: std::option::Option<std::string::String>,
    /// <p>The ID of the resource.</p>
    #[doc(hidden)]
    pub resource_id: std::option::Option<std::string::String>,
    /// <p>The resource type. Note that the <code>tgw-peering</code> resource type has been deprecated.</p>
    #[doc(hidden)]
    pub resource_type: std::option::Option<crate::model::TransitGatewayAttachmentResourceType>,
    /// <p>The ID of the transit gateway route table.</p>
    #[doc(hidden)]
    pub transit_gateway_route_table_id: std::option::Option<std::string::String>,
    /// <p>The state.</p>
    #[doc(hidden)]
    pub state: std::option::Option<crate::model::TransitGatewayPropagationState>,
    /// <p>The ID of the transit gateway route table announcement.</p>
    #[doc(hidden)]
    pub transit_gateway_route_table_announcement_id: std::option::Option<std::string::String>,
}
impl TransitGatewayPropagation {
    /// <p>The ID of the attachment.</p>
    pub fn transit_gateway_attachment_id(&self) -> std::option::Option<&str> {
        self.transit_gateway_attachment_id.as_deref()
    }
    /// <p>The ID of the resource.</p>
    pub fn resource_id(&self) -> std::option::Option<&str> {
        self.resource_id.as_deref()
    }
    /// <p>The resource type. Note that the <code>tgw-peering</code> resource type has been deprecated.</p>
    pub fn resource_type(
        &self,
    ) -> std::option::Option<&crate::model::TransitGatewayAttachmentResourceType> {
        self.resource_type.as_ref()
    }
    /// <p>The ID of the transit gateway route table.</p>
    pub fn transit_gateway_route_table_id(&self) -> std::option::Option<&str> {
        self.transit_gateway_route_table_id.as_deref()
    }
    /// <p>The state.</p>
    pub fn state(&self) -> std::option::Option<&crate::model::TransitGatewayPropagationState> {
        self.state.as_ref()
    }
    /// <p>The ID of the transit gateway route table announcement.</p>
    pub fn transit_gateway_route_table_announcement_id(&self) -> std::option::Option<&str> {
        self.transit_gateway_route_table_announcement_id.as_deref()
    }
}
/// See [`TransitGatewayPropagation`](crate::model::TransitGatewayPropagation).
pub mod transit_gateway_propagation {

    /// A builder for [`TransitGatewayPropagation`](crate::model::TransitGatewayPropagation).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) transit_gateway_attachment_id: std::option::Option<std::string::String>,
        pub(crate) resource_id: std::option::Option<std::string::String>,
        pub(crate) resource_type:
            std::option::Option<crate::model::TransitGatewayAttachmentResourceType>,
        pub(crate) transit_gateway_route_table_id: std::option::Option<std::string::String>,
        pub(crate) state: std::option::Option<crate::model::TransitGatewayPropagationState>,
        pub(crate) transit_gateway_route_table_announcement_id:
            std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The ID of the attachment.</p>
        pub fn transit_gateway_attachment_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.transit_gateway_attachment_id = Some(input.into());
            self
        }
        /// <p>The ID of the attachment.</p>
        pub fn set_transit_gateway_attachment_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.transit_gateway_attachment_id = input;
            self
        }
        /// <p>The ID of the resource.</p>
        pub fn resource_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.resource_id = Some(input.into());
            self
        }
        /// <p>The ID of the resource.</p>
        pub fn set_resource_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.resource_id = input;
            self
        }
        /// <p>The resource type. Note that the <code>tgw-peering</code> resource type has been deprecated.</p>
        pub fn resource_type(
            mut self,
            input: crate::model::TransitGatewayAttachmentResourceType,
        ) -> Self {
            self.resource_type = Some(input);
            self
        }
        /// <p>The resource type. Note that the <code>tgw-peering</code> resource type has been deprecated.</p>
        pub fn set_resource_type(
            mut self,
            input: std::option::Option<crate::model::TransitGatewayAttachmentResourceType>,
        ) -> Self {
            self.resource_type = input;
            self
        }
        /// <p>The ID of the transit gateway route table.</p>
        pub fn transit_gateway_route_table_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.transit_gateway_route_table_id = Some(input.into());
            self
        }
        /// <p>The ID of the transit gateway route table.</p>
        pub fn set_transit_gateway_route_table_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.transit_gateway_route_table_id = input;
            self
        }
        /// <p>The state.</p>
        pub fn state(mut self, input: crate::model::TransitGatewayPropagationState) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>The state.</p>
        pub fn set_state(
            mut self,
            input: std::option::Option<crate::model::TransitGatewayPropagationState>,
        ) -> Self {
            self.state = input;
            self
        }
        /// <p>The ID of the transit gateway route table announcement.</p>
        pub fn transit_gateway_route_table_announcement_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.transit_gateway_route_table_announcement_id = Some(input.into());
            self
        }
        /// <p>The ID of the transit gateway route table announcement.</p>
        pub fn set_transit_gateway_route_table_announcement_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.transit_gateway_route_table_announcement_id = input;
            self
        }
        /// Consumes the builder and constructs a [`TransitGatewayPropagation`](crate::model::TransitGatewayPropagation).
        pub fn build(self) -> crate::model::TransitGatewayPropagation {
            crate::model::TransitGatewayPropagation {
                transit_gateway_attachment_id: self.transit_gateway_attachment_id,
                resource_id: self.resource_id,
                resource_type: self.resource_type,
                transit_gateway_route_table_id: self.transit_gateway_route_table_id,
                state: self.state,
                transit_gateway_route_table_announcement_id: self
                    .transit_gateway_route_table_announcement_id,
            }
        }
    }
}
impl TransitGatewayPropagation {
    /// Creates a new builder-style object to manufacture [`TransitGatewayPropagation`](crate::model::TransitGatewayPropagation).
    pub fn builder() -> crate::model::transit_gateway_propagation::Builder {
        crate::model::transit_gateway_propagation::Builder::default()
    }
}

/// <p>Contains information about the errors that occurred when enabling fast snapshot restores.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct EnableFastSnapshotRestoreErrorItem {
    /// <p>The ID of the snapshot.</p>
    #[doc(hidden)]
    pub snapshot_id: std::option::Option<std::string::String>,
    /// <p>The errors.</p>
    #[doc(hidden)]
    pub fast_snapshot_restore_state_errors:
        std::option::Option<std::vec::Vec<crate::model::EnableFastSnapshotRestoreStateErrorItem>>,
}
impl EnableFastSnapshotRestoreErrorItem {
    /// <p>The ID of the snapshot.</p>
    pub fn snapshot_id(&self) -> std::option::Option<&str> {
        self.snapshot_id.as_deref()
    }
    /// <p>The errors.</p>
    pub fn fast_snapshot_restore_state_errors(
        &self,
    ) -> std::option::Option<&[crate::model::EnableFastSnapshotRestoreStateErrorItem]> {
        self.fast_snapshot_restore_state_errors.as_deref()
    }
}
/// See [`EnableFastSnapshotRestoreErrorItem`](crate::model::EnableFastSnapshotRestoreErrorItem).
pub mod enable_fast_snapshot_restore_error_item {

    /// A builder for [`EnableFastSnapshotRestoreErrorItem`](crate::model::EnableFastSnapshotRestoreErrorItem).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) snapshot_id: std::option::Option<std::string::String>,
        pub(crate) fast_snapshot_restore_state_errors: std::option::Option<
            std::vec::Vec<crate::model::EnableFastSnapshotRestoreStateErrorItem>,
        >,
    }
    impl Builder {
        /// <p>The ID of the snapshot.</p>
        pub fn snapshot_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.snapshot_id = Some(input.into());
            self
        }
        /// <p>The ID of the snapshot.</p>
        pub fn set_snapshot_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.snapshot_id = input;
            self
        }
        /// Appends an item to `fast_snapshot_restore_state_errors`.
        ///
        /// To override the contents of this collection use [`set_fast_snapshot_restore_state_errors`](Self::set_fast_snapshot_restore_state_errors).
        ///
        /// <p>The errors.</p>
        pub fn fast_snapshot_restore_state_errors(
            mut self,
            input: crate::model::EnableFastSnapshotRestoreStateErrorItem,
        ) -> Self {
            let mut v = self.fast_snapshot_restore_state_errors.unwrap_or_default();
            v.push(input);
            self.fast_snapshot_restore_state_errors = Some(v);
            self
        }
        /// <p>The errors.</p>
        pub fn set_fast_snapshot_restore_state_errors(
            mut self,
            input: std::option::Option<
                std::vec::Vec<crate::model::EnableFastSnapshotRestoreStateErrorItem>,
            >,
        ) -> Self {
            self.fast_snapshot_restore_state_errors = input;
            self
        }
        /// Consumes the builder and constructs a [`EnableFastSnapshotRestoreErrorItem`](crate::model::EnableFastSnapshotRestoreErrorItem).
        pub fn build(self) -> crate::model::EnableFastSnapshotRestoreErrorItem {
            crate::model::EnableFastSnapshotRestoreErrorItem {
                snapshot_id: self.snapshot_id,
                fast_snapshot_restore_state_errors: self.fast_snapshot_restore_state_errors,
            }
        }
    }
}
impl EnableFastSnapshotRestoreErrorItem {
    /// Creates a new builder-style object to manufacture [`EnableFastSnapshotRestoreErrorItem`](crate::model::EnableFastSnapshotRestoreErrorItem).
    pub fn builder() -> crate::model::enable_fast_snapshot_restore_error_item::Builder {
        crate::model::enable_fast_snapshot_restore_error_item::Builder::default()
    }
}

/// <p>Contains information about an error that occurred when enabling fast snapshot restores.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct EnableFastSnapshotRestoreStateErrorItem {
    /// <p>The Availability Zone.</p>
    #[doc(hidden)]
    pub availability_zone: std::option::Option<std::string::String>,
    /// <p>The error.</p>
    #[doc(hidden)]
    pub error: std::option::Option<crate::model::EnableFastSnapshotRestoreStateError>,
}
impl EnableFastSnapshotRestoreStateErrorItem {
    /// <p>The Availability Zone.</p>
    pub fn availability_zone(&self) -> std::option::Option<&str> {
        self.availability_zone.as_deref()
    }
    /// <p>The error.</p>
    pub fn error(&self) -> std::option::Option<&crate::model::EnableFastSnapshotRestoreStateError> {
        self.error.as_ref()
    }
}
/// See [`EnableFastSnapshotRestoreStateErrorItem`](crate::model::EnableFastSnapshotRestoreStateErrorItem).
pub mod enable_fast_snapshot_restore_state_error_item {

    /// A builder for [`EnableFastSnapshotRestoreStateErrorItem`](crate::model::EnableFastSnapshotRestoreStateErrorItem).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) availability_zone: std::option::Option<std::string::String>,
        pub(crate) error: std::option::Option<crate::model::EnableFastSnapshotRestoreStateError>,
    }
    impl Builder {
        /// <p>The Availability Zone.</p>
        pub fn availability_zone(mut self, input: impl Into<std::string::String>) -> Self {
            self.availability_zone = Some(input.into());
            self
        }
        /// <p>The Availability Zone.</p>
        pub fn set_availability_zone(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.availability_zone = input;
            self
        }
        /// <p>The error.</p>
        pub fn error(mut self, input: crate::model::EnableFastSnapshotRestoreStateError) -> Self {
            self.error = Some(input);
            self
        }
        /// <p>The error.</p>
        pub fn set_error(
            mut self,
            input: std::option::Option<crate::model::EnableFastSnapshotRestoreStateError>,
        ) -> Self {
            self.error = input;
            self
        }
        /// Consumes the builder and constructs a [`EnableFastSnapshotRestoreStateErrorItem`](crate::model::EnableFastSnapshotRestoreStateErrorItem).
        pub fn build(self) -> crate::model::EnableFastSnapshotRestoreStateErrorItem {
            crate::model::EnableFastSnapshotRestoreStateErrorItem {
                availability_zone: self.availability_zone,
                error: self.error,
            }
        }
    }
}
impl EnableFastSnapshotRestoreStateErrorItem {
    /// Creates a new builder-style object to manufacture [`EnableFastSnapshotRestoreStateErrorItem`](crate::model::EnableFastSnapshotRestoreStateErrorItem).
    pub fn builder() -> crate::model::enable_fast_snapshot_restore_state_error_item::Builder {
        crate::model::enable_fast_snapshot_restore_state_error_item::Builder::default()
    }
}

/// <p>Describes an error that occurred when enabling fast snapshot restores.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct EnableFastSnapshotRestoreStateError {
    /// <p>The error code.</p>
    #[doc(hidden)]
    pub code: std::option::Option<std::string::String>,
    /// <p>The error message.</p>
    #[doc(hidden)]
    pub message: std::option::Option<std::string::String>,
}
impl EnableFastSnapshotRestoreStateError {
    /// <p>The error code.</p>
    pub fn code(&self) -> std::option::Option<&str> {
        self.code.as_deref()
    }
    /// <p>The error message.</p>
    pub fn message(&self) -> std::option::Option<&str> {
        self.message.as_deref()
    }
}
/// See [`EnableFastSnapshotRestoreStateError`](crate::model::EnableFastSnapshotRestoreStateError).
pub mod enable_fast_snapshot_restore_state_error {

    /// A builder for [`EnableFastSnapshotRestoreStateError`](crate::model::EnableFastSnapshotRestoreStateError).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) code: std::option::Option<std::string::String>,
        pub(crate) message: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The error code.</p>
        pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
            self.code = Some(input.into());
            self
        }
        /// <p>The error code.</p>
        pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.code = input;
            self
        }
        /// <p>The error message.</p>
        pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
            self.message = Some(input.into());
            self
        }
        /// <p>The error message.</p>
        pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.message = input;
            self
        }
        /// Consumes the builder and constructs a [`EnableFastSnapshotRestoreStateError`](crate::model::EnableFastSnapshotRestoreStateError).
        pub fn build(self) -> crate::model::EnableFastSnapshotRestoreStateError {
            crate::model::EnableFastSnapshotRestoreStateError {
                code: self.code,
                message: self.message,
            }
        }
    }
}
impl EnableFastSnapshotRestoreStateError {
    /// Creates a new builder-style object to manufacture [`EnableFastSnapshotRestoreStateError`](crate::model::EnableFastSnapshotRestoreStateError).
    pub fn builder() -> crate::model::enable_fast_snapshot_restore_state_error::Builder {
        crate::model::enable_fast_snapshot_restore_state_error::Builder::default()
    }
}

/// <p>Describes fast snapshot restores that were successfully enabled.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct EnableFastSnapshotRestoreSuccessItem {
    /// <p>The ID of the snapshot.</p>
    #[doc(hidden)]
    pub snapshot_id: std::option::Option<std::string::String>,
    /// <p>The Availability Zone.</p>
    #[doc(hidden)]
    pub availability_zone: std::option::Option<std::string::String>,
    /// <p>The state of fast snapshot restores.</p>
    #[doc(hidden)]
    pub state: std::option::Option<crate::model::FastSnapshotRestoreStateCode>,
    /// <p>The reason for the state transition. The possible values are as follows:</p>
    /// <ul>
    /// <li> <p> <code>Client.UserInitiated</code> - The state successfully transitioned to <code>enabling</code> or <code>disabling</code>.</p> </li>
    /// <li> <p> <code>Client.UserInitiated - Lifecycle state transition</code> - The state successfully transitioned to <code>optimizing</code>, <code>enabled</code>, or <code>disabled</code>.</p> </li>
    /// </ul>
    #[doc(hidden)]
    pub state_transition_reason: std::option::Option<std::string::String>,
    /// <p>The ID of the Amazon Web Services account that enabled fast snapshot restores on the snapshot.</p>
    #[doc(hidden)]
    pub owner_id: std::option::Option<std::string::String>,
    /// <p>The Amazon Web Services owner alias that enabled fast snapshot restores on the snapshot. This is intended for future use.</p>
    #[doc(hidden)]
    pub owner_alias: std::option::Option<std::string::String>,
    /// <p>The time at which fast snapshot restores entered the <code>enabling</code> state.</p>
    #[doc(hidden)]
    pub enabling_time: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The time at which fast snapshot restores entered the <code>optimizing</code> state.</p>
    #[doc(hidden)]
    pub optimizing_time: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The time at which fast snapshot restores entered the <code>enabled</code> state.</p>
    #[doc(hidden)]
    pub enabled_time: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The time at which fast snapshot restores entered the <code>disabling</code> state.</p>
    #[doc(hidden)]
    pub disabling_time: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The time at which fast snapshot restores entered the <code>disabled</code> state.</p>
    #[doc(hidden)]
    pub disabled_time: std::option::Option<aws_smithy_types::DateTime>,
}
impl EnableFastSnapshotRestoreSuccessItem {
    /// <p>The ID of the snapshot.</p>
    pub fn snapshot_id(&self) -> std::option::Option<&str> {
        self.snapshot_id.as_deref()
    }
    /// <p>The Availability Zone.</p>
    pub fn availability_zone(&self) -> std::option::Option<&str> {
        self.availability_zone.as_deref()
    }
    /// <p>The state of fast snapshot restores.</p>
    pub fn state(&self) -> std::option::Option<&crate::model::FastSnapshotRestoreStateCode> {
        self.state.as_ref()
    }
    /// <p>The reason for the state transition. The possible values are as follows:</p>
    /// <ul>
    /// <li> <p> <code>Client.UserInitiated</code> - The state successfully transitioned to <code>enabling</code> or <code>disabling</code>.</p> </li>
    /// <li> <p> <code>Client.UserInitiated - Lifecycle state transition</code> - The state successfully transitioned to <code>optimizing</code>, <code>enabled</code>, or <code>disabled</code>.</p> </li>
    /// </ul>
    pub fn state_transition_reason(&self) -> std::option::Option<&str> {
        self.state_transition_reason.as_deref()
    }
    /// <p>The ID of the Amazon Web Services account that enabled fast snapshot restores on the snapshot.</p>
    pub fn owner_id(&self) -> std::option::Option<&str> {
        self.owner_id.as_deref()
    }
    /// <p>The Amazon Web Services owner alias that enabled fast snapshot restores on the snapshot. This is intended for future use.</p>
    pub fn owner_alias(&self) -> std::option::Option<&str> {
        self.owner_alias.as_deref()
    }
    /// <p>The time at which fast snapshot restores entered the <code>enabling</code> state.</p>
    pub fn enabling_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.enabling_time.as_ref()
    }
    /// <p>The time at which fast snapshot restores entered the <code>optimizing</code> state.</p>
    pub fn optimizing_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.optimizing_time.as_ref()
    }
    /// <p>The time at which fast snapshot restores entered the <code>enabled</code> state.</p>
    pub fn enabled_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.enabled_time.as_ref()
    }
    /// <p>The time at which fast snapshot restores entered the <code>disabling</code> state.</p>
    pub fn disabling_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.disabling_time.as_ref()
    }
    /// <p>The time at which fast snapshot restores entered the <code>disabled</code> state.</p>
    pub fn disabled_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.disabled_time.as_ref()
    }
}
/// See [`EnableFastSnapshotRestoreSuccessItem`](crate::model::EnableFastSnapshotRestoreSuccessItem).
pub mod enable_fast_snapshot_restore_success_item {

    /// A builder for [`EnableFastSnapshotRestoreSuccessItem`](crate::model::EnableFastSnapshotRestoreSuccessItem).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) snapshot_id: std::option::Option<std::string::String>,
        pub(crate) availability_zone: std::option::Option<std::string::String>,
        pub(crate) state: std::option::Option<crate::model::FastSnapshotRestoreStateCode>,
        pub(crate) state_transition_reason: std::option::Option<std::string::String>,
        pub(crate) owner_id: std::option::Option<std::string::String>,
        pub(crate) owner_alias: std::option::Option<std::string::String>,
        pub(crate) enabling_time: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) optimizing_time: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) enabled_time: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) disabling_time: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) disabled_time: std::option::Option<aws_smithy_types::DateTime>,
    }
    impl Builder {
        /// <p>The ID of the snapshot.</p>
        pub fn snapshot_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.snapshot_id = Some(input.into());
            self
        }
        /// <p>The ID of the snapshot.</p>
        pub fn set_snapshot_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.snapshot_id = input;
            self
        }
        /// <p>The Availability Zone.</p>
        pub fn availability_zone(mut self, input: impl Into<std::string::String>) -> Self {
            self.availability_zone = Some(input.into());
            self
        }
        /// <p>The Availability Zone.</p>
        pub fn set_availability_zone(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.availability_zone = input;
            self
        }
        /// <p>The state of fast snapshot restores.</p>
        pub fn state(mut self, input: crate::model::FastSnapshotRestoreStateCode) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>The state of fast snapshot restores.</p>
        pub fn set_state(
            mut self,
            input: std::option::Option<crate::model::FastSnapshotRestoreStateCode>,
        ) -> Self {
            self.state = input;
            self
        }
        /// <p>The reason for the state transition. The possible values are as follows:</p>
        /// <ul>
        /// <li> <p> <code>Client.UserInitiated</code> - The state successfully transitioned to <code>enabling</code> or <code>disabling</code>.</p> </li>
        /// <li> <p> <code>Client.UserInitiated - Lifecycle state transition</code> - The state successfully transitioned to <code>optimizing</code>, <code>enabled</code>, or <code>disabled</code>.</p> </li>
        /// </ul>
        pub fn state_transition_reason(mut self, input: impl Into<std::string::String>) -> Self {
            self.state_transition_reason = Some(input.into());
            self
        }
        /// <p>The reason for the state transition. The possible values are as follows:</p>
        /// <ul>
        /// <li> <p> <code>Client.UserInitiated</code> - The state successfully transitioned to <code>enabling</code> or <code>disabling</code>.</p> </li>
        /// <li> <p> <code>Client.UserInitiated - Lifecycle state transition</code> - The state successfully transitioned to <code>optimizing</code>, <code>enabled</code>, or <code>disabled</code>.</p> </li>
        /// </ul>
        pub fn set_state_transition_reason(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.state_transition_reason = input;
            self
        }
        /// <p>The ID of the Amazon Web Services account that enabled fast snapshot restores on the snapshot.</p>
        pub fn owner_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.owner_id = Some(input.into());
            self
        }
        /// <p>The ID of the Amazon Web Services account that enabled fast snapshot restores on the snapshot.</p>
        pub fn set_owner_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.owner_id = input;
            self
        }
        /// <p>The Amazon Web Services owner alias that enabled fast snapshot restores on the snapshot. This is intended for future use.</p>
        pub fn owner_alias(mut self, input: impl Into<std::string::String>) -> Self {
            self.owner_alias = Some(input.into());
            self
        }
        /// <p>The Amazon Web Services owner alias that enabled fast snapshot restores on the snapshot. This is intended for future use.</p>
        pub fn set_owner_alias(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.owner_alias = input;
            self
        }
        /// <p>The time at which fast snapshot restores entered the <code>enabling</code> state.</p>
        pub fn enabling_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.enabling_time = Some(input);
            self
        }
        /// <p>The time at which fast snapshot restores entered the <code>enabling</code> state.</p>
        pub fn set_enabling_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.enabling_time = input;
            self
        }
        /// <p>The time at which fast snapshot restores entered the <code>optimizing</code> state.</p>
        pub fn optimizing_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.optimizing_time = Some(input);
            self
        }
        /// <p>The time at which fast snapshot restores entered the <code>optimizing</code> state.</p>
        pub fn set_optimizing_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.optimizing_time = input;
            self
        }
        /// <p>The time at which fast snapshot restores entered the <code>enabled</code> state.</p>
        pub fn enabled_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.enabled_time = Some(input);
            self
        }
        /// <p>The time at which fast snapshot restores entered the <code>enabled</code> state.</p>
        pub fn set_enabled_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.enabled_time = input;
            self
        }
        /// <p>The time at which fast snapshot restores entered the <code>disabling</code> state.</p>
        pub fn disabling_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.disabling_time = Some(input);
            self
        }
        /// <p>The time at which fast snapshot restores entered the <code>disabling</code> state.</p>
        pub fn set_disabling_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.disabling_time = input;
            self
        }
        /// <p>The time at which fast snapshot restores entered the <code>disabled</code> state.</p>
        pub fn disabled_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.disabled_time = Some(input);
            self
        }
        /// <p>The time at which fast snapshot restores entered the <code>disabled</code> state.</p>
        pub fn set_disabled_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.disabled_time = input;
            self
        }
        /// Consumes the builder and constructs a [`EnableFastSnapshotRestoreSuccessItem`](crate::model::EnableFastSnapshotRestoreSuccessItem).
        pub fn build(self) -> crate::model::EnableFastSnapshotRestoreSuccessItem {
            crate::model::EnableFastSnapshotRestoreSuccessItem {
                snapshot_id: self.snapshot_id,
                availability_zone: self.availability_zone,
                state: self.state,
                state_transition_reason: self.state_transition_reason,
                owner_id: self.owner_id,
                owner_alias: self.owner_alias,
                enabling_time: self.enabling_time,
                optimizing_time: self.optimizing_time,
                enabled_time: self.enabled_time,
                disabling_time: self.disabling_time,
                disabled_time: self.disabled_time,
            }
        }
    }
}
impl EnableFastSnapshotRestoreSuccessItem {
    /// Creates a new builder-style object to manufacture [`EnableFastSnapshotRestoreSuccessItem`](crate::model::EnableFastSnapshotRestoreSuccessItem).
    pub fn builder() -> crate::model::enable_fast_snapshot_restore_success_item::Builder {
        crate::model::enable_fast_snapshot_restore_success_item::Builder::default()
    }
}

/// When writing a match expression against `FastSnapshotRestoreStateCode`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let fastsnapshotrestorestatecode = unimplemented!();
/// match fastsnapshotrestorestatecode {
///     FastSnapshotRestoreStateCode::Disabled => { /* ... */ },
///     FastSnapshotRestoreStateCode::Disabling => { /* ... */ },
///     FastSnapshotRestoreStateCode::Enabled => { /* ... */ },
///     FastSnapshotRestoreStateCode::Enabling => { /* ... */ },
///     FastSnapshotRestoreStateCode::Optimizing => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `fastsnapshotrestorestatecode` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `FastSnapshotRestoreStateCode::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `FastSnapshotRestoreStateCode::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `FastSnapshotRestoreStateCode::NewFeature` is defined.
/// Specifically, when `fastsnapshotrestorestatecode` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `FastSnapshotRestoreStateCode::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 FastSnapshotRestoreStateCode {
    #[allow(missing_docs)] // documentation missing in model
    Disabled,
    #[allow(missing_docs)] // documentation missing in model
    Disabling,
    #[allow(missing_docs)] // documentation missing in model
    Enabled,
    #[allow(missing_docs)] // documentation missing in model
    Enabling,
    #[allow(missing_docs)] // documentation missing in model
    Optimizing,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for FastSnapshotRestoreStateCode {
    fn from(s: &str) -> Self {
        match s {
            "disabled" => FastSnapshotRestoreStateCode::Disabled,
            "disabling" => FastSnapshotRestoreStateCode::Disabling,
            "enabled" => FastSnapshotRestoreStateCode::Enabled,
            "enabling" => FastSnapshotRestoreStateCode::Enabling,
            "optimizing" => FastSnapshotRestoreStateCode::Optimizing,
            other => FastSnapshotRestoreStateCode::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for FastSnapshotRestoreStateCode {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(FastSnapshotRestoreStateCode::from(s))
    }
}
impl FastSnapshotRestoreStateCode {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            FastSnapshotRestoreStateCode::Disabled => "disabled",
            FastSnapshotRestoreStateCode::Disabling => "disabling",
            FastSnapshotRestoreStateCode::Enabled => "enabled",
            FastSnapshotRestoreStateCode::Enabling => "enabling",
            FastSnapshotRestoreStateCode::Optimizing => "optimizing",
            FastSnapshotRestoreStateCode::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["disabled", "disabling", "enabled", "enabling", "optimizing"]
    }
}
impl AsRef<str> for FastSnapshotRestoreStateCode {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `FastLaunchStateCode`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let fastlaunchstatecode = unimplemented!();
/// match fastlaunchstatecode {
///     FastLaunchStateCode::Disabling => { /* ... */ },
///     FastLaunchStateCode::DisablingFailed => { /* ... */ },
///     FastLaunchStateCode::Enabled => { /* ... */ },
///     FastLaunchStateCode::EnabledFailed => { /* ... */ },
///     FastLaunchStateCode::Enabling => { /* ... */ },
///     FastLaunchStateCode::EnablingFailed => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `fastlaunchstatecode` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `FastLaunchStateCode::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `FastLaunchStateCode::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `FastLaunchStateCode::NewFeature` is defined.
/// Specifically, when `fastlaunchstatecode` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `FastLaunchStateCode::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 FastLaunchStateCode {
    #[allow(missing_docs)] // documentation missing in model
    Disabling,
    #[allow(missing_docs)] // documentation missing in model
    DisablingFailed,
    #[allow(missing_docs)] // documentation missing in model
    Enabled,
    #[allow(missing_docs)] // documentation missing in model
    EnabledFailed,
    #[allow(missing_docs)] // documentation missing in model
    Enabling,
    #[allow(missing_docs)] // documentation missing in model
    EnablingFailed,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for FastLaunchStateCode {
    fn from(s: &str) -> Self {
        match s {
            "disabling" => FastLaunchStateCode::Disabling,
            "disabling-failed" => FastLaunchStateCode::DisablingFailed,
            "enabled" => FastLaunchStateCode::Enabled,
            "enabled-failed" => FastLaunchStateCode::EnabledFailed,
            "enabling" => FastLaunchStateCode::Enabling,
            "enabling-failed" => FastLaunchStateCode::EnablingFailed,
            other => {
                FastLaunchStateCode::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for FastLaunchStateCode {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(FastLaunchStateCode::from(s))
    }
}
impl FastLaunchStateCode {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            FastLaunchStateCode::Disabling => "disabling",
            FastLaunchStateCode::DisablingFailed => "disabling-failed",
            FastLaunchStateCode::Enabled => "enabled",
            FastLaunchStateCode::EnabledFailed => "enabled-failed",
            FastLaunchStateCode::Enabling => "enabling",
            FastLaunchStateCode::EnablingFailed => "enabling-failed",
            FastLaunchStateCode::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &[
            "disabling",
            "disabling-failed",
            "enabled",
            "enabled-failed",
            "enabling",
            "enabling-failed",
        ]
    }
}
impl AsRef<str> for FastLaunchStateCode {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Identifies the launch template to use for faster launching of the Windows AMI.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct FastLaunchLaunchTemplateSpecificationResponse {
    /// <p>The ID of the launch template for faster launching of the associated Windows AMI.</p>
    #[doc(hidden)]
    pub launch_template_id: std::option::Option<std::string::String>,
    /// <p>The name of the launch template for faster launching of the associated Windows AMI.</p>
    #[doc(hidden)]
    pub launch_template_name: std::option::Option<std::string::String>,
    /// <p>The version of the launch template for faster launching of the associated Windows AMI.</p>
    #[doc(hidden)]
    pub version: std::option::Option<std::string::String>,
}
impl FastLaunchLaunchTemplateSpecificationResponse {
    /// <p>The ID of the launch template for faster launching of the associated Windows AMI.</p>
    pub fn launch_template_id(&self) -> std::option::Option<&str> {
        self.launch_template_id.as_deref()
    }
    /// <p>The name of the launch template for faster launching of the associated Windows AMI.</p>
    pub fn launch_template_name(&self) -> std::option::Option<&str> {
        self.launch_template_name.as_deref()
    }
    /// <p>The version of the launch template for faster launching of the associated Windows AMI.</p>
    pub fn version(&self) -> std::option::Option<&str> {
        self.version.as_deref()
    }
}
/// See [`FastLaunchLaunchTemplateSpecificationResponse`](crate::model::FastLaunchLaunchTemplateSpecificationResponse).
pub mod fast_launch_launch_template_specification_response {

    /// A builder for [`FastLaunchLaunchTemplateSpecificationResponse`](crate::model::FastLaunchLaunchTemplateSpecificationResponse).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) launch_template_id: std::option::Option<std::string::String>,
        pub(crate) launch_template_name: std::option::Option<std::string::String>,
        pub(crate) version: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The ID of the launch template for faster launching of the associated Windows AMI.</p>
        pub fn launch_template_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.launch_template_id = Some(input.into());
            self
        }
        /// <p>The ID of the launch template for faster launching of the associated Windows AMI.</p>
        pub fn set_launch_template_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.launch_template_id = input;
            self
        }
        /// <p>The name of the launch template for faster launching of the associated Windows AMI.</p>
        pub fn launch_template_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.launch_template_name = Some(input.into());
            self
        }
        /// <p>The name of the launch template for faster launching of the associated Windows AMI.</p>
        pub fn set_launch_template_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.launch_template_name = input;
            self
        }
        /// <p>The version of the launch template for faster launching of the associated Windows AMI.</p>
        pub fn version(mut self, input: impl Into<std::string::String>) -> Self {
            self.version = Some(input.into());
            self
        }
        /// <p>The version of the launch template for faster launching of the associated Windows AMI.</p>
        pub fn set_version(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.version = input;
            self
        }
        /// Consumes the builder and constructs a [`FastLaunchLaunchTemplateSpecificationResponse`](crate::model::FastLaunchLaunchTemplateSpecificationResponse).
        pub fn build(self) -> crate::model::FastLaunchLaunchTemplateSpecificationResponse {
            crate::model::FastLaunchLaunchTemplateSpecificationResponse {
                launch_template_id: self.launch_template_id,
                launch_template_name: self.launch_template_name,
                version: self.version,
            }
        }
    }
}
impl FastLaunchLaunchTemplateSpecificationResponse {
    /// Creates a new builder-style object to manufacture [`FastLaunchLaunchTemplateSpecificationResponse`](crate::model::FastLaunchLaunchTemplateSpecificationResponse).
    pub fn builder() -> crate::model::fast_launch_launch_template_specification_response::Builder {
        crate::model::fast_launch_launch_template_specification_response::Builder::default()
    }
}

/// <p>Configuration settings for creating and managing pre-provisioned snapshots for a fast-launch enabled Windows AMI.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct FastLaunchSnapshotConfigurationResponse {
    /// <p>The number of pre-provisioned snapshots requested to keep on hand for a fast-launch enabled Windows AMI.</p>
    #[doc(hidden)]
    pub target_resource_count: std::option::Option<i32>,
}
impl FastLaunchSnapshotConfigurationResponse {
    /// <p>The number of pre-provisioned snapshots requested to keep on hand for a fast-launch enabled Windows AMI.</p>
    pub fn target_resource_count(&self) -> std::option::Option<i32> {
        self.target_resource_count
    }
}
/// See [`FastLaunchSnapshotConfigurationResponse`](crate::model::FastLaunchSnapshotConfigurationResponse).
pub mod fast_launch_snapshot_configuration_response {

    /// A builder for [`FastLaunchSnapshotConfigurationResponse`](crate::model::FastLaunchSnapshotConfigurationResponse).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) target_resource_count: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>The number of pre-provisioned snapshots requested to keep on hand for a fast-launch enabled Windows AMI.</p>
        pub fn target_resource_count(mut self, input: i32) -> Self {
            self.target_resource_count = Some(input);
            self
        }
        /// <p>The number of pre-provisioned snapshots requested to keep on hand for a fast-launch enabled Windows AMI.</p>
        pub fn set_target_resource_count(mut self, input: std::option::Option<i32>) -> Self {
            self.target_resource_count = input;
            self
        }
        /// Consumes the builder and constructs a [`FastLaunchSnapshotConfigurationResponse`](crate::model::FastLaunchSnapshotConfigurationResponse).
        pub fn build(self) -> crate::model::FastLaunchSnapshotConfigurationResponse {
            crate::model::FastLaunchSnapshotConfigurationResponse {
                target_resource_count: self.target_resource_count,
            }
        }
    }
}
impl FastLaunchSnapshotConfigurationResponse {
    /// Creates a new builder-style object to manufacture [`FastLaunchSnapshotConfigurationResponse`](crate::model::FastLaunchSnapshotConfigurationResponse).
    pub fn builder() -> crate::model::fast_launch_snapshot_configuration_response::Builder {
        crate::model::fast_launch_snapshot_configuration_response::Builder::default()
    }
}

/// When writing a match expression against `FastLaunchResourceType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let fastlaunchresourcetype = unimplemented!();
/// match fastlaunchresourcetype {
///     FastLaunchResourceType::Snapshot => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `fastlaunchresourcetype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `FastLaunchResourceType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `FastLaunchResourceType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `FastLaunchResourceType::NewFeature` is defined.
/// Specifically, when `fastlaunchresourcetype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `FastLaunchResourceType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 FastLaunchResourceType {
    #[allow(missing_docs)] // documentation missing in model
    Snapshot,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for FastLaunchResourceType {
    fn from(s: &str) -> Self {
        match s {
            "snapshot" => FastLaunchResourceType::Snapshot,
            other => {
                FastLaunchResourceType::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for FastLaunchResourceType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(FastLaunchResourceType::from(s))
    }
}
impl FastLaunchResourceType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            FastLaunchResourceType::Snapshot => "snapshot",
            FastLaunchResourceType::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["snapshot"]
    }
}
impl AsRef<str> for FastLaunchResourceType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Request to create a launch template for a fast-launch enabled Windows AMI.</p> <note>
/// <p>Note - You can specify either the <code>LaunchTemplateName</code> or the <code>LaunchTemplateId</code>, but not both.</p>
/// </note>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct FastLaunchLaunchTemplateSpecificationRequest {
    /// <p>The ID of the launch template to use for faster launching for a Windows AMI.</p>
    #[doc(hidden)]
    pub launch_template_id: std::option::Option<std::string::String>,
    /// <p>The name of the launch template to use for faster launching for a Windows AMI.</p>
    #[doc(hidden)]
    pub launch_template_name: std::option::Option<std::string::String>,
    /// <p>The version of the launch template to use for faster launching for a Windows AMI.</p>
    #[doc(hidden)]
    pub version: std::option::Option<std::string::String>,
}
impl FastLaunchLaunchTemplateSpecificationRequest {
    /// <p>The ID of the launch template to use for faster launching for a Windows AMI.</p>
    pub fn launch_template_id(&self) -> std::option::Option<&str> {
        self.launch_template_id.as_deref()
    }
    /// <p>The name of the launch template to use for faster launching for a Windows AMI.</p>
    pub fn launch_template_name(&self) -> std::option::Option<&str> {
        self.launch_template_name.as_deref()
    }
    /// <p>The version of the launch template to use for faster launching for a Windows AMI.</p>
    pub fn version(&self) -> std::option::Option<&str> {
        self.version.as_deref()
    }
}
/// See [`FastLaunchLaunchTemplateSpecificationRequest`](crate::model::FastLaunchLaunchTemplateSpecificationRequest).
pub mod fast_launch_launch_template_specification_request {

    /// A builder for [`FastLaunchLaunchTemplateSpecificationRequest`](crate::model::FastLaunchLaunchTemplateSpecificationRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) launch_template_id: std::option::Option<std::string::String>,
        pub(crate) launch_template_name: std::option::Option<std::string::String>,
        pub(crate) version: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The ID of the launch template to use for faster launching for a Windows AMI.</p>
        pub fn launch_template_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.launch_template_id = Some(input.into());
            self
        }
        /// <p>The ID of the launch template to use for faster launching for a Windows AMI.</p>
        pub fn set_launch_template_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.launch_template_id = input;
            self
        }
        /// <p>The name of the launch template to use for faster launching for a Windows AMI.</p>
        pub fn launch_template_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.launch_template_name = Some(input.into());
            self
        }
        /// <p>The name of the launch template to use for faster launching for a Windows AMI.</p>
        pub fn set_launch_template_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.launch_template_name = input;
            self
        }
        /// <p>The version of the launch template to use for faster launching for a Windows AMI.</p>
        pub fn version(mut self, input: impl Into<std::string::String>) -> Self {
            self.version = Some(input.into());
            self
        }
        /// <p>The version of the launch template to use for faster launching for a Windows AMI.</p>
        pub fn set_version(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.version = input;
            self
        }
        /// Consumes the builder and constructs a [`FastLaunchLaunchTemplateSpecificationRequest`](crate::model::FastLaunchLaunchTemplateSpecificationRequest).
        pub fn build(self) -> crate::model::FastLaunchLaunchTemplateSpecificationRequest {
            crate::model::FastLaunchLaunchTemplateSpecificationRequest {
                launch_template_id: self.launch_template_id,
                launch_template_name: self.launch_template_name,
                version: self.version,
            }
        }
    }
}
impl FastLaunchLaunchTemplateSpecificationRequest {
    /// Creates a new builder-style object to manufacture [`FastLaunchLaunchTemplateSpecificationRequest`](crate::model::FastLaunchLaunchTemplateSpecificationRequest).
    pub fn builder() -> crate::model::fast_launch_launch_template_specification_request::Builder {
        crate::model::fast_launch_launch_template_specification_request::Builder::default()
    }
}

/// <p>Configuration settings for creating and managing pre-provisioned snapshots for a fast-launch enabled Windows AMI.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct FastLaunchSnapshotConfigurationRequest {
    /// <p>The number of pre-provisioned snapshots to keep on hand for a fast-launch enabled Windows AMI.</p>
    #[doc(hidden)]
    pub target_resource_count: std::option::Option<i32>,
}
impl FastLaunchSnapshotConfigurationRequest {
    /// <p>The number of pre-provisioned snapshots to keep on hand for a fast-launch enabled Windows AMI.</p>
    pub fn target_resource_count(&self) -> std::option::Option<i32> {
        self.target_resource_count
    }
}
/// See [`FastLaunchSnapshotConfigurationRequest`](crate::model::FastLaunchSnapshotConfigurationRequest).
pub mod fast_launch_snapshot_configuration_request {

    /// A builder for [`FastLaunchSnapshotConfigurationRequest`](crate::model::FastLaunchSnapshotConfigurationRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) target_resource_count: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>The number of pre-provisioned snapshots to keep on hand for a fast-launch enabled Windows AMI.</p>
        pub fn target_resource_count(mut self, input: i32) -> Self {
            self.target_resource_count = Some(input);
            self
        }
        /// <p>The number of pre-provisioned snapshots to keep on hand for a fast-launch enabled Windows AMI.</p>
        pub fn set_target_resource_count(mut self, input: std::option::Option<i32>) -> Self {
            self.target_resource_count = input;
            self
        }
        /// Consumes the builder and constructs a [`FastLaunchSnapshotConfigurationRequest`](crate::model::FastLaunchSnapshotConfigurationRequest).
        pub fn build(self) -> crate::model::FastLaunchSnapshotConfigurationRequest {
            crate::model::FastLaunchSnapshotConfigurationRequest {
                target_resource_count: self.target_resource_count,
            }
        }
    }
}
impl FastLaunchSnapshotConfigurationRequest {
    /// Creates a new builder-style object to manufacture [`FastLaunchSnapshotConfigurationRequest`](crate::model::FastLaunchSnapshotConfigurationRequest).
    pub fn builder() -> crate::model::fast_launch_snapshot_configuration_request::Builder {
        crate::model::fast_launch_snapshot_configuration_request::Builder::default()
    }
}

/// <p>Details on the Elastic IP address transfer. For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/vpc-eips.html#transfer-EIPs-intro">Transfer Elastic IP addresses</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AddressTransfer {
    /// <p>The Elastic IP address being transferred.</p>
    #[doc(hidden)]
    pub public_ip: std::option::Option<std::string::String>,
    /// <p>The allocation ID of an Elastic IP address.</p>
    #[doc(hidden)]
    pub allocation_id: std::option::Option<std::string::String>,
    /// <p>The ID of the account that you want to transfer the Elastic IP address to.</p>
    #[doc(hidden)]
    pub transfer_account_id: std::option::Option<std::string::String>,
    /// <p>The timestamp when the Elastic IP address transfer expired. When the source account starts the transfer, the transfer account has seven hours to allocate the Elastic IP address to complete the transfer, or the Elastic IP address will return to its original owner.</p>
    #[doc(hidden)]
    pub transfer_offer_expiration_timestamp: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The timestamp when the Elastic IP address transfer was accepted.</p>
    #[doc(hidden)]
    pub transfer_offer_accepted_timestamp: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The Elastic IP address transfer status.</p>
    #[doc(hidden)]
    pub address_transfer_status: std::option::Option<crate::model::AddressTransferStatus>,
}
impl AddressTransfer {
    /// <p>The Elastic IP address being transferred.</p>
    pub fn public_ip(&self) -> std::option::Option<&str> {
        self.public_ip.as_deref()
    }
    /// <p>The allocation ID of an Elastic IP address.</p>
    pub fn allocation_id(&self) -> std::option::Option<&str> {
        self.allocation_id.as_deref()
    }
    /// <p>The ID of the account that you want to transfer the Elastic IP address to.</p>
    pub fn transfer_account_id(&self) -> std::option::Option<&str> {
        self.transfer_account_id.as_deref()
    }
    /// <p>The timestamp when the Elastic IP address transfer expired. When the source account starts the transfer, the transfer account has seven hours to allocate the Elastic IP address to complete the transfer, or the Elastic IP address will return to its original owner.</p>
    pub fn transfer_offer_expiration_timestamp(
        &self,
    ) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.transfer_offer_expiration_timestamp.as_ref()
    }
    /// <p>The timestamp when the Elastic IP address transfer was accepted.</p>
    pub fn transfer_offer_accepted_timestamp(
        &self,
    ) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.transfer_offer_accepted_timestamp.as_ref()
    }
    /// <p>The Elastic IP address transfer status.</p>
    pub fn address_transfer_status(
        &self,
    ) -> std::option::Option<&crate::model::AddressTransferStatus> {
        self.address_transfer_status.as_ref()
    }
}
/// See [`AddressTransfer`](crate::model::AddressTransfer).
pub mod address_transfer {

    /// A builder for [`AddressTransfer`](crate::model::AddressTransfer).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) public_ip: std::option::Option<std::string::String>,
        pub(crate) allocation_id: std::option::Option<std::string::String>,
        pub(crate) transfer_account_id: std::option::Option<std::string::String>,
        pub(crate) transfer_offer_expiration_timestamp:
            std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) transfer_offer_accepted_timestamp:
            std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) address_transfer_status:
            std::option::Option<crate::model::AddressTransferStatus>,
    }
    impl Builder {
        /// <p>The Elastic IP address being transferred.</p>
        pub fn public_ip(mut self, input: impl Into<std::string::String>) -> Self {
            self.public_ip = Some(input.into());
            self
        }
        /// <p>The Elastic IP address being transferred.</p>
        pub fn set_public_ip(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.public_ip = input;
            self
        }
        /// <p>The allocation ID of an Elastic IP address.</p>
        pub fn allocation_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.allocation_id = Some(input.into());
            self
        }
        /// <p>The allocation ID of an Elastic IP address.</p>
        pub fn set_allocation_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.allocation_id = input;
            self
        }
        /// <p>The ID of the account that you want to transfer the Elastic IP address to.</p>
        pub fn transfer_account_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.transfer_account_id = Some(input.into());
            self
        }
        /// <p>The ID of the account that you want to transfer the Elastic IP address to.</p>
        pub fn set_transfer_account_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.transfer_account_id = input;
            self
        }
        /// <p>The timestamp when the Elastic IP address transfer expired. When the source account starts the transfer, the transfer account has seven hours to allocate the Elastic IP address to complete the transfer, or the Elastic IP address will return to its original owner.</p>
        pub fn transfer_offer_expiration_timestamp(
            mut self,
            input: aws_smithy_types::DateTime,
        ) -> Self {
            self.transfer_offer_expiration_timestamp = Some(input);
            self
        }
        /// <p>The timestamp when the Elastic IP address transfer expired. When the source account starts the transfer, the transfer account has seven hours to allocate the Elastic IP address to complete the transfer, or the Elastic IP address will return to its original owner.</p>
        pub fn set_transfer_offer_expiration_timestamp(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.transfer_offer_expiration_timestamp = input;
            self
        }
        /// <p>The timestamp when the Elastic IP address transfer was accepted.</p>
        pub fn transfer_offer_accepted_timestamp(
            mut self,
            input: aws_smithy_types::DateTime,
        ) -> Self {
            self.transfer_offer_accepted_timestamp = Some(input);
            self
        }
        /// <p>The timestamp when the Elastic IP address transfer was accepted.</p>
        pub fn set_transfer_offer_accepted_timestamp(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.transfer_offer_accepted_timestamp = input;
            self
        }
        /// <p>The Elastic IP address transfer status.</p>
        pub fn address_transfer_status(
            mut self,
            input: crate::model::AddressTransferStatus,
        ) -> Self {
            self.address_transfer_status = Some(input);
            self
        }
        /// <p>The Elastic IP address transfer status.</p>
        pub fn set_address_transfer_status(
            mut self,
            input: std::option::Option<crate::model::AddressTransferStatus>,
        ) -> Self {
            self.address_transfer_status = input;
            self
        }
        /// Consumes the builder and constructs a [`AddressTransfer`](crate::model::AddressTransfer).
        pub fn build(self) -> crate::model::AddressTransfer {
            crate::model::AddressTransfer {
                public_ip: self.public_ip,
                allocation_id: self.allocation_id,
                transfer_account_id: self.transfer_account_id,
                transfer_offer_expiration_timestamp: self.transfer_offer_expiration_timestamp,
                transfer_offer_accepted_timestamp: self.transfer_offer_accepted_timestamp,
                address_transfer_status: self.address_transfer_status,
            }
        }
    }
}
impl AddressTransfer {
    /// Creates a new builder-style object to manufacture [`AddressTransfer`](crate::model::AddressTransfer).
    pub fn builder() -> crate::model::address_transfer::Builder {
        crate::model::address_transfer::Builder::default()
    }
}

/// When writing a match expression against `AddressTransferStatus`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let addresstransferstatus = unimplemented!();
/// match addresstransferstatus {
///     AddressTransferStatus::Accepted => { /* ... */ },
///     AddressTransferStatus::Disabled => { /* ... */ },
///     AddressTransferStatus::Pending => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `addresstransferstatus` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `AddressTransferStatus::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `AddressTransferStatus::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `AddressTransferStatus::NewFeature` is defined.
/// Specifically, when `addresstransferstatus` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `AddressTransferStatus::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 AddressTransferStatus {
    #[allow(missing_docs)] // documentation missing in model
    Accepted,
    #[allow(missing_docs)] // documentation missing in model
    Disabled,
    #[allow(missing_docs)] // documentation missing in model
    Pending,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for AddressTransferStatus {
    fn from(s: &str) -> Self {
        match s {
            "accepted" => AddressTransferStatus::Accepted,
            "disabled" => AddressTransferStatus::Disabled,
            "pending" => AddressTransferStatus::Pending,
            other => {
                AddressTransferStatus::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for AddressTransferStatus {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(AddressTransferStatus::from(s))
    }
}
impl AddressTransferStatus {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            AddressTransferStatus::Accepted => "accepted",
            AddressTransferStatus::Disabled => "disabled",
            AddressTransferStatus::Pending => "pending",
            AddressTransferStatus::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["accepted", "disabled", "pending"]
    }
}
impl AsRef<str> for AddressTransferStatus {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes an IPv4 CIDR block associated with a VPC.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct VpcCidrBlockAssociation {
    /// <p>The association ID for the IPv4 CIDR block.</p>
    #[doc(hidden)]
    pub association_id: std::option::Option<std::string::String>,
    /// <p>The IPv4 CIDR block.</p>
    #[doc(hidden)]
    pub cidr_block: std::option::Option<std::string::String>,
    /// <p>Information about the state of the CIDR block.</p>
    #[doc(hidden)]
    pub cidr_block_state: std::option::Option<crate::model::VpcCidrBlockState>,
}
impl VpcCidrBlockAssociation {
    /// <p>The association ID for the IPv4 CIDR block.</p>
    pub fn association_id(&self) -> std::option::Option<&str> {
        self.association_id.as_deref()
    }
    /// <p>The IPv4 CIDR block.</p>
    pub fn cidr_block(&self) -> std::option::Option<&str> {
        self.cidr_block.as_deref()
    }
    /// <p>Information about the state of the CIDR block.</p>
    pub fn cidr_block_state(&self) -> std::option::Option<&crate::model::VpcCidrBlockState> {
        self.cidr_block_state.as_ref()
    }
}
/// See [`VpcCidrBlockAssociation`](crate::model::VpcCidrBlockAssociation).
pub mod vpc_cidr_block_association {

    /// A builder for [`VpcCidrBlockAssociation`](crate::model::VpcCidrBlockAssociation).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) association_id: std::option::Option<std::string::String>,
        pub(crate) cidr_block: std::option::Option<std::string::String>,
        pub(crate) cidr_block_state: std::option::Option<crate::model::VpcCidrBlockState>,
    }
    impl Builder {
        /// <p>The association ID for the IPv4 CIDR block.</p>
        pub fn association_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.association_id = Some(input.into());
            self
        }
        /// <p>The association ID for the IPv4 CIDR block.</p>
        pub fn set_association_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.association_id = input;
            self
        }
        /// <p>The IPv4 CIDR block.</p>
        pub fn cidr_block(mut self, input: impl Into<std::string::String>) -> Self {
            self.cidr_block = Some(input.into());
            self
        }
        /// <p>The IPv4 CIDR block.</p>
        pub fn set_cidr_block(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.cidr_block = input;
            self
        }
        /// <p>Information about the state of the CIDR block.</p>
        pub fn cidr_block_state(mut self, input: crate::model::VpcCidrBlockState) -> Self {
            self.cidr_block_state = Some(input);
            self
        }
        /// <p>Information about the state of the CIDR block.</p>
        pub fn set_cidr_block_state(
            mut self,
            input: std::option::Option<crate::model::VpcCidrBlockState>,
        ) -> Self {
            self.cidr_block_state = input;
            self
        }
        /// Consumes the builder and constructs a [`VpcCidrBlockAssociation`](crate::model::VpcCidrBlockAssociation).
        pub fn build(self) -> crate::model::VpcCidrBlockAssociation {
            crate::model::VpcCidrBlockAssociation {
                association_id: self.association_id,
                cidr_block: self.cidr_block,
                cidr_block_state: self.cidr_block_state,
            }
        }
    }
}
impl VpcCidrBlockAssociation {
    /// Creates a new builder-style object to manufacture [`VpcCidrBlockAssociation`](crate::model::VpcCidrBlockAssociation).
    pub fn builder() -> crate::model::vpc_cidr_block_association::Builder {
        crate::model::vpc_cidr_block_association::Builder::default()
    }
}

/// <p>Describes the state of a CIDR block.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct VpcCidrBlockState {
    /// <p>The state of the CIDR block.</p>
    #[doc(hidden)]
    pub state: std::option::Option<crate::model::VpcCidrBlockStateCode>,
    /// <p>A message about the status of the CIDR block, if applicable.</p>
    #[doc(hidden)]
    pub status_message: std::option::Option<std::string::String>,
}
impl VpcCidrBlockState {
    /// <p>The state of the CIDR block.</p>
    pub fn state(&self) -> std::option::Option<&crate::model::VpcCidrBlockStateCode> {
        self.state.as_ref()
    }
    /// <p>A message about the status of the CIDR block, if applicable.</p>
    pub fn status_message(&self) -> std::option::Option<&str> {
        self.status_message.as_deref()
    }
}
/// See [`VpcCidrBlockState`](crate::model::VpcCidrBlockState).
pub mod vpc_cidr_block_state {

    /// A builder for [`VpcCidrBlockState`](crate::model::VpcCidrBlockState).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) state: std::option::Option<crate::model::VpcCidrBlockStateCode>,
        pub(crate) status_message: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The state of the CIDR block.</p>
        pub fn state(mut self, input: crate::model::VpcCidrBlockStateCode) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>The state of the CIDR block.</p>
        pub fn set_state(
            mut self,
            input: std::option::Option<crate::model::VpcCidrBlockStateCode>,
        ) -> Self {
            self.state = input;
            self
        }
        /// <p>A message about the status of the CIDR block, if applicable.</p>
        pub fn status_message(mut self, input: impl Into<std::string::String>) -> Self {
            self.status_message = Some(input.into());
            self
        }
        /// <p>A message about the status of the CIDR block, if applicable.</p>
        pub fn set_status_message(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.status_message = input;
            self
        }
        /// Consumes the builder and constructs a [`VpcCidrBlockState`](crate::model::VpcCidrBlockState).
        pub fn build(self) -> crate::model::VpcCidrBlockState {
            crate::model::VpcCidrBlockState {
                state: self.state,
                status_message: self.status_message,
            }
        }
    }
}
impl VpcCidrBlockState {
    /// Creates a new builder-style object to manufacture [`VpcCidrBlockState`](crate::model::VpcCidrBlockState).
    pub fn builder() -> crate::model::vpc_cidr_block_state::Builder {
        crate::model::vpc_cidr_block_state::Builder::default()
    }
}

/// When writing a match expression against `VpcCidrBlockStateCode`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let vpccidrblockstatecode = unimplemented!();
/// match vpccidrblockstatecode {
///     VpcCidrBlockStateCode::Associated => { /* ... */ },
///     VpcCidrBlockStateCode::Associating => { /* ... */ },
///     VpcCidrBlockStateCode::Disassociated => { /* ... */ },
///     VpcCidrBlockStateCode::Disassociating => { /* ... */ },
///     VpcCidrBlockStateCode::Failed => { /* ... */ },
///     VpcCidrBlockStateCode::Failing => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `vpccidrblockstatecode` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `VpcCidrBlockStateCode::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `VpcCidrBlockStateCode::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `VpcCidrBlockStateCode::NewFeature` is defined.
/// Specifically, when `vpccidrblockstatecode` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `VpcCidrBlockStateCode::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 VpcCidrBlockStateCode {
    #[allow(missing_docs)] // documentation missing in model
    Associated,
    #[allow(missing_docs)] // documentation missing in model
    Associating,
    #[allow(missing_docs)] // documentation missing in model
    Disassociated,
    #[allow(missing_docs)] // documentation missing in model
    Disassociating,
    #[allow(missing_docs)] // documentation missing in model
    Failed,
    #[allow(missing_docs)] // documentation missing in model
    Failing,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for VpcCidrBlockStateCode {
    fn from(s: &str) -> Self {
        match s {
            "associated" => VpcCidrBlockStateCode::Associated,
            "associating" => VpcCidrBlockStateCode::Associating,
            "disassociated" => VpcCidrBlockStateCode::Disassociated,
            "disassociating" => VpcCidrBlockStateCode::Disassociating,
            "failed" => VpcCidrBlockStateCode::Failed,
            "failing" => VpcCidrBlockStateCode::Failing,
            other => {
                VpcCidrBlockStateCode::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for VpcCidrBlockStateCode {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(VpcCidrBlockStateCode::from(s))
    }
}
impl VpcCidrBlockStateCode {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            VpcCidrBlockStateCode::Associated => "associated",
            VpcCidrBlockStateCode::Associating => "associating",
            VpcCidrBlockStateCode::Disassociated => "disassociated",
            VpcCidrBlockStateCode::Disassociating => "disassociating",
            VpcCidrBlockStateCode::Failed => "failed",
            VpcCidrBlockStateCode::Failing => "failing",
            VpcCidrBlockStateCode::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &[
            "associated",
            "associating",
            "disassociated",
            "disassociating",
            "failed",
            "failing",
        ]
    }
}
impl AsRef<str> for VpcCidrBlockStateCode {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes an IPv6 CIDR block associated with a VPC.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct VpcIpv6CidrBlockAssociation {
    /// <p>The association ID for the IPv6 CIDR block.</p>
    #[doc(hidden)]
    pub association_id: std::option::Option<std::string::String>,
    /// <p>The IPv6 CIDR block.</p>
    #[doc(hidden)]
    pub ipv6_cidr_block: std::option::Option<std::string::String>,
    /// <p>Information about the state of the CIDR block.</p>
    #[doc(hidden)]
    pub ipv6_cidr_block_state: std::option::Option<crate::model::VpcCidrBlockState>,
    /// <p>The name of the unique set of Availability Zones, Local Zones, or Wavelength Zones from which Amazon Web Services advertises IP addresses, for example, <code>us-east-1-wl1-bos-wlz-1</code>.</p>
    #[doc(hidden)]
    pub network_border_group: std::option::Option<std::string::String>,
    /// <p>The ID of the IPv6 address pool from which the IPv6 CIDR block is allocated.</p>
    #[doc(hidden)]
    pub ipv6_pool: std::option::Option<std::string::String>,
}
impl VpcIpv6CidrBlockAssociation {
    /// <p>The association ID for the IPv6 CIDR block.</p>
    pub fn association_id(&self) -> std::option::Option<&str> {
        self.association_id.as_deref()
    }
    /// <p>The IPv6 CIDR block.</p>
    pub fn ipv6_cidr_block(&self) -> std::option::Option<&str> {
        self.ipv6_cidr_block.as_deref()
    }
    /// <p>Information about the state of the CIDR block.</p>
    pub fn ipv6_cidr_block_state(&self) -> std::option::Option<&crate::model::VpcCidrBlockState> {
        self.ipv6_cidr_block_state.as_ref()
    }
    /// <p>The name of the unique set of Availability Zones, Local Zones, or Wavelength Zones from which Amazon Web Services advertises IP addresses, for example, <code>us-east-1-wl1-bos-wlz-1</code>.</p>
    pub fn network_border_group(&self) -> std::option::Option<&str> {
        self.network_border_group.as_deref()
    }
    /// <p>The ID of the IPv6 address pool from which the IPv6 CIDR block is allocated.</p>
    pub fn ipv6_pool(&self) -> std::option::Option<&str> {
        self.ipv6_pool.as_deref()
    }
}
/// See [`VpcIpv6CidrBlockAssociation`](crate::model::VpcIpv6CidrBlockAssociation).
pub mod vpc_ipv6_cidr_block_association {

    /// A builder for [`VpcIpv6CidrBlockAssociation`](crate::model::VpcIpv6CidrBlockAssociation).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) association_id: std::option::Option<std::string::String>,
        pub(crate) ipv6_cidr_block: std::option::Option<std::string::String>,
        pub(crate) ipv6_cidr_block_state: std::option::Option<crate::model::VpcCidrBlockState>,
        pub(crate) network_border_group: std::option::Option<std::string::String>,
        pub(crate) ipv6_pool: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The association ID for the IPv6 CIDR block.</p>
        pub fn association_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.association_id = Some(input.into());
            self
        }
        /// <p>The association ID for the IPv6 CIDR block.</p>
        pub fn set_association_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.association_id = input;
            self
        }
        /// <p>The IPv6 CIDR block.</p>
        pub fn ipv6_cidr_block(mut self, input: impl Into<std::string::String>) -> Self {
            self.ipv6_cidr_block = Some(input.into());
            self
        }
        /// <p>The IPv6 CIDR block.</p>
        pub fn set_ipv6_cidr_block(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.ipv6_cidr_block = input;
            self
        }
        /// <p>Information about the state of the CIDR block.</p>
        pub fn ipv6_cidr_block_state(mut self, input: crate::model::VpcCidrBlockState) -> Self {
            self.ipv6_cidr_block_state = Some(input);
            self
        }
        /// <p>Information about the state of the CIDR block.</p>
        pub fn set_ipv6_cidr_block_state(
            mut self,
            input: std::option::Option<crate::model::VpcCidrBlockState>,
        ) -> Self {
            self.ipv6_cidr_block_state = input;
            self
        }
        /// <p>The name of the unique set of Availability Zones, Local Zones, or Wavelength Zones from which Amazon Web Services advertises IP addresses, for example, <code>us-east-1-wl1-bos-wlz-1</code>.</p>
        pub fn network_border_group(mut self, input: impl Into<std::string::String>) -> Self {
            self.network_border_group = Some(input.into());
            self
        }
        /// <p>The name of the unique set of Availability Zones, Local Zones, or Wavelength Zones from which Amazon Web Services advertises IP addresses, for example, <code>us-east-1-wl1-bos-wlz-1</code>.</p>
        pub fn set_network_border_group(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.network_border_group = input;
            self
        }
        /// <p>The ID of the IPv6 address pool from which the IPv6 CIDR block is allocated.</p>
        pub fn ipv6_pool(mut self, input: impl Into<std::string::String>) -> Self {
            self.ipv6_pool = Some(input.into());
            self
        }
        /// <p>The ID of the IPv6 address pool from which the IPv6 CIDR block is allocated.</p>
        pub fn set_ipv6_pool(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.ipv6_pool = input;
            self
        }
        /// Consumes the builder and constructs a [`VpcIpv6CidrBlockAssociation`](crate::model::VpcIpv6CidrBlockAssociation).
        pub fn build(self) -> crate::model::VpcIpv6CidrBlockAssociation {
            crate::model::VpcIpv6CidrBlockAssociation {
                association_id: self.association_id,
                ipv6_cidr_block: self.ipv6_cidr_block,
                ipv6_cidr_block_state: self.ipv6_cidr_block_state,
                network_border_group: self.network_border_group,
                ipv6_pool: self.ipv6_pool,
            }
        }
    }
}
impl VpcIpv6CidrBlockAssociation {
    /// Creates a new builder-style object to manufacture [`VpcIpv6CidrBlockAssociation`](crate::model::VpcIpv6CidrBlockAssociation).
    pub fn builder() -> crate::model::vpc_ipv6_cidr_block_association::Builder {
        crate::model::vpc_ipv6_cidr_block_association::Builder::default()
    }
}

/// <p>Describes an association between a resource attachment and a transit gateway route table.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TransitGatewayAssociation {
    /// <p>The ID of the transit gateway route table.</p>
    #[doc(hidden)]
    pub transit_gateway_route_table_id: std::option::Option<std::string::String>,
    /// <p>The ID of the attachment.</p>
    #[doc(hidden)]
    pub transit_gateway_attachment_id: std::option::Option<std::string::String>,
    /// <p>The ID of the resource.</p>
    #[doc(hidden)]
    pub resource_id: std::option::Option<std::string::String>,
    /// <p>The resource type. Note that the <code>tgw-peering</code> resource type has been deprecated.</p>
    #[doc(hidden)]
    pub resource_type: std::option::Option<crate::model::TransitGatewayAttachmentResourceType>,
    /// <p>The state of the association.</p>
    #[doc(hidden)]
    pub state: std::option::Option<crate::model::TransitGatewayAssociationState>,
}
impl TransitGatewayAssociation {
    /// <p>The ID of the transit gateway route table.</p>
    pub fn transit_gateway_route_table_id(&self) -> std::option::Option<&str> {
        self.transit_gateway_route_table_id.as_deref()
    }
    /// <p>The ID of the attachment.</p>
    pub fn transit_gateway_attachment_id(&self) -> std::option::Option<&str> {
        self.transit_gateway_attachment_id.as_deref()
    }
    /// <p>The ID of the resource.</p>
    pub fn resource_id(&self) -> std::option::Option<&str> {
        self.resource_id.as_deref()
    }
    /// <p>The resource type. Note that the <code>tgw-peering</code> resource type has been deprecated.</p>
    pub fn resource_type(
        &self,
    ) -> std::option::Option<&crate::model::TransitGatewayAttachmentResourceType> {
        self.resource_type.as_ref()
    }
    /// <p>The state of the association.</p>
    pub fn state(&self) -> std::option::Option<&crate::model::TransitGatewayAssociationState> {
        self.state.as_ref()
    }
}
/// See [`TransitGatewayAssociation`](crate::model::TransitGatewayAssociation).
pub mod transit_gateway_association {

    /// A builder for [`TransitGatewayAssociation`](crate::model::TransitGatewayAssociation).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) transit_gateway_route_table_id: std::option::Option<std::string::String>,
        pub(crate) transit_gateway_attachment_id: std::option::Option<std::string::String>,
        pub(crate) resource_id: std::option::Option<std::string::String>,
        pub(crate) resource_type:
            std::option::Option<crate::model::TransitGatewayAttachmentResourceType>,
        pub(crate) state: std::option::Option<crate::model::TransitGatewayAssociationState>,
    }
    impl Builder {
        /// <p>The ID of the transit gateway route table.</p>
        pub fn transit_gateway_route_table_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.transit_gateway_route_table_id = Some(input.into());
            self
        }
        /// <p>The ID of the transit gateway route table.</p>
        pub fn set_transit_gateway_route_table_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.transit_gateway_route_table_id = input;
            self
        }
        /// <p>The ID of the attachment.</p>
        pub fn transit_gateway_attachment_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.transit_gateway_attachment_id = Some(input.into());
            self
        }
        /// <p>The ID of the attachment.</p>
        pub fn set_transit_gateway_attachment_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.transit_gateway_attachment_id = input;
            self
        }
        /// <p>The ID of the resource.</p>
        pub fn resource_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.resource_id = Some(input.into());
            self
        }
        /// <p>The ID of the resource.</p>
        pub fn set_resource_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.resource_id = input;
            self
        }
        /// <p>The resource type. Note that the <code>tgw-peering</code> resource type has been deprecated.</p>
        pub fn resource_type(
            mut self,
            input: crate::model::TransitGatewayAttachmentResourceType,
        ) -> Self {
            self.resource_type = Some(input);
            self
        }
        /// <p>The resource type. Note that the <code>tgw-peering</code> resource type has been deprecated.</p>
        pub fn set_resource_type(
            mut self,
            input: std::option::Option<crate::model::TransitGatewayAttachmentResourceType>,
        ) -> Self {
            self.resource_type = input;
            self
        }
        /// <p>The state of the association.</p>
        pub fn state(mut self, input: crate::model::TransitGatewayAssociationState) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>The state of the association.</p>
        pub fn set_state(
            mut self,
            input: std::option::Option<crate::model::TransitGatewayAssociationState>,
        ) -> Self {
            self.state = input;
            self
        }
        /// Consumes the builder and constructs a [`TransitGatewayAssociation`](crate::model::TransitGatewayAssociation).
        pub fn build(self) -> crate::model::TransitGatewayAssociation {
            crate::model::TransitGatewayAssociation {
                transit_gateway_route_table_id: self.transit_gateway_route_table_id,
                transit_gateway_attachment_id: self.transit_gateway_attachment_id,
                resource_id: self.resource_id,
                resource_type: self.resource_type,
                state: self.state,
            }
        }
    }
}
impl TransitGatewayAssociation {
    /// Creates a new builder-style object to manufacture [`TransitGatewayAssociation`](crate::model::TransitGatewayAssociation).
    pub fn builder() -> crate::model::transit_gateway_association::Builder {
        crate::model::transit_gateway_association::Builder::default()
    }
}

/// <p>Describes an association between a subnet and an IPv6 CIDR block.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SubnetIpv6CidrBlockAssociation {
    /// <p>The ID of the association.</p>
    #[doc(hidden)]
    pub association_id: std::option::Option<std::string::String>,
    /// <p>The IPv6 CIDR block.</p>
    #[doc(hidden)]
    pub ipv6_cidr_block: std::option::Option<std::string::String>,
    /// <p>The state of the CIDR block.</p>
    #[doc(hidden)]
    pub ipv6_cidr_block_state: std::option::Option<crate::model::SubnetCidrBlockState>,
}
impl SubnetIpv6CidrBlockAssociation {
    /// <p>The ID of the association.</p>
    pub fn association_id(&self) -> std::option::Option<&str> {
        self.association_id.as_deref()
    }
    /// <p>The IPv6 CIDR block.</p>
    pub fn ipv6_cidr_block(&self) -> std::option::Option<&str> {
        self.ipv6_cidr_block.as_deref()
    }
    /// <p>The state of the CIDR block.</p>
    pub fn ipv6_cidr_block_state(
        &self,
    ) -> std::option::Option<&crate::model::SubnetCidrBlockState> {
        self.ipv6_cidr_block_state.as_ref()
    }
}
/// See [`SubnetIpv6CidrBlockAssociation`](crate::model::SubnetIpv6CidrBlockAssociation).
pub mod subnet_ipv6_cidr_block_association {

    /// A builder for [`SubnetIpv6CidrBlockAssociation`](crate::model::SubnetIpv6CidrBlockAssociation).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) association_id: std::option::Option<std::string::String>,
        pub(crate) ipv6_cidr_block: std::option::Option<std::string::String>,
        pub(crate) ipv6_cidr_block_state: std::option::Option<crate::model::SubnetCidrBlockState>,
    }
    impl Builder {
        /// <p>The ID of the association.</p>
        pub fn association_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.association_id = Some(input.into());
            self
        }
        /// <p>The ID of the association.</p>
        pub fn set_association_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.association_id = input;
            self
        }
        /// <p>The IPv6 CIDR block.</p>
        pub fn ipv6_cidr_block(mut self, input: impl Into<std::string::String>) -> Self {
            self.ipv6_cidr_block = Some(input.into());
            self
        }
        /// <p>The IPv6 CIDR block.</p>
        pub fn set_ipv6_cidr_block(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.ipv6_cidr_block = input;
            self
        }
        /// <p>The state of the CIDR block.</p>
        pub fn ipv6_cidr_block_state(mut self, input: crate::model::SubnetCidrBlockState) -> Self {
            self.ipv6_cidr_block_state = Some(input);
            self
        }
        /// <p>The state of the CIDR block.</p>
        pub fn set_ipv6_cidr_block_state(
            mut self,
            input: std::option::Option<crate::model::SubnetCidrBlockState>,
        ) -> Self {
            self.ipv6_cidr_block_state = input;
            self
        }
        /// Consumes the builder and constructs a [`SubnetIpv6CidrBlockAssociation`](crate::model::SubnetIpv6CidrBlockAssociation).
        pub fn build(self) -> crate::model::SubnetIpv6CidrBlockAssociation {
            crate::model::SubnetIpv6CidrBlockAssociation {
                association_id: self.association_id,
                ipv6_cidr_block: self.ipv6_cidr_block,
                ipv6_cidr_block_state: self.ipv6_cidr_block_state,
            }
        }
    }
}
impl SubnetIpv6CidrBlockAssociation {
    /// Creates a new builder-style object to manufacture [`SubnetIpv6CidrBlockAssociation`](crate::model::SubnetIpv6CidrBlockAssociation).
    pub fn builder() -> crate::model::subnet_ipv6_cidr_block_association::Builder {
        crate::model::subnet_ipv6_cidr_block_association::Builder::default()
    }
}

/// <p>Describes the state of a CIDR block.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SubnetCidrBlockState {
    /// <p>The state of a CIDR block.</p>
    #[doc(hidden)]
    pub state: std::option::Option<crate::model::SubnetCidrBlockStateCode>,
    /// <p>A message about the status of the CIDR block, if applicable.</p>
    #[doc(hidden)]
    pub status_message: std::option::Option<std::string::String>,
}
impl SubnetCidrBlockState {
    /// <p>The state of a CIDR block.</p>
    pub fn state(&self) -> std::option::Option<&crate::model::SubnetCidrBlockStateCode> {
        self.state.as_ref()
    }
    /// <p>A message about the status of the CIDR block, if applicable.</p>
    pub fn status_message(&self) -> std::option::Option<&str> {
        self.status_message.as_deref()
    }
}
/// See [`SubnetCidrBlockState`](crate::model::SubnetCidrBlockState).
pub mod subnet_cidr_block_state {

    /// A builder for [`SubnetCidrBlockState`](crate::model::SubnetCidrBlockState).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) state: std::option::Option<crate::model::SubnetCidrBlockStateCode>,
        pub(crate) status_message: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The state of a CIDR block.</p>
        pub fn state(mut self, input: crate::model::SubnetCidrBlockStateCode) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>The state of a CIDR block.</p>
        pub fn set_state(
            mut self,
            input: std::option::Option<crate::model::SubnetCidrBlockStateCode>,
        ) -> Self {
            self.state = input;
            self
        }
        /// <p>A message about the status of the CIDR block, if applicable.</p>
        pub fn status_message(mut self, input: impl Into<std::string::String>) -> Self {
            self.status_message = Some(input.into());
            self
        }
        /// <p>A message about the status of the CIDR block, if applicable.</p>
        pub fn set_status_message(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.status_message = input;
            self
        }
        /// Consumes the builder and constructs a [`SubnetCidrBlockState`](crate::model::SubnetCidrBlockState).
        pub fn build(self) -> crate::model::SubnetCidrBlockState {
            crate::model::SubnetCidrBlockState {
                state: self.state,
                status_message: self.status_message,
            }
        }
    }
}
impl SubnetCidrBlockState {
    /// Creates a new builder-style object to manufacture [`SubnetCidrBlockState`](crate::model::SubnetCidrBlockState).
    pub fn builder() -> crate::model::subnet_cidr_block_state::Builder {
        crate::model::subnet_cidr_block_state::Builder::default()
    }
}

/// When writing a match expression against `SubnetCidrBlockStateCode`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let subnetcidrblockstatecode = unimplemented!();
/// match subnetcidrblockstatecode {
///     SubnetCidrBlockStateCode::Associated => { /* ... */ },
///     SubnetCidrBlockStateCode::Associating => { /* ... */ },
///     SubnetCidrBlockStateCode::Disassociated => { /* ... */ },
///     SubnetCidrBlockStateCode::Disassociating => { /* ... */ },
///     SubnetCidrBlockStateCode::Failed => { /* ... */ },
///     SubnetCidrBlockStateCode::Failing => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `subnetcidrblockstatecode` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `SubnetCidrBlockStateCode::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `SubnetCidrBlockStateCode::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `SubnetCidrBlockStateCode::NewFeature` is defined.
/// Specifically, when `subnetcidrblockstatecode` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `SubnetCidrBlockStateCode::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 SubnetCidrBlockStateCode {
    #[allow(missing_docs)] // documentation missing in model
    Associated,
    #[allow(missing_docs)] // documentation missing in model
    Associating,
    #[allow(missing_docs)] // documentation missing in model
    Disassociated,
    #[allow(missing_docs)] // documentation missing in model
    Disassociating,
    #[allow(missing_docs)] // documentation missing in model
    Failed,
    #[allow(missing_docs)] // documentation missing in model
    Failing,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for SubnetCidrBlockStateCode {
    fn from(s: &str) -> Self {
        match s {
            "associated" => SubnetCidrBlockStateCode::Associated,
            "associating" => SubnetCidrBlockStateCode::Associating,
            "disassociated" => SubnetCidrBlockStateCode::Disassociated,
            "disassociating" => SubnetCidrBlockStateCode::Disassociating,
            "failed" => SubnetCidrBlockStateCode::Failed,
            "failing" => SubnetCidrBlockStateCode::Failing,
            other => SubnetCidrBlockStateCode::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for SubnetCidrBlockStateCode {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(SubnetCidrBlockStateCode::from(s))
    }
}
impl SubnetCidrBlockStateCode {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            SubnetCidrBlockStateCode::Associated => "associated",
            SubnetCidrBlockStateCode::Associating => "associating",
            SubnetCidrBlockStateCode::Disassociated => "disassociated",
            SubnetCidrBlockStateCode::Disassociating => "disassociating",
            SubnetCidrBlockStateCode::Failed => "failed",
            SubnetCidrBlockStateCode::Failing => "failing",
            SubnetCidrBlockStateCode::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &[
            "associated",
            "associating",
            "disassociated",
            "disassociating",
            "failed",
            "failing",
        ]
    }
}
impl AsRef<str> for SubnetCidrBlockStateCode {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>The targets to disassociate from the specified event window.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InstanceEventWindowDisassociationRequest {
    /// <p>The IDs of the instances to disassociate from the event window.</p>
    #[doc(hidden)]
    pub instance_ids: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>The instance tags to disassociate from the event window. Any instances associated with the tags will be disassociated from the event window.</p>
    #[doc(hidden)]
    pub instance_tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    /// <p>The IDs of the Dedicated Hosts to disassociate from the event window.</p>
    #[doc(hidden)]
    pub dedicated_host_ids: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl InstanceEventWindowDisassociationRequest {
    /// <p>The IDs of the instances to disassociate from the event window.</p>
    pub fn instance_ids(&self) -> std::option::Option<&[std::string::String]> {
        self.instance_ids.as_deref()
    }
    /// <p>The instance tags to disassociate from the event window. Any instances associated with the tags will be disassociated from the event window.</p>
    pub fn instance_tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.instance_tags.as_deref()
    }
    /// <p>The IDs of the Dedicated Hosts to disassociate from the event window.</p>
    pub fn dedicated_host_ids(&self) -> std::option::Option<&[std::string::String]> {
        self.dedicated_host_ids.as_deref()
    }
}
/// See [`InstanceEventWindowDisassociationRequest`](crate::model::InstanceEventWindowDisassociationRequest).
pub mod instance_event_window_disassociation_request {

    /// A builder for [`InstanceEventWindowDisassociationRequest`](crate::model::InstanceEventWindowDisassociationRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) instance_ids: std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) instance_tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        pub(crate) dedicated_host_ids: std::option::Option<std::vec::Vec<std::string::String>>,
    }
    impl Builder {
        /// Appends an item to `instance_ids`.
        ///
        /// To override the contents of this collection use [`set_instance_ids`](Self::set_instance_ids).
        ///
        /// <p>The IDs of the instances to disassociate from the event window.</p>
        pub fn instance_ids(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.instance_ids.unwrap_or_default();
            v.push(input.into());
            self.instance_ids = Some(v);
            self
        }
        /// <p>The IDs of the instances to disassociate from the event window.</p>
        pub fn set_instance_ids(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.instance_ids = input;
            self
        }
        /// Appends an item to `instance_tags`.
        ///
        /// To override the contents of this collection use [`set_instance_tags`](Self::set_instance_tags).
        ///
        /// <p>The instance tags to disassociate from the event window. Any instances associated with the tags will be disassociated from the event window.</p>
        pub fn instance_tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.instance_tags.unwrap_or_default();
            v.push(input);
            self.instance_tags = Some(v);
            self
        }
        /// <p>The instance tags to disassociate from the event window. Any instances associated with the tags will be disassociated from the event window.</p>
        pub fn set_instance_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.instance_tags = input;
            self
        }
        /// Appends an item to `dedicated_host_ids`.
        ///
        /// To override the contents of this collection use [`set_dedicated_host_ids`](Self::set_dedicated_host_ids).
        ///
        /// <p>The IDs of the Dedicated Hosts to disassociate from the event window.</p>
        pub fn dedicated_host_ids(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.dedicated_host_ids.unwrap_or_default();
            v.push(input.into());
            self.dedicated_host_ids = Some(v);
            self
        }
        /// <p>The IDs of the Dedicated Hosts to disassociate from the event window.</p>
        pub fn set_dedicated_host_ids(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.dedicated_host_ids = input;
            self
        }
        /// Consumes the builder and constructs a [`InstanceEventWindowDisassociationRequest`](crate::model::InstanceEventWindowDisassociationRequest).
        pub fn build(self) -> crate::model::InstanceEventWindowDisassociationRequest {
            crate::model::InstanceEventWindowDisassociationRequest {
                instance_ids: self.instance_ids,
                instance_tags: self.instance_tags,
                dedicated_host_ids: self.dedicated_host_ids,
            }
        }
    }
}
impl InstanceEventWindowDisassociationRequest {
    /// Creates a new builder-style object to manufacture [`InstanceEventWindowDisassociationRequest`](crate::model::InstanceEventWindowDisassociationRequest).
    pub fn builder() -> crate::model::instance_event_window_disassociation_request::Builder {
        crate::model::instance_event_window_disassociation_request::Builder::default()
    }
}

/// <p>Describes the state of a target network association.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AssociationStatus {
    /// <p>The state of the target network association.</p>
    #[doc(hidden)]
    pub code: std::option::Option<crate::model::AssociationStatusCode>,
    /// <p>A message about the status of the target network association, if applicable.</p>
    #[doc(hidden)]
    pub message: std::option::Option<std::string::String>,
}
impl AssociationStatus {
    /// <p>The state of the target network association.</p>
    pub fn code(&self) -> std::option::Option<&crate::model::AssociationStatusCode> {
        self.code.as_ref()
    }
    /// <p>A message about the status of the target network association, if applicable.</p>
    pub fn message(&self) -> std::option::Option<&str> {
        self.message.as_deref()
    }
}
/// See [`AssociationStatus`](crate::model::AssociationStatus).
pub mod association_status {

    /// A builder for [`AssociationStatus`](crate::model::AssociationStatus).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) code: std::option::Option<crate::model::AssociationStatusCode>,
        pub(crate) message: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The state of the target network association.</p>
        pub fn code(mut self, input: crate::model::AssociationStatusCode) -> Self {
            self.code = Some(input);
            self
        }
        /// <p>The state of the target network association.</p>
        pub fn set_code(
            mut self,
            input: std::option::Option<crate::model::AssociationStatusCode>,
        ) -> Self {
            self.code = input;
            self
        }
        /// <p>A message about the status of the target network association, if applicable.</p>
        pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
            self.message = Some(input.into());
            self
        }
        /// <p>A message about the status of the target network association, if applicable.</p>
        pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.message = input;
            self
        }
        /// Consumes the builder and constructs a [`AssociationStatus`](crate::model::AssociationStatus).
        pub fn build(self) -> crate::model::AssociationStatus {
            crate::model::AssociationStatus {
                code: self.code,
                message: self.message,
            }
        }
    }
}
impl AssociationStatus {
    /// Creates a new builder-style object to manufacture [`AssociationStatus`](crate::model::AssociationStatus).
    pub fn builder() -> crate::model::association_status::Builder {
        crate::model::association_status::Builder::default()
    }
}

/// When writing a match expression against `AssociationStatusCode`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let associationstatuscode = unimplemented!();
/// match associationstatuscode {
///     AssociationStatusCode::Associated => { /* ... */ },
///     AssociationStatusCode::Associating => { /* ... */ },
///     AssociationStatusCode::AssociationFailed => { /* ... */ },
///     AssociationStatusCode::Disassociated => { /* ... */ },
///     AssociationStatusCode::Disassociating => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `associationstatuscode` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `AssociationStatusCode::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `AssociationStatusCode::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `AssociationStatusCode::NewFeature` is defined.
/// Specifically, when `associationstatuscode` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `AssociationStatusCode::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 AssociationStatusCode {
    #[allow(missing_docs)] // documentation missing in model
    Associated,
    #[allow(missing_docs)] // documentation missing in model
    Associating,
    #[allow(missing_docs)] // documentation missing in model
    AssociationFailed,
    #[allow(missing_docs)] // documentation missing in model
    Disassociated,
    #[allow(missing_docs)] // documentation missing in model
    Disassociating,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for AssociationStatusCode {
    fn from(s: &str) -> Self {
        match s {
            "associated" => AssociationStatusCode::Associated,
            "associating" => AssociationStatusCode::Associating,
            "association-failed" => AssociationStatusCode::AssociationFailed,
            "disassociated" => AssociationStatusCode::Disassociated,
            "disassociating" => AssociationStatusCode::Disassociating,
            other => {
                AssociationStatusCode::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for AssociationStatusCode {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(AssociationStatusCode::from(s))
    }
}
impl AssociationStatusCode {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            AssociationStatusCode::Associated => "associated",
            AssociationStatusCode::Associating => "associating",
            AssociationStatusCode::AssociationFailed => "association-failed",
            AssociationStatusCode::Disassociated => "disassociated",
            AssociationStatusCode::Disassociating => "disassociating",
            AssociationStatusCode::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &[
            "associated",
            "associating",
            "association-failed",
            "disassociated",
            "disassociating",
        ]
    }
}
impl AsRef<str> for AssociationStatusCode {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Contains information about the errors that occurred when disabling fast snapshot restores.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DisableFastSnapshotRestoreErrorItem {
    /// <p>The ID of the snapshot.</p>
    #[doc(hidden)]
    pub snapshot_id: std::option::Option<std::string::String>,
    /// <p>The errors.</p>
    #[doc(hidden)]
    pub fast_snapshot_restore_state_errors:
        std::option::Option<std::vec::Vec<crate::model::DisableFastSnapshotRestoreStateErrorItem>>,
}
impl DisableFastSnapshotRestoreErrorItem {
    /// <p>The ID of the snapshot.</p>
    pub fn snapshot_id(&self) -> std::option::Option<&str> {
        self.snapshot_id.as_deref()
    }
    /// <p>The errors.</p>
    pub fn fast_snapshot_restore_state_errors(
        &self,
    ) -> std::option::Option<&[crate::model::DisableFastSnapshotRestoreStateErrorItem]> {
        self.fast_snapshot_restore_state_errors.as_deref()
    }
}
/// See [`DisableFastSnapshotRestoreErrorItem`](crate::model::DisableFastSnapshotRestoreErrorItem).
pub mod disable_fast_snapshot_restore_error_item {

    /// A builder for [`DisableFastSnapshotRestoreErrorItem`](crate::model::DisableFastSnapshotRestoreErrorItem).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) snapshot_id: std::option::Option<std::string::String>,
        pub(crate) fast_snapshot_restore_state_errors: std::option::Option<
            std::vec::Vec<crate::model::DisableFastSnapshotRestoreStateErrorItem>,
        >,
    }
    impl Builder {
        /// <p>The ID of the snapshot.</p>
        pub fn snapshot_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.snapshot_id = Some(input.into());
            self
        }
        /// <p>The ID of the snapshot.</p>
        pub fn set_snapshot_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.snapshot_id = input;
            self
        }
        /// Appends an item to `fast_snapshot_restore_state_errors`.
        ///
        /// To override the contents of this collection use [`set_fast_snapshot_restore_state_errors`](Self::set_fast_snapshot_restore_state_errors).
        ///
        /// <p>The errors.</p>
        pub fn fast_snapshot_restore_state_errors(
            mut self,
            input: crate::model::DisableFastSnapshotRestoreStateErrorItem,
        ) -> Self {
            let mut v = self.fast_snapshot_restore_state_errors.unwrap_or_default();
            v.push(input);
            self.fast_snapshot_restore_state_errors = Some(v);
            self
        }
        /// <p>The errors.</p>
        pub fn set_fast_snapshot_restore_state_errors(
            mut self,
            input: std::option::Option<
                std::vec::Vec<crate::model::DisableFastSnapshotRestoreStateErrorItem>,
            >,
        ) -> Self {
            self.fast_snapshot_restore_state_errors = input;
            self
        }
        /// Consumes the builder and constructs a [`DisableFastSnapshotRestoreErrorItem`](crate::model::DisableFastSnapshotRestoreErrorItem).
        pub fn build(self) -> crate::model::DisableFastSnapshotRestoreErrorItem {
            crate::model::DisableFastSnapshotRestoreErrorItem {
                snapshot_id: self.snapshot_id,
                fast_snapshot_restore_state_errors: self.fast_snapshot_restore_state_errors,
            }
        }
    }
}
impl DisableFastSnapshotRestoreErrorItem {
    /// Creates a new builder-style object to manufacture [`DisableFastSnapshotRestoreErrorItem`](crate::model::DisableFastSnapshotRestoreErrorItem).
    pub fn builder() -> crate::model::disable_fast_snapshot_restore_error_item::Builder {
        crate::model::disable_fast_snapshot_restore_error_item::Builder::default()
    }
}

/// <p>Contains information about an error that occurred when disabling fast snapshot restores.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DisableFastSnapshotRestoreStateErrorItem {
    /// <p>The Availability Zone.</p>
    #[doc(hidden)]
    pub availability_zone: std::option::Option<std::string::String>,
    /// <p>The error.</p>
    #[doc(hidden)]
    pub error: std::option::Option<crate::model::DisableFastSnapshotRestoreStateError>,
}
impl DisableFastSnapshotRestoreStateErrorItem {
    /// <p>The Availability Zone.</p>
    pub fn availability_zone(&self) -> std::option::Option<&str> {
        self.availability_zone.as_deref()
    }
    /// <p>The error.</p>
    pub fn error(
        &self,
    ) -> std::option::Option<&crate::model::DisableFastSnapshotRestoreStateError> {
        self.error.as_ref()
    }
}
/// See [`DisableFastSnapshotRestoreStateErrorItem`](crate::model::DisableFastSnapshotRestoreStateErrorItem).
pub mod disable_fast_snapshot_restore_state_error_item {

    /// A builder for [`DisableFastSnapshotRestoreStateErrorItem`](crate::model::DisableFastSnapshotRestoreStateErrorItem).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) availability_zone: std::option::Option<std::string::String>,
        pub(crate) error: std::option::Option<crate::model::DisableFastSnapshotRestoreStateError>,
    }
    impl Builder {
        /// <p>The Availability Zone.</p>
        pub fn availability_zone(mut self, input: impl Into<std::string::String>) -> Self {
            self.availability_zone = Some(input.into());
            self
        }
        /// <p>The Availability Zone.</p>
        pub fn set_availability_zone(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.availability_zone = input;
            self
        }
        /// <p>The error.</p>
        pub fn error(mut self, input: crate::model::DisableFastSnapshotRestoreStateError) -> Self {
            self.error = Some(input);
            self
        }
        /// <p>The error.</p>
        pub fn set_error(
            mut self,
            input: std::option::Option<crate::model::DisableFastSnapshotRestoreStateError>,
        ) -> Self {
            self.error = input;
            self
        }
        /// Consumes the builder and constructs a [`DisableFastSnapshotRestoreStateErrorItem`](crate::model::DisableFastSnapshotRestoreStateErrorItem).
        pub fn build(self) -> crate::model::DisableFastSnapshotRestoreStateErrorItem {
            crate::model::DisableFastSnapshotRestoreStateErrorItem {
                availability_zone: self.availability_zone,
                error: self.error,
            }
        }
    }
}
impl DisableFastSnapshotRestoreStateErrorItem {
    /// Creates a new builder-style object to manufacture [`DisableFastSnapshotRestoreStateErrorItem`](crate::model::DisableFastSnapshotRestoreStateErrorItem).
    pub fn builder() -> crate::model::disable_fast_snapshot_restore_state_error_item::Builder {
        crate::model::disable_fast_snapshot_restore_state_error_item::Builder::default()
    }
}

/// <p>Describes an error that occurred when disabling fast snapshot restores.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DisableFastSnapshotRestoreStateError {
    /// <p>The error code.</p>
    #[doc(hidden)]
    pub code: std::option::Option<std::string::String>,
    /// <p>The error message.</p>
    #[doc(hidden)]
    pub message: std::option::Option<std::string::String>,
}
impl DisableFastSnapshotRestoreStateError {
    /// <p>The error code.</p>
    pub fn code(&self) -> std::option::Option<&str> {
        self.code.as_deref()
    }
    /// <p>The error message.</p>
    pub fn message(&self) -> std::option::Option<&str> {
        self.message.as_deref()
    }
}
/// See [`DisableFastSnapshotRestoreStateError`](crate::model::DisableFastSnapshotRestoreStateError).
pub mod disable_fast_snapshot_restore_state_error {

    /// A builder for [`DisableFastSnapshotRestoreStateError`](crate::model::DisableFastSnapshotRestoreStateError).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) code: std::option::Option<std::string::String>,
        pub(crate) message: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The error code.</p>
        pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
            self.code = Some(input.into());
            self
        }
        /// <p>The error code.</p>
        pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.code = input;
            self
        }
        /// <p>The error message.</p>
        pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
            self.message = Some(input.into());
            self
        }
        /// <p>The error message.</p>
        pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.message = input;
            self
        }
        /// Consumes the builder and constructs a [`DisableFastSnapshotRestoreStateError`](crate::model::DisableFastSnapshotRestoreStateError).
        pub fn build(self) -> crate::model::DisableFastSnapshotRestoreStateError {
            crate::model::DisableFastSnapshotRestoreStateError {
                code: self.code,
                message: self.message,
            }
        }
    }
}
impl DisableFastSnapshotRestoreStateError {
    /// Creates a new builder-style object to manufacture [`DisableFastSnapshotRestoreStateError`](crate::model::DisableFastSnapshotRestoreStateError).
    pub fn builder() -> crate::model::disable_fast_snapshot_restore_state_error::Builder {
        crate::model::disable_fast_snapshot_restore_state_error::Builder::default()
    }
}

/// <p>Describes fast snapshot restores that were successfully disabled.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DisableFastSnapshotRestoreSuccessItem {
    /// <p>The ID of the snapshot.</p>
    #[doc(hidden)]
    pub snapshot_id: std::option::Option<std::string::String>,
    /// <p>The Availability Zone.</p>
    #[doc(hidden)]
    pub availability_zone: std::option::Option<std::string::String>,
    /// <p>The state of fast snapshot restores for the snapshot.</p>
    #[doc(hidden)]
    pub state: std::option::Option<crate::model::FastSnapshotRestoreStateCode>,
    /// <p>The reason for the state transition. The possible values are as follows:</p>
    /// <ul>
    /// <li> <p> <code>Client.UserInitiated</code> - The state successfully transitioned to <code>enabling</code> or <code>disabling</code>.</p> </li>
    /// <li> <p> <code>Client.UserInitiated - Lifecycle state transition</code> - The state successfully transitioned to <code>optimizing</code>, <code>enabled</code>, or <code>disabled</code>.</p> </li>
    /// </ul>
    #[doc(hidden)]
    pub state_transition_reason: std::option::Option<std::string::String>,
    /// <p>The ID of the Amazon Web Services account that enabled fast snapshot restores on the snapshot.</p>
    #[doc(hidden)]
    pub owner_id: std::option::Option<std::string::String>,
    /// <p>The Amazon Web Services owner alias that enabled fast snapshot restores on the snapshot. This is intended for future use.</p>
    #[doc(hidden)]
    pub owner_alias: std::option::Option<std::string::String>,
    /// <p>The time at which fast snapshot restores entered the <code>enabling</code> state.</p>
    #[doc(hidden)]
    pub enabling_time: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The time at which fast snapshot restores entered the <code>optimizing</code> state.</p>
    #[doc(hidden)]
    pub optimizing_time: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The time at which fast snapshot restores entered the <code>enabled</code> state.</p>
    #[doc(hidden)]
    pub enabled_time: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The time at which fast snapshot restores entered the <code>disabling</code> state.</p>
    #[doc(hidden)]
    pub disabling_time: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The time at which fast snapshot restores entered the <code>disabled</code> state.</p>
    #[doc(hidden)]
    pub disabled_time: std::option::Option<aws_smithy_types::DateTime>,
}
impl DisableFastSnapshotRestoreSuccessItem {
    /// <p>The ID of the snapshot.</p>
    pub fn snapshot_id(&self) -> std::option::Option<&str> {
        self.snapshot_id.as_deref()
    }
    /// <p>The Availability Zone.</p>
    pub fn availability_zone(&self) -> std::option::Option<&str> {
        self.availability_zone.as_deref()
    }
    /// <p>The state of fast snapshot restores for the snapshot.</p>
    pub fn state(&self) -> std::option::Option<&crate::model::FastSnapshotRestoreStateCode> {
        self.state.as_ref()
    }
    /// <p>The reason for the state transition. The possible values are as follows:</p>
    /// <ul>
    /// <li> <p> <code>Client.UserInitiated</code> - The state successfully transitioned to <code>enabling</code> or <code>disabling</code>.</p> </li>
    /// <li> <p> <code>Client.UserInitiated - Lifecycle state transition</code> - The state successfully transitioned to <code>optimizing</code>, <code>enabled</code>, or <code>disabled</code>.</p> </li>
    /// </ul>
    pub fn state_transition_reason(&self) -> std::option::Option<&str> {
        self.state_transition_reason.as_deref()
    }
    /// <p>The ID of the Amazon Web Services account that enabled fast snapshot restores on the snapshot.</p>
    pub fn owner_id(&self) -> std::option::Option<&str> {
        self.owner_id.as_deref()
    }
    /// <p>The Amazon Web Services owner alias that enabled fast snapshot restores on the snapshot. This is intended for future use.</p>
    pub fn owner_alias(&self) -> std::option::Option<&str> {
        self.owner_alias.as_deref()
    }
    /// <p>The time at which fast snapshot restores entered the <code>enabling</code> state.</p>
    pub fn enabling_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.enabling_time.as_ref()
    }
    /// <p>The time at which fast snapshot restores entered the <code>optimizing</code> state.</p>
    pub fn optimizing_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.optimizing_time.as_ref()
    }
    /// <p>The time at which fast snapshot restores entered the <code>enabled</code> state.</p>
    pub fn enabled_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.enabled_time.as_ref()
    }
    /// <p>The time at which fast snapshot restores entered the <code>disabling</code> state.</p>
    pub fn disabling_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.disabling_time.as_ref()
    }
    /// <p>The time at which fast snapshot restores entered the <code>disabled</code> state.</p>
    pub fn disabled_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.disabled_time.as_ref()
    }
}
/// See [`DisableFastSnapshotRestoreSuccessItem`](crate::model::DisableFastSnapshotRestoreSuccessItem).
pub mod disable_fast_snapshot_restore_success_item {

    /// A builder for [`DisableFastSnapshotRestoreSuccessItem`](crate::model::DisableFastSnapshotRestoreSuccessItem).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) snapshot_id: std::option::Option<std::string::String>,
        pub(crate) availability_zone: std::option::Option<std::string::String>,
        pub(crate) state: std::option::Option<crate::model::FastSnapshotRestoreStateCode>,
        pub(crate) state_transition_reason: std::option::Option<std::string::String>,
        pub(crate) owner_id: std::option::Option<std::string::String>,
        pub(crate) owner_alias: std::option::Option<std::string::String>,
        pub(crate) enabling_time: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) optimizing_time: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) enabled_time: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) disabling_time: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) disabled_time: std::option::Option<aws_smithy_types::DateTime>,
    }
    impl Builder {
        /// <p>The ID of the snapshot.</p>
        pub fn snapshot_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.snapshot_id = Some(input.into());
            self
        }
        /// <p>The ID of the snapshot.</p>
        pub fn set_snapshot_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.snapshot_id = input;
            self
        }
        /// <p>The Availability Zone.</p>
        pub fn availability_zone(mut self, input: impl Into<std::string::String>) -> Self {
            self.availability_zone = Some(input.into());
            self
        }
        /// <p>The Availability Zone.</p>
        pub fn set_availability_zone(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.availability_zone = input;
            self
        }
        /// <p>The state of fast snapshot restores for the snapshot.</p>
        pub fn state(mut self, input: crate::model::FastSnapshotRestoreStateCode) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>The state of fast snapshot restores for the snapshot.</p>
        pub fn set_state(
            mut self,
            input: std::option::Option<crate::model::FastSnapshotRestoreStateCode>,
        ) -> Self {
            self.state = input;
            self
        }
        /// <p>The reason for the state transition. The possible values are as follows:</p>
        /// <ul>
        /// <li> <p> <code>Client.UserInitiated</code> - The state successfully transitioned to <code>enabling</code> or <code>disabling</code>.</p> </li>
        /// <li> <p> <code>Client.UserInitiated - Lifecycle state transition</code> - The state successfully transitioned to <code>optimizing</code>, <code>enabled</code>, or <code>disabled</code>.</p> </li>
        /// </ul>
        pub fn state_transition_reason(mut self, input: impl Into<std::string::String>) -> Self {
            self.state_transition_reason = Some(input.into());
            self
        }
        /// <p>The reason for the state transition. The possible values are as follows:</p>
        /// <ul>
        /// <li> <p> <code>Client.UserInitiated</code> - The state successfully transitioned to <code>enabling</code> or <code>disabling</code>.</p> </li>
        /// <li> <p> <code>Client.UserInitiated - Lifecycle state transition</code> - The state successfully transitioned to <code>optimizing</code>, <code>enabled</code>, or <code>disabled</code>.</p> </li>
        /// </ul>
        pub fn set_state_transition_reason(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.state_transition_reason = input;
            self
        }
        /// <p>The ID of the Amazon Web Services account that enabled fast snapshot restores on the snapshot.</p>
        pub fn owner_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.owner_id = Some(input.into());
            self
        }
        /// <p>The ID of the Amazon Web Services account that enabled fast snapshot restores on the snapshot.</p>
        pub fn set_owner_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.owner_id = input;
            self
        }
        /// <p>The Amazon Web Services owner alias that enabled fast snapshot restores on the snapshot. This is intended for future use.</p>
        pub fn owner_alias(mut self, input: impl Into<std::string::String>) -> Self {
            self.owner_alias = Some(input.into());
            self
        }
        /// <p>The Amazon Web Services owner alias that enabled fast snapshot restores on the snapshot. This is intended for future use.</p>
        pub fn set_owner_alias(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.owner_alias = input;
            self
        }
        /// <p>The time at which fast snapshot restores entered the <code>enabling</code> state.</p>
        pub fn enabling_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.enabling_time = Some(input);
            self
        }
        /// <p>The time at which fast snapshot restores entered the <code>enabling</code> state.</p>
        pub fn set_enabling_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.enabling_time = input;
            self
        }
        /// <p>The time at which fast snapshot restores entered the <code>optimizing</code> state.</p>
        pub fn optimizing_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.optimizing_time = Some(input);
            self
        }
        /// <p>The time at which fast snapshot restores entered the <code>optimizing</code> state.</p>
        pub fn set_optimizing_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.optimizing_time = input;
            self
        }
        /// <p>The time at which fast snapshot restores entered the <code>enabled</code> state.</p>
        pub fn enabled_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.enabled_time = Some(input);
            self
        }
        /// <p>The time at which fast snapshot restores entered the <code>enabled</code> state.</p>
        pub fn set_enabled_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.enabled_time = input;
            self
        }
        /// <p>The time at which fast snapshot restores entered the <code>disabling</code> state.</p>
        pub fn disabling_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.disabling_time = Some(input);
            self
        }
        /// <p>The time at which fast snapshot restores entered the <code>disabling</code> state.</p>
        pub fn set_disabling_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.disabling_time = input;
            self
        }
        /// <p>The time at which fast snapshot restores entered the <code>disabled</code> state.</p>
        pub fn disabled_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.disabled_time = Some(input);
            self
        }
        /// <p>The time at which fast snapshot restores entered the <code>disabled</code> state.</p>
        pub fn set_disabled_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.disabled_time = input;
            self
        }
        /// Consumes the builder and constructs a [`DisableFastSnapshotRestoreSuccessItem`](crate::model::DisableFastSnapshotRestoreSuccessItem).
        pub fn build(self) -> crate::model::DisableFastSnapshotRestoreSuccessItem {
            crate::model::DisableFastSnapshotRestoreSuccessItem {
                snapshot_id: self.snapshot_id,
                availability_zone: self.availability_zone,
                state: self.state,
                state_transition_reason: self.state_transition_reason,
                owner_id: self.owner_id,
                owner_alias: self.owner_alias,
                enabling_time: self.enabling_time,
                optimizing_time: self.optimizing_time,
                enabled_time: self.enabled_time,
                disabling_time: self.disabling_time,
                disabled_time: self.disabled_time,
            }
        }
    }
}
impl DisableFastSnapshotRestoreSuccessItem {
    /// Creates a new builder-style object to manufacture [`DisableFastSnapshotRestoreSuccessItem`](crate::model::DisableFastSnapshotRestoreSuccessItem).
    pub fn builder() -> crate::model::disable_fast_snapshot_restore_success_item::Builder {
        crate::model::disable_fast_snapshot_restore_success_item::Builder::default()
    }
}

/// When writing a match expression against `VolumeAttachmentState`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let volumeattachmentstate = unimplemented!();
/// match volumeattachmentstate {
///     VolumeAttachmentState::Attached => { /* ... */ },
///     VolumeAttachmentState::Attaching => { /* ... */ },
///     VolumeAttachmentState::Busy => { /* ... */ },
///     VolumeAttachmentState::Detached => { /* ... */ },
///     VolumeAttachmentState::Detaching => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `volumeattachmentstate` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `VolumeAttachmentState::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `VolumeAttachmentState::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `VolumeAttachmentState::NewFeature` is defined.
/// Specifically, when `volumeattachmentstate` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `VolumeAttachmentState::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 VolumeAttachmentState {
    #[allow(missing_docs)] // documentation missing in model
    Attached,
    #[allow(missing_docs)] // documentation missing in model
    Attaching,
    #[allow(missing_docs)] // documentation missing in model
    Busy,
    #[allow(missing_docs)] // documentation missing in model
    Detached,
    #[allow(missing_docs)] // documentation missing in model
    Detaching,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for VolumeAttachmentState {
    fn from(s: &str) -> Self {
        match s {
            "attached" => VolumeAttachmentState::Attached,
            "attaching" => VolumeAttachmentState::Attaching,
            "busy" => VolumeAttachmentState::Busy,
            "detached" => VolumeAttachmentState::Detached,
            "detaching" => VolumeAttachmentState::Detaching,
            other => {
                VolumeAttachmentState::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for VolumeAttachmentState {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(VolumeAttachmentState::from(s))
    }
}
impl VolumeAttachmentState {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            VolumeAttachmentState::Attached => "attached",
            VolumeAttachmentState::Attaching => "attaching",
            VolumeAttachmentState::Busy => "busy",
            VolumeAttachmentState::Detached => "detached",
            VolumeAttachmentState::Detaching => "detaching",
            VolumeAttachmentState::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["attached", "attaching", "busy", "detached", "detaching"]
    }
}
impl AsRef<str> for VolumeAttachmentState {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes a virtual private gateway.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct VpnGateway {
    /// <p>The Availability Zone where the virtual private gateway was created, if applicable. This field may be empty or not returned.</p>
    #[doc(hidden)]
    pub availability_zone: std::option::Option<std::string::String>,
    /// <p>The current state of the virtual private gateway.</p>
    #[doc(hidden)]
    pub state: std::option::Option<crate::model::VpnState>,
    /// <p>The type of VPN connection the virtual private gateway supports.</p>
    #[doc(hidden)]
    pub r#type: std::option::Option<crate::model::GatewayType>,
    /// <p>Any VPCs attached to the virtual private gateway.</p>
    #[doc(hidden)]
    pub vpc_attachments: std::option::Option<std::vec::Vec<crate::model::VpcAttachment>>,
    /// <p>The ID of the virtual private gateway.</p>
    #[doc(hidden)]
    pub vpn_gateway_id: std::option::Option<std::string::String>,
    /// <p>The private Autonomous System Number (ASN) for the Amazon side of a BGP session.</p>
    #[doc(hidden)]
    pub amazon_side_asn: std::option::Option<i64>,
    /// <p>Any tags assigned to the virtual private gateway.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl VpnGateway {
    /// <p>The Availability Zone where the virtual private gateway was created, if applicable. This field may be empty or not returned.</p>
    pub fn availability_zone(&self) -> std::option::Option<&str> {
        self.availability_zone.as_deref()
    }
    /// <p>The current state of the virtual private gateway.</p>
    pub fn state(&self) -> std::option::Option<&crate::model::VpnState> {
        self.state.as_ref()
    }
    /// <p>The type of VPN connection the virtual private gateway supports.</p>
    pub fn r#type(&self) -> std::option::Option<&crate::model::GatewayType> {
        self.r#type.as_ref()
    }
    /// <p>Any VPCs attached to the virtual private gateway.</p>
    pub fn vpc_attachments(&self) -> std::option::Option<&[crate::model::VpcAttachment]> {
        self.vpc_attachments.as_deref()
    }
    /// <p>The ID of the virtual private gateway.</p>
    pub fn vpn_gateway_id(&self) -> std::option::Option<&str> {
        self.vpn_gateway_id.as_deref()
    }
    /// <p>The private Autonomous System Number (ASN) for the Amazon side of a BGP session.</p>
    pub fn amazon_side_asn(&self) -> std::option::Option<i64> {
        self.amazon_side_asn
    }
    /// <p>Any tags assigned to the virtual private gateway.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
}
/// See [`VpnGateway`](crate::model::VpnGateway).
pub mod vpn_gateway {

    /// A builder for [`VpnGateway`](crate::model::VpnGateway).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) availability_zone: std::option::Option<std::string::String>,
        pub(crate) state: std::option::Option<crate::model::VpnState>,
        pub(crate) r#type: std::option::Option<crate::model::GatewayType>,
        pub(crate) vpc_attachments: std::option::Option<std::vec::Vec<crate::model::VpcAttachment>>,
        pub(crate) vpn_gateway_id: std::option::Option<std::string::String>,
        pub(crate) amazon_side_asn: std::option::Option<i64>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    }
    impl Builder {
        /// <p>The Availability Zone where the virtual private gateway was created, if applicable. This field may be empty or not returned.</p>
        pub fn availability_zone(mut self, input: impl Into<std::string::String>) -> Self {
            self.availability_zone = Some(input.into());
            self
        }
        /// <p>The Availability Zone where the virtual private gateway was created, if applicable. This field may be empty or not returned.</p>
        pub fn set_availability_zone(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.availability_zone = input;
            self
        }
        /// <p>The current state of the virtual private gateway.</p>
        pub fn state(mut self, input: crate::model::VpnState) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>The current state of the virtual private gateway.</p>
        pub fn set_state(mut self, input: std::option::Option<crate::model::VpnState>) -> Self {
            self.state = input;
            self
        }
        /// <p>The type of VPN connection the virtual private gateway supports.</p>
        pub fn r#type(mut self, input: crate::model::GatewayType) -> Self {
            self.r#type = Some(input);
            self
        }
        /// <p>The type of VPN connection the virtual private gateway supports.</p>
        pub fn set_type(mut self, input: std::option::Option<crate::model::GatewayType>) -> Self {
            self.r#type = input;
            self
        }
        /// Appends an item to `vpc_attachments`.
        ///
        /// To override the contents of this collection use [`set_vpc_attachments`](Self::set_vpc_attachments).
        ///
        /// <p>Any VPCs attached to the virtual private gateway.</p>
        pub fn vpc_attachments(mut self, input: crate::model::VpcAttachment) -> Self {
            let mut v = self.vpc_attachments.unwrap_or_default();
            v.push(input);
            self.vpc_attachments = Some(v);
            self
        }
        /// <p>Any VPCs attached to the virtual private gateway.</p>
        pub fn set_vpc_attachments(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::VpcAttachment>>,
        ) -> Self {
            self.vpc_attachments = input;
            self
        }
        /// <p>The ID of the virtual private gateway.</p>
        pub fn vpn_gateway_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.vpn_gateway_id = Some(input.into());
            self
        }
        /// <p>The ID of the virtual private gateway.</p>
        pub fn set_vpn_gateway_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.vpn_gateway_id = input;
            self
        }
        /// <p>The private Autonomous System Number (ASN) for the Amazon side of a BGP session.</p>
        pub fn amazon_side_asn(mut self, input: i64) -> Self {
            self.amazon_side_asn = Some(input);
            self
        }
        /// <p>The private Autonomous System Number (ASN) for the Amazon side of a BGP session.</p>
        pub fn set_amazon_side_asn(mut self, input: std::option::Option<i64>) -> Self {
            self.amazon_side_asn = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>Any tags assigned to the virtual private gateway.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>Any tags assigned to the virtual private gateway.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// Consumes the builder and constructs a [`VpnGateway`](crate::model::VpnGateway).
        pub fn build(self) -> crate::model::VpnGateway {
            crate::model::VpnGateway {
                availability_zone: self.availability_zone,
                state: self.state,
                r#type: self.r#type,
                vpc_attachments: self.vpc_attachments,
                vpn_gateway_id: self.vpn_gateway_id,
                amazon_side_asn: self.amazon_side_asn,
                tags: self.tags,
            }
        }
    }
}
impl VpnGateway {
    /// Creates a new builder-style object to manufacture [`VpnGateway`](crate::model::VpnGateway).
    pub fn builder() -> crate::model::vpn_gateway::Builder {
        crate::model::vpn_gateway::Builder::default()
    }
}

/// <p>Describes an attachment between a virtual private gateway and a VPC.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct VpcAttachment {
    /// <p>The current state of the attachment.</p>
    #[doc(hidden)]
    pub state: std::option::Option<crate::model::AttachmentStatus>,
    /// <p>The ID of the VPC.</p>
    #[doc(hidden)]
    pub vpc_id: std::option::Option<std::string::String>,
}
impl VpcAttachment {
    /// <p>The current state of the attachment.</p>
    pub fn state(&self) -> std::option::Option<&crate::model::AttachmentStatus> {
        self.state.as_ref()
    }
    /// <p>The ID of the VPC.</p>
    pub fn vpc_id(&self) -> std::option::Option<&str> {
        self.vpc_id.as_deref()
    }
}
/// See [`VpcAttachment`](crate::model::VpcAttachment).
pub mod vpc_attachment {

    /// A builder for [`VpcAttachment`](crate::model::VpcAttachment).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) state: std::option::Option<crate::model::AttachmentStatus>,
        pub(crate) vpc_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The current state of the attachment.</p>
        pub fn state(mut self, input: crate::model::AttachmentStatus) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>The current state of the attachment.</p>
        pub fn set_state(
            mut self,
            input: std::option::Option<crate::model::AttachmentStatus>,
        ) -> Self {
            self.state = input;
            self
        }
        /// <p>The ID of the VPC.</p>
        pub fn vpc_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.vpc_id = Some(input.into());
            self
        }
        /// <p>The ID of the VPC.</p>
        pub fn set_vpc_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.vpc_id = input;
            self
        }
        /// Consumes the builder and constructs a [`VpcAttachment`](crate::model::VpcAttachment).
        pub fn build(self) -> crate::model::VpcAttachment {
            crate::model::VpcAttachment {
                state: self.state,
                vpc_id: self.vpc_id,
            }
        }
    }
}
impl VpcAttachment {
    /// Creates a new builder-style object to manufacture [`VpcAttachment`](crate::model::VpcAttachment).
    pub fn builder() -> crate::model::vpc_attachment::Builder {
        crate::model::vpc_attachment::Builder::default()
    }
}

/// <p>Describes a VPC.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Vpc {
    /// <p>The primary IPv4 CIDR block for the VPC.</p>
    #[doc(hidden)]
    pub cidr_block: std::option::Option<std::string::String>,
    /// <p>The ID of the set of DHCP options you've associated with the VPC.</p>
    #[doc(hidden)]
    pub dhcp_options_id: std::option::Option<std::string::String>,
    /// <p>The current state of the VPC.</p>
    #[doc(hidden)]
    pub state: std::option::Option<crate::model::VpcState>,
    /// <p>The ID of the VPC.</p>
    #[doc(hidden)]
    pub vpc_id: std::option::Option<std::string::String>,
    /// <p>The ID of the Amazon Web Services account that owns the VPC.</p>
    #[doc(hidden)]
    pub owner_id: std::option::Option<std::string::String>,
    /// <p>The allowed tenancy of instances launched into the VPC.</p>
    #[doc(hidden)]
    pub instance_tenancy: std::option::Option<crate::model::Tenancy>,
    /// <p>Information about the IPv6 CIDR blocks associated with the VPC.</p>
    #[doc(hidden)]
    pub ipv6_cidr_block_association_set:
        std::option::Option<std::vec::Vec<crate::model::VpcIpv6CidrBlockAssociation>>,
    /// <p>Information about the IPv4 CIDR blocks associated with the VPC.</p>
    #[doc(hidden)]
    pub cidr_block_association_set:
        std::option::Option<std::vec::Vec<crate::model::VpcCidrBlockAssociation>>,
    /// <p>Indicates whether the VPC is the default VPC.</p>
    #[doc(hidden)]
    pub is_default: std::option::Option<bool>,
    /// <p>Any tags assigned to the VPC.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl Vpc {
    /// <p>The primary IPv4 CIDR block for the VPC.</p>
    pub fn cidr_block(&self) -> std::option::Option<&str> {
        self.cidr_block.as_deref()
    }
    /// <p>The ID of the set of DHCP options you've associated with the VPC.</p>
    pub fn dhcp_options_id(&self) -> std::option::Option<&str> {
        self.dhcp_options_id.as_deref()
    }
    /// <p>The current state of the VPC.</p>
    pub fn state(&self) -> std::option::Option<&crate::model::VpcState> {
        self.state.as_ref()
    }
    /// <p>The ID of the VPC.</p>
    pub fn vpc_id(&self) -> std::option::Option<&str> {
        self.vpc_id.as_deref()
    }
    /// <p>The ID of the Amazon Web Services account that owns the VPC.</p>
    pub fn owner_id(&self) -> std::option::Option<&str> {
        self.owner_id.as_deref()
    }
    /// <p>The allowed tenancy of instances launched into the VPC.</p>
    pub fn instance_tenancy(&self) -> std::option::Option<&crate::model::Tenancy> {
        self.instance_tenancy.as_ref()
    }
    /// <p>Information about the IPv6 CIDR blocks associated with the VPC.</p>
    pub fn ipv6_cidr_block_association_set(
        &self,
    ) -> std::option::Option<&[crate::model::VpcIpv6CidrBlockAssociation]> {
        self.ipv6_cidr_block_association_set.as_deref()
    }
    /// <p>Information about the IPv4 CIDR blocks associated with the VPC.</p>
    pub fn cidr_block_association_set(
        &self,
    ) -> std::option::Option<&[crate::model::VpcCidrBlockAssociation]> {
        self.cidr_block_association_set.as_deref()
    }
    /// <p>Indicates whether the VPC is the default VPC.</p>
    pub fn is_default(&self) -> std::option::Option<bool> {
        self.is_default
    }
    /// <p>Any tags assigned to the VPC.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
}
/// See [`Vpc`](crate::model::Vpc).
pub mod vpc {

    /// A builder for [`Vpc`](crate::model::Vpc).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) cidr_block: std::option::Option<std::string::String>,
        pub(crate) dhcp_options_id: std::option::Option<std::string::String>,
        pub(crate) state: std::option::Option<crate::model::VpcState>,
        pub(crate) vpc_id: std::option::Option<std::string::String>,
        pub(crate) owner_id: std::option::Option<std::string::String>,
        pub(crate) instance_tenancy: std::option::Option<crate::model::Tenancy>,
        pub(crate) ipv6_cidr_block_association_set:
            std::option::Option<std::vec::Vec<crate::model::VpcIpv6CidrBlockAssociation>>,
        pub(crate) cidr_block_association_set:
            std::option::Option<std::vec::Vec<crate::model::VpcCidrBlockAssociation>>,
        pub(crate) is_default: std::option::Option<bool>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    }
    impl Builder {
        /// <p>The primary IPv4 CIDR block for the VPC.</p>
        pub fn cidr_block(mut self, input: impl Into<std::string::String>) -> Self {
            self.cidr_block = Some(input.into());
            self
        }
        /// <p>The primary IPv4 CIDR block for the VPC.</p>
        pub fn set_cidr_block(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.cidr_block = input;
            self
        }
        /// <p>The ID of the set of DHCP options you've associated with the VPC.</p>
        pub fn dhcp_options_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.dhcp_options_id = Some(input.into());
            self
        }
        /// <p>The ID of the set of DHCP options you've associated with the VPC.</p>
        pub fn set_dhcp_options_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.dhcp_options_id = input;
            self
        }
        /// <p>The current state of the VPC.</p>
        pub fn state(mut self, input: crate::model::VpcState) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>The current state of the VPC.</p>
        pub fn set_state(mut self, input: std::option::Option<crate::model::VpcState>) -> Self {
            self.state = input;
            self
        }
        /// <p>The ID of the VPC.</p>
        pub fn vpc_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.vpc_id = Some(input.into());
            self
        }
        /// <p>The ID of the VPC.</p>
        pub fn set_vpc_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.vpc_id = input;
            self
        }
        /// <p>The ID of the Amazon Web Services account that owns the VPC.</p>
        pub fn owner_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.owner_id = Some(input.into());
            self
        }
        /// <p>The ID of the Amazon Web Services account that owns the VPC.</p>
        pub fn set_owner_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.owner_id = input;
            self
        }
        /// <p>The allowed tenancy of instances launched into the VPC.</p>
        pub fn instance_tenancy(mut self, input: crate::model::Tenancy) -> Self {
            self.instance_tenancy = Some(input);
            self
        }
        /// <p>The allowed tenancy of instances launched into the VPC.</p>
        pub fn set_instance_tenancy(
            mut self,
            input: std::option::Option<crate::model::Tenancy>,
        ) -> Self {
            self.instance_tenancy = input;
            self
        }
        /// Appends an item to `ipv6_cidr_block_association_set`.
        ///
        /// To override the contents of this collection use [`set_ipv6_cidr_block_association_set`](Self::set_ipv6_cidr_block_association_set).
        ///
        /// <p>Information about the IPv6 CIDR blocks associated with the VPC.</p>
        pub fn ipv6_cidr_block_association_set(
            mut self,
            input: crate::model::VpcIpv6CidrBlockAssociation,
        ) -> Self {
            let mut v = self.ipv6_cidr_block_association_set.unwrap_or_default();
            v.push(input);
            self.ipv6_cidr_block_association_set = Some(v);
            self
        }
        /// <p>Information about the IPv6 CIDR blocks associated with the VPC.</p>
        pub fn set_ipv6_cidr_block_association_set(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::VpcIpv6CidrBlockAssociation>>,
        ) -> Self {
            self.ipv6_cidr_block_association_set = input;
            self
        }
        /// Appends an item to `cidr_block_association_set`.
        ///
        /// To override the contents of this collection use [`set_cidr_block_association_set`](Self::set_cidr_block_association_set).
        ///
        /// <p>Information about the IPv4 CIDR blocks associated with the VPC.</p>
        pub fn cidr_block_association_set(
            mut self,
            input: crate::model::VpcCidrBlockAssociation,
        ) -> Self {
            let mut v = self.cidr_block_association_set.unwrap_or_default();
            v.push(input);
            self.cidr_block_association_set = Some(v);
            self
        }
        /// <p>Information about the IPv4 CIDR blocks associated with the VPC.</p>
        pub fn set_cidr_block_association_set(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::VpcCidrBlockAssociation>>,
        ) -> Self {
            self.cidr_block_association_set = input;
            self
        }
        /// <p>Indicates whether the VPC is the default VPC.</p>
        pub fn is_default(mut self, input: bool) -> Self {
            self.is_default = Some(input);
            self
        }
        /// <p>Indicates whether the VPC is the default VPC.</p>
        pub fn set_is_default(mut self, input: std::option::Option<bool>) -> Self {
            self.is_default = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>Any tags assigned to the VPC.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>Any tags assigned to the VPC.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// Consumes the builder and constructs a [`Vpc`](crate::model::Vpc).
        pub fn build(self) -> crate::model::Vpc {
            crate::model::Vpc {
                cidr_block: self.cidr_block,
                dhcp_options_id: self.dhcp_options_id,
                state: self.state,
                vpc_id: self.vpc_id,
                owner_id: self.owner_id,
                instance_tenancy: self.instance_tenancy,
                ipv6_cidr_block_association_set: self.ipv6_cidr_block_association_set,
                cidr_block_association_set: self.cidr_block_association_set,
                is_default: self.is_default,
                tags: self.tags,
            }
        }
    }
}
impl Vpc {
    /// Creates a new builder-style object to manufacture [`Vpc`](crate::model::Vpc).
    pub fn builder() -> crate::model::vpc::Builder {
        crate::model::vpc::Builder::default()
    }
}

/// When writing a match expression against `VpcState`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let vpcstate = unimplemented!();
/// match vpcstate {
///     VpcState::Available => { /* ... */ },
///     VpcState::Pending => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `vpcstate` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `VpcState::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `VpcState::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `VpcState::NewFeature` is defined.
/// Specifically, when `vpcstate` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `VpcState::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 VpcState {
    #[allow(missing_docs)] // documentation missing in model
    Available,
    #[allow(missing_docs)] // documentation missing in model
    Pending,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for VpcState {
    fn from(s: &str) -> Self {
        match s {
            "available" => VpcState::Available,
            "pending" => VpcState::Pending,
            other => VpcState::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for VpcState {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(VpcState::from(s))
    }
}
impl VpcState {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            VpcState::Available => "available",
            VpcState::Pending => "pending",
            VpcState::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["available", "pending"]
    }
}
impl AsRef<str> for VpcState {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes a VPC peering connection.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct VpcPeeringConnection {
    /// <p>Information about the accepter VPC. CIDR block information is only returned when describing an active VPC peering connection.</p>
    #[doc(hidden)]
    pub accepter_vpc_info: std::option::Option<crate::model::VpcPeeringConnectionVpcInfo>,
    /// <p>The time that an unaccepted VPC peering connection will expire.</p>
    #[doc(hidden)]
    pub expiration_time: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>Information about the requester VPC. CIDR block information is only returned when describing an active VPC peering connection.</p>
    #[doc(hidden)]
    pub requester_vpc_info: std::option::Option<crate::model::VpcPeeringConnectionVpcInfo>,
    /// <p>The status of the VPC peering connection.</p>
    #[doc(hidden)]
    pub status: std::option::Option<crate::model::VpcPeeringConnectionStateReason>,
    /// <p>Any tags assigned to the resource.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    /// <p>The ID of the VPC peering connection.</p>
    #[doc(hidden)]
    pub vpc_peering_connection_id: std::option::Option<std::string::String>,
}
impl VpcPeeringConnection {
    /// <p>Information about the accepter VPC. CIDR block information is only returned when describing an active VPC peering connection.</p>
    pub fn accepter_vpc_info(
        &self,
    ) -> std::option::Option<&crate::model::VpcPeeringConnectionVpcInfo> {
        self.accepter_vpc_info.as_ref()
    }
    /// <p>The time that an unaccepted VPC peering connection will expire.</p>
    pub fn expiration_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.expiration_time.as_ref()
    }
    /// <p>Information about the requester VPC. CIDR block information is only returned when describing an active VPC peering connection.</p>
    pub fn requester_vpc_info(
        &self,
    ) -> std::option::Option<&crate::model::VpcPeeringConnectionVpcInfo> {
        self.requester_vpc_info.as_ref()
    }
    /// <p>The status of the VPC peering connection.</p>
    pub fn status(&self) -> std::option::Option<&crate::model::VpcPeeringConnectionStateReason> {
        self.status.as_ref()
    }
    /// <p>Any tags assigned to the resource.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
    /// <p>The ID of the VPC peering connection.</p>
    pub fn vpc_peering_connection_id(&self) -> std::option::Option<&str> {
        self.vpc_peering_connection_id.as_deref()
    }
}
/// See [`VpcPeeringConnection`](crate::model::VpcPeeringConnection).
pub mod vpc_peering_connection {

    /// A builder for [`VpcPeeringConnection`](crate::model::VpcPeeringConnection).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) accepter_vpc_info:
            std::option::Option<crate::model::VpcPeeringConnectionVpcInfo>,
        pub(crate) expiration_time: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) requester_vpc_info:
            std::option::Option<crate::model::VpcPeeringConnectionVpcInfo>,
        pub(crate) status: std::option::Option<crate::model::VpcPeeringConnectionStateReason>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        pub(crate) vpc_peering_connection_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>Information about the accepter VPC. CIDR block information is only returned when describing an active VPC peering connection.</p>
        pub fn accepter_vpc_info(
            mut self,
            input: crate::model::VpcPeeringConnectionVpcInfo,
        ) -> Self {
            self.accepter_vpc_info = Some(input);
            self
        }
        /// <p>Information about the accepter VPC. CIDR block information is only returned when describing an active VPC peering connection.</p>
        pub fn set_accepter_vpc_info(
            mut self,
            input: std::option::Option<crate::model::VpcPeeringConnectionVpcInfo>,
        ) -> Self {
            self.accepter_vpc_info = input;
            self
        }
        /// <p>The time that an unaccepted VPC peering connection will expire.</p>
        pub fn expiration_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.expiration_time = Some(input);
            self
        }
        /// <p>The time that an unaccepted VPC peering connection will expire.</p>
        pub fn set_expiration_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.expiration_time = input;
            self
        }
        /// <p>Information about the requester VPC. CIDR block information is only returned when describing an active VPC peering connection.</p>
        pub fn requester_vpc_info(
            mut self,
            input: crate::model::VpcPeeringConnectionVpcInfo,
        ) -> Self {
            self.requester_vpc_info = Some(input);
            self
        }
        /// <p>Information about the requester VPC. CIDR block information is only returned when describing an active VPC peering connection.</p>
        pub fn set_requester_vpc_info(
            mut self,
            input: std::option::Option<crate::model::VpcPeeringConnectionVpcInfo>,
        ) -> Self {
            self.requester_vpc_info = input;
            self
        }
        /// <p>The status of the VPC peering connection.</p>
        pub fn status(mut self, input: crate::model::VpcPeeringConnectionStateReason) -> Self {
            self.status = Some(input);
            self
        }
        /// <p>The status of the VPC peering connection.</p>
        pub fn set_status(
            mut self,
            input: std::option::Option<crate::model::VpcPeeringConnectionStateReason>,
        ) -> Self {
            self.status = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>Any tags assigned to the resource.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>Any tags assigned to the resource.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// <p>The ID of the VPC peering connection.</p>
        pub fn vpc_peering_connection_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.vpc_peering_connection_id = Some(input.into());
            self
        }
        /// <p>The ID of the VPC peering connection.</p>
        pub fn set_vpc_peering_connection_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.vpc_peering_connection_id = input;
            self
        }
        /// Consumes the builder and constructs a [`VpcPeeringConnection`](crate::model::VpcPeeringConnection).
        pub fn build(self) -> crate::model::VpcPeeringConnection {
            crate::model::VpcPeeringConnection {
                accepter_vpc_info: self.accepter_vpc_info,
                expiration_time: self.expiration_time,
                requester_vpc_info: self.requester_vpc_info,
                status: self.status,
                tags: self.tags,
                vpc_peering_connection_id: self.vpc_peering_connection_id,
            }
        }
    }
}
impl VpcPeeringConnection {
    /// Creates a new builder-style object to manufacture [`VpcPeeringConnection`](crate::model::VpcPeeringConnection).
    pub fn builder() -> crate::model::vpc_peering_connection::Builder {
        crate::model::vpc_peering_connection::Builder::default()
    }
}

/// <p>Describes the status of a VPC peering connection.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct VpcPeeringConnectionStateReason {
    /// <p>The status of the VPC peering connection.</p>
    #[doc(hidden)]
    pub code: std::option::Option<crate::model::VpcPeeringConnectionStateReasonCode>,
    /// <p>A message that provides more information about the status, if applicable.</p>
    #[doc(hidden)]
    pub message: std::option::Option<std::string::String>,
}
impl VpcPeeringConnectionStateReason {
    /// <p>The status of the VPC peering connection.</p>
    pub fn code(&self) -> std::option::Option<&crate::model::VpcPeeringConnectionStateReasonCode> {
        self.code.as_ref()
    }
    /// <p>A message that provides more information about the status, if applicable.</p>
    pub fn message(&self) -> std::option::Option<&str> {
        self.message.as_deref()
    }
}
/// See [`VpcPeeringConnectionStateReason`](crate::model::VpcPeeringConnectionStateReason).
pub mod vpc_peering_connection_state_reason {

    /// A builder for [`VpcPeeringConnectionStateReason`](crate::model::VpcPeeringConnectionStateReason).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) code: std::option::Option<crate::model::VpcPeeringConnectionStateReasonCode>,
        pub(crate) message: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The status of the VPC peering connection.</p>
        pub fn code(mut self, input: crate::model::VpcPeeringConnectionStateReasonCode) -> Self {
            self.code = Some(input);
            self
        }
        /// <p>The status of the VPC peering connection.</p>
        pub fn set_code(
            mut self,
            input: std::option::Option<crate::model::VpcPeeringConnectionStateReasonCode>,
        ) -> Self {
            self.code = input;
            self
        }
        /// <p>A message that provides more information about the status, if applicable.</p>
        pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
            self.message = Some(input.into());
            self
        }
        /// <p>A message that provides more information about the status, if applicable.</p>
        pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.message = input;
            self
        }
        /// Consumes the builder and constructs a [`VpcPeeringConnectionStateReason`](crate::model::VpcPeeringConnectionStateReason).
        pub fn build(self) -> crate::model::VpcPeeringConnectionStateReason {
            crate::model::VpcPeeringConnectionStateReason {
                code: self.code,
                message: self.message,
            }
        }
    }
}
impl VpcPeeringConnectionStateReason {
    /// Creates a new builder-style object to manufacture [`VpcPeeringConnectionStateReason`](crate::model::VpcPeeringConnectionStateReason).
    pub fn builder() -> crate::model::vpc_peering_connection_state_reason::Builder {
        crate::model::vpc_peering_connection_state_reason::Builder::default()
    }
}

/// When writing a match expression against `VpcPeeringConnectionStateReasonCode`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let vpcpeeringconnectionstatereasoncode = unimplemented!();
/// match vpcpeeringconnectionstatereasoncode {
///     VpcPeeringConnectionStateReasonCode::Active => { /* ... */ },
///     VpcPeeringConnectionStateReasonCode::Deleted => { /* ... */ },
///     VpcPeeringConnectionStateReasonCode::Deleting => { /* ... */ },
///     VpcPeeringConnectionStateReasonCode::Expired => { /* ... */ },
///     VpcPeeringConnectionStateReasonCode::Failed => { /* ... */ },
///     VpcPeeringConnectionStateReasonCode::InitiatingRequest => { /* ... */ },
///     VpcPeeringConnectionStateReasonCode::PendingAcceptance => { /* ... */ },
///     VpcPeeringConnectionStateReasonCode::Provisioning => { /* ... */ },
///     VpcPeeringConnectionStateReasonCode::Rejected => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `vpcpeeringconnectionstatereasoncode` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `VpcPeeringConnectionStateReasonCode::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `VpcPeeringConnectionStateReasonCode::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `VpcPeeringConnectionStateReasonCode::NewFeature` is defined.
/// Specifically, when `vpcpeeringconnectionstatereasoncode` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `VpcPeeringConnectionStateReasonCode::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 VpcPeeringConnectionStateReasonCode {
    #[allow(missing_docs)] // documentation missing in model
    Active,
    #[allow(missing_docs)] // documentation missing in model
    Deleted,
    #[allow(missing_docs)] // documentation missing in model
    Deleting,
    #[allow(missing_docs)] // documentation missing in model
    Expired,
    #[allow(missing_docs)] // documentation missing in model
    Failed,
    #[allow(missing_docs)] // documentation missing in model
    InitiatingRequest,
    #[allow(missing_docs)] // documentation missing in model
    PendingAcceptance,
    #[allow(missing_docs)] // documentation missing in model
    Provisioning,
    #[allow(missing_docs)] // documentation missing in model
    Rejected,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for VpcPeeringConnectionStateReasonCode {
    fn from(s: &str) -> Self {
        match s {
            "active" => VpcPeeringConnectionStateReasonCode::Active,
            "deleted" => VpcPeeringConnectionStateReasonCode::Deleted,
            "deleting" => VpcPeeringConnectionStateReasonCode::Deleting,
            "expired" => VpcPeeringConnectionStateReasonCode::Expired,
            "failed" => VpcPeeringConnectionStateReasonCode::Failed,
            "initiating-request" => VpcPeeringConnectionStateReasonCode::InitiatingRequest,
            "pending-acceptance" => VpcPeeringConnectionStateReasonCode::PendingAcceptance,
            "provisioning" => VpcPeeringConnectionStateReasonCode::Provisioning,
            "rejected" => VpcPeeringConnectionStateReasonCode::Rejected,
            other => VpcPeeringConnectionStateReasonCode::Unknown(
                crate::types::UnknownVariantValue(other.to_owned()),
            ),
        }
    }
}
impl std::str::FromStr for VpcPeeringConnectionStateReasonCode {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(VpcPeeringConnectionStateReasonCode::from(s))
    }
}
impl VpcPeeringConnectionStateReasonCode {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            VpcPeeringConnectionStateReasonCode::Active => "active",
            VpcPeeringConnectionStateReasonCode::Deleted => "deleted",
            VpcPeeringConnectionStateReasonCode::Deleting => "deleting",
            VpcPeeringConnectionStateReasonCode::Expired => "expired",
            VpcPeeringConnectionStateReasonCode::Failed => "failed",
            VpcPeeringConnectionStateReasonCode::InitiatingRequest => "initiating-request",
            VpcPeeringConnectionStateReasonCode::PendingAcceptance => "pending-acceptance",
            VpcPeeringConnectionStateReasonCode::Provisioning => "provisioning",
            VpcPeeringConnectionStateReasonCode::Rejected => "rejected",
            VpcPeeringConnectionStateReasonCode::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &[
            "active",
            "deleted",
            "deleting",
            "expired",
            "failed",
            "initiating-request",
            "pending-acceptance",
            "provisioning",
            "rejected",
        ]
    }
}
impl AsRef<str> for VpcPeeringConnectionStateReasonCode {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes a VPC in a VPC peering connection.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct VpcPeeringConnectionVpcInfo {
    /// <p>The IPv4 CIDR block for the VPC.</p>
    #[doc(hidden)]
    pub cidr_block: std::option::Option<std::string::String>,
    /// <p>The IPv6 CIDR block for the VPC.</p>
    #[doc(hidden)]
    pub ipv6_cidr_block_set: std::option::Option<std::vec::Vec<crate::model::Ipv6CidrBlock>>,
    /// <p>Information about the IPv4 CIDR blocks for the VPC.</p>
    #[doc(hidden)]
    pub cidr_block_set: std::option::Option<std::vec::Vec<crate::model::CidrBlock>>,
    /// <p>The ID of the Amazon Web Services account that owns the VPC.</p>
    #[doc(hidden)]
    pub owner_id: std::option::Option<std::string::String>,
    /// <p>Information about the VPC peering connection options for the accepter or requester VPC.</p>
    #[doc(hidden)]
    pub peering_options: std::option::Option<crate::model::VpcPeeringConnectionOptionsDescription>,
    /// <p>The ID of the VPC.</p>
    #[doc(hidden)]
    pub vpc_id: std::option::Option<std::string::String>,
    /// <p>The Region in which the VPC is located.</p>
    #[doc(hidden)]
    pub region: std::option::Option<std::string::String>,
}
impl VpcPeeringConnectionVpcInfo {
    /// <p>The IPv4 CIDR block for the VPC.</p>
    pub fn cidr_block(&self) -> std::option::Option<&str> {
        self.cidr_block.as_deref()
    }
    /// <p>The IPv6 CIDR block for the VPC.</p>
    pub fn ipv6_cidr_block_set(&self) -> std::option::Option<&[crate::model::Ipv6CidrBlock]> {
        self.ipv6_cidr_block_set.as_deref()
    }
    /// <p>Information about the IPv4 CIDR blocks for the VPC.</p>
    pub fn cidr_block_set(&self) -> std::option::Option<&[crate::model::CidrBlock]> {
        self.cidr_block_set.as_deref()
    }
    /// <p>The ID of the Amazon Web Services account that owns the VPC.</p>
    pub fn owner_id(&self) -> std::option::Option<&str> {
        self.owner_id.as_deref()
    }
    /// <p>Information about the VPC peering connection options for the accepter or requester VPC.</p>
    pub fn peering_options(
        &self,
    ) -> std::option::Option<&crate::model::VpcPeeringConnectionOptionsDescription> {
        self.peering_options.as_ref()
    }
    /// <p>The ID of the VPC.</p>
    pub fn vpc_id(&self) -> std::option::Option<&str> {
        self.vpc_id.as_deref()
    }
    /// <p>The Region in which the VPC is located.</p>
    pub fn region(&self) -> std::option::Option<&str> {
        self.region.as_deref()
    }
}
/// See [`VpcPeeringConnectionVpcInfo`](crate::model::VpcPeeringConnectionVpcInfo).
pub mod vpc_peering_connection_vpc_info {

    /// A builder for [`VpcPeeringConnectionVpcInfo`](crate::model::VpcPeeringConnectionVpcInfo).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) cidr_block: std::option::Option<std::string::String>,
        pub(crate) ipv6_cidr_block_set:
            std::option::Option<std::vec::Vec<crate::model::Ipv6CidrBlock>>,
        pub(crate) cidr_block_set: std::option::Option<std::vec::Vec<crate::model::CidrBlock>>,
        pub(crate) owner_id: std::option::Option<std::string::String>,
        pub(crate) peering_options:
            std::option::Option<crate::model::VpcPeeringConnectionOptionsDescription>,
        pub(crate) vpc_id: std::option::Option<std::string::String>,
        pub(crate) region: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The IPv4 CIDR block for the VPC.</p>
        pub fn cidr_block(mut self, input: impl Into<std::string::String>) -> Self {
            self.cidr_block = Some(input.into());
            self
        }
        /// <p>The IPv4 CIDR block for the VPC.</p>
        pub fn set_cidr_block(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.cidr_block = input;
            self
        }
        /// Appends an item to `ipv6_cidr_block_set`.
        ///
        /// To override the contents of this collection use [`set_ipv6_cidr_block_set`](Self::set_ipv6_cidr_block_set).
        ///
        /// <p>The IPv6 CIDR block for the VPC.</p>
        pub fn ipv6_cidr_block_set(mut self, input: crate::model::Ipv6CidrBlock) -> Self {
            let mut v = self.ipv6_cidr_block_set.unwrap_or_default();
            v.push(input);
            self.ipv6_cidr_block_set = Some(v);
            self
        }
        /// <p>The IPv6 CIDR block for the VPC.</p>
        pub fn set_ipv6_cidr_block_set(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Ipv6CidrBlock>>,
        ) -> Self {
            self.ipv6_cidr_block_set = input;
            self
        }
        /// Appends an item to `cidr_block_set`.
        ///
        /// To override the contents of this collection use [`set_cidr_block_set`](Self::set_cidr_block_set).
        ///
        /// <p>Information about the IPv4 CIDR blocks for the VPC.</p>
        pub fn cidr_block_set(mut self, input: crate::model::CidrBlock) -> Self {
            let mut v = self.cidr_block_set.unwrap_or_default();
            v.push(input);
            self.cidr_block_set = Some(v);
            self
        }
        /// <p>Information about the IPv4 CIDR blocks for the VPC.</p>
        pub fn set_cidr_block_set(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::CidrBlock>>,
        ) -> Self {
            self.cidr_block_set = input;
            self
        }
        /// <p>The ID of the Amazon Web Services account that owns the VPC.</p>
        pub fn owner_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.owner_id = Some(input.into());
            self
        }
        /// <p>The ID of the Amazon Web Services account that owns the VPC.</p>
        pub fn set_owner_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.owner_id = input;
            self
        }
        /// <p>Information about the VPC peering connection options for the accepter or requester VPC.</p>
        pub fn peering_options(
            mut self,
            input: crate::model::VpcPeeringConnectionOptionsDescription,
        ) -> Self {
            self.peering_options = Some(input);
            self
        }
        /// <p>Information about the VPC peering connection options for the accepter or requester VPC.</p>
        pub fn set_peering_options(
            mut self,
            input: std::option::Option<crate::model::VpcPeeringConnectionOptionsDescription>,
        ) -> Self {
            self.peering_options = input;
            self
        }
        /// <p>The ID of the VPC.</p>
        pub fn vpc_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.vpc_id = Some(input.into());
            self
        }
        /// <p>The ID of the VPC.</p>
        pub fn set_vpc_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.vpc_id = input;
            self
        }
        /// <p>The Region in which the VPC is located.</p>
        pub fn region(mut self, input: impl Into<std::string::String>) -> Self {
            self.region = Some(input.into());
            self
        }
        /// <p>The Region in which the VPC is located.</p>
        pub fn set_region(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.region = input;
            self
        }
        /// Consumes the builder and constructs a [`VpcPeeringConnectionVpcInfo`](crate::model::VpcPeeringConnectionVpcInfo).
        pub fn build(self) -> crate::model::VpcPeeringConnectionVpcInfo {
            crate::model::VpcPeeringConnectionVpcInfo {
                cidr_block: self.cidr_block,
                ipv6_cidr_block_set: self.ipv6_cidr_block_set,
                cidr_block_set: self.cidr_block_set,
                owner_id: self.owner_id,
                peering_options: self.peering_options,
                vpc_id: self.vpc_id,
                region: self.region,
            }
        }
    }
}
impl VpcPeeringConnectionVpcInfo {
    /// Creates a new builder-style object to manufacture [`VpcPeeringConnectionVpcInfo`](crate::model::VpcPeeringConnectionVpcInfo).
    pub fn builder() -> crate::model::vpc_peering_connection_vpc_info::Builder {
        crate::model::vpc_peering_connection_vpc_info::Builder::default()
    }
}

/// <note>
/// <p>We are retiring EC2-Classic. We recommend that you migrate from EC2-Classic to a VPC. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html">Migrate from EC2-Classic to a VPC</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
/// </note>
/// <p>Describes the VPC peering connection options.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct VpcPeeringConnectionOptionsDescription {
    /// <p>Indicates whether a local VPC can resolve public DNS hostnames to private IP addresses when queried from instances in a peer VPC.</p>
    #[doc(hidden)]
    pub allow_dns_resolution_from_remote_vpc: std::option::Option<bool>,
    /// <p>Indicates whether a local ClassicLink connection can communicate with the peer VPC over the VPC peering connection.</p>
    #[doc(hidden)]
    pub allow_egress_from_local_classic_link_to_remote_vpc: std::option::Option<bool>,
    /// <p>Indicates whether a local VPC can communicate with a ClassicLink connection in the peer VPC over the VPC peering connection.</p>
    #[doc(hidden)]
    pub allow_egress_from_local_vpc_to_remote_classic_link: std::option::Option<bool>,
}
impl VpcPeeringConnectionOptionsDescription {
    /// <p>Indicates whether a local VPC can resolve public DNS hostnames to private IP addresses when queried from instances in a peer VPC.</p>
    pub fn allow_dns_resolution_from_remote_vpc(&self) -> std::option::Option<bool> {
        self.allow_dns_resolution_from_remote_vpc
    }
    /// <p>Indicates whether a local ClassicLink connection can communicate with the peer VPC over the VPC peering connection.</p>
    pub fn allow_egress_from_local_classic_link_to_remote_vpc(&self) -> std::option::Option<bool> {
        self.allow_egress_from_local_classic_link_to_remote_vpc
    }
    /// <p>Indicates whether a local VPC can communicate with a ClassicLink connection in the peer VPC over the VPC peering connection.</p>
    pub fn allow_egress_from_local_vpc_to_remote_classic_link(&self) -> std::option::Option<bool> {
        self.allow_egress_from_local_vpc_to_remote_classic_link
    }
}
/// See [`VpcPeeringConnectionOptionsDescription`](crate::model::VpcPeeringConnectionOptionsDescription).
pub mod vpc_peering_connection_options_description {

    /// A builder for [`VpcPeeringConnectionOptionsDescription`](crate::model::VpcPeeringConnectionOptionsDescription).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) allow_dns_resolution_from_remote_vpc: std::option::Option<bool>,
        pub(crate) allow_egress_from_local_classic_link_to_remote_vpc: std::option::Option<bool>,
        pub(crate) allow_egress_from_local_vpc_to_remote_classic_link: std::option::Option<bool>,
    }
    impl Builder {
        /// <p>Indicates whether a local VPC can resolve public DNS hostnames to private IP addresses when queried from instances in a peer VPC.</p>
        pub fn allow_dns_resolution_from_remote_vpc(mut self, input: bool) -> Self {
            self.allow_dns_resolution_from_remote_vpc = Some(input);
            self
        }
        /// <p>Indicates whether a local VPC can resolve public DNS hostnames to private IP addresses when queried from instances in a peer VPC.</p>
        pub fn set_allow_dns_resolution_from_remote_vpc(
            mut self,
            input: std::option::Option<bool>,
        ) -> Self {
            self.allow_dns_resolution_from_remote_vpc = input;
            self
        }
        /// <p>Indicates whether a local ClassicLink connection can communicate with the peer VPC over the VPC peering connection.</p>
        pub fn allow_egress_from_local_classic_link_to_remote_vpc(mut self, input: bool) -> Self {
            self.allow_egress_from_local_classic_link_to_remote_vpc = Some(input);
            self
        }
        /// <p>Indicates whether a local ClassicLink connection can communicate with the peer VPC over the VPC peering connection.</p>
        pub fn set_allow_egress_from_local_classic_link_to_remote_vpc(
            mut self,
            input: std::option::Option<bool>,
        ) -> Self {
            self.allow_egress_from_local_classic_link_to_remote_vpc = input;
            self
        }
        /// <p>Indicates whether a local VPC can communicate with a ClassicLink connection in the peer VPC over the VPC peering connection.</p>
        pub fn allow_egress_from_local_vpc_to_remote_classic_link(mut self, input: bool) -> Self {
            self.allow_egress_from_local_vpc_to_remote_classic_link = Some(input);
            self
        }
        /// <p>Indicates whether a local VPC can communicate with a ClassicLink connection in the peer VPC over the VPC peering connection.</p>
        pub fn set_allow_egress_from_local_vpc_to_remote_classic_link(
            mut self,
            input: std::option::Option<bool>,
        ) -> Self {
            self.allow_egress_from_local_vpc_to_remote_classic_link = input;
            self
        }
        /// Consumes the builder and constructs a [`VpcPeeringConnectionOptionsDescription`](crate::model::VpcPeeringConnectionOptionsDescription).
        pub fn build(self) -> crate::model::VpcPeeringConnectionOptionsDescription {
            crate::model::VpcPeeringConnectionOptionsDescription {
                allow_dns_resolution_from_remote_vpc: self.allow_dns_resolution_from_remote_vpc,
                allow_egress_from_local_classic_link_to_remote_vpc: self
                    .allow_egress_from_local_classic_link_to_remote_vpc,
                allow_egress_from_local_vpc_to_remote_classic_link: self
                    .allow_egress_from_local_vpc_to_remote_classic_link,
            }
        }
    }
}
impl VpcPeeringConnectionOptionsDescription {
    /// Creates a new builder-style object to manufacture [`VpcPeeringConnectionOptionsDescription`](crate::model::VpcPeeringConnectionOptionsDescription).
    pub fn builder() -> crate::model::vpc_peering_connection_options_description::Builder {
        crate::model::vpc_peering_connection_options_description::Builder::default()
    }
}

/// <p>Describes an IPv4 CIDR block.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CidrBlock {
    /// <p>The IPv4 CIDR block.</p>
    #[doc(hidden)]
    pub cidr_block: std::option::Option<std::string::String>,
}
impl CidrBlock {
    /// <p>The IPv4 CIDR block.</p>
    pub fn cidr_block(&self) -> std::option::Option<&str> {
        self.cidr_block.as_deref()
    }
}
/// See [`CidrBlock`](crate::model::CidrBlock).
pub mod cidr_block {

    /// A builder for [`CidrBlock`](crate::model::CidrBlock).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) cidr_block: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The IPv4 CIDR block.</p>
        pub fn cidr_block(mut self, input: impl Into<std::string::String>) -> Self {
            self.cidr_block = Some(input.into());
            self
        }
        /// <p>The IPv4 CIDR block.</p>
        pub fn set_cidr_block(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.cidr_block = input;
            self
        }
        /// Consumes the builder and constructs a [`CidrBlock`](crate::model::CidrBlock).
        pub fn build(self) -> crate::model::CidrBlock {
            crate::model::CidrBlock {
                cidr_block: self.cidr_block,
            }
        }
    }
}
impl CidrBlock {
    /// Creates a new builder-style object to manufacture [`CidrBlock`](crate::model::CidrBlock).
    pub fn builder() -> crate::model::cidr_block::Builder {
        crate::model::cidr_block::Builder::default()
    }
}

/// <p>Describes an IPv6 CIDR block.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Ipv6CidrBlock {
    /// <p>The IPv6 CIDR block.</p>
    #[doc(hidden)]
    pub ipv6_cidr_block: std::option::Option<std::string::String>,
}
impl Ipv6CidrBlock {
    /// <p>The IPv6 CIDR block.</p>
    pub fn ipv6_cidr_block(&self) -> std::option::Option<&str> {
        self.ipv6_cidr_block.as_deref()
    }
}
/// See [`Ipv6CidrBlock`](crate::model::Ipv6CidrBlock).
pub mod ipv6_cidr_block {

    /// A builder for [`Ipv6CidrBlock`](crate::model::Ipv6CidrBlock).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) ipv6_cidr_block: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The IPv6 CIDR block.</p>
        pub fn ipv6_cidr_block(mut self, input: impl Into<std::string::String>) -> Self {
            self.ipv6_cidr_block = Some(input.into());
            self
        }
        /// <p>The IPv6 CIDR block.</p>
        pub fn set_ipv6_cidr_block(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.ipv6_cidr_block = input;
            self
        }
        /// Consumes the builder and constructs a [`Ipv6CidrBlock`](crate::model::Ipv6CidrBlock).
        pub fn build(self) -> crate::model::Ipv6CidrBlock {
            crate::model::Ipv6CidrBlock {
                ipv6_cidr_block: self.ipv6_cidr_block,
            }
        }
    }
}
impl Ipv6CidrBlock {
    /// Creates a new builder-style object to manufacture [`Ipv6CidrBlock`](crate::model::Ipv6CidrBlock).
    pub fn builder() -> crate::model::ipv6_cidr_block::Builder {
        crate::model::ipv6_cidr_block::Builder::default()
    }
}

/// <p>Describes a VPC endpoint service.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ServiceDetail {
    /// <p>The name of the service.</p>
    #[doc(hidden)]
    pub service_name: std::option::Option<std::string::String>,
    /// <p>The ID of the endpoint service.</p>
    #[doc(hidden)]
    pub service_id: std::option::Option<std::string::String>,
    /// <p>The type of service.</p>
    #[doc(hidden)]
    pub service_type: std::option::Option<std::vec::Vec<crate::model::ServiceTypeDetail>>,
    /// <p>The Availability Zones in which the service is available.</p>
    #[doc(hidden)]
    pub availability_zones: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>The Amazon Web Services account ID of the service owner.</p>
    #[doc(hidden)]
    pub owner: std::option::Option<std::string::String>,
    /// <p>The DNS names for the service.</p>
    #[doc(hidden)]
    pub base_endpoint_dns_names: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>The private DNS name for the service.</p>
    #[doc(hidden)]
    pub private_dns_name: std::option::Option<std::string::String>,
    /// <p>The private DNS names assigned to the VPC endpoint service.</p>
    #[doc(hidden)]
    pub private_dns_names: std::option::Option<std::vec::Vec<crate::model::PrivateDnsDetails>>,
    /// <p>Indicates whether the service supports endpoint policies.</p>
    #[doc(hidden)]
    pub vpc_endpoint_policy_supported: std::option::Option<bool>,
    /// <p>Indicates whether VPC endpoint connection requests to the service must be accepted by the service owner.</p>
    #[doc(hidden)]
    pub acceptance_required: std::option::Option<bool>,
    /// <p>Indicates whether the service manages its VPC endpoints. Management of the service VPC endpoints using the VPC endpoint API is restricted.</p>
    #[doc(hidden)]
    pub manages_vpc_endpoints: std::option::Option<bool>,
    /// <p>The payer responsibility.</p>
    #[doc(hidden)]
    pub payer_responsibility: std::option::Option<crate::model::PayerResponsibility>,
    /// <p>The tags assigned to the service.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    /// <p>The verification state of the VPC endpoint service.</p>
    /// <p>Consumers of the endpoint service cannot use the private name when the state is not <code>verified</code>.</p>
    #[doc(hidden)]
    pub private_dns_name_verification_state: std::option::Option<crate::model::DnsNameState>,
    /// <p>The supported IP address types.</p>
    #[doc(hidden)]
    pub supported_ip_address_types:
        std::option::Option<std::vec::Vec<crate::model::ServiceConnectivityType>>,
}
impl ServiceDetail {
    /// <p>The name of the service.</p>
    pub fn service_name(&self) -> std::option::Option<&str> {
        self.service_name.as_deref()
    }
    /// <p>The ID of the endpoint service.</p>
    pub fn service_id(&self) -> std::option::Option<&str> {
        self.service_id.as_deref()
    }
    /// <p>The type of service.</p>
    pub fn service_type(&self) -> std::option::Option<&[crate::model::ServiceTypeDetail]> {
        self.service_type.as_deref()
    }
    /// <p>The Availability Zones in which the service is available.</p>
    pub fn availability_zones(&self) -> std::option::Option<&[std::string::String]> {
        self.availability_zones.as_deref()
    }
    /// <p>The Amazon Web Services account ID of the service owner.</p>
    pub fn owner(&self) -> std::option::Option<&str> {
        self.owner.as_deref()
    }
    /// <p>The DNS names for the service.</p>
    pub fn base_endpoint_dns_names(&self) -> std::option::Option<&[std::string::String]> {
        self.base_endpoint_dns_names.as_deref()
    }
    /// <p>The private DNS name for the service.</p>
    pub fn private_dns_name(&self) -> std::option::Option<&str> {
        self.private_dns_name.as_deref()
    }
    /// <p>The private DNS names assigned to the VPC endpoint service.</p>
    pub fn private_dns_names(&self) -> std::option::Option<&[crate::model::PrivateDnsDetails]> {
        self.private_dns_names.as_deref()
    }
    /// <p>Indicates whether the service supports endpoint policies.</p>
    pub fn vpc_endpoint_policy_supported(&self) -> std::option::Option<bool> {
        self.vpc_endpoint_policy_supported
    }
    /// <p>Indicates whether VPC endpoint connection requests to the service must be accepted by the service owner.</p>
    pub fn acceptance_required(&self) -> std::option::Option<bool> {
        self.acceptance_required
    }
    /// <p>Indicates whether the service manages its VPC endpoints. Management of the service VPC endpoints using the VPC endpoint API is restricted.</p>
    pub fn manages_vpc_endpoints(&self) -> std::option::Option<bool> {
        self.manages_vpc_endpoints
    }
    /// <p>The payer responsibility.</p>
    pub fn payer_responsibility(&self) -> std::option::Option<&crate::model::PayerResponsibility> {
        self.payer_responsibility.as_ref()
    }
    /// <p>The tags assigned to the service.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
    /// <p>The verification state of the VPC endpoint service.</p>
    /// <p>Consumers of the endpoint service cannot use the private name when the state is not <code>verified</code>.</p>
    pub fn private_dns_name_verification_state(
        &self,
    ) -> std::option::Option<&crate::model::DnsNameState> {
        self.private_dns_name_verification_state.as_ref()
    }
    /// <p>The supported IP address types.</p>
    pub fn supported_ip_address_types(
        &self,
    ) -> std::option::Option<&[crate::model::ServiceConnectivityType]> {
        self.supported_ip_address_types.as_deref()
    }
}
/// See [`ServiceDetail`](crate::model::ServiceDetail).
pub mod service_detail {

    /// A builder for [`ServiceDetail`](crate::model::ServiceDetail).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) service_name: std::option::Option<std::string::String>,
        pub(crate) service_id: std::option::Option<std::string::String>,
        pub(crate) service_type:
            std::option::Option<std::vec::Vec<crate::model::ServiceTypeDetail>>,
        pub(crate) availability_zones: std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) owner: std::option::Option<std::string::String>,
        pub(crate) base_endpoint_dns_names: std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) private_dns_name: std::option::Option<std::string::String>,
        pub(crate) private_dns_names:
            std::option::Option<std::vec::Vec<crate::model::PrivateDnsDetails>>,
        pub(crate) vpc_endpoint_policy_supported: std::option::Option<bool>,
        pub(crate) acceptance_required: std::option::Option<bool>,
        pub(crate) manages_vpc_endpoints: std::option::Option<bool>,
        pub(crate) payer_responsibility: std::option::Option<crate::model::PayerResponsibility>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        pub(crate) private_dns_name_verification_state:
            std::option::Option<crate::model::DnsNameState>,
        pub(crate) supported_ip_address_types:
            std::option::Option<std::vec::Vec<crate::model::ServiceConnectivityType>>,
    }
    impl Builder {
        /// <p>The name of the service.</p>
        pub fn service_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.service_name = Some(input.into());
            self
        }
        /// <p>The name of the service.</p>
        pub fn set_service_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.service_name = input;
            self
        }
        /// <p>The ID of the endpoint service.</p>
        pub fn service_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.service_id = Some(input.into());
            self
        }
        /// <p>The ID of the endpoint service.</p>
        pub fn set_service_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.service_id = input;
            self
        }
        /// Appends an item to `service_type`.
        ///
        /// To override the contents of this collection use [`set_service_type`](Self::set_service_type).
        ///
        /// <p>The type of service.</p>
        pub fn service_type(mut self, input: crate::model::ServiceTypeDetail) -> Self {
            let mut v = self.service_type.unwrap_or_default();
            v.push(input);
            self.service_type = Some(v);
            self
        }
        /// <p>The type of service.</p>
        pub fn set_service_type(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::ServiceTypeDetail>>,
        ) -> Self {
            self.service_type = input;
            self
        }
        /// Appends an item to `availability_zones`.
        ///
        /// To override the contents of this collection use [`set_availability_zones`](Self::set_availability_zones).
        ///
        /// <p>The Availability Zones in which the service is available.</p>
        pub fn availability_zones(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.availability_zones.unwrap_or_default();
            v.push(input.into());
            self.availability_zones = Some(v);
            self
        }
        /// <p>The Availability Zones in which the service is available.</p>
        pub fn set_availability_zones(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.availability_zones = input;
            self
        }
        /// <p>The Amazon Web Services account ID of the service owner.</p>
        pub fn owner(mut self, input: impl Into<std::string::String>) -> Self {
            self.owner = Some(input.into());
            self
        }
        /// <p>The Amazon Web Services account ID of the service owner.</p>
        pub fn set_owner(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.owner = input;
            self
        }
        /// Appends an item to `base_endpoint_dns_names`.
        ///
        /// To override the contents of this collection use [`set_base_endpoint_dns_names`](Self::set_base_endpoint_dns_names).
        ///
        /// <p>The DNS names for the service.</p>
        pub fn base_endpoint_dns_names(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.base_endpoint_dns_names.unwrap_or_default();
            v.push(input.into());
            self.base_endpoint_dns_names = Some(v);
            self
        }
        /// <p>The DNS names for the service.</p>
        pub fn set_base_endpoint_dns_names(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.base_endpoint_dns_names = input;
            self
        }
        /// <p>The private DNS name for the service.</p>
        pub fn private_dns_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.private_dns_name = Some(input.into());
            self
        }
        /// <p>The private DNS name for the service.</p>
        pub fn set_private_dns_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.private_dns_name = input;
            self
        }
        /// Appends an item to `private_dns_names`.
        ///
        /// To override the contents of this collection use [`set_private_dns_names`](Self::set_private_dns_names).
        ///
        /// <p>The private DNS names assigned to the VPC endpoint service.</p>
        pub fn private_dns_names(mut self, input: crate::model::PrivateDnsDetails) -> Self {
            let mut v = self.private_dns_names.unwrap_or_default();
            v.push(input);
            self.private_dns_names = Some(v);
            self
        }
        /// <p>The private DNS names assigned to the VPC endpoint service.</p>
        pub fn set_private_dns_names(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::PrivateDnsDetails>>,
        ) -> Self {
            self.private_dns_names = input;
            self
        }
        /// <p>Indicates whether the service supports endpoint policies.</p>
        pub fn vpc_endpoint_policy_supported(mut self, input: bool) -> Self {
            self.vpc_endpoint_policy_supported = Some(input);
            self
        }
        /// <p>Indicates whether the service supports endpoint policies.</p>
        pub fn set_vpc_endpoint_policy_supported(
            mut self,
            input: std::option::Option<bool>,
        ) -> Self {
            self.vpc_endpoint_policy_supported = input;
            self
        }
        /// <p>Indicates whether VPC endpoint connection requests to the service must be accepted by the service owner.</p>
        pub fn acceptance_required(mut self, input: bool) -> Self {
            self.acceptance_required = Some(input);
            self
        }
        /// <p>Indicates whether VPC endpoint connection requests to the service must be accepted by the service owner.</p>
        pub fn set_acceptance_required(mut self, input: std::option::Option<bool>) -> Self {
            self.acceptance_required = input;
            self
        }
        /// <p>Indicates whether the service manages its VPC endpoints. Management of the service VPC endpoints using the VPC endpoint API is restricted.</p>
        pub fn manages_vpc_endpoints(mut self, input: bool) -> Self {
            self.manages_vpc_endpoints = Some(input);
            self
        }
        /// <p>Indicates whether the service manages its VPC endpoints. Management of the service VPC endpoints using the VPC endpoint API is restricted.</p>
        pub fn set_manages_vpc_endpoints(mut self, input: std::option::Option<bool>) -> Self {
            self.manages_vpc_endpoints = input;
            self
        }
        /// <p>The payer responsibility.</p>
        pub fn payer_responsibility(mut self, input: crate::model::PayerResponsibility) -> Self {
            self.payer_responsibility = Some(input);
            self
        }
        /// <p>The payer responsibility.</p>
        pub fn set_payer_responsibility(
            mut self,
            input: std::option::Option<crate::model::PayerResponsibility>,
        ) -> Self {
            self.payer_responsibility = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>The tags assigned to the service.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>The tags assigned to the service.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// <p>The verification state of the VPC endpoint service.</p>
        /// <p>Consumers of the endpoint service cannot use the private name when the state is not <code>verified</code>.</p>
        pub fn private_dns_name_verification_state(
            mut self,
            input: crate::model::DnsNameState,
        ) -> Self {
            self.private_dns_name_verification_state = Some(input);
            self
        }
        /// <p>The verification state of the VPC endpoint service.</p>
        /// <p>Consumers of the endpoint service cannot use the private name when the state is not <code>verified</code>.</p>
        pub fn set_private_dns_name_verification_state(
            mut self,
            input: std::option::Option<crate::model::DnsNameState>,
        ) -> Self {
            self.private_dns_name_verification_state = input;
            self
        }
        /// Appends an item to `supported_ip_address_types`.
        ///
        /// To override the contents of this collection use [`set_supported_ip_address_types`](Self::set_supported_ip_address_types).
        ///
        /// <p>The supported IP address types.</p>
        pub fn supported_ip_address_types(
            mut self,
            input: crate::model::ServiceConnectivityType,
        ) -> Self {
            let mut v = self.supported_ip_address_types.unwrap_or_default();
            v.push(input);
            self.supported_ip_address_types = Some(v);
            self
        }
        /// <p>The supported IP address types.</p>
        pub fn set_supported_ip_address_types(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::ServiceConnectivityType>>,
        ) -> Self {
            self.supported_ip_address_types = input;
            self
        }
        /// Consumes the builder and constructs a [`ServiceDetail`](crate::model::ServiceDetail).
        pub fn build(self) -> crate::model::ServiceDetail {
            crate::model::ServiceDetail {
                service_name: self.service_name,
                service_id: self.service_id,
                service_type: self.service_type,
                availability_zones: self.availability_zones,
                owner: self.owner,
                base_endpoint_dns_names: self.base_endpoint_dns_names,
                private_dns_name: self.private_dns_name,
                private_dns_names: self.private_dns_names,
                vpc_endpoint_policy_supported: self.vpc_endpoint_policy_supported,
                acceptance_required: self.acceptance_required,
                manages_vpc_endpoints: self.manages_vpc_endpoints,
                payer_responsibility: self.payer_responsibility,
                tags: self.tags,
                private_dns_name_verification_state: self.private_dns_name_verification_state,
                supported_ip_address_types: self.supported_ip_address_types,
            }
        }
    }
}
impl ServiceDetail {
    /// Creates a new builder-style object to manufacture [`ServiceDetail`](crate::model::ServiceDetail).
    pub fn builder() -> crate::model::service_detail::Builder {
        crate::model::service_detail::Builder::default()
    }
}

/// When writing a match expression against `ServiceConnectivityType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let serviceconnectivitytype = unimplemented!();
/// match serviceconnectivitytype {
///     ServiceConnectivityType::Ipv4 => { /* ... */ },
///     ServiceConnectivityType::Ipv6 => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `serviceconnectivitytype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `ServiceConnectivityType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `ServiceConnectivityType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `ServiceConnectivityType::NewFeature` is defined.
/// Specifically, when `serviceconnectivitytype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `ServiceConnectivityType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 ServiceConnectivityType {
    #[allow(missing_docs)] // documentation missing in model
    Ipv4,
    #[allow(missing_docs)] // documentation missing in model
    Ipv6,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for ServiceConnectivityType {
    fn from(s: &str) -> Self {
        match s {
            "ipv4" => ServiceConnectivityType::Ipv4,
            "ipv6" => ServiceConnectivityType::Ipv6,
            other => ServiceConnectivityType::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for ServiceConnectivityType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(ServiceConnectivityType::from(s))
    }
}
impl ServiceConnectivityType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            ServiceConnectivityType::Ipv4 => "ipv4",
            ServiceConnectivityType::Ipv6 => "ipv6",
            ServiceConnectivityType::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["ipv4", "ipv6"]
    }
}
impl AsRef<str> for ServiceConnectivityType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `DnsNameState`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let dnsnamestate = unimplemented!();
/// match dnsnamestate {
///     DnsNameState::Failed => { /* ... */ },
///     DnsNameState::PendingVerification => { /* ... */ },
///     DnsNameState::Verified => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `dnsnamestate` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `DnsNameState::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `DnsNameState::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `DnsNameState::NewFeature` is defined.
/// Specifically, when `dnsnamestate` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `DnsNameState::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 DnsNameState {
    #[allow(missing_docs)] // documentation missing in model
    Failed,
    #[allow(missing_docs)] // documentation missing in model
    PendingVerification,
    #[allow(missing_docs)] // documentation missing in model
    Verified,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for DnsNameState {
    fn from(s: &str) -> Self {
        match s {
            "failed" => DnsNameState::Failed,
            "pendingVerification" => DnsNameState::PendingVerification,
            "verified" => DnsNameState::Verified,
            other => DnsNameState::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for DnsNameState {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(DnsNameState::from(s))
    }
}
impl DnsNameState {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            DnsNameState::Failed => "failed",
            DnsNameState::PendingVerification => "pendingVerification",
            DnsNameState::Verified => "verified",
            DnsNameState::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["failed", "pendingVerification", "verified"]
    }
}
impl AsRef<str> for DnsNameState {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Information about the Private DNS name for interface endpoints.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct PrivateDnsDetails {
    /// <p>The private DNS name assigned to the VPC endpoint service.</p>
    #[doc(hidden)]
    pub private_dns_name: std::option::Option<std::string::String>,
}
impl PrivateDnsDetails {
    /// <p>The private DNS name assigned to the VPC endpoint service.</p>
    pub fn private_dns_name(&self) -> std::option::Option<&str> {
        self.private_dns_name.as_deref()
    }
}
/// See [`PrivateDnsDetails`](crate::model::PrivateDnsDetails).
pub mod private_dns_details {

    /// A builder for [`PrivateDnsDetails`](crate::model::PrivateDnsDetails).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) private_dns_name: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The private DNS name assigned to the VPC endpoint service.</p>
        pub fn private_dns_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.private_dns_name = Some(input.into());
            self
        }
        /// <p>The private DNS name assigned to the VPC endpoint service.</p>
        pub fn set_private_dns_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.private_dns_name = input;
            self
        }
        /// Consumes the builder and constructs a [`PrivateDnsDetails`](crate::model::PrivateDnsDetails).
        pub fn build(self) -> crate::model::PrivateDnsDetails {
            crate::model::PrivateDnsDetails {
                private_dns_name: self.private_dns_name,
            }
        }
    }
}
impl PrivateDnsDetails {
    /// Creates a new builder-style object to manufacture [`PrivateDnsDetails`](crate::model::PrivateDnsDetails).
    pub fn builder() -> crate::model::private_dns_details::Builder {
        crate::model::private_dns_details::Builder::default()
    }
}

/// <p>Describes the type of service for a VPC endpoint.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ServiceTypeDetail {
    /// <p>The type of service.</p>
    #[doc(hidden)]
    pub service_type: std::option::Option<crate::model::ServiceType>,
}
impl ServiceTypeDetail {
    /// <p>The type of service.</p>
    pub fn service_type(&self) -> std::option::Option<&crate::model::ServiceType> {
        self.service_type.as_ref()
    }
}
/// See [`ServiceTypeDetail`](crate::model::ServiceTypeDetail).
pub mod service_type_detail {

    /// A builder for [`ServiceTypeDetail`](crate::model::ServiceTypeDetail).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) service_type: std::option::Option<crate::model::ServiceType>,
    }
    impl Builder {
        /// <p>The type of service.</p>
        pub fn service_type(mut self, input: crate::model::ServiceType) -> Self {
            self.service_type = Some(input);
            self
        }
        /// <p>The type of service.</p>
        pub fn set_service_type(
            mut self,
            input: std::option::Option<crate::model::ServiceType>,
        ) -> Self {
            self.service_type = input;
            self
        }
        /// Consumes the builder and constructs a [`ServiceTypeDetail`](crate::model::ServiceTypeDetail).
        pub fn build(self) -> crate::model::ServiceTypeDetail {
            crate::model::ServiceTypeDetail {
                service_type: self.service_type,
            }
        }
    }
}
impl ServiceTypeDetail {
    /// Creates a new builder-style object to manufacture [`ServiceTypeDetail`](crate::model::ServiceTypeDetail).
    pub fn builder() -> crate::model::service_type_detail::Builder {
        crate::model::service_type_detail::Builder::default()
    }
}

/// When writing a match expression against `ServiceType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let servicetype = unimplemented!();
/// match servicetype {
///     ServiceType::Gateway => { /* ... */ },
///     ServiceType::GatewayLoadBalancer => { /* ... */ },
///     ServiceType::Interface => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `servicetype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `ServiceType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `ServiceType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `ServiceType::NewFeature` is defined.
/// Specifically, when `servicetype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `ServiceType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 ServiceType {
    #[allow(missing_docs)] // documentation missing in model
    Gateway,
    #[allow(missing_docs)] // documentation missing in model
    GatewayLoadBalancer,
    #[allow(missing_docs)] // documentation missing in model
    Interface,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for ServiceType {
    fn from(s: &str) -> Self {
        match s {
            "Gateway" => ServiceType::Gateway,
            "GatewayLoadBalancer" => ServiceType::GatewayLoadBalancer,
            "Interface" => ServiceType::Interface,
            other => ServiceType::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for ServiceType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(ServiceType::from(s))
    }
}
impl ServiceType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            ServiceType::Gateway => "Gateway",
            ServiceType::GatewayLoadBalancer => "GatewayLoadBalancer",
            ServiceType::Interface => "Interface",
            ServiceType::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["Gateway", "GatewayLoadBalancer", "Interface"]
    }
}
impl AsRef<str> for ServiceType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes a principal.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AllowedPrincipal {
    /// <p>The type of principal.</p>
    #[doc(hidden)]
    pub principal_type: std::option::Option<crate::model::PrincipalType>,
    /// <p>The Amazon Resource Name (ARN) of the principal.</p>
    #[doc(hidden)]
    pub principal: std::option::Option<std::string::String>,
    /// <p>The ID of the service permission.</p>
    #[doc(hidden)]
    pub service_permission_id: std::option::Option<std::string::String>,
    /// <p>The tags.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    /// <p>The ID of the service.</p>
    #[doc(hidden)]
    pub service_id: std::option::Option<std::string::String>,
}
impl AllowedPrincipal {
    /// <p>The type of principal.</p>
    pub fn principal_type(&self) -> std::option::Option<&crate::model::PrincipalType> {
        self.principal_type.as_ref()
    }
    /// <p>The Amazon Resource Name (ARN) of the principal.</p>
    pub fn principal(&self) -> std::option::Option<&str> {
        self.principal.as_deref()
    }
    /// <p>The ID of the service permission.</p>
    pub fn service_permission_id(&self) -> std::option::Option<&str> {
        self.service_permission_id.as_deref()
    }
    /// <p>The tags.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
    /// <p>The ID of the service.</p>
    pub fn service_id(&self) -> std::option::Option<&str> {
        self.service_id.as_deref()
    }
}
/// See [`AllowedPrincipal`](crate::model::AllowedPrincipal).
pub mod allowed_principal {

    /// A builder for [`AllowedPrincipal`](crate::model::AllowedPrincipal).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) principal_type: std::option::Option<crate::model::PrincipalType>,
        pub(crate) principal: std::option::Option<std::string::String>,
        pub(crate) service_permission_id: std::option::Option<std::string::String>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        pub(crate) service_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The type of principal.</p>
        pub fn principal_type(mut self, input: crate::model::PrincipalType) -> Self {
            self.principal_type = Some(input);
            self
        }
        /// <p>The type of principal.</p>
        pub fn set_principal_type(
            mut self,
            input: std::option::Option<crate::model::PrincipalType>,
        ) -> Self {
            self.principal_type = input;
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the principal.</p>
        pub fn principal(mut self, input: impl Into<std::string::String>) -> Self {
            self.principal = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the principal.</p>
        pub fn set_principal(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.principal = input;
            self
        }
        /// <p>The ID of the service permission.</p>
        pub fn service_permission_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.service_permission_id = Some(input.into());
            self
        }
        /// <p>The ID of the service permission.</p>
        pub fn set_service_permission_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.service_permission_id = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>The tags.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>The tags.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// <p>The ID of the service.</p>
        pub fn service_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.service_id = Some(input.into());
            self
        }
        /// <p>The ID of the service.</p>
        pub fn set_service_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.service_id = input;
            self
        }
        /// Consumes the builder and constructs a [`AllowedPrincipal`](crate::model::AllowedPrincipal).
        pub fn build(self) -> crate::model::AllowedPrincipal {
            crate::model::AllowedPrincipal {
                principal_type: self.principal_type,
                principal: self.principal,
                service_permission_id: self.service_permission_id,
                tags: self.tags,
                service_id: self.service_id,
            }
        }
    }
}
impl AllowedPrincipal {
    /// Creates a new builder-style object to manufacture [`AllowedPrincipal`](crate::model::AllowedPrincipal).
    pub fn builder() -> crate::model::allowed_principal::Builder {
        crate::model::allowed_principal::Builder::default()
    }
}

/// <p>Describes a service configuration for a VPC endpoint service.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ServiceConfiguration {
    /// <p>The type of service.</p>
    #[doc(hidden)]
    pub service_type: std::option::Option<std::vec::Vec<crate::model::ServiceTypeDetail>>,
    /// <p>The ID of the service.</p>
    #[doc(hidden)]
    pub service_id: std::option::Option<std::string::String>,
    /// <p>The name of the service.</p>
    #[doc(hidden)]
    pub service_name: std::option::Option<std::string::String>,
    /// <p>The service state.</p>
    #[doc(hidden)]
    pub service_state: std::option::Option<crate::model::ServiceState>,
    /// <p>The Availability Zones in which the service is available.</p>
    #[doc(hidden)]
    pub availability_zones: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>Indicates whether requests from other Amazon Web Services accounts to create an endpoint to the service must first be accepted.</p>
    #[doc(hidden)]
    pub acceptance_required: std::option::Option<bool>,
    /// <p>Indicates whether the service manages its VPC endpoints. Management of the service VPC endpoints using the VPC endpoint API is restricted.</p>
    #[doc(hidden)]
    pub manages_vpc_endpoints: std::option::Option<bool>,
    /// <p>The Amazon Resource Names (ARNs) of the Network Load Balancers for the service.</p>
    #[doc(hidden)]
    pub network_load_balancer_arns: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>The Amazon Resource Names (ARNs) of the Gateway Load Balancers for the service.</p>
    #[doc(hidden)]
    pub gateway_load_balancer_arns: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>The supported IP address types.</p>
    #[doc(hidden)]
    pub supported_ip_address_types:
        std::option::Option<std::vec::Vec<crate::model::ServiceConnectivityType>>,
    /// <p>The DNS names for the service.</p>
    #[doc(hidden)]
    pub base_endpoint_dns_names: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>The private DNS name for the service.</p>
    #[doc(hidden)]
    pub private_dns_name: std::option::Option<std::string::String>,
    /// <p>Information about the endpoint service private DNS name configuration.</p>
    #[doc(hidden)]
    pub private_dns_name_configuration:
        std::option::Option<crate::model::PrivateDnsNameConfiguration>,
    /// <p>The payer responsibility.</p>
    #[doc(hidden)]
    pub payer_responsibility: std::option::Option<crate::model::PayerResponsibility>,
    /// <p>The tags assigned to the service.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl ServiceConfiguration {
    /// <p>The type of service.</p>
    pub fn service_type(&self) -> std::option::Option<&[crate::model::ServiceTypeDetail]> {
        self.service_type.as_deref()
    }
    /// <p>The ID of the service.</p>
    pub fn service_id(&self) -> std::option::Option<&str> {
        self.service_id.as_deref()
    }
    /// <p>The name of the service.</p>
    pub fn service_name(&self) -> std::option::Option<&str> {
        self.service_name.as_deref()
    }
    /// <p>The service state.</p>
    pub fn service_state(&self) -> std::option::Option<&crate::model::ServiceState> {
        self.service_state.as_ref()
    }
    /// <p>The Availability Zones in which the service is available.</p>
    pub fn availability_zones(&self) -> std::option::Option<&[std::string::String]> {
        self.availability_zones.as_deref()
    }
    /// <p>Indicates whether requests from other Amazon Web Services accounts to create an endpoint to the service must first be accepted.</p>
    pub fn acceptance_required(&self) -> std::option::Option<bool> {
        self.acceptance_required
    }
    /// <p>Indicates whether the service manages its VPC endpoints. Management of the service VPC endpoints using the VPC endpoint API is restricted.</p>
    pub fn manages_vpc_endpoints(&self) -> std::option::Option<bool> {
        self.manages_vpc_endpoints
    }
    /// <p>The Amazon Resource Names (ARNs) of the Network Load Balancers for the service.</p>
    pub fn network_load_balancer_arns(&self) -> std::option::Option<&[std::string::String]> {
        self.network_load_balancer_arns.as_deref()
    }
    /// <p>The Amazon Resource Names (ARNs) of the Gateway Load Balancers for the service.</p>
    pub fn gateway_load_balancer_arns(&self) -> std::option::Option<&[std::string::String]> {
        self.gateway_load_balancer_arns.as_deref()
    }
    /// <p>The supported IP address types.</p>
    pub fn supported_ip_address_types(
        &self,
    ) -> std::option::Option<&[crate::model::ServiceConnectivityType]> {
        self.supported_ip_address_types.as_deref()
    }
    /// <p>The DNS names for the service.</p>
    pub fn base_endpoint_dns_names(&self) -> std::option::Option<&[std::string::String]> {
        self.base_endpoint_dns_names.as_deref()
    }
    /// <p>The private DNS name for the service.</p>
    pub fn private_dns_name(&self) -> std::option::Option<&str> {
        self.private_dns_name.as_deref()
    }
    /// <p>Information about the endpoint service private DNS name configuration.</p>
    pub fn private_dns_name_configuration(
        &self,
    ) -> std::option::Option<&crate::model::PrivateDnsNameConfiguration> {
        self.private_dns_name_configuration.as_ref()
    }
    /// <p>The payer responsibility.</p>
    pub fn payer_responsibility(&self) -> std::option::Option<&crate::model::PayerResponsibility> {
        self.payer_responsibility.as_ref()
    }
    /// <p>The tags assigned to the service.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
}
/// See [`ServiceConfiguration`](crate::model::ServiceConfiguration).
pub mod service_configuration {

    /// A builder for [`ServiceConfiguration`](crate::model::ServiceConfiguration).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) service_type:
            std::option::Option<std::vec::Vec<crate::model::ServiceTypeDetail>>,
        pub(crate) service_id: std::option::Option<std::string::String>,
        pub(crate) service_name: std::option::Option<std::string::String>,
        pub(crate) service_state: std::option::Option<crate::model::ServiceState>,
        pub(crate) availability_zones: std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) acceptance_required: std::option::Option<bool>,
        pub(crate) manages_vpc_endpoints: std::option::Option<bool>,
        pub(crate) network_load_balancer_arns:
            std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) gateway_load_balancer_arns:
            std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) supported_ip_address_types:
            std::option::Option<std::vec::Vec<crate::model::ServiceConnectivityType>>,
        pub(crate) base_endpoint_dns_names: std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) private_dns_name: std::option::Option<std::string::String>,
        pub(crate) private_dns_name_configuration:
            std::option::Option<crate::model::PrivateDnsNameConfiguration>,
        pub(crate) payer_responsibility: std::option::Option<crate::model::PayerResponsibility>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    }
    impl Builder {
        /// Appends an item to `service_type`.
        ///
        /// To override the contents of this collection use [`set_service_type`](Self::set_service_type).
        ///
        /// <p>The type of service.</p>
        pub fn service_type(mut self, input: crate::model::ServiceTypeDetail) -> Self {
            let mut v = self.service_type.unwrap_or_default();
            v.push(input);
            self.service_type = Some(v);
            self
        }
        /// <p>The type of service.</p>
        pub fn set_service_type(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::ServiceTypeDetail>>,
        ) -> Self {
            self.service_type = input;
            self
        }
        /// <p>The ID of the service.</p>
        pub fn service_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.service_id = Some(input.into());
            self
        }
        /// <p>The ID of the service.</p>
        pub fn set_service_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.service_id = input;
            self
        }
        /// <p>The name of the service.</p>
        pub fn service_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.service_name = Some(input.into());
            self
        }
        /// <p>The name of the service.</p>
        pub fn set_service_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.service_name = input;
            self
        }
        /// <p>The service state.</p>
        pub fn service_state(mut self, input: crate::model::ServiceState) -> Self {
            self.service_state = Some(input);
            self
        }
        /// <p>The service state.</p>
        pub fn set_service_state(
            mut self,
            input: std::option::Option<crate::model::ServiceState>,
        ) -> Self {
            self.service_state = input;
            self
        }
        /// Appends an item to `availability_zones`.
        ///
        /// To override the contents of this collection use [`set_availability_zones`](Self::set_availability_zones).
        ///
        /// <p>The Availability Zones in which the service is available.</p>
        pub fn availability_zones(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.availability_zones.unwrap_or_default();
            v.push(input.into());
            self.availability_zones = Some(v);
            self
        }
        /// <p>The Availability Zones in which the service is available.</p>
        pub fn set_availability_zones(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.availability_zones = input;
            self
        }
        /// <p>Indicates whether requests from other Amazon Web Services accounts to create an endpoint to the service must first be accepted.</p>
        pub fn acceptance_required(mut self, input: bool) -> Self {
            self.acceptance_required = Some(input);
            self
        }
        /// <p>Indicates whether requests from other Amazon Web Services accounts to create an endpoint to the service must first be accepted.</p>
        pub fn set_acceptance_required(mut self, input: std::option::Option<bool>) -> Self {
            self.acceptance_required = input;
            self
        }
        /// <p>Indicates whether the service manages its VPC endpoints. Management of the service VPC endpoints using the VPC endpoint API is restricted.</p>
        pub fn manages_vpc_endpoints(mut self, input: bool) -> Self {
            self.manages_vpc_endpoints = Some(input);
            self
        }
        /// <p>Indicates whether the service manages its VPC endpoints. Management of the service VPC endpoints using the VPC endpoint API is restricted.</p>
        pub fn set_manages_vpc_endpoints(mut self, input: std::option::Option<bool>) -> Self {
            self.manages_vpc_endpoints = input;
            self
        }
        /// Appends an item to `network_load_balancer_arns`.
        ///
        /// To override the contents of this collection use [`set_network_load_balancer_arns`](Self::set_network_load_balancer_arns).
        ///
        /// <p>The Amazon Resource Names (ARNs) of the Network Load Balancers for the service.</p>
        pub fn network_load_balancer_arns(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.network_load_balancer_arns.unwrap_or_default();
            v.push(input.into());
            self.network_load_balancer_arns = Some(v);
            self
        }
        /// <p>The Amazon Resource Names (ARNs) of the Network Load Balancers for the service.</p>
        pub fn set_network_load_balancer_arns(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.network_load_balancer_arns = input;
            self
        }
        /// Appends an item to `gateway_load_balancer_arns`.
        ///
        /// To override the contents of this collection use [`set_gateway_load_balancer_arns`](Self::set_gateway_load_balancer_arns).
        ///
        /// <p>The Amazon Resource Names (ARNs) of the Gateway Load Balancers for the service.</p>
        pub fn gateway_load_balancer_arns(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.gateway_load_balancer_arns.unwrap_or_default();
            v.push(input.into());
            self.gateway_load_balancer_arns = Some(v);
            self
        }
        /// <p>The Amazon Resource Names (ARNs) of the Gateway Load Balancers for the service.</p>
        pub fn set_gateway_load_balancer_arns(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.gateway_load_balancer_arns = input;
            self
        }
        /// Appends an item to `supported_ip_address_types`.
        ///
        /// To override the contents of this collection use [`set_supported_ip_address_types`](Self::set_supported_ip_address_types).
        ///
        /// <p>The supported IP address types.</p>
        pub fn supported_ip_address_types(
            mut self,
            input: crate::model::ServiceConnectivityType,
        ) -> Self {
            let mut v = self.supported_ip_address_types.unwrap_or_default();
            v.push(input);
            self.supported_ip_address_types = Some(v);
            self
        }
        /// <p>The supported IP address types.</p>
        pub fn set_supported_ip_address_types(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::ServiceConnectivityType>>,
        ) -> Self {
            self.supported_ip_address_types = input;
            self
        }
        /// Appends an item to `base_endpoint_dns_names`.
        ///
        /// To override the contents of this collection use [`set_base_endpoint_dns_names`](Self::set_base_endpoint_dns_names).
        ///
        /// <p>The DNS names for the service.</p>
        pub fn base_endpoint_dns_names(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.base_endpoint_dns_names.unwrap_or_default();
            v.push(input.into());
            self.base_endpoint_dns_names = Some(v);
            self
        }
        /// <p>The DNS names for the service.</p>
        pub fn set_base_endpoint_dns_names(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.base_endpoint_dns_names = input;
            self
        }
        /// <p>The private DNS name for the service.</p>
        pub fn private_dns_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.private_dns_name = Some(input.into());
            self
        }
        /// <p>The private DNS name for the service.</p>
        pub fn set_private_dns_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.private_dns_name = input;
            self
        }
        /// <p>Information about the endpoint service private DNS name configuration.</p>
        pub fn private_dns_name_configuration(
            mut self,
            input: crate::model::PrivateDnsNameConfiguration,
        ) -> Self {
            self.private_dns_name_configuration = Some(input);
            self
        }
        /// <p>Information about the endpoint service private DNS name configuration.</p>
        pub fn set_private_dns_name_configuration(
            mut self,
            input: std::option::Option<crate::model::PrivateDnsNameConfiguration>,
        ) -> Self {
            self.private_dns_name_configuration = input;
            self
        }
        /// <p>The payer responsibility.</p>
        pub fn payer_responsibility(mut self, input: crate::model::PayerResponsibility) -> Self {
            self.payer_responsibility = Some(input);
            self
        }
        /// <p>The payer responsibility.</p>
        pub fn set_payer_responsibility(
            mut self,
            input: std::option::Option<crate::model::PayerResponsibility>,
        ) -> Self {
            self.payer_responsibility = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>The tags assigned to the service.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>The tags assigned to the service.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// Consumes the builder and constructs a [`ServiceConfiguration`](crate::model::ServiceConfiguration).
        pub fn build(self) -> crate::model::ServiceConfiguration {
            crate::model::ServiceConfiguration {
                service_type: self.service_type,
                service_id: self.service_id,
                service_name: self.service_name,
                service_state: self.service_state,
                availability_zones: self.availability_zones,
                acceptance_required: self.acceptance_required,
                manages_vpc_endpoints: self.manages_vpc_endpoints,
                network_load_balancer_arns: self.network_load_balancer_arns,
                gateway_load_balancer_arns: self.gateway_load_balancer_arns,
                supported_ip_address_types: self.supported_ip_address_types,
                base_endpoint_dns_names: self.base_endpoint_dns_names,
                private_dns_name: self.private_dns_name,
                private_dns_name_configuration: self.private_dns_name_configuration,
                payer_responsibility: self.payer_responsibility,
                tags: self.tags,
            }
        }
    }
}
impl ServiceConfiguration {
    /// Creates a new builder-style object to manufacture [`ServiceConfiguration`](crate::model::ServiceConfiguration).
    pub fn builder() -> crate::model::service_configuration::Builder {
        crate::model::service_configuration::Builder::default()
    }
}

/// <p>Information about the private DNS name for the service endpoint.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct PrivateDnsNameConfiguration {
    /// <p>The verification state of the VPC endpoint service.</p>
    /// <p>&gt;Consumers of the endpoint service can use the private name only when the state is <code>verified</code>.</p>
    #[doc(hidden)]
    pub state: std::option::Option<crate::model::DnsNameState>,
    /// <p>The endpoint service verification type, for example TXT.</p>
    #[doc(hidden)]
    pub r#type: std::option::Option<std::string::String>,
    /// <p>The value the service provider adds to the private DNS name domain record before verification.</p>
    #[doc(hidden)]
    pub value: std::option::Option<std::string::String>,
    /// <p>The name of the record subdomain the service provider needs to create. The service provider adds the <code>value</code> text to the <code>name</code>.</p>
    #[doc(hidden)]
    pub name: std::option::Option<std::string::String>,
}
impl PrivateDnsNameConfiguration {
    /// <p>The verification state of the VPC endpoint service.</p>
    /// <p>&gt;Consumers of the endpoint service can use the private name only when the state is <code>verified</code>.</p>
    pub fn state(&self) -> std::option::Option<&crate::model::DnsNameState> {
        self.state.as_ref()
    }
    /// <p>The endpoint service verification type, for example TXT.</p>
    pub fn r#type(&self) -> std::option::Option<&str> {
        self.r#type.as_deref()
    }
    /// <p>The value the service provider adds to the private DNS name domain record before verification.</p>
    pub fn value(&self) -> std::option::Option<&str> {
        self.value.as_deref()
    }
    /// <p>The name of the record subdomain the service provider needs to create. The service provider adds the <code>value</code> text to the <code>name</code>.</p>
    pub fn name(&self) -> std::option::Option<&str> {
        self.name.as_deref()
    }
}
/// See [`PrivateDnsNameConfiguration`](crate::model::PrivateDnsNameConfiguration).
pub mod private_dns_name_configuration {

    /// A builder for [`PrivateDnsNameConfiguration`](crate::model::PrivateDnsNameConfiguration).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) state: std::option::Option<crate::model::DnsNameState>,
        pub(crate) r#type: std::option::Option<std::string::String>,
        pub(crate) value: std::option::Option<std::string::String>,
        pub(crate) name: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The verification state of the VPC endpoint service.</p>
        /// <p>&gt;Consumers of the endpoint service can use the private name only when the state is <code>verified</code>.</p>
        pub fn state(mut self, input: crate::model::DnsNameState) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>The verification state of the VPC endpoint service.</p>
        /// <p>&gt;Consumers of the endpoint service can use the private name only when the state is <code>verified</code>.</p>
        pub fn set_state(mut self, input: std::option::Option<crate::model::DnsNameState>) -> Self {
            self.state = input;
            self
        }
        /// <p>The endpoint service verification type, for example TXT.</p>
        pub fn r#type(mut self, input: impl Into<std::string::String>) -> Self {
            self.r#type = Some(input.into());
            self
        }
        /// <p>The endpoint service verification type, for example TXT.</p>
        pub fn set_type(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.r#type = input;
            self
        }
        /// <p>The value the service provider adds to the private DNS name domain record before verification.</p>
        pub fn value(mut self, input: impl Into<std::string::String>) -> Self {
            self.value = Some(input.into());
            self
        }
        /// <p>The value the service provider adds to the private DNS name domain record before verification.</p>
        pub fn set_value(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.value = input;
            self
        }
        /// <p>The name of the record subdomain the service provider needs to create. The service provider adds the <code>value</code> text to the <code>name</code>.</p>
        pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
            self.name = Some(input.into());
            self
        }
        /// <p>The name of the record subdomain the service provider needs to create. The service provider adds the <code>value</code> text to the <code>name</code>.</p>
        pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.name = input;
            self
        }
        /// Consumes the builder and constructs a [`PrivateDnsNameConfiguration`](crate::model::PrivateDnsNameConfiguration).
        pub fn build(self) -> crate::model::PrivateDnsNameConfiguration {
            crate::model::PrivateDnsNameConfiguration {
                state: self.state,
                r#type: self.r#type,
                value: self.value,
                name: self.name,
            }
        }
    }
}
impl PrivateDnsNameConfiguration {
    /// Creates a new builder-style object to manufacture [`PrivateDnsNameConfiguration`](crate::model::PrivateDnsNameConfiguration).
    pub fn builder() -> crate::model::private_dns_name_configuration::Builder {
        crate::model::private_dns_name_configuration::Builder::default()
    }
}

/// When writing a match expression against `ServiceState`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let servicestate = unimplemented!();
/// match servicestate {
///     ServiceState::Available => { /* ... */ },
///     ServiceState::Deleted => { /* ... */ },
///     ServiceState::Deleting => { /* ... */ },
///     ServiceState::Failed => { /* ... */ },
///     ServiceState::Pending => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `servicestate` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `ServiceState::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `ServiceState::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `ServiceState::NewFeature` is defined.
/// Specifically, when `servicestate` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `ServiceState::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 ServiceState {
    #[allow(missing_docs)] // documentation missing in model
    Available,
    #[allow(missing_docs)] // documentation missing in model
    Deleted,
    #[allow(missing_docs)] // documentation missing in model
    Deleting,
    #[allow(missing_docs)] // documentation missing in model
    Failed,
    #[allow(missing_docs)] // documentation missing in model
    Pending,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for ServiceState {
    fn from(s: &str) -> Self {
        match s {
            "Available" => ServiceState::Available,
            "Deleted" => ServiceState::Deleted,
            "Deleting" => ServiceState::Deleting,
            "Failed" => ServiceState::Failed,
            "Pending" => ServiceState::Pending,
            other => ServiceState::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for ServiceState {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(ServiceState::from(s))
    }
}
impl ServiceState {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            ServiceState::Available => "Available",
            ServiceState::Deleted => "Deleted",
            ServiceState::Deleting => "Deleting",
            ServiceState::Failed => "Failed",
            ServiceState::Pending => "Pending",
            ServiceState::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["Available", "Deleted", "Deleting", "Failed", "Pending"]
    }
}
impl AsRef<str> for ServiceState {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes a VPC endpoint.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct VpcEndpoint {
    /// <p>The ID of the endpoint.</p>
    #[doc(hidden)]
    pub vpc_endpoint_id: std::option::Option<std::string::String>,
    /// <p>The type of endpoint.</p>
    #[doc(hidden)]
    pub vpc_endpoint_type: std::option::Option<crate::model::VpcEndpointType>,
    /// <p>The ID of the VPC to which the endpoint is associated.</p>
    #[doc(hidden)]
    pub vpc_id: std::option::Option<std::string::String>,
    /// <p>The name of the service to which the endpoint is associated.</p>
    #[doc(hidden)]
    pub service_name: std::option::Option<std::string::String>,
    /// <p>The state of the endpoint.</p>
    #[doc(hidden)]
    pub state: std::option::Option<crate::model::State>,
    /// <p>The policy document associated with the endpoint, if applicable.</p>
    #[doc(hidden)]
    pub policy_document: std::option::Option<std::string::String>,
    /// <p>(Gateway endpoint) The IDs of the route tables associated with the endpoint.</p>
    #[doc(hidden)]
    pub route_table_ids: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>(Interface endpoint) The subnets for the endpoint.</p>
    #[doc(hidden)]
    pub subnet_ids: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>(Interface endpoint) Information about the security groups that are associated with the network interface.</p>
    #[doc(hidden)]
    pub groups: std::option::Option<std::vec::Vec<crate::model::SecurityGroupIdentifier>>,
    /// <p>The IP address type for the endpoint.</p>
    #[doc(hidden)]
    pub ip_address_type: std::option::Option<crate::model::IpAddressType>,
    /// <p>The DNS options for the endpoint.</p>
    #[doc(hidden)]
    pub dns_options: std::option::Option<crate::model::DnsOptions>,
    /// <p>(Interface endpoint) Indicates whether the VPC is associated with a private hosted zone.</p>
    #[doc(hidden)]
    pub private_dns_enabled: std::option::Option<bool>,
    /// <p>Indicates whether the endpoint is being managed by its service.</p>
    #[doc(hidden)]
    pub requester_managed: std::option::Option<bool>,
    /// <p>(Interface endpoint) The network interfaces for the endpoint.</p>
    #[doc(hidden)]
    pub network_interface_ids: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>(Interface endpoint) The DNS entries for the endpoint.</p>
    #[doc(hidden)]
    pub dns_entries: std::option::Option<std::vec::Vec<crate::model::DnsEntry>>,
    /// <p>The date and time that the endpoint was created.</p>
    #[doc(hidden)]
    pub creation_timestamp: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The tags assigned to the endpoint.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    /// <p>The ID of the Amazon Web Services account that owns the endpoint.</p>
    #[doc(hidden)]
    pub owner_id: std::option::Option<std::string::String>,
    /// <p>The last error that occurred for endpoint.</p>
    #[doc(hidden)]
    pub last_error: std::option::Option<crate::model::LastError>,
}
impl VpcEndpoint {
    /// <p>The ID of the endpoint.</p>
    pub fn vpc_endpoint_id(&self) -> std::option::Option<&str> {
        self.vpc_endpoint_id.as_deref()
    }
    /// <p>The type of endpoint.</p>
    pub fn vpc_endpoint_type(&self) -> std::option::Option<&crate::model::VpcEndpointType> {
        self.vpc_endpoint_type.as_ref()
    }
    /// <p>The ID of the VPC to which the endpoint is associated.</p>
    pub fn vpc_id(&self) -> std::option::Option<&str> {
        self.vpc_id.as_deref()
    }
    /// <p>The name of the service to which the endpoint is associated.</p>
    pub fn service_name(&self) -> std::option::Option<&str> {
        self.service_name.as_deref()
    }
    /// <p>The state of the endpoint.</p>
    pub fn state(&self) -> std::option::Option<&crate::model::State> {
        self.state.as_ref()
    }
    /// <p>The policy document associated with the endpoint, if applicable.</p>
    pub fn policy_document(&self) -> std::option::Option<&str> {
        self.policy_document.as_deref()
    }
    /// <p>(Gateway endpoint) The IDs of the route tables associated with the endpoint.</p>
    pub fn route_table_ids(&self) -> std::option::Option<&[std::string::String]> {
        self.route_table_ids.as_deref()
    }
    /// <p>(Interface endpoint) The subnets for the endpoint.</p>
    pub fn subnet_ids(&self) -> std::option::Option<&[std::string::String]> {
        self.subnet_ids.as_deref()
    }
    /// <p>(Interface endpoint) Information about the security groups that are associated with the network interface.</p>
    pub fn groups(&self) -> std::option::Option<&[crate::model::SecurityGroupIdentifier]> {
        self.groups.as_deref()
    }
    /// <p>The IP address type for the endpoint.</p>
    pub fn ip_address_type(&self) -> std::option::Option<&crate::model::IpAddressType> {
        self.ip_address_type.as_ref()
    }
    /// <p>The DNS options for the endpoint.</p>
    pub fn dns_options(&self) -> std::option::Option<&crate::model::DnsOptions> {
        self.dns_options.as_ref()
    }
    /// <p>(Interface endpoint) Indicates whether the VPC is associated with a private hosted zone.</p>
    pub fn private_dns_enabled(&self) -> std::option::Option<bool> {
        self.private_dns_enabled
    }
    /// <p>Indicates whether the endpoint is being managed by its service.</p>
    pub fn requester_managed(&self) -> std::option::Option<bool> {
        self.requester_managed
    }
    /// <p>(Interface endpoint) The network interfaces for the endpoint.</p>
    pub fn network_interface_ids(&self) -> std::option::Option<&[std::string::String]> {
        self.network_interface_ids.as_deref()
    }
    /// <p>(Interface endpoint) The DNS entries for the endpoint.</p>
    pub fn dns_entries(&self) -> std::option::Option<&[crate::model::DnsEntry]> {
        self.dns_entries.as_deref()
    }
    /// <p>The date and time that the endpoint was created.</p>
    pub fn creation_timestamp(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.creation_timestamp.as_ref()
    }
    /// <p>The tags assigned to the endpoint.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
    /// <p>The ID of the Amazon Web Services account that owns the endpoint.</p>
    pub fn owner_id(&self) -> std::option::Option<&str> {
        self.owner_id.as_deref()
    }
    /// <p>The last error that occurred for endpoint.</p>
    pub fn last_error(&self) -> std::option::Option<&crate::model::LastError> {
        self.last_error.as_ref()
    }
}
/// See [`VpcEndpoint`](crate::model::VpcEndpoint).
pub mod vpc_endpoint {

    /// A builder for [`VpcEndpoint`](crate::model::VpcEndpoint).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) vpc_endpoint_id: std::option::Option<std::string::String>,
        pub(crate) vpc_endpoint_type: std::option::Option<crate::model::VpcEndpointType>,
        pub(crate) vpc_id: std::option::Option<std::string::String>,
        pub(crate) service_name: std::option::Option<std::string::String>,
        pub(crate) state: std::option::Option<crate::model::State>,
        pub(crate) policy_document: std::option::Option<std::string::String>,
        pub(crate) route_table_ids: std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) subnet_ids: std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) groups:
            std::option::Option<std::vec::Vec<crate::model::SecurityGroupIdentifier>>,
        pub(crate) ip_address_type: std::option::Option<crate::model::IpAddressType>,
        pub(crate) dns_options: std::option::Option<crate::model::DnsOptions>,
        pub(crate) private_dns_enabled: std::option::Option<bool>,
        pub(crate) requester_managed: std::option::Option<bool>,
        pub(crate) network_interface_ids: std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) dns_entries: std::option::Option<std::vec::Vec<crate::model::DnsEntry>>,
        pub(crate) creation_timestamp: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        pub(crate) owner_id: std::option::Option<std::string::String>,
        pub(crate) last_error: std::option::Option<crate::model::LastError>,
    }
    impl Builder {
        /// <p>The ID of the endpoint.</p>
        pub fn vpc_endpoint_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.vpc_endpoint_id = Some(input.into());
            self
        }
        /// <p>The ID of the endpoint.</p>
        pub fn set_vpc_endpoint_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.vpc_endpoint_id = input;
            self
        }
        /// <p>The type of endpoint.</p>
        pub fn vpc_endpoint_type(mut self, input: crate::model::VpcEndpointType) -> Self {
            self.vpc_endpoint_type = Some(input);
            self
        }
        /// <p>The type of endpoint.</p>
        pub fn set_vpc_endpoint_type(
            mut self,
            input: std::option::Option<crate::model::VpcEndpointType>,
        ) -> Self {
            self.vpc_endpoint_type = input;
            self
        }
        /// <p>The ID of the VPC to which the endpoint is associated.</p>
        pub fn vpc_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.vpc_id = Some(input.into());
            self
        }
        /// <p>The ID of the VPC to which the endpoint is associated.</p>
        pub fn set_vpc_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.vpc_id = input;
            self
        }
        /// <p>The name of the service to which the endpoint is associated.</p>
        pub fn service_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.service_name = Some(input.into());
            self
        }
        /// <p>The name of the service to which the endpoint is associated.</p>
        pub fn set_service_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.service_name = input;
            self
        }
        /// <p>The state of the endpoint.</p>
        pub fn state(mut self, input: crate::model::State) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>The state of the endpoint.</p>
        pub fn set_state(mut self, input: std::option::Option<crate::model::State>) -> Self {
            self.state = input;
            self
        }
        /// <p>The policy document associated with the endpoint, if applicable.</p>
        pub fn policy_document(mut self, input: impl Into<std::string::String>) -> Self {
            self.policy_document = Some(input.into());
            self
        }
        /// <p>The policy document associated with the endpoint, if applicable.</p>
        pub fn set_policy_document(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.policy_document = input;
            self
        }
        /// Appends an item to `route_table_ids`.
        ///
        /// To override the contents of this collection use [`set_route_table_ids`](Self::set_route_table_ids).
        ///
        /// <p>(Gateway endpoint) The IDs of the route tables associated with the endpoint.</p>
        pub fn route_table_ids(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.route_table_ids.unwrap_or_default();
            v.push(input.into());
            self.route_table_ids = Some(v);
            self
        }
        /// <p>(Gateway endpoint) The IDs of the route tables associated with the endpoint.</p>
        pub fn set_route_table_ids(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.route_table_ids = input;
            self
        }
        /// Appends an item to `subnet_ids`.
        ///
        /// To override the contents of this collection use [`set_subnet_ids`](Self::set_subnet_ids).
        ///
        /// <p>(Interface endpoint) The subnets for the endpoint.</p>
        pub fn subnet_ids(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.subnet_ids.unwrap_or_default();
            v.push(input.into());
            self.subnet_ids = Some(v);
            self
        }
        /// <p>(Interface endpoint) The subnets for the endpoint.</p>
        pub fn set_subnet_ids(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.subnet_ids = input;
            self
        }
        /// Appends an item to `groups`.
        ///
        /// To override the contents of this collection use [`set_groups`](Self::set_groups).
        ///
        /// <p>(Interface endpoint) Information about the security groups that are associated with the network interface.</p>
        pub fn groups(mut self, input: crate::model::SecurityGroupIdentifier) -> Self {
            let mut v = self.groups.unwrap_or_default();
            v.push(input);
            self.groups = Some(v);
            self
        }
        /// <p>(Interface endpoint) Information about the security groups that are associated with the network interface.</p>
        pub fn set_groups(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::SecurityGroupIdentifier>>,
        ) -> Self {
            self.groups = input;
            self
        }
        /// <p>The IP address type for the endpoint.</p>
        pub fn ip_address_type(mut self, input: crate::model::IpAddressType) -> Self {
            self.ip_address_type = Some(input);
            self
        }
        /// <p>The IP address type for the endpoint.</p>
        pub fn set_ip_address_type(
            mut self,
            input: std::option::Option<crate::model::IpAddressType>,
        ) -> Self {
            self.ip_address_type = input;
            self
        }
        /// <p>The DNS options for the endpoint.</p>
        pub fn dns_options(mut self, input: crate::model::DnsOptions) -> Self {
            self.dns_options = Some(input);
            self
        }
        /// <p>The DNS options for the endpoint.</p>
        pub fn set_dns_options(
            mut self,
            input: std::option::Option<crate::model::DnsOptions>,
        ) -> Self {
            self.dns_options = input;
            self
        }
        /// <p>(Interface endpoint) Indicates whether the VPC is associated with a private hosted zone.</p>
        pub fn private_dns_enabled(mut self, input: bool) -> Self {
            self.private_dns_enabled = Some(input);
            self
        }
        /// <p>(Interface endpoint) Indicates whether the VPC is associated with a private hosted zone.</p>
        pub fn set_private_dns_enabled(mut self, input: std::option::Option<bool>) -> Self {
            self.private_dns_enabled = input;
            self
        }
        /// <p>Indicates whether the endpoint is being managed by its service.</p>
        pub fn requester_managed(mut self, input: bool) -> Self {
            self.requester_managed = Some(input);
            self
        }
        /// <p>Indicates whether the endpoint is being managed by its service.</p>
        pub fn set_requester_managed(mut self, input: std::option::Option<bool>) -> Self {
            self.requester_managed = input;
            self
        }
        /// Appends an item to `network_interface_ids`.
        ///
        /// To override the contents of this collection use [`set_network_interface_ids`](Self::set_network_interface_ids).
        ///
        /// <p>(Interface endpoint) The network interfaces for the endpoint.</p>
        pub fn network_interface_ids(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.network_interface_ids.unwrap_or_default();
            v.push(input.into());
            self.network_interface_ids = Some(v);
            self
        }
        /// <p>(Interface endpoint) The network interfaces for the endpoint.</p>
        pub fn set_network_interface_ids(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.network_interface_ids = input;
            self
        }
        /// Appends an item to `dns_entries`.
        ///
        /// To override the contents of this collection use [`set_dns_entries`](Self::set_dns_entries).
        ///
        /// <p>(Interface endpoint) The DNS entries for the endpoint.</p>
        pub fn dns_entries(mut self, input: crate::model::DnsEntry) -> Self {
            let mut v = self.dns_entries.unwrap_or_default();
            v.push(input);
            self.dns_entries = Some(v);
            self
        }
        /// <p>(Interface endpoint) The DNS entries for the endpoint.</p>
        pub fn set_dns_entries(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::DnsEntry>>,
        ) -> Self {
            self.dns_entries = input;
            self
        }
        /// <p>The date and time that the endpoint was created.</p>
        pub fn creation_timestamp(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.creation_timestamp = Some(input);
            self
        }
        /// <p>The date and time that the endpoint was created.</p>
        pub fn set_creation_timestamp(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.creation_timestamp = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>The tags assigned to the endpoint.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>The tags assigned to the endpoint.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// <p>The ID of the Amazon Web Services account that owns the endpoint.</p>
        pub fn owner_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.owner_id = Some(input.into());
            self
        }
        /// <p>The ID of the Amazon Web Services account that owns the endpoint.</p>
        pub fn set_owner_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.owner_id = input;
            self
        }
        /// <p>The last error that occurred for endpoint.</p>
        pub fn last_error(mut self, input: crate::model::LastError) -> Self {
            self.last_error = Some(input);
            self
        }
        /// <p>The last error that occurred for endpoint.</p>
        pub fn set_last_error(
            mut self,
            input: std::option::Option<crate::model::LastError>,
        ) -> Self {
            self.last_error = input;
            self
        }
        /// Consumes the builder and constructs a [`VpcEndpoint`](crate::model::VpcEndpoint).
        pub fn build(self) -> crate::model::VpcEndpoint {
            crate::model::VpcEndpoint {
                vpc_endpoint_id: self.vpc_endpoint_id,
                vpc_endpoint_type: self.vpc_endpoint_type,
                vpc_id: self.vpc_id,
                service_name: self.service_name,
                state: self.state,
                policy_document: self.policy_document,
                route_table_ids: self.route_table_ids,
                subnet_ids: self.subnet_ids,
                groups: self.groups,
                ip_address_type: self.ip_address_type,
                dns_options: self.dns_options,
                private_dns_enabled: self.private_dns_enabled,
                requester_managed: self.requester_managed,
                network_interface_ids: self.network_interface_ids,
                dns_entries: self.dns_entries,
                creation_timestamp: self.creation_timestamp,
                tags: self.tags,
                owner_id: self.owner_id,
                last_error: self.last_error,
            }
        }
    }
}
impl VpcEndpoint {
    /// Creates a new builder-style object to manufacture [`VpcEndpoint`](crate::model::VpcEndpoint).
    pub fn builder() -> crate::model::vpc_endpoint::Builder {
        crate::model::vpc_endpoint::Builder::default()
    }
}

/// <p>The last error that occurred for a VPC endpoint.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LastError {
    /// <p>The error message for the VPC endpoint error.</p>
    #[doc(hidden)]
    pub message: std::option::Option<std::string::String>,
    /// <p>The error code for the VPC endpoint error.</p>
    #[doc(hidden)]
    pub code: std::option::Option<std::string::String>,
}
impl LastError {
    /// <p>The error message for the VPC endpoint error.</p>
    pub fn message(&self) -> std::option::Option<&str> {
        self.message.as_deref()
    }
    /// <p>The error code for the VPC endpoint error.</p>
    pub fn code(&self) -> std::option::Option<&str> {
        self.code.as_deref()
    }
}
/// See [`LastError`](crate::model::LastError).
pub mod last_error {

    /// A builder for [`LastError`](crate::model::LastError).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) message: std::option::Option<std::string::String>,
        pub(crate) code: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The error message for the VPC endpoint error.</p>
        pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
            self.message = Some(input.into());
            self
        }
        /// <p>The error message for the VPC endpoint error.</p>
        pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.message = input;
            self
        }
        /// <p>The error code for the VPC endpoint error.</p>
        pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
            self.code = Some(input.into());
            self
        }
        /// <p>The error code for the VPC endpoint error.</p>
        pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.code = input;
            self
        }
        /// Consumes the builder and constructs a [`LastError`](crate::model::LastError).
        pub fn build(self) -> crate::model::LastError {
            crate::model::LastError {
                message: self.message,
                code: self.code,
            }
        }
    }
}
impl LastError {
    /// Creates a new builder-style object to manufacture [`LastError`](crate::model::LastError).
    pub fn builder() -> crate::model::last_error::Builder {
        crate::model::last_error::Builder::default()
    }
}

/// <p>Describes a DNS entry.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DnsEntry {
    /// <p>The DNS name.</p>
    #[doc(hidden)]
    pub dns_name: std::option::Option<std::string::String>,
    /// <p>The ID of the private hosted zone.</p>
    #[doc(hidden)]
    pub hosted_zone_id: std::option::Option<std::string::String>,
}
impl DnsEntry {
    /// <p>The DNS name.</p>
    pub fn dns_name(&self) -> std::option::Option<&str> {
        self.dns_name.as_deref()
    }
    /// <p>The ID of the private hosted zone.</p>
    pub fn hosted_zone_id(&self) -> std::option::Option<&str> {
        self.hosted_zone_id.as_deref()
    }
}
/// See [`DnsEntry`](crate::model::DnsEntry).
pub mod dns_entry {

    /// A builder for [`DnsEntry`](crate::model::DnsEntry).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) dns_name: std::option::Option<std::string::String>,
        pub(crate) hosted_zone_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The DNS name.</p>
        pub fn dns_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.dns_name = Some(input.into());
            self
        }
        /// <p>The DNS name.</p>
        pub fn set_dns_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.dns_name = input;
            self
        }
        /// <p>The ID of the private hosted zone.</p>
        pub fn hosted_zone_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.hosted_zone_id = Some(input.into());
            self
        }
        /// <p>The ID of the private hosted zone.</p>
        pub fn set_hosted_zone_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.hosted_zone_id = input;
            self
        }
        /// Consumes the builder and constructs a [`DnsEntry`](crate::model::DnsEntry).
        pub fn build(self) -> crate::model::DnsEntry {
            crate::model::DnsEntry {
                dns_name: self.dns_name,
                hosted_zone_id: self.hosted_zone_id,
            }
        }
    }
}
impl DnsEntry {
    /// Creates a new builder-style object to manufacture [`DnsEntry`](crate::model::DnsEntry).
    pub fn builder() -> crate::model::dns_entry::Builder {
        crate::model::dns_entry::Builder::default()
    }
}

/// <p>Describes the DNS options for an endpoint.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DnsOptions {
    /// <p>The DNS records created for the endpoint.</p>
    #[doc(hidden)]
    pub dns_record_ip_type: std::option::Option<crate::model::DnsRecordIpType>,
}
impl DnsOptions {
    /// <p>The DNS records created for the endpoint.</p>
    pub fn dns_record_ip_type(&self) -> std::option::Option<&crate::model::DnsRecordIpType> {
        self.dns_record_ip_type.as_ref()
    }
}
/// See [`DnsOptions`](crate::model::DnsOptions).
pub mod dns_options {

    /// A builder for [`DnsOptions`](crate::model::DnsOptions).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) dns_record_ip_type: std::option::Option<crate::model::DnsRecordIpType>,
    }
    impl Builder {
        /// <p>The DNS records created for the endpoint.</p>
        pub fn dns_record_ip_type(mut self, input: crate::model::DnsRecordIpType) -> Self {
            self.dns_record_ip_type = Some(input);
            self
        }
        /// <p>The DNS records created for the endpoint.</p>
        pub fn set_dns_record_ip_type(
            mut self,
            input: std::option::Option<crate::model::DnsRecordIpType>,
        ) -> Self {
            self.dns_record_ip_type = input;
            self
        }
        /// Consumes the builder and constructs a [`DnsOptions`](crate::model::DnsOptions).
        pub fn build(self) -> crate::model::DnsOptions {
            crate::model::DnsOptions {
                dns_record_ip_type: self.dns_record_ip_type,
            }
        }
    }
}
impl DnsOptions {
    /// Creates a new builder-style object to manufacture [`DnsOptions`](crate::model::DnsOptions).
    pub fn builder() -> crate::model::dns_options::Builder {
        crate::model::dns_options::Builder::default()
    }
}

/// <p>Describes a security group.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SecurityGroupIdentifier {
    /// <p>The ID of the security group.</p>
    #[doc(hidden)]
    pub group_id: std::option::Option<std::string::String>,
    /// <p>The name of the security group.</p>
    #[doc(hidden)]
    pub group_name: std::option::Option<std::string::String>,
}
impl SecurityGroupIdentifier {
    /// <p>The ID of the security group.</p>
    pub fn group_id(&self) -> std::option::Option<&str> {
        self.group_id.as_deref()
    }
    /// <p>The name of the security group.</p>
    pub fn group_name(&self) -> std::option::Option<&str> {
        self.group_name.as_deref()
    }
}
/// See [`SecurityGroupIdentifier`](crate::model::SecurityGroupIdentifier).
pub mod security_group_identifier {

    /// A builder for [`SecurityGroupIdentifier`](crate::model::SecurityGroupIdentifier).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) group_id: std::option::Option<std::string::String>,
        pub(crate) group_name: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The ID of the security group.</p>
        pub fn group_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.group_id = Some(input.into());
            self
        }
        /// <p>The ID of the security group.</p>
        pub fn set_group_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.group_id = input;
            self
        }
        /// <p>The name of the security group.</p>
        pub fn group_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.group_name = Some(input.into());
            self
        }
        /// <p>The name of the security group.</p>
        pub fn set_group_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.group_name = input;
            self
        }
        /// Consumes the builder and constructs a [`SecurityGroupIdentifier`](crate::model::SecurityGroupIdentifier).
        pub fn build(self) -> crate::model::SecurityGroupIdentifier {
            crate::model::SecurityGroupIdentifier {
                group_id: self.group_id,
                group_name: self.group_name,
            }
        }
    }
}
impl SecurityGroupIdentifier {
    /// Creates a new builder-style object to manufacture [`SecurityGroupIdentifier`](crate::model::SecurityGroupIdentifier).
    pub fn builder() -> crate::model::security_group_identifier::Builder {
        crate::model::security_group_identifier::Builder::default()
    }
}

/// When writing a match expression against `State`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let state = unimplemented!();
/// match state {
///     State::Available => { /* ... */ },
///     State::Deleted => { /* ... */ },
///     State::Deleting => { /* ... */ },
///     State::Expired => { /* ... */ },
///     State::Failed => { /* ... */ },
///     State::Pending => { /* ... */ },
///     State::PendingAcceptance => { /* ... */ },
///     State::Rejected => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `state` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `State::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `State::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `State::NewFeature` is defined.
/// Specifically, when `state` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `State::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 State {
    #[allow(missing_docs)] // documentation missing in model
    Available,
    #[allow(missing_docs)] // documentation missing in model
    Deleted,
    #[allow(missing_docs)] // documentation missing in model
    Deleting,
    #[allow(missing_docs)] // documentation missing in model
    Expired,
    #[allow(missing_docs)] // documentation missing in model
    Failed,
    #[allow(missing_docs)] // documentation missing in model
    Pending,
    #[allow(missing_docs)] // documentation missing in model
    PendingAcceptance,
    #[allow(missing_docs)] // documentation missing in model
    Rejected,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for State {
    fn from(s: &str) -> Self {
        match s {
            "Available" => State::Available,
            "Deleted" => State::Deleted,
            "Deleting" => State::Deleting,
            "Expired" => State::Expired,
            "Failed" => State::Failed,
            "Pending" => State::Pending,
            "PendingAcceptance" => State::PendingAcceptance,
            "Rejected" => State::Rejected,
            other => State::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for State {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(State::from(s))
    }
}
impl State {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            State::Available => "Available",
            State::Deleted => "Deleted",
            State::Deleting => "Deleting",
            State::Expired => "Expired",
            State::Failed => "Failed",
            State::Pending => "Pending",
            State::PendingAcceptance => "PendingAcceptance",
            State::Rejected => "Rejected",
            State::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &[
            "Available",
            "Deleted",
            "Deleting",
            "Expired",
            "Failed",
            "Pending",
            "PendingAcceptance",
            "Rejected",
        ]
    }
}
impl AsRef<str> for State {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `VpcEndpointType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let vpcendpointtype = unimplemented!();
/// match vpcendpointtype {
///     VpcEndpointType::Gateway => { /* ... */ },
///     VpcEndpointType::GatewayLoadBalancer => { /* ... */ },
///     VpcEndpointType::Interface => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `vpcendpointtype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `VpcEndpointType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `VpcEndpointType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `VpcEndpointType::NewFeature` is defined.
/// Specifically, when `vpcendpointtype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `VpcEndpointType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 VpcEndpointType {
    #[allow(missing_docs)] // documentation missing in model
    Gateway,
    #[allow(missing_docs)] // documentation missing in model
    GatewayLoadBalancer,
    #[allow(missing_docs)] // documentation missing in model
    Interface,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for VpcEndpointType {
    fn from(s: &str) -> Self {
        match s {
            "Gateway" => VpcEndpointType::Gateway,
            "GatewayLoadBalancer" => VpcEndpointType::GatewayLoadBalancer,
            "Interface" => VpcEndpointType::Interface,
            other => VpcEndpointType::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for VpcEndpointType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(VpcEndpointType::from(s))
    }
}
impl VpcEndpointType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            VpcEndpointType::Gateway => "Gateway",
            VpcEndpointType::GatewayLoadBalancer => "GatewayLoadBalancer",
            VpcEndpointType::Interface => "Interface",
            VpcEndpointType::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["Gateway", "GatewayLoadBalancer", "Interface"]
    }
}
impl AsRef<str> for VpcEndpointType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes a VPC endpoint connection to a service.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct VpcEndpointConnection {
    /// <p>The ID of the service to which the endpoint is connected.</p>
    #[doc(hidden)]
    pub service_id: std::option::Option<std::string::String>,
    /// <p>The ID of the VPC endpoint.</p>
    #[doc(hidden)]
    pub vpc_endpoint_id: std::option::Option<std::string::String>,
    /// <p>The ID of the Amazon Web Services account that owns the VPC endpoint.</p>
    #[doc(hidden)]
    pub vpc_endpoint_owner: std::option::Option<std::string::String>,
    /// <p>The state of the VPC endpoint.</p>
    #[doc(hidden)]
    pub vpc_endpoint_state: std::option::Option<crate::model::State>,
    /// <p>The date and time that the VPC endpoint was created.</p>
    #[doc(hidden)]
    pub creation_timestamp: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The DNS entries for the VPC endpoint.</p>
    #[doc(hidden)]
    pub dns_entries: std::option::Option<std::vec::Vec<crate::model::DnsEntry>>,
    /// <p>The Amazon Resource Names (ARNs) of the network load balancers for the service.</p>
    #[doc(hidden)]
    pub network_load_balancer_arns: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>The Amazon Resource Names (ARNs) of the Gateway Load Balancers for the service.</p>
    #[doc(hidden)]
    pub gateway_load_balancer_arns: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>The IP address type for the endpoint.</p>
    #[doc(hidden)]
    pub ip_address_type: std::option::Option<crate::model::IpAddressType>,
    /// <p>The ID of the VPC endpoint connection.</p>
    #[doc(hidden)]
    pub vpc_endpoint_connection_id: std::option::Option<std::string::String>,
    /// <p>The tags.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl VpcEndpointConnection {
    /// <p>The ID of the service to which the endpoint is connected.</p>
    pub fn service_id(&self) -> std::option::Option<&str> {
        self.service_id.as_deref()
    }
    /// <p>The ID of the VPC endpoint.</p>
    pub fn vpc_endpoint_id(&self) -> std::option::Option<&str> {
        self.vpc_endpoint_id.as_deref()
    }
    /// <p>The ID of the Amazon Web Services account that owns the VPC endpoint.</p>
    pub fn vpc_endpoint_owner(&self) -> std::option::Option<&str> {
        self.vpc_endpoint_owner.as_deref()
    }
    /// <p>The state of the VPC endpoint.</p>
    pub fn vpc_endpoint_state(&self) -> std::option::Option<&crate::model::State> {
        self.vpc_endpoint_state.as_ref()
    }
    /// <p>The date and time that the VPC endpoint was created.</p>
    pub fn creation_timestamp(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.creation_timestamp.as_ref()
    }
    /// <p>The DNS entries for the VPC endpoint.</p>
    pub fn dns_entries(&self) -> std::option::Option<&[crate::model::DnsEntry]> {
        self.dns_entries.as_deref()
    }
    /// <p>The Amazon Resource Names (ARNs) of the network load balancers for the service.</p>
    pub fn network_load_balancer_arns(&self) -> std::option::Option<&[std::string::String]> {
        self.network_load_balancer_arns.as_deref()
    }
    /// <p>The Amazon Resource Names (ARNs) of the Gateway Load Balancers for the service.</p>
    pub fn gateway_load_balancer_arns(&self) -> std::option::Option<&[std::string::String]> {
        self.gateway_load_balancer_arns.as_deref()
    }
    /// <p>The IP address type for the endpoint.</p>
    pub fn ip_address_type(&self) -> std::option::Option<&crate::model::IpAddressType> {
        self.ip_address_type.as_ref()
    }
    /// <p>The ID of the VPC endpoint connection.</p>
    pub fn vpc_endpoint_connection_id(&self) -> std::option::Option<&str> {
        self.vpc_endpoint_connection_id.as_deref()
    }
    /// <p>The tags.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
}
/// See [`VpcEndpointConnection`](crate::model::VpcEndpointConnection).
pub mod vpc_endpoint_connection {

    /// A builder for [`VpcEndpointConnection`](crate::model::VpcEndpointConnection).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) service_id: std::option::Option<std::string::String>,
        pub(crate) vpc_endpoint_id: std::option::Option<std::string::String>,
        pub(crate) vpc_endpoint_owner: std::option::Option<std::string::String>,
        pub(crate) vpc_endpoint_state: std::option::Option<crate::model::State>,
        pub(crate) creation_timestamp: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) dns_entries: std::option::Option<std::vec::Vec<crate::model::DnsEntry>>,
        pub(crate) network_load_balancer_arns:
            std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) gateway_load_balancer_arns:
            std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) ip_address_type: std::option::Option<crate::model::IpAddressType>,
        pub(crate) vpc_endpoint_connection_id: std::option::Option<std::string::String>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    }
    impl Builder {
        /// <p>The ID of the service to which the endpoint is connected.</p>
        pub fn service_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.service_id = Some(input.into());
            self
        }
        /// <p>The ID of the service to which the endpoint is connected.</p>
        pub fn set_service_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.service_id = input;
            self
        }
        /// <p>The ID of the VPC endpoint.</p>
        pub fn vpc_endpoint_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.vpc_endpoint_id = Some(input.into());
            self
        }
        /// <p>The ID of the VPC endpoint.</p>
        pub fn set_vpc_endpoint_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.vpc_endpoint_id = input;
            self
        }
        /// <p>The ID of the Amazon Web Services account that owns the VPC endpoint.</p>
        pub fn vpc_endpoint_owner(mut self, input: impl Into<std::string::String>) -> Self {
            self.vpc_endpoint_owner = Some(input.into());
            self
        }
        /// <p>The ID of the Amazon Web Services account that owns the VPC endpoint.</p>
        pub fn set_vpc_endpoint_owner(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.vpc_endpoint_owner = input;
            self
        }
        /// <p>The state of the VPC endpoint.</p>
        pub fn vpc_endpoint_state(mut self, input: crate::model::State) -> Self {
            self.vpc_endpoint_state = Some(input);
            self
        }
        /// <p>The state of the VPC endpoint.</p>
        pub fn set_vpc_endpoint_state(
            mut self,
            input: std::option::Option<crate::model::State>,
        ) -> Self {
            self.vpc_endpoint_state = input;
            self
        }
        /// <p>The date and time that the VPC endpoint was created.</p>
        pub fn creation_timestamp(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.creation_timestamp = Some(input);
            self
        }
        /// <p>The date and time that the VPC endpoint was created.</p>
        pub fn set_creation_timestamp(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.creation_timestamp = input;
            self
        }
        /// Appends an item to `dns_entries`.
        ///
        /// To override the contents of this collection use [`set_dns_entries`](Self::set_dns_entries).
        ///
        /// <p>The DNS entries for the VPC endpoint.</p>
        pub fn dns_entries(mut self, input: crate::model::DnsEntry) -> Self {
            let mut v = self.dns_entries.unwrap_or_default();
            v.push(input);
            self.dns_entries = Some(v);
            self
        }
        /// <p>The DNS entries for the VPC endpoint.</p>
        pub fn set_dns_entries(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::DnsEntry>>,
        ) -> Self {
            self.dns_entries = input;
            self
        }
        /// Appends an item to `network_load_balancer_arns`.
        ///
        /// To override the contents of this collection use [`set_network_load_balancer_arns`](Self::set_network_load_balancer_arns).
        ///
        /// <p>The Amazon Resource Names (ARNs) of the network load balancers for the service.</p>
        pub fn network_load_balancer_arns(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.network_load_balancer_arns.unwrap_or_default();
            v.push(input.into());
            self.network_load_balancer_arns = Some(v);
            self
        }
        /// <p>The Amazon Resource Names (ARNs) of the network load balancers for the service.</p>
        pub fn set_network_load_balancer_arns(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.network_load_balancer_arns = input;
            self
        }
        /// Appends an item to `gateway_load_balancer_arns`.
        ///
        /// To override the contents of this collection use [`set_gateway_load_balancer_arns`](Self::set_gateway_load_balancer_arns).
        ///
        /// <p>The Amazon Resource Names (ARNs) of the Gateway Load Balancers for the service.</p>
        pub fn gateway_load_balancer_arns(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.gateway_load_balancer_arns.unwrap_or_default();
            v.push(input.into());
            self.gateway_load_balancer_arns = Some(v);
            self
        }
        /// <p>The Amazon Resource Names (ARNs) of the Gateway Load Balancers for the service.</p>
        pub fn set_gateway_load_balancer_arns(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.gateway_load_balancer_arns = input;
            self
        }
        /// <p>The IP address type for the endpoint.</p>
        pub fn ip_address_type(mut self, input: crate::model::IpAddressType) -> Self {
            self.ip_address_type = Some(input);
            self
        }
        /// <p>The IP address type for the endpoint.</p>
        pub fn set_ip_address_type(
            mut self,
            input: std::option::Option<crate::model::IpAddressType>,
        ) -> Self {
            self.ip_address_type = input;
            self
        }
        /// <p>The ID of the VPC endpoint connection.</p>
        pub fn vpc_endpoint_connection_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.vpc_endpoint_connection_id = Some(input.into());
            self
        }
        /// <p>The ID of the VPC endpoint connection.</p>
        pub fn set_vpc_endpoint_connection_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.vpc_endpoint_connection_id = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>The tags.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>The tags.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// Consumes the builder and constructs a [`VpcEndpointConnection`](crate::model::VpcEndpointConnection).
        pub fn build(self) -> crate::model::VpcEndpointConnection {
            crate::model::VpcEndpointConnection {
                service_id: self.service_id,
                vpc_endpoint_id: self.vpc_endpoint_id,
                vpc_endpoint_owner: self.vpc_endpoint_owner,
                vpc_endpoint_state: self.vpc_endpoint_state,
                creation_timestamp: self.creation_timestamp,
                dns_entries: self.dns_entries,
                network_load_balancer_arns: self.network_load_balancer_arns,
                gateway_load_balancer_arns: self.gateway_load_balancer_arns,
                ip_address_type: self.ip_address_type,
                vpc_endpoint_connection_id: self.vpc_endpoint_connection_id,
                tags: self.tags,
            }
        }
    }
}
impl VpcEndpointConnection {
    /// Creates a new builder-style object to manufacture [`VpcEndpointConnection`](crate::model::VpcEndpointConnection).
    pub fn builder() -> crate::model::vpc_endpoint_connection::Builder {
        crate::model::vpc_endpoint_connection::Builder::default()
    }
}

/// <p>Describes a connection notification for a VPC endpoint or VPC endpoint service.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ConnectionNotification {
    /// <p>The ID of the notification.</p>
    #[doc(hidden)]
    pub connection_notification_id: std::option::Option<std::string::String>,
    /// <p>The ID of the endpoint service.</p>
    #[doc(hidden)]
    pub service_id: std::option::Option<std::string::String>,
    /// <p>The ID of the VPC endpoint.</p>
    #[doc(hidden)]
    pub vpc_endpoint_id: std::option::Option<std::string::String>,
    /// <p>The type of notification.</p>
    #[doc(hidden)]
    pub connection_notification_type: std::option::Option<crate::model::ConnectionNotificationType>,
    /// <p>The ARN of the SNS topic for the notification.</p>
    #[doc(hidden)]
    pub connection_notification_arn: std::option::Option<std::string::String>,
    /// <p>The events for the notification. Valid values are <code>Accept</code>, <code>Connect</code>, <code>Delete</code>, and <code>Reject</code>.</p>
    #[doc(hidden)]
    pub connection_events: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>The state of the notification.</p>
    #[doc(hidden)]
    pub connection_notification_state:
        std::option::Option<crate::model::ConnectionNotificationState>,
}
impl ConnectionNotification {
    /// <p>The ID of the notification.</p>
    pub fn connection_notification_id(&self) -> std::option::Option<&str> {
        self.connection_notification_id.as_deref()
    }
    /// <p>The ID of the endpoint service.</p>
    pub fn service_id(&self) -> std::option::Option<&str> {
        self.service_id.as_deref()
    }
    /// <p>The ID of the VPC endpoint.</p>
    pub fn vpc_endpoint_id(&self) -> std::option::Option<&str> {
        self.vpc_endpoint_id.as_deref()
    }
    /// <p>The type of notification.</p>
    pub fn connection_notification_type(
        &self,
    ) -> std::option::Option<&crate::model::ConnectionNotificationType> {
        self.connection_notification_type.as_ref()
    }
    /// <p>The ARN of the SNS topic for the notification.</p>
    pub fn connection_notification_arn(&self) -> std::option::Option<&str> {
        self.connection_notification_arn.as_deref()
    }
    /// <p>The events for the notification. Valid values are <code>Accept</code>, <code>Connect</code>, <code>Delete</code>, and <code>Reject</code>.</p>
    pub fn connection_events(&self) -> std::option::Option<&[std::string::String]> {
        self.connection_events.as_deref()
    }
    /// <p>The state of the notification.</p>
    pub fn connection_notification_state(
        &self,
    ) -> std::option::Option<&crate::model::ConnectionNotificationState> {
        self.connection_notification_state.as_ref()
    }
}
/// See [`ConnectionNotification`](crate::model::ConnectionNotification).
pub mod connection_notification {

    /// A builder for [`ConnectionNotification`](crate::model::ConnectionNotification).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) connection_notification_id: std::option::Option<std::string::String>,
        pub(crate) service_id: std::option::Option<std::string::String>,
        pub(crate) vpc_endpoint_id: std::option::Option<std::string::String>,
        pub(crate) connection_notification_type:
            std::option::Option<crate::model::ConnectionNotificationType>,
        pub(crate) connection_notification_arn: std::option::Option<std::string::String>,
        pub(crate) connection_events: std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) connection_notification_state:
            std::option::Option<crate::model::ConnectionNotificationState>,
    }
    impl Builder {
        /// <p>The ID of the notification.</p>
        pub fn connection_notification_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.connection_notification_id = Some(input.into());
            self
        }
        /// <p>The ID of the notification.</p>
        pub fn set_connection_notification_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.connection_notification_id = input;
            self
        }
        /// <p>The ID of the endpoint service.</p>
        pub fn service_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.service_id = Some(input.into());
            self
        }
        /// <p>The ID of the endpoint service.</p>
        pub fn set_service_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.service_id = input;
            self
        }
        /// <p>The ID of the VPC endpoint.</p>
        pub fn vpc_endpoint_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.vpc_endpoint_id = Some(input.into());
            self
        }
        /// <p>The ID of the VPC endpoint.</p>
        pub fn set_vpc_endpoint_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.vpc_endpoint_id = input;
            self
        }
        /// <p>The type of notification.</p>
        pub fn connection_notification_type(
            mut self,
            input: crate::model::ConnectionNotificationType,
        ) -> Self {
            self.connection_notification_type = Some(input);
            self
        }
        /// <p>The type of notification.</p>
        pub fn set_connection_notification_type(
            mut self,
            input: std::option::Option<crate::model::ConnectionNotificationType>,
        ) -> Self {
            self.connection_notification_type = input;
            self
        }
        /// <p>The ARN of the SNS topic for the notification.</p>
        pub fn connection_notification_arn(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.connection_notification_arn = Some(input.into());
            self
        }
        /// <p>The ARN of the SNS topic for the notification.</p>
        pub fn set_connection_notification_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.connection_notification_arn = input;
            self
        }
        /// Appends an item to `connection_events`.
        ///
        /// To override the contents of this collection use [`set_connection_events`](Self::set_connection_events).
        ///
        /// <p>The events for the notification. Valid values are <code>Accept</code>, <code>Connect</code>, <code>Delete</code>, and <code>Reject</code>.</p>
        pub fn connection_events(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.connection_events.unwrap_or_default();
            v.push(input.into());
            self.connection_events = Some(v);
            self
        }
        /// <p>The events for the notification. Valid values are <code>Accept</code>, <code>Connect</code>, <code>Delete</code>, and <code>Reject</code>.</p>
        pub fn set_connection_events(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.connection_events = input;
            self
        }
        /// <p>The state of the notification.</p>
        pub fn connection_notification_state(
            mut self,
            input: crate::model::ConnectionNotificationState,
        ) -> Self {
            self.connection_notification_state = Some(input);
            self
        }
        /// <p>The state of the notification.</p>
        pub fn set_connection_notification_state(
            mut self,
            input: std::option::Option<crate::model::ConnectionNotificationState>,
        ) -> Self {
            self.connection_notification_state = input;
            self
        }
        /// Consumes the builder and constructs a [`ConnectionNotification`](crate::model::ConnectionNotification).
        pub fn build(self) -> crate::model::ConnectionNotification {
            crate::model::ConnectionNotification {
                connection_notification_id: self.connection_notification_id,
                service_id: self.service_id,
                vpc_endpoint_id: self.vpc_endpoint_id,
                connection_notification_type: self.connection_notification_type,
                connection_notification_arn: self.connection_notification_arn,
                connection_events: self.connection_events,
                connection_notification_state: self.connection_notification_state,
            }
        }
    }
}
impl ConnectionNotification {
    /// Creates a new builder-style object to manufacture [`ConnectionNotification`](crate::model::ConnectionNotification).
    pub fn builder() -> crate::model::connection_notification::Builder {
        crate::model::connection_notification::Builder::default()
    }
}

/// When writing a match expression against `ConnectionNotificationState`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let connectionnotificationstate = unimplemented!();
/// match connectionnotificationstate {
///     ConnectionNotificationState::Disabled => { /* ... */ },
///     ConnectionNotificationState::Enabled => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `connectionnotificationstate` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `ConnectionNotificationState::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `ConnectionNotificationState::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `ConnectionNotificationState::NewFeature` is defined.
/// Specifically, when `connectionnotificationstate` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `ConnectionNotificationState::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 ConnectionNotificationState {
    #[allow(missing_docs)] // documentation missing in model
    Disabled,
    #[allow(missing_docs)] // documentation missing in model
    Enabled,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for ConnectionNotificationState {
    fn from(s: &str) -> Self {
        match s {
            "Disabled" => ConnectionNotificationState::Disabled,
            "Enabled" => ConnectionNotificationState::Enabled,
            other => ConnectionNotificationState::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for ConnectionNotificationState {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(ConnectionNotificationState::from(s))
    }
}
impl ConnectionNotificationState {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            ConnectionNotificationState::Disabled => "Disabled",
            ConnectionNotificationState::Enabled => "Enabled",
            ConnectionNotificationState::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["Disabled", "Enabled"]
    }
}
impl AsRef<str> for ConnectionNotificationState {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `ConnectionNotificationType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let connectionnotificationtype = unimplemented!();
/// match connectionnotificationtype {
///     ConnectionNotificationType::Topic => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `connectionnotificationtype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `ConnectionNotificationType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `ConnectionNotificationType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `ConnectionNotificationType::NewFeature` is defined.
/// Specifically, when `connectionnotificationtype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `ConnectionNotificationType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 ConnectionNotificationType {
    #[allow(missing_docs)] // documentation missing in model
    Topic,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for ConnectionNotificationType {
    fn from(s: &str) -> Self {
        match s {
            "Topic" => ConnectionNotificationType::Topic,
            other => ConnectionNotificationType::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for ConnectionNotificationType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(ConnectionNotificationType::from(s))
    }
}
impl ConnectionNotificationType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            ConnectionNotificationType::Topic => "Topic",
            ConnectionNotificationType::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["Topic"]
    }
}
impl AsRef<str> for ConnectionNotificationType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes the ClassicLink DNS support status of a VPC.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ClassicLinkDnsSupport {
    /// <p>Indicates whether ClassicLink DNS support is enabled for the VPC.</p>
    #[doc(hidden)]
    pub classic_link_dns_supported: std::option::Option<bool>,
    /// <p>The ID of the VPC.</p>
    #[doc(hidden)]
    pub vpc_id: std::option::Option<std::string::String>,
}
impl ClassicLinkDnsSupport {
    /// <p>Indicates whether ClassicLink DNS support is enabled for the VPC.</p>
    pub fn classic_link_dns_supported(&self) -> std::option::Option<bool> {
        self.classic_link_dns_supported
    }
    /// <p>The ID of the VPC.</p>
    pub fn vpc_id(&self) -> std::option::Option<&str> {
        self.vpc_id.as_deref()
    }
}
/// See [`ClassicLinkDnsSupport`](crate::model::ClassicLinkDnsSupport).
pub mod classic_link_dns_support {

    /// A builder for [`ClassicLinkDnsSupport`](crate::model::ClassicLinkDnsSupport).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) classic_link_dns_supported: std::option::Option<bool>,
        pub(crate) vpc_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>Indicates whether ClassicLink DNS support is enabled for the VPC.</p>
        pub fn classic_link_dns_supported(mut self, input: bool) -> Self {
            self.classic_link_dns_supported = Some(input);
            self
        }
        /// <p>Indicates whether ClassicLink DNS support is enabled for the VPC.</p>
        pub fn set_classic_link_dns_supported(mut self, input: std::option::Option<bool>) -> Self {
            self.classic_link_dns_supported = input;
            self
        }
        /// <p>The ID of the VPC.</p>
        pub fn vpc_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.vpc_id = Some(input.into());
            self
        }
        /// <p>The ID of the VPC.</p>
        pub fn set_vpc_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.vpc_id = input;
            self
        }
        /// Consumes the builder and constructs a [`ClassicLinkDnsSupport`](crate::model::ClassicLinkDnsSupport).
        pub fn build(self) -> crate::model::ClassicLinkDnsSupport {
            crate::model::ClassicLinkDnsSupport {
                classic_link_dns_supported: self.classic_link_dns_supported,
                vpc_id: self.vpc_id,
            }
        }
    }
}
impl ClassicLinkDnsSupport {
    /// Creates a new builder-style object to manufacture [`ClassicLinkDnsSupport`](crate::model::ClassicLinkDnsSupport).
    pub fn builder() -> crate::model::classic_link_dns_support::Builder {
        crate::model::classic_link_dns_support::Builder::default()
    }
}

/// <note>
/// <p>We are retiring EC2-Classic. We recommend that you migrate from EC2-Classic to a VPC. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html">Migrate from EC2-Classic to a VPC</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
/// </note>
/// <p>Describes whether a VPC is enabled for ClassicLink.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct VpcClassicLink {
    /// <p>Indicates whether the VPC is enabled for ClassicLink.</p>
    #[doc(hidden)]
    pub classic_link_enabled: std::option::Option<bool>,
    /// <p>Any tags assigned to the VPC.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    /// <p>The ID of the VPC.</p>
    #[doc(hidden)]
    pub vpc_id: std::option::Option<std::string::String>,
}
impl VpcClassicLink {
    /// <p>Indicates whether the VPC is enabled for ClassicLink.</p>
    pub fn classic_link_enabled(&self) -> std::option::Option<bool> {
        self.classic_link_enabled
    }
    /// <p>Any tags assigned to the VPC.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
    /// <p>The ID of the VPC.</p>
    pub fn vpc_id(&self) -> std::option::Option<&str> {
        self.vpc_id.as_deref()
    }
}
/// See [`VpcClassicLink`](crate::model::VpcClassicLink).
pub mod vpc_classic_link {

    /// A builder for [`VpcClassicLink`](crate::model::VpcClassicLink).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) classic_link_enabled: std::option::Option<bool>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        pub(crate) vpc_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>Indicates whether the VPC is enabled for ClassicLink.</p>
        pub fn classic_link_enabled(mut self, input: bool) -> Self {
            self.classic_link_enabled = Some(input);
            self
        }
        /// <p>Indicates whether the VPC is enabled for ClassicLink.</p>
        pub fn set_classic_link_enabled(mut self, input: std::option::Option<bool>) -> Self {
            self.classic_link_enabled = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>Any tags assigned to the VPC.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>Any tags assigned to the VPC.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// <p>The ID of the VPC.</p>
        pub fn vpc_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.vpc_id = Some(input.into());
            self
        }
        /// <p>The ID of the VPC.</p>
        pub fn set_vpc_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.vpc_id = input;
            self
        }
        /// Consumes the builder and constructs a [`VpcClassicLink`](crate::model::VpcClassicLink).
        pub fn build(self) -> crate::model::VpcClassicLink {
            crate::model::VpcClassicLink {
                classic_link_enabled: self.classic_link_enabled,
                tags: self.tags,
                vpc_id: self.vpc_id,
            }
        }
    }
}
impl VpcClassicLink {
    /// Creates a new builder-style object to manufacture [`VpcClassicLink`](crate::model::VpcClassicLink).
    pub fn builder() -> crate::model::vpc_classic_link::Builder {
        crate::model::vpc_classic_link::Builder::default()
    }
}

/// When writing a match expression against `VpcAttributeName`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let vpcattributename = unimplemented!();
/// match vpcattributename {
///     VpcAttributeName::EnableDnsHostnames => { /* ... */ },
///     VpcAttributeName::EnableDnsSupport => { /* ... */ },
///     VpcAttributeName::EnableNetworkAddressUsageMetrics => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `vpcattributename` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `VpcAttributeName::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `VpcAttributeName::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `VpcAttributeName::NewFeature` is defined.
/// Specifically, when `vpcattributename` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `VpcAttributeName::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 VpcAttributeName {
    #[allow(missing_docs)] // documentation missing in model
    EnableDnsHostnames,
    #[allow(missing_docs)] // documentation missing in model
    EnableDnsSupport,
    #[allow(missing_docs)] // documentation missing in model
    EnableNetworkAddressUsageMetrics,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for VpcAttributeName {
    fn from(s: &str) -> Self {
        match s {
            "enableDnsHostnames" => VpcAttributeName::EnableDnsHostnames,
            "enableDnsSupport" => VpcAttributeName::EnableDnsSupport,
            "enableNetworkAddressUsageMetrics" => {
                VpcAttributeName::EnableNetworkAddressUsageMetrics
            }
            other => VpcAttributeName::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for VpcAttributeName {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(VpcAttributeName::from(s))
    }
}
impl VpcAttributeName {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            VpcAttributeName::EnableDnsHostnames => "enableDnsHostnames",
            VpcAttributeName::EnableDnsSupport => "enableDnsSupport",
            VpcAttributeName::EnableNetworkAddressUsageMetrics => {
                "enableNetworkAddressUsageMetrics"
            }
            VpcAttributeName::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &[
            "enableDnsHostnames",
            "enableDnsSupport",
            "enableNetworkAddressUsageMetrics",
        ]
    }
}
impl AsRef<str> for VpcAttributeName {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes the volume status.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct VolumeStatusItem {
    /// <p>The details of the operation.</p>
    #[doc(hidden)]
    pub actions: std::option::Option<std::vec::Vec<crate::model::VolumeStatusAction>>,
    /// <p>The Availability Zone of the volume.</p>
    #[doc(hidden)]
    pub availability_zone: std::option::Option<std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the Outpost.</p>
    #[doc(hidden)]
    pub outpost_arn: std::option::Option<std::string::String>,
    /// <p>A list of events associated with the volume.</p>
    #[doc(hidden)]
    pub events: std::option::Option<std::vec::Vec<crate::model::VolumeStatusEvent>>,
    /// <p>The volume ID.</p>
    #[doc(hidden)]
    pub volume_id: std::option::Option<std::string::String>,
    /// <p>The volume status.</p>
    #[doc(hidden)]
    pub volume_status: std::option::Option<crate::model::VolumeStatusInfo>,
    /// <p>Information about the instances to which the volume is attached.</p>
    #[doc(hidden)]
    pub attachment_statuses:
        std::option::Option<std::vec::Vec<crate::model::VolumeStatusAttachmentStatus>>,
}
impl VolumeStatusItem {
    /// <p>The details of the operation.</p>
    pub fn actions(&self) -> std::option::Option<&[crate::model::VolumeStatusAction]> {
        self.actions.as_deref()
    }
    /// <p>The Availability Zone of the volume.</p>
    pub fn availability_zone(&self) -> std::option::Option<&str> {
        self.availability_zone.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the Outpost.</p>
    pub fn outpost_arn(&self) -> std::option::Option<&str> {
        self.outpost_arn.as_deref()
    }
    /// <p>A list of events associated with the volume.</p>
    pub fn events(&self) -> std::option::Option<&[crate::model::VolumeStatusEvent]> {
        self.events.as_deref()
    }
    /// <p>The volume ID.</p>
    pub fn volume_id(&self) -> std::option::Option<&str> {
        self.volume_id.as_deref()
    }
    /// <p>The volume status.</p>
    pub fn volume_status(&self) -> std::option::Option<&crate::model::VolumeStatusInfo> {
        self.volume_status.as_ref()
    }
    /// <p>Information about the instances to which the volume is attached.</p>
    pub fn attachment_statuses(
        &self,
    ) -> std::option::Option<&[crate::model::VolumeStatusAttachmentStatus]> {
        self.attachment_statuses.as_deref()
    }
}
/// See [`VolumeStatusItem`](crate::model::VolumeStatusItem).
pub mod volume_status_item {

    /// A builder for [`VolumeStatusItem`](crate::model::VolumeStatusItem).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) actions: std::option::Option<std::vec::Vec<crate::model::VolumeStatusAction>>,
        pub(crate) availability_zone: std::option::Option<std::string::String>,
        pub(crate) outpost_arn: std::option::Option<std::string::String>,
        pub(crate) events: std::option::Option<std::vec::Vec<crate::model::VolumeStatusEvent>>,
        pub(crate) volume_id: std::option::Option<std::string::String>,
        pub(crate) volume_status: std::option::Option<crate::model::VolumeStatusInfo>,
        pub(crate) attachment_statuses:
            std::option::Option<std::vec::Vec<crate::model::VolumeStatusAttachmentStatus>>,
    }
    impl Builder {
        /// Appends an item to `actions`.
        ///
        /// To override the contents of this collection use [`set_actions`](Self::set_actions).
        ///
        /// <p>The details of the operation.</p>
        pub fn actions(mut self, input: crate::model::VolumeStatusAction) -> Self {
            let mut v = self.actions.unwrap_or_default();
            v.push(input);
            self.actions = Some(v);
            self
        }
        /// <p>The details of the operation.</p>
        pub fn set_actions(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::VolumeStatusAction>>,
        ) -> Self {
            self.actions = input;
            self
        }
        /// <p>The Availability Zone of the volume.</p>
        pub fn availability_zone(mut self, input: impl Into<std::string::String>) -> Self {
            self.availability_zone = Some(input.into());
            self
        }
        /// <p>The Availability Zone of the volume.</p>
        pub fn set_availability_zone(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.availability_zone = input;
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the Outpost.</p>
        pub fn outpost_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.outpost_arn = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the Outpost.</p>
        pub fn set_outpost_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.outpost_arn = input;
            self
        }
        /// Appends an item to `events`.
        ///
        /// To override the contents of this collection use [`set_events`](Self::set_events).
        ///
        /// <p>A list of events associated with the volume.</p>
        pub fn events(mut self, input: crate::model::VolumeStatusEvent) -> Self {
            let mut v = self.events.unwrap_or_default();
            v.push(input);
            self.events = Some(v);
            self
        }
        /// <p>A list of events associated with the volume.</p>
        pub fn set_events(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::VolumeStatusEvent>>,
        ) -> Self {
            self.events = input;
            self
        }
        /// <p>The volume ID.</p>
        pub fn volume_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.volume_id = Some(input.into());
            self
        }
        /// <p>The volume ID.</p>
        pub fn set_volume_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.volume_id = input;
            self
        }
        /// <p>The volume status.</p>
        pub fn volume_status(mut self, input: crate::model::VolumeStatusInfo) -> Self {
            self.volume_status = Some(input);
            self
        }
        /// <p>The volume status.</p>
        pub fn set_volume_status(
            mut self,
            input: std::option::Option<crate::model::VolumeStatusInfo>,
        ) -> Self {
            self.volume_status = input;
            self
        }
        /// Appends an item to `attachment_statuses`.
        ///
        /// To override the contents of this collection use [`set_attachment_statuses`](Self::set_attachment_statuses).
        ///
        /// <p>Information about the instances to which the volume is attached.</p>
        pub fn attachment_statuses(
            mut self,
            input: crate::model::VolumeStatusAttachmentStatus,
        ) -> Self {
            let mut v = self.attachment_statuses.unwrap_or_default();
            v.push(input);
            self.attachment_statuses = Some(v);
            self
        }
        /// <p>Information about the instances to which the volume is attached.</p>
        pub fn set_attachment_statuses(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::VolumeStatusAttachmentStatus>>,
        ) -> Self {
            self.attachment_statuses = input;
            self
        }
        /// Consumes the builder and constructs a [`VolumeStatusItem`](crate::model::VolumeStatusItem).
        pub fn build(self) -> crate::model::VolumeStatusItem {
            crate::model::VolumeStatusItem {
                actions: self.actions,
                availability_zone: self.availability_zone,
                outpost_arn: self.outpost_arn,
                events: self.events,
                volume_id: self.volume_id,
                volume_status: self.volume_status,
                attachment_statuses: self.attachment_statuses,
            }
        }
    }
}
impl VolumeStatusItem {
    /// Creates a new builder-style object to manufacture [`VolumeStatusItem`](crate::model::VolumeStatusItem).
    pub fn builder() -> crate::model::volume_status_item::Builder {
        crate::model::volume_status_item::Builder::default()
    }
}

/// <p>Information about the instances to which the volume is attached.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct VolumeStatusAttachmentStatus {
    /// <p>The maximum IOPS supported by the attached instance.</p>
    #[doc(hidden)]
    pub io_performance: std::option::Option<std::string::String>,
    /// <p>The ID of the attached instance.</p>
    #[doc(hidden)]
    pub instance_id: std::option::Option<std::string::String>,
}
impl VolumeStatusAttachmentStatus {
    /// <p>The maximum IOPS supported by the attached instance.</p>
    pub fn io_performance(&self) -> std::option::Option<&str> {
        self.io_performance.as_deref()
    }
    /// <p>The ID of the attached instance.</p>
    pub fn instance_id(&self) -> std::option::Option<&str> {
        self.instance_id.as_deref()
    }
}
/// See [`VolumeStatusAttachmentStatus`](crate::model::VolumeStatusAttachmentStatus).
pub mod volume_status_attachment_status {

    /// A builder for [`VolumeStatusAttachmentStatus`](crate::model::VolumeStatusAttachmentStatus).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) io_performance: std::option::Option<std::string::String>,
        pub(crate) instance_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The maximum IOPS supported by the attached instance.</p>
        pub fn io_performance(mut self, input: impl Into<std::string::String>) -> Self {
            self.io_performance = Some(input.into());
            self
        }
        /// <p>The maximum IOPS supported by the attached instance.</p>
        pub fn set_io_performance(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.io_performance = input;
            self
        }
        /// <p>The ID of the attached instance.</p>
        pub fn instance_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.instance_id = Some(input.into());
            self
        }
        /// <p>The ID of the attached instance.</p>
        pub fn set_instance_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.instance_id = input;
            self
        }
        /// Consumes the builder and constructs a [`VolumeStatusAttachmentStatus`](crate::model::VolumeStatusAttachmentStatus).
        pub fn build(self) -> crate::model::VolumeStatusAttachmentStatus {
            crate::model::VolumeStatusAttachmentStatus {
                io_performance: self.io_performance,
                instance_id: self.instance_id,
            }
        }
    }
}
impl VolumeStatusAttachmentStatus {
    /// Creates a new builder-style object to manufacture [`VolumeStatusAttachmentStatus`](crate::model::VolumeStatusAttachmentStatus).
    pub fn builder() -> crate::model::volume_status_attachment_status::Builder {
        crate::model::volume_status_attachment_status::Builder::default()
    }
}

/// <p>Describes the status of a volume.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct VolumeStatusInfo {
    /// <p>The details of the volume status.</p>
    #[doc(hidden)]
    pub details: std::option::Option<std::vec::Vec<crate::model::VolumeStatusDetails>>,
    /// <p>The status of the volume.</p>
    #[doc(hidden)]
    pub status: std::option::Option<crate::model::VolumeStatusInfoStatus>,
}
impl VolumeStatusInfo {
    /// <p>The details of the volume status.</p>
    pub fn details(&self) -> std::option::Option<&[crate::model::VolumeStatusDetails]> {
        self.details.as_deref()
    }
    /// <p>The status of the volume.</p>
    pub fn status(&self) -> std::option::Option<&crate::model::VolumeStatusInfoStatus> {
        self.status.as_ref()
    }
}
/// See [`VolumeStatusInfo`](crate::model::VolumeStatusInfo).
pub mod volume_status_info {

    /// A builder for [`VolumeStatusInfo`](crate::model::VolumeStatusInfo).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) details: std::option::Option<std::vec::Vec<crate::model::VolumeStatusDetails>>,
        pub(crate) status: std::option::Option<crate::model::VolumeStatusInfoStatus>,
    }
    impl Builder {
        /// Appends an item to `details`.
        ///
        /// To override the contents of this collection use [`set_details`](Self::set_details).
        ///
        /// <p>The details of the volume status.</p>
        pub fn details(mut self, input: crate::model::VolumeStatusDetails) -> Self {
            let mut v = self.details.unwrap_or_default();
            v.push(input);
            self.details = Some(v);
            self
        }
        /// <p>The details of the volume status.</p>
        pub fn set_details(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::VolumeStatusDetails>>,
        ) -> Self {
            self.details = input;
            self
        }
        /// <p>The status of the volume.</p>
        pub fn status(mut self, input: crate::model::VolumeStatusInfoStatus) -> Self {
            self.status = Some(input);
            self
        }
        /// <p>The status of the volume.</p>
        pub fn set_status(
            mut self,
            input: std::option::Option<crate::model::VolumeStatusInfoStatus>,
        ) -> Self {
            self.status = input;
            self
        }
        /// Consumes the builder and constructs a [`VolumeStatusInfo`](crate::model::VolumeStatusInfo).
        pub fn build(self) -> crate::model::VolumeStatusInfo {
            crate::model::VolumeStatusInfo {
                details: self.details,
                status: self.status,
            }
        }
    }
}
impl VolumeStatusInfo {
    /// Creates a new builder-style object to manufacture [`VolumeStatusInfo`](crate::model::VolumeStatusInfo).
    pub fn builder() -> crate::model::volume_status_info::Builder {
        crate::model::volume_status_info::Builder::default()
    }
}

/// When writing a match expression against `VolumeStatusInfoStatus`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let volumestatusinfostatus = unimplemented!();
/// match volumestatusinfostatus {
///     VolumeStatusInfoStatus::Impaired => { /* ... */ },
///     VolumeStatusInfoStatus::InsufficientData => { /* ... */ },
///     VolumeStatusInfoStatus::Ok => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `volumestatusinfostatus` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `VolumeStatusInfoStatus::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `VolumeStatusInfoStatus::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `VolumeStatusInfoStatus::NewFeature` is defined.
/// Specifically, when `volumestatusinfostatus` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `VolumeStatusInfoStatus::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 VolumeStatusInfoStatus {
    #[allow(missing_docs)] // documentation missing in model
    Impaired,
    #[allow(missing_docs)] // documentation missing in model
    InsufficientData,
    #[allow(missing_docs)] // documentation missing in model
    Ok,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for VolumeStatusInfoStatus {
    fn from(s: &str) -> Self {
        match s {
            "impaired" => VolumeStatusInfoStatus::Impaired,
            "insufficient-data" => VolumeStatusInfoStatus::InsufficientData,
            "ok" => VolumeStatusInfoStatus::Ok,
            other => {
                VolumeStatusInfoStatus::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for VolumeStatusInfoStatus {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(VolumeStatusInfoStatus::from(s))
    }
}
impl VolumeStatusInfoStatus {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            VolumeStatusInfoStatus::Impaired => "impaired",
            VolumeStatusInfoStatus::InsufficientData => "insufficient-data",
            VolumeStatusInfoStatus::Ok => "ok",
            VolumeStatusInfoStatus::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["impaired", "insufficient-data", "ok"]
    }
}
impl AsRef<str> for VolumeStatusInfoStatus {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes a volume status.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct VolumeStatusDetails {
    /// <p>The name of the volume status.</p>
    #[doc(hidden)]
    pub name: std::option::Option<crate::model::VolumeStatusName>,
    /// <p>The intended status of the volume status.</p>
    #[doc(hidden)]
    pub status: std::option::Option<std::string::String>,
}
impl VolumeStatusDetails {
    /// <p>The name of the volume status.</p>
    pub fn name(&self) -> std::option::Option<&crate::model::VolumeStatusName> {
        self.name.as_ref()
    }
    /// <p>The intended status of the volume status.</p>
    pub fn status(&self) -> std::option::Option<&str> {
        self.status.as_deref()
    }
}
/// See [`VolumeStatusDetails`](crate::model::VolumeStatusDetails).
pub mod volume_status_details {

    /// A builder for [`VolumeStatusDetails`](crate::model::VolumeStatusDetails).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) name: std::option::Option<crate::model::VolumeStatusName>,
        pub(crate) status: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The name of the volume status.</p>
        pub fn name(mut self, input: crate::model::VolumeStatusName) -> Self {
            self.name = Some(input);
            self
        }
        /// <p>The name of the volume status.</p>
        pub fn set_name(
            mut self,
            input: std::option::Option<crate::model::VolumeStatusName>,
        ) -> Self {
            self.name = input;
            self
        }
        /// <p>The intended status of the volume status.</p>
        pub fn status(mut self, input: impl Into<std::string::String>) -> Self {
            self.status = Some(input.into());
            self
        }
        /// <p>The intended status of the volume status.</p>
        pub fn set_status(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.status = input;
            self
        }
        /// Consumes the builder and constructs a [`VolumeStatusDetails`](crate::model::VolumeStatusDetails).
        pub fn build(self) -> crate::model::VolumeStatusDetails {
            crate::model::VolumeStatusDetails {
                name: self.name,
                status: self.status,
            }
        }
    }
}
impl VolumeStatusDetails {
    /// Creates a new builder-style object to manufacture [`VolumeStatusDetails`](crate::model::VolumeStatusDetails).
    pub fn builder() -> crate::model::volume_status_details::Builder {
        crate::model::volume_status_details::Builder::default()
    }
}

/// When writing a match expression against `VolumeStatusName`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let volumestatusname = unimplemented!();
/// match volumestatusname {
///     VolumeStatusName::IoEnabled => { /* ... */ },
///     VolumeStatusName::IoPerformance => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `volumestatusname` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `VolumeStatusName::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `VolumeStatusName::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `VolumeStatusName::NewFeature` is defined.
/// Specifically, when `volumestatusname` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `VolumeStatusName::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 VolumeStatusName {
    #[allow(missing_docs)] // documentation missing in model
    IoEnabled,
    #[allow(missing_docs)] // documentation missing in model
    IoPerformance,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for VolumeStatusName {
    fn from(s: &str) -> Self {
        match s {
            "io-enabled" => VolumeStatusName::IoEnabled,
            "io-performance" => VolumeStatusName::IoPerformance,
            other => VolumeStatusName::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for VolumeStatusName {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(VolumeStatusName::from(s))
    }
}
impl VolumeStatusName {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            VolumeStatusName::IoEnabled => "io-enabled",
            VolumeStatusName::IoPerformance => "io-performance",
            VolumeStatusName::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["io-enabled", "io-performance"]
    }
}
impl AsRef<str> for VolumeStatusName {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes a volume status event.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct VolumeStatusEvent {
    /// <p>A description of the event.</p>
    #[doc(hidden)]
    pub description: std::option::Option<std::string::String>,
    /// <p>The ID of this event.</p>
    #[doc(hidden)]
    pub event_id: std::option::Option<std::string::String>,
    /// <p>The type of this event.</p>
    #[doc(hidden)]
    pub event_type: std::option::Option<std::string::String>,
    /// <p>The latest end time of the event.</p>
    #[doc(hidden)]
    pub not_after: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The earliest start time of the event.</p>
    #[doc(hidden)]
    pub not_before: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The ID of the instance associated with the event.</p>
    #[doc(hidden)]
    pub instance_id: std::option::Option<std::string::String>,
}
impl VolumeStatusEvent {
    /// <p>A description of the event.</p>
    pub fn description(&self) -> std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The ID of this event.</p>
    pub fn event_id(&self) -> std::option::Option<&str> {
        self.event_id.as_deref()
    }
    /// <p>The type of this event.</p>
    pub fn event_type(&self) -> std::option::Option<&str> {
        self.event_type.as_deref()
    }
    /// <p>The latest end time of the event.</p>
    pub fn not_after(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.not_after.as_ref()
    }
    /// <p>The earliest start time of the event.</p>
    pub fn not_before(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.not_before.as_ref()
    }
    /// <p>The ID of the instance associated with the event.</p>
    pub fn instance_id(&self) -> std::option::Option<&str> {
        self.instance_id.as_deref()
    }
}
/// See [`VolumeStatusEvent`](crate::model::VolumeStatusEvent).
pub mod volume_status_event {

    /// A builder for [`VolumeStatusEvent`](crate::model::VolumeStatusEvent).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) description: std::option::Option<std::string::String>,
        pub(crate) event_id: std::option::Option<std::string::String>,
        pub(crate) event_type: std::option::Option<std::string::String>,
        pub(crate) not_after: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) not_before: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) instance_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>A description of the event.</p>
        pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
            self.description = Some(input.into());
            self
        }
        /// <p>A description of the event.</p>
        pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.description = input;
            self
        }
        /// <p>The ID of this event.</p>
        pub fn event_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.event_id = Some(input.into());
            self
        }
        /// <p>The ID of this event.</p>
        pub fn set_event_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.event_id = input;
            self
        }
        /// <p>The type of this event.</p>
        pub fn event_type(mut self, input: impl Into<std::string::String>) -> Self {
            self.event_type = Some(input.into());
            self
        }
        /// <p>The type of this event.</p>
        pub fn set_event_type(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.event_type = input;
            self
        }
        /// <p>The latest end time of the event.</p>
        pub fn not_after(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.not_after = Some(input);
            self
        }
        /// <p>The latest end time of the event.</p>
        pub fn set_not_after(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.not_after = input;
            self
        }
        /// <p>The earliest start time of the event.</p>
        pub fn not_before(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.not_before = Some(input);
            self
        }
        /// <p>The earliest start time of the event.</p>
        pub fn set_not_before(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.not_before = input;
            self
        }
        /// <p>The ID of the instance associated with the event.</p>
        pub fn instance_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.instance_id = Some(input.into());
            self
        }
        /// <p>The ID of the instance associated with the event.</p>
        pub fn set_instance_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.instance_id = input;
            self
        }
        /// Consumes the builder and constructs a [`VolumeStatusEvent`](crate::model::VolumeStatusEvent).
        pub fn build(self) -> crate::model::VolumeStatusEvent {
            crate::model::VolumeStatusEvent {
                description: self.description,
                event_id: self.event_id,
                event_type: self.event_type,
                not_after: self.not_after,
                not_before: self.not_before,
                instance_id: self.instance_id,
            }
        }
    }
}
impl VolumeStatusEvent {
    /// Creates a new builder-style object to manufacture [`VolumeStatusEvent`](crate::model::VolumeStatusEvent).
    pub fn builder() -> crate::model::volume_status_event::Builder {
        crate::model::volume_status_event::Builder::default()
    }
}

/// <p>Describes a volume status operation code.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct VolumeStatusAction {
    /// <p>The code identifying the operation, for example, <code>enable-volume-io</code>.</p>
    #[doc(hidden)]
    pub code: std::option::Option<std::string::String>,
    /// <p>A description of the operation.</p>
    #[doc(hidden)]
    pub description: std::option::Option<std::string::String>,
    /// <p>The ID of the event associated with this operation.</p>
    #[doc(hidden)]
    pub event_id: std::option::Option<std::string::String>,
    /// <p>The event type associated with this operation.</p>
    #[doc(hidden)]
    pub event_type: std::option::Option<std::string::String>,
}
impl VolumeStatusAction {
    /// <p>The code identifying the operation, for example, <code>enable-volume-io</code>.</p>
    pub fn code(&self) -> std::option::Option<&str> {
        self.code.as_deref()
    }
    /// <p>A description of the operation.</p>
    pub fn description(&self) -> std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The ID of the event associated with this operation.</p>
    pub fn event_id(&self) -> std::option::Option<&str> {
        self.event_id.as_deref()
    }
    /// <p>The event type associated with this operation.</p>
    pub fn event_type(&self) -> std::option::Option<&str> {
        self.event_type.as_deref()
    }
}
/// See [`VolumeStatusAction`](crate::model::VolumeStatusAction).
pub mod volume_status_action {

    /// A builder for [`VolumeStatusAction`](crate::model::VolumeStatusAction).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) code: std::option::Option<std::string::String>,
        pub(crate) description: std::option::Option<std::string::String>,
        pub(crate) event_id: std::option::Option<std::string::String>,
        pub(crate) event_type: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The code identifying the operation, for example, <code>enable-volume-io</code>.</p>
        pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
            self.code = Some(input.into());
            self
        }
        /// <p>The code identifying the operation, for example, <code>enable-volume-io</code>.</p>
        pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.code = input;
            self
        }
        /// <p>A description of the operation.</p>
        pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
            self.description = Some(input.into());
            self
        }
        /// <p>A description of the operation.</p>
        pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.description = input;
            self
        }
        /// <p>The ID of the event associated with this operation.</p>
        pub fn event_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.event_id = Some(input.into());
            self
        }
        /// <p>The ID of the event associated with this operation.</p>
        pub fn set_event_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.event_id = input;
            self
        }
        /// <p>The event type associated with this operation.</p>
        pub fn event_type(mut self, input: impl Into<std::string::String>) -> Self {
            self.event_type = Some(input.into());
            self
        }
        /// <p>The event type associated with this operation.</p>
        pub fn set_event_type(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.event_type = input;
            self
        }
        /// Consumes the builder and constructs a [`VolumeStatusAction`](crate::model::VolumeStatusAction).
        pub fn build(self) -> crate::model::VolumeStatusAction {
            crate::model::VolumeStatusAction {
                code: self.code,
                description: self.description,
                event_id: self.event_id,
                event_type: self.event_type,
            }
        }
    }
}
impl VolumeStatusAction {
    /// Creates a new builder-style object to manufacture [`VolumeStatusAction`](crate::model::VolumeStatusAction).
    pub fn builder() -> crate::model::volume_status_action::Builder {
        crate::model::volume_status_action::Builder::default()
    }
}

/// <p>Describes a volume.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Volume {
    /// <p>Information about the volume attachments.</p>
    #[doc(hidden)]
    pub attachments: std::option::Option<std::vec::Vec<crate::model::VolumeAttachment>>,
    /// <p>The Availability Zone for the volume.</p>
    #[doc(hidden)]
    pub availability_zone: std::option::Option<std::string::String>,
    /// <p>The time stamp when volume creation was initiated.</p>
    #[doc(hidden)]
    pub create_time: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>Indicates whether the volume is encrypted.</p>
    #[doc(hidden)]
    pub encrypted: std::option::Option<bool>,
    /// <p>The Amazon Resource Name (ARN) of the Key Management Service (KMS) KMS key that was used to protect the volume encryption key for the volume.</p>
    #[doc(hidden)]
    pub kms_key_id: std::option::Option<std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the Outpost.</p>
    #[doc(hidden)]
    pub outpost_arn: std::option::Option<std::string::String>,
    /// <p>The size of the volume, in GiBs.</p>
    #[doc(hidden)]
    pub size: std::option::Option<i32>,
    /// <p>The snapshot from which the volume was created, if applicable.</p>
    #[doc(hidden)]
    pub snapshot_id: std::option::Option<std::string::String>,
    /// <p>The volume state.</p>
    #[doc(hidden)]
    pub state: std::option::Option<crate::model::VolumeState>,
    /// <p>The ID of the volume.</p>
    #[doc(hidden)]
    pub volume_id: std::option::Option<std::string::String>,
    /// <p>The number of I/O operations per second (IOPS). For <code>gp3</code>, <code>io1</code>, and <code>io2</code> volumes, this represents the number of IOPS that are provisioned for the volume. For <code>gp2</code> volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting.</p>
    #[doc(hidden)]
    pub iops: std::option::Option<i32>,
    /// <p>Any tags assigned to the volume.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    /// <p>The volume type.</p>
    #[doc(hidden)]
    pub volume_type: std::option::Option<crate::model::VolumeType>,
    /// <p>Indicates whether the volume was created using fast snapshot restore.</p>
    #[doc(hidden)]
    pub fast_restored: std::option::Option<bool>,
    /// <p>Indicates whether Amazon EBS Multi-Attach is enabled.</p>
    #[doc(hidden)]
    pub multi_attach_enabled: std::option::Option<bool>,
    /// <p>The throughput that the volume supports, in MiB/s.</p>
    #[doc(hidden)]
    pub throughput: std::option::Option<i32>,
}
impl Volume {
    /// <p>Information about the volume attachments.</p>
    pub fn attachments(&self) -> std::option::Option<&[crate::model::VolumeAttachment]> {
        self.attachments.as_deref()
    }
    /// <p>The Availability Zone for the volume.</p>
    pub fn availability_zone(&self) -> std::option::Option<&str> {
        self.availability_zone.as_deref()
    }
    /// <p>The time stamp when volume creation was initiated.</p>
    pub fn create_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.create_time.as_ref()
    }
    /// <p>Indicates whether the volume is encrypted.</p>
    pub fn encrypted(&self) -> std::option::Option<bool> {
        self.encrypted
    }
    /// <p>The Amazon Resource Name (ARN) of the Key Management Service (KMS) KMS key that was used to protect the volume encryption key for the volume.</p>
    pub fn kms_key_id(&self) -> std::option::Option<&str> {
        self.kms_key_id.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the Outpost.</p>
    pub fn outpost_arn(&self) -> std::option::Option<&str> {
        self.outpost_arn.as_deref()
    }
    /// <p>The size of the volume, in GiBs.</p>
    pub fn size(&self) -> std::option::Option<i32> {
        self.size
    }
    /// <p>The snapshot from which the volume was created, if applicable.</p>
    pub fn snapshot_id(&self) -> std::option::Option<&str> {
        self.snapshot_id.as_deref()
    }
    /// <p>The volume state.</p>
    pub fn state(&self) -> std::option::Option<&crate::model::VolumeState> {
        self.state.as_ref()
    }
    /// <p>The ID of the volume.</p>
    pub fn volume_id(&self) -> std::option::Option<&str> {
        self.volume_id.as_deref()
    }
    /// <p>The number of I/O operations per second (IOPS). For <code>gp3</code>, <code>io1</code>, and <code>io2</code> volumes, this represents the number of IOPS that are provisioned for the volume. For <code>gp2</code> volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting.</p>
    pub fn iops(&self) -> std::option::Option<i32> {
        self.iops
    }
    /// <p>Any tags assigned to the volume.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
    /// <p>The volume type.</p>
    pub fn volume_type(&self) -> std::option::Option<&crate::model::VolumeType> {
        self.volume_type.as_ref()
    }
    /// <p>Indicates whether the volume was created using fast snapshot restore.</p>
    pub fn fast_restored(&self) -> std::option::Option<bool> {
        self.fast_restored
    }
    /// <p>Indicates whether Amazon EBS Multi-Attach is enabled.</p>
    pub fn multi_attach_enabled(&self) -> std::option::Option<bool> {
        self.multi_attach_enabled
    }
    /// <p>The throughput that the volume supports, in MiB/s.</p>
    pub fn throughput(&self) -> std::option::Option<i32> {
        self.throughput
    }
}
/// See [`Volume`](crate::model::Volume).
pub mod volume {

    /// A builder for [`Volume`](crate::model::Volume).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) attachments: std::option::Option<std::vec::Vec<crate::model::VolumeAttachment>>,
        pub(crate) availability_zone: std::option::Option<std::string::String>,
        pub(crate) create_time: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) encrypted: std::option::Option<bool>,
        pub(crate) kms_key_id: std::option::Option<std::string::String>,
        pub(crate) outpost_arn: std::option::Option<std::string::String>,
        pub(crate) size: std::option::Option<i32>,
        pub(crate) snapshot_id: std::option::Option<std::string::String>,
        pub(crate) state: std::option::Option<crate::model::VolumeState>,
        pub(crate) volume_id: std::option::Option<std::string::String>,
        pub(crate) iops: std::option::Option<i32>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        pub(crate) volume_type: std::option::Option<crate::model::VolumeType>,
        pub(crate) fast_restored: std::option::Option<bool>,
        pub(crate) multi_attach_enabled: std::option::Option<bool>,
        pub(crate) throughput: std::option::Option<i32>,
    }
    impl Builder {
        /// Appends an item to `attachments`.
        ///
        /// To override the contents of this collection use [`set_attachments`](Self::set_attachments).
        ///
        /// <p>Information about the volume attachments.</p>
        pub fn attachments(mut self, input: crate::model::VolumeAttachment) -> Self {
            let mut v = self.attachments.unwrap_or_default();
            v.push(input);
            self.attachments = Some(v);
            self
        }
        /// <p>Information about the volume attachments.</p>
        pub fn set_attachments(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::VolumeAttachment>>,
        ) -> Self {
            self.attachments = input;
            self
        }
        /// <p>The Availability Zone for the volume.</p>
        pub fn availability_zone(mut self, input: impl Into<std::string::String>) -> Self {
            self.availability_zone = Some(input.into());
            self
        }
        /// <p>The Availability Zone for the volume.</p>
        pub fn set_availability_zone(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.availability_zone = input;
            self
        }
        /// <p>The time stamp when volume creation was initiated.</p>
        pub fn create_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.create_time = Some(input);
            self
        }
        /// <p>The time stamp when volume creation was initiated.</p>
        pub fn set_create_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.create_time = input;
            self
        }
        /// <p>Indicates whether the volume is encrypted.</p>
        pub fn encrypted(mut self, input: bool) -> Self {
            self.encrypted = Some(input);
            self
        }
        /// <p>Indicates whether the volume is encrypted.</p>
        pub fn set_encrypted(mut self, input: std::option::Option<bool>) -> Self {
            self.encrypted = input;
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the Key Management Service (KMS) KMS key that was used to protect the volume encryption key for the volume.</p>
        pub fn kms_key_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.kms_key_id = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the Key Management Service (KMS) KMS key that was used to protect the volume encryption key for the volume.</p>
        pub fn set_kms_key_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.kms_key_id = input;
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the Outpost.</p>
        pub fn outpost_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.outpost_arn = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the Outpost.</p>
        pub fn set_outpost_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.outpost_arn = input;
            self
        }
        /// <p>The size of the volume, in GiBs.</p>
        pub fn size(mut self, input: i32) -> Self {
            self.size = Some(input);
            self
        }
        /// <p>The size of the volume, in GiBs.</p>
        pub fn set_size(mut self, input: std::option::Option<i32>) -> Self {
            self.size = input;
            self
        }
        /// <p>The snapshot from which the volume was created, if applicable.</p>
        pub fn snapshot_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.snapshot_id = Some(input.into());
            self
        }
        /// <p>The snapshot from which the volume was created, if applicable.</p>
        pub fn set_snapshot_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.snapshot_id = input;
            self
        }
        /// <p>The volume state.</p>
        pub fn state(mut self, input: crate::model::VolumeState) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>The volume state.</p>
        pub fn set_state(mut self, input: std::option::Option<crate::model::VolumeState>) -> Self {
            self.state = input;
            self
        }
        /// <p>The ID of the volume.</p>
        pub fn volume_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.volume_id = Some(input.into());
            self
        }
        /// <p>The ID of the volume.</p>
        pub fn set_volume_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.volume_id = input;
            self
        }
        /// <p>The number of I/O operations per second (IOPS). For <code>gp3</code>, <code>io1</code>, and <code>io2</code> volumes, this represents the number of IOPS that are provisioned for the volume. For <code>gp2</code> volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting.</p>
        pub fn iops(mut self, input: i32) -> Self {
            self.iops = Some(input);
            self
        }
        /// <p>The number of I/O operations per second (IOPS). For <code>gp3</code>, <code>io1</code>, and <code>io2</code> volumes, this represents the number of IOPS that are provisioned for the volume. For <code>gp2</code> volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting.</p>
        pub fn set_iops(mut self, input: std::option::Option<i32>) -> Self {
            self.iops = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>Any tags assigned to the volume.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>Any tags assigned to the volume.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// <p>The volume type.</p>
        pub fn volume_type(mut self, input: crate::model::VolumeType) -> Self {
            self.volume_type = Some(input);
            self
        }
        /// <p>The volume type.</p>
        pub fn set_volume_type(
            mut self,
            input: std::option::Option<crate::model::VolumeType>,
        ) -> Self {
            self.volume_type = input;
            self
        }
        /// <p>Indicates whether the volume was created using fast snapshot restore.</p>
        pub fn fast_restored(mut self, input: bool) -> Self {
            self.fast_restored = Some(input);
            self
        }
        /// <p>Indicates whether the volume was created using fast snapshot restore.</p>
        pub fn set_fast_restored(mut self, input: std::option::Option<bool>) -> Self {
            self.fast_restored = input;
            self
        }
        /// <p>Indicates whether Amazon EBS Multi-Attach is enabled.</p>
        pub fn multi_attach_enabled(mut self, input: bool) -> Self {
            self.multi_attach_enabled = Some(input);
            self
        }
        /// <p>Indicates whether Amazon EBS Multi-Attach is enabled.</p>
        pub fn set_multi_attach_enabled(mut self, input: std::option::Option<bool>) -> Self {
            self.multi_attach_enabled = input;
            self
        }
        /// <p>The throughput that the volume supports, in MiB/s.</p>
        pub fn throughput(mut self, input: i32) -> Self {
            self.throughput = Some(input);
            self
        }
        /// <p>The throughput that the volume supports, in MiB/s.</p>
        pub fn set_throughput(mut self, input: std::option::Option<i32>) -> Self {
            self.throughput = input;
            self
        }
        /// Consumes the builder and constructs a [`Volume`](crate::model::Volume).
        pub fn build(self) -> crate::model::Volume {
            crate::model::Volume {
                attachments: self.attachments,
                availability_zone: self.availability_zone,
                create_time: self.create_time,
                encrypted: self.encrypted,
                kms_key_id: self.kms_key_id,
                outpost_arn: self.outpost_arn,
                size: self.size,
                snapshot_id: self.snapshot_id,
                state: self.state,
                volume_id: self.volume_id,
                iops: self.iops,
                tags: self.tags,
                volume_type: self.volume_type,
                fast_restored: self.fast_restored,
                multi_attach_enabled: self.multi_attach_enabled,
                throughput: self.throughput,
            }
        }
    }
}
impl Volume {
    /// Creates a new builder-style object to manufacture [`Volume`](crate::model::Volume).
    pub fn builder() -> crate::model::volume::Builder {
        crate::model::volume::Builder::default()
    }
}

/// When writing a match expression against `VolumeState`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let volumestate = unimplemented!();
/// match volumestate {
///     VolumeState::Available => { /* ... */ },
///     VolumeState::Creating => { /* ... */ },
///     VolumeState::Deleted => { /* ... */ },
///     VolumeState::Deleting => { /* ... */ },
///     VolumeState::Error => { /* ... */ },
///     VolumeState::InUse => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `volumestate` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `VolumeState::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `VolumeState::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `VolumeState::NewFeature` is defined.
/// Specifically, when `volumestate` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `VolumeState::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 VolumeState {
    #[allow(missing_docs)] // documentation missing in model
    Available,
    #[allow(missing_docs)] // documentation missing in model
    Creating,
    #[allow(missing_docs)] // documentation missing in model
    Deleted,
    #[allow(missing_docs)] // documentation missing in model
    Deleting,
    #[allow(missing_docs)] // documentation missing in model
    Error,
    #[allow(missing_docs)] // documentation missing in model
    InUse,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for VolumeState {
    fn from(s: &str) -> Self {
        match s {
            "available" => VolumeState::Available,
            "creating" => VolumeState::Creating,
            "deleted" => VolumeState::Deleted,
            "deleting" => VolumeState::Deleting,
            "error" => VolumeState::Error,
            "in-use" => VolumeState::InUse,
            other => VolumeState::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for VolumeState {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(VolumeState::from(s))
    }
}
impl VolumeState {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            VolumeState::Available => "available",
            VolumeState::Creating => "creating",
            VolumeState::Deleted => "deleted",
            VolumeState::Deleting => "deleting",
            VolumeState::Error => "error",
            VolumeState::InUse => "in-use",
            VolumeState::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &[
            "available",
            "creating",
            "deleted",
            "deleting",
            "error",
            "in-use",
        ]
    }
}
impl AsRef<str> for VolumeState {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes volume attachment details.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct VolumeAttachment {
    /// <p>The time stamp when the attachment initiated.</p>
    #[doc(hidden)]
    pub attach_time: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The device name.</p>
    #[doc(hidden)]
    pub device: std::option::Option<std::string::String>,
    /// <p>The ID of the instance.</p>
    #[doc(hidden)]
    pub instance_id: std::option::Option<std::string::String>,
    /// <p>The attachment state of the volume.</p>
    #[doc(hidden)]
    pub state: std::option::Option<crate::model::VolumeAttachmentState>,
    /// <p>The ID of the volume.</p>
    #[doc(hidden)]
    pub volume_id: std::option::Option<std::string::String>,
    /// <p>Indicates whether the EBS volume is deleted on instance termination.</p>
    #[doc(hidden)]
    pub delete_on_termination: std::option::Option<bool>,
}
impl VolumeAttachment {
    /// <p>The time stamp when the attachment initiated.</p>
    pub fn attach_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.attach_time.as_ref()
    }
    /// <p>The device name.</p>
    pub fn device(&self) -> std::option::Option<&str> {
        self.device.as_deref()
    }
    /// <p>The ID of the instance.</p>
    pub fn instance_id(&self) -> std::option::Option<&str> {
        self.instance_id.as_deref()
    }
    /// <p>The attachment state of the volume.</p>
    pub fn state(&self) -> std::option::Option<&crate::model::VolumeAttachmentState> {
        self.state.as_ref()
    }
    /// <p>The ID of the volume.</p>
    pub fn volume_id(&self) -> std::option::Option<&str> {
        self.volume_id.as_deref()
    }
    /// <p>Indicates whether the EBS volume is deleted on instance termination.</p>
    pub fn delete_on_termination(&self) -> std::option::Option<bool> {
        self.delete_on_termination
    }
}
/// See [`VolumeAttachment`](crate::model::VolumeAttachment).
pub mod volume_attachment {

    /// A builder for [`VolumeAttachment`](crate::model::VolumeAttachment).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) attach_time: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) device: std::option::Option<std::string::String>,
        pub(crate) instance_id: std::option::Option<std::string::String>,
        pub(crate) state: std::option::Option<crate::model::VolumeAttachmentState>,
        pub(crate) volume_id: std::option::Option<std::string::String>,
        pub(crate) delete_on_termination: std::option::Option<bool>,
    }
    impl Builder {
        /// <p>The time stamp when the attachment initiated.</p>
        pub fn attach_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.attach_time = Some(input);
            self
        }
        /// <p>The time stamp when the attachment initiated.</p>
        pub fn set_attach_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.attach_time = input;
            self
        }
        /// <p>The device name.</p>
        pub fn device(mut self, input: impl Into<std::string::String>) -> Self {
            self.device = Some(input.into());
            self
        }
        /// <p>The device name.</p>
        pub fn set_device(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.device = input;
            self
        }
        /// <p>The ID of the instance.</p>
        pub fn instance_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.instance_id = Some(input.into());
            self
        }
        /// <p>The ID of the instance.</p>
        pub fn set_instance_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.instance_id = input;
            self
        }
        /// <p>The attachment state of the volume.</p>
        pub fn state(mut self, input: crate::model::VolumeAttachmentState) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>The attachment state of the volume.</p>
        pub fn set_state(
            mut self,
            input: std::option::Option<crate::model::VolumeAttachmentState>,
        ) -> Self {
            self.state = input;
            self
        }
        /// <p>The ID of the volume.</p>
        pub fn volume_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.volume_id = Some(input.into());
            self
        }
        /// <p>The ID of the volume.</p>
        pub fn set_volume_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.volume_id = input;
            self
        }
        /// <p>Indicates whether the EBS volume is deleted on instance termination.</p>
        pub fn delete_on_termination(mut self, input: bool) -> Self {
            self.delete_on_termination = Some(input);
            self
        }
        /// <p>Indicates whether the EBS volume is deleted on instance termination.</p>
        pub fn set_delete_on_termination(mut self, input: std::option::Option<bool>) -> Self {
            self.delete_on_termination = input;
            self
        }
        /// Consumes the builder and constructs a [`VolumeAttachment`](crate::model::VolumeAttachment).
        pub fn build(self) -> crate::model::VolumeAttachment {
            crate::model::VolumeAttachment {
                attach_time: self.attach_time,
                device: self.device,
                instance_id: self.instance_id,
                state: self.state,
                volume_id: self.volume_id,
                delete_on_termination: self.delete_on_termination,
            }
        }
    }
}
impl VolumeAttachment {
    /// Creates a new builder-style object to manufacture [`VolumeAttachment`](crate::model::VolumeAttachment).
    pub fn builder() -> crate::model::volume_attachment::Builder {
        crate::model::volume_attachment::Builder::default()
    }
}

/// When writing a match expression against `VolumeAttributeName`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let volumeattributename = unimplemented!();
/// match volumeattributename {
///     VolumeAttributeName::AutoEnableIo => { /* ... */ },
///     VolumeAttributeName::ProductCodes => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `volumeattributename` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `VolumeAttributeName::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `VolumeAttributeName::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `VolumeAttributeName::NewFeature` is defined.
/// Specifically, when `volumeattributename` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `VolumeAttributeName::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 VolumeAttributeName {
    #[allow(missing_docs)] // documentation missing in model
    AutoEnableIo,
    #[allow(missing_docs)] // documentation missing in model
    ProductCodes,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for VolumeAttributeName {
    fn from(s: &str) -> Self {
        match s {
            "autoEnableIO" => VolumeAttributeName::AutoEnableIo,
            "productCodes" => VolumeAttributeName::ProductCodes,
            other => {
                VolumeAttributeName::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for VolumeAttributeName {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(VolumeAttributeName::from(s))
    }
}
impl VolumeAttributeName {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            VolumeAttributeName::AutoEnableIo => "autoEnableIO",
            VolumeAttributeName::ProductCodes => "productCodes",
            VolumeAttributeName::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["autoEnableIO", "productCodes"]
    }
}
impl AsRef<str> for VolumeAttributeName {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <note>
/// <p>Currently available in <b>limited preview only</b>. If you are interested in using this feature, contact your account manager.</p>
/// </note>
/// <p>Information about an association between a branch network interface with a trunk network interface.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TrunkInterfaceAssociation {
    /// <p>The ID of the association.</p>
    #[doc(hidden)]
    pub association_id: std::option::Option<std::string::String>,
    /// <p>The ID of the branch network interface.</p>
    #[doc(hidden)]
    pub branch_interface_id: std::option::Option<std::string::String>,
    /// <p>The ID of the trunk network interface.</p>
    #[doc(hidden)]
    pub trunk_interface_id: std::option::Option<std::string::String>,
    /// <p>The interface protocol. Valid values are <code>VLAN</code> and <code>GRE</code>.</p>
    #[doc(hidden)]
    pub interface_protocol: std::option::Option<crate::model::InterfaceProtocolType>,
    /// <p>The ID of the VLAN when you use the VLAN protocol.</p>
    #[doc(hidden)]
    pub vlan_id: std::option::Option<i32>,
    /// <p>The application key when you use the GRE protocol.</p>
    #[doc(hidden)]
    pub gre_key: std::option::Option<i32>,
    /// <p>The tags for the trunk interface association.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl TrunkInterfaceAssociation {
    /// <p>The ID of the association.</p>
    pub fn association_id(&self) -> std::option::Option<&str> {
        self.association_id.as_deref()
    }
    /// <p>The ID of the branch network interface.</p>
    pub fn branch_interface_id(&self) -> std::option::Option<&str> {
        self.branch_interface_id.as_deref()
    }
    /// <p>The ID of the trunk network interface.</p>
    pub fn trunk_interface_id(&self) -> std::option::Option<&str> {
        self.trunk_interface_id.as_deref()
    }
    /// <p>The interface protocol. Valid values are <code>VLAN</code> and <code>GRE</code>.</p>
    pub fn interface_protocol(&self) -> std::option::Option<&crate::model::InterfaceProtocolType> {
        self.interface_protocol.as_ref()
    }
    /// <p>The ID of the VLAN when you use the VLAN protocol.</p>
    pub fn vlan_id(&self) -> std::option::Option<i32> {
        self.vlan_id
    }
    /// <p>The application key when you use the GRE protocol.</p>
    pub fn gre_key(&self) -> std::option::Option<i32> {
        self.gre_key
    }
    /// <p>The tags for the trunk interface association.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
}
/// See [`TrunkInterfaceAssociation`](crate::model::TrunkInterfaceAssociation).
pub mod trunk_interface_association {

    /// A builder for [`TrunkInterfaceAssociation`](crate::model::TrunkInterfaceAssociation).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) association_id: std::option::Option<std::string::String>,
        pub(crate) branch_interface_id: std::option::Option<std::string::String>,
        pub(crate) trunk_interface_id: std::option::Option<std::string::String>,
        pub(crate) interface_protocol: std::option::Option<crate::model::InterfaceProtocolType>,
        pub(crate) vlan_id: std::option::Option<i32>,
        pub(crate) gre_key: std::option::Option<i32>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    }
    impl Builder {
        /// <p>The ID of the association.</p>
        pub fn association_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.association_id = Some(input.into());
            self
        }
        /// <p>The ID of the association.</p>
        pub fn set_association_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.association_id = input;
            self
        }
        /// <p>The ID of the branch network interface.</p>
        pub fn branch_interface_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.branch_interface_id = Some(input.into());
            self
        }
        /// <p>The ID of the branch network interface.</p>
        pub fn set_branch_interface_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.branch_interface_id = input;
            self
        }
        /// <p>The ID of the trunk network interface.</p>
        pub fn trunk_interface_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.trunk_interface_id = Some(input.into());
            self
        }
        /// <p>The ID of the trunk network interface.</p>
        pub fn set_trunk_interface_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.trunk_interface_id = input;
            self
        }
        /// <p>The interface protocol. Valid values are <code>VLAN</code> and <code>GRE</code>.</p>
        pub fn interface_protocol(mut self, input: crate::model::InterfaceProtocolType) -> Self {
            self.interface_protocol = Some(input);
            self
        }
        /// <p>The interface protocol. Valid values are <code>VLAN</code> and <code>GRE</code>.</p>
        pub fn set_interface_protocol(
            mut self,
            input: std::option::Option<crate::model::InterfaceProtocolType>,
        ) -> Self {
            self.interface_protocol = input;
            self
        }
        /// <p>The ID of the VLAN when you use the VLAN protocol.</p>
        pub fn vlan_id(mut self, input: i32) -> Self {
            self.vlan_id = Some(input);
            self
        }
        /// <p>The ID of the VLAN when you use the VLAN protocol.</p>
        pub fn set_vlan_id(mut self, input: std::option::Option<i32>) -> Self {
            self.vlan_id = input;
            self
        }
        /// <p>The application key when you use the GRE protocol.</p>
        pub fn gre_key(mut self, input: i32) -> Self {
            self.gre_key = Some(input);
            self
        }
        /// <p>The application key when you use the GRE protocol.</p>
        pub fn set_gre_key(mut self, input: std::option::Option<i32>) -> Self {
            self.gre_key = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>The tags for the trunk interface association.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>The tags for the trunk interface association.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// Consumes the builder and constructs a [`TrunkInterfaceAssociation`](crate::model::TrunkInterfaceAssociation).
        pub fn build(self) -> crate::model::TrunkInterfaceAssociation {
            crate::model::TrunkInterfaceAssociation {
                association_id: self.association_id,
                branch_interface_id: self.branch_interface_id,
                trunk_interface_id: self.trunk_interface_id,
                interface_protocol: self.interface_protocol,
                vlan_id: self.vlan_id,
                gre_key: self.gre_key,
                tags: self.tags,
            }
        }
    }
}
impl TrunkInterfaceAssociation {
    /// Creates a new builder-style object to manufacture [`TrunkInterfaceAssociation`](crate::model::TrunkInterfaceAssociation).
    pub fn builder() -> crate::model::trunk_interface_association::Builder {
        crate::model::trunk_interface_association::Builder::default()
    }
}

/// When writing a match expression against `InterfaceProtocolType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let interfaceprotocoltype = unimplemented!();
/// match interfaceprotocoltype {
///     InterfaceProtocolType::Gre => { /* ... */ },
///     InterfaceProtocolType::Vlan => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `interfaceprotocoltype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `InterfaceProtocolType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `InterfaceProtocolType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `InterfaceProtocolType::NewFeature` is defined.
/// Specifically, when `interfaceprotocoltype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `InterfaceProtocolType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 InterfaceProtocolType {
    #[allow(missing_docs)] // documentation missing in model
    Gre,
    #[allow(missing_docs)] // documentation missing in model
    Vlan,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for InterfaceProtocolType {
    fn from(s: &str) -> Self {
        match s {
            "GRE" => InterfaceProtocolType::Gre,
            "VLAN" => InterfaceProtocolType::Vlan,
            other => {
                InterfaceProtocolType::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for InterfaceProtocolType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(InterfaceProtocolType::from(s))
    }
}
impl InterfaceProtocolType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            InterfaceProtocolType::Gre => "GRE",
            InterfaceProtocolType::Vlan => "VLAN",
            InterfaceProtocolType::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["GRE", "VLAN"]
    }
}
impl AsRef<str> for InterfaceProtocolType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes a transit gateway route table.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TransitGatewayRouteTable {
    /// <p>The ID of the transit gateway route table.</p>
    #[doc(hidden)]
    pub transit_gateway_route_table_id: std::option::Option<std::string::String>,
    /// <p>The ID of the transit gateway.</p>
    #[doc(hidden)]
    pub transit_gateway_id: std::option::Option<std::string::String>,
    /// <p>The state of the transit gateway route table.</p>
    #[doc(hidden)]
    pub state: std::option::Option<crate::model::TransitGatewayRouteTableState>,
    /// <p>Indicates whether this is the default association route table for the transit gateway.</p>
    #[doc(hidden)]
    pub default_association_route_table: std::option::Option<bool>,
    /// <p>Indicates whether this is the default propagation route table for the transit gateway.</p>
    #[doc(hidden)]
    pub default_propagation_route_table: std::option::Option<bool>,
    /// <p>The creation time.</p>
    #[doc(hidden)]
    pub creation_time: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>Any tags assigned to the route table.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl TransitGatewayRouteTable {
    /// <p>The ID of the transit gateway route table.</p>
    pub fn transit_gateway_route_table_id(&self) -> std::option::Option<&str> {
        self.transit_gateway_route_table_id.as_deref()
    }
    /// <p>The ID of the transit gateway.</p>
    pub fn transit_gateway_id(&self) -> std::option::Option<&str> {
        self.transit_gateway_id.as_deref()
    }
    /// <p>The state of the transit gateway route table.</p>
    pub fn state(&self) -> std::option::Option<&crate::model::TransitGatewayRouteTableState> {
        self.state.as_ref()
    }
    /// <p>Indicates whether this is the default association route table for the transit gateway.</p>
    pub fn default_association_route_table(&self) -> std::option::Option<bool> {
        self.default_association_route_table
    }
    /// <p>Indicates whether this is the default propagation route table for the transit gateway.</p>
    pub fn default_propagation_route_table(&self) -> std::option::Option<bool> {
        self.default_propagation_route_table
    }
    /// <p>The creation time.</p>
    pub fn creation_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.creation_time.as_ref()
    }
    /// <p>Any tags assigned to the route table.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
}
/// See [`TransitGatewayRouteTable`](crate::model::TransitGatewayRouteTable).
pub mod transit_gateway_route_table {

    /// A builder for [`TransitGatewayRouteTable`](crate::model::TransitGatewayRouteTable).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) transit_gateway_route_table_id: std::option::Option<std::string::String>,
        pub(crate) transit_gateway_id: std::option::Option<std::string::String>,
        pub(crate) state: std::option::Option<crate::model::TransitGatewayRouteTableState>,
        pub(crate) default_association_route_table: std::option::Option<bool>,
        pub(crate) default_propagation_route_table: std::option::Option<bool>,
        pub(crate) creation_time: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    }
    impl Builder {
        /// <p>The ID of the transit gateway route table.</p>
        pub fn transit_gateway_route_table_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.transit_gateway_route_table_id = Some(input.into());
            self
        }
        /// <p>The ID of the transit gateway route table.</p>
        pub fn set_transit_gateway_route_table_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.transit_gateway_route_table_id = input;
            self
        }
        /// <p>The ID of the transit gateway.</p>
        pub fn transit_gateway_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.transit_gateway_id = Some(input.into());
            self
        }
        /// <p>The ID of the transit gateway.</p>
        pub fn set_transit_gateway_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.transit_gateway_id = input;
            self
        }
        /// <p>The state of the transit gateway route table.</p>
        pub fn state(mut self, input: crate::model::TransitGatewayRouteTableState) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>The state of the transit gateway route table.</p>
        pub fn set_state(
            mut self,
            input: std::option::Option<crate::model::TransitGatewayRouteTableState>,
        ) -> Self {
            self.state = input;
            self
        }
        /// <p>Indicates whether this is the default association route table for the transit gateway.</p>
        pub fn default_association_route_table(mut self, input: bool) -> Self {
            self.default_association_route_table = Some(input);
            self
        }
        /// <p>Indicates whether this is the default association route table for the transit gateway.</p>
        pub fn set_default_association_route_table(
            mut self,
            input: std::option::Option<bool>,
        ) -> Self {
            self.default_association_route_table = input;
            self
        }
        /// <p>Indicates whether this is the default propagation route table for the transit gateway.</p>
        pub fn default_propagation_route_table(mut self, input: bool) -> Self {
            self.default_propagation_route_table = Some(input);
            self
        }
        /// <p>Indicates whether this is the default propagation route table for the transit gateway.</p>
        pub fn set_default_propagation_route_table(
            mut self,
            input: std::option::Option<bool>,
        ) -> Self {
            self.default_propagation_route_table = input;
            self
        }
        /// <p>The creation time.</p>
        pub fn creation_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.creation_time = Some(input);
            self
        }
        /// <p>The creation time.</p>
        pub fn set_creation_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.creation_time = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>Any tags assigned to the route table.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>Any tags assigned to the route table.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// Consumes the builder and constructs a [`TransitGatewayRouteTable`](crate::model::TransitGatewayRouteTable).
        pub fn build(self) -> crate::model::TransitGatewayRouteTable {
            crate::model::TransitGatewayRouteTable {
                transit_gateway_route_table_id: self.transit_gateway_route_table_id,
                transit_gateway_id: self.transit_gateway_id,
                state: self.state,
                default_association_route_table: self.default_association_route_table,
                default_propagation_route_table: self.default_propagation_route_table,
                creation_time: self.creation_time,
                tags: self.tags,
            }
        }
    }
}
impl TransitGatewayRouteTable {
    /// Creates a new builder-style object to manufacture [`TransitGatewayRouteTable`](crate::model::TransitGatewayRouteTable).
    pub fn builder() -> crate::model::transit_gateway_route_table::Builder {
        crate::model::transit_gateway_route_table::Builder::default()
    }
}

/// When writing a match expression against `TransitGatewayRouteTableState`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let transitgatewayroutetablestate = unimplemented!();
/// match transitgatewayroutetablestate {
///     TransitGatewayRouteTableState::Available => { /* ... */ },
///     TransitGatewayRouteTableState::Deleted => { /* ... */ },
///     TransitGatewayRouteTableState::Deleting => { /* ... */ },
///     TransitGatewayRouteTableState::Pending => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `transitgatewayroutetablestate` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `TransitGatewayRouteTableState::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `TransitGatewayRouteTableState::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `TransitGatewayRouteTableState::NewFeature` is defined.
/// Specifically, when `transitgatewayroutetablestate` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `TransitGatewayRouteTableState::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 TransitGatewayRouteTableState {
    #[allow(missing_docs)] // documentation missing in model
    Available,
    #[allow(missing_docs)] // documentation missing in model
    Deleted,
    #[allow(missing_docs)] // documentation missing in model
    Deleting,
    #[allow(missing_docs)] // documentation missing in model
    Pending,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for TransitGatewayRouteTableState {
    fn from(s: &str) -> Self {
        match s {
            "available" => TransitGatewayRouteTableState::Available,
            "deleted" => TransitGatewayRouteTableState::Deleted,
            "deleting" => TransitGatewayRouteTableState::Deleting,
            "pending" => TransitGatewayRouteTableState::Pending,
            other => TransitGatewayRouteTableState::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for TransitGatewayRouteTableState {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(TransitGatewayRouteTableState::from(s))
    }
}
impl TransitGatewayRouteTableState {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            TransitGatewayRouteTableState::Available => "available",
            TransitGatewayRouteTableState::Deleted => "deleted",
            TransitGatewayRouteTableState::Deleting => "deleting",
            TransitGatewayRouteTableState::Pending => "pending",
            TransitGatewayRouteTableState::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["available", "deleted", "deleting", "pending"]
    }
}
impl AsRef<str> for TransitGatewayRouteTableState {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes a transit gateway route table announcement.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TransitGatewayRouteTableAnnouncement {
    /// <p>The ID of the transit gateway route table announcement.</p>
    #[doc(hidden)]
    pub transit_gateway_route_table_announcement_id: std::option::Option<std::string::String>,
    /// <p>The ID of the transit gateway.</p>
    #[doc(hidden)]
    pub transit_gateway_id: std::option::Option<std::string::String>,
    /// <p>The ID of the core network for the transit gateway route table announcement.</p>
    #[doc(hidden)]
    pub core_network_id: std::option::Option<std::string::String>,
    /// <p>The ID of the peer transit gateway.</p>
    #[doc(hidden)]
    pub peer_transit_gateway_id: std::option::Option<std::string::String>,
    /// <p>The ID of the core network ID for the peer.</p>
    #[doc(hidden)]
    pub peer_core_network_id: std::option::Option<std::string::String>,
    /// <p>The ID of the peering attachment.</p>
    #[doc(hidden)]
    pub peering_attachment_id: std::option::Option<std::string::String>,
    /// <p>The direction for the route table announcement.</p>
    #[doc(hidden)]
    pub announcement_direction:
        std::option::Option<crate::model::TransitGatewayRouteTableAnnouncementDirection>,
    /// <p>The ID of the transit gateway route table.</p>
    #[doc(hidden)]
    pub transit_gateway_route_table_id: std::option::Option<std::string::String>,
    /// <p>The state of the transit gateway announcement.</p>
    #[doc(hidden)]
    pub state: std::option::Option<crate::model::TransitGatewayRouteTableAnnouncementState>,
    /// <p>The timestamp when the transit gateway route table announcement was created.</p>
    #[doc(hidden)]
    pub creation_time: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The key-value pairs associated with the route table announcement.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl TransitGatewayRouteTableAnnouncement {
    /// <p>The ID of the transit gateway route table announcement.</p>
    pub fn transit_gateway_route_table_announcement_id(&self) -> std::option::Option<&str> {
        self.transit_gateway_route_table_announcement_id.as_deref()
    }
    /// <p>The ID of the transit gateway.</p>
    pub fn transit_gateway_id(&self) -> std::option::Option<&str> {
        self.transit_gateway_id.as_deref()
    }
    /// <p>The ID of the core network for the transit gateway route table announcement.</p>
    pub fn core_network_id(&self) -> std::option::Option<&str> {
        self.core_network_id.as_deref()
    }
    /// <p>The ID of the peer transit gateway.</p>
    pub fn peer_transit_gateway_id(&self) -> std::option::Option<&str> {
        self.peer_transit_gateway_id.as_deref()
    }
    /// <p>The ID of the core network ID for the peer.</p>
    pub fn peer_core_network_id(&self) -> std::option::Option<&str> {
        self.peer_core_network_id.as_deref()
    }
    /// <p>The ID of the peering attachment.</p>
    pub fn peering_attachment_id(&self) -> std::option::Option<&str> {
        self.peering_attachment_id.as_deref()
    }
    /// <p>The direction for the route table announcement.</p>
    pub fn announcement_direction(
        &self,
    ) -> std::option::Option<&crate::model::TransitGatewayRouteTableAnnouncementDirection> {
        self.announcement_direction.as_ref()
    }
    /// <p>The ID of the transit gateway route table.</p>
    pub fn transit_gateway_route_table_id(&self) -> std::option::Option<&str> {
        self.transit_gateway_route_table_id.as_deref()
    }
    /// <p>The state of the transit gateway announcement.</p>
    pub fn state(
        &self,
    ) -> std::option::Option<&crate::model::TransitGatewayRouteTableAnnouncementState> {
        self.state.as_ref()
    }
    /// <p>The timestamp when the transit gateway route table announcement was created.</p>
    pub fn creation_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.creation_time.as_ref()
    }
    /// <p>The key-value pairs associated with the route table announcement.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
}
/// See [`TransitGatewayRouteTableAnnouncement`](crate::model::TransitGatewayRouteTableAnnouncement).
pub mod transit_gateway_route_table_announcement {

    /// A builder for [`TransitGatewayRouteTableAnnouncement`](crate::model::TransitGatewayRouteTableAnnouncement).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) transit_gateway_route_table_announcement_id:
            std::option::Option<std::string::String>,
        pub(crate) transit_gateway_id: std::option::Option<std::string::String>,
        pub(crate) core_network_id: std::option::Option<std::string::String>,
        pub(crate) peer_transit_gateway_id: std::option::Option<std::string::String>,
        pub(crate) peer_core_network_id: std::option::Option<std::string::String>,
        pub(crate) peering_attachment_id: std::option::Option<std::string::String>,
        pub(crate) announcement_direction:
            std::option::Option<crate::model::TransitGatewayRouteTableAnnouncementDirection>,
        pub(crate) transit_gateway_route_table_id: std::option::Option<std::string::String>,
        pub(crate) state:
            std::option::Option<crate::model::TransitGatewayRouteTableAnnouncementState>,
        pub(crate) creation_time: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    }
    impl Builder {
        /// <p>The ID of the transit gateway route table announcement.</p>
        pub fn transit_gateway_route_table_announcement_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.transit_gateway_route_table_announcement_id = Some(input.into());
            self
        }
        /// <p>The ID of the transit gateway route table announcement.</p>
        pub fn set_transit_gateway_route_table_announcement_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.transit_gateway_route_table_announcement_id = input;
            self
        }
        /// <p>The ID of the transit gateway.</p>
        pub fn transit_gateway_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.transit_gateway_id = Some(input.into());
            self
        }
        /// <p>The ID of the transit gateway.</p>
        pub fn set_transit_gateway_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.transit_gateway_id = input;
            self
        }
        /// <p>The ID of the core network for the transit gateway route table announcement.</p>
        pub fn core_network_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.core_network_id = Some(input.into());
            self
        }
        /// <p>The ID of the core network for the transit gateway route table announcement.</p>
        pub fn set_core_network_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.core_network_id = input;
            self
        }
        /// <p>The ID of the peer transit gateway.</p>
        pub fn peer_transit_gateway_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.peer_transit_gateway_id = Some(input.into());
            self
        }
        /// <p>The ID of the peer transit gateway.</p>
        pub fn set_peer_transit_gateway_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.peer_transit_gateway_id = input;
            self
        }
        /// <p>The ID of the core network ID for the peer.</p>
        pub fn peer_core_network_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.peer_core_network_id = Some(input.into());
            self
        }
        /// <p>The ID of the core network ID for the peer.</p>
        pub fn set_peer_core_network_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.peer_core_network_id = input;
            self
        }
        /// <p>The ID of the peering attachment.</p>
        pub fn peering_attachment_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.peering_attachment_id = Some(input.into());
            self
        }
        /// <p>The ID of the peering attachment.</p>
        pub fn set_peering_attachment_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.peering_attachment_id = input;
            self
        }
        /// <p>The direction for the route table announcement.</p>
        pub fn announcement_direction(
            mut self,
            input: crate::model::TransitGatewayRouteTableAnnouncementDirection,
        ) -> Self {
            self.announcement_direction = Some(input);
            self
        }
        /// <p>The direction for the route table announcement.</p>
        pub fn set_announcement_direction(
            mut self,
            input: std::option::Option<crate::model::TransitGatewayRouteTableAnnouncementDirection>,
        ) -> Self {
            self.announcement_direction = input;
            self
        }
        /// <p>The ID of the transit gateway route table.</p>
        pub fn transit_gateway_route_table_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.transit_gateway_route_table_id = Some(input.into());
            self
        }
        /// <p>The ID of the transit gateway route table.</p>
        pub fn set_transit_gateway_route_table_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.transit_gateway_route_table_id = input;
            self
        }
        /// <p>The state of the transit gateway announcement.</p>
        pub fn state(
            mut self,
            input: crate::model::TransitGatewayRouteTableAnnouncementState,
        ) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>The state of the transit gateway announcement.</p>
        pub fn set_state(
            mut self,
            input: std::option::Option<crate::model::TransitGatewayRouteTableAnnouncementState>,
        ) -> Self {
            self.state = input;
            self
        }
        /// <p>The timestamp when the transit gateway route table announcement was created.</p>
        pub fn creation_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.creation_time = Some(input);
            self
        }
        /// <p>The timestamp when the transit gateway route table announcement was created.</p>
        pub fn set_creation_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.creation_time = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>The key-value pairs associated with the route table announcement.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>The key-value pairs associated with the route table announcement.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// Consumes the builder and constructs a [`TransitGatewayRouteTableAnnouncement`](crate::model::TransitGatewayRouteTableAnnouncement).
        pub fn build(self) -> crate::model::TransitGatewayRouteTableAnnouncement {
            crate::model::TransitGatewayRouteTableAnnouncement {
                transit_gateway_route_table_announcement_id: self
                    .transit_gateway_route_table_announcement_id,
                transit_gateway_id: self.transit_gateway_id,
                core_network_id: self.core_network_id,
                peer_transit_gateway_id: self.peer_transit_gateway_id,
                peer_core_network_id: self.peer_core_network_id,
                peering_attachment_id: self.peering_attachment_id,
                announcement_direction: self.announcement_direction,
                transit_gateway_route_table_id: self.transit_gateway_route_table_id,
                state: self.state,
                creation_time: self.creation_time,
                tags: self.tags,
            }
        }
    }
}
impl TransitGatewayRouteTableAnnouncement {
    /// Creates a new builder-style object to manufacture [`TransitGatewayRouteTableAnnouncement`](crate::model::TransitGatewayRouteTableAnnouncement).
    pub fn builder() -> crate::model::transit_gateway_route_table_announcement::Builder {
        crate::model::transit_gateway_route_table_announcement::Builder::default()
    }
}

/// When writing a match expression against `TransitGatewayRouteTableAnnouncementState`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let transitgatewayroutetableannouncementstate = unimplemented!();
/// match transitgatewayroutetableannouncementstate {
///     TransitGatewayRouteTableAnnouncementState::Available => { /* ... */ },
///     TransitGatewayRouteTableAnnouncementState::Deleted => { /* ... */ },
///     TransitGatewayRouteTableAnnouncementState::Deleting => { /* ... */ },
///     TransitGatewayRouteTableAnnouncementState::Failed => { /* ... */ },
///     TransitGatewayRouteTableAnnouncementState::Failing => { /* ... */ },
///     TransitGatewayRouteTableAnnouncementState::Pending => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `transitgatewayroutetableannouncementstate` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `TransitGatewayRouteTableAnnouncementState::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `TransitGatewayRouteTableAnnouncementState::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `TransitGatewayRouteTableAnnouncementState::NewFeature` is defined.
/// Specifically, when `transitgatewayroutetableannouncementstate` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `TransitGatewayRouteTableAnnouncementState::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 TransitGatewayRouteTableAnnouncementState {
    #[allow(missing_docs)] // documentation missing in model
    Available,
    #[allow(missing_docs)] // documentation missing in model
    Deleted,
    #[allow(missing_docs)] // documentation missing in model
    Deleting,
    #[allow(missing_docs)] // documentation missing in model
    Failed,
    #[allow(missing_docs)] // documentation missing in model
    Failing,
    #[allow(missing_docs)] // documentation missing in model
    Pending,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for TransitGatewayRouteTableAnnouncementState {
    fn from(s: &str) -> Self {
        match s {
            "available" => TransitGatewayRouteTableAnnouncementState::Available,
            "deleted" => TransitGatewayRouteTableAnnouncementState::Deleted,
            "deleting" => TransitGatewayRouteTableAnnouncementState::Deleting,
            "failed" => TransitGatewayRouteTableAnnouncementState::Failed,
            "failing" => TransitGatewayRouteTableAnnouncementState::Failing,
            "pending" => TransitGatewayRouteTableAnnouncementState::Pending,
            other => TransitGatewayRouteTableAnnouncementState::Unknown(
                crate::types::UnknownVariantValue(other.to_owned()),
            ),
        }
    }
}
impl std::str::FromStr for TransitGatewayRouteTableAnnouncementState {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(TransitGatewayRouteTableAnnouncementState::from(s))
    }
}
impl TransitGatewayRouteTableAnnouncementState {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            TransitGatewayRouteTableAnnouncementState::Available => "available",
            TransitGatewayRouteTableAnnouncementState::Deleted => "deleted",
            TransitGatewayRouteTableAnnouncementState::Deleting => "deleting",
            TransitGatewayRouteTableAnnouncementState::Failed => "failed",
            TransitGatewayRouteTableAnnouncementState::Failing => "failing",
            TransitGatewayRouteTableAnnouncementState::Pending => "pending",
            TransitGatewayRouteTableAnnouncementState::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &[
            "available",
            "deleted",
            "deleting",
            "failed",
            "failing",
            "pending",
        ]
    }
}
impl AsRef<str> for TransitGatewayRouteTableAnnouncementState {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `TransitGatewayRouteTableAnnouncementDirection`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let transitgatewayroutetableannouncementdirection = unimplemented!();
/// match transitgatewayroutetableannouncementdirection {
///     TransitGatewayRouteTableAnnouncementDirection::Incoming => { /* ... */ },
///     TransitGatewayRouteTableAnnouncementDirection::Outgoing => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `transitgatewayroutetableannouncementdirection` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `TransitGatewayRouteTableAnnouncementDirection::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `TransitGatewayRouteTableAnnouncementDirection::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `TransitGatewayRouteTableAnnouncementDirection::NewFeature` is defined.
/// Specifically, when `transitgatewayroutetableannouncementdirection` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `TransitGatewayRouteTableAnnouncementDirection::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 TransitGatewayRouteTableAnnouncementDirection {
    #[allow(missing_docs)] // documentation missing in model
    Incoming,
    #[allow(missing_docs)] // documentation missing in model
    Outgoing,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for TransitGatewayRouteTableAnnouncementDirection {
    fn from(s: &str) -> Self {
        match s {
            "incoming" => TransitGatewayRouteTableAnnouncementDirection::Incoming,
            "outgoing" => TransitGatewayRouteTableAnnouncementDirection::Outgoing,
            other => TransitGatewayRouteTableAnnouncementDirection::Unknown(
                crate::types::UnknownVariantValue(other.to_owned()),
            ),
        }
    }
}
impl std::str::FromStr for TransitGatewayRouteTableAnnouncementDirection {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(TransitGatewayRouteTableAnnouncementDirection::from(s))
    }
}
impl TransitGatewayRouteTableAnnouncementDirection {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            TransitGatewayRouteTableAnnouncementDirection::Incoming => "incoming",
            TransitGatewayRouteTableAnnouncementDirection::Outgoing => "outgoing",
            TransitGatewayRouteTableAnnouncementDirection::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["incoming", "outgoing"]
    }
}
impl AsRef<str> for TransitGatewayRouteTableAnnouncementDirection {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes a transit gateway policy table.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TransitGatewayPolicyTable {
    /// <p>The ID of the transit gateway policy table.</p>
    #[doc(hidden)]
    pub transit_gateway_policy_table_id: std::option::Option<std::string::String>,
    /// <p>The ID of the transit gateway.</p>
    #[doc(hidden)]
    pub transit_gateway_id: std::option::Option<std::string::String>,
    /// <p>The state of the transit gateway policy table</p>
    #[doc(hidden)]
    pub state: std::option::Option<crate::model::TransitGatewayPolicyTableState>,
    /// <p>The timestamp when the transit gateway policy table was created.</p>
    #[doc(hidden)]
    pub creation_time: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>he key-value pairs associated with the transit gateway policy table.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl TransitGatewayPolicyTable {
    /// <p>The ID of the transit gateway policy table.</p>
    pub fn transit_gateway_policy_table_id(&self) -> std::option::Option<&str> {
        self.transit_gateway_policy_table_id.as_deref()
    }
    /// <p>The ID of the transit gateway.</p>
    pub fn transit_gateway_id(&self) -> std::option::Option<&str> {
        self.transit_gateway_id.as_deref()
    }
    /// <p>The state of the transit gateway policy table</p>
    pub fn state(&self) -> std::option::Option<&crate::model::TransitGatewayPolicyTableState> {
        self.state.as_ref()
    }
    /// <p>The timestamp when the transit gateway policy table was created.</p>
    pub fn creation_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.creation_time.as_ref()
    }
    /// <p>he key-value pairs associated with the transit gateway policy table.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
}
/// See [`TransitGatewayPolicyTable`](crate::model::TransitGatewayPolicyTable).
pub mod transit_gateway_policy_table {

    /// A builder for [`TransitGatewayPolicyTable`](crate::model::TransitGatewayPolicyTable).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) transit_gateway_policy_table_id: std::option::Option<std::string::String>,
        pub(crate) transit_gateway_id: std::option::Option<std::string::String>,
        pub(crate) state: std::option::Option<crate::model::TransitGatewayPolicyTableState>,
        pub(crate) creation_time: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    }
    impl Builder {
        /// <p>The ID of the transit gateway policy table.</p>
        pub fn transit_gateway_policy_table_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.transit_gateway_policy_table_id = Some(input.into());
            self
        }
        /// <p>The ID of the transit gateway policy table.</p>
        pub fn set_transit_gateway_policy_table_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.transit_gateway_policy_table_id = input;
            self
        }
        /// <p>The ID of the transit gateway.</p>
        pub fn transit_gateway_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.transit_gateway_id = Some(input.into());
            self
        }
        /// <p>The ID of the transit gateway.</p>
        pub fn set_transit_gateway_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.transit_gateway_id = input;
            self
        }
        /// <p>The state of the transit gateway policy table</p>
        pub fn state(mut self, input: crate::model::TransitGatewayPolicyTableState) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>The state of the transit gateway policy table</p>
        pub fn set_state(
            mut self,
            input: std::option::Option<crate::model::TransitGatewayPolicyTableState>,
        ) -> Self {
            self.state = input;
            self
        }
        /// <p>The timestamp when the transit gateway policy table was created.</p>
        pub fn creation_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.creation_time = Some(input);
            self
        }
        /// <p>The timestamp when the transit gateway policy table was created.</p>
        pub fn set_creation_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.creation_time = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>he key-value pairs associated with the transit gateway policy table.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>he key-value pairs associated with the transit gateway policy table.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// Consumes the builder and constructs a [`TransitGatewayPolicyTable`](crate::model::TransitGatewayPolicyTable).
        pub fn build(self) -> crate::model::TransitGatewayPolicyTable {
            crate::model::TransitGatewayPolicyTable {
                transit_gateway_policy_table_id: self.transit_gateway_policy_table_id,
                transit_gateway_id: self.transit_gateway_id,
                state: self.state,
                creation_time: self.creation_time,
                tags: self.tags,
            }
        }
    }
}
impl TransitGatewayPolicyTable {
    /// Creates a new builder-style object to manufacture [`TransitGatewayPolicyTable`](crate::model::TransitGatewayPolicyTable).
    pub fn builder() -> crate::model::transit_gateway_policy_table::Builder {
        crate::model::transit_gateway_policy_table::Builder::default()
    }
}

/// When writing a match expression against `TransitGatewayPolicyTableState`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let transitgatewaypolicytablestate = unimplemented!();
/// match transitgatewaypolicytablestate {
///     TransitGatewayPolicyTableState::Available => { /* ... */ },
///     TransitGatewayPolicyTableState::Deleted => { /* ... */ },
///     TransitGatewayPolicyTableState::Deleting => { /* ... */ },
///     TransitGatewayPolicyTableState::Pending => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `transitgatewaypolicytablestate` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `TransitGatewayPolicyTableState::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `TransitGatewayPolicyTableState::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `TransitGatewayPolicyTableState::NewFeature` is defined.
/// Specifically, when `transitgatewaypolicytablestate` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `TransitGatewayPolicyTableState::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 TransitGatewayPolicyTableState {
    #[allow(missing_docs)] // documentation missing in model
    Available,
    #[allow(missing_docs)] // documentation missing in model
    Deleted,
    #[allow(missing_docs)] // documentation missing in model
    Deleting,
    #[allow(missing_docs)] // documentation missing in model
    Pending,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for TransitGatewayPolicyTableState {
    fn from(s: &str) -> Self {
        match s {
            "available" => TransitGatewayPolicyTableState::Available,
            "deleted" => TransitGatewayPolicyTableState::Deleted,
            "deleting" => TransitGatewayPolicyTableState::Deleting,
            "pending" => TransitGatewayPolicyTableState::Pending,
            other => TransitGatewayPolicyTableState::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for TransitGatewayPolicyTableState {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(TransitGatewayPolicyTableState::from(s))
    }
}
impl TransitGatewayPolicyTableState {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            TransitGatewayPolicyTableState::Available => "available",
            TransitGatewayPolicyTableState::Deleted => "deleted",
            TransitGatewayPolicyTableState::Deleting => "deleting",
            TransitGatewayPolicyTableState::Pending => "pending",
            TransitGatewayPolicyTableState::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["available", "deleted", "deleting", "pending"]
    }
}
impl AsRef<str> for TransitGatewayPolicyTableState {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes the transit gateway multicast domain.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TransitGatewayMulticastDomain {
    /// <p>The ID of the transit gateway multicast domain.</p>
    #[doc(hidden)]
    pub transit_gateway_multicast_domain_id: std::option::Option<std::string::String>,
    /// <p>The ID of the transit gateway.</p>
    #[doc(hidden)]
    pub transit_gateway_id: std::option::Option<std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the transit gateway multicast domain.</p>
    #[doc(hidden)]
    pub transit_gateway_multicast_domain_arn: std::option::Option<std::string::String>,
    /// <p> The ID of the Amazon Web Services account that owns the transit gateway multicast domain.</p>
    #[doc(hidden)]
    pub owner_id: std::option::Option<std::string::String>,
    /// <p>The options for the transit gateway multicast domain.</p>
    #[doc(hidden)]
    pub options: std::option::Option<crate::model::TransitGatewayMulticastDomainOptions>,
    /// <p>The state of the transit gateway multicast domain.</p>
    #[doc(hidden)]
    pub state: std::option::Option<crate::model::TransitGatewayMulticastDomainState>,
    /// <p>The time the transit gateway multicast domain was created.</p>
    #[doc(hidden)]
    pub creation_time: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The tags for the transit gateway multicast domain.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl TransitGatewayMulticastDomain {
    /// <p>The ID of the transit gateway multicast domain.</p>
    pub fn transit_gateway_multicast_domain_id(&self) -> std::option::Option<&str> {
        self.transit_gateway_multicast_domain_id.as_deref()
    }
    /// <p>The ID of the transit gateway.</p>
    pub fn transit_gateway_id(&self) -> std::option::Option<&str> {
        self.transit_gateway_id.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the transit gateway multicast domain.</p>
    pub fn transit_gateway_multicast_domain_arn(&self) -> std::option::Option<&str> {
        self.transit_gateway_multicast_domain_arn.as_deref()
    }
    /// <p> The ID of the Amazon Web Services account that owns the transit gateway multicast domain.</p>
    pub fn owner_id(&self) -> std::option::Option<&str> {
        self.owner_id.as_deref()
    }
    /// <p>The options for the transit gateway multicast domain.</p>
    pub fn options(
        &self,
    ) -> std::option::Option<&crate::model::TransitGatewayMulticastDomainOptions> {
        self.options.as_ref()
    }
    /// <p>The state of the transit gateway multicast domain.</p>
    pub fn state(&self) -> std::option::Option<&crate::model::TransitGatewayMulticastDomainState> {
        self.state.as_ref()
    }
    /// <p>The time the transit gateway multicast domain was created.</p>
    pub fn creation_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.creation_time.as_ref()
    }
    /// <p>The tags for the transit gateway multicast domain.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
}
/// See [`TransitGatewayMulticastDomain`](crate::model::TransitGatewayMulticastDomain).
pub mod transit_gateway_multicast_domain {

    /// A builder for [`TransitGatewayMulticastDomain`](crate::model::TransitGatewayMulticastDomain).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) transit_gateway_multicast_domain_id: std::option::Option<std::string::String>,
        pub(crate) transit_gateway_id: std::option::Option<std::string::String>,
        pub(crate) transit_gateway_multicast_domain_arn: std::option::Option<std::string::String>,
        pub(crate) owner_id: std::option::Option<std::string::String>,
        pub(crate) options: std::option::Option<crate::model::TransitGatewayMulticastDomainOptions>,
        pub(crate) state: std::option::Option<crate::model::TransitGatewayMulticastDomainState>,
        pub(crate) creation_time: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    }
    impl Builder {
        /// <p>The ID of the transit gateway multicast domain.</p>
        pub fn transit_gateway_multicast_domain_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.transit_gateway_multicast_domain_id = Some(input.into());
            self
        }
        /// <p>The ID of the transit gateway multicast domain.</p>
        pub fn set_transit_gateway_multicast_domain_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.transit_gateway_multicast_domain_id = input;
            self
        }
        /// <p>The ID of the transit gateway.</p>
        pub fn transit_gateway_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.transit_gateway_id = Some(input.into());
            self
        }
        /// <p>The ID of the transit gateway.</p>
        pub fn set_transit_gateway_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.transit_gateway_id = input;
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the transit gateway multicast domain.</p>
        pub fn transit_gateway_multicast_domain_arn(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.transit_gateway_multicast_domain_arn = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the transit gateway multicast domain.</p>
        pub fn set_transit_gateway_multicast_domain_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.transit_gateway_multicast_domain_arn = input;
            self
        }
        /// <p> The ID of the Amazon Web Services account that owns the transit gateway multicast domain.</p>
        pub fn owner_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.owner_id = Some(input.into());
            self
        }
        /// <p> The ID of the Amazon Web Services account that owns the transit gateway multicast domain.</p>
        pub fn set_owner_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.owner_id = input;
            self
        }
        /// <p>The options for the transit gateway multicast domain.</p>
        pub fn options(
            mut self,
            input: crate::model::TransitGatewayMulticastDomainOptions,
        ) -> Self {
            self.options = Some(input);
            self
        }
        /// <p>The options for the transit gateway multicast domain.</p>
        pub fn set_options(
            mut self,
            input: std::option::Option<crate::model::TransitGatewayMulticastDomainOptions>,
        ) -> Self {
            self.options = input;
            self
        }
        /// <p>The state of the transit gateway multicast domain.</p>
        pub fn state(mut self, input: crate::model::TransitGatewayMulticastDomainState) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>The state of the transit gateway multicast domain.</p>
        pub fn set_state(
            mut self,
            input: std::option::Option<crate::model::TransitGatewayMulticastDomainState>,
        ) -> Self {
            self.state = input;
            self
        }
        /// <p>The time the transit gateway multicast domain was created.</p>
        pub fn creation_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.creation_time = Some(input);
            self
        }
        /// <p>The time the transit gateway multicast domain was created.</p>
        pub fn set_creation_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.creation_time = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>The tags for the transit gateway multicast domain.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>The tags for the transit gateway multicast domain.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// Consumes the builder and constructs a [`TransitGatewayMulticastDomain`](crate::model::TransitGatewayMulticastDomain).
        pub fn build(self) -> crate::model::TransitGatewayMulticastDomain {
            crate::model::TransitGatewayMulticastDomain {
                transit_gateway_multicast_domain_id: self.transit_gateway_multicast_domain_id,
                transit_gateway_id: self.transit_gateway_id,
                transit_gateway_multicast_domain_arn: self.transit_gateway_multicast_domain_arn,
                owner_id: self.owner_id,
                options: self.options,
                state: self.state,
                creation_time: self.creation_time,
                tags: self.tags,
            }
        }
    }
}
impl TransitGatewayMulticastDomain {
    /// Creates a new builder-style object to manufacture [`TransitGatewayMulticastDomain`](crate::model::TransitGatewayMulticastDomain).
    pub fn builder() -> crate::model::transit_gateway_multicast_domain::Builder {
        crate::model::transit_gateway_multicast_domain::Builder::default()
    }
}

/// When writing a match expression against `TransitGatewayMulticastDomainState`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let transitgatewaymulticastdomainstate = unimplemented!();
/// match transitgatewaymulticastdomainstate {
///     TransitGatewayMulticastDomainState::Available => { /* ... */ },
///     TransitGatewayMulticastDomainState::Deleted => { /* ... */ },
///     TransitGatewayMulticastDomainState::Deleting => { /* ... */ },
///     TransitGatewayMulticastDomainState::Pending => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `transitgatewaymulticastdomainstate` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `TransitGatewayMulticastDomainState::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `TransitGatewayMulticastDomainState::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `TransitGatewayMulticastDomainState::NewFeature` is defined.
/// Specifically, when `transitgatewaymulticastdomainstate` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `TransitGatewayMulticastDomainState::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 TransitGatewayMulticastDomainState {
    #[allow(missing_docs)] // documentation missing in model
    Available,
    #[allow(missing_docs)] // documentation missing in model
    Deleted,
    #[allow(missing_docs)] // documentation missing in model
    Deleting,
    #[allow(missing_docs)] // documentation missing in model
    Pending,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for TransitGatewayMulticastDomainState {
    fn from(s: &str) -> Self {
        match s {
            "available" => TransitGatewayMulticastDomainState::Available,
            "deleted" => TransitGatewayMulticastDomainState::Deleted,
            "deleting" => TransitGatewayMulticastDomainState::Deleting,
            "pending" => TransitGatewayMulticastDomainState::Pending,
            other => TransitGatewayMulticastDomainState::Unknown(
                crate::types::UnknownVariantValue(other.to_owned()),
            ),
        }
    }
}
impl std::str::FromStr for TransitGatewayMulticastDomainState {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(TransitGatewayMulticastDomainState::from(s))
    }
}
impl TransitGatewayMulticastDomainState {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            TransitGatewayMulticastDomainState::Available => "available",
            TransitGatewayMulticastDomainState::Deleted => "deleted",
            TransitGatewayMulticastDomainState::Deleting => "deleting",
            TransitGatewayMulticastDomainState::Pending => "pending",
            TransitGatewayMulticastDomainState::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["available", "deleted", "deleting", "pending"]
    }
}
impl AsRef<str> for TransitGatewayMulticastDomainState {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes the options for a transit gateway multicast domain.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TransitGatewayMulticastDomainOptions {
    /// <p>Indicates whether Internet Group Management Protocol (IGMP) version 2 is turned on for the transit gateway multicast domain.</p>
    #[doc(hidden)]
    pub igmpv2_support: std::option::Option<crate::model::Igmpv2SupportValue>,
    /// <p>Indicates whether support for statically configuring transit gateway multicast group sources is turned on.</p>
    #[doc(hidden)]
    pub static_sources_support: std::option::Option<crate::model::StaticSourcesSupportValue>,
    /// <p>Indicates whether to automatically cross-account subnet associations that are associated with the transit gateway multicast domain.</p>
    #[doc(hidden)]
    pub auto_accept_shared_associations:
        std::option::Option<crate::model::AutoAcceptSharedAssociationsValue>,
}
impl TransitGatewayMulticastDomainOptions {
    /// <p>Indicates whether Internet Group Management Protocol (IGMP) version 2 is turned on for the transit gateway multicast domain.</p>
    pub fn igmpv2_support(&self) -> std::option::Option<&crate::model::Igmpv2SupportValue> {
        self.igmpv2_support.as_ref()
    }
    /// <p>Indicates whether support for statically configuring transit gateway multicast group sources is turned on.</p>
    pub fn static_sources_support(
        &self,
    ) -> std::option::Option<&crate::model::StaticSourcesSupportValue> {
        self.static_sources_support.as_ref()
    }
    /// <p>Indicates whether to automatically cross-account subnet associations that are associated with the transit gateway multicast domain.</p>
    pub fn auto_accept_shared_associations(
        &self,
    ) -> std::option::Option<&crate::model::AutoAcceptSharedAssociationsValue> {
        self.auto_accept_shared_associations.as_ref()
    }
}
/// See [`TransitGatewayMulticastDomainOptions`](crate::model::TransitGatewayMulticastDomainOptions).
pub mod transit_gateway_multicast_domain_options {

    /// A builder for [`TransitGatewayMulticastDomainOptions`](crate::model::TransitGatewayMulticastDomainOptions).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) igmpv2_support: std::option::Option<crate::model::Igmpv2SupportValue>,
        pub(crate) static_sources_support:
            std::option::Option<crate::model::StaticSourcesSupportValue>,
        pub(crate) auto_accept_shared_associations:
            std::option::Option<crate::model::AutoAcceptSharedAssociationsValue>,
    }
    impl Builder {
        /// <p>Indicates whether Internet Group Management Protocol (IGMP) version 2 is turned on for the transit gateway multicast domain.</p>
        pub fn igmpv2_support(mut self, input: crate::model::Igmpv2SupportValue) -> Self {
            self.igmpv2_support = Some(input);
            self
        }
        /// <p>Indicates whether Internet Group Management Protocol (IGMP) version 2 is turned on for the transit gateway multicast domain.</p>
        pub fn set_igmpv2_support(
            mut self,
            input: std::option::Option<crate::model::Igmpv2SupportValue>,
        ) -> Self {
            self.igmpv2_support = input;
            self
        }
        /// <p>Indicates whether support for statically configuring transit gateway multicast group sources is turned on.</p>
        pub fn static_sources_support(
            mut self,
            input: crate::model::StaticSourcesSupportValue,
        ) -> Self {
            self.static_sources_support = Some(input);
            self
        }
        /// <p>Indicates whether support for statically configuring transit gateway multicast group sources is turned on.</p>
        pub fn set_static_sources_support(
            mut self,
            input: std::option::Option<crate::model::StaticSourcesSupportValue>,
        ) -> Self {
            self.static_sources_support = input;
            self
        }
        /// <p>Indicates whether to automatically cross-account subnet associations that are associated with the transit gateway multicast domain.</p>
        pub fn auto_accept_shared_associations(
            mut self,
            input: crate::model::AutoAcceptSharedAssociationsValue,
        ) -> Self {
            self.auto_accept_shared_associations = Some(input);
            self
        }
        /// <p>Indicates whether to automatically cross-account subnet associations that are associated with the transit gateway multicast domain.</p>
        pub fn set_auto_accept_shared_associations(
            mut self,
            input: std::option::Option<crate::model::AutoAcceptSharedAssociationsValue>,
        ) -> Self {
            self.auto_accept_shared_associations = input;
            self
        }
        /// Consumes the builder and constructs a [`TransitGatewayMulticastDomainOptions`](crate::model::TransitGatewayMulticastDomainOptions).
        pub fn build(self) -> crate::model::TransitGatewayMulticastDomainOptions {
            crate::model::TransitGatewayMulticastDomainOptions {
                igmpv2_support: self.igmpv2_support,
                static_sources_support: self.static_sources_support,
                auto_accept_shared_associations: self.auto_accept_shared_associations,
            }
        }
    }
}
impl TransitGatewayMulticastDomainOptions {
    /// Creates a new builder-style object to manufacture [`TransitGatewayMulticastDomainOptions`](crate::model::TransitGatewayMulticastDomainOptions).
    pub fn builder() -> crate::model::transit_gateway_multicast_domain_options::Builder {
        crate::model::transit_gateway_multicast_domain_options::Builder::default()
    }
}

/// When writing a match expression against `AutoAcceptSharedAssociationsValue`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let autoacceptsharedassociationsvalue = unimplemented!();
/// match autoacceptsharedassociationsvalue {
///     AutoAcceptSharedAssociationsValue::Disable => { /* ... */ },
///     AutoAcceptSharedAssociationsValue::Enable => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `autoacceptsharedassociationsvalue` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `AutoAcceptSharedAssociationsValue::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `AutoAcceptSharedAssociationsValue::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `AutoAcceptSharedAssociationsValue::NewFeature` is defined.
/// Specifically, when `autoacceptsharedassociationsvalue` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `AutoAcceptSharedAssociationsValue::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 AutoAcceptSharedAssociationsValue {
    #[allow(missing_docs)] // documentation missing in model
    Disable,
    #[allow(missing_docs)] // documentation missing in model
    Enable,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for AutoAcceptSharedAssociationsValue {
    fn from(s: &str) -> Self {
        match s {
            "disable" => AutoAcceptSharedAssociationsValue::Disable,
            "enable" => AutoAcceptSharedAssociationsValue::Enable,
            other => AutoAcceptSharedAssociationsValue::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for AutoAcceptSharedAssociationsValue {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(AutoAcceptSharedAssociationsValue::from(s))
    }
}
impl AutoAcceptSharedAssociationsValue {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            AutoAcceptSharedAssociationsValue::Disable => "disable",
            AutoAcceptSharedAssociationsValue::Enable => "enable",
            AutoAcceptSharedAssociationsValue::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["disable", "enable"]
    }
}
impl AsRef<str> for AutoAcceptSharedAssociationsValue {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `StaticSourcesSupportValue`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let staticsourcessupportvalue = unimplemented!();
/// match staticsourcessupportvalue {
///     StaticSourcesSupportValue::Disable => { /* ... */ },
///     StaticSourcesSupportValue::Enable => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `staticsourcessupportvalue` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `StaticSourcesSupportValue::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `StaticSourcesSupportValue::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `StaticSourcesSupportValue::NewFeature` is defined.
/// Specifically, when `staticsourcessupportvalue` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `StaticSourcesSupportValue::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 StaticSourcesSupportValue {
    #[allow(missing_docs)] // documentation missing in model
    Disable,
    #[allow(missing_docs)] // documentation missing in model
    Enable,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for StaticSourcesSupportValue {
    fn from(s: &str) -> Self {
        match s {
            "disable" => StaticSourcesSupportValue::Disable,
            "enable" => StaticSourcesSupportValue::Enable,
            other => StaticSourcesSupportValue::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for StaticSourcesSupportValue {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(StaticSourcesSupportValue::from(s))
    }
}
impl StaticSourcesSupportValue {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            StaticSourcesSupportValue::Disable => "disable",
            StaticSourcesSupportValue::Enable => "enable",
            StaticSourcesSupportValue::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["disable", "enable"]
    }
}
impl AsRef<str> for StaticSourcesSupportValue {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `Igmpv2SupportValue`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let igmpv2supportvalue = unimplemented!();
/// match igmpv2supportvalue {
///     Igmpv2SupportValue::Disable => { /* ... */ },
///     Igmpv2SupportValue::Enable => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `igmpv2supportvalue` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `Igmpv2SupportValue::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `Igmpv2SupportValue::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `Igmpv2SupportValue::NewFeature` is defined.
/// Specifically, when `igmpv2supportvalue` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `Igmpv2SupportValue::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 Igmpv2SupportValue {
    #[allow(missing_docs)] // documentation missing in model
    Disable,
    #[allow(missing_docs)] // documentation missing in model
    Enable,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for Igmpv2SupportValue {
    fn from(s: &str) -> Self {
        match s {
            "disable" => Igmpv2SupportValue::Disable,
            "enable" => Igmpv2SupportValue::Enable,
            other => {
                Igmpv2SupportValue::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for Igmpv2SupportValue {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(Igmpv2SupportValue::from(s))
    }
}
impl Igmpv2SupportValue {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            Igmpv2SupportValue::Disable => "disable",
            Igmpv2SupportValue::Enable => "enable",
            Igmpv2SupportValue::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["disable", "enable"]
    }
}
impl AsRef<str> for Igmpv2SupportValue {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes a transit gateway Connect attachment.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TransitGatewayConnect {
    /// <p>The ID of the Connect attachment.</p>
    #[doc(hidden)]
    pub transit_gateway_attachment_id: std::option::Option<std::string::String>,
    /// <p>The ID of the attachment from which the Connect attachment was created.</p>
    #[doc(hidden)]
    pub transport_transit_gateway_attachment_id: std::option::Option<std::string::String>,
    /// <p>The ID of the transit gateway.</p>
    #[doc(hidden)]
    pub transit_gateway_id: std::option::Option<std::string::String>,
    /// <p>The state of the attachment.</p>
    #[doc(hidden)]
    pub state: std::option::Option<crate::model::TransitGatewayAttachmentState>,
    /// <p>The creation time.</p>
    #[doc(hidden)]
    pub creation_time: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The Connect attachment options.</p>
    #[doc(hidden)]
    pub options: std::option::Option<crate::model::TransitGatewayConnectOptions>,
    /// <p>The tags for the attachment.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl TransitGatewayConnect {
    /// <p>The ID of the Connect attachment.</p>
    pub fn transit_gateway_attachment_id(&self) -> std::option::Option<&str> {
        self.transit_gateway_attachment_id.as_deref()
    }
    /// <p>The ID of the attachment from which the Connect attachment was created.</p>
    pub fn transport_transit_gateway_attachment_id(&self) -> std::option::Option<&str> {
        self.transport_transit_gateway_attachment_id.as_deref()
    }
    /// <p>The ID of the transit gateway.</p>
    pub fn transit_gateway_id(&self) -> std::option::Option<&str> {
        self.transit_gateway_id.as_deref()
    }
    /// <p>The state of the attachment.</p>
    pub fn state(&self) -> std::option::Option<&crate::model::TransitGatewayAttachmentState> {
        self.state.as_ref()
    }
    /// <p>The creation time.</p>
    pub fn creation_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.creation_time.as_ref()
    }
    /// <p>The Connect attachment options.</p>
    pub fn options(&self) -> std::option::Option<&crate::model::TransitGatewayConnectOptions> {
        self.options.as_ref()
    }
    /// <p>The tags for the attachment.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
}
/// See [`TransitGatewayConnect`](crate::model::TransitGatewayConnect).
pub mod transit_gateway_connect {

    /// A builder for [`TransitGatewayConnect`](crate::model::TransitGatewayConnect).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) transit_gateway_attachment_id: std::option::Option<std::string::String>,
        pub(crate) transport_transit_gateway_attachment_id:
            std::option::Option<std::string::String>,
        pub(crate) transit_gateway_id: std::option::Option<std::string::String>,
        pub(crate) state: std::option::Option<crate::model::TransitGatewayAttachmentState>,
        pub(crate) creation_time: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) options: std::option::Option<crate::model::TransitGatewayConnectOptions>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    }
    impl Builder {
        /// <p>The ID of the Connect attachment.</p>
        pub fn transit_gateway_attachment_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.transit_gateway_attachment_id = Some(input.into());
            self
        }
        /// <p>The ID of the Connect attachment.</p>
        pub fn set_transit_gateway_attachment_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.transit_gateway_attachment_id = input;
            self
        }
        /// <p>The ID of the attachment from which the Connect attachment was created.</p>
        pub fn transport_transit_gateway_attachment_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.transport_transit_gateway_attachment_id = Some(input.into());
            self
        }
        /// <p>The ID of the attachment from which the Connect attachment was created.</p>
        pub fn set_transport_transit_gateway_attachment_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.transport_transit_gateway_attachment_id = input;
            self
        }
        /// <p>The ID of the transit gateway.</p>
        pub fn transit_gateway_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.transit_gateway_id = Some(input.into());
            self
        }
        /// <p>The ID of the transit gateway.</p>
        pub fn set_transit_gateway_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.transit_gateway_id = input;
            self
        }
        /// <p>The state of the attachment.</p>
        pub fn state(mut self, input: crate::model::TransitGatewayAttachmentState) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>The state of the attachment.</p>
        pub fn set_state(
            mut self,
            input: std::option::Option<crate::model::TransitGatewayAttachmentState>,
        ) -> Self {
            self.state = input;
            self
        }
        /// <p>The creation time.</p>
        pub fn creation_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.creation_time = Some(input);
            self
        }
        /// <p>The creation time.</p>
        pub fn set_creation_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.creation_time = input;
            self
        }
        /// <p>The Connect attachment options.</p>
        pub fn options(mut self, input: crate::model::TransitGatewayConnectOptions) -> Self {
            self.options = Some(input);
            self
        }
        /// <p>The Connect attachment options.</p>
        pub fn set_options(
            mut self,
            input: std::option::Option<crate::model::TransitGatewayConnectOptions>,
        ) -> Self {
            self.options = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>The tags for the attachment.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>The tags for the attachment.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// Consumes the builder and constructs a [`TransitGatewayConnect`](crate::model::TransitGatewayConnect).
        pub fn build(self) -> crate::model::TransitGatewayConnect {
            crate::model::TransitGatewayConnect {
                transit_gateway_attachment_id: self.transit_gateway_attachment_id,
                transport_transit_gateway_attachment_id: self
                    .transport_transit_gateway_attachment_id,
                transit_gateway_id: self.transit_gateway_id,
                state: self.state,
                creation_time: self.creation_time,
                options: self.options,
                tags: self.tags,
            }
        }
    }
}
impl TransitGatewayConnect {
    /// Creates a new builder-style object to manufacture [`TransitGatewayConnect`](crate::model::TransitGatewayConnect).
    pub fn builder() -> crate::model::transit_gateway_connect::Builder {
        crate::model::transit_gateway_connect::Builder::default()
    }
}

/// <p>Describes the Connect attachment options.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TransitGatewayConnectOptions {
    /// <p>The tunnel protocol.</p>
    #[doc(hidden)]
    pub protocol: std::option::Option<crate::model::ProtocolValue>,
}
impl TransitGatewayConnectOptions {
    /// <p>The tunnel protocol.</p>
    pub fn protocol(&self) -> std::option::Option<&crate::model::ProtocolValue> {
        self.protocol.as_ref()
    }
}
/// See [`TransitGatewayConnectOptions`](crate::model::TransitGatewayConnectOptions).
pub mod transit_gateway_connect_options {

    /// A builder for [`TransitGatewayConnectOptions`](crate::model::TransitGatewayConnectOptions).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) protocol: std::option::Option<crate::model::ProtocolValue>,
    }
    impl Builder {
        /// <p>The tunnel protocol.</p>
        pub fn protocol(mut self, input: crate::model::ProtocolValue) -> Self {
            self.protocol = Some(input);
            self
        }
        /// <p>The tunnel protocol.</p>
        pub fn set_protocol(
            mut self,
            input: std::option::Option<crate::model::ProtocolValue>,
        ) -> Self {
            self.protocol = input;
            self
        }
        /// Consumes the builder and constructs a [`TransitGatewayConnectOptions`](crate::model::TransitGatewayConnectOptions).
        pub fn build(self) -> crate::model::TransitGatewayConnectOptions {
            crate::model::TransitGatewayConnectOptions {
                protocol: self.protocol,
            }
        }
    }
}
impl TransitGatewayConnectOptions {
    /// Creates a new builder-style object to manufacture [`TransitGatewayConnectOptions`](crate::model::TransitGatewayConnectOptions).
    pub fn builder() -> crate::model::transit_gateway_connect_options::Builder {
        crate::model::transit_gateway_connect_options::Builder::default()
    }
}

/// When writing a match expression against `ProtocolValue`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let protocolvalue = unimplemented!();
/// match protocolvalue {
///     ProtocolValue::Gre => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `protocolvalue` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `ProtocolValue::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `ProtocolValue::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `ProtocolValue::NewFeature` is defined.
/// Specifically, when `protocolvalue` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `ProtocolValue::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 ProtocolValue {
    #[allow(missing_docs)] // documentation missing in model
    Gre,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for ProtocolValue {
    fn from(s: &str) -> Self {
        match s {
            "gre" => ProtocolValue::Gre,
            other => ProtocolValue::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for ProtocolValue {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(ProtocolValue::from(s))
    }
}
impl ProtocolValue {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            ProtocolValue::Gre => "gre",
            ProtocolValue::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["gre"]
    }
}
impl AsRef<str> for ProtocolValue {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes a transit gateway Connect peer.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TransitGatewayConnectPeer {
    /// <p>The ID of the Connect attachment.</p>
    #[doc(hidden)]
    pub transit_gateway_attachment_id: std::option::Option<std::string::String>,
    /// <p>The ID of the Connect peer.</p>
    #[doc(hidden)]
    pub transit_gateway_connect_peer_id: std::option::Option<std::string::String>,
    /// <p>The state of the Connect peer.</p>
    #[doc(hidden)]
    pub state: std::option::Option<crate::model::TransitGatewayConnectPeerState>,
    /// <p>The creation time.</p>
    #[doc(hidden)]
    pub creation_time: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The Connect peer details.</p>
    #[doc(hidden)]
    pub connect_peer_configuration:
        std::option::Option<crate::model::TransitGatewayConnectPeerConfiguration>,
    /// <p>The tags for the Connect peer.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl TransitGatewayConnectPeer {
    /// <p>The ID of the Connect attachment.</p>
    pub fn transit_gateway_attachment_id(&self) -> std::option::Option<&str> {
        self.transit_gateway_attachment_id.as_deref()
    }
    /// <p>The ID of the Connect peer.</p>
    pub fn transit_gateway_connect_peer_id(&self) -> std::option::Option<&str> {
        self.transit_gateway_connect_peer_id.as_deref()
    }
    /// <p>The state of the Connect peer.</p>
    pub fn state(&self) -> std::option::Option<&crate::model::TransitGatewayConnectPeerState> {
        self.state.as_ref()
    }
    /// <p>The creation time.</p>
    pub fn creation_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.creation_time.as_ref()
    }
    /// <p>The Connect peer details.</p>
    pub fn connect_peer_configuration(
        &self,
    ) -> std::option::Option<&crate::model::TransitGatewayConnectPeerConfiguration> {
        self.connect_peer_configuration.as_ref()
    }
    /// <p>The tags for the Connect peer.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
}
/// See [`TransitGatewayConnectPeer`](crate::model::TransitGatewayConnectPeer).
pub mod transit_gateway_connect_peer {

    /// A builder for [`TransitGatewayConnectPeer`](crate::model::TransitGatewayConnectPeer).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) transit_gateway_attachment_id: std::option::Option<std::string::String>,
        pub(crate) transit_gateway_connect_peer_id: std::option::Option<std::string::String>,
        pub(crate) state: std::option::Option<crate::model::TransitGatewayConnectPeerState>,
        pub(crate) creation_time: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) connect_peer_configuration:
            std::option::Option<crate::model::TransitGatewayConnectPeerConfiguration>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    }
    impl Builder {
        /// <p>The ID of the Connect attachment.</p>
        pub fn transit_gateway_attachment_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.transit_gateway_attachment_id = Some(input.into());
            self
        }
        /// <p>The ID of the Connect attachment.</p>
        pub fn set_transit_gateway_attachment_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.transit_gateway_attachment_id = input;
            self
        }
        /// <p>The ID of the Connect peer.</p>
        pub fn transit_gateway_connect_peer_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.transit_gateway_connect_peer_id = Some(input.into());
            self
        }
        /// <p>The ID of the Connect peer.</p>
        pub fn set_transit_gateway_connect_peer_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.transit_gateway_connect_peer_id = input;
            self
        }
        /// <p>The state of the Connect peer.</p>
        pub fn state(mut self, input: crate::model::TransitGatewayConnectPeerState) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>The state of the Connect peer.</p>
        pub fn set_state(
            mut self,
            input: std::option::Option<crate::model::TransitGatewayConnectPeerState>,
        ) -> Self {
            self.state = input;
            self
        }
        /// <p>The creation time.</p>
        pub fn creation_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.creation_time = Some(input);
            self
        }
        /// <p>The creation time.</p>
        pub fn set_creation_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.creation_time = input;
            self
        }
        /// <p>The Connect peer details.</p>
        pub fn connect_peer_configuration(
            mut self,
            input: crate::model::TransitGatewayConnectPeerConfiguration,
        ) -> Self {
            self.connect_peer_configuration = Some(input);
            self
        }
        /// <p>The Connect peer details.</p>
        pub fn set_connect_peer_configuration(
            mut self,
            input: std::option::Option<crate::model::TransitGatewayConnectPeerConfiguration>,
        ) -> Self {
            self.connect_peer_configuration = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>The tags for the Connect peer.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>The tags for the Connect peer.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// Consumes the builder and constructs a [`TransitGatewayConnectPeer`](crate::model::TransitGatewayConnectPeer).
        pub fn build(self) -> crate::model::TransitGatewayConnectPeer {
            crate::model::TransitGatewayConnectPeer {
                transit_gateway_attachment_id: self.transit_gateway_attachment_id,
                transit_gateway_connect_peer_id: self.transit_gateway_connect_peer_id,
                state: self.state,
                creation_time: self.creation_time,
                connect_peer_configuration: self.connect_peer_configuration,
                tags: self.tags,
            }
        }
    }
}
impl TransitGatewayConnectPeer {
    /// Creates a new builder-style object to manufacture [`TransitGatewayConnectPeer`](crate::model::TransitGatewayConnectPeer).
    pub fn builder() -> crate::model::transit_gateway_connect_peer::Builder {
        crate::model::transit_gateway_connect_peer::Builder::default()
    }
}

/// <p>Describes the Connect peer details.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TransitGatewayConnectPeerConfiguration {
    /// <p>The Connect peer IP address on the transit gateway side of the tunnel.</p>
    #[doc(hidden)]
    pub transit_gateway_address: std::option::Option<std::string::String>,
    /// <p>The Connect peer IP address on the appliance side of the tunnel.</p>
    #[doc(hidden)]
    pub peer_address: std::option::Option<std::string::String>,
    /// <p>The range of interior BGP peer IP addresses.</p>
    #[doc(hidden)]
    pub inside_cidr_blocks: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>The tunnel protocol.</p>
    #[doc(hidden)]
    pub protocol: std::option::Option<crate::model::ProtocolValue>,
    /// <p>The BGP configuration details.</p>
    #[doc(hidden)]
    pub bgp_configurations:
        std::option::Option<std::vec::Vec<crate::model::TransitGatewayAttachmentBgpConfiguration>>,
}
impl TransitGatewayConnectPeerConfiguration {
    /// <p>The Connect peer IP address on the transit gateway side of the tunnel.</p>
    pub fn transit_gateway_address(&self) -> std::option::Option<&str> {
        self.transit_gateway_address.as_deref()
    }
    /// <p>The Connect peer IP address on the appliance side of the tunnel.</p>
    pub fn peer_address(&self) -> std::option::Option<&str> {
        self.peer_address.as_deref()
    }
    /// <p>The range of interior BGP peer IP addresses.</p>
    pub fn inside_cidr_blocks(&self) -> std::option::Option<&[std::string::String]> {
        self.inside_cidr_blocks.as_deref()
    }
    /// <p>The tunnel protocol.</p>
    pub fn protocol(&self) -> std::option::Option<&crate::model::ProtocolValue> {
        self.protocol.as_ref()
    }
    /// <p>The BGP configuration details.</p>
    pub fn bgp_configurations(
        &self,
    ) -> std::option::Option<&[crate::model::TransitGatewayAttachmentBgpConfiguration]> {
        self.bgp_configurations.as_deref()
    }
}
/// See [`TransitGatewayConnectPeerConfiguration`](crate::model::TransitGatewayConnectPeerConfiguration).
pub mod transit_gateway_connect_peer_configuration {

    /// A builder for [`TransitGatewayConnectPeerConfiguration`](crate::model::TransitGatewayConnectPeerConfiguration).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) transit_gateway_address: std::option::Option<std::string::String>,
        pub(crate) peer_address: std::option::Option<std::string::String>,
        pub(crate) inside_cidr_blocks: std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) protocol: std::option::Option<crate::model::ProtocolValue>,
        pub(crate) bgp_configurations: std::option::Option<
            std::vec::Vec<crate::model::TransitGatewayAttachmentBgpConfiguration>,
        >,
    }
    impl Builder {
        /// <p>The Connect peer IP address on the transit gateway side of the tunnel.</p>
        pub fn transit_gateway_address(mut self, input: impl Into<std::string::String>) -> Self {
            self.transit_gateway_address = Some(input.into());
            self
        }
        /// <p>The Connect peer IP address on the transit gateway side of the tunnel.</p>
        pub fn set_transit_gateway_address(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.transit_gateway_address = input;
            self
        }
        /// <p>The Connect peer IP address on the appliance side of the tunnel.</p>
        pub fn peer_address(mut self, input: impl Into<std::string::String>) -> Self {
            self.peer_address = Some(input.into());
            self
        }
        /// <p>The Connect peer IP address on the appliance side of the tunnel.</p>
        pub fn set_peer_address(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.peer_address = input;
            self
        }
        /// Appends an item to `inside_cidr_blocks`.
        ///
        /// To override the contents of this collection use [`set_inside_cidr_blocks`](Self::set_inside_cidr_blocks).
        ///
        /// <p>The range of interior BGP peer IP addresses.</p>
        pub fn inside_cidr_blocks(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.inside_cidr_blocks.unwrap_or_default();
            v.push(input.into());
            self.inside_cidr_blocks = Some(v);
            self
        }
        /// <p>The range of interior BGP peer IP addresses.</p>
        pub fn set_inside_cidr_blocks(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.inside_cidr_blocks = input;
            self
        }
        /// <p>The tunnel protocol.</p>
        pub fn protocol(mut self, input: crate::model::ProtocolValue) -> Self {
            self.protocol = Some(input);
            self
        }
        /// <p>The tunnel protocol.</p>
        pub fn set_protocol(
            mut self,
            input: std::option::Option<crate::model::ProtocolValue>,
        ) -> Self {
            self.protocol = input;
            self
        }
        /// Appends an item to `bgp_configurations`.
        ///
        /// To override the contents of this collection use [`set_bgp_configurations`](Self::set_bgp_configurations).
        ///
        /// <p>The BGP configuration details.</p>
        pub fn bgp_configurations(
            mut self,
            input: crate::model::TransitGatewayAttachmentBgpConfiguration,
        ) -> Self {
            let mut v = self.bgp_configurations.unwrap_or_default();
            v.push(input);
            self.bgp_configurations = Some(v);
            self
        }
        /// <p>The BGP configuration details.</p>
        pub fn set_bgp_configurations(
            mut self,
            input: std::option::Option<
                std::vec::Vec<crate::model::TransitGatewayAttachmentBgpConfiguration>,
            >,
        ) -> Self {
            self.bgp_configurations = input;
            self
        }
        /// Consumes the builder and constructs a [`TransitGatewayConnectPeerConfiguration`](crate::model::TransitGatewayConnectPeerConfiguration).
        pub fn build(self) -> crate::model::TransitGatewayConnectPeerConfiguration {
            crate::model::TransitGatewayConnectPeerConfiguration {
                transit_gateway_address: self.transit_gateway_address,
                peer_address: self.peer_address,
                inside_cidr_blocks: self.inside_cidr_blocks,
                protocol: self.protocol,
                bgp_configurations: self.bgp_configurations,
            }
        }
    }
}
impl TransitGatewayConnectPeerConfiguration {
    /// Creates a new builder-style object to manufacture [`TransitGatewayConnectPeerConfiguration`](crate::model::TransitGatewayConnectPeerConfiguration).
    pub fn builder() -> crate::model::transit_gateway_connect_peer_configuration::Builder {
        crate::model::transit_gateway_connect_peer_configuration::Builder::default()
    }
}

/// <p>The BGP configuration information.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TransitGatewayAttachmentBgpConfiguration {
    /// <p>The transit gateway Autonomous System Number (ASN).</p>
    #[doc(hidden)]
    pub transit_gateway_asn: std::option::Option<i64>,
    /// <p>The peer Autonomous System Number (ASN).</p>
    #[doc(hidden)]
    pub peer_asn: std::option::Option<i64>,
    /// <p>The interior BGP peer IP address for the transit gateway.</p>
    #[doc(hidden)]
    pub transit_gateway_address: std::option::Option<std::string::String>,
    /// <p>The interior BGP peer IP address for the appliance.</p>
    #[doc(hidden)]
    pub peer_address: std::option::Option<std::string::String>,
    /// <p>The BGP status.</p>
    #[doc(hidden)]
    pub bgp_status: std::option::Option<crate::model::BgpStatus>,
}
impl TransitGatewayAttachmentBgpConfiguration {
    /// <p>The transit gateway Autonomous System Number (ASN).</p>
    pub fn transit_gateway_asn(&self) -> std::option::Option<i64> {
        self.transit_gateway_asn
    }
    /// <p>The peer Autonomous System Number (ASN).</p>
    pub fn peer_asn(&self) -> std::option::Option<i64> {
        self.peer_asn
    }
    /// <p>The interior BGP peer IP address for the transit gateway.</p>
    pub fn transit_gateway_address(&self) -> std::option::Option<&str> {
        self.transit_gateway_address.as_deref()
    }
    /// <p>The interior BGP peer IP address for the appliance.</p>
    pub fn peer_address(&self) -> std::option::Option<&str> {
        self.peer_address.as_deref()
    }
    /// <p>The BGP status.</p>
    pub fn bgp_status(&self) -> std::option::Option<&crate::model::BgpStatus> {
        self.bgp_status.as_ref()
    }
}
/// See [`TransitGatewayAttachmentBgpConfiguration`](crate::model::TransitGatewayAttachmentBgpConfiguration).
pub mod transit_gateway_attachment_bgp_configuration {

    /// A builder for [`TransitGatewayAttachmentBgpConfiguration`](crate::model::TransitGatewayAttachmentBgpConfiguration).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) transit_gateway_asn: std::option::Option<i64>,
        pub(crate) peer_asn: std::option::Option<i64>,
        pub(crate) transit_gateway_address: std::option::Option<std::string::String>,
        pub(crate) peer_address: std::option::Option<std::string::String>,
        pub(crate) bgp_status: std::option::Option<crate::model::BgpStatus>,
    }
    impl Builder {
        /// <p>The transit gateway Autonomous System Number (ASN).</p>
        pub fn transit_gateway_asn(mut self, input: i64) -> Self {
            self.transit_gateway_asn = Some(input);
            self
        }
        /// <p>The transit gateway Autonomous System Number (ASN).</p>
        pub fn set_transit_gateway_asn(mut self, input: std::option::Option<i64>) -> Self {
            self.transit_gateway_asn = input;
            self
        }
        /// <p>The peer Autonomous System Number (ASN).</p>
        pub fn peer_asn(mut self, input: i64) -> Self {
            self.peer_asn = Some(input);
            self
        }
        /// <p>The peer Autonomous System Number (ASN).</p>
        pub fn set_peer_asn(mut self, input: std::option::Option<i64>) -> Self {
            self.peer_asn = input;
            self
        }
        /// <p>The interior BGP peer IP address for the transit gateway.</p>
        pub fn transit_gateway_address(mut self, input: impl Into<std::string::String>) -> Self {
            self.transit_gateway_address = Some(input.into());
            self
        }
        /// <p>The interior BGP peer IP address for the transit gateway.</p>
        pub fn set_transit_gateway_address(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.transit_gateway_address = input;
            self
        }
        /// <p>The interior BGP peer IP address for the appliance.</p>
        pub fn peer_address(mut self, input: impl Into<std::string::String>) -> Self {
            self.peer_address = Some(input.into());
            self
        }
        /// <p>The interior BGP peer IP address for the appliance.</p>
        pub fn set_peer_address(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.peer_address = input;
            self
        }
        /// <p>The BGP status.</p>
        pub fn bgp_status(mut self, input: crate::model::BgpStatus) -> Self {
            self.bgp_status = Some(input);
            self
        }
        /// <p>The BGP status.</p>
        pub fn set_bgp_status(
            mut self,
            input: std::option::Option<crate::model::BgpStatus>,
        ) -> Self {
            self.bgp_status = input;
            self
        }
        /// Consumes the builder and constructs a [`TransitGatewayAttachmentBgpConfiguration`](crate::model::TransitGatewayAttachmentBgpConfiguration).
        pub fn build(self) -> crate::model::TransitGatewayAttachmentBgpConfiguration {
            crate::model::TransitGatewayAttachmentBgpConfiguration {
                transit_gateway_asn: self.transit_gateway_asn,
                peer_asn: self.peer_asn,
                transit_gateway_address: self.transit_gateway_address,
                peer_address: self.peer_address,
                bgp_status: self.bgp_status,
            }
        }
    }
}
impl TransitGatewayAttachmentBgpConfiguration {
    /// Creates a new builder-style object to manufacture [`TransitGatewayAttachmentBgpConfiguration`](crate::model::TransitGatewayAttachmentBgpConfiguration).
    pub fn builder() -> crate::model::transit_gateway_attachment_bgp_configuration::Builder {
        crate::model::transit_gateway_attachment_bgp_configuration::Builder::default()
    }
}

/// When writing a match expression against `BgpStatus`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let bgpstatus = unimplemented!();
/// match bgpstatus {
///     BgpStatus::Down => { /* ... */ },
///     BgpStatus::Up => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `bgpstatus` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `BgpStatus::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `BgpStatus::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `BgpStatus::NewFeature` is defined.
/// Specifically, when `bgpstatus` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `BgpStatus::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 BgpStatus {
    #[allow(missing_docs)] // documentation missing in model
    Down,
    #[allow(missing_docs)] // documentation missing in model
    Up,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for BgpStatus {
    fn from(s: &str) -> Self {
        match s {
            "down" => BgpStatus::Down,
            "up" => BgpStatus::Up,
            other => BgpStatus::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for BgpStatus {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(BgpStatus::from(s))
    }
}
impl BgpStatus {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            BgpStatus::Down => "down",
            BgpStatus::Up => "up",
            BgpStatus::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["down", "up"]
    }
}
impl AsRef<str> for BgpStatus {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `TransitGatewayConnectPeerState`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let transitgatewayconnectpeerstate = unimplemented!();
/// match transitgatewayconnectpeerstate {
///     TransitGatewayConnectPeerState::Available => { /* ... */ },
///     TransitGatewayConnectPeerState::Deleted => { /* ... */ },
///     TransitGatewayConnectPeerState::Deleting => { /* ... */ },
///     TransitGatewayConnectPeerState::Pending => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `transitgatewayconnectpeerstate` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `TransitGatewayConnectPeerState::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `TransitGatewayConnectPeerState::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `TransitGatewayConnectPeerState::NewFeature` is defined.
/// Specifically, when `transitgatewayconnectpeerstate` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `TransitGatewayConnectPeerState::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 TransitGatewayConnectPeerState {
    #[allow(missing_docs)] // documentation missing in model
    Available,
    #[allow(missing_docs)] // documentation missing in model
    Deleted,
    #[allow(missing_docs)] // documentation missing in model
    Deleting,
    #[allow(missing_docs)] // documentation missing in model
    Pending,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for TransitGatewayConnectPeerState {
    fn from(s: &str) -> Self {
        match s {
            "available" => TransitGatewayConnectPeerState::Available,
            "deleted" => TransitGatewayConnectPeerState::Deleted,
            "deleting" => TransitGatewayConnectPeerState::Deleting,
            "pending" => TransitGatewayConnectPeerState::Pending,
            other => TransitGatewayConnectPeerState::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for TransitGatewayConnectPeerState {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(TransitGatewayConnectPeerState::from(s))
    }
}
impl TransitGatewayConnectPeerState {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            TransitGatewayConnectPeerState::Available => "available",
            TransitGatewayConnectPeerState::Deleted => "deleted",
            TransitGatewayConnectPeerState::Deleting => "deleting",
            TransitGatewayConnectPeerState::Pending => "pending",
            TransitGatewayConnectPeerState::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["available", "deleted", "deleting", "pending"]
    }
}
impl AsRef<str> for TransitGatewayConnectPeerState {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes an attachment between a resource and a transit gateway.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TransitGatewayAttachment {
    /// <p>The ID of the attachment.</p>
    #[doc(hidden)]
    pub transit_gateway_attachment_id: std::option::Option<std::string::String>,
    /// <p>The ID of the transit gateway.</p>
    #[doc(hidden)]
    pub transit_gateway_id: std::option::Option<std::string::String>,
    /// <p>The ID of the Amazon Web Services account that owns the transit gateway.</p>
    #[doc(hidden)]
    pub transit_gateway_owner_id: std::option::Option<std::string::String>,
    /// <p>The ID of the Amazon Web Services account that owns the resource.</p>
    #[doc(hidden)]
    pub resource_owner_id: std::option::Option<std::string::String>,
    /// <p>The resource type. Note that the <code>tgw-peering</code> resource type has been deprecated.</p>
    #[doc(hidden)]
    pub resource_type: std::option::Option<crate::model::TransitGatewayAttachmentResourceType>,
    /// <p>The ID of the resource.</p>
    #[doc(hidden)]
    pub resource_id: std::option::Option<std::string::String>,
    /// <p>The attachment state. Note that the <code>initiating</code> state has been deprecated.</p>
    #[doc(hidden)]
    pub state: std::option::Option<crate::model::TransitGatewayAttachmentState>,
    /// <p>The association.</p>
    #[doc(hidden)]
    pub association: std::option::Option<crate::model::TransitGatewayAttachmentAssociation>,
    /// <p>The creation time.</p>
    #[doc(hidden)]
    pub creation_time: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The tags for the attachment.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl TransitGatewayAttachment {
    /// <p>The ID of the attachment.</p>
    pub fn transit_gateway_attachment_id(&self) -> std::option::Option<&str> {
        self.transit_gateway_attachment_id.as_deref()
    }
    /// <p>The ID of the transit gateway.</p>
    pub fn transit_gateway_id(&self) -> std::option::Option<&str> {
        self.transit_gateway_id.as_deref()
    }
    /// <p>The ID of the Amazon Web Services account that owns the transit gateway.</p>
    pub fn transit_gateway_owner_id(&self) -> std::option::Option<&str> {
        self.transit_gateway_owner_id.as_deref()
    }
    /// <p>The ID of the Amazon Web Services account that owns the resource.</p>
    pub fn resource_owner_id(&self) -> std::option::Option<&str> {
        self.resource_owner_id.as_deref()
    }
    /// <p>The resource type. Note that the <code>tgw-peering</code> resource type has been deprecated.</p>
    pub fn resource_type(
        &self,
    ) -> std::option::Option<&crate::model::TransitGatewayAttachmentResourceType> {
        self.resource_type.as_ref()
    }
    /// <p>The ID of the resource.</p>
    pub fn resource_id(&self) -> std::option::Option<&str> {
        self.resource_id.as_deref()
    }
    /// <p>The attachment state. Note that the <code>initiating</code> state has been deprecated.</p>
    pub fn state(&self) -> std::option::Option<&crate::model::TransitGatewayAttachmentState> {
        self.state.as_ref()
    }
    /// <p>The association.</p>
    pub fn association(
        &self,
    ) -> std::option::Option<&crate::model::TransitGatewayAttachmentAssociation> {
        self.association.as_ref()
    }
    /// <p>The creation time.</p>
    pub fn creation_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.creation_time.as_ref()
    }
    /// <p>The tags for the attachment.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
}
/// See [`TransitGatewayAttachment`](crate::model::TransitGatewayAttachment).
pub mod transit_gateway_attachment {

    /// A builder for [`TransitGatewayAttachment`](crate::model::TransitGatewayAttachment).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) transit_gateway_attachment_id: std::option::Option<std::string::String>,
        pub(crate) transit_gateway_id: std::option::Option<std::string::String>,
        pub(crate) transit_gateway_owner_id: std::option::Option<std::string::String>,
        pub(crate) resource_owner_id: std::option::Option<std::string::String>,
        pub(crate) resource_type:
            std::option::Option<crate::model::TransitGatewayAttachmentResourceType>,
        pub(crate) resource_id: std::option::Option<std::string::String>,
        pub(crate) state: std::option::Option<crate::model::TransitGatewayAttachmentState>,
        pub(crate) association:
            std::option::Option<crate::model::TransitGatewayAttachmentAssociation>,
        pub(crate) creation_time: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    }
    impl Builder {
        /// <p>The ID of the attachment.</p>
        pub fn transit_gateway_attachment_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.transit_gateway_attachment_id = Some(input.into());
            self
        }
        /// <p>The ID of the attachment.</p>
        pub fn set_transit_gateway_attachment_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.transit_gateway_attachment_id = input;
            self
        }
        /// <p>The ID of the transit gateway.</p>
        pub fn transit_gateway_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.transit_gateway_id = Some(input.into());
            self
        }
        /// <p>The ID of the transit gateway.</p>
        pub fn set_transit_gateway_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.transit_gateway_id = input;
            self
        }
        /// <p>The ID of the Amazon Web Services account that owns the transit gateway.</p>
        pub fn transit_gateway_owner_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.transit_gateway_owner_id = Some(input.into());
            self
        }
        /// <p>The ID of the Amazon Web Services account that owns the transit gateway.</p>
        pub fn set_transit_gateway_owner_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.transit_gateway_owner_id = input;
            self
        }
        /// <p>The ID of the Amazon Web Services account that owns the resource.</p>
        pub fn resource_owner_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.resource_owner_id = Some(input.into());
            self
        }
        /// <p>The ID of the Amazon Web Services account that owns the resource.</p>
        pub fn set_resource_owner_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.resource_owner_id = input;
            self
        }
        /// <p>The resource type. Note that the <code>tgw-peering</code> resource type has been deprecated.</p>
        pub fn resource_type(
            mut self,
            input: crate::model::TransitGatewayAttachmentResourceType,
        ) -> Self {
            self.resource_type = Some(input);
            self
        }
        /// <p>The resource type. Note that the <code>tgw-peering</code> resource type has been deprecated.</p>
        pub fn set_resource_type(
            mut self,
            input: std::option::Option<crate::model::TransitGatewayAttachmentResourceType>,
        ) -> Self {
            self.resource_type = input;
            self
        }
        /// <p>The ID of the resource.</p>
        pub fn resource_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.resource_id = Some(input.into());
            self
        }
        /// <p>The ID of the resource.</p>
        pub fn set_resource_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.resource_id = input;
            self
        }
        /// <p>The attachment state. Note that the <code>initiating</code> state has been deprecated.</p>
        pub fn state(mut self, input: crate::model::TransitGatewayAttachmentState) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>The attachment state. Note that the <code>initiating</code> state has been deprecated.</p>
        pub fn set_state(
            mut self,
            input: std::option::Option<crate::model::TransitGatewayAttachmentState>,
        ) -> Self {
            self.state = input;
            self
        }
        /// <p>The association.</p>
        pub fn association(
            mut self,
            input: crate::model::TransitGatewayAttachmentAssociation,
        ) -> Self {
            self.association = Some(input);
            self
        }
        /// <p>The association.</p>
        pub fn set_association(
            mut self,
            input: std::option::Option<crate::model::TransitGatewayAttachmentAssociation>,
        ) -> Self {
            self.association = input;
            self
        }
        /// <p>The creation time.</p>
        pub fn creation_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.creation_time = Some(input);
            self
        }
        /// <p>The creation time.</p>
        pub fn set_creation_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.creation_time = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>The tags for the attachment.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>The tags for the attachment.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// Consumes the builder and constructs a [`TransitGatewayAttachment`](crate::model::TransitGatewayAttachment).
        pub fn build(self) -> crate::model::TransitGatewayAttachment {
            crate::model::TransitGatewayAttachment {
                transit_gateway_attachment_id: self.transit_gateway_attachment_id,
                transit_gateway_id: self.transit_gateway_id,
                transit_gateway_owner_id: self.transit_gateway_owner_id,
                resource_owner_id: self.resource_owner_id,
                resource_type: self.resource_type,
                resource_id: self.resource_id,
                state: self.state,
                association: self.association,
                creation_time: self.creation_time,
                tags: self.tags,
            }
        }
    }
}
impl TransitGatewayAttachment {
    /// Creates a new builder-style object to manufacture [`TransitGatewayAttachment`](crate::model::TransitGatewayAttachment).
    pub fn builder() -> crate::model::transit_gateway_attachment::Builder {
        crate::model::transit_gateway_attachment::Builder::default()
    }
}

/// <p>Describes an association.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TransitGatewayAttachmentAssociation {
    /// <p>The ID of the route table for the transit gateway.</p>
    #[doc(hidden)]
    pub transit_gateway_route_table_id: std::option::Option<std::string::String>,
    /// <p>The state of the association.</p>
    #[doc(hidden)]
    pub state: std::option::Option<crate::model::TransitGatewayAssociationState>,
}
impl TransitGatewayAttachmentAssociation {
    /// <p>The ID of the route table for the transit gateway.</p>
    pub fn transit_gateway_route_table_id(&self) -> std::option::Option<&str> {
        self.transit_gateway_route_table_id.as_deref()
    }
    /// <p>The state of the association.</p>
    pub fn state(&self) -> std::option::Option<&crate::model::TransitGatewayAssociationState> {
        self.state.as_ref()
    }
}
/// See [`TransitGatewayAttachmentAssociation`](crate::model::TransitGatewayAttachmentAssociation).
pub mod transit_gateway_attachment_association {

    /// A builder for [`TransitGatewayAttachmentAssociation`](crate::model::TransitGatewayAttachmentAssociation).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) transit_gateway_route_table_id: std::option::Option<std::string::String>,
        pub(crate) state: std::option::Option<crate::model::TransitGatewayAssociationState>,
    }
    impl Builder {
        /// <p>The ID of the route table for the transit gateway.</p>
        pub fn transit_gateway_route_table_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.transit_gateway_route_table_id = Some(input.into());
            self
        }
        /// <p>The ID of the route table for the transit gateway.</p>
        pub fn set_transit_gateway_route_table_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.transit_gateway_route_table_id = input;
            self
        }
        /// <p>The state of the association.</p>
        pub fn state(mut self, input: crate::model::TransitGatewayAssociationState) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>The state of the association.</p>
        pub fn set_state(
            mut self,
            input: std::option::Option<crate::model::TransitGatewayAssociationState>,
        ) -> Self {
            self.state = input;
            self
        }
        /// Consumes the builder and constructs a [`TransitGatewayAttachmentAssociation`](crate::model::TransitGatewayAttachmentAssociation).
        pub fn build(self) -> crate::model::TransitGatewayAttachmentAssociation {
            crate::model::TransitGatewayAttachmentAssociation {
                transit_gateway_route_table_id: self.transit_gateway_route_table_id,
                state: self.state,
            }
        }
    }
}
impl TransitGatewayAttachmentAssociation {
    /// Creates a new builder-style object to manufacture [`TransitGatewayAttachmentAssociation`](crate::model::TransitGatewayAttachmentAssociation).
    pub fn builder() -> crate::model::transit_gateway_attachment_association::Builder {
        crate::model::transit_gateway_attachment_association::Builder::default()
    }
}

/// <p>Describes a Traffic Mirror target.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TrafficMirrorTarget {
    /// <p>The ID of the Traffic Mirror target.</p>
    #[doc(hidden)]
    pub traffic_mirror_target_id: std::option::Option<std::string::String>,
    /// <p>The network interface ID that is attached to the target.</p>
    #[doc(hidden)]
    pub network_interface_id: std::option::Option<std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the Network Load Balancer.</p>
    #[doc(hidden)]
    pub network_load_balancer_arn: std::option::Option<std::string::String>,
    /// <p>The type of Traffic Mirror target.</p>
    #[doc(hidden)]
    pub r#type: std::option::Option<crate::model::TrafficMirrorTargetType>,
    /// <p>Information about the Traffic Mirror target.</p>
    #[doc(hidden)]
    pub description: std::option::Option<std::string::String>,
    /// <p>The ID of the account that owns the Traffic Mirror target.</p>
    #[doc(hidden)]
    pub owner_id: std::option::Option<std::string::String>,
    /// <p>The tags assigned to the Traffic Mirror target.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    /// <p>The ID of the Gateway Load Balancer endpoint.</p>
    #[doc(hidden)]
    pub gateway_load_balancer_endpoint_id: std::option::Option<std::string::String>,
}
impl TrafficMirrorTarget {
    /// <p>The ID of the Traffic Mirror target.</p>
    pub fn traffic_mirror_target_id(&self) -> std::option::Option<&str> {
        self.traffic_mirror_target_id.as_deref()
    }
    /// <p>The network interface ID that is attached to the target.</p>
    pub fn network_interface_id(&self) -> std::option::Option<&str> {
        self.network_interface_id.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the Network Load Balancer.</p>
    pub fn network_load_balancer_arn(&self) -> std::option::Option<&str> {
        self.network_load_balancer_arn.as_deref()
    }
    /// <p>The type of Traffic Mirror target.</p>
    pub fn r#type(&self) -> std::option::Option<&crate::model::TrafficMirrorTargetType> {
        self.r#type.as_ref()
    }
    /// <p>Information about the Traffic Mirror target.</p>
    pub fn description(&self) -> std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The ID of the account that owns the Traffic Mirror target.</p>
    pub fn owner_id(&self) -> std::option::Option<&str> {
        self.owner_id.as_deref()
    }
    /// <p>The tags assigned to the Traffic Mirror target.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
    /// <p>The ID of the Gateway Load Balancer endpoint.</p>
    pub fn gateway_load_balancer_endpoint_id(&self) -> std::option::Option<&str> {
        self.gateway_load_balancer_endpoint_id.as_deref()
    }
}
/// See [`TrafficMirrorTarget`](crate::model::TrafficMirrorTarget).
pub mod traffic_mirror_target {

    /// A builder for [`TrafficMirrorTarget`](crate::model::TrafficMirrorTarget).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) traffic_mirror_target_id: std::option::Option<std::string::String>,
        pub(crate) network_interface_id: std::option::Option<std::string::String>,
        pub(crate) network_load_balancer_arn: std::option::Option<std::string::String>,
        pub(crate) r#type: std::option::Option<crate::model::TrafficMirrorTargetType>,
        pub(crate) description: std::option::Option<std::string::String>,
        pub(crate) owner_id: std::option::Option<std::string::String>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        pub(crate) gateway_load_balancer_endpoint_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The ID of the Traffic Mirror target.</p>
        pub fn traffic_mirror_target_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.traffic_mirror_target_id = Some(input.into());
            self
        }
        /// <p>The ID of the Traffic Mirror target.</p>
        pub fn set_traffic_mirror_target_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.traffic_mirror_target_id = input;
            self
        }
        /// <p>The network interface ID that is attached to the target.</p>
        pub fn network_interface_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.network_interface_id = Some(input.into());
            self
        }
        /// <p>The network interface ID that is attached to the target.</p>
        pub fn set_network_interface_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.network_interface_id = input;
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the Network Load Balancer.</p>
        pub fn network_load_balancer_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.network_load_balancer_arn = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the Network Load Balancer.</p>
        pub fn set_network_load_balancer_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.network_load_balancer_arn = input;
            self
        }
        /// <p>The type of Traffic Mirror target.</p>
        pub fn r#type(mut self, input: crate::model::TrafficMirrorTargetType) -> Self {
            self.r#type = Some(input);
            self
        }
        /// <p>The type of Traffic Mirror target.</p>
        pub fn set_type(
            mut self,
            input: std::option::Option<crate::model::TrafficMirrorTargetType>,
        ) -> Self {
            self.r#type = input;
            self
        }
        /// <p>Information about the Traffic Mirror target.</p>
        pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
            self.description = Some(input.into());
            self
        }
        /// <p>Information about the Traffic Mirror target.</p>
        pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.description = input;
            self
        }
        /// <p>The ID of the account that owns the Traffic Mirror target.</p>
        pub fn owner_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.owner_id = Some(input.into());
            self
        }
        /// <p>The ID of the account that owns the Traffic Mirror target.</p>
        pub fn set_owner_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.owner_id = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>The tags assigned to the Traffic Mirror target.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>The tags assigned to the Traffic Mirror target.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// <p>The ID of the Gateway Load Balancer endpoint.</p>
        pub fn gateway_load_balancer_endpoint_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.gateway_load_balancer_endpoint_id = Some(input.into());
            self
        }
        /// <p>The ID of the Gateway Load Balancer endpoint.</p>
        pub fn set_gateway_load_balancer_endpoint_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.gateway_load_balancer_endpoint_id = input;
            self
        }
        /// Consumes the builder and constructs a [`TrafficMirrorTarget`](crate::model::TrafficMirrorTarget).
        pub fn build(self) -> crate::model::TrafficMirrorTarget {
            crate::model::TrafficMirrorTarget {
                traffic_mirror_target_id: self.traffic_mirror_target_id,
                network_interface_id: self.network_interface_id,
                network_load_balancer_arn: self.network_load_balancer_arn,
                r#type: self.r#type,
                description: self.description,
                owner_id: self.owner_id,
                tags: self.tags,
                gateway_load_balancer_endpoint_id: self.gateway_load_balancer_endpoint_id,
            }
        }
    }
}
impl TrafficMirrorTarget {
    /// Creates a new builder-style object to manufacture [`TrafficMirrorTarget`](crate::model::TrafficMirrorTarget).
    pub fn builder() -> crate::model::traffic_mirror_target::Builder {
        crate::model::traffic_mirror_target::Builder::default()
    }
}

/// When writing a match expression against `TrafficMirrorTargetType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let trafficmirrortargettype = unimplemented!();
/// match trafficmirrortargettype {
///     TrafficMirrorTargetType::GatewayLoadBalancerEndpoint => { /* ... */ },
///     TrafficMirrorTargetType::NetworkInterface => { /* ... */ },
///     TrafficMirrorTargetType::NetworkLoadBalancer => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `trafficmirrortargettype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `TrafficMirrorTargetType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `TrafficMirrorTargetType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `TrafficMirrorTargetType::NewFeature` is defined.
/// Specifically, when `trafficmirrortargettype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `TrafficMirrorTargetType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 TrafficMirrorTargetType {
    #[allow(missing_docs)] // documentation missing in model
    GatewayLoadBalancerEndpoint,
    #[allow(missing_docs)] // documentation missing in model
    NetworkInterface,
    #[allow(missing_docs)] // documentation missing in model
    NetworkLoadBalancer,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for TrafficMirrorTargetType {
    fn from(s: &str) -> Self {
        match s {
            "gateway-load-balancer-endpoint" => {
                TrafficMirrorTargetType::GatewayLoadBalancerEndpoint
            }
            "network-interface" => TrafficMirrorTargetType::NetworkInterface,
            "network-load-balancer" => TrafficMirrorTargetType::NetworkLoadBalancer,
            other => TrafficMirrorTargetType::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for TrafficMirrorTargetType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(TrafficMirrorTargetType::from(s))
    }
}
impl TrafficMirrorTargetType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            TrafficMirrorTargetType::GatewayLoadBalancerEndpoint => {
                "gateway-load-balancer-endpoint"
            }
            TrafficMirrorTargetType::NetworkInterface => "network-interface",
            TrafficMirrorTargetType::NetworkLoadBalancer => "network-load-balancer",
            TrafficMirrorTargetType::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &[
            "gateway-load-balancer-endpoint",
            "network-interface",
            "network-load-balancer",
        ]
    }
}
impl AsRef<str> for TrafficMirrorTargetType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes a tag.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TagDescription {
    /// <p>The tag key.</p>
    #[doc(hidden)]
    pub key: std::option::Option<std::string::String>,
    /// <p>The ID of the resource.</p>
    #[doc(hidden)]
    pub resource_id: std::option::Option<std::string::String>,
    /// <p>The resource type.</p>
    #[doc(hidden)]
    pub resource_type: std::option::Option<crate::model::ResourceType>,
    /// <p>The tag value.</p>
    #[doc(hidden)]
    pub value: std::option::Option<std::string::String>,
}
impl TagDescription {
    /// <p>The tag key.</p>
    pub fn key(&self) -> std::option::Option<&str> {
        self.key.as_deref()
    }
    /// <p>The ID of the resource.</p>
    pub fn resource_id(&self) -> std::option::Option<&str> {
        self.resource_id.as_deref()
    }
    /// <p>The resource type.</p>
    pub fn resource_type(&self) -> std::option::Option<&crate::model::ResourceType> {
        self.resource_type.as_ref()
    }
    /// <p>The tag value.</p>
    pub fn value(&self) -> std::option::Option<&str> {
        self.value.as_deref()
    }
}
/// See [`TagDescription`](crate::model::TagDescription).
pub mod tag_description {

    /// A builder for [`TagDescription`](crate::model::TagDescription).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) key: std::option::Option<std::string::String>,
        pub(crate) resource_id: std::option::Option<std::string::String>,
        pub(crate) resource_type: std::option::Option<crate::model::ResourceType>,
        pub(crate) value: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The tag key.</p>
        pub fn key(mut self, input: impl Into<std::string::String>) -> Self {
            self.key = Some(input.into());
            self
        }
        /// <p>The tag key.</p>
        pub fn set_key(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.key = input;
            self
        }
        /// <p>The ID of the resource.</p>
        pub fn resource_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.resource_id = Some(input.into());
            self
        }
        /// <p>The ID of the resource.</p>
        pub fn set_resource_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.resource_id = input;
            self
        }
        /// <p>The resource type.</p>
        pub fn resource_type(mut self, input: crate::model::ResourceType) -> Self {
            self.resource_type = Some(input);
            self
        }
        /// <p>The resource type.</p>
        pub fn set_resource_type(
            mut self,
            input: std::option::Option<crate::model::ResourceType>,
        ) -> Self {
            self.resource_type = input;
            self
        }
        /// <p>The tag value.</p>
        pub fn value(mut self, input: impl Into<std::string::String>) -> Self {
            self.value = Some(input.into());
            self
        }
        /// <p>The tag value.</p>
        pub fn set_value(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.value = input;
            self
        }
        /// Consumes the builder and constructs a [`TagDescription`](crate::model::TagDescription).
        pub fn build(self) -> crate::model::TagDescription {
            crate::model::TagDescription {
                key: self.key,
                resource_id: self.resource_id,
                resource_type: self.resource_type,
                value: self.value,
            }
        }
    }
}
impl TagDescription {
    /// Creates a new builder-style object to manufacture [`TagDescription`](crate::model::TagDescription).
    pub fn builder() -> crate::model::tag_description::Builder {
        crate::model::tag_description::Builder::default()
    }
}

/// <p>Describes a subnet.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Subnet {
    /// <p>The Availability Zone of the subnet.</p>
    #[doc(hidden)]
    pub availability_zone: std::option::Option<std::string::String>,
    /// <p>The AZ ID of the subnet.</p>
    #[doc(hidden)]
    pub availability_zone_id: std::option::Option<std::string::String>,
    /// <p>The number of unused private IPv4 addresses in the subnet. The IPv4 addresses for any stopped instances are considered unavailable.</p>
    #[doc(hidden)]
    pub available_ip_address_count: std::option::Option<i32>,
    /// <p>The IPv4 CIDR block assigned to the subnet.</p>
    #[doc(hidden)]
    pub cidr_block: std::option::Option<std::string::String>,
    /// <p>Indicates whether this is the default subnet for the Availability Zone.</p>
    #[doc(hidden)]
    pub default_for_az: std::option::Option<bool>,
    /// <p> Indicates the device position for local network interfaces in this subnet. For example, <code>1</code> indicates local network interfaces in this subnet are the secondary network interface (eth1). </p>
    #[doc(hidden)]
    pub enable_lni_at_device_index: std::option::Option<i32>,
    /// <p>Indicates whether instances launched in this subnet receive a public IPv4 address.</p>
    #[doc(hidden)]
    pub map_public_ip_on_launch: std::option::Option<bool>,
    /// <p>Indicates whether a network interface created in this subnet (including a network interface created by <code>RunInstances</code>) receives a customer-owned IPv4 address.</p>
    #[doc(hidden)]
    pub map_customer_owned_ip_on_launch: std::option::Option<bool>,
    /// <p>The customer-owned IPv4 address pool associated with the subnet.</p>
    #[doc(hidden)]
    pub customer_owned_ipv4_pool: std::option::Option<std::string::String>,
    /// <p>The current state of the subnet.</p>
    #[doc(hidden)]
    pub state: std::option::Option<crate::model::SubnetState>,
    /// <p>The ID of the subnet.</p>
    #[doc(hidden)]
    pub subnet_id: std::option::Option<std::string::String>,
    /// <p>The ID of the VPC the subnet is in.</p>
    #[doc(hidden)]
    pub vpc_id: std::option::Option<std::string::String>,
    /// <p>The ID of the Amazon Web Services account that owns the subnet.</p>
    #[doc(hidden)]
    pub owner_id: std::option::Option<std::string::String>,
    /// <p>Indicates whether a network interface created in this subnet (including a network interface created by <code>RunInstances</code>) receives an IPv6 address.</p>
    #[doc(hidden)]
    pub assign_ipv6_address_on_creation: std::option::Option<bool>,
    /// <p>Information about the IPv6 CIDR blocks associated with the subnet.</p>
    #[doc(hidden)]
    pub ipv6_cidr_block_association_set:
        std::option::Option<std::vec::Vec<crate::model::SubnetIpv6CidrBlockAssociation>>,
    /// <p>Any tags assigned to the subnet.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    /// <p>The Amazon Resource Name (ARN) of the subnet.</p>
    #[doc(hidden)]
    pub subnet_arn: std::option::Option<std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the Outpost.</p>
    #[doc(hidden)]
    pub outpost_arn: std::option::Option<std::string::String>,
    /// <p>Indicates whether DNS queries made to the Amazon-provided DNS Resolver in this subnet should return synthetic IPv6 addresses for IPv4-only destinations.</p>
    #[doc(hidden)]
    pub enable_dns64: std::option::Option<bool>,
    /// <p>Indicates whether this is an IPv6 only subnet.</p>
    #[doc(hidden)]
    pub ipv6_native: std::option::Option<bool>,
    /// <p>The type of hostnames to assign to instances in the subnet at launch. An instance hostname is based on the IPv4 address or ID of the instance.</p>
    #[doc(hidden)]
    pub private_dns_name_options_on_launch:
        std::option::Option<crate::model::PrivateDnsNameOptionsOnLaunch>,
}
impl Subnet {
    /// <p>The Availability Zone of the subnet.</p>
    pub fn availability_zone(&self) -> std::option::Option<&str> {
        self.availability_zone.as_deref()
    }
    /// <p>The AZ ID of the subnet.</p>
    pub fn availability_zone_id(&self) -> std::option::Option<&str> {
        self.availability_zone_id.as_deref()
    }
    /// <p>The number of unused private IPv4 addresses in the subnet. The IPv4 addresses for any stopped instances are considered unavailable.</p>
    pub fn available_ip_address_count(&self) -> std::option::Option<i32> {
        self.available_ip_address_count
    }
    /// <p>The IPv4 CIDR block assigned to the subnet.</p>
    pub fn cidr_block(&self) -> std::option::Option<&str> {
        self.cidr_block.as_deref()
    }
    /// <p>Indicates whether this is the default subnet for the Availability Zone.</p>
    pub fn default_for_az(&self) -> std::option::Option<bool> {
        self.default_for_az
    }
    /// <p> Indicates the device position for local network interfaces in this subnet. For example, <code>1</code> indicates local network interfaces in this subnet are the secondary network interface (eth1). </p>
    pub fn enable_lni_at_device_index(&self) -> std::option::Option<i32> {
        self.enable_lni_at_device_index
    }
    /// <p>Indicates whether instances launched in this subnet receive a public IPv4 address.</p>
    pub fn map_public_ip_on_launch(&self) -> std::option::Option<bool> {
        self.map_public_ip_on_launch
    }
    /// <p>Indicates whether a network interface created in this subnet (including a network interface created by <code>RunInstances</code>) receives a customer-owned IPv4 address.</p>
    pub fn map_customer_owned_ip_on_launch(&self) -> std::option::Option<bool> {
        self.map_customer_owned_ip_on_launch
    }
    /// <p>The customer-owned IPv4 address pool associated with the subnet.</p>
    pub fn customer_owned_ipv4_pool(&self) -> std::option::Option<&str> {
        self.customer_owned_ipv4_pool.as_deref()
    }
    /// <p>The current state of the subnet.</p>
    pub fn state(&self) -> std::option::Option<&crate::model::SubnetState> {
        self.state.as_ref()
    }
    /// <p>The ID of the subnet.</p>
    pub fn subnet_id(&self) -> std::option::Option<&str> {
        self.subnet_id.as_deref()
    }
    /// <p>The ID of the VPC the subnet is in.</p>
    pub fn vpc_id(&self) -> std::option::Option<&str> {
        self.vpc_id.as_deref()
    }
    /// <p>The ID of the Amazon Web Services account that owns the subnet.</p>
    pub fn owner_id(&self) -> std::option::Option<&str> {
        self.owner_id.as_deref()
    }
    /// <p>Indicates whether a network interface created in this subnet (including a network interface created by <code>RunInstances</code>) receives an IPv6 address.</p>
    pub fn assign_ipv6_address_on_creation(&self) -> std::option::Option<bool> {
        self.assign_ipv6_address_on_creation
    }
    /// <p>Information about the IPv6 CIDR blocks associated with the subnet.</p>
    pub fn ipv6_cidr_block_association_set(
        &self,
    ) -> std::option::Option<&[crate::model::SubnetIpv6CidrBlockAssociation]> {
        self.ipv6_cidr_block_association_set.as_deref()
    }
    /// <p>Any tags assigned to the subnet.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the subnet.</p>
    pub fn subnet_arn(&self) -> std::option::Option<&str> {
        self.subnet_arn.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the Outpost.</p>
    pub fn outpost_arn(&self) -> std::option::Option<&str> {
        self.outpost_arn.as_deref()
    }
    /// <p>Indicates whether DNS queries made to the Amazon-provided DNS Resolver in this subnet should return synthetic IPv6 addresses for IPv4-only destinations.</p>
    pub fn enable_dns64(&self) -> std::option::Option<bool> {
        self.enable_dns64
    }
    /// <p>Indicates whether this is an IPv6 only subnet.</p>
    pub fn ipv6_native(&self) -> std::option::Option<bool> {
        self.ipv6_native
    }
    /// <p>The type of hostnames to assign to instances in the subnet at launch. An instance hostname is based on the IPv4 address or ID of the instance.</p>
    pub fn private_dns_name_options_on_launch(
        &self,
    ) -> std::option::Option<&crate::model::PrivateDnsNameOptionsOnLaunch> {
        self.private_dns_name_options_on_launch.as_ref()
    }
}
/// See [`Subnet`](crate::model::Subnet).
pub mod subnet {

    /// A builder for [`Subnet`](crate::model::Subnet).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) availability_zone: std::option::Option<std::string::String>,
        pub(crate) availability_zone_id: std::option::Option<std::string::String>,
        pub(crate) available_ip_address_count: std::option::Option<i32>,
        pub(crate) cidr_block: std::option::Option<std::string::String>,
        pub(crate) default_for_az: std::option::Option<bool>,
        pub(crate) enable_lni_at_device_index: std::option::Option<i32>,
        pub(crate) map_public_ip_on_launch: std::option::Option<bool>,
        pub(crate) map_customer_owned_ip_on_launch: std::option::Option<bool>,
        pub(crate) customer_owned_ipv4_pool: std::option::Option<std::string::String>,
        pub(crate) state: std::option::Option<crate::model::SubnetState>,
        pub(crate) subnet_id: std::option::Option<std::string::String>,
        pub(crate) vpc_id: std::option::Option<std::string::String>,
        pub(crate) owner_id: std::option::Option<std::string::String>,
        pub(crate) assign_ipv6_address_on_creation: std::option::Option<bool>,
        pub(crate) ipv6_cidr_block_association_set:
            std::option::Option<std::vec::Vec<crate::model::SubnetIpv6CidrBlockAssociation>>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        pub(crate) subnet_arn: std::option::Option<std::string::String>,
        pub(crate) outpost_arn: std::option::Option<std::string::String>,
        pub(crate) enable_dns64: std::option::Option<bool>,
        pub(crate) ipv6_native: std::option::Option<bool>,
        pub(crate) private_dns_name_options_on_launch:
            std::option::Option<crate::model::PrivateDnsNameOptionsOnLaunch>,
    }
    impl Builder {
        /// <p>The Availability Zone of the subnet.</p>
        pub fn availability_zone(mut self, input: impl Into<std::string::String>) -> Self {
            self.availability_zone = Some(input.into());
            self
        }
        /// <p>The Availability Zone of the subnet.</p>
        pub fn set_availability_zone(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.availability_zone = input;
            self
        }
        /// <p>The AZ ID of the subnet.</p>
        pub fn availability_zone_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.availability_zone_id = Some(input.into());
            self
        }
        /// <p>The AZ ID of the subnet.</p>
        pub fn set_availability_zone_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.availability_zone_id = input;
            self
        }
        /// <p>The number of unused private IPv4 addresses in the subnet. The IPv4 addresses for any stopped instances are considered unavailable.</p>
        pub fn available_ip_address_count(mut self, input: i32) -> Self {
            self.available_ip_address_count = Some(input);
            self
        }
        /// <p>The number of unused private IPv4 addresses in the subnet. The IPv4 addresses for any stopped instances are considered unavailable.</p>
        pub fn set_available_ip_address_count(mut self, input: std::option::Option<i32>) -> Self {
            self.available_ip_address_count = input;
            self
        }
        /// <p>The IPv4 CIDR block assigned to the subnet.</p>
        pub fn cidr_block(mut self, input: impl Into<std::string::String>) -> Self {
            self.cidr_block = Some(input.into());
            self
        }
        /// <p>The IPv4 CIDR block assigned to the subnet.</p>
        pub fn set_cidr_block(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.cidr_block = input;
            self
        }
        /// <p>Indicates whether this is the default subnet for the Availability Zone.</p>
        pub fn default_for_az(mut self, input: bool) -> Self {
            self.default_for_az = Some(input);
            self
        }
        /// <p>Indicates whether this is the default subnet for the Availability Zone.</p>
        pub fn set_default_for_az(mut self, input: std::option::Option<bool>) -> Self {
            self.default_for_az = input;
            self
        }
        /// <p> Indicates the device position for local network interfaces in this subnet. For example, <code>1</code> indicates local network interfaces in this subnet are the secondary network interface (eth1). </p>
        pub fn enable_lni_at_device_index(mut self, input: i32) -> Self {
            self.enable_lni_at_device_index = Some(input);
            self
        }
        /// <p> Indicates the device position for local network interfaces in this subnet. For example, <code>1</code> indicates local network interfaces in this subnet are the secondary network interface (eth1). </p>
        pub fn set_enable_lni_at_device_index(mut self, input: std::option::Option<i32>) -> Self {
            self.enable_lni_at_device_index = input;
            self
        }
        /// <p>Indicates whether instances launched in this subnet receive a public IPv4 address.</p>
        pub fn map_public_ip_on_launch(mut self, input: bool) -> Self {
            self.map_public_ip_on_launch = Some(input);
            self
        }
        /// <p>Indicates whether instances launched in this subnet receive a public IPv4 address.</p>
        pub fn set_map_public_ip_on_launch(mut self, input: std::option::Option<bool>) -> Self {
            self.map_public_ip_on_launch = input;
            self
        }
        /// <p>Indicates whether a network interface created in this subnet (including a network interface created by <code>RunInstances</code>) receives a customer-owned IPv4 address.</p>
        pub fn map_customer_owned_ip_on_launch(mut self, input: bool) -> Self {
            self.map_customer_owned_ip_on_launch = Some(input);
            self
        }
        /// <p>Indicates whether a network interface created in this subnet (including a network interface created by <code>RunInstances</code>) receives a customer-owned IPv4 address.</p>
        pub fn set_map_customer_owned_ip_on_launch(
            mut self,
            input: std::option::Option<bool>,
        ) -> Self {
            self.map_customer_owned_ip_on_launch = input;
            self
        }
        /// <p>The customer-owned IPv4 address pool associated with the subnet.</p>
        pub fn customer_owned_ipv4_pool(mut self, input: impl Into<std::string::String>) -> Self {
            self.customer_owned_ipv4_pool = Some(input.into());
            self
        }
        /// <p>The customer-owned IPv4 address pool associated with the subnet.</p>
        pub fn set_customer_owned_ipv4_pool(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.customer_owned_ipv4_pool = input;
            self
        }
        /// <p>The current state of the subnet.</p>
        pub fn state(mut self, input: crate::model::SubnetState) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>The current state of the subnet.</p>
        pub fn set_state(mut self, input: std::option::Option<crate::model::SubnetState>) -> Self {
            self.state = input;
            self
        }
        /// <p>The ID of the subnet.</p>
        pub fn subnet_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.subnet_id = Some(input.into());
            self
        }
        /// <p>The ID of the subnet.</p>
        pub fn set_subnet_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.subnet_id = input;
            self
        }
        /// <p>The ID of the VPC the subnet is in.</p>
        pub fn vpc_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.vpc_id = Some(input.into());
            self
        }
        /// <p>The ID of the VPC the subnet is in.</p>
        pub fn set_vpc_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.vpc_id = input;
            self
        }
        /// <p>The ID of the Amazon Web Services account that owns the subnet.</p>
        pub fn owner_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.owner_id = Some(input.into());
            self
        }
        /// <p>The ID of the Amazon Web Services account that owns the subnet.</p>
        pub fn set_owner_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.owner_id = input;
            self
        }
        /// <p>Indicates whether a network interface created in this subnet (including a network interface created by <code>RunInstances</code>) receives an IPv6 address.</p>
        pub fn assign_ipv6_address_on_creation(mut self, input: bool) -> Self {
            self.assign_ipv6_address_on_creation = Some(input);
            self
        }
        /// <p>Indicates whether a network interface created in this subnet (including a network interface created by <code>RunInstances</code>) receives an IPv6 address.</p>
        pub fn set_assign_ipv6_address_on_creation(
            mut self,
            input: std::option::Option<bool>,
        ) -> Self {
            self.assign_ipv6_address_on_creation = input;
            self
        }
        /// Appends an item to `ipv6_cidr_block_association_set`.
        ///
        /// To override the contents of this collection use [`set_ipv6_cidr_block_association_set`](Self::set_ipv6_cidr_block_association_set).
        ///
        /// <p>Information about the IPv6 CIDR blocks associated with the subnet.</p>
        pub fn ipv6_cidr_block_association_set(
            mut self,
            input: crate::model::SubnetIpv6CidrBlockAssociation,
        ) -> Self {
            let mut v = self.ipv6_cidr_block_association_set.unwrap_or_default();
            v.push(input);
            self.ipv6_cidr_block_association_set = Some(v);
            self
        }
        /// <p>Information about the IPv6 CIDR blocks associated with the subnet.</p>
        pub fn set_ipv6_cidr_block_association_set(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::SubnetIpv6CidrBlockAssociation>>,
        ) -> Self {
            self.ipv6_cidr_block_association_set = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>Any tags assigned to the subnet.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>Any tags assigned to the subnet.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the subnet.</p>
        pub fn subnet_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.subnet_arn = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the subnet.</p>
        pub fn set_subnet_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.subnet_arn = input;
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the Outpost.</p>
        pub fn outpost_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.outpost_arn = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the Outpost.</p>
        pub fn set_outpost_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.outpost_arn = input;
            self
        }
        /// <p>Indicates whether DNS queries made to the Amazon-provided DNS Resolver in this subnet should return synthetic IPv6 addresses for IPv4-only destinations.</p>
        pub fn enable_dns64(mut self, input: bool) -> Self {
            self.enable_dns64 = Some(input);
            self
        }
        /// <p>Indicates whether DNS queries made to the Amazon-provided DNS Resolver in this subnet should return synthetic IPv6 addresses for IPv4-only destinations.</p>
        pub fn set_enable_dns64(mut self, input: std::option::Option<bool>) -> Self {
            self.enable_dns64 = input;
            self
        }
        /// <p>Indicates whether this is an IPv6 only subnet.</p>
        pub fn ipv6_native(mut self, input: bool) -> Self {
            self.ipv6_native = Some(input);
            self
        }
        /// <p>Indicates whether this is an IPv6 only subnet.</p>
        pub fn set_ipv6_native(mut self, input: std::option::Option<bool>) -> Self {
            self.ipv6_native = input;
            self
        }
        /// <p>The type of hostnames to assign to instances in the subnet at launch. An instance hostname is based on the IPv4 address or ID of the instance.</p>
        pub fn private_dns_name_options_on_launch(
            mut self,
            input: crate::model::PrivateDnsNameOptionsOnLaunch,
        ) -> Self {
            self.private_dns_name_options_on_launch = Some(input);
            self
        }
        /// <p>The type of hostnames to assign to instances in the subnet at launch. An instance hostname is based on the IPv4 address or ID of the instance.</p>
        pub fn set_private_dns_name_options_on_launch(
            mut self,
            input: std::option::Option<crate::model::PrivateDnsNameOptionsOnLaunch>,
        ) -> Self {
            self.private_dns_name_options_on_launch = input;
            self
        }
        /// Consumes the builder and constructs a [`Subnet`](crate::model::Subnet).
        pub fn build(self) -> crate::model::Subnet {
            crate::model::Subnet {
                availability_zone: self.availability_zone,
                availability_zone_id: self.availability_zone_id,
                available_ip_address_count: self.available_ip_address_count,
                cidr_block: self.cidr_block,
                default_for_az: self.default_for_az,
                enable_lni_at_device_index: self.enable_lni_at_device_index,
                map_public_ip_on_launch: self.map_public_ip_on_launch,
                map_customer_owned_ip_on_launch: self.map_customer_owned_ip_on_launch,
                customer_owned_ipv4_pool: self.customer_owned_ipv4_pool,
                state: self.state,
                subnet_id: self.subnet_id,
                vpc_id: self.vpc_id,
                owner_id: self.owner_id,
                assign_ipv6_address_on_creation: self.assign_ipv6_address_on_creation,
                ipv6_cidr_block_association_set: self.ipv6_cidr_block_association_set,
                tags: self.tags,
                subnet_arn: self.subnet_arn,
                outpost_arn: self.outpost_arn,
                enable_dns64: self.enable_dns64,
                ipv6_native: self.ipv6_native,
                private_dns_name_options_on_launch: self.private_dns_name_options_on_launch,
            }
        }
    }
}
impl Subnet {
    /// Creates a new builder-style object to manufacture [`Subnet`](crate::model::Subnet).
    pub fn builder() -> crate::model::subnet::Builder {
        crate::model::subnet::Builder::default()
    }
}

/// <p>Describes the options for instance hostnames.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct PrivateDnsNameOptionsOnLaunch {
    /// <p>The type of hostname for EC2 instances. For IPv4 only subnets, an instance DNS name must be based on the instance IPv4 address. For IPv6 only subnets, an instance DNS name must be based on the instance ID. For dual-stack subnets, you can specify whether DNS names use the instance IPv4 address or the instance ID.</p>
    #[doc(hidden)]
    pub hostname_type: std::option::Option<crate::model::HostnameType>,
    /// <p>Indicates whether to respond to DNS queries for instance hostnames with DNS A records.</p>
    #[doc(hidden)]
    pub enable_resource_name_dns_a_record: std::option::Option<bool>,
    /// <p>Indicates whether to respond to DNS queries for instance hostname with DNS AAAA records.</p>
    #[doc(hidden)]
    pub enable_resource_name_dns_aaaa_record: std::option::Option<bool>,
}
impl PrivateDnsNameOptionsOnLaunch {
    /// <p>The type of hostname for EC2 instances. For IPv4 only subnets, an instance DNS name must be based on the instance IPv4 address. For IPv6 only subnets, an instance DNS name must be based on the instance ID. For dual-stack subnets, you can specify whether DNS names use the instance IPv4 address or the instance ID.</p>
    pub fn hostname_type(&self) -> std::option::Option<&crate::model::HostnameType> {
        self.hostname_type.as_ref()
    }
    /// <p>Indicates whether to respond to DNS queries for instance hostnames with DNS A records.</p>
    pub fn enable_resource_name_dns_a_record(&self) -> std::option::Option<bool> {
        self.enable_resource_name_dns_a_record
    }
    /// <p>Indicates whether to respond to DNS queries for instance hostname with DNS AAAA records.</p>
    pub fn enable_resource_name_dns_aaaa_record(&self) -> std::option::Option<bool> {
        self.enable_resource_name_dns_aaaa_record
    }
}
/// See [`PrivateDnsNameOptionsOnLaunch`](crate::model::PrivateDnsNameOptionsOnLaunch).
pub mod private_dns_name_options_on_launch {

    /// A builder for [`PrivateDnsNameOptionsOnLaunch`](crate::model::PrivateDnsNameOptionsOnLaunch).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) hostname_type: std::option::Option<crate::model::HostnameType>,
        pub(crate) enable_resource_name_dns_a_record: std::option::Option<bool>,
        pub(crate) enable_resource_name_dns_aaaa_record: std::option::Option<bool>,
    }
    impl Builder {
        /// <p>The type of hostname for EC2 instances. For IPv4 only subnets, an instance DNS name must be based on the instance IPv4 address. For IPv6 only subnets, an instance DNS name must be based on the instance ID. For dual-stack subnets, you can specify whether DNS names use the instance IPv4 address or the instance ID.</p>
        pub fn hostname_type(mut self, input: crate::model::HostnameType) -> Self {
            self.hostname_type = Some(input);
            self
        }
        /// <p>The type of hostname for EC2 instances. For IPv4 only subnets, an instance DNS name must be based on the instance IPv4 address. For IPv6 only subnets, an instance DNS name must be based on the instance ID. For dual-stack subnets, you can specify whether DNS names use the instance IPv4 address or the instance ID.</p>
        pub fn set_hostname_type(
            mut self,
            input: std::option::Option<crate::model::HostnameType>,
        ) -> Self {
            self.hostname_type = input;
            self
        }
        /// <p>Indicates whether to respond to DNS queries for instance hostnames with DNS A records.</p>
        pub fn enable_resource_name_dns_a_record(mut self, input: bool) -> Self {
            self.enable_resource_name_dns_a_record = Some(input);
            self
        }
        /// <p>Indicates whether to respond to DNS queries for instance hostnames with DNS A records.</p>
        pub fn set_enable_resource_name_dns_a_record(
            mut self,
            input: std::option::Option<bool>,
        ) -> Self {
            self.enable_resource_name_dns_a_record = input;
            self
        }
        /// <p>Indicates whether to respond to DNS queries for instance hostname with DNS AAAA records.</p>
        pub fn enable_resource_name_dns_aaaa_record(mut self, input: bool) -> Self {
            self.enable_resource_name_dns_aaaa_record = Some(input);
            self
        }
        /// <p>Indicates whether to respond to DNS queries for instance hostname with DNS AAAA records.</p>
        pub fn set_enable_resource_name_dns_aaaa_record(
            mut self,
            input: std::option::Option<bool>,
        ) -> Self {
            self.enable_resource_name_dns_aaaa_record = input;
            self
        }
        /// Consumes the builder and constructs a [`PrivateDnsNameOptionsOnLaunch`](crate::model::PrivateDnsNameOptionsOnLaunch).
        pub fn build(self) -> crate::model::PrivateDnsNameOptionsOnLaunch {
            crate::model::PrivateDnsNameOptionsOnLaunch {
                hostname_type: self.hostname_type,
                enable_resource_name_dns_a_record: self.enable_resource_name_dns_a_record,
                enable_resource_name_dns_aaaa_record: self.enable_resource_name_dns_aaaa_record,
            }
        }
    }
}
impl PrivateDnsNameOptionsOnLaunch {
    /// Creates a new builder-style object to manufacture [`PrivateDnsNameOptionsOnLaunch`](crate::model::PrivateDnsNameOptionsOnLaunch).
    pub fn builder() -> crate::model::private_dns_name_options_on_launch::Builder {
        crate::model::private_dns_name_options_on_launch::Builder::default()
    }
}

/// When writing a match expression against `SubnetState`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let subnetstate = unimplemented!();
/// match subnetstate {
///     SubnetState::Available => { /* ... */ },
///     SubnetState::Pending => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `subnetstate` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `SubnetState::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `SubnetState::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `SubnetState::NewFeature` is defined.
/// Specifically, when `subnetstate` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `SubnetState::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 SubnetState {
    #[allow(missing_docs)] // documentation missing in model
    Available,
    #[allow(missing_docs)] // documentation missing in model
    Pending,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for SubnetState {
    fn from(s: &str) -> Self {
        match s {
            "available" => SubnetState::Available,
            "pending" => SubnetState::Pending,
            other => SubnetState::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for SubnetState {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(SubnetState::from(s))
    }
}
impl SubnetState {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            SubnetState::Available => "available",
            SubnetState::Pending => "pending",
            SubnetState::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["available", "pending"]
    }
}
impl AsRef<str> for SubnetState {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>The information about the AMI store task, including the progress of the task.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct StoreImageTaskResult {
    /// <p>The ID of the AMI that is being stored.</p>
    #[doc(hidden)]
    pub ami_id: std::option::Option<std::string::String>,
    /// <p>The time the task started.</p>
    #[doc(hidden)]
    pub task_start_time: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The name of the Amazon S3 bucket that contains the stored AMI object.</p>
    #[doc(hidden)]
    pub bucket: std::option::Option<std::string::String>,
    /// <p>The name of the stored AMI object in the bucket.</p>
    #[doc(hidden)]
    pub s3object_key: std::option::Option<std::string::String>,
    /// <p>The progress of the task as a percentage.</p>
    #[doc(hidden)]
    pub progress_percentage: std::option::Option<i32>,
    /// <p>The state of the store task (<code>InProgress</code>, <code>Completed</code>, or <code>Failed</code>).</p>
    #[doc(hidden)]
    pub store_task_state: std::option::Option<std::string::String>,
    /// <p>If the tasks fails, the reason for the failure is returned. If the task succeeds, <code>null</code> is returned.</p>
    #[doc(hidden)]
    pub store_task_failure_reason: std::option::Option<std::string::String>,
}
impl StoreImageTaskResult {
    /// <p>The ID of the AMI that is being stored.</p>
    pub fn ami_id(&self) -> std::option::Option<&str> {
        self.ami_id.as_deref()
    }
    /// <p>The time the task started.</p>
    pub fn task_start_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.task_start_time.as_ref()
    }
    /// <p>The name of the Amazon S3 bucket that contains the stored AMI object.</p>
    pub fn bucket(&self) -> std::option::Option<&str> {
        self.bucket.as_deref()
    }
    /// <p>The name of the stored AMI object in the bucket.</p>
    pub fn s3object_key(&self) -> std::option::Option<&str> {
        self.s3object_key.as_deref()
    }
    /// <p>The progress of the task as a percentage.</p>
    pub fn progress_percentage(&self) -> std::option::Option<i32> {
        self.progress_percentage
    }
    /// <p>The state of the store task (<code>InProgress</code>, <code>Completed</code>, or <code>Failed</code>).</p>
    pub fn store_task_state(&self) -> std::option::Option<&str> {
        self.store_task_state.as_deref()
    }
    /// <p>If the tasks fails, the reason for the failure is returned. If the task succeeds, <code>null</code> is returned.</p>
    pub fn store_task_failure_reason(&self) -> std::option::Option<&str> {
        self.store_task_failure_reason.as_deref()
    }
}
/// See [`StoreImageTaskResult`](crate::model::StoreImageTaskResult).
pub mod store_image_task_result {

    /// A builder for [`StoreImageTaskResult`](crate::model::StoreImageTaskResult).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) ami_id: std::option::Option<std::string::String>,
        pub(crate) task_start_time: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) bucket: std::option::Option<std::string::String>,
        pub(crate) s3object_key: std::option::Option<std::string::String>,
        pub(crate) progress_percentage: std::option::Option<i32>,
        pub(crate) store_task_state: std::option::Option<std::string::String>,
        pub(crate) store_task_failure_reason: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The ID of the AMI that is being stored.</p>
        pub fn ami_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.ami_id = Some(input.into());
            self
        }
        /// <p>The ID of the AMI that is being stored.</p>
        pub fn set_ami_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.ami_id = input;
            self
        }
        /// <p>The time the task started.</p>
        pub fn task_start_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.task_start_time = Some(input);
            self
        }
        /// <p>The time the task started.</p>
        pub fn set_task_start_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.task_start_time = input;
            self
        }
        /// <p>The name of the Amazon S3 bucket that contains the stored AMI object.</p>
        pub fn bucket(mut self, input: impl Into<std::string::String>) -> Self {
            self.bucket = Some(input.into());
            self
        }
        /// <p>The name of the Amazon S3 bucket that contains the stored AMI object.</p>
        pub fn set_bucket(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.bucket = input;
            self
        }
        /// <p>The name of the stored AMI object in the bucket.</p>
        pub fn s3object_key(mut self, input: impl Into<std::string::String>) -> Self {
            self.s3object_key = Some(input.into());
            self
        }
        /// <p>The name of the stored AMI object in the bucket.</p>
        pub fn set_s3object_key(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.s3object_key = input;
            self
        }
        /// <p>The progress of the task as a percentage.</p>
        pub fn progress_percentage(mut self, input: i32) -> Self {
            self.progress_percentage = Some(input);
            self
        }
        /// <p>The progress of the task as a percentage.</p>
        pub fn set_progress_percentage(mut self, input: std::option::Option<i32>) -> Self {
            self.progress_percentage = input;
            self
        }
        /// <p>The state of the store task (<code>InProgress</code>, <code>Completed</code>, or <code>Failed</code>).</p>
        pub fn store_task_state(mut self, input: impl Into<std::string::String>) -> Self {
            self.store_task_state = Some(input.into());
            self
        }
        /// <p>The state of the store task (<code>InProgress</code>, <code>Completed</code>, or <code>Failed</code>).</p>
        pub fn set_store_task_state(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.store_task_state = input;
            self
        }
        /// <p>If the tasks fails, the reason for the failure is returned. If the task succeeds, <code>null</code> is returned.</p>
        pub fn store_task_failure_reason(mut self, input: impl Into<std::string::String>) -> Self {
            self.store_task_failure_reason = Some(input.into());
            self
        }
        /// <p>If the tasks fails, the reason for the failure is returned. If the task succeeds, <code>null</code> is returned.</p>
        pub fn set_store_task_failure_reason(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.store_task_failure_reason = input;
            self
        }
        /// Consumes the builder and constructs a [`StoreImageTaskResult`](crate::model::StoreImageTaskResult).
        pub fn build(self) -> crate::model::StoreImageTaskResult {
            crate::model::StoreImageTaskResult {
                ami_id: self.ami_id,
                task_start_time: self.task_start_time,
                bucket: self.bucket,
                s3object_key: self.s3object_key,
                progress_percentage: self.progress_percentage,
                store_task_state: self.store_task_state,
                store_task_failure_reason: self.store_task_failure_reason,
            }
        }
    }
}
impl StoreImageTaskResult {
    /// Creates a new builder-style object to manufacture [`StoreImageTaskResult`](crate::model::StoreImageTaskResult).
    pub fn builder() -> crate::model::store_image_task_result::Builder {
        crate::model::store_image_task_result::Builder::default()
    }
}

/// <p>Describes a stale security group (a security group that contains stale rules).</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct StaleSecurityGroup {
    /// <p>The description of the security group.</p>
    #[doc(hidden)]
    pub description: std::option::Option<std::string::String>,
    /// <p>The ID of the security group.</p>
    #[doc(hidden)]
    pub group_id: std::option::Option<std::string::String>,
    /// <p>The name of the security group.</p>
    #[doc(hidden)]
    pub group_name: std::option::Option<std::string::String>,
    /// <p>Information about the stale inbound rules in the security group.</p>
    #[doc(hidden)]
    pub stale_ip_permissions: std::option::Option<std::vec::Vec<crate::model::StaleIpPermission>>,
    /// <p>Information about the stale outbound rules in the security group.</p>
    #[doc(hidden)]
    pub stale_ip_permissions_egress:
        std::option::Option<std::vec::Vec<crate::model::StaleIpPermission>>,
    /// <p>The ID of the VPC for the security group.</p>
    #[doc(hidden)]
    pub vpc_id: std::option::Option<std::string::String>,
}
impl StaleSecurityGroup {
    /// <p>The description of the security group.</p>
    pub fn description(&self) -> std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The ID of the security group.</p>
    pub fn group_id(&self) -> std::option::Option<&str> {
        self.group_id.as_deref()
    }
    /// <p>The name of the security group.</p>
    pub fn group_name(&self) -> std::option::Option<&str> {
        self.group_name.as_deref()
    }
    /// <p>Information about the stale inbound rules in the security group.</p>
    pub fn stale_ip_permissions(&self) -> std::option::Option<&[crate::model::StaleIpPermission]> {
        self.stale_ip_permissions.as_deref()
    }
    /// <p>Information about the stale outbound rules in the security group.</p>
    pub fn stale_ip_permissions_egress(
        &self,
    ) -> std::option::Option<&[crate::model::StaleIpPermission]> {
        self.stale_ip_permissions_egress.as_deref()
    }
    /// <p>The ID of the VPC for the security group.</p>
    pub fn vpc_id(&self) -> std::option::Option<&str> {
        self.vpc_id.as_deref()
    }
}
/// See [`StaleSecurityGroup`](crate::model::StaleSecurityGroup).
pub mod stale_security_group {

    /// A builder for [`StaleSecurityGroup`](crate::model::StaleSecurityGroup).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) description: std::option::Option<std::string::String>,
        pub(crate) group_id: std::option::Option<std::string::String>,
        pub(crate) group_name: std::option::Option<std::string::String>,
        pub(crate) stale_ip_permissions:
            std::option::Option<std::vec::Vec<crate::model::StaleIpPermission>>,
        pub(crate) stale_ip_permissions_egress:
            std::option::Option<std::vec::Vec<crate::model::StaleIpPermission>>,
        pub(crate) vpc_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The description of the security group.</p>
        pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
            self.description = Some(input.into());
            self
        }
        /// <p>The description of the security group.</p>
        pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.description = input;
            self
        }
        /// <p>The ID of the security group.</p>
        pub fn group_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.group_id = Some(input.into());
            self
        }
        /// <p>The ID of the security group.</p>
        pub fn set_group_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.group_id = input;
            self
        }
        /// <p>The name of the security group.</p>
        pub fn group_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.group_name = Some(input.into());
            self
        }
        /// <p>The name of the security group.</p>
        pub fn set_group_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.group_name = input;
            self
        }
        /// Appends an item to `stale_ip_permissions`.
        ///
        /// To override the contents of this collection use [`set_stale_ip_permissions`](Self::set_stale_ip_permissions).
        ///
        /// <p>Information about the stale inbound rules in the security group.</p>
        pub fn stale_ip_permissions(mut self, input: crate::model::StaleIpPermission) -> Self {
            let mut v = self.stale_ip_permissions.unwrap_or_default();
            v.push(input);
            self.stale_ip_permissions = Some(v);
            self
        }
        /// <p>Information about the stale inbound rules in the security group.</p>
        pub fn set_stale_ip_permissions(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::StaleIpPermission>>,
        ) -> Self {
            self.stale_ip_permissions = input;
            self
        }
        /// Appends an item to `stale_ip_permissions_egress`.
        ///
        /// To override the contents of this collection use [`set_stale_ip_permissions_egress`](Self::set_stale_ip_permissions_egress).
        ///
        /// <p>Information about the stale outbound rules in the security group.</p>
        pub fn stale_ip_permissions_egress(
            mut self,
            input: crate::model::StaleIpPermission,
        ) -> Self {
            let mut v = self.stale_ip_permissions_egress.unwrap_or_default();
            v.push(input);
            self.stale_ip_permissions_egress = Some(v);
            self
        }
        /// <p>Information about the stale outbound rules in the security group.</p>
        pub fn set_stale_ip_permissions_egress(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::StaleIpPermission>>,
        ) -> Self {
            self.stale_ip_permissions_egress = input;
            self
        }
        /// <p>The ID of the VPC for the security group.</p>
        pub fn vpc_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.vpc_id = Some(input.into());
            self
        }
        /// <p>The ID of the VPC for the security group.</p>
        pub fn set_vpc_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.vpc_id = input;
            self
        }
        /// Consumes the builder and constructs a [`StaleSecurityGroup`](crate::model::StaleSecurityGroup).
        pub fn build(self) -> crate::model::StaleSecurityGroup {
            crate::model::StaleSecurityGroup {
                description: self.description,
                group_id: self.group_id,
                group_name: self.group_name,
                stale_ip_permissions: self.stale_ip_permissions,
                stale_ip_permissions_egress: self.stale_ip_permissions_egress,
                vpc_id: self.vpc_id,
            }
        }
    }
}
impl StaleSecurityGroup {
    /// Creates a new builder-style object to manufacture [`StaleSecurityGroup`](crate::model::StaleSecurityGroup).
    pub fn builder() -> crate::model::stale_security_group::Builder {
        crate::model::stale_security_group::Builder::default()
    }
}

/// <p>Describes a stale rule in a security group.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct StaleIpPermission {
    /// <p>The start of the port range for the TCP and UDP protocols, or an ICMP type number. A value of -1 indicates all ICMP types. </p>
    #[doc(hidden)]
    pub from_port: std::option::Option<i32>,
    /// <p>The IP protocol name (for <code>tcp</code>, <code>udp</code>, and <code>icmp</code>) or number (see <a href="http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml">Protocol Numbers)</a>.</p>
    #[doc(hidden)]
    pub ip_protocol: std::option::Option<std::string::String>,
    /// <p>The IP ranges. Not applicable for stale security group rules.</p>
    #[doc(hidden)]
    pub ip_ranges: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>The prefix list IDs. Not applicable for stale security group rules.</p>
    #[doc(hidden)]
    pub prefix_list_ids: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>The end of the port range for the TCP and UDP protocols, or an ICMP type number. A value of <code>-1</code> indicates all ICMP types. </p>
    #[doc(hidden)]
    pub to_port: std::option::Option<i32>,
    /// <p>The security group pairs. Returns the ID of the referenced security group and VPC, and the ID and status of the VPC peering connection.</p>
    #[doc(hidden)]
    pub user_id_group_pairs: std::option::Option<std::vec::Vec<crate::model::UserIdGroupPair>>,
}
impl StaleIpPermission {
    /// <p>The start of the port range for the TCP and UDP protocols, or an ICMP type number. A value of -1 indicates all ICMP types. </p>
    pub fn from_port(&self) -> std::option::Option<i32> {
        self.from_port
    }
    /// <p>The IP protocol name (for <code>tcp</code>, <code>udp</code>, and <code>icmp</code>) or number (see <a href="http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml">Protocol Numbers)</a>.</p>
    pub fn ip_protocol(&self) -> std::option::Option<&str> {
        self.ip_protocol.as_deref()
    }
    /// <p>The IP ranges. Not applicable for stale security group rules.</p>
    pub fn ip_ranges(&self) -> std::option::Option<&[std::string::String]> {
        self.ip_ranges.as_deref()
    }
    /// <p>The prefix list IDs. Not applicable for stale security group rules.</p>
    pub fn prefix_list_ids(&self) -> std::option::Option<&[std::string::String]> {
        self.prefix_list_ids.as_deref()
    }
    /// <p>The end of the port range for the TCP and UDP protocols, or an ICMP type number. A value of <code>-1</code> indicates all ICMP types. </p>
    pub fn to_port(&self) -> std::option::Option<i32> {
        self.to_port
    }
    /// <p>The security group pairs. Returns the ID of the referenced security group and VPC, and the ID and status of the VPC peering connection.</p>
    pub fn user_id_group_pairs(&self) -> std::option::Option<&[crate::model::UserIdGroupPair]> {
        self.user_id_group_pairs.as_deref()
    }
}
/// See [`StaleIpPermission`](crate::model::StaleIpPermission).
pub mod stale_ip_permission {

    /// A builder for [`StaleIpPermission`](crate::model::StaleIpPermission).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) from_port: std::option::Option<i32>,
        pub(crate) ip_protocol: std::option::Option<std::string::String>,
        pub(crate) ip_ranges: std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) prefix_list_ids: std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) to_port: std::option::Option<i32>,
        pub(crate) user_id_group_pairs:
            std::option::Option<std::vec::Vec<crate::model::UserIdGroupPair>>,
    }
    impl Builder {
        /// <p>The start of the port range for the TCP and UDP protocols, or an ICMP type number. A value of -1 indicates all ICMP types. </p>
        pub fn from_port(mut self, input: i32) -> Self {
            self.from_port = Some(input);
            self
        }
        /// <p>The start of the port range for the TCP and UDP protocols, or an ICMP type number. A value of -1 indicates all ICMP types. </p>
        pub fn set_from_port(mut self, input: std::option::Option<i32>) -> Self {
            self.from_port = input;
            self
        }
        /// <p>The IP protocol name (for <code>tcp</code>, <code>udp</code>, and <code>icmp</code>) or number (see <a href="http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml">Protocol Numbers)</a>.</p>
        pub fn ip_protocol(mut self, input: impl Into<std::string::String>) -> Self {
            self.ip_protocol = Some(input.into());
            self
        }
        /// <p>The IP protocol name (for <code>tcp</code>, <code>udp</code>, and <code>icmp</code>) or number (see <a href="http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml">Protocol Numbers)</a>.</p>
        pub fn set_ip_protocol(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.ip_protocol = input;
            self
        }
        /// Appends an item to `ip_ranges`.
        ///
        /// To override the contents of this collection use [`set_ip_ranges`](Self::set_ip_ranges).
        ///
        /// <p>The IP ranges. Not applicable for stale security group rules.</p>
        pub fn ip_ranges(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.ip_ranges.unwrap_or_default();
            v.push(input.into());
            self.ip_ranges = Some(v);
            self
        }
        /// <p>The IP ranges. Not applicable for stale security group rules.</p>
        pub fn set_ip_ranges(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.ip_ranges = input;
            self
        }
        /// Appends an item to `prefix_list_ids`.
        ///
        /// To override the contents of this collection use [`set_prefix_list_ids`](Self::set_prefix_list_ids).
        ///
        /// <p>The prefix list IDs. Not applicable for stale security group rules.</p>
        pub fn prefix_list_ids(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.prefix_list_ids.unwrap_or_default();
            v.push(input.into());
            self.prefix_list_ids = Some(v);
            self
        }
        /// <p>The prefix list IDs. Not applicable for stale security group rules.</p>
        pub fn set_prefix_list_ids(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.prefix_list_ids = input;
            self
        }
        /// <p>The end of the port range for the TCP and UDP protocols, or an ICMP type number. A value of <code>-1</code> indicates all ICMP types. </p>
        pub fn to_port(mut self, input: i32) -> Self {
            self.to_port = Some(input);
            self
        }
        /// <p>The end of the port range for the TCP and UDP protocols, or an ICMP type number. A value of <code>-1</code> indicates all ICMP types. </p>
        pub fn set_to_port(mut self, input: std::option::Option<i32>) -> Self {
            self.to_port = input;
            self
        }
        /// Appends an item to `user_id_group_pairs`.
        ///
        /// To override the contents of this collection use [`set_user_id_group_pairs`](Self::set_user_id_group_pairs).
        ///
        /// <p>The security group pairs. Returns the ID of the referenced security group and VPC, and the ID and status of the VPC peering connection.</p>
        pub fn user_id_group_pairs(mut self, input: crate::model::UserIdGroupPair) -> Self {
            let mut v = self.user_id_group_pairs.unwrap_or_default();
            v.push(input);
            self.user_id_group_pairs = Some(v);
            self
        }
        /// <p>The security group pairs. Returns the ID of the referenced security group and VPC, and the ID and status of the VPC peering connection.</p>
        pub fn set_user_id_group_pairs(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::UserIdGroupPair>>,
        ) -> Self {
            self.user_id_group_pairs = input;
            self
        }
        /// Consumes the builder and constructs a [`StaleIpPermission`](crate::model::StaleIpPermission).
        pub fn build(self) -> crate::model::StaleIpPermission {
            crate::model::StaleIpPermission {
                from_port: self.from_port,
                ip_protocol: self.ip_protocol,
                ip_ranges: self.ip_ranges,
                prefix_list_ids: self.prefix_list_ids,
                to_port: self.to_port,
                user_id_group_pairs: self.user_id_group_pairs,
            }
        }
    }
}
impl StaleIpPermission {
    /// Creates a new builder-style object to manufacture [`StaleIpPermission`](crate::model::StaleIpPermission).
    pub fn builder() -> crate::model::stale_ip_permission::Builder {
        crate::model::stale_ip_permission::Builder::default()
    }
}

/// <p>The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.</p> <important>
/// <p>If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.</p>
/// </important>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SpotPrice {
    /// <p>The Availability Zone.</p>
    #[doc(hidden)]
    pub availability_zone: std::option::Option<std::string::String>,
    /// <p>The instance type.</p>
    #[doc(hidden)]
    pub instance_type: std::option::Option<crate::model::InstanceType>,
    /// <p>A general description of the AMI.</p>
    #[doc(hidden)]
    pub product_description: std::option::Option<crate::model::RiProductDescription>,
    /// <p>The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.</p> <important>
    /// <p>If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.</p>
    /// </important>
    #[doc(hidden)]
    pub spot_price: std::option::Option<std::string::String>,
    /// <p>The date and time the request was created, in UTC format (for example, <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).</p>
    #[doc(hidden)]
    pub timestamp: std::option::Option<aws_smithy_types::DateTime>,
}
impl SpotPrice {
    /// <p>The Availability Zone.</p>
    pub fn availability_zone(&self) -> std::option::Option<&str> {
        self.availability_zone.as_deref()
    }
    /// <p>The instance type.</p>
    pub fn instance_type(&self) -> std::option::Option<&crate::model::InstanceType> {
        self.instance_type.as_ref()
    }
    /// <p>A general description of the AMI.</p>
    pub fn product_description(&self) -> std::option::Option<&crate::model::RiProductDescription> {
        self.product_description.as_ref()
    }
    /// <p>The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.</p> <important>
    /// <p>If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.</p>
    /// </important>
    pub fn spot_price(&self) -> std::option::Option<&str> {
        self.spot_price.as_deref()
    }
    /// <p>The date and time the request was created, in UTC format (for example, <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).</p>
    pub fn timestamp(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.timestamp.as_ref()
    }
}
/// See [`SpotPrice`](crate::model::SpotPrice).
pub mod spot_price {

    /// A builder for [`SpotPrice`](crate::model::SpotPrice).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) availability_zone: std::option::Option<std::string::String>,
        pub(crate) instance_type: std::option::Option<crate::model::InstanceType>,
        pub(crate) product_description: std::option::Option<crate::model::RiProductDescription>,
        pub(crate) spot_price: std::option::Option<std::string::String>,
        pub(crate) timestamp: std::option::Option<aws_smithy_types::DateTime>,
    }
    impl Builder {
        /// <p>The Availability Zone.</p>
        pub fn availability_zone(mut self, input: impl Into<std::string::String>) -> Self {
            self.availability_zone = Some(input.into());
            self
        }
        /// <p>The Availability Zone.</p>
        pub fn set_availability_zone(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.availability_zone = input;
            self
        }
        /// <p>The instance type.</p>
        pub fn instance_type(mut self, input: crate::model::InstanceType) -> Self {
            self.instance_type = Some(input);
            self
        }
        /// <p>The instance type.</p>
        pub fn set_instance_type(
            mut self,
            input: std::option::Option<crate::model::InstanceType>,
        ) -> Self {
            self.instance_type = input;
            self
        }
        /// <p>A general description of the AMI.</p>
        pub fn product_description(mut self, input: crate::model::RiProductDescription) -> Self {
            self.product_description = Some(input);
            self
        }
        /// <p>A general description of the AMI.</p>
        pub fn set_product_description(
            mut self,
            input: std::option::Option<crate::model::RiProductDescription>,
        ) -> Self {
            self.product_description = input;
            self
        }
        /// <p>The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.</p> <important>
        /// <p>If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.</p>
        /// </important>
        pub fn spot_price(mut self, input: impl Into<std::string::String>) -> Self {
            self.spot_price = Some(input.into());
            self
        }
        /// <p>The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.</p> <important>
        /// <p>If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.</p>
        /// </important>
        pub fn set_spot_price(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.spot_price = input;
            self
        }
        /// <p>The date and time the request was created, in UTC format (for example, <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).</p>
        pub fn timestamp(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.timestamp = Some(input);
            self
        }
        /// <p>The date and time the request was created, in UTC format (for example, <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).</p>
        pub fn set_timestamp(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.timestamp = input;
            self
        }
        /// Consumes the builder and constructs a [`SpotPrice`](crate::model::SpotPrice).
        pub fn build(self) -> crate::model::SpotPrice {
            crate::model::SpotPrice {
                availability_zone: self.availability_zone,
                instance_type: self.instance_type,
                product_description: self.product_description,
                spot_price: self.spot_price,
                timestamp: self.timestamp,
            }
        }
    }
}
impl SpotPrice {
    /// Creates a new builder-style object to manufacture [`SpotPrice`](crate::model::SpotPrice).
    pub fn builder() -> crate::model::spot_price::Builder {
        crate::model::spot_price::Builder::default()
    }
}

/// <p>Describes a Spot Fleet request.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SpotFleetRequestConfig {
    /// <p>The progress of the Spot Fleet request. If there is an error, the status is <code>error</code>. After all requests are placed, the status is <code>pending_fulfillment</code>. If the size of the fleet is equal to or greater than its target capacity, the status is <code>fulfilled</code>. If the size of the fleet is decreased, the status is <code>pending_termination</code> while Spot Instances are terminating.</p>
    #[doc(hidden)]
    pub activity_status: std::option::Option<crate::model::ActivityStatus>,
    /// <p>The creation date and time of the request.</p>
    #[doc(hidden)]
    pub create_time: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The configuration of the Spot Fleet request.</p>
    #[doc(hidden)]
    pub spot_fleet_request_config: std::option::Option<crate::model::SpotFleetRequestConfigData>,
    /// <p>The ID of the Spot Fleet request.</p>
    #[doc(hidden)]
    pub spot_fleet_request_id: std::option::Option<std::string::String>,
    /// <p>The state of the Spot Fleet request.</p>
    #[doc(hidden)]
    pub spot_fleet_request_state: std::option::Option<crate::model::BatchState>,
    /// <p>The tags for a Spot Fleet resource.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl SpotFleetRequestConfig {
    /// <p>The progress of the Spot Fleet request. If there is an error, the status is <code>error</code>. After all requests are placed, the status is <code>pending_fulfillment</code>. If the size of the fleet is equal to or greater than its target capacity, the status is <code>fulfilled</code>. If the size of the fleet is decreased, the status is <code>pending_termination</code> while Spot Instances are terminating.</p>
    pub fn activity_status(&self) -> std::option::Option<&crate::model::ActivityStatus> {
        self.activity_status.as_ref()
    }
    /// <p>The creation date and time of the request.</p>
    pub fn create_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.create_time.as_ref()
    }
    /// <p>The configuration of the Spot Fleet request.</p>
    pub fn spot_fleet_request_config(
        &self,
    ) -> std::option::Option<&crate::model::SpotFleetRequestConfigData> {
        self.spot_fleet_request_config.as_ref()
    }
    /// <p>The ID of the Spot Fleet request.</p>
    pub fn spot_fleet_request_id(&self) -> std::option::Option<&str> {
        self.spot_fleet_request_id.as_deref()
    }
    /// <p>The state of the Spot Fleet request.</p>
    pub fn spot_fleet_request_state(&self) -> std::option::Option<&crate::model::BatchState> {
        self.spot_fleet_request_state.as_ref()
    }
    /// <p>The tags for a Spot Fleet resource.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
}
/// See [`SpotFleetRequestConfig`](crate::model::SpotFleetRequestConfig).
pub mod spot_fleet_request_config {

    /// A builder for [`SpotFleetRequestConfig`](crate::model::SpotFleetRequestConfig).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) activity_status: std::option::Option<crate::model::ActivityStatus>,
        pub(crate) create_time: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) spot_fleet_request_config:
            std::option::Option<crate::model::SpotFleetRequestConfigData>,
        pub(crate) spot_fleet_request_id: std::option::Option<std::string::String>,
        pub(crate) spot_fleet_request_state: std::option::Option<crate::model::BatchState>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    }
    impl Builder {
        /// <p>The progress of the Spot Fleet request. If there is an error, the status is <code>error</code>. After all requests are placed, the status is <code>pending_fulfillment</code>. If the size of the fleet is equal to or greater than its target capacity, the status is <code>fulfilled</code>. If the size of the fleet is decreased, the status is <code>pending_termination</code> while Spot Instances are terminating.</p>
        pub fn activity_status(mut self, input: crate::model::ActivityStatus) -> Self {
            self.activity_status = Some(input);
            self
        }
        /// <p>The progress of the Spot Fleet request. If there is an error, the status is <code>error</code>. After all requests are placed, the status is <code>pending_fulfillment</code>. If the size of the fleet is equal to or greater than its target capacity, the status is <code>fulfilled</code>. If the size of the fleet is decreased, the status is <code>pending_termination</code> while Spot Instances are terminating.</p>
        pub fn set_activity_status(
            mut self,
            input: std::option::Option<crate::model::ActivityStatus>,
        ) -> Self {
            self.activity_status = input;
            self
        }
        /// <p>The creation date and time of the request.</p>
        pub fn create_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.create_time = Some(input);
            self
        }
        /// <p>The creation date and time of the request.</p>
        pub fn set_create_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.create_time = input;
            self
        }
        /// <p>The configuration of the Spot Fleet request.</p>
        pub fn spot_fleet_request_config(
            mut self,
            input: crate::model::SpotFleetRequestConfigData,
        ) -> Self {
            self.spot_fleet_request_config = Some(input);
            self
        }
        /// <p>The configuration of the Spot Fleet request.</p>
        pub fn set_spot_fleet_request_config(
            mut self,
            input: std::option::Option<crate::model::SpotFleetRequestConfigData>,
        ) -> Self {
            self.spot_fleet_request_config = input;
            self
        }
        /// <p>The ID of the Spot Fleet request.</p>
        pub fn spot_fleet_request_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.spot_fleet_request_id = Some(input.into());
            self
        }
        /// <p>The ID of the Spot Fleet request.</p>
        pub fn set_spot_fleet_request_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.spot_fleet_request_id = input;
            self
        }
        /// <p>The state of the Spot Fleet request.</p>
        pub fn spot_fleet_request_state(mut self, input: crate::model::BatchState) -> Self {
            self.spot_fleet_request_state = Some(input);
            self
        }
        /// <p>The state of the Spot Fleet request.</p>
        pub fn set_spot_fleet_request_state(
            mut self,
            input: std::option::Option<crate::model::BatchState>,
        ) -> Self {
            self.spot_fleet_request_state = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>The tags for a Spot Fleet resource.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>The tags for a Spot Fleet resource.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// Consumes the builder and constructs a [`SpotFleetRequestConfig`](crate::model::SpotFleetRequestConfig).
        pub fn build(self) -> crate::model::SpotFleetRequestConfig {
            crate::model::SpotFleetRequestConfig {
                activity_status: self.activity_status,
                create_time: self.create_time,
                spot_fleet_request_config: self.spot_fleet_request_config,
                spot_fleet_request_id: self.spot_fleet_request_id,
                spot_fleet_request_state: self.spot_fleet_request_state,
                tags: self.tags,
            }
        }
    }
}
impl SpotFleetRequestConfig {
    /// Creates a new builder-style object to manufacture [`SpotFleetRequestConfig`](crate::model::SpotFleetRequestConfig).
    pub fn builder() -> crate::model::spot_fleet_request_config::Builder {
        crate::model::spot_fleet_request_config::Builder::default()
    }
}

/// When writing a match expression against `BatchState`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let batchstate = unimplemented!();
/// match batchstate {
///     BatchState::Active => { /* ... */ },
///     BatchState::Cancelled => { /* ... */ },
///     BatchState::CancelledRunning => { /* ... */ },
///     BatchState::CancelledTerminatingInstances => { /* ... */ },
///     BatchState::Failed => { /* ... */ },
///     BatchState::Modifying => { /* ... */ },
///     BatchState::Submitted => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `batchstate` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `BatchState::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `BatchState::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `BatchState::NewFeature` is defined.
/// Specifically, when `batchstate` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `BatchState::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 BatchState {
    #[allow(missing_docs)] // documentation missing in model
    Active,
    #[allow(missing_docs)] // documentation missing in model
    Cancelled,
    #[allow(missing_docs)] // documentation missing in model
    CancelledRunning,
    #[allow(missing_docs)] // documentation missing in model
    CancelledTerminatingInstances,
    #[allow(missing_docs)] // documentation missing in model
    Failed,
    #[allow(missing_docs)] // documentation missing in model
    Modifying,
    #[allow(missing_docs)] // documentation missing in model
    Submitted,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for BatchState {
    fn from(s: &str) -> Self {
        match s {
            "active" => BatchState::Active,
            "cancelled" => BatchState::Cancelled,
            "cancelled_running" => BatchState::CancelledRunning,
            "cancelled_terminating" => BatchState::CancelledTerminatingInstances,
            "failed" => BatchState::Failed,
            "modifying" => BatchState::Modifying,
            "submitted" => BatchState::Submitted,
            other => BatchState::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for BatchState {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(BatchState::from(s))
    }
}
impl BatchState {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            BatchState::Active => "active",
            BatchState::Cancelled => "cancelled",
            BatchState::CancelledRunning => "cancelled_running",
            BatchState::CancelledTerminatingInstances => "cancelled_terminating",
            BatchState::Failed => "failed",
            BatchState::Modifying => "modifying",
            BatchState::Submitted => "submitted",
            BatchState::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &[
            "active",
            "cancelled",
            "cancelled_running",
            "cancelled_terminating",
            "failed",
            "modifying",
            "submitted",
        ]
    }
}
impl AsRef<str> for BatchState {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `ActivityStatus`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let activitystatus = unimplemented!();
/// match activitystatus {
///     ActivityStatus::Error => { /* ... */ },
///     ActivityStatus::Fulfilled => { /* ... */ },
///     ActivityStatus::PendingFulfillment => { /* ... */ },
///     ActivityStatus::PendingTermination => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `activitystatus` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `ActivityStatus::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `ActivityStatus::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `ActivityStatus::NewFeature` is defined.
/// Specifically, when `activitystatus` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `ActivityStatus::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 ActivityStatus {
    #[allow(missing_docs)] // documentation missing in model
    Error,
    #[allow(missing_docs)] // documentation missing in model
    Fulfilled,
    #[allow(missing_docs)] // documentation missing in model
    PendingFulfillment,
    #[allow(missing_docs)] // documentation missing in model
    PendingTermination,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for ActivityStatus {
    fn from(s: &str) -> Self {
        match s {
            "error" => ActivityStatus::Error,
            "fulfilled" => ActivityStatus::Fulfilled,
            "pending_fulfillment" => ActivityStatus::PendingFulfillment,
            "pending_termination" => ActivityStatus::PendingTermination,
            other => ActivityStatus::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for ActivityStatus {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(ActivityStatus::from(s))
    }
}
impl ActivityStatus {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            ActivityStatus::Error => "error",
            ActivityStatus::Fulfilled => "fulfilled",
            ActivityStatus::PendingFulfillment => "pending_fulfillment",
            ActivityStatus::PendingTermination => "pending_termination",
            ActivityStatus::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &[
            "error",
            "fulfilled",
            "pending_fulfillment",
            "pending_termination",
        ]
    }
}
impl AsRef<str> for ActivityStatus {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes an event in the history of the Spot Fleet request.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct HistoryRecord {
    /// <p>Information about the event.</p>
    #[doc(hidden)]
    pub event_information: std::option::Option<crate::model::EventInformation>,
    /// <p>The event type.</p>
    /// <ul>
    /// <li> <p> <code>error</code> - An error with the Spot Fleet request.</p> </li>
    /// <li> <p> <code>fleetRequestChange</code> - A change in the status or configuration of the Spot Fleet request.</p> </li>
    /// <li> <p> <code>instanceChange</code> - An instance was launched or terminated.</p> </li>
    /// <li> <p> <code>Information</code> - An informational event.</p> </li>
    /// </ul>
    #[doc(hidden)]
    pub event_type: std::option::Option<crate::model::EventType>,
    /// <p>The date and time of the event, in UTC format (for example, <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).</p>
    #[doc(hidden)]
    pub timestamp: std::option::Option<aws_smithy_types::DateTime>,
}
impl HistoryRecord {
    /// <p>Information about the event.</p>
    pub fn event_information(&self) -> std::option::Option<&crate::model::EventInformation> {
        self.event_information.as_ref()
    }
    /// <p>The event type.</p>
    /// <ul>
    /// <li> <p> <code>error</code> - An error with the Spot Fleet request.</p> </li>
    /// <li> <p> <code>fleetRequestChange</code> - A change in the status or configuration of the Spot Fleet request.</p> </li>
    /// <li> <p> <code>instanceChange</code> - An instance was launched or terminated.</p> </li>
    /// <li> <p> <code>Information</code> - An informational event.</p> </li>
    /// </ul>
    pub fn event_type(&self) -> std::option::Option<&crate::model::EventType> {
        self.event_type.as_ref()
    }
    /// <p>The date and time of the event, in UTC format (for example, <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).</p>
    pub fn timestamp(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.timestamp.as_ref()
    }
}
/// See [`HistoryRecord`](crate::model::HistoryRecord).
pub mod history_record {

    /// A builder for [`HistoryRecord`](crate::model::HistoryRecord).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) event_information: std::option::Option<crate::model::EventInformation>,
        pub(crate) event_type: std::option::Option<crate::model::EventType>,
        pub(crate) timestamp: std::option::Option<aws_smithy_types::DateTime>,
    }
    impl Builder {
        /// <p>Information about the event.</p>
        pub fn event_information(mut self, input: crate::model::EventInformation) -> Self {
            self.event_information = Some(input);
            self
        }
        /// <p>Information about the event.</p>
        pub fn set_event_information(
            mut self,
            input: std::option::Option<crate::model::EventInformation>,
        ) -> Self {
            self.event_information = input;
            self
        }
        /// <p>The event type.</p>
        /// <ul>
        /// <li> <p> <code>error</code> - An error with the Spot Fleet request.</p> </li>
        /// <li> <p> <code>fleetRequestChange</code> - A change in the status or configuration of the Spot Fleet request.</p> </li>
        /// <li> <p> <code>instanceChange</code> - An instance was launched or terminated.</p> </li>
        /// <li> <p> <code>Information</code> - An informational event.</p> </li>
        /// </ul>
        pub fn event_type(mut self, input: crate::model::EventType) -> Self {
            self.event_type = Some(input);
            self
        }
        /// <p>The event type.</p>
        /// <ul>
        /// <li> <p> <code>error</code> - An error with the Spot Fleet request.</p> </li>
        /// <li> <p> <code>fleetRequestChange</code> - A change in the status or configuration of the Spot Fleet request.</p> </li>
        /// <li> <p> <code>instanceChange</code> - An instance was launched or terminated.</p> </li>
        /// <li> <p> <code>Information</code> - An informational event.</p> </li>
        /// </ul>
        pub fn set_event_type(
            mut self,
            input: std::option::Option<crate::model::EventType>,
        ) -> Self {
            self.event_type = input;
            self
        }
        /// <p>The date and time of the event, in UTC format (for example, <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).</p>
        pub fn timestamp(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.timestamp = Some(input);
            self
        }
        /// <p>The date and time of the event, in UTC format (for example, <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).</p>
        pub fn set_timestamp(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.timestamp = input;
            self
        }
        /// Consumes the builder and constructs a [`HistoryRecord`](crate::model::HistoryRecord).
        pub fn build(self) -> crate::model::HistoryRecord {
            crate::model::HistoryRecord {
                event_information: self.event_information,
                event_type: self.event_type,
                timestamp: self.timestamp,
            }
        }
    }
}
impl HistoryRecord {
    /// Creates a new builder-style object to manufacture [`HistoryRecord`](crate::model::HistoryRecord).
    pub fn builder() -> crate::model::history_record::Builder {
        crate::model::history_record::Builder::default()
    }
}

/// When writing a match expression against `EventType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let eventtype = unimplemented!();
/// match eventtype {
///     EventType::Error => { /* ... */ },
///     EventType::BatchChange => { /* ... */ },
///     EventType::Information => { /* ... */ },
///     EventType::InstanceChange => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `eventtype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `EventType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `EventType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `EventType::NewFeature` is defined.
/// Specifically, when `eventtype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `EventType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 EventType {
    #[allow(missing_docs)] // documentation missing in model
    Error,
    #[allow(missing_docs)] // documentation missing in model
    BatchChange,
    #[allow(missing_docs)] // documentation missing in model
    Information,
    #[allow(missing_docs)] // documentation missing in model
    InstanceChange,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for EventType {
    fn from(s: &str) -> Self {
        match s {
            "error" => EventType::Error,
            "fleetRequestChange" => EventType::BatchChange,
            "information" => EventType::Information,
            "instanceChange" => EventType::InstanceChange,
            other => EventType::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for EventType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(EventType::from(s))
    }
}
impl EventType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            EventType::Error => "error",
            EventType::BatchChange => "fleetRequestChange",
            EventType::Information => "information",
            EventType::InstanceChange => "instanceChange",
            EventType::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &[
            "error",
            "fleetRequestChange",
            "information",
            "instanceChange",
        ]
    }
}
impl AsRef<str> for EventType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes an EC2 Fleet or Spot Fleet event.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct EventInformation {
    /// <p>The description of the event.</p>
    #[doc(hidden)]
    pub event_description: std::option::Option<std::string::String>,
    /// <p>The event.</p>
    /// <p> <code>error</code> events:</p>
    /// <ul>
    /// <li> <p> <code>iamFleetRoleInvalid</code> - The EC2 Fleet or Spot Fleet does not have the required permissions either to launch or terminate an instance.</p> </li>
    /// <li> <p> <code>allLaunchSpecsTemporarilyBlacklisted</code> - None of the configurations are valid, and several attempts to launch instances have failed. For more information, see the description of the event.</p> </li>
    /// <li> <p> <code>spotInstanceCountLimitExceeded</code> - You've reached the limit on the number of Spot Instances that you can launch.</p> </li>
    /// <li> <p> <code>spotFleetRequestConfigurationInvalid</code> - The configuration is not valid. For more information, see the description of the event.</p> </li>
    /// </ul>
    /// <p> <code>fleetRequestChange</code> events:</p>
    /// <ul>
    /// <li> <p> <code>active</code> - The EC2 Fleet or Spot Fleet request has been validated and Amazon EC2 is attempting to maintain the target number of running instances.</p> </li>
    /// <li> <p> <code>deleted</code> (EC2 Fleet) / <code>cancelled</code> (Spot Fleet) - The EC2 Fleet is deleted or the Spot Fleet request is canceled and has no running instances. The EC2 Fleet or Spot Fleet will be deleted two days after its instances are terminated.</p> </li>
    /// <li> <p> <code>deleted_running</code> (EC2 Fleet) / <code>cancelled_running</code> (Spot Fleet) - The EC2 Fleet is deleted or the Spot Fleet request is canceled and does not launch additional instances. Its existing instances continue to run until they are interrupted or terminated. The request remains in this state until all instances are interrupted or terminated.</p> </li>
    /// <li> <p> <code>deleted_terminating</code> (EC2 Fleet) / <code>cancelled_terminating</code> (Spot Fleet) - The EC2 Fleet is deleted or the Spot Fleet request is canceled and its instances are terminating. The request remains in this state until all instances are terminated.</p> </li>
    /// <li> <p> <code>expired</code> - The EC2 Fleet or Spot Fleet request has expired. If the request was created with <code>TerminateInstancesWithExpiration</code> set, a subsequent <code>terminated</code> event indicates that the instances are terminated.</p> </li>
    /// <li> <p> <code>modify_in_progress</code> - The EC2 Fleet or Spot Fleet request is being modified. The request remains in this state until the modification is fully processed.</p> </li>
    /// <li> <p> <code>modify_succeeded</code> - The EC2 Fleet or Spot Fleet request was modified.</p> </li>
    /// <li> <p> <code>submitted</code> - The EC2 Fleet or Spot Fleet request is being evaluated and Amazon EC2 is preparing to launch the target number of instances.</p> </li>
    /// <li> <p> <code>progress</code> - The EC2 Fleet or Spot Fleet request is in the process of being fulfilled.</p> </li>
    /// </ul>
    /// <p> <code>instanceChange</code> events:</p>
    /// <ul>
    /// <li> <p> <code>launched</code> - A new instance was launched.</p> </li>
    /// <li> <p> <code>terminated</code> - An instance was terminated by the user.</p> </li>
    /// <li> <p> <code>termination_notified</code> - An instance termination notification was sent when a Spot Instance was terminated by Amazon EC2 during scale-down, when the target capacity of the fleet was modified down, for example, from a target capacity of 4 to a target capacity of 3.</p> </li>
    /// </ul>
    /// <p> <code>Information</code> events:</p>
    /// <ul>
    /// <li> <p> <code>fleetProgressHalted</code> - The price in every launch specification is not valid because it is below the Spot price (all the launch specifications have produced <code>launchSpecUnusable</code> events). A launch specification might become valid if the Spot price changes.</p> </li>
    /// <li> <p> <code>launchSpecTemporarilyBlacklisted</code> - The configuration is not valid and several attempts to launch instances have failed. For more information, see the description of the event.</p> </li>
    /// <li> <p> <code>launchSpecUnusable</code> - The price in a launch specification is not valid because it is below the Spot price.</p> </li>
    /// <li> <p> <code>registerWithLoadBalancersFailed</code> - An attempt to register instances with load balancers failed. For more information, see the description of the event.</p> </li>
    /// </ul>
    #[doc(hidden)]
    pub event_sub_type: std::option::Option<std::string::String>,
    /// <p>The ID of the instance. This information is available only for <code>instanceChange</code> events.</p>
    #[doc(hidden)]
    pub instance_id: std::option::Option<std::string::String>,
}
impl EventInformation {
    /// <p>The description of the event.</p>
    pub fn event_description(&self) -> std::option::Option<&str> {
        self.event_description.as_deref()
    }
    /// <p>The event.</p>
    /// <p> <code>error</code> events:</p>
    /// <ul>
    /// <li> <p> <code>iamFleetRoleInvalid</code> - The EC2 Fleet or Spot Fleet does not have the required permissions either to launch or terminate an instance.</p> </li>
    /// <li> <p> <code>allLaunchSpecsTemporarilyBlacklisted</code> - None of the configurations are valid, and several attempts to launch instances have failed. For more information, see the description of the event.</p> </li>
    /// <li> <p> <code>spotInstanceCountLimitExceeded</code> - You've reached the limit on the number of Spot Instances that you can launch.</p> </li>
    /// <li> <p> <code>spotFleetRequestConfigurationInvalid</code> - The configuration is not valid. For more information, see the description of the event.</p> </li>
    /// </ul>
    /// <p> <code>fleetRequestChange</code> events:</p>
    /// <ul>
    /// <li> <p> <code>active</code> - The EC2 Fleet or Spot Fleet request has been validated and Amazon EC2 is attempting to maintain the target number of running instances.</p> </li>
    /// <li> <p> <code>deleted</code> (EC2 Fleet) / <code>cancelled</code> (Spot Fleet) - The EC2 Fleet is deleted or the Spot Fleet request is canceled and has no running instances. The EC2 Fleet or Spot Fleet will be deleted two days after its instances are terminated.</p> </li>
    /// <li> <p> <code>deleted_running</code> (EC2 Fleet) / <code>cancelled_running</code> (Spot Fleet) - The EC2 Fleet is deleted or the Spot Fleet request is canceled and does not launch additional instances. Its existing instances continue to run until they are interrupted or terminated. The request remains in this state until all instances are interrupted or terminated.</p> </li>
    /// <li> <p> <code>deleted_terminating</code> (EC2 Fleet) / <code>cancelled_terminating</code> (Spot Fleet) - The EC2 Fleet is deleted or the Spot Fleet request is canceled and its instances are terminating. The request remains in this state until all instances are terminated.</p> </li>
    /// <li> <p> <code>expired</code> - The EC2 Fleet or Spot Fleet request has expired. If the request was created with <code>TerminateInstancesWithExpiration</code> set, a subsequent <code>terminated</code> event indicates that the instances are terminated.</p> </li>
    /// <li> <p> <code>modify_in_progress</code> - The EC2 Fleet or Spot Fleet request is being modified. The request remains in this state until the modification is fully processed.</p> </li>
    /// <li> <p> <code>modify_succeeded</code> - The EC2 Fleet or Spot Fleet request was modified.</p> </li>
    /// <li> <p> <code>submitted</code> - The EC2 Fleet or Spot Fleet request is being evaluated and Amazon EC2 is preparing to launch the target number of instances.</p> </li>
    /// <li> <p> <code>progress</code> - The EC2 Fleet or Spot Fleet request is in the process of being fulfilled.</p> </li>
    /// </ul>
    /// <p> <code>instanceChange</code> events:</p>
    /// <ul>
    /// <li> <p> <code>launched</code> - A new instance was launched.</p> </li>
    /// <li> <p> <code>terminated</code> - An instance was terminated by the user.</p> </li>
    /// <li> <p> <code>termination_notified</code> - An instance termination notification was sent when a Spot Instance was terminated by Amazon EC2 during scale-down, when the target capacity of the fleet was modified down, for example, from a target capacity of 4 to a target capacity of 3.</p> </li>
    /// </ul>
    /// <p> <code>Information</code> events:</p>
    /// <ul>
    /// <li> <p> <code>fleetProgressHalted</code> - The price in every launch specification is not valid because it is below the Spot price (all the launch specifications have produced <code>launchSpecUnusable</code> events). A launch specification might become valid if the Spot price changes.</p> </li>
    /// <li> <p> <code>launchSpecTemporarilyBlacklisted</code> - The configuration is not valid and several attempts to launch instances have failed. For more information, see the description of the event.</p> </li>
    /// <li> <p> <code>launchSpecUnusable</code> - The price in a launch specification is not valid because it is below the Spot price.</p> </li>
    /// <li> <p> <code>registerWithLoadBalancersFailed</code> - An attempt to register instances with load balancers failed. For more information, see the description of the event.</p> </li>
    /// </ul>
    pub fn event_sub_type(&self) -> std::option::Option<&str> {
        self.event_sub_type.as_deref()
    }
    /// <p>The ID of the instance. This information is available only for <code>instanceChange</code> events.</p>
    pub fn instance_id(&self) -> std::option::Option<&str> {
        self.instance_id.as_deref()
    }
}
/// See [`EventInformation`](crate::model::EventInformation).
pub mod event_information {

    /// A builder for [`EventInformation`](crate::model::EventInformation).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) event_description: std::option::Option<std::string::String>,
        pub(crate) event_sub_type: std::option::Option<std::string::String>,
        pub(crate) instance_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The description of the event.</p>
        pub fn event_description(mut self, input: impl Into<std::string::String>) -> Self {
            self.event_description = Some(input.into());
            self
        }
        /// <p>The description of the event.</p>
        pub fn set_event_description(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.event_description = input;
            self
        }
        /// <p>The event.</p>
        /// <p> <code>error</code> events:</p>
        /// <ul>
        /// <li> <p> <code>iamFleetRoleInvalid</code> - The EC2 Fleet or Spot Fleet does not have the required permissions either to launch or terminate an instance.</p> </li>
        /// <li> <p> <code>allLaunchSpecsTemporarilyBlacklisted</code> - None of the configurations are valid, and several attempts to launch instances have failed. For more information, see the description of the event.</p> </li>
        /// <li> <p> <code>spotInstanceCountLimitExceeded</code> - You've reached the limit on the number of Spot Instances that you can launch.</p> </li>
        /// <li> <p> <code>spotFleetRequestConfigurationInvalid</code> - The configuration is not valid. For more information, see the description of the event.</p> </li>
        /// </ul>
        /// <p> <code>fleetRequestChange</code> events:</p>
        /// <ul>
        /// <li> <p> <code>active</code> - The EC2 Fleet or Spot Fleet request has been validated and Amazon EC2 is attempting to maintain the target number of running instances.</p> </li>
        /// <li> <p> <code>deleted</code> (EC2 Fleet) / <code>cancelled</code> (Spot Fleet) - The EC2 Fleet is deleted or the Spot Fleet request is canceled and has no running instances. The EC2 Fleet or Spot Fleet will be deleted two days after its instances are terminated.</p> </li>
        /// <li> <p> <code>deleted_running</code> (EC2 Fleet) / <code>cancelled_running</code> (Spot Fleet) - The EC2 Fleet is deleted or the Spot Fleet request is canceled and does not launch additional instances. Its existing instances continue to run until they are interrupted or terminated. The request remains in this state until all instances are interrupted or terminated.</p> </li>
        /// <li> <p> <code>deleted_terminating</code> (EC2 Fleet) / <code>cancelled_terminating</code> (Spot Fleet) - The EC2 Fleet is deleted or the Spot Fleet request is canceled and its instances are terminating. The request remains in this state until all instances are terminated.</p> </li>
        /// <li> <p> <code>expired</code> - The EC2 Fleet or Spot Fleet request has expired. If the request was created with <code>TerminateInstancesWithExpiration</code> set, a subsequent <code>terminated</code> event indicates that the instances are terminated.</p> </li>
        /// <li> <p> <code>modify_in_progress</code> - The EC2 Fleet or Spot Fleet request is being modified. The request remains in this state until the modification is fully processed.</p> </li>
        /// <li> <p> <code>modify_succeeded</code> - The EC2 Fleet or Spot Fleet request was modified.</p> </li>
        /// <li> <p> <code>submitted</code> - The EC2 Fleet or Spot Fleet request is being evaluated and Amazon EC2 is preparing to launch the target number of instances.</p> </li>
        /// <li> <p> <code>progress</code> - The EC2 Fleet or Spot Fleet request is in the process of being fulfilled.</p> </li>
        /// </ul>
        /// <p> <code>instanceChange</code> events:</p>
        /// <ul>
        /// <li> <p> <code>launched</code> - A new instance was launched.</p> </li>
        /// <li> <p> <code>terminated</code> - An instance was terminated by the user.</p> </li>
        /// <li> <p> <code>termination_notified</code> - An instance termination notification was sent when a Spot Instance was terminated by Amazon EC2 during scale-down, when the target capacity of the fleet was modified down, for example, from a target capacity of 4 to a target capacity of 3.</p> </li>
        /// </ul>
        /// <p> <code>Information</code> events:</p>
        /// <ul>
        /// <li> <p> <code>fleetProgressHalted</code> - The price in every launch specification is not valid because it is below the Spot price (all the launch specifications have produced <code>launchSpecUnusable</code> events). A launch specification might become valid if the Spot price changes.</p> </li>
        /// <li> <p> <code>launchSpecTemporarilyBlacklisted</code> - The configuration is not valid and several attempts to launch instances have failed. For more information, see the description of the event.</p> </li>
        /// <li> <p> <code>launchSpecUnusable</code> - The price in a launch specification is not valid because it is below the Spot price.</p> </li>
        /// <li> <p> <code>registerWithLoadBalancersFailed</code> - An attempt to register instances with load balancers failed. For more information, see the description of the event.</p> </li>
        /// </ul>
        pub fn event_sub_type(mut self, input: impl Into<std::string::String>) -> Self {
            self.event_sub_type = Some(input.into());
            self
        }
        /// <p>The event.</p>
        /// <p> <code>error</code> events:</p>
        /// <ul>
        /// <li> <p> <code>iamFleetRoleInvalid</code> - The EC2 Fleet or Spot Fleet does not have the required permissions either to launch or terminate an instance.</p> </li>
        /// <li> <p> <code>allLaunchSpecsTemporarilyBlacklisted</code> - None of the configurations are valid, and several attempts to launch instances have failed. For more information, see the description of the event.</p> </li>
        /// <li> <p> <code>spotInstanceCountLimitExceeded</code> - You've reached the limit on the number of Spot Instances that you can launch.</p> </li>
        /// <li> <p> <code>spotFleetRequestConfigurationInvalid</code> - The configuration is not valid. For more information, see the description of the event.</p> </li>
        /// </ul>
        /// <p> <code>fleetRequestChange</code> events:</p>
        /// <ul>
        /// <li> <p> <code>active</code> - The EC2 Fleet or Spot Fleet request has been validated and Amazon EC2 is attempting to maintain the target number of running instances.</p> </li>
        /// <li> <p> <code>deleted</code> (EC2 Fleet) / <code>cancelled</code> (Spot Fleet) - The EC2 Fleet is deleted or the Spot Fleet request is canceled and has no running instances. The EC2 Fleet or Spot Fleet will be deleted two days after its instances are terminated.</p> </li>
        /// <li> <p> <code>deleted_running</code> (EC2 Fleet) / <code>cancelled_running</code> (Spot Fleet) - The EC2 Fleet is deleted or the Spot Fleet request is canceled and does not launch additional instances. Its existing instances continue to run until they are interrupted or terminated. The request remains in this state until all instances are interrupted or terminated.</p> </li>
        /// <li> <p> <code>deleted_terminating</code> (EC2 Fleet) / <code>cancelled_terminating</code> (Spot Fleet) - The EC2 Fleet is deleted or the Spot Fleet request is canceled and its instances are terminating. The request remains in this state until all instances are terminated.</p> </li>
        /// <li> <p> <code>expired</code> - The EC2 Fleet or Spot Fleet request has expired. If the request was created with <code>TerminateInstancesWithExpiration</code> set, a subsequent <code>terminated</code> event indicates that the instances are terminated.</p> </li>
        /// <li> <p> <code>modify_in_progress</code> - The EC2 Fleet or Spot Fleet request is being modified. The request remains in this state until the modification is fully processed.</p> </li>
        /// <li> <p> <code>modify_succeeded</code> - The EC2 Fleet or Spot Fleet request was modified.</p> </li>
        /// <li> <p> <code>submitted</code> - The EC2 Fleet or Spot Fleet request is being evaluated and Amazon EC2 is preparing to launch the target number of instances.</p> </li>
        /// <li> <p> <code>progress</code> - The EC2 Fleet or Spot Fleet request is in the process of being fulfilled.</p> </li>
        /// </ul>
        /// <p> <code>instanceChange</code> events:</p>
        /// <ul>
        /// <li> <p> <code>launched</code> - A new instance was launched.</p> </li>
        /// <li> <p> <code>terminated</code> - An instance was terminated by the user.</p> </li>
        /// <li> <p> <code>termination_notified</code> - An instance termination notification was sent when a Spot Instance was terminated by Amazon EC2 during scale-down, when the target capacity of the fleet was modified down, for example, from a target capacity of 4 to a target capacity of 3.</p> </li>
        /// </ul>
        /// <p> <code>Information</code> events:</p>
        /// <ul>
        /// <li> <p> <code>fleetProgressHalted</code> - The price in every launch specification is not valid because it is below the Spot price (all the launch specifications have produced <code>launchSpecUnusable</code> events). A launch specification might become valid if the Spot price changes.</p> </li>
        /// <li> <p> <code>launchSpecTemporarilyBlacklisted</code> - The configuration is not valid and several attempts to launch instances have failed. For more information, see the description of the event.</p> </li>
        /// <li> <p> <code>launchSpecUnusable</code> - The price in a launch specification is not valid because it is below the Spot price.</p> </li>
        /// <li> <p> <code>registerWithLoadBalancersFailed</code> - An attempt to register instances with load balancers failed. For more information, see the description of the event.</p> </li>
        /// </ul>
        pub fn set_event_sub_type(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.event_sub_type = input;
            self
        }
        /// <p>The ID of the instance. This information is available only for <code>instanceChange</code> events.</p>
        pub fn instance_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.instance_id = Some(input.into());
            self
        }
        /// <p>The ID of the instance. This information is available only for <code>instanceChange</code> events.</p>
        pub fn set_instance_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.instance_id = input;
            self
        }
        /// Consumes the builder and constructs a [`EventInformation`](crate::model::EventInformation).
        pub fn build(self) -> crate::model::EventInformation {
            crate::model::EventInformation {
                event_description: self.event_description,
                event_sub_type: self.event_sub_type,
                instance_id: self.instance_id,
            }
        }
    }
}
impl EventInformation {
    /// Creates a new builder-style object to manufacture [`EventInformation`](crate::model::EventInformation).
    pub fn builder() -> crate::model::event_information::Builder {
        crate::model::event_information::Builder::default()
    }
}

/// <p>Describes a running instance in a Spot Fleet.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ActiveInstance {
    /// <p>The ID of the instance.</p>
    #[doc(hidden)]
    pub instance_id: std::option::Option<std::string::String>,
    /// <p>The instance type.</p>
    #[doc(hidden)]
    pub instance_type: std::option::Option<std::string::String>,
    /// <p>The ID of the Spot Instance request.</p>
    #[doc(hidden)]
    pub spot_instance_request_id: std::option::Option<std::string::String>,
    /// <p>The health status of the instance. If the status of either the instance status check or the system status check is <code>impaired</code>, the health status of the instance is <code>unhealthy</code>. Otherwise, the health status is <code>healthy</code>.</p>
    #[doc(hidden)]
    pub instance_health: std::option::Option<crate::model::InstanceHealthStatus>,
}
impl ActiveInstance {
    /// <p>The ID of the instance.</p>
    pub fn instance_id(&self) -> std::option::Option<&str> {
        self.instance_id.as_deref()
    }
    /// <p>The instance type.</p>
    pub fn instance_type(&self) -> std::option::Option<&str> {
        self.instance_type.as_deref()
    }
    /// <p>The ID of the Spot Instance request.</p>
    pub fn spot_instance_request_id(&self) -> std::option::Option<&str> {
        self.spot_instance_request_id.as_deref()
    }
    /// <p>The health status of the instance. If the status of either the instance status check or the system status check is <code>impaired</code>, the health status of the instance is <code>unhealthy</code>. Otherwise, the health status is <code>healthy</code>.</p>
    pub fn instance_health(&self) -> std::option::Option<&crate::model::InstanceHealthStatus> {
        self.instance_health.as_ref()
    }
}
/// See [`ActiveInstance`](crate::model::ActiveInstance).
pub mod active_instance {

    /// A builder for [`ActiveInstance`](crate::model::ActiveInstance).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) instance_id: std::option::Option<std::string::String>,
        pub(crate) instance_type: std::option::Option<std::string::String>,
        pub(crate) spot_instance_request_id: std::option::Option<std::string::String>,
        pub(crate) instance_health: std::option::Option<crate::model::InstanceHealthStatus>,
    }
    impl Builder {
        /// <p>The ID of the instance.</p>
        pub fn instance_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.instance_id = Some(input.into());
            self
        }
        /// <p>The ID of the instance.</p>
        pub fn set_instance_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.instance_id = input;
            self
        }
        /// <p>The instance type.</p>
        pub fn instance_type(mut self, input: impl Into<std::string::String>) -> Self {
            self.instance_type = Some(input.into());
            self
        }
        /// <p>The instance type.</p>
        pub fn set_instance_type(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.instance_type = input;
            self
        }
        /// <p>The ID of the Spot Instance request.</p>
        pub fn spot_instance_request_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.spot_instance_request_id = Some(input.into());
            self
        }
        /// <p>The ID of the Spot Instance request.</p>
        pub fn set_spot_instance_request_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.spot_instance_request_id = input;
            self
        }
        /// <p>The health status of the instance. If the status of either the instance status check or the system status check is <code>impaired</code>, the health status of the instance is <code>unhealthy</code>. Otherwise, the health status is <code>healthy</code>.</p>
        pub fn instance_health(mut self, input: crate::model::InstanceHealthStatus) -> Self {
            self.instance_health = Some(input);
            self
        }
        /// <p>The health status of the instance. If the status of either the instance status check or the system status check is <code>impaired</code>, the health status of the instance is <code>unhealthy</code>. Otherwise, the health status is <code>healthy</code>.</p>
        pub fn set_instance_health(
            mut self,
            input: std::option::Option<crate::model::InstanceHealthStatus>,
        ) -> Self {
            self.instance_health = input;
            self
        }
        /// Consumes the builder and constructs a [`ActiveInstance`](crate::model::ActiveInstance).
        pub fn build(self) -> crate::model::ActiveInstance {
            crate::model::ActiveInstance {
                instance_id: self.instance_id,
                instance_type: self.instance_type,
                spot_instance_request_id: self.spot_instance_request_id,
                instance_health: self.instance_health,
            }
        }
    }
}
impl ActiveInstance {
    /// Creates a new builder-style object to manufacture [`ActiveInstance`](crate::model::ActiveInstance).
    pub fn builder() -> crate::model::active_instance::Builder {
        crate::model::active_instance::Builder::default()
    }
}

/// When writing a match expression against `InstanceHealthStatus`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let instancehealthstatus = unimplemented!();
/// match instancehealthstatus {
///     InstanceHealthStatus::HealthyStatus => { /* ... */ },
///     InstanceHealthStatus::UnhealthyStatus => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `instancehealthstatus` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `InstanceHealthStatus::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `InstanceHealthStatus::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `InstanceHealthStatus::NewFeature` is defined.
/// Specifically, when `instancehealthstatus` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `InstanceHealthStatus::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 InstanceHealthStatus {
    #[allow(missing_docs)] // documentation missing in model
    HealthyStatus,
    #[allow(missing_docs)] // documentation missing in model
    UnhealthyStatus,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for InstanceHealthStatus {
    fn from(s: &str) -> Self {
        match s {
            "healthy" => InstanceHealthStatus::HealthyStatus,
            "unhealthy" => InstanceHealthStatus::UnhealthyStatus,
            other => {
                InstanceHealthStatus::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for InstanceHealthStatus {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(InstanceHealthStatus::from(s))
    }
}
impl InstanceHealthStatus {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            InstanceHealthStatus::HealthyStatus => "healthy",
            InstanceHealthStatus::UnhealthyStatus => "unhealthy",
            InstanceHealthStatus::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["healthy", "unhealthy"]
    }
}
impl AsRef<str> for InstanceHealthStatus {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes the data feed for a Spot Instance.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SpotDatafeedSubscription {
    /// <p>The name of the Amazon S3 bucket where the Spot Instance data feed is located.</p>
    #[doc(hidden)]
    pub bucket: std::option::Option<std::string::String>,
    /// <p>The fault codes for the Spot Instance request, if any.</p>
    #[doc(hidden)]
    pub fault: std::option::Option<crate::model::SpotInstanceStateFault>,
    /// <p>The Amazon Web Services account ID of the account.</p>
    #[doc(hidden)]
    pub owner_id: std::option::Option<std::string::String>,
    /// <p>The prefix for the data feed files.</p>
    #[doc(hidden)]
    pub prefix: std::option::Option<std::string::String>,
    /// <p>The state of the Spot Instance data feed subscription.</p>
    #[doc(hidden)]
    pub state: std::option::Option<crate::model::DatafeedSubscriptionState>,
}
impl SpotDatafeedSubscription {
    /// <p>The name of the Amazon S3 bucket where the Spot Instance data feed is located.</p>
    pub fn bucket(&self) -> std::option::Option<&str> {
        self.bucket.as_deref()
    }
    /// <p>The fault codes for the Spot Instance request, if any.</p>
    pub fn fault(&self) -> std::option::Option<&crate::model::SpotInstanceStateFault> {
        self.fault.as_ref()
    }
    /// <p>The Amazon Web Services account ID of the account.</p>
    pub fn owner_id(&self) -> std::option::Option<&str> {
        self.owner_id.as_deref()
    }
    /// <p>The prefix for the data feed files.</p>
    pub fn prefix(&self) -> std::option::Option<&str> {
        self.prefix.as_deref()
    }
    /// <p>The state of the Spot Instance data feed subscription.</p>
    pub fn state(&self) -> std::option::Option<&crate::model::DatafeedSubscriptionState> {
        self.state.as_ref()
    }
}
/// See [`SpotDatafeedSubscription`](crate::model::SpotDatafeedSubscription).
pub mod spot_datafeed_subscription {

    /// A builder for [`SpotDatafeedSubscription`](crate::model::SpotDatafeedSubscription).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) bucket: std::option::Option<std::string::String>,
        pub(crate) fault: std::option::Option<crate::model::SpotInstanceStateFault>,
        pub(crate) owner_id: std::option::Option<std::string::String>,
        pub(crate) prefix: std::option::Option<std::string::String>,
        pub(crate) state: std::option::Option<crate::model::DatafeedSubscriptionState>,
    }
    impl Builder {
        /// <p>The name of the Amazon S3 bucket where the Spot Instance data feed is located.</p>
        pub fn bucket(mut self, input: impl Into<std::string::String>) -> Self {
            self.bucket = Some(input.into());
            self
        }
        /// <p>The name of the Amazon S3 bucket where the Spot Instance data feed is located.</p>
        pub fn set_bucket(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.bucket = input;
            self
        }
        /// <p>The fault codes for the Spot Instance request, if any.</p>
        pub fn fault(mut self, input: crate::model::SpotInstanceStateFault) -> Self {
            self.fault = Some(input);
            self
        }
        /// <p>The fault codes for the Spot Instance request, if any.</p>
        pub fn set_fault(
            mut self,
            input: std::option::Option<crate::model::SpotInstanceStateFault>,
        ) -> Self {
            self.fault = input;
            self
        }
        /// <p>The Amazon Web Services account ID of the account.</p>
        pub fn owner_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.owner_id = Some(input.into());
            self
        }
        /// <p>The Amazon Web Services account ID of the account.</p>
        pub fn set_owner_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.owner_id = input;
            self
        }
        /// <p>The prefix for the data feed files.</p>
        pub fn prefix(mut self, input: impl Into<std::string::String>) -> Self {
            self.prefix = Some(input.into());
            self
        }
        /// <p>The prefix for the data feed files.</p>
        pub fn set_prefix(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.prefix = input;
            self
        }
        /// <p>The state of the Spot Instance data feed subscription.</p>
        pub fn state(mut self, input: crate::model::DatafeedSubscriptionState) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>The state of the Spot Instance data feed subscription.</p>
        pub fn set_state(
            mut self,
            input: std::option::Option<crate::model::DatafeedSubscriptionState>,
        ) -> Self {
            self.state = input;
            self
        }
        /// Consumes the builder and constructs a [`SpotDatafeedSubscription`](crate::model::SpotDatafeedSubscription).
        pub fn build(self) -> crate::model::SpotDatafeedSubscription {
            crate::model::SpotDatafeedSubscription {
                bucket: self.bucket,
                fault: self.fault,
                owner_id: self.owner_id,
                prefix: self.prefix,
                state: self.state,
            }
        }
    }
}
impl SpotDatafeedSubscription {
    /// Creates a new builder-style object to manufacture [`SpotDatafeedSubscription`](crate::model::SpotDatafeedSubscription).
    pub fn builder() -> crate::model::spot_datafeed_subscription::Builder {
        crate::model::spot_datafeed_subscription::Builder::default()
    }
}

/// When writing a match expression against `DatafeedSubscriptionState`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let datafeedsubscriptionstate = unimplemented!();
/// match datafeedsubscriptionstate {
///     DatafeedSubscriptionState::Active => { /* ... */ },
///     DatafeedSubscriptionState::Inactive => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `datafeedsubscriptionstate` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `DatafeedSubscriptionState::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `DatafeedSubscriptionState::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `DatafeedSubscriptionState::NewFeature` is defined.
/// Specifically, when `datafeedsubscriptionstate` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `DatafeedSubscriptionState::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 DatafeedSubscriptionState {
    #[allow(missing_docs)] // documentation missing in model
    Active,
    #[allow(missing_docs)] // documentation missing in model
    Inactive,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for DatafeedSubscriptionState {
    fn from(s: &str) -> Self {
        match s {
            "Active" => DatafeedSubscriptionState::Active,
            "Inactive" => DatafeedSubscriptionState::Inactive,
            other => DatafeedSubscriptionState::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for DatafeedSubscriptionState {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(DatafeedSubscriptionState::from(s))
    }
}
impl DatafeedSubscriptionState {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            DatafeedSubscriptionState::Active => "Active",
            DatafeedSubscriptionState::Inactive => "Inactive",
            DatafeedSubscriptionState::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["Active", "Inactive"]
    }
}
impl AsRef<str> for DatafeedSubscriptionState {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Provides information about a snapshot's storage tier.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SnapshotTierStatus {
    /// <p>The ID of the snapshot.</p>
    #[doc(hidden)]
    pub snapshot_id: std::option::Option<std::string::String>,
    /// <p>The ID of the volume from which the snapshot was created.</p>
    #[doc(hidden)]
    pub volume_id: std::option::Option<std::string::String>,
    /// <p>The state of the snapshot.</p>
    #[doc(hidden)]
    pub status: std::option::Option<crate::model::SnapshotState>,
    /// <p>The ID of the Amazon Web Services account that owns the snapshot.</p>
    #[doc(hidden)]
    pub owner_id: std::option::Option<std::string::String>,
    /// <p>The tags that are assigned to the snapshot.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    /// <p>The storage tier in which the snapshot is stored. <code>standard</code> indicates that the snapshot is stored in the standard snapshot storage tier and that it is ready for use. <code>archive</code> indicates that the snapshot is currently archived and that it must be restored before it can be used.</p>
    #[doc(hidden)]
    pub storage_tier: std::option::Option<crate::model::StorageTier>,
    /// <p>The date and time when the last archive or restore process was started.</p>
    #[doc(hidden)]
    pub last_tiering_start_time: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The progress of the last archive or restore process, as a percentage.</p>
    #[doc(hidden)]
    pub last_tiering_progress: std::option::Option<i32>,
    /// <p>The status of the last archive or restore process.</p>
    #[doc(hidden)]
    pub last_tiering_operation_status: std::option::Option<crate::model::TieringOperationStatus>,
    /// <p>A message describing the status of the last archive or restore process.</p>
    #[doc(hidden)]
    pub last_tiering_operation_status_detail: std::option::Option<std::string::String>,
    /// <p>The date and time when the last archive process was completed.</p>
    #[doc(hidden)]
    pub archival_complete_time: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>Only for archived snapshots that are temporarily restored. Indicates the date and time when a temporarily restored snapshot will be automatically re-archived.</p>
    #[doc(hidden)]
    pub restore_expiry_time: std::option::Option<aws_smithy_types::DateTime>,
}
impl SnapshotTierStatus {
    /// <p>The ID of the snapshot.</p>
    pub fn snapshot_id(&self) -> std::option::Option<&str> {
        self.snapshot_id.as_deref()
    }
    /// <p>The ID of the volume from which the snapshot was created.</p>
    pub fn volume_id(&self) -> std::option::Option<&str> {
        self.volume_id.as_deref()
    }
    /// <p>The state of the snapshot.</p>
    pub fn status(&self) -> std::option::Option<&crate::model::SnapshotState> {
        self.status.as_ref()
    }
    /// <p>The ID of the Amazon Web Services account that owns the snapshot.</p>
    pub fn owner_id(&self) -> std::option::Option<&str> {
        self.owner_id.as_deref()
    }
    /// <p>The tags that are assigned to the snapshot.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
    /// <p>The storage tier in which the snapshot is stored. <code>standard</code> indicates that the snapshot is stored in the standard snapshot storage tier and that it is ready for use. <code>archive</code> indicates that the snapshot is currently archived and that it must be restored before it can be used.</p>
    pub fn storage_tier(&self) -> std::option::Option<&crate::model::StorageTier> {
        self.storage_tier.as_ref()
    }
    /// <p>The date and time when the last archive or restore process was started.</p>
    pub fn last_tiering_start_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.last_tiering_start_time.as_ref()
    }
    /// <p>The progress of the last archive or restore process, as a percentage.</p>
    pub fn last_tiering_progress(&self) -> std::option::Option<i32> {
        self.last_tiering_progress
    }
    /// <p>The status of the last archive or restore process.</p>
    pub fn last_tiering_operation_status(
        &self,
    ) -> std::option::Option<&crate::model::TieringOperationStatus> {
        self.last_tiering_operation_status.as_ref()
    }
    /// <p>A message describing the status of the last archive or restore process.</p>
    pub fn last_tiering_operation_status_detail(&self) -> std::option::Option<&str> {
        self.last_tiering_operation_status_detail.as_deref()
    }
    /// <p>The date and time when the last archive process was completed.</p>
    pub fn archival_complete_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.archival_complete_time.as_ref()
    }
    /// <p>Only for archived snapshots that are temporarily restored. Indicates the date and time when a temporarily restored snapshot will be automatically re-archived.</p>
    pub fn restore_expiry_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.restore_expiry_time.as_ref()
    }
}
/// See [`SnapshotTierStatus`](crate::model::SnapshotTierStatus).
pub mod snapshot_tier_status {

    /// A builder for [`SnapshotTierStatus`](crate::model::SnapshotTierStatus).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) snapshot_id: std::option::Option<std::string::String>,
        pub(crate) volume_id: std::option::Option<std::string::String>,
        pub(crate) status: std::option::Option<crate::model::SnapshotState>,
        pub(crate) owner_id: std::option::Option<std::string::String>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        pub(crate) storage_tier: std::option::Option<crate::model::StorageTier>,
        pub(crate) last_tiering_start_time: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) last_tiering_progress: std::option::Option<i32>,
        pub(crate) last_tiering_operation_status:
            std::option::Option<crate::model::TieringOperationStatus>,
        pub(crate) last_tiering_operation_status_detail: std::option::Option<std::string::String>,
        pub(crate) archival_complete_time: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) restore_expiry_time: std::option::Option<aws_smithy_types::DateTime>,
    }
    impl Builder {
        /// <p>The ID of the snapshot.</p>
        pub fn snapshot_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.snapshot_id = Some(input.into());
            self
        }
        /// <p>The ID of the snapshot.</p>
        pub fn set_snapshot_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.snapshot_id = input;
            self
        }
        /// <p>The ID of the volume from which the snapshot was created.</p>
        pub fn volume_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.volume_id = Some(input.into());
            self
        }
        /// <p>The ID of the volume from which the snapshot was created.</p>
        pub fn set_volume_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.volume_id = input;
            self
        }
        /// <p>The state of the snapshot.</p>
        pub fn status(mut self, input: crate::model::SnapshotState) -> Self {
            self.status = Some(input);
            self
        }
        /// <p>The state of the snapshot.</p>
        pub fn set_status(
            mut self,
            input: std::option::Option<crate::model::SnapshotState>,
        ) -> Self {
            self.status = input;
            self
        }
        /// <p>The ID of the Amazon Web Services account that owns the snapshot.</p>
        pub fn owner_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.owner_id = Some(input.into());
            self
        }
        /// <p>The ID of the Amazon Web Services account that owns the snapshot.</p>
        pub fn set_owner_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.owner_id = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>The tags that are assigned to the snapshot.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>The tags that are assigned to the snapshot.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// <p>The storage tier in which the snapshot is stored. <code>standard</code> indicates that the snapshot is stored in the standard snapshot storage tier and that it is ready for use. <code>archive</code> indicates that the snapshot is currently archived and that it must be restored before it can be used.</p>
        pub fn storage_tier(mut self, input: crate::model::StorageTier) -> Self {
            self.storage_tier = Some(input);
            self
        }
        /// <p>The storage tier in which the snapshot is stored. <code>standard</code> indicates that the snapshot is stored in the standard snapshot storage tier and that it is ready for use. <code>archive</code> indicates that the snapshot is currently archived and that it must be restored before it can be used.</p>
        pub fn set_storage_tier(
            mut self,
            input: std::option::Option<crate::model::StorageTier>,
        ) -> Self {
            self.storage_tier = input;
            self
        }
        /// <p>The date and time when the last archive or restore process was started.</p>
        pub fn last_tiering_start_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.last_tiering_start_time = Some(input);
            self
        }
        /// <p>The date and time when the last archive or restore process was started.</p>
        pub fn set_last_tiering_start_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.last_tiering_start_time = input;
            self
        }
        /// <p>The progress of the last archive or restore process, as a percentage.</p>
        pub fn last_tiering_progress(mut self, input: i32) -> Self {
            self.last_tiering_progress = Some(input);
            self
        }
        /// <p>The progress of the last archive or restore process, as a percentage.</p>
        pub fn set_last_tiering_progress(mut self, input: std::option::Option<i32>) -> Self {
            self.last_tiering_progress = input;
            self
        }
        /// <p>The status of the last archive or restore process.</p>
        pub fn last_tiering_operation_status(
            mut self,
            input: crate::model::TieringOperationStatus,
        ) -> Self {
            self.last_tiering_operation_status = Some(input);
            self
        }
        /// <p>The status of the last archive or restore process.</p>
        pub fn set_last_tiering_operation_status(
            mut self,
            input: std::option::Option<crate::model::TieringOperationStatus>,
        ) -> Self {
            self.last_tiering_operation_status = input;
            self
        }
        /// <p>A message describing the status of the last archive or restore process.</p>
        pub fn last_tiering_operation_status_detail(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.last_tiering_operation_status_detail = Some(input.into());
            self
        }
        /// <p>A message describing the status of the last archive or restore process.</p>
        pub fn set_last_tiering_operation_status_detail(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.last_tiering_operation_status_detail = input;
            self
        }
        /// <p>The date and time when the last archive process was completed.</p>
        pub fn archival_complete_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.archival_complete_time = Some(input);
            self
        }
        /// <p>The date and time when the last archive process was completed.</p>
        pub fn set_archival_complete_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.archival_complete_time = input;
            self
        }
        /// <p>Only for archived snapshots that are temporarily restored. Indicates the date and time when a temporarily restored snapshot will be automatically re-archived.</p>
        pub fn restore_expiry_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.restore_expiry_time = Some(input);
            self
        }
        /// <p>Only for archived snapshots that are temporarily restored. Indicates the date and time when a temporarily restored snapshot will be automatically re-archived.</p>
        pub fn set_restore_expiry_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.restore_expiry_time = input;
            self
        }
        /// Consumes the builder and constructs a [`SnapshotTierStatus`](crate::model::SnapshotTierStatus).
        pub fn build(self) -> crate::model::SnapshotTierStatus {
            crate::model::SnapshotTierStatus {
                snapshot_id: self.snapshot_id,
                volume_id: self.volume_id,
                status: self.status,
                owner_id: self.owner_id,
                tags: self.tags,
                storage_tier: self.storage_tier,
                last_tiering_start_time: self.last_tiering_start_time,
                last_tiering_progress: self.last_tiering_progress,
                last_tiering_operation_status: self.last_tiering_operation_status,
                last_tiering_operation_status_detail: self.last_tiering_operation_status_detail,
                archival_complete_time: self.archival_complete_time,
                restore_expiry_time: self.restore_expiry_time,
            }
        }
    }
}
impl SnapshotTierStatus {
    /// Creates a new builder-style object to manufacture [`SnapshotTierStatus`](crate::model::SnapshotTierStatus).
    pub fn builder() -> crate::model::snapshot_tier_status::Builder {
        crate::model::snapshot_tier_status::Builder::default()
    }
}

/// When writing a match expression against `TieringOperationStatus`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let tieringoperationstatus = unimplemented!();
/// match tieringoperationstatus {
///     TieringOperationStatus::ArchivalCompleted => { /* ... */ },
///     TieringOperationStatus::ArchivalFailed => { /* ... */ },
///     TieringOperationStatus::ArchivalInProgress => { /* ... */ },
///     TieringOperationStatus::PermanentRestoreCompleted => { /* ... */ },
///     TieringOperationStatus::PermanentRestoreFailed => { /* ... */ },
///     TieringOperationStatus::PermanentRestoreInProgress => { /* ... */ },
///     TieringOperationStatus::TemporaryRestoreCompleted => { /* ... */ },
///     TieringOperationStatus::TemporaryRestoreFailed => { /* ... */ },
///     TieringOperationStatus::TemporaryRestoreInProgress => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `tieringoperationstatus` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `TieringOperationStatus::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `TieringOperationStatus::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `TieringOperationStatus::NewFeature` is defined.
/// Specifically, when `tieringoperationstatus` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `TieringOperationStatus::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 TieringOperationStatus {
    #[allow(missing_docs)] // documentation missing in model
    ArchivalCompleted,
    #[allow(missing_docs)] // documentation missing in model
    ArchivalFailed,
    #[allow(missing_docs)] // documentation missing in model
    ArchivalInProgress,
    #[allow(missing_docs)] // documentation missing in model
    PermanentRestoreCompleted,
    #[allow(missing_docs)] // documentation missing in model
    PermanentRestoreFailed,
    #[allow(missing_docs)] // documentation missing in model
    PermanentRestoreInProgress,
    #[allow(missing_docs)] // documentation missing in model
    TemporaryRestoreCompleted,
    #[allow(missing_docs)] // documentation missing in model
    TemporaryRestoreFailed,
    #[allow(missing_docs)] // documentation missing in model
    TemporaryRestoreInProgress,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for TieringOperationStatus {
    fn from(s: &str) -> Self {
        match s {
            "archival-completed" => TieringOperationStatus::ArchivalCompleted,
            "archival-failed" => TieringOperationStatus::ArchivalFailed,
            "archival-in-progress" => TieringOperationStatus::ArchivalInProgress,
            "permanent-restore-completed" => TieringOperationStatus::PermanentRestoreCompleted,
            "permanent-restore-failed" => TieringOperationStatus::PermanentRestoreFailed,
            "permanent-restore-in-progress" => TieringOperationStatus::PermanentRestoreInProgress,
            "temporary-restore-completed" => TieringOperationStatus::TemporaryRestoreCompleted,
            "temporary-restore-failed" => TieringOperationStatus::TemporaryRestoreFailed,
            "temporary-restore-in-progress" => TieringOperationStatus::TemporaryRestoreInProgress,
            other => {
                TieringOperationStatus::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for TieringOperationStatus {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(TieringOperationStatus::from(s))
    }
}
impl TieringOperationStatus {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            TieringOperationStatus::ArchivalCompleted => "archival-completed",
            TieringOperationStatus::ArchivalFailed => "archival-failed",
            TieringOperationStatus::ArchivalInProgress => "archival-in-progress",
            TieringOperationStatus::PermanentRestoreCompleted => "permanent-restore-completed",
            TieringOperationStatus::PermanentRestoreFailed => "permanent-restore-failed",
            TieringOperationStatus::PermanentRestoreInProgress => "permanent-restore-in-progress",
            TieringOperationStatus::TemporaryRestoreCompleted => "temporary-restore-completed",
            TieringOperationStatus::TemporaryRestoreFailed => "temporary-restore-failed",
            TieringOperationStatus::TemporaryRestoreInProgress => "temporary-restore-in-progress",
            TieringOperationStatus::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &[
            "archival-completed",
            "archival-failed",
            "archival-in-progress",
            "permanent-restore-completed",
            "permanent-restore-failed",
            "permanent-restore-in-progress",
            "temporary-restore-completed",
            "temporary-restore-failed",
            "temporary-restore-in-progress",
        ]
    }
}
impl AsRef<str> for TieringOperationStatus {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `StorageTier`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let storagetier = unimplemented!();
/// match storagetier {
///     StorageTier::Archive => { /* ... */ },
///     StorageTier::Standard => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `storagetier` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `StorageTier::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `StorageTier::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `StorageTier::NewFeature` is defined.
/// Specifically, when `storagetier` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `StorageTier::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 StorageTier {
    #[allow(missing_docs)] // documentation missing in model
    Archive,
    #[allow(missing_docs)] // documentation missing in model
    Standard,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for StorageTier {
    fn from(s: &str) -> Self {
        match s {
            "archive" => StorageTier::Archive,
            "standard" => StorageTier::Standard,
            other => StorageTier::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for StorageTier {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(StorageTier::from(s))
    }
}
impl StorageTier {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            StorageTier::Archive => "archive",
            StorageTier::Standard => "standard",
            StorageTier::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["archive", "standard"]
    }
}
impl AsRef<str> for StorageTier {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes a snapshot.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Snapshot {
    /// <p>The data encryption key identifier for the snapshot. This value is a unique identifier that corresponds to the data encryption key that was used to encrypt the original volume or snapshot copy. Because data encryption keys are inherited by volumes created from snapshots, and vice versa, if snapshots share the same data encryption key identifier, then they belong to the same volume/snapshot lineage. This parameter is only returned by <code>DescribeSnapshots</code>.</p>
    #[doc(hidden)]
    pub data_encryption_key_id: std::option::Option<std::string::String>,
    /// <p>The description for the snapshot.</p>
    #[doc(hidden)]
    pub description: std::option::Option<std::string::String>,
    /// <p>Indicates whether the snapshot is encrypted.</p>
    #[doc(hidden)]
    pub encrypted: std::option::Option<bool>,
    /// <p>The Amazon Resource Name (ARN) of the Key Management Service (KMS) KMS key that was used to protect the volume encryption key for the parent volume.</p>
    #[doc(hidden)]
    pub kms_key_id: std::option::Option<std::string::String>,
    /// <p>The ID of the Amazon Web Services account that owns the EBS snapshot.</p>
    #[doc(hidden)]
    pub owner_id: std::option::Option<std::string::String>,
    /// <p>The progress of the snapshot, as a percentage.</p>
    #[doc(hidden)]
    pub progress: std::option::Option<std::string::String>,
    /// <p>The ID of the snapshot. Each snapshot receives a unique identifier when it is created.</p>
    #[doc(hidden)]
    pub snapshot_id: std::option::Option<std::string::String>,
    /// <p>The time stamp when the snapshot was initiated.</p>
    #[doc(hidden)]
    pub start_time: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The snapshot state.</p>
    #[doc(hidden)]
    pub state: std::option::Option<crate::model::SnapshotState>,
    /// <p>Encrypted Amazon EBS snapshots are copied asynchronously. If a snapshot copy operation fails (for example, if the proper Key Management Service (KMS) permissions are not obtained) this field displays error state details to help you diagnose why the error occurred. This parameter is only returned by <code>DescribeSnapshots</code>.</p>
    #[doc(hidden)]
    pub state_message: std::option::Option<std::string::String>,
    /// <p>The ID of the volume that was used to create the snapshot. Snapshots created by the <code>CopySnapshot</code> action have an arbitrary volume ID that should not be used for any purpose.</p>
    #[doc(hidden)]
    pub volume_id: std::option::Option<std::string::String>,
    /// <p>The size of the volume, in GiB.</p>
    #[doc(hidden)]
    pub volume_size: std::option::Option<i32>,
    /// <p>The Amazon Web Services owner alias, from an Amazon-maintained list (<code>amazon</code>). This is not the user-configured Amazon Web Services account alias set using the IAM console.</p>
    #[doc(hidden)]
    pub owner_alias: std::option::Option<std::string::String>,
    /// <p>The ARN of the Outpost on which the snapshot is stored. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshots-outposts.html">Amazon EBS local snapshots on Outposts</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
    #[doc(hidden)]
    pub outpost_arn: std::option::Option<std::string::String>,
    /// <p>Any tags assigned to the snapshot.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    /// <p>The storage tier in which the snapshot is stored. <code>standard</code> indicates that the snapshot is stored in the standard snapshot storage tier and that it is ready for use. <code>archive</code> indicates that the snapshot is currently archived and that it must be restored before it can be used.</p>
    #[doc(hidden)]
    pub storage_tier: std::option::Option<crate::model::StorageTier>,
    /// <p>Only for archived snapshots that are temporarily restored. Indicates the date and time when a temporarily restored snapshot will be automatically re-archived.</p>
    #[doc(hidden)]
    pub restore_expiry_time: std::option::Option<aws_smithy_types::DateTime>,
}
impl Snapshot {
    /// <p>The data encryption key identifier for the snapshot. This value is a unique identifier that corresponds to the data encryption key that was used to encrypt the original volume or snapshot copy. Because data encryption keys are inherited by volumes created from snapshots, and vice versa, if snapshots share the same data encryption key identifier, then they belong to the same volume/snapshot lineage. This parameter is only returned by <code>DescribeSnapshots</code>.</p>
    pub fn data_encryption_key_id(&self) -> std::option::Option<&str> {
        self.data_encryption_key_id.as_deref()
    }
    /// <p>The description for the snapshot.</p>
    pub fn description(&self) -> std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>Indicates whether the snapshot is encrypted.</p>
    pub fn encrypted(&self) -> std::option::Option<bool> {
        self.encrypted
    }
    /// <p>The Amazon Resource Name (ARN) of the Key Management Service (KMS) KMS key that was used to protect the volume encryption key for the parent volume.</p>
    pub fn kms_key_id(&self) -> std::option::Option<&str> {
        self.kms_key_id.as_deref()
    }
    /// <p>The ID of the Amazon Web Services account that owns the EBS snapshot.</p>
    pub fn owner_id(&self) -> std::option::Option<&str> {
        self.owner_id.as_deref()
    }
    /// <p>The progress of the snapshot, as a percentage.</p>
    pub fn progress(&self) -> std::option::Option<&str> {
        self.progress.as_deref()
    }
    /// <p>The ID of the snapshot. Each snapshot receives a unique identifier when it is created.</p>
    pub fn snapshot_id(&self) -> std::option::Option<&str> {
        self.snapshot_id.as_deref()
    }
    /// <p>The time stamp when the snapshot was initiated.</p>
    pub fn start_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.start_time.as_ref()
    }
    /// <p>The snapshot state.</p>
    pub fn state(&self) -> std::option::Option<&crate::model::SnapshotState> {
        self.state.as_ref()
    }
    /// <p>Encrypted Amazon EBS snapshots are copied asynchronously. If a snapshot copy operation fails (for example, if the proper Key Management Service (KMS) permissions are not obtained) this field displays error state details to help you diagnose why the error occurred. This parameter is only returned by <code>DescribeSnapshots</code>.</p>
    pub fn state_message(&self) -> std::option::Option<&str> {
        self.state_message.as_deref()
    }
    /// <p>The ID of the volume that was used to create the snapshot. Snapshots created by the <code>CopySnapshot</code> action have an arbitrary volume ID that should not be used for any purpose.</p>
    pub fn volume_id(&self) -> std::option::Option<&str> {
        self.volume_id.as_deref()
    }
    /// <p>The size of the volume, in GiB.</p>
    pub fn volume_size(&self) -> std::option::Option<i32> {
        self.volume_size
    }
    /// <p>The Amazon Web Services owner alias, from an Amazon-maintained list (<code>amazon</code>). This is not the user-configured Amazon Web Services account alias set using the IAM console.</p>
    pub fn owner_alias(&self) -> std::option::Option<&str> {
        self.owner_alias.as_deref()
    }
    /// <p>The ARN of the Outpost on which the snapshot is stored. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshots-outposts.html">Amazon EBS local snapshots on Outposts</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
    pub fn outpost_arn(&self) -> std::option::Option<&str> {
        self.outpost_arn.as_deref()
    }
    /// <p>Any tags assigned to the snapshot.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
    /// <p>The storage tier in which the snapshot is stored. <code>standard</code> indicates that the snapshot is stored in the standard snapshot storage tier and that it is ready for use. <code>archive</code> indicates that the snapshot is currently archived and that it must be restored before it can be used.</p>
    pub fn storage_tier(&self) -> std::option::Option<&crate::model::StorageTier> {
        self.storage_tier.as_ref()
    }
    /// <p>Only for archived snapshots that are temporarily restored. Indicates the date and time when a temporarily restored snapshot will be automatically re-archived.</p>
    pub fn restore_expiry_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.restore_expiry_time.as_ref()
    }
}
/// See [`Snapshot`](crate::model::Snapshot).
pub mod snapshot {

    /// A builder for [`Snapshot`](crate::model::Snapshot).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) data_encryption_key_id: std::option::Option<std::string::String>,
        pub(crate) description: std::option::Option<std::string::String>,
        pub(crate) encrypted: std::option::Option<bool>,
        pub(crate) kms_key_id: std::option::Option<std::string::String>,
        pub(crate) owner_id: std::option::Option<std::string::String>,
        pub(crate) progress: std::option::Option<std::string::String>,
        pub(crate) snapshot_id: std::option::Option<std::string::String>,
        pub(crate) start_time: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) state: std::option::Option<crate::model::SnapshotState>,
        pub(crate) state_message: std::option::Option<std::string::String>,
        pub(crate) volume_id: std::option::Option<std::string::String>,
        pub(crate) volume_size: std::option::Option<i32>,
        pub(crate) owner_alias: std::option::Option<std::string::String>,
        pub(crate) outpost_arn: std::option::Option<std::string::String>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        pub(crate) storage_tier: std::option::Option<crate::model::StorageTier>,
        pub(crate) restore_expiry_time: std::option::Option<aws_smithy_types::DateTime>,
    }
    impl Builder {
        /// <p>The data encryption key identifier for the snapshot. This value is a unique identifier that corresponds to the data encryption key that was used to encrypt the original volume or snapshot copy. Because data encryption keys are inherited by volumes created from snapshots, and vice versa, if snapshots share the same data encryption key identifier, then they belong to the same volume/snapshot lineage. This parameter is only returned by <code>DescribeSnapshots</code>.</p>
        pub fn data_encryption_key_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.data_encryption_key_id = Some(input.into());
            self
        }
        /// <p>The data encryption key identifier for the snapshot. This value is a unique identifier that corresponds to the data encryption key that was used to encrypt the original volume or snapshot copy. Because data encryption keys are inherited by volumes created from snapshots, and vice versa, if snapshots share the same data encryption key identifier, then they belong to the same volume/snapshot lineage. This parameter is only returned by <code>DescribeSnapshots</code>.</p>
        pub fn set_data_encryption_key_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.data_encryption_key_id = input;
            self
        }
        /// <p>The description for the snapshot.</p>
        pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
            self.description = Some(input.into());
            self
        }
        /// <p>The description for the snapshot.</p>
        pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.description = input;
            self
        }
        /// <p>Indicates whether the snapshot is encrypted.</p>
        pub fn encrypted(mut self, input: bool) -> Self {
            self.encrypted = Some(input);
            self
        }
        /// <p>Indicates whether the snapshot is encrypted.</p>
        pub fn set_encrypted(mut self, input: std::option::Option<bool>) -> Self {
            self.encrypted = input;
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the Key Management Service (KMS) KMS key that was used to protect the volume encryption key for the parent volume.</p>
        pub fn kms_key_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.kms_key_id = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the Key Management Service (KMS) KMS key that was used to protect the volume encryption key for the parent volume.</p>
        pub fn set_kms_key_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.kms_key_id = input;
            self
        }
        /// <p>The ID of the Amazon Web Services account that owns the EBS snapshot.</p>
        pub fn owner_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.owner_id = Some(input.into());
            self
        }
        /// <p>The ID of the Amazon Web Services account that owns the EBS snapshot.</p>
        pub fn set_owner_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.owner_id = input;
            self
        }
        /// <p>The progress of the snapshot, as a percentage.</p>
        pub fn progress(mut self, input: impl Into<std::string::String>) -> Self {
            self.progress = Some(input.into());
            self
        }
        /// <p>The progress of the snapshot, as a percentage.</p>
        pub fn set_progress(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.progress = input;
            self
        }
        /// <p>The ID of the snapshot. Each snapshot receives a unique identifier when it is created.</p>
        pub fn snapshot_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.snapshot_id = Some(input.into());
            self
        }
        /// <p>The ID of the snapshot. Each snapshot receives a unique identifier when it is created.</p>
        pub fn set_snapshot_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.snapshot_id = input;
            self
        }
        /// <p>The time stamp when the snapshot was initiated.</p>
        pub fn start_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.start_time = Some(input);
            self
        }
        /// <p>The time stamp when the snapshot was initiated.</p>
        pub fn set_start_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.start_time = input;
            self
        }
        /// <p>The snapshot state.</p>
        pub fn state(mut self, input: crate::model::SnapshotState) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>The snapshot state.</p>
        pub fn set_state(
            mut self,
            input: std::option::Option<crate::model::SnapshotState>,
        ) -> Self {
            self.state = input;
            self
        }
        /// <p>Encrypted Amazon EBS snapshots are copied asynchronously. If a snapshot copy operation fails (for example, if the proper Key Management Service (KMS) permissions are not obtained) this field displays error state details to help you diagnose why the error occurred. This parameter is only returned by <code>DescribeSnapshots</code>.</p>
        pub fn state_message(mut self, input: impl Into<std::string::String>) -> Self {
            self.state_message = Some(input.into());
            self
        }
        /// <p>Encrypted Amazon EBS snapshots are copied asynchronously. If a snapshot copy operation fails (for example, if the proper Key Management Service (KMS) permissions are not obtained) this field displays error state details to help you diagnose why the error occurred. This parameter is only returned by <code>DescribeSnapshots</code>.</p>
        pub fn set_state_message(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.state_message = input;
            self
        }
        /// <p>The ID of the volume that was used to create the snapshot. Snapshots created by the <code>CopySnapshot</code> action have an arbitrary volume ID that should not be used for any purpose.</p>
        pub fn volume_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.volume_id = Some(input.into());
            self
        }
        /// <p>The ID of the volume that was used to create the snapshot. Snapshots created by the <code>CopySnapshot</code> action have an arbitrary volume ID that should not be used for any purpose.</p>
        pub fn set_volume_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.volume_id = input;
            self
        }
        /// <p>The size of the volume, in GiB.</p>
        pub fn volume_size(mut self, input: i32) -> Self {
            self.volume_size = Some(input);
            self
        }
        /// <p>The size of the volume, in GiB.</p>
        pub fn set_volume_size(mut self, input: std::option::Option<i32>) -> Self {
            self.volume_size = input;
            self
        }
        /// <p>The Amazon Web Services owner alias, from an Amazon-maintained list (<code>amazon</code>). This is not the user-configured Amazon Web Services account alias set using the IAM console.</p>
        pub fn owner_alias(mut self, input: impl Into<std::string::String>) -> Self {
            self.owner_alias = Some(input.into());
            self
        }
        /// <p>The Amazon Web Services owner alias, from an Amazon-maintained list (<code>amazon</code>). This is not the user-configured Amazon Web Services account alias set using the IAM console.</p>
        pub fn set_owner_alias(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.owner_alias = input;
            self
        }
        /// <p>The ARN of the Outpost on which the snapshot is stored. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshots-outposts.html">Amazon EBS local snapshots on Outposts</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
        pub fn outpost_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.outpost_arn = Some(input.into());
            self
        }
        /// <p>The ARN of the Outpost on which the snapshot is stored. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshots-outposts.html">Amazon EBS local snapshots on Outposts</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
        pub fn set_outpost_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.outpost_arn = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>Any tags assigned to the snapshot.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>Any tags assigned to the snapshot.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// <p>The storage tier in which the snapshot is stored. <code>standard</code> indicates that the snapshot is stored in the standard snapshot storage tier and that it is ready for use. <code>archive</code> indicates that the snapshot is currently archived and that it must be restored before it can be used.</p>
        pub fn storage_tier(mut self, input: crate::model::StorageTier) -> Self {
            self.storage_tier = Some(input);
            self
        }
        /// <p>The storage tier in which the snapshot is stored. <code>standard</code> indicates that the snapshot is stored in the standard snapshot storage tier and that it is ready for use. <code>archive</code> indicates that the snapshot is currently archived and that it must be restored before it can be used.</p>
        pub fn set_storage_tier(
            mut self,
            input: std::option::Option<crate::model::StorageTier>,
        ) -> Self {
            self.storage_tier = input;
            self
        }
        /// <p>Only for archived snapshots that are temporarily restored. Indicates the date and time when a temporarily restored snapshot will be automatically re-archived.</p>
        pub fn restore_expiry_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.restore_expiry_time = Some(input);
            self
        }
        /// <p>Only for archived snapshots that are temporarily restored. Indicates the date and time when a temporarily restored snapshot will be automatically re-archived.</p>
        pub fn set_restore_expiry_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.restore_expiry_time = input;
            self
        }
        /// Consumes the builder and constructs a [`Snapshot`](crate::model::Snapshot).
        pub fn build(self) -> crate::model::Snapshot {
            crate::model::Snapshot {
                data_encryption_key_id: self.data_encryption_key_id,
                description: self.description,
                encrypted: self.encrypted,
                kms_key_id: self.kms_key_id,
                owner_id: self.owner_id,
                progress: self.progress,
                snapshot_id: self.snapshot_id,
                start_time: self.start_time,
                state: self.state,
                state_message: self.state_message,
                volume_id: self.volume_id,
                volume_size: self.volume_size,
                owner_alias: self.owner_alias,
                outpost_arn: self.outpost_arn,
                tags: self.tags,
                storage_tier: self.storage_tier,
                restore_expiry_time: self.restore_expiry_time,
            }
        }
    }
}
impl Snapshot {
    /// Creates a new builder-style object to manufacture [`Snapshot`](crate::model::Snapshot).
    pub fn builder() -> crate::model::snapshot::Builder {
        crate::model::snapshot::Builder::default()
    }
}

/// <p>Describes a security group.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SecurityGroup {
    /// <p>A description of the security group.</p>
    #[doc(hidden)]
    pub description: std::option::Option<std::string::String>,
    /// <p>The name of the security group.</p>
    #[doc(hidden)]
    pub group_name: std::option::Option<std::string::String>,
    /// <p>The inbound rules associated with the security group.</p>
    #[doc(hidden)]
    pub ip_permissions: std::option::Option<std::vec::Vec<crate::model::IpPermission>>,
    /// <p>The Amazon Web Services account ID of the owner of the security group.</p>
    #[doc(hidden)]
    pub owner_id: std::option::Option<std::string::String>,
    /// <p>The ID of the security group.</p>
    #[doc(hidden)]
    pub group_id: std::option::Option<std::string::String>,
    /// <p>[VPC only] The outbound rules associated with the security group.</p>
    #[doc(hidden)]
    pub ip_permissions_egress: std::option::Option<std::vec::Vec<crate::model::IpPermission>>,
    /// <p>Any tags assigned to the security group.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    /// <p>[VPC only] The ID of the VPC for the security group.</p>
    #[doc(hidden)]
    pub vpc_id: std::option::Option<std::string::String>,
}
impl SecurityGroup {
    /// <p>A description of the security group.</p>
    pub fn description(&self) -> std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The name of the security group.</p>
    pub fn group_name(&self) -> std::option::Option<&str> {
        self.group_name.as_deref()
    }
    /// <p>The inbound rules associated with the security group.</p>
    pub fn ip_permissions(&self) -> std::option::Option<&[crate::model::IpPermission]> {
        self.ip_permissions.as_deref()
    }
    /// <p>The Amazon Web Services account ID of the owner of the security group.</p>
    pub fn owner_id(&self) -> std::option::Option<&str> {
        self.owner_id.as_deref()
    }
    /// <p>The ID of the security group.</p>
    pub fn group_id(&self) -> std::option::Option<&str> {
        self.group_id.as_deref()
    }
    /// <p>[VPC only] The outbound rules associated with the security group.</p>
    pub fn ip_permissions_egress(&self) -> std::option::Option<&[crate::model::IpPermission]> {
        self.ip_permissions_egress.as_deref()
    }
    /// <p>Any tags assigned to the security group.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
    /// <p>[VPC only] The ID of the VPC for the security group.</p>
    pub fn vpc_id(&self) -> std::option::Option<&str> {
        self.vpc_id.as_deref()
    }
}
/// See [`SecurityGroup`](crate::model::SecurityGroup).
pub mod security_group {

    /// A builder for [`SecurityGroup`](crate::model::SecurityGroup).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) description: std::option::Option<std::string::String>,
        pub(crate) group_name: std::option::Option<std::string::String>,
        pub(crate) ip_permissions: std::option::Option<std::vec::Vec<crate::model::IpPermission>>,
        pub(crate) owner_id: std::option::Option<std::string::String>,
        pub(crate) group_id: std::option::Option<std::string::String>,
        pub(crate) ip_permissions_egress:
            std::option::Option<std::vec::Vec<crate::model::IpPermission>>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        pub(crate) vpc_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>A description of the security group.</p>
        pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
            self.description = Some(input.into());
            self
        }
        /// <p>A description of the security group.</p>
        pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.description = input;
            self
        }
        /// <p>The name of the security group.</p>
        pub fn group_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.group_name = Some(input.into());
            self
        }
        /// <p>The name of the security group.</p>
        pub fn set_group_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.group_name = input;
            self
        }
        /// Appends an item to `ip_permissions`.
        ///
        /// To override the contents of this collection use [`set_ip_permissions`](Self::set_ip_permissions).
        ///
        /// <p>The inbound rules associated with the security group.</p>
        pub fn ip_permissions(mut self, input: crate::model::IpPermission) -> Self {
            let mut v = self.ip_permissions.unwrap_or_default();
            v.push(input);
            self.ip_permissions = Some(v);
            self
        }
        /// <p>The inbound rules associated with the security group.</p>
        pub fn set_ip_permissions(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::IpPermission>>,
        ) -> Self {
            self.ip_permissions = input;
            self
        }
        /// <p>The Amazon Web Services account ID of the owner of the security group.</p>
        pub fn owner_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.owner_id = Some(input.into());
            self
        }
        /// <p>The Amazon Web Services account ID of the owner of the security group.</p>
        pub fn set_owner_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.owner_id = input;
            self
        }
        /// <p>The ID of the security group.</p>
        pub fn group_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.group_id = Some(input.into());
            self
        }
        /// <p>The ID of the security group.</p>
        pub fn set_group_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.group_id = input;
            self
        }
        /// Appends an item to `ip_permissions_egress`.
        ///
        /// To override the contents of this collection use [`set_ip_permissions_egress`](Self::set_ip_permissions_egress).
        ///
        /// <p>[VPC only] The outbound rules associated with the security group.</p>
        pub fn ip_permissions_egress(mut self, input: crate::model::IpPermission) -> Self {
            let mut v = self.ip_permissions_egress.unwrap_or_default();
            v.push(input);
            self.ip_permissions_egress = Some(v);
            self
        }
        /// <p>[VPC only] The outbound rules associated with the security group.</p>
        pub fn set_ip_permissions_egress(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::IpPermission>>,
        ) -> Self {
            self.ip_permissions_egress = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>Any tags assigned to the security group.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>Any tags assigned to the security group.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// <p>[VPC only] The ID of the VPC for the security group.</p>
        pub fn vpc_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.vpc_id = Some(input.into());
            self
        }
        /// <p>[VPC only] The ID of the VPC for the security group.</p>
        pub fn set_vpc_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.vpc_id = input;
            self
        }
        /// Consumes the builder and constructs a [`SecurityGroup`](crate::model::SecurityGroup).
        pub fn build(self) -> crate::model::SecurityGroup {
            crate::model::SecurityGroup {
                description: self.description,
                group_name: self.group_name,
                ip_permissions: self.ip_permissions,
                owner_id: self.owner_id,
                group_id: self.group_id,
                ip_permissions_egress: self.ip_permissions_egress,
                tags: self.tags,
                vpc_id: self.vpc_id,
            }
        }
    }
}
impl SecurityGroup {
    /// Creates a new builder-style object to manufacture [`SecurityGroup`](crate::model::SecurityGroup).
    pub fn builder() -> crate::model::security_group::Builder {
        crate::model::security_group::Builder::default()
    }
}

/// <p>Describes a security group rule.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SecurityGroupRule {
    /// <p>The ID of the security group rule.</p>
    #[doc(hidden)]
    pub security_group_rule_id: std::option::Option<std::string::String>,
    /// <p>The ID of the security group.</p>
    #[doc(hidden)]
    pub group_id: std::option::Option<std::string::String>,
    /// <p>The ID of the Amazon Web Services account that owns the security group. </p>
    #[doc(hidden)]
    pub group_owner_id: std::option::Option<std::string::String>,
    /// <p>Indicates whether the security group rule is an outbound rule.</p>
    #[doc(hidden)]
    pub is_egress: std::option::Option<bool>,
    /// <p>The IP protocol name (<code>tcp</code>, <code>udp</code>, <code>icmp</code>, <code>icmpv6</code>) or number (see <a href="http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml">Protocol Numbers</a>). </p>
    /// <p>Use <code>-1</code> to specify all protocols.</p>
    #[doc(hidden)]
    pub ip_protocol: std::option::Option<std::string::String>,
    /// <p>If the protocol is TCP or UDP, this is the start of the port range. If the protocol is ICMP or ICMPv6, this is the type number. A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all ICMP/ICMPv6 codes.</p>
    #[doc(hidden)]
    pub from_port: std::option::Option<i32>,
    /// <p>If the protocol is TCP or UDP, this is the end of the port range. If the protocol is ICMP or ICMPv6, this is the type number. A value of -1 indicates all ICMP/ICMPv6 codes. If you specify all ICMP/ICMPv6 types, you must specify all ICMP/ICMPv6 codes.</p>
    #[doc(hidden)]
    pub to_port: std::option::Option<i32>,
    /// <p>The IPv4 CIDR range.</p>
    #[doc(hidden)]
    pub cidr_ipv4: std::option::Option<std::string::String>,
    /// <p>The IPv6 CIDR range.</p>
    #[doc(hidden)]
    pub cidr_ipv6: std::option::Option<std::string::String>,
    /// <p>The ID of the prefix list.</p>
    #[doc(hidden)]
    pub prefix_list_id: std::option::Option<std::string::String>,
    /// <p>Describes the security group that is referenced in the rule.</p>
    #[doc(hidden)]
    pub referenced_group_info: std::option::Option<crate::model::ReferencedSecurityGroup>,
    /// <p>The security group rule description.</p>
    #[doc(hidden)]
    pub description: std::option::Option<std::string::String>,
    /// <p>The tags applied to the security group rule.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl SecurityGroupRule {
    /// <p>The ID of the security group rule.</p>
    pub fn security_group_rule_id(&self) -> std::option::Option<&str> {
        self.security_group_rule_id.as_deref()
    }
    /// <p>The ID of the security group.</p>
    pub fn group_id(&self) -> std::option::Option<&str> {
        self.group_id.as_deref()
    }
    /// <p>The ID of the Amazon Web Services account that owns the security group. </p>
    pub fn group_owner_id(&self) -> std::option::Option<&str> {
        self.group_owner_id.as_deref()
    }
    /// <p>Indicates whether the security group rule is an outbound rule.</p>
    pub fn is_egress(&self) -> std::option::Option<bool> {
        self.is_egress
    }
    /// <p>The IP protocol name (<code>tcp</code>, <code>udp</code>, <code>icmp</code>, <code>icmpv6</code>) or number (see <a href="http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml">Protocol Numbers</a>). </p>
    /// <p>Use <code>-1</code> to specify all protocols.</p>
    pub fn ip_protocol(&self) -> std::option::Option<&str> {
        self.ip_protocol.as_deref()
    }
    /// <p>If the protocol is TCP or UDP, this is the start of the port range. If the protocol is ICMP or ICMPv6, this is the type number. A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all ICMP/ICMPv6 codes.</p>
    pub fn from_port(&self) -> std::option::Option<i32> {
        self.from_port
    }
    /// <p>If the protocol is TCP or UDP, this is the end of the port range. If the protocol is ICMP or ICMPv6, this is the type number. A value of -1 indicates all ICMP/ICMPv6 codes. If you specify all ICMP/ICMPv6 types, you must specify all ICMP/ICMPv6 codes.</p>
    pub fn to_port(&self) -> std::option::Option<i32> {
        self.to_port
    }
    /// <p>The IPv4 CIDR range.</p>
    pub fn cidr_ipv4(&self) -> std::option::Option<&str> {
        self.cidr_ipv4.as_deref()
    }
    /// <p>The IPv6 CIDR range.</p>
    pub fn cidr_ipv6(&self) -> std::option::Option<&str> {
        self.cidr_ipv6.as_deref()
    }
    /// <p>The ID of the prefix list.</p>
    pub fn prefix_list_id(&self) -> std::option::Option<&str> {
        self.prefix_list_id.as_deref()
    }
    /// <p>Describes the security group that is referenced in the rule.</p>
    pub fn referenced_group_info(
        &self,
    ) -> std::option::Option<&crate::model::ReferencedSecurityGroup> {
        self.referenced_group_info.as_ref()
    }
    /// <p>The security group rule description.</p>
    pub fn description(&self) -> std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The tags applied to the security group rule.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
}
/// See [`SecurityGroupRule`](crate::model::SecurityGroupRule).
pub mod security_group_rule {

    /// A builder for [`SecurityGroupRule`](crate::model::SecurityGroupRule).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) security_group_rule_id: std::option::Option<std::string::String>,
        pub(crate) group_id: std::option::Option<std::string::String>,
        pub(crate) group_owner_id: std::option::Option<std::string::String>,
        pub(crate) is_egress: std::option::Option<bool>,
        pub(crate) ip_protocol: std::option::Option<std::string::String>,
        pub(crate) from_port: std::option::Option<i32>,
        pub(crate) to_port: std::option::Option<i32>,
        pub(crate) cidr_ipv4: std::option::Option<std::string::String>,
        pub(crate) cidr_ipv6: std::option::Option<std::string::String>,
        pub(crate) prefix_list_id: std::option::Option<std::string::String>,
        pub(crate) referenced_group_info:
            std::option::Option<crate::model::ReferencedSecurityGroup>,
        pub(crate) description: std::option::Option<std::string::String>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    }
    impl Builder {
        /// <p>The ID of the security group rule.</p>
        pub fn security_group_rule_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.security_group_rule_id = Some(input.into());
            self
        }
        /// <p>The ID of the security group rule.</p>
        pub fn set_security_group_rule_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.security_group_rule_id = input;
            self
        }
        /// <p>The ID of the security group.</p>
        pub fn group_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.group_id = Some(input.into());
            self
        }
        /// <p>The ID of the security group.</p>
        pub fn set_group_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.group_id = input;
            self
        }
        /// <p>The ID of the Amazon Web Services account that owns the security group. </p>
        pub fn group_owner_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.group_owner_id = Some(input.into());
            self
        }
        /// <p>The ID of the Amazon Web Services account that owns the security group. </p>
        pub fn set_group_owner_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.group_owner_id = input;
            self
        }
        /// <p>Indicates whether the security group rule is an outbound rule.</p>
        pub fn is_egress(mut self, input: bool) -> Self {
            self.is_egress = Some(input);
            self
        }
        /// <p>Indicates whether the security group rule is an outbound rule.</p>
        pub fn set_is_egress(mut self, input: std::option::Option<bool>) -> Self {
            self.is_egress = input;
            self
        }
        /// <p>The IP protocol name (<code>tcp</code>, <code>udp</code>, <code>icmp</code>, <code>icmpv6</code>) or number (see <a href="http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml">Protocol Numbers</a>). </p>
        /// <p>Use <code>-1</code> to specify all protocols.</p>
        pub fn ip_protocol(mut self, input: impl Into<std::string::String>) -> Self {
            self.ip_protocol = Some(input.into());
            self
        }
        /// <p>The IP protocol name (<code>tcp</code>, <code>udp</code>, <code>icmp</code>, <code>icmpv6</code>) or number (see <a href="http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml">Protocol Numbers</a>). </p>
        /// <p>Use <code>-1</code> to specify all protocols.</p>
        pub fn set_ip_protocol(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.ip_protocol = input;
            self
        }
        /// <p>If the protocol is TCP or UDP, this is the start of the port range. If the protocol is ICMP or ICMPv6, this is the type number. A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all ICMP/ICMPv6 codes.</p>
        pub fn from_port(mut self, input: i32) -> Self {
            self.from_port = Some(input);
            self
        }
        /// <p>If the protocol is TCP or UDP, this is the start of the port range. If the protocol is ICMP or ICMPv6, this is the type number. A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all ICMP/ICMPv6 codes.</p>
        pub fn set_from_port(mut self, input: std::option::Option<i32>) -> Self {
            self.from_port = input;
            self
        }
        /// <p>If the protocol is TCP or UDP, this is the end of the port range. If the protocol is ICMP or ICMPv6, this is the type number. A value of -1 indicates all ICMP/ICMPv6 codes. If you specify all ICMP/ICMPv6 types, you must specify all ICMP/ICMPv6 codes.</p>
        pub fn to_port(mut self, input: i32) -> Self {
            self.to_port = Some(input);
            self
        }
        /// <p>If the protocol is TCP or UDP, this is the end of the port range. If the protocol is ICMP or ICMPv6, this is the type number. A value of -1 indicates all ICMP/ICMPv6 codes. If you specify all ICMP/ICMPv6 types, you must specify all ICMP/ICMPv6 codes.</p>
        pub fn set_to_port(mut self, input: std::option::Option<i32>) -> Self {
            self.to_port = input;
            self
        }
        /// <p>The IPv4 CIDR range.</p>
        pub fn cidr_ipv4(mut self, input: impl Into<std::string::String>) -> Self {
            self.cidr_ipv4 = Some(input.into());
            self
        }
        /// <p>The IPv4 CIDR range.</p>
        pub fn set_cidr_ipv4(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.cidr_ipv4 = input;
            self
        }
        /// <p>The IPv6 CIDR range.</p>
        pub fn cidr_ipv6(mut self, input: impl Into<std::string::String>) -> Self {
            self.cidr_ipv6 = Some(input.into());
            self
        }
        /// <p>The IPv6 CIDR range.</p>
        pub fn set_cidr_ipv6(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.cidr_ipv6 = input;
            self
        }
        /// <p>The ID of the prefix list.</p>
        pub fn prefix_list_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.prefix_list_id = Some(input.into());
            self
        }
        /// <p>The ID of the prefix list.</p>
        pub fn set_prefix_list_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.prefix_list_id = input;
            self
        }
        /// <p>Describes the security group that is referenced in the rule.</p>
        pub fn referenced_group_info(
            mut self,
            input: crate::model::ReferencedSecurityGroup,
        ) -> Self {
            self.referenced_group_info = Some(input);
            self
        }
        /// <p>Describes the security group that is referenced in the rule.</p>
        pub fn set_referenced_group_info(
            mut self,
            input: std::option::Option<crate::model::ReferencedSecurityGroup>,
        ) -> Self {
            self.referenced_group_info = input;
            self
        }
        /// <p>The security group rule description.</p>
        pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
            self.description = Some(input.into());
            self
        }
        /// <p>The security group rule description.</p>
        pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.description = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>The tags applied to the security group rule.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>The tags applied to the security group rule.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// Consumes the builder and constructs a [`SecurityGroupRule`](crate::model::SecurityGroupRule).
        pub fn build(self) -> crate::model::SecurityGroupRule {
            crate::model::SecurityGroupRule {
                security_group_rule_id: self.security_group_rule_id,
                group_id: self.group_id,
                group_owner_id: self.group_owner_id,
                is_egress: self.is_egress,
                ip_protocol: self.ip_protocol,
                from_port: self.from_port,
                to_port: self.to_port,
                cidr_ipv4: self.cidr_ipv4,
                cidr_ipv6: self.cidr_ipv6,
                prefix_list_id: self.prefix_list_id,
                referenced_group_info: self.referenced_group_info,
                description: self.description,
                tags: self.tags,
            }
        }
    }
}
impl SecurityGroupRule {
    /// Creates a new builder-style object to manufacture [`SecurityGroupRule`](crate::model::SecurityGroupRule).
    pub fn builder() -> crate::model::security_group_rule::Builder {
        crate::model::security_group_rule::Builder::default()
    }
}

/// <p> Describes the security group that is referenced in the security group rule.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ReferencedSecurityGroup {
    /// <p>The ID of the security group.</p>
    #[doc(hidden)]
    pub group_id: std::option::Option<std::string::String>,
    /// <p>The status of a VPC peering connection, if applicable.</p>
    #[doc(hidden)]
    pub peering_status: std::option::Option<std::string::String>,
    /// <p>The Amazon Web Services account ID.</p>
    #[doc(hidden)]
    pub user_id: std::option::Option<std::string::String>,
    /// <p>The ID of the VPC.</p>
    #[doc(hidden)]
    pub vpc_id: std::option::Option<std::string::String>,
    /// <p>The ID of the VPC peering connection.</p>
    #[doc(hidden)]
    pub vpc_peering_connection_id: std::option::Option<std::string::String>,
}
impl ReferencedSecurityGroup {
    /// <p>The ID of the security group.</p>
    pub fn group_id(&self) -> std::option::Option<&str> {
        self.group_id.as_deref()
    }
    /// <p>The status of a VPC peering connection, if applicable.</p>
    pub fn peering_status(&self) -> std::option::Option<&str> {
        self.peering_status.as_deref()
    }
    /// <p>The Amazon Web Services account ID.</p>
    pub fn user_id(&self) -> std::option::Option<&str> {
        self.user_id.as_deref()
    }
    /// <p>The ID of the VPC.</p>
    pub fn vpc_id(&self) -> std::option::Option<&str> {
        self.vpc_id.as_deref()
    }
    /// <p>The ID of the VPC peering connection.</p>
    pub fn vpc_peering_connection_id(&self) -> std::option::Option<&str> {
        self.vpc_peering_connection_id.as_deref()
    }
}
/// See [`ReferencedSecurityGroup`](crate::model::ReferencedSecurityGroup).
pub mod referenced_security_group {

    /// A builder for [`ReferencedSecurityGroup`](crate::model::ReferencedSecurityGroup).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) group_id: std::option::Option<std::string::String>,
        pub(crate) peering_status: std::option::Option<std::string::String>,
        pub(crate) user_id: std::option::Option<std::string::String>,
        pub(crate) vpc_id: std::option::Option<std::string::String>,
        pub(crate) vpc_peering_connection_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The ID of the security group.</p>
        pub fn group_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.group_id = Some(input.into());
            self
        }
        /// <p>The ID of the security group.</p>
        pub fn set_group_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.group_id = input;
            self
        }
        /// <p>The status of a VPC peering connection, if applicable.</p>
        pub fn peering_status(mut self, input: impl Into<std::string::String>) -> Self {
            self.peering_status = Some(input.into());
            self
        }
        /// <p>The status of a VPC peering connection, if applicable.</p>
        pub fn set_peering_status(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.peering_status = input;
            self
        }
        /// <p>The Amazon Web Services account ID.</p>
        pub fn user_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.user_id = Some(input.into());
            self
        }
        /// <p>The Amazon Web Services account ID.</p>
        pub fn set_user_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.user_id = input;
            self
        }
        /// <p>The ID of the VPC.</p>
        pub fn vpc_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.vpc_id = Some(input.into());
            self
        }
        /// <p>The ID of the VPC.</p>
        pub fn set_vpc_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.vpc_id = input;
            self
        }
        /// <p>The ID of the VPC peering connection.</p>
        pub fn vpc_peering_connection_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.vpc_peering_connection_id = Some(input.into());
            self
        }
        /// <p>The ID of the VPC peering connection.</p>
        pub fn set_vpc_peering_connection_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.vpc_peering_connection_id = input;
            self
        }
        /// Consumes the builder and constructs a [`ReferencedSecurityGroup`](crate::model::ReferencedSecurityGroup).
        pub fn build(self) -> crate::model::ReferencedSecurityGroup {
            crate::model::ReferencedSecurityGroup {
                group_id: self.group_id,
                peering_status: self.peering_status,
                user_id: self.user_id,
                vpc_id: self.vpc_id,
                vpc_peering_connection_id: self.vpc_peering_connection_id,
            }
        }
    }
}
impl ReferencedSecurityGroup {
    /// Creates a new builder-style object to manufacture [`ReferencedSecurityGroup`](crate::model::ReferencedSecurityGroup).
    pub fn builder() -> crate::model::referenced_security_group::Builder {
        crate::model::referenced_security_group::Builder::default()
    }
}

/// <p>Describes a VPC with a security group that references your security group.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SecurityGroupReference {
    /// <p>The ID of your security group.</p>
    #[doc(hidden)]
    pub group_id: std::option::Option<std::string::String>,
    /// <p>The ID of the VPC with the referencing security group.</p>
    #[doc(hidden)]
    pub referencing_vpc_id: std::option::Option<std::string::String>,
    /// <p>The ID of the VPC peering connection.</p>
    #[doc(hidden)]
    pub vpc_peering_connection_id: std::option::Option<std::string::String>,
}
impl SecurityGroupReference {
    /// <p>The ID of your security group.</p>
    pub fn group_id(&self) -> std::option::Option<&str> {
        self.group_id.as_deref()
    }
    /// <p>The ID of the VPC with the referencing security group.</p>
    pub fn referencing_vpc_id(&self) -> std::option::Option<&str> {
        self.referencing_vpc_id.as_deref()
    }
    /// <p>The ID of the VPC peering connection.</p>
    pub fn vpc_peering_connection_id(&self) -> std::option::Option<&str> {
        self.vpc_peering_connection_id.as_deref()
    }
}
/// See [`SecurityGroupReference`](crate::model::SecurityGroupReference).
pub mod security_group_reference {

    /// A builder for [`SecurityGroupReference`](crate::model::SecurityGroupReference).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) group_id: std::option::Option<std::string::String>,
        pub(crate) referencing_vpc_id: std::option::Option<std::string::String>,
        pub(crate) vpc_peering_connection_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The ID of your security group.</p>
        pub fn group_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.group_id = Some(input.into());
            self
        }
        /// <p>The ID of your security group.</p>
        pub fn set_group_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.group_id = input;
            self
        }
        /// <p>The ID of the VPC with the referencing security group.</p>
        pub fn referencing_vpc_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.referencing_vpc_id = Some(input.into());
            self
        }
        /// <p>The ID of the VPC with the referencing security group.</p>
        pub fn set_referencing_vpc_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.referencing_vpc_id = input;
            self
        }
        /// <p>The ID of the VPC peering connection.</p>
        pub fn vpc_peering_connection_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.vpc_peering_connection_id = Some(input.into());
            self
        }
        /// <p>The ID of the VPC peering connection.</p>
        pub fn set_vpc_peering_connection_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.vpc_peering_connection_id = input;
            self
        }
        /// Consumes the builder and constructs a [`SecurityGroupReference`](crate::model::SecurityGroupReference).
        pub fn build(self) -> crate::model::SecurityGroupReference {
            crate::model::SecurityGroupReference {
                group_id: self.group_id,
                referencing_vpc_id: self.referencing_vpc_id,
                vpc_peering_connection_id: self.vpc_peering_connection_id,
            }
        }
    }
}
impl SecurityGroupReference {
    /// Creates a new builder-style object to manufacture [`SecurityGroupReference`](crate::model::SecurityGroupReference).
    pub fn builder() -> crate::model::security_group_reference::Builder {
        crate::model::security_group_reference::Builder::default()
    }
}

/// <p>Describes the time period for a Scheduled Instance to start its first schedule.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SlotStartTimeRangeRequest {
    /// <p>The earliest date and time, in UTC, for the Scheduled Instance to start.</p>
    #[doc(hidden)]
    pub earliest_time: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The latest date and time, in UTC, for the Scheduled Instance to start.</p>
    #[doc(hidden)]
    pub latest_time: std::option::Option<aws_smithy_types::DateTime>,
}
impl SlotStartTimeRangeRequest {
    /// <p>The earliest date and time, in UTC, for the Scheduled Instance to start.</p>
    pub fn earliest_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.earliest_time.as_ref()
    }
    /// <p>The latest date and time, in UTC, for the Scheduled Instance to start.</p>
    pub fn latest_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.latest_time.as_ref()
    }
}
/// See [`SlotStartTimeRangeRequest`](crate::model::SlotStartTimeRangeRequest).
pub mod slot_start_time_range_request {

    /// A builder for [`SlotStartTimeRangeRequest`](crate::model::SlotStartTimeRangeRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) earliest_time: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) latest_time: std::option::Option<aws_smithy_types::DateTime>,
    }
    impl Builder {
        /// <p>The earliest date and time, in UTC, for the Scheduled Instance to start.</p>
        pub fn earliest_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.earliest_time = Some(input);
            self
        }
        /// <p>The earliest date and time, in UTC, for the Scheduled Instance to start.</p>
        pub fn set_earliest_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.earliest_time = input;
            self
        }
        /// <p>The latest date and time, in UTC, for the Scheduled Instance to start.</p>
        pub fn latest_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.latest_time = Some(input);
            self
        }
        /// <p>The latest date and time, in UTC, for the Scheduled Instance to start.</p>
        pub fn set_latest_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.latest_time = input;
            self
        }
        /// Consumes the builder and constructs a [`SlotStartTimeRangeRequest`](crate::model::SlotStartTimeRangeRequest).
        pub fn build(self) -> crate::model::SlotStartTimeRangeRequest {
            crate::model::SlotStartTimeRangeRequest {
                earliest_time: self.earliest_time,
                latest_time: self.latest_time,
            }
        }
    }
}
impl SlotStartTimeRangeRequest {
    /// Creates a new builder-style object to manufacture [`SlotStartTimeRangeRequest`](crate::model::SlotStartTimeRangeRequest).
    pub fn builder() -> crate::model::slot_start_time_range_request::Builder {
        crate::model::slot_start_time_range_request::Builder::default()
    }
}

/// <p>Describes a schedule that is available for your Scheduled Instances.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ScheduledInstanceAvailability {
    /// <p>The Availability Zone.</p>
    #[doc(hidden)]
    pub availability_zone: std::option::Option<std::string::String>,
    /// <p>The number of available instances.</p>
    #[doc(hidden)]
    pub available_instance_count: std::option::Option<i32>,
    /// <p>The time period for the first schedule to start.</p>
    #[doc(hidden)]
    pub first_slot_start_time: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The hourly price for a single instance.</p>
    #[doc(hidden)]
    pub hourly_price: std::option::Option<std::string::String>,
    /// <p>The instance type. You can specify one of the C3, C4, M4, or R3 instance types.</p>
    #[doc(hidden)]
    pub instance_type: std::option::Option<std::string::String>,
    /// <p>The maximum term. The only possible value is 365 days.</p>
    #[doc(hidden)]
    pub max_term_duration_in_days: std::option::Option<i32>,
    /// <p>The minimum term. The only possible value is 365 days.</p>
    #[doc(hidden)]
    pub min_term_duration_in_days: std::option::Option<i32>,
    /// <p>The network platform (<code>EC2-Classic</code> or <code>EC2-VPC</code>).</p>
    #[doc(hidden)]
    pub network_platform: std::option::Option<std::string::String>,
    /// <p>The platform (<code>Linux/UNIX</code> or <code>Windows</code>).</p>
    #[doc(hidden)]
    pub platform: std::option::Option<std::string::String>,
    /// <p>The purchase token. This token expires in two hours.</p>
    #[doc(hidden)]
    pub purchase_token: std::option::Option<std::string::String>,
    /// <p>The schedule recurrence.</p>
    #[doc(hidden)]
    pub recurrence: std::option::Option<crate::model::ScheduledInstanceRecurrence>,
    /// <p>The number of hours in the schedule.</p>
    #[doc(hidden)]
    pub slot_duration_in_hours: std::option::Option<i32>,
    /// <p>The total number of hours for a single instance for the entire term.</p>
    #[doc(hidden)]
    pub total_scheduled_instance_hours: std::option::Option<i32>,
}
impl ScheduledInstanceAvailability {
    /// <p>The Availability Zone.</p>
    pub fn availability_zone(&self) -> std::option::Option<&str> {
        self.availability_zone.as_deref()
    }
    /// <p>The number of available instances.</p>
    pub fn available_instance_count(&self) -> std::option::Option<i32> {
        self.available_instance_count
    }
    /// <p>The time period for the first schedule to start.</p>
    pub fn first_slot_start_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.first_slot_start_time.as_ref()
    }
    /// <p>The hourly price for a single instance.</p>
    pub fn hourly_price(&self) -> std::option::Option<&str> {
        self.hourly_price.as_deref()
    }
    /// <p>The instance type. You can specify one of the C3, C4, M4, or R3 instance types.</p>
    pub fn instance_type(&self) -> std::option::Option<&str> {
        self.instance_type.as_deref()
    }
    /// <p>The maximum term. The only possible value is 365 days.</p>
    pub fn max_term_duration_in_days(&self) -> std::option::Option<i32> {
        self.max_term_duration_in_days
    }
    /// <p>The minimum term. The only possible value is 365 days.</p>
    pub fn min_term_duration_in_days(&self) -> std::option::Option<i32> {
        self.min_term_duration_in_days
    }
    /// <p>The network platform (<code>EC2-Classic</code> or <code>EC2-VPC</code>).</p>
    pub fn network_platform(&self) -> std::option::Option<&str> {
        self.network_platform.as_deref()
    }
    /// <p>The platform (<code>Linux/UNIX</code> or <code>Windows</code>).</p>
    pub fn platform(&self) -> std::option::Option<&str> {
        self.platform.as_deref()
    }
    /// <p>The purchase token. This token expires in two hours.</p>
    pub fn purchase_token(&self) -> std::option::Option<&str> {
        self.purchase_token.as_deref()
    }
    /// <p>The schedule recurrence.</p>
    pub fn recurrence(&self) -> std::option::Option<&crate::model::ScheduledInstanceRecurrence> {
        self.recurrence.as_ref()
    }
    /// <p>The number of hours in the schedule.</p>
    pub fn slot_duration_in_hours(&self) -> std::option::Option<i32> {
        self.slot_duration_in_hours
    }
    /// <p>The total number of hours for a single instance for the entire term.</p>
    pub fn total_scheduled_instance_hours(&self) -> std::option::Option<i32> {
        self.total_scheduled_instance_hours
    }
}
/// See [`ScheduledInstanceAvailability`](crate::model::ScheduledInstanceAvailability).
pub mod scheduled_instance_availability {

    /// A builder for [`ScheduledInstanceAvailability`](crate::model::ScheduledInstanceAvailability).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) availability_zone: std::option::Option<std::string::String>,
        pub(crate) available_instance_count: std::option::Option<i32>,
        pub(crate) first_slot_start_time: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) hourly_price: std::option::Option<std::string::String>,
        pub(crate) instance_type: std::option::Option<std::string::String>,
        pub(crate) max_term_duration_in_days: std::option::Option<i32>,
        pub(crate) min_term_duration_in_days: std::option::Option<i32>,
        pub(crate) network_platform: std::option::Option<std::string::String>,
        pub(crate) platform: std::option::Option<std::string::String>,
        pub(crate) purchase_token: std::option::Option<std::string::String>,
        pub(crate) recurrence: std::option::Option<crate::model::ScheduledInstanceRecurrence>,
        pub(crate) slot_duration_in_hours: std::option::Option<i32>,
        pub(crate) total_scheduled_instance_hours: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>The Availability Zone.</p>
        pub fn availability_zone(mut self, input: impl Into<std::string::String>) -> Self {
            self.availability_zone = Some(input.into());
            self
        }
        /// <p>The Availability Zone.</p>
        pub fn set_availability_zone(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.availability_zone = input;
            self
        }
        /// <p>The number of available instances.</p>
        pub fn available_instance_count(mut self, input: i32) -> Self {
            self.available_instance_count = Some(input);
            self
        }
        /// <p>The number of available instances.</p>
        pub fn set_available_instance_count(mut self, input: std::option::Option<i32>) -> Self {
            self.available_instance_count = input;
            self
        }
        /// <p>The time period for the first schedule to start.</p>
        pub fn first_slot_start_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.first_slot_start_time = Some(input);
            self
        }
        /// <p>The time period for the first schedule to start.</p>
        pub fn set_first_slot_start_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.first_slot_start_time = input;
            self
        }
        /// <p>The hourly price for a single instance.</p>
        pub fn hourly_price(mut self, input: impl Into<std::string::String>) -> Self {
            self.hourly_price = Some(input.into());
            self
        }
        /// <p>The hourly price for a single instance.</p>
        pub fn set_hourly_price(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.hourly_price = input;
            self
        }
        /// <p>The instance type. You can specify one of the C3, C4, M4, or R3 instance types.</p>
        pub fn instance_type(mut self, input: impl Into<std::string::String>) -> Self {
            self.instance_type = Some(input.into());
            self
        }
        /// <p>The instance type. You can specify one of the C3, C4, M4, or R3 instance types.</p>
        pub fn set_instance_type(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.instance_type = input;
            self
        }
        /// <p>The maximum term. The only possible value is 365 days.</p>
        pub fn max_term_duration_in_days(mut self, input: i32) -> Self {
            self.max_term_duration_in_days = Some(input);
            self
        }
        /// <p>The maximum term. The only possible value is 365 days.</p>
        pub fn set_max_term_duration_in_days(mut self, input: std::option::Option<i32>) -> Self {
            self.max_term_duration_in_days = input;
            self
        }
        /// <p>The minimum term. The only possible value is 365 days.</p>
        pub fn min_term_duration_in_days(mut self, input: i32) -> Self {
            self.min_term_duration_in_days = Some(input);
            self
        }
        /// <p>The minimum term. The only possible value is 365 days.</p>
        pub fn set_min_term_duration_in_days(mut self, input: std::option::Option<i32>) -> Self {
            self.min_term_duration_in_days = input;
            self
        }
        /// <p>The network platform (<code>EC2-Classic</code> or <code>EC2-VPC</code>).</p>
        pub fn network_platform(mut self, input: impl Into<std::string::String>) -> Self {
            self.network_platform = Some(input.into());
            self
        }
        /// <p>The network platform (<code>EC2-Classic</code> or <code>EC2-VPC</code>).</p>
        pub fn set_network_platform(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.network_platform = input;
            self
        }
        /// <p>The platform (<code>Linux/UNIX</code> or <code>Windows</code>).</p>
        pub fn platform(mut self, input: impl Into<std::string::String>) -> Self {
            self.platform = Some(input.into());
            self
        }
        /// <p>The platform (<code>Linux/UNIX</code> or <code>Windows</code>).</p>
        pub fn set_platform(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.platform = input;
            self
        }
        /// <p>The purchase token. This token expires in two hours.</p>
        pub fn purchase_token(mut self, input: impl Into<std::string::String>) -> Self {
            self.purchase_token = Some(input.into());
            self
        }
        /// <p>The purchase token. This token expires in two hours.</p>
        pub fn set_purchase_token(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.purchase_token = input;
            self
        }
        /// <p>The schedule recurrence.</p>
        pub fn recurrence(mut self, input: crate::model::ScheduledInstanceRecurrence) -> Self {
            self.recurrence = Some(input);
            self
        }
        /// <p>The schedule recurrence.</p>
        pub fn set_recurrence(
            mut self,
            input: std::option::Option<crate::model::ScheduledInstanceRecurrence>,
        ) -> Self {
            self.recurrence = input;
            self
        }
        /// <p>The number of hours in the schedule.</p>
        pub fn slot_duration_in_hours(mut self, input: i32) -> Self {
            self.slot_duration_in_hours = Some(input);
            self
        }
        /// <p>The number of hours in the schedule.</p>
        pub fn set_slot_duration_in_hours(mut self, input: std::option::Option<i32>) -> Self {
            self.slot_duration_in_hours = input;
            self
        }
        /// <p>The total number of hours for a single instance for the entire term.</p>
        pub fn total_scheduled_instance_hours(mut self, input: i32) -> Self {
            self.total_scheduled_instance_hours = Some(input);
            self
        }
        /// <p>The total number of hours for a single instance for the entire term.</p>
        pub fn set_total_scheduled_instance_hours(
            mut self,
            input: std::option::Option<i32>,
        ) -> Self {
            self.total_scheduled_instance_hours = input;
            self
        }
        /// Consumes the builder and constructs a [`ScheduledInstanceAvailability`](crate::model::ScheduledInstanceAvailability).
        pub fn build(self) -> crate::model::ScheduledInstanceAvailability {
            crate::model::ScheduledInstanceAvailability {
                availability_zone: self.availability_zone,
                available_instance_count: self.available_instance_count,
                first_slot_start_time: self.first_slot_start_time,
                hourly_price: self.hourly_price,
                instance_type: self.instance_type,
                max_term_duration_in_days: self.max_term_duration_in_days,
                min_term_duration_in_days: self.min_term_duration_in_days,
                network_platform: self.network_platform,
                platform: self.platform,
                purchase_token: self.purchase_token,
                recurrence: self.recurrence,
                slot_duration_in_hours: self.slot_duration_in_hours,
                total_scheduled_instance_hours: self.total_scheduled_instance_hours,
            }
        }
    }
}
impl ScheduledInstanceAvailability {
    /// Creates a new builder-style object to manufacture [`ScheduledInstanceAvailability`](crate::model::ScheduledInstanceAvailability).
    pub fn builder() -> crate::model::scheduled_instance_availability::Builder {
        crate::model::scheduled_instance_availability::Builder::default()
    }
}

/// <p>Describes the recurring schedule for a Scheduled Instance.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ScheduledInstanceRecurrenceRequest {
    /// <p>The frequency (<code>Daily</code>, <code>Weekly</code>, or <code>Monthly</code>).</p>
    #[doc(hidden)]
    pub frequency: std::option::Option<std::string::String>,
    /// <p>The interval quantity. The interval unit depends on the value of <code>Frequency</code>. For example, every 2 weeks or every 2 months.</p>
    #[doc(hidden)]
    pub interval: std::option::Option<i32>,
    /// <p>The days. For a monthly schedule, this is one or more days of the month (1-31). For a weekly schedule, this is one or more days of the week (1-7, where 1 is Sunday). You can't specify this value with a daily schedule. If the occurrence is relative to the end of the month, you can specify only a single day.</p>
    #[doc(hidden)]
    pub occurrence_days: std::option::Option<std::vec::Vec<i32>>,
    /// <p>Indicates whether the occurrence is relative to the end of the specified week or month. You can't specify this value with a daily schedule.</p>
    #[doc(hidden)]
    pub occurrence_relative_to_end: std::option::Option<bool>,
    /// <p>The unit for <code>OccurrenceDays</code> (<code>DayOfWeek</code> or <code>DayOfMonth</code>). This value is required for a monthly schedule. You can't specify <code>DayOfWeek</code> with a weekly schedule. You can't specify this value with a daily schedule.</p>
    #[doc(hidden)]
    pub occurrence_unit: std::option::Option<std::string::String>,
}
impl ScheduledInstanceRecurrenceRequest {
    /// <p>The frequency (<code>Daily</code>, <code>Weekly</code>, or <code>Monthly</code>).</p>
    pub fn frequency(&self) -> std::option::Option<&str> {
        self.frequency.as_deref()
    }
    /// <p>The interval quantity. The interval unit depends on the value of <code>Frequency</code>. For example, every 2 weeks or every 2 months.</p>
    pub fn interval(&self) -> std::option::Option<i32> {
        self.interval
    }
    /// <p>The days. For a monthly schedule, this is one or more days of the month (1-31). For a weekly schedule, this is one or more days of the week (1-7, where 1 is Sunday). You can't specify this value with a daily schedule. If the occurrence is relative to the end of the month, you can specify only a single day.</p>
    pub fn occurrence_days(&self) -> std::option::Option<&[i32]> {
        self.occurrence_days.as_deref()
    }
    /// <p>Indicates whether the occurrence is relative to the end of the specified week or month. You can't specify this value with a daily schedule.</p>
    pub fn occurrence_relative_to_end(&self) -> std::option::Option<bool> {
        self.occurrence_relative_to_end
    }
    /// <p>The unit for <code>OccurrenceDays</code> (<code>DayOfWeek</code> or <code>DayOfMonth</code>). This value is required for a monthly schedule. You can't specify <code>DayOfWeek</code> with a weekly schedule. You can't specify this value with a daily schedule.</p>
    pub fn occurrence_unit(&self) -> std::option::Option<&str> {
        self.occurrence_unit.as_deref()
    }
}
/// See [`ScheduledInstanceRecurrenceRequest`](crate::model::ScheduledInstanceRecurrenceRequest).
pub mod scheduled_instance_recurrence_request {

    /// A builder for [`ScheduledInstanceRecurrenceRequest`](crate::model::ScheduledInstanceRecurrenceRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) frequency: std::option::Option<std::string::String>,
        pub(crate) interval: std::option::Option<i32>,
        pub(crate) occurrence_days: std::option::Option<std::vec::Vec<i32>>,
        pub(crate) occurrence_relative_to_end: std::option::Option<bool>,
        pub(crate) occurrence_unit: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The frequency (<code>Daily</code>, <code>Weekly</code>, or <code>Monthly</code>).</p>
        pub fn frequency(mut self, input: impl Into<std::string::String>) -> Self {
            self.frequency = Some(input.into());
            self
        }
        /// <p>The frequency (<code>Daily</code>, <code>Weekly</code>, or <code>Monthly</code>).</p>
        pub fn set_frequency(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.frequency = input;
            self
        }
        /// <p>The interval quantity. The interval unit depends on the value of <code>Frequency</code>. For example, every 2 weeks or every 2 months.</p>
        pub fn interval(mut self, input: i32) -> Self {
            self.interval = Some(input);
            self
        }
        /// <p>The interval quantity. The interval unit depends on the value of <code>Frequency</code>. For example, every 2 weeks or every 2 months.</p>
        pub fn set_interval(mut self, input: std::option::Option<i32>) -> Self {
            self.interval = input;
            self
        }
        /// Appends an item to `occurrence_days`.
        ///
        /// To override the contents of this collection use [`set_occurrence_days`](Self::set_occurrence_days).
        ///
        /// <p>The days. For a monthly schedule, this is one or more days of the month (1-31). For a weekly schedule, this is one or more days of the week (1-7, where 1 is Sunday). You can't specify this value with a daily schedule. If the occurrence is relative to the end of the month, you can specify only a single day.</p>
        pub fn occurrence_days(mut self, input: i32) -> Self {
            let mut v = self.occurrence_days.unwrap_or_default();
            v.push(input);
            self.occurrence_days = Some(v);
            self
        }
        /// <p>The days. For a monthly schedule, this is one or more days of the month (1-31). For a weekly schedule, this is one or more days of the week (1-7, where 1 is Sunday). You can't specify this value with a daily schedule. If the occurrence is relative to the end of the month, you can specify only a single day.</p>
        pub fn set_occurrence_days(
            mut self,
            input: std::option::Option<std::vec::Vec<i32>>,
        ) -> Self {
            self.occurrence_days = input;
            self
        }
        /// <p>Indicates whether the occurrence is relative to the end of the specified week or month. You can't specify this value with a daily schedule.</p>
        pub fn occurrence_relative_to_end(mut self, input: bool) -> Self {
            self.occurrence_relative_to_end = Some(input);
            self
        }
        /// <p>Indicates whether the occurrence is relative to the end of the specified week or month. You can't specify this value with a daily schedule.</p>
        pub fn set_occurrence_relative_to_end(mut self, input: std::option::Option<bool>) -> Self {
            self.occurrence_relative_to_end = input;
            self
        }
        /// <p>The unit for <code>OccurrenceDays</code> (<code>DayOfWeek</code> or <code>DayOfMonth</code>). This value is required for a monthly schedule. You can't specify <code>DayOfWeek</code> with a weekly schedule. You can't specify this value with a daily schedule.</p>
        pub fn occurrence_unit(mut self, input: impl Into<std::string::String>) -> Self {
            self.occurrence_unit = Some(input.into());
            self
        }
        /// <p>The unit for <code>OccurrenceDays</code> (<code>DayOfWeek</code> or <code>DayOfMonth</code>). This value is required for a monthly schedule. You can't specify <code>DayOfWeek</code> with a weekly schedule. You can't specify this value with a daily schedule.</p>
        pub fn set_occurrence_unit(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.occurrence_unit = input;
            self
        }
        /// Consumes the builder and constructs a [`ScheduledInstanceRecurrenceRequest`](crate::model::ScheduledInstanceRecurrenceRequest).
        pub fn build(self) -> crate::model::ScheduledInstanceRecurrenceRequest {
            crate::model::ScheduledInstanceRecurrenceRequest {
                frequency: self.frequency,
                interval: self.interval,
                occurrence_days: self.occurrence_days,
                occurrence_relative_to_end: self.occurrence_relative_to_end,
                occurrence_unit: self.occurrence_unit,
            }
        }
    }
}
impl ScheduledInstanceRecurrenceRequest {
    /// Creates a new builder-style object to manufacture [`ScheduledInstanceRecurrenceRequest`](crate::model::ScheduledInstanceRecurrenceRequest).
    pub fn builder() -> crate::model::scheduled_instance_recurrence_request::Builder {
        crate::model::scheduled_instance_recurrence_request::Builder::default()
    }
}

/// <p>Describes the time period for a Scheduled Instance to start its first schedule. The time period must span less than one day.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SlotDateTimeRangeRequest {
    /// <p>The earliest date and time, in UTC, for the Scheduled Instance to start.</p>
    #[doc(hidden)]
    pub earliest_time: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The latest date and time, in UTC, for the Scheduled Instance to start. This value must be later than or equal to the earliest date and at most three months in the future.</p>
    #[doc(hidden)]
    pub latest_time: std::option::Option<aws_smithy_types::DateTime>,
}
impl SlotDateTimeRangeRequest {
    /// <p>The earliest date and time, in UTC, for the Scheduled Instance to start.</p>
    pub fn earliest_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.earliest_time.as_ref()
    }
    /// <p>The latest date and time, in UTC, for the Scheduled Instance to start. This value must be later than or equal to the earliest date and at most three months in the future.</p>
    pub fn latest_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.latest_time.as_ref()
    }
}
/// See [`SlotDateTimeRangeRequest`](crate::model::SlotDateTimeRangeRequest).
pub mod slot_date_time_range_request {

    /// A builder for [`SlotDateTimeRangeRequest`](crate::model::SlotDateTimeRangeRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) earliest_time: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) latest_time: std::option::Option<aws_smithy_types::DateTime>,
    }
    impl Builder {
        /// <p>The earliest date and time, in UTC, for the Scheduled Instance to start.</p>
        pub fn earliest_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.earliest_time = Some(input);
            self
        }
        /// <p>The earliest date and time, in UTC, for the Scheduled Instance to start.</p>
        pub fn set_earliest_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.earliest_time = input;
            self
        }
        /// <p>The latest date and time, in UTC, for the Scheduled Instance to start. This value must be later than or equal to the earliest date and at most three months in the future.</p>
        pub fn latest_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.latest_time = Some(input);
            self
        }
        /// <p>The latest date and time, in UTC, for the Scheduled Instance to start. This value must be later than or equal to the earliest date and at most three months in the future.</p>
        pub fn set_latest_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.latest_time = input;
            self
        }
        /// Consumes the builder and constructs a [`SlotDateTimeRangeRequest`](crate::model::SlotDateTimeRangeRequest).
        pub fn build(self) -> crate::model::SlotDateTimeRangeRequest {
            crate::model::SlotDateTimeRangeRequest {
                earliest_time: self.earliest_time,
                latest_time: self.latest_time,
            }
        }
    }
}
impl SlotDateTimeRangeRequest {
    /// Creates a new builder-style object to manufacture [`SlotDateTimeRangeRequest`](crate::model::SlotDateTimeRangeRequest).
    pub fn builder() -> crate::model::slot_date_time_range_request::Builder {
        crate::model::slot_date_time_range_request::Builder::default()
    }
}

/// <p>Describes a route table.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct RouteTable {
    /// <p>The associations between the route table and one or more subnets or a gateway.</p>
    #[doc(hidden)]
    pub associations: std::option::Option<std::vec::Vec<crate::model::RouteTableAssociation>>,
    /// <p>Any virtual private gateway (VGW) propagating routes.</p>
    #[doc(hidden)]
    pub propagating_vgws: std::option::Option<std::vec::Vec<crate::model::PropagatingVgw>>,
    /// <p>The ID of the route table.</p>
    #[doc(hidden)]
    pub route_table_id: std::option::Option<std::string::String>,
    /// <p>The routes in the route table.</p>
    #[doc(hidden)]
    pub routes: std::option::Option<std::vec::Vec<crate::model::Route>>,
    /// <p>Any tags assigned to the route table.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    /// <p>The ID of the VPC.</p>
    #[doc(hidden)]
    pub vpc_id: std::option::Option<std::string::String>,
    /// <p>The ID of the Amazon Web Services account that owns the route table.</p>
    #[doc(hidden)]
    pub owner_id: std::option::Option<std::string::String>,
}
impl RouteTable {
    /// <p>The associations between the route table and one or more subnets or a gateway.</p>
    pub fn associations(&self) -> std::option::Option<&[crate::model::RouteTableAssociation]> {
        self.associations.as_deref()
    }
    /// <p>Any virtual private gateway (VGW) propagating routes.</p>
    pub fn propagating_vgws(&self) -> std::option::Option<&[crate::model::PropagatingVgw]> {
        self.propagating_vgws.as_deref()
    }
    /// <p>The ID of the route table.</p>
    pub fn route_table_id(&self) -> std::option::Option<&str> {
        self.route_table_id.as_deref()
    }
    /// <p>The routes in the route table.</p>
    pub fn routes(&self) -> std::option::Option<&[crate::model::Route]> {
        self.routes.as_deref()
    }
    /// <p>Any tags assigned to the route table.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
    /// <p>The ID of the VPC.</p>
    pub fn vpc_id(&self) -> std::option::Option<&str> {
        self.vpc_id.as_deref()
    }
    /// <p>The ID of the Amazon Web Services account that owns the route table.</p>
    pub fn owner_id(&self) -> std::option::Option<&str> {
        self.owner_id.as_deref()
    }
}
/// See [`RouteTable`](crate::model::RouteTable).
pub mod route_table {

    /// A builder for [`RouteTable`](crate::model::RouteTable).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) associations:
            std::option::Option<std::vec::Vec<crate::model::RouteTableAssociation>>,
        pub(crate) propagating_vgws:
            std::option::Option<std::vec::Vec<crate::model::PropagatingVgw>>,
        pub(crate) route_table_id: std::option::Option<std::string::String>,
        pub(crate) routes: std::option::Option<std::vec::Vec<crate::model::Route>>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        pub(crate) vpc_id: std::option::Option<std::string::String>,
        pub(crate) owner_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// Appends an item to `associations`.
        ///
        /// To override the contents of this collection use [`set_associations`](Self::set_associations).
        ///
        /// <p>The associations between the route table and one or more subnets or a gateway.</p>
        pub fn associations(mut self, input: crate::model::RouteTableAssociation) -> Self {
            let mut v = self.associations.unwrap_or_default();
            v.push(input);
            self.associations = Some(v);
            self
        }
        /// <p>The associations between the route table and one or more subnets or a gateway.</p>
        pub fn set_associations(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::RouteTableAssociation>>,
        ) -> Self {
            self.associations = input;
            self
        }
        /// Appends an item to `propagating_vgws`.
        ///
        /// To override the contents of this collection use [`set_propagating_vgws`](Self::set_propagating_vgws).
        ///
        /// <p>Any virtual private gateway (VGW) propagating routes.</p>
        pub fn propagating_vgws(mut self, input: crate::model::PropagatingVgw) -> Self {
            let mut v = self.propagating_vgws.unwrap_or_default();
            v.push(input);
            self.propagating_vgws = Some(v);
            self
        }
        /// <p>Any virtual private gateway (VGW) propagating routes.</p>
        pub fn set_propagating_vgws(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::PropagatingVgw>>,
        ) -> Self {
            self.propagating_vgws = input;
            self
        }
        /// <p>The ID of the route table.</p>
        pub fn route_table_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.route_table_id = Some(input.into());
            self
        }
        /// <p>The ID of the route table.</p>
        pub fn set_route_table_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.route_table_id = input;
            self
        }
        /// Appends an item to `routes`.
        ///
        /// To override the contents of this collection use [`set_routes`](Self::set_routes).
        ///
        /// <p>The routes in the route table.</p>
        pub fn routes(mut self, input: crate::model::Route) -> Self {
            let mut v = self.routes.unwrap_or_default();
            v.push(input);
            self.routes = Some(v);
            self
        }
        /// <p>The routes in the route table.</p>
        pub fn set_routes(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Route>>,
        ) -> Self {
            self.routes = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>Any tags assigned to the route table.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>Any tags assigned to the route table.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// <p>The ID of the VPC.</p>
        pub fn vpc_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.vpc_id = Some(input.into());
            self
        }
        /// <p>The ID of the VPC.</p>
        pub fn set_vpc_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.vpc_id = input;
            self
        }
        /// <p>The ID of the Amazon Web Services account that owns the route table.</p>
        pub fn owner_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.owner_id = Some(input.into());
            self
        }
        /// <p>The ID of the Amazon Web Services account that owns the route table.</p>
        pub fn set_owner_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.owner_id = input;
            self
        }
        /// Consumes the builder and constructs a [`RouteTable`](crate::model::RouteTable).
        pub fn build(self) -> crate::model::RouteTable {
            crate::model::RouteTable {
                associations: self.associations,
                propagating_vgws: self.propagating_vgws,
                route_table_id: self.route_table_id,
                routes: self.routes,
                tags: self.tags,
                vpc_id: self.vpc_id,
                owner_id: self.owner_id,
            }
        }
    }
}
impl RouteTable {
    /// Creates a new builder-style object to manufacture [`RouteTable`](crate::model::RouteTable).
    pub fn builder() -> crate::model::route_table::Builder {
        crate::model::route_table::Builder::default()
    }
}

/// <p>Describes a route in a route table.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Route {
    /// <p>The IPv4 CIDR block used for the destination match.</p>
    #[doc(hidden)]
    pub destination_cidr_block: std::option::Option<std::string::String>,
    /// <p>The IPv6 CIDR block used for the destination match.</p>
    #[doc(hidden)]
    pub destination_ipv6_cidr_block: std::option::Option<std::string::String>,
    /// <p>The prefix of the Amazon Web Service.</p>
    #[doc(hidden)]
    pub destination_prefix_list_id: std::option::Option<std::string::String>,
    /// <p>The ID of the egress-only internet gateway.</p>
    #[doc(hidden)]
    pub egress_only_internet_gateway_id: std::option::Option<std::string::String>,
    /// <p>The ID of a gateway attached to your VPC.</p>
    #[doc(hidden)]
    pub gateway_id: std::option::Option<std::string::String>,
    /// <p>The ID of a NAT instance in your VPC.</p>
    #[doc(hidden)]
    pub instance_id: std::option::Option<std::string::String>,
    /// <p>The ID of Amazon Web Services account that owns the instance.</p>
    #[doc(hidden)]
    pub instance_owner_id: std::option::Option<std::string::String>,
    /// <p>The ID of a NAT gateway.</p>
    #[doc(hidden)]
    pub nat_gateway_id: std::option::Option<std::string::String>,
    /// <p>The ID of a transit gateway.</p>
    #[doc(hidden)]
    pub transit_gateway_id: std::option::Option<std::string::String>,
    /// <p>The ID of the local gateway.</p>
    #[doc(hidden)]
    pub local_gateway_id: std::option::Option<std::string::String>,
    /// <p>The ID of the carrier gateway.</p>
    #[doc(hidden)]
    pub carrier_gateway_id: std::option::Option<std::string::String>,
    /// <p>The ID of the network interface.</p>
    #[doc(hidden)]
    pub network_interface_id: std::option::Option<std::string::String>,
    /// <p>Describes how the route was created.</p>
    /// <ul>
    /// <li> <p> <code>CreateRouteTable</code> - The route was automatically created when the route table was created.</p> </li>
    /// <li> <p> <code>CreateRoute</code> - The route was manually added to the route table.</p> </li>
    /// <li> <p> <code>EnableVgwRoutePropagation</code> - The route was propagated by route propagation.</p> </li>
    /// </ul>
    #[doc(hidden)]
    pub origin: std::option::Option<crate::model::RouteOrigin>,
    /// <p>The state of the route. The <code>blackhole</code> state indicates that the route's target isn't available (for example, the specified gateway isn't attached to the VPC, or the specified NAT instance has been terminated).</p>
    #[doc(hidden)]
    pub state: std::option::Option<crate::model::RouteState>,
    /// <p>The ID of a VPC peering connection.</p>
    #[doc(hidden)]
    pub vpc_peering_connection_id: std::option::Option<std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the core network.</p>
    #[doc(hidden)]
    pub core_network_arn: std::option::Option<std::string::String>,
}
impl Route {
    /// <p>The IPv4 CIDR block used for the destination match.</p>
    pub fn destination_cidr_block(&self) -> std::option::Option<&str> {
        self.destination_cidr_block.as_deref()
    }
    /// <p>The IPv6 CIDR block used for the destination match.</p>
    pub fn destination_ipv6_cidr_block(&self) -> std::option::Option<&str> {
        self.destination_ipv6_cidr_block.as_deref()
    }
    /// <p>The prefix of the Amazon Web Service.</p>
    pub fn destination_prefix_list_id(&self) -> std::option::Option<&str> {
        self.destination_prefix_list_id.as_deref()
    }
    /// <p>The ID of the egress-only internet gateway.</p>
    pub fn egress_only_internet_gateway_id(&self) -> std::option::Option<&str> {
        self.egress_only_internet_gateway_id.as_deref()
    }
    /// <p>The ID of a gateway attached to your VPC.</p>
    pub fn gateway_id(&self) -> std::option::Option<&str> {
        self.gateway_id.as_deref()
    }
    /// <p>The ID of a NAT instance in your VPC.</p>
    pub fn instance_id(&self) -> std::option::Option<&str> {
        self.instance_id.as_deref()
    }
    /// <p>The ID of Amazon Web Services account that owns the instance.</p>
    pub fn instance_owner_id(&self) -> std::option::Option<&str> {
        self.instance_owner_id.as_deref()
    }
    /// <p>The ID of a NAT gateway.</p>
    pub fn nat_gateway_id(&self) -> std::option::Option<&str> {
        self.nat_gateway_id.as_deref()
    }
    /// <p>The ID of a transit gateway.</p>
    pub fn transit_gateway_id(&self) -> std::option::Option<&str> {
        self.transit_gateway_id.as_deref()
    }
    /// <p>The ID of the local gateway.</p>
    pub fn local_gateway_id(&self) -> std::option::Option<&str> {
        self.local_gateway_id.as_deref()
    }
    /// <p>The ID of the carrier gateway.</p>
    pub fn carrier_gateway_id(&self) -> std::option::Option<&str> {
        self.carrier_gateway_id.as_deref()
    }
    /// <p>The ID of the network interface.</p>
    pub fn network_interface_id(&self) -> std::option::Option<&str> {
        self.network_interface_id.as_deref()
    }
    /// <p>Describes how the route was created.</p>
    /// <ul>
    /// <li> <p> <code>CreateRouteTable</code> - The route was automatically created when the route table was created.</p> </li>
    /// <li> <p> <code>CreateRoute</code> - The route was manually added to the route table.</p> </li>
    /// <li> <p> <code>EnableVgwRoutePropagation</code> - The route was propagated by route propagation.</p> </li>
    /// </ul>
    pub fn origin(&self) -> std::option::Option<&crate::model::RouteOrigin> {
        self.origin.as_ref()
    }
    /// <p>The state of the route. The <code>blackhole</code> state indicates that the route's target isn't available (for example, the specified gateway isn't attached to the VPC, or the specified NAT instance has been terminated).</p>
    pub fn state(&self) -> std::option::Option<&crate::model::RouteState> {
        self.state.as_ref()
    }
    /// <p>The ID of a VPC peering connection.</p>
    pub fn vpc_peering_connection_id(&self) -> std::option::Option<&str> {
        self.vpc_peering_connection_id.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the core network.</p>
    pub fn core_network_arn(&self) -> std::option::Option<&str> {
        self.core_network_arn.as_deref()
    }
}
/// See [`Route`](crate::model::Route).
pub mod route {

    /// A builder for [`Route`](crate::model::Route).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) destination_cidr_block: std::option::Option<std::string::String>,
        pub(crate) destination_ipv6_cidr_block: std::option::Option<std::string::String>,
        pub(crate) destination_prefix_list_id: std::option::Option<std::string::String>,
        pub(crate) egress_only_internet_gateway_id: std::option::Option<std::string::String>,
        pub(crate) gateway_id: std::option::Option<std::string::String>,
        pub(crate) instance_id: std::option::Option<std::string::String>,
        pub(crate) instance_owner_id: std::option::Option<std::string::String>,
        pub(crate) nat_gateway_id: std::option::Option<std::string::String>,
        pub(crate) transit_gateway_id: std::option::Option<std::string::String>,
        pub(crate) local_gateway_id: std::option::Option<std::string::String>,
        pub(crate) carrier_gateway_id: std::option::Option<std::string::String>,
        pub(crate) network_interface_id: std::option::Option<std::string::String>,
        pub(crate) origin: std::option::Option<crate::model::RouteOrigin>,
        pub(crate) state: std::option::Option<crate::model::RouteState>,
        pub(crate) vpc_peering_connection_id: std::option::Option<std::string::String>,
        pub(crate) core_network_arn: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The IPv4 CIDR block used for the destination match.</p>
        pub fn destination_cidr_block(mut self, input: impl Into<std::string::String>) -> Self {
            self.destination_cidr_block = Some(input.into());
            self
        }
        /// <p>The IPv4 CIDR block used for the destination match.</p>
        pub fn set_destination_cidr_block(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.destination_cidr_block = input;
            self
        }
        /// <p>The IPv6 CIDR block used for the destination match.</p>
        pub fn destination_ipv6_cidr_block(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.destination_ipv6_cidr_block = Some(input.into());
            self
        }
        /// <p>The IPv6 CIDR block used for the destination match.</p>
        pub fn set_destination_ipv6_cidr_block(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.destination_ipv6_cidr_block = input;
            self
        }
        /// <p>The prefix of the Amazon Web Service.</p>
        pub fn destination_prefix_list_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.destination_prefix_list_id = Some(input.into());
            self
        }
        /// <p>The prefix of the Amazon Web Service.</p>
        pub fn set_destination_prefix_list_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.destination_prefix_list_id = input;
            self
        }
        /// <p>The ID of the egress-only internet gateway.</p>
        pub fn egress_only_internet_gateway_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.egress_only_internet_gateway_id = Some(input.into());
            self
        }
        /// <p>The ID of the egress-only internet gateway.</p>
        pub fn set_egress_only_internet_gateway_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.egress_only_internet_gateway_id = input;
            self
        }
        /// <p>The ID of a gateway attached to your VPC.</p>
        pub fn gateway_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.gateway_id = Some(input.into());
            self
        }
        /// <p>The ID of a gateway attached to your VPC.</p>
        pub fn set_gateway_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.gateway_id = input;
            self
        }
        /// <p>The ID of a NAT instance in your VPC.</p>
        pub fn instance_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.instance_id = Some(input.into());
            self
        }
        /// <p>The ID of a NAT instance in your VPC.</p>
        pub fn set_instance_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.instance_id = input;
            self
        }
        /// <p>The ID of Amazon Web Services account that owns the instance.</p>
        pub fn instance_owner_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.instance_owner_id = Some(input.into());
            self
        }
        /// <p>The ID of Amazon Web Services account that owns the instance.</p>
        pub fn set_instance_owner_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.instance_owner_id = input;
            self
        }
        /// <p>The ID of a NAT gateway.</p>
        pub fn nat_gateway_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.nat_gateway_id = Some(input.into());
            self
        }
        /// <p>The ID of a NAT gateway.</p>
        pub fn set_nat_gateway_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.nat_gateway_id = input;
            self
        }
        /// <p>The ID of a transit gateway.</p>
        pub fn transit_gateway_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.transit_gateway_id = Some(input.into());
            self
        }
        /// <p>The ID of a transit gateway.</p>
        pub fn set_transit_gateway_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.transit_gateway_id = input;
            self
        }
        /// <p>The ID of the local gateway.</p>
        pub fn local_gateway_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.local_gateway_id = Some(input.into());
            self
        }
        /// <p>The ID of the local gateway.</p>
        pub fn set_local_gateway_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.local_gateway_id = input;
            self
        }
        /// <p>The ID of the carrier gateway.</p>
        pub fn carrier_gateway_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.carrier_gateway_id = Some(input.into());
            self
        }
        /// <p>The ID of the carrier gateway.</p>
        pub fn set_carrier_gateway_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.carrier_gateway_id = input;
            self
        }
        /// <p>The ID of the network interface.</p>
        pub fn network_interface_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.network_interface_id = Some(input.into());
            self
        }
        /// <p>The ID of the network interface.</p>
        pub fn set_network_interface_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.network_interface_id = input;
            self
        }
        /// <p>Describes how the route was created.</p>
        /// <ul>
        /// <li> <p> <code>CreateRouteTable</code> - The route was automatically created when the route table was created.</p> </li>
        /// <li> <p> <code>CreateRoute</code> - The route was manually added to the route table.</p> </li>
        /// <li> <p> <code>EnableVgwRoutePropagation</code> - The route was propagated by route propagation.</p> </li>
        /// </ul>
        pub fn origin(mut self, input: crate::model::RouteOrigin) -> Self {
            self.origin = Some(input);
            self
        }
        /// <p>Describes how the route was created.</p>
        /// <ul>
        /// <li> <p> <code>CreateRouteTable</code> - The route was automatically created when the route table was created.</p> </li>
        /// <li> <p> <code>CreateRoute</code> - The route was manually added to the route table.</p> </li>
        /// <li> <p> <code>EnableVgwRoutePropagation</code> - The route was propagated by route propagation.</p> </li>
        /// </ul>
        pub fn set_origin(mut self, input: std::option::Option<crate::model::RouteOrigin>) -> Self {
            self.origin = input;
            self
        }
        /// <p>The state of the route. The <code>blackhole</code> state indicates that the route's target isn't available (for example, the specified gateway isn't attached to the VPC, or the specified NAT instance has been terminated).</p>
        pub fn state(mut self, input: crate::model::RouteState) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>The state of the route. The <code>blackhole</code> state indicates that the route's target isn't available (for example, the specified gateway isn't attached to the VPC, or the specified NAT instance has been terminated).</p>
        pub fn set_state(mut self, input: std::option::Option<crate::model::RouteState>) -> Self {
            self.state = input;
            self
        }
        /// <p>The ID of a VPC peering connection.</p>
        pub fn vpc_peering_connection_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.vpc_peering_connection_id = Some(input.into());
            self
        }
        /// <p>The ID of a VPC peering connection.</p>
        pub fn set_vpc_peering_connection_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.vpc_peering_connection_id = input;
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the core network.</p>
        pub fn core_network_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.core_network_arn = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the core network.</p>
        pub fn set_core_network_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.core_network_arn = input;
            self
        }
        /// Consumes the builder and constructs a [`Route`](crate::model::Route).
        pub fn build(self) -> crate::model::Route {
            crate::model::Route {
                destination_cidr_block: self.destination_cidr_block,
                destination_ipv6_cidr_block: self.destination_ipv6_cidr_block,
                destination_prefix_list_id: self.destination_prefix_list_id,
                egress_only_internet_gateway_id: self.egress_only_internet_gateway_id,
                gateway_id: self.gateway_id,
                instance_id: self.instance_id,
                instance_owner_id: self.instance_owner_id,
                nat_gateway_id: self.nat_gateway_id,
                transit_gateway_id: self.transit_gateway_id,
                local_gateway_id: self.local_gateway_id,
                carrier_gateway_id: self.carrier_gateway_id,
                network_interface_id: self.network_interface_id,
                origin: self.origin,
                state: self.state,
                vpc_peering_connection_id: self.vpc_peering_connection_id,
                core_network_arn: self.core_network_arn,
            }
        }
    }
}
impl Route {
    /// Creates a new builder-style object to manufacture [`Route`](crate::model::Route).
    pub fn builder() -> crate::model::route::Builder {
        crate::model::route::Builder::default()
    }
}

/// When writing a match expression against `RouteState`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let routestate = unimplemented!();
/// match routestate {
///     RouteState::Active => { /* ... */ },
///     RouteState::Blackhole => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `routestate` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `RouteState::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `RouteState::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `RouteState::NewFeature` is defined.
/// Specifically, when `routestate` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `RouteState::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 RouteState {
    #[allow(missing_docs)] // documentation missing in model
    Active,
    #[allow(missing_docs)] // documentation missing in model
    Blackhole,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for RouteState {
    fn from(s: &str) -> Self {
        match s {
            "active" => RouteState::Active,
            "blackhole" => RouteState::Blackhole,
            other => RouteState::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for RouteState {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(RouteState::from(s))
    }
}
impl RouteState {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            RouteState::Active => "active",
            RouteState::Blackhole => "blackhole",
            RouteState::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["active", "blackhole"]
    }
}
impl AsRef<str> for RouteState {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `RouteOrigin`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let routeorigin = unimplemented!();
/// match routeorigin {
///     RouteOrigin::CreateRoute => { /* ... */ },
///     RouteOrigin::CreateRouteTable => { /* ... */ },
///     RouteOrigin::EnableVgwRoutePropagation => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `routeorigin` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `RouteOrigin::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `RouteOrigin::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `RouteOrigin::NewFeature` is defined.
/// Specifically, when `routeorigin` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `RouteOrigin::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 RouteOrigin {
    #[allow(missing_docs)] // documentation missing in model
    CreateRoute,
    #[allow(missing_docs)] // documentation missing in model
    CreateRouteTable,
    #[allow(missing_docs)] // documentation missing in model
    EnableVgwRoutePropagation,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for RouteOrigin {
    fn from(s: &str) -> Self {
        match s {
            "CreateRoute" => RouteOrigin::CreateRoute,
            "CreateRouteTable" => RouteOrigin::CreateRouteTable,
            "EnableVgwRoutePropagation" => RouteOrigin::EnableVgwRoutePropagation,
            other => RouteOrigin::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for RouteOrigin {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(RouteOrigin::from(s))
    }
}
impl RouteOrigin {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            RouteOrigin::CreateRoute => "CreateRoute",
            RouteOrigin::CreateRouteTable => "CreateRouteTable",
            RouteOrigin::EnableVgwRoutePropagation => "EnableVgwRoutePropagation",
            RouteOrigin::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &[
            "CreateRoute",
            "CreateRouteTable",
            "EnableVgwRoutePropagation",
        ]
    }
}
impl AsRef<str> for RouteOrigin {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes a virtual private gateway propagating route.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct PropagatingVgw {
    /// <p>The ID of the virtual private gateway.</p>
    #[doc(hidden)]
    pub gateway_id: std::option::Option<std::string::String>,
}
impl PropagatingVgw {
    /// <p>The ID of the virtual private gateway.</p>
    pub fn gateway_id(&self) -> std::option::Option<&str> {
        self.gateway_id.as_deref()
    }
}
/// See [`PropagatingVgw`](crate::model::PropagatingVgw).
pub mod propagating_vgw {

    /// A builder for [`PropagatingVgw`](crate::model::PropagatingVgw).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) gateway_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The ID of the virtual private gateway.</p>
        pub fn gateway_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.gateway_id = Some(input.into());
            self
        }
        /// <p>The ID of the virtual private gateway.</p>
        pub fn set_gateway_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.gateway_id = input;
            self
        }
        /// Consumes the builder and constructs a [`PropagatingVgw`](crate::model::PropagatingVgw).
        pub fn build(self) -> crate::model::PropagatingVgw {
            crate::model::PropagatingVgw {
                gateway_id: self.gateway_id,
            }
        }
    }
}
impl PropagatingVgw {
    /// Creates a new builder-style object to manufacture [`PropagatingVgw`](crate::model::PropagatingVgw).
    pub fn builder() -> crate::model::propagating_vgw::Builder {
        crate::model::propagating_vgw::Builder::default()
    }
}

/// <p>Describes an association between a route table and a subnet or gateway.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct RouteTableAssociation {
    /// <p>Indicates whether this is the main route table.</p>
    #[doc(hidden)]
    pub main: std::option::Option<bool>,
    /// <p>The ID of the association.</p>
    #[doc(hidden)]
    pub route_table_association_id: std::option::Option<std::string::String>,
    /// <p>The ID of the route table.</p>
    #[doc(hidden)]
    pub route_table_id: std::option::Option<std::string::String>,
    /// <p>The ID of the subnet. A subnet ID is not returned for an implicit association.</p>
    #[doc(hidden)]
    pub subnet_id: std::option::Option<std::string::String>,
    /// <p>The ID of the internet gateway or virtual private gateway.</p>
    #[doc(hidden)]
    pub gateway_id: std::option::Option<std::string::String>,
    /// <p>The state of the association.</p>
    #[doc(hidden)]
    pub association_state: std::option::Option<crate::model::RouteTableAssociationState>,
}
impl RouteTableAssociation {
    /// <p>Indicates whether this is the main route table.</p>
    pub fn main(&self) -> std::option::Option<bool> {
        self.main
    }
    /// <p>The ID of the association.</p>
    pub fn route_table_association_id(&self) -> std::option::Option<&str> {
        self.route_table_association_id.as_deref()
    }
    /// <p>The ID of the route table.</p>
    pub fn route_table_id(&self) -> std::option::Option<&str> {
        self.route_table_id.as_deref()
    }
    /// <p>The ID of the subnet. A subnet ID is not returned for an implicit association.</p>
    pub fn subnet_id(&self) -> std::option::Option<&str> {
        self.subnet_id.as_deref()
    }
    /// <p>The ID of the internet gateway or virtual private gateway.</p>
    pub fn gateway_id(&self) -> std::option::Option<&str> {
        self.gateway_id.as_deref()
    }
    /// <p>The state of the association.</p>
    pub fn association_state(
        &self,
    ) -> std::option::Option<&crate::model::RouteTableAssociationState> {
        self.association_state.as_ref()
    }
}
/// See [`RouteTableAssociation`](crate::model::RouteTableAssociation).
pub mod route_table_association {

    /// A builder for [`RouteTableAssociation`](crate::model::RouteTableAssociation).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) main: std::option::Option<bool>,
        pub(crate) route_table_association_id: std::option::Option<std::string::String>,
        pub(crate) route_table_id: std::option::Option<std::string::String>,
        pub(crate) subnet_id: std::option::Option<std::string::String>,
        pub(crate) gateway_id: std::option::Option<std::string::String>,
        pub(crate) association_state: std::option::Option<crate::model::RouteTableAssociationState>,
    }
    impl Builder {
        /// <p>Indicates whether this is the main route table.</p>
        pub fn main(mut self, input: bool) -> Self {
            self.main = Some(input);
            self
        }
        /// <p>Indicates whether this is the main route table.</p>
        pub fn set_main(mut self, input: std::option::Option<bool>) -> Self {
            self.main = input;
            self
        }
        /// <p>The ID of the association.</p>
        pub fn route_table_association_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.route_table_association_id = Some(input.into());
            self
        }
        /// <p>The ID of the association.</p>
        pub fn set_route_table_association_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.route_table_association_id = input;
            self
        }
        /// <p>The ID of the route table.</p>
        pub fn route_table_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.route_table_id = Some(input.into());
            self
        }
        /// <p>The ID of the route table.</p>
        pub fn set_route_table_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.route_table_id = input;
            self
        }
        /// <p>The ID of the subnet. A subnet ID is not returned for an implicit association.</p>
        pub fn subnet_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.subnet_id = Some(input.into());
            self
        }
        /// <p>The ID of the subnet. A subnet ID is not returned for an implicit association.</p>
        pub fn set_subnet_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.subnet_id = input;
            self
        }
        /// <p>The ID of the internet gateway or virtual private gateway.</p>
        pub fn gateway_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.gateway_id = Some(input.into());
            self
        }
        /// <p>The ID of the internet gateway or virtual private gateway.</p>
        pub fn set_gateway_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.gateway_id = input;
            self
        }
        /// <p>The state of the association.</p>
        pub fn association_state(
            mut self,
            input: crate::model::RouteTableAssociationState,
        ) -> Self {
            self.association_state = Some(input);
            self
        }
        /// <p>The state of the association.</p>
        pub fn set_association_state(
            mut self,
            input: std::option::Option<crate::model::RouteTableAssociationState>,
        ) -> Self {
            self.association_state = input;
            self
        }
        /// Consumes the builder and constructs a [`RouteTableAssociation`](crate::model::RouteTableAssociation).
        pub fn build(self) -> crate::model::RouteTableAssociation {
            crate::model::RouteTableAssociation {
                main: self.main,
                route_table_association_id: self.route_table_association_id,
                route_table_id: self.route_table_id,
                subnet_id: self.subnet_id,
                gateway_id: self.gateway_id,
                association_state: self.association_state,
            }
        }
    }
}
impl RouteTableAssociation {
    /// Creates a new builder-style object to manufacture [`RouteTableAssociation`](crate::model::RouteTableAssociation).
    pub fn builder() -> crate::model::route_table_association::Builder {
        crate::model::route_table_association::Builder::default()
    }
}

/// <p>Describes a Reserved Instance offering.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ReservedInstancesOffering {
    /// <p>The Availability Zone in which the Reserved Instance can be used.</p>
    #[doc(hidden)]
    pub availability_zone: std::option::Option<std::string::String>,
    /// <p>The duration of the Reserved Instance, in seconds.</p>
    #[doc(hidden)]
    pub duration: std::option::Option<i64>,
    /// <p>The purchase price of the Reserved Instance.</p>
    #[doc(hidden)]
    pub fixed_price: std::option::Option<f32>,
    /// <p>The instance type on which the Reserved Instance can be used.</p>
    #[doc(hidden)]
    pub instance_type: std::option::Option<crate::model::InstanceType>,
    /// <p>The Reserved Instance product platform description.</p>
    #[doc(hidden)]
    pub product_description: std::option::Option<crate::model::RiProductDescription>,
    /// <p>The ID of the Reserved Instance offering. This is the offering ID used in <code>GetReservedInstancesExchangeQuote</code> to confirm that an exchange can be made.</p>
    #[doc(hidden)]
    pub reserved_instances_offering_id: std::option::Option<std::string::String>,
    /// <p>The usage price of the Reserved Instance, per hour.</p>
    #[doc(hidden)]
    pub usage_price: std::option::Option<f32>,
    /// <p>The currency of the Reserved Instance offering you are purchasing. It's specified using ISO 4217 standard currency codes. At this time, the only supported currency is <code>USD</code>.</p>
    #[doc(hidden)]
    pub currency_code: std::option::Option<crate::model::CurrencyCodeValues>,
    /// <p>The tenancy of the instance.</p>
    #[doc(hidden)]
    pub instance_tenancy: std::option::Option<crate::model::Tenancy>,
    /// <p>Indicates whether the offering is available through the Reserved Instance Marketplace (resale) or Amazon Web Services. If it's a Reserved Instance Marketplace offering, this is <code>true</code>.</p>
    #[doc(hidden)]
    pub marketplace: std::option::Option<bool>,
    /// <p>If <code>convertible</code> it can be exchanged for Reserved Instances of the same or higher monetary value, with different configurations. If <code>standard</code>, it is not possible to perform an exchange.</p>
    #[doc(hidden)]
    pub offering_class: std::option::Option<crate::model::OfferingClassType>,
    /// <p>The Reserved Instance offering type.</p>
    #[doc(hidden)]
    pub offering_type: std::option::Option<crate::model::OfferingTypeValues>,
    /// <p>The pricing details of the Reserved Instance offering.</p>
    #[doc(hidden)]
    pub pricing_details: std::option::Option<std::vec::Vec<crate::model::PricingDetail>>,
    /// <p>The recurring charge tag assigned to the resource.</p>
    #[doc(hidden)]
    pub recurring_charges: std::option::Option<std::vec::Vec<crate::model::RecurringCharge>>,
    /// <p>Whether the Reserved Instance is applied to instances in a Region or an Availability Zone.</p>
    #[doc(hidden)]
    pub scope: std::option::Option<crate::model::Scope>,
}
impl ReservedInstancesOffering {
    /// <p>The Availability Zone in which the Reserved Instance can be used.</p>
    pub fn availability_zone(&self) -> std::option::Option<&str> {
        self.availability_zone.as_deref()
    }
    /// <p>The duration of the Reserved Instance, in seconds.</p>
    pub fn duration(&self) -> std::option::Option<i64> {
        self.duration
    }
    /// <p>The purchase price of the Reserved Instance.</p>
    pub fn fixed_price(&self) -> std::option::Option<f32> {
        self.fixed_price
    }
    /// <p>The instance type on which the Reserved Instance can be used.</p>
    pub fn instance_type(&self) -> std::option::Option<&crate::model::InstanceType> {
        self.instance_type.as_ref()
    }
    /// <p>The Reserved Instance product platform description.</p>
    pub fn product_description(&self) -> std::option::Option<&crate::model::RiProductDescription> {
        self.product_description.as_ref()
    }
    /// <p>The ID of the Reserved Instance offering. This is the offering ID used in <code>GetReservedInstancesExchangeQuote</code> to confirm that an exchange can be made.</p>
    pub fn reserved_instances_offering_id(&self) -> std::option::Option<&str> {
        self.reserved_instances_offering_id.as_deref()
    }
    /// <p>The usage price of the Reserved Instance, per hour.</p>
    pub fn usage_price(&self) -> std::option::Option<f32> {
        self.usage_price
    }
    /// <p>The currency of the Reserved Instance offering you are purchasing. It's specified using ISO 4217 standard currency codes. At this time, the only supported currency is <code>USD</code>.</p>
    pub fn currency_code(&self) -> std::option::Option<&crate::model::CurrencyCodeValues> {
        self.currency_code.as_ref()
    }
    /// <p>The tenancy of the instance.</p>
    pub fn instance_tenancy(&self) -> std::option::Option<&crate::model::Tenancy> {
        self.instance_tenancy.as_ref()
    }
    /// <p>Indicates whether the offering is available through the Reserved Instance Marketplace (resale) or Amazon Web Services. If it's a Reserved Instance Marketplace offering, this is <code>true</code>.</p>
    pub fn marketplace(&self) -> std::option::Option<bool> {
        self.marketplace
    }
    /// <p>If <code>convertible</code> it can be exchanged for Reserved Instances of the same or higher monetary value, with different configurations. If <code>standard</code>, it is not possible to perform an exchange.</p>
    pub fn offering_class(&self) -> std::option::Option<&crate::model::OfferingClassType> {
        self.offering_class.as_ref()
    }
    /// <p>The Reserved Instance offering type.</p>
    pub fn offering_type(&self) -> std::option::Option<&crate::model::OfferingTypeValues> {
        self.offering_type.as_ref()
    }
    /// <p>The pricing details of the Reserved Instance offering.</p>
    pub fn pricing_details(&self) -> std::option::Option<&[crate::model::PricingDetail]> {
        self.pricing_details.as_deref()
    }
    /// <p>The recurring charge tag assigned to the resource.</p>
    pub fn recurring_charges(&self) -> std::option::Option<&[crate::model::RecurringCharge]> {
        self.recurring_charges.as_deref()
    }
    /// <p>Whether the Reserved Instance is applied to instances in a Region or an Availability Zone.</p>
    pub fn scope(&self) -> std::option::Option<&crate::model::Scope> {
        self.scope.as_ref()
    }
}
/// See [`ReservedInstancesOffering`](crate::model::ReservedInstancesOffering).
pub mod reserved_instances_offering {

    /// A builder for [`ReservedInstancesOffering`](crate::model::ReservedInstancesOffering).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) availability_zone: std::option::Option<std::string::String>,
        pub(crate) duration: std::option::Option<i64>,
        pub(crate) fixed_price: std::option::Option<f32>,
        pub(crate) instance_type: std::option::Option<crate::model::InstanceType>,
        pub(crate) product_description: std::option::Option<crate::model::RiProductDescription>,
        pub(crate) reserved_instances_offering_id: std::option::Option<std::string::String>,
        pub(crate) usage_price: std::option::Option<f32>,
        pub(crate) currency_code: std::option::Option<crate::model::CurrencyCodeValues>,
        pub(crate) instance_tenancy: std::option::Option<crate::model::Tenancy>,
        pub(crate) marketplace: std::option::Option<bool>,
        pub(crate) offering_class: std::option::Option<crate::model::OfferingClassType>,
        pub(crate) offering_type: std::option::Option<crate::model::OfferingTypeValues>,
        pub(crate) pricing_details: std::option::Option<std::vec::Vec<crate::model::PricingDetail>>,
        pub(crate) recurring_charges:
            std::option::Option<std::vec::Vec<crate::model::RecurringCharge>>,
        pub(crate) scope: std::option::Option<crate::model::Scope>,
    }
    impl Builder {
        /// <p>The Availability Zone in which the Reserved Instance can be used.</p>
        pub fn availability_zone(mut self, input: impl Into<std::string::String>) -> Self {
            self.availability_zone = Some(input.into());
            self
        }
        /// <p>The Availability Zone in which the Reserved Instance can be used.</p>
        pub fn set_availability_zone(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.availability_zone = input;
            self
        }
        /// <p>The duration of the Reserved Instance, in seconds.</p>
        pub fn duration(mut self, input: i64) -> Self {
            self.duration = Some(input);
            self
        }
        /// <p>The duration of the Reserved Instance, in seconds.</p>
        pub fn set_duration(mut self, input: std::option::Option<i64>) -> Self {
            self.duration = input;
            self
        }
        /// <p>The purchase price of the Reserved Instance.</p>
        pub fn fixed_price(mut self, input: f32) -> Self {
            self.fixed_price = Some(input);
            self
        }
        /// <p>The purchase price of the Reserved Instance.</p>
        pub fn set_fixed_price(mut self, input: std::option::Option<f32>) -> Self {
            self.fixed_price = input;
            self
        }
        /// <p>The instance type on which the Reserved Instance can be used.</p>
        pub fn instance_type(mut self, input: crate::model::InstanceType) -> Self {
            self.instance_type = Some(input);
            self
        }
        /// <p>The instance type on which the Reserved Instance can be used.</p>
        pub fn set_instance_type(
            mut self,
            input: std::option::Option<crate::model::InstanceType>,
        ) -> Self {
            self.instance_type = input;
            self
        }
        /// <p>The Reserved Instance product platform description.</p>
        pub fn product_description(mut self, input: crate::model::RiProductDescription) -> Self {
            self.product_description = Some(input);
            self
        }
        /// <p>The Reserved Instance product platform description.</p>
        pub fn set_product_description(
            mut self,
            input: std::option::Option<crate::model::RiProductDescription>,
        ) -> Self {
            self.product_description = input;
            self
        }
        /// <p>The ID of the Reserved Instance offering. This is the offering ID used in <code>GetReservedInstancesExchangeQuote</code> to confirm that an exchange can be made.</p>
        pub fn reserved_instances_offering_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.reserved_instances_offering_id = Some(input.into());
            self
        }
        /// <p>The ID of the Reserved Instance offering. This is the offering ID used in <code>GetReservedInstancesExchangeQuote</code> to confirm that an exchange can be made.</p>
        pub fn set_reserved_instances_offering_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.reserved_instances_offering_id = input;
            self
        }
        /// <p>The usage price of the Reserved Instance, per hour.</p>
        pub fn usage_price(mut self, input: f32) -> Self {
            self.usage_price = Some(input);
            self
        }
        /// <p>The usage price of the Reserved Instance, per hour.</p>
        pub fn set_usage_price(mut self, input: std::option::Option<f32>) -> Self {
            self.usage_price = input;
            self
        }
        /// <p>The currency of the Reserved Instance offering you are purchasing. It's specified using ISO 4217 standard currency codes. At this time, the only supported currency is <code>USD</code>.</p>
        pub fn currency_code(mut self, input: crate::model::CurrencyCodeValues) -> Self {
            self.currency_code = Some(input);
            self
        }
        /// <p>The currency of the Reserved Instance offering you are purchasing. It's specified using ISO 4217 standard currency codes. At this time, the only supported currency is <code>USD</code>.</p>
        pub fn set_currency_code(
            mut self,
            input: std::option::Option<crate::model::CurrencyCodeValues>,
        ) -> Self {
            self.currency_code = input;
            self
        }
        /// <p>The tenancy of the instance.</p>
        pub fn instance_tenancy(mut self, input: crate::model::Tenancy) -> Self {
            self.instance_tenancy = Some(input);
            self
        }
        /// <p>The tenancy of the instance.</p>
        pub fn set_instance_tenancy(
            mut self,
            input: std::option::Option<crate::model::Tenancy>,
        ) -> Self {
            self.instance_tenancy = input;
            self
        }
        /// <p>Indicates whether the offering is available through the Reserved Instance Marketplace (resale) or Amazon Web Services. If it's a Reserved Instance Marketplace offering, this is <code>true</code>.</p>
        pub fn marketplace(mut self, input: bool) -> Self {
            self.marketplace = Some(input);
            self
        }
        /// <p>Indicates whether the offering is available through the Reserved Instance Marketplace (resale) or Amazon Web Services. If it's a Reserved Instance Marketplace offering, this is <code>true</code>.</p>
        pub fn set_marketplace(mut self, input: std::option::Option<bool>) -> Self {
            self.marketplace = input;
            self
        }
        /// <p>If <code>convertible</code> it can be exchanged for Reserved Instances of the same or higher monetary value, with different configurations. If <code>standard</code>, it is not possible to perform an exchange.</p>
        pub fn offering_class(mut self, input: crate::model::OfferingClassType) -> Self {
            self.offering_class = Some(input);
            self
        }
        /// <p>If <code>convertible</code> it can be exchanged for Reserved Instances of the same or higher monetary value, with different configurations. If <code>standard</code>, it is not possible to perform an exchange.</p>
        pub fn set_offering_class(
            mut self,
            input: std::option::Option<crate::model::OfferingClassType>,
        ) -> Self {
            self.offering_class = input;
            self
        }
        /// <p>The Reserved Instance offering type.</p>
        pub fn offering_type(mut self, input: crate::model::OfferingTypeValues) -> Self {
            self.offering_type = Some(input);
            self
        }
        /// <p>The Reserved Instance offering type.</p>
        pub fn set_offering_type(
            mut self,
            input: std::option::Option<crate::model::OfferingTypeValues>,
        ) -> Self {
            self.offering_type = input;
            self
        }
        /// Appends an item to `pricing_details`.
        ///
        /// To override the contents of this collection use [`set_pricing_details`](Self::set_pricing_details).
        ///
        /// <p>The pricing details of the Reserved Instance offering.</p>
        pub fn pricing_details(mut self, input: crate::model::PricingDetail) -> Self {
            let mut v = self.pricing_details.unwrap_or_default();
            v.push(input);
            self.pricing_details = Some(v);
            self
        }
        /// <p>The pricing details of the Reserved Instance offering.</p>
        pub fn set_pricing_details(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::PricingDetail>>,
        ) -> Self {
            self.pricing_details = input;
            self
        }
        /// Appends an item to `recurring_charges`.
        ///
        /// To override the contents of this collection use [`set_recurring_charges`](Self::set_recurring_charges).
        ///
        /// <p>The recurring charge tag assigned to the resource.</p>
        pub fn recurring_charges(mut self, input: crate::model::RecurringCharge) -> Self {
            let mut v = self.recurring_charges.unwrap_or_default();
            v.push(input);
            self.recurring_charges = Some(v);
            self
        }
        /// <p>The recurring charge tag assigned to the resource.</p>
        pub fn set_recurring_charges(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::RecurringCharge>>,
        ) -> Self {
            self.recurring_charges = input;
            self
        }
        /// <p>Whether the Reserved Instance is applied to instances in a Region or an Availability Zone.</p>
        pub fn scope(mut self, input: crate::model::Scope) -> Self {
            self.scope = Some(input);
            self
        }
        /// <p>Whether the Reserved Instance is applied to instances in a Region or an Availability Zone.</p>
        pub fn set_scope(mut self, input: std::option::Option<crate::model::Scope>) -> Self {
            self.scope = input;
            self
        }
        /// Consumes the builder and constructs a [`ReservedInstancesOffering`](crate::model::ReservedInstancesOffering).
        pub fn build(self) -> crate::model::ReservedInstancesOffering {
            crate::model::ReservedInstancesOffering {
                availability_zone: self.availability_zone,
                duration: self.duration,
                fixed_price: self.fixed_price,
                instance_type: self.instance_type,
                product_description: self.product_description,
                reserved_instances_offering_id: self.reserved_instances_offering_id,
                usage_price: self.usage_price,
                currency_code: self.currency_code,
                instance_tenancy: self.instance_tenancy,
                marketplace: self.marketplace,
                offering_class: self.offering_class,
                offering_type: self.offering_type,
                pricing_details: self.pricing_details,
                recurring_charges: self.recurring_charges,
                scope: self.scope,
            }
        }
    }
}
impl ReservedInstancesOffering {
    /// Creates a new builder-style object to manufacture [`ReservedInstancesOffering`](crate::model::ReservedInstancesOffering).
    pub fn builder() -> crate::model::reserved_instances_offering::Builder {
        crate::model::reserved_instances_offering::Builder::default()
    }
}

/// <p>Describes a recurring charge.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct RecurringCharge {
    /// <p>The amount of the recurring charge.</p>
    #[doc(hidden)]
    pub amount: std::option::Option<f64>,
    /// <p>The frequency of the recurring charge.</p>
    #[doc(hidden)]
    pub frequency: std::option::Option<crate::model::RecurringChargeFrequency>,
}
impl RecurringCharge {
    /// <p>The amount of the recurring charge.</p>
    pub fn amount(&self) -> std::option::Option<f64> {
        self.amount
    }
    /// <p>The frequency of the recurring charge.</p>
    pub fn frequency(&self) -> std::option::Option<&crate::model::RecurringChargeFrequency> {
        self.frequency.as_ref()
    }
}
/// See [`RecurringCharge`](crate::model::RecurringCharge).
pub mod recurring_charge {

    /// A builder for [`RecurringCharge`](crate::model::RecurringCharge).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) amount: std::option::Option<f64>,
        pub(crate) frequency: std::option::Option<crate::model::RecurringChargeFrequency>,
    }
    impl Builder {
        /// <p>The amount of the recurring charge.</p>
        pub fn amount(mut self, input: f64) -> Self {
            self.amount = Some(input);
            self
        }
        /// <p>The amount of the recurring charge.</p>
        pub fn set_amount(mut self, input: std::option::Option<f64>) -> Self {
            self.amount = input;
            self
        }
        /// <p>The frequency of the recurring charge.</p>
        pub fn frequency(mut self, input: crate::model::RecurringChargeFrequency) -> Self {
            self.frequency = Some(input);
            self
        }
        /// <p>The frequency of the recurring charge.</p>
        pub fn set_frequency(
            mut self,
            input: std::option::Option<crate::model::RecurringChargeFrequency>,
        ) -> Self {
            self.frequency = input;
            self
        }
        /// Consumes the builder and constructs a [`RecurringCharge`](crate::model::RecurringCharge).
        pub fn build(self) -> crate::model::RecurringCharge {
            crate::model::RecurringCharge {
                amount: self.amount,
                frequency: self.frequency,
            }
        }
    }
}
impl RecurringCharge {
    /// Creates a new builder-style object to manufacture [`RecurringCharge`](crate::model::RecurringCharge).
    pub fn builder() -> crate::model::recurring_charge::Builder {
        crate::model::recurring_charge::Builder::default()
    }
}

/// When writing a match expression against `RecurringChargeFrequency`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let recurringchargefrequency = unimplemented!();
/// match recurringchargefrequency {
///     RecurringChargeFrequency::Hourly => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `recurringchargefrequency` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `RecurringChargeFrequency::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `RecurringChargeFrequency::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `RecurringChargeFrequency::NewFeature` is defined.
/// Specifically, when `recurringchargefrequency` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `RecurringChargeFrequency::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 RecurringChargeFrequency {
    #[allow(missing_docs)] // documentation missing in model
    Hourly,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for RecurringChargeFrequency {
    fn from(s: &str) -> Self {
        match s {
            "Hourly" => RecurringChargeFrequency::Hourly,
            other => RecurringChargeFrequency::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for RecurringChargeFrequency {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(RecurringChargeFrequency::from(s))
    }
}
impl RecurringChargeFrequency {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            RecurringChargeFrequency::Hourly => "Hourly",
            RecurringChargeFrequency::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["Hourly"]
    }
}
impl AsRef<str> for RecurringChargeFrequency {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes a Reserved Instance offering.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct PricingDetail {
    /// <p>The number of reservations available for the price.</p>
    #[doc(hidden)]
    pub count: std::option::Option<i32>,
    /// <p>The price per instance.</p>
    #[doc(hidden)]
    pub price: std::option::Option<f64>,
}
impl PricingDetail {
    /// <p>The number of reservations available for the price.</p>
    pub fn count(&self) -> std::option::Option<i32> {
        self.count
    }
    /// <p>The price per instance.</p>
    pub fn price(&self) -> std::option::Option<f64> {
        self.price
    }
}
/// See [`PricingDetail`](crate::model::PricingDetail).
pub mod pricing_detail {

    /// A builder for [`PricingDetail`](crate::model::PricingDetail).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) count: std::option::Option<i32>,
        pub(crate) price: std::option::Option<f64>,
    }
    impl Builder {
        /// <p>The number of reservations available for the price.</p>
        pub fn count(mut self, input: i32) -> Self {
            self.count = Some(input);
            self
        }
        /// <p>The number of reservations available for the price.</p>
        pub fn set_count(mut self, input: std::option::Option<i32>) -> Self {
            self.count = input;
            self
        }
        /// <p>The price per instance.</p>
        pub fn price(mut self, input: f64) -> Self {
            self.price = Some(input);
            self
        }
        /// <p>The price per instance.</p>
        pub fn set_price(mut self, input: std::option::Option<f64>) -> Self {
            self.price = input;
            self
        }
        /// Consumes the builder and constructs a [`PricingDetail`](crate::model::PricingDetail).
        pub fn build(self) -> crate::model::PricingDetail {
            crate::model::PricingDetail {
                count: self.count,
                price: self.price,
            }
        }
    }
}
impl PricingDetail {
    /// Creates a new builder-style object to manufacture [`PricingDetail`](crate::model::PricingDetail).
    pub fn builder() -> crate::model::pricing_detail::Builder {
        crate::model::pricing_detail::Builder::default()
    }
}

/// When writing a match expression against `OfferingTypeValues`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let offeringtypevalues = unimplemented!();
/// match offeringtypevalues {
///     OfferingTypeValues::AllUpfront => { /* ... */ },
///     OfferingTypeValues::HeavyUtilization => { /* ... */ },
///     OfferingTypeValues::LightUtilization => { /* ... */ },
///     OfferingTypeValues::MediumUtilization => { /* ... */ },
///     OfferingTypeValues::NoUpfront => { /* ... */ },
///     OfferingTypeValues::PartialUpfront => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `offeringtypevalues` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `OfferingTypeValues::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `OfferingTypeValues::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `OfferingTypeValues::NewFeature` is defined.
/// Specifically, when `offeringtypevalues` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `OfferingTypeValues::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 OfferingTypeValues {
    #[allow(missing_docs)] // documentation missing in model
    AllUpfront,
    #[allow(missing_docs)] // documentation missing in model
    HeavyUtilization,
    #[allow(missing_docs)] // documentation missing in model
    LightUtilization,
    #[allow(missing_docs)] // documentation missing in model
    MediumUtilization,
    #[allow(missing_docs)] // documentation missing in model
    NoUpfront,
    #[allow(missing_docs)] // documentation missing in model
    PartialUpfront,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for OfferingTypeValues {
    fn from(s: &str) -> Self {
        match s {
            "All Upfront" => OfferingTypeValues::AllUpfront,
            "Heavy Utilization" => OfferingTypeValues::HeavyUtilization,
            "Light Utilization" => OfferingTypeValues::LightUtilization,
            "Medium Utilization" => OfferingTypeValues::MediumUtilization,
            "No Upfront" => OfferingTypeValues::NoUpfront,
            "Partial Upfront" => OfferingTypeValues::PartialUpfront,
            other => {
                OfferingTypeValues::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for OfferingTypeValues {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(OfferingTypeValues::from(s))
    }
}
impl OfferingTypeValues {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            OfferingTypeValues::AllUpfront => "All Upfront",
            OfferingTypeValues::HeavyUtilization => "Heavy Utilization",
            OfferingTypeValues::LightUtilization => "Light Utilization",
            OfferingTypeValues::MediumUtilization => "Medium Utilization",
            OfferingTypeValues::NoUpfront => "No Upfront",
            OfferingTypeValues::PartialUpfront => "Partial Upfront",
            OfferingTypeValues::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &[
            "All Upfront",
            "Heavy Utilization",
            "Light Utilization",
            "Medium Utilization",
            "No Upfront",
            "Partial Upfront",
        ]
    }
}
impl AsRef<str> for OfferingTypeValues {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `OfferingClassType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let offeringclasstype = unimplemented!();
/// match offeringclasstype {
///     OfferingClassType::Convertible => { /* ... */ },
///     OfferingClassType::Standard => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `offeringclasstype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `OfferingClassType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `OfferingClassType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `OfferingClassType::NewFeature` is defined.
/// Specifically, when `offeringclasstype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `OfferingClassType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 OfferingClassType {
    #[allow(missing_docs)] // documentation missing in model
    Convertible,
    #[allow(missing_docs)] // documentation missing in model
    Standard,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for OfferingClassType {
    fn from(s: &str) -> Self {
        match s {
            "convertible" => OfferingClassType::Convertible,
            "standard" => OfferingClassType::Standard,
            other => {
                OfferingClassType::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for OfferingClassType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(OfferingClassType::from(s))
    }
}
impl OfferingClassType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            OfferingClassType::Convertible => "convertible",
            OfferingClassType::Standard => "standard",
            OfferingClassType::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["convertible", "standard"]
    }
}
impl AsRef<str> for OfferingClassType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes a Reserved Instance modification.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ReservedInstancesModification {
    /// <p>A unique, case-sensitive key supplied by the client to ensure that the request is idempotent. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring Idempotency</a>.</p>
    #[doc(hidden)]
    pub client_token: std::option::Option<std::string::String>,
    /// <p>The time when the modification request was created.</p>
    #[doc(hidden)]
    pub create_date: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The time for the modification to become effective.</p>
    #[doc(hidden)]
    pub effective_date: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>Contains target configurations along with their corresponding new Reserved Instance IDs.</p>
    #[doc(hidden)]
    pub modification_results:
        std::option::Option<std::vec::Vec<crate::model::ReservedInstancesModificationResult>>,
    /// <p>The IDs of one or more Reserved Instances.</p>
    #[doc(hidden)]
    pub reserved_instances_ids:
        std::option::Option<std::vec::Vec<crate::model::ReservedInstancesId>>,
    /// <p>A unique ID for the Reserved Instance modification.</p>
    #[doc(hidden)]
    pub reserved_instances_modification_id: std::option::Option<std::string::String>,
    /// <p>The status of the Reserved Instances modification request.</p>
    #[doc(hidden)]
    pub status: std::option::Option<std::string::String>,
    /// <p>The reason for the status.</p>
    #[doc(hidden)]
    pub status_message: std::option::Option<std::string::String>,
    /// <p>The time when the modification request was last updated.</p>
    #[doc(hidden)]
    pub update_date: std::option::Option<aws_smithy_types::DateTime>,
}
impl ReservedInstancesModification {
    /// <p>A unique, case-sensitive key supplied by the client to ensure that the request is idempotent. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring Idempotency</a>.</p>
    pub fn client_token(&self) -> std::option::Option<&str> {
        self.client_token.as_deref()
    }
    /// <p>The time when the modification request was created.</p>
    pub fn create_date(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.create_date.as_ref()
    }
    /// <p>The time for the modification to become effective.</p>
    pub fn effective_date(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.effective_date.as_ref()
    }
    /// <p>Contains target configurations along with their corresponding new Reserved Instance IDs.</p>
    pub fn modification_results(
        &self,
    ) -> std::option::Option<&[crate::model::ReservedInstancesModificationResult]> {
        self.modification_results.as_deref()
    }
    /// <p>The IDs of one or more Reserved Instances.</p>
    pub fn reserved_instances_ids(
        &self,
    ) -> std::option::Option<&[crate::model::ReservedInstancesId]> {
        self.reserved_instances_ids.as_deref()
    }
    /// <p>A unique ID for the Reserved Instance modification.</p>
    pub fn reserved_instances_modification_id(&self) -> std::option::Option<&str> {
        self.reserved_instances_modification_id.as_deref()
    }
    /// <p>The status of the Reserved Instances modification request.</p>
    pub fn status(&self) -> std::option::Option<&str> {
        self.status.as_deref()
    }
    /// <p>The reason for the status.</p>
    pub fn status_message(&self) -> std::option::Option<&str> {
        self.status_message.as_deref()
    }
    /// <p>The time when the modification request was last updated.</p>
    pub fn update_date(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.update_date.as_ref()
    }
}
/// See [`ReservedInstancesModification`](crate::model::ReservedInstancesModification).
pub mod reserved_instances_modification {

    /// A builder for [`ReservedInstancesModification`](crate::model::ReservedInstancesModification).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) client_token: std::option::Option<std::string::String>,
        pub(crate) create_date: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) effective_date: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) modification_results:
            std::option::Option<std::vec::Vec<crate::model::ReservedInstancesModificationResult>>,
        pub(crate) reserved_instances_ids:
            std::option::Option<std::vec::Vec<crate::model::ReservedInstancesId>>,
        pub(crate) reserved_instances_modification_id: std::option::Option<std::string::String>,
        pub(crate) status: std::option::Option<std::string::String>,
        pub(crate) status_message: std::option::Option<std::string::String>,
        pub(crate) update_date: std::option::Option<aws_smithy_types::DateTime>,
    }
    impl Builder {
        /// <p>A unique, case-sensitive key supplied by the client to ensure that the request is idempotent. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring Idempotency</a>.</p>
        pub fn client_token(mut self, input: impl Into<std::string::String>) -> Self {
            self.client_token = Some(input.into());
            self
        }
        /// <p>A unique, case-sensitive key supplied by the client to ensure that the request is idempotent. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring Idempotency</a>.</p>
        pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.client_token = input;
            self
        }
        /// <p>The time when the modification request was created.</p>
        pub fn create_date(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.create_date = Some(input);
            self
        }
        /// <p>The time when the modification request was created.</p>
        pub fn set_create_date(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.create_date = input;
            self
        }
        /// <p>The time for the modification to become effective.</p>
        pub fn effective_date(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.effective_date = Some(input);
            self
        }
        /// <p>The time for the modification to become effective.</p>
        pub fn set_effective_date(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.effective_date = input;
            self
        }
        /// Appends an item to `modification_results`.
        ///
        /// To override the contents of this collection use [`set_modification_results`](Self::set_modification_results).
        ///
        /// <p>Contains target configurations along with their corresponding new Reserved Instance IDs.</p>
        pub fn modification_results(
            mut self,
            input: crate::model::ReservedInstancesModificationResult,
        ) -> Self {
            let mut v = self.modification_results.unwrap_or_default();
            v.push(input);
            self.modification_results = Some(v);
            self
        }
        /// <p>Contains target configurations along with their corresponding new Reserved Instance IDs.</p>
        pub fn set_modification_results(
            mut self,
            input: std::option::Option<
                std::vec::Vec<crate::model::ReservedInstancesModificationResult>,
            >,
        ) -> Self {
            self.modification_results = input;
            self
        }
        /// Appends an item to `reserved_instances_ids`.
        ///
        /// To override the contents of this collection use [`set_reserved_instances_ids`](Self::set_reserved_instances_ids).
        ///
        /// <p>The IDs of one or more Reserved Instances.</p>
        pub fn reserved_instances_ids(mut self, input: crate::model::ReservedInstancesId) -> Self {
            let mut v = self.reserved_instances_ids.unwrap_or_default();
            v.push(input);
            self.reserved_instances_ids = Some(v);
            self
        }
        /// <p>The IDs of one or more Reserved Instances.</p>
        pub fn set_reserved_instances_ids(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::ReservedInstancesId>>,
        ) -> Self {
            self.reserved_instances_ids = input;
            self
        }
        /// <p>A unique ID for the Reserved Instance modification.</p>
        pub fn reserved_instances_modification_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.reserved_instances_modification_id = Some(input.into());
            self
        }
        /// <p>A unique ID for the Reserved Instance modification.</p>
        pub fn set_reserved_instances_modification_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.reserved_instances_modification_id = input;
            self
        }
        /// <p>The status of the Reserved Instances modification request.</p>
        pub fn status(mut self, input: impl Into<std::string::String>) -> Self {
            self.status = Some(input.into());
            self
        }
        /// <p>The status of the Reserved Instances modification request.</p>
        pub fn set_status(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.status = input;
            self
        }
        /// <p>The reason for the status.</p>
        pub fn status_message(mut self, input: impl Into<std::string::String>) -> Self {
            self.status_message = Some(input.into());
            self
        }
        /// <p>The reason for the status.</p>
        pub fn set_status_message(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.status_message = input;
            self
        }
        /// <p>The time when the modification request was last updated.</p>
        pub fn update_date(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.update_date = Some(input);
            self
        }
        /// <p>The time when the modification request was last updated.</p>
        pub fn set_update_date(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.update_date = input;
            self
        }
        /// Consumes the builder and constructs a [`ReservedInstancesModification`](crate::model::ReservedInstancesModification).
        pub fn build(self) -> crate::model::ReservedInstancesModification {
            crate::model::ReservedInstancesModification {
                client_token: self.client_token,
                create_date: self.create_date,
                effective_date: self.effective_date,
                modification_results: self.modification_results,
                reserved_instances_ids: self.reserved_instances_ids,
                reserved_instances_modification_id: self.reserved_instances_modification_id,
                status: self.status,
                status_message: self.status_message,
                update_date: self.update_date,
            }
        }
    }
}
impl ReservedInstancesModification {
    /// Creates a new builder-style object to manufacture [`ReservedInstancesModification`](crate::model::ReservedInstancesModification).
    pub fn builder() -> crate::model::reserved_instances_modification::Builder {
        crate::model::reserved_instances_modification::Builder::default()
    }
}

/// <p>Describes the ID of a Reserved Instance.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ReservedInstancesId {
    /// <p>The ID of the Reserved Instance.</p>
    #[doc(hidden)]
    pub reserved_instances_id: std::option::Option<std::string::String>,
}
impl ReservedInstancesId {
    /// <p>The ID of the Reserved Instance.</p>
    pub fn reserved_instances_id(&self) -> std::option::Option<&str> {
        self.reserved_instances_id.as_deref()
    }
}
/// See [`ReservedInstancesId`](crate::model::ReservedInstancesId).
pub mod reserved_instances_id {

    /// A builder for [`ReservedInstancesId`](crate::model::ReservedInstancesId).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) reserved_instances_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The ID of the Reserved Instance.</p>
        pub fn reserved_instances_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.reserved_instances_id = Some(input.into());
            self
        }
        /// <p>The ID of the Reserved Instance.</p>
        pub fn set_reserved_instances_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.reserved_instances_id = input;
            self
        }
        /// Consumes the builder and constructs a [`ReservedInstancesId`](crate::model::ReservedInstancesId).
        pub fn build(self) -> crate::model::ReservedInstancesId {
            crate::model::ReservedInstancesId {
                reserved_instances_id: self.reserved_instances_id,
            }
        }
    }
}
impl ReservedInstancesId {
    /// Creates a new builder-style object to manufacture [`ReservedInstancesId`](crate::model::ReservedInstancesId).
    pub fn builder() -> crate::model::reserved_instances_id::Builder {
        crate::model::reserved_instances_id::Builder::default()
    }
}

/// <p>Describes the modification request/s.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ReservedInstancesModificationResult {
    /// <p>The ID for the Reserved Instances that were created as part of the modification request. This field is only available when the modification is fulfilled.</p>
    #[doc(hidden)]
    pub reserved_instances_id: std::option::Option<std::string::String>,
    /// <p>The target Reserved Instances configurations supplied as part of the modification request.</p>
    #[doc(hidden)]
    pub target_configuration: std::option::Option<crate::model::ReservedInstancesConfiguration>,
}
impl ReservedInstancesModificationResult {
    /// <p>The ID for the Reserved Instances that were created as part of the modification request. This field is only available when the modification is fulfilled.</p>
    pub fn reserved_instances_id(&self) -> std::option::Option<&str> {
        self.reserved_instances_id.as_deref()
    }
    /// <p>The target Reserved Instances configurations supplied as part of the modification request.</p>
    pub fn target_configuration(
        &self,
    ) -> std::option::Option<&crate::model::ReservedInstancesConfiguration> {
        self.target_configuration.as_ref()
    }
}
/// See [`ReservedInstancesModificationResult`](crate::model::ReservedInstancesModificationResult).
pub mod reserved_instances_modification_result {

    /// A builder for [`ReservedInstancesModificationResult`](crate::model::ReservedInstancesModificationResult).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) reserved_instances_id: std::option::Option<std::string::String>,
        pub(crate) target_configuration:
            std::option::Option<crate::model::ReservedInstancesConfiguration>,
    }
    impl Builder {
        /// <p>The ID for the Reserved Instances that were created as part of the modification request. This field is only available when the modification is fulfilled.</p>
        pub fn reserved_instances_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.reserved_instances_id = Some(input.into());
            self
        }
        /// <p>The ID for the Reserved Instances that were created as part of the modification request. This field is only available when the modification is fulfilled.</p>
        pub fn set_reserved_instances_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.reserved_instances_id = input;
            self
        }
        /// <p>The target Reserved Instances configurations supplied as part of the modification request.</p>
        pub fn target_configuration(
            mut self,
            input: crate::model::ReservedInstancesConfiguration,
        ) -> Self {
            self.target_configuration = Some(input);
            self
        }
        /// <p>The target Reserved Instances configurations supplied as part of the modification request.</p>
        pub fn set_target_configuration(
            mut self,
            input: std::option::Option<crate::model::ReservedInstancesConfiguration>,
        ) -> Self {
            self.target_configuration = input;
            self
        }
        /// Consumes the builder and constructs a [`ReservedInstancesModificationResult`](crate::model::ReservedInstancesModificationResult).
        pub fn build(self) -> crate::model::ReservedInstancesModificationResult {
            crate::model::ReservedInstancesModificationResult {
                reserved_instances_id: self.reserved_instances_id,
                target_configuration: self.target_configuration,
            }
        }
    }
}
impl ReservedInstancesModificationResult {
    /// Creates a new builder-style object to manufacture [`ReservedInstancesModificationResult`](crate::model::ReservedInstancesModificationResult).
    pub fn builder() -> crate::model::reserved_instances_modification_result::Builder {
        crate::model::reserved_instances_modification_result::Builder::default()
    }
}

/// <p>Describes a Reserved Instance listing.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ReservedInstancesListing {
    /// <p>A unique, case-sensitive key supplied by the client to ensure that the request is idempotent. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring Idempotency</a>.</p>
    #[doc(hidden)]
    pub client_token: std::option::Option<std::string::String>,
    /// <p>The time the listing was created.</p>
    #[doc(hidden)]
    pub create_date: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The number of instances in this state.</p>
    #[doc(hidden)]
    pub instance_counts: std::option::Option<std::vec::Vec<crate::model::InstanceCount>>,
    /// <p>The price of the Reserved Instance listing.</p>
    #[doc(hidden)]
    pub price_schedules: std::option::Option<std::vec::Vec<crate::model::PriceSchedule>>,
    /// <p>The ID of the Reserved Instance.</p>
    #[doc(hidden)]
    pub reserved_instances_id: std::option::Option<std::string::String>,
    /// <p>The ID of the Reserved Instance listing.</p>
    #[doc(hidden)]
    pub reserved_instances_listing_id: std::option::Option<std::string::String>,
    /// <p>The status of the Reserved Instance listing.</p>
    #[doc(hidden)]
    pub status: std::option::Option<crate::model::ListingStatus>,
    /// <p>The reason for the current status of the Reserved Instance listing. The response can be blank.</p>
    #[doc(hidden)]
    pub status_message: std::option::Option<std::string::String>,
    /// <p>Any tags assigned to the resource.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    /// <p>The last modified timestamp of the listing.</p>
    #[doc(hidden)]
    pub update_date: std::option::Option<aws_smithy_types::DateTime>,
}
impl ReservedInstancesListing {
    /// <p>A unique, case-sensitive key supplied by the client to ensure that the request is idempotent. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring Idempotency</a>.</p>
    pub fn client_token(&self) -> std::option::Option<&str> {
        self.client_token.as_deref()
    }
    /// <p>The time the listing was created.</p>
    pub fn create_date(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.create_date.as_ref()
    }
    /// <p>The number of instances in this state.</p>
    pub fn instance_counts(&self) -> std::option::Option<&[crate::model::InstanceCount]> {
        self.instance_counts.as_deref()
    }
    /// <p>The price of the Reserved Instance listing.</p>
    pub fn price_schedules(&self) -> std::option::Option<&[crate::model::PriceSchedule]> {
        self.price_schedules.as_deref()
    }
    /// <p>The ID of the Reserved Instance.</p>
    pub fn reserved_instances_id(&self) -> std::option::Option<&str> {
        self.reserved_instances_id.as_deref()
    }
    /// <p>The ID of the Reserved Instance listing.</p>
    pub fn reserved_instances_listing_id(&self) -> std::option::Option<&str> {
        self.reserved_instances_listing_id.as_deref()
    }
    /// <p>The status of the Reserved Instance listing.</p>
    pub fn status(&self) -> std::option::Option<&crate::model::ListingStatus> {
        self.status.as_ref()
    }
    /// <p>The reason for the current status of the Reserved Instance listing. The response can be blank.</p>
    pub fn status_message(&self) -> std::option::Option<&str> {
        self.status_message.as_deref()
    }
    /// <p>Any tags assigned to the resource.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
    /// <p>The last modified timestamp of the listing.</p>
    pub fn update_date(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.update_date.as_ref()
    }
}
/// See [`ReservedInstancesListing`](crate::model::ReservedInstancesListing).
pub mod reserved_instances_listing {

    /// A builder for [`ReservedInstancesListing`](crate::model::ReservedInstancesListing).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) client_token: std::option::Option<std::string::String>,
        pub(crate) create_date: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) instance_counts: std::option::Option<std::vec::Vec<crate::model::InstanceCount>>,
        pub(crate) price_schedules: std::option::Option<std::vec::Vec<crate::model::PriceSchedule>>,
        pub(crate) reserved_instances_id: std::option::Option<std::string::String>,
        pub(crate) reserved_instances_listing_id: std::option::Option<std::string::String>,
        pub(crate) status: std::option::Option<crate::model::ListingStatus>,
        pub(crate) status_message: std::option::Option<std::string::String>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        pub(crate) update_date: std::option::Option<aws_smithy_types::DateTime>,
    }
    impl Builder {
        /// <p>A unique, case-sensitive key supplied by the client to ensure that the request is idempotent. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring Idempotency</a>.</p>
        pub fn client_token(mut self, input: impl Into<std::string::String>) -> Self {
            self.client_token = Some(input.into());
            self
        }
        /// <p>A unique, case-sensitive key supplied by the client to ensure that the request is idempotent. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring Idempotency</a>.</p>
        pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.client_token = input;
            self
        }
        /// <p>The time the listing was created.</p>
        pub fn create_date(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.create_date = Some(input);
            self
        }
        /// <p>The time the listing was created.</p>
        pub fn set_create_date(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.create_date = input;
            self
        }
        /// Appends an item to `instance_counts`.
        ///
        /// To override the contents of this collection use [`set_instance_counts`](Self::set_instance_counts).
        ///
        /// <p>The number of instances in this state.</p>
        pub fn instance_counts(mut self, input: crate::model::InstanceCount) -> Self {
            let mut v = self.instance_counts.unwrap_or_default();
            v.push(input);
            self.instance_counts = Some(v);
            self
        }
        /// <p>The number of instances in this state.</p>
        pub fn set_instance_counts(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::InstanceCount>>,
        ) -> Self {
            self.instance_counts = input;
            self
        }
        /// Appends an item to `price_schedules`.
        ///
        /// To override the contents of this collection use [`set_price_schedules`](Self::set_price_schedules).
        ///
        /// <p>The price of the Reserved Instance listing.</p>
        pub fn price_schedules(mut self, input: crate::model::PriceSchedule) -> Self {
            let mut v = self.price_schedules.unwrap_or_default();
            v.push(input);
            self.price_schedules = Some(v);
            self
        }
        /// <p>The price of the Reserved Instance listing.</p>
        pub fn set_price_schedules(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::PriceSchedule>>,
        ) -> Self {
            self.price_schedules = input;
            self
        }
        /// <p>The ID of the Reserved Instance.</p>
        pub fn reserved_instances_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.reserved_instances_id = Some(input.into());
            self
        }
        /// <p>The ID of the Reserved Instance.</p>
        pub fn set_reserved_instances_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.reserved_instances_id = input;
            self
        }
        /// <p>The ID of the Reserved Instance listing.</p>
        pub fn reserved_instances_listing_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.reserved_instances_listing_id = Some(input.into());
            self
        }
        /// <p>The ID of the Reserved Instance listing.</p>
        pub fn set_reserved_instances_listing_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.reserved_instances_listing_id = input;
            self
        }
        /// <p>The status of the Reserved Instance listing.</p>
        pub fn status(mut self, input: crate::model::ListingStatus) -> Self {
            self.status = Some(input);
            self
        }
        /// <p>The status of the Reserved Instance listing.</p>
        pub fn set_status(
            mut self,
            input: std::option::Option<crate::model::ListingStatus>,
        ) -> Self {
            self.status = input;
            self
        }
        /// <p>The reason for the current status of the Reserved Instance listing. The response can be blank.</p>
        pub fn status_message(mut self, input: impl Into<std::string::String>) -> Self {
            self.status_message = Some(input.into());
            self
        }
        /// <p>The reason for the current status of the Reserved Instance listing. The response can be blank.</p>
        pub fn set_status_message(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.status_message = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>Any tags assigned to the resource.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>Any tags assigned to the resource.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// <p>The last modified timestamp of the listing.</p>
        pub fn update_date(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.update_date = Some(input);
            self
        }
        /// <p>The last modified timestamp of the listing.</p>
        pub fn set_update_date(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.update_date = input;
            self
        }
        /// Consumes the builder and constructs a [`ReservedInstancesListing`](crate::model::ReservedInstancesListing).
        pub fn build(self) -> crate::model::ReservedInstancesListing {
            crate::model::ReservedInstancesListing {
                client_token: self.client_token,
                create_date: self.create_date,
                instance_counts: self.instance_counts,
                price_schedules: self.price_schedules,
                reserved_instances_id: self.reserved_instances_id,
                reserved_instances_listing_id: self.reserved_instances_listing_id,
                status: self.status,
                status_message: self.status_message,
                tags: self.tags,
                update_date: self.update_date,
            }
        }
    }
}
impl ReservedInstancesListing {
    /// Creates a new builder-style object to manufacture [`ReservedInstancesListing`](crate::model::ReservedInstancesListing).
    pub fn builder() -> crate::model::reserved_instances_listing::Builder {
        crate::model::reserved_instances_listing::Builder::default()
    }
}

/// When writing a match expression against `ListingStatus`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let listingstatus = unimplemented!();
/// match listingstatus {
///     ListingStatus::Active => { /* ... */ },
///     ListingStatus::Cancelled => { /* ... */ },
///     ListingStatus::Closed => { /* ... */ },
///     ListingStatus::Pending => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `listingstatus` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `ListingStatus::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `ListingStatus::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `ListingStatus::NewFeature` is defined.
/// Specifically, when `listingstatus` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `ListingStatus::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 ListingStatus {
    #[allow(missing_docs)] // documentation missing in model
    Active,
    #[allow(missing_docs)] // documentation missing in model
    Cancelled,
    #[allow(missing_docs)] // documentation missing in model
    Closed,
    #[allow(missing_docs)] // documentation missing in model
    Pending,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for ListingStatus {
    fn from(s: &str) -> Self {
        match s {
            "active" => ListingStatus::Active,
            "cancelled" => ListingStatus::Cancelled,
            "closed" => ListingStatus::Closed,
            "pending" => ListingStatus::Pending,
            other => ListingStatus::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for ListingStatus {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(ListingStatus::from(s))
    }
}
impl ListingStatus {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            ListingStatus::Active => "active",
            ListingStatus::Cancelled => "cancelled",
            ListingStatus::Closed => "closed",
            ListingStatus::Pending => "pending",
            ListingStatus::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["active", "cancelled", "closed", "pending"]
    }
}
impl AsRef<str> for ListingStatus {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes the price for a Reserved Instance.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct PriceSchedule {
    /// <p>The current price schedule, as determined by the term remaining for the Reserved Instance in the listing.</p>
    /// <p>A specific price schedule is always in effect, but only one price schedule can be active at any time. Take, for example, a Reserved Instance listing that has five months remaining in its term. When you specify price schedules for five months and two months, this means that schedule 1, covering the first three months of the remaining term, will be active during months 5, 4, and 3. Then schedule 2, covering the last two months of the term, will be active for months 2 and 1.</p>
    #[doc(hidden)]
    pub active: std::option::Option<bool>,
    /// <p>The currency for transacting the Reserved Instance resale. At this time, the only supported currency is <code>USD</code>.</p>
    #[doc(hidden)]
    pub currency_code: std::option::Option<crate::model::CurrencyCodeValues>,
    /// <p>The fixed price for the term.</p>
    #[doc(hidden)]
    pub price: std::option::Option<f64>,
    /// <p>The number of months remaining in the reservation. For example, 2 is the second to the last month before the capacity reservation expires.</p>
    #[doc(hidden)]
    pub term: std::option::Option<i64>,
}
impl PriceSchedule {
    /// <p>The current price schedule, as determined by the term remaining for the Reserved Instance in the listing.</p>
    /// <p>A specific price schedule is always in effect, but only one price schedule can be active at any time. Take, for example, a Reserved Instance listing that has five months remaining in its term. When you specify price schedules for five months and two months, this means that schedule 1, covering the first three months of the remaining term, will be active during months 5, 4, and 3. Then schedule 2, covering the last two months of the term, will be active for months 2 and 1.</p>
    pub fn active(&self) -> std::option::Option<bool> {
        self.active
    }
    /// <p>The currency for transacting the Reserved Instance resale. At this time, the only supported currency is <code>USD</code>.</p>
    pub fn currency_code(&self) -> std::option::Option<&crate::model::CurrencyCodeValues> {
        self.currency_code.as_ref()
    }
    /// <p>The fixed price for the term.</p>
    pub fn price(&self) -> std::option::Option<f64> {
        self.price
    }
    /// <p>The number of months remaining in the reservation. For example, 2 is the second to the last month before the capacity reservation expires.</p>
    pub fn term(&self) -> std::option::Option<i64> {
        self.term
    }
}
/// See [`PriceSchedule`](crate::model::PriceSchedule).
pub mod price_schedule {

    /// A builder for [`PriceSchedule`](crate::model::PriceSchedule).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) active: std::option::Option<bool>,
        pub(crate) currency_code: std::option::Option<crate::model::CurrencyCodeValues>,
        pub(crate) price: std::option::Option<f64>,
        pub(crate) term: std::option::Option<i64>,
    }
    impl Builder {
        /// <p>The current price schedule, as determined by the term remaining for the Reserved Instance in the listing.</p>
        /// <p>A specific price schedule is always in effect, but only one price schedule can be active at any time. Take, for example, a Reserved Instance listing that has five months remaining in its term. When you specify price schedules for five months and two months, this means that schedule 1, covering the first three months of the remaining term, will be active during months 5, 4, and 3. Then schedule 2, covering the last two months of the term, will be active for months 2 and 1.</p>
        pub fn active(mut self, input: bool) -> Self {
            self.active = Some(input);
            self
        }
        /// <p>The current price schedule, as determined by the term remaining for the Reserved Instance in the listing.</p>
        /// <p>A specific price schedule is always in effect, but only one price schedule can be active at any time. Take, for example, a Reserved Instance listing that has five months remaining in its term. When you specify price schedules for five months and two months, this means that schedule 1, covering the first three months of the remaining term, will be active during months 5, 4, and 3. Then schedule 2, covering the last two months of the term, will be active for months 2 and 1.</p>
        pub fn set_active(mut self, input: std::option::Option<bool>) -> Self {
            self.active = input;
            self
        }
        /// <p>The currency for transacting the Reserved Instance resale. At this time, the only supported currency is <code>USD</code>.</p>
        pub fn currency_code(mut self, input: crate::model::CurrencyCodeValues) -> Self {
            self.currency_code = Some(input);
            self
        }
        /// <p>The currency for transacting the Reserved Instance resale. At this time, the only supported currency is <code>USD</code>.</p>
        pub fn set_currency_code(
            mut self,
            input: std::option::Option<crate::model::CurrencyCodeValues>,
        ) -> Self {
            self.currency_code = input;
            self
        }
        /// <p>The fixed price for the term.</p>
        pub fn price(mut self, input: f64) -> Self {
            self.price = Some(input);
            self
        }
        /// <p>The fixed price for the term.</p>
        pub fn set_price(mut self, input: std::option::Option<f64>) -> Self {
            self.price = input;
            self
        }
        /// <p>The number of months remaining in the reservation. For example, 2 is the second to the last month before the capacity reservation expires.</p>
        pub fn term(mut self, input: i64) -> Self {
            self.term = Some(input);
            self
        }
        /// <p>The number of months remaining in the reservation. For example, 2 is the second to the last month before the capacity reservation expires.</p>
        pub fn set_term(mut self, input: std::option::Option<i64>) -> Self {
            self.term = input;
            self
        }
        /// Consumes the builder and constructs a [`PriceSchedule`](crate::model::PriceSchedule).
        pub fn build(self) -> crate::model::PriceSchedule {
            crate::model::PriceSchedule {
                active: self.active,
                currency_code: self.currency_code,
                price: self.price,
                term: self.term,
            }
        }
    }
}
impl PriceSchedule {
    /// Creates a new builder-style object to manufacture [`PriceSchedule`](crate::model::PriceSchedule).
    pub fn builder() -> crate::model::price_schedule::Builder {
        crate::model::price_schedule::Builder::default()
    }
}

/// <p>Describes a Reserved Instance listing state.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InstanceCount {
    /// <p>The number of listed Reserved Instances in the state specified by the <code>state</code>.</p>
    #[doc(hidden)]
    pub instance_count: std::option::Option<i32>,
    /// <p>The states of the listed Reserved Instances.</p>
    #[doc(hidden)]
    pub state: std::option::Option<crate::model::ListingState>,
}
impl InstanceCount {
    /// <p>The number of listed Reserved Instances in the state specified by the <code>state</code>.</p>
    pub fn instance_count(&self) -> std::option::Option<i32> {
        self.instance_count
    }
    /// <p>The states of the listed Reserved Instances.</p>
    pub fn state(&self) -> std::option::Option<&crate::model::ListingState> {
        self.state.as_ref()
    }
}
/// See [`InstanceCount`](crate::model::InstanceCount).
pub mod instance_count {

    /// A builder for [`InstanceCount`](crate::model::InstanceCount).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) instance_count: std::option::Option<i32>,
        pub(crate) state: std::option::Option<crate::model::ListingState>,
    }
    impl Builder {
        /// <p>The number of listed Reserved Instances in the state specified by the <code>state</code>.</p>
        pub fn instance_count(mut self, input: i32) -> Self {
            self.instance_count = Some(input);
            self
        }
        /// <p>The number of listed Reserved Instances in the state specified by the <code>state</code>.</p>
        pub fn set_instance_count(mut self, input: std::option::Option<i32>) -> Self {
            self.instance_count = input;
            self
        }
        /// <p>The states of the listed Reserved Instances.</p>
        pub fn state(mut self, input: crate::model::ListingState) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>The states of the listed Reserved Instances.</p>
        pub fn set_state(mut self, input: std::option::Option<crate::model::ListingState>) -> Self {
            self.state = input;
            self
        }
        /// Consumes the builder and constructs a [`InstanceCount`](crate::model::InstanceCount).
        pub fn build(self) -> crate::model::InstanceCount {
            crate::model::InstanceCount {
                instance_count: self.instance_count,
                state: self.state,
            }
        }
    }
}
impl InstanceCount {
    /// Creates a new builder-style object to manufacture [`InstanceCount`](crate::model::InstanceCount).
    pub fn builder() -> crate::model::instance_count::Builder {
        crate::model::instance_count::Builder::default()
    }
}

/// When writing a match expression against `ListingState`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let listingstate = unimplemented!();
/// match listingstate {
///     ListingState::Available => { /* ... */ },
///     ListingState::Cancelled => { /* ... */ },
///     ListingState::Pending => { /* ... */ },
///     ListingState::Sold => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `listingstate` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `ListingState::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `ListingState::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `ListingState::NewFeature` is defined.
/// Specifically, when `listingstate` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `ListingState::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 ListingState {
    #[allow(missing_docs)] // documentation missing in model
    Available,
    #[allow(missing_docs)] // documentation missing in model
    Cancelled,
    #[allow(missing_docs)] // documentation missing in model
    Pending,
    #[allow(missing_docs)] // documentation missing in model
    Sold,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for ListingState {
    fn from(s: &str) -> Self {
        match s {
            "available" => ListingState::Available,
            "cancelled" => ListingState::Cancelled,
            "pending" => ListingState::Pending,
            "sold" => ListingState::Sold,
            other => ListingState::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for ListingState {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(ListingState::from(s))
    }
}
impl ListingState {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            ListingState::Available => "available",
            ListingState::Cancelled => "cancelled",
            ListingState::Pending => "pending",
            ListingState::Sold => "sold",
            ListingState::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["available", "cancelled", "pending", "sold"]
    }
}
impl AsRef<str> for ListingState {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes a Reserved Instance.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ReservedInstances {
    /// <p>The Availability Zone in which the Reserved Instance can be used.</p>
    #[doc(hidden)]
    pub availability_zone: std::option::Option<std::string::String>,
    /// <p>The duration of the Reserved Instance, in seconds.</p>
    #[doc(hidden)]
    pub duration: std::option::Option<i64>,
    /// <p>The time when the Reserved Instance expires.</p>
    #[doc(hidden)]
    pub end: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The purchase price of the Reserved Instance.</p>
    #[doc(hidden)]
    pub fixed_price: std::option::Option<f32>,
    /// <p>The number of reservations purchased.</p>
    #[doc(hidden)]
    pub instance_count: std::option::Option<i32>,
    /// <p>The instance type on which the Reserved Instance can be used.</p>
    #[doc(hidden)]
    pub instance_type: std::option::Option<crate::model::InstanceType>,
    /// <p>The Reserved Instance product platform description.</p>
    #[doc(hidden)]
    pub product_description: std::option::Option<crate::model::RiProductDescription>,
    /// <p>The ID of the Reserved Instance.</p>
    #[doc(hidden)]
    pub reserved_instances_id: std::option::Option<std::string::String>,
    /// <p>The date and time the Reserved Instance started.</p>
    #[doc(hidden)]
    pub start: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The state of the Reserved Instance purchase.</p>
    #[doc(hidden)]
    pub state: std::option::Option<crate::model::ReservedInstanceState>,
    /// <p>The usage price of the Reserved Instance, per hour.</p>
    #[doc(hidden)]
    pub usage_price: std::option::Option<f32>,
    /// <p>The currency of the Reserved Instance. It's specified using ISO 4217 standard currency codes. At this time, the only supported currency is <code>USD</code>.</p>
    #[doc(hidden)]
    pub currency_code: std::option::Option<crate::model::CurrencyCodeValues>,
    /// <p>The tenancy of the instance.</p>
    #[doc(hidden)]
    pub instance_tenancy: std::option::Option<crate::model::Tenancy>,
    /// <p>The offering class of the Reserved Instance.</p>
    #[doc(hidden)]
    pub offering_class: std::option::Option<crate::model::OfferingClassType>,
    /// <p>The Reserved Instance offering type.</p>
    #[doc(hidden)]
    pub offering_type: std::option::Option<crate::model::OfferingTypeValues>,
    /// <p>The recurring charge tag assigned to the resource.</p>
    #[doc(hidden)]
    pub recurring_charges: std::option::Option<std::vec::Vec<crate::model::RecurringCharge>>,
    /// <p>The scope of the Reserved Instance.</p>
    #[doc(hidden)]
    pub scope: std::option::Option<crate::model::Scope>,
    /// <p>Any tags assigned to the resource.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl ReservedInstances {
    /// <p>The Availability Zone in which the Reserved Instance can be used.</p>
    pub fn availability_zone(&self) -> std::option::Option<&str> {
        self.availability_zone.as_deref()
    }
    /// <p>The duration of the Reserved Instance, in seconds.</p>
    pub fn duration(&self) -> std::option::Option<i64> {
        self.duration
    }
    /// <p>The time when the Reserved Instance expires.</p>
    pub fn end(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.end.as_ref()
    }
    /// <p>The purchase price of the Reserved Instance.</p>
    pub fn fixed_price(&self) -> std::option::Option<f32> {
        self.fixed_price
    }
    /// <p>The number of reservations purchased.</p>
    pub fn instance_count(&self) -> std::option::Option<i32> {
        self.instance_count
    }
    /// <p>The instance type on which the Reserved Instance can be used.</p>
    pub fn instance_type(&self) -> std::option::Option<&crate::model::InstanceType> {
        self.instance_type.as_ref()
    }
    /// <p>The Reserved Instance product platform description.</p>
    pub fn product_description(&self) -> std::option::Option<&crate::model::RiProductDescription> {
        self.product_description.as_ref()
    }
    /// <p>The ID of the Reserved Instance.</p>
    pub fn reserved_instances_id(&self) -> std::option::Option<&str> {
        self.reserved_instances_id.as_deref()
    }
    /// <p>The date and time the Reserved Instance started.</p>
    pub fn start(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.start.as_ref()
    }
    /// <p>The state of the Reserved Instance purchase.</p>
    pub fn state(&self) -> std::option::Option<&crate::model::ReservedInstanceState> {
        self.state.as_ref()
    }
    /// <p>The usage price of the Reserved Instance, per hour.</p>
    pub fn usage_price(&self) -> std::option::Option<f32> {
        self.usage_price
    }
    /// <p>The currency of the Reserved Instance. It's specified using ISO 4217 standard currency codes. At this time, the only supported currency is <code>USD</code>.</p>
    pub fn currency_code(&self) -> std::option::Option<&crate::model::CurrencyCodeValues> {
        self.currency_code.as_ref()
    }
    /// <p>The tenancy of the instance.</p>
    pub fn instance_tenancy(&self) -> std::option::Option<&crate::model::Tenancy> {
        self.instance_tenancy.as_ref()
    }
    /// <p>The offering class of the Reserved Instance.</p>
    pub fn offering_class(&self) -> std::option::Option<&crate::model::OfferingClassType> {
        self.offering_class.as_ref()
    }
    /// <p>The Reserved Instance offering type.</p>
    pub fn offering_type(&self) -> std::option::Option<&crate::model::OfferingTypeValues> {
        self.offering_type.as_ref()
    }
    /// <p>The recurring charge tag assigned to the resource.</p>
    pub fn recurring_charges(&self) -> std::option::Option<&[crate::model::RecurringCharge]> {
        self.recurring_charges.as_deref()
    }
    /// <p>The scope of the Reserved Instance.</p>
    pub fn scope(&self) -> std::option::Option<&crate::model::Scope> {
        self.scope.as_ref()
    }
    /// <p>Any tags assigned to the resource.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
}
/// See [`ReservedInstances`](crate::model::ReservedInstances).
pub mod reserved_instances {

    /// A builder for [`ReservedInstances`](crate::model::ReservedInstances).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) availability_zone: std::option::Option<std::string::String>,
        pub(crate) duration: std::option::Option<i64>,
        pub(crate) end: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) fixed_price: std::option::Option<f32>,
        pub(crate) instance_count: std::option::Option<i32>,
        pub(crate) instance_type: std::option::Option<crate::model::InstanceType>,
        pub(crate) product_description: std::option::Option<crate::model::RiProductDescription>,
        pub(crate) reserved_instances_id: std::option::Option<std::string::String>,
        pub(crate) start: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) state: std::option::Option<crate::model::ReservedInstanceState>,
        pub(crate) usage_price: std::option::Option<f32>,
        pub(crate) currency_code: std::option::Option<crate::model::CurrencyCodeValues>,
        pub(crate) instance_tenancy: std::option::Option<crate::model::Tenancy>,
        pub(crate) offering_class: std::option::Option<crate::model::OfferingClassType>,
        pub(crate) offering_type: std::option::Option<crate::model::OfferingTypeValues>,
        pub(crate) recurring_charges:
            std::option::Option<std::vec::Vec<crate::model::RecurringCharge>>,
        pub(crate) scope: std::option::Option<crate::model::Scope>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    }
    impl Builder {
        /// <p>The Availability Zone in which the Reserved Instance can be used.</p>
        pub fn availability_zone(mut self, input: impl Into<std::string::String>) -> Self {
            self.availability_zone = Some(input.into());
            self
        }
        /// <p>The Availability Zone in which the Reserved Instance can be used.</p>
        pub fn set_availability_zone(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.availability_zone = input;
            self
        }
        /// <p>The duration of the Reserved Instance, in seconds.</p>
        pub fn duration(mut self, input: i64) -> Self {
            self.duration = Some(input);
            self
        }
        /// <p>The duration of the Reserved Instance, in seconds.</p>
        pub fn set_duration(mut self, input: std::option::Option<i64>) -> Self {
            self.duration = input;
            self
        }
        /// <p>The time when the Reserved Instance expires.</p>
        pub fn end(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.end = Some(input);
            self
        }
        /// <p>The time when the Reserved Instance expires.</p>
        pub fn set_end(mut self, input: std::option::Option<aws_smithy_types::DateTime>) -> Self {
            self.end = input;
            self
        }
        /// <p>The purchase price of the Reserved Instance.</p>
        pub fn fixed_price(mut self, input: f32) -> Self {
            self.fixed_price = Some(input);
            self
        }
        /// <p>The purchase price of the Reserved Instance.</p>
        pub fn set_fixed_price(mut self, input: std::option::Option<f32>) -> Self {
            self.fixed_price = input;
            self
        }
        /// <p>The number of reservations purchased.</p>
        pub fn instance_count(mut self, input: i32) -> Self {
            self.instance_count = Some(input);
            self
        }
        /// <p>The number of reservations purchased.</p>
        pub fn set_instance_count(mut self, input: std::option::Option<i32>) -> Self {
            self.instance_count = input;
            self
        }
        /// <p>The instance type on which the Reserved Instance can be used.</p>
        pub fn instance_type(mut self, input: crate::model::InstanceType) -> Self {
            self.instance_type = Some(input);
            self
        }
        /// <p>The instance type on which the Reserved Instance can be used.</p>
        pub fn set_instance_type(
            mut self,
            input: std::option::Option<crate::model::InstanceType>,
        ) -> Self {
            self.instance_type = input;
            self
        }
        /// <p>The Reserved Instance product platform description.</p>
        pub fn product_description(mut self, input: crate::model::RiProductDescription) -> Self {
            self.product_description = Some(input);
            self
        }
        /// <p>The Reserved Instance product platform description.</p>
        pub fn set_product_description(
            mut self,
            input: std::option::Option<crate::model::RiProductDescription>,
        ) -> Self {
            self.product_description = input;
            self
        }
        /// <p>The ID of the Reserved Instance.</p>
        pub fn reserved_instances_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.reserved_instances_id = Some(input.into());
            self
        }
        /// <p>The ID of the Reserved Instance.</p>
        pub fn set_reserved_instances_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.reserved_instances_id = input;
            self
        }
        /// <p>The date and time the Reserved Instance started.</p>
        pub fn start(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.start = Some(input);
            self
        }
        /// <p>The date and time the Reserved Instance started.</p>
        pub fn set_start(mut self, input: std::option::Option<aws_smithy_types::DateTime>) -> Self {
            self.start = input;
            self
        }
        /// <p>The state of the Reserved Instance purchase.</p>
        pub fn state(mut self, input: crate::model::ReservedInstanceState) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>The state of the Reserved Instance purchase.</p>
        pub fn set_state(
            mut self,
            input: std::option::Option<crate::model::ReservedInstanceState>,
        ) -> Self {
            self.state = input;
            self
        }
        /// <p>The usage price of the Reserved Instance, per hour.</p>
        pub fn usage_price(mut self, input: f32) -> Self {
            self.usage_price = Some(input);
            self
        }
        /// <p>The usage price of the Reserved Instance, per hour.</p>
        pub fn set_usage_price(mut self, input: std::option::Option<f32>) -> Self {
            self.usage_price = input;
            self
        }
        /// <p>The currency of the Reserved Instance. It's specified using ISO 4217 standard currency codes. At this time, the only supported currency is <code>USD</code>.</p>
        pub fn currency_code(mut self, input: crate::model::CurrencyCodeValues) -> Self {
            self.currency_code = Some(input);
            self
        }
        /// <p>The currency of the Reserved Instance. It's specified using ISO 4217 standard currency codes. At this time, the only supported currency is <code>USD</code>.</p>
        pub fn set_currency_code(
            mut self,
            input: std::option::Option<crate::model::CurrencyCodeValues>,
        ) -> Self {
            self.currency_code = input;
            self
        }
        /// <p>The tenancy of the instance.</p>
        pub fn instance_tenancy(mut self, input: crate::model::Tenancy) -> Self {
            self.instance_tenancy = Some(input);
            self
        }
        /// <p>The tenancy of the instance.</p>
        pub fn set_instance_tenancy(
            mut self,
            input: std::option::Option<crate::model::Tenancy>,
        ) -> Self {
            self.instance_tenancy = input;
            self
        }
        /// <p>The offering class of the Reserved Instance.</p>
        pub fn offering_class(mut self, input: crate::model::OfferingClassType) -> Self {
            self.offering_class = Some(input);
            self
        }
        /// <p>The offering class of the Reserved Instance.</p>
        pub fn set_offering_class(
            mut self,
            input: std::option::Option<crate::model::OfferingClassType>,
        ) -> Self {
            self.offering_class = input;
            self
        }
        /// <p>The Reserved Instance offering type.</p>
        pub fn offering_type(mut self, input: crate::model::OfferingTypeValues) -> Self {
            self.offering_type = Some(input);
            self
        }
        /// <p>The Reserved Instance offering type.</p>
        pub fn set_offering_type(
            mut self,
            input: std::option::Option<crate::model::OfferingTypeValues>,
        ) -> Self {
            self.offering_type = input;
            self
        }
        /// Appends an item to `recurring_charges`.
        ///
        /// To override the contents of this collection use [`set_recurring_charges`](Self::set_recurring_charges).
        ///
        /// <p>The recurring charge tag assigned to the resource.</p>
        pub fn recurring_charges(mut self, input: crate::model::RecurringCharge) -> Self {
            let mut v = self.recurring_charges.unwrap_or_default();
            v.push(input);
            self.recurring_charges = Some(v);
            self
        }
        /// <p>The recurring charge tag assigned to the resource.</p>
        pub fn set_recurring_charges(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::RecurringCharge>>,
        ) -> Self {
            self.recurring_charges = input;
            self
        }
        /// <p>The scope of the Reserved Instance.</p>
        pub fn scope(mut self, input: crate::model::Scope) -> Self {
            self.scope = Some(input);
            self
        }
        /// <p>The scope of the Reserved Instance.</p>
        pub fn set_scope(mut self, input: std::option::Option<crate::model::Scope>) -> Self {
            self.scope = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>Any tags assigned to the resource.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>Any tags assigned to the resource.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// Consumes the builder and constructs a [`ReservedInstances`](crate::model::ReservedInstances).
        pub fn build(self) -> crate::model::ReservedInstances {
            crate::model::ReservedInstances {
                availability_zone: self.availability_zone,
                duration: self.duration,
                end: self.end,
                fixed_price: self.fixed_price,
                instance_count: self.instance_count,
                instance_type: self.instance_type,
                product_description: self.product_description,
                reserved_instances_id: self.reserved_instances_id,
                start: self.start,
                state: self.state,
                usage_price: self.usage_price,
                currency_code: self.currency_code,
                instance_tenancy: self.instance_tenancy,
                offering_class: self.offering_class,
                offering_type: self.offering_type,
                recurring_charges: self.recurring_charges,
                scope: self.scope,
                tags: self.tags,
            }
        }
    }
}
impl ReservedInstances {
    /// Creates a new builder-style object to manufacture [`ReservedInstances`](crate::model::ReservedInstances).
    pub fn builder() -> crate::model::reserved_instances::Builder {
        crate::model::reserved_instances::Builder::default()
    }
}

/// When writing a match expression against `ReservedInstanceState`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let reservedinstancestate = unimplemented!();
/// match reservedinstancestate {
///     ReservedInstanceState::Active => { /* ... */ },
///     ReservedInstanceState::PaymentFailed => { /* ... */ },
///     ReservedInstanceState::PaymentPending => { /* ... */ },
///     ReservedInstanceState::Queued => { /* ... */ },
///     ReservedInstanceState::QueuedDeleted => { /* ... */ },
///     ReservedInstanceState::Retired => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `reservedinstancestate` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `ReservedInstanceState::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `ReservedInstanceState::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `ReservedInstanceState::NewFeature` is defined.
/// Specifically, when `reservedinstancestate` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `ReservedInstanceState::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 ReservedInstanceState {
    #[allow(missing_docs)] // documentation missing in model
    Active,
    #[allow(missing_docs)] // documentation missing in model
    PaymentFailed,
    #[allow(missing_docs)] // documentation missing in model
    PaymentPending,
    #[allow(missing_docs)] // documentation missing in model
    Queued,
    #[allow(missing_docs)] // documentation missing in model
    QueuedDeleted,
    #[allow(missing_docs)] // documentation missing in model
    Retired,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for ReservedInstanceState {
    fn from(s: &str) -> Self {
        match s {
            "active" => ReservedInstanceState::Active,
            "payment-failed" => ReservedInstanceState::PaymentFailed,
            "payment-pending" => ReservedInstanceState::PaymentPending,
            "queued" => ReservedInstanceState::Queued,
            "queued-deleted" => ReservedInstanceState::QueuedDeleted,
            "retired" => ReservedInstanceState::Retired,
            other => {
                ReservedInstanceState::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for ReservedInstanceState {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(ReservedInstanceState::from(s))
    }
}
impl ReservedInstanceState {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            ReservedInstanceState::Active => "active",
            ReservedInstanceState::PaymentFailed => "payment-failed",
            ReservedInstanceState::PaymentPending => "payment-pending",
            ReservedInstanceState::Queued => "queued",
            ReservedInstanceState::QueuedDeleted => "queued-deleted",
            ReservedInstanceState::Retired => "retired",
            ReservedInstanceState::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &[
            "active",
            "payment-failed",
            "payment-pending",
            "queued",
            "queued-deleted",
            "retired",
        ]
    }
}
impl AsRef<str> for ReservedInstanceState {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Information about a root volume replacement task.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ReplaceRootVolumeTask {
    /// <p>The ID of the root volume replacement task.</p>
    #[doc(hidden)]
    pub replace_root_volume_task_id: std::option::Option<std::string::String>,
    /// <p>The ID of the instance for which the root volume replacement task was created.</p>
    #[doc(hidden)]
    pub instance_id: std::option::Option<std::string::String>,
    /// <p>The state of the task. The task can be in one of the following states:</p>
    /// <ul>
    /// <li> <p> <code>pending</code> - the replacement volume is being created.</p> </li>
    /// <li> <p> <code>in-progress</code> - the original volume is being detached and the replacement volume is being attached.</p> </li>
    /// <li> <p> <code>succeeded</code> - the replacement volume has been successfully attached to the instance and the instance is available.</p> </li>
    /// <li> <p> <code>failing</code> - the replacement task is in the process of failing.</p> </li>
    /// <li> <p> <code>failed</code> - the replacement task has failed but the original root volume is still attached.</p> </li>
    /// <li> <p> <code>failing-detached</code> - the replacement task is in the process of failing. The instance might have no root volume attached.</p> </li>
    /// <li> <p> <code>failed-detached</code> - the replacement task has failed and the instance has no root volume attached.</p> </li>
    /// </ul>
    #[doc(hidden)]
    pub task_state: std::option::Option<crate::model::ReplaceRootVolumeTaskState>,
    /// <p>The time the task was started.</p>
    #[doc(hidden)]
    pub start_time: std::option::Option<std::string::String>,
    /// <p>The time the task completed.</p>
    #[doc(hidden)]
    pub complete_time: std::option::Option<std::string::String>,
    /// <p>The tags assigned to the task.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    /// <p>The ID of the AMI used to create the replacement root volume.</p>
    #[doc(hidden)]
    pub image_id: std::option::Option<std::string::String>,
    /// <p>The ID of the snapshot used to create the replacement root volume.</p>
    #[doc(hidden)]
    pub snapshot_id: std::option::Option<std::string::String>,
    /// <p>Indicates whether the original root volume is to be deleted after the root volume replacement task completes.</p>
    #[doc(hidden)]
    pub delete_replaced_root_volume: std::option::Option<bool>,
}
impl ReplaceRootVolumeTask {
    /// <p>The ID of the root volume replacement task.</p>
    pub fn replace_root_volume_task_id(&self) -> std::option::Option<&str> {
        self.replace_root_volume_task_id.as_deref()
    }
    /// <p>The ID of the instance for which the root volume replacement task was created.</p>
    pub fn instance_id(&self) -> std::option::Option<&str> {
        self.instance_id.as_deref()
    }
    /// <p>The state of the task. The task can be in one of the following states:</p>
    /// <ul>
    /// <li> <p> <code>pending</code> - the replacement volume is being created.</p> </li>
    /// <li> <p> <code>in-progress</code> - the original volume is being detached and the replacement volume is being attached.</p> </li>
    /// <li> <p> <code>succeeded</code> - the replacement volume has been successfully attached to the instance and the instance is available.</p> </li>
    /// <li> <p> <code>failing</code> - the replacement task is in the process of failing.</p> </li>
    /// <li> <p> <code>failed</code> - the replacement task has failed but the original root volume is still attached.</p> </li>
    /// <li> <p> <code>failing-detached</code> - the replacement task is in the process of failing. The instance might have no root volume attached.</p> </li>
    /// <li> <p> <code>failed-detached</code> - the replacement task has failed and the instance has no root volume attached.</p> </li>
    /// </ul>
    pub fn task_state(&self) -> std::option::Option<&crate::model::ReplaceRootVolumeTaskState> {
        self.task_state.as_ref()
    }
    /// <p>The time the task was started.</p>
    pub fn start_time(&self) -> std::option::Option<&str> {
        self.start_time.as_deref()
    }
    /// <p>The time the task completed.</p>
    pub fn complete_time(&self) -> std::option::Option<&str> {
        self.complete_time.as_deref()
    }
    /// <p>The tags assigned to the task.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
    /// <p>The ID of the AMI used to create the replacement root volume.</p>
    pub fn image_id(&self) -> std::option::Option<&str> {
        self.image_id.as_deref()
    }
    /// <p>The ID of the snapshot used to create the replacement root volume.</p>
    pub fn snapshot_id(&self) -> std::option::Option<&str> {
        self.snapshot_id.as_deref()
    }
    /// <p>Indicates whether the original root volume is to be deleted after the root volume replacement task completes.</p>
    pub fn delete_replaced_root_volume(&self) -> std::option::Option<bool> {
        self.delete_replaced_root_volume
    }
}
/// See [`ReplaceRootVolumeTask`](crate::model::ReplaceRootVolumeTask).
pub mod replace_root_volume_task {

    /// A builder for [`ReplaceRootVolumeTask`](crate::model::ReplaceRootVolumeTask).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) replace_root_volume_task_id: std::option::Option<std::string::String>,
        pub(crate) instance_id: std::option::Option<std::string::String>,
        pub(crate) task_state: std::option::Option<crate::model::ReplaceRootVolumeTaskState>,
        pub(crate) start_time: std::option::Option<std::string::String>,
        pub(crate) complete_time: std::option::Option<std::string::String>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        pub(crate) image_id: std::option::Option<std::string::String>,
        pub(crate) snapshot_id: std::option::Option<std::string::String>,
        pub(crate) delete_replaced_root_volume: std::option::Option<bool>,
    }
    impl Builder {
        /// <p>The ID of the root volume replacement task.</p>
        pub fn replace_root_volume_task_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.replace_root_volume_task_id = Some(input.into());
            self
        }
        /// <p>The ID of the root volume replacement task.</p>
        pub fn set_replace_root_volume_task_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.replace_root_volume_task_id = input;
            self
        }
        /// <p>The ID of the instance for which the root volume replacement task was created.</p>
        pub fn instance_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.instance_id = Some(input.into());
            self
        }
        /// <p>The ID of the instance for which the root volume replacement task was created.</p>
        pub fn set_instance_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.instance_id = input;
            self
        }
        /// <p>The state of the task. The task can be in one of the following states:</p>
        /// <ul>
        /// <li> <p> <code>pending</code> - the replacement volume is being created.</p> </li>
        /// <li> <p> <code>in-progress</code> - the original volume is being detached and the replacement volume is being attached.</p> </li>
        /// <li> <p> <code>succeeded</code> - the replacement volume has been successfully attached to the instance and the instance is available.</p> </li>
        /// <li> <p> <code>failing</code> - the replacement task is in the process of failing.</p> </li>
        /// <li> <p> <code>failed</code> - the replacement task has failed but the original root volume is still attached.</p> </li>
        /// <li> <p> <code>failing-detached</code> - the replacement task is in the process of failing. The instance might have no root volume attached.</p> </li>
        /// <li> <p> <code>failed-detached</code> - the replacement task has failed and the instance has no root volume attached.</p> </li>
        /// </ul>
        pub fn task_state(mut self, input: crate::model::ReplaceRootVolumeTaskState) -> Self {
            self.task_state = Some(input);
            self
        }
        /// <p>The state of the task. The task can be in one of the following states:</p>
        /// <ul>
        /// <li> <p> <code>pending</code> - the replacement volume is being created.</p> </li>
        /// <li> <p> <code>in-progress</code> - the original volume is being detached and the replacement volume is being attached.</p> </li>
        /// <li> <p> <code>succeeded</code> - the replacement volume has been successfully attached to the instance and the instance is available.</p> </li>
        /// <li> <p> <code>failing</code> - the replacement task is in the process of failing.</p> </li>
        /// <li> <p> <code>failed</code> - the replacement task has failed but the original root volume is still attached.</p> </li>
        /// <li> <p> <code>failing-detached</code> - the replacement task is in the process of failing. The instance might have no root volume attached.</p> </li>
        /// <li> <p> <code>failed-detached</code> - the replacement task has failed and the instance has no root volume attached.</p> </li>
        /// </ul>
        pub fn set_task_state(
            mut self,
            input: std::option::Option<crate::model::ReplaceRootVolumeTaskState>,
        ) -> Self {
            self.task_state = input;
            self
        }
        /// <p>The time the task was started.</p>
        pub fn start_time(mut self, input: impl Into<std::string::String>) -> Self {
            self.start_time = Some(input.into());
            self
        }
        /// <p>The time the task was started.</p>
        pub fn set_start_time(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.start_time = input;
            self
        }
        /// <p>The time the task completed.</p>
        pub fn complete_time(mut self, input: impl Into<std::string::String>) -> Self {
            self.complete_time = Some(input.into());
            self
        }
        /// <p>The time the task completed.</p>
        pub fn set_complete_time(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.complete_time = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>The tags assigned to the task.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>The tags assigned to the task.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// <p>The ID of the AMI used to create the replacement root volume.</p>
        pub fn image_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.image_id = Some(input.into());
            self
        }
        /// <p>The ID of the AMI used to create the replacement root volume.</p>
        pub fn set_image_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.image_id = input;
            self
        }
        /// <p>The ID of the snapshot used to create the replacement root volume.</p>
        pub fn snapshot_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.snapshot_id = Some(input.into());
            self
        }
        /// <p>The ID of the snapshot used to create the replacement root volume.</p>
        pub fn set_snapshot_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.snapshot_id = input;
            self
        }
        /// <p>Indicates whether the original root volume is to be deleted after the root volume replacement task completes.</p>
        pub fn delete_replaced_root_volume(mut self, input: bool) -> Self {
            self.delete_replaced_root_volume = Some(input);
            self
        }
        /// <p>Indicates whether the original root volume is to be deleted after the root volume replacement task completes.</p>
        pub fn set_delete_replaced_root_volume(mut self, input: std::option::Option<bool>) -> Self {
            self.delete_replaced_root_volume = input;
            self
        }
        /// Consumes the builder and constructs a [`ReplaceRootVolumeTask`](crate::model::ReplaceRootVolumeTask).
        pub fn build(self) -> crate::model::ReplaceRootVolumeTask {
            crate::model::ReplaceRootVolumeTask {
                replace_root_volume_task_id: self.replace_root_volume_task_id,
                instance_id: self.instance_id,
                task_state: self.task_state,
                start_time: self.start_time,
                complete_time: self.complete_time,
                tags: self.tags,
                image_id: self.image_id,
                snapshot_id: self.snapshot_id,
                delete_replaced_root_volume: self.delete_replaced_root_volume,
            }
        }
    }
}
impl ReplaceRootVolumeTask {
    /// Creates a new builder-style object to manufacture [`ReplaceRootVolumeTask`](crate::model::ReplaceRootVolumeTask).
    pub fn builder() -> crate::model::replace_root_volume_task::Builder {
        crate::model::replace_root_volume_task::Builder::default()
    }
}

/// When writing a match expression against `ReplaceRootVolumeTaskState`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let replacerootvolumetaskstate = unimplemented!();
/// match replacerootvolumetaskstate {
///     ReplaceRootVolumeTaskState::Failed => { /* ... */ },
///     ReplaceRootVolumeTaskState::FailedDetached => { /* ... */ },
///     ReplaceRootVolumeTaskState::Failing => { /* ... */ },
///     ReplaceRootVolumeTaskState::InProgress => { /* ... */ },
///     ReplaceRootVolumeTaskState::Pending => { /* ... */ },
///     ReplaceRootVolumeTaskState::Succeeded => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `replacerootvolumetaskstate` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `ReplaceRootVolumeTaskState::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `ReplaceRootVolumeTaskState::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `ReplaceRootVolumeTaskState::NewFeature` is defined.
/// Specifically, when `replacerootvolumetaskstate` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `ReplaceRootVolumeTaskState::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 ReplaceRootVolumeTaskState {
    #[allow(missing_docs)] // documentation missing in model
    Failed,
    #[allow(missing_docs)] // documentation missing in model
    FailedDetached,
    #[allow(missing_docs)] // documentation missing in model
    Failing,
    #[allow(missing_docs)] // documentation missing in model
    InProgress,
    #[allow(missing_docs)] // documentation missing in model
    Pending,
    #[allow(missing_docs)] // documentation missing in model
    Succeeded,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for ReplaceRootVolumeTaskState {
    fn from(s: &str) -> Self {
        match s {
            "failed" => ReplaceRootVolumeTaskState::Failed,
            "failed-detached" => ReplaceRootVolumeTaskState::FailedDetached,
            "failing" => ReplaceRootVolumeTaskState::Failing,
            "in-progress" => ReplaceRootVolumeTaskState::InProgress,
            "pending" => ReplaceRootVolumeTaskState::Pending,
            "succeeded" => ReplaceRootVolumeTaskState::Succeeded,
            other => ReplaceRootVolumeTaskState::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for ReplaceRootVolumeTaskState {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(ReplaceRootVolumeTaskState::from(s))
    }
}
impl ReplaceRootVolumeTaskState {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            ReplaceRootVolumeTaskState::Failed => "failed",
            ReplaceRootVolumeTaskState::FailedDetached => "failed-detached",
            ReplaceRootVolumeTaskState::Failing => "failing",
            ReplaceRootVolumeTaskState::InProgress => "in-progress",
            ReplaceRootVolumeTaskState::Pending => "pending",
            ReplaceRootVolumeTaskState::Succeeded => "succeeded",
            ReplaceRootVolumeTaskState::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &[
            "failed",
            "failed-detached",
            "failing",
            "in-progress",
            "pending",
            "succeeded",
        ]
    }
}
impl AsRef<str> for ReplaceRootVolumeTaskState {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes a Region.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Region {
    /// <p>The Region service endpoint.</p>
    #[doc(hidden)]
    pub endpoint: std::option::Option<std::string::String>,
    /// <p>The name of the Region.</p>
    #[doc(hidden)]
    pub region_name: std::option::Option<std::string::String>,
    /// <p>The Region opt-in status. The possible values are <code>opt-in-not-required</code>, <code>opted-in</code>, and <code>not-opted-in</code>.</p>
    #[doc(hidden)]
    pub opt_in_status: std::option::Option<std::string::String>,
}
impl Region {
    /// <p>The Region service endpoint.</p>
    pub fn endpoint(&self) -> std::option::Option<&str> {
        self.endpoint.as_deref()
    }
    /// <p>The name of the Region.</p>
    pub fn region_name(&self) -> std::option::Option<&str> {
        self.region_name.as_deref()
    }
    /// <p>The Region opt-in status. The possible values are <code>opt-in-not-required</code>, <code>opted-in</code>, and <code>not-opted-in</code>.</p>
    pub fn opt_in_status(&self) -> std::option::Option<&str> {
        self.opt_in_status.as_deref()
    }
}
/// See [`Region`](crate::model::Region).
pub mod region {

    /// A builder for [`Region`](crate::model::Region).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) endpoint: std::option::Option<std::string::String>,
        pub(crate) region_name: std::option::Option<std::string::String>,
        pub(crate) opt_in_status: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The Region service endpoint.</p>
        pub fn endpoint(mut self, input: impl Into<std::string::String>) -> Self {
            self.endpoint = Some(input.into());
            self
        }
        /// <p>The Region service endpoint.</p>
        pub fn set_endpoint(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.endpoint = input;
            self
        }
        /// <p>The name of the Region.</p>
        pub fn region_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.region_name = Some(input.into());
            self
        }
        /// <p>The name of the Region.</p>
        pub fn set_region_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.region_name = input;
            self
        }
        /// <p>The Region opt-in status. The possible values are <code>opt-in-not-required</code>, <code>opted-in</code>, and <code>not-opted-in</code>.</p>
        pub fn opt_in_status(mut self, input: impl Into<std::string::String>) -> Self {
            self.opt_in_status = Some(input.into());
            self
        }
        /// <p>The Region opt-in status. The possible values are <code>opt-in-not-required</code>, <code>opted-in</code>, and <code>not-opted-in</code>.</p>
        pub fn set_opt_in_status(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.opt_in_status = input;
            self
        }
        /// Consumes the builder and constructs a [`Region`](crate::model::Region).
        pub fn build(self) -> crate::model::Region {
            crate::model::Region {
                endpoint: self.endpoint,
                region_name: self.region_name,
                opt_in_status: self.opt_in_status,
            }
        }
    }
}
impl Region {
    /// Creates a new builder-style object to manufacture [`Region`](crate::model::Region).
    pub fn builder() -> crate::model::region::Builder {
        crate::model::region::Builder::default()
    }
}

/// <p>Describes an IPv4 address pool.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct PublicIpv4Pool {
    /// <p>The ID of the address pool.</p>
    #[doc(hidden)]
    pub pool_id: std::option::Option<std::string::String>,
    /// <p>A description of the address pool.</p>
    #[doc(hidden)]
    pub description: std::option::Option<std::string::String>,
    /// <p>The address ranges.</p>
    #[doc(hidden)]
    pub pool_address_ranges: std::option::Option<std::vec::Vec<crate::model::PublicIpv4PoolRange>>,
    /// <p>The total number of addresses.</p>
    #[doc(hidden)]
    pub total_address_count: std::option::Option<i32>,
    /// <p>The total number of available addresses.</p>
    #[doc(hidden)]
    pub total_available_address_count: std::option::Option<i32>,
    /// <p>The name of the location from which the address pool is advertised. A network border group is a unique set of Availability Zones or Local Zones from where Amazon Web Services advertises public IP addresses.</p>
    #[doc(hidden)]
    pub network_border_group: std::option::Option<std::string::String>,
    /// <p>Any tags for the address pool.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl PublicIpv4Pool {
    /// <p>The ID of the address pool.</p>
    pub fn pool_id(&self) -> std::option::Option<&str> {
        self.pool_id.as_deref()
    }
    /// <p>A description of the address pool.</p>
    pub fn description(&self) -> std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The address ranges.</p>
    pub fn pool_address_ranges(&self) -> std::option::Option<&[crate::model::PublicIpv4PoolRange]> {
        self.pool_address_ranges.as_deref()
    }
    /// <p>The total number of addresses.</p>
    pub fn total_address_count(&self) -> std::option::Option<i32> {
        self.total_address_count
    }
    /// <p>The total number of available addresses.</p>
    pub fn total_available_address_count(&self) -> std::option::Option<i32> {
        self.total_available_address_count
    }
    /// <p>The name of the location from which the address pool is advertised. A network border group is a unique set of Availability Zones or Local Zones from where Amazon Web Services advertises public IP addresses.</p>
    pub fn network_border_group(&self) -> std::option::Option<&str> {
        self.network_border_group.as_deref()
    }
    /// <p>Any tags for the address pool.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
}
/// See [`PublicIpv4Pool`](crate::model::PublicIpv4Pool).
pub mod public_ipv4_pool {

    /// A builder for [`PublicIpv4Pool`](crate::model::PublicIpv4Pool).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) pool_id: std::option::Option<std::string::String>,
        pub(crate) description: std::option::Option<std::string::String>,
        pub(crate) pool_address_ranges:
            std::option::Option<std::vec::Vec<crate::model::PublicIpv4PoolRange>>,
        pub(crate) total_address_count: std::option::Option<i32>,
        pub(crate) total_available_address_count: std::option::Option<i32>,
        pub(crate) network_border_group: std::option::Option<std::string::String>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    }
    impl Builder {
        /// <p>The ID of the address pool.</p>
        pub fn pool_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.pool_id = Some(input.into());
            self
        }
        /// <p>The ID of the address pool.</p>
        pub fn set_pool_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.pool_id = input;
            self
        }
        /// <p>A description of the address pool.</p>
        pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
            self.description = Some(input.into());
            self
        }
        /// <p>A description of the address pool.</p>
        pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.description = input;
            self
        }
        /// Appends an item to `pool_address_ranges`.
        ///
        /// To override the contents of this collection use [`set_pool_address_ranges`](Self::set_pool_address_ranges).
        ///
        /// <p>The address ranges.</p>
        pub fn pool_address_ranges(mut self, input: crate::model::PublicIpv4PoolRange) -> Self {
            let mut v = self.pool_address_ranges.unwrap_or_default();
            v.push(input);
            self.pool_address_ranges = Some(v);
            self
        }
        /// <p>The address ranges.</p>
        pub fn set_pool_address_ranges(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::PublicIpv4PoolRange>>,
        ) -> Self {
            self.pool_address_ranges = input;
            self
        }
        /// <p>The total number of addresses.</p>
        pub fn total_address_count(mut self, input: i32) -> Self {
            self.total_address_count = Some(input);
            self
        }
        /// <p>The total number of addresses.</p>
        pub fn set_total_address_count(mut self, input: std::option::Option<i32>) -> Self {
            self.total_address_count = input;
            self
        }
        /// <p>The total number of available addresses.</p>
        pub fn total_available_address_count(mut self, input: i32) -> Self {
            self.total_available_address_count = Some(input);
            self
        }
        /// <p>The total number of available addresses.</p>
        pub fn set_total_available_address_count(
            mut self,
            input: std::option::Option<i32>,
        ) -> Self {
            self.total_available_address_count = input;
            self
        }
        /// <p>The name of the location from which the address pool is advertised. A network border group is a unique set of Availability Zones or Local Zones from where Amazon Web Services advertises public IP addresses.</p>
        pub fn network_border_group(mut self, input: impl Into<std::string::String>) -> Self {
            self.network_border_group = Some(input.into());
            self
        }
        /// <p>The name of the location from which the address pool is advertised. A network border group is a unique set of Availability Zones or Local Zones from where Amazon Web Services advertises public IP addresses.</p>
        pub fn set_network_border_group(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.network_border_group = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>Any tags for the address pool.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>Any tags for the address pool.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// Consumes the builder and constructs a [`PublicIpv4Pool`](crate::model::PublicIpv4Pool).
        pub fn build(self) -> crate::model::PublicIpv4Pool {
            crate::model::PublicIpv4Pool {
                pool_id: self.pool_id,
                description: self.description,
                pool_address_ranges: self.pool_address_ranges,
                total_address_count: self.total_address_count,
                total_available_address_count: self.total_available_address_count,
                network_border_group: self.network_border_group,
                tags: self.tags,
            }
        }
    }
}
impl PublicIpv4Pool {
    /// Creates a new builder-style object to manufacture [`PublicIpv4Pool`](crate::model::PublicIpv4Pool).
    pub fn builder() -> crate::model::public_ipv4_pool::Builder {
        crate::model::public_ipv4_pool::Builder::default()
    }
}

/// <p>PrincipalIdFormat description</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct PrincipalIdFormat {
    /// <p>PrincipalIdFormatARN description</p>
    #[doc(hidden)]
    pub arn: std::option::Option<std::string::String>,
    /// <p>PrincipalIdFormatStatuses description</p>
    #[doc(hidden)]
    pub statuses: std::option::Option<std::vec::Vec<crate::model::IdFormat>>,
}
impl PrincipalIdFormat {
    /// <p>PrincipalIdFormatARN description</p>
    pub fn arn(&self) -> std::option::Option<&str> {
        self.arn.as_deref()
    }
    /// <p>PrincipalIdFormatStatuses description</p>
    pub fn statuses(&self) -> std::option::Option<&[crate::model::IdFormat]> {
        self.statuses.as_deref()
    }
}
/// See [`PrincipalIdFormat`](crate::model::PrincipalIdFormat).
pub mod principal_id_format {

    /// A builder for [`PrincipalIdFormat`](crate::model::PrincipalIdFormat).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) arn: std::option::Option<std::string::String>,
        pub(crate) statuses: std::option::Option<std::vec::Vec<crate::model::IdFormat>>,
    }
    impl Builder {
        /// <p>PrincipalIdFormatARN description</p>
        pub fn arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.arn = Some(input.into());
            self
        }
        /// <p>PrincipalIdFormatARN description</p>
        pub fn set_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.arn = input;
            self
        }
        /// Appends an item to `statuses`.
        ///
        /// To override the contents of this collection use [`set_statuses`](Self::set_statuses).
        ///
        /// <p>PrincipalIdFormatStatuses description</p>
        pub fn statuses(mut self, input: crate::model::IdFormat) -> Self {
            let mut v = self.statuses.unwrap_or_default();
            v.push(input);
            self.statuses = Some(v);
            self
        }
        /// <p>PrincipalIdFormatStatuses description</p>
        pub fn set_statuses(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::IdFormat>>,
        ) -> Self {
            self.statuses = input;
            self
        }
        /// Consumes the builder and constructs a [`PrincipalIdFormat`](crate::model::PrincipalIdFormat).
        pub fn build(self) -> crate::model::PrincipalIdFormat {
            crate::model::PrincipalIdFormat {
                arn: self.arn,
                statuses: self.statuses,
            }
        }
    }
}
impl PrincipalIdFormat {
    /// Creates a new builder-style object to manufacture [`PrincipalIdFormat`](crate::model::PrincipalIdFormat).
    pub fn builder() -> crate::model::principal_id_format::Builder {
        crate::model::principal_id_format::Builder::default()
    }
}

/// <p>Describes the ID format for a resource.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct IdFormat {
    /// <p>The date in UTC at which you are permanently switched over to using longer IDs. If a deadline is not yet available for this resource type, this field is not returned.</p>
    #[doc(hidden)]
    pub deadline: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The type of resource.</p>
    #[doc(hidden)]
    pub resource: std::option::Option<std::string::String>,
    /// <p>Indicates whether longer IDs (17-character IDs) are enabled for the resource.</p>
    #[doc(hidden)]
    pub use_long_ids: std::option::Option<bool>,
}
impl IdFormat {
    /// <p>The date in UTC at which you are permanently switched over to using longer IDs. If a deadline is not yet available for this resource type, this field is not returned.</p>
    pub fn deadline(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.deadline.as_ref()
    }
    /// <p>The type of resource.</p>
    pub fn resource(&self) -> std::option::Option<&str> {
        self.resource.as_deref()
    }
    /// <p>Indicates whether longer IDs (17-character IDs) are enabled for the resource.</p>
    pub fn use_long_ids(&self) -> std::option::Option<bool> {
        self.use_long_ids
    }
}
/// See [`IdFormat`](crate::model::IdFormat).
pub mod id_format {

    /// A builder for [`IdFormat`](crate::model::IdFormat).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) deadline: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) resource: std::option::Option<std::string::String>,
        pub(crate) use_long_ids: std::option::Option<bool>,
    }
    impl Builder {
        /// <p>The date in UTC at which you are permanently switched over to using longer IDs. If a deadline is not yet available for this resource type, this field is not returned.</p>
        pub fn deadline(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.deadline = Some(input);
            self
        }
        /// <p>The date in UTC at which you are permanently switched over to using longer IDs. If a deadline is not yet available for this resource type, this field is not returned.</p>
        pub fn set_deadline(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.deadline = input;
            self
        }
        /// <p>The type of resource.</p>
        pub fn resource(mut self, input: impl Into<std::string::String>) -> Self {
            self.resource = Some(input.into());
            self
        }
        /// <p>The type of resource.</p>
        pub fn set_resource(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.resource = input;
            self
        }
        /// <p>Indicates whether longer IDs (17-character IDs) are enabled for the resource.</p>
        pub fn use_long_ids(mut self, input: bool) -> Self {
            self.use_long_ids = Some(input);
            self
        }
        /// <p>Indicates whether longer IDs (17-character IDs) are enabled for the resource.</p>
        pub fn set_use_long_ids(mut self, input: std::option::Option<bool>) -> Self {
            self.use_long_ids = input;
            self
        }
        /// Consumes the builder and constructs a [`IdFormat`](crate::model::IdFormat).
        pub fn build(self) -> crate::model::IdFormat {
            crate::model::IdFormat {
                deadline: self.deadline,
                resource: self.resource,
                use_long_ids: self.use_long_ids,
            }
        }
    }
}
impl IdFormat {
    /// Creates a new builder-style object to manufacture [`IdFormat`](crate::model::IdFormat).
    pub fn builder() -> crate::model::id_format::Builder {
        crate::model::id_format::Builder::default()
    }
}

/// <p>Describes prefixes for Amazon Web Services services.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct PrefixList {
    /// <p>The IP address range of the Amazon Web Service.</p>
    #[doc(hidden)]
    pub cidrs: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>The ID of the prefix.</p>
    #[doc(hidden)]
    pub prefix_list_id: std::option::Option<std::string::String>,
    /// <p>The name of the prefix.</p>
    #[doc(hidden)]
    pub prefix_list_name: std::option::Option<std::string::String>,
}
impl PrefixList {
    /// <p>The IP address range of the Amazon Web Service.</p>
    pub fn cidrs(&self) -> std::option::Option<&[std::string::String]> {
        self.cidrs.as_deref()
    }
    /// <p>The ID of the prefix.</p>
    pub fn prefix_list_id(&self) -> std::option::Option<&str> {
        self.prefix_list_id.as_deref()
    }
    /// <p>The name of the prefix.</p>
    pub fn prefix_list_name(&self) -> std::option::Option<&str> {
        self.prefix_list_name.as_deref()
    }
}
/// See [`PrefixList`](crate::model::PrefixList).
pub mod prefix_list {

    /// A builder for [`PrefixList`](crate::model::PrefixList).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) cidrs: std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) prefix_list_id: std::option::Option<std::string::String>,
        pub(crate) prefix_list_name: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// Appends an item to `cidrs`.
        ///
        /// To override the contents of this collection use [`set_cidrs`](Self::set_cidrs).
        ///
        /// <p>The IP address range of the Amazon Web Service.</p>
        pub fn cidrs(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.cidrs.unwrap_or_default();
            v.push(input.into());
            self.cidrs = Some(v);
            self
        }
        /// <p>The IP address range of the Amazon Web Service.</p>
        pub fn set_cidrs(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.cidrs = input;
            self
        }
        /// <p>The ID of the prefix.</p>
        pub fn prefix_list_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.prefix_list_id = Some(input.into());
            self
        }
        /// <p>The ID of the prefix.</p>
        pub fn set_prefix_list_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.prefix_list_id = input;
            self
        }
        /// <p>The name of the prefix.</p>
        pub fn prefix_list_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.prefix_list_name = Some(input.into());
            self
        }
        /// <p>The name of the prefix.</p>
        pub fn set_prefix_list_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.prefix_list_name = input;
            self
        }
        /// Consumes the builder and constructs a [`PrefixList`](crate::model::PrefixList).
        pub fn build(self) -> crate::model::PrefixList {
            crate::model::PrefixList {
                cidrs: self.cidrs,
                prefix_list_id: self.prefix_list_id,
                prefix_list_name: self.prefix_list_name,
            }
        }
    }
}
impl PrefixList {
    /// Creates a new builder-style object to manufacture [`PrefixList`](crate::model::PrefixList).
    pub fn builder() -> crate::model::prefix_list::Builder {
        crate::model::prefix_list::Builder::default()
    }
}

/// <p>Describes a placement group.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct PlacementGroup {
    /// <p>The name of the placement group.</p>
    #[doc(hidden)]
    pub group_name: std::option::Option<std::string::String>,
    /// <p>The state of the placement group.</p>
    #[doc(hidden)]
    pub state: std::option::Option<crate::model::PlacementGroupState>,
    /// <p>The placement strategy.</p>
    #[doc(hidden)]
    pub strategy: std::option::Option<crate::model::PlacementStrategy>,
    /// <p>The number of partitions. Valid only if <b>strategy</b> is set to <code>partition</code>.</p>
    #[doc(hidden)]
    pub partition_count: std::option::Option<i32>,
    /// <p>The ID of the placement group.</p>
    #[doc(hidden)]
    pub group_id: std::option::Option<std::string::String>,
    /// <p>Any tags applied to the placement group.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    /// <p>The Amazon Resource Name (ARN) of the placement group.</p>
    #[doc(hidden)]
    pub group_arn: std::option::Option<std::string::String>,
    /// <p>The spread level for the placement group. <i>Only</i> Outpost placement groups can be spread across hosts.</p>
    #[doc(hidden)]
    pub spread_level: std::option::Option<crate::model::SpreadLevel>,
}
impl PlacementGroup {
    /// <p>The name of the placement group.</p>
    pub fn group_name(&self) -> std::option::Option<&str> {
        self.group_name.as_deref()
    }
    /// <p>The state of the placement group.</p>
    pub fn state(&self) -> std::option::Option<&crate::model::PlacementGroupState> {
        self.state.as_ref()
    }
    /// <p>The placement strategy.</p>
    pub fn strategy(&self) -> std::option::Option<&crate::model::PlacementStrategy> {
        self.strategy.as_ref()
    }
    /// <p>The number of partitions. Valid only if <b>strategy</b> is set to <code>partition</code>.</p>
    pub fn partition_count(&self) -> std::option::Option<i32> {
        self.partition_count
    }
    /// <p>The ID of the placement group.</p>
    pub fn group_id(&self) -> std::option::Option<&str> {
        self.group_id.as_deref()
    }
    /// <p>Any tags applied to the placement group.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the placement group.</p>
    pub fn group_arn(&self) -> std::option::Option<&str> {
        self.group_arn.as_deref()
    }
    /// <p>The spread level for the placement group. <i>Only</i> Outpost placement groups can be spread across hosts.</p>
    pub fn spread_level(&self) -> std::option::Option<&crate::model::SpreadLevel> {
        self.spread_level.as_ref()
    }
}
/// See [`PlacementGroup`](crate::model::PlacementGroup).
pub mod placement_group {

    /// A builder for [`PlacementGroup`](crate::model::PlacementGroup).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) group_name: std::option::Option<std::string::String>,
        pub(crate) state: std::option::Option<crate::model::PlacementGroupState>,
        pub(crate) strategy: std::option::Option<crate::model::PlacementStrategy>,
        pub(crate) partition_count: std::option::Option<i32>,
        pub(crate) group_id: std::option::Option<std::string::String>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        pub(crate) group_arn: std::option::Option<std::string::String>,
        pub(crate) spread_level: std::option::Option<crate::model::SpreadLevel>,
    }
    impl Builder {
        /// <p>The name of the placement group.</p>
        pub fn group_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.group_name = Some(input.into());
            self
        }
        /// <p>The name of the placement group.</p>
        pub fn set_group_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.group_name = input;
            self
        }
        /// <p>The state of the placement group.</p>
        pub fn state(mut self, input: crate::model::PlacementGroupState) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>The state of the placement group.</p>
        pub fn set_state(
            mut self,
            input: std::option::Option<crate::model::PlacementGroupState>,
        ) -> Self {
            self.state = input;
            self
        }
        /// <p>The placement strategy.</p>
        pub fn strategy(mut self, input: crate::model::PlacementStrategy) -> Self {
            self.strategy = Some(input);
            self
        }
        /// <p>The placement strategy.</p>
        pub fn set_strategy(
            mut self,
            input: std::option::Option<crate::model::PlacementStrategy>,
        ) -> Self {
            self.strategy = input;
            self
        }
        /// <p>The number of partitions. Valid only if <b>strategy</b> is set to <code>partition</code>.</p>
        pub fn partition_count(mut self, input: i32) -> Self {
            self.partition_count = Some(input);
            self
        }
        /// <p>The number of partitions. Valid only if <b>strategy</b> is set to <code>partition</code>.</p>
        pub fn set_partition_count(mut self, input: std::option::Option<i32>) -> Self {
            self.partition_count = input;
            self
        }
        /// <p>The ID of the placement group.</p>
        pub fn group_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.group_id = Some(input.into());
            self
        }
        /// <p>The ID of the placement group.</p>
        pub fn set_group_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.group_id = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>Any tags applied to the placement group.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>Any tags applied to the placement group.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the placement group.</p>
        pub fn group_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.group_arn = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the placement group.</p>
        pub fn set_group_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.group_arn = input;
            self
        }
        /// <p>The spread level for the placement group. <i>Only</i> Outpost placement groups can be spread across hosts.</p>
        pub fn spread_level(mut self, input: crate::model::SpreadLevel) -> Self {
            self.spread_level = Some(input);
            self
        }
        /// <p>The spread level for the placement group. <i>Only</i> Outpost placement groups can be spread across hosts.</p>
        pub fn set_spread_level(
            mut self,
            input: std::option::Option<crate::model::SpreadLevel>,
        ) -> Self {
            self.spread_level = input;
            self
        }
        /// Consumes the builder and constructs a [`PlacementGroup`](crate::model::PlacementGroup).
        pub fn build(self) -> crate::model::PlacementGroup {
            crate::model::PlacementGroup {
                group_name: self.group_name,
                state: self.state,
                strategy: self.strategy,
                partition_count: self.partition_count,
                group_id: self.group_id,
                tags: self.tags,
                group_arn: self.group_arn,
                spread_level: self.spread_level,
            }
        }
    }
}
impl PlacementGroup {
    /// Creates a new builder-style object to manufacture [`PlacementGroup`](crate::model::PlacementGroup).
    pub fn builder() -> crate::model::placement_group::Builder {
        crate::model::placement_group::Builder::default()
    }
}

/// When writing a match expression against `SpreadLevel`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let spreadlevel = unimplemented!();
/// match spreadlevel {
///     SpreadLevel::Host => { /* ... */ },
///     SpreadLevel::Rack => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `spreadlevel` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `SpreadLevel::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `SpreadLevel::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `SpreadLevel::NewFeature` is defined.
/// Specifically, when `spreadlevel` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `SpreadLevel::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 SpreadLevel {
    #[allow(missing_docs)] // documentation missing in model
    Host,
    #[allow(missing_docs)] // documentation missing in model
    Rack,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for SpreadLevel {
    fn from(s: &str) -> Self {
        match s {
            "host" => SpreadLevel::Host,
            "rack" => SpreadLevel::Rack,
            other => SpreadLevel::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for SpreadLevel {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(SpreadLevel::from(s))
    }
}
impl SpreadLevel {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            SpreadLevel::Host => "host",
            SpreadLevel::Rack => "rack",
            SpreadLevel::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["host", "rack"]
    }
}
impl AsRef<str> for SpreadLevel {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `PlacementStrategy`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let placementstrategy = unimplemented!();
/// match placementstrategy {
///     PlacementStrategy::Cluster => { /* ... */ },
///     PlacementStrategy::Partition => { /* ... */ },
///     PlacementStrategy::Spread => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `placementstrategy` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `PlacementStrategy::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `PlacementStrategy::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `PlacementStrategy::NewFeature` is defined.
/// Specifically, when `placementstrategy` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `PlacementStrategy::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 PlacementStrategy {
    #[allow(missing_docs)] // documentation missing in model
    Cluster,
    #[allow(missing_docs)] // documentation missing in model
    Partition,
    #[allow(missing_docs)] // documentation missing in model
    Spread,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for PlacementStrategy {
    fn from(s: &str) -> Self {
        match s {
            "cluster" => PlacementStrategy::Cluster,
            "partition" => PlacementStrategy::Partition,
            "spread" => PlacementStrategy::Spread,
            other => {
                PlacementStrategy::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for PlacementStrategy {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(PlacementStrategy::from(s))
    }
}
impl PlacementStrategy {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            PlacementStrategy::Cluster => "cluster",
            PlacementStrategy::Partition => "partition",
            PlacementStrategy::Spread => "spread",
            PlacementStrategy::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["cluster", "partition", "spread"]
    }
}
impl AsRef<str> for PlacementStrategy {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `PlacementGroupState`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let placementgroupstate = unimplemented!();
/// match placementgroupstate {
///     PlacementGroupState::Available => { /* ... */ },
///     PlacementGroupState::Deleted => { /* ... */ },
///     PlacementGroupState::Deleting => { /* ... */ },
///     PlacementGroupState::Pending => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `placementgroupstate` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `PlacementGroupState::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `PlacementGroupState::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `PlacementGroupState::NewFeature` is defined.
/// Specifically, when `placementgroupstate` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `PlacementGroupState::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 PlacementGroupState {
    #[allow(missing_docs)] // documentation missing in model
    Available,
    #[allow(missing_docs)] // documentation missing in model
    Deleted,
    #[allow(missing_docs)] // documentation missing in model
    Deleting,
    #[allow(missing_docs)] // documentation missing in model
    Pending,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for PlacementGroupState {
    fn from(s: &str) -> Self {
        match s {
            "available" => PlacementGroupState::Available,
            "deleted" => PlacementGroupState::Deleted,
            "deleting" => PlacementGroupState::Deleting,
            "pending" => PlacementGroupState::Pending,
            other => {
                PlacementGroupState::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for PlacementGroupState {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(PlacementGroupState::from(s))
    }
}
impl PlacementGroupState {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            PlacementGroupState::Available => "available",
            PlacementGroupState::Deleted => "deleted",
            PlacementGroupState::Deleting => "deleting",
            PlacementGroupState::Pending => "pending",
            PlacementGroupState::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["available", "deleted", "deleting", "pending"]
    }
}
impl AsRef<str> for PlacementGroupState {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes a network interface.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct NetworkInterface {
    /// <p>The association information for an Elastic IP address (IPv4) associated with the network interface.</p>
    #[doc(hidden)]
    pub association: std::option::Option<crate::model::NetworkInterfaceAssociation>,
    /// <p>The network interface attachment.</p>
    #[doc(hidden)]
    pub attachment: std::option::Option<crate::model::NetworkInterfaceAttachment>,
    /// <p>The Availability Zone.</p>
    #[doc(hidden)]
    pub availability_zone: std::option::Option<std::string::String>,
    /// <p>A description.</p>
    #[doc(hidden)]
    pub description: std::option::Option<std::string::String>,
    /// <p>Any security groups for the network interface.</p>
    #[doc(hidden)]
    pub groups: std::option::Option<std::vec::Vec<crate::model::GroupIdentifier>>,
    /// <p>The type of network interface.</p>
    #[doc(hidden)]
    pub interface_type: std::option::Option<crate::model::NetworkInterfaceType>,
    /// <p>The IPv6 addresses associated with the network interface.</p>
    #[doc(hidden)]
    pub ipv6_addresses:
        std::option::Option<std::vec::Vec<crate::model::NetworkInterfaceIpv6Address>>,
    /// <p>The MAC address.</p>
    #[doc(hidden)]
    pub mac_address: std::option::Option<std::string::String>,
    /// <p>The ID of the network interface.</p>
    #[doc(hidden)]
    pub network_interface_id: std::option::Option<std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the Outpost.</p>
    #[doc(hidden)]
    pub outpost_arn: std::option::Option<std::string::String>,
    /// <p>The Amazon Web Services account ID of the owner of the network interface.</p>
    #[doc(hidden)]
    pub owner_id: std::option::Option<std::string::String>,
    /// <p>The private DNS name.</p>
    #[doc(hidden)]
    pub private_dns_name: std::option::Option<std::string::String>,
    /// <p>The IPv4 address of the network interface within the subnet.</p>
    #[doc(hidden)]
    pub private_ip_address: std::option::Option<std::string::String>,
    /// <p>The private IPv4 addresses associated with the network interface.</p>
    #[doc(hidden)]
    pub private_ip_addresses:
        std::option::Option<std::vec::Vec<crate::model::NetworkInterfacePrivateIpAddress>>,
    /// <p>The IPv4 prefixes that are assigned to the network interface.</p>
    #[doc(hidden)]
    pub ipv4_prefixes: std::option::Option<std::vec::Vec<crate::model::Ipv4PrefixSpecification>>,
    /// <p>The IPv6 prefixes that are assigned to the network interface.</p>
    #[doc(hidden)]
    pub ipv6_prefixes: std::option::Option<std::vec::Vec<crate::model::Ipv6PrefixSpecification>>,
    /// <p>The alias or Amazon Web Services account ID of the principal or service that created the network interface.</p>
    #[doc(hidden)]
    pub requester_id: std::option::Option<std::string::String>,
    /// <p>Indicates whether the network interface is being managed by Amazon Web Services.</p>
    #[doc(hidden)]
    pub requester_managed: std::option::Option<bool>,
    /// <p>Indicates whether source/destination checking is enabled.</p>
    #[doc(hidden)]
    pub source_dest_check: std::option::Option<bool>,
    /// <p>The status of the network interface.</p>
    #[doc(hidden)]
    pub status: std::option::Option<crate::model::NetworkInterfaceStatus>,
    /// <p>The ID of the subnet.</p>
    #[doc(hidden)]
    pub subnet_id: std::option::Option<std::string::String>,
    /// <p>Any tags assigned to the network interface.</p>
    #[doc(hidden)]
    pub tag_set: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    /// <p>The ID of the VPC.</p>
    #[doc(hidden)]
    pub vpc_id: std::option::Option<std::string::String>,
    /// <p>Indicates whether a network interface with an IPv6 address is unreachable from the public internet. If the value is <code>true</code>, inbound traffic from the internet is dropped and you cannot assign an elastic IP address to the network interface. The network interface is reachable from peered VPCs and resources connected through a transit gateway, including on-premises networks.</p>
    #[doc(hidden)]
    pub deny_all_igw_traffic: std::option::Option<bool>,
    /// <p>Indicates whether this is an IPv6 only network interface.</p>
    #[doc(hidden)]
    pub ipv6_native: std::option::Option<bool>,
    /// <p>The IPv6 globally unique address associated with the network interface.</p>
    #[doc(hidden)]
    pub ipv6_address: std::option::Option<std::string::String>,
}
impl NetworkInterface {
    /// <p>The association information for an Elastic IP address (IPv4) associated with the network interface.</p>
    pub fn association(&self) -> std::option::Option<&crate::model::NetworkInterfaceAssociation> {
        self.association.as_ref()
    }
    /// <p>The network interface attachment.</p>
    pub fn attachment(&self) -> std::option::Option<&crate::model::NetworkInterfaceAttachment> {
        self.attachment.as_ref()
    }
    /// <p>The Availability Zone.</p>
    pub fn availability_zone(&self) -> std::option::Option<&str> {
        self.availability_zone.as_deref()
    }
    /// <p>A description.</p>
    pub fn description(&self) -> std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>Any security groups for the network interface.</p>
    pub fn groups(&self) -> std::option::Option<&[crate::model::GroupIdentifier]> {
        self.groups.as_deref()
    }
    /// <p>The type of network interface.</p>
    pub fn interface_type(&self) -> std::option::Option<&crate::model::NetworkInterfaceType> {
        self.interface_type.as_ref()
    }
    /// <p>The IPv6 addresses associated with the network interface.</p>
    pub fn ipv6_addresses(
        &self,
    ) -> std::option::Option<&[crate::model::NetworkInterfaceIpv6Address]> {
        self.ipv6_addresses.as_deref()
    }
    /// <p>The MAC address.</p>
    pub fn mac_address(&self) -> std::option::Option<&str> {
        self.mac_address.as_deref()
    }
    /// <p>The ID of the network interface.</p>
    pub fn network_interface_id(&self) -> std::option::Option<&str> {
        self.network_interface_id.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the Outpost.</p>
    pub fn outpost_arn(&self) -> std::option::Option<&str> {
        self.outpost_arn.as_deref()
    }
    /// <p>The Amazon Web Services account ID of the owner of the network interface.</p>
    pub fn owner_id(&self) -> std::option::Option<&str> {
        self.owner_id.as_deref()
    }
    /// <p>The private DNS name.</p>
    pub fn private_dns_name(&self) -> std::option::Option<&str> {
        self.private_dns_name.as_deref()
    }
    /// <p>The IPv4 address of the network interface within the subnet.</p>
    pub fn private_ip_address(&self) -> std::option::Option<&str> {
        self.private_ip_address.as_deref()
    }
    /// <p>The private IPv4 addresses associated with the network interface.</p>
    pub fn private_ip_addresses(
        &self,
    ) -> std::option::Option<&[crate::model::NetworkInterfacePrivateIpAddress]> {
        self.private_ip_addresses.as_deref()
    }
    /// <p>The IPv4 prefixes that are assigned to the network interface.</p>
    pub fn ipv4_prefixes(&self) -> std::option::Option<&[crate::model::Ipv4PrefixSpecification]> {
        self.ipv4_prefixes.as_deref()
    }
    /// <p>The IPv6 prefixes that are assigned to the network interface.</p>
    pub fn ipv6_prefixes(&self) -> std::option::Option<&[crate::model::Ipv6PrefixSpecification]> {
        self.ipv6_prefixes.as_deref()
    }
    /// <p>The alias or Amazon Web Services account ID of the principal or service that created the network interface.</p>
    pub fn requester_id(&self) -> std::option::Option<&str> {
        self.requester_id.as_deref()
    }
    /// <p>Indicates whether the network interface is being managed by Amazon Web Services.</p>
    pub fn requester_managed(&self) -> std::option::Option<bool> {
        self.requester_managed
    }
    /// <p>Indicates whether source/destination checking is enabled.</p>
    pub fn source_dest_check(&self) -> std::option::Option<bool> {
        self.source_dest_check
    }
    /// <p>The status of the network interface.</p>
    pub fn status(&self) -> std::option::Option<&crate::model::NetworkInterfaceStatus> {
        self.status.as_ref()
    }
    /// <p>The ID of the subnet.</p>
    pub fn subnet_id(&self) -> std::option::Option<&str> {
        self.subnet_id.as_deref()
    }
    /// <p>Any tags assigned to the network interface.</p>
    pub fn tag_set(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tag_set.as_deref()
    }
    /// <p>The ID of the VPC.</p>
    pub fn vpc_id(&self) -> std::option::Option<&str> {
        self.vpc_id.as_deref()
    }
    /// <p>Indicates whether a network interface with an IPv6 address is unreachable from the public internet. If the value is <code>true</code>, inbound traffic from the internet is dropped and you cannot assign an elastic IP address to the network interface. The network interface is reachable from peered VPCs and resources connected through a transit gateway, including on-premises networks.</p>
    pub fn deny_all_igw_traffic(&self) -> std::option::Option<bool> {
        self.deny_all_igw_traffic
    }
    /// <p>Indicates whether this is an IPv6 only network interface.</p>
    pub fn ipv6_native(&self) -> std::option::Option<bool> {
        self.ipv6_native
    }
    /// <p>The IPv6 globally unique address associated with the network interface.</p>
    pub fn ipv6_address(&self) -> std::option::Option<&str> {
        self.ipv6_address.as_deref()
    }
}
/// See [`NetworkInterface`](crate::model::NetworkInterface).
pub mod network_interface {

    /// A builder for [`NetworkInterface`](crate::model::NetworkInterface).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) association: std::option::Option<crate::model::NetworkInterfaceAssociation>,
        pub(crate) attachment: std::option::Option<crate::model::NetworkInterfaceAttachment>,
        pub(crate) availability_zone: std::option::Option<std::string::String>,
        pub(crate) description: std::option::Option<std::string::String>,
        pub(crate) groups: std::option::Option<std::vec::Vec<crate::model::GroupIdentifier>>,
        pub(crate) interface_type: std::option::Option<crate::model::NetworkInterfaceType>,
        pub(crate) ipv6_addresses:
            std::option::Option<std::vec::Vec<crate::model::NetworkInterfaceIpv6Address>>,
        pub(crate) mac_address: std::option::Option<std::string::String>,
        pub(crate) network_interface_id: std::option::Option<std::string::String>,
        pub(crate) outpost_arn: std::option::Option<std::string::String>,
        pub(crate) owner_id: std::option::Option<std::string::String>,
        pub(crate) private_dns_name: std::option::Option<std::string::String>,
        pub(crate) private_ip_address: std::option::Option<std::string::String>,
        pub(crate) private_ip_addresses:
            std::option::Option<std::vec::Vec<crate::model::NetworkInterfacePrivateIpAddress>>,
        pub(crate) ipv4_prefixes:
            std::option::Option<std::vec::Vec<crate::model::Ipv4PrefixSpecification>>,
        pub(crate) ipv6_prefixes:
            std::option::Option<std::vec::Vec<crate::model::Ipv6PrefixSpecification>>,
        pub(crate) requester_id: std::option::Option<std::string::String>,
        pub(crate) requester_managed: std::option::Option<bool>,
        pub(crate) source_dest_check: std::option::Option<bool>,
        pub(crate) status: std::option::Option<crate::model::NetworkInterfaceStatus>,
        pub(crate) subnet_id: std::option::Option<std::string::String>,
        pub(crate) tag_set: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        pub(crate) vpc_id: std::option::Option<std::string::String>,
        pub(crate) deny_all_igw_traffic: std::option::Option<bool>,
        pub(crate) ipv6_native: std::option::Option<bool>,
        pub(crate) ipv6_address: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The association information for an Elastic IP address (IPv4) associated with the network interface.</p>
        pub fn association(mut self, input: crate::model::NetworkInterfaceAssociation) -> Self {
            self.association = Some(input);
            self
        }
        /// <p>The association information for an Elastic IP address (IPv4) associated with the network interface.</p>
        pub fn set_association(
            mut self,
            input: std::option::Option<crate::model::NetworkInterfaceAssociation>,
        ) -> Self {
            self.association = input;
            self
        }
        /// <p>The network interface attachment.</p>
        pub fn attachment(mut self, input: crate::model::NetworkInterfaceAttachment) -> Self {
            self.attachment = Some(input);
            self
        }
        /// <p>The network interface attachment.</p>
        pub fn set_attachment(
            mut self,
            input: std::option::Option<crate::model::NetworkInterfaceAttachment>,
        ) -> Self {
            self.attachment = input;
            self
        }
        /// <p>The Availability Zone.</p>
        pub fn availability_zone(mut self, input: impl Into<std::string::String>) -> Self {
            self.availability_zone = Some(input.into());
            self
        }
        /// <p>The Availability Zone.</p>
        pub fn set_availability_zone(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.availability_zone = input;
            self
        }
        /// <p>A description.</p>
        pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
            self.description = Some(input.into());
            self
        }
        /// <p>A description.</p>
        pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.description = input;
            self
        }
        /// Appends an item to `groups`.
        ///
        /// To override the contents of this collection use [`set_groups`](Self::set_groups).
        ///
        /// <p>Any security groups for the network interface.</p>
        pub fn groups(mut self, input: crate::model::GroupIdentifier) -> Self {
            let mut v = self.groups.unwrap_or_default();
            v.push(input);
            self.groups = Some(v);
            self
        }
        /// <p>Any security groups for the network interface.</p>
        pub fn set_groups(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::GroupIdentifier>>,
        ) -> Self {
            self.groups = input;
            self
        }
        /// <p>The type of network interface.</p>
        pub fn interface_type(mut self, input: crate::model::NetworkInterfaceType) -> Self {
            self.interface_type = Some(input);
            self
        }
        /// <p>The type of network interface.</p>
        pub fn set_interface_type(
            mut self,
            input: std::option::Option<crate::model::NetworkInterfaceType>,
        ) -> Self {
            self.interface_type = input;
            self
        }
        /// Appends an item to `ipv6_addresses`.
        ///
        /// To override the contents of this collection use [`set_ipv6_addresses`](Self::set_ipv6_addresses).
        ///
        /// <p>The IPv6 addresses associated with the network interface.</p>
        pub fn ipv6_addresses(mut self, input: crate::model::NetworkInterfaceIpv6Address) -> Self {
            let mut v = self.ipv6_addresses.unwrap_or_default();
            v.push(input);
            self.ipv6_addresses = Some(v);
            self
        }
        /// <p>The IPv6 addresses associated with the network interface.</p>
        pub fn set_ipv6_addresses(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::NetworkInterfaceIpv6Address>>,
        ) -> Self {
            self.ipv6_addresses = input;
            self
        }
        /// <p>The MAC address.</p>
        pub fn mac_address(mut self, input: impl Into<std::string::String>) -> Self {
            self.mac_address = Some(input.into());
            self
        }
        /// <p>The MAC address.</p>
        pub fn set_mac_address(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.mac_address = input;
            self
        }
        /// <p>The ID of the network interface.</p>
        pub fn network_interface_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.network_interface_id = Some(input.into());
            self
        }
        /// <p>The ID of the network interface.</p>
        pub fn set_network_interface_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.network_interface_id = input;
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the Outpost.</p>
        pub fn outpost_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.outpost_arn = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the Outpost.</p>
        pub fn set_outpost_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.outpost_arn = input;
            self
        }
        /// <p>The Amazon Web Services account ID of the owner of the network interface.</p>
        pub fn owner_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.owner_id = Some(input.into());
            self
        }
        /// <p>The Amazon Web Services account ID of the owner of the network interface.</p>
        pub fn set_owner_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.owner_id = input;
            self
        }
        /// <p>The private DNS name.</p>
        pub fn private_dns_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.private_dns_name = Some(input.into());
            self
        }
        /// <p>The private DNS name.</p>
        pub fn set_private_dns_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.private_dns_name = input;
            self
        }
        /// <p>The IPv4 address of the network interface within the subnet.</p>
        pub fn private_ip_address(mut self, input: impl Into<std::string::String>) -> Self {
            self.private_ip_address = Some(input.into());
            self
        }
        /// <p>The IPv4 address of the network interface within the subnet.</p>
        pub fn set_private_ip_address(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.private_ip_address = input;
            self
        }
        /// Appends an item to `private_ip_addresses`.
        ///
        /// To override the contents of this collection use [`set_private_ip_addresses`](Self::set_private_ip_addresses).
        ///
        /// <p>The private IPv4 addresses associated with the network interface.</p>
        pub fn private_ip_addresses(
            mut self,
            input: crate::model::NetworkInterfacePrivateIpAddress,
        ) -> Self {
            let mut v = self.private_ip_addresses.unwrap_or_default();
            v.push(input);
            self.private_ip_addresses = Some(v);
            self
        }
        /// <p>The private IPv4 addresses associated with the network interface.</p>
        pub fn set_private_ip_addresses(
            mut self,
            input: std::option::Option<
                std::vec::Vec<crate::model::NetworkInterfacePrivateIpAddress>,
            >,
        ) -> Self {
            self.private_ip_addresses = input;
            self
        }
        /// Appends an item to `ipv4_prefixes`.
        ///
        /// To override the contents of this collection use [`set_ipv4_prefixes`](Self::set_ipv4_prefixes).
        ///
        /// <p>The IPv4 prefixes that are assigned to the network interface.</p>
        pub fn ipv4_prefixes(mut self, input: crate::model::Ipv4PrefixSpecification) -> Self {
            let mut v = self.ipv4_prefixes.unwrap_or_default();
            v.push(input);
            self.ipv4_prefixes = Some(v);
            self
        }
        /// <p>The IPv4 prefixes that are assigned to the network interface.</p>
        pub fn set_ipv4_prefixes(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Ipv4PrefixSpecification>>,
        ) -> Self {
            self.ipv4_prefixes = input;
            self
        }
        /// Appends an item to `ipv6_prefixes`.
        ///
        /// To override the contents of this collection use [`set_ipv6_prefixes`](Self::set_ipv6_prefixes).
        ///
        /// <p>The IPv6 prefixes that are assigned to the network interface.</p>
        pub fn ipv6_prefixes(mut self, input: crate::model::Ipv6PrefixSpecification) -> Self {
            let mut v = self.ipv6_prefixes.unwrap_or_default();
            v.push(input);
            self.ipv6_prefixes = Some(v);
            self
        }
        /// <p>The IPv6 prefixes that are assigned to the network interface.</p>
        pub fn set_ipv6_prefixes(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Ipv6PrefixSpecification>>,
        ) -> Self {
            self.ipv6_prefixes = input;
            self
        }
        /// <p>The alias or Amazon Web Services account ID of the principal or service that created the network interface.</p>
        pub fn requester_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.requester_id = Some(input.into());
            self
        }
        /// <p>The alias or Amazon Web Services account ID of the principal or service that created the network interface.</p>
        pub fn set_requester_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.requester_id = input;
            self
        }
        /// <p>Indicates whether the network interface is being managed by Amazon Web Services.</p>
        pub fn requester_managed(mut self, input: bool) -> Self {
            self.requester_managed = Some(input);
            self
        }
        /// <p>Indicates whether the network interface is being managed by Amazon Web Services.</p>
        pub fn set_requester_managed(mut self, input: std::option::Option<bool>) -> Self {
            self.requester_managed = input;
            self
        }
        /// <p>Indicates whether source/destination checking is enabled.</p>
        pub fn source_dest_check(mut self, input: bool) -> Self {
            self.source_dest_check = Some(input);
            self
        }
        /// <p>Indicates whether source/destination checking is enabled.</p>
        pub fn set_source_dest_check(mut self, input: std::option::Option<bool>) -> Self {
            self.source_dest_check = input;
            self
        }
        /// <p>The status of the network interface.</p>
        pub fn status(mut self, input: crate::model::NetworkInterfaceStatus) -> Self {
            self.status = Some(input);
            self
        }
        /// <p>The status of the network interface.</p>
        pub fn set_status(
            mut self,
            input: std::option::Option<crate::model::NetworkInterfaceStatus>,
        ) -> Self {
            self.status = input;
            self
        }
        /// <p>The ID of the subnet.</p>
        pub fn subnet_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.subnet_id = Some(input.into());
            self
        }
        /// <p>The ID of the subnet.</p>
        pub fn set_subnet_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.subnet_id = input;
            self
        }
        /// Appends an item to `tag_set`.
        ///
        /// To override the contents of this collection use [`set_tag_set`](Self::set_tag_set).
        ///
        /// <p>Any tags assigned to the network interface.</p>
        pub fn tag_set(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tag_set.unwrap_or_default();
            v.push(input);
            self.tag_set = Some(v);
            self
        }
        /// <p>Any tags assigned to the network interface.</p>
        pub fn set_tag_set(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tag_set = input;
            self
        }
        /// <p>The ID of the VPC.</p>
        pub fn vpc_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.vpc_id = Some(input.into());
            self
        }
        /// <p>The ID of the VPC.</p>
        pub fn set_vpc_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.vpc_id = input;
            self
        }
        /// <p>Indicates whether a network interface with an IPv6 address is unreachable from the public internet. If the value is <code>true</code>, inbound traffic from the internet is dropped and you cannot assign an elastic IP address to the network interface. The network interface is reachable from peered VPCs and resources connected through a transit gateway, including on-premises networks.</p>
        pub fn deny_all_igw_traffic(mut self, input: bool) -> Self {
            self.deny_all_igw_traffic = Some(input);
            self
        }
        /// <p>Indicates whether a network interface with an IPv6 address is unreachable from the public internet. If the value is <code>true</code>, inbound traffic from the internet is dropped and you cannot assign an elastic IP address to the network interface. The network interface is reachable from peered VPCs and resources connected through a transit gateway, including on-premises networks.</p>
        pub fn set_deny_all_igw_traffic(mut self, input: std::option::Option<bool>) -> Self {
            self.deny_all_igw_traffic = input;
            self
        }
        /// <p>Indicates whether this is an IPv6 only network interface.</p>
        pub fn ipv6_native(mut self, input: bool) -> Self {
            self.ipv6_native = Some(input);
            self
        }
        /// <p>Indicates whether this is an IPv6 only network interface.</p>
        pub fn set_ipv6_native(mut self, input: std::option::Option<bool>) -> Self {
            self.ipv6_native = input;
            self
        }
        /// <p>The IPv6 globally unique address associated with the network interface.</p>
        pub fn ipv6_address(mut self, input: impl Into<std::string::String>) -> Self {
            self.ipv6_address = Some(input.into());
            self
        }
        /// <p>The IPv6 globally unique address associated with the network interface.</p>
        pub fn set_ipv6_address(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.ipv6_address = input;
            self
        }
        /// Consumes the builder and constructs a [`NetworkInterface`](crate::model::NetworkInterface).
        pub fn build(self) -> crate::model::NetworkInterface {
            crate::model::NetworkInterface {
                association: self.association,
                attachment: self.attachment,
                availability_zone: self.availability_zone,
                description: self.description,
                groups: self.groups,
                interface_type: self.interface_type,
                ipv6_addresses: self.ipv6_addresses,
                mac_address: self.mac_address,
                network_interface_id: self.network_interface_id,
                outpost_arn: self.outpost_arn,
                owner_id: self.owner_id,
                private_dns_name: self.private_dns_name,
                private_ip_address: self.private_ip_address,
                private_ip_addresses: self.private_ip_addresses,
                ipv4_prefixes: self.ipv4_prefixes,
                ipv6_prefixes: self.ipv6_prefixes,
                requester_id: self.requester_id,
                requester_managed: self.requester_managed,
                source_dest_check: self.source_dest_check,
                status: self.status,
                subnet_id: self.subnet_id,
                tag_set: self.tag_set,
                vpc_id: self.vpc_id,
                deny_all_igw_traffic: self.deny_all_igw_traffic,
                ipv6_native: self.ipv6_native,
                ipv6_address: self.ipv6_address,
            }
        }
    }
}
impl NetworkInterface {
    /// Creates a new builder-style object to manufacture [`NetworkInterface`](crate::model::NetworkInterface).
    pub fn builder() -> crate::model::network_interface::Builder {
        crate::model::network_interface::Builder::default()
    }
}

/// <p>Describes the IPv6 prefix.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Ipv6PrefixSpecification {
    /// <p>The IPv6 prefix.</p>
    #[doc(hidden)]
    pub ipv6_prefix: std::option::Option<std::string::String>,
}
impl Ipv6PrefixSpecification {
    /// <p>The IPv6 prefix.</p>
    pub fn ipv6_prefix(&self) -> std::option::Option<&str> {
        self.ipv6_prefix.as_deref()
    }
}
/// See [`Ipv6PrefixSpecification`](crate::model::Ipv6PrefixSpecification).
pub mod ipv6_prefix_specification {

    /// A builder for [`Ipv6PrefixSpecification`](crate::model::Ipv6PrefixSpecification).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) ipv6_prefix: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The IPv6 prefix.</p>
        pub fn ipv6_prefix(mut self, input: impl Into<std::string::String>) -> Self {
            self.ipv6_prefix = Some(input.into());
            self
        }
        /// <p>The IPv6 prefix.</p>
        pub fn set_ipv6_prefix(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.ipv6_prefix = input;
            self
        }
        /// Consumes the builder and constructs a [`Ipv6PrefixSpecification`](crate::model::Ipv6PrefixSpecification).
        pub fn build(self) -> crate::model::Ipv6PrefixSpecification {
            crate::model::Ipv6PrefixSpecification {
                ipv6_prefix: self.ipv6_prefix,
            }
        }
    }
}
impl Ipv6PrefixSpecification {
    /// Creates a new builder-style object to manufacture [`Ipv6PrefixSpecification`](crate::model::Ipv6PrefixSpecification).
    pub fn builder() -> crate::model::ipv6_prefix_specification::Builder {
        crate::model::ipv6_prefix_specification::Builder::default()
    }
}

/// <p>Describes an IPv4 prefix.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Ipv4PrefixSpecification {
    /// <p>The IPv4 prefix. For information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-prefix-eni.html"> Assigning prefixes to Amazon EC2 network interfaces</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
    #[doc(hidden)]
    pub ipv4_prefix: std::option::Option<std::string::String>,
}
impl Ipv4PrefixSpecification {
    /// <p>The IPv4 prefix. For information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-prefix-eni.html"> Assigning prefixes to Amazon EC2 network interfaces</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
    pub fn ipv4_prefix(&self) -> std::option::Option<&str> {
        self.ipv4_prefix.as_deref()
    }
}
/// See [`Ipv4PrefixSpecification`](crate::model::Ipv4PrefixSpecification).
pub mod ipv4_prefix_specification {

    /// A builder for [`Ipv4PrefixSpecification`](crate::model::Ipv4PrefixSpecification).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) ipv4_prefix: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The IPv4 prefix. For information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-prefix-eni.html"> Assigning prefixes to Amazon EC2 network interfaces</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
        pub fn ipv4_prefix(mut self, input: impl Into<std::string::String>) -> Self {
            self.ipv4_prefix = Some(input.into());
            self
        }
        /// <p>The IPv4 prefix. For information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-prefix-eni.html"> Assigning prefixes to Amazon EC2 network interfaces</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
        pub fn set_ipv4_prefix(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.ipv4_prefix = input;
            self
        }
        /// Consumes the builder and constructs a [`Ipv4PrefixSpecification`](crate::model::Ipv4PrefixSpecification).
        pub fn build(self) -> crate::model::Ipv4PrefixSpecification {
            crate::model::Ipv4PrefixSpecification {
                ipv4_prefix: self.ipv4_prefix,
            }
        }
    }
}
impl Ipv4PrefixSpecification {
    /// Creates a new builder-style object to manufacture [`Ipv4PrefixSpecification`](crate::model::Ipv4PrefixSpecification).
    pub fn builder() -> crate::model::ipv4_prefix_specification::Builder {
        crate::model::ipv4_prefix_specification::Builder::default()
    }
}

/// <p>Describes the private IPv4 address of a network interface.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct NetworkInterfacePrivateIpAddress {
    /// <p>The association information for an Elastic IP address (IPv4) associated with the network interface.</p>
    #[doc(hidden)]
    pub association: std::option::Option<crate::model::NetworkInterfaceAssociation>,
    /// <p>Indicates whether this IPv4 address is the primary private IPv4 address of the network interface.</p>
    #[doc(hidden)]
    pub primary: std::option::Option<bool>,
    /// <p>The private DNS name.</p>
    #[doc(hidden)]
    pub private_dns_name: std::option::Option<std::string::String>,
    /// <p>The private IPv4 address.</p>
    #[doc(hidden)]
    pub private_ip_address: std::option::Option<std::string::String>,
}
impl NetworkInterfacePrivateIpAddress {
    /// <p>The association information for an Elastic IP address (IPv4) associated with the network interface.</p>
    pub fn association(&self) -> std::option::Option<&crate::model::NetworkInterfaceAssociation> {
        self.association.as_ref()
    }
    /// <p>Indicates whether this IPv4 address is the primary private IPv4 address of the network interface.</p>
    pub fn primary(&self) -> std::option::Option<bool> {
        self.primary
    }
    /// <p>The private DNS name.</p>
    pub fn private_dns_name(&self) -> std::option::Option<&str> {
        self.private_dns_name.as_deref()
    }
    /// <p>The private IPv4 address.</p>
    pub fn private_ip_address(&self) -> std::option::Option<&str> {
        self.private_ip_address.as_deref()
    }
}
/// See [`NetworkInterfacePrivateIpAddress`](crate::model::NetworkInterfacePrivateIpAddress).
pub mod network_interface_private_ip_address {

    /// A builder for [`NetworkInterfacePrivateIpAddress`](crate::model::NetworkInterfacePrivateIpAddress).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) association: std::option::Option<crate::model::NetworkInterfaceAssociation>,
        pub(crate) primary: std::option::Option<bool>,
        pub(crate) private_dns_name: std::option::Option<std::string::String>,
        pub(crate) private_ip_address: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The association information for an Elastic IP address (IPv4) associated with the network interface.</p>
        pub fn association(mut self, input: crate::model::NetworkInterfaceAssociation) -> Self {
            self.association = Some(input);
            self
        }
        /// <p>The association information for an Elastic IP address (IPv4) associated with the network interface.</p>
        pub fn set_association(
            mut self,
            input: std::option::Option<crate::model::NetworkInterfaceAssociation>,
        ) -> Self {
            self.association = input;
            self
        }
        /// <p>Indicates whether this IPv4 address is the primary private IPv4 address of the network interface.</p>
        pub fn primary(mut self, input: bool) -> Self {
            self.primary = Some(input);
            self
        }
        /// <p>Indicates whether this IPv4 address is the primary private IPv4 address of the network interface.</p>
        pub fn set_primary(mut self, input: std::option::Option<bool>) -> Self {
            self.primary = input;
            self
        }
        /// <p>The private DNS name.</p>
        pub fn private_dns_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.private_dns_name = Some(input.into());
            self
        }
        /// <p>The private DNS name.</p>
        pub fn set_private_dns_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.private_dns_name = input;
            self
        }
        /// <p>The private IPv4 address.</p>
        pub fn private_ip_address(mut self, input: impl Into<std::string::String>) -> Self {
            self.private_ip_address = Some(input.into());
            self
        }
        /// <p>The private IPv4 address.</p>
        pub fn set_private_ip_address(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.private_ip_address = input;
            self
        }
        /// Consumes the builder and constructs a [`NetworkInterfacePrivateIpAddress`](crate::model::NetworkInterfacePrivateIpAddress).
        pub fn build(self) -> crate::model::NetworkInterfacePrivateIpAddress {
            crate::model::NetworkInterfacePrivateIpAddress {
                association: self.association,
                primary: self.primary,
                private_dns_name: self.private_dns_name,
                private_ip_address: self.private_ip_address,
            }
        }
    }
}
impl NetworkInterfacePrivateIpAddress {
    /// Creates a new builder-style object to manufacture [`NetworkInterfacePrivateIpAddress`](crate::model::NetworkInterfacePrivateIpAddress).
    pub fn builder() -> crate::model::network_interface_private_ip_address::Builder {
        crate::model::network_interface_private_ip_address::Builder::default()
    }
}

/// <p>Describes association information for an Elastic IP address (IPv4 only), or a Carrier IP address (for a network interface which resides in a subnet in a Wavelength Zone).</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct NetworkInterfaceAssociation {
    /// <p>The allocation ID.</p>
    #[doc(hidden)]
    pub allocation_id: std::option::Option<std::string::String>,
    /// <p>The association ID.</p>
    #[doc(hidden)]
    pub association_id: std::option::Option<std::string::String>,
    /// <p>The ID of the Elastic IP address owner.</p>
    #[doc(hidden)]
    pub ip_owner_id: std::option::Option<std::string::String>,
    /// <p>The public DNS name.</p>
    #[doc(hidden)]
    pub public_dns_name: std::option::Option<std::string::String>,
    /// <p>The address of the Elastic IP address bound to the network interface.</p>
    #[doc(hidden)]
    pub public_ip: std::option::Option<std::string::String>,
    /// <p>The customer-owned IP address associated with the network interface.</p>
    #[doc(hidden)]
    pub customer_owned_ip: std::option::Option<std::string::String>,
    /// <p>The carrier IP address associated with the network interface.</p>
    /// <p>This option is only available when the network interface is in a subnet which is associated with a Wavelength Zone.</p>
    #[doc(hidden)]
    pub carrier_ip: std::option::Option<std::string::String>,
}
impl NetworkInterfaceAssociation {
    /// <p>The allocation ID.</p>
    pub fn allocation_id(&self) -> std::option::Option<&str> {
        self.allocation_id.as_deref()
    }
    /// <p>The association ID.</p>
    pub fn association_id(&self) -> std::option::Option<&str> {
        self.association_id.as_deref()
    }
    /// <p>The ID of the Elastic IP address owner.</p>
    pub fn ip_owner_id(&self) -> std::option::Option<&str> {
        self.ip_owner_id.as_deref()
    }
    /// <p>The public DNS name.</p>
    pub fn public_dns_name(&self) -> std::option::Option<&str> {
        self.public_dns_name.as_deref()
    }
    /// <p>The address of the Elastic IP address bound to the network interface.</p>
    pub fn public_ip(&self) -> std::option::Option<&str> {
        self.public_ip.as_deref()
    }
    /// <p>The customer-owned IP address associated with the network interface.</p>
    pub fn customer_owned_ip(&self) -> std::option::Option<&str> {
        self.customer_owned_ip.as_deref()
    }
    /// <p>The carrier IP address associated with the network interface.</p>
    /// <p>This option is only available when the network interface is in a subnet which is associated with a Wavelength Zone.</p>
    pub fn carrier_ip(&self) -> std::option::Option<&str> {
        self.carrier_ip.as_deref()
    }
}
/// See [`NetworkInterfaceAssociation`](crate::model::NetworkInterfaceAssociation).
pub mod network_interface_association {

    /// A builder for [`NetworkInterfaceAssociation`](crate::model::NetworkInterfaceAssociation).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) allocation_id: std::option::Option<std::string::String>,
        pub(crate) association_id: std::option::Option<std::string::String>,
        pub(crate) ip_owner_id: std::option::Option<std::string::String>,
        pub(crate) public_dns_name: std::option::Option<std::string::String>,
        pub(crate) public_ip: std::option::Option<std::string::String>,
        pub(crate) customer_owned_ip: std::option::Option<std::string::String>,
        pub(crate) carrier_ip: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The allocation ID.</p>
        pub fn allocation_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.allocation_id = Some(input.into());
            self
        }
        /// <p>The allocation ID.</p>
        pub fn set_allocation_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.allocation_id = input;
            self
        }
        /// <p>The association ID.</p>
        pub fn association_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.association_id = Some(input.into());
            self
        }
        /// <p>The association ID.</p>
        pub fn set_association_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.association_id = input;
            self
        }
        /// <p>The ID of the Elastic IP address owner.</p>
        pub fn ip_owner_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.ip_owner_id = Some(input.into());
            self
        }
        /// <p>The ID of the Elastic IP address owner.</p>
        pub fn set_ip_owner_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.ip_owner_id = input;
            self
        }
        /// <p>The public DNS name.</p>
        pub fn public_dns_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.public_dns_name = Some(input.into());
            self
        }
        /// <p>The public DNS name.</p>
        pub fn set_public_dns_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.public_dns_name = input;
            self
        }
        /// <p>The address of the Elastic IP address bound to the network interface.</p>
        pub fn public_ip(mut self, input: impl Into<std::string::String>) -> Self {
            self.public_ip = Some(input.into());
            self
        }
        /// <p>The address of the Elastic IP address bound to the network interface.</p>
        pub fn set_public_ip(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.public_ip = input;
            self
        }
        /// <p>The customer-owned IP address associated with the network interface.</p>
        pub fn customer_owned_ip(mut self, input: impl Into<std::string::String>) -> Self {
            self.customer_owned_ip = Some(input.into());
            self
        }
        /// <p>The customer-owned IP address associated with the network interface.</p>
        pub fn set_customer_owned_ip(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.customer_owned_ip = input;
            self
        }
        /// <p>The carrier IP address associated with the network interface.</p>
        /// <p>This option is only available when the network interface is in a subnet which is associated with a Wavelength Zone.</p>
        pub fn carrier_ip(mut self, input: impl Into<std::string::String>) -> Self {
            self.carrier_ip = Some(input.into());
            self
        }
        /// <p>The carrier IP address associated with the network interface.</p>
        /// <p>This option is only available when the network interface is in a subnet which is associated with a Wavelength Zone.</p>
        pub fn set_carrier_ip(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.carrier_ip = input;
            self
        }
        /// Consumes the builder and constructs a [`NetworkInterfaceAssociation`](crate::model::NetworkInterfaceAssociation).
        pub fn build(self) -> crate::model::NetworkInterfaceAssociation {
            crate::model::NetworkInterfaceAssociation {
                allocation_id: self.allocation_id,
                association_id: self.association_id,
                ip_owner_id: self.ip_owner_id,
                public_dns_name: self.public_dns_name,
                public_ip: self.public_ip,
                customer_owned_ip: self.customer_owned_ip,
                carrier_ip: self.carrier_ip,
            }
        }
    }
}
impl NetworkInterfaceAssociation {
    /// Creates a new builder-style object to manufacture [`NetworkInterfaceAssociation`](crate::model::NetworkInterfaceAssociation).
    pub fn builder() -> crate::model::network_interface_association::Builder {
        crate::model::network_interface_association::Builder::default()
    }
}

/// <p>Describes an IPv6 address associated with a network interface.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct NetworkInterfaceIpv6Address {
    /// <p>The IPv6 address.</p>
    #[doc(hidden)]
    pub ipv6_address: std::option::Option<std::string::String>,
}
impl NetworkInterfaceIpv6Address {
    /// <p>The IPv6 address.</p>
    pub fn ipv6_address(&self) -> std::option::Option<&str> {
        self.ipv6_address.as_deref()
    }
}
/// See [`NetworkInterfaceIpv6Address`](crate::model::NetworkInterfaceIpv6Address).
pub mod network_interface_ipv6_address {

    /// A builder for [`NetworkInterfaceIpv6Address`](crate::model::NetworkInterfaceIpv6Address).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) ipv6_address: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The IPv6 address.</p>
        pub fn ipv6_address(mut self, input: impl Into<std::string::String>) -> Self {
            self.ipv6_address = Some(input.into());
            self
        }
        /// <p>The IPv6 address.</p>
        pub fn set_ipv6_address(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.ipv6_address = input;
            self
        }
        /// Consumes the builder and constructs a [`NetworkInterfaceIpv6Address`](crate::model::NetworkInterfaceIpv6Address).
        pub fn build(self) -> crate::model::NetworkInterfaceIpv6Address {
            crate::model::NetworkInterfaceIpv6Address {
                ipv6_address: self.ipv6_address,
            }
        }
    }
}
impl NetworkInterfaceIpv6Address {
    /// Creates a new builder-style object to manufacture [`NetworkInterfaceIpv6Address`](crate::model::NetworkInterfaceIpv6Address).
    pub fn builder() -> crate::model::network_interface_ipv6_address::Builder {
        crate::model::network_interface_ipv6_address::Builder::default()
    }
}

/// When writing a match expression against `NetworkInterfaceType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let networkinterfacetype = unimplemented!();
/// match networkinterfacetype {
///     NetworkInterfaceType::ApiGatewayManaged => { /* ... */ },
///     NetworkInterfaceType::AwsCodestarConnectionsManaged => { /* ... */ },
///     NetworkInterfaceType::Branch => { /* ... */ },
///     NetworkInterfaceType::Efa => { /* ... */ },
///     NetworkInterfaceType::GatewayLoadBalancer => { /* ... */ },
///     NetworkInterfaceType::GatewayLoadBalancerEndpoint => { /* ... */ },
///     NetworkInterfaceType::GlobalAcceleratorManaged => { /* ... */ },
///     NetworkInterfaceType::Interface => { /* ... */ },
///     NetworkInterfaceType::IotRulesManaged => { /* ... */ },
///     NetworkInterfaceType::Lambda => { /* ... */ },
///     NetworkInterfaceType::LoadBalancer => { /* ... */ },
///     NetworkInterfaceType::NatGateway => { /* ... */ },
///     NetworkInterfaceType::NetworkLoadBalancer => { /* ... */ },
///     NetworkInterfaceType::Quicksight => { /* ... */ },
///     NetworkInterfaceType::TransitGateway => { /* ... */ },
///     NetworkInterfaceType::Trunk => { /* ... */ },
///     NetworkInterfaceType::VpcEndpoint => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `networkinterfacetype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `NetworkInterfaceType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `NetworkInterfaceType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `NetworkInterfaceType::NewFeature` is defined.
/// Specifically, when `networkinterfacetype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `NetworkInterfaceType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 NetworkInterfaceType {
    #[allow(missing_docs)] // documentation missing in model
    ApiGatewayManaged,
    #[allow(missing_docs)] // documentation missing in model
    AwsCodestarConnectionsManaged,
    #[allow(missing_docs)] // documentation missing in model
    Branch,
    #[allow(missing_docs)] // documentation missing in model
    Efa,
    #[allow(missing_docs)] // documentation missing in model
    GatewayLoadBalancer,
    #[allow(missing_docs)] // documentation missing in model
    GatewayLoadBalancerEndpoint,
    #[allow(missing_docs)] // documentation missing in model
    GlobalAcceleratorManaged,
    #[allow(missing_docs)] // documentation missing in model
    Interface,
    #[allow(missing_docs)] // documentation missing in model
    IotRulesManaged,
    #[allow(missing_docs)] // documentation missing in model
    Lambda,
    #[allow(missing_docs)] // documentation missing in model
    LoadBalancer,
    #[allow(missing_docs)] // documentation missing in model
    NatGateway,
    #[allow(missing_docs)] // documentation missing in model
    NetworkLoadBalancer,
    #[allow(missing_docs)] // documentation missing in model
    Quicksight,
    #[allow(missing_docs)] // documentation missing in model
    TransitGateway,
    #[allow(missing_docs)] // documentation missing in model
    Trunk,
    #[allow(missing_docs)] // documentation missing in model
    VpcEndpoint,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for NetworkInterfaceType {
    fn from(s: &str) -> Self {
        match s {
            "api_gateway_managed" => NetworkInterfaceType::ApiGatewayManaged,
            "aws_codestar_connections_managed" => {
                NetworkInterfaceType::AwsCodestarConnectionsManaged
            }
            "branch" => NetworkInterfaceType::Branch,
            "efa" => NetworkInterfaceType::Efa,
            "gateway_load_balancer" => NetworkInterfaceType::GatewayLoadBalancer,
            "gateway_load_balancer_endpoint" => NetworkInterfaceType::GatewayLoadBalancerEndpoint,
            "global_accelerator_managed" => NetworkInterfaceType::GlobalAcceleratorManaged,
            "interface" => NetworkInterfaceType::Interface,
            "iot_rules_managed" => NetworkInterfaceType::IotRulesManaged,
            "lambda" => NetworkInterfaceType::Lambda,
            "load_balancer" => NetworkInterfaceType::LoadBalancer,
            "natGateway" => NetworkInterfaceType::NatGateway,
            "network_load_balancer" => NetworkInterfaceType::NetworkLoadBalancer,
            "quicksight" => NetworkInterfaceType::Quicksight,
            "transit_gateway" => NetworkInterfaceType::TransitGateway,
            "trunk" => NetworkInterfaceType::Trunk,
            "vpc_endpoint" => NetworkInterfaceType::VpcEndpoint,
            other => {
                NetworkInterfaceType::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for NetworkInterfaceType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(NetworkInterfaceType::from(s))
    }
}
impl NetworkInterfaceType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            NetworkInterfaceType::ApiGatewayManaged => "api_gateway_managed",
            NetworkInterfaceType::AwsCodestarConnectionsManaged => {
                "aws_codestar_connections_managed"
            }
            NetworkInterfaceType::Branch => "branch",
            NetworkInterfaceType::Efa => "efa",
            NetworkInterfaceType::GatewayLoadBalancer => "gateway_load_balancer",
            NetworkInterfaceType::GatewayLoadBalancerEndpoint => "gateway_load_balancer_endpoint",
            NetworkInterfaceType::GlobalAcceleratorManaged => "global_accelerator_managed",
            NetworkInterfaceType::Interface => "interface",
            NetworkInterfaceType::IotRulesManaged => "iot_rules_managed",
            NetworkInterfaceType::Lambda => "lambda",
            NetworkInterfaceType::LoadBalancer => "load_balancer",
            NetworkInterfaceType::NatGateway => "natGateway",
            NetworkInterfaceType::NetworkLoadBalancer => "network_load_balancer",
            NetworkInterfaceType::Quicksight => "quicksight",
            NetworkInterfaceType::TransitGateway => "transit_gateway",
            NetworkInterfaceType::Trunk => "trunk",
            NetworkInterfaceType::VpcEndpoint => "vpc_endpoint",
            NetworkInterfaceType::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &[
            "api_gateway_managed",
            "aws_codestar_connections_managed",
            "branch",
            "efa",
            "gateway_load_balancer",
            "gateway_load_balancer_endpoint",
            "global_accelerator_managed",
            "interface",
            "iot_rules_managed",
            "lambda",
            "load_balancer",
            "natGateway",
            "network_load_balancer",
            "quicksight",
            "transit_gateway",
            "trunk",
            "vpc_endpoint",
        ]
    }
}
impl AsRef<str> for NetworkInterfaceType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes a network interface attachment.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct NetworkInterfaceAttachment {
    /// <p>The timestamp indicating when the attachment initiated.</p>
    #[doc(hidden)]
    pub attach_time: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The ID of the network interface attachment.</p>
    #[doc(hidden)]
    pub attachment_id: std::option::Option<std::string::String>,
    /// <p>Indicates whether the network interface is deleted when the instance is terminated.</p>
    #[doc(hidden)]
    pub delete_on_termination: std::option::Option<bool>,
    /// <p>The device index of the network interface attachment on the instance.</p>
    #[doc(hidden)]
    pub device_index: std::option::Option<i32>,
    /// <p>The index of the network card.</p>
    #[doc(hidden)]
    pub network_card_index: std::option::Option<i32>,
    /// <p>The ID of the instance.</p>
    #[doc(hidden)]
    pub instance_id: std::option::Option<std::string::String>,
    /// <p>The Amazon Web Services account ID of the owner of the instance.</p>
    #[doc(hidden)]
    pub instance_owner_id: std::option::Option<std::string::String>,
    /// <p>The attachment state.</p>
    #[doc(hidden)]
    pub status: std::option::Option<crate::model::AttachmentStatus>,
    /// <p>Configures ENA Express for the network interface that this action attaches to the instance.</p>
    #[doc(hidden)]
    pub ena_srd_specification: std::option::Option<crate::model::AttachmentEnaSrdSpecification>,
}
impl NetworkInterfaceAttachment {
    /// <p>The timestamp indicating when the attachment initiated.</p>
    pub fn attach_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.attach_time.as_ref()
    }
    /// <p>The ID of the network interface attachment.</p>
    pub fn attachment_id(&self) -> std::option::Option<&str> {
        self.attachment_id.as_deref()
    }
    /// <p>Indicates whether the network interface is deleted when the instance is terminated.</p>
    pub fn delete_on_termination(&self) -> std::option::Option<bool> {
        self.delete_on_termination
    }
    /// <p>The device index of the network interface attachment on the instance.</p>
    pub fn device_index(&self) -> std::option::Option<i32> {
        self.device_index
    }
    /// <p>The index of the network card.</p>
    pub fn network_card_index(&self) -> std::option::Option<i32> {
        self.network_card_index
    }
    /// <p>The ID of the instance.</p>
    pub fn instance_id(&self) -> std::option::Option<&str> {
        self.instance_id.as_deref()
    }
    /// <p>The Amazon Web Services account ID of the owner of the instance.</p>
    pub fn instance_owner_id(&self) -> std::option::Option<&str> {
        self.instance_owner_id.as_deref()
    }
    /// <p>The attachment state.</p>
    pub fn status(&self) -> std::option::Option<&crate::model::AttachmentStatus> {
        self.status.as_ref()
    }
    /// <p>Configures ENA Express for the network interface that this action attaches to the instance.</p>
    pub fn ena_srd_specification(
        &self,
    ) -> std::option::Option<&crate::model::AttachmentEnaSrdSpecification> {
        self.ena_srd_specification.as_ref()
    }
}
/// See [`NetworkInterfaceAttachment`](crate::model::NetworkInterfaceAttachment).
pub mod network_interface_attachment {

    /// A builder for [`NetworkInterfaceAttachment`](crate::model::NetworkInterfaceAttachment).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) attach_time: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) attachment_id: std::option::Option<std::string::String>,
        pub(crate) delete_on_termination: std::option::Option<bool>,
        pub(crate) device_index: std::option::Option<i32>,
        pub(crate) network_card_index: std::option::Option<i32>,
        pub(crate) instance_id: std::option::Option<std::string::String>,
        pub(crate) instance_owner_id: std::option::Option<std::string::String>,
        pub(crate) status: std::option::Option<crate::model::AttachmentStatus>,
        pub(crate) ena_srd_specification:
            std::option::Option<crate::model::AttachmentEnaSrdSpecification>,
    }
    impl Builder {
        /// <p>The timestamp indicating when the attachment initiated.</p>
        pub fn attach_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.attach_time = Some(input);
            self
        }
        /// <p>The timestamp indicating when the attachment initiated.</p>
        pub fn set_attach_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.attach_time = input;
            self
        }
        /// <p>The ID of the network interface attachment.</p>
        pub fn attachment_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.attachment_id = Some(input.into());
            self
        }
        /// <p>The ID of the network interface attachment.</p>
        pub fn set_attachment_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.attachment_id = input;
            self
        }
        /// <p>Indicates whether the network interface is deleted when the instance is terminated.</p>
        pub fn delete_on_termination(mut self, input: bool) -> Self {
            self.delete_on_termination = Some(input);
            self
        }
        /// <p>Indicates whether the network interface is deleted when the instance is terminated.</p>
        pub fn set_delete_on_termination(mut self, input: std::option::Option<bool>) -> Self {
            self.delete_on_termination = input;
            self
        }
        /// <p>The device index of the network interface attachment on the instance.</p>
        pub fn device_index(mut self, input: i32) -> Self {
            self.device_index = Some(input);
            self
        }
        /// <p>The device index of the network interface attachment on the instance.</p>
        pub fn set_device_index(mut self, input: std::option::Option<i32>) -> Self {
            self.device_index = input;
            self
        }
        /// <p>The index of the network card.</p>
        pub fn network_card_index(mut self, input: i32) -> Self {
            self.network_card_index = Some(input);
            self
        }
        /// <p>The index of the network card.</p>
        pub fn set_network_card_index(mut self, input: std::option::Option<i32>) -> Self {
            self.network_card_index = input;
            self
        }
        /// <p>The ID of the instance.</p>
        pub fn instance_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.instance_id = Some(input.into());
            self
        }
        /// <p>The ID of the instance.</p>
        pub fn set_instance_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.instance_id = input;
            self
        }
        /// <p>The Amazon Web Services account ID of the owner of the instance.</p>
        pub fn instance_owner_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.instance_owner_id = Some(input.into());
            self
        }
        /// <p>The Amazon Web Services account ID of the owner of the instance.</p>
        pub fn set_instance_owner_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.instance_owner_id = input;
            self
        }
        /// <p>The attachment state.</p>
        pub fn status(mut self, input: crate::model::AttachmentStatus) -> Self {
            self.status = Some(input);
            self
        }
        /// <p>The attachment state.</p>
        pub fn set_status(
            mut self,
            input: std::option::Option<crate::model::AttachmentStatus>,
        ) -> Self {
            self.status = input;
            self
        }
        /// <p>Configures ENA Express for the network interface that this action attaches to the instance.</p>
        pub fn ena_srd_specification(
            mut self,
            input: crate::model::AttachmentEnaSrdSpecification,
        ) -> Self {
            self.ena_srd_specification = Some(input);
            self
        }
        /// <p>Configures ENA Express for the network interface that this action attaches to the instance.</p>
        pub fn set_ena_srd_specification(
            mut self,
            input: std::option::Option<crate::model::AttachmentEnaSrdSpecification>,
        ) -> Self {
            self.ena_srd_specification = input;
            self
        }
        /// Consumes the builder and constructs a [`NetworkInterfaceAttachment`](crate::model::NetworkInterfaceAttachment).
        pub fn build(self) -> crate::model::NetworkInterfaceAttachment {
            crate::model::NetworkInterfaceAttachment {
                attach_time: self.attach_time,
                attachment_id: self.attachment_id,
                delete_on_termination: self.delete_on_termination,
                device_index: self.device_index,
                network_card_index: self.network_card_index,
                instance_id: self.instance_id,
                instance_owner_id: self.instance_owner_id,
                status: self.status,
                ena_srd_specification: self.ena_srd_specification,
            }
        }
    }
}
impl NetworkInterfaceAttachment {
    /// Creates a new builder-style object to manufacture [`NetworkInterfaceAttachment`](crate::model::NetworkInterfaceAttachment).
    pub fn builder() -> crate::model::network_interface_attachment::Builder {
        crate::model::network_interface_attachment::Builder::default()
    }
}

/// <p>Describes the ENA Express configuration for the network interface that's attached to the instance.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AttachmentEnaSrdSpecification {
    /// <p>Indicates whether ENA Express is enabled for the network interface that's attached to the instance.</p>
    #[doc(hidden)]
    pub ena_srd_enabled: std::option::Option<bool>,
    /// <p>ENA Express configuration for UDP network traffic.</p>
    #[doc(hidden)]
    pub ena_srd_udp_specification:
        std::option::Option<crate::model::AttachmentEnaSrdUdpSpecification>,
}
impl AttachmentEnaSrdSpecification {
    /// <p>Indicates whether ENA Express is enabled for the network interface that's attached to the instance.</p>
    pub fn ena_srd_enabled(&self) -> std::option::Option<bool> {
        self.ena_srd_enabled
    }
    /// <p>ENA Express configuration for UDP network traffic.</p>
    pub fn ena_srd_udp_specification(
        &self,
    ) -> std::option::Option<&crate::model::AttachmentEnaSrdUdpSpecification> {
        self.ena_srd_udp_specification.as_ref()
    }
}
/// See [`AttachmentEnaSrdSpecification`](crate::model::AttachmentEnaSrdSpecification).
pub mod attachment_ena_srd_specification {

    /// A builder for [`AttachmentEnaSrdSpecification`](crate::model::AttachmentEnaSrdSpecification).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) ena_srd_enabled: std::option::Option<bool>,
        pub(crate) ena_srd_udp_specification:
            std::option::Option<crate::model::AttachmentEnaSrdUdpSpecification>,
    }
    impl Builder {
        /// <p>Indicates whether ENA Express is enabled for the network interface that's attached to the instance.</p>
        pub fn ena_srd_enabled(mut self, input: bool) -> Self {
            self.ena_srd_enabled = Some(input);
            self
        }
        /// <p>Indicates whether ENA Express is enabled for the network interface that's attached to the instance.</p>
        pub fn set_ena_srd_enabled(mut self, input: std::option::Option<bool>) -> Self {
            self.ena_srd_enabled = input;
            self
        }
        /// <p>ENA Express configuration for UDP network traffic.</p>
        pub fn ena_srd_udp_specification(
            mut self,
            input: crate::model::AttachmentEnaSrdUdpSpecification,
        ) -> Self {
            self.ena_srd_udp_specification = Some(input);
            self
        }
        /// <p>ENA Express configuration for UDP network traffic.</p>
        pub fn set_ena_srd_udp_specification(
            mut self,
            input: std::option::Option<crate::model::AttachmentEnaSrdUdpSpecification>,
        ) -> Self {
            self.ena_srd_udp_specification = input;
            self
        }
        /// Consumes the builder and constructs a [`AttachmentEnaSrdSpecification`](crate::model::AttachmentEnaSrdSpecification).
        pub fn build(self) -> crate::model::AttachmentEnaSrdSpecification {
            crate::model::AttachmentEnaSrdSpecification {
                ena_srd_enabled: self.ena_srd_enabled,
                ena_srd_udp_specification: self.ena_srd_udp_specification,
            }
        }
    }
}
impl AttachmentEnaSrdSpecification {
    /// Creates a new builder-style object to manufacture [`AttachmentEnaSrdSpecification`](crate::model::AttachmentEnaSrdSpecification).
    pub fn builder() -> crate::model::attachment_ena_srd_specification::Builder {
        crate::model::attachment_ena_srd_specification::Builder::default()
    }
}

/// <p>Describes the ENA Express configuration for UDP traffic on the network interface that's attached to the instance.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AttachmentEnaSrdUdpSpecification {
    /// <p>Indicates whether UDP traffic to and from the instance uses ENA Express. To specify this setting, you must first enable ENA Express.</p>
    #[doc(hidden)]
    pub ena_srd_udp_enabled: std::option::Option<bool>,
}
impl AttachmentEnaSrdUdpSpecification {
    /// <p>Indicates whether UDP traffic to and from the instance uses ENA Express. To specify this setting, you must first enable ENA Express.</p>
    pub fn ena_srd_udp_enabled(&self) -> std::option::Option<bool> {
        self.ena_srd_udp_enabled
    }
}
/// See [`AttachmentEnaSrdUdpSpecification`](crate::model::AttachmentEnaSrdUdpSpecification).
pub mod attachment_ena_srd_udp_specification {

    /// A builder for [`AttachmentEnaSrdUdpSpecification`](crate::model::AttachmentEnaSrdUdpSpecification).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) ena_srd_udp_enabled: std::option::Option<bool>,
    }
    impl Builder {
        /// <p>Indicates whether UDP traffic to and from the instance uses ENA Express. To specify this setting, you must first enable ENA Express.</p>
        pub fn ena_srd_udp_enabled(mut self, input: bool) -> Self {
            self.ena_srd_udp_enabled = Some(input);
            self
        }
        /// <p>Indicates whether UDP traffic to and from the instance uses ENA Express. To specify this setting, you must first enable ENA Express.</p>
        pub fn set_ena_srd_udp_enabled(mut self, input: std::option::Option<bool>) -> Self {
            self.ena_srd_udp_enabled = input;
            self
        }
        /// Consumes the builder and constructs a [`AttachmentEnaSrdUdpSpecification`](crate::model::AttachmentEnaSrdUdpSpecification).
        pub fn build(self) -> crate::model::AttachmentEnaSrdUdpSpecification {
            crate::model::AttachmentEnaSrdUdpSpecification {
                ena_srd_udp_enabled: self.ena_srd_udp_enabled,
            }
        }
    }
}
impl AttachmentEnaSrdUdpSpecification {
    /// Creates a new builder-style object to manufacture [`AttachmentEnaSrdUdpSpecification`](crate::model::AttachmentEnaSrdUdpSpecification).
    pub fn builder() -> crate::model::attachment_ena_srd_udp_specification::Builder {
        crate::model::attachment_ena_srd_udp_specification::Builder::default()
    }
}

/// <p>Describes a permission for a network interface.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct NetworkInterfacePermission {
    /// <p>The ID of the network interface permission.</p>
    #[doc(hidden)]
    pub network_interface_permission_id: std::option::Option<std::string::String>,
    /// <p>The ID of the network interface.</p>
    #[doc(hidden)]
    pub network_interface_id: std::option::Option<std::string::String>,
    /// <p>The Amazon Web Services account ID.</p>
    #[doc(hidden)]
    pub aws_account_id: std::option::Option<std::string::String>,
    /// <p>The Amazon Web Service.</p>
    #[doc(hidden)]
    pub aws_service: std::option::Option<std::string::String>,
    /// <p>The type of permission.</p>
    #[doc(hidden)]
    pub permission: std::option::Option<crate::model::InterfacePermissionType>,
    /// <p>Information about the state of the permission.</p>
    #[doc(hidden)]
    pub permission_state: std::option::Option<crate::model::NetworkInterfacePermissionState>,
}
impl NetworkInterfacePermission {
    /// <p>The ID of the network interface permission.</p>
    pub fn network_interface_permission_id(&self) -> std::option::Option<&str> {
        self.network_interface_permission_id.as_deref()
    }
    /// <p>The ID of the network interface.</p>
    pub fn network_interface_id(&self) -> std::option::Option<&str> {
        self.network_interface_id.as_deref()
    }
    /// <p>The Amazon Web Services account ID.</p>
    pub fn aws_account_id(&self) -> std::option::Option<&str> {
        self.aws_account_id.as_deref()
    }
    /// <p>The Amazon Web Service.</p>
    pub fn aws_service(&self) -> std::option::Option<&str> {
        self.aws_service.as_deref()
    }
    /// <p>The type of permission.</p>
    pub fn permission(&self) -> std::option::Option<&crate::model::InterfacePermissionType> {
        self.permission.as_ref()
    }
    /// <p>Information about the state of the permission.</p>
    pub fn permission_state(
        &self,
    ) -> std::option::Option<&crate::model::NetworkInterfacePermissionState> {
        self.permission_state.as_ref()
    }
}
/// See [`NetworkInterfacePermission`](crate::model::NetworkInterfacePermission).
pub mod network_interface_permission {

    /// A builder for [`NetworkInterfacePermission`](crate::model::NetworkInterfacePermission).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) network_interface_permission_id: std::option::Option<std::string::String>,
        pub(crate) network_interface_id: std::option::Option<std::string::String>,
        pub(crate) aws_account_id: std::option::Option<std::string::String>,
        pub(crate) aws_service: std::option::Option<std::string::String>,
        pub(crate) permission: std::option::Option<crate::model::InterfacePermissionType>,
        pub(crate) permission_state:
            std::option::Option<crate::model::NetworkInterfacePermissionState>,
    }
    impl Builder {
        /// <p>The ID of the network interface permission.</p>
        pub fn network_interface_permission_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.network_interface_permission_id = Some(input.into());
            self
        }
        /// <p>The ID of the network interface permission.</p>
        pub fn set_network_interface_permission_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.network_interface_permission_id = input;
            self
        }
        /// <p>The ID of the network interface.</p>
        pub fn network_interface_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.network_interface_id = Some(input.into());
            self
        }
        /// <p>The ID of the network interface.</p>
        pub fn set_network_interface_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.network_interface_id = input;
            self
        }
        /// <p>The Amazon Web Services account ID.</p>
        pub fn aws_account_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.aws_account_id = Some(input.into());
            self
        }
        /// <p>The Amazon Web Services account ID.</p>
        pub fn set_aws_account_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.aws_account_id = input;
            self
        }
        /// <p>The Amazon Web Service.</p>
        pub fn aws_service(mut self, input: impl Into<std::string::String>) -> Self {
            self.aws_service = Some(input.into());
            self
        }
        /// <p>The Amazon Web Service.</p>
        pub fn set_aws_service(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.aws_service = input;
            self
        }
        /// <p>The type of permission.</p>
        pub fn permission(mut self, input: crate::model::InterfacePermissionType) -> Self {
            self.permission = Some(input);
            self
        }
        /// <p>The type of permission.</p>
        pub fn set_permission(
            mut self,
            input: std::option::Option<crate::model::InterfacePermissionType>,
        ) -> Self {
            self.permission = input;
            self
        }
        /// <p>Information about the state of the permission.</p>
        pub fn permission_state(
            mut self,
            input: crate::model::NetworkInterfacePermissionState,
        ) -> Self {
            self.permission_state = Some(input);
            self
        }
        /// <p>Information about the state of the permission.</p>
        pub fn set_permission_state(
            mut self,
            input: std::option::Option<crate::model::NetworkInterfacePermissionState>,
        ) -> Self {
            self.permission_state = input;
            self
        }
        /// Consumes the builder and constructs a [`NetworkInterfacePermission`](crate::model::NetworkInterfacePermission).
        pub fn build(self) -> crate::model::NetworkInterfacePermission {
            crate::model::NetworkInterfacePermission {
                network_interface_permission_id: self.network_interface_permission_id,
                network_interface_id: self.network_interface_id,
                aws_account_id: self.aws_account_id,
                aws_service: self.aws_service,
                permission: self.permission,
                permission_state: self.permission_state,
            }
        }
    }
}
impl NetworkInterfacePermission {
    /// Creates a new builder-style object to manufacture [`NetworkInterfacePermission`](crate::model::NetworkInterfacePermission).
    pub fn builder() -> crate::model::network_interface_permission::Builder {
        crate::model::network_interface_permission::Builder::default()
    }
}

/// <p>Describes the state of a network interface permission.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct NetworkInterfacePermissionState {
    /// <p>The state of the permission.</p>
    #[doc(hidden)]
    pub state: std::option::Option<crate::model::NetworkInterfacePermissionStateCode>,
    /// <p>A status message, if applicable.</p>
    #[doc(hidden)]
    pub status_message: std::option::Option<std::string::String>,
}
impl NetworkInterfacePermissionState {
    /// <p>The state of the permission.</p>
    pub fn state(&self) -> std::option::Option<&crate::model::NetworkInterfacePermissionStateCode> {
        self.state.as_ref()
    }
    /// <p>A status message, if applicable.</p>
    pub fn status_message(&self) -> std::option::Option<&str> {
        self.status_message.as_deref()
    }
}
/// See [`NetworkInterfacePermissionState`](crate::model::NetworkInterfacePermissionState).
pub mod network_interface_permission_state {

    /// A builder for [`NetworkInterfacePermissionState`](crate::model::NetworkInterfacePermissionState).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) state: std::option::Option<crate::model::NetworkInterfacePermissionStateCode>,
        pub(crate) status_message: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The state of the permission.</p>
        pub fn state(mut self, input: crate::model::NetworkInterfacePermissionStateCode) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>The state of the permission.</p>
        pub fn set_state(
            mut self,
            input: std::option::Option<crate::model::NetworkInterfacePermissionStateCode>,
        ) -> Self {
            self.state = input;
            self
        }
        /// <p>A status message, if applicable.</p>
        pub fn status_message(mut self, input: impl Into<std::string::String>) -> Self {
            self.status_message = Some(input.into());
            self
        }
        /// <p>A status message, if applicable.</p>
        pub fn set_status_message(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.status_message = input;
            self
        }
        /// Consumes the builder and constructs a [`NetworkInterfacePermissionState`](crate::model::NetworkInterfacePermissionState).
        pub fn build(self) -> crate::model::NetworkInterfacePermissionState {
            crate::model::NetworkInterfacePermissionState {
                state: self.state,
                status_message: self.status_message,
            }
        }
    }
}
impl NetworkInterfacePermissionState {
    /// Creates a new builder-style object to manufacture [`NetworkInterfacePermissionState`](crate::model::NetworkInterfacePermissionState).
    pub fn builder() -> crate::model::network_interface_permission_state::Builder {
        crate::model::network_interface_permission_state::Builder::default()
    }
}

/// When writing a match expression against `NetworkInterfacePermissionStateCode`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let networkinterfacepermissionstatecode = unimplemented!();
/// match networkinterfacepermissionstatecode {
///     NetworkInterfacePermissionStateCode::Granted => { /* ... */ },
///     NetworkInterfacePermissionStateCode::Pending => { /* ... */ },
///     NetworkInterfacePermissionStateCode::Revoked => { /* ... */ },
///     NetworkInterfacePermissionStateCode::Revoking => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `networkinterfacepermissionstatecode` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `NetworkInterfacePermissionStateCode::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `NetworkInterfacePermissionStateCode::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `NetworkInterfacePermissionStateCode::NewFeature` is defined.
/// Specifically, when `networkinterfacepermissionstatecode` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `NetworkInterfacePermissionStateCode::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 NetworkInterfacePermissionStateCode {
    #[allow(missing_docs)] // documentation missing in model
    Granted,
    #[allow(missing_docs)] // documentation missing in model
    Pending,
    #[allow(missing_docs)] // documentation missing in model
    Revoked,
    #[allow(missing_docs)] // documentation missing in model
    Revoking,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for NetworkInterfacePermissionStateCode {
    fn from(s: &str) -> Self {
        match s {
            "granted" => NetworkInterfacePermissionStateCode::Granted,
            "pending" => NetworkInterfacePermissionStateCode::Pending,
            "revoked" => NetworkInterfacePermissionStateCode::Revoked,
            "revoking" => NetworkInterfacePermissionStateCode::Revoking,
            other => NetworkInterfacePermissionStateCode::Unknown(
                crate::types::UnknownVariantValue(other.to_owned()),
            ),
        }
    }
}
impl std::str::FromStr for NetworkInterfacePermissionStateCode {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(NetworkInterfacePermissionStateCode::from(s))
    }
}
impl NetworkInterfacePermissionStateCode {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            NetworkInterfacePermissionStateCode::Granted => "granted",
            NetworkInterfacePermissionStateCode::Pending => "pending",
            NetworkInterfacePermissionStateCode::Revoked => "revoked",
            NetworkInterfacePermissionStateCode::Revoking => "revoking",
            NetworkInterfacePermissionStateCode::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["granted", "pending", "revoked", "revoking"]
    }
}
impl AsRef<str> for NetworkInterfacePermissionStateCode {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `InterfacePermissionType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let interfacepermissiontype = unimplemented!();
/// match interfacepermissiontype {
///     InterfacePermissionType::EipAssociate => { /* ... */ },
///     InterfacePermissionType::InstanceAttach => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `interfacepermissiontype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `InterfacePermissionType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `InterfacePermissionType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `InterfacePermissionType::NewFeature` is defined.
/// Specifically, when `interfacepermissiontype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `InterfacePermissionType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 InterfacePermissionType {
    #[allow(missing_docs)] // documentation missing in model
    EipAssociate,
    #[allow(missing_docs)] // documentation missing in model
    InstanceAttach,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for InterfacePermissionType {
    fn from(s: &str) -> Self {
        match s {
            "EIP-ASSOCIATE" => InterfacePermissionType::EipAssociate,
            "INSTANCE-ATTACH" => InterfacePermissionType::InstanceAttach,
            other => InterfacePermissionType::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for InterfacePermissionType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(InterfacePermissionType::from(s))
    }
}
impl InterfacePermissionType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            InterfacePermissionType::EipAssociate => "EIP-ASSOCIATE",
            InterfacePermissionType::InstanceAttach => "INSTANCE-ATTACH",
            InterfacePermissionType::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["EIP-ASSOCIATE", "INSTANCE-ATTACH"]
    }
}
impl AsRef<str> for InterfacePermissionType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `NetworkInterfaceAttribute`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let networkinterfaceattribute = unimplemented!();
/// match networkinterfaceattribute {
///     NetworkInterfaceAttribute::Attachment => { /* ... */ },
///     NetworkInterfaceAttribute::Description => { /* ... */ },
///     NetworkInterfaceAttribute::GroupSet => { /* ... */ },
///     NetworkInterfaceAttribute::SourceDestCheck => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `networkinterfaceattribute` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `NetworkInterfaceAttribute::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `NetworkInterfaceAttribute::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `NetworkInterfaceAttribute::NewFeature` is defined.
/// Specifically, when `networkinterfaceattribute` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `NetworkInterfaceAttribute::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 NetworkInterfaceAttribute {
    #[allow(missing_docs)] // documentation missing in model
    Attachment,
    #[allow(missing_docs)] // documentation missing in model
    Description,
    #[allow(missing_docs)] // documentation missing in model
    GroupSet,
    #[allow(missing_docs)] // documentation missing in model
    SourceDestCheck,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for NetworkInterfaceAttribute {
    fn from(s: &str) -> Self {
        match s {
            "attachment" => NetworkInterfaceAttribute::Attachment,
            "description" => NetworkInterfaceAttribute::Description,
            "groupSet" => NetworkInterfaceAttribute::GroupSet,
            "sourceDestCheck" => NetworkInterfaceAttribute::SourceDestCheck,
            other => NetworkInterfaceAttribute::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for NetworkInterfaceAttribute {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(NetworkInterfaceAttribute::from(s))
    }
}
impl NetworkInterfaceAttribute {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            NetworkInterfaceAttribute::Attachment => "attachment",
            NetworkInterfaceAttribute::Description => "description",
            NetworkInterfaceAttribute::GroupSet => "groupSet",
            NetworkInterfaceAttribute::SourceDestCheck => "sourceDestCheck",
            NetworkInterfaceAttribute::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["attachment", "description", "groupSet", "sourceDestCheck"]
    }
}
impl AsRef<str> for NetworkInterfaceAttribute {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes a path.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct NetworkInsightsPath {
    /// <p>The ID of the path.</p>
    #[doc(hidden)]
    pub network_insights_path_id: std::option::Option<std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the path.</p>
    #[doc(hidden)]
    pub network_insights_path_arn: std::option::Option<std::string::String>,
    /// <p>The time stamp when the path was created.</p>
    #[doc(hidden)]
    pub created_date: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The Amazon Web Services resource that is the source of the path.</p>
    #[doc(hidden)]
    pub source: std::option::Option<std::string::String>,
    /// <p>The Amazon Web Services resource that is the destination of the path.</p>
    #[doc(hidden)]
    pub destination: std::option::Option<std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the source.</p>
    #[doc(hidden)]
    pub source_arn: std::option::Option<std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the destination.</p>
    #[doc(hidden)]
    pub destination_arn: std::option::Option<std::string::String>,
    /// <p>The IP address of the Amazon Web Services resource that is the source of the path.</p>
    #[doc(hidden)]
    pub source_ip: std::option::Option<std::string::String>,
    /// <p>The IP address of the Amazon Web Services resource that is the destination of the path.</p>
    #[doc(hidden)]
    pub destination_ip: std::option::Option<std::string::String>,
    /// <p>The protocol.</p>
    #[doc(hidden)]
    pub protocol: std::option::Option<crate::model::Protocol>,
    /// <p>The destination port.</p>
    #[doc(hidden)]
    pub destination_port: std::option::Option<i32>,
    /// <p>The tags associated with the path.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl NetworkInsightsPath {
    /// <p>The ID of the path.</p>
    pub fn network_insights_path_id(&self) -> std::option::Option<&str> {
        self.network_insights_path_id.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the path.</p>
    pub fn network_insights_path_arn(&self) -> std::option::Option<&str> {
        self.network_insights_path_arn.as_deref()
    }
    /// <p>The time stamp when the path was created.</p>
    pub fn created_date(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.created_date.as_ref()
    }
    /// <p>The Amazon Web Services resource that is the source of the path.</p>
    pub fn source(&self) -> std::option::Option<&str> {
        self.source.as_deref()
    }
    /// <p>The Amazon Web Services resource that is the destination of the path.</p>
    pub fn destination(&self) -> std::option::Option<&str> {
        self.destination.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the source.</p>
    pub fn source_arn(&self) -> std::option::Option<&str> {
        self.source_arn.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the destination.</p>
    pub fn destination_arn(&self) -> std::option::Option<&str> {
        self.destination_arn.as_deref()
    }
    /// <p>The IP address of the Amazon Web Services resource that is the source of the path.</p>
    pub fn source_ip(&self) -> std::option::Option<&str> {
        self.source_ip.as_deref()
    }
    /// <p>The IP address of the Amazon Web Services resource that is the destination of the path.</p>
    pub fn destination_ip(&self) -> std::option::Option<&str> {
        self.destination_ip.as_deref()
    }
    /// <p>The protocol.</p>
    pub fn protocol(&self) -> std::option::Option<&crate::model::Protocol> {
        self.protocol.as_ref()
    }
    /// <p>The destination port.</p>
    pub fn destination_port(&self) -> std::option::Option<i32> {
        self.destination_port
    }
    /// <p>The tags associated with the path.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
}
/// See [`NetworkInsightsPath`](crate::model::NetworkInsightsPath).
pub mod network_insights_path {

    /// A builder for [`NetworkInsightsPath`](crate::model::NetworkInsightsPath).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) network_insights_path_id: std::option::Option<std::string::String>,
        pub(crate) network_insights_path_arn: std::option::Option<std::string::String>,
        pub(crate) created_date: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) source: std::option::Option<std::string::String>,
        pub(crate) destination: std::option::Option<std::string::String>,
        pub(crate) source_arn: std::option::Option<std::string::String>,
        pub(crate) destination_arn: std::option::Option<std::string::String>,
        pub(crate) source_ip: std::option::Option<std::string::String>,
        pub(crate) destination_ip: std::option::Option<std::string::String>,
        pub(crate) protocol: std::option::Option<crate::model::Protocol>,
        pub(crate) destination_port: std::option::Option<i32>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    }
    impl Builder {
        /// <p>The ID of the path.</p>
        pub fn network_insights_path_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.network_insights_path_id = Some(input.into());
            self
        }
        /// <p>The ID of the path.</p>
        pub fn set_network_insights_path_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.network_insights_path_id = input;
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the path.</p>
        pub fn network_insights_path_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.network_insights_path_arn = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the path.</p>
        pub fn set_network_insights_path_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.network_insights_path_arn = input;
            self
        }
        /// <p>The time stamp when the path was created.</p>
        pub fn created_date(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.created_date = Some(input);
            self
        }
        /// <p>The time stamp when the path was created.</p>
        pub fn set_created_date(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.created_date = input;
            self
        }
        /// <p>The Amazon Web Services resource that is the source of the path.</p>
        pub fn source(mut self, input: impl Into<std::string::String>) -> Self {
            self.source = Some(input.into());
            self
        }
        /// <p>The Amazon Web Services resource that is the source of the path.</p>
        pub fn set_source(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.source = input;
            self
        }
        /// <p>The Amazon Web Services resource that is the destination of the path.</p>
        pub fn destination(mut self, input: impl Into<std::string::String>) -> Self {
            self.destination = Some(input.into());
            self
        }
        /// <p>The Amazon Web Services resource that is the destination of the path.</p>
        pub fn set_destination(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.destination = input;
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the source.</p>
        pub fn source_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.source_arn = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the source.</p>
        pub fn set_source_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.source_arn = input;
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the destination.</p>
        pub fn destination_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.destination_arn = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the destination.</p>
        pub fn set_destination_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.destination_arn = input;
            self
        }
        /// <p>The IP address of the Amazon Web Services resource that is the source of the path.</p>
        pub fn source_ip(mut self, input: impl Into<std::string::String>) -> Self {
            self.source_ip = Some(input.into());
            self
        }
        /// <p>The IP address of the Amazon Web Services resource that is the source of the path.</p>
        pub fn set_source_ip(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.source_ip = input;
            self
        }
        /// <p>The IP address of the Amazon Web Services resource that is the destination of the path.</p>
        pub fn destination_ip(mut self, input: impl Into<std::string::String>) -> Self {
            self.destination_ip = Some(input.into());
            self
        }
        /// <p>The IP address of the Amazon Web Services resource that is the destination of the path.</p>
        pub fn set_destination_ip(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.destination_ip = input;
            self
        }
        /// <p>The protocol.</p>
        pub fn protocol(mut self, input: crate::model::Protocol) -> Self {
            self.protocol = Some(input);
            self
        }
        /// <p>The protocol.</p>
        pub fn set_protocol(mut self, input: std::option::Option<crate::model::Protocol>) -> Self {
            self.protocol = input;
            self
        }
        /// <p>The destination port.</p>
        pub fn destination_port(mut self, input: i32) -> Self {
            self.destination_port = Some(input);
            self
        }
        /// <p>The destination port.</p>
        pub fn set_destination_port(mut self, input: std::option::Option<i32>) -> Self {
            self.destination_port = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>The tags associated with the path.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>The tags associated with the path.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// Consumes the builder and constructs a [`NetworkInsightsPath`](crate::model::NetworkInsightsPath).
        pub fn build(self) -> crate::model::NetworkInsightsPath {
            crate::model::NetworkInsightsPath {
                network_insights_path_id: self.network_insights_path_id,
                network_insights_path_arn: self.network_insights_path_arn,
                created_date: self.created_date,
                source: self.source,
                destination: self.destination,
                source_arn: self.source_arn,
                destination_arn: self.destination_arn,
                source_ip: self.source_ip,
                destination_ip: self.destination_ip,
                protocol: self.protocol,
                destination_port: self.destination_port,
                tags: self.tags,
            }
        }
    }
}
impl NetworkInsightsPath {
    /// Creates a new builder-style object to manufacture [`NetworkInsightsPath`](crate::model::NetworkInsightsPath).
    pub fn builder() -> crate::model::network_insights_path::Builder {
        crate::model::network_insights_path::Builder::default()
    }
}

/// <p>Describes a Network Access Scope.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct NetworkInsightsAccessScope {
    /// <p>The ID of the Network Access Scope.</p>
    #[doc(hidden)]
    pub network_insights_access_scope_id: std::option::Option<std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the Network Access Scope.</p>
    #[doc(hidden)]
    pub network_insights_access_scope_arn: std::option::Option<std::string::String>,
    /// <p>The creation date.</p>
    #[doc(hidden)]
    pub created_date: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The last updated date.</p>
    #[doc(hidden)]
    pub updated_date: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The tags.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl NetworkInsightsAccessScope {
    /// <p>The ID of the Network Access Scope.</p>
    pub fn network_insights_access_scope_id(&self) -> std::option::Option<&str> {
        self.network_insights_access_scope_id.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the Network Access Scope.</p>
    pub fn network_insights_access_scope_arn(&self) -> std::option::Option<&str> {
        self.network_insights_access_scope_arn.as_deref()
    }
    /// <p>The creation date.</p>
    pub fn created_date(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.created_date.as_ref()
    }
    /// <p>The last updated date.</p>
    pub fn updated_date(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.updated_date.as_ref()
    }
    /// <p>The tags.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
}
/// See [`NetworkInsightsAccessScope`](crate::model::NetworkInsightsAccessScope).
pub mod network_insights_access_scope {

    /// A builder for [`NetworkInsightsAccessScope`](crate::model::NetworkInsightsAccessScope).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) network_insights_access_scope_id: std::option::Option<std::string::String>,
        pub(crate) network_insights_access_scope_arn: std::option::Option<std::string::String>,
        pub(crate) created_date: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) updated_date: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    }
    impl Builder {
        /// <p>The ID of the Network Access Scope.</p>
        pub fn network_insights_access_scope_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.network_insights_access_scope_id = Some(input.into());
            self
        }
        /// <p>The ID of the Network Access Scope.</p>
        pub fn set_network_insights_access_scope_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.network_insights_access_scope_id = input;
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the Network Access Scope.</p>
        pub fn network_insights_access_scope_arn(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.network_insights_access_scope_arn = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the Network Access Scope.</p>
        pub fn set_network_insights_access_scope_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.network_insights_access_scope_arn = input;
            self
        }
        /// <p>The creation date.</p>
        pub fn created_date(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.created_date = Some(input);
            self
        }
        /// <p>The creation date.</p>
        pub fn set_created_date(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.created_date = input;
            self
        }
        /// <p>The last updated date.</p>
        pub fn updated_date(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.updated_date = Some(input);
            self
        }
        /// <p>The last updated date.</p>
        pub fn set_updated_date(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.updated_date = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>The tags.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>The tags.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// Consumes the builder and constructs a [`NetworkInsightsAccessScope`](crate::model::NetworkInsightsAccessScope).
        pub fn build(self) -> crate::model::NetworkInsightsAccessScope {
            crate::model::NetworkInsightsAccessScope {
                network_insights_access_scope_id: self.network_insights_access_scope_id,
                network_insights_access_scope_arn: self.network_insights_access_scope_arn,
                created_date: self.created_date,
                updated_date: self.updated_date,
                tags: self.tags,
            }
        }
    }
}
impl NetworkInsightsAccessScope {
    /// Creates a new builder-style object to manufacture [`NetworkInsightsAccessScope`](crate::model::NetworkInsightsAccessScope).
    pub fn builder() -> crate::model::network_insights_access_scope::Builder {
        crate::model::network_insights_access_scope::Builder::default()
    }
}

/// <p>Describes a network ACL.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct NetworkAcl {
    /// <p>Any associations between the network ACL and one or more subnets</p>
    #[doc(hidden)]
    pub associations: std::option::Option<std::vec::Vec<crate::model::NetworkAclAssociation>>,
    /// <p>One or more entries (rules) in the network ACL.</p>
    #[doc(hidden)]
    pub entries: std::option::Option<std::vec::Vec<crate::model::NetworkAclEntry>>,
    /// <p>Indicates whether this is the default network ACL for the VPC.</p>
    #[doc(hidden)]
    pub is_default: std::option::Option<bool>,
    /// <p>The ID of the network ACL.</p>
    #[doc(hidden)]
    pub network_acl_id: std::option::Option<std::string::String>,
    /// <p>Any tags assigned to the network ACL.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    /// <p>The ID of the VPC for the network ACL.</p>
    #[doc(hidden)]
    pub vpc_id: std::option::Option<std::string::String>,
    /// <p>The ID of the Amazon Web Services account that owns the network ACL.</p>
    #[doc(hidden)]
    pub owner_id: std::option::Option<std::string::String>,
}
impl NetworkAcl {
    /// <p>Any associations between the network ACL and one or more subnets</p>
    pub fn associations(&self) -> std::option::Option<&[crate::model::NetworkAclAssociation]> {
        self.associations.as_deref()
    }
    /// <p>One or more entries (rules) in the network ACL.</p>
    pub fn entries(&self) -> std::option::Option<&[crate::model::NetworkAclEntry]> {
        self.entries.as_deref()
    }
    /// <p>Indicates whether this is the default network ACL for the VPC.</p>
    pub fn is_default(&self) -> std::option::Option<bool> {
        self.is_default
    }
    /// <p>The ID of the network ACL.</p>
    pub fn network_acl_id(&self) -> std::option::Option<&str> {
        self.network_acl_id.as_deref()
    }
    /// <p>Any tags assigned to the network ACL.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
    /// <p>The ID of the VPC for the network ACL.</p>
    pub fn vpc_id(&self) -> std::option::Option<&str> {
        self.vpc_id.as_deref()
    }
    /// <p>The ID of the Amazon Web Services account that owns the network ACL.</p>
    pub fn owner_id(&self) -> std::option::Option<&str> {
        self.owner_id.as_deref()
    }
}
/// See [`NetworkAcl`](crate::model::NetworkAcl).
pub mod network_acl {

    /// A builder for [`NetworkAcl`](crate::model::NetworkAcl).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) associations:
            std::option::Option<std::vec::Vec<crate::model::NetworkAclAssociation>>,
        pub(crate) entries: std::option::Option<std::vec::Vec<crate::model::NetworkAclEntry>>,
        pub(crate) is_default: std::option::Option<bool>,
        pub(crate) network_acl_id: std::option::Option<std::string::String>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        pub(crate) vpc_id: std::option::Option<std::string::String>,
        pub(crate) owner_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// Appends an item to `associations`.
        ///
        /// To override the contents of this collection use [`set_associations`](Self::set_associations).
        ///
        /// <p>Any associations between the network ACL and one or more subnets</p>
        pub fn associations(mut self, input: crate::model::NetworkAclAssociation) -> Self {
            let mut v = self.associations.unwrap_or_default();
            v.push(input);
            self.associations = Some(v);
            self
        }
        /// <p>Any associations between the network ACL and one or more subnets</p>
        pub fn set_associations(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::NetworkAclAssociation>>,
        ) -> Self {
            self.associations = input;
            self
        }
        /// Appends an item to `entries`.
        ///
        /// To override the contents of this collection use [`set_entries`](Self::set_entries).
        ///
        /// <p>One or more entries (rules) in the network ACL.</p>
        pub fn entries(mut self, input: crate::model::NetworkAclEntry) -> Self {
            let mut v = self.entries.unwrap_or_default();
            v.push(input);
            self.entries = Some(v);
            self
        }
        /// <p>One or more entries (rules) in the network ACL.</p>
        pub fn set_entries(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::NetworkAclEntry>>,
        ) -> Self {
            self.entries = input;
            self
        }
        /// <p>Indicates whether this is the default network ACL for the VPC.</p>
        pub fn is_default(mut self, input: bool) -> Self {
            self.is_default = Some(input);
            self
        }
        /// <p>Indicates whether this is the default network ACL for the VPC.</p>
        pub fn set_is_default(mut self, input: std::option::Option<bool>) -> Self {
            self.is_default = input;
            self
        }
        /// <p>The ID of the network ACL.</p>
        pub fn network_acl_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.network_acl_id = Some(input.into());
            self
        }
        /// <p>The ID of the network ACL.</p>
        pub fn set_network_acl_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.network_acl_id = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>Any tags assigned to the network ACL.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>Any tags assigned to the network ACL.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// <p>The ID of the VPC for the network ACL.</p>
        pub fn vpc_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.vpc_id = Some(input.into());
            self
        }
        /// <p>The ID of the VPC for the network ACL.</p>
        pub fn set_vpc_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.vpc_id = input;
            self
        }
        /// <p>The ID of the Amazon Web Services account that owns the network ACL.</p>
        pub fn owner_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.owner_id = Some(input.into());
            self
        }
        /// <p>The ID of the Amazon Web Services account that owns the network ACL.</p>
        pub fn set_owner_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.owner_id = input;
            self
        }
        /// Consumes the builder and constructs a [`NetworkAcl`](crate::model::NetworkAcl).
        pub fn build(self) -> crate::model::NetworkAcl {
            crate::model::NetworkAcl {
                associations: self.associations,
                entries: self.entries,
                is_default: self.is_default,
                network_acl_id: self.network_acl_id,
                tags: self.tags,
                vpc_id: self.vpc_id,
                owner_id: self.owner_id,
            }
        }
    }
}
impl NetworkAcl {
    /// Creates a new builder-style object to manufacture [`NetworkAcl`](crate::model::NetworkAcl).
    pub fn builder() -> crate::model::network_acl::Builder {
        crate::model::network_acl::Builder::default()
    }
}

/// <p>Describes an entry in a network ACL.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct NetworkAclEntry {
    /// <p>The IPv4 network range to allow or deny, in CIDR notation.</p>
    #[doc(hidden)]
    pub cidr_block: std::option::Option<std::string::String>,
    /// <p>Indicates whether the rule is an egress rule (applied to traffic leaving the subnet).</p>
    #[doc(hidden)]
    pub egress: std::option::Option<bool>,
    /// <p>ICMP protocol: The ICMP type and code.</p>
    #[doc(hidden)]
    pub icmp_type_code: std::option::Option<crate::model::IcmpTypeCode>,
    /// <p>The IPv6 network range to allow or deny, in CIDR notation.</p>
    #[doc(hidden)]
    pub ipv6_cidr_block: std::option::Option<std::string::String>,
    /// <p>TCP or UDP protocols: The range of ports the rule applies to.</p>
    #[doc(hidden)]
    pub port_range: std::option::Option<crate::model::PortRange>,
    /// <p>The protocol number. A value of "-1" means all protocols.</p>
    #[doc(hidden)]
    pub protocol: std::option::Option<std::string::String>,
    /// <p>Indicates whether to allow or deny the traffic that matches the rule.</p>
    #[doc(hidden)]
    pub rule_action: std::option::Option<crate::model::RuleAction>,
    /// <p>The rule number for the entry. ACL entries are processed in ascending order by rule number.</p>
    #[doc(hidden)]
    pub rule_number: std::option::Option<i32>,
}
impl NetworkAclEntry {
    /// <p>The IPv4 network range to allow or deny, in CIDR notation.</p>
    pub fn cidr_block(&self) -> std::option::Option<&str> {
        self.cidr_block.as_deref()
    }
    /// <p>Indicates whether the rule is an egress rule (applied to traffic leaving the subnet).</p>
    pub fn egress(&self) -> std::option::Option<bool> {
        self.egress
    }
    /// <p>ICMP protocol: The ICMP type and code.</p>
    pub fn icmp_type_code(&self) -> std::option::Option<&crate::model::IcmpTypeCode> {
        self.icmp_type_code.as_ref()
    }
    /// <p>The IPv6 network range to allow or deny, in CIDR notation.</p>
    pub fn ipv6_cidr_block(&self) -> std::option::Option<&str> {
        self.ipv6_cidr_block.as_deref()
    }
    /// <p>TCP or UDP protocols: The range of ports the rule applies to.</p>
    pub fn port_range(&self) -> std::option::Option<&crate::model::PortRange> {
        self.port_range.as_ref()
    }
    /// <p>The protocol number. A value of "-1" means all protocols.</p>
    pub fn protocol(&self) -> std::option::Option<&str> {
        self.protocol.as_deref()
    }
    /// <p>Indicates whether to allow or deny the traffic that matches the rule.</p>
    pub fn rule_action(&self) -> std::option::Option<&crate::model::RuleAction> {
        self.rule_action.as_ref()
    }
    /// <p>The rule number for the entry. ACL entries are processed in ascending order by rule number.</p>
    pub fn rule_number(&self) -> std::option::Option<i32> {
        self.rule_number
    }
}
/// See [`NetworkAclEntry`](crate::model::NetworkAclEntry).
pub mod network_acl_entry {

    /// A builder for [`NetworkAclEntry`](crate::model::NetworkAclEntry).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) cidr_block: std::option::Option<std::string::String>,
        pub(crate) egress: std::option::Option<bool>,
        pub(crate) icmp_type_code: std::option::Option<crate::model::IcmpTypeCode>,
        pub(crate) ipv6_cidr_block: std::option::Option<std::string::String>,
        pub(crate) port_range: std::option::Option<crate::model::PortRange>,
        pub(crate) protocol: std::option::Option<std::string::String>,
        pub(crate) rule_action: std::option::Option<crate::model::RuleAction>,
        pub(crate) rule_number: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>The IPv4 network range to allow or deny, in CIDR notation.</p>
        pub fn cidr_block(mut self, input: impl Into<std::string::String>) -> Self {
            self.cidr_block = Some(input.into());
            self
        }
        /// <p>The IPv4 network range to allow or deny, in CIDR notation.</p>
        pub fn set_cidr_block(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.cidr_block = input;
            self
        }
        /// <p>Indicates whether the rule is an egress rule (applied to traffic leaving the subnet).</p>
        pub fn egress(mut self, input: bool) -> Self {
            self.egress = Some(input);
            self
        }
        /// <p>Indicates whether the rule is an egress rule (applied to traffic leaving the subnet).</p>
        pub fn set_egress(mut self, input: std::option::Option<bool>) -> Self {
            self.egress = input;
            self
        }
        /// <p>ICMP protocol: The ICMP type and code.</p>
        pub fn icmp_type_code(mut self, input: crate::model::IcmpTypeCode) -> Self {
            self.icmp_type_code = Some(input);
            self
        }
        /// <p>ICMP protocol: The ICMP type and code.</p>
        pub fn set_icmp_type_code(
            mut self,
            input: std::option::Option<crate::model::IcmpTypeCode>,
        ) -> Self {
            self.icmp_type_code = input;
            self
        }
        /// <p>The IPv6 network range to allow or deny, in CIDR notation.</p>
        pub fn ipv6_cidr_block(mut self, input: impl Into<std::string::String>) -> Self {
            self.ipv6_cidr_block = Some(input.into());
            self
        }
        /// <p>The IPv6 network range to allow or deny, in CIDR notation.</p>
        pub fn set_ipv6_cidr_block(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.ipv6_cidr_block = input;
            self
        }
        /// <p>TCP or UDP protocols: The range of ports the rule applies to.</p>
        pub fn port_range(mut self, input: crate::model::PortRange) -> Self {
            self.port_range = Some(input);
            self
        }
        /// <p>TCP or UDP protocols: The range of ports the rule applies to.</p>
        pub fn set_port_range(
            mut self,
            input: std::option::Option<crate::model::PortRange>,
        ) -> Self {
            self.port_range = input;
            self
        }
        /// <p>The protocol number. A value of "-1" means all protocols.</p>
        pub fn protocol(mut self, input: impl Into<std::string::String>) -> Self {
            self.protocol = Some(input.into());
            self
        }
        /// <p>The protocol number. A value of "-1" means all protocols.</p>
        pub fn set_protocol(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.protocol = input;
            self
        }
        /// <p>Indicates whether to allow or deny the traffic that matches the rule.</p>
        pub fn rule_action(mut self, input: crate::model::RuleAction) -> Self {
            self.rule_action = Some(input);
            self
        }
        /// <p>Indicates whether to allow or deny the traffic that matches the rule.</p>
        pub fn set_rule_action(
            mut self,
            input: std::option::Option<crate::model::RuleAction>,
        ) -> Self {
            self.rule_action = input;
            self
        }
        /// <p>The rule number for the entry. ACL entries are processed in ascending order by rule number.</p>
        pub fn rule_number(mut self, input: i32) -> Self {
            self.rule_number = Some(input);
            self
        }
        /// <p>The rule number for the entry. ACL entries are processed in ascending order by rule number.</p>
        pub fn set_rule_number(mut self, input: std::option::Option<i32>) -> Self {
            self.rule_number = input;
            self
        }
        /// Consumes the builder and constructs a [`NetworkAclEntry`](crate::model::NetworkAclEntry).
        pub fn build(self) -> crate::model::NetworkAclEntry {
            crate::model::NetworkAclEntry {
                cidr_block: self.cidr_block,
                egress: self.egress,
                icmp_type_code: self.icmp_type_code,
                ipv6_cidr_block: self.ipv6_cidr_block,
                port_range: self.port_range,
                protocol: self.protocol,
                rule_action: self.rule_action,
                rule_number: self.rule_number,
            }
        }
    }
}
impl NetworkAclEntry {
    /// Creates a new builder-style object to manufacture [`NetworkAclEntry`](crate::model::NetworkAclEntry).
    pub fn builder() -> crate::model::network_acl_entry::Builder {
        crate::model::network_acl_entry::Builder::default()
    }
}

/// <p>Describes an association between a network ACL and a subnet.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct NetworkAclAssociation {
    /// <p>The ID of the association between a network ACL and a subnet.</p>
    #[doc(hidden)]
    pub network_acl_association_id: std::option::Option<std::string::String>,
    /// <p>The ID of the network ACL.</p>
    #[doc(hidden)]
    pub network_acl_id: std::option::Option<std::string::String>,
    /// <p>The ID of the subnet.</p>
    #[doc(hidden)]
    pub subnet_id: std::option::Option<std::string::String>,
}
impl NetworkAclAssociation {
    /// <p>The ID of the association between a network ACL and a subnet.</p>
    pub fn network_acl_association_id(&self) -> std::option::Option<&str> {
        self.network_acl_association_id.as_deref()
    }
    /// <p>The ID of the network ACL.</p>
    pub fn network_acl_id(&self) -> std::option::Option<&str> {
        self.network_acl_id.as_deref()
    }
    /// <p>The ID of the subnet.</p>
    pub fn subnet_id(&self) -> std::option::Option<&str> {
        self.subnet_id.as_deref()
    }
}
/// See [`NetworkAclAssociation`](crate::model::NetworkAclAssociation).
pub mod network_acl_association {

    /// A builder for [`NetworkAclAssociation`](crate::model::NetworkAclAssociation).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) network_acl_association_id: std::option::Option<std::string::String>,
        pub(crate) network_acl_id: std::option::Option<std::string::String>,
        pub(crate) subnet_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The ID of the association between a network ACL and a subnet.</p>
        pub fn network_acl_association_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.network_acl_association_id = Some(input.into());
            self
        }
        /// <p>The ID of the association between a network ACL and a subnet.</p>
        pub fn set_network_acl_association_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.network_acl_association_id = input;
            self
        }
        /// <p>The ID of the network ACL.</p>
        pub fn network_acl_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.network_acl_id = Some(input.into());
            self
        }
        /// <p>The ID of the network ACL.</p>
        pub fn set_network_acl_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.network_acl_id = input;
            self
        }
        /// <p>The ID of the subnet.</p>
        pub fn subnet_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.subnet_id = Some(input.into());
            self
        }
        /// <p>The ID of the subnet.</p>
        pub fn set_subnet_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.subnet_id = input;
            self
        }
        /// Consumes the builder and constructs a [`NetworkAclAssociation`](crate::model::NetworkAclAssociation).
        pub fn build(self) -> crate::model::NetworkAclAssociation {
            crate::model::NetworkAclAssociation {
                network_acl_association_id: self.network_acl_association_id,
                network_acl_id: self.network_acl_id,
                subnet_id: self.subnet_id,
            }
        }
    }
}
impl NetworkAclAssociation {
    /// Creates a new builder-style object to manufacture [`NetworkAclAssociation`](crate::model::NetworkAclAssociation).
    pub fn builder() -> crate::model::network_acl_association::Builder {
        crate::model::network_acl_association::Builder::default()
    }
}

/// <p>Describes a NAT gateway.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct NatGateway {
    /// <p>The date and time the NAT gateway was created.</p>
    #[doc(hidden)]
    pub create_time: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The date and time the NAT gateway was deleted, if applicable.</p>
    #[doc(hidden)]
    pub delete_time: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>If the NAT gateway could not be created, specifies the error code for the failure. (<code>InsufficientFreeAddressesInSubnet</code> | <code>Gateway.NotAttached</code> | <code>InvalidAllocationID.NotFound</code> | <code>Resource.AlreadyAssociated</code> | <code>InternalError</code> | <code>InvalidSubnetID.NotFound</code>)</p>
    #[doc(hidden)]
    pub failure_code: std::option::Option<std::string::String>,
    /// <p>If the NAT gateway could not be created, specifies the error message for the failure, that corresponds to the error code.</p>
    /// <ul>
    /// <li> <p>For InsufficientFreeAddressesInSubnet: "Subnet has insufficient free addresses to create this NAT gateway"</p> </li>
    /// <li> <p>For Gateway.NotAttached: "Network vpc-xxxxxxxx has no Internet gateway attached"</p> </li>
    /// <li> <p>For InvalidAllocationID.NotFound: "Elastic IP address eipalloc-xxxxxxxx could not be associated with this NAT gateway"</p> </li>
    /// <li> <p>For Resource.AlreadyAssociated: "Elastic IP address eipalloc-xxxxxxxx is already associated"</p> </li>
    /// <li> <p>For InternalError: "Network interface eni-xxxxxxxx, created and used internally by this NAT gateway is in an invalid state. Please try again."</p> </li>
    /// <li> <p>For InvalidSubnetID.NotFound: "The specified subnet subnet-xxxxxxxx does not exist or could not be found."</p> </li>
    /// </ul>
    #[doc(hidden)]
    pub failure_message: std::option::Option<std::string::String>,
    /// <p>Information about the IP addresses and network interface associated with the NAT gateway.</p>
    #[doc(hidden)]
    pub nat_gateway_addresses: std::option::Option<std::vec::Vec<crate::model::NatGatewayAddress>>,
    /// <p>The ID of the NAT gateway.</p>
    #[doc(hidden)]
    pub nat_gateway_id: std::option::Option<std::string::String>,
    /// <p>Reserved. If you need to sustain traffic greater than the <a href="https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html">documented limits</a>, contact us through the <a href="https://console.aws.amazon.com/support/home?">Support Center</a>.</p>
    #[doc(hidden)]
    pub provisioned_bandwidth: std::option::Option<crate::model::ProvisionedBandwidth>,
    /// <p>The state of the NAT gateway.</p>
    /// <ul>
    /// <li> <p> <code>pending</code>: The NAT gateway is being created and is not ready to process traffic.</p> </li>
    /// <li> <p> <code>failed</code>: The NAT gateway could not be created. Check the <code>failureCode</code> and <code>failureMessage</code> fields for the reason.</p> </li>
    /// <li> <p> <code>available</code>: The NAT gateway is able to process traffic. This status remains until you delete the NAT gateway, and does not indicate the health of the NAT gateway.</p> </li>
    /// <li> <p> <code>deleting</code>: The NAT gateway is in the process of being terminated and may still be processing traffic.</p> </li>
    /// <li> <p> <code>deleted</code>: The NAT gateway has been terminated and is no longer processing traffic.</p> </li>
    /// </ul>
    #[doc(hidden)]
    pub state: std::option::Option<crate::model::NatGatewayState>,
    /// <p>The ID of the subnet in which the NAT gateway is located.</p>
    #[doc(hidden)]
    pub subnet_id: std::option::Option<std::string::String>,
    /// <p>The ID of the VPC in which the NAT gateway is located.</p>
    #[doc(hidden)]
    pub vpc_id: std::option::Option<std::string::String>,
    /// <p>The tags for the NAT gateway.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    /// <p>Indicates whether the NAT gateway supports public or private connectivity.</p>
    #[doc(hidden)]
    pub connectivity_type: std::option::Option<crate::model::ConnectivityType>,
}
impl NatGateway {
    /// <p>The date and time the NAT gateway was created.</p>
    pub fn create_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.create_time.as_ref()
    }
    /// <p>The date and time the NAT gateway was deleted, if applicable.</p>
    pub fn delete_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.delete_time.as_ref()
    }
    /// <p>If the NAT gateway could not be created, specifies the error code for the failure. (<code>InsufficientFreeAddressesInSubnet</code> | <code>Gateway.NotAttached</code> | <code>InvalidAllocationID.NotFound</code> | <code>Resource.AlreadyAssociated</code> | <code>InternalError</code> | <code>InvalidSubnetID.NotFound</code>)</p>
    pub fn failure_code(&self) -> std::option::Option<&str> {
        self.failure_code.as_deref()
    }
    /// <p>If the NAT gateway could not be created, specifies the error message for the failure, that corresponds to the error code.</p>
    /// <ul>
    /// <li> <p>For InsufficientFreeAddressesInSubnet: "Subnet has insufficient free addresses to create this NAT gateway"</p> </li>
    /// <li> <p>For Gateway.NotAttached: "Network vpc-xxxxxxxx has no Internet gateway attached"</p> </li>
    /// <li> <p>For InvalidAllocationID.NotFound: "Elastic IP address eipalloc-xxxxxxxx could not be associated with this NAT gateway"</p> </li>
    /// <li> <p>For Resource.AlreadyAssociated: "Elastic IP address eipalloc-xxxxxxxx is already associated"</p> </li>
    /// <li> <p>For InternalError: "Network interface eni-xxxxxxxx, created and used internally by this NAT gateway is in an invalid state. Please try again."</p> </li>
    /// <li> <p>For InvalidSubnetID.NotFound: "The specified subnet subnet-xxxxxxxx does not exist or could not be found."</p> </li>
    /// </ul>
    pub fn failure_message(&self) -> std::option::Option<&str> {
        self.failure_message.as_deref()
    }
    /// <p>Information about the IP addresses and network interface associated with the NAT gateway.</p>
    pub fn nat_gateway_addresses(&self) -> std::option::Option<&[crate::model::NatGatewayAddress]> {
        self.nat_gateway_addresses.as_deref()
    }
    /// <p>The ID of the NAT gateway.</p>
    pub fn nat_gateway_id(&self) -> std::option::Option<&str> {
        self.nat_gateway_id.as_deref()
    }
    /// <p>Reserved. If you need to sustain traffic greater than the <a href="https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html">documented limits</a>, contact us through the <a href="https://console.aws.amazon.com/support/home?">Support Center</a>.</p>
    pub fn provisioned_bandwidth(
        &self,
    ) -> std::option::Option<&crate::model::ProvisionedBandwidth> {
        self.provisioned_bandwidth.as_ref()
    }
    /// <p>The state of the NAT gateway.</p>
    /// <ul>
    /// <li> <p> <code>pending</code>: The NAT gateway is being created and is not ready to process traffic.</p> </li>
    /// <li> <p> <code>failed</code>: The NAT gateway could not be created. Check the <code>failureCode</code> and <code>failureMessage</code> fields for the reason.</p> </li>
    /// <li> <p> <code>available</code>: The NAT gateway is able to process traffic. This status remains until you delete the NAT gateway, and does not indicate the health of the NAT gateway.</p> </li>
    /// <li> <p> <code>deleting</code>: The NAT gateway is in the process of being terminated and may still be processing traffic.</p> </li>
    /// <li> <p> <code>deleted</code>: The NAT gateway has been terminated and is no longer processing traffic.</p> </li>
    /// </ul>
    pub fn state(&self) -> std::option::Option<&crate::model::NatGatewayState> {
        self.state.as_ref()
    }
    /// <p>The ID of the subnet in which the NAT gateway is located.</p>
    pub fn subnet_id(&self) -> std::option::Option<&str> {
        self.subnet_id.as_deref()
    }
    /// <p>The ID of the VPC in which the NAT gateway is located.</p>
    pub fn vpc_id(&self) -> std::option::Option<&str> {
        self.vpc_id.as_deref()
    }
    /// <p>The tags for the NAT gateway.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
    /// <p>Indicates whether the NAT gateway supports public or private connectivity.</p>
    pub fn connectivity_type(&self) -> std::option::Option<&crate::model::ConnectivityType> {
        self.connectivity_type.as_ref()
    }
}
/// See [`NatGateway`](crate::model::NatGateway).
pub mod nat_gateway {

    /// A builder for [`NatGateway`](crate::model::NatGateway).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) create_time: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) delete_time: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) failure_code: std::option::Option<std::string::String>,
        pub(crate) failure_message: std::option::Option<std::string::String>,
        pub(crate) nat_gateway_addresses:
            std::option::Option<std::vec::Vec<crate::model::NatGatewayAddress>>,
        pub(crate) nat_gateway_id: std::option::Option<std::string::String>,
        pub(crate) provisioned_bandwidth: std::option::Option<crate::model::ProvisionedBandwidth>,
        pub(crate) state: std::option::Option<crate::model::NatGatewayState>,
        pub(crate) subnet_id: std::option::Option<std::string::String>,
        pub(crate) vpc_id: std::option::Option<std::string::String>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        pub(crate) connectivity_type: std::option::Option<crate::model::ConnectivityType>,
    }
    impl Builder {
        /// <p>The date and time the NAT gateway was created.</p>
        pub fn create_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.create_time = Some(input);
            self
        }
        /// <p>The date and time the NAT gateway was created.</p>
        pub fn set_create_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.create_time = input;
            self
        }
        /// <p>The date and time the NAT gateway was deleted, if applicable.</p>
        pub fn delete_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.delete_time = Some(input);
            self
        }
        /// <p>The date and time the NAT gateway was deleted, if applicable.</p>
        pub fn set_delete_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.delete_time = input;
            self
        }
        /// <p>If the NAT gateway could not be created, specifies the error code for the failure. (<code>InsufficientFreeAddressesInSubnet</code> | <code>Gateway.NotAttached</code> | <code>InvalidAllocationID.NotFound</code> | <code>Resource.AlreadyAssociated</code> | <code>InternalError</code> | <code>InvalidSubnetID.NotFound</code>)</p>
        pub fn failure_code(mut self, input: impl Into<std::string::String>) -> Self {
            self.failure_code = Some(input.into());
            self
        }
        /// <p>If the NAT gateway could not be created, specifies the error code for the failure. (<code>InsufficientFreeAddressesInSubnet</code> | <code>Gateway.NotAttached</code> | <code>InvalidAllocationID.NotFound</code> | <code>Resource.AlreadyAssociated</code> | <code>InternalError</code> | <code>InvalidSubnetID.NotFound</code>)</p>
        pub fn set_failure_code(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.failure_code = input;
            self
        }
        /// <p>If the NAT gateway could not be created, specifies the error message for the failure, that corresponds to the error code.</p>
        /// <ul>
        /// <li> <p>For InsufficientFreeAddressesInSubnet: "Subnet has insufficient free addresses to create this NAT gateway"</p> </li>
        /// <li> <p>For Gateway.NotAttached: "Network vpc-xxxxxxxx has no Internet gateway attached"</p> </li>
        /// <li> <p>For InvalidAllocationID.NotFound: "Elastic IP address eipalloc-xxxxxxxx could not be associated with this NAT gateway"</p> </li>
        /// <li> <p>For Resource.AlreadyAssociated: "Elastic IP address eipalloc-xxxxxxxx is already associated"</p> </li>
        /// <li> <p>For InternalError: "Network interface eni-xxxxxxxx, created and used internally by this NAT gateway is in an invalid state. Please try again."</p> </li>
        /// <li> <p>For InvalidSubnetID.NotFound: "The specified subnet subnet-xxxxxxxx does not exist or could not be found."</p> </li>
        /// </ul>
        pub fn failure_message(mut self, input: impl Into<std::string::String>) -> Self {
            self.failure_message = Some(input.into());
            self
        }
        /// <p>If the NAT gateway could not be created, specifies the error message for the failure, that corresponds to the error code.</p>
        /// <ul>
        /// <li> <p>For InsufficientFreeAddressesInSubnet: "Subnet has insufficient free addresses to create this NAT gateway"</p> </li>
        /// <li> <p>For Gateway.NotAttached: "Network vpc-xxxxxxxx has no Internet gateway attached"</p> </li>
        /// <li> <p>For InvalidAllocationID.NotFound: "Elastic IP address eipalloc-xxxxxxxx could not be associated with this NAT gateway"</p> </li>
        /// <li> <p>For Resource.AlreadyAssociated: "Elastic IP address eipalloc-xxxxxxxx is already associated"</p> </li>
        /// <li> <p>For InternalError: "Network interface eni-xxxxxxxx, created and used internally by this NAT gateway is in an invalid state. Please try again."</p> </li>
        /// <li> <p>For InvalidSubnetID.NotFound: "The specified subnet subnet-xxxxxxxx does not exist or could not be found."</p> </li>
        /// </ul>
        pub fn set_failure_message(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.failure_message = input;
            self
        }
        /// Appends an item to `nat_gateway_addresses`.
        ///
        /// To override the contents of this collection use [`set_nat_gateway_addresses`](Self::set_nat_gateway_addresses).
        ///
        /// <p>Information about the IP addresses and network interface associated with the NAT gateway.</p>
        pub fn nat_gateway_addresses(mut self, input: crate::model::NatGatewayAddress) -> Self {
            let mut v = self.nat_gateway_addresses.unwrap_or_default();
            v.push(input);
            self.nat_gateway_addresses = Some(v);
            self
        }
        /// <p>Information about the IP addresses and network interface associated with the NAT gateway.</p>
        pub fn set_nat_gateway_addresses(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::NatGatewayAddress>>,
        ) -> Self {
            self.nat_gateway_addresses = input;
            self
        }
        /// <p>The ID of the NAT gateway.</p>
        pub fn nat_gateway_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.nat_gateway_id = Some(input.into());
            self
        }
        /// <p>The ID of the NAT gateway.</p>
        pub fn set_nat_gateway_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.nat_gateway_id = input;
            self
        }
        /// <p>Reserved. If you need to sustain traffic greater than the <a href="https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html">documented limits</a>, contact us through the <a href="https://console.aws.amazon.com/support/home?">Support Center</a>.</p>
        pub fn provisioned_bandwidth(mut self, input: crate::model::ProvisionedBandwidth) -> Self {
            self.provisioned_bandwidth = Some(input);
            self
        }
        /// <p>Reserved. If you need to sustain traffic greater than the <a href="https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html">documented limits</a>, contact us through the <a href="https://console.aws.amazon.com/support/home?">Support Center</a>.</p>
        pub fn set_provisioned_bandwidth(
            mut self,
            input: std::option::Option<crate::model::ProvisionedBandwidth>,
        ) -> Self {
            self.provisioned_bandwidth = input;
            self
        }
        /// <p>The state of the NAT gateway.</p>
        /// <ul>
        /// <li> <p> <code>pending</code>: The NAT gateway is being created and is not ready to process traffic.</p> </li>
        /// <li> <p> <code>failed</code>: The NAT gateway could not be created. Check the <code>failureCode</code> and <code>failureMessage</code> fields for the reason.</p> </li>
        /// <li> <p> <code>available</code>: The NAT gateway is able to process traffic. This status remains until you delete the NAT gateway, and does not indicate the health of the NAT gateway.</p> </li>
        /// <li> <p> <code>deleting</code>: The NAT gateway is in the process of being terminated and may still be processing traffic.</p> </li>
        /// <li> <p> <code>deleted</code>: The NAT gateway has been terminated and is no longer processing traffic.</p> </li>
        /// </ul>
        pub fn state(mut self, input: crate::model::NatGatewayState) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>The state of the NAT gateway.</p>
        /// <ul>
        /// <li> <p> <code>pending</code>: The NAT gateway is being created and is not ready to process traffic.</p> </li>
        /// <li> <p> <code>failed</code>: The NAT gateway could not be created. Check the <code>failureCode</code> and <code>failureMessage</code> fields for the reason.</p> </li>
        /// <li> <p> <code>available</code>: The NAT gateway is able to process traffic. This status remains until you delete the NAT gateway, and does not indicate the health of the NAT gateway.</p> </li>
        /// <li> <p> <code>deleting</code>: The NAT gateway is in the process of being terminated and may still be processing traffic.</p> </li>
        /// <li> <p> <code>deleted</code>: The NAT gateway has been terminated and is no longer processing traffic.</p> </li>
        /// </ul>
        pub fn set_state(
            mut self,
            input: std::option::Option<crate::model::NatGatewayState>,
        ) -> Self {
            self.state = input;
            self
        }
        /// <p>The ID of the subnet in which the NAT gateway is located.</p>
        pub fn subnet_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.subnet_id = Some(input.into());
            self
        }
        /// <p>The ID of the subnet in which the NAT gateway is located.</p>
        pub fn set_subnet_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.subnet_id = input;
            self
        }
        /// <p>The ID of the VPC in which the NAT gateway is located.</p>
        pub fn vpc_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.vpc_id = Some(input.into());
            self
        }
        /// <p>The ID of the VPC in which the NAT gateway is located.</p>
        pub fn set_vpc_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.vpc_id = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>The tags for the NAT gateway.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>The tags for the NAT gateway.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// <p>Indicates whether the NAT gateway supports public or private connectivity.</p>
        pub fn connectivity_type(mut self, input: crate::model::ConnectivityType) -> Self {
            self.connectivity_type = Some(input);
            self
        }
        /// <p>Indicates whether the NAT gateway supports public or private connectivity.</p>
        pub fn set_connectivity_type(
            mut self,
            input: std::option::Option<crate::model::ConnectivityType>,
        ) -> Self {
            self.connectivity_type = input;
            self
        }
        /// Consumes the builder and constructs a [`NatGateway`](crate::model::NatGateway).
        pub fn build(self) -> crate::model::NatGateway {
            crate::model::NatGateway {
                create_time: self.create_time,
                delete_time: self.delete_time,
                failure_code: self.failure_code,
                failure_message: self.failure_message,
                nat_gateway_addresses: self.nat_gateway_addresses,
                nat_gateway_id: self.nat_gateway_id,
                provisioned_bandwidth: self.provisioned_bandwidth,
                state: self.state,
                subnet_id: self.subnet_id,
                vpc_id: self.vpc_id,
                tags: self.tags,
                connectivity_type: self.connectivity_type,
            }
        }
    }
}
impl NatGateway {
    /// Creates a new builder-style object to manufacture [`NatGateway`](crate::model::NatGateway).
    pub fn builder() -> crate::model::nat_gateway::Builder {
        crate::model::nat_gateway::Builder::default()
    }
}

/// When writing a match expression against `ConnectivityType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let connectivitytype = unimplemented!();
/// match connectivitytype {
///     ConnectivityType::Private => { /* ... */ },
///     ConnectivityType::Public => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `connectivitytype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `ConnectivityType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `ConnectivityType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `ConnectivityType::NewFeature` is defined.
/// Specifically, when `connectivitytype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `ConnectivityType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 ConnectivityType {
    #[allow(missing_docs)] // documentation missing in model
    Private,
    #[allow(missing_docs)] // documentation missing in model
    Public,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for ConnectivityType {
    fn from(s: &str) -> Self {
        match s {
            "private" => ConnectivityType::Private,
            "public" => ConnectivityType::Public,
            other => ConnectivityType::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for ConnectivityType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(ConnectivityType::from(s))
    }
}
impl ConnectivityType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            ConnectivityType::Private => "private",
            ConnectivityType::Public => "public",
            ConnectivityType::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["private", "public"]
    }
}
impl AsRef<str> for ConnectivityType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `NatGatewayState`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let natgatewaystate = unimplemented!();
/// match natgatewaystate {
///     NatGatewayState::Available => { /* ... */ },
///     NatGatewayState::Deleted => { /* ... */ },
///     NatGatewayState::Deleting => { /* ... */ },
///     NatGatewayState::Failed => { /* ... */ },
///     NatGatewayState::Pending => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `natgatewaystate` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `NatGatewayState::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `NatGatewayState::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `NatGatewayState::NewFeature` is defined.
/// Specifically, when `natgatewaystate` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `NatGatewayState::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 NatGatewayState {
    #[allow(missing_docs)] // documentation missing in model
    Available,
    #[allow(missing_docs)] // documentation missing in model
    Deleted,
    #[allow(missing_docs)] // documentation missing in model
    Deleting,
    #[allow(missing_docs)] // documentation missing in model
    Failed,
    #[allow(missing_docs)] // documentation missing in model
    Pending,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for NatGatewayState {
    fn from(s: &str) -> Self {
        match s {
            "available" => NatGatewayState::Available,
            "deleted" => NatGatewayState::Deleted,
            "deleting" => NatGatewayState::Deleting,
            "failed" => NatGatewayState::Failed,
            "pending" => NatGatewayState::Pending,
            other => NatGatewayState::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for NatGatewayState {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(NatGatewayState::from(s))
    }
}
impl NatGatewayState {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            NatGatewayState::Available => "available",
            NatGatewayState::Deleted => "deleted",
            NatGatewayState::Deleting => "deleting",
            NatGatewayState::Failed => "failed",
            NatGatewayState::Pending => "pending",
            NatGatewayState::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["available", "deleted", "deleting", "failed", "pending"]
    }
}
impl AsRef<str> for NatGatewayState {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Reserved. If you need to sustain traffic greater than the <a href="https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html">documented limits</a>, contact us through the <a href="https://console.aws.amazon.com/support/home?">Support Center</a>.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ProvisionedBandwidth {
    /// <p>Reserved. If you need to sustain traffic greater than the <a href="https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html">documented limits</a>, contact us through the <a href="https://console.aws.amazon.com/support/home?">Support Center</a>.</p>
    #[doc(hidden)]
    pub provision_time: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>Reserved. If you need to sustain traffic greater than the <a href="https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html">documented limits</a>, contact us through the <a href="https://console.aws.amazon.com/support/home?">Support Center</a>.</p>
    #[doc(hidden)]
    pub provisioned: std::option::Option<std::string::String>,
    /// <p>Reserved. If you need to sustain traffic greater than the <a href="https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html">documented limits</a>, contact us through the <a href="https://console.aws.amazon.com/support/home?">Support Center</a>.</p>
    #[doc(hidden)]
    pub request_time: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>Reserved. If you need to sustain traffic greater than the <a href="https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html">documented limits</a>, contact us through the <a href="https://console.aws.amazon.com/support/home?">Support Center</a>.</p>
    #[doc(hidden)]
    pub requested: std::option::Option<std::string::String>,
    /// <p>Reserved. If you need to sustain traffic greater than the <a href="https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html">documented limits</a>, contact us through the <a href="https://console.aws.amazon.com/support/home?">Support Center</a>.</p>
    #[doc(hidden)]
    pub status: std::option::Option<std::string::String>,
}
impl ProvisionedBandwidth {
    /// <p>Reserved. If you need to sustain traffic greater than the <a href="https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html">documented limits</a>, contact us through the <a href="https://console.aws.amazon.com/support/home?">Support Center</a>.</p>
    pub fn provision_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.provision_time.as_ref()
    }
    /// <p>Reserved. If you need to sustain traffic greater than the <a href="https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html">documented limits</a>, contact us through the <a href="https://console.aws.amazon.com/support/home?">Support Center</a>.</p>
    pub fn provisioned(&self) -> std::option::Option<&str> {
        self.provisioned.as_deref()
    }
    /// <p>Reserved. If you need to sustain traffic greater than the <a href="https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html">documented limits</a>, contact us through the <a href="https://console.aws.amazon.com/support/home?">Support Center</a>.</p>
    pub fn request_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.request_time.as_ref()
    }
    /// <p>Reserved. If you need to sustain traffic greater than the <a href="https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html">documented limits</a>, contact us through the <a href="https://console.aws.amazon.com/support/home?">Support Center</a>.</p>
    pub fn requested(&self) -> std::option::Option<&str> {
        self.requested.as_deref()
    }
    /// <p>Reserved. If you need to sustain traffic greater than the <a href="https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html">documented limits</a>, contact us through the <a href="https://console.aws.amazon.com/support/home?">Support Center</a>.</p>
    pub fn status(&self) -> std::option::Option<&str> {
        self.status.as_deref()
    }
}
/// See [`ProvisionedBandwidth`](crate::model::ProvisionedBandwidth).
pub mod provisioned_bandwidth {

    /// A builder for [`ProvisionedBandwidth`](crate::model::ProvisionedBandwidth).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) provision_time: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) provisioned: std::option::Option<std::string::String>,
        pub(crate) request_time: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) requested: std::option::Option<std::string::String>,
        pub(crate) status: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>Reserved. If you need to sustain traffic greater than the <a href="https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html">documented limits</a>, contact us through the <a href="https://console.aws.amazon.com/support/home?">Support Center</a>.</p>
        pub fn provision_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.provision_time = Some(input);
            self
        }
        /// <p>Reserved. If you need to sustain traffic greater than the <a href="https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html">documented limits</a>, contact us through the <a href="https://console.aws.amazon.com/support/home?">Support Center</a>.</p>
        pub fn set_provision_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.provision_time = input;
            self
        }
        /// <p>Reserved. If you need to sustain traffic greater than the <a href="https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html">documented limits</a>, contact us through the <a href="https://console.aws.amazon.com/support/home?">Support Center</a>.</p>
        pub fn provisioned(mut self, input: impl Into<std::string::String>) -> Self {
            self.provisioned = Some(input.into());
            self
        }
        /// <p>Reserved. If you need to sustain traffic greater than the <a href="https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html">documented limits</a>, contact us through the <a href="https://console.aws.amazon.com/support/home?">Support Center</a>.</p>
        pub fn set_provisioned(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.provisioned = input;
            self
        }
        /// <p>Reserved. If you need to sustain traffic greater than the <a href="https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html">documented limits</a>, contact us through the <a href="https://console.aws.amazon.com/support/home?">Support Center</a>.</p>
        pub fn request_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.request_time = Some(input);
            self
        }
        /// <p>Reserved. If you need to sustain traffic greater than the <a href="https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html">documented limits</a>, contact us through the <a href="https://console.aws.amazon.com/support/home?">Support Center</a>.</p>
        pub fn set_request_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.request_time = input;
            self
        }
        /// <p>Reserved. If you need to sustain traffic greater than the <a href="https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html">documented limits</a>, contact us through the <a href="https://console.aws.amazon.com/support/home?">Support Center</a>.</p>
        pub fn requested(mut self, input: impl Into<std::string::String>) -> Self {
            self.requested = Some(input.into());
            self
        }
        /// <p>Reserved. If you need to sustain traffic greater than the <a href="https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html">documented limits</a>, contact us through the <a href="https://console.aws.amazon.com/support/home?">Support Center</a>.</p>
        pub fn set_requested(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.requested = input;
            self
        }
        /// <p>Reserved. If you need to sustain traffic greater than the <a href="https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html">documented limits</a>, contact us through the <a href="https://console.aws.amazon.com/support/home?">Support Center</a>.</p>
        pub fn status(mut self, input: impl Into<std::string::String>) -> Self {
            self.status = Some(input.into());
            self
        }
        /// <p>Reserved. If you need to sustain traffic greater than the <a href="https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html">documented limits</a>, contact us through the <a href="https://console.aws.amazon.com/support/home?">Support Center</a>.</p>
        pub fn set_status(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.status = input;
            self
        }
        /// Consumes the builder and constructs a [`ProvisionedBandwidth`](crate::model::ProvisionedBandwidth).
        pub fn build(self) -> crate::model::ProvisionedBandwidth {
            crate::model::ProvisionedBandwidth {
                provision_time: self.provision_time,
                provisioned: self.provisioned,
                request_time: self.request_time,
                requested: self.requested,
                status: self.status,
            }
        }
    }
}
impl ProvisionedBandwidth {
    /// Creates a new builder-style object to manufacture [`ProvisionedBandwidth`](crate::model::ProvisionedBandwidth).
    pub fn builder() -> crate::model::provisioned_bandwidth::Builder {
        crate::model::provisioned_bandwidth::Builder::default()
    }
}

/// <p>Describes the IP addresses and network interface associated with a NAT gateway.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct NatGatewayAddress {
    /// <p>[Public NAT gateway only] The allocation ID of the Elastic IP address that's associated with the NAT gateway.</p>
    #[doc(hidden)]
    pub allocation_id: std::option::Option<std::string::String>,
    /// <p>The ID of the network interface associated with the NAT gateway.</p>
    #[doc(hidden)]
    pub network_interface_id: std::option::Option<std::string::String>,
    /// <p>The private IP address associated with the NAT gateway.</p>
    #[doc(hidden)]
    pub private_ip: std::option::Option<std::string::String>,
    /// <p>[Public NAT gateway only] The Elastic IP address associated with the NAT gateway.</p>
    #[doc(hidden)]
    pub public_ip: std::option::Option<std::string::String>,
}
impl NatGatewayAddress {
    /// <p>[Public NAT gateway only] The allocation ID of the Elastic IP address that's associated with the NAT gateway.</p>
    pub fn allocation_id(&self) -> std::option::Option<&str> {
        self.allocation_id.as_deref()
    }
    /// <p>The ID of the network interface associated with the NAT gateway.</p>
    pub fn network_interface_id(&self) -> std::option::Option<&str> {
        self.network_interface_id.as_deref()
    }
    /// <p>The private IP address associated with the NAT gateway.</p>
    pub fn private_ip(&self) -> std::option::Option<&str> {
        self.private_ip.as_deref()
    }
    /// <p>[Public NAT gateway only] The Elastic IP address associated with the NAT gateway.</p>
    pub fn public_ip(&self) -> std::option::Option<&str> {
        self.public_ip.as_deref()
    }
}
/// See [`NatGatewayAddress`](crate::model::NatGatewayAddress).
pub mod nat_gateway_address {

    /// A builder for [`NatGatewayAddress`](crate::model::NatGatewayAddress).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) allocation_id: std::option::Option<std::string::String>,
        pub(crate) network_interface_id: std::option::Option<std::string::String>,
        pub(crate) private_ip: std::option::Option<std::string::String>,
        pub(crate) public_ip: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>[Public NAT gateway only] The allocation ID of the Elastic IP address that's associated with the NAT gateway.</p>
        pub fn allocation_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.allocation_id = Some(input.into());
            self
        }
        /// <p>[Public NAT gateway only] The allocation ID of the Elastic IP address that's associated with the NAT gateway.</p>
        pub fn set_allocation_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.allocation_id = input;
            self
        }
        /// <p>The ID of the network interface associated with the NAT gateway.</p>
        pub fn network_interface_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.network_interface_id = Some(input.into());
            self
        }
        /// <p>The ID of the network interface associated with the NAT gateway.</p>
        pub fn set_network_interface_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.network_interface_id = input;
            self
        }
        /// <p>The private IP address associated with the NAT gateway.</p>
        pub fn private_ip(mut self, input: impl Into<std::string::String>) -> Self {
            self.private_ip = Some(input.into());
            self
        }
        /// <p>The private IP address associated with the NAT gateway.</p>
        pub fn set_private_ip(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.private_ip = input;
            self
        }
        /// <p>[Public NAT gateway only] The Elastic IP address associated with the NAT gateway.</p>
        pub fn public_ip(mut self, input: impl Into<std::string::String>) -> Self {
            self.public_ip = Some(input.into());
            self
        }
        /// <p>[Public NAT gateway only] The Elastic IP address associated with the NAT gateway.</p>
        pub fn set_public_ip(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.public_ip = input;
            self
        }
        /// Consumes the builder and constructs a [`NatGatewayAddress`](crate::model::NatGatewayAddress).
        pub fn build(self) -> crate::model::NatGatewayAddress {
            crate::model::NatGatewayAddress {
                allocation_id: self.allocation_id,
                network_interface_id: self.network_interface_id,
                private_ip: self.private_ip,
                public_ip: self.public_ip,
            }
        }
    }
}
impl NatGatewayAddress {
    /// Creates a new builder-style object to manufacture [`NatGatewayAddress`](crate::model::NatGatewayAddress).
    pub fn builder() -> crate::model::nat_gateway_address::Builder {
        crate::model::nat_gateway_address::Builder::default()
    }
}

/// <p>Describes the status of a moving Elastic IP address.</p> <note>
/// <p>We are retiring EC2-Classic. We recommend that you migrate from EC2-Classic to a VPC. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html">Migrate from EC2-Classic to a VPC</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
/// </note>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct MovingAddressStatus {
    /// <p>The status of the Elastic IP address that's being moved to the EC2-VPC platform, or restored to the EC2-Classic platform.</p>
    #[doc(hidden)]
    pub move_status: std::option::Option<crate::model::MoveStatus>,
    /// <p>The Elastic IP address.</p>
    #[doc(hidden)]
    pub public_ip: std::option::Option<std::string::String>,
}
impl MovingAddressStatus {
    /// <p>The status of the Elastic IP address that's being moved to the EC2-VPC platform, or restored to the EC2-Classic platform.</p>
    pub fn move_status(&self) -> std::option::Option<&crate::model::MoveStatus> {
        self.move_status.as_ref()
    }
    /// <p>The Elastic IP address.</p>
    pub fn public_ip(&self) -> std::option::Option<&str> {
        self.public_ip.as_deref()
    }
}
/// See [`MovingAddressStatus`](crate::model::MovingAddressStatus).
pub mod moving_address_status {

    /// A builder for [`MovingAddressStatus`](crate::model::MovingAddressStatus).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) move_status: std::option::Option<crate::model::MoveStatus>,
        pub(crate) public_ip: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The status of the Elastic IP address that's being moved to the EC2-VPC platform, or restored to the EC2-Classic platform.</p>
        pub fn move_status(mut self, input: crate::model::MoveStatus) -> Self {
            self.move_status = Some(input);
            self
        }
        /// <p>The status of the Elastic IP address that's being moved to the EC2-VPC platform, or restored to the EC2-Classic platform.</p>
        pub fn set_move_status(
            mut self,
            input: std::option::Option<crate::model::MoveStatus>,
        ) -> Self {
            self.move_status = input;
            self
        }
        /// <p>The Elastic IP address.</p>
        pub fn public_ip(mut self, input: impl Into<std::string::String>) -> Self {
            self.public_ip = Some(input.into());
            self
        }
        /// <p>The Elastic IP address.</p>
        pub fn set_public_ip(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.public_ip = input;
            self
        }
        /// Consumes the builder and constructs a [`MovingAddressStatus`](crate::model::MovingAddressStatus).
        pub fn build(self) -> crate::model::MovingAddressStatus {
            crate::model::MovingAddressStatus {
                move_status: self.move_status,
                public_ip: self.public_ip,
            }
        }
    }
}
impl MovingAddressStatus {
    /// Creates a new builder-style object to manufacture [`MovingAddressStatus`](crate::model::MovingAddressStatus).
    pub fn builder() -> crate::model::moving_address_status::Builder {
        crate::model::moving_address_status::Builder::default()
    }
}

/// When writing a match expression against `MoveStatus`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let movestatus = unimplemented!();
/// match movestatus {
///     MoveStatus::MovingToVpc => { /* ... */ },
///     MoveStatus::RestoringToClassic => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `movestatus` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `MoveStatus::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `MoveStatus::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `MoveStatus::NewFeature` is defined.
/// Specifically, when `movestatus` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `MoveStatus::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 MoveStatus {
    #[allow(missing_docs)] // documentation missing in model
    MovingToVpc,
    #[allow(missing_docs)] // documentation missing in model
    RestoringToClassic,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for MoveStatus {
    fn from(s: &str) -> Self {
        match s {
            "movingToVpc" => MoveStatus::MovingToVpc,
            "restoringToClassic" => MoveStatus::RestoringToClassic,
            other => MoveStatus::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for MoveStatus {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(MoveStatus::from(s))
    }
}
impl MoveStatus {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            MoveStatus::MovingToVpc => "movingToVpc",
            MoveStatus::RestoringToClassic => "restoringToClassic",
            MoveStatus::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["movingToVpc", "restoringToClassic"]
    }
}
impl AsRef<str> for MoveStatus {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes a local gateway virtual interface.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LocalGatewayVirtualInterface {
    /// <p>The ID of the virtual interface.</p>
    #[doc(hidden)]
    pub local_gateway_virtual_interface_id: std::option::Option<std::string::String>,
    /// <p>The ID of the local gateway.</p>
    #[doc(hidden)]
    pub local_gateway_id: std::option::Option<std::string::String>,
    /// <p>The ID of the VLAN.</p>
    #[doc(hidden)]
    pub vlan: std::option::Option<i32>,
    /// <p>The local address.</p>
    #[doc(hidden)]
    pub local_address: std::option::Option<std::string::String>,
    /// <p>The peer address.</p>
    #[doc(hidden)]
    pub peer_address: std::option::Option<std::string::String>,
    /// <p>The Border Gateway Protocol (BGP) Autonomous System Number (ASN) of the local gateway.</p>
    #[doc(hidden)]
    pub local_bgp_asn: std::option::Option<i32>,
    /// <p>The peer BGP ASN.</p>
    #[doc(hidden)]
    pub peer_bgp_asn: std::option::Option<i32>,
    /// <p>The ID of the Amazon Web Services account that owns the local gateway virtual interface.</p>
    #[doc(hidden)]
    pub owner_id: std::option::Option<std::string::String>,
    /// <p>The tags assigned to the virtual interface.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl LocalGatewayVirtualInterface {
    /// <p>The ID of the virtual interface.</p>
    pub fn local_gateway_virtual_interface_id(&self) -> std::option::Option<&str> {
        self.local_gateway_virtual_interface_id.as_deref()
    }
    /// <p>The ID of the local gateway.</p>
    pub fn local_gateway_id(&self) -> std::option::Option<&str> {
        self.local_gateway_id.as_deref()
    }
    /// <p>The ID of the VLAN.</p>
    pub fn vlan(&self) -> std::option::Option<i32> {
        self.vlan
    }
    /// <p>The local address.</p>
    pub fn local_address(&self) -> std::option::Option<&str> {
        self.local_address.as_deref()
    }
    /// <p>The peer address.</p>
    pub fn peer_address(&self) -> std::option::Option<&str> {
        self.peer_address.as_deref()
    }
    /// <p>The Border Gateway Protocol (BGP) Autonomous System Number (ASN) of the local gateway.</p>
    pub fn local_bgp_asn(&self) -> std::option::Option<i32> {
        self.local_bgp_asn
    }
    /// <p>The peer BGP ASN.</p>
    pub fn peer_bgp_asn(&self) -> std::option::Option<i32> {
        self.peer_bgp_asn
    }
    /// <p>The ID of the Amazon Web Services account that owns the local gateway virtual interface.</p>
    pub fn owner_id(&self) -> std::option::Option<&str> {
        self.owner_id.as_deref()
    }
    /// <p>The tags assigned to the virtual interface.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
}
/// See [`LocalGatewayVirtualInterface`](crate::model::LocalGatewayVirtualInterface).
pub mod local_gateway_virtual_interface {

    /// A builder for [`LocalGatewayVirtualInterface`](crate::model::LocalGatewayVirtualInterface).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) local_gateway_virtual_interface_id: std::option::Option<std::string::String>,
        pub(crate) local_gateway_id: std::option::Option<std::string::String>,
        pub(crate) vlan: std::option::Option<i32>,
        pub(crate) local_address: std::option::Option<std::string::String>,
        pub(crate) peer_address: std::option::Option<std::string::String>,
        pub(crate) local_bgp_asn: std::option::Option<i32>,
        pub(crate) peer_bgp_asn: std::option::Option<i32>,
        pub(crate) owner_id: std::option::Option<std::string::String>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    }
    impl Builder {
        /// <p>The ID of the virtual interface.</p>
        pub fn local_gateway_virtual_interface_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.local_gateway_virtual_interface_id = Some(input.into());
            self
        }
        /// <p>The ID of the virtual interface.</p>
        pub fn set_local_gateway_virtual_interface_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.local_gateway_virtual_interface_id = input;
            self
        }
        /// <p>The ID of the local gateway.</p>
        pub fn local_gateway_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.local_gateway_id = Some(input.into());
            self
        }
        /// <p>The ID of the local gateway.</p>
        pub fn set_local_gateway_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.local_gateway_id = input;
            self
        }
        /// <p>The ID of the VLAN.</p>
        pub fn vlan(mut self, input: i32) -> Self {
            self.vlan = Some(input);
            self
        }
        /// <p>The ID of the VLAN.</p>
        pub fn set_vlan(mut self, input: std::option::Option<i32>) -> Self {
            self.vlan = input;
            self
        }
        /// <p>The local address.</p>
        pub fn local_address(mut self, input: impl Into<std::string::String>) -> Self {
            self.local_address = Some(input.into());
            self
        }
        /// <p>The local address.</p>
        pub fn set_local_address(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.local_address = input;
            self
        }
        /// <p>The peer address.</p>
        pub fn peer_address(mut self, input: impl Into<std::string::String>) -> Self {
            self.peer_address = Some(input.into());
            self
        }
        /// <p>The peer address.</p>
        pub fn set_peer_address(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.peer_address = input;
            self
        }
        /// <p>The Border Gateway Protocol (BGP) Autonomous System Number (ASN) of the local gateway.</p>
        pub fn local_bgp_asn(mut self, input: i32) -> Self {
            self.local_bgp_asn = Some(input);
            self
        }
        /// <p>The Border Gateway Protocol (BGP) Autonomous System Number (ASN) of the local gateway.</p>
        pub fn set_local_bgp_asn(mut self, input: std::option::Option<i32>) -> Self {
            self.local_bgp_asn = input;
            self
        }
        /// <p>The peer BGP ASN.</p>
        pub fn peer_bgp_asn(mut self, input: i32) -> Self {
            self.peer_bgp_asn = Some(input);
            self
        }
        /// <p>The peer BGP ASN.</p>
        pub fn set_peer_bgp_asn(mut self, input: std::option::Option<i32>) -> Self {
            self.peer_bgp_asn = input;
            self
        }
        /// <p>The ID of the Amazon Web Services account that owns the local gateway virtual interface.</p>
        pub fn owner_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.owner_id = Some(input.into());
            self
        }
        /// <p>The ID of the Amazon Web Services account that owns the local gateway virtual interface.</p>
        pub fn set_owner_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.owner_id = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>The tags assigned to the virtual interface.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>The tags assigned to the virtual interface.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// Consumes the builder and constructs a [`LocalGatewayVirtualInterface`](crate::model::LocalGatewayVirtualInterface).
        pub fn build(self) -> crate::model::LocalGatewayVirtualInterface {
            crate::model::LocalGatewayVirtualInterface {
                local_gateway_virtual_interface_id: self.local_gateway_virtual_interface_id,
                local_gateway_id: self.local_gateway_id,
                vlan: self.vlan,
                local_address: self.local_address,
                peer_address: self.peer_address,
                local_bgp_asn: self.local_bgp_asn,
                peer_bgp_asn: self.peer_bgp_asn,
                owner_id: self.owner_id,
                tags: self.tags,
            }
        }
    }
}
impl LocalGatewayVirtualInterface {
    /// Creates a new builder-style object to manufacture [`LocalGatewayVirtualInterface`](crate::model::LocalGatewayVirtualInterface).
    pub fn builder() -> crate::model::local_gateway_virtual_interface::Builder {
        crate::model::local_gateway_virtual_interface::Builder::default()
    }
}

/// <p>Describes a local gateway virtual interface group.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LocalGatewayVirtualInterfaceGroup {
    /// <p>The ID of the virtual interface group.</p>
    #[doc(hidden)]
    pub local_gateway_virtual_interface_group_id: std::option::Option<std::string::String>,
    /// <p>The IDs of the virtual interfaces.</p>
    #[doc(hidden)]
    pub local_gateway_virtual_interface_ids:
        std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>The ID of the local gateway.</p>
    #[doc(hidden)]
    pub local_gateway_id: std::option::Option<std::string::String>,
    /// <p>The ID of the Amazon Web Services account that owns the local gateway virtual interface group.</p>
    #[doc(hidden)]
    pub owner_id: std::option::Option<std::string::String>,
    /// <p>The tags assigned to the virtual interface group.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl LocalGatewayVirtualInterfaceGroup {
    /// <p>The ID of the virtual interface group.</p>
    pub fn local_gateway_virtual_interface_group_id(&self) -> std::option::Option<&str> {
        self.local_gateway_virtual_interface_group_id.as_deref()
    }
    /// <p>The IDs of the virtual interfaces.</p>
    pub fn local_gateway_virtual_interface_ids(
        &self,
    ) -> std::option::Option<&[std::string::String]> {
        self.local_gateway_virtual_interface_ids.as_deref()
    }
    /// <p>The ID of the local gateway.</p>
    pub fn local_gateway_id(&self) -> std::option::Option<&str> {
        self.local_gateway_id.as_deref()
    }
    /// <p>The ID of the Amazon Web Services account that owns the local gateway virtual interface group.</p>
    pub fn owner_id(&self) -> std::option::Option<&str> {
        self.owner_id.as_deref()
    }
    /// <p>The tags assigned to the virtual interface group.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
}
/// See [`LocalGatewayVirtualInterfaceGroup`](crate::model::LocalGatewayVirtualInterfaceGroup).
pub mod local_gateway_virtual_interface_group {

    /// A builder for [`LocalGatewayVirtualInterfaceGroup`](crate::model::LocalGatewayVirtualInterfaceGroup).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) local_gateway_virtual_interface_group_id:
            std::option::Option<std::string::String>,
        pub(crate) local_gateway_virtual_interface_ids:
            std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) local_gateway_id: std::option::Option<std::string::String>,
        pub(crate) owner_id: std::option::Option<std::string::String>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    }
    impl Builder {
        /// <p>The ID of the virtual interface group.</p>
        pub fn local_gateway_virtual_interface_group_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.local_gateway_virtual_interface_group_id = Some(input.into());
            self
        }
        /// <p>The ID of the virtual interface group.</p>
        pub fn set_local_gateway_virtual_interface_group_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.local_gateway_virtual_interface_group_id = input;
            self
        }
        /// Appends an item to `local_gateway_virtual_interface_ids`.
        ///
        /// To override the contents of this collection use [`set_local_gateway_virtual_interface_ids`](Self::set_local_gateway_virtual_interface_ids).
        ///
        /// <p>The IDs of the virtual interfaces.</p>
        pub fn local_gateway_virtual_interface_ids(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            let mut v = self.local_gateway_virtual_interface_ids.unwrap_or_default();
            v.push(input.into());
            self.local_gateway_virtual_interface_ids = Some(v);
            self
        }
        /// <p>The IDs of the virtual interfaces.</p>
        pub fn set_local_gateway_virtual_interface_ids(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.local_gateway_virtual_interface_ids = input;
            self
        }
        /// <p>The ID of the local gateway.</p>
        pub fn local_gateway_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.local_gateway_id = Some(input.into());
            self
        }
        /// <p>The ID of the local gateway.</p>
        pub fn set_local_gateway_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.local_gateway_id = input;
            self
        }
        /// <p>The ID of the Amazon Web Services account that owns the local gateway virtual interface group.</p>
        pub fn owner_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.owner_id = Some(input.into());
            self
        }
        /// <p>The ID of the Amazon Web Services account that owns the local gateway virtual interface group.</p>
        pub fn set_owner_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.owner_id = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>The tags assigned to the virtual interface group.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>The tags assigned to the virtual interface group.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// Consumes the builder and constructs a [`LocalGatewayVirtualInterfaceGroup`](crate::model::LocalGatewayVirtualInterfaceGroup).
        pub fn build(self) -> crate::model::LocalGatewayVirtualInterfaceGroup {
            crate::model::LocalGatewayVirtualInterfaceGroup {
                local_gateway_virtual_interface_group_id: self
                    .local_gateway_virtual_interface_group_id,
                local_gateway_virtual_interface_ids: self.local_gateway_virtual_interface_ids,
                local_gateway_id: self.local_gateway_id,
                owner_id: self.owner_id,
                tags: self.tags,
            }
        }
    }
}
impl LocalGatewayVirtualInterfaceGroup {
    /// Creates a new builder-style object to manufacture [`LocalGatewayVirtualInterfaceGroup`](crate::model::LocalGatewayVirtualInterfaceGroup).
    pub fn builder() -> crate::model::local_gateway_virtual_interface_group::Builder {
        crate::model::local_gateway_virtual_interface_group::Builder::default()
    }
}

/// <p>Describes a local gateway.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LocalGateway {
    /// <p>The ID of the local gateway.</p>
    #[doc(hidden)]
    pub local_gateway_id: std::option::Option<std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the Outpost.</p>
    #[doc(hidden)]
    pub outpost_arn: std::option::Option<std::string::String>,
    /// <p>The ID of the Amazon Web Services account that owns the local gateway.</p>
    #[doc(hidden)]
    pub owner_id: std::option::Option<std::string::String>,
    /// <p>The state of the local gateway.</p>
    #[doc(hidden)]
    pub state: std::option::Option<std::string::String>,
    /// <p>The tags assigned to the local gateway.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl LocalGateway {
    /// <p>The ID of the local gateway.</p>
    pub fn local_gateway_id(&self) -> std::option::Option<&str> {
        self.local_gateway_id.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the Outpost.</p>
    pub fn outpost_arn(&self) -> std::option::Option<&str> {
        self.outpost_arn.as_deref()
    }
    /// <p>The ID of the Amazon Web Services account that owns the local gateway.</p>
    pub fn owner_id(&self) -> std::option::Option<&str> {
        self.owner_id.as_deref()
    }
    /// <p>The state of the local gateway.</p>
    pub fn state(&self) -> std::option::Option<&str> {
        self.state.as_deref()
    }
    /// <p>The tags assigned to the local gateway.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
}
/// See [`LocalGateway`](crate::model::LocalGateway).
pub mod local_gateway {

    /// A builder for [`LocalGateway`](crate::model::LocalGateway).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) local_gateway_id: std::option::Option<std::string::String>,
        pub(crate) outpost_arn: std::option::Option<std::string::String>,
        pub(crate) owner_id: std::option::Option<std::string::String>,
        pub(crate) state: std::option::Option<std::string::String>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    }
    impl Builder {
        /// <p>The ID of the local gateway.</p>
        pub fn local_gateway_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.local_gateway_id = Some(input.into());
            self
        }
        /// <p>The ID of the local gateway.</p>
        pub fn set_local_gateway_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.local_gateway_id = input;
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the Outpost.</p>
        pub fn outpost_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.outpost_arn = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the Outpost.</p>
        pub fn set_outpost_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.outpost_arn = input;
            self
        }
        /// <p>The ID of the Amazon Web Services account that owns the local gateway.</p>
        pub fn owner_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.owner_id = Some(input.into());
            self
        }
        /// <p>The ID of the Amazon Web Services account that owns the local gateway.</p>
        pub fn set_owner_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.owner_id = input;
            self
        }
        /// <p>The state of the local gateway.</p>
        pub fn state(mut self, input: impl Into<std::string::String>) -> Self {
            self.state = Some(input.into());
            self
        }
        /// <p>The state of the local gateway.</p>
        pub fn set_state(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.state = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>The tags assigned to the local gateway.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>The tags assigned to the local gateway.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// Consumes the builder and constructs a [`LocalGateway`](crate::model::LocalGateway).
        pub fn build(self) -> crate::model::LocalGateway {
            crate::model::LocalGateway {
                local_gateway_id: self.local_gateway_id,
                outpost_arn: self.outpost_arn,
                owner_id: self.owner_id,
                state: self.state,
                tags: self.tags,
            }
        }
    }
}
impl LocalGateway {
    /// Creates a new builder-style object to manufacture [`LocalGateway`](crate::model::LocalGateway).
    pub fn builder() -> crate::model::local_gateway::Builder {
        crate::model::local_gateway::Builder::default()
    }
}

/// <p>Describes an association between a local gateway route table and a VPC.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LocalGatewayRouteTableVpcAssociation {
    /// <p>The ID of the association.</p>
    #[doc(hidden)]
    pub local_gateway_route_table_vpc_association_id: std::option::Option<std::string::String>,
    /// <p>The ID of the local gateway route table.</p>
    #[doc(hidden)]
    pub local_gateway_route_table_id: std::option::Option<std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the local gateway route table for the association.</p>
    #[doc(hidden)]
    pub local_gateway_route_table_arn: std::option::Option<std::string::String>,
    /// <p>The ID of the local gateway.</p>
    #[doc(hidden)]
    pub local_gateway_id: std::option::Option<std::string::String>,
    /// <p>The ID of the VPC.</p>
    #[doc(hidden)]
    pub vpc_id: std::option::Option<std::string::String>,
    /// <p>The ID of the Amazon Web Services account that owns the local gateway route table for the association.</p>
    #[doc(hidden)]
    pub owner_id: std::option::Option<std::string::String>,
    /// <p>The state of the association.</p>
    #[doc(hidden)]
    pub state: std::option::Option<std::string::String>,
    /// <p>The tags assigned to the association.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl LocalGatewayRouteTableVpcAssociation {
    /// <p>The ID of the association.</p>
    pub fn local_gateway_route_table_vpc_association_id(&self) -> std::option::Option<&str> {
        self.local_gateway_route_table_vpc_association_id.as_deref()
    }
    /// <p>The ID of the local gateway route table.</p>
    pub fn local_gateway_route_table_id(&self) -> std::option::Option<&str> {
        self.local_gateway_route_table_id.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the local gateway route table for the association.</p>
    pub fn local_gateway_route_table_arn(&self) -> std::option::Option<&str> {
        self.local_gateway_route_table_arn.as_deref()
    }
    /// <p>The ID of the local gateway.</p>
    pub fn local_gateway_id(&self) -> std::option::Option<&str> {
        self.local_gateway_id.as_deref()
    }
    /// <p>The ID of the VPC.</p>
    pub fn vpc_id(&self) -> std::option::Option<&str> {
        self.vpc_id.as_deref()
    }
    /// <p>The ID of the Amazon Web Services account that owns the local gateway route table for the association.</p>
    pub fn owner_id(&self) -> std::option::Option<&str> {
        self.owner_id.as_deref()
    }
    /// <p>The state of the association.</p>
    pub fn state(&self) -> std::option::Option<&str> {
        self.state.as_deref()
    }
    /// <p>The tags assigned to the association.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
}
/// See [`LocalGatewayRouteTableVpcAssociation`](crate::model::LocalGatewayRouteTableVpcAssociation).
pub mod local_gateway_route_table_vpc_association {

    /// A builder for [`LocalGatewayRouteTableVpcAssociation`](crate::model::LocalGatewayRouteTableVpcAssociation).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) local_gateway_route_table_vpc_association_id:
            std::option::Option<std::string::String>,
        pub(crate) local_gateway_route_table_id: std::option::Option<std::string::String>,
        pub(crate) local_gateway_route_table_arn: std::option::Option<std::string::String>,
        pub(crate) local_gateway_id: std::option::Option<std::string::String>,
        pub(crate) vpc_id: std::option::Option<std::string::String>,
        pub(crate) owner_id: std::option::Option<std::string::String>,
        pub(crate) state: std::option::Option<std::string::String>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    }
    impl Builder {
        /// <p>The ID of the association.</p>
        pub fn local_gateway_route_table_vpc_association_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.local_gateway_route_table_vpc_association_id = Some(input.into());
            self
        }
        /// <p>The ID of the association.</p>
        pub fn set_local_gateway_route_table_vpc_association_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.local_gateway_route_table_vpc_association_id = input;
            self
        }
        /// <p>The ID of the local gateway route table.</p>
        pub fn local_gateway_route_table_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.local_gateway_route_table_id = Some(input.into());
            self
        }
        /// <p>The ID of the local gateway route table.</p>
        pub fn set_local_gateway_route_table_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.local_gateway_route_table_id = input;
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the local gateway route table for the association.</p>
        pub fn local_gateway_route_table_arn(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.local_gateway_route_table_arn = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the local gateway route table for the association.</p>
        pub fn set_local_gateway_route_table_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.local_gateway_route_table_arn = input;
            self
        }
        /// <p>The ID of the local gateway.</p>
        pub fn local_gateway_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.local_gateway_id = Some(input.into());
            self
        }
        /// <p>The ID of the local gateway.</p>
        pub fn set_local_gateway_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.local_gateway_id = input;
            self
        }
        /// <p>The ID of the VPC.</p>
        pub fn vpc_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.vpc_id = Some(input.into());
            self
        }
        /// <p>The ID of the VPC.</p>
        pub fn set_vpc_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.vpc_id = input;
            self
        }
        /// <p>The ID of the Amazon Web Services account that owns the local gateway route table for the association.</p>
        pub fn owner_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.owner_id = Some(input.into());
            self
        }
        /// <p>The ID of the Amazon Web Services account that owns the local gateway route table for the association.</p>
        pub fn set_owner_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.owner_id = input;
            self
        }
        /// <p>The state of the association.</p>
        pub fn state(mut self, input: impl Into<std::string::String>) -> Self {
            self.state = Some(input.into());
            self
        }
        /// <p>The state of the association.</p>
        pub fn set_state(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.state = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>The tags assigned to the association.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>The tags assigned to the association.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// Consumes the builder and constructs a [`LocalGatewayRouteTableVpcAssociation`](crate::model::LocalGatewayRouteTableVpcAssociation).
        pub fn build(self) -> crate::model::LocalGatewayRouteTableVpcAssociation {
            crate::model::LocalGatewayRouteTableVpcAssociation {
                local_gateway_route_table_vpc_association_id: self
                    .local_gateway_route_table_vpc_association_id,
                local_gateway_route_table_id: self.local_gateway_route_table_id,
                local_gateway_route_table_arn: self.local_gateway_route_table_arn,
                local_gateway_id: self.local_gateway_id,
                vpc_id: self.vpc_id,
                owner_id: self.owner_id,
                state: self.state,
                tags: self.tags,
            }
        }
    }
}
impl LocalGatewayRouteTableVpcAssociation {
    /// Creates a new builder-style object to manufacture [`LocalGatewayRouteTableVpcAssociation`](crate::model::LocalGatewayRouteTableVpcAssociation).
    pub fn builder() -> crate::model::local_gateway_route_table_vpc_association::Builder {
        crate::model::local_gateway_route_table_vpc_association::Builder::default()
    }
}

/// <p>Describes an association between a local gateway route table and a virtual interface group.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LocalGatewayRouteTableVirtualInterfaceGroupAssociation {
    /// <p>The ID of the association.</p>
    #[doc(hidden)]
    pub local_gateway_route_table_virtual_interface_group_association_id:
        std::option::Option<std::string::String>,
    /// <p>The ID of the virtual interface group.</p>
    #[doc(hidden)]
    pub local_gateway_virtual_interface_group_id: std::option::Option<std::string::String>,
    /// <p>The ID of the local gateway.</p>
    #[doc(hidden)]
    pub local_gateway_id: std::option::Option<std::string::String>,
    /// <p>The ID of the local gateway route table.</p>
    #[doc(hidden)]
    pub local_gateway_route_table_id: std::option::Option<std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the local gateway route table for the virtual interface group.</p>
    #[doc(hidden)]
    pub local_gateway_route_table_arn: std::option::Option<std::string::String>,
    /// <p>The ID of the Amazon Web Services account that owns the local gateway virtual interface group association.</p>
    #[doc(hidden)]
    pub owner_id: std::option::Option<std::string::String>,
    /// <p>The state of the association.</p>
    #[doc(hidden)]
    pub state: std::option::Option<std::string::String>,
    /// <p>The tags assigned to the association.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl LocalGatewayRouteTableVirtualInterfaceGroupAssociation {
    /// <p>The ID of the association.</p>
    pub fn local_gateway_route_table_virtual_interface_group_association_id(
        &self,
    ) -> std::option::Option<&str> {
        self.local_gateway_route_table_virtual_interface_group_association_id
            .as_deref()
    }
    /// <p>The ID of the virtual interface group.</p>
    pub fn local_gateway_virtual_interface_group_id(&self) -> std::option::Option<&str> {
        self.local_gateway_virtual_interface_group_id.as_deref()
    }
    /// <p>The ID of the local gateway.</p>
    pub fn local_gateway_id(&self) -> std::option::Option<&str> {
        self.local_gateway_id.as_deref()
    }
    /// <p>The ID of the local gateway route table.</p>
    pub fn local_gateway_route_table_id(&self) -> std::option::Option<&str> {
        self.local_gateway_route_table_id.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the local gateway route table for the virtual interface group.</p>
    pub fn local_gateway_route_table_arn(&self) -> std::option::Option<&str> {
        self.local_gateway_route_table_arn.as_deref()
    }
    /// <p>The ID of the Amazon Web Services account that owns the local gateway virtual interface group association.</p>
    pub fn owner_id(&self) -> std::option::Option<&str> {
        self.owner_id.as_deref()
    }
    /// <p>The state of the association.</p>
    pub fn state(&self) -> std::option::Option<&str> {
        self.state.as_deref()
    }
    /// <p>The tags assigned to the association.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
}
/// See [`LocalGatewayRouteTableVirtualInterfaceGroupAssociation`](crate::model::LocalGatewayRouteTableVirtualInterfaceGroupAssociation).
pub mod local_gateway_route_table_virtual_interface_group_association {

    /// A builder for [`LocalGatewayRouteTableVirtualInterfaceGroupAssociation`](crate::model::LocalGatewayRouteTableVirtualInterfaceGroupAssociation).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) local_gateway_route_table_virtual_interface_group_association_id:
            std::option::Option<std::string::String>,
        pub(crate) local_gateway_virtual_interface_group_id:
            std::option::Option<std::string::String>,
        pub(crate) local_gateway_id: std::option::Option<std::string::String>,
        pub(crate) local_gateway_route_table_id: std::option::Option<std::string::String>,
        pub(crate) local_gateway_route_table_arn: std::option::Option<std::string::String>,
        pub(crate) owner_id: std::option::Option<std::string::String>,
        pub(crate) state: std::option::Option<std::string::String>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    }
    impl Builder {
        /// <p>The ID of the association.</p>
        pub fn local_gateway_route_table_virtual_interface_group_association_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.local_gateway_route_table_virtual_interface_group_association_id =
                Some(input.into());
            self
        }
        /// <p>The ID of the association.</p>
        pub fn set_local_gateway_route_table_virtual_interface_group_association_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.local_gateway_route_table_virtual_interface_group_association_id = input;
            self
        }
        /// <p>The ID of the virtual interface group.</p>
        pub fn local_gateway_virtual_interface_group_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.local_gateway_virtual_interface_group_id = Some(input.into());
            self
        }
        /// <p>The ID of the virtual interface group.</p>
        pub fn set_local_gateway_virtual_interface_group_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.local_gateway_virtual_interface_group_id = input;
            self
        }
        /// <p>The ID of the local gateway.</p>
        pub fn local_gateway_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.local_gateway_id = Some(input.into());
            self
        }
        /// <p>The ID of the local gateway.</p>
        pub fn set_local_gateway_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.local_gateway_id = input;
            self
        }
        /// <p>The ID of the local gateway route table.</p>
        pub fn local_gateway_route_table_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.local_gateway_route_table_id = Some(input.into());
            self
        }
        /// <p>The ID of the local gateway route table.</p>
        pub fn set_local_gateway_route_table_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.local_gateway_route_table_id = input;
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the local gateway route table for the virtual interface group.</p>
        pub fn local_gateway_route_table_arn(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.local_gateway_route_table_arn = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the local gateway route table for the virtual interface group.</p>
        pub fn set_local_gateway_route_table_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.local_gateway_route_table_arn = input;
            self
        }
        /// <p>The ID of the Amazon Web Services account that owns the local gateway virtual interface group association.</p>
        pub fn owner_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.owner_id = Some(input.into());
            self
        }
        /// <p>The ID of the Amazon Web Services account that owns the local gateway virtual interface group association.</p>
        pub fn set_owner_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.owner_id = input;
            self
        }
        /// <p>The state of the association.</p>
        pub fn state(mut self, input: impl Into<std::string::String>) -> Self {
            self.state = Some(input.into());
            self
        }
        /// <p>The state of the association.</p>
        pub fn set_state(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.state = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>The tags assigned to the association.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>The tags assigned to the association.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// Consumes the builder and constructs a [`LocalGatewayRouteTableVirtualInterfaceGroupAssociation`](crate::model::LocalGatewayRouteTableVirtualInterfaceGroupAssociation).
        pub fn build(self) -> crate::model::LocalGatewayRouteTableVirtualInterfaceGroupAssociation {
            crate::model::LocalGatewayRouteTableVirtualInterfaceGroupAssociation {
                local_gateway_route_table_virtual_interface_group_association_id: self
                    .local_gateway_route_table_virtual_interface_group_association_id,
                local_gateway_virtual_interface_group_id: self
                    .local_gateway_virtual_interface_group_id,
                local_gateway_id: self.local_gateway_id,
                local_gateway_route_table_id: self.local_gateway_route_table_id,
                local_gateway_route_table_arn: self.local_gateway_route_table_arn,
                owner_id: self.owner_id,
                state: self.state,
                tags: self.tags,
            }
        }
    }
}
impl LocalGatewayRouteTableVirtualInterfaceGroupAssociation {
    /// Creates a new builder-style object to manufacture [`LocalGatewayRouteTableVirtualInterfaceGroupAssociation`](crate::model::LocalGatewayRouteTableVirtualInterfaceGroupAssociation).
    pub fn builder(
    ) -> crate::model::local_gateway_route_table_virtual_interface_group_association::Builder {
        crate::model::local_gateway_route_table_virtual_interface_group_association::Builder::default()
    }
}

/// <p>Describes a local gateway route table.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LocalGatewayRouteTable {
    /// <p>The ID of the local gateway route table.</p>
    #[doc(hidden)]
    pub local_gateway_route_table_id: std::option::Option<std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the local gateway route table.</p>
    #[doc(hidden)]
    pub local_gateway_route_table_arn: std::option::Option<std::string::String>,
    /// <p>The ID of the local gateway.</p>
    #[doc(hidden)]
    pub local_gateway_id: std::option::Option<std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the Outpost.</p>
    #[doc(hidden)]
    pub outpost_arn: std::option::Option<std::string::String>,
    /// <p>The ID of the Amazon Web Services account that owns the local gateway route table.</p>
    #[doc(hidden)]
    pub owner_id: std::option::Option<std::string::String>,
    /// <p>The state of the local gateway route table.</p>
    #[doc(hidden)]
    pub state: std::option::Option<std::string::String>,
    /// <p>The tags assigned to the local gateway route table.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    /// <p>The mode of the local gateway route table.</p>
    #[doc(hidden)]
    pub mode: std::option::Option<crate::model::LocalGatewayRouteTableMode>,
    /// <p>Information about the state change.</p>
    #[doc(hidden)]
    pub state_reason: std::option::Option<crate::model::StateReason>,
}
impl LocalGatewayRouteTable {
    /// <p>The ID of the local gateway route table.</p>
    pub fn local_gateway_route_table_id(&self) -> std::option::Option<&str> {
        self.local_gateway_route_table_id.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the local gateway route table.</p>
    pub fn local_gateway_route_table_arn(&self) -> std::option::Option<&str> {
        self.local_gateway_route_table_arn.as_deref()
    }
    /// <p>The ID of the local gateway.</p>
    pub fn local_gateway_id(&self) -> std::option::Option<&str> {
        self.local_gateway_id.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the Outpost.</p>
    pub fn outpost_arn(&self) -> std::option::Option<&str> {
        self.outpost_arn.as_deref()
    }
    /// <p>The ID of the Amazon Web Services account that owns the local gateway route table.</p>
    pub fn owner_id(&self) -> std::option::Option<&str> {
        self.owner_id.as_deref()
    }
    /// <p>The state of the local gateway route table.</p>
    pub fn state(&self) -> std::option::Option<&str> {
        self.state.as_deref()
    }
    /// <p>The tags assigned to the local gateway route table.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
    /// <p>The mode of the local gateway route table.</p>
    pub fn mode(&self) -> std::option::Option<&crate::model::LocalGatewayRouteTableMode> {
        self.mode.as_ref()
    }
    /// <p>Information about the state change.</p>
    pub fn state_reason(&self) -> std::option::Option<&crate::model::StateReason> {
        self.state_reason.as_ref()
    }
}
/// See [`LocalGatewayRouteTable`](crate::model::LocalGatewayRouteTable).
pub mod local_gateway_route_table {

    /// A builder for [`LocalGatewayRouteTable`](crate::model::LocalGatewayRouteTable).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) local_gateway_route_table_id: std::option::Option<std::string::String>,
        pub(crate) local_gateway_route_table_arn: std::option::Option<std::string::String>,
        pub(crate) local_gateway_id: std::option::Option<std::string::String>,
        pub(crate) outpost_arn: std::option::Option<std::string::String>,
        pub(crate) owner_id: std::option::Option<std::string::String>,
        pub(crate) state: std::option::Option<std::string::String>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        pub(crate) mode: std::option::Option<crate::model::LocalGatewayRouteTableMode>,
        pub(crate) state_reason: std::option::Option<crate::model::StateReason>,
    }
    impl Builder {
        /// <p>The ID of the local gateway route table.</p>
        pub fn local_gateway_route_table_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.local_gateway_route_table_id = Some(input.into());
            self
        }
        /// <p>The ID of the local gateway route table.</p>
        pub fn set_local_gateway_route_table_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.local_gateway_route_table_id = input;
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the local gateway route table.</p>
        pub fn local_gateway_route_table_arn(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.local_gateway_route_table_arn = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the local gateway route table.</p>
        pub fn set_local_gateway_route_table_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.local_gateway_route_table_arn = input;
            self
        }
        /// <p>The ID of the local gateway.</p>
        pub fn local_gateway_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.local_gateway_id = Some(input.into());
            self
        }
        /// <p>The ID of the local gateway.</p>
        pub fn set_local_gateway_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.local_gateway_id = input;
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the Outpost.</p>
        pub fn outpost_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.outpost_arn = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the Outpost.</p>
        pub fn set_outpost_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.outpost_arn = input;
            self
        }
        /// <p>The ID of the Amazon Web Services account that owns the local gateway route table.</p>
        pub fn owner_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.owner_id = Some(input.into());
            self
        }
        /// <p>The ID of the Amazon Web Services account that owns the local gateway route table.</p>
        pub fn set_owner_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.owner_id = input;
            self
        }
        /// <p>The state of the local gateway route table.</p>
        pub fn state(mut self, input: impl Into<std::string::String>) -> Self {
            self.state = Some(input.into());
            self
        }
        /// <p>The state of the local gateway route table.</p>
        pub fn set_state(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.state = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>The tags assigned to the local gateway route table.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>The tags assigned to the local gateway route table.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// <p>The mode of the local gateway route table.</p>
        pub fn mode(mut self, input: crate::model::LocalGatewayRouteTableMode) -> Self {
            self.mode = Some(input);
            self
        }
        /// <p>The mode of the local gateway route table.</p>
        pub fn set_mode(
            mut self,
            input: std::option::Option<crate::model::LocalGatewayRouteTableMode>,
        ) -> Self {
            self.mode = input;
            self
        }
        /// <p>Information about the state change.</p>
        pub fn state_reason(mut self, input: crate::model::StateReason) -> Self {
            self.state_reason = Some(input);
            self
        }
        /// <p>Information about the state change.</p>
        pub fn set_state_reason(
            mut self,
            input: std::option::Option<crate::model::StateReason>,
        ) -> Self {
            self.state_reason = input;
            self
        }
        /// Consumes the builder and constructs a [`LocalGatewayRouteTable`](crate::model::LocalGatewayRouteTable).
        pub fn build(self) -> crate::model::LocalGatewayRouteTable {
            crate::model::LocalGatewayRouteTable {
                local_gateway_route_table_id: self.local_gateway_route_table_id,
                local_gateway_route_table_arn: self.local_gateway_route_table_arn,
                local_gateway_id: self.local_gateway_id,
                outpost_arn: self.outpost_arn,
                owner_id: self.owner_id,
                state: self.state,
                tags: self.tags,
                mode: self.mode,
                state_reason: self.state_reason,
            }
        }
    }
}
impl LocalGatewayRouteTable {
    /// Creates a new builder-style object to manufacture [`LocalGatewayRouteTable`](crate::model::LocalGatewayRouteTable).
    pub fn builder() -> crate::model::local_gateway_route_table::Builder {
        crate::model::local_gateway_route_table::Builder::default()
    }
}

/// When writing a match expression against `LocalGatewayRouteTableMode`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let localgatewayroutetablemode = unimplemented!();
/// match localgatewayroutetablemode {
///     LocalGatewayRouteTableMode::Coip => { /* ... */ },
///     LocalGatewayRouteTableMode::DirectVpcRouting => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `localgatewayroutetablemode` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `LocalGatewayRouteTableMode::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `LocalGatewayRouteTableMode::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `LocalGatewayRouteTableMode::NewFeature` is defined.
/// Specifically, when `localgatewayroutetablemode` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `LocalGatewayRouteTableMode::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 LocalGatewayRouteTableMode {
    #[allow(missing_docs)] // documentation missing in model
    Coip,
    #[allow(missing_docs)] // documentation missing in model
    DirectVpcRouting,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for LocalGatewayRouteTableMode {
    fn from(s: &str) -> Self {
        match s {
            "coip" => LocalGatewayRouteTableMode::Coip,
            "direct-vpc-routing" => LocalGatewayRouteTableMode::DirectVpcRouting,
            other => LocalGatewayRouteTableMode::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for LocalGatewayRouteTableMode {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(LocalGatewayRouteTableMode::from(s))
    }
}
impl LocalGatewayRouteTableMode {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            LocalGatewayRouteTableMode::Coip => "coip",
            LocalGatewayRouteTableMode::DirectVpcRouting => "direct-vpc-routing",
            LocalGatewayRouteTableMode::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["coip", "direct-vpc-routing"]
    }
}
impl AsRef<str> for LocalGatewayRouteTableMode {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes a launch template version.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LaunchTemplateVersion {
    /// <p>The ID of the launch template.</p>
    #[doc(hidden)]
    pub launch_template_id: std::option::Option<std::string::String>,
    /// <p>The name of the launch template.</p>
    #[doc(hidden)]
    pub launch_template_name: std::option::Option<std::string::String>,
    /// <p>The version number.</p>
    #[doc(hidden)]
    pub version_number: std::option::Option<i64>,
    /// <p>The description for the version.</p>
    #[doc(hidden)]
    pub version_description: std::option::Option<std::string::String>,
    /// <p>The time the version was created.</p>
    #[doc(hidden)]
    pub create_time: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The principal that created the version.</p>
    #[doc(hidden)]
    pub created_by: std::option::Option<std::string::String>,
    /// <p>Indicates whether the version is the default version.</p>
    #[doc(hidden)]
    pub default_version: std::option::Option<bool>,
    /// <p>Information about the launch template.</p>
    #[doc(hidden)]
    pub launch_template_data: std::option::Option<crate::model::ResponseLaunchTemplateData>,
}
impl LaunchTemplateVersion {
    /// <p>The ID of the launch template.</p>
    pub fn launch_template_id(&self) -> std::option::Option<&str> {
        self.launch_template_id.as_deref()
    }
    /// <p>The name of the launch template.</p>
    pub fn launch_template_name(&self) -> std::option::Option<&str> {
        self.launch_template_name.as_deref()
    }
    /// <p>The version number.</p>
    pub fn version_number(&self) -> std::option::Option<i64> {
        self.version_number
    }
    /// <p>The description for the version.</p>
    pub fn version_description(&self) -> std::option::Option<&str> {
        self.version_description.as_deref()
    }
    /// <p>The time the version was created.</p>
    pub fn create_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.create_time.as_ref()
    }
    /// <p>The principal that created the version.</p>
    pub fn created_by(&self) -> std::option::Option<&str> {
        self.created_by.as_deref()
    }
    /// <p>Indicates whether the version is the default version.</p>
    pub fn default_version(&self) -> std::option::Option<bool> {
        self.default_version
    }
    /// <p>Information about the launch template.</p>
    pub fn launch_template_data(
        &self,
    ) -> std::option::Option<&crate::model::ResponseLaunchTemplateData> {
        self.launch_template_data.as_ref()
    }
}
/// See [`LaunchTemplateVersion`](crate::model::LaunchTemplateVersion).
pub mod launch_template_version {

    /// A builder for [`LaunchTemplateVersion`](crate::model::LaunchTemplateVersion).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) launch_template_id: std::option::Option<std::string::String>,
        pub(crate) launch_template_name: std::option::Option<std::string::String>,
        pub(crate) version_number: std::option::Option<i64>,
        pub(crate) version_description: std::option::Option<std::string::String>,
        pub(crate) create_time: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) created_by: std::option::Option<std::string::String>,
        pub(crate) default_version: std::option::Option<bool>,
        pub(crate) launch_template_data:
            std::option::Option<crate::model::ResponseLaunchTemplateData>,
    }
    impl Builder {
        /// <p>The ID of the launch template.</p>
        pub fn launch_template_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.launch_template_id = Some(input.into());
            self
        }
        /// <p>The ID of the launch template.</p>
        pub fn set_launch_template_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.launch_template_id = input;
            self
        }
        /// <p>The name of the launch template.</p>
        pub fn launch_template_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.launch_template_name = Some(input.into());
            self
        }
        /// <p>The name of the launch template.</p>
        pub fn set_launch_template_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.launch_template_name = input;
            self
        }
        /// <p>The version number.</p>
        pub fn version_number(mut self, input: i64) -> Self {
            self.version_number = Some(input);
            self
        }
        /// <p>The version number.</p>
        pub fn set_version_number(mut self, input: std::option::Option<i64>) -> Self {
            self.version_number = input;
            self
        }
        /// <p>The description for the version.</p>
        pub fn version_description(mut self, input: impl Into<std::string::String>) -> Self {
            self.version_description = Some(input.into());
            self
        }
        /// <p>The description for the version.</p>
        pub fn set_version_description(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.version_description = input;
            self
        }
        /// <p>The time the version was created.</p>
        pub fn create_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.create_time = Some(input);
            self
        }
        /// <p>The time the version was created.</p>
        pub fn set_create_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.create_time = input;
            self
        }
        /// <p>The principal that created the version.</p>
        pub fn created_by(mut self, input: impl Into<std::string::String>) -> Self {
            self.created_by = Some(input.into());
            self
        }
        /// <p>The principal that created the version.</p>
        pub fn set_created_by(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.created_by = input;
            self
        }
        /// <p>Indicates whether the version is the default version.</p>
        pub fn default_version(mut self, input: bool) -> Self {
            self.default_version = Some(input);
            self
        }
        /// <p>Indicates whether the version is the default version.</p>
        pub fn set_default_version(mut self, input: std::option::Option<bool>) -> Self {
            self.default_version = input;
            self
        }
        /// <p>Information about the launch template.</p>
        pub fn launch_template_data(
            mut self,
            input: crate::model::ResponseLaunchTemplateData,
        ) -> Self {
            self.launch_template_data = Some(input);
            self
        }
        /// <p>Information about the launch template.</p>
        pub fn set_launch_template_data(
            mut self,
            input: std::option::Option<crate::model::ResponseLaunchTemplateData>,
        ) -> Self {
            self.launch_template_data = input;
            self
        }
        /// Consumes the builder and constructs a [`LaunchTemplateVersion`](crate::model::LaunchTemplateVersion).
        pub fn build(self) -> crate::model::LaunchTemplateVersion {
            crate::model::LaunchTemplateVersion {
                launch_template_id: self.launch_template_id,
                launch_template_name: self.launch_template_name,
                version_number: self.version_number,
                version_description: self.version_description,
                create_time: self.create_time,
                created_by: self.created_by,
                default_version: self.default_version,
                launch_template_data: self.launch_template_data,
            }
        }
    }
}
impl LaunchTemplateVersion {
    /// Creates a new builder-style object to manufacture [`LaunchTemplateVersion`](crate::model::LaunchTemplateVersion).
    pub fn builder() -> crate::model::launch_template_version::Builder {
        crate::model::launch_template_version::Builder::default()
    }
}

/// <p>Describes a key pair.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct KeyPairInfo {
    /// <p>The ID of the key pair.</p>
    #[doc(hidden)]
    pub key_pair_id: std::option::Option<std::string::String>,
    /// <p>If you used <code>CreateKeyPair</code> to create the key pair:</p>
    /// <ul>
    /// <li> <p>For RSA key pairs, the key fingerprint is the SHA-1 digest of the DER encoded private key.</p> </li>
    /// <li> <p>For ED25519 key pairs, the key fingerprint is the base64-encoded SHA-256 digest, which is the default for OpenSSH, starting with <a href="http://www.openssh.com/txt/release-6.8">OpenSSH 6.8</a>.</p> </li>
    /// </ul>
    /// <p>If you used <code>ImportKeyPair</code> to provide Amazon Web Services the public key:</p>
    /// <ul>
    /// <li> <p>For RSA key pairs, the key fingerprint is the MD5 public key fingerprint as specified in section 4 of RFC4716.</p> </li>
    /// <li> <p>For ED25519 key pairs, the key fingerprint is the base64-encoded SHA-256 digest, which is the default for OpenSSH, starting with <a href="http://www.openssh.com/txt/release-6.8">OpenSSH 6.8</a>.</p> </li>
    /// </ul>
    #[doc(hidden)]
    pub key_fingerprint: std::option::Option<std::string::String>,
    /// <p>The name of the key pair.</p>
    #[doc(hidden)]
    pub key_name: std::option::Option<std::string::String>,
    /// <p>The type of key pair.</p>
    #[doc(hidden)]
    pub key_type: std::option::Option<crate::model::KeyType>,
    /// <p>Any tags applied to the key pair.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    /// <p>The public key material.</p>
    #[doc(hidden)]
    pub public_key: std::option::Option<std::string::String>,
    /// <p>If you used Amazon EC2 to create the key pair, this is the date and time when the key was created, in <a href="https://www.iso.org/iso-8601-date-and-time-format.html">ISO 8601 date-time format</a>, in the UTC time zone.</p>
    /// <p>If you imported an existing key pair to Amazon EC2, this is the date and time the key was imported, in <a href="https://www.iso.org/iso-8601-date-and-time-format.html">ISO 8601 date-time format</a>, in the UTC time zone.</p>
    #[doc(hidden)]
    pub create_time: std::option::Option<aws_smithy_types::DateTime>,
}
impl KeyPairInfo {
    /// <p>The ID of the key pair.</p>
    pub fn key_pair_id(&self) -> std::option::Option<&str> {
        self.key_pair_id.as_deref()
    }
    /// <p>If you used <code>CreateKeyPair</code> to create the key pair:</p>
    /// <ul>
    /// <li> <p>For RSA key pairs, the key fingerprint is the SHA-1 digest of the DER encoded private key.</p> </li>
    /// <li> <p>For ED25519 key pairs, the key fingerprint is the base64-encoded SHA-256 digest, which is the default for OpenSSH, starting with <a href="http://www.openssh.com/txt/release-6.8">OpenSSH 6.8</a>.</p> </li>
    /// </ul>
    /// <p>If you used <code>ImportKeyPair</code> to provide Amazon Web Services the public key:</p>
    /// <ul>
    /// <li> <p>For RSA key pairs, the key fingerprint is the MD5 public key fingerprint as specified in section 4 of RFC4716.</p> </li>
    /// <li> <p>For ED25519 key pairs, the key fingerprint is the base64-encoded SHA-256 digest, which is the default for OpenSSH, starting with <a href="http://www.openssh.com/txt/release-6.8">OpenSSH 6.8</a>.</p> </li>
    /// </ul>
    pub fn key_fingerprint(&self) -> std::option::Option<&str> {
        self.key_fingerprint.as_deref()
    }
    /// <p>The name of the key pair.</p>
    pub fn key_name(&self) -> std::option::Option<&str> {
        self.key_name.as_deref()
    }
    /// <p>The type of key pair.</p>
    pub fn key_type(&self) -> std::option::Option<&crate::model::KeyType> {
        self.key_type.as_ref()
    }
    /// <p>Any tags applied to the key pair.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
    /// <p>The public key material.</p>
    pub fn public_key(&self) -> std::option::Option<&str> {
        self.public_key.as_deref()
    }
    /// <p>If you used Amazon EC2 to create the key pair, this is the date and time when the key was created, in <a href="https://www.iso.org/iso-8601-date-and-time-format.html">ISO 8601 date-time format</a>, in the UTC time zone.</p>
    /// <p>If you imported an existing key pair to Amazon EC2, this is the date and time the key was imported, in <a href="https://www.iso.org/iso-8601-date-and-time-format.html">ISO 8601 date-time format</a>, in the UTC time zone.</p>
    pub fn create_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.create_time.as_ref()
    }
}
/// See [`KeyPairInfo`](crate::model::KeyPairInfo).
pub mod key_pair_info {

    /// A builder for [`KeyPairInfo`](crate::model::KeyPairInfo).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) key_pair_id: std::option::Option<std::string::String>,
        pub(crate) key_fingerprint: std::option::Option<std::string::String>,
        pub(crate) key_name: std::option::Option<std::string::String>,
        pub(crate) key_type: std::option::Option<crate::model::KeyType>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        pub(crate) public_key: std::option::Option<std::string::String>,
        pub(crate) create_time: std::option::Option<aws_smithy_types::DateTime>,
    }
    impl Builder {
        /// <p>The ID of the key pair.</p>
        pub fn key_pair_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.key_pair_id = Some(input.into());
            self
        }
        /// <p>The ID of the key pair.</p>
        pub fn set_key_pair_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.key_pair_id = input;
            self
        }
        /// <p>If you used <code>CreateKeyPair</code> to create the key pair:</p>
        /// <ul>
        /// <li> <p>For RSA key pairs, the key fingerprint is the SHA-1 digest of the DER encoded private key.</p> </li>
        /// <li> <p>For ED25519 key pairs, the key fingerprint is the base64-encoded SHA-256 digest, which is the default for OpenSSH, starting with <a href="http://www.openssh.com/txt/release-6.8">OpenSSH 6.8</a>.</p> </li>
        /// </ul>
        /// <p>If you used <code>ImportKeyPair</code> to provide Amazon Web Services the public key:</p>
        /// <ul>
        /// <li> <p>For RSA key pairs, the key fingerprint is the MD5 public key fingerprint as specified in section 4 of RFC4716.</p> </li>
        /// <li> <p>For ED25519 key pairs, the key fingerprint is the base64-encoded SHA-256 digest, which is the default for OpenSSH, starting with <a href="http://www.openssh.com/txt/release-6.8">OpenSSH 6.8</a>.</p> </li>
        /// </ul>
        pub fn key_fingerprint(mut self, input: impl Into<std::string::String>) -> Self {
            self.key_fingerprint = Some(input.into());
            self
        }
        /// <p>If you used <code>CreateKeyPair</code> to create the key pair:</p>
        /// <ul>
        /// <li> <p>For RSA key pairs, the key fingerprint is the SHA-1 digest of the DER encoded private key.</p> </li>
        /// <li> <p>For ED25519 key pairs, the key fingerprint is the base64-encoded SHA-256 digest, which is the default for OpenSSH, starting with <a href="http://www.openssh.com/txt/release-6.8">OpenSSH 6.8</a>.</p> </li>
        /// </ul>
        /// <p>If you used <code>ImportKeyPair</code> to provide Amazon Web Services the public key:</p>
        /// <ul>
        /// <li> <p>For RSA key pairs, the key fingerprint is the MD5 public key fingerprint as specified in section 4 of RFC4716.</p> </li>
        /// <li> <p>For ED25519 key pairs, the key fingerprint is the base64-encoded SHA-256 digest, which is the default for OpenSSH, starting with <a href="http://www.openssh.com/txt/release-6.8">OpenSSH 6.8</a>.</p> </li>
        /// </ul>
        pub fn set_key_fingerprint(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.key_fingerprint = input;
            self
        }
        /// <p>The name of the key pair.</p>
        pub fn key_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.key_name = Some(input.into());
            self
        }
        /// <p>The name of the key pair.</p>
        pub fn set_key_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.key_name = input;
            self
        }
        /// <p>The type of key pair.</p>
        pub fn key_type(mut self, input: crate::model::KeyType) -> Self {
            self.key_type = Some(input);
            self
        }
        /// <p>The type of key pair.</p>
        pub fn set_key_type(mut self, input: std::option::Option<crate::model::KeyType>) -> Self {
            self.key_type = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>Any tags applied to the key pair.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>Any tags applied to the key pair.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// <p>The public key material.</p>
        pub fn public_key(mut self, input: impl Into<std::string::String>) -> Self {
            self.public_key = Some(input.into());
            self
        }
        /// <p>The public key material.</p>
        pub fn set_public_key(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.public_key = input;
            self
        }
        /// <p>If you used Amazon EC2 to create the key pair, this is the date and time when the key was created, in <a href="https://www.iso.org/iso-8601-date-and-time-format.html">ISO 8601 date-time format</a>, in the UTC time zone.</p>
        /// <p>If you imported an existing key pair to Amazon EC2, this is the date and time the key was imported, in <a href="https://www.iso.org/iso-8601-date-and-time-format.html">ISO 8601 date-time format</a>, in the UTC time zone.</p>
        pub fn create_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.create_time = Some(input);
            self
        }
        /// <p>If you used Amazon EC2 to create the key pair, this is the date and time when the key was created, in <a href="https://www.iso.org/iso-8601-date-and-time-format.html">ISO 8601 date-time format</a>, in the UTC time zone.</p>
        /// <p>If you imported an existing key pair to Amazon EC2, this is the date and time the key was imported, in <a href="https://www.iso.org/iso-8601-date-and-time-format.html">ISO 8601 date-time format</a>, in the UTC time zone.</p>
        pub fn set_create_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.create_time = input;
            self
        }
        /// Consumes the builder and constructs a [`KeyPairInfo`](crate::model::KeyPairInfo).
        pub fn build(self) -> crate::model::KeyPairInfo {
            crate::model::KeyPairInfo {
                key_pair_id: self.key_pair_id,
                key_fingerprint: self.key_fingerprint,
                key_name: self.key_name,
                key_type: self.key_type,
                tags: self.tags,
                public_key: self.public_key,
                create_time: self.create_time,
            }
        }
    }
}
impl KeyPairInfo {
    /// Creates a new builder-style object to manufacture [`KeyPairInfo`](crate::model::KeyPairInfo).
    pub fn builder() -> crate::model::key_pair_info::Builder {
        crate::model::key_pair_info::Builder::default()
    }
}

/// When writing a match expression against `KeyType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let keytype = unimplemented!();
/// match keytype {
///     KeyType::Ed25519 => { /* ... */ },
///     KeyType::Rsa => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `keytype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `KeyType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `KeyType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `KeyType::NewFeature` is defined.
/// Specifically, when `keytype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `KeyType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 KeyType {
    #[allow(missing_docs)] // documentation missing in model
    Ed25519,
    #[allow(missing_docs)] // documentation missing in model
    Rsa,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for KeyType {
    fn from(s: &str) -> Self {
        match s {
            "ed25519" => KeyType::Ed25519,
            "rsa" => KeyType::Rsa,
            other => KeyType::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for KeyType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(KeyType::from(s))
    }
}
impl KeyType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            KeyType::Ed25519 => "ed25519",
            KeyType::Rsa => "rsa",
            KeyType::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["ed25519", "rsa"]
    }
}
impl AsRef<str> for KeyType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes an IPv6 address pool.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Ipv6Pool {
    /// <p>The ID of the address pool.</p>
    #[doc(hidden)]
    pub pool_id: std::option::Option<std::string::String>,
    /// <p>The description for the address pool.</p>
    #[doc(hidden)]
    pub description: std::option::Option<std::string::String>,
    /// <p>The CIDR blocks for the address pool.</p>
    #[doc(hidden)]
    pub pool_cidr_blocks: std::option::Option<std::vec::Vec<crate::model::PoolCidrBlock>>,
    /// <p>Any tags for the address pool.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl Ipv6Pool {
    /// <p>The ID of the address pool.</p>
    pub fn pool_id(&self) -> std::option::Option<&str> {
        self.pool_id.as_deref()
    }
    /// <p>The description for the address pool.</p>
    pub fn description(&self) -> std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The CIDR blocks for the address pool.</p>
    pub fn pool_cidr_blocks(&self) -> std::option::Option<&[crate::model::PoolCidrBlock]> {
        self.pool_cidr_blocks.as_deref()
    }
    /// <p>Any tags for the address pool.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
}
/// See [`Ipv6Pool`](crate::model::Ipv6Pool).
pub mod ipv6_pool {

    /// A builder for [`Ipv6Pool`](crate::model::Ipv6Pool).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) pool_id: std::option::Option<std::string::String>,
        pub(crate) description: std::option::Option<std::string::String>,
        pub(crate) pool_cidr_blocks:
            std::option::Option<std::vec::Vec<crate::model::PoolCidrBlock>>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    }
    impl Builder {
        /// <p>The ID of the address pool.</p>
        pub fn pool_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.pool_id = Some(input.into());
            self
        }
        /// <p>The ID of the address pool.</p>
        pub fn set_pool_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.pool_id = input;
            self
        }
        /// <p>The description for the address pool.</p>
        pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
            self.description = Some(input.into());
            self
        }
        /// <p>The description for the address pool.</p>
        pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.description = input;
            self
        }
        /// Appends an item to `pool_cidr_blocks`.
        ///
        /// To override the contents of this collection use [`set_pool_cidr_blocks`](Self::set_pool_cidr_blocks).
        ///
        /// <p>The CIDR blocks for the address pool.</p>
        pub fn pool_cidr_blocks(mut self, input: crate::model::PoolCidrBlock) -> Self {
            let mut v = self.pool_cidr_blocks.unwrap_or_default();
            v.push(input);
            self.pool_cidr_blocks = Some(v);
            self
        }
        /// <p>The CIDR blocks for the address pool.</p>
        pub fn set_pool_cidr_blocks(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::PoolCidrBlock>>,
        ) -> Self {
            self.pool_cidr_blocks = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>Any tags for the address pool.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>Any tags for the address pool.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// Consumes the builder and constructs a [`Ipv6Pool`](crate::model::Ipv6Pool).
        pub fn build(self) -> crate::model::Ipv6Pool {
            crate::model::Ipv6Pool {
                pool_id: self.pool_id,
                description: self.description,
                pool_cidr_blocks: self.pool_cidr_blocks,
                tags: self.tags,
            }
        }
    }
}
impl Ipv6Pool {
    /// Creates a new builder-style object to manufacture [`Ipv6Pool`](crate::model::Ipv6Pool).
    pub fn builder() -> crate::model::ipv6_pool::Builder {
        crate::model::ipv6_pool::Builder::default()
    }
}

/// <p>Describes a CIDR block for an address pool.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct PoolCidrBlock {
    /// <p>The CIDR block.</p>
    #[doc(hidden)]
    pub cidr: std::option::Option<std::string::String>,
}
impl PoolCidrBlock {
    /// <p>The CIDR block.</p>
    pub fn cidr(&self) -> std::option::Option<&str> {
        self.cidr.as_deref()
    }
}
/// See [`PoolCidrBlock`](crate::model::PoolCidrBlock).
pub mod pool_cidr_block {

    /// A builder for [`PoolCidrBlock`](crate::model::PoolCidrBlock).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) cidr: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The CIDR block.</p>
        pub fn cidr(mut self, input: impl Into<std::string::String>) -> Self {
            self.cidr = Some(input.into());
            self
        }
        /// <p>The CIDR block.</p>
        pub fn set_cidr(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.cidr = input;
            self
        }
        /// Consumes the builder and constructs a [`PoolCidrBlock`](crate::model::PoolCidrBlock).
        pub fn build(self) -> crate::model::PoolCidrBlock {
            crate::model::PoolCidrBlock { cidr: self.cidr }
        }
    }
}
impl PoolCidrBlock {
    /// Creates a new builder-style object to manufacture [`PoolCidrBlock`](crate::model::PoolCidrBlock).
    pub fn builder() -> crate::model::pool_cidr_block::Builder {
        crate::model::pool_cidr_block::Builder::default()
    }
}

/// <p>Describes an internet gateway.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InternetGateway {
    /// <p>Any VPCs attached to the internet gateway.</p>
    #[doc(hidden)]
    pub attachments: std::option::Option<std::vec::Vec<crate::model::InternetGatewayAttachment>>,
    /// <p>The ID of the internet gateway.</p>
    #[doc(hidden)]
    pub internet_gateway_id: std::option::Option<std::string::String>,
    /// <p>The ID of the Amazon Web Services account that owns the internet gateway.</p>
    #[doc(hidden)]
    pub owner_id: std::option::Option<std::string::String>,
    /// <p>Any tags assigned to the internet gateway.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl InternetGateway {
    /// <p>Any VPCs attached to the internet gateway.</p>
    pub fn attachments(&self) -> std::option::Option<&[crate::model::InternetGatewayAttachment]> {
        self.attachments.as_deref()
    }
    /// <p>The ID of the internet gateway.</p>
    pub fn internet_gateway_id(&self) -> std::option::Option<&str> {
        self.internet_gateway_id.as_deref()
    }
    /// <p>The ID of the Amazon Web Services account that owns the internet gateway.</p>
    pub fn owner_id(&self) -> std::option::Option<&str> {
        self.owner_id.as_deref()
    }
    /// <p>Any tags assigned to the internet gateway.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
}
/// See [`InternetGateway`](crate::model::InternetGateway).
pub mod internet_gateway {

    /// A builder for [`InternetGateway`](crate::model::InternetGateway).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) attachments:
            std::option::Option<std::vec::Vec<crate::model::InternetGatewayAttachment>>,
        pub(crate) internet_gateway_id: std::option::Option<std::string::String>,
        pub(crate) owner_id: std::option::Option<std::string::String>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    }
    impl Builder {
        /// Appends an item to `attachments`.
        ///
        /// To override the contents of this collection use [`set_attachments`](Self::set_attachments).
        ///
        /// <p>Any VPCs attached to the internet gateway.</p>
        pub fn attachments(mut self, input: crate::model::InternetGatewayAttachment) -> Self {
            let mut v = self.attachments.unwrap_or_default();
            v.push(input);
            self.attachments = Some(v);
            self
        }
        /// <p>Any VPCs attached to the internet gateway.</p>
        pub fn set_attachments(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::InternetGatewayAttachment>>,
        ) -> Self {
            self.attachments = input;
            self
        }
        /// <p>The ID of the internet gateway.</p>
        pub fn internet_gateway_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.internet_gateway_id = Some(input.into());
            self
        }
        /// <p>The ID of the internet gateway.</p>
        pub fn set_internet_gateway_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.internet_gateway_id = input;
            self
        }
        /// <p>The ID of the Amazon Web Services account that owns the internet gateway.</p>
        pub fn owner_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.owner_id = Some(input.into());
            self
        }
        /// <p>The ID of the Amazon Web Services account that owns the internet gateway.</p>
        pub fn set_owner_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.owner_id = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>Any tags assigned to the internet gateway.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>Any tags assigned to the internet gateway.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// Consumes the builder and constructs a [`InternetGateway`](crate::model::InternetGateway).
        pub fn build(self) -> crate::model::InternetGateway {
            crate::model::InternetGateway {
                attachments: self.attachments,
                internet_gateway_id: self.internet_gateway_id,
                owner_id: self.owner_id,
                tags: self.tags,
            }
        }
    }
}
impl InternetGateway {
    /// Creates a new builder-style object to manufacture [`InternetGateway`](crate::model::InternetGateway).
    pub fn builder() -> crate::model::internet_gateway::Builder {
        crate::model::internet_gateway::Builder::default()
    }
}

/// <p>Describes the attachment of a VPC to an internet gateway or an egress-only internet gateway.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InternetGatewayAttachment {
    /// <p>The current state of the attachment. For an internet gateway, the state is <code>available</code> when attached to a VPC; otherwise, this value is not returned.</p>
    #[doc(hidden)]
    pub state: std::option::Option<crate::model::AttachmentStatus>,
    /// <p>The ID of the VPC.</p>
    #[doc(hidden)]
    pub vpc_id: std::option::Option<std::string::String>,
}
impl InternetGatewayAttachment {
    /// <p>The current state of the attachment. For an internet gateway, the state is <code>available</code> when attached to a VPC; otherwise, this value is not returned.</p>
    pub fn state(&self) -> std::option::Option<&crate::model::AttachmentStatus> {
        self.state.as_ref()
    }
    /// <p>The ID of the VPC.</p>
    pub fn vpc_id(&self) -> std::option::Option<&str> {
        self.vpc_id.as_deref()
    }
}
/// See [`InternetGatewayAttachment`](crate::model::InternetGatewayAttachment).
pub mod internet_gateway_attachment {

    /// A builder for [`InternetGatewayAttachment`](crate::model::InternetGatewayAttachment).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) state: std::option::Option<crate::model::AttachmentStatus>,
        pub(crate) vpc_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The current state of the attachment. For an internet gateway, the state is <code>available</code> when attached to a VPC; otherwise, this value is not returned.</p>
        pub fn state(mut self, input: crate::model::AttachmentStatus) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>The current state of the attachment. For an internet gateway, the state is <code>available</code> when attached to a VPC; otherwise, this value is not returned.</p>
        pub fn set_state(
            mut self,
            input: std::option::Option<crate::model::AttachmentStatus>,
        ) -> Self {
            self.state = input;
            self
        }
        /// <p>The ID of the VPC.</p>
        pub fn vpc_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.vpc_id = Some(input.into());
            self
        }
        /// <p>The ID of the VPC.</p>
        pub fn set_vpc_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.vpc_id = input;
            self
        }
        /// Consumes the builder and constructs a [`InternetGatewayAttachment`](crate::model::InternetGatewayAttachment).
        pub fn build(self) -> crate::model::InternetGatewayAttachment {
            crate::model::InternetGatewayAttachment {
                state: self.state,
                vpc_id: self.vpc_id,
            }
        }
    }
}
impl InternetGatewayAttachment {
    /// Creates a new builder-style object to manufacture [`InternetGatewayAttachment`](crate::model::InternetGatewayAttachment).
    pub fn builder() -> crate::model::internet_gateway_attachment::Builder {
        crate::model::internet_gateway_attachment::Builder::default()
    }
}

/// <p>Describes the instance type.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InstanceTypeInfo {
    /// <p>The instance type. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html">Instance types</a> in the <i>Amazon EC2 User Guide</i>.</p>
    #[doc(hidden)]
    pub instance_type: std::option::Option<crate::model::InstanceType>,
    /// <p>Indicates whether the instance type is current generation.</p>
    #[doc(hidden)]
    pub current_generation: std::option::Option<bool>,
    /// <p>Indicates whether the instance type is eligible for the free tier.</p>
    #[doc(hidden)]
    pub free_tier_eligible: std::option::Option<bool>,
    /// <p>Indicates whether the instance type is offered for spot or On-Demand.</p>
    #[doc(hidden)]
    pub supported_usage_classes: std::option::Option<std::vec::Vec<crate::model::UsageClassType>>,
    /// <p>The supported root device types.</p>
    #[doc(hidden)]
    pub supported_root_device_types:
        std::option::Option<std::vec::Vec<crate::model::RootDeviceType>>,
    /// <p>The supported virtualization types.</p>
    #[doc(hidden)]
    pub supported_virtualization_types:
        std::option::Option<std::vec::Vec<crate::model::VirtualizationType>>,
    /// <p>Indicates whether the instance is a bare metal instance type.</p>
    #[doc(hidden)]
    pub bare_metal: std::option::Option<bool>,
    /// <p>The hypervisor for the instance type.</p>
    #[doc(hidden)]
    pub hypervisor: std::option::Option<crate::model::InstanceTypeHypervisor>,
    /// <p>Describes the processor.</p>
    #[doc(hidden)]
    pub processor_info: std::option::Option<crate::model::ProcessorInfo>,
    /// <p>Describes the vCPU configurations for the instance type.</p>
    #[doc(hidden)]
    pub v_cpu_info: std::option::Option<crate::model::VCpuInfo>,
    /// <p>Describes the memory for the instance type.</p>
    #[doc(hidden)]
    pub memory_info: std::option::Option<crate::model::MemoryInfo>,
    /// <p>Indicates whether instance storage is supported.</p>
    #[doc(hidden)]
    pub instance_storage_supported: std::option::Option<bool>,
    /// <p>Describes the instance storage for the instance type.</p>
    #[doc(hidden)]
    pub instance_storage_info: std::option::Option<crate::model::InstanceStorageInfo>,
    /// <p>Describes the Amazon EBS settings for the instance type.</p>
    #[doc(hidden)]
    pub ebs_info: std::option::Option<crate::model::EbsInfo>,
    /// <p>Describes the network settings for the instance type.</p>
    #[doc(hidden)]
    pub network_info: std::option::Option<crate::model::NetworkInfo>,
    /// <p>Describes the GPU accelerator settings for the instance type.</p>
    #[doc(hidden)]
    pub gpu_info: std::option::Option<crate::model::GpuInfo>,
    /// <p>Describes the FPGA accelerator settings for the instance type.</p>
    #[doc(hidden)]
    pub fpga_info: std::option::Option<crate::model::FpgaInfo>,
    /// <p>Describes the placement group settings for the instance type.</p>
    #[doc(hidden)]
    pub placement_group_info: std::option::Option<crate::model::PlacementGroupInfo>,
    /// <p>Describes the Inference accelerator settings for the instance type.</p>
    #[doc(hidden)]
    pub inference_accelerator_info: std::option::Option<crate::model::InferenceAcceleratorInfo>,
    /// <p>Indicates whether On-Demand hibernation is supported.</p>
    #[doc(hidden)]
    pub hibernation_supported: std::option::Option<bool>,
    /// <p>Indicates whether the instance type is a burstable performance instance type.</p>
    #[doc(hidden)]
    pub burstable_performance_supported: std::option::Option<bool>,
    /// <p>Indicates whether Dedicated Hosts are supported on the instance type.</p>
    #[doc(hidden)]
    pub dedicated_hosts_supported: std::option::Option<bool>,
    /// <p>Indicates whether auto recovery is supported.</p>
    #[doc(hidden)]
    pub auto_recovery_supported: std::option::Option<bool>,
    /// <p>The supported boot modes. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-boot.html">Boot modes</a> in the <i>Amazon EC2 User Guide</i>.</p>
    #[doc(hidden)]
    pub supported_boot_modes: std::option::Option<std::vec::Vec<crate::model::BootModeType>>,
}
impl InstanceTypeInfo {
    /// <p>The instance type. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html">Instance types</a> in the <i>Amazon EC2 User Guide</i>.</p>
    pub fn instance_type(&self) -> std::option::Option<&crate::model::InstanceType> {
        self.instance_type.as_ref()
    }
    /// <p>Indicates whether the instance type is current generation.</p>
    pub fn current_generation(&self) -> std::option::Option<bool> {
        self.current_generation
    }
    /// <p>Indicates whether the instance type is eligible for the free tier.</p>
    pub fn free_tier_eligible(&self) -> std::option::Option<bool> {
        self.free_tier_eligible
    }
    /// <p>Indicates whether the instance type is offered for spot or On-Demand.</p>
    pub fn supported_usage_classes(&self) -> std::option::Option<&[crate::model::UsageClassType]> {
        self.supported_usage_classes.as_deref()
    }
    /// <p>The supported root device types.</p>
    pub fn supported_root_device_types(
        &self,
    ) -> std::option::Option<&[crate::model::RootDeviceType]> {
        self.supported_root_device_types.as_deref()
    }
    /// <p>The supported virtualization types.</p>
    pub fn supported_virtualization_types(
        &self,
    ) -> std::option::Option<&[crate::model::VirtualizationType]> {
        self.supported_virtualization_types.as_deref()
    }
    /// <p>Indicates whether the instance is a bare metal instance type.</p>
    pub fn bare_metal(&self) -> std::option::Option<bool> {
        self.bare_metal
    }
    /// <p>The hypervisor for the instance type.</p>
    pub fn hypervisor(&self) -> std::option::Option<&crate::model::InstanceTypeHypervisor> {
        self.hypervisor.as_ref()
    }
    /// <p>Describes the processor.</p>
    pub fn processor_info(&self) -> std::option::Option<&crate::model::ProcessorInfo> {
        self.processor_info.as_ref()
    }
    /// <p>Describes the vCPU configurations for the instance type.</p>
    pub fn v_cpu_info(&self) -> std::option::Option<&crate::model::VCpuInfo> {
        self.v_cpu_info.as_ref()
    }
    /// <p>Describes the memory for the instance type.</p>
    pub fn memory_info(&self) -> std::option::Option<&crate::model::MemoryInfo> {
        self.memory_info.as_ref()
    }
    /// <p>Indicates whether instance storage is supported.</p>
    pub fn instance_storage_supported(&self) -> std::option::Option<bool> {
        self.instance_storage_supported
    }
    /// <p>Describes the instance storage for the instance type.</p>
    pub fn instance_storage_info(&self) -> std::option::Option<&crate::model::InstanceStorageInfo> {
        self.instance_storage_info.as_ref()
    }
    /// <p>Describes the Amazon EBS settings for the instance type.</p>
    pub fn ebs_info(&self) -> std::option::Option<&crate::model::EbsInfo> {
        self.ebs_info.as_ref()
    }
    /// <p>Describes the network settings for the instance type.</p>
    pub fn network_info(&self) -> std::option::Option<&crate::model::NetworkInfo> {
        self.network_info.as_ref()
    }
    /// <p>Describes the GPU accelerator settings for the instance type.</p>
    pub fn gpu_info(&self) -> std::option::Option<&crate::model::GpuInfo> {
        self.gpu_info.as_ref()
    }
    /// <p>Describes the FPGA accelerator settings for the instance type.</p>
    pub fn fpga_info(&self) -> std::option::Option<&crate::model::FpgaInfo> {
        self.fpga_info.as_ref()
    }
    /// <p>Describes the placement group settings for the instance type.</p>
    pub fn placement_group_info(&self) -> std::option::Option<&crate::model::PlacementGroupInfo> {
        self.placement_group_info.as_ref()
    }
    /// <p>Describes the Inference accelerator settings for the instance type.</p>
    pub fn inference_accelerator_info(
        &self,
    ) -> std::option::Option<&crate::model::InferenceAcceleratorInfo> {
        self.inference_accelerator_info.as_ref()
    }
    /// <p>Indicates whether On-Demand hibernation is supported.</p>
    pub fn hibernation_supported(&self) -> std::option::Option<bool> {
        self.hibernation_supported
    }
    /// <p>Indicates whether the instance type is a burstable performance instance type.</p>
    pub fn burstable_performance_supported(&self) -> std::option::Option<bool> {
        self.burstable_performance_supported
    }
    /// <p>Indicates whether Dedicated Hosts are supported on the instance type.</p>
    pub fn dedicated_hosts_supported(&self) -> std::option::Option<bool> {
        self.dedicated_hosts_supported
    }
    /// <p>Indicates whether auto recovery is supported.</p>
    pub fn auto_recovery_supported(&self) -> std::option::Option<bool> {
        self.auto_recovery_supported
    }
    /// <p>The supported boot modes. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-boot.html">Boot modes</a> in the <i>Amazon EC2 User Guide</i>.</p>
    pub fn supported_boot_modes(&self) -> std::option::Option<&[crate::model::BootModeType]> {
        self.supported_boot_modes.as_deref()
    }
}
/// See [`InstanceTypeInfo`](crate::model::InstanceTypeInfo).
pub mod instance_type_info {

    /// A builder for [`InstanceTypeInfo`](crate::model::InstanceTypeInfo).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) instance_type: std::option::Option<crate::model::InstanceType>,
        pub(crate) current_generation: std::option::Option<bool>,
        pub(crate) free_tier_eligible: std::option::Option<bool>,
        pub(crate) supported_usage_classes:
            std::option::Option<std::vec::Vec<crate::model::UsageClassType>>,
        pub(crate) supported_root_device_types:
            std::option::Option<std::vec::Vec<crate::model::RootDeviceType>>,
        pub(crate) supported_virtualization_types:
            std::option::Option<std::vec::Vec<crate::model::VirtualizationType>>,
        pub(crate) bare_metal: std::option::Option<bool>,
        pub(crate) hypervisor: std::option::Option<crate::model::InstanceTypeHypervisor>,
        pub(crate) processor_info: std::option::Option<crate::model::ProcessorInfo>,
        pub(crate) v_cpu_info: std::option::Option<crate::model::VCpuInfo>,
        pub(crate) memory_info: std::option::Option<crate::model::MemoryInfo>,
        pub(crate) instance_storage_supported: std::option::Option<bool>,
        pub(crate) instance_storage_info: std::option::Option<crate::model::InstanceStorageInfo>,
        pub(crate) ebs_info: std::option::Option<crate::model::EbsInfo>,
        pub(crate) network_info: std::option::Option<crate::model::NetworkInfo>,
        pub(crate) gpu_info: std::option::Option<crate::model::GpuInfo>,
        pub(crate) fpga_info: std::option::Option<crate::model::FpgaInfo>,
        pub(crate) placement_group_info: std::option::Option<crate::model::PlacementGroupInfo>,
        pub(crate) inference_accelerator_info:
            std::option::Option<crate::model::InferenceAcceleratorInfo>,
        pub(crate) hibernation_supported: std::option::Option<bool>,
        pub(crate) burstable_performance_supported: std::option::Option<bool>,
        pub(crate) dedicated_hosts_supported: std::option::Option<bool>,
        pub(crate) auto_recovery_supported: std::option::Option<bool>,
        pub(crate) supported_boot_modes:
            std::option::Option<std::vec::Vec<crate::model::BootModeType>>,
    }
    impl Builder {
        /// <p>The instance type. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html">Instance types</a> in the <i>Amazon EC2 User Guide</i>.</p>
        pub fn instance_type(mut self, input: crate::model::InstanceType) -> Self {
            self.instance_type = Some(input);
            self
        }
        /// <p>The instance type. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html">Instance types</a> in the <i>Amazon EC2 User Guide</i>.</p>
        pub fn set_instance_type(
            mut self,
            input: std::option::Option<crate::model::InstanceType>,
        ) -> Self {
            self.instance_type = input;
            self
        }
        /// <p>Indicates whether the instance type is current generation.</p>
        pub fn current_generation(mut self, input: bool) -> Self {
            self.current_generation = Some(input);
            self
        }
        /// <p>Indicates whether the instance type is current generation.</p>
        pub fn set_current_generation(mut self, input: std::option::Option<bool>) -> Self {
            self.current_generation = input;
            self
        }
        /// <p>Indicates whether the instance type is eligible for the free tier.</p>
        pub fn free_tier_eligible(mut self, input: bool) -> Self {
            self.free_tier_eligible = Some(input);
            self
        }
        /// <p>Indicates whether the instance type is eligible for the free tier.</p>
        pub fn set_free_tier_eligible(mut self, input: std::option::Option<bool>) -> Self {
            self.free_tier_eligible = input;
            self
        }
        /// Appends an item to `supported_usage_classes`.
        ///
        /// To override the contents of this collection use [`set_supported_usage_classes`](Self::set_supported_usage_classes).
        ///
        /// <p>Indicates whether the instance type is offered for spot or On-Demand.</p>
        pub fn supported_usage_classes(mut self, input: crate::model::UsageClassType) -> Self {
            let mut v = self.supported_usage_classes.unwrap_or_default();
            v.push(input);
            self.supported_usage_classes = Some(v);
            self
        }
        /// <p>Indicates whether the instance type is offered for spot or On-Demand.</p>
        pub fn set_supported_usage_classes(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::UsageClassType>>,
        ) -> Self {
            self.supported_usage_classes = input;
            self
        }
        /// Appends an item to `supported_root_device_types`.
        ///
        /// To override the contents of this collection use [`set_supported_root_device_types`](Self::set_supported_root_device_types).
        ///
        /// <p>The supported root device types.</p>
        pub fn supported_root_device_types(mut self, input: crate::model::RootDeviceType) -> Self {
            let mut v = self.supported_root_device_types.unwrap_or_default();
            v.push(input);
            self.supported_root_device_types = Some(v);
            self
        }
        /// <p>The supported root device types.</p>
        pub fn set_supported_root_device_types(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::RootDeviceType>>,
        ) -> Self {
            self.supported_root_device_types = input;
            self
        }
        /// Appends an item to `supported_virtualization_types`.
        ///
        /// To override the contents of this collection use [`set_supported_virtualization_types`](Self::set_supported_virtualization_types).
        ///
        /// <p>The supported virtualization types.</p>
        pub fn supported_virtualization_types(
            mut self,
            input: crate::model::VirtualizationType,
        ) -> Self {
            let mut v = self.supported_virtualization_types.unwrap_or_default();
            v.push(input);
            self.supported_virtualization_types = Some(v);
            self
        }
        /// <p>The supported virtualization types.</p>
        pub fn set_supported_virtualization_types(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::VirtualizationType>>,
        ) -> Self {
            self.supported_virtualization_types = input;
            self
        }
        /// <p>Indicates whether the instance is a bare metal instance type.</p>
        pub fn bare_metal(mut self, input: bool) -> Self {
            self.bare_metal = Some(input);
            self
        }
        /// <p>Indicates whether the instance is a bare metal instance type.</p>
        pub fn set_bare_metal(mut self, input: std::option::Option<bool>) -> Self {
            self.bare_metal = input;
            self
        }
        /// <p>The hypervisor for the instance type.</p>
        pub fn hypervisor(mut self, input: crate::model::InstanceTypeHypervisor) -> Self {
            self.hypervisor = Some(input);
            self
        }
        /// <p>The hypervisor for the instance type.</p>
        pub fn set_hypervisor(
            mut self,
            input: std::option::Option<crate::model::InstanceTypeHypervisor>,
        ) -> Self {
            self.hypervisor = input;
            self
        }
        /// <p>Describes the processor.</p>
        pub fn processor_info(mut self, input: crate::model::ProcessorInfo) -> Self {
            self.processor_info = Some(input);
            self
        }
        /// <p>Describes the processor.</p>
        pub fn set_processor_info(
            mut self,
            input: std::option::Option<crate::model::ProcessorInfo>,
        ) -> Self {
            self.processor_info = input;
            self
        }
        /// <p>Describes the vCPU configurations for the instance type.</p>
        pub fn v_cpu_info(mut self, input: crate::model::VCpuInfo) -> Self {
            self.v_cpu_info = Some(input);
            self
        }
        /// <p>Describes the vCPU configurations for the instance type.</p>
        pub fn set_v_cpu_info(
            mut self,
            input: std::option::Option<crate::model::VCpuInfo>,
        ) -> Self {
            self.v_cpu_info = input;
            self
        }
        /// <p>Describes the memory for the instance type.</p>
        pub fn memory_info(mut self, input: crate::model::MemoryInfo) -> Self {
            self.memory_info = Some(input);
            self
        }
        /// <p>Describes the memory for the instance type.</p>
        pub fn set_memory_info(
            mut self,
            input: std::option::Option<crate::model::MemoryInfo>,
        ) -> Self {
            self.memory_info = input;
            self
        }
        /// <p>Indicates whether instance storage is supported.</p>
        pub fn instance_storage_supported(mut self, input: bool) -> Self {
            self.instance_storage_supported = Some(input);
            self
        }
        /// <p>Indicates whether instance storage is supported.</p>
        pub fn set_instance_storage_supported(mut self, input: std::option::Option<bool>) -> Self {
            self.instance_storage_supported = input;
            self
        }
        /// <p>Describes the instance storage for the instance type.</p>
        pub fn instance_storage_info(mut self, input: crate::model::InstanceStorageInfo) -> Self {
            self.instance_storage_info = Some(input);
            self
        }
        /// <p>Describes the instance storage for the instance type.</p>
        pub fn set_instance_storage_info(
            mut self,
            input: std::option::Option<crate::model::InstanceStorageInfo>,
        ) -> Self {
            self.instance_storage_info = input;
            self
        }
        /// <p>Describes the Amazon EBS settings for the instance type.</p>
        pub fn ebs_info(mut self, input: crate::model::EbsInfo) -> Self {
            self.ebs_info = Some(input);
            self
        }
        /// <p>Describes the Amazon EBS settings for the instance type.</p>
        pub fn set_ebs_info(mut self, input: std::option::Option<crate::model::EbsInfo>) -> Self {
            self.ebs_info = input;
            self
        }
        /// <p>Describes the network settings for the instance type.</p>
        pub fn network_info(mut self, input: crate::model::NetworkInfo) -> Self {
            self.network_info = Some(input);
            self
        }
        /// <p>Describes the network settings for the instance type.</p>
        pub fn set_network_info(
            mut self,
            input: std::option::Option<crate::model::NetworkInfo>,
        ) -> Self {
            self.network_info = input;
            self
        }
        /// <p>Describes the GPU accelerator settings for the instance type.</p>
        pub fn gpu_info(mut self, input: crate::model::GpuInfo) -> Self {
            self.gpu_info = Some(input);
            self
        }
        /// <p>Describes the GPU accelerator settings for the instance type.</p>
        pub fn set_gpu_info(mut self, input: std::option::Option<crate::model::GpuInfo>) -> Self {
            self.gpu_info = input;
            self
        }
        /// <p>Describes the FPGA accelerator settings for the instance type.</p>
        pub fn fpga_info(mut self, input: crate::model::FpgaInfo) -> Self {
            self.fpga_info = Some(input);
            self
        }
        /// <p>Describes the FPGA accelerator settings for the instance type.</p>
        pub fn set_fpga_info(mut self, input: std::option::Option<crate::model::FpgaInfo>) -> Self {
            self.fpga_info = input;
            self
        }
        /// <p>Describes the placement group settings for the instance type.</p>
        pub fn placement_group_info(mut self, input: crate::model::PlacementGroupInfo) -> Self {
            self.placement_group_info = Some(input);
            self
        }
        /// <p>Describes the placement group settings for the instance type.</p>
        pub fn set_placement_group_info(
            mut self,
            input: std::option::Option<crate::model::PlacementGroupInfo>,
        ) -> Self {
            self.placement_group_info = input;
            self
        }
        /// <p>Describes the Inference accelerator settings for the instance type.</p>
        pub fn inference_accelerator_info(
            mut self,
            input: crate::model::InferenceAcceleratorInfo,
        ) -> Self {
            self.inference_accelerator_info = Some(input);
            self
        }
        /// <p>Describes the Inference accelerator settings for the instance type.</p>
        pub fn set_inference_accelerator_info(
            mut self,
            input: std::option::Option<crate::model::InferenceAcceleratorInfo>,
        ) -> Self {
            self.inference_accelerator_info = input;
            self
        }
        /// <p>Indicates whether On-Demand hibernation is supported.</p>
        pub fn hibernation_supported(mut self, input: bool) -> Self {
            self.hibernation_supported = Some(input);
            self
        }
        /// <p>Indicates whether On-Demand hibernation is supported.</p>
        pub fn set_hibernation_supported(mut self, input: std::option::Option<bool>) -> Self {
            self.hibernation_supported = input;
            self
        }
        /// <p>Indicates whether the instance type is a burstable performance instance type.</p>
        pub fn burstable_performance_supported(mut self, input: bool) -> Self {
            self.burstable_performance_supported = Some(input);
            self
        }
        /// <p>Indicates whether the instance type is a burstable performance instance type.</p>
        pub fn set_burstable_performance_supported(
            mut self,
            input: std::option::Option<bool>,
        ) -> Self {
            self.burstable_performance_supported = input;
            self
        }
        /// <p>Indicates whether Dedicated Hosts are supported on the instance type.</p>
        pub fn dedicated_hosts_supported(mut self, input: bool) -> Self {
            self.dedicated_hosts_supported = Some(input);
            self
        }
        /// <p>Indicates whether Dedicated Hosts are supported on the instance type.</p>
        pub fn set_dedicated_hosts_supported(mut self, input: std::option::Option<bool>) -> Self {
            self.dedicated_hosts_supported = input;
            self
        }
        /// <p>Indicates whether auto recovery is supported.</p>
        pub fn auto_recovery_supported(mut self, input: bool) -> Self {
            self.auto_recovery_supported = Some(input);
            self
        }
        /// <p>Indicates whether auto recovery is supported.</p>
        pub fn set_auto_recovery_supported(mut self, input: std::option::Option<bool>) -> Self {
            self.auto_recovery_supported = input;
            self
        }
        /// Appends an item to `supported_boot_modes`.
        ///
        /// To override the contents of this collection use [`set_supported_boot_modes`](Self::set_supported_boot_modes).
        ///
        /// <p>The supported boot modes. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-boot.html">Boot modes</a> in the <i>Amazon EC2 User Guide</i>.</p>
        pub fn supported_boot_modes(mut self, input: crate::model::BootModeType) -> Self {
            let mut v = self.supported_boot_modes.unwrap_or_default();
            v.push(input);
            self.supported_boot_modes = Some(v);
            self
        }
        /// <p>The supported boot modes. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-boot.html">Boot modes</a> in the <i>Amazon EC2 User Guide</i>.</p>
        pub fn set_supported_boot_modes(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::BootModeType>>,
        ) -> Self {
            self.supported_boot_modes = input;
            self
        }
        /// Consumes the builder and constructs a [`InstanceTypeInfo`](crate::model::InstanceTypeInfo).
        pub fn build(self) -> crate::model::InstanceTypeInfo {
            crate::model::InstanceTypeInfo {
                instance_type: self.instance_type,
                current_generation: self.current_generation,
                free_tier_eligible: self.free_tier_eligible,
                supported_usage_classes: self.supported_usage_classes,
                supported_root_device_types: self.supported_root_device_types,
                supported_virtualization_types: self.supported_virtualization_types,
                bare_metal: self.bare_metal,
                hypervisor: self.hypervisor,
                processor_info: self.processor_info,
                v_cpu_info: self.v_cpu_info,
                memory_info: self.memory_info,
                instance_storage_supported: self.instance_storage_supported,
                instance_storage_info: self.instance_storage_info,
                ebs_info: self.ebs_info,
                network_info: self.network_info,
                gpu_info: self.gpu_info,
                fpga_info: self.fpga_info,
                placement_group_info: self.placement_group_info,
                inference_accelerator_info: self.inference_accelerator_info,
                hibernation_supported: self.hibernation_supported,
                burstable_performance_supported: self.burstable_performance_supported,
                dedicated_hosts_supported: self.dedicated_hosts_supported,
                auto_recovery_supported: self.auto_recovery_supported,
                supported_boot_modes: self.supported_boot_modes,
            }
        }
    }
}
impl InstanceTypeInfo {
    /// Creates a new builder-style object to manufacture [`InstanceTypeInfo`](crate::model::InstanceTypeInfo).
    pub fn builder() -> crate::model::instance_type_info::Builder {
        crate::model::instance_type_info::Builder::default()
    }
}

/// When writing a match expression against `BootModeType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let bootmodetype = unimplemented!();
/// match bootmodetype {
///     BootModeType::LegacyBios => { /* ... */ },
///     BootModeType::Uefi => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `bootmodetype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `BootModeType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `BootModeType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `BootModeType::NewFeature` is defined.
/// Specifically, when `bootmodetype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `BootModeType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 BootModeType {
    #[allow(missing_docs)] // documentation missing in model
    LegacyBios,
    #[allow(missing_docs)] // documentation missing in model
    Uefi,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for BootModeType {
    fn from(s: &str) -> Self {
        match s {
            "legacy-bios" => BootModeType::LegacyBios,
            "uefi" => BootModeType::Uefi,
            other => BootModeType::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for BootModeType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(BootModeType::from(s))
    }
}
impl BootModeType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            BootModeType::LegacyBios => "legacy-bios",
            BootModeType::Uefi => "uefi",
            BootModeType::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["legacy-bios", "uefi"]
    }
}
impl AsRef<str> for BootModeType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes the Inference accelerators for the instance type.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InferenceAcceleratorInfo {
    /// <p>Describes the Inference accelerators for the instance type.</p>
    #[doc(hidden)]
    pub accelerators: std::option::Option<std::vec::Vec<crate::model::InferenceDeviceInfo>>,
}
impl InferenceAcceleratorInfo {
    /// <p>Describes the Inference accelerators for the instance type.</p>
    pub fn accelerators(&self) -> std::option::Option<&[crate::model::InferenceDeviceInfo]> {
        self.accelerators.as_deref()
    }
}
/// See [`InferenceAcceleratorInfo`](crate::model::InferenceAcceleratorInfo).
pub mod inference_accelerator_info {

    /// A builder for [`InferenceAcceleratorInfo`](crate::model::InferenceAcceleratorInfo).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) accelerators:
            std::option::Option<std::vec::Vec<crate::model::InferenceDeviceInfo>>,
    }
    impl Builder {
        /// Appends an item to `accelerators`.
        ///
        /// To override the contents of this collection use [`set_accelerators`](Self::set_accelerators).
        ///
        /// <p>Describes the Inference accelerators for the instance type.</p>
        pub fn accelerators(mut self, input: crate::model::InferenceDeviceInfo) -> Self {
            let mut v = self.accelerators.unwrap_or_default();
            v.push(input);
            self.accelerators = Some(v);
            self
        }
        /// <p>Describes the Inference accelerators for the instance type.</p>
        pub fn set_accelerators(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::InferenceDeviceInfo>>,
        ) -> Self {
            self.accelerators = input;
            self
        }
        /// Consumes the builder and constructs a [`InferenceAcceleratorInfo`](crate::model::InferenceAcceleratorInfo).
        pub fn build(self) -> crate::model::InferenceAcceleratorInfo {
            crate::model::InferenceAcceleratorInfo {
                accelerators: self.accelerators,
            }
        }
    }
}
impl InferenceAcceleratorInfo {
    /// Creates a new builder-style object to manufacture [`InferenceAcceleratorInfo`](crate::model::InferenceAcceleratorInfo).
    pub fn builder() -> crate::model::inference_accelerator_info::Builder {
        crate::model::inference_accelerator_info::Builder::default()
    }
}

/// <p>Describes the Inference accelerators for the instance type.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InferenceDeviceInfo {
    /// <p>The number of Inference accelerators for the instance type.</p>
    #[doc(hidden)]
    pub count: std::option::Option<i32>,
    /// <p>The name of the Inference accelerator.</p>
    #[doc(hidden)]
    pub name: std::option::Option<std::string::String>,
    /// <p>The manufacturer of the Inference accelerator.</p>
    #[doc(hidden)]
    pub manufacturer: std::option::Option<std::string::String>,
}
impl InferenceDeviceInfo {
    /// <p>The number of Inference accelerators for the instance type.</p>
    pub fn count(&self) -> std::option::Option<i32> {
        self.count
    }
    /// <p>The name of the Inference accelerator.</p>
    pub fn name(&self) -> std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The manufacturer of the Inference accelerator.</p>
    pub fn manufacturer(&self) -> std::option::Option<&str> {
        self.manufacturer.as_deref()
    }
}
/// See [`InferenceDeviceInfo`](crate::model::InferenceDeviceInfo).
pub mod inference_device_info {

    /// A builder for [`InferenceDeviceInfo`](crate::model::InferenceDeviceInfo).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) count: std::option::Option<i32>,
        pub(crate) name: std::option::Option<std::string::String>,
        pub(crate) manufacturer: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The number of Inference accelerators for the instance type.</p>
        pub fn count(mut self, input: i32) -> Self {
            self.count = Some(input);
            self
        }
        /// <p>The number of Inference accelerators for the instance type.</p>
        pub fn set_count(mut self, input: std::option::Option<i32>) -> Self {
            self.count = input;
            self
        }
        /// <p>The name of the Inference accelerator.</p>
        pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
            self.name = Some(input.into());
            self
        }
        /// <p>The name of the Inference accelerator.</p>
        pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.name = input;
            self
        }
        /// <p>The manufacturer of the Inference accelerator.</p>
        pub fn manufacturer(mut self, input: impl Into<std::string::String>) -> Self {
            self.manufacturer = Some(input.into());
            self
        }
        /// <p>The manufacturer of the Inference accelerator.</p>
        pub fn set_manufacturer(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.manufacturer = input;
            self
        }
        /// Consumes the builder and constructs a [`InferenceDeviceInfo`](crate::model::InferenceDeviceInfo).
        pub fn build(self) -> crate::model::InferenceDeviceInfo {
            crate::model::InferenceDeviceInfo {
                count: self.count,
                name: self.name,
                manufacturer: self.manufacturer,
            }
        }
    }
}
impl InferenceDeviceInfo {
    /// Creates a new builder-style object to manufacture [`InferenceDeviceInfo`](crate::model::InferenceDeviceInfo).
    pub fn builder() -> crate::model::inference_device_info::Builder {
        crate::model::inference_device_info::Builder::default()
    }
}

/// <p>Describes the placement group support of the instance type.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct PlacementGroupInfo {
    /// <p>The supported placement group types.</p>
    #[doc(hidden)]
    pub supported_strategies:
        std::option::Option<std::vec::Vec<crate::model::PlacementGroupStrategy>>,
}
impl PlacementGroupInfo {
    /// <p>The supported placement group types.</p>
    pub fn supported_strategies(
        &self,
    ) -> std::option::Option<&[crate::model::PlacementGroupStrategy]> {
        self.supported_strategies.as_deref()
    }
}
/// See [`PlacementGroupInfo`](crate::model::PlacementGroupInfo).
pub mod placement_group_info {

    /// A builder for [`PlacementGroupInfo`](crate::model::PlacementGroupInfo).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) supported_strategies:
            std::option::Option<std::vec::Vec<crate::model::PlacementGroupStrategy>>,
    }
    impl Builder {
        /// Appends an item to `supported_strategies`.
        ///
        /// To override the contents of this collection use [`set_supported_strategies`](Self::set_supported_strategies).
        ///
        /// <p>The supported placement group types.</p>
        pub fn supported_strategies(mut self, input: crate::model::PlacementGroupStrategy) -> Self {
            let mut v = self.supported_strategies.unwrap_or_default();
            v.push(input);
            self.supported_strategies = Some(v);
            self
        }
        /// <p>The supported placement group types.</p>
        pub fn set_supported_strategies(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::PlacementGroupStrategy>>,
        ) -> Self {
            self.supported_strategies = input;
            self
        }
        /// Consumes the builder and constructs a [`PlacementGroupInfo`](crate::model::PlacementGroupInfo).
        pub fn build(self) -> crate::model::PlacementGroupInfo {
            crate::model::PlacementGroupInfo {
                supported_strategies: self.supported_strategies,
            }
        }
    }
}
impl PlacementGroupInfo {
    /// Creates a new builder-style object to manufacture [`PlacementGroupInfo`](crate::model::PlacementGroupInfo).
    pub fn builder() -> crate::model::placement_group_info::Builder {
        crate::model::placement_group_info::Builder::default()
    }
}

/// When writing a match expression against `PlacementGroupStrategy`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let placementgroupstrategy = unimplemented!();
/// match placementgroupstrategy {
///     PlacementGroupStrategy::Cluster => { /* ... */ },
///     PlacementGroupStrategy::Partition => { /* ... */ },
///     PlacementGroupStrategy::Spread => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `placementgroupstrategy` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `PlacementGroupStrategy::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `PlacementGroupStrategy::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `PlacementGroupStrategy::NewFeature` is defined.
/// Specifically, when `placementgroupstrategy` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `PlacementGroupStrategy::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 PlacementGroupStrategy {
    #[allow(missing_docs)] // documentation missing in model
    Cluster,
    #[allow(missing_docs)] // documentation missing in model
    Partition,
    #[allow(missing_docs)] // documentation missing in model
    Spread,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for PlacementGroupStrategy {
    fn from(s: &str) -> Self {
        match s {
            "cluster" => PlacementGroupStrategy::Cluster,
            "partition" => PlacementGroupStrategy::Partition,
            "spread" => PlacementGroupStrategy::Spread,
            other => {
                PlacementGroupStrategy::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for PlacementGroupStrategy {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(PlacementGroupStrategy::from(s))
    }
}
impl PlacementGroupStrategy {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            PlacementGroupStrategy::Cluster => "cluster",
            PlacementGroupStrategy::Partition => "partition",
            PlacementGroupStrategy::Spread => "spread",
            PlacementGroupStrategy::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["cluster", "partition", "spread"]
    }
}
impl AsRef<str> for PlacementGroupStrategy {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes the FPGAs for the instance type.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct FpgaInfo {
    /// <p>Describes the FPGAs for the instance type.</p>
    #[doc(hidden)]
    pub fpgas: std::option::Option<std::vec::Vec<crate::model::FpgaDeviceInfo>>,
    /// <p>The total memory of all FPGA accelerators for the instance type.</p>
    #[doc(hidden)]
    pub total_fpga_memory_in_mi_b: std::option::Option<i32>,
}
impl FpgaInfo {
    /// <p>Describes the FPGAs for the instance type.</p>
    pub fn fpgas(&self) -> std::option::Option<&[crate::model::FpgaDeviceInfo]> {
        self.fpgas.as_deref()
    }
    /// <p>The total memory of all FPGA accelerators for the instance type.</p>
    pub fn total_fpga_memory_in_mi_b(&self) -> std::option::Option<i32> {
        self.total_fpga_memory_in_mi_b
    }
}
/// See [`FpgaInfo`](crate::model::FpgaInfo).
pub mod fpga_info {

    /// A builder for [`FpgaInfo`](crate::model::FpgaInfo).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) fpgas: std::option::Option<std::vec::Vec<crate::model::FpgaDeviceInfo>>,
        pub(crate) total_fpga_memory_in_mi_b: std::option::Option<i32>,
    }
    impl Builder {
        /// Appends an item to `fpgas`.
        ///
        /// To override the contents of this collection use [`set_fpgas`](Self::set_fpgas).
        ///
        /// <p>Describes the FPGAs for the instance type.</p>
        pub fn fpgas(mut self, input: crate::model::FpgaDeviceInfo) -> Self {
            let mut v = self.fpgas.unwrap_or_default();
            v.push(input);
            self.fpgas = Some(v);
            self
        }
        /// <p>Describes the FPGAs for the instance type.</p>
        pub fn set_fpgas(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::FpgaDeviceInfo>>,
        ) -> Self {
            self.fpgas = input;
            self
        }
        /// <p>The total memory of all FPGA accelerators for the instance type.</p>
        pub fn total_fpga_memory_in_mi_b(mut self, input: i32) -> Self {
            self.total_fpga_memory_in_mi_b = Some(input);
            self
        }
        /// <p>The total memory of all FPGA accelerators for the instance type.</p>
        pub fn set_total_fpga_memory_in_mi_b(mut self, input: std::option::Option<i32>) -> Self {
            self.total_fpga_memory_in_mi_b = input;
            self
        }
        /// Consumes the builder and constructs a [`FpgaInfo`](crate::model::FpgaInfo).
        pub fn build(self) -> crate::model::FpgaInfo {
            crate::model::FpgaInfo {
                fpgas: self.fpgas,
                total_fpga_memory_in_mi_b: self.total_fpga_memory_in_mi_b,
            }
        }
    }
}
impl FpgaInfo {
    /// Creates a new builder-style object to manufacture [`FpgaInfo`](crate::model::FpgaInfo).
    pub fn builder() -> crate::model::fpga_info::Builder {
        crate::model::fpga_info::Builder::default()
    }
}

/// <p>Describes the FPGA accelerator for the instance type.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct FpgaDeviceInfo {
    /// <p>The name of the FPGA accelerator.</p>
    #[doc(hidden)]
    pub name: std::option::Option<std::string::String>,
    /// <p>The manufacturer of the FPGA accelerator.</p>
    #[doc(hidden)]
    pub manufacturer: std::option::Option<std::string::String>,
    /// <p>The count of FPGA accelerators for the instance type.</p>
    #[doc(hidden)]
    pub count: std::option::Option<i32>,
    /// <p>Describes the memory for the FPGA accelerator for the instance type.</p>
    #[doc(hidden)]
    pub memory_info: std::option::Option<crate::model::FpgaDeviceMemoryInfo>,
}
impl FpgaDeviceInfo {
    /// <p>The name of the FPGA accelerator.</p>
    pub fn name(&self) -> std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The manufacturer of the FPGA accelerator.</p>
    pub fn manufacturer(&self) -> std::option::Option<&str> {
        self.manufacturer.as_deref()
    }
    /// <p>The count of FPGA accelerators for the instance type.</p>
    pub fn count(&self) -> std::option::Option<i32> {
        self.count
    }
    /// <p>Describes the memory for the FPGA accelerator for the instance type.</p>
    pub fn memory_info(&self) -> std::option::Option<&crate::model::FpgaDeviceMemoryInfo> {
        self.memory_info.as_ref()
    }
}
/// See [`FpgaDeviceInfo`](crate::model::FpgaDeviceInfo).
pub mod fpga_device_info {

    /// A builder for [`FpgaDeviceInfo`](crate::model::FpgaDeviceInfo).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) name: std::option::Option<std::string::String>,
        pub(crate) manufacturer: std::option::Option<std::string::String>,
        pub(crate) count: std::option::Option<i32>,
        pub(crate) memory_info: std::option::Option<crate::model::FpgaDeviceMemoryInfo>,
    }
    impl Builder {
        /// <p>The name of the FPGA accelerator.</p>
        pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
            self.name = Some(input.into());
            self
        }
        /// <p>The name of the FPGA accelerator.</p>
        pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.name = input;
            self
        }
        /// <p>The manufacturer of the FPGA accelerator.</p>
        pub fn manufacturer(mut self, input: impl Into<std::string::String>) -> Self {
            self.manufacturer = Some(input.into());
            self
        }
        /// <p>The manufacturer of the FPGA accelerator.</p>
        pub fn set_manufacturer(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.manufacturer = input;
            self
        }
        /// <p>The count of FPGA accelerators for the instance type.</p>
        pub fn count(mut self, input: i32) -> Self {
            self.count = Some(input);
            self
        }
        /// <p>The count of FPGA accelerators for the instance type.</p>
        pub fn set_count(mut self, input: std::option::Option<i32>) -> Self {
            self.count = input;
            self
        }
        /// <p>Describes the memory for the FPGA accelerator for the instance type.</p>
        pub fn memory_info(mut self, input: crate::model::FpgaDeviceMemoryInfo) -> Self {
            self.memory_info = Some(input);
            self
        }
        /// <p>Describes the memory for the FPGA accelerator for the instance type.</p>
        pub fn set_memory_info(
            mut self,
            input: std::option::Option<crate::model::FpgaDeviceMemoryInfo>,
        ) -> Self {
            self.memory_info = input;
            self
        }
        /// Consumes the builder and constructs a [`FpgaDeviceInfo`](crate::model::FpgaDeviceInfo).
        pub fn build(self) -> crate::model::FpgaDeviceInfo {
            crate::model::FpgaDeviceInfo {
                name: self.name,
                manufacturer: self.manufacturer,
                count: self.count,
                memory_info: self.memory_info,
            }
        }
    }
}
impl FpgaDeviceInfo {
    /// Creates a new builder-style object to manufacture [`FpgaDeviceInfo`](crate::model::FpgaDeviceInfo).
    pub fn builder() -> crate::model::fpga_device_info::Builder {
        crate::model::fpga_device_info::Builder::default()
    }
}

/// <p>Describes the memory for the FPGA accelerator for the instance type.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct FpgaDeviceMemoryInfo {
    /// <p>The size of the memory available to the FPGA accelerator, in MiB.</p>
    #[doc(hidden)]
    pub size_in_mi_b: std::option::Option<i32>,
}
impl FpgaDeviceMemoryInfo {
    /// <p>The size of the memory available to the FPGA accelerator, in MiB.</p>
    pub fn size_in_mi_b(&self) -> std::option::Option<i32> {
        self.size_in_mi_b
    }
}
/// See [`FpgaDeviceMemoryInfo`](crate::model::FpgaDeviceMemoryInfo).
pub mod fpga_device_memory_info {

    /// A builder for [`FpgaDeviceMemoryInfo`](crate::model::FpgaDeviceMemoryInfo).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) size_in_mi_b: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>The size of the memory available to the FPGA accelerator, in MiB.</p>
        pub fn size_in_mi_b(mut self, input: i32) -> Self {
            self.size_in_mi_b = Some(input);
            self
        }
        /// <p>The size of the memory available to the FPGA accelerator, in MiB.</p>
        pub fn set_size_in_mi_b(mut self, input: std::option::Option<i32>) -> Self {
            self.size_in_mi_b = input;
            self
        }
        /// Consumes the builder and constructs a [`FpgaDeviceMemoryInfo`](crate::model::FpgaDeviceMemoryInfo).
        pub fn build(self) -> crate::model::FpgaDeviceMemoryInfo {
            crate::model::FpgaDeviceMemoryInfo {
                size_in_mi_b: self.size_in_mi_b,
            }
        }
    }
}
impl FpgaDeviceMemoryInfo {
    /// Creates a new builder-style object to manufacture [`FpgaDeviceMemoryInfo`](crate::model::FpgaDeviceMemoryInfo).
    pub fn builder() -> crate::model::fpga_device_memory_info::Builder {
        crate::model::fpga_device_memory_info::Builder::default()
    }
}

/// <p>Describes the GPU accelerators for the instance type.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GpuInfo {
    /// <p>Describes the GPU accelerators for the instance type.</p>
    #[doc(hidden)]
    pub gpus: std::option::Option<std::vec::Vec<crate::model::GpuDeviceInfo>>,
    /// <p>The total size of the memory for the GPU accelerators for the instance type, in MiB.</p>
    #[doc(hidden)]
    pub total_gpu_memory_in_mi_b: std::option::Option<i32>,
}
impl GpuInfo {
    /// <p>Describes the GPU accelerators for the instance type.</p>
    pub fn gpus(&self) -> std::option::Option<&[crate::model::GpuDeviceInfo]> {
        self.gpus.as_deref()
    }
    /// <p>The total size of the memory for the GPU accelerators for the instance type, in MiB.</p>
    pub fn total_gpu_memory_in_mi_b(&self) -> std::option::Option<i32> {
        self.total_gpu_memory_in_mi_b
    }
}
/// See [`GpuInfo`](crate::model::GpuInfo).
pub mod gpu_info {

    /// A builder for [`GpuInfo`](crate::model::GpuInfo).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) gpus: std::option::Option<std::vec::Vec<crate::model::GpuDeviceInfo>>,
        pub(crate) total_gpu_memory_in_mi_b: std::option::Option<i32>,
    }
    impl Builder {
        /// Appends an item to `gpus`.
        ///
        /// To override the contents of this collection use [`set_gpus`](Self::set_gpus).
        ///
        /// <p>Describes the GPU accelerators for the instance type.</p>
        pub fn gpus(mut self, input: crate::model::GpuDeviceInfo) -> Self {
            let mut v = self.gpus.unwrap_or_default();
            v.push(input);
            self.gpus = Some(v);
            self
        }
        /// <p>Describes the GPU accelerators for the instance type.</p>
        pub fn set_gpus(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::GpuDeviceInfo>>,
        ) -> Self {
            self.gpus = input;
            self
        }
        /// <p>The total size of the memory for the GPU accelerators for the instance type, in MiB.</p>
        pub fn total_gpu_memory_in_mi_b(mut self, input: i32) -> Self {
            self.total_gpu_memory_in_mi_b = Some(input);
            self
        }
        /// <p>The total size of the memory for the GPU accelerators for the instance type, in MiB.</p>
        pub fn set_total_gpu_memory_in_mi_b(mut self, input: std::option::Option<i32>) -> Self {
            self.total_gpu_memory_in_mi_b = input;
            self
        }
        /// Consumes the builder and constructs a [`GpuInfo`](crate::model::GpuInfo).
        pub fn build(self) -> crate::model::GpuInfo {
            crate::model::GpuInfo {
                gpus: self.gpus,
                total_gpu_memory_in_mi_b: self.total_gpu_memory_in_mi_b,
            }
        }
    }
}
impl GpuInfo {
    /// Creates a new builder-style object to manufacture [`GpuInfo`](crate::model::GpuInfo).
    pub fn builder() -> crate::model::gpu_info::Builder {
        crate::model::gpu_info::Builder::default()
    }
}

/// <p>Describes the GPU accelerators for the instance type.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GpuDeviceInfo {
    /// <p>The name of the GPU accelerator.</p>
    #[doc(hidden)]
    pub name: std::option::Option<std::string::String>,
    /// <p>The manufacturer of the GPU accelerator.</p>
    #[doc(hidden)]
    pub manufacturer: std::option::Option<std::string::String>,
    /// <p>The number of GPUs for the instance type.</p>
    #[doc(hidden)]
    pub count: std::option::Option<i32>,
    /// <p>Describes the memory available to the GPU accelerator.</p>
    #[doc(hidden)]
    pub memory_info: std::option::Option<crate::model::GpuDeviceMemoryInfo>,
}
impl GpuDeviceInfo {
    /// <p>The name of the GPU accelerator.</p>
    pub fn name(&self) -> std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The manufacturer of the GPU accelerator.</p>
    pub fn manufacturer(&self) -> std::option::Option<&str> {
        self.manufacturer.as_deref()
    }
    /// <p>The number of GPUs for the instance type.</p>
    pub fn count(&self) -> std::option::Option<i32> {
        self.count
    }
    /// <p>Describes the memory available to the GPU accelerator.</p>
    pub fn memory_info(&self) -> std::option::Option<&crate::model::GpuDeviceMemoryInfo> {
        self.memory_info.as_ref()
    }
}
/// See [`GpuDeviceInfo`](crate::model::GpuDeviceInfo).
pub mod gpu_device_info {

    /// A builder for [`GpuDeviceInfo`](crate::model::GpuDeviceInfo).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) name: std::option::Option<std::string::String>,
        pub(crate) manufacturer: std::option::Option<std::string::String>,
        pub(crate) count: std::option::Option<i32>,
        pub(crate) memory_info: std::option::Option<crate::model::GpuDeviceMemoryInfo>,
    }
    impl Builder {
        /// <p>The name of the GPU accelerator.</p>
        pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
            self.name = Some(input.into());
            self
        }
        /// <p>The name of the GPU accelerator.</p>
        pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.name = input;
            self
        }
        /// <p>The manufacturer of the GPU accelerator.</p>
        pub fn manufacturer(mut self, input: impl Into<std::string::String>) -> Self {
            self.manufacturer = Some(input.into());
            self
        }
        /// <p>The manufacturer of the GPU accelerator.</p>
        pub fn set_manufacturer(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.manufacturer = input;
            self
        }
        /// <p>The number of GPUs for the instance type.</p>
        pub fn count(mut self, input: i32) -> Self {
            self.count = Some(input);
            self
        }
        /// <p>The number of GPUs for the instance type.</p>
        pub fn set_count(mut self, input: std::option::Option<i32>) -> Self {
            self.count = input;
            self
        }
        /// <p>Describes the memory available to the GPU accelerator.</p>
        pub fn memory_info(mut self, input: crate::model::GpuDeviceMemoryInfo) -> Self {
            self.memory_info = Some(input);
            self
        }
        /// <p>Describes the memory available to the GPU accelerator.</p>
        pub fn set_memory_info(
            mut self,
            input: std::option::Option<crate::model::GpuDeviceMemoryInfo>,
        ) -> Self {
            self.memory_info = input;
            self
        }
        /// Consumes the builder and constructs a [`GpuDeviceInfo`](crate::model::GpuDeviceInfo).
        pub fn build(self) -> crate::model::GpuDeviceInfo {
            crate::model::GpuDeviceInfo {
                name: self.name,
                manufacturer: self.manufacturer,
                count: self.count,
                memory_info: self.memory_info,
            }
        }
    }
}
impl GpuDeviceInfo {
    /// Creates a new builder-style object to manufacture [`GpuDeviceInfo`](crate::model::GpuDeviceInfo).
    pub fn builder() -> crate::model::gpu_device_info::Builder {
        crate::model::gpu_device_info::Builder::default()
    }
}

/// <p>Describes the memory available to the GPU accelerator.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GpuDeviceMemoryInfo {
    /// <p>The size of the memory available to the GPU accelerator, in MiB.</p>
    #[doc(hidden)]
    pub size_in_mi_b: std::option::Option<i32>,
}
impl GpuDeviceMemoryInfo {
    /// <p>The size of the memory available to the GPU accelerator, in MiB.</p>
    pub fn size_in_mi_b(&self) -> std::option::Option<i32> {
        self.size_in_mi_b
    }
}
/// See [`GpuDeviceMemoryInfo`](crate::model::GpuDeviceMemoryInfo).
pub mod gpu_device_memory_info {

    /// A builder for [`GpuDeviceMemoryInfo`](crate::model::GpuDeviceMemoryInfo).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) size_in_mi_b: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>The size of the memory available to the GPU accelerator, in MiB.</p>
        pub fn size_in_mi_b(mut self, input: i32) -> Self {
            self.size_in_mi_b = Some(input);
            self
        }
        /// <p>The size of the memory available to the GPU accelerator, in MiB.</p>
        pub fn set_size_in_mi_b(mut self, input: std::option::Option<i32>) -> Self {
            self.size_in_mi_b = input;
            self
        }
        /// Consumes the builder and constructs a [`GpuDeviceMemoryInfo`](crate::model::GpuDeviceMemoryInfo).
        pub fn build(self) -> crate::model::GpuDeviceMemoryInfo {
            crate::model::GpuDeviceMemoryInfo {
                size_in_mi_b: self.size_in_mi_b,
            }
        }
    }
}
impl GpuDeviceMemoryInfo {
    /// Creates a new builder-style object to manufacture [`GpuDeviceMemoryInfo`](crate::model::GpuDeviceMemoryInfo).
    pub fn builder() -> crate::model::gpu_device_memory_info::Builder {
        crate::model::gpu_device_memory_info::Builder::default()
    }
}

/// <p>Describes the networking features of the instance type.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct NetworkInfo {
    /// <p>The network performance.</p>
    #[doc(hidden)]
    pub network_performance: std::option::Option<std::string::String>,
    /// <p>The maximum number of network interfaces for the instance type.</p>
    #[doc(hidden)]
    pub maximum_network_interfaces: std::option::Option<i32>,
    /// <p>The maximum number of physical network cards that can be allocated to the instance.</p>
    #[doc(hidden)]
    pub maximum_network_cards: std::option::Option<i32>,
    /// <p>The index of the default network card, starting at 0.</p>
    #[doc(hidden)]
    pub default_network_card_index: std::option::Option<i32>,
    /// <p>Describes the network cards for the instance type.</p>
    #[doc(hidden)]
    pub network_cards: std::option::Option<std::vec::Vec<crate::model::NetworkCardInfo>>,
    /// <p>The maximum number of IPv4 addresses per network interface.</p>
    #[doc(hidden)]
    pub ipv4_addresses_per_interface: std::option::Option<i32>,
    /// <p>The maximum number of IPv6 addresses per network interface.</p>
    #[doc(hidden)]
    pub ipv6_addresses_per_interface: std::option::Option<i32>,
    /// <p>Indicates whether IPv6 is supported.</p>
    #[doc(hidden)]
    pub ipv6_supported: std::option::Option<bool>,
    /// <p>Indicates whether Elastic Network Adapter (ENA) is supported.</p>
    #[doc(hidden)]
    pub ena_support: std::option::Option<crate::model::EnaSupport>,
    /// <p>Indicates whether Elastic Fabric Adapter (EFA) is supported.</p>
    #[doc(hidden)]
    pub efa_supported: std::option::Option<bool>,
    /// <p>Describes the Elastic Fabric Adapters for the instance type.</p>
    #[doc(hidden)]
    pub efa_info: std::option::Option<crate::model::EfaInfo>,
    /// <p>Indicates whether the instance type automatically encrypts in-transit traffic between instances.</p>
    #[doc(hidden)]
    pub encryption_in_transit_supported: std::option::Option<bool>,
    /// <p>Indicates whether the instance type supports ENA Express. ENA Express uses Amazon Web Services Scalable Reliable Datagram (SRD) technology to increase the maximum bandwidth used per stream and minimize tail latency of network traffic between EC2 instances.</p>
    #[doc(hidden)]
    pub ena_srd_supported: std::option::Option<bool>,
}
impl NetworkInfo {
    /// <p>The network performance.</p>
    pub fn network_performance(&self) -> std::option::Option<&str> {
        self.network_performance.as_deref()
    }
    /// <p>The maximum number of network interfaces for the instance type.</p>
    pub fn maximum_network_interfaces(&self) -> std::option::Option<i32> {
        self.maximum_network_interfaces
    }
    /// <p>The maximum number of physical network cards that can be allocated to the instance.</p>
    pub fn maximum_network_cards(&self) -> std::option::Option<i32> {
        self.maximum_network_cards
    }
    /// <p>The index of the default network card, starting at 0.</p>
    pub fn default_network_card_index(&self) -> std::option::Option<i32> {
        self.default_network_card_index
    }
    /// <p>Describes the network cards for the instance type.</p>
    pub fn network_cards(&self) -> std::option::Option<&[crate::model::NetworkCardInfo]> {
        self.network_cards.as_deref()
    }
    /// <p>The maximum number of IPv4 addresses per network interface.</p>
    pub fn ipv4_addresses_per_interface(&self) -> std::option::Option<i32> {
        self.ipv4_addresses_per_interface
    }
    /// <p>The maximum number of IPv6 addresses per network interface.</p>
    pub fn ipv6_addresses_per_interface(&self) -> std::option::Option<i32> {
        self.ipv6_addresses_per_interface
    }
    /// <p>Indicates whether IPv6 is supported.</p>
    pub fn ipv6_supported(&self) -> std::option::Option<bool> {
        self.ipv6_supported
    }
    /// <p>Indicates whether Elastic Network Adapter (ENA) is supported.</p>
    pub fn ena_support(&self) -> std::option::Option<&crate::model::EnaSupport> {
        self.ena_support.as_ref()
    }
    /// <p>Indicates whether Elastic Fabric Adapter (EFA) is supported.</p>
    pub fn efa_supported(&self) -> std::option::Option<bool> {
        self.efa_supported
    }
    /// <p>Describes the Elastic Fabric Adapters for the instance type.</p>
    pub fn efa_info(&self) -> std::option::Option<&crate::model::EfaInfo> {
        self.efa_info.as_ref()
    }
    /// <p>Indicates whether the instance type automatically encrypts in-transit traffic between instances.</p>
    pub fn encryption_in_transit_supported(&self) -> std::option::Option<bool> {
        self.encryption_in_transit_supported
    }
    /// <p>Indicates whether the instance type supports ENA Express. ENA Express uses Amazon Web Services Scalable Reliable Datagram (SRD) technology to increase the maximum bandwidth used per stream and minimize tail latency of network traffic between EC2 instances.</p>
    pub fn ena_srd_supported(&self) -> std::option::Option<bool> {
        self.ena_srd_supported
    }
}
/// See [`NetworkInfo`](crate::model::NetworkInfo).
pub mod network_info {

    /// A builder for [`NetworkInfo`](crate::model::NetworkInfo).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) network_performance: std::option::Option<std::string::String>,
        pub(crate) maximum_network_interfaces: std::option::Option<i32>,
        pub(crate) maximum_network_cards: std::option::Option<i32>,
        pub(crate) default_network_card_index: std::option::Option<i32>,
        pub(crate) network_cards: std::option::Option<std::vec::Vec<crate::model::NetworkCardInfo>>,
        pub(crate) ipv4_addresses_per_interface: std::option::Option<i32>,
        pub(crate) ipv6_addresses_per_interface: std::option::Option<i32>,
        pub(crate) ipv6_supported: std::option::Option<bool>,
        pub(crate) ena_support: std::option::Option<crate::model::EnaSupport>,
        pub(crate) efa_supported: std::option::Option<bool>,
        pub(crate) efa_info: std::option::Option<crate::model::EfaInfo>,
        pub(crate) encryption_in_transit_supported: std::option::Option<bool>,
        pub(crate) ena_srd_supported: std::option::Option<bool>,
    }
    impl Builder {
        /// <p>The network performance.</p>
        pub fn network_performance(mut self, input: impl Into<std::string::String>) -> Self {
            self.network_performance = Some(input.into());
            self
        }
        /// <p>The network performance.</p>
        pub fn set_network_performance(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.network_performance = input;
            self
        }
        /// <p>The maximum number of network interfaces for the instance type.</p>
        pub fn maximum_network_interfaces(mut self, input: i32) -> Self {
            self.maximum_network_interfaces = Some(input);
            self
        }
        /// <p>The maximum number of network interfaces for the instance type.</p>
        pub fn set_maximum_network_interfaces(mut self, input: std::option::Option<i32>) -> Self {
            self.maximum_network_interfaces = input;
            self
        }
        /// <p>The maximum number of physical network cards that can be allocated to the instance.</p>
        pub fn maximum_network_cards(mut self, input: i32) -> Self {
            self.maximum_network_cards = Some(input);
            self
        }
        /// <p>The maximum number of physical network cards that can be allocated to the instance.</p>
        pub fn set_maximum_network_cards(mut self, input: std::option::Option<i32>) -> Self {
            self.maximum_network_cards = input;
            self
        }
        /// <p>The index of the default network card, starting at 0.</p>
        pub fn default_network_card_index(mut self, input: i32) -> Self {
            self.default_network_card_index = Some(input);
            self
        }
        /// <p>The index of the default network card, starting at 0.</p>
        pub fn set_default_network_card_index(mut self, input: std::option::Option<i32>) -> Self {
            self.default_network_card_index = input;
            self
        }
        /// Appends an item to `network_cards`.
        ///
        /// To override the contents of this collection use [`set_network_cards`](Self::set_network_cards).
        ///
        /// <p>Describes the network cards for the instance type.</p>
        pub fn network_cards(mut self, input: crate::model::NetworkCardInfo) -> Self {
            let mut v = self.network_cards.unwrap_or_default();
            v.push(input);
            self.network_cards = Some(v);
            self
        }
        /// <p>Describes the network cards for the instance type.</p>
        pub fn set_network_cards(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::NetworkCardInfo>>,
        ) -> Self {
            self.network_cards = input;
            self
        }
        /// <p>The maximum number of IPv4 addresses per network interface.</p>
        pub fn ipv4_addresses_per_interface(mut self, input: i32) -> Self {
            self.ipv4_addresses_per_interface = Some(input);
            self
        }
        /// <p>The maximum number of IPv4 addresses per network interface.</p>
        pub fn set_ipv4_addresses_per_interface(mut self, input: std::option::Option<i32>) -> Self {
            self.ipv4_addresses_per_interface = input;
            self
        }
        /// <p>The maximum number of IPv6 addresses per network interface.</p>
        pub fn ipv6_addresses_per_interface(mut self, input: i32) -> Self {
            self.ipv6_addresses_per_interface = Some(input);
            self
        }
        /// <p>The maximum number of IPv6 addresses per network interface.</p>
        pub fn set_ipv6_addresses_per_interface(mut self, input: std::option::Option<i32>) -> Self {
            self.ipv6_addresses_per_interface = input;
            self
        }
        /// <p>Indicates whether IPv6 is supported.</p>
        pub fn ipv6_supported(mut self, input: bool) -> Self {
            self.ipv6_supported = Some(input);
            self
        }
        /// <p>Indicates whether IPv6 is supported.</p>
        pub fn set_ipv6_supported(mut self, input: std::option::Option<bool>) -> Self {
            self.ipv6_supported = input;
            self
        }
        /// <p>Indicates whether Elastic Network Adapter (ENA) is supported.</p>
        pub fn ena_support(mut self, input: crate::model::EnaSupport) -> Self {
            self.ena_support = Some(input);
            self
        }
        /// <p>Indicates whether Elastic Network Adapter (ENA) is supported.</p>
        pub fn set_ena_support(
            mut self,
            input: std::option::Option<crate::model::EnaSupport>,
        ) -> Self {
            self.ena_support = input;
            self
        }
        /// <p>Indicates whether Elastic Fabric Adapter (EFA) is supported.</p>
        pub fn efa_supported(mut self, input: bool) -> Self {
            self.efa_supported = Some(input);
            self
        }
        /// <p>Indicates whether Elastic Fabric Adapter (EFA) is supported.</p>
        pub fn set_efa_supported(mut self, input: std::option::Option<bool>) -> Self {
            self.efa_supported = input;
            self
        }
        /// <p>Describes the Elastic Fabric Adapters for the instance type.</p>
        pub fn efa_info(mut self, input: crate::model::EfaInfo) -> Self {
            self.efa_info = Some(input);
            self
        }
        /// <p>Describes the Elastic Fabric Adapters for the instance type.</p>
        pub fn set_efa_info(mut self, input: std::option::Option<crate::model::EfaInfo>) -> Self {
            self.efa_info = input;
            self
        }
        /// <p>Indicates whether the instance type automatically encrypts in-transit traffic between instances.</p>
        pub fn encryption_in_transit_supported(mut self, input: bool) -> Self {
            self.encryption_in_transit_supported = Some(input);
            self
        }
        /// <p>Indicates whether the instance type automatically encrypts in-transit traffic between instances.</p>
        pub fn set_encryption_in_transit_supported(
            mut self,
            input: std::option::Option<bool>,
        ) -> Self {
            self.encryption_in_transit_supported = input;
            self
        }
        /// <p>Indicates whether the instance type supports ENA Express. ENA Express uses Amazon Web Services Scalable Reliable Datagram (SRD) technology to increase the maximum bandwidth used per stream and minimize tail latency of network traffic between EC2 instances.</p>
        pub fn ena_srd_supported(mut self, input: bool) -> Self {
            self.ena_srd_supported = Some(input);
            self
        }
        /// <p>Indicates whether the instance type supports ENA Express. ENA Express uses Amazon Web Services Scalable Reliable Datagram (SRD) technology to increase the maximum bandwidth used per stream and minimize tail latency of network traffic between EC2 instances.</p>
        pub fn set_ena_srd_supported(mut self, input: std::option::Option<bool>) -> Self {
            self.ena_srd_supported = input;
            self
        }
        /// Consumes the builder and constructs a [`NetworkInfo`](crate::model::NetworkInfo).
        pub fn build(self) -> crate::model::NetworkInfo {
            crate::model::NetworkInfo {
                network_performance: self.network_performance,
                maximum_network_interfaces: self.maximum_network_interfaces,
                maximum_network_cards: self.maximum_network_cards,
                default_network_card_index: self.default_network_card_index,
                network_cards: self.network_cards,
                ipv4_addresses_per_interface: self.ipv4_addresses_per_interface,
                ipv6_addresses_per_interface: self.ipv6_addresses_per_interface,
                ipv6_supported: self.ipv6_supported,
                ena_support: self.ena_support,
                efa_supported: self.efa_supported,
                efa_info: self.efa_info,
                encryption_in_transit_supported: self.encryption_in_transit_supported,
                ena_srd_supported: self.ena_srd_supported,
            }
        }
    }
}
impl NetworkInfo {
    /// Creates a new builder-style object to manufacture [`NetworkInfo`](crate::model::NetworkInfo).
    pub fn builder() -> crate::model::network_info::Builder {
        crate::model::network_info::Builder::default()
    }
}

/// <p>Describes the Elastic Fabric Adapters for the instance type.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct EfaInfo {
    /// <p>The maximum number of Elastic Fabric Adapters for the instance type.</p>
    #[doc(hidden)]
    pub maximum_efa_interfaces: std::option::Option<i32>,
}
impl EfaInfo {
    /// <p>The maximum number of Elastic Fabric Adapters for the instance type.</p>
    pub fn maximum_efa_interfaces(&self) -> std::option::Option<i32> {
        self.maximum_efa_interfaces
    }
}
/// See [`EfaInfo`](crate::model::EfaInfo).
pub mod efa_info {

    /// A builder for [`EfaInfo`](crate::model::EfaInfo).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) maximum_efa_interfaces: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>The maximum number of Elastic Fabric Adapters for the instance type.</p>
        pub fn maximum_efa_interfaces(mut self, input: i32) -> Self {
            self.maximum_efa_interfaces = Some(input);
            self
        }
        /// <p>The maximum number of Elastic Fabric Adapters for the instance type.</p>
        pub fn set_maximum_efa_interfaces(mut self, input: std::option::Option<i32>) -> Self {
            self.maximum_efa_interfaces = input;
            self
        }
        /// Consumes the builder and constructs a [`EfaInfo`](crate::model::EfaInfo).
        pub fn build(self) -> crate::model::EfaInfo {
            crate::model::EfaInfo {
                maximum_efa_interfaces: self.maximum_efa_interfaces,
            }
        }
    }
}
impl EfaInfo {
    /// Creates a new builder-style object to manufacture [`EfaInfo`](crate::model::EfaInfo).
    pub fn builder() -> crate::model::efa_info::Builder {
        crate::model::efa_info::Builder::default()
    }
}

/// When writing a match expression against `EnaSupport`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let enasupport = unimplemented!();
/// match enasupport {
///     EnaSupport::Required => { /* ... */ },
///     EnaSupport::Supported => { /* ... */ },
///     EnaSupport::Unsupported => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `enasupport` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `EnaSupport::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `EnaSupport::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `EnaSupport::NewFeature` is defined.
/// Specifically, when `enasupport` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `EnaSupport::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 EnaSupport {
    #[allow(missing_docs)] // documentation missing in model
    Required,
    #[allow(missing_docs)] // documentation missing in model
    Supported,
    #[allow(missing_docs)] // documentation missing in model
    Unsupported,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for EnaSupport {
    fn from(s: &str) -> Self {
        match s {
            "required" => EnaSupport::Required,
            "supported" => EnaSupport::Supported,
            "unsupported" => EnaSupport::Unsupported,
            other => EnaSupport::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for EnaSupport {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(EnaSupport::from(s))
    }
}
impl EnaSupport {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            EnaSupport::Required => "required",
            EnaSupport::Supported => "supported",
            EnaSupport::Unsupported => "unsupported",
            EnaSupport::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["required", "supported", "unsupported"]
    }
}
impl AsRef<str> for EnaSupport {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes the network card support of the instance type.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct NetworkCardInfo {
    /// <p>The index of the network card.</p>
    #[doc(hidden)]
    pub network_card_index: std::option::Option<i32>,
    /// <p>The network performance of the network card.</p>
    #[doc(hidden)]
    pub network_performance: std::option::Option<std::string::String>,
    /// <p>The maximum number of network interfaces for the network card.</p>
    #[doc(hidden)]
    pub maximum_network_interfaces: std::option::Option<i32>,
}
impl NetworkCardInfo {
    /// <p>The index of the network card.</p>
    pub fn network_card_index(&self) -> std::option::Option<i32> {
        self.network_card_index
    }
    /// <p>The network performance of the network card.</p>
    pub fn network_performance(&self) -> std::option::Option<&str> {
        self.network_performance.as_deref()
    }
    /// <p>The maximum number of network interfaces for the network card.</p>
    pub fn maximum_network_interfaces(&self) -> std::option::Option<i32> {
        self.maximum_network_interfaces
    }
}
/// See [`NetworkCardInfo`](crate::model::NetworkCardInfo).
pub mod network_card_info {

    /// A builder for [`NetworkCardInfo`](crate::model::NetworkCardInfo).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) network_card_index: std::option::Option<i32>,
        pub(crate) network_performance: std::option::Option<std::string::String>,
        pub(crate) maximum_network_interfaces: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>The index of the network card.</p>
        pub fn network_card_index(mut self, input: i32) -> Self {
            self.network_card_index = Some(input);
            self
        }
        /// <p>The index of the network card.</p>
        pub fn set_network_card_index(mut self, input: std::option::Option<i32>) -> Self {
            self.network_card_index = input;
            self
        }
        /// <p>The network performance of the network card.</p>
        pub fn network_performance(mut self, input: impl Into<std::string::String>) -> Self {
            self.network_performance = Some(input.into());
            self
        }
        /// <p>The network performance of the network card.</p>
        pub fn set_network_performance(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.network_performance = input;
            self
        }
        /// <p>The maximum number of network interfaces for the network card.</p>
        pub fn maximum_network_interfaces(mut self, input: i32) -> Self {
            self.maximum_network_interfaces = Some(input);
            self
        }
        /// <p>The maximum number of network interfaces for the network card.</p>
        pub fn set_maximum_network_interfaces(mut self, input: std::option::Option<i32>) -> Self {
            self.maximum_network_interfaces = input;
            self
        }
        /// Consumes the builder and constructs a [`NetworkCardInfo`](crate::model::NetworkCardInfo).
        pub fn build(self) -> crate::model::NetworkCardInfo {
            crate::model::NetworkCardInfo {
                network_card_index: self.network_card_index,
                network_performance: self.network_performance,
                maximum_network_interfaces: self.maximum_network_interfaces,
            }
        }
    }
}
impl NetworkCardInfo {
    /// Creates a new builder-style object to manufacture [`NetworkCardInfo`](crate::model::NetworkCardInfo).
    pub fn builder() -> crate::model::network_card_info::Builder {
        crate::model::network_card_info::Builder::default()
    }
}

/// <p>Describes the Amazon EBS features supported by the instance type.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct EbsInfo {
    /// <p>Indicates whether the instance type is Amazon EBS-optimized. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSOptimized.html">Amazon EBS-optimized instances</a> in <i>Amazon EC2 User Guide</i>.</p>
    #[doc(hidden)]
    pub ebs_optimized_support: std::option::Option<crate::model::EbsOptimizedSupport>,
    /// <p>Indicates whether Amazon EBS encryption is supported.</p>
    #[doc(hidden)]
    pub encryption_support: std::option::Option<crate::model::EbsEncryptionSupport>,
    /// <p>Describes the optimized EBS performance for the instance type.</p>
    #[doc(hidden)]
    pub ebs_optimized_info: std::option::Option<crate::model::EbsOptimizedInfo>,
    /// <p>Indicates whether non-volatile memory express (NVMe) is supported.</p>
    #[doc(hidden)]
    pub nvme_support: std::option::Option<crate::model::EbsNvmeSupport>,
}
impl EbsInfo {
    /// <p>Indicates whether the instance type is Amazon EBS-optimized. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSOptimized.html">Amazon EBS-optimized instances</a> in <i>Amazon EC2 User Guide</i>.</p>
    pub fn ebs_optimized_support(&self) -> std::option::Option<&crate::model::EbsOptimizedSupport> {
        self.ebs_optimized_support.as_ref()
    }
    /// <p>Indicates whether Amazon EBS encryption is supported.</p>
    pub fn encryption_support(&self) -> std::option::Option<&crate::model::EbsEncryptionSupport> {
        self.encryption_support.as_ref()
    }
    /// <p>Describes the optimized EBS performance for the instance type.</p>
    pub fn ebs_optimized_info(&self) -> std::option::Option<&crate::model::EbsOptimizedInfo> {
        self.ebs_optimized_info.as_ref()
    }
    /// <p>Indicates whether non-volatile memory express (NVMe) is supported.</p>
    pub fn nvme_support(&self) -> std::option::Option<&crate::model::EbsNvmeSupport> {
        self.nvme_support.as_ref()
    }
}
/// See [`EbsInfo`](crate::model::EbsInfo).
pub mod ebs_info {

    /// A builder for [`EbsInfo`](crate::model::EbsInfo).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) ebs_optimized_support: std::option::Option<crate::model::EbsOptimizedSupport>,
        pub(crate) encryption_support: std::option::Option<crate::model::EbsEncryptionSupport>,
        pub(crate) ebs_optimized_info: std::option::Option<crate::model::EbsOptimizedInfo>,
        pub(crate) nvme_support: std::option::Option<crate::model::EbsNvmeSupport>,
    }
    impl Builder {
        /// <p>Indicates whether the instance type is Amazon EBS-optimized. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSOptimized.html">Amazon EBS-optimized instances</a> in <i>Amazon EC2 User Guide</i>.</p>
        pub fn ebs_optimized_support(mut self, input: crate::model::EbsOptimizedSupport) -> Self {
            self.ebs_optimized_support = Some(input);
            self
        }
        /// <p>Indicates whether the instance type is Amazon EBS-optimized. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSOptimized.html">Amazon EBS-optimized instances</a> in <i>Amazon EC2 User Guide</i>.</p>
        pub fn set_ebs_optimized_support(
            mut self,
            input: std::option::Option<crate::model::EbsOptimizedSupport>,
        ) -> Self {
            self.ebs_optimized_support = input;
            self
        }
        /// <p>Indicates whether Amazon EBS encryption is supported.</p>
        pub fn encryption_support(mut self, input: crate::model::EbsEncryptionSupport) -> Self {
            self.encryption_support = Some(input);
            self
        }
        /// <p>Indicates whether Amazon EBS encryption is supported.</p>
        pub fn set_encryption_support(
            mut self,
            input: std::option::Option<crate::model::EbsEncryptionSupport>,
        ) -> Self {
            self.encryption_support = input;
            self
        }
        /// <p>Describes the optimized EBS performance for the instance type.</p>
        pub fn ebs_optimized_info(mut self, input: crate::model::EbsOptimizedInfo) -> Self {
            self.ebs_optimized_info = Some(input);
            self
        }
        /// <p>Describes the optimized EBS performance for the instance type.</p>
        pub fn set_ebs_optimized_info(
            mut self,
            input: std::option::Option<crate::model::EbsOptimizedInfo>,
        ) -> Self {
            self.ebs_optimized_info = input;
            self
        }
        /// <p>Indicates whether non-volatile memory express (NVMe) is supported.</p>
        pub fn nvme_support(mut self, input: crate::model::EbsNvmeSupport) -> Self {
            self.nvme_support = Some(input);
            self
        }
        /// <p>Indicates whether non-volatile memory express (NVMe) is supported.</p>
        pub fn set_nvme_support(
            mut self,
            input: std::option::Option<crate::model::EbsNvmeSupport>,
        ) -> Self {
            self.nvme_support = input;
            self
        }
        /// Consumes the builder and constructs a [`EbsInfo`](crate::model::EbsInfo).
        pub fn build(self) -> crate::model::EbsInfo {
            crate::model::EbsInfo {
                ebs_optimized_support: self.ebs_optimized_support,
                encryption_support: self.encryption_support,
                ebs_optimized_info: self.ebs_optimized_info,
                nvme_support: self.nvme_support,
            }
        }
    }
}
impl EbsInfo {
    /// Creates a new builder-style object to manufacture [`EbsInfo`](crate::model::EbsInfo).
    pub fn builder() -> crate::model::ebs_info::Builder {
        crate::model::ebs_info::Builder::default()
    }
}

/// When writing a match expression against `EbsNvmeSupport`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let ebsnvmesupport = unimplemented!();
/// match ebsnvmesupport {
///     EbsNvmeSupport::Required => { /* ... */ },
///     EbsNvmeSupport::Supported => { /* ... */ },
///     EbsNvmeSupport::Unsupported => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `ebsnvmesupport` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `EbsNvmeSupport::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `EbsNvmeSupport::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `EbsNvmeSupport::NewFeature` is defined.
/// Specifically, when `ebsnvmesupport` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `EbsNvmeSupport::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 EbsNvmeSupport {
    #[allow(missing_docs)] // documentation missing in model
    Required,
    #[allow(missing_docs)] // documentation missing in model
    Supported,
    #[allow(missing_docs)] // documentation missing in model
    Unsupported,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for EbsNvmeSupport {
    fn from(s: &str) -> Self {
        match s {
            "required" => EbsNvmeSupport::Required,
            "supported" => EbsNvmeSupport::Supported,
            "unsupported" => EbsNvmeSupport::Unsupported,
            other => EbsNvmeSupport::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for EbsNvmeSupport {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(EbsNvmeSupport::from(s))
    }
}
impl EbsNvmeSupport {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            EbsNvmeSupport::Required => "required",
            EbsNvmeSupport::Supported => "supported",
            EbsNvmeSupport::Unsupported => "unsupported",
            EbsNvmeSupport::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["required", "supported", "unsupported"]
    }
}
impl AsRef<str> for EbsNvmeSupport {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes the optimized EBS performance for supported instance types.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct EbsOptimizedInfo {
    /// <p>The baseline bandwidth performance for an EBS-optimized instance type, in Mbps.</p>
    #[doc(hidden)]
    pub baseline_bandwidth_in_mbps: std::option::Option<i32>,
    /// <p>The baseline throughput performance for an EBS-optimized instance type, in MB/s.</p>
    #[doc(hidden)]
    pub baseline_throughput_in_m_bps: std::option::Option<f64>,
    /// <p>The baseline input/output storage operations per seconds for an EBS-optimized instance type.</p>
    #[doc(hidden)]
    pub baseline_iops: std::option::Option<i32>,
    /// <p>The maximum bandwidth performance for an EBS-optimized instance type, in Mbps.</p>
    #[doc(hidden)]
    pub maximum_bandwidth_in_mbps: std::option::Option<i32>,
    /// <p>The maximum throughput performance for an EBS-optimized instance type, in MB/s.</p>
    #[doc(hidden)]
    pub maximum_throughput_in_m_bps: std::option::Option<f64>,
    /// <p>The maximum input/output storage operations per second for an EBS-optimized instance type.</p>
    #[doc(hidden)]
    pub maximum_iops: std::option::Option<i32>,
}
impl EbsOptimizedInfo {
    /// <p>The baseline bandwidth performance for an EBS-optimized instance type, in Mbps.</p>
    pub fn baseline_bandwidth_in_mbps(&self) -> std::option::Option<i32> {
        self.baseline_bandwidth_in_mbps
    }
    /// <p>The baseline throughput performance for an EBS-optimized instance type, in MB/s.</p>
    pub fn baseline_throughput_in_m_bps(&self) -> std::option::Option<f64> {
        self.baseline_throughput_in_m_bps
    }
    /// <p>The baseline input/output storage operations per seconds for an EBS-optimized instance type.</p>
    pub fn baseline_iops(&self) -> std::option::Option<i32> {
        self.baseline_iops
    }
    /// <p>The maximum bandwidth performance for an EBS-optimized instance type, in Mbps.</p>
    pub fn maximum_bandwidth_in_mbps(&self) -> std::option::Option<i32> {
        self.maximum_bandwidth_in_mbps
    }
    /// <p>The maximum throughput performance for an EBS-optimized instance type, in MB/s.</p>
    pub fn maximum_throughput_in_m_bps(&self) -> std::option::Option<f64> {
        self.maximum_throughput_in_m_bps
    }
    /// <p>The maximum input/output storage operations per second for an EBS-optimized instance type.</p>
    pub fn maximum_iops(&self) -> std::option::Option<i32> {
        self.maximum_iops
    }
}
/// See [`EbsOptimizedInfo`](crate::model::EbsOptimizedInfo).
pub mod ebs_optimized_info {

    /// A builder for [`EbsOptimizedInfo`](crate::model::EbsOptimizedInfo).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) baseline_bandwidth_in_mbps: std::option::Option<i32>,
        pub(crate) baseline_throughput_in_m_bps: std::option::Option<f64>,
        pub(crate) baseline_iops: std::option::Option<i32>,
        pub(crate) maximum_bandwidth_in_mbps: std::option::Option<i32>,
        pub(crate) maximum_throughput_in_m_bps: std::option::Option<f64>,
        pub(crate) maximum_iops: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>The baseline bandwidth performance for an EBS-optimized instance type, in Mbps.</p>
        pub fn baseline_bandwidth_in_mbps(mut self, input: i32) -> Self {
            self.baseline_bandwidth_in_mbps = Some(input);
            self
        }
        /// <p>The baseline bandwidth performance for an EBS-optimized instance type, in Mbps.</p>
        pub fn set_baseline_bandwidth_in_mbps(mut self, input: std::option::Option<i32>) -> Self {
            self.baseline_bandwidth_in_mbps = input;
            self
        }
        /// <p>The baseline throughput performance for an EBS-optimized instance type, in MB/s.</p>
        pub fn baseline_throughput_in_m_bps(mut self, input: f64) -> Self {
            self.baseline_throughput_in_m_bps = Some(input);
            self
        }
        /// <p>The baseline throughput performance for an EBS-optimized instance type, in MB/s.</p>
        pub fn set_baseline_throughput_in_m_bps(mut self, input: std::option::Option<f64>) -> Self {
            self.baseline_throughput_in_m_bps = input;
            self
        }
        /// <p>The baseline input/output storage operations per seconds for an EBS-optimized instance type.</p>
        pub fn baseline_iops(mut self, input: i32) -> Self {
            self.baseline_iops = Some(input);
            self
        }
        /// <p>The baseline input/output storage operations per seconds for an EBS-optimized instance type.</p>
        pub fn set_baseline_iops(mut self, input: std::option::Option<i32>) -> Self {
            self.baseline_iops = input;
            self
        }
        /// <p>The maximum bandwidth performance for an EBS-optimized instance type, in Mbps.</p>
        pub fn maximum_bandwidth_in_mbps(mut self, input: i32) -> Self {
            self.maximum_bandwidth_in_mbps = Some(input);
            self
        }
        /// <p>The maximum bandwidth performance for an EBS-optimized instance type, in Mbps.</p>
        pub fn set_maximum_bandwidth_in_mbps(mut self, input: std::option::Option<i32>) -> Self {
            self.maximum_bandwidth_in_mbps = input;
            self
        }
        /// <p>The maximum throughput performance for an EBS-optimized instance type, in MB/s.</p>
        pub fn maximum_throughput_in_m_bps(mut self, input: f64) -> Self {
            self.maximum_throughput_in_m_bps = Some(input);
            self
        }
        /// <p>The maximum throughput performance for an EBS-optimized instance type, in MB/s.</p>
        pub fn set_maximum_throughput_in_m_bps(mut self, input: std::option::Option<f64>) -> Self {
            self.maximum_throughput_in_m_bps = input;
            self
        }
        /// <p>The maximum input/output storage operations per second for an EBS-optimized instance type.</p>
        pub fn maximum_iops(mut self, input: i32) -> Self {
            self.maximum_iops = Some(input);
            self
        }
        /// <p>The maximum input/output storage operations per second for an EBS-optimized instance type.</p>
        pub fn set_maximum_iops(mut self, input: std::option::Option<i32>) -> Self {
            self.maximum_iops = input;
            self
        }
        /// Consumes the builder and constructs a [`EbsOptimizedInfo`](crate::model::EbsOptimizedInfo).
        pub fn build(self) -> crate::model::EbsOptimizedInfo {
            crate::model::EbsOptimizedInfo {
                baseline_bandwidth_in_mbps: self.baseline_bandwidth_in_mbps,
                baseline_throughput_in_m_bps: self.baseline_throughput_in_m_bps,
                baseline_iops: self.baseline_iops,
                maximum_bandwidth_in_mbps: self.maximum_bandwidth_in_mbps,
                maximum_throughput_in_m_bps: self.maximum_throughput_in_m_bps,
                maximum_iops: self.maximum_iops,
            }
        }
    }
}
impl EbsOptimizedInfo {
    /// Creates a new builder-style object to manufacture [`EbsOptimizedInfo`](crate::model::EbsOptimizedInfo).
    pub fn builder() -> crate::model::ebs_optimized_info::Builder {
        crate::model::ebs_optimized_info::Builder::default()
    }
}

/// When writing a match expression against `EbsEncryptionSupport`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let ebsencryptionsupport = unimplemented!();
/// match ebsencryptionsupport {
///     EbsEncryptionSupport::Supported => { /* ... */ },
///     EbsEncryptionSupport::Unsupported => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `ebsencryptionsupport` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `EbsEncryptionSupport::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `EbsEncryptionSupport::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `EbsEncryptionSupport::NewFeature` is defined.
/// Specifically, when `ebsencryptionsupport` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `EbsEncryptionSupport::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 EbsEncryptionSupport {
    #[allow(missing_docs)] // documentation missing in model
    Supported,
    #[allow(missing_docs)] // documentation missing in model
    Unsupported,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for EbsEncryptionSupport {
    fn from(s: &str) -> Self {
        match s {
            "supported" => EbsEncryptionSupport::Supported,
            "unsupported" => EbsEncryptionSupport::Unsupported,
            other => {
                EbsEncryptionSupport::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for EbsEncryptionSupport {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(EbsEncryptionSupport::from(s))
    }
}
impl EbsEncryptionSupport {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            EbsEncryptionSupport::Supported => "supported",
            EbsEncryptionSupport::Unsupported => "unsupported",
            EbsEncryptionSupport::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["supported", "unsupported"]
    }
}
impl AsRef<str> for EbsEncryptionSupport {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `EbsOptimizedSupport`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let ebsoptimizedsupport = unimplemented!();
/// match ebsoptimizedsupport {
///     EbsOptimizedSupport::Default => { /* ... */ },
///     EbsOptimizedSupport::Supported => { /* ... */ },
///     EbsOptimizedSupport::Unsupported => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `ebsoptimizedsupport` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `EbsOptimizedSupport::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `EbsOptimizedSupport::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `EbsOptimizedSupport::NewFeature` is defined.
/// Specifically, when `ebsoptimizedsupport` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `EbsOptimizedSupport::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 EbsOptimizedSupport {
    #[allow(missing_docs)] // documentation missing in model
    Default,
    #[allow(missing_docs)] // documentation missing in model
    Supported,
    #[allow(missing_docs)] // documentation missing in model
    Unsupported,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for EbsOptimizedSupport {
    fn from(s: &str) -> Self {
        match s {
            "default" => EbsOptimizedSupport::Default,
            "supported" => EbsOptimizedSupport::Supported,
            "unsupported" => EbsOptimizedSupport::Unsupported,
            other => {
                EbsOptimizedSupport::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for EbsOptimizedSupport {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(EbsOptimizedSupport::from(s))
    }
}
impl EbsOptimizedSupport {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            EbsOptimizedSupport::Default => "default",
            EbsOptimizedSupport::Supported => "supported",
            EbsOptimizedSupport::Unsupported => "unsupported",
            EbsOptimizedSupport::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["default", "supported", "unsupported"]
    }
}
impl AsRef<str> for EbsOptimizedSupport {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes the instance store features that are supported by the instance type.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InstanceStorageInfo {
    /// <p>The total size of the disks, in GB.</p>
    #[doc(hidden)]
    pub total_size_in_gb: std::option::Option<i64>,
    /// <p>Describes the disks that are available for the instance type.</p>
    #[doc(hidden)]
    pub disks: std::option::Option<std::vec::Vec<crate::model::DiskInfo>>,
    /// <p>Indicates whether non-volatile memory express (NVMe) is supported.</p>
    #[doc(hidden)]
    pub nvme_support: std::option::Option<crate::model::EphemeralNvmeSupport>,
    /// <p>Indicates whether data is encrypted at rest.</p>
    #[doc(hidden)]
    pub encryption_support: std::option::Option<crate::model::InstanceStorageEncryptionSupport>,
}
impl InstanceStorageInfo {
    /// <p>The total size of the disks, in GB.</p>
    pub fn total_size_in_gb(&self) -> std::option::Option<i64> {
        self.total_size_in_gb
    }
    /// <p>Describes the disks that are available for the instance type.</p>
    pub fn disks(&self) -> std::option::Option<&[crate::model::DiskInfo]> {
        self.disks.as_deref()
    }
    /// <p>Indicates whether non-volatile memory express (NVMe) is supported.</p>
    pub fn nvme_support(&self) -> std::option::Option<&crate::model::EphemeralNvmeSupport> {
        self.nvme_support.as_ref()
    }
    /// <p>Indicates whether data is encrypted at rest.</p>
    pub fn encryption_support(
        &self,
    ) -> std::option::Option<&crate::model::InstanceStorageEncryptionSupport> {
        self.encryption_support.as_ref()
    }
}
/// See [`InstanceStorageInfo`](crate::model::InstanceStorageInfo).
pub mod instance_storage_info {

    /// A builder for [`InstanceStorageInfo`](crate::model::InstanceStorageInfo).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) total_size_in_gb: std::option::Option<i64>,
        pub(crate) disks: std::option::Option<std::vec::Vec<crate::model::DiskInfo>>,
        pub(crate) nvme_support: std::option::Option<crate::model::EphemeralNvmeSupport>,
        pub(crate) encryption_support:
            std::option::Option<crate::model::InstanceStorageEncryptionSupport>,
    }
    impl Builder {
        /// <p>The total size of the disks, in GB.</p>
        pub fn total_size_in_gb(mut self, input: i64) -> Self {
            self.total_size_in_gb = Some(input);
            self
        }
        /// <p>The total size of the disks, in GB.</p>
        pub fn set_total_size_in_gb(mut self, input: std::option::Option<i64>) -> Self {
            self.total_size_in_gb = input;
            self
        }
        /// Appends an item to `disks`.
        ///
        /// To override the contents of this collection use [`set_disks`](Self::set_disks).
        ///
        /// <p>Describes the disks that are available for the instance type.</p>
        pub fn disks(mut self, input: crate::model::DiskInfo) -> Self {
            let mut v = self.disks.unwrap_or_default();
            v.push(input);
            self.disks = Some(v);
            self
        }
        /// <p>Describes the disks that are available for the instance type.</p>
        pub fn set_disks(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::DiskInfo>>,
        ) -> Self {
            self.disks = input;
            self
        }
        /// <p>Indicates whether non-volatile memory express (NVMe) is supported.</p>
        pub fn nvme_support(mut self, input: crate::model::EphemeralNvmeSupport) -> Self {
            self.nvme_support = Some(input);
            self
        }
        /// <p>Indicates whether non-volatile memory express (NVMe) is supported.</p>
        pub fn set_nvme_support(
            mut self,
            input: std::option::Option<crate::model::EphemeralNvmeSupport>,
        ) -> Self {
            self.nvme_support = input;
            self
        }
        /// <p>Indicates whether data is encrypted at rest.</p>
        pub fn encryption_support(
            mut self,
            input: crate::model::InstanceStorageEncryptionSupport,
        ) -> Self {
            self.encryption_support = Some(input);
            self
        }
        /// <p>Indicates whether data is encrypted at rest.</p>
        pub fn set_encryption_support(
            mut self,
            input: std::option::Option<crate::model::InstanceStorageEncryptionSupport>,
        ) -> Self {
            self.encryption_support = input;
            self
        }
        /// Consumes the builder and constructs a [`InstanceStorageInfo`](crate::model::InstanceStorageInfo).
        pub fn build(self) -> crate::model::InstanceStorageInfo {
            crate::model::InstanceStorageInfo {
                total_size_in_gb: self.total_size_in_gb,
                disks: self.disks,
                nvme_support: self.nvme_support,
                encryption_support: self.encryption_support,
            }
        }
    }
}
impl InstanceStorageInfo {
    /// Creates a new builder-style object to manufacture [`InstanceStorageInfo`](crate::model::InstanceStorageInfo).
    pub fn builder() -> crate::model::instance_storage_info::Builder {
        crate::model::instance_storage_info::Builder::default()
    }
}

/// When writing a match expression against `InstanceStorageEncryptionSupport`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let instancestorageencryptionsupport = unimplemented!();
/// match instancestorageencryptionsupport {
///     InstanceStorageEncryptionSupport::Required => { /* ... */ },
///     InstanceStorageEncryptionSupport::Unsupported => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `instancestorageencryptionsupport` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `InstanceStorageEncryptionSupport::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `InstanceStorageEncryptionSupport::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `InstanceStorageEncryptionSupport::NewFeature` is defined.
/// Specifically, when `instancestorageencryptionsupport` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `InstanceStorageEncryptionSupport::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 InstanceStorageEncryptionSupport {
    #[allow(missing_docs)] // documentation missing in model
    Required,
    #[allow(missing_docs)] // documentation missing in model
    Unsupported,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for InstanceStorageEncryptionSupport {
    fn from(s: &str) -> Self {
        match s {
            "required" => InstanceStorageEncryptionSupport::Required,
            "unsupported" => InstanceStorageEncryptionSupport::Unsupported,
            other => InstanceStorageEncryptionSupport::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for InstanceStorageEncryptionSupport {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(InstanceStorageEncryptionSupport::from(s))
    }
}
impl InstanceStorageEncryptionSupport {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            InstanceStorageEncryptionSupport::Required => "required",
            InstanceStorageEncryptionSupport::Unsupported => "unsupported",
            InstanceStorageEncryptionSupport::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["required", "unsupported"]
    }
}
impl AsRef<str> for InstanceStorageEncryptionSupport {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `EphemeralNvmeSupport`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let ephemeralnvmesupport = unimplemented!();
/// match ephemeralnvmesupport {
///     EphemeralNvmeSupport::Required => { /* ... */ },
///     EphemeralNvmeSupport::Supported => { /* ... */ },
///     EphemeralNvmeSupport::Unsupported => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `ephemeralnvmesupport` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `EphemeralNvmeSupport::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `EphemeralNvmeSupport::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `EphemeralNvmeSupport::NewFeature` is defined.
/// Specifically, when `ephemeralnvmesupport` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `EphemeralNvmeSupport::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 EphemeralNvmeSupport {
    #[allow(missing_docs)] // documentation missing in model
    Required,
    #[allow(missing_docs)] // documentation missing in model
    Supported,
    #[allow(missing_docs)] // documentation missing in model
    Unsupported,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for EphemeralNvmeSupport {
    fn from(s: &str) -> Self {
        match s {
            "required" => EphemeralNvmeSupport::Required,
            "supported" => EphemeralNvmeSupport::Supported,
            "unsupported" => EphemeralNvmeSupport::Unsupported,
            other => {
                EphemeralNvmeSupport::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for EphemeralNvmeSupport {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(EphemeralNvmeSupport::from(s))
    }
}
impl EphemeralNvmeSupport {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            EphemeralNvmeSupport::Required => "required",
            EphemeralNvmeSupport::Supported => "supported",
            EphemeralNvmeSupport::Unsupported => "unsupported",
            EphemeralNvmeSupport::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["required", "supported", "unsupported"]
    }
}
impl AsRef<str> for EphemeralNvmeSupport {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes a disk.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DiskInfo {
    /// <p>The size of the disk in GB.</p>
    #[doc(hidden)]
    pub size_in_gb: std::option::Option<i64>,
    /// <p>The number of disks with this configuration.</p>
    #[doc(hidden)]
    pub count: std::option::Option<i32>,
    /// <p>The type of disk.</p>
    #[doc(hidden)]
    pub r#type: std::option::Option<crate::model::DiskType>,
}
impl DiskInfo {
    /// <p>The size of the disk in GB.</p>
    pub fn size_in_gb(&self) -> std::option::Option<i64> {
        self.size_in_gb
    }
    /// <p>The number of disks with this configuration.</p>
    pub fn count(&self) -> std::option::Option<i32> {
        self.count
    }
    /// <p>The type of disk.</p>
    pub fn r#type(&self) -> std::option::Option<&crate::model::DiskType> {
        self.r#type.as_ref()
    }
}
/// See [`DiskInfo`](crate::model::DiskInfo).
pub mod disk_info {

    /// A builder for [`DiskInfo`](crate::model::DiskInfo).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) size_in_gb: std::option::Option<i64>,
        pub(crate) count: std::option::Option<i32>,
        pub(crate) r#type: std::option::Option<crate::model::DiskType>,
    }
    impl Builder {
        /// <p>The size of the disk in GB.</p>
        pub fn size_in_gb(mut self, input: i64) -> Self {
            self.size_in_gb = Some(input);
            self
        }
        /// <p>The size of the disk in GB.</p>
        pub fn set_size_in_gb(mut self, input: std::option::Option<i64>) -> Self {
            self.size_in_gb = input;
            self
        }
        /// <p>The number of disks with this configuration.</p>
        pub fn count(mut self, input: i32) -> Self {
            self.count = Some(input);
            self
        }
        /// <p>The number of disks with this configuration.</p>
        pub fn set_count(mut self, input: std::option::Option<i32>) -> Self {
            self.count = input;
            self
        }
        /// <p>The type of disk.</p>
        pub fn r#type(mut self, input: crate::model::DiskType) -> Self {
            self.r#type = Some(input);
            self
        }
        /// <p>The type of disk.</p>
        pub fn set_type(mut self, input: std::option::Option<crate::model::DiskType>) -> Self {
            self.r#type = input;
            self
        }
        /// Consumes the builder and constructs a [`DiskInfo`](crate::model::DiskInfo).
        pub fn build(self) -> crate::model::DiskInfo {
            crate::model::DiskInfo {
                size_in_gb: self.size_in_gb,
                count: self.count,
                r#type: self.r#type,
            }
        }
    }
}
impl DiskInfo {
    /// Creates a new builder-style object to manufacture [`DiskInfo`](crate::model::DiskInfo).
    pub fn builder() -> crate::model::disk_info::Builder {
        crate::model::disk_info::Builder::default()
    }
}

/// When writing a match expression against `DiskType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let disktype = unimplemented!();
/// match disktype {
///     DiskType::Hdd => { /* ... */ },
///     DiskType::Ssd => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `disktype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `DiskType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `DiskType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `DiskType::NewFeature` is defined.
/// Specifically, when `disktype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `DiskType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 DiskType {
    #[allow(missing_docs)] // documentation missing in model
    Hdd,
    #[allow(missing_docs)] // documentation missing in model
    Ssd,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for DiskType {
    fn from(s: &str) -> Self {
        match s {
            "hdd" => DiskType::Hdd,
            "ssd" => DiskType::Ssd,
            other => DiskType::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for DiskType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(DiskType::from(s))
    }
}
impl DiskType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            DiskType::Hdd => "hdd",
            DiskType::Ssd => "ssd",
            DiskType::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["hdd", "ssd"]
    }
}
impl AsRef<str> for DiskType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes the memory for the instance type.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct MemoryInfo {
    /// <p>The size of the memory, in MiB.</p>
    #[doc(hidden)]
    pub size_in_mi_b: std::option::Option<i64>,
}
impl MemoryInfo {
    /// <p>The size of the memory, in MiB.</p>
    pub fn size_in_mi_b(&self) -> std::option::Option<i64> {
        self.size_in_mi_b
    }
}
/// See [`MemoryInfo`](crate::model::MemoryInfo).
pub mod memory_info {

    /// A builder for [`MemoryInfo`](crate::model::MemoryInfo).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) size_in_mi_b: std::option::Option<i64>,
    }
    impl Builder {
        /// <p>The size of the memory, in MiB.</p>
        pub fn size_in_mi_b(mut self, input: i64) -> Self {
            self.size_in_mi_b = Some(input);
            self
        }
        /// <p>The size of the memory, in MiB.</p>
        pub fn set_size_in_mi_b(mut self, input: std::option::Option<i64>) -> Self {
            self.size_in_mi_b = input;
            self
        }
        /// Consumes the builder and constructs a [`MemoryInfo`](crate::model::MemoryInfo).
        pub fn build(self) -> crate::model::MemoryInfo {
            crate::model::MemoryInfo {
                size_in_mi_b: self.size_in_mi_b,
            }
        }
    }
}
impl MemoryInfo {
    /// Creates a new builder-style object to manufacture [`MemoryInfo`](crate::model::MemoryInfo).
    pub fn builder() -> crate::model::memory_info::Builder {
        crate::model::memory_info::Builder::default()
    }
}

/// <p>Describes the vCPU configurations for the instance type.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct VCpuInfo {
    /// <p>The default number of vCPUs for the instance type.</p>
    #[doc(hidden)]
    pub default_v_cpus: std::option::Option<i32>,
    /// <p>The default number of cores for the instance type.</p>
    #[doc(hidden)]
    pub default_cores: std::option::Option<i32>,
    /// <p>The default number of threads per core for the instance type.</p>
    #[doc(hidden)]
    pub default_threads_per_core: std::option::Option<i32>,
    /// <p>The valid number of cores that can be configured for the instance type.</p>
    #[doc(hidden)]
    pub valid_cores: std::option::Option<std::vec::Vec<i32>>,
    /// <p>The valid number of threads per core that can be configured for the instance type.</p>
    #[doc(hidden)]
    pub valid_threads_per_core: std::option::Option<std::vec::Vec<i32>>,
}
impl VCpuInfo {
    /// <p>The default number of vCPUs for the instance type.</p>
    pub fn default_v_cpus(&self) -> std::option::Option<i32> {
        self.default_v_cpus
    }
    /// <p>The default number of cores for the instance type.</p>
    pub fn default_cores(&self) -> std::option::Option<i32> {
        self.default_cores
    }
    /// <p>The default number of threads per core for the instance type.</p>
    pub fn default_threads_per_core(&self) -> std::option::Option<i32> {
        self.default_threads_per_core
    }
    /// <p>The valid number of cores that can be configured for the instance type.</p>
    pub fn valid_cores(&self) -> std::option::Option<&[i32]> {
        self.valid_cores.as_deref()
    }
    /// <p>The valid number of threads per core that can be configured for the instance type.</p>
    pub fn valid_threads_per_core(&self) -> std::option::Option<&[i32]> {
        self.valid_threads_per_core.as_deref()
    }
}
/// See [`VCpuInfo`](crate::model::VCpuInfo).
pub mod v_cpu_info {

    /// A builder for [`VCpuInfo`](crate::model::VCpuInfo).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) default_v_cpus: std::option::Option<i32>,
        pub(crate) default_cores: std::option::Option<i32>,
        pub(crate) default_threads_per_core: std::option::Option<i32>,
        pub(crate) valid_cores: std::option::Option<std::vec::Vec<i32>>,
        pub(crate) valid_threads_per_core: std::option::Option<std::vec::Vec<i32>>,
    }
    impl Builder {
        /// <p>The default number of vCPUs for the instance type.</p>
        pub fn default_v_cpus(mut self, input: i32) -> Self {
            self.default_v_cpus = Some(input);
            self
        }
        /// <p>The default number of vCPUs for the instance type.</p>
        pub fn set_default_v_cpus(mut self, input: std::option::Option<i32>) -> Self {
            self.default_v_cpus = input;
            self
        }
        /// <p>The default number of cores for the instance type.</p>
        pub fn default_cores(mut self, input: i32) -> Self {
            self.default_cores = Some(input);
            self
        }
        /// <p>The default number of cores for the instance type.</p>
        pub fn set_default_cores(mut self, input: std::option::Option<i32>) -> Self {
            self.default_cores = input;
            self
        }
        /// <p>The default number of threads per core for the instance type.</p>
        pub fn default_threads_per_core(mut self, input: i32) -> Self {
            self.default_threads_per_core = Some(input);
            self
        }
        /// <p>The default number of threads per core for the instance type.</p>
        pub fn set_default_threads_per_core(mut self, input: std::option::Option<i32>) -> Self {
            self.default_threads_per_core = input;
            self
        }
        /// Appends an item to `valid_cores`.
        ///
        /// To override the contents of this collection use [`set_valid_cores`](Self::set_valid_cores).
        ///
        /// <p>The valid number of cores that can be configured for the instance type.</p>
        pub fn valid_cores(mut self, input: i32) -> Self {
            let mut v = self.valid_cores.unwrap_or_default();
            v.push(input);
            self.valid_cores = Some(v);
            self
        }
        /// <p>The valid number of cores that can be configured for the instance type.</p>
        pub fn set_valid_cores(mut self, input: std::option::Option<std::vec::Vec<i32>>) -> Self {
            self.valid_cores = input;
            self
        }
        /// Appends an item to `valid_threads_per_core`.
        ///
        /// To override the contents of this collection use [`set_valid_threads_per_core`](Self::set_valid_threads_per_core).
        ///
        /// <p>The valid number of threads per core that can be configured for the instance type.</p>
        pub fn valid_threads_per_core(mut self, input: i32) -> Self {
            let mut v = self.valid_threads_per_core.unwrap_or_default();
            v.push(input);
            self.valid_threads_per_core = Some(v);
            self
        }
        /// <p>The valid number of threads per core that can be configured for the instance type.</p>
        pub fn set_valid_threads_per_core(
            mut self,
            input: std::option::Option<std::vec::Vec<i32>>,
        ) -> Self {
            self.valid_threads_per_core = input;
            self
        }
        /// Consumes the builder and constructs a [`VCpuInfo`](crate::model::VCpuInfo).
        pub fn build(self) -> crate::model::VCpuInfo {
            crate::model::VCpuInfo {
                default_v_cpus: self.default_v_cpus,
                default_cores: self.default_cores,
                default_threads_per_core: self.default_threads_per_core,
                valid_cores: self.valid_cores,
                valid_threads_per_core: self.valid_threads_per_core,
            }
        }
    }
}
impl VCpuInfo {
    /// Creates a new builder-style object to manufacture [`VCpuInfo`](crate::model::VCpuInfo).
    pub fn builder() -> crate::model::v_cpu_info::Builder {
        crate::model::v_cpu_info::Builder::default()
    }
}

/// <p>Describes the processor used by the instance type.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ProcessorInfo {
    /// <p>The architectures supported by the instance type.</p>
    #[doc(hidden)]
    pub supported_architectures: std::option::Option<std::vec::Vec<crate::model::ArchitectureType>>,
    /// <p>The speed of the processor, in GHz.</p>
    #[doc(hidden)]
    pub sustained_clock_speed_in_ghz: std::option::Option<f64>,
}
impl ProcessorInfo {
    /// <p>The architectures supported by the instance type.</p>
    pub fn supported_architectures(
        &self,
    ) -> std::option::Option<&[crate::model::ArchitectureType]> {
        self.supported_architectures.as_deref()
    }
    /// <p>The speed of the processor, in GHz.</p>
    pub fn sustained_clock_speed_in_ghz(&self) -> std::option::Option<f64> {
        self.sustained_clock_speed_in_ghz
    }
}
/// See [`ProcessorInfo`](crate::model::ProcessorInfo).
pub mod processor_info {

    /// A builder for [`ProcessorInfo`](crate::model::ProcessorInfo).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) supported_architectures:
            std::option::Option<std::vec::Vec<crate::model::ArchitectureType>>,
        pub(crate) sustained_clock_speed_in_ghz: std::option::Option<f64>,
    }
    impl Builder {
        /// Appends an item to `supported_architectures`.
        ///
        /// To override the contents of this collection use [`set_supported_architectures`](Self::set_supported_architectures).
        ///
        /// <p>The architectures supported by the instance type.</p>
        pub fn supported_architectures(mut self, input: crate::model::ArchitectureType) -> Self {
            let mut v = self.supported_architectures.unwrap_or_default();
            v.push(input);
            self.supported_architectures = Some(v);
            self
        }
        /// <p>The architectures supported by the instance type.</p>
        pub fn set_supported_architectures(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::ArchitectureType>>,
        ) -> Self {
            self.supported_architectures = input;
            self
        }
        /// <p>The speed of the processor, in GHz.</p>
        pub fn sustained_clock_speed_in_ghz(mut self, input: f64) -> Self {
            self.sustained_clock_speed_in_ghz = Some(input);
            self
        }
        /// <p>The speed of the processor, in GHz.</p>
        pub fn set_sustained_clock_speed_in_ghz(mut self, input: std::option::Option<f64>) -> Self {
            self.sustained_clock_speed_in_ghz = input;
            self
        }
        /// Consumes the builder and constructs a [`ProcessorInfo`](crate::model::ProcessorInfo).
        pub fn build(self) -> crate::model::ProcessorInfo {
            crate::model::ProcessorInfo {
                supported_architectures: self.supported_architectures,
                sustained_clock_speed_in_ghz: self.sustained_clock_speed_in_ghz,
            }
        }
    }
}
impl ProcessorInfo {
    /// Creates a new builder-style object to manufacture [`ProcessorInfo`](crate::model::ProcessorInfo).
    pub fn builder() -> crate::model::processor_info::Builder {
        crate::model::processor_info::Builder::default()
    }
}

/// When writing a match expression against `InstanceTypeHypervisor`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let instancetypehypervisor = unimplemented!();
/// match instancetypehypervisor {
///     InstanceTypeHypervisor::Nitro => { /* ... */ },
///     InstanceTypeHypervisor::Xen => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `instancetypehypervisor` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `InstanceTypeHypervisor::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `InstanceTypeHypervisor::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `InstanceTypeHypervisor::NewFeature` is defined.
/// Specifically, when `instancetypehypervisor` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `InstanceTypeHypervisor::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 InstanceTypeHypervisor {
    #[allow(missing_docs)] // documentation missing in model
    Nitro,
    #[allow(missing_docs)] // documentation missing in model
    Xen,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for InstanceTypeHypervisor {
    fn from(s: &str) -> Self {
        match s {
            "nitro" => InstanceTypeHypervisor::Nitro,
            "xen" => InstanceTypeHypervisor::Xen,
            other => {
                InstanceTypeHypervisor::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for InstanceTypeHypervisor {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(InstanceTypeHypervisor::from(s))
    }
}
impl InstanceTypeHypervisor {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            InstanceTypeHypervisor::Nitro => "nitro",
            InstanceTypeHypervisor::Xen => "xen",
            InstanceTypeHypervisor::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["nitro", "xen"]
    }
}
impl AsRef<str> for InstanceTypeHypervisor {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `RootDeviceType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let rootdevicetype = unimplemented!();
/// match rootdevicetype {
///     RootDeviceType::Ebs => { /* ... */ },
///     RootDeviceType::InstanceStore => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `rootdevicetype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `RootDeviceType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `RootDeviceType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `RootDeviceType::NewFeature` is defined.
/// Specifically, when `rootdevicetype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `RootDeviceType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 RootDeviceType {
    #[allow(missing_docs)] // documentation missing in model
    Ebs,
    #[allow(missing_docs)] // documentation missing in model
    InstanceStore,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for RootDeviceType {
    fn from(s: &str) -> Self {
        match s {
            "ebs" => RootDeviceType::Ebs,
            "instance-store" => RootDeviceType::InstanceStore,
            other => RootDeviceType::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for RootDeviceType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(RootDeviceType::from(s))
    }
}
impl RootDeviceType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            RootDeviceType::Ebs => "ebs",
            RootDeviceType::InstanceStore => "instance-store",
            RootDeviceType::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["ebs", "instance-store"]
    }
}
impl AsRef<str> for RootDeviceType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `UsageClassType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let usageclasstype = unimplemented!();
/// match usageclasstype {
///     UsageClassType::OnDemand => { /* ... */ },
///     UsageClassType::Spot => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `usageclasstype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `UsageClassType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `UsageClassType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `UsageClassType::NewFeature` is defined.
/// Specifically, when `usageclasstype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `UsageClassType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 UsageClassType {
    #[allow(missing_docs)] // documentation missing in model
    OnDemand,
    #[allow(missing_docs)] // documentation missing in model
    Spot,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for UsageClassType {
    fn from(s: &str) -> Self {
        match s {
            "on-demand" => UsageClassType::OnDemand,
            "spot" => UsageClassType::Spot,
            other => UsageClassType::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for UsageClassType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(UsageClassType::from(s))
    }
}
impl UsageClassType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            UsageClassType::OnDemand => "on-demand",
            UsageClassType::Spot => "spot",
            UsageClassType::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["on-demand", "spot"]
    }
}
impl AsRef<str> for UsageClassType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>The instance types offered.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InstanceTypeOffering {
    /// <p>The instance type. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html">Instance types</a> in the <i>Amazon EC2 User Guide</i>.</p>
    #[doc(hidden)]
    pub instance_type: std::option::Option<crate::model::InstanceType>,
    /// <p>The location type.</p>
    #[doc(hidden)]
    pub location_type: std::option::Option<crate::model::LocationType>,
    /// <p>The identifier for the location. This depends on the location type. For example, if the location type is <code>region</code>, the location is the Region code (for example, <code>us-east-2</code>.)</p>
    #[doc(hidden)]
    pub location: std::option::Option<std::string::String>,
}
impl InstanceTypeOffering {
    /// <p>The instance type. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html">Instance types</a> in the <i>Amazon EC2 User Guide</i>.</p>
    pub fn instance_type(&self) -> std::option::Option<&crate::model::InstanceType> {
        self.instance_type.as_ref()
    }
    /// <p>The location type.</p>
    pub fn location_type(&self) -> std::option::Option<&crate::model::LocationType> {
        self.location_type.as_ref()
    }
    /// <p>The identifier for the location. This depends on the location type. For example, if the location type is <code>region</code>, the location is the Region code (for example, <code>us-east-2</code>.)</p>
    pub fn location(&self) -> std::option::Option<&str> {
        self.location.as_deref()
    }
}
/// See [`InstanceTypeOffering`](crate::model::InstanceTypeOffering).
pub mod instance_type_offering {

    /// A builder for [`InstanceTypeOffering`](crate::model::InstanceTypeOffering).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) instance_type: std::option::Option<crate::model::InstanceType>,
        pub(crate) location_type: std::option::Option<crate::model::LocationType>,
        pub(crate) location: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The instance type. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html">Instance types</a> in the <i>Amazon EC2 User Guide</i>.</p>
        pub fn instance_type(mut self, input: crate::model::InstanceType) -> Self {
            self.instance_type = Some(input);
            self
        }
        /// <p>The instance type. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html">Instance types</a> in the <i>Amazon EC2 User Guide</i>.</p>
        pub fn set_instance_type(
            mut self,
            input: std::option::Option<crate::model::InstanceType>,
        ) -> Self {
            self.instance_type = input;
            self
        }
        /// <p>The location type.</p>
        pub fn location_type(mut self, input: crate::model::LocationType) -> Self {
            self.location_type = Some(input);
            self
        }
        /// <p>The location type.</p>
        pub fn set_location_type(
            mut self,
            input: std::option::Option<crate::model::LocationType>,
        ) -> Self {
            self.location_type = input;
            self
        }
        /// <p>The identifier for the location. This depends on the location type. For example, if the location type is <code>region</code>, the location is the Region code (for example, <code>us-east-2</code>.)</p>
        pub fn location(mut self, input: impl Into<std::string::String>) -> Self {
            self.location = Some(input.into());
            self
        }
        /// <p>The identifier for the location. This depends on the location type. For example, if the location type is <code>region</code>, the location is the Region code (for example, <code>us-east-2</code>.)</p>
        pub fn set_location(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.location = input;
            self
        }
        /// Consumes the builder and constructs a [`InstanceTypeOffering`](crate::model::InstanceTypeOffering).
        pub fn build(self) -> crate::model::InstanceTypeOffering {
            crate::model::InstanceTypeOffering {
                instance_type: self.instance_type,
                location_type: self.location_type,
                location: self.location,
            }
        }
    }
}
impl InstanceTypeOffering {
    /// Creates a new builder-style object to manufacture [`InstanceTypeOffering`](crate::model::InstanceTypeOffering).
    pub fn builder() -> crate::model::instance_type_offering::Builder {
        crate::model::instance_type_offering::Builder::default()
    }
}

/// When writing a match expression against `LocationType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let locationtype = unimplemented!();
/// match locationtype {
///     LocationType::AvailabilityZone => { /* ... */ },
///     LocationType::AvailabilityZoneId => { /* ... */ },
///     LocationType::Region => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `locationtype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `LocationType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `LocationType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `LocationType::NewFeature` is defined.
/// Specifically, when `locationtype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `LocationType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 LocationType {
    #[allow(missing_docs)] // documentation missing in model
    AvailabilityZone,
    #[allow(missing_docs)] // documentation missing in model
    AvailabilityZoneId,
    #[allow(missing_docs)] // documentation missing in model
    Region,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for LocationType {
    fn from(s: &str) -> Self {
        match s {
            "availability-zone" => LocationType::AvailabilityZone,
            "availability-zone-id" => LocationType::AvailabilityZoneId,
            "region" => LocationType::Region,
            other => LocationType::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for LocationType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(LocationType::from(s))
    }
}
impl LocationType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            LocationType::AvailabilityZone => "availability-zone",
            LocationType::AvailabilityZoneId => "availability-zone-id",
            LocationType::Region => "region",
            LocationType::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["availability-zone", "availability-zone-id", "region"]
    }
}
impl AsRef<str> for LocationType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes the status of an instance.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InstanceStatus {
    /// <p>The Availability Zone of the instance.</p>
    #[doc(hidden)]
    pub availability_zone: std::option::Option<std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the Outpost.</p>
    #[doc(hidden)]
    pub outpost_arn: std::option::Option<std::string::String>,
    /// <p>Any scheduled events associated with the instance.</p>
    #[doc(hidden)]
    pub events: std::option::Option<std::vec::Vec<crate::model::InstanceStatusEvent>>,
    /// <p>The ID of the instance.</p>
    #[doc(hidden)]
    pub instance_id: std::option::Option<std::string::String>,
    /// <p>The intended state of the instance. <code>DescribeInstanceStatus</code> requires that an instance be in the <code>running</code> state.</p>
    #[doc(hidden)]
    pub instance_state: std::option::Option<crate::model::InstanceState>,
    /// <p>Reports impaired functionality that stems from issues internal to the instance, such as impaired reachability.</p>
    #[doc(hidden)]
    pub instance_status: std::option::Option<crate::model::InstanceStatusSummary>,
    /// <p>Reports impaired functionality that stems from issues related to the systems that support an instance, such as hardware failures and network connectivity problems.</p>
    #[doc(hidden)]
    pub system_status: std::option::Option<crate::model::InstanceStatusSummary>,
}
impl InstanceStatus {
    /// <p>The Availability Zone of the instance.</p>
    pub fn availability_zone(&self) -> std::option::Option<&str> {
        self.availability_zone.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the Outpost.</p>
    pub fn outpost_arn(&self) -> std::option::Option<&str> {
        self.outpost_arn.as_deref()
    }
    /// <p>Any scheduled events associated with the instance.</p>
    pub fn events(&self) -> std::option::Option<&[crate::model::InstanceStatusEvent]> {
        self.events.as_deref()
    }
    /// <p>The ID of the instance.</p>
    pub fn instance_id(&self) -> std::option::Option<&str> {
        self.instance_id.as_deref()
    }
    /// <p>The intended state of the instance. <code>DescribeInstanceStatus</code> requires that an instance be in the <code>running</code> state.</p>
    pub fn instance_state(&self) -> std::option::Option<&crate::model::InstanceState> {
        self.instance_state.as_ref()
    }
    /// <p>Reports impaired functionality that stems from issues internal to the instance, such as impaired reachability.</p>
    pub fn instance_status(&self) -> std::option::Option<&crate::model::InstanceStatusSummary> {
        self.instance_status.as_ref()
    }
    /// <p>Reports impaired functionality that stems from issues related to the systems that support an instance, such as hardware failures and network connectivity problems.</p>
    pub fn system_status(&self) -> std::option::Option<&crate::model::InstanceStatusSummary> {
        self.system_status.as_ref()
    }
}
/// See [`InstanceStatus`](crate::model::InstanceStatus).
pub mod instance_status {

    /// A builder for [`InstanceStatus`](crate::model::InstanceStatus).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) availability_zone: std::option::Option<std::string::String>,
        pub(crate) outpost_arn: std::option::Option<std::string::String>,
        pub(crate) events: std::option::Option<std::vec::Vec<crate::model::InstanceStatusEvent>>,
        pub(crate) instance_id: std::option::Option<std::string::String>,
        pub(crate) instance_state: std::option::Option<crate::model::InstanceState>,
        pub(crate) instance_status: std::option::Option<crate::model::InstanceStatusSummary>,
        pub(crate) system_status: std::option::Option<crate::model::InstanceStatusSummary>,
    }
    impl Builder {
        /// <p>The Availability Zone of the instance.</p>
        pub fn availability_zone(mut self, input: impl Into<std::string::String>) -> Self {
            self.availability_zone = Some(input.into());
            self
        }
        /// <p>The Availability Zone of the instance.</p>
        pub fn set_availability_zone(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.availability_zone = input;
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the Outpost.</p>
        pub fn outpost_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.outpost_arn = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the Outpost.</p>
        pub fn set_outpost_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.outpost_arn = input;
            self
        }
        /// Appends an item to `events`.
        ///
        /// To override the contents of this collection use [`set_events`](Self::set_events).
        ///
        /// <p>Any scheduled events associated with the instance.</p>
        pub fn events(mut self, input: crate::model::InstanceStatusEvent) -> Self {
            let mut v = self.events.unwrap_or_default();
            v.push(input);
            self.events = Some(v);
            self
        }
        /// <p>Any scheduled events associated with the instance.</p>
        pub fn set_events(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::InstanceStatusEvent>>,
        ) -> Self {
            self.events = input;
            self
        }
        /// <p>The ID of the instance.</p>
        pub fn instance_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.instance_id = Some(input.into());
            self
        }
        /// <p>The ID of the instance.</p>
        pub fn set_instance_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.instance_id = input;
            self
        }
        /// <p>The intended state of the instance. <code>DescribeInstanceStatus</code> requires that an instance be in the <code>running</code> state.</p>
        pub fn instance_state(mut self, input: crate::model::InstanceState) -> Self {
            self.instance_state = Some(input);
            self
        }
        /// <p>The intended state of the instance. <code>DescribeInstanceStatus</code> requires that an instance be in the <code>running</code> state.</p>
        pub fn set_instance_state(
            mut self,
            input: std::option::Option<crate::model::InstanceState>,
        ) -> Self {
            self.instance_state = input;
            self
        }
        /// <p>Reports impaired functionality that stems from issues internal to the instance, such as impaired reachability.</p>
        pub fn instance_status(mut self, input: crate::model::InstanceStatusSummary) -> Self {
            self.instance_status = Some(input);
            self
        }
        /// <p>Reports impaired functionality that stems from issues internal to the instance, such as impaired reachability.</p>
        pub fn set_instance_status(
            mut self,
            input: std::option::Option<crate::model::InstanceStatusSummary>,
        ) -> Self {
            self.instance_status = input;
            self
        }
        /// <p>Reports impaired functionality that stems from issues related to the systems that support an instance, such as hardware failures and network connectivity problems.</p>
        pub fn system_status(mut self, input: crate::model::InstanceStatusSummary) -> Self {
            self.system_status = Some(input);
            self
        }
        /// <p>Reports impaired functionality that stems from issues related to the systems that support an instance, such as hardware failures and network connectivity problems.</p>
        pub fn set_system_status(
            mut self,
            input: std::option::Option<crate::model::InstanceStatusSummary>,
        ) -> Self {
            self.system_status = input;
            self
        }
        /// Consumes the builder and constructs a [`InstanceStatus`](crate::model::InstanceStatus).
        pub fn build(self) -> crate::model::InstanceStatus {
            crate::model::InstanceStatus {
                availability_zone: self.availability_zone,
                outpost_arn: self.outpost_arn,
                events: self.events,
                instance_id: self.instance_id,
                instance_state: self.instance_state,
                instance_status: self.instance_status,
                system_status: self.system_status,
            }
        }
    }
}
impl InstanceStatus {
    /// Creates a new builder-style object to manufacture [`InstanceStatus`](crate::model::InstanceStatus).
    pub fn builder() -> crate::model::instance_status::Builder {
        crate::model::instance_status::Builder::default()
    }
}

/// <p>Describes the status of an instance.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InstanceStatusSummary {
    /// <p>The system instance health or application instance health.</p>
    #[doc(hidden)]
    pub details: std::option::Option<std::vec::Vec<crate::model::InstanceStatusDetails>>,
    /// <p>The status.</p>
    #[doc(hidden)]
    pub status: std::option::Option<crate::model::SummaryStatus>,
}
impl InstanceStatusSummary {
    /// <p>The system instance health or application instance health.</p>
    pub fn details(&self) -> std::option::Option<&[crate::model::InstanceStatusDetails]> {
        self.details.as_deref()
    }
    /// <p>The status.</p>
    pub fn status(&self) -> std::option::Option<&crate::model::SummaryStatus> {
        self.status.as_ref()
    }
}
/// See [`InstanceStatusSummary`](crate::model::InstanceStatusSummary).
pub mod instance_status_summary {

    /// A builder for [`InstanceStatusSummary`](crate::model::InstanceStatusSummary).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) details: std::option::Option<std::vec::Vec<crate::model::InstanceStatusDetails>>,
        pub(crate) status: std::option::Option<crate::model::SummaryStatus>,
    }
    impl Builder {
        /// Appends an item to `details`.
        ///
        /// To override the contents of this collection use [`set_details`](Self::set_details).
        ///
        /// <p>The system instance health or application instance health.</p>
        pub fn details(mut self, input: crate::model::InstanceStatusDetails) -> Self {
            let mut v = self.details.unwrap_or_default();
            v.push(input);
            self.details = Some(v);
            self
        }
        /// <p>The system instance health or application instance health.</p>
        pub fn set_details(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::InstanceStatusDetails>>,
        ) -> Self {
            self.details = input;
            self
        }
        /// <p>The status.</p>
        pub fn status(mut self, input: crate::model::SummaryStatus) -> Self {
            self.status = Some(input);
            self
        }
        /// <p>The status.</p>
        pub fn set_status(
            mut self,
            input: std::option::Option<crate::model::SummaryStatus>,
        ) -> Self {
            self.status = input;
            self
        }
        /// Consumes the builder and constructs a [`InstanceStatusSummary`](crate::model::InstanceStatusSummary).
        pub fn build(self) -> crate::model::InstanceStatusSummary {
            crate::model::InstanceStatusSummary {
                details: self.details,
                status: self.status,
            }
        }
    }
}
impl InstanceStatusSummary {
    /// Creates a new builder-style object to manufacture [`InstanceStatusSummary`](crate::model::InstanceStatusSummary).
    pub fn builder() -> crate::model::instance_status_summary::Builder {
        crate::model::instance_status_summary::Builder::default()
    }
}

/// When writing a match expression against `SummaryStatus`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let summarystatus = unimplemented!();
/// match summarystatus {
///     SummaryStatus::Impaired => { /* ... */ },
///     SummaryStatus::Initializing => { /* ... */ },
///     SummaryStatus::InsufficientData => { /* ... */ },
///     SummaryStatus::NotApplicable => { /* ... */ },
///     SummaryStatus::Ok => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `summarystatus` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `SummaryStatus::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `SummaryStatus::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `SummaryStatus::NewFeature` is defined.
/// Specifically, when `summarystatus` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `SummaryStatus::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 SummaryStatus {
    #[allow(missing_docs)] // documentation missing in model
    Impaired,
    #[allow(missing_docs)] // documentation missing in model
    Initializing,
    #[allow(missing_docs)] // documentation missing in model
    InsufficientData,
    #[allow(missing_docs)] // documentation missing in model
    NotApplicable,
    #[allow(missing_docs)] // documentation missing in model
    Ok,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for SummaryStatus {
    fn from(s: &str) -> Self {
        match s {
            "impaired" => SummaryStatus::Impaired,
            "initializing" => SummaryStatus::Initializing,
            "insufficient-data" => SummaryStatus::InsufficientData,
            "not-applicable" => SummaryStatus::NotApplicable,
            "ok" => SummaryStatus::Ok,
            other => SummaryStatus::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for SummaryStatus {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(SummaryStatus::from(s))
    }
}
impl SummaryStatus {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            SummaryStatus::Impaired => "impaired",
            SummaryStatus::Initializing => "initializing",
            SummaryStatus::InsufficientData => "insufficient-data",
            SummaryStatus::NotApplicable => "not-applicable",
            SummaryStatus::Ok => "ok",
            SummaryStatus::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &[
            "impaired",
            "initializing",
            "insufficient-data",
            "not-applicable",
            "ok",
        ]
    }
}
impl AsRef<str> for SummaryStatus {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes the instance status.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InstanceStatusDetails {
    /// <p>The time when a status check failed. For an instance that was launched and impaired, this is the time when the instance was launched.</p>
    #[doc(hidden)]
    pub impaired_since: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The type of instance status.</p>
    #[doc(hidden)]
    pub name: std::option::Option<crate::model::StatusName>,
    /// <p>The status.</p>
    #[doc(hidden)]
    pub status: std::option::Option<crate::model::StatusType>,
}
impl InstanceStatusDetails {
    /// <p>The time when a status check failed. For an instance that was launched and impaired, this is the time when the instance was launched.</p>
    pub fn impaired_since(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.impaired_since.as_ref()
    }
    /// <p>The type of instance status.</p>
    pub fn name(&self) -> std::option::Option<&crate::model::StatusName> {
        self.name.as_ref()
    }
    /// <p>The status.</p>
    pub fn status(&self) -> std::option::Option<&crate::model::StatusType> {
        self.status.as_ref()
    }
}
/// See [`InstanceStatusDetails`](crate::model::InstanceStatusDetails).
pub mod instance_status_details {

    /// A builder for [`InstanceStatusDetails`](crate::model::InstanceStatusDetails).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) impaired_since: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) name: std::option::Option<crate::model::StatusName>,
        pub(crate) status: std::option::Option<crate::model::StatusType>,
    }
    impl Builder {
        /// <p>The time when a status check failed. For an instance that was launched and impaired, this is the time when the instance was launched.</p>
        pub fn impaired_since(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.impaired_since = Some(input);
            self
        }
        /// <p>The time when a status check failed. For an instance that was launched and impaired, this is the time when the instance was launched.</p>
        pub fn set_impaired_since(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.impaired_since = input;
            self
        }
        /// <p>The type of instance status.</p>
        pub fn name(mut self, input: crate::model::StatusName) -> Self {
            self.name = Some(input);
            self
        }
        /// <p>The type of instance status.</p>
        pub fn set_name(mut self, input: std::option::Option<crate::model::StatusName>) -> Self {
            self.name = input;
            self
        }
        /// <p>The status.</p>
        pub fn status(mut self, input: crate::model::StatusType) -> Self {
            self.status = Some(input);
            self
        }
        /// <p>The status.</p>
        pub fn set_status(mut self, input: std::option::Option<crate::model::StatusType>) -> Self {
            self.status = input;
            self
        }
        /// Consumes the builder and constructs a [`InstanceStatusDetails`](crate::model::InstanceStatusDetails).
        pub fn build(self) -> crate::model::InstanceStatusDetails {
            crate::model::InstanceStatusDetails {
                impaired_since: self.impaired_since,
                name: self.name,
                status: self.status,
            }
        }
    }
}
impl InstanceStatusDetails {
    /// Creates a new builder-style object to manufacture [`InstanceStatusDetails`](crate::model::InstanceStatusDetails).
    pub fn builder() -> crate::model::instance_status_details::Builder {
        crate::model::instance_status_details::Builder::default()
    }
}

/// When writing a match expression against `StatusType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let statustype = unimplemented!();
/// match statustype {
///     StatusType::Failed => { /* ... */ },
///     StatusType::Initializing => { /* ... */ },
///     StatusType::InsufficientData => { /* ... */ },
///     StatusType::Passed => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `statustype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `StatusType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `StatusType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `StatusType::NewFeature` is defined.
/// Specifically, when `statustype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `StatusType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 StatusType {
    #[allow(missing_docs)] // documentation missing in model
    Failed,
    #[allow(missing_docs)] // documentation missing in model
    Initializing,
    #[allow(missing_docs)] // documentation missing in model
    InsufficientData,
    #[allow(missing_docs)] // documentation missing in model
    Passed,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for StatusType {
    fn from(s: &str) -> Self {
        match s {
            "failed" => StatusType::Failed,
            "initializing" => StatusType::Initializing,
            "insufficient-data" => StatusType::InsufficientData,
            "passed" => StatusType::Passed,
            other => StatusType::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for StatusType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(StatusType::from(s))
    }
}
impl StatusType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            StatusType::Failed => "failed",
            StatusType::Initializing => "initializing",
            StatusType::InsufficientData => "insufficient-data",
            StatusType::Passed => "passed",
            StatusType::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["failed", "initializing", "insufficient-data", "passed"]
    }
}
impl AsRef<str> for StatusType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `StatusName`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let statusname = unimplemented!();
/// match statusname {
///     StatusName::Reachability => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `statusname` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `StatusName::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `StatusName::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `StatusName::NewFeature` is defined.
/// Specifically, when `statusname` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `StatusName::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 StatusName {
    #[allow(missing_docs)] // documentation missing in model
    Reachability,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for StatusName {
    fn from(s: &str) -> Self {
        match s {
            "reachability" => StatusName::Reachability,
            other => StatusName::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for StatusName {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(StatusName::from(s))
    }
}
impl StatusName {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            StatusName::Reachability => "reachability",
            StatusName::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["reachability"]
    }
}
impl AsRef<str> for StatusName {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes a launch request for one or more instances, and includes owner, requester, and security group information that applies to all instances in the launch request.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Reservation {
    /// <p>[EC2-Classic only] The security groups.</p>
    #[doc(hidden)]
    pub groups: std::option::Option<std::vec::Vec<crate::model::GroupIdentifier>>,
    /// <p>The instances.</p>
    #[doc(hidden)]
    pub instances: std::option::Option<std::vec::Vec<crate::model::Instance>>,
    /// <p>The ID of the Amazon Web Services account that owns the reservation.</p>
    #[doc(hidden)]
    pub owner_id: std::option::Option<std::string::String>,
    /// <p>The ID of the requester that launched the instances on your behalf (for example, Amazon Web Services Management Console or Auto Scaling).</p>
    #[doc(hidden)]
    pub requester_id: std::option::Option<std::string::String>,
    /// <p>The ID of the reservation.</p>
    #[doc(hidden)]
    pub reservation_id: std::option::Option<std::string::String>,
}
impl Reservation {
    /// <p>[EC2-Classic only] The security groups.</p>
    pub fn groups(&self) -> std::option::Option<&[crate::model::GroupIdentifier]> {
        self.groups.as_deref()
    }
    /// <p>The instances.</p>
    pub fn instances(&self) -> std::option::Option<&[crate::model::Instance]> {
        self.instances.as_deref()
    }
    /// <p>The ID of the Amazon Web Services account that owns the reservation.</p>
    pub fn owner_id(&self) -> std::option::Option<&str> {
        self.owner_id.as_deref()
    }
    /// <p>The ID of the requester that launched the instances on your behalf (for example, Amazon Web Services Management Console or Auto Scaling).</p>
    pub fn requester_id(&self) -> std::option::Option<&str> {
        self.requester_id.as_deref()
    }
    /// <p>The ID of the reservation.</p>
    pub fn reservation_id(&self) -> std::option::Option<&str> {
        self.reservation_id.as_deref()
    }
}
/// See [`Reservation`](crate::model::Reservation).
pub mod reservation {

    /// A builder for [`Reservation`](crate::model::Reservation).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) groups: std::option::Option<std::vec::Vec<crate::model::GroupIdentifier>>,
        pub(crate) instances: std::option::Option<std::vec::Vec<crate::model::Instance>>,
        pub(crate) owner_id: std::option::Option<std::string::String>,
        pub(crate) requester_id: std::option::Option<std::string::String>,
        pub(crate) reservation_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// Appends an item to `groups`.
        ///
        /// To override the contents of this collection use [`set_groups`](Self::set_groups).
        ///
        /// <p>[EC2-Classic only] The security groups.</p>
        pub fn groups(mut self, input: crate::model::GroupIdentifier) -> Self {
            let mut v = self.groups.unwrap_or_default();
            v.push(input);
            self.groups = Some(v);
            self
        }
        /// <p>[EC2-Classic only] The security groups.</p>
        pub fn set_groups(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::GroupIdentifier>>,
        ) -> Self {
            self.groups = input;
            self
        }
        /// Appends an item to `instances`.
        ///
        /// To override the contents of this collection use [`set_instances`](Self::set_instances).
        ///
        /// <p>The instances.</p>
        pub fn instances(mut self, input: crate::model::Instance) -> Self {
            let mut v = self.instances.unwrap_or_default();
            v.push(input);
            self.instances = Some(v);
            self
        }
        /// <p>The instances.</p>
        pub fn set_instances(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Instance>>,
        ) -> Self {
            self.instances = input;
            self
        }
        /// <p>The ID of the Amazon Web Services account that owns the reservation.</p>
        pub fn owner_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.owner_id = Some(input.into());
            self
        }
        /// <p>The ID of the Amazon Web Services account that owns the reservation.</p>
        pub fn set_owner_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.owner_id = input;
            self
        }
        /// <p>The ID of the requester that launched the instances on your behalf (for example, Amazon Web Services Management Console or Auto Scaling).</p>
        pub fn requester_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.requester_id = Some(input.into());
            self
        }
        /// <p>The ID of the requester that launched the instances on your behalf (for example, Amazon Web Services Management Console or Auto Scaling).</p>
        pub fn set_requester_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.requester_id = input;
            self
        }
        /// <p>The ID of the reservation.</p>
        pub fn reservation_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.reservation_id = Some(input.into());
            self
        }
        /// <p>The ID of the reservation.</p>
        pub fn set_reservation_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.reservation_id = input;
            self
        }
        /// Consumes the builder and constructs a [`Reservation`](crate::model::Reservation).
        pub fn build(self) -> crate::model::Reservation {
            crate::model::Reservation {
                groups: self.groups,
                instances: self.instances,
                owner_id: self.owner_id,
                requester_id: self.requester_id,
                reservation_id: self.reservation_id,
            }
        }
    }
}
impl Reservation {
    /// Creates a new builder-style object to manufacture [`Reservation`](crate::model::Reservation).
    pub fn builder() -> crate::model::reservation::Builder {
        crate::model::reservation::Builder::default()
    }
}

/// <p>Describes the credit option for CPU usage of a burstable performance instance. </p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InstanceCreditSpecification {
    /// <p>The ID of the instance.</p>
    #[doc(hidden)]
    pub instance_id: std::option::Option<std::string::String>,
    /// <p>The credit option for CPU usage of the instance.</p>
    /// <p>Valid values: <code>standard</code> | <code>unlimited</code> </p>
    #[doc(hidden)]
    pub cpu_credits: std::option::Option<std::string::String>,
}
impl InstanceCreditSpecification {
    /// <p>The ID of the instance.</p>
    pub fn instance_id(&self) -> std::option::Option<&str> {
        self.instance_id.as_deref()
    }
    /// <p>The credit option for CPU usage of the instance.</p>
    /// <p>Valid values: <code>standard</code> | <code>unlimited</code> </p>
    pub fn cpu_credits(&self) -> std::option::Option<&str> {
        self.cpu_credits.as_deref()
    }
}
/// See [`InstanceCreditSpecification`](crate::model::InstanceCreditSpecification).
pub mod instance_credit_specification {

    /// A builder for [`InstanceCreditSpecification`](crate::model::InstanceCreditSpecification).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) instance_id: std::option::Option<std::string::String>,
        pub(crate) cpu_credits: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The ID of the instance.</p>
        pub fn instance_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.instance_id = Some(input.into());
            self
        }
        /// <p>The ID of the instance.</p>
        pub fn set_instance_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.instance_id = input;
            self
        }
        /// <p>The credit option for CPU usage of the instance.</p>
        /// <p>Valid values: <code>standard</code> | <code>unlimited</code> </p>
        pub fn cpu_credits(mut self, input: impl Into<std::string::String>) -> Self {
            self.cpu_credits = Some(input.into());
            self
        }
        /// <p>The credit option for CPU usage of the instance.</p>
        /// <p>Valid values: <code>standard</code> | <code>unlimited</code> </p>
        pub fn set_cpu_credits(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.cpu_credits = input;
            self
        }
        /// Consumes the builder and constructs a [`InstanceCreditSpecification`](crate::model::InstanceCreditSpecification).
        pub fn build(self) -> crate::model::InstanceCreditSpecification {
            crate::model::InstanceCreditSpecification {
                instance_id: self.instance_id,
                cpu_credits: self.cpu_credits,
            }
        }
    }
}
impl InstanceCreditSpecification {
    /// Creates a new builder-style object to manufacture [`InstanceCreditSpecification`](crate::model::InstanceCreditSpecification).
    pub fn builder() -> crate::model::instance_credit_specification::Builder {
        crate::model::instance_credit_specification::Builder::default()
    }
}

/// <p>Describes an import snapshot task.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ImportSnapshotTask {
    /// <p>A description of the import snapshot task.</p>
    #[doc(hidden)]
    pub description: std::option::Option<std::string::String>,
    /// <p>The ID of the import snapshot task.</p>
    #[doc(hidden)]
    pub import_task_id: std::option::Option<std::string::String>,
    /// <p>Describes an import snapshot task.</p>
    #[doc(hidden)]
    pub snapshot_task_detail: std::option::Option<crate::model::SnapshotTaskDetail>,
    /// <p>The tags for the import snapshot task.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl ImportSnapshotTask {
    /// <p>A description of the import snapshot task.</p>
    pub fn description(&self) -> std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The ID of the import snapshot task.</p>
    pub fn import_task_id(&self) -> std::option::Option<&str> {
        self.import_task_id.as_deref()
    }
    /// <p>Describes an import snapshot task.</p>
    pub fn snapshot_task_detail(&self) -> std::option::Option<&crate::model::SnapshotTaskDetail> {
        self.snapshot_task_detail.as_ref()
    }
    /// <p>The tags for the import snapshot task.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
}
/// See [`ImportSnapshotTask`](crate::model::ImportSnapshotTask).
pub mod import_snapshot_task {

    /// A builder for [`ImportSnapshotTask`](crate::model::ImportSnapshotTask).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) description: std::option::Option<std::string::String>,
        pub(crate) import_task_id: std::option::Option<std::string::String>,
        pub(crate) snapshot_task_detail: std::option::Option<crate::model::SnapshotTaskDetail>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    }
    impl Builder {
        /// <p>A description of the import snapshot task.</p>
        pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
            self.description = Some(input.into());
            self
        }
        /// <p>A description of the import snapshot task.</p>
        pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.description = input;
            self
        }
        /// <p>The ID of the import snapshot task.</p>
        pub fn import_task_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.import_task_id = Some(input.into());
            self
        }
        /// <p>The ID of the import snapshot task.</p>
        pub fn set_import_task_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.import_task_id = input;
            self
        }
        /// <p>Describes an import snapshot task.</p>
        pub fn snapshot_task_detail(mut self, input: crate::model::SnapshotTaskDetail) -> Self {
            self.snapshot_task_detail = Some(input);
            self
        }
        /// <p>Describes an import snapshot task.</p>
        pub fn set_snapshot_task_detail(
            mut self,
            input: std::option::Option<crate::model::SnapshotTaskDetail>,
        ) -> Self {
            self.snapshot_task_detail = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>The tags for the import snapshot task.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>The tags for the import snapshot task.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// Consumes the builder and constructs a [`ImportSnapshotTask`](crate::model::ImportSnapshotTask).
        pub fn build(self) -> crate::model::ImportSnapshotTask {
            crate::model::ImportSnapshotTask {
                description: self.description,
                import_task_id: self.import_task_id,
                snapshot_task_detail: self.snapshot_task_detail,
                tags: self.tags,
            }
        }
    }
}
impl ImportSnapshotTask {
    /// Creates a new builder-style object to manufacture [`ImportSnapshotTask`](crate::model::ImportSnapshotTask).
    pub fn builder() -> crate::model::import_snapshot_task::Builder {
        crate::model::import_snapshot_task::Builder::default()
    }
}

/// <p>Describes an import image task.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ImportImageTask {
    /// <p>The architecture of the virtual machine.</p>
    /// <p>Valid values: <code>i386</code> | <code>x86_64</code> | <code>arm64</code> </p>
    #[doc(hidden)]
    pub architecture: std::option::Option<std::string::String>,
    /// <p>A description of the import task.</p>
    #[doc(hidden)]
    pub description: std::option::Option<std::string::String>,
    /// <p>Indicates whether the image is encrypted.</p>
    #[doc(hidden)]
    pub encrypted: std::option::Option<bool>,
    /// <p>The target hypervisor for the import task.</p>
    /// <p>Valid values: <code>xen</code> </p>
    #[doc(hidden)]
    pub hypervisor: std::option::Option<std::string::String>,
    /// <p>The ID of the Amazon Machine Image (AMI) of the imported virtual machine.</p>
    #[doc(hidden)]
    pub image_id: std::option::Option<std::string::String>,
    /// <p>The ID of the import image task.</p>
    #[doc(hidden)]
    pub import_task_id: std::option::Option<std::string::String>,
    /// <p>The identifier for the KMS key that was used to create the encrypted image.</p>
    #[doc(hidden)]
    pub kms_key_id: std::option::Option<std::string::String>,
    /// <p>The license type of the virtual machine.</p>
    #[doc(hidden)]
    pub license_type: std::option::Option<std::string::String>,
    /// <p>The description string for the import image task.</p>
    #[doc(hidden)]
    pub platform: std::option::Option<std::string::String>,
    /// <p>The percentage of progress of the import image task.</p>
    #[doc(hidden)]
    pub progress: std::option::Option<std::string::String>,
    /// <p>Information about the snapshots.</p>
    #[doc(hidden)]
    pub snapshot_details: std::option::Option<std::vec::Vec<crate::model::SnapshotDetail>>,
    /// <p>A brief status for the import image task.</p>
    #[doc(hidden)]
    pub status: std::option::Option<std::string::String>,
    /// <p>A descriptive status message for the import image task.</p>
    #[doc(hidden)]
    pub status_message: std::option::Option<std::string::String>,
    /// <p>The tags for the import image task.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    /// <p>The ARNs of the license configurations that are associated with the import image task.</p>
    #[doc(hidden)]
    pub license_specifications:
        std::option::Option<std::vec::Vec<crate::model::ImportImageLicenseConfigurationResponse>>,
    /// <p>The usage operation value.</p>
    #[doc(hidden)]
    pub usage_operation: std::option::Option<std::string::String>,
    /// <p>The boot mode of the virtual machine.</p>
    #[doc(hidden)]
    pub boot_mode: std::option::Option<crate::model::BootModeValues>,
}
impl ImportImageTask {
    /// <p>The architecture of the virtual machine.</p>
    /// <p>Valid values: <code>i386</code> | <code>x86_64</code> | <code>arm64</code> </p>
    pub fn architecture(&self) -> std::option::Option<&str> {
        self.architecture.as_deref()
    }
    /// <p>A description of the import task.</p>
    pub fn description(&self) -> std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>Indicates whether the image is encrypted.</p>
    pub fn encrypted(&self) -> std::option::Option<bool> {
        self.encrypted
    }
    /// <p>The target hypervisor for the import task.</p>
    /// <p>Valid values: <code>xen</code> </p>
    pub fn hypervisor(&self) -> std::option::Option<&str> {
        self.hypervisor.as_deref()
    }
    /// <p>The ID of the Amazon Machine Image (AMI) of the imported virtual machine.</p>
    pub fn image_id(&self) -> std::option::Option<&str> {
        self.image_id.as_deref()
    }
    /// <p>The ID of the import image task.</p>
    pub fn import_task_id(&self) -> std::option::Option<&str> {
        self.import_task_id.as_deref()
    }
    /// <p>The identifier for the KMS key that was used to create the encrypted image.</p>
    pub fn kms_key_id(&self) -> std::option::Option<&str> {
        self.kms_key_id.as_deref()
    }
    /// <p>The license type of the virtual machine.</p>
    pub fn license_type(&self) -> std::option::Option<&str> {
        self.license_type.as_deref()
    }
    /// <p>The description string for the import image task.</p>
    pub fn platform(&self) -> std::option::Option<&str> {
        self.platform.as_deref()
    }
    /// <p>The percentage of progress of the import image task.</p>
    pub fn progress(&self) -> std::option::Option<&str> {
        self.progress.as_deref()
    }
    /// <p>Information about the snapshots.</p>
    pub fn snapshot_details(&self) -> std::option::Option<&[crate::model::SnapshotDetail]> {
        self.snapshot_details.as_deref()
    }
    /// <p>A brief status for the import image task.</p>
    pub fn status(&self) -> std::option::Option<&str> {
        self.status.as_deref()
    }
    /// <p>A descriptive status message for the import image task.</p>
    pub fn status_message(&self) -> std::option::Option<&str> {
        self.status_message.as_deref()
    }
    /// <p>The tags for the import image task.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
    /// <p>The ARNs of the license configurations that are associated with the import image task.</p>
    pub fn license_specifications(
        &self,
    ) -> std::option::Option<&[crate::model::ImportImageLicenseConfigurationResponse]> {
        self.license_specifications.as_deref()
    }
    /// <p>The usage operation value.</p>
    pub fn usage_operation(&self) -> std::option::Option<&str> {
        self.usage_operation.as_deref()
    }
    /// <p>The boot mode of the virtual machine.</p>
    pub fn boot_mode(&self) -> std::option::Option<&crate::model::BootModeValues> {
        self.boot_mode.as_ref()
    }
}
/// See [`ImportImageTask`](crate::model::ImportImageTask).
pub mod import_image_task {

    /// A builder for [`ImportImageTask`](crate::model::ImportImageTask).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) architecture: std::option::Option<std::string::String>,
        pub(crate) description: std::option::Option<std::string::String>,
        pub(crate) encrypted: std::option::Option<bool>,
        pub(crate) hypervisor: std::option::Option<std::string::String>,
        pub(crate) image_id: std::option::Option<std::string::String>,
        pub(crate) import_task_id: std::option::Option<std::string::String>,
        pub(crate) kms_key_id: std::option::Option<std::string::String>,
        pub(crate) license_type: std::option::Option<std::string::String>,
        pub(crate) platform: std::option::Option<std::string::String>,
        pub(crate) progress: std::option::Option<std::string::String>,
        pub(crate) snapshot_details:
            std::option::Option<std::vec::Vec<crate::model::SnapshotDetail>>,
        pub(crate) status: std::option::Option<std::string::String>,
        pub(crate) status_message: std::option::Option<std::string::String>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        pub(crate) license_specifications: std::option::Option<
            std::vec::Vec<crate::model::ImportImageLicenseConfigurationResponse>,
        >,
        pub(crate) usage_operation: std::option::Option<std::string::String>,
        pub(crate) boot_mode: std::option::Option<crate::model::BootModeValues>,
    }
    impl Builder {
        /// <p>The architecture of the virtual machine.</p>
        /// <p>Valid values: <code>i386</code> | <code>x86_64</code> | <code>arm64</code> </p>
        pub fn architecture(mut self, input: impl Into<std::string::String>) -> Self {
            self.architecture = Some(input.into());
            self
        }
        /// <p>The architecture of the virtual machine.</p>
        /// <p>Valid values: <code>i386</code> | <code>x86_64</code> | <code>arm64</code> </p>
        pub fn set_architecture(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.architecture = input;
            self
        }
        /// <p>A description of the import task.</p>
        pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
            self.description = Some(input.into());
            self
        }
        /// <p>A description of the import task.</p>
        pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.description = input;
            self
        }
        /// <p>Indicates whether the image is encrypted.</p>
        pub fn encrypted(mut self, input: bool) -> Self {
            self.encrypted = Some(input);
            self
        }
        /// <p>Indicates whether the image is encrypted.</p>
        pub fn set_encrypted(mut self, input: std::option::Option<bool>) -> Self {
            self.encrypted = input;
            self
        }
        /// <p>The target hypervisor for the import task.</p>
        /// <p>Valid values: <code>xen</code> </p>
        pub fn hypervisor(mut self, input: impl Into<std::string::String>) -> Self {
            self.hypervisor = Some(input.into());
            self
        }
        /// <p>The target hypervisor for the import task.</p>
        /// <p>Valid values: <code>xen</code> </p>
        pub fn set_hypervisor(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.hypervisor = input;
            self
        }
        /// <p>The ID of the Amazon Machine Image (AMI) of the imported virtual machine.</p>
        pub fn image_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.image_id = Some(input.into());
            self
        }
        /// <p>The ID of the Amazon Machine Image (AMI) of the imported virtual machine.</p>
        pub fn set_image_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.image_id = input;
            self
        }
        /// <p>The ID of the import image task.</p>
        pub fn import_task_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.import_task_id = Some(input.into());
            self
        }
        /// <p>The ID of the import image task.</p>
        pub fn set_import_task_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.import_task_id = input;
            self
        }
        /// <p>The identifier for the KMS key that was used to create the encrypted image.</p>
        pub fn kms_key_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.kms_key_id = Some(input.into());
            self
        }
        /// <p>The identifier for the KMS key that was used to create the encrypted image.</p>
        pub fn set_kms_key_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.kms_key_id = input;
            self
        }
        /// <p>The license type of the virtual machine.</p>
        pub fn license_type(mut self, input: impl Into<std::string::String>) -> Self {
            self.license_type = Some(input.into());
            self
        }
        /// <p>The license type of the virtual machine.</p>
        pub fn set_license_type(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.license_type = input;
            self
        }
        /// <p>The description string for the import image task.</p>
        pub fn platform(mut self, input: impl Into<std::string::String>) -> Self {
            self.platform = Some(input.into());
            self
        }
        /// <p>The description string for the import image task.</p>
        pub fn set_platform(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.platform = input;
            self
        }
        /// <p>The percentage of progress of the import image task.</p>
        pub fn progress(mut self, input: impl Into<std::string::String>) -> Self {
            self.progress = Some(input.into());
            self
        }
        /// <p>The percentage of progress of the import image task.</p>
        pub fn set_progress(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.progress = input;
            self
        }
        /// Appends an item to `snapshot_details`.
        ///
        /// To override the contents of this collection use [`set_snapshot_details`](Self::set_snapshot_details).
        ///
        /// <p>Information about the snapshots.</p>
        pub fn snapshot_details(mut self, input: crate::model::SnapshotDetail) -> Self {
            let mut v = self.snapshot_details.unwrap_or_default();
            v.push(input);
            self.snapshot_details = Some(v);
            self
        }
        /// <p>Information about the snapshots.</p>
        pub fn set_snapshot_details(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::SnapshotDetail>>,
        ) -> Self {
            self.snapshot_details = input;
            self
        }
        /// <p>A brief status for the import image task.</p>
        pub fn status(mut self, input: impl Into<std::string::String>) -> Self {
            self.status = Some(input.into());
            self
        }
        /// <p>A brief status for the import image task.</p>
        pub fn set_status(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.status = input;
            self
        }
        /// <p>A descriptive status message for the import image task.</p>
        pub fn status_message(mut self, input: impl Into<std::string::String>) -> Self {
            self.status_message = Some(input.into());
            self
        }
        /// <p>A descriptive status message for the import image task.</p>
        pub fn set_status_message(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.status_message = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>The tags for the import image task.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>The tags for the import image task.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// Appends an item to `license_specifications`.
        ///
        /// To override the contents of this collection use [`set_license_specifications`](Self::set_license_specifications).
        ///
        /// <p>The ARNs of the license configurations that are associated with the import image task.</p>
        pub fn license_specifications(
            mut self,
            input: crate::model::ImportImageLicenseConfigurationResponse,
        ) -> Self {
            let mut v = self.license_specifications.unwrap_or_default();
            v.push(input);
            self.license_specifications = Some(v);
            self
        }
        /// <p>The ARNs of the license configurations that are associated with the import image task.</p>
        pub fn set_license_specifications(
            mut self,
            input: std::option::Option<
                std::vec::Vec<crate::model::ImportImageLicenseConfigurationResponse>,
            >,
        ) -> Self {
            self.license_specifications = input;
            self
        }
        /// <p>The usage operation value.</p>
        pub fn usage_operation(mut self, input: impl Into<std::string::String>) -> Self {
            self.usage_operation = Some(input.into());
            self
        }
        /// <p>The usage operation value.</p>
        pub fn set_usage_operation(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.usage_operation = input;
            self
        }
        /// <p>The boot mode of the virtual machine.</p>
        pub fn boot_mode(mut self, input: crate::model::BootModeValues) -> Self {
            self.boot_mode = Some(input);
            self
        }
        /// <p>The boot mode of the virtual machine.</p>
        pub fn set_boot_mode(
            mut self,
            input: std::option::Option<crate::model::BootModeValues>,
        ) -> Self {
            self.boot_mode = input;
            self
        }
        /// Consumes the builder and constructs a [`ImportImageTask`](crate::model::ImportImageTask).
        pub fn build(self) -> crate::model::ImportImageTask {
            crate::model::ImportImageTask {
                architecture: self.architecture,
                description: self.description,
                encrypted: self.encrypted,
                hypervisor: self.hypervisor,
                image_id: self.image_id,
                import_task_id: self.import_task_id,
                kms_key_id: self.kms_key_id,
                license_type: self.license_type,
                platform: self.platform,
                progress: self.progress,
                snapshot_details: self.snapshot_details,
                status: self.status,
                status_message: self.status_message,
                tags: self.tags,
                license_specifications: self.license_specifications,
                usage_operation: self.usage_operation,
                boot_mode: self.boot_mode,
            }
        }
    }
}
impl ImportImageTask {
    /// Creates a new builder-style object to manufacture [`ImportImageTask`](crate::model::ImportImageTask).
    pub fn builder() -> crate::model::import_image_task::Builder {
        crate::model::import_image_task::Builder::default()
    }
}

/// <p>Describes an image.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Image {
    /// <p>The architecture of the image.</p>
    #[doc(hidden)]
    pub architecture: std::option::Option<crate::model::ArchitectureValues>,
    /// <p>The date and time the image was created.</p>
    #[doc(hidden)]
    pub creation_date: std::option::Option<std::string::String>,
    /// <p>The ID of the AMI.</p>
    #[doc(hidden)]
    pub image_id: std::option::Option<std::string::String>,
    /// <p>The location of the AMI.</p>
    #[doc(hidden)]
    pub image_location: std::option::Option<std::string::String>,
    /// <p>The type of image.</p>
    #[doc(hidden)]
    pub image_type: std::option::Option<crate::model::ImageTypeValues>,
    /// <p>Indicates whether the image has public launch permissions. The value is <code>true</code> if this image has public launch permissions or <code>false</code> if it has only implicit and explicit launch permissions.</p>
    #[doc(hidden)]
    pub public: std::option::Option<bool>,
    /// <p>The kernel associated with the image, if any. Only applicable for machine images.</p>
    #[doc(hidden)]
    pub kernel_id: std::option::Option<std::string::String>,
    /// <p>The ID of the Amazon Web Services account that owns the image.</p>
    #[doc(hidden)]
    pub owner_id: std::option::Option<std::string::String>,
    /// <p>This value is set to <code>windows</code> for Windows AMIs; otherwise, it is blank.</p>
    #[doc(hidden)]
    pub platform: std::option::Option<crate::model::PlatformValues>,
    /// <p>The platform details associated with the billing code of the AMI. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-billing-info.html">Understand AMI billing information</a> in the <i>Amazon EC2 User Guide</i>.</p>
    #[doc(hidden)]
    pub platform_details: std::option::Option<std::string::String>,
    /// <p>The operation of the Amazon EC2 instance and the billing code that is associated with the AMI. <code>usageOperation</code> corresponds to the <a href="https://docs.aws.amazon.com/cur/latest/userguide/Lineitem-columns.html#Lineitem-details-O-Operation">lineitem/Operation</a> column on your Amazon Web Services Cost and Usage Report and in the <a href="https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/price-changes.html">Amazon Web Services Price List API</a>. You can view these fields on the <b>Instances</b> or <b>AMIs</b> pages in the Amazon EC2 console, or in the responses that are returned by the <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeImages.html">DescribeImages</a> command in the Amazon EC2 API, or the <a href="https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-images.html">describe-images</a> command in the CLI.</p>
    #[doc(hidden)]
    pub usage_operation: std::option::Option<std::string::String>,
    /// <p>Any product codes associated with the AMI.</p>
    #[doc(hidden)]
    pub product_codes: std::option::Option<std::vec::Vec<crate::model::ProductCode>>,
    /// <p>The RAM disk associated with the image, if any. Only applicable for machine images.</p>
    #[doc(hidden)]
    pub ramdisk_id: std::option::Option<std::string::String>,
    /// <p>The current state of the AMI. If the state is <code>available</code>, the image is successfully registered and can be used to launch an instance.</p>
    #[doc(hidden)]
    pub state: std::option::Option<crate::model::ImageState>,
    /// <p>Any block device mapping entries.</p>
    #[doc(hidden)]
    pub block_device_mappings: std::option::Option<std::vec::Vec<crate::model::BlockDeviceMapping>>,
    /// <p>The description of the AMI that was provided during image creation.</p>
    #[doc(hidden)]
    pub description: std::option::Option<std::string::String>,
    /// <p>Specifies whether enhanced networking with ENA is enabled.</p>
    #[doc(hidden)]
    pub ena_support: std::option::Option<bool>,
    /// <p>The hypervisor type of the image.</p>
    #[doc(hidden)]
    pub hypervisor: std::option::Option<crate::model::HypervisorType>,
    /// <p>The Amazon Web Services account alias (for example, <code>amazon</code>, <code>self</code>) or the Amazon Web Services account ID of the AMI owner.</p>
    #[doc(hidden)]
    pub image_owner_alias: std::option::Option<std::string::String>,
    /// <p>The name of the AMI that was provided during image creation.</p>
    #[doc(hidden)]
    pub name: std::option::Option<std::string::String>,
    /// <p>The device name of the root device volume (for example, <code>/dev/sda1</code>).</p>
    #[doc(hidden)]
    pub root_device_name: std::option::Option<std::string::String>,
    /// <p>The type of root device used by the AMI. The AMI can use an Amazon EBS volume or an instance store volume.</p>
    #[doc(hidden)]
    pub root_device_type: std::option::Option<crate::model::DeviceType>,
    /// <p>Specifies whether enhanced networking with the Intel 82599 Virtual Function interface is enabled.</p>
    #[doc(hidden)]
    pub sriov_net_support: std::option::Option<std::string::String>,
    /// <p>The reason for the state change.</p>
    #[doc(hidden)]
    pub state_reason: std::option::Option<crate::model::StateReason>,
    /// <p>Any tags assigned to the image.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    /// <p>The type of virtualization of the AMI.</p>
    #[doc(hidden)]
    pub virtualization_type: std::option::Option<crate::model::VirtualizationType>,
    /// <p>The boot mode of the image. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-boot.html">Boot modes</a> in the <i>Amazon EC2 User Guide</i>.</p>
    #[doc(hidden)]
    pub boot_mode: std::option::Option<crate::model::BootModeValues>,
    /// <p>If the image is configured for NitroTPM support, the value is <code>v2.0</code>. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/nitrotpm.html">NitroTPM</a> in the <i>Amazon EC2 User Guide</i>.</p>
    #[doc(hidden)]
    pub tpm_support: std::option::Option<crate::model::TpmSupportValues>,
    /// <p>The date and time to deprecate the AMI, in UTC, in the following format: <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z. If you specified a value for seconds, Amazon EC2 rounds the seconds to the nearest minute.</p>
    #[doc(hidden)]
    pub deprecation_time: std::option::Option<std::string::String>,
    /// <p>If <code>v2.0</code>, it indicates that IMDSv2 is specified in the AMI. Instances launched from this AMI will have <code>HttpTokens</code> automatically set to <code>required</code> so that, by default, the instance requires that IMDSv2 is used when requesting instance metadata. In addition, <code>HttpPutResponseHopLimit</code> is set to <code>2</code>. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-IMDS-new-instances.html#configure-IMDS-new-instances-ami-configuration">Configure the AMI</a> in the <i>Amazon EC2 User Guide</i>.</p>
    #[doc(hidden)]
    pub imds_support: std::option::Option<crate::model::ImdsSupportValues>,
}
impl Image {
    /// <p>The architecture of the image.</p>
    pub fn architecture(&self) -> std::option::Option<&crate::model::ArchitectureValues> {
        self.architecture.as_ref()
    }
    /// <p>The date and time the image was created.</p>
    pub fn creation_date(&self) -> std::option::Option<&str> {
        self.creation_date.as_deref()
    }
    /// <p>The ID of the AMI.</p>
    pub fn image_id(&self) -> std::option::Option<&str> {
        self.image_id.as_deref()
    }
    /// <p>The location of the AMI.</p>
    pub fn image_location(&self) -> std::option::Option<&str> {
        self.image_location.as_deref()
    }
    /// <p>The type of image.</p>
    pub fn image_type(&self) -> std::option::Option<&crate::model::ImageTypeValues> {
        self.image_type.as_ref()
    }
    /// <p>Indicates whether the image has public launch permissions. The value is <code>true</code> if this image has public launch permissions or <code>false</code> if it has only implicit and explicit launch permissions.</p>
    pub fn public(&self) -> std::option::Option<bool> {
        self.public
    }
    /// <p>The kernel associated with the image, if any. Only applicable for machine images.</p>
    pub fn kernel_id(&self) -> std::option::Option<&str> {
        self.kernel_id.as_deref()
    }
    /// <p>The ID of the Amazon Web Services account that owns the image.</p>
    pub fn owner_id(&self) -> std::option::Option<&str> {
        self.owner_id.as_deref()
    }
    /// <p>This value is set to <code>windows</code> for Windows AMIs; otherwise, it is blank.</p>
    pub fn platform(&self) -> std::option::Option<&crate::model::PlatformValues> {
        self.platform.as_ref()
    }
    /// <p>The platform details associated with the billing code of the AMI. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-billing-info.html">Understand AMI billing information</a> in the <i>Amazon EC2 User Guide</i>.</p>
    pub fn platform_details(&self) -> std::option::Option<&str> {
        self.platform_details.as_deref()
    }
    /// <p>The operation of the Amazon EC2 instance and the billing code that is associated with the AMI. <code>usageOperation</code> corresponds to the <a href="https://docs.aws.amazon.com/cur/latest/userguide/Lineitem-columns.html#Lineitem-details-O-Operation">lineitem/Operation</a> column on your Amazon Web Services Cost and Usage Report and in the <a href="https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/price-changes.html">Amazon Web Services Price List API</a>. You can view these fields on the <b>Instances</b> or <b>AMIs</b> pages in the Amazon EC2 console, or in the responses that are returned by the <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeImages.html">DescribeImages</a> command in the Amazon EC2 API, or the <a href="https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-images.html">describe-images</a> command in the CLI.</p>
    pub fn usage_operation(&self) -> std::option::Option<&str> {
        self.usage_operation.as_deref()
    }
    /// <p>Any product codes associated with the AMI.</p>
    pub fn product_codes(&self) -> std::option::Option<&[crate::model::ProductCode]> {
        self.product_codes.as_deref()
    }
    /// <p>The RAM disk associated with the image, if any. Only applicable for machine images.</p>
    pub fn ramdisk_id(&self) -> std::option::Option<&str> {
        self.ramdisk_id.as_deref()
    }
    /// <p>The current state of the AMI. If the state is <code>available</code>, the image is successfully registered and can be used to launch an instance.</p>
    pub fn state(&self) -> std::option::Option<&crate::model::ImageState> {
        self.state.as_ref()
    }
    /// <p>Any block device mapping entries.</p>
    pub fn block_device_mappings(
        &self,
    ) -> std::option::Option<&[crate::model::BlockDeviceMapping]> {
        self.block_device_mappings.as_deref()
    }
    /// <p>The description of the AMI that was provided during image creation.</p>
    pub fn description(&self) -> std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>Specifies whether enhanced networking with ENA is enabled.</p>
    pub fn ena_support(&self) -> std::option::Option<bool> {
        self.ena_support
    }
    /// <p>The hypervisor type of the image.</p>
    pub fn hypervisor(&self) -> std::option::Option<&crate::model::HypervisorType> {
        self.hypervisor.as_ref()
    }
    /// <p>The Amazon Web Services account alias (for example, <code>amazon</code>, <code>self</code>) or the Amazon Web Services account ID of the AMI owner.</p>
    pub fn image_owner_alias(&self) -> std::option::Option<&str> {
        self.image_owner_alias.as_deref()
    }
    /// <p>The name of the AMI that was provided during image creation.</p>
    pub fn name(&self) -> std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The device name of the root device volume (for example, <code>/dev/sda1</code>).</p>
    pub fn root_device_name(&self) -> std::option::Option<&str> {
        self.root_device_name.as_deref()
    }
    /// <p>The type of root device used by the AMI. The AMI can use an Amazon EBS volume or an instance store volume.</p>
    pub fn root_device_type(&self) -> std::option::Option<&crate::model::DeviceType> {
        self.root_device_type.as_ref()
    }
    /// <p>Specifies whether enhanced networking with the Intel 82599 Virtual Function interface is enabled.</p>
    pub fn sriov_net_support(&self) -> std::option::Option<&str> {
        self.sriov_net_support.as_deref()
    }
    /// <p>The reason for the state change.</p>
    pub fn state_reason(&self) -> std::option::Option<&crate::model::StateReason> {
        self.state_reason.as_ref()
    }
    /// <p>Any tags assigned to the image.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
    /// <p>The type of virtualization of the AMI.</p>
    pub fn virtualization_type(&self) -> std::option::Option<&crate::model::VirtualizationType> {
        self.virtualization_type.as_ref()
    }
    /// <p>The boot mode of the image. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-boot.html">Boot modes</a> in the <i>Amazon EC2 User Guide</i>.</p>
    pub fn boot_mode(&self) -> std::option::Option<&crate::model::BootModeValues> {
        self.boot_mode.as_ref()
    }
    /// <p>If the image is configured for NitroTPM support, the value is <code>v2.0</code>. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/nitrotpm.html">NitroTPM</a> in the <i>Amazon EC2 User Guide</i>.</p>
    pub fn tpm_support(&self) -> std::option::Option<&crate::model::TpmSupportValues> {
        self.tpm_support.as_ref()
    }
    /// <p>The date and time to deprecate the AMI, in UTC, in the following format: <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z. If you specified a value for seconds, Amazon EC2 rounds the seconds to the nearest minute.</p>
    pub fn deprecation_time(&self) -> std::option::Option<&str> {
        self.deprecation_time.as_deref()
    }
    /// <p>If <code>v2.0</code>, it indicates that IMDSv2 is specified in the AMI. Instances launched from this AMI will have <code>HttpTokens</code> automatically set to <code>required</code> so that, by default, the instance requires that IMDSv2 is used when requesting instance metadata. In addition, <code>HttpPutResponseHopLimit</code> is set to <code>2</code>. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-IMDS-new-instances.html#configure-IMDS-new-instances-ami-configuration">Configure the AMI</a> in the <i>Amazon EC2 User Guide</i>.</p>
    pub fn imds_support(&self) -> std::option::Option<&crate::model::ImdsSupportValues> {
        self.imds_support.as_ref()
    }
}
/// See [`Image`](crate::model::Image).
pub mod image {

    /// A builder for [`Image`](crate::model::Image).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) architecture: std::option::Option<crate::model::ArchitectureValues>,
        pub(crate) creation_date: std::option::Option<std::string::String>,
        pub(crate) image_id: std::option::Option<std::string::String>,
        pub(crate) image_location: std::option::Option<std::string::String>,
        pub(crate) image_type: std::option::Option<crate::model::ImageTypeValues>,
        pub(crate) public: std::option::Option<bool>,
        pub(crate) kernel_id: std::option::Option<std::string::String>,
        pub(crate) owner_id: std::option::Option<std::string::String>,
        pub(crate) platform: std::option::Option<crate::model::PlatformValues>,
        pub(crate) platform_details: std::option::Option<std::string::String>,
        pub(crate) usage_operation: std::option::Option<std::string::String>,
        pub(crate) product_codes: std::option::Option<std::vec::Vec<crate::model::ProductCode>>,
        pub(crate) ramdisk_id: std::option::Option<std::string::String>,
        pub(crate) state: std::option::Option<crate::model::ImageState>,
        pub(crate) block_device_mappings:
            std::option::Option<std::vec::Vec<crate::model::BlockDeviceMapping>>,
        pub(crate) description: std::option::Option<std::string::String>,
        pub(crate) ena_support: std::option::Option<bool>,
        pub(crate) hypervisor: std::option::Option<crate::model::HypervisorType>,
        pub(crate) image_owner_alias: std::option::Option<std::string::String>,
        pub(crate) name: std::option::Option<std::string::String>,
        pub(crate) root_device_name: std::option::Option<std::string::String>,
        pub(crate) root_device_type: std::option::Option<crate::model::DeviceType>,
        pub(crate) sriov_net_support: std::option::Option<std::string::String>,
        pub(crate) state_reason: std::option::Option<crate::model::StateReason>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        pub(crate) virtualization_type: std::option::Option<crate::model::VirtualizationType>,
        pub(crate) boot_mode: std::option::Option<crate::model::BootModeValues>,
        pub(crate) tpm_support: std::option::Option<crate::model::TpmSupportValues>,
        pub(crate) deprecation_time: std::option::Option<std::string::String>,
        pub(crate) imds_support: std::option::Option<crate::model::ImdsSupportValues>,
    }
    impl Builder {
        /// <p>The architecture of the image.</p>
        pub fn architecture(mut self, input: crate::model::ArchitectureValues) -> Self {
            self.architecture = Some(input);
            self
        }
        /// <p>The architecture of the image.</p>
        pub fn set_architecture(
            mut self,
            input: std::option::Option<crate::model::ArchitectureValues>,
        ) -> Self {
            self.architecture = input;
            self
        }
        /// <p>The date and time the image was created.</p>
        pub fn creation_date(mut self, input: impl Into<std::string::String>) -> Self {
            self.creation_date = Some(input.into());
            self
        }
        /// <p>The date and time the image was created.</p>
        pub fn set_creation_date(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.creation_date = input;
            self
        }
        /// <p>The ID of the AMI.</p>
        pub fn image_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.image_id = Some(input.into());
            self
        }
        /// <p>The ID of the AMI.</p>
        pub fn set_image_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.image_id = input;
            self
        }
        /// <p>The location of the AMI.</p>
        pub fn image_location(mut self, input: impl Into<std::string::String>) -> Self {
            self.image_location = Some(input.into());
            self
        }
        /// <p>The location of the AMI.</p>
        pub fn set_image_location(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.image_location = input;
            self
        }
        /// <p>The type of image.</p>
        pub fn image_type(mut self, input: crate::model::ImageTypeValues) -> Self {
            self.image_type = Some(input);
            self
        }
        /// <p>The type of image.</p>
        pub fn set_image_type(
            mut self,
            input: std::option::Option<crate::model::ImageTypeValues>,
        ) -> Self {
            self.image_type = input;
            self
        }
        /// <p>Indicates whether the image has public launch permissions. The value is <code>true</code> if this image has public launch permissions or <code>false</code> if it has only implicit and explicit launch permissions.</p>
        pub fn public(mut self, input: bool) -> Self {
            self.public = Some(input);
            self
        }
        /// <p>Indicates whether the image has public launch permissions. The value is <code>true</code> if this image has public launch permissions or <code>false</code> if it has only implicit and explicit launch permissions.</p>
        pub fn set_public(mut self, input: std::option::Option<bool>) -> Self {
            self.public = input;
            self
        }
        /// <p>The kernel associated with the image, if any. Only applicable for machine images.</p>
        pub fn kernel_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.kernel_id = Some(input.into());
            self
        }
        /// <p>The kernel associated with the image, if any. Only applicable for machine images.</p>
        pub fn set_kernel_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.kernel_id = input;
            self
        }
        /// <p>The ID of the Amazon Web Services account that owns the image.</p>
        pub fn owner_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.owner_id = Some(input.into());
            self
        }
        /// <p>The ID of the Amazon Web Services account that owns the image.</p>
        pub fn set_owner_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.owner_id = input;
            self
        }
        /// <p>This value is set to <code>windows</code> for Windows AMIs; otherwise, it is blank.</p>
        pub fn platform(mut self, input: crate::model::PlatformValues) -> Self {
            self.platform = Some(input);
            self
        }
        /// <p>This value is set to <code>windows</code> for Windows AMIs; otherwise, it is blank.</p>
        pub fn set_platform(
            mut self,
            input: std::option::Option<crate::model::PlatformValues>,
        ) -> Self {
            self.platform = input;
            self
        }
        /// <p>The platform details associated with the billing code of the AMI. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-billing-info.html">Understand AMI billing information</a> in the <i>Amazon EC2 User Guide</i>.</p>
        pub fn platform_details(mut self, input: impl Into<std::string::String>) -> Self {
            self.platform_details = Some(input.into());
            self
        }
        /// <p>The platform details associated with the billing code of the AMI. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-billing-info.html">Understand AMI billing information</a> in the <i>Amazon EC2 User Guide</i>.</p>
        pub fn set_platform_details(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.platform_details = input;
            self
        }
        /// <p>The operation of the Amazon EC2 instance and the billing code that is associated with the AMI. <code>usageOperation</code> corresponds to the <a href="https://docs.aws.amazon.com/cur/latest/userguide/Lineitem-columns.html#Lineitem-details-O-Operation">lineitem/Operation</a> column on your Amazon Web Services Cost and Usage Report and in the <a href="https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/price-changes.html">Amazon Web Services Price List API</a>. You can view these fields on the <b>Instances</b> or <b>AMIs</b> pages in the Amazon EC2 console, or in the responses that are returned by the <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeImages.html">DescribeImages</a> command in the Amazon EC2 API, or the <a href="https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-images.html">describe-images</a> command in the CLI.</p>
        pub fn usage_operation(mut self, input: impl Into<std::string::String>) -> Self {
            self.usage_operation = Some(input.into());
            self
        }
        /// <p>The operation of the Amazon EC2 instance and the billing code that is associated with the AMI. <code>usageOperation</code> corresponds to the <a href="https://docs.aws.amazon.com/cur/latest/userguide/Lineitem-columns.html#Lineitem-details-O-Operation">lineitem/Operation</a> column on your Amazon Web Services Cost and Usage Report and in the <a href="https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/price-changes.html">Amazon Web Services Price List API</a>. You can view these fields on the <b>Instances</b> or <b>AMIs</b> pages in the Amazon EC2 console, or in the responses that are returned by the <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeImages.html">DescribeImages</a> command in the Amazon EC2 API, or the <a href="https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-images.html">describe-images</a> command in the CLI.</p>
        pub fn set_usage_operation(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.usage_operation = input;
            self
        }
        /// Appends an item to `product_codes`.
        ///
        /// To override the contents of this collection use [`set_product_codes`](Self::set_product_codes).
        ///
        /// <p>Any product codes associated with the AMI.</p>
        pub fn product_codes(mut self, input: crate::model::ProductCode) -> Self {
            let mut v = self.product_codes.unwrap_or_default();
            v.push(input);
            self.product_codes = Some(v);
            self
        }
        /// <p>Any product codes associated with the AMI.</p>
        pub fn set_product_codes(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::ProductCode>>,
        ) -> Self {
            self.product_codes = input;
            self
        }
        /// <p>The RAM disk associated with the image, if any. Only applicable for machine images.</p>
        pub fn ramdisk_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.ramdisk_id = Some(input.into());
            self
        }
        /// <p>The RAM disk associated with the image, if any. Only applicable for machine images.</p>
        pub fn set_ramdisk_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.ramdisk_id = input;
            self
        }
        /// <p>The current state of the AMI. If the state is <code>available</code>, the image is successfully registered and can be used to launch an instance.</p>
        pub fn state(mut self, input: crate::model::ImageState) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>The current state of the AMI. If the state is <code>available</code>, the image is successfully registered and can be used to launch an instance.</p>
        pub fn set_state(mut self, input: std::option::Option<crate::model::ImageState>) -> Self {
            self.state = input;
            self
        }
        /// Appends an item to `block_device_mappings`.
        ///
        /// To override the contents of this collection use [`set_block_device_mappings`](Self::set_block_device_mappings).
        ///
        /// <p>Any block device mapping entries.</p>
        pub fn block_device_mappings(mut self, input: crate::model::BlockDeviceMapping) -> Self {
            let mut v = self.block_device_mappings.unwrap_or_default();
            v.push(input);
            self.block_device_mappings = Some(v);
            self
        }
        /// <p>Any block device mapping entries.</p>
        pub fn set_block_device_mappings(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::BlockDeviceMapping>>,
        ) -> Self {
            self.block_device_mappings = input;
            self
        }
        /// <p>The description of the AMI that was provided during image creation.</p>
        pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
            self.description = Some(input.into());
            self
        }
        /// <p>The description of the AMI that was provided during image creation.</p>
        pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.description = input;
            self
        }
        /// <p>Specifies whether enhanced networking with ENA is enabled.</p>
        pub fn ena_support(mut self, input: bool) -> Self {
            self.ena_support = Some(input);
            self
        }
        /// <p>Specifies whether enhanced networking with ENA is enabled.</p>
        pub fn set_ena_support(mut self, input: std::option::Option<bool>) -> Self {
            self.ena_support = input;
            self
        }
        /// <p>The hypervisor type of the image.</p>
        pub fn hypervisor(mut self, input: crate::model::HypervisorType) -> Self {
            self.hypervisor = Some(input);
            self
        }
        /// <p>The hypervisor type of the image.</p>
        pub fn set_hypervisor(
            mut self,
            input: std::option::Option<crate::model::HypervisorType>,
        ) -> Self {
            self.hypervisor = input;
            self
        }
        /// <p>The Amazon Web Services account alias (for example, <code>amazon</code>, <code>self</code>) or the Amazon Web Services account ID of the AMI owner.</p>
        pub fn image_owner_alias(mut self, input: impl Into<std::string::String>) -> Self {
            self.image_owner_alias = Some(input.into());
            self
        }
        /// <p>The Amazon Web Services account alias (for example, <code>amazon</code>, <code>self</code>) or the Amazon Web Services account ID of the AMI owner.</p>
        pub fn set_image_owner_alias(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.image_owner_alias = input;
            self
        }
        /// <p>The name of the AMI that was provided during image creation.</p>
        pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
            self.name = Some(input.into());
            self
        }
        /// <p>The name of the AMI that was provided during image creation.</p>
        pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.name = input;
            self
        }
        /// <p>The device name of the root device volume (for example, <code>/dev/sda1</code>).</p>
        pub fn root_device_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.root_device_name = Some(input.into());
            self
        }
        /// <p>The device name of the root device volume (for example, <code>/dev/sda1</code>).</p>
        pub fn set_root_device_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.root_device_name = input;
            self
        }
        /// <p>The type of root device used by the AMI. The AMI can use an Amazon EBS volume or an instance store volume.</p>
        pub fn root_device_type(mut self, input: crate::model::DeviceType) -> Self {
            self.root_device_type = Some(input);
            self
        }
        /// <p>The type of root device used by the AMI. The AMI can use an Amazon EBS volume or an instance store volume.</p>
        pub fn set_root_device_type(
            mut self,
            input: std::option::Option<crate::model::DeviceType>,
        ) -> Self {
            self.root_device_type = input;
            self
        }
        /// <p>Specifies whether enhanced networking with the Intel 82599 Virtual Function interface is enabled.</p>
        pub fn sriov_net_support(mut self, input: impl Into<std::string::String>) -> Self {
            self.sriov_net_support = Some(input.into());
            self
        }
        /// <p>Specifies whether enhanced networking with the Intel 82599 Virtual Function interface is enabled.</p>
        pub fn set_sriov_net_support(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.sriov_net_support = input;
            self
        }
        /// <p>The reason for the state change.</p>
        pub fn state_reason(mut self, input: crate::model::StateReason) -> Self {
            self.state_reason = Some(input);
            self
        }
        /// <p>The reason for the state change.</p>
        pub fn set_state_reason(
            mut self,
            input: std::option::Option<crate::model::StateReason>,
        ) -> Self {
            self.state_reason = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>Any tags assigned to the image.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>Any tags assigned to the image.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// <p>The type of virtualization of the AMI.</p>
        pub fn virtualization_type(mut self, input: crate::model::VirtualizationType) -> Self {
            self.virtualization_type = Some(input);
            self
        }
        /// <p>The type of virtualization of the AMI.</p>
        pub fn set_virtualization_type(
            mut self,
            input: std::option::Option<crate::model::VirtualizationType>,
        ) -> Self {
            self.virtualization_type = input;
            self
        }
        /// <p>The boot mode of the image. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-boot.html">Boot modes</a> in the <i>Amazon EC2 User Guide</i>.</p>
        pub fn boot_mode(mut self, input: crate::model::BootModeValues) -> Self {
            self.boot_mode = Some(input);
            self
        }
        /// <p>The boot mode of the image. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-boot.html">Boot modes</a> in the <i>Amazon EC2 User Guide</i>.</p>
        pub fn set_boot_mode(
            mut self,
            input: std::option::Option<crate::model::BootModeValues>,
        ) -> Self {
            self.boot_mode = input;
            self
        }
        /// <p>If the image is configured for NitroTPM support, the value is <code>v2.0</code>. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/nitrotpm.html">NitroTPM</a> in the <i>Amazon EC2 User Guide</i>.</p>
        pub fn tpm_support(mut self, input: crate::model::TpmSupportValues) -> Self {
            self.tpm_support = Some(input);
            self
        }
        /// <p>If the image is configured for NitroTPM support, the value is <code>v2.0</code>. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/nitrotpm.html">NitroTPM</a> in the <i>Amazon EC2 User Guide</i>.</p>
        pub fn set_tpm_support(
            mut self,
            input: std::option::Option<crate::model::TpmSupportValues>,
        ) -> Self {
            self.tpm_support = input;
            self
        }
        /// <p>The date and time to deprecate the AMI, in UTC, in the following format: <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z. If you specified a value for seconds, Amazon EC2 rounds the seconds to the nearest minute.</p>
        pub fn deprecation_time(mut self, input: impl Into<std::string::String>) -> Self {
            self.deprecation_time = Some(input.into());
            self
        }
        /// <p>The date and time to deprecate the AMI, in UTC, in the following format: <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z. If you specified a value for seconds, Amazon EC2 rounds the seconds to the nearest minute.</p>
        pub fn set_deprecation_time(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.deprecation_time = input;
            self
        }
        /// <p>If <code>v2.0</code>, it indicates that IMDSv2 is specified in the AMI. Instances launched from this AMI will have <code>HttpTokens</code> automatically set to <code>required</code> so that, by default, the instance requires that IMDSv2 is used when requesting instance metadata. In addition, <code>HttpPutResponseHopLimit</code> is set to <code>2</code>. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-IMDS-new-instances.html#configure-IMDS-new-instances-ami-configuration">Configure the AMI</a> in the <i>Amazon EC2 User Guide</i>.</p>
        pub fn imds_support(mut self, input: crate::model::ImdsSupportValues) -> Self {
            self.imds_support = Some(input);
            self
        }
        /// <p>If <code>v2.0</code>, it indicates that IMDSv2 is specified in the AMI. Instances launched from this AMI will have <code>HttpTokens</code> automatically set to <code>required</code> so that, by default, the instance requires that IMDSv2 is used when requesting instance metadata. In addition, <code>HttpPutResponseHopLimit</code> is set to <code>2</code>. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-IMDS-new-instances.html#configure-IMDS-new-instances-ami-configuration">Configure the AMI</a> in the <i>Amazon EC2 User Guide</i>.</p>
        pub fn set_imds_support(
            mut self,
            input: std::option::Option<crate::model::ImdsSupportValues>,
        ) -> Self {
            self.imds_support = input;
            self
        }
        /// Consumes the builder and constructs a [`Image`](crate::model::Image).
        pub fn build(self) -> crate::model::Image {
            crate::model::Image {
                architecture: self.architecture,
                creation_date: self.creation_date,
                image_id: self.image_id,
                image_location: self.image_location,
                image_type: self.image_type,
                public: self.public,
                kernel_id: self.kernel_id,
                owner_id: self.owner_id,
                platform: self.platform,
                platform_details: self.platform_details,
                usage_operation: self.usage_operation,
                product_codes: self.product_codes,
                ramdisk_id: self.ramdisk_id,
                state: self.state,
                block_device_mappings: self.block_device_mappings,
                description: self.description,
                ena_support: self.ena_support,
                hypervisor: self.hypervisor,
                image_owner_alias: self.image_owner_alias,
                name: self.name,
                root_device_name: self.root_device_name,
                root_device_type: self.root_device_type,
                sriov_net_support: self.sriov_net_support,
                state_reason: self.state_reason,
                tags: self.tags,
                virtualization_type: self.virtualization_type,
                boot_mode: self.boot_mode,
                tpm_support: self.tpm_support,
                deprecation_time: self.deprecation_time,
                imds_support: self.imds_support,
            }
        }
    }
}
impl Image {
    /// Creates a new builder-style object to manufacture [`Image`](crate::model::Image).
    pub fn builder() -> crate::model::image::Builder {
        crate::model::image::Builder::default()
    }
}

/// When writing a match expression against `ImageState`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let imagestate = unimplemented!();
/// match imagestate {
///     ImageState::Available => { /* ... */ },
///     ImageState::Deregistered => { /* ... */ },
///     ImageState::Error => { /* ... */ },
///     ImageState::Failed => { /* ... */ },
///     ImageState::Invalid => { /* ... */ },
///     ImageState::Pending => { /* ... */ },
///     ImageState::Transient => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `imagestate` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `ImageState::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `ImageState::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `ImageState::NewFeature` is defined.
/// Specifically, when `imagestate` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `ImageState::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 ImageState {
    #[allow(missing_docs)] // documentation missing in model
    Available,
    #[allow(missing_docs)] // documentation missing in model
    Deregistered,
    #[allow(missing_docs)] // documentation missing in model
    Error,
    #[allow(missing_docs)] // documentation missing in model
    Failed,
    #[allow(missing_docs)] // documentation missing in model
    Invalid,
    #[allow(missing_docs)] // documentation missing in model
    Pending,
    #[allow(missing_docs)] // documentation missing in model
    Transient,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for ImageState {
    fn from(s: &str) -> Self {
        match s {
            "available" => ImageState::Available,
            "deregistered" => ImageState::Deregistered,
            "error" => ImageState::Error,
            "failed" => ImageState::Failed,
            "invalid" => ImageState::Invalid,
            "pending" => ImageState::Pending,
            "transient" => ImageState::Transient,
            other => ImageState::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for ImageState {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(ImageState::from(s))
    }
}
impl ImageState {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            ImageState::Available => "available",
            ImageState::Deregistered => "deregistered",
            ImageState::Error => "error",
            ImageState::Failed => "failed",
            ImageState::Invalid => "invalid",
            ImageState::Pending => "pending",
            ImageState::Transient => "transient",
            ImageState::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &[
            "available",
            "deregistered",
            "error",
            "failed",
            "invalid",
            "pending",
            "transient",
        ]
    }
}
impl AsRef<str> for ImageState {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `ImageTypeValues`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let imagetypevalues = unimplemented!();
/// match imagetypevalues {
///     ImageTypeValues::Kernel => { /* ... */ },
///     ImageTypeValues::Machine => { /* ... */ },
///     ImageTypeValues::Ramdisk => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `imagetypevalues` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `ImageTypeValues::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `ImageTypeValues::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `ImageTypeValues::NewFeature` is defined.
/// Specifically, when `imagetypevalues` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `ImageTypeValues::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 ImageTypeValues {
    #[allow(missing_docs)] // documentation missing in model
    Kernel,
    #[allow(missing_docs)] // documentation missing in model
    Machine,
    #[allow(missing_docs)] // documentation missing in model
    Ramdisk,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for ImageTypeValues {
    fn from(s: &str) -> Self {
        match s {
            "kernel" => ImageTypeValues::Kernel,
            "machine" => ImageTypeValues::Machine,
            "ramdisk" => ImageTypeValues::Ramdisk,
            other => ImageTypeValues::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for ImageTypeValues {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(ImageTypeValues::from(s))
    }
}
impl ImageTypeValues {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            ImageTypeValues::Kernel => "kernel",
            ImageTypeValues::Machine => "machine",
            ImageTypeValues::Ramdisk => "ramdisk",
            ImageTypeValues::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["kernel", "machine", "ramdisk"]
    }
}
impl AsRef<str> for ImageTypeValues {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `ImageAttributeName`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let imageattributename = unimplemented!();
/// match imageattributename {
///     ImageAttributeName::BlockDeviceMapping => { /* ... */ },
///     ImageAttributeName::BootMode => { /* ... */ },
///     ImageAttributeName::Description => { /* ... */ },
///     ImageAttributeName::ImdsSupport => { /* ... */ },
///     ImageAttributeName::Kernel => { /* ... */ },
///     ImageAttributeName::LastLaunchedTime => { /* ... */ },
///     ImageAttributeName::LaunchPermission => { /* ... */ },
///     ImageAttributeName::ProductCodes => { /* ... */ },
///     ImageAttributeName::Ramdisk => { /* ... */ },
///     ImageAttributeName::SriovNetSupport => { /* ... */ },
///     ImageAttributeName::TpmSupport => { /* ... */ },
///     ImageAttributeName::UefiData => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `imageattributename` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `ImageAttributeName::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `ImageAttributeName::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `ImageAttributeName::NewFeature` is defined.
/// Specifically, when `imageattributename` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `ImageAttributeName::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 ImageAttributeName {
    #[allow(missing_docs)] // documentation missing in model
    BlockDeviceMapping,
    #[allow(missing_docs)] // documentation missing in model
    BootMode,
    #[allow(missing_docs)] // documentation missing in model
    Description,
    #[allow(missing_docs)] // documentation missing in model
    ImdsSupport,
    #[allow(missing_docs)] // documentation missing in model
    Kernel,
    #[allow(missing_docs)] // documentation missing in model
    LastLaunchedTime,
    #[allow(missing_docs)] // documentation missing in model
    LaunchPermission,
    #[allow(missing_docs)] // documentation missing in model
    ProductCodes,
    #[allow(missing_docs)] // documentation missing in model
    Ramdisk,
    #[allow(missing_docs)] // documentation missing in model
    SriovNetSupport,
    #[allow(missing_docs)] // documentation missing in model
    TpmSupport,
    #[allow(missing_docs)] // documentation missing in model
    UefiData,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for ImageAttributeName {
    fn from(s: &str) -> Self {
        match s {
            "blockDeviceMapping" => ImageAttributeName::BlockDeviceMapping,
            "bootMode" => ImageAttributeName::BootMode,
            "description" => ImageAttributeName::Description,
            "imdsSupport" => ImageAttributeName::ImdsSupport,
            "kernel" => ImageAttributeName::Kernel,
            "lastLaunchedTime" => ImageAttributeName::LastLaunchedTime,
            "launchPermission" => ImageAttributeName::LaunchPermission,
            "productCodes" => ImageAttributeName::ProductCodes,
            "ramdisk" => ImageAttributeName::Ramdisk,
            "sriovNetSupport" => ImageAttributeName::SriovNetSupport,
            "tpmSupport" => ImageAttributeName::TpmSupport,
            "uefiData" => ImageAttributeName::UefiData,
            other => {
                ImageAttributeName::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for ImageAttributeName {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(ImageAttributeName::from(s))
    }
}
impl ImageAttributeName {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            ImageAttributeName::BlockDeviceMapping => "blockDeviceMapping",
            ImageAttributeName::BootMode => "bootMode",
            ImageAttributeName::Description => "description",
            ImageAttributeName::ImdsSupport => "imdsSupport",
            ImageAttributeName::Kernel => "kernel",
            ImageAttributeName::LastLaunchedTime => "lastLaunchedTime",
            ImageAttributeName::LaunchPermission => "launchPermission",
            ImageAttributeName::ProductCodes => "productCodes",
            ImageAttributeName::Ramdisk => "ramdisk",
            ImageAttributeName::SriovNetSupport => "sriovNetSupport",
            ImageAttributeName::TpmSupport => "tpmSupport",
            ImageAttributeName::UefiData => "uefiData",
            ImageAttributeName::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &[
            "blockDeviceMapping",
            "bootMode",
            "description",
            "imdsSupport",
            "kernel",
            "lastLaunchedTime",
            "launchPermission",
            "productCodes",
            "ramdisk",
            "sriovNetSupport",
            "tpmSupport",
            "uefiData",
        ]
    }
}
impl AsRef<str> for ImageAttributeName {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes the properties of the Dedicated Host.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Host {
    /// <p>Whether auto-placement is on or off.</p>
    #[doc(hidden)]
    pub auto_placement: std::option::Option<crate::model::AutoPlacement>,
    /// <p>The Availability Zone of the Dedicated Host.</p>
    #[doc(hidden)]
    pub availability_zone: std::option::Option<std::string::String>,
    /// <p>Information about the instances running on the Dedicated Host.</p>
    #[doc(hidden)]
    pub available_capacity: std::option::Option<crate::model::AvailableCapacity>,
    /// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring Idempotency</a>.</p>
    #[doc(hidden)]
    pub client_token: std::option::Option<std::string::String>,
    /// <p>The ID of the Dedicated Host.</p>
    #[doc(hidden)]
    pub host_id: std::option::Option<std::string::String>,
    /// <p>The hardware specifications of the Dedicated Host.</p>
    #[doc(hidden)]
    pub host_properties: std::option::Option<crate::model::HostProperties>,
    /// <p>The reservation ID of the Dedicated Host. This returns a <code>null</code> response if the Dedicated Host doesn't have an associated reservation.</p>
    #[doc(hidden)]
    pub host_reservation_id: std::option::Option<std::string::String>,
    /// <p>The IDs and instance type that are currently running on the Dedicated Host.</p>
    #[doc(hidden)]
    pub instances: std::option::Option<std::vec::Vec<crate::model::HostInstance>>,
    /// <p>The Dedicated Host's state.</p>
    #[doc(hidden)]
    pub state: std::option::Option<crate::model::AllocationState>,
    /// <p>The time that the Dedicated Host was allocated.</p>
    #[doc(hidden)]
    pub allocation_time: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The time that the Dedicated Host was released.</p>
    #[doc(hidden)]
    pub release_time: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>Any tags assigned to the Dedicated Host.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    /// <p>Indicates whether host recovery is enabled or disabled for the Dedicated Host.</p>
    #[doc(hidden)]
    pub host_recovery: std::option::Option<crate::model::HostRecovery>,
    /// <p>Indicates whether the Dedicated Host supports multiple instance types of the same instance family. If the value is <code>on</code>, the Dedicated Host supports multiple instance types in the instance family. If the value is <code>off</code>, the Dedicated Host supports a single instance type only.</p>
    #[doc(hidden)]
    pub allows_multiple_instance_types:
        std::option::Option<crate::model::AllowsMultipleInstanceTypes>,
    /// <p>The ID of the Amazon Web Services account that owns the Dedicated Host.</p>
    #[doc(hidden)]
    pub owner_id: std::option::Option<std::string::String>,
    /// <p>The ID of the Availability Zone in which the Dedicated Host is allocated.</p>
    #[doc(hidden)]
    pub availability_zone_id: std::option::Option<std::string::String>,
    /// <p>Indicates whether the Dedicated Host is in a host resource group. If <b>memberOfServiceLinkedResourceGroup</b> is <code>true</code>, the host is in a host resource group; otherwise, it is not.</p>
    #[doc(hidden)]
    pub member_of_service_linked_resource_group: std::option::Option<bool>,
    /// <p>The Amazon Resource Name (ARN) of the Amazon Web Services Outpost on which the Dedicated Host is allocated.</p>
    #[doc(hidden)]
    pub outpost_arn: std::option::Option<std::string::String>,
}
impl Host {
    /// <p>Whether auto-placement is on or off.</p>
    pub fn auto_placement(&self) -> std::option::Option<&crate::model::AutoPlacement> {
        self.auto_placement.as_ref()
    }
    /// <p>The Availability Zone of the Dedicated Host.</p>
    pub fn availability_zone(&self) -> std::option::Option<&str> {
        self.availability_zone.as_deref()
    }
    /// <p>Information about the instances running on the Dedicated Host.</p>
    pub fn available_capacity(&self) -> std::option::Option<&crate::model::AvailableCapacity> {
        self.available_capacity.as_ref()
    }
    /// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring Idempotency</a>.</p>
    pub fn client_token(&self) -> std::option::Option<&str> {
        self.client_token.as_deref()
    }
    /// <p>The ID of the Dedicated Host.</p>
    pub fn host_id(&self) -> std::option::Option<&str> {
        self.host_id.as_deref()
    }
    /// <p>The hardware specifications of the Dedicated Host.</p>
    pub fn host_properties(&self) -> std::option::Option<&crate::model::HostProperties> {
        self.host_properties.as_ref()
    }
    /// <p>The reservation ID of the Dedicated Host. This returns a <code>null</code> response if the Dedicated Host doesn't have an associated reservation.</p>
    pub fn host_reservation_id(&self) -> std::option::Option<&str> {
        self.host_reservation_id.as_deref()
    }
    /// <p>The IDs and instance type that are currently running on the Dedicated Host.</p>
    pub fn instances(&self) -> std::option::Option<&[crate::model::HostInstance]> {
        self.instances.as_deref()
    }
    /// <p>The Dedicated Host's state.</p>
    pub fn state(&self) -> std::option::Option<&crate::model::AllocationState> {
        self.state.as_ref()
    }
    /// <p>The time that the Dedicated Host was allocated.</p>
    pub fn allocation_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.allocation_time.as_ref()
    }
    /// <p>The time that the Dedicated Host was released.</p>
    pub fn release_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.release_time.as_ref()
    }
    /// <p>Any tags assigned to the Dedicated Host.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
    /// <p>Indicates whether host recovery is enabled or disabled for the Dedicated Host.</p>
    pub fn host_recovery(&self) -> std::option::Option<&crate::model::HostRecovery> {
        self.host_recovery.as_ref()
    }
    /// <p>Indicates whether the Dedicated Host supports multiple instance types of the same instance family. If the value is <code>on</code>, the Dedicated Host supports multiple instance types in the instance family. If the value is <code>off</code>, the Dedicated Host supports a single instance type only.</p>
    pub fn allows_multiple_instance_types(
        &self,
    ) -> std::option::Option<&crate::model::AllowsMultipleInstanceTypes> {
        self.allows_multiple_instance_types.as_ref()
    }
    /// <p>The ID of the Amazon Web Services account that owns the Dedicated Host.</p>
    pub fn owner_id(&self) -> std::option::Option<&str> {
        self.owner_id.as_deref()
    }
    /// <p>The ID of the Availability Zone in which the Dedicated Host is allocated.</p>
    pub fn availability_zone_id(&self) -> std::option::Option<&str> {
        self.availability_zone_id.as_deref()
    }
    /// <p>Indicates whether the Dedicated Host is in a host resource group. If <b>memberOfServiceLinkedResourceGroup</b> is <code>true</code>, the host is in a host resource group; otherwise, it is not.</p>
    pub fn member_of_service_linked_resource_group(&self) -> std::option::Option<bool> {
        self.member_of_service_linked_resource_group
    }
    /// <p>The Amazon Resource Name (ARN) of the Amazon Web Services Outpost on which the Dedicated Host is allocated.</p>
    pub fn outpost_arn(&self) -> std::option::Option<&str> {
        self.outpost_arn.as_deref()
    }
}
/// See [`Host`](crate::model::Host).
pub mod host {

    /// A builder for [`Host`](crate::model::Host).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) auto_placement: std::option::Option<crate::model::AutoPlacement>,
        pub(crate) availability_zone: std::option::Option<std::string::String>,
        pub(crate) available_capacity: std::option::Option<crate::model::AvailableCapacity>,
        pub(crate) client_token: std::option::Option<std::string::String>,
        pub(crate) host_id: std::option::Option<std::string::String>,
        pub(crate) host_properties: std::option::Option<crate::model::HostProperties>,
        pub(crate) host_reservation_id: std::option::Option<std::string::String>,
        pub(crate) instances: std::option::Option<std::vec::Vec<crate::model::HostInstance>>,
        pub(crate) state: std::option::Option<crate::model::AllocationState>,
        pub(crate) allocation_time: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) release_time: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        pub(crate) host_recovery: std::option::Option<crate::model::HostRecovery>,
        pub(crate) allows_multiple_instance_types:
            std::option::Option<crate::model::AllowsMultipleInstanceTypes>,
        pub(crate) owner_id: std::option::Option<std::string::String>,
        pub(crate) availability_zone_id: std::option::Option<std::string::String>,
        pub(crate) member_of_service_linked_resource_group: std::option::Option<bool>,
        pub(crate) outpost_arn: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>Whether auto-placement is on or off.</p>
        pub fn auto_placement(mut self, input: crate::model::AutoPlacement) -> Self {
            self.auto_placement = Some(input);
            self
        }
        /// <p>Whether auto-placement is on or off.</p>
        pub fn set_auto_placement(
            mut self,
            input: std::option::Option<crate::model::AutoPlacement>,
        ) -> Self {
            self.auto_placement = input;
            self
        }
        /// <p>The Availability Zone of the Dedicated Host.</p>
        pub fn availability_zone(mut self, input: impl Into<std::string::String>) -> Self {
            self.availability_zone = Some(input.into());
            self
        }
        /// <p>The Availability Zone of the Dedicated Host.</p>
        pub fn set_availability_zone(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.availability_zone = input;
            self
        }
        /// <p>Information about the instances running on the Dedicated Host.</p>
        pub fn available_capacity(mut self, input: crate::model::AvailableCapacity) -> Self {
            self.available_capacity = Some(input);
            self
        }
        /// <p>Information about the instances running on the Dedicated Host.</p>
        pub fn set_available_capacity(
            mut self,
            input: std::option::Option<crate::model::AvailableCapacity>,
        ) -> Self {
            self.available_capacity = input;
            self
        }
        /// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring Idempotency</a>.</p>
        pub fn client_token(mut self, input: impl Into<std::string::String>) -> Self {
            self.client_token = Some(input.into());
            self
        }
        /// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring Idempotency</a>.</p>
        pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.client_token = input;
            self
        }
        /// <p>The ID of the Dedicated Host.</p>
        pub fn host_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.host_id = Some(input.into());
            self
        }
        /// <p>The ID of the Dedicated Host.</p>
        pub fn set_host_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.host_id = input;
            self
        }
        /// <p>The hardware specifications of the Dedicated Host.</p>
        pub fn host_properties(mut self, input: crate::model::HostProperties) -> Self {
            self.host_properties = Some(input);
            self
        }
        /// <p>The hardware specifications of the Dedicated Host.</p>
        pub fn set_host_properties(
            mut self,
            input: std::option::Option<crate::model::HostProperties>,
        ) -> Self {
            self.host_properties = input;
            self
        }
        /// <p>The reservation ID of the Dedicated Host. This returns a <code>null</code> response if the Dedicated Host doesn't have an associated reservation.</p>
        pub fn host_reservation_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.host_reservation_id = Some(input.into());
            self
        }
        /// <p>The reservation ID of the Dedicated Host. This returns a <code>null</code> response if the Dedicated Host doesn't have an associated reservation.</p>
        pub fn set_host_reservation_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.host_reservation_id = input;
            self
        }
        /// Appends an item to `instances`.
        ///
        /// To override the contents of this collection use [`set_instances`](Self::set_instances).
        ///
        /// <p>The IDs and instance type that are currently running on the Dedicated Host.</p>
        pub fn instances(mut self, input: crate::model::HostInstance) -> Self {
            let mut v = self.instances.unwrap_or_default();
            v.push(input);
            self.instances = Some(v);
            self
        }
        /// <p>The IDs and instance type that are currently running on the Dedicated Host.</p>
        pub fn set_instances(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::HostInstance>>,
        ) -> Self {
            self.instances = input;
            self
        }
        /// <p>The Dedicated Host's state.</p>
        pub fn state(mut self, input: crate::model::AllocationState) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>The Dedicated Host's state.</p>
        pub fn set_state(
            mut self,
            input: std::option::Option<crate::model::AllocationState>,
        ) -> Self {
            self.state = input;
            self
        }
        /// <p>The time that the Dedicated Host was allocated.</p>
        pub fn allocation_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.allocation_time = Some(input);
            self
        }
        /// <p>The time that the Dedicated Host was allocated.</p>
        pub fn set_allocation_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.allocation_time = input;
            self
        }
        /// <p>The time that the Dedicated Host was released.</p>
        pub fn release_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.release_time = Some(input);
            self
        }
        /// <p>The time that the Dedicated Host was released.</p>
        pub fn set_release_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.release_time = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>Any tags assigned to the Dedicated Host.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>Any tags assigned to the Dedicated Host.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// <p>Indicates whether host recovery is enabled or disabled for the Dedicated Host.</p>
        pub fn host_recovery(mut self, input: crate::model::HostRecovery) -> Self {
            self.host_recovery = Some(input);
            self
        }
        /// <p>Indicates whether host recovery is enabled or disabled for the Dedicated Host.</p>
        pub fn set_host_recovery(
            mut self,
            input: std::option::Option<crate::model::HostRecovery>,
        ) -> Self {
            self.host_recovery = input;
            self
        }
        /// <p>Indicates whether the Dedicated Host supports multiple instance types of the same instance family. If the value is <code>on</code>, the Dedicated Host supports multiple instance types in the instance family. If the value is <code>off</code>, the Dedicated Host supports a single instance type only.</p>
        pub fn allows_multiple_instance_types(
            mut self,
            input: crate::model::AllowsMultipleInstanceTypes,
        ) -> Self {
            self.allows_multiple_instance_types = Some(input);
            self
        }
        /// <p>Indicates whether the Dedicated Host supports multiple instance types of the same instance family. If the value is <code>on</code>, the Dedicated Host supports multiple instance types in the instance family. If the value is <code>off</code>, the Dedicated Host supports a single instance type only.</p>
        pub fn set_allows_multiple_instance_types(
            mut self,
            input: std::option::Option<crate::model::AllowsMultipleInstanceTypes>,
        ) -> Self {
            self.allows_multiple_instance_types = input;
            self
        }
        /// <p>The ID of the Amazon Web Services account that owns the Dedicated Host.</p>
        pub fn owner_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.owner_id = Some(input.into());
            self
        }
        /// <p>The ID of the Amazon Web Services account that owns the Dedicated Host.</p>
        pub fn set_owner_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.owner_id = input;
            self
        }
        /// <p>The ID of the Availability Zone in which the Dedicated Host is allocated.</p>
        pub fn availability_zone_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.availability_zone_id = Some(input.into());
            self
        }
        /// <p>The ID of the Availability Zone in which the Dedicated Host is allocated.</p>
        pub fn set_availability_zone_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.availability_zone_id = input;
            self
        }
        /// <p>Indicates whether the Dedicated Host is in a host resource group. If <b>memberOfServiceLinkedResourceGroup</b> is <code>true</code>, the host is in a host resource group; otherwise, it is not.</p>
        pub fn member_of_service_linked_resource_group(mut self, input: bool) -> Self {
            self.member_of_service_linked_resource_group = Some(input);
            self
        }
        /// <p>Indicates whether the Dedicated Host is in a host resource group. If <b>memberOfServiceLinkedResourceGroup</b> is <code>true</code>, the host is in a host resource group; otherwise, it is not.</p>
        pub fn set_member_of_service_linked_resource_group(
            mut self,
            input: std::option::Option<bool>,
        ) -> Self {
            self.member_of_service_linked_resource_group = input;
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the Amazon Web Services Outpost on which the Dedicated Host is allocated.</p>
        pub fn outpost_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.outpost_arn = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the Amazon Web Services Outpost on which the Dedicated Host is allocated.</p>
        pub fn set_outpost_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.outpost_arn = input;
            self
        }
        /// Consumes the builder and constructs a [`Host`](crate::model::Host).
        pub fn build(self) -> crate::model::Host {
            crate::model::Host {
                auto_placement: self.auto_placement,
                availability_zone: self.availability_zone,
                available_capacity: self.available_capacity,
                client_token: self.client_token,
                host_id: self.host_id,
                host_properties: self.host_properties,
                host_reservation_id: self.host_reservation_id,
                instances: self.instances,
                state: self.state,
                allocation_time: self.allocation_time,
                release_time: self.release_time,
                tags: self.tags,
                host_recovery: self.host_recovery,
                allows_multiple_instance_types: self.allows_multiple_instance_types,
                owner_id: self.owner_id,
                availability_zone_id: self.availability_zone_id,
                member_of_service_linked_resource_group: self
                    .member_of_service_linked_resource_group,
                outpost_arn: self.outpost_arn,
            }
        }
    }
}
impl Host {
    /// Creates a new builder-style object to manufacture [`Host`](crate::model::Host).
    pub fn builder() -> crate::model::host::Builder {
        crate::model::host::Builder::default()
    }
}

/// When writing a match expression against `AllowsMultipleInstanceTypes`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let allowsmultipleinstancetypes = unimplemented!();
/// match allowsmultipleinstancetypes {
///     AllowsMultipleInstanceTypes::Off => { /* ... */ },
///     AllowsMultipleInstanceTypes::On => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `allowsmultipleinstancetypes` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `AllowsMultipleInstanceTypes::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `AllowsMultipleInstanceTypes::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `AllowsMultipleInstanceTypes::NewFeature` is defined.
/// Specifically, when `allowsmultipleinstancetypes` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `AllowsMultipleInstanceTypes::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 AllowsMultipleInstanceTypes {
    #[allow(missing_docs)] // documentation missing in model
    Off,
    #[allow(missing_docs)] // documentation missing in model
    On,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for AllowsMultipleInstanceTypes {
    fn from(s: &str) -> Self {
        match s {
            "off" => AllowsMultipleInstanceTypes::Off,
            "on" => AllowsMultipleInstanceTypes::On,
            other => AllowsMultipleInstanceTypes::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for AllowsMultipleInstanceTypes {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(AllowsMultipleInstanceTypes::from(s))
    }
}
impl AllowsMultipleInstanceTypes {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            AllowsMultipleInstanceTypes::Off => "off",
            AllowsMultipleInstanceTypes::On => "on",
            AllowsMultipleInstanceTypes::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["off", "on"]
    }
}
impl AsRef<str> for AllowsMultipleInstanceTypes {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `AllocationState`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let allocationstate = unimplemented!();
/// match allocationstate {
///     AllocationState::Available => { /* ... */ },
///     AllocationState::Pending => { /* ... */ },
///     AllocationState::PermanentFailure => { /* ... */ },
///     AllocationState::Released => { /* ... */ },
///     AllocationState::ReleasedPermanentFailure => { /* ... */ },
///     AllocationState::UnderAssessment => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `allocationstate` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `AllocationState::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `AllocationState::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `AllocationState::NewFeature` is defined.
/// Specifically, when `allocationstate` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `AllocationState::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 AllocationState {
    #[allow(missing_docs)] // documentation missing in model
    Available,
    #[allow(missing_docs)] // documentation missing in model
    Pending,
    #[allow(missing_docs)] // documentation missing in model
    PermanentFailure,
    #[allow(missing_docs)] // documentation missing in model
    Released,
    #[allow(missing_docs)] // documentation missing in model
    ReleasedPermanentFailure,
    #[allow(missing_docs)] // documentation missing in model
    UnderAssessment,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for AllocationState {
    fn from(s: &str) -> Self {
        match s {
            "available" => AllocationState::Available,
            "pending" => AllocationState::Pending,
            "permanent-failure" => AllocationState::PermanentFailure,
            "released" => AllocationState::Released,
            "released-permanent-failure" => AllocationState::ReleasedPermanentFailure,
            "under-assessment" => AllocationState::UnderAssessment,
            other => AllocationState::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for AllocationState {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(AllocationState::from(s))
    }
}
impl AllocationState {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            AllocationState::Available => "available",
            AllocationState::Pending => "pending",
            AllocationState::PermanentFailure => "permanent-failure",
            AllocationState::Released => "released",
            AllocationState::ReleasedPermanentFailure => "released-permanent-failure",
            AllocationState::UnderAssessment => "under-assessment",
            AllocationState::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &[
            "available",
            "pending",
            "permanent-failure",
            "released",
            "released-permanent-failure",
            "under-assessment",
        ]
    }
}
impl AsRef<str> for AllocationState {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes an instance running on a Dedicated Host.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct HostInstance {
    /// <p>The ID of instance that is running on the Dedicated Host.</p>
    #[doc(hidden)]
    pub instance_id: std::option::Option<std::string::String>,
    /// <p>The instance type (for example, <code>m3.medium</code>) of the running instance.</p>
    #[doc(hidden)]
    pub instance_type: std::option::Option<std::string::String>,
    /// <p>The ID of the Amazon Web Services account that owns the instance.</p>
    #[doc(hidden)]
    pub owner_id: std::option::Option<std::string::String>,
}
impl HostInstance {
    /// <p>The ID of instance that is running on the Dedicated Host.</p>
    pub fn instance_id(&self) -> std::option::Option<&str> {
        self.instance_id.as_deref()
    }
    /// <p>The instance type (for example, <code>m3.medium</code>) of the running instance.</p>
    pub fn instance_type(&self) -> std::option::Option<&str> {
        self.instance_type.as_deref()
    }
    /// <p>The ID of the Amazon Web Services account that owns the instance.</p>
    pub fn owner_id(&self) -> std::option::Option<&str> {
        self.owner_id.as_deref()
    }
}
/// See [`HostInstance`](crate::model::HostInstance).
pub mod host_instance {

    /// A builder for [`HostInstance`](crate::model::HostInstance).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) instance_id: std::option::Option<std::string::String>,
        pub(crate) instance_type: std::option::Option<std::string::String>,
        pub(crate) owner_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The ID of instance that is running on the Dedicated Host.</p>
        pub fn instance_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.instance_id = Some(input.into());
            self
        }
        /// <p>The ID of instance that is running on the Dedicated Host.</p>
        pub fn set_instance_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.instance_id = input;
            self
        }
        /// <p>The instance type (for example, <code>m3.medium</code>) of the running instance.</p>
        pub fn instance_type(mut self, input: impl Into<std::string::String>) -> Self {
            self.instance_type = Some(input.into());
            self
        }
        /// <p>The instance type (for example, <code>m3.medium</code>) of the running instance.</p>
        pub fn set_instance_type(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.instance_type = input;
            self
        }
        /// <p>The ID of the Amazon Web Services account that owns the instance.</p>
        pub fn owner_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.owner_id = Some(input.into());
            self
        }
        /// <p>The ID of the Amazon Web Services account that owns the instance.</p>
        pub fn set_owner_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.owner_id = input;
            self
        }
        /// Consumes the builder and constructs a [`HostInstance`](crate::model::HostInstance).
        pub fn build(self) -> crate::model::HostInstance {
            crate::model::HostInstance {
                instance_id: self.instance_id,
                instance_type: self.instance_type,
                owner_id: self.owner_id,
            }
        }
    }
}
impl HostInstance {
    /// Creates a new builder-style object to manufacture [`HostInstance`](crate::model::HostInstance).
    pub fn builder() -> crate::model::host_instance::Builder {
        crate::model::host_instance::Builder::default()
    }
}

/// <p>Describes the properties of a Dedicated Host.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct HostProperties {
    /// <p>The number of cores on the Dedicated Host.</p>
    #[doc(hidden)]
    pub cores: std::option::Option<i32>,
    /// <p>The instance type supported by the Dedicated Host. For example, <code>m5.large</code>. If the host supports multiple instance types, no <b>instanceType</b> is returned.</p>
    #[doc(hidden)]
    pub instance_type: std::option::Option<std::string::String>,
    /// <p>The instance family supported by the Dedicated Host. For example, <code>m5</code>.</p>
    #[doc(hidden)]
    pub instance_family: std::option::Option<std::string::String>,
    /// <p>The number of sockets on the Dedicated Host.</p>
    #[doc(hidden)]
    pub sockets: std::option::Option<i32>,
    /// <p>The total number of vCPUs on the Dedicated Host.</p>
    #[doc(hidden)]
    pub total_v_cpus: std::option::Option<i32>,
}
impl HostProperties {
    /// <p>The number of cores on the Dedicated Host.</p>
    pub fn cores(&self) -> std::option::Option<i32> {
        self.cores
    }
    /// <p>The instance type supported by the Dedicated Host. For example, <code>m5.large</code>. If the host supports multiple instance types, no <b>instanceType</b> is returned.</p>
    pub fn instance_type(&self) -> std::option::Option<&str> {
        self.instance_type.as_deref()
    }
    /// <p>The instance family supported by the Dedicated Host. For example, <code>m5</code>.</p>
    pub fn instance_family(&self) -> std::option::Option<&str> {
        self.instance_family.as_deref()
    }
    /// <p>The number of sockets on the Dedicated Host.</p>
    pub fn sockets(&self) -> std::option::Option<i32> {
        self.sockets
    }
    /// <p>The total number of vCPUs on the Dedicated Host.</p>
    pub fn total_v_cpus(&self) -> std::option::Option<i32> {
        self.total_v_cpus
    }
}
/// See [`HostProperties`](crate::model::HostProperties).
pub mod host_properties {

    /// A builder for [`HostProperties`](crate::model::HostProperties).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) cores: std::option::Option<i32>,
        pub(crate) instance_type: std::option::Option<std::string::String>,
        pub(crate) instance_family: std::option::Option<std::string::String>,
        pub(crate) sockets: std::option::Option<i32>,
        pub(crate) total_v_cpus: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>The number of cores on the Dedicated Host.</p>
        pub fn cores(mut self, input: i32) -> Self {
            self.cores = Some(input);
            self
        }
        /// <p>The number of cores on the Dedicated Host.</p>
        pub fn set_cores(mut self, input: std::option::Option<i32>) -> Self {
            self.cores = input;
            self
        }
        /// <p>The instance type supported by the Dedicated Host. For example, <code>m5.large</code>. If the host supports multiple instance types, no <b>instanceType</b> is returned.</p>
        pub fn instance_type(mut self, input: impl Into<std::string::String>) -> Self {
            self.instance_type = Some(input.into());
            self
        }
        /// <p>The instance type supported by the Dedicated Host. For example, <code>m5.large</code>. If the host supports multiple instance types, no <b>instanceType</b> is returned.</p>
        pub fn set_instance_type(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.instance_type = input;
            self
        }
        /// <p>The instance family supported by the Dedicated Host. For example, <code>m5</code>.</p>
        pub fn instance_family(mut self, input: impl Into<std::string::String>) -> Self {
            self.instance_family = Some(input.into());
            self
        }
        /// <p>The instance family supported by the Dedicated Host. For example, <code>m5</code>.</p>
        pub fn set_instance_family(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.instance_family = input;
            self
        }
        /// <p>The number of sockets on the Dedicated Host.</p>
        pub fn sockets(mut self, input: i32) -> Self {
            self.sockets = Some(input);
            self
        }
        /// <p>The number of sockets on the Dedicated Host.</p>
        pub fn set_sockets(mut self, input: std::option::Option<i32>) -> Self {
            self.sockets = input;
            self
        }
        /// <p>The total number of vCPUs on the Dedicated Host.</p>
        pub fn total_v_cpus(mut self, input: i32) -> Self {
            self.total_v_cpus = Some(input);
            self
        }
        /// <p>The total number of vCPUs on the Dedicated Host.</p>
        pub fn set_total_v_cpus(mut self, input: std::option::Option<i32>) -> Self {
            self.total_v_cpus = input;
            self
        }
        /// Consumes the builder and constructs a [`HostProperties`](crate::model::HostProperties).
        pub fn build(self) -> crate::model::HostProperties {
            crate::model::HostProperties {
                cores: self.cores,
                instance_type: self.instance_type,
                instance_family: self.instance_family,
                sockets: self.sockets,
                total_v_cpus: self.total_v_cpus,
            }
        }
    }
}
impl HostProperties {
    /// Creates a new builder-style object to manufacture [`HostProperties`](crate::model::HostProperties).
    pub fn builder() -> crate::model::host_properties::Builder {
        crate::model::host_properties::Builder::default()
    }
}

/// <p>The capacity information for instances that can be launched onto the Dedicated Host. </p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AvailableCapacity {
    /// <p>The number of instances that can be launched onto the Dedicated Host depending on the host's available capacity. For Dedicated Hosts that support multiple instance types, this parameter represents the number of instances for each instance size that is supported on the host.</p>
    #[doc(hidden)]
    pub available_instance_capacity:
        std::option::Option<std::vec::Vec<crate::model::InstanceCapacity>>,
    /// <p>The number of vCPUs available for launching instances onto the Dedicated Host.</p>
    #[doc(hidden)]
    pub available_v_cpus: std::option::Option<i32>,
}
impl AvailableCapacity {
    /// <p>The number of instances that can be launched onto the Dedicated Host depending on the host's available capacity. For Dedicated Hosts that support multiple instance types, this parameter represents the number of instances for each instance size that is supported on the host.</p>
    pub fn available_instance_capacity(
        &self,
    ) -> std::option::Option<&[crate::model::InstanceCapacity]> {
        self.available_instance_capacity.as_deref()
    }
    /// <p>The number of vCPUs available for launching instances onto the Dedicated Host.</p>
    pub fn available_v_cpus(&self) -> std::option::Option<i32> {
        self.available_v_cpus
    }
}
/// See [`AvailableCapacity`](crate::model::AvailableCapacity).
pub mod available_capacity {

    /// A builder for [`AvailableCapacity`](crate::model::AvailableCapacity).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) available_instance_capacity:
            std::option::Option<std::vec::Vec<crate::model::InstanceCapacity>>,
        pub(crate) available_v_cpus: std::option::Option<i32>,
    }
    impl Builder {
        /// Appends an item to `available_instance_capacity`.
        ///
        /// To override the contents of this collection use [`set_available_instance_capacity`](Self::set_available_instance_capacity).
        ///
        /// <p>The number of instances that can be launched onto the Dedicated Host depending on the host's available capacity. For Dedicated Hosts that support multiple instance types, this parameter represents the number of instances for each instance size that is supported on the host.</p>
        pub fn available_instance_capacity(
            mut self,
            input: crate::model::InstanceCapacity,
        ) -> Self {
            let mut v = self.available_instance_capacity.unwrap_or_default();
            v.push(input);
            self.available_instance_capacity = Some(v);
            self
        }
        /// <p>The number of instances that can be launched onto the Dedicated Host depending on the host's available capacity. For Dedicated Hosts that support multiple instance types, this parameter represents the number of instances for each instance size that is supported on the host.</p>
        pub fn set_available_instance_capacity(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::InstanceCapacity>>,
        ) -> Self {
            self.available_instance_capacity = input;
            self
        }
        /// <p>The number of vCPUs available for launching instances onto the Dedicated Host.</p>
        pub fn available_v_cpus(mut self, input: i32) -> Self {
            self.available_v_cpus = Some(input);
            self
        }
        /// <p>The number of vCPUs available for launching instances onto the Dedicated Host.</p>
        pub fn set_available_v_cpus(mut self, input: std::option::Option<i32>) -> Self {
            self.available_v_cpus = input;
            self
        }
        /// Consumes the builder and constructs a [`AvailableCapacity`](crate::model::AvailableCapacity).
        pub fn build(self) -> crate::model::AvailableCapacity {
            crate::model::AvailableCapacity {
                available_instance_capacity: self.available_instance_capacity,
                available_v_cpus: self.available_v_cpus,
            }
        }
    }
}
impl AvailableCapacity {
    /// Creates a new builder-style object to manufacture [`AvailableCapacity`](crate::model::AvailableCapacity).
    pub fn builder() -> crate::model::available_capacity::Builder {
        crate::model::available_capacity::Builder::default()
    }
}

/// <p>Information about the number of instances that can be launched onto the Dedicated Host.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InstanceCapacity {
    /// <p>The number of instances that can be launched onto the Dedicated Host based on the host's available capacity.</p>
    #[doc(hidden)]
    pub available_capacity: std::option::Option<i32>,
    /// <p>The instance type supported by the Dedicated Host.</p>
    #[doc(hidden)]
    pub instance_type: std::option::Option<std::string::String>,
    /// <p>The total number of instances that can be launched onto the Dedicated Host if there are no instances running on it.</p>
    #[doc(hidden)]
    pub total_capacity: std::option::Option<i32>,
}
impl InstanceCapacity {
    /// <p>The number of instances that can be launched onto the Dedicated Host based on the host's available capacity.</p>
    pub fn available_capacity(&self) -> std::option::Option<i32> {
        self.available_capacity
    }
    /// <p>The instance type supported by the Dedicated Host.</p>
    pub fn instance_type(&self) -> std::option::Option<&str> {
        self.instance_type.as_deref()
    }
    /// <p>The total number of instances that can be launched onto the Dedicated Host if there are no instances running on it.</p>
    pub fn total_capacity(&self) -> std::option::Option<i32> {
        self.total_capacity
    }
}
/// See [`InstanceCapacity`](crate::model::InstanceCapacity).
pub mod instance_capacity {

    /// A builder for [`InstanceCapacity`](crate::model::InstanceCapacity).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) available_capacity: std::option::Option<i32>,
        pub(crate) instance_type: std::option::Option<std::string::String>,
        pub(crate) total_capacity: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>The number of instances that can be launched onto the Dedicated Host based on the host's available capacity.</p>
        pub fn available_capacity(mut self, input: i32) -> Self {
            self.available_capacity = Some(input);
            self
        }
        /// <p>The number of instances that can be launched onto the Dedicated Host based on the host's available capacity.</p>
        pub fn set_available_capacity(mut self, input: std::option::Option<i32>) -> Self {
            self.available_capacity = input;
            self
        }
        /// <p>The instance type supported by the Dedicated Host.</p>
        pub fn instance_type(mut self, input: impl Into<std::string::String>) -> Self {
            self.instance_type = Some(input.into());
            self
        }
        /// <p>The instance type supported by the Dedicated Host.</p>
        pub fn set_instance_type(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.instance_type = input;
            self
        }
        /// <p>The total number of instances that can be launched onto the Dedicated Host if there are no instances running on it.</p>
        pub fn total_capacity(mut self, input: i32) -> Self {
            self.total_capacity = Some(input);
            self
        }
        /// <p>The total number of instances that can be launched onto the Dedicated Host if there are no instances running on it.</p>
        pub fn set_total_capacity(mut self, input: std::option::Option<i32>) -> Self {
            self.total_capacity = input;
            self
        }
        /// Consumes the builder and constructs a [`InstanceCapacity`](crate::model::InstanceCapacity).
        pub fn build(self) -> crate::model::InstanceCapacity {
            crate::model::InstanceCapacity {
                available_capacity: self.available_capacity,
                instance_type: self.instance_type,
                total_capacity: self.total_capacity,
            }
        }
    }
}
impl InstanceCapacity {
    /// Creates a new builder-style object to manufacture [`InstanceCapacity`](crate::model::InstanceCapacity).
    pub fn builder() -> crate::model::instance_capacity::Builder {
        crate::model::instance_capacity::Builder::default()
    }
}

/// <p>Details about the Dedicated Host Reservation and associated Dedicated Hosts.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct HostReservation {
    /// <p>The number of Dedicated Hosts the reservation is associated with.</p>
    #[doc(hidden)]
    pub count: std::option::Option<i32>,
    /// <p>The currency in which the <code>upfrontPrice</code> and <code>hourlyPrice</code> amounts are specified. At this time, the only supported currency is <code>USD</code>.</p>
    #[doc(hidden)]
    pub currency_code: std::option::Option<crate::model::CurrencyCodeValues>,
    /// <p>The length of the reservation's term, specified in seconds. Can be <code>31536000 (1 year)</code> | <code>94608000 (3 years)</code>.</p>
    #[doc(hidden)]
    pub duration: std::option::Option<i32>,
    /// <p>The date and time that the reservation ends.</p>
    #[doc(hidden)]
    pub end: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The IDs of the Dedicated Hosts associated with the reservation.</p>
    #[doc(hidden)]
    pub host_id_set: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>The ID of the reservation that specifies the associated Dedicated Hosts.</p>
    #[doc(hidden)]
    pub host_reservation_id: std::option::Option<std::string::String>,
    /// <p>The hourly price of the reservation.</p>
    #[doc(hidden)]
    pub hourly_price: std::option::Option<std::string::String>,
    /// <p>The instance family of the Dedicated Host Reservation. The instance family on the Dedicated Host must be the same in order for it to benefit from the reservation.</p>
    #[doc(hidden)]
    pub instance_family: std::option::Option<std::string::String>,
    /// <p>The ID of the reservation. This remains the same regardless of which Dedicated Hosts are associated with it.</p>
    #[doc(hidden)]
    pub offering_id: std::option::Option<std::string::String>,
    /// <p>The payment option selected for this reservation.</p>
    #[doc(hidden)]
    pub payment_option: std::option::Option<crate::model::PaymentOption>,
    /// <p>The date and time that the reservation started.</p>
    #[doc(hidden)]
    pub start: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The state of the reservation.</p>
    #[doc(hidden)]
    pub state: std::option::Option<crate::model::ReservationState>,
    /// <p>The upfront price of the reservation.</p>
    #[doc(hidden)]
    pub upfront_price: std::option::Option<std::string::String>,
    /// <p>Any tags assigned to the Dedicated Host Reservation.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl HostReservation {
    /// <p>The number of Dedicated Hosts the reservation is associated with.</p>
    pub fn count(&self) -> std::option::Option<i32> {
        self.count
    }
    /// <p>The currency in which the <code>upfrontPrice</code> and <code>hourlyPrice</code> amounts are specified. At this time, the only supported currency is <code>USD</code>.</p>
    pub fn currency_code(&self) -> std::option::Option<&crate::model::CurrencyCodeValues> {
        self.currency_code.as_ref()
    }
    /// <p>The length of the reservation's term, specified in seconds. Can be <code>31536000 (1 year)</code> | <code>94608000 (3 years)</code>.</p>
    pub fn duration(&self) -> std::option::Option<i32> {
        self.duration
    }
    /// <p>The date and time that the reservation ends.</p>
    pub fn end(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.end.as_ref()
    }
    /// <p>The IDs of the Dedicated Hosts associated with the reservation.</p>
    pub fn host_id_set(&self) -> std::option::Option<&[std::string::String]> {
        self.host_id_set.as_deref()
    }
    /// <p>The ID of the reservation that specifies the associated Dedicated Hosts.</p>
    pub fn host_reservation_id(&self) -> std::option::Option<&str> {
        self.host_reservation_id.as_deref()
    }
    /// <p>The hourly price of the reservation.</p>
    pub fn hourly_price(&self) -> std::option::Option<&str> {
        self.hourly_price.as_deref()
    }
    /// <p>The instance family of the Dedicated Host Reservation. The instance family on the Dedicated Host must be the same in order for it to benefit from the reservation.</p>
    pub fn instance_family(&self) -> std::option::Option<&str> {
        self.instance_family.as_deref()
    }
    /// <p>The ID of the reservation. This remains the same regardless of which Dedicated Hosts are associated with it.</p>
    pub fn offering_id(&self) -> std::option::Option<&str> {
        self.offering_id.as_deref()
    }
    /// <p>The payment option selected for this reservation.</p>
    pub fn payment_option(&self) -> std::option::Option<&crate::model::PaymentOption> {
        self.payment_option.as_ref()
    }
    /// <p>The date and time that the reservation started.</p>
    pub fn start(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.start.as_ref()
    }
    /// <p>The state of the reservation.</p>
    pub fn state(&self) -> std::option::Option<&crate::model::ReservationState> {
        self.state.as_ref()
    }
    /// <p>The upfront price of the reservation.</p>
    pub fn upfront_price(&self) -> std::option::Option<&str> {
        self.upfront_price.as_deref()
    }
    /// <p>Any tags assigned to the Dedicated Host Reservation.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
}
/// See [`HostReservation`](crate::model::HostReservation).
pub mod host_reservation {

    /// A builder for [`HostReservation`](crate::model::HostReservation).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) count: std::option::Option<i32>,
        pub(crate) currency_code: std::option::Option<crate::model::CurrencyCodeValues>,
        pub(crate) duration: std::option::Option<i32>,
        pub(crate) end: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) host_id_set: std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) host_reservation_id: std::option::Option<std::string::String>,
        pub(crate) hourly_price: std::option::Option<std::string::String>,
        pub(crate) instance_family: std::option::Option<std::string::String>,
        pub(crate) offering_id: std::option::Option<std::string::String>,
        pub(crate) payment_option: std::option::Option<crate::model::PaymentOption>,
        pub(crate) start: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) state: std::option::Option<crate::model::ReservationState>,
        pub(crate) upfront_price: std::option::Option<std::string::String>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    }
    impl Builder {
        /// <p>The number of Dedicated Hosts the reservation is associated with.</p>
        pub fn count(mut self, input: i32) -> Self {
            self.count = Some(input);
            self
        }
        /// <p>The number of Dedicated Hosts the reservation is associated with.</p>
        pub fn set_count(mut self, input: std::option::Option<i32>) -> Self {
            self.count = input;
            self
        }
        /// <p>The currency in which the <code>upfrontPrice</code> and <code>hourlyPrice</code> amounts are specified. At this time, the only supported currency is <code>USD</code>.</p>
        pub fn currency_code(mut self, input: crate::model::CurrencyCodeValues) -> Self {
            self.currency_code = Some(input);
            self
        }
        /// <p>The currency in which the <code>upfrontPrice</code> and <code>hourlyPrice</code> amounts are specified. At this time, the only supported currency is <code>USD</code>.</p>
        pub fn set_currency_code(
            mut self,
            input: std::option::Option<crate::model::CurrencyCodeValues>,
        ) -> Self {
            self.currency_code = input;
            self
        }
        /// <p>The length of the reservation's term, specified in seconds. Can be <code>31536000 (1 year)</code> | <code>94608000 (3 years)</code>.</p>
        pub fn duration(mut self, input: i32) -> Self {
            self.duration = Some(input);
            self
        }
        /// <p>The length of the reservation's term, specified in seconds. Can be <code>31536000 (1 year)</code> | <code>94608000 (3 years)</code>.</p>
        pub fn set_duration(mut self, input: std::option::Option<i32>) -> Self {
            self.duration = input;
            self
        }
        /// <p>The date and time that the reservation ends.</p>
        pub fn end(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.end = Some(input);
            self
        }
        /// <p>The date and time that the reservation ends.</p>
        pub fn set_end(mut self, input: std::option::Option<aws_smithy_types::DateTime>) -> Self {
            self.end = input;
            self
        }
        /// Appends an item to `host_id_set`.
        ///
        /// To override the contents of this collection use [`set_host_id_set`](Self::set_host_id_set).
        ///
        /// <p>The IDs of the Dedicated Hosts associated with the reservation.</p>
        pub fn host_id_set(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.host_id_set.unwrap_or_default();
            v.push(input.into());
            self.host_id_set = Some(v);
            self
        }
        /// <p>The IDs of the Dedicated Hosts associated with the reservation.</p>
        pub fn set_host_id_set(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.host_id_set = input;
            self
        }
        /// <p>The ID of the reservation that specifies the associated Dedicated Hosts.</p>
        pub fn host_reservation_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.host_reservation_id = Some(input.into());
            self
        }
        /// <p>The ID of the reservation that specifies the associated Dedicated Hosts.</p>
        pub fn set_host_reservation_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.host_reservation_id = input;
            self
        }
        /// <p>The hourly price of the reservation.</p>
        pub fn hourly_price(mut self, input: impl Into<std::string::String>) -> Self {
            self.hourly_price = Some(input.into());
            self
        }
        /// <p>The hourly price of the reservation.</p>
        pub fn set_hourly_price(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.hourly_price = input;
            self
        }
        /// <p>The instance family of the Dedicated Host Reservation. The instance family on the Dedicated Host must be the same in order for it to benefit from the reservation.</p>
        pub fn instance_family(mut self, input: impl Into<std::string::String>) -> Self {
            self.instance_family = Some(input.into());
            self
        }
        /// <p>The instance family of the Dedicated Host Reservation. The instance family on the Dedicated Host must be the same in order for it to benefit from the reservation.</p>
        pub fn set_instance_family(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.instance_family = input;
            self
        }
        /// <p>The ID of the reservation. This remains the same regardless of which Dedicated Hosts are associated with it.</p>
        pub fn offering_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.offering_id = Some(input.into());
            self
        }
        /// <p>The ID of the reservation. This remains the same regardless of which Dedicated Hosts are associated with it.</p>
        pub fn set_offering_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.offering_id = input;
            self
        }
        /// <p>The payment option selected for this reservation.</p>
        pub fn payment_option(mut self, input: crate::model::PaymentOption) -> Self {
            self.payment_option = Some(input);
            self
        }
        /// <p>The payment option selected for this reservation.</p>
        pub fn set_payment_option(
            mut self,
            input: std::option::Option<crate::model::PaymentOption>,
        ) -> Self {
            self.payment_option = input;
            self
        }
        /// <p>The date and time that the reservation started.</p>
        pub fn start(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.start = Some(input);
            self
        }
        /// <p>The date and time that the reservation started.</p>
        pub fn set_start(mut self, input: std::option::Option<aws_smithy_types::DateTime>) -> Self {
            self.start = input;
            self
        }
        /// <p>The state of the reservation.</p>
        pub fn state(mut self, input: crate::model::ReservationState) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>The state of the reservation.</p>
        pub fn set_state(
            mut self,
            input: std::option::Option<crate::model::ReservationState>,
        ) -> Self {
            self.state = input;
            self
        }
        /// <p>The upfront price of the reservation.</p>
        pub fn upfront_price(mut self, input: impl Into<std::string::String>) -> Self {
            self.upfront_price = Some(input.into());
            self
        }
        /// <p>The upfront price of the reservation.</p>
        pub fn set_upfront_price(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.upfront_price = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>Any tags assigned to the Dedicated Host Reservation.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>Any tags assigned to the Dedicated Host Reservation.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// Consumes the builder and constructs a [`HostReservation`](crate::model::HostReservation).
        pub fn build(self) -> crate::model::HostReservation {
            crate::model::HostReservation {
                count: self.count,
                currency_code: self.currency_code,
                duration: self.duration,
                end: self.end,
                host_id_set: self.host_id_set,
                host_reservation_id: self.host_reservation_id,
                hourly_price: self.hourly_price,
                instance_family: self.instance_family,
                offering_id: self.offering_id,
                payment_option: self.payment_option,
                start: self.start,
                state: self.state,
                upfront_price: self.upfront_price,
                tags: self.tags,
            }
        }
    }
}
impl HostReservation {
    /// Creates a new builder-style object to manufacture [`HostReservation`](crate::model::HostReservation).
    pub fn builder() -> crate::model::host_reservation::Builder {
        crate::model::host_reservation::Builder::default()
    }
}

/// When writing a match expression against `ReservationState`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let reservationstate = unimplemented!();
/// match reservationstate {
///     ReservationState::Active => { /* ... */ },
///     ReservationState::PaymentFailed => { /* ... */ },
///     ReservationState::PaymentPending => { /* ... */ },
///     ReservationState::Retired => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `reservationstate` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `ReservationState::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `ReservationState::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `ReservationState::NewFeature` is defined.
/// Specifically, when `reservationstate` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `ReservationState::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 ReservationState {
    #[allow(missing_docs)] // documentation missing in model
    Active,
    #[allow(missing_docs)] // documentation missing in model
    PaymentFailed,
    #[allow(missing_docs)] // documentation missing in model
    PaymentPending,
    #[allow(missing_docs)] // documentation missing in model
    Retired,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for ReservationState {
    fn from(s: &str) -> Self {
        match s {
            "active" => ReservationState::Active,
            "payment-failed" => ReservationState::PaymentFailed,
            "payment-pending" => ReservationState::PaymentPending,
            "retired" => ReservationState::Retired,
            other => ReservationState::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for ReservationState {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(ReservationState::from(s))
    }
}
impl ReservationState {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            ReservationState::Active => "active",
            ReservationState::PaymentFailed => "payment-failed",
            ReservationState::PaymentPending => "payment-pending",
            ReservationState::Retired => "retired",
            ReservationState::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["active", "payment-failed", "payment-pending", "retired"]
    }
}
impl AsRef<str> for ReservationState {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Details about the Dedicated Host Reservation offering.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct HostOffering {
    /// <p>The currency of the offering.</p>
    #[doc(hidden)]
    pub currency_code: std::option::Option<crate::model::CurrencyCodeValues>,
    /// <p>The duration of the offering (in seconds).</p>
    #[doc(hidden)]
    pub duration: std::option::Option<i32>,
    /// <p>The hourly price of the offering.</p>
    #[doc(hidden)]
    pub hourly_price: std::option::Option<std::string::String>,
    /// <p>The instance family of the offering.</p>
    #[doc(hidden)]
    pub instance_family: std::option::Option<std::string::String>,
    /// <p>The ID of the offering.</p>
    #[doc(hidden)]
    pub offering_id: std::option::Option<std::string::String>,
    /// <p>The available payment option.</p>
    #[doc(hidden)]
    pub payment_option: std::option::Option<crate::model::PaymentOption>,
    /// <p>The upfront price of the offering. Does not apply to No Upfront offerings.</p>
    #[doc(hidden)]
    pub upfront_price: std::option::Option<std::string::String>,
}
impl HostOffering {
    /// <p>The currency of the offering.</p>
    pub fn currency_code(&self) -> std::option::Option<&crate::model::CurrencyCodeValues> {
        self.currency_code.as_ref()
    }
    /// <p>The duration of the offering (in seconds).</p>
    pub fn duration(&self) -> std::option::Option<i32> {
        self.duration
    }
    /// <p>The hourly price of the offering.</p>
    pub fn hourly_price(&self) -> std::option::Option<&str> {
        self.hourly_price.as_deref()
    }
    /// <p>The instance family of the offering.</p>
    pub fn instance_family(&self) -> std::option::Option<&str> {
        self.instance_family.as_deref()
    }
    /// <p>The ID of the offering.</p>
    pub fn offering_id(&self) -> std::option::Option<&str> {
        self.offering_id.as_deref()
    }
    /// <p>The available payment option.</p>
    pub fn payment_option(&self) -> std::option::Option<&crate::model::PaymentOption> {
        self.payment_option.as_ref()
    }
    /// <p>The upfront price of the offering. Does not apply to No Upfront offerings.</p>
    pub fn upfront_price(&self) -> std::option::Option<&str> {
        self.upfront_price.as_deref()
    }
}
/// See [`HostOffering`](crate::model::HostOffering).
pub mod host_offering {

    /// A builder for [`HostOffering`](crate::model::HostOffering).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) currency_code: std::option::Option<crate::model::CurrencyCodeValues>,
        pub(crate) duration: std::option::Option<i32>,
        pub(crate) hourly_price: std::option::Option<std::string::String>,
        pub(crate) instance_family: std::option::Option<std::string::String>,
        pub(crate) offering_id: std::option::Option<std::string::String>,
        pub(crate) payment_option: std::option::Option<crate::model::PaymentOption>,
        pub(crate) upfront_price: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The currency of the offering.</p>
        pub fn currency_code(mut self, input: crate::model::CurrencyCodeValues) -> Self {
            self.currency_code = Some(input);
            self
        }
        /// <p>The currency of the offering.</p>
        pub fn set_currency_code(
            mut self,
            input: std::option::Option<crate::model::CurrencyCodeValues>,
        ) -> Self {
            self.currency_code = input;
            self
        }
        /// <p>The duration of the offering (in seconds).</p>
        pub fn duration(mut self, input: i32) -> Self {
            self.duration = Some(input);
            self
        }
        /// <p>The duration of the offering (in seconds).</p>
        pub fn set_duration(mut self, input: std::option::Option<i32>) -> Self {
            self.duration = input;
            self
        }
        /// <p>The hourly price of the offering.</p>
        pub fn hourly_price(mut self, input: impl Into<std::string::String>) -> Self {
            self.hourly_price = Some(input.into());
            self
        }
        /// <p>The hourly price of the offering.</p>
        pub fn set_hourly_price(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.hourly_price = input;
            self
        }
        /// <p>The instance family of the offering.</p>
        pub fn instance_family(mut self, input: impl Into<std::string::String>) -> Self {
            self.instance_family = Some(input.into());
            self
        }
        /// <p>The instance family of the offering.</p>
        pub fn set_instance_family(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.instance_family = input;
            self
        }
        /// <p>The ID of the offering.</p>
        pub fn offering_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.offering_id = Some(input.into());
            self
        }
        /// <p>The ID of the offering.</p>
        pub fn set_offering_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.offering_id = input;
            self
        }
        /// <p>The available payment option.</p>
        pub fn payment_option(mut self, input: crate::model::PaymentOption) -> Self {
            self.payment_option = Some(input);
            self
        }
        /// <p>The available payment option.</p>
        pub fn set_payment_option(
            mut self,
            input: std::option::Option<crate::model::PaymentOption>,
        ) -> Self {
            self.payment_option = input;
            self
        }
        /// <p>The upfront price of the offering. Does not apply to No Upfront offerings.</p>
        pub fn upfront_price(mut self, input: impl Into<std::string::String>) -> Self {
            self.upfront_price = Some(input.into());
            self
        }
        /// <p>The upfront price of the offering. Does not apply to No Upfront offerings.</p>
        pub fn set_upfront_price(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.upfront_price = input;
            self
        }
        /// Consumes the builder and constructs a [`HostOffering`](crate::model::HostOffering).
        pub fn build(self) -> crate::model::HostOffering {
            crate::model::HostOffering {
                currency_code: self.currency_code,
                duration: self.duration,
                hourly_price: self.hourly_price,
                instance_family: self.instance_family,
                offering_id: self.offering_id,
                payment_option: self.payment_option,
                upfront_price: self.upfront_price,
            }
        }
    }
}
impl HostOffering {
    /// Creates a new builder-style object to manufacture [`HostOffering`](crate::model::HostOffering).
    pub fn builder() -> crate::model::host_offering::Builder {
        crate::model::host_offering::Builder::default()
    }
}

/// <p>Describes an Amazon FPGA image (AFI).</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct FpgaImage {
    /// <p>The FPGA image identifier (AFI ID).</p>
    #[doc(hidden)]
    pub fpga_image_id: std::option::Option<std::string::String>,
    /// <p>The global FPGA image identifier (AGFI ID).</p>
    #[doc(hidden)]
    pub fpga_image_global_id: std::option::Option<std::string::String>,
    /// <p>The name of the AFI.</p>
    #[doc(hidden)]
    pub name: std::option::Option<std::string::String>,
    /// <p>The description of the AFI.</p>
    #[doc(hidden)]
    pub description: std::option::Option<std::string::String>,
    /// <p>The version of the Amazon Web Services Shell that was used to create the bitstream.</p>
    #[doc(hidden)]
    pub shell_version: std::option::Option<std::string::String>,
    /// <p>Information about the PCI bus.</p>
    #[doc(hidden)]
    pub pci_id: std::option::Option<crate::model::PciId>,
    /// <p>Information about the state of the AFI.</p>
    #[doc(hidden)]
    pub state: std::option::Option<crate::model::FpgaImageState>,
    /// <p>The date and time the AFI was created.</p>
    #[doc(hidden)]
    pub create_time: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The time of the most recent update to the AFI.</p>
    #[doc(hidden)]
    pub update_time: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The ID of the Amazon Web Services account that owns the AFI.</p>
    #[doc(hidden)]
    pub owner_id: std::option::Option<std::string::String>,
    /// <p>The alias of the AFI owner. Possible values include <code>self</code>, <code>amazon</code>, and <code>aws-marketplace</code>.</p>
    #[doc(hidden)]
    pub owner_alias: std::option::Option<std::string::String>,
    /// <p>The product codes for the AFI.</p>
    #[doc(hidden)]
    pub product_codes: std::option::Option<std::vec::Vec<crate::model::ProductCode>>,
    /// <p>Any tags assigned to the AFI.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    /// <p>Indicates whether the AFI is public.</p>
    #[doc(hidden)]
    pub public: std::option::Option<bool>,
    /// <p>Indicates whether data retention support is enabled for the AFI.</p>
    #[doc(hidden)]
    pub data_retention_support: std::option::Option<bool>,
    /// <p>The instance types supported by the AFI.</p>
    #[doc(hidden)]
    pub instance_types: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl FpgaImage {
    /// <p>The FPGA image identifier (AFI ID).</p>
    pub fn fpga_image_id(&self) -> std::option::Option<&str> {
        self.fpga_image_id.as_deref()
    }
    /// <p>The global FPGA image identifier (AGFI ID).</p>
    pub fn fpga_image_global_id(&self) -> std::option::Option<&str> {
        self.fpga_image_global_id.as_deref()
    }
    /// <p>The name of the AFI.</p>
    pub fn name(&self) -> std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The description of the AFI.</p>
    pub fn description(&self) -> std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The version of the Amazon Web Services Shell that was used to create the bitstream.</p>
    pub fn shell_version(&self) -> std::option::Option<&str> {
        self.shell_version.as_deref()
    }
    /// <p>Information about the PCI bus.</p>
    pub fn pci_id(&self) -> std::option::Option<&crate::model::PciId> {
        self.pci_id.as_ref()
    }
    /// <p>Information about the state of the AFI.</p>
    pub fn state(&self) -> std::option::Option<&crate::model::FpgaImageState> {
        self.state.as_ref()
    }
    /// <p>The date and time the AFI was created.</p>
    pub fn create_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.create_time.as_ref()
    }
    /// <p>The time of the most recent update to the AFI.</p>
    pub fn update_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.update_time.as_ref()
    }
    /// <p>The ID of the Amazon Web Services account that owns the AFI.</p>
    pub fn owner_id(&self) -> std::option::Option<&str> {
        self.owner_id.as_deref()
    }
    /// <p>The alias of the AFI owner. Possible values include <code>self</code>, <code>amazon</code>, and <code>aws-marketplace</code>.</p>
    pub fn owner_alias(&self) -> std::option::Option<&str> {
        self.owner_alias.as_deref()
    }
    /// <p>The product codes for the AFI.</p>
    pub fn product_codes(&self) -> std::option::Option<&[crate::model::ProductCode]> {
        self.product_codes.as_deref()
    }
    /// <p>Any tags assigned to the AFI.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
    /// <p>Indicates whether the AFI is public.</p>
    pub fn public(&self) -> std::option::Option<bool> {
        self.public
    }
    /// <p>Indicates whether data retention support is enabled for the AFI.</p>
    pub fn data_retention_support(&self) -> std::option::Option<bool> {
        self.data_retention_support
    }
    /// <p>The instance types supported by the AFI.</p>
    pub fn instance_types(&self) -> std::option::Option<&[std::string::String]> {
        self.instance_types.as_deref()
    }
}
/// See [`FpgaImage`](crate::model::FpgaImage).
pub mod fpga_image {

    /// A builder for [`FpgaImage`](crate::model::FpgaImage).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) fpga_image_id: std::option::Option<std::string::String>,
        pub(crate) fpga_image_global_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) shell_version: std::option::Option<std::string::String>,
        pub(crate) pci_id: std::option::Option<crate::model::PciId>,
        pub(crate) state: std::option::Option<crate::model::FpgaImageState>,
        pub(crate) create_time: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) update_time: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) owner_id: std::option::Option<std::string::String>,
        pub(crate) owner_alias: std::option::Option<std::string::String>,
        pub(crate) product_codes: std::option::Option<std::vec::Vec<crate::model::ProductCode>>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        pub(crate) public: std::option::Option<bool>,
        pub(crate) data_retention_support: std::option::Option<bool>,
        pub(crate) instance_types: std::option::Option<std::vec::Vec<std::string::String>>,
    }
    impl Builder {
        /// <p>The FPGA image identifier (AFI ID).</p>
        pub fn fpga_image_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.fpga_image_id = Some(input.into());
            self
        }
        /// <p>The FPGA image identifier (AFI ID).</p>
        pub fn set_fpga_image_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.fpga_image_id = input;
            self
        }
        /// <p>The global FPGA image identifier (AGFI ID).</p>
        pub fn fpga_image_global_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.fpga_image_global_id = Some(input.into());
            self
        }
        /// <p>The global FPGA image identifier (AGFI ID).</p>
        pub fn set_fpga_image_global_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.fpga_image_global_id = input;
            self
        }
        /// <p>The name of the AFI.</p>
        pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
            self.name = Some(input.into());
            self
        }
        /// <p>The name of the AFI.</p>
        pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.name = input;
            self
        }
        /// <p>The description of the AFI.</p>
        pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
            self.description = Some(input.into());
            self
        }
        /// <p>The description of the AFI.</p>
        pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.description = input;
            self
        }
        /// <p>The version of the Amazon Web Services Shell that was used to create the bitstream.</p>
        pub fn shell_version(mut self, input: impl Into<std::string::String>) -> Self {
            self.shell_version = Some(input.into());
            self
        }
        /// <p>The version of the Amazon Web Services Shell that was used to create the bitstream.</p>
        pub fn set_shell_version(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.shell_version = input;
            self
        }
        /// <p>Information about the PCI bus.</p>
        pub fn pci_id(mut self, input: crate::model::PciId) -> Self {
            self.pci_id = Some(input);
            self
        }
        /// <p>Information about the PCI bus.</p>
        pub fn set_pci_id(mut self, input: std::option::Option<crate::model::PciId>) -> Self {
            self.pci_id = input;
            self
        }
        /// <p>Information about the state of the AFI.</p>
        pub fn state(mut self, input: crate::model::FpgaImageState) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>Information about the state of the AFI.</p>
        pub fn set_state(
            mut self,
            input: std::option::Option<crate::model::FpgaImageState>,
        ) -> Self {
            self.state = input;
            self
        }
        /// <p>The date and time the AFI was created.</p>
        pub fn create_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.create_time = Some(input);
            self
        }
        /// <p>The date and time the AFI was created.</p>
        pub fn set_create_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.create_time = input;
            self
        }
        /// <p>The time of the most recent update to the AFI.</p>
        pub fn update_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.update_time = Some(input);
            self
        }
        /// <p>The time of the most recent update to the AFI.</p>
        pub fn set_update_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.update_time = input;
            self
        }
        /// <p>The ID of the Amazon Web Services account that owns the AFI.</p>
        pub fn owner_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.owner_id = Some(input.into());
            self
        }
        /// <p>The ID of the Amazon Web Services account that owns the AFI.</p>
        pub fn set_owner_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.owner_id = input;
            self
        }
        /// <p>The alias of the AFI owner. Possible values include <code>self</code>, <code>amazon</code>, and <code>aws-marketplace</code>.</p>
        pub fn owner_alias(mut self, input: impl Into<std::string::String>) -> Self {
            self.owner_alias = Some(input.into());
            self
        }
        /// <p>The alias of the AFI owner. Possible values include <code>self</code>, <code>amazon</code>, and <code>aws-marketplace</code>.</p>
        pub fn set_owner_alias(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.owner_alias = input;
            self
        }
        /// Appends an item to `product_codes`.
        ///
        /// To override the contents of this collection use [`set_product_codes`](Self::set_product_codes).
        ///
        /// <p>The product codes for the AFI.</p>
        pub fn product_codes(mut self, input: crate::model::ProductCode) -> Self {
            let mut v = self.product_codes.unwrap_or_default();
            v.push(input);
            self.product_codes = Some(v);
            self
        }
        /// <p>The product codes for the AFI.</p>
        pub fn set_product_codes(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::ProductCode>>,
        ) -> Self {
            self.product_codes = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>Any tags assigned to the AFI.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>Any tags assigned to the AFI.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// <p>Indicates whether the AFI is public.</p>
        pub fn public(mut self, input: bool) -> Self {
            self.public = Some(input);
            self
        }
        /// <p>Indicates whether the AFI is public.</p>
        pub fn set_public(mut self, input: std::option::Option<bool>) -> Self {
            self.public = input;
            self
        }
        /// <p>Indicates whether data retention support is enabled for the AFI.</p>
        pub fn data_retention_support(mut self, input: bool) -> Self {
            self.data_retention_support = Some(input);
            self
        }
        /// <p>Indicates whether data retention support is enabled for the AFI.</p>
        pub fn set_data_retention_support(mut self, input: std::option::Option<bool>) -> Self {
            self.data_retention_support = input;
            self
        }
        /// Appends an item to `instance_types`.
        ///
        /// To override the contents of this collection use [`set_instance_types`](Self::set_instance_types).
        ///
        /// <p>The instance types supported by the AFI.</p>
        pub fn instance_types(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.instance_types.unwrap_or_default();
            v.push(input.into());
            self.instance_types = Some(v);
            self
        }
        /// <p>The instance types supported by the AFI.</p>
        pub fn set_instance_types(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.instance_types = input;
            self
        }
        /// Consumes the builder and constructs a [`FpgaImage`](crate::model::FpgaImage).
        pub fn build(self) -> crate::model::FpgaImage {
            crate::model::FpgaImage {
                fpga_image_id: self.fpga_image_id,
                fpga_image_global_id: self.fpga_image_global_id,
                name: self.name,
                description: self.description,
                shell_version: self.shell_version,
                pci_id: self.pci_id,
                state: self.state,
                create_time: self.create_time,
                update_time: self.update_time,
                owner_id: self.owner_id,
                owner_alias: self.owner_alias,
                product_codes: self.product_codes,
                tags: self.tags,
                public: self.public,
                data_retention_support: self.data_retention_support,
                instance_types: self.instance_types,
            }
        }
    }
}
impl FpgaImage {
    /// Creates a new builder-style object to manufacture [`FpgaImage`](crate::model::FpgaImage).
    pub fn builder() -> crate::model::fpga_image::Builder {
        crate::model::fpga_image::Builder::default()
    }
}

/// <p>Describes the state of the bitstream generation process for an Amazon FPGA image (AFI).</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct FpgaImageState {
    /// <p>The state. The following are the possible values:</p>
    /// <ul>
    /// <li> <p> <code>pending</code> - AFI bitstream generation is in progress.</p> </li>
    /// <li> <p> <code>available</code> - The AFI is available for use.</p> </li>
    /// <li> <p> <code>failed</code> - AFI bitstream generation failed.</p> </li>
    /// <li> <p> <code>unavailable</code> - The AFI is no longer available for use.</p> </li>
    /// </ul>
    #[doc(hidden)]
    pub code: std::option::Option<crate::model::FpgaImageStateCode>,
    /// <p>If the state is <code>failed</code>, this is the error message.</p>
    #[doc(hidden)]
    pub message: std::option::Option<std::string::String>,
}
impl FpgaImageState {
    /// <p>The state. The following are the possible values:</p>
    /// <ul>
    /// <li> <p> <code>pending</code> - AFI bitstream generation is in progress.</p> </li>
    /// <li> <p> <code>available</code> - The AFI is available for use.</p> </li>
    /// <li> <p> <code>failed</code> - AFI bitstream generation failed.</p> </li>
    /// <li> <p> <code>unavailable</code> - The AFI is no longer available for use.</p> </li>
    /// </ul>
    pub fn code(&self) -> std::option::Option<&crate::model::FpgaImageStateCode> {
        self.code.as_ref()
    }
    /// <p>If the state is <code>failed</code>, this is the error message.</p>
    pub fn message(&self) -> std::option::Option<&str> {
        self.message.as_deref()
    }
}
/// See [`FpgaImageState`](crate::model::FpgaImageState).
pub mod fpga_image_state {

    /// A builder for [`FpgaImageState`](crate::model::FpgaImageState).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) code: std::option::Option<crate::model::FpgaImageStateCode>,
        pub(crate) message: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The state. The following are the possible values:</p>
        /// <ul>
        /// <li> <p> <code>pending</code> - AFI bitstream generation is in progress.</p> </li>
        /// <li> <p> <code>available</code> - The AFI is available for use.</p> </li>
        /// <li> <p> <code>failed</code> - AFI bitstream generation failed.</p> </li>
        /// <li> <p> <code>unavailable</code> - The AFI is no longer available for use.</p> </li>
        /// </ul>
        pub fn code(mut self, input: crate::model::FpgaImageStateCode) -> Self {
            self.code = Some(input);
            self
        }
        /// <p>The state. The following are the possible values:</p>
        /// <ul>
        /// <li> <p> <code>pending</code> - AFI bitstream generation is in progress.</p> </li>
        /// <li> <p> <code>available</code> - The AFI is available for use.</p> </li>
        /// <li> <p> <code>failed</code> - AFI bitstream generation failed.</p> </li>
        /// <li> <p> <code>unavailable</code> - The AFI is no longer available for use.</p> </li>
        /// </ul>
        pub fn set_code(
            mut self,
            input: std::option::Option<crate::model::FpgaImageStateCode>,
        ) -> Self {
            self.code = input;
            self
        }
        /// <p>If the state is <code>failed</code>, this is the error message.</p>
        pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
            self.message = Some(input.into());
            self
        }
        /// <p>If the state is <code>failed</code>, this is the error message.</p>
        pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.message = input;
            self
        }
        /// Consumes the builder and constructs a [`FpgaImageState`](crate::model::FpgaImageState).
        pub fn build(self) -> crate::model::FpgaImageState {
            crate::model::FpgaImageState {
                code: self.code,
                message: self.message,
            }
        }
    }
}
impl FpgaImageState {
    /// Creates a new builder-style object to manufacture [`FpgaImageState`](crate::model::FpgaImageState).
    pub fn builder() -> crate::model::fpga_image_state::Builder {
        crate::model::fpga_image_state::Builder::default()
    }
}

/// When writing a match expression against `FpgaImageStateCode`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let fpgaimagestatecode = unimplemented!();
/// match fpgaimagestatecode {
///     FpgaImageStateCode::Available => { /* ... */ },
///     FpgaImageStateCode::Failed => { /* ... */ },
///     FpgaImageStateCode::Pending => { /* ... */ },
///     FpgaImageStateCode::Unavailable => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `fpgaimagestatecode` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `FpgaImageStateCode::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `FpgaImageStateCode::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `FpgaImageStateCode::NewFeature` is defined.
/// Specifically, when `fpgaimagestatecode` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `FpgaImageStateCode::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 FpgaImageStateCode {
    #[allow(missing_docs)] // documentation missing in model
    Available,
    #[allow(missing_docs)] // documentation missing in model
    Failed,
    #[allow(missing_docs)] // documentation missing in model
    Pending,
    #[allow(missing_docs)] // documentation missing in model
    Unavailable,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for FpgaImageStateCode {
    fn from(s: &str) -> Self {
        match s {
            "available" => FpgaImageStateCode::Available,
            "failed" => FpgaImageStateCode::Failed,
            "pending" => FpgaImageStateCode::Pending,
            "unavailable" => FpgaImageStateCode::Unavailable,
            other => {
                FpgaImageStateCode::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for FpgaImageStateCode {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(FpgaImageStateCode::from(s))
    }
}
impl FpgaImageStateCode {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            FpgaImageStateCode::Available => "available",
            FpgaImageStateCode::Failed => "failed",
            FpgaImageStateCode::Pending => "pending",
            FpgaImageStateCode::Unavailable => "unavailable",
            FpgaImageStateCode::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["available", "failed", "pending", "unavailable"]
    }
}
impl AsRef<str> for FpgaImageStateCode {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes the data that identifies an Amazon FPGA image (AFI) on the PCI bus.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct PciId {
    /// <p>The ID of the device.</p>
    #[doc(hidden)]
    pub device_id: std::option::Option<std::string::String>,
    /// <p>The ID of the vendor.</p>
    #[doc(hidden)]
    pub vendor_id: std::option::Option<std::string::String>,
    /// <p>The ID of the subsystem.</p>
    #[doc(hidden)]
    pub subsystem_id: std::option::Option<std::string::String>,
    /// <p>The ID of the vendor for the subsystem.</p>
    #[doc(hidden)]
    pub subsystem_vendor_id: std::option::Option<std::string::String>,
}
impl PciId {
    /// <p>The ID of the device.</p>
    pub fn device_id(&self) -> std::option::Option<&str> {
        self.device_id.as_deref()
    }
    /// <p>The ID of the vendor.</p>
    pub fn vendor_id(&self) -> std::option::Option<&str> {
        self.vendor_id.as_deref()
    }
    /// <p>The ID of the subsystem.</p>
    pub fn subsystem_id(&self) -> std::option::Option<&str> {
        self.subsystem_id.as_deref()
    }
    /// <p>The ID of the vendor for the subsystem.</p>
    pub fn subsystem_vendor_id(&self) -> std::option::Option<&str> {
        self.subsystem_vendor_id.as_deref()
    }
}
/// See [`PciId`](crate::model::PciId).
pub mod pci_id {

    /// A builder for [`PciId`](crate::model::PciId).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) device_id: std::option::Option<std::string::String>,
        pub(crate) vendor_id: std::option::Option<std::string::String>,
        pub(crate) subsystem_id: std::option::Option<std::string::String>,
        pub(crate) subsystem_vendor_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The ID of the device.</p>
        pub fn device_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.device_id = Some(input.into());
            self
        }
        /// <p>The ID of the device.</p>
        pub fn set_device_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.device_id = input;
            self
        }
        /// <p>The ID of the vendor.</p>
        pub fn vendor_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.vendor_id = Some(input.into());
            self
        }
        /// <p>The ID of the vendor.</p>
        pub fn set_vendor_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.vendor_id = input;
            self
        }
        /// <p>The ID of the subsystem.</p>
        pub fn subsystem_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.subsystem_id = Some(input.into());
            self
        }
        /// <p>The ID of the subsystem.</p>
        pub fn set_subsystem_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.subsystem_id = input;
            self
        }
        /// <p>The ID of the vendor for the subsystem.</p>
        pub fn subsystem_vendor_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.subsystem_vendor_id = Some(input.into());
            self
        }
        /// <p>The ID of the vendor for the subsystem.</p>
        pub fn set_subsystem_vendor_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.subsystem_vendor_id = input;
            self
        }
        /// Consumes the builder and constructs a [`PciId`](crate::model::PciId).
        pub fn build(self) -> crate::model::PciId {
            crate::model::PciId {
                device_id: self.device_id,
                vendor_id: self.vendor_id,
                subsystem_id: self.subsystem_id,
                subsystem_vendor_id: self.subsystem_vendor_id,
            }
        }
    }
}
impl PciId {
    /// Creates a new builder-style object to manufacture [`PciId`](crate::model::PciId).
    pub fn builder() -> crate::model::pci_id::Builder {
        crate::model::pci_id::Builder::default()
    }
}

/// <p>Describes a flow log.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct FlowLog {
    /// <p>The date and time the flow log was created.</p>
    #[doc(hidden)]
    pub creation_time: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>Information about the error that occurred. <code>Rate limited</code> indicates that CloudWatch Logs throttling has been applied for one or more network interfaces, or that you've reached the limit on the number of log groups that you can create. <code>Access error</code> indicates that the IAM role associated with the flow log does not have sufficient permissions to publish to CloudWatch Logs. <code>Unknown error</code> indicates an internal error.</p>
    #[doc(hidden)]
    pub deliver_logs_error_message: std::option::Option<std::string::String>,
    /// <p>The ARN of the IAM role allows the service to publish logs to CloudWatch Logs.</p>
    #[doc(hidden)]
    pub deliver_logs_permission_arn: std::option::Option<std::string::String>,
    /// <p>The ARN of the IAM role that allows the service to publish flow logs across accounts.</p>
    #[doc(hidden)]
    pub deliver_cross_account_role: std::option::Option<std::string::String>,
    /// <p>The status of the logs delivery (<code>SUCCESS</code> | <code>FAILED</code>).</p>
    #[doc(hidden)]
    pub deliver_logs_status: std::option::Option<std::string::String>,
    /// <p>The ID of the flow log.</p>
    #[doc(hidden)]
    pub flow_log_id: std::option::Option<std::string::String>,
    /// <p>The status of the flow log (<code>ACTIVE</code>).</p>
    #[doc(hidden)]
    pub flow_log_status: std::option::Option<std::string::String>,
    /// <p>The name of the flow log group.</p>
    #[doc(hidden)]
    pub log_group_name: std::option::Option<std::string::String>,
    /// <p>The ID of the resource being monitored.</p>
    #[doc(hidden)]
    pub resource_id: std::option::Option<std::string::String>,
    /// <p>The type of traffic captured for the flow log.</p>
    #[doc(hidden)]
    pub traffic_type: std::option::Option<crate::model::TrafficType>,
    /// <p>The type of destination for the flow log data.</p>
    #[doc(hidden)]
    pub log_destination_type: std::option::Option<crate::model::LogDestinationType>,
    /// <p>The Amazon Resource Name (ARN) of the destination for the flow log data.</p>
    #[doc(hidden)]
    pub log_destination: std::option::Option<std::string::String>,
    /// <p>The format of the flow log record.</p>
    #[doc(hidden)]
    pub log_format: std::option::Option<std::string::String>,
    /// <p>The tags for the flow log.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    /// <p>The maximum interval of time, in seconds, during which a flow of packets is captured and aggregated into a flow log record.</p>
    /// <p>When a network interface is attached to a <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances">Nitro-based instance</a>, the aggregation interval is always 60 seconds (1 minute) or less, regardless of the specified value.</p>
    /// <p>Valid Values: <code>60</code> | <code>600</code> </p>
    #[doc(hidden)]
    pub max_aggregation_interval: std::option::Option<i32>,
    /// <p>The destination options.</p>
    #[doc(hidden)]
    pub destination_options: std::option::Option<crate::model::DestinationOptionsResponse>,
}
impl FlowLog {
    /// <p>The date and time the flow log was created.</p>
    pub fn creation_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.creation_time.as_ref()
    }
    /// <p>Information about the error that occurred. <code>Rate limited</code> indicates that CloudWatch Logs throttling has been applied for one or more network interfaces, or that you've reached the limit on the number of log groups that you can create. <code>Access error</code> indicates that the IAM role associated with the flow log does not have sufficient permissions to publish to CloudWatch Logs. <code>Unknown error</code> indicates an internal error.</p>
    pub fn deliver_logs_error_message(&self) -> std::option::Option<&str> {
        self.deliver_logs_error_message.as_deref()
    }
    /// <p>The ARN of the IAM role allows the service to publish logs to CloudWatch Logs.</p>
    pub fn deliver_logs_permission_arn(&self) -> std::option::Option<&str> {
        self.deliver_logs_permission_arn.as_deref()
    }
    /// <p>The ARN of the IAM role that allows the service to publish flow logs across accounts.</p>
    pub fn deliver_cross_account_role(&self) -> std::option::Option<&str> {
        self.deliver_cross_account_role.as_deref()
    }
    /// <p>The status of the logs delivery (<code>SUCCESS</code> | <code>FAILED</code>).</p>
    pub fn deliver_logs_status(&self) -> std::option::Option<&str> {
        self.deliver_logs_status.as_deref()
    }
    /// <p>The ID of the flow log.</p>
    pub fn flow_log_id(&self) -> std::option::Option<&str> {
        self.flow_log_id.as_deref()
    }
    /// <p>The status of the flow log (<code>ACTIVE</code>).</p>
    pub fn flow_log_status(&self) -> std::option::Option<&str> {
        self.flow_log_status.as_deref()
    }
    /// <p>The name of the flow log group.</p>
    pub fn log_group_name(&self) -> std::option::Option<&str> {
        self.log_group_name.as_deref()
    }
    /// <p>The ID of the resource being monitored.</p>
    pub fn resource_id(&self) -> std::option::Option<&str> {
        self.resource_id.as_deref()
    }
    /// <p>The type of traffic captured for the flow log.</p>
    pub fn traffic_type(&self) -> std::option::Option<&crate::model::TrafficType> {
        self.traffic_type.as_ref()
    }
    /// <p>The type of destination for the flow log data.</p>
    pub fn log_destination_type(&self) -> std::option::Option<&crate::model::LogDestinationType> {
        self.log_destination_type.as_ref()
    }
    /// <p>The Amazon Resource Name (ARN) of the destination for the flow log data.</p>
    pub fn log_destination(&self) -> std::option::Option<&str> {
        self.log_destination.as_deref()
    }
    /// <p>The format of the flow log record.</p>
    pub fn log_format(&self) -> std::option::Option<&str> {
        self.log_format.as_deref()
    }
    /// <p>The tags for the flow log.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
    /// <p>The maximum interval of time, in seconds, during which a flow of packets is captured and aggregated into a flow log record.</p>
    /// <p>When a network interface is attached to a <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances">Nitro-based instance</a>, the aggregation interval is always 60 seconds (1 minute) or less, regardless of the specified value.</p>
    /// <p>Valid Values: <code>60</code> | <code>600</code> </p>
    pub fn max_aggregation_interval(&self) -> std::option::Option<i32> {
        self.max_aggregation_interval
    }
    /// <p>The destination options.</p>
    pub fn destination_options(
        &self,
    ) -> std::option::Option<&crate::model::DestinationOptionsResponse> {
        self.destination_options.as_ref()
    }
}
/// See [`FlowLog`](crate::model::FlowLog).
pub mod flow_log {

    /// A builder for [`FlowLog`](crate::model::FlowLog).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) creation_time: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) deliver_logs_error_message: std::option::Option<std::string::String>,
        pub(crate) deliver_logs_permission_arn: std::option::Option<std::string::String>,
        pub(crate) deliver_cross_account_role: std::option::Option<std::string::String>,
        pub(crate) deliver_logs_status: std::option::Option<std::string::String>,
        pub(crate) flow_log_id: std::option::Option<std::string::String>,
        pub(crate) flow_log_status: std::option::Option<std::string::String>,
        pub(crate) log_group_name: std::option::Option<std::string::String>,
        pub(crate) resource_id: std::option::Option<std::string::String>,
        pub(crate) traffic_type: std::option::Option<crate::model::TrafficType>,
        pub(crate) log_destination_type: std::option::Option<crate::model::LogDestinationType>,
        pub(crate) log_destination: std::option::Option<std::string::String>,
        pub(crate) log_format: std::option::Option<std::string::String>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        pub(crate) max_aggregation_interval: std::option::Option<i32>,
        pub(crate) destination_options:
            std::option::Option<crate::model::DestinationOptionsResponse>,
    }
    impl Builder {
        /// <p>The date and time the flow log was created.</p>
        pub fn creation_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.creation_time = Some(input);
            self
        }
        /// <p>The date and time the flow log was created.</p>
        pub fn set_creation_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.creation_time = input;
            self
        }
        /// <p>Information about the error that occurred. <code>Rate limited</code> indicates that CloudWatch Logs throttling has been applied for one or more network interfaces, or that you've reached the limit on the number of log groups that you can create. <code>Access error</code> indicates that the IAM role associated with the flow log does not have sufficient permissions to publish to CloudWatch Logs. <code>Unknown error</code> indicates an internal error.</p>
        pub fn deliver_logs_error_message(mut self, input: impl Into<std::string::String>) -> Self {
            self.deliver_logs_error_message = Some(input.into());
            self
        }
        /// <p>Information about the error that occurred. <code>Rate limited</code> indicates that CloudWatch Logs throttling has been applied for one or more network interfaces, or that you've reached the limit on the number of log groups that you can create. <code>Access error</code> indicates that the IAM role associated with the flow log does not have sufficient permissions to publish to CloudWatch Logs. <code>Unknown error</code> indicates an internal error.</p>
        pub fn set_deliver_logs_error_message(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.deliver_logs_error_message = input;
            self
        }
        /// <p>The ARN of the IAM role allows the service to publish logs to CloudWatch Logs.</p>
        pub fn deliver_logs_permission_arn(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.deliver_logs_permission_arn = Some(input.into());
            self
        }
        /// <p>The ARN of the IAM role allows the service to publish logs to CloudWatch Logs.</p>
        pub fn set_deliver_logs_permission_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.deliver_logs_permission_arn = input;
            self
        }
        /// <p>The ARN of the IAM role that allows the service to publish flow logs across accounts.</p>
        pub fn deliver_cross_account_role(mut self, input: impl Into<std::string::String>) -> Self {
            self.deliver_cross_account_role = Some(input.into());
            self
        }
        /// <p>The ARN of the IAM role that allows the service to publish flow logs across accounts.</p>
        pub fn set_deliver_cross_account_role(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.deliver_cross_account_role = input;
            self
        }
        /// <p>The status of the logs delivery (<code>SUCCESS</code> | <code>FAILED</code>).</p>
        pub fn deliver_logs_status(mut self, input: impl Into<std::string::String>) -> Self {
            self.deliver_logs_status = Some(input.into());
            self
        }
        /// <p>The status of the logs delivery (<code>SUCCESS</code> | <code>FAILED</code>).</p>
        pub fn set_deliver_logs_status(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.deliver_logs_status = input;
            self
        }
        /// <p>The ID of the flow log.</p>
        pub fn flow_log_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.flow_log_id = Some(input.into());
            self
        }
        /// <p>The ID of the flow log.</p>
        pub fn set_flow_log_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.flow_log_id = input;
            self
        }
        /// <p>The status of the flow log (<code>ACTIVE</code>).</p>
        pub fn flow_log_status(mut self, input: impl Into<std::string::String>) -> Self {
            self.flow_log_status = Some(input.into());
            self
        }
        /// <p>The status of the flow log (<code>ACTIVE</code>).</p>
        pub fn set_flow_log_status(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.flow_log_status = input;
            self
        }
        /// <p>The name of the flow log group.</p>
        pub fn log_group_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.log_group_name = Some(input.into());
            self
        }
        /// <p>The name of the flow log group.</p>
        pub fn set_log_group_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.log_group_name = input;
            self
        }
        /// <p>The ID of the resource being monitored.</p>
        pub fn resource_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.resource_id = Some(input.into());
            self
        }
        /// <p>The ID of the resource being monitored.</p>
        pub fn set_resource_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.resource_id = input;
            self
        }
        /// <p>The type of traffic captured for the flow log.</p>
        pub fn traffic_type(mut self, input: crate::model::TrafficType) -> Self {
            self.traffic_type = Some(input);
            self
        }
        /// <p>The type of traffic captured for the flow log.</p>
        pub fn set_traffic_type(
            mut self,
            input: std::option::Option<crate::model::TrafficType>,
        ) -> Self {
            self.traffic_type = input;
            self
        }
        /// <p>The type of destination for the flow log data.</p>
        pub fn log_destination_type(mut self, input: crate::model::LogDestinationType) -> Self {
            self.log_destination_type = Some(input);
            self
        }
        /// <p>The type of destination for the flow log data.</p>
        pub fn set_log_destination_type(
            mut self,
            input: std::option::Option<crate::model::LogDestinationType>,
        ) -> Self {
            self.log_destination_type = input;
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the destination for the flow log data.</p>
        pub fn log_destination(mut self, input: impl Into<std::string::String>) -> Self {
            self.log_destination = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the destination for the flow log data.</p>
        pub fn set_log_destination(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.log_destination = input;
            self
        }
        /// <p>The format of the flow log record.</p>
        pub fn log_format(mut self, input: impl Into<std::string::String>) -> Self {
            self.log_format = Some(input.into());
            self
        }
        /// <p>The format of the flow log record.</p>
        pub fn set_log_format(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.log_format = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>The tags for the flow log.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>The tags for the flow log.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// <p>The maximum interval of time, in seconds, during which a flow of packets is captured and aggregated into a flow log record.</p>
        /// <p>When a network interface is attached to a <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances">Nitro-based instance</a>, the aggregation interval is always 60 seconds (1 minute) or less, regardless of the specified value.</p>
        /// <p>Valid Values: <code>60</code> | <code>600</code> </p>
        pub fn max_aggregation_interval(mut self, input: i32) -> Self {
            self.max_aggregation_interval = Some(input);
            self
        }
        /// <p>The maximum interval of time, in seconds, during which a flow of packets is captured and aggregated into a flow log record.</p>
        /// <p>When a network interface is attached to a <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances">Nitro-based instance</a>, the aggregation interval is always 60 seconds (1 minute) or less, regardless of the specified value.</p>
        /// <p>Valid Values: <code>60</code> | <code>600</code> </p>
        pub fn set_max_aggregation_interval(mut self, input: std::option::Option<i32>) -> Self {
            self.max_aggregation_interval = input;
            self
        }
        /// <p>The destination options.</p>
        pub fn destination_options(
            mut self,
            input: crate::model::DestinationOptionsResponse,
        ) -> Self {
            self.destination_options = Some(input);
            self
        }
        /// <p>The destination options.</p>
        pub fn set_destination_options(
            mut self,
            input: std::option::Option<crate::model::DestinationOptionsResponse>,
        ) -> Self {
            self.destination_options = input;
            self
        }
        /// Consumes the builder and constructs a [`FlowLog`](crate::model::FlowLog).
        pub fn build(self) -> crate::model::FlowLog {
            crate::model::FlowLog {
                creation_time: self.creation_time,
                deliver_logs_error_message: self.deliver_logs_error_message,
                deliver_logs_permission_arn: self.deliver_logs_permission_arn,
                deliver_cross_account_role: self.deliver_cross_account_role,
                deliver_logs_status: self.deliver_logs_status,
                flow_log_id: self.flow_log_id,
                flow_log_status: self.flow_log_status,
                log_group_name: self.log_group_name,
                resource_id: self.resource_id,
                traffic_type: self.traffic_type,
                log_destination_type: self.log_destination_type,
                log_destination: self.log_destination,
                log_format: self.log_format,
                tags: self.tags,
                max_aggregation_interval: self.max_aggregation_interval,
                destination_options: self.destination_options,
            }
        }
    }
}
impl FlowLog {
    /// Creates a new builder-style object to manufacture [`FlowLog`](crate::model::FlowLog).
    pub fn builder() -> crate::model::flow_log::Builder {
        crate::model::flow_log::Builder::default()
    }
}

/// <p>Describes the destination options for a flow log.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DestinationOptionsResponse {
    /// <p>The format for the flow log.</p>
    #[doc(hidden)]
    pub file_format: std::option::Option<crate::model::DestinationFileFormat>,
    /// <p>Indicates whether to use Hive-compatible prefixes for flow logs stored in Amazon S3.</p>
    #[doc(hidden)]
    pub hive_compatible_partitions: std::option::Option<bool>,
    /// <p>Indicates whether to partition the flow log per hour.</p>
    #[doc(hidden)]
    pub per_hour_partition: std::option::Option<bool>,
}
impl DestinationOptionsResponse {
    /// <p>The format for the flow log.</p>
    pub fn file_format(&self) -> std::option::Option<&crate::model::DestinationFileFormat> {
        self.file_format.as_ref()
    }
    /// <p>Indicates whether to use Hive-compatible prefixes for flow logs stored in Amazon S3.</p>
    pub fn hive_compatible_partitions(&self) -> std::option::Option<bool> {
        self.hive_compatible_partitions
    }
    /// <p>Indicates whether to partition the flow log per hour.</p>
    pub fn per_hour_partition(&self) -> std::option::Option<bool> {
        self.per_hour_partition
    }
}
/// See [`DestinationOptionsResponse`](crate::model::DestinationOptionsResponse).
pub mod destination_options_response {

    /// A builder for [`DestinationOptionsResponse`](crate::model::DestinationOptionsResponse).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) file_format: std::option::Option<crate::model::DestinationFileFormat>,
        pub(crate) hive_compatible_partitions: std::option::Option<bool>,
        pub(crate) per_hour_partition: std::option::Option<bool>,
    }
    impl Builder {
        /// <p>The format for the flow log.</p>
        pub fn file_format(mut self, input: crate::model::DestinationFileFormat) -> Self {
            self.file_format = Some(input);
            self
        }
        /// <p>The format for the flow log.</p>
        pub fn set_file_format(
            mut self,
            input: std::option::Option<crate::model::DestinationFileFormat>,
        ) -> Self {
            self.file_format = input;
            self
        }
        /// <p>Indicates whether to use Hive-compatible prefixes for flow logs stored in Amazon S3.</p>
        pub fn hive_compatible_partitions(mut self, input: bool) -> Self {
            self.hive_compatible_partitions = Some(input);
            self
        }
        /// <p>Indicates whether to use Hive-compatible prefixes for flow logs stored in Amazon S3.</p>
        pub fn set_hive_compatible_partitions(mut self, input: std::option::Option<bool>) -> Self {
            self.hive_compatible_partitions = input;
            self
        }
        /// <p>Indicates whether to partition the flow log per hour.</p>
        pub fn per_hour_partition(mut self, input: bool) -> Self {
            self.per_hour_partition = Some(input);
            self
        }
        /// <p>Indicates whether to partition the flow log per hour.</p>
        pub fn set_per_hour_partition(mut self, input: std::option::Option<bool>) -> Self {
            self.per_hour_partition = input;
            self
        }
        /// Consumes the builder and constructs a [`DestinationOptionsResponse`](crate::model::DestinationOptionsResponse).
        pub fn build(self) -> crate::model::DestinationOptionsResponse {
            crate::model::DestinationOptionsResponse {
                file_format: self.file_format,
                hive_compatible_partitions: self.hive_compatible_partitions,
                per_hour_partition: self.per_hour_partition,
            }
        }
    }
}
impl DestinationOptionsResponse {
    /// Creates a new builder-style object to manufacture [`DestinationOptionsResponse`](crate::model::DestinationOptionsResponse).
    pub fn builder() -> crate::model::destination_options_response::Builder {
        crate::model::destination_options_response::Builder::default()
    }
}

/// When writing a match expression against `DestinationFileFormat`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let destinationfileformat = unimplemented!();
/// match destinationfileformat {
///     DestinationFileFormat::Parquet => { /* ... */ },
///     DestinationFileFormat::PlainText => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `destinationfileformat` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `DestinationFileFormat::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `DestinationFileFormat::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `DestinationFileFormat::NewFeature` is defined.
/// Specifically, when `destinationfileformat` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `DestinationFileFormat::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 DestinationFileFormat {
    #[allow(missing_docs)] // documentation missing in model
    Parquet,
    #[allow(missing_docs)] // documentation missing in model
    PlainText,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for DestinationFileFormat {
    fn from(s: &str) -> Self {
        match s {
            "parquet" => DestinationFileFormat::Parquet,
            "plain-text" => DestinationFileFormat::PlainText,
            other => {
                DestinationFileFormat::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for DestinationFileFormat {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(DestinationFileFormat::from(s))
    }
}
impl DestinationFileFormat {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            DestinationFileFormat::Parquet => "parquet",
            DestinationFileFormat::PlainText => "plain-text",
            DestinationFileFormat::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["parquet", "plain-text"]
    }
}
impl AsRef<str> for DestinationFileFormat {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `LogDestinationType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let logdestinationtype = unimplemented!();
/// match logdestinationtype {
///     LogDestinationType::CloudWatchLogs => { /* ... */ },
///     LogDestinationType::KinesisDataFirehose => { /* ... */ },
///     LogDestinationType::S3 => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `logdestinationtype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `LogDestinationType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `LogDestinationType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `LogDestinationType::NewFeature` is defined.
/// Specifically, when `logdestinationtype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `LogDestinationType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 LogDestinationType {
    #[allow(missing_docs)] // documentation missing in model
    CloudWatchLogs,
    #[allow(missing_docs)] // documentation missing in model
    KinesisDataFirehose,
    #[allow(missing_docs)] // documentation missing in model
    S3,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for LogDestinationType {
    fn from(s: &str) -> Self {
        match s {
            "cloud-watch-logs" => LogDestinationType::CloudWatchLogs,
            "kinesis-data-firehose" => LogDestinationType::KinesisDataFirehose,
            "s3" => LogDestinationType::S3,
            other => {
                LogDestinationType::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for LogDestinationType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(LogDestinationType::from(s))
    }
}
impl LogDestinationType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            LogDestinationType::CloudWatchLogs => "cloud-watch-logs",
            LogDestinationType::KinesisDataFirehose => "kinesis-data-firehose",
            LogDestinationType::S3 => "s3",
            LogDestinationType::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["cloud-watch-logs", "kinesis-data-firehose", "s3"]
    }
}
impl AsRef<str> for LogDestinationType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `TrafficType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let traffictype = unimplemented!();
/// match traffictype {
///     TrafficType::Accept => { /* ... */ },
///     TrafficType::All => { /* ... */ },
///     TrafficType::Reject => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `traffictype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `TrafficType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `TrafficType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `TrafficType::NewFeature` is defined.
/// Specifically, when `traffictype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `TrafficType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 TrafficType {
    #[allow(missing_docs)] // documentation missing in model
    Accept,
    #[allow(missing_docs)] // documentation missing in model
    All,
    #[allow(missing_docs)] // documentation missing in model
    Reject,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for TrafficType {
    fn from(s: &str) -> Self {
        match s {
            "ACCEPT" => TrafficType::Accept,
            "ALL" => TrafficType::All,
            "REJECT" => TrafficType::Reject,
            other => TrafficType::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for TrafficType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(TrafficType::from(s))
    }
}
impl TrafficType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            TrafficType::Accept => "ACCEPT",
            TrafficType::All => "ALL",
            TrafficType::Reject => "REJECT",
            TrafficType::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["ACCEPT", "ALL", "REJECT"]
    }
}
impl AsRef<str> for TrafficType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes an EC2 Fleet.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct FleetData {
    /// <p>The progress of the EC2 Fleet. If there is an error, the status is <code>error</code>. After all requests are placed, the status is <code>pending_fulfillment</code>. If the size of the EC2 Fleet is equal to or greater than its target capacity, the status is <code>fulfilled</code>. If the size of the EC2 Fleet is decreased, the status is <code>pending_termination</code> while instances are terminating.</p>
    #[doc(hidden)]
    pub activity_status: std::option::Option<crate::model::FleetActivityStatus>,
    /// <p>The creation date and time of the EC2 Fleet.</p>
    #[doc(hidden)]
    pub create_time: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The ID of the EC2 Fleet.</p>
    #[doc(hidden)]
    pub fleet_id: std::option::Option<std::string::String>,
    /// <p>The state of the EC2 Fleet.</p>
    #[doc(hidden)]
    pub fleet_state: std::option::Option<crate::model::FleetStateCode>,
    /// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring idempotency</a>.</p>
    /// <p>Constraints: Maximum 64 ASCII characters</p>
    #[doc(hidden)]
    pub client_token: std::option::Option<std::string::String>,
    /// <p>Indicates whether running instances should be terminated if the target capacity of the EC2 Fleet is decreased below the current size of the EC2 Fleet.</p>
    #[doc(hidden)]
    pub excess_capacity_termination_policy:
        std::option::Option<crate::model::FleetExcessCapacityTerminationPolicy>,
    /// <p>The number of units fulfilled by this request compared to the set target capacity.</p>
    #[doc(hidden)]
    pub fulfilled_capacity: std::option::Option<f64>,
    /// <p>The number of units fulfilled by this request compared to the set target On-Demand capacity.</p>
    #[doc(hidden)]
    pub fulfilled_on_demand_capacity: std::option::Option<f64>,
    /// <p>The launch template and overrides.</p>
    #[doc(hidden)]
    pub launch_template_configs:
        std::option::Option<std::vec::Vec<crate::model::FleetLaunchTemplateConfig>>,
    /// <p>The number of units to request. You can choose to set the target capacity in terms of instances or a performance characteristic that is important to your application workload, such as vCPUs, memory, or I/O. If the request type is <code>maintain</code>, you can specify a target capacity of 0 and add capacity later.</p>
    #[doc(hidden)]
    pub target_capacity_specification:
        std::option::Option<crate::model::TargetCapacitySpecification>,
    /// <p>Indicates whether running instances should be terminated when the EC2 Fleet expires. </p>
    #[doc(hidden)]
    pub terminate_instances_with_expiration: std::option::Option<bool>,
    /// <p>The type of request. Indicates whether the EC2 Fleet only <code>requests</code> the target capacity, or also attempts to <code>maintain</code> it. If you request a certain target capacity, EC2 Fleet only places the required requests; it does not attempt to replenish instances if capacity is diminished, and it does not submit requests in alternative capacity pools if capacity is unavailable. To maintain a certain target capacity, EC2 Fleet places the required requests to meet this target capacity. It also automatically replenishes any interrupted Spot Instances. Default: <code>maintain</code>.</p>
    #[doc(hidden)]
    pub r#type: std::option::Option<crate::model::FleetType>,
    /// <p>The start date and time of the request, in UTC format (for example, <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z). The default is to start fulfilling the request immediately. </p>
    #[doc(hidden)]
    pub valid_from: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The end date and time of the request, in UTC format (for example, <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z). At this point, no new instance requests are placed or able to fulfill the request. The default end date is 7 days from the current date. </p>
    #[doc(hidden)]
    pub valid_until: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>Indicates whether EC2 Fleet should replace unhealthy Spot Instances. Supported only for fleets of type <code>maintain</code>. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/manage-ec2-fleet.html#ec2-fleet-health-checks">EC2 Fleet health checks</a> in the <i>Amazon EC2 User Guide</i>.</p>
    #[doc(hidden)]
    pub replace_unhealthy_instances: std::option::Option<bool>,
    /// <p>The configuration of Spot Instances in an EC2 Fleet.</p>
    #[doc(hidden)]
    pub spot_options: std::option::Option<crate::model::SpotOptions>,
    /// <p>The allocation strategy of On-Demand Instances in an EC2 Fleet.</p>
    #[doc(hidden)]
    pub on_demand_options: std::option::Option<crate::model::OnDemandOptions>,
    /// <p>The tags for an EC2 Fleet resource.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    /// <p>Information about the instances that could not be launched by the fleet. Valid only when <b>Type</b> is set to <code>instant</code>.</p>
    #[doc(hidden)]
    pub errors: std::option::Option<std::vec::Vec<crate::model::DescribeFleetError>>,
    /// <p>Information about the instances that were launched by the fleet. Valid only when <b>Type</b> is set to <code>instant</code>.</p>
    #[doc(hidden)]
    pub instances: std::option::Option<std::vec::Vec<crate::model::DescribeFleetsInstances>>,
    /// <p>Reserved.</p>
    #[doc(hidden)]
    pub context: std::option::Option<std::string::String>,
}
impl FleetData {
    /// <p>The progress of the EC2 Fleet. If there is an error, the status is <code>error</code>. After all requests are placed, the status is <code>pending_fulfillment</code>. If the size of the EC2 Fleet is equal to or greater than its target capacity, the status is <code>fulfilled</code>. If the size of the EC2 Fleet is decreased, the status is <code>pending_termination</code> while instances are terminating.</p>
    pub fn activity_status(&self) -> std::option::Option<&crate::model::FleetActivityStatus> {
        self.activity_status.as_ref()
    }
    /// <p>The creation date and time of the EC2 Fleet.</p>
    pub fn create_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.create_time.as_ref()
    }
    /// <p>The ID of the EC2 Fleet.</p>
    pub fn fleet_id(&self) -> std::option::Option<&str> {
        self.fleet_id.as_deref()
    }
    /// <p>The state of the EC2 Fleet.</p>
    pub fn fleet_state(&self) -> std::option::Option<&crate::model::FleetStateCode> {
        self.fleet_state.as_ref()
    }
    /// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring idempotency</a>.</p>
    /// <p>Constraints: Maximum 64 ASCII characters</p>
    pub fn client_token(&self) -> std::option::Option<&str> {
        self.client_token.as_deref()
    }
    /// <p>Indicates whether running instances should be terminated if the target capacity of the EC2 Fleet is decreased below the current size of the EC2 Fleet.</p>
    pub fn excess_capacity_termination_policy(
        &self,
    ) -> std::option::Option<&crate::model::FleetExcessCapacityTerminationPolicy> {
        self.excess_capacity_termination_policy.as_ref()
    }
    /// <p>The number of units fulfilled by this request compared to the set target capacity.</p>
    pub fn fulfilled_capacity(&self) -> std::option::Option<f64> {
        self.fulfilled_capacity
    }
    /// <p>The number of units fulfilled by this request compared to the set target On-Demand capacity.</p>
    pub fn fulfilled_on_demand_capacity(&self) -> std::option::Option<f64> {
        self.fulfilled_on_demand_capacity
    }
    /// <p>The launch template and overrides.</p>
    pub fn launch_template_configs(
        &self,
    ) -> std::option::Option<&[crate::model::FleetLaunchTemplateConfig]> {
        self.launch_template_configs.as_deref()
    }
    /// <p>The number of units to request. You can choose to set the target capacity in terms of instances or a performance characteristic that is important to your application workload, such as vCPUs, memory, or I/O. If the request type is <code>maintain</code>, you can specify a target capacity of 0 and add capacity later.</p>
    pub fn target_capacity_specification(
        &self,
    ) -> std::option::Option<&crate::model::TargetCapacitySpecification> {
        self.target_capacity_specification.as_ref()
    }
    /// <p>Indicates whether running instances should be terminated when the EC2 Fleet expires. </p>
    pub fn terminate_instances_with_expiration(&self) -> std::option::Option<bool> {
        self.terminate_instances_with_expiration
    }
    /// <p>The type of request. Indicates whether the EC2 Fleet only <code>requests</code> the target capacity, or also attempts to <code>maintain</code> it. If you request a certain target capacity, EC2 Fleet only places the required requests; it does not attempt to replenish instances if capacity is diminished, and it does not submit requests in alternative capacity pools if capacity is unavailable. To maintain a certain target capacity, EC2 Fleet places the required requests to meet this target capacity. It also automatically replenishes any interrupted Spot Instances. Default: <code>maintain</code>.</p>
    pub fn r#type(&self) -> std::option::Option<&crate::model::FleetType> {
        self.r#type.as_ref()
    }
    /// <p>The start date and time of the request, in UTC format (for example, <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z). The default is to start fulfilling the request immediately. </p>
    pub fn valid_from(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.valid_from.as_ref()
    }
    /// <p>The end date and time of the request, in UTC format (for example, <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z). At this point, no new instance requests are placed or able to fulfill the request. The default end date is 7 days from the current date. </p>
    pub fn valid_until(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.valid_until.as_ref()
    }
    /// <p>Indicates whether EC2 Fleet should replace unhealthy Spot Instances. Supported only for fleets of type <code>maintain</code>. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/manage-ec2-fleet.html#ec2-fleet-health-checks">EC2 Fleet health checks</a> in the <i>Amazon EC2 User Guide</i>.</p>
    pub fn replace_unhealthy_instances(&self) -> std::option::Option<bool> {
        self.replace_unhealthy_instances
    }
    /// <p>The configuration of Spot Instances in an EC2 Fleet.</p>
    pub fn spot_options(&self) -> std::option::Option<&crate::model::SpotOptions> {
        self.spot_options.as_ref()
    }
    /// <p>The allocation strategy of On-Demand Instances in an EC2 Fleet.</p>
    pub fn on_demand_options(&self) -> std::option::Option<&crate::model::OnDemandOptions> {
        self.on_demand_options.as_ref()
    }
    /// <p>The tags for an EC2 Fleet resource.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
    /// <p>Information about the instances that could not be launched by the fleet. Valid only when <b>Type</b> is set to <code>instant</code>.</p>
    pub fn errors(&self) -> std::option::Option<&[crate::model::DescribeFleetError]> {
        self.errors.as_deref()
    }
    /// <p>Information about the instances that were launched by the fleet. Valid only when <b>Type</b> is set to <code>instant</code>.</p>
    pub fn instances(&self) -> std::option::Option<&[crate::model::DescribeFleetsInstances]> {
        self.instances.as_deref()
    }
    /// <p>Reserved.</p>
    pub fn context(&self) -> std::option::Option<&str> {
        self.context.as_deref()
    }
}
/// See [`FleetData`](crate::model::FleetData).
pub mod fleet_data {

    /// A builder for [`FleetData`](crate::model::FleetData).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) activity_status: std::option::Option<crate::model::FleetActivityStatus>,
        pub(crate) create_time: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) fleet_id: std::option::Option<std::string::String>,
        pub(crate) fleet_state: std::option::Option<crate::model::FleetStateCode>,
        pub(crate) client_token: std::option::Option<std::string::String>,
        pub(crate) excess_capacity_termination_policy:
            std::option::Option<crate::model::FleetExcessCapacityTerminationPolicy>,
        pub(crate) fulfilled_capacity: std::option::Option<f64>,
        pub(crate) fulfilled_on_demand_capacity: std::option::Option<f64>,
        pub(crate) launch_template_configs:
            std::option::Option<std::vec::Vec<crate::model::FleetLaunchTemplateConfig>>,
        pub(crate) target_capacity_specification:
            std::option::Option<crate::model::TargetCapacitySpecification>,
        pub(crate) terminate_instances_with_expiration: std::option::Option<bool>,
        pub(crate) r#type: std::option::Option<crate::model::FleetType>,
        pub(crate) valid_from: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) valid_until: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) replace_unhealthy_instances: std::option::Option<bool>,
        pub(crate) spot_options: std::option::Option<crate::model::SpotOptions>,
        pub(crate) on_demand_options: std::option::Option<crate::model::OnDemandOptions>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        pub(crate) errors: std::option::Option<std::vec::Vec<crate::model::DescribeFleetError>>,
        pub(crate) instances:
            std::option::Option<std::vec::Vec<crate::model::DescribeFleetsInstances>>,
        pub(crate) context: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The progress of the EC2 Fleet. If there is an error, the status is <code>error</code>. After all requests are placed, the status is <code>pending_fulfillment</code>. If the size of the EC2 Fleet is equal to or greater than its target capacity, the status is <code>fulfilled</code>. If the size of the EC2 Fleet is decreased, the status is <code>pending_termination</code> while instances are terminating.</p>
        pub fn activity_status(mut self, input: crate::model::FleetActivityStatus) -> Self {
            self.activity_status = Some(input);
            self
        }
        /// <p>The progress of the EC2 Fleet. If there is an error, the status is <code>error</code>. After all requests are placed, the status is <code>pending_fulfillment</code>. If the size of the EC2 Fleet is equal to or greater than its target capacity, the status is <code>fulfilled</code>. If the size of the EC2 Fleet is decreased, the status is <code>pending_termination</code> while instances are terminating.</p>
        pub fn set_activity_status(
            mut self,
            input: std::option::Option<crate::model::FleetActivityStatus>,
        ) -> Self {
            self.activity_status = input;
            self
        }
        /// <p>The creation date and time of the EC2 Fleet.</p>
        pub fn create_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.create_time = Some(input);
            self
        }
        /// <p>The creation date and time of the EC2 Fleet.</p>
        pub fn set_create_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.create_time = input;
            self
        }
        /// <p>The ID of the EC2 Fleet.</p>
        pub fn fleet_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.fleet_id = Some(input.into());
            self
        }
        /// <p>The ID of the EC2 Fleet.</p>
        pub fn set_fleet_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.fleet_id = input;
            self
        }
        /// <p>The state of the EC2 Fleet.</p>
        pub fn fleet_state(mut self, input: crate::model::FleetStateCode) -> Self {
            self.fleet_state = Some(input);
            self
        }
        /// <p>The state of the EC2 Fleet.</p>
        pub fn set_fleet_state(
            mut self,
            input: std::option::Option<crate::model::FleetStateCode>,
        ) -> Self {
            self.fleet_state = input;
            self
        }
        /// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring idempotency</a>.</p>
        /// <p>Constraints: Maximum 64 ASCII characters</p>
        pub fn client_token(mut self, input: impl Into<std::string::String>) -> Self {
            self.client_token = Some(input.into());
            self
        }
        /// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring idempotency</a>.</p>
        /// <p>Constraints: Maximum 64 ASCII characters</p>
        pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.client_token = input;
            self
        }
        /// <p>Indicates whether running instances should be terminated if the target capacity of the EC2 Fleet is decreased below the current size of the EC2 Fleet.</p>
        pub fn excess_capacity_termination_policy(
            mut self,
            input: crate::model::FleetExcessCapacityTerminationPolicy,
        ) -> Self {
            self.excess_capacity_termination_policy = Some(input);
            self
        }
        /// <p>Indicates whether running instances should be terminated if the target capacity of the EC2 Fleet is decreased below the current size of the EC2 Fleet.</p>
        pub fn set_excess_capacity_termination_policy(
            mut self,
            input: std::option::Option<crate::model::FleetExcessCapacityTerminationPolicy>,
        ) -> Self {
            self.excess_capacity_termination_policy = input;
            self
        }
        /// <p>The number of units fulfilled by this request compared to the set target capacity.</p>
        pub fn fulfilled_capacity(mut self, input: f64) -> Self {
            self.fulfilled_capacity = Some(input);
            self
        }
        /// <p>The number of units fulfilled by this request compared to the set target capacity.</p>
        pub fn set_fulfilled_capacity(mut self, input: std::option::Option<f64>) -> Self {
            self.fulfilled_capacity = input;
            self
        }
        /// <p>The number of units fulfilled by this request compared to the set target On-Demand capacity.</p>
        pub fn fulfilled_on_demand_capacity(mut self, input: f64) -> Self {
            self.fulfilled_on_demand_capacity = Some(input);
            self
        }
        /// <p>The number of units fulfilled by this request compared to the set target On-Demand capacity.</p>
        pub fn set_fulfilled_on_demand_capacity(mut self, input: std::option::Option<f64>) -> Self {
            self.fulfilled_on_demand_capacity = input;
            self
        }
        /// Appends an item to `launch_template_configs`.
        ///
        /// To override the contents of this collection use [`set_launch_template_configs`](Self::set_launch_template_configs).
        ///
        /// <p>The launch template and overrides.</p>
        pub fn launch_template_configs(
            mut self,
            input: crate::model::FleetLaunchTemplateConfig,
        ) -> Self {
            let mut v = self.launch_template_configs.unwrap_or_default();
            v.push(input);
            self.launch_template_configs = Some(v);
            self
        }
        /// <p>The launch template and overrides.</p>
        pub fn set_launch_template_configs(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::FleetLaunchTemplateConfig>>,
        ) -> Self {
            self.launch_template_configs = input;
            self
        }
        /// <p>The number of units to request. You can choose to set the target capacity in terms of instances or a performance characteristic that is important to your application workload, such as vCPUs, memory, or I/O. If the request type is <code>maintain</code>, you can specify a target capacity of 0 and add capacity later.</p>
        pub fn target_capacity_specification(
            mut self,
            input: crate::model::TargetCapacitySpecification,
        ) -> Self {
            self.target_capacity_specification = Some(input);
            self
        }
        /// <p>The number of units to request. You can choose to set the target capacity in terms of instances or a performance characteristic that is important to your application workload, such as vCPUs, memory, or I/O. If the request type is <code>maintain</code>, you can specify a target capacity of 0 and add capacity later.</p>
        pub fn set_target_capacity_specification(
            mut self,
            input: std::option::Option<crate::model::TargetCapacitySpecification>,
        ) -> Self {
            self.target_capacity_specification = input;
            self
        }
        /// <p>Indicates whether running instances should be terminated when the EC2 Fleet expires. </p>
        pub fn terminate_instances_with_expiration(mut self, input: bool) -> Self {
            self.terminate_instances_with_expiration = Some(input);
            self
        }
        /// <p>Indicates whether running instances should be terminated when the EC2 Fleet expires. </p>
        pub fn set_terminate_instances_with_expiration(
            mut self,
            input: std::option::Option<bool>,
        ) -> Self {
            self.terminate_instances_with_expiration = input;
            self
        }
        /// <p>The type of request. Indicates whether the EC2 Fleet only <code>requests</code> the target capacity, or also attempts to <code>maintain</code> it. If you request a certain target capacity, EC2 Fleet only places the required requests; it does not attempt to replenish instances if capacity is diminished, and it does not submit requests in alternative capacity pools if capacity is unavailable. To maintain a certain target capacity, EC2 Fleet places the required requests to meet this target capacity. It also automatically replenishes any interrupted Spot Instances. Default: <code>maintain</code>.</p>
        pub fn r#type(mut self, input: crate::model::FleetType) -> Self {
            self.r#type = Some(input);
            self
        }
        /// <p>The type of request. Indicates whether the EC2 Fleet only <code>requests</code> the target capacity, or also attempts to <code>maintain</code> it. If you request a certain target capacity, EC2 Fleet only places the required requests; it does not attempt to replenish instances if capacity is diminished, and it does not submit requests in alternative capacity pools if capacity is unavailable. To maintain a certain target capacity, EC2 Fleet places the required requests to meet this target capacity. It also automatically replenishes any interrupted Spot Instances. Default: <code>maintain</code>.</p>
        pub fn set_type(mut self, input: std::option::Option<crate::model::FleetType>) -> Self {
            self.r#type = input;
            self
        }
        /// <p>The start date and time of the request, in UTC format (for example, <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z). The default is to start fulfilling the request immediately. </p>
        pub fn valid_from(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.valid_from = Some(input);
            self
        }
        /// <p>The start date and time of the request, in UTC format (for example, <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z). The default is to start fulfilling the request immediately. </p>
        pub fn set_valid_from(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.valid_from = input;
            self
        }
        /// <p>The end date and time of the request, in UTC format (for example, <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z). At this point, no new instance requests are placed or able to fulfill the request. The default end date is 7 days from the current date. </p>
        pub fn valid_until(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.valid_until = Some(input);
            self
        }
        /// <p>The end date and time of the request, in UTC format (for example, <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z). At this point, no new instance requests are placed or able to fulfill the request. The default end date is 7 days from the current date. </p>
        pub fn set_valid_until(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.valid_until = input;
            self
        }
        /// <p>Indicates whether EC2 Fleet should replace unhealthy Spot Instances. Supported only for fleets of type <code>maintain</code>. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/manage-ec2-fleet.html#ec2-fleet-health-checks">EC2 Fleet health checks</a> in the <i>Amazon EC2 User Guide</i>.</p>
        pub fn replace_unhealthy_instances(mut self, input: bool) -> Self {
            self.replace_unhealthy_instances = Some(input);
            self
        }
        /// <p>Indicates whether EC2 Fleet should replace unhealthy Spot Instances. Supported only for fleets of type <code>maintain</code>. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/manage-ec2-fleet.html#ec2-fleet-health-checks">EC2 Fleet health checks</a> in the <i>Amazon EC2 User Guide</i>.</p>
        pub fn set_replace_unhealthy_instances(mut self, input: std::option::Option<bool>) -> Self {
            self.replace_unhealthy_instances = input;
            self
        }
        /// <p>The configuration of Spot Instances in an EC2 Fleet.</p>
        pub fn spot_options(mut self, input: crate::model::SpotOptions) -> Self {
            self.spot_options = Some(input);
            self
        }
        /// <p>The configuration of Spot Instances in an EC2 Fleet.</p>
        pub fn set_spot_options(
            mut self,
            input: std::option::Option<crate::model::SpotOptions>,
        ) -> Self {
            self.spot_options = input;
            self
        }
        /// <p>The allocation strategy of On-Demand Instances in an EC2 Fleet.</p>
        pub fn on_demand_options(mut self, input: crate::model::OnDemandOptions) -> Self {
            self.on_demand_options = Some(input);
            self
        }
        /// <p>The allocation strategy of On-Demand Instances in an EC2 Fleet.</p>
        pub fn set_on_demand_options(
            mut self,
            input: std::option::Option<crate::model::OnDemandOptions>,
        ) -> Self {
            self.on_demand_options = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>The tags for an EC2 Fleet resource.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>The tags for an EC2 Fleet resource.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// Appends an item to `errors`.
        ///
        /// To override the contents of this collection use [`set_errors`](Self::set_errors).
        ///
        /// <p>Information about the instances that could not be launched by the fleet. Valid only when <b>Type</b> is set to <code>instant</code>.</p>
        pub fn errors(mut self, input: crate::model::DescribeFleetError) -> Self {
            let mut v = self.errors.unwrap_or_default();
            v.push(input);
            self.errors = Some(v);
            self
        }
        /// <p>Information about the instances that could not be launched by the fleet. Valid only when <b>Type</b> is set to <code>instant</code>.</p>
        pub fn set_errors(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::DescribeFleetError>>,
        ) -> Self {
            self.errors = input;
            self
        }
        /// Appends an item to `instances`.
        ///
        /// To override the contents of this collection use [`set_instances`](Self::set_instances).
        ///
        /// <p>Information about the instances that were launched by the fleet. Valid only when <b>Type</b> is set to <code>instant</code>.</p>
        pub fn instances(mut self, input: crate::model::DescribeFleetsInstances) -> Self {
            let mut v = self.instances.unwrap_or_default();
            v.push(input);
            self.instances = Some(v);
            self
        }
        /// <p>Information about the instances that were launched by the fleet. Valid only when <b>Type</b> is set to <code>instant</code>.</p>
        pub fn set_instances(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::DescribeFleetsInstances>>,
        ) -> Self {
            self.instances = input;
            self
        }
        /// <p>Reserved.</p>
        pub fn context(mut self, input: impl Into<std::string::String>) -> Self {
            self.context = Some(input.into());
            self
        }
        /// <p>Reserved.</p>
        pub fn set_context(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.context = input;
            self
        }
        /// Consumes the builder and constructs a [`FleetData`](crate::model::FleetData).
        pub fn build(self) -> crate::model::FleetData {
            crate::model::FleetData {
                activity_status: self.activity_status,
                create_time: self.create_time,
                fleet_id: self.fleet_id,
                fleet_state: self.fleet_state,
                client_token: self.client_token,
                excess_capacity_termination_policy: self.excess_capacity_termination_policy,
                fulfilled_capacity: self.fulfilled_capacity,
                fulfilled_on_demand_capacity: self.fulfilled_on_demand_capacity,
                launch_template_configs: self.launch_template_configs,
                target_capacity_specification: self.target_capacity_specification,
                terminate_instances_with_expiration: self.terminate_instances_with_expiration,
                r#type: self.r#type,
                valid_from: self.valid_from,
                valid_until: self.valid_until,
                replace_unhealthy_instances: self.replace_unhealthy_instances,
                spot_options: self.spot_options,
                on_demand_options: self.on_demand_options,
                tags: self.tags,
                errors: self.errors,
                instances: self.instances,
                context: self.context,
            }
        }
    }
}
impl FleetData {
    /// Creates a new builder-style object to manufacture [`FleetData`](crate::model::FleetData).
    pub fn builder() -> crate::model::fleet_data::Builder {
        crate::model::fleet_data::Builder::default()
    }
}

/// <p>Describes the instances that were launched by the fleet.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DescribeFleetsInstances {
    /// <p>The launch templates and overrides that were used for launching the instances. The values that you specify in the Overrides replace the values in the launch template.</p>
    #[doc(hidden)]
    pub launch_template_and_overrides:
        std::option::Option<crate::model::LaunchTemplateAndOverridesResponse>,
    /// <p>Indicates if the instance that was launched is a Spot Instance or On-Demand Instance.</p>
    #[doc(hidden)]
    pub lifecycle: std::option::Option<crate::model::InstanceLifecycle>,
    /// <p>The IDs of the instances.</p>
    #[doc(hidden)]
    pub instance_ids: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>The instance type.</p>
    #[doc(hidden)]
    pub instance_type: std::option::Option<crate::model::InstanceType>,
    /// <p>The value is <code>Windows</code> for Windows instances. Otherwise, the value is blank.</p>
    #[doc(hidden)]
    pub platform: std::option::Option<crate::model::PlatformValues>,
}
impl DescribeFleetsInstances {
    /// <p>The launch templates and overrides that were used for launching the instances. The values that you specify in the Overrides replace the values in the launch template.</p>
    pub fn launch_template_and_overrides(
        &self,
    ) -> std::option::Option<&crate::model::LaunchTemplateAndOverridesResponse> {
        self.launch_template_and_overrides.as_ref()
    }
    /// <p>Indicates if the instance that was launched is a Spot Instance or On-Demand Instance.</p>
    pub fn lifecycle(&self) -> std::option::Option<&crate::model::InstanceLifecycle> {
        self.lifecycle.as_ref()
    }
    /// <p>The IDs of the instances.</p>
    pub fn instance_ids(&self) -> std::option::Option<&[std::string::String]> {
        self.instance_ids.as_deref()
    }
    /// <p>The instance type.</p>
    pub fn instance_type(&self) -> std::option::Option<&crate::model::InstanceType> {
        self.instance_type.as_ref()
    }
    /// <p>The value is <code>Windows</code> for Windows instances. Otherwise, the value is blank.</p>
    pub fn platform(&self) -> std::option::Option<&crate::model::PlatformValues> {
        self.platform.as_ref()
    }
}
/// See [`DescribeFleetsInstances`](crate::model::DescribeFleetsInstances).
pub mod describe_fleets_instances {

    /// A builder for [`DescribeFleetsInstances`](crate::model::DescribeFleetsInstances).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) launch_template_and_overrides:
            std::option::Option<crate::model::LaunchTemplateAndOverridesResponse>,
        pub(crate) lifecycle: std::option::Option<crate::model::InstanceLifecycle>,
        pub(crate) instance_ids: std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) instance_type: std::option::Option<crate::model::InstanceType>,
        pub(crate) platform: std::option::Option<crate::model::PlatformValues>,
    }
    impl Builder {
        /// <p>The launch templates and overrides that were used for launching the instances. The values that you specify in the Overrides replace the values in the launch template.</p>
        pub fn launch_template_and_overrides(
            mut self,
            input: crate::model::LaunchTemplateAndOverridesResponse,
        ) -> Self {
            self.launch_template_and_overrides = Some(input);
            self
        }
        /// <p>The launch templates and overrides that were used for launching the instances. The values that you specify in the Overrides replace the values in the launch template.</p>
        pub fn set_launch_template_and_overrides(
            mut self,
            input: std::option::Option<crate::model::LaunchTemplateAndOverridesResponse>,
        ) -> Self {
            self.launch_template_and_overrides = input;
            self
        }
        /// <p>Indicates if the instance that was launched is a Spot Instance or On-Demand Instance.</p>
        pub fn lifecycle(mut self, input: crate::model::InstanceLifecycle) -> Self {
            self.lifecycle = Some(input);
            self
        }
        /// <p>Indicates if the instance that was launched is a Spot Instance or On-Demand Instance.</p>
        pub fn set_lifecycle(
            mut self,
            input: std::option::Option<crate::model::InstanceLifecycle>,
        ) -> Self {
            self.lifecycle = input;
            self
        }
        /// Appends an item to `instance_ids`.
        ///
        /// To override the contents of this collection use [`set_instance_ids`](Self::set_instance_ids).
        ///
        /// <p>The IDs of the instances.</p>
        pub fn instance_ids(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.instance_ids.unwrap_or_default();
            v.push(input.into());
            self.instance_ids = Some(v);
            self
        }
        /// <p>The IDs of the instances.</p>
        pub fn set_instance_ids(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.instance_ids = input;
            self
        }
        /// <p>The instance type.</p>
        pub fn instance_type(mut self, input: crate::model::InstanceType) -> Self {
            self.instance_type = Some(input);
            self
        }
        /// <p>The instance type.</p>
        pub fn set_instance_type(
            mut self,
            input: std::option::Option<crate::model::InstanceType>,
        ) -> Self {
            self.instance_type = input;
            self
        }
        /// <p>The value is <code>Windows</code> for Windows instances. Otherwise, the value is blank.</p>
        pub fn platform(mut self, input: crate::model::PlatformValues) -> Self {
            self.platform = Some(input);
            self
        }
        /// <p>The value is <code>Windows</code> for Windows instances. Otherwise, the value is blank.</p>
        pub fn set_platform(
            mut self,
            input: std::option::Option<crate::model::PlatformValues>,
        ) -> Self {
            self.platform = input;
            self
        }
        /// Consumes the builder and constructs a [`DescribeFleetsInstances`](crate::model::DescribeFleetsInstances).
        pub fn build(self) -> crate::model::DescribeFleetsInstances {
            crate::model::DescribeFleetsInstances {
                launch_template_and_overrides: self.launch_template_and_overrides,
                lifecycle: self.lifecycle,
                instance_ids: self.instance_ids,
                instance_type: self.instance_type,
                platform: self.platform,
            }
        }
    }
}
impl DescribeFleetsInstances {
    /// Creates a new builder-style object to manufacture [`DescribeFleetsInstances`](crate::model::DescribeFleetsInstances).
    pub fn builder() -> crate::model::describe_fleets_instances::Builder {
        crate::model::describe_fleets_instances::Builder::default()
    }
}

/// When writing a match expression against `InstanceLifecycle`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let instancelifecycle = unimplemented!();
/// match instancelifecycle {
///     InstanceLifecycle::OnDemand => { /* ... */ },
///     InstanceLifecycle::Spot => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `instancelifecycle` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `InstanceLifecycle::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `InstanceLifecycle::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `InstanceLifecycle::NewFeature` is defined.
/// Specifically, when `instancelifecycle` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `InstanceLifecycle::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 InstanceLifecycle {
    #[allow(missing_docs)] // documentation missing in model
    OnDemand,
    #[allow(missing_docs)] // documentation missing in model
    Spot,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for InstanceLifecycle {
    fn from(s: &str) -> Self {
        match s {
            "on-demand" => InstanceLifecycle::OnDemand,
            "spot" => InstanceLifecycle::Spot,
            other => {
                InstanceLifecycle::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for InstanceLifecycle {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(InstanceLifecycle::from(s))
    }
}
impl InstanceLifecycle {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            InstanceLifecycle::OnDemand => "on-demand",
            InstanceLifecycle::Spot => "spot",
            InstanceLifecycle::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["on-demand", "spot"]
    }
}
impl AsRef<str> for InstanceLifecycle {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes a launch template and overrides.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LaunchTemplateAndOverridesResponse {
    /// <p>The launch template.</p>
    #[doc(hidden)]
    pub launch_template_specification:
        std::option::Option<crate::model::FleetLaunchTemplateSpecification>,
    /// <p>Any parameters that you specify override the same parameters in the launch template.</p>
    #[doc(hidden)]
    pub overrides: std::option::Option<crate::model::FleetLaunchTemplateOverrides>,
}
impl LaunchTemplateAndOverridesResponse {
    /// <p>The launch template.</p>
    pub fn launch_template_specification(
        &self,
    ) -> std::option::Option<&crate::model::FleetLaunchTemplateSpecification> {
        self.launch_template_specification.as_ref()
    }
    /// <p>Any parameters that you specify override the same parameters in the launch template.</p>
    pub fn overrides(&self) -> std::option::Option<&crate::model::FleetLaunchTemplateOverrides> {
        self.overrides.as_ref()
    }
}
/// See [`LaunchTemplateAndOverridesResponse`](crate::model::LaunchTemplateAndOverridesResponse).
pub mod launch_template_and_overrides_response {

    /// A builder for [`LaunchTemplateAndOverridesResponse`](crate::model::LaunchTemplateAndOverridesResponse).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) launch_template_specification:
            std::option::Option<crate::model::FleetLaunchTemplateSpecification>,
        pub(crate) overrides: std::option::Option<crate::model::FleetLaunchTemplateOverrides>,
    }
    impl Builder {
        /// <p>The launch template.</p>
        pub fn launch_template_specification(
            mut self,
            input: crate::model::FleetLaunchTemplateSpecification,
        ) -> Self {
            self.launch_template_specification = Some(input);
            self
        }
        /// <p>The launch template.</p>
        pub fn set_launch_template_specification(
            mut self,
            input: std::option::Option<crate::model::FleetLaunchTemplateSpecification>,
        ) -> Self {
            self.launch_template_specification = input;
            self
        }
        /// <p>Any parameters that you specify override the same parameters in the launch template.</p>
        pub fn overrides(mut self, input: crate::model::FleetLaunchTemplateOverrides) -> Self {
            self.overrides = Some(input);
            self
        }
        /// <p>Any parameters that you specify override the same parameters in the launch template.</p>
        pub fn set_overrides(
            mut self,
            input: std::option::Option<crate::model::FleetLaunchTemplateOverrides>,
        ) -> Self {
            self.overrides = input;
            self
        }
        /// Consumes the builder and constructs a [`LaunchTemplateAndOverridesResponse`](crate::model::LaunchTemplateAndOverridesResponse).
        pub fn build(self) -> crate::model::LaunchTemplateAndOverridesResponse {
            crate::model::LaunchTemplateAndOverridesResponse {
                launch_template_specification: self.launch_template_specification,
                overrides: self.overrides,
            }
        }
    }
}
impl LaunchTemplateAndOverridesResponse {
    /// Creates a new builder-style object to manufacture [`LaunchTemplateAndOverridesResponse`](crate::model::LaunchTemplateAndOverridesResponse).
    pub fn builder() -> crate::model::launch_template_and_overrides_response::Builder {
        crate::model::launch_template_and_overrides_response::Builder::default()
    }
}

/// <p>Describes overrides for a launch template.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct FleetLaunchTemplateOverrides {
    /// <p>The instance type.</p> <note>
    /// <p>If you specify <code>InstanceType</code>, you can't specify <code>InstanceRequirements</code>.</p>
    /// </note>
    #[doc(hidden)]
    pub instance_type: std::option::Option<crate::model::InstanceType>,
    /// <p>The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price. </p> <important>
    /// <p>If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.</p>
    /// </important>
    #[doc(hidden)]
    pub max_price: std::option::Option<std::string::String>,
    /// <p>The ID of the subnet in which to launch the instances.</p>
    #[doc(hidden)]
    pub subnet_id: std::option::Option<std::string::String>,
    /// <p>The Availability Zone in which to launch the instances.</p>
    #[doc(hidden)]
    pub availability_zone: std::option::Option<std::string::String>,
    /// <p>The number of units provided by the specified instance type.</p>
    #[doc(hidden)]
    pub weighted_capacity: std::option::Option<f64>,
    /// <p>The priority for the launch template override. The highest priority is launched first.</p>
    /// <p>If the On-Demand <code>AllocationStrategy</code> is set to <code>prioritized</code>, EC2 Fleet uses priority to determine which launch template override to use first in fulfilling On-Demand capacity.</p>
    /// <p>If the Spot <code>AllocationStrategy</code> is set to <code>capacity-optimized-prioritized</code>, EC2 Fleet uses priority on a best-effort basis to determine which launch template override to use in fulfilling Spot capacity, but optimizes for capacity first.</p>
    /// <p>Valid values are whole numbers starting at <code>0</code>. The lower the number, the higher the priority. If no number is set, the override has the lowest priority. You can set the same priority for different launch template overrides.</p>
    #[doc(hidden)]
    pub priority: std::option::Option<f64>,
    /// <p>The location where the instance launched, if applicable.</p>
    #[doc(hidden)]
    pub placement: std::option::Option<crate::model::PlacementResponse>,
    /// <p>The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with those attributes.</p> <note>
    /// <p>If you specify <code>InstanceRequirements</code>, you can't specify <code>InstanceType</code>.</p>
    /// </note>
    #[doc(hidden)]
    pub instance_requirements: std::option::Option<crate::model::InstanceRequirements>,
    /// <p>The ID of the AMI. An AMI is required to launch an instance. The AMI ID must be specified here or in the launch template.</p>
    #[doc(hidden)]
    pub image_id: std::option::Option<std::string::String>,
}
impl FleetLaunchTemplateOverrides {
    /// <p>The instance type.</p> <note>
    /// <p>If you specify <code>InstanceType</code>, you can't specify <code>InstanceRequirements</code>.</p>
    /// </note>
    pub fn instance_type(&self) -> std::option::Option<&crate::model::InstanceType> {
        self.instance_type.as_ref()
    }
    /// <p>The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price. </p> <important>
    /// <p>If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.</p>
    /// </important>
    pub fn max_price(&self) -> std::option::Option<&str> {
        self.max_price.as_deref()
    }
    /// <p>The ID of the subnet in which to launch the instances.</p>
    pub fn subnet_id(&self) -> std::option::Option<&str> {
        self.subnet_id.as_deref()
    }
    /// <p>The Availability Zone in which to launch the instances.</p>
    pub fn availability_zone(&self) -> std::option::Option<&str> {
        self.availability_zone.as_deref()
    }
    /// <p>The number of units provided by the specified instance type.</p>
    pub fn weighted_capacity(&self) -> std::option::Option<f64> {
        self.weighted_capacity
    }
    /// <p>The priority for the launch template override. The highest priority is launched first.</p>
    /// <p>If the On-Demand <code>AllocationStrategy</code> is set to <code>prioritized</code>, EC2 Fleet uses priority to determine which launch template override to use first in fulfilling On-Demand capacity.</p>
    /// <p>If the Spot <code>AllocationStrategy</code> is set to <code>capacity-optimized-prioritized</code>, EC2 Fleet uses priority on a best-effort basis to determine which launch template override to use in fulfilling Spot capacity, but optimizes for capacity first.</p>
    /// <p>Valid values are whole numbers starting at <code>0</code>. The lower the number, the higher the priority. If no number is set, the override has the lowest priority. You can set the same priority for different launch template overrides.</p>
    pub fn priority(&self) -> std::option::Option<f64> {
        self.priority
    }
    /// <p>The location where the instance launched, if applicable.</p>
    pub fn placement(&self) -> std::option::Option<&crate::model::PlacementResponse> {
        self.placement.as_ref()
    }
    /// <p>The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with those attributes.</p> <note>
    /// <p>If you specify <code>InstanceRequirements</code>, you can't specify <code>InstanceType</code>.</p>
    /// </note>
    pub fn instance_requirements(
        &self,
    ) -> std::option::Option<&crate::model::InstanceRequirements> {
        self.instance_requirements.as_ref()
    }
    /// <p>The ID of the AMI. An AMI is required to launch an instance. The AMI ID must be specified here or in the launch template.</p>
    pub fn image_id(&self) -> std::option::Option<&str> {
        self.image_id.as_deref()
    }
}
/// See [`FleetLaunchTemplateOverrides`](crate::model::FleetLaunchTemplateOverrides).
pub mod fleet_launch_template_overrides {

    /// A builder for [`FleetLaunchTemplateOverrides`](crate::model::FleetLaunchTemplateOverrides).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) instance_type: std::option::Option<crate::model::InstanceType>,
        pub(crate) max_price: std::option::Option<std::string::String>,
        pub(crate) subnet_id: std::option::Option<std::string::String>,
        pub(crate) availability_zone: std::option::Option<std::string::String>,
        pub(crate) weighted_capacity: std::option::Option<f64>,
        pub(crate) priority: std::option::Option<f64>,
        pub(crate) placement: std::option::Option<crate::model::PlacementResponse>,
        pub(crate) instance_requirements: std::option::Option<crate::model::InstanceRequirements>,
        pub(crate) image_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The instance type.</p> <note>
        /// <p>If you specify <code>InstanceType</code>, you can't specify <code>InstanceRequirements</code>.</p>
        /// </note>
        pub fn instance_type(mut self, input: crate::model::InstanceType) -> Self {
            self.instance_type = Some(input);
            self
        }
        /// <p>The instance type.</p> <note>
        /// <p>If you specify <code>InstanceType</code>, you can't specify <code>InstanceRequirements</code>.</p>
        /// </note>
        pub fn set_instance_type(
            mut self,
            input: std::option::Option<crate::model::InstanceType>,
        ) -> Self {
            self.instance_type = input;
            self
        }
        /// <p>The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price. </p> <important>
        /// <p>If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.</p>
        /// </important>
        pub fn max_price(mut self, input: impl Into<std::string::String>) -> Self {
            self.max_price = Some(input.into());
            self
        }
        /// <p>The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price. </p> <important>
        /// <p>If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.</p>
        /// </important>
        pub fn set_max_price(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.max_price = input;
            self
        }
        /// <p>The ID of the subnet in which to launch the instances.</p>
        pub fn subnet_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.subnet_id = Some(input.into());
            self
        }
        /// <p>The ID of the subnet in which to launch the instances.</p>
        pub fn set_subnet_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.subnet_id = input;
            self
        }
        /// <p>The Availability Zone in which to launch the instances.</p>
        pub fn availability_zone(mut self, input: impl Into<std::string::String>) -> Self {
            self.availability_zone = Some(input.into());
            self
        }
        /// <p>The Availability Zone in which to launch the instances.</p>
        pub fn set_availability_zone(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.availability_zone = input;
            self
        }
        /// <p>The number of units provided by the specified instance type.</p>
        pub fn weighted_capacity(mut self, input: f64) -> Self {
            self.weighted_capacity = Some(input);
            self
        }
        /// <p>The number of units provided by the specified instance type.</p>
        pub fn set_weighted_capacity(mut self, input: std::option::Option<f64>) -> Self {
            self.weighted_capacity = input;
            self
        }
        /// <p>The priority for the launch template override. The highest priority is launched first.</p>
        /// <p>If the On-Demand <code>AllocationStrategy</code> is set to <code>prioritized</code>, EC2 Fleet uses priority to determine which launch template override to use first in fulfilling On-Demand capacity.</p>
        /// <p>If the Spot <code>AllocationStrategy</code> is set to <code>capacity-optimized-prioritized</code>, EC2 Fleet uses priority on a best-effort basis to determine which launch template override to use in fulfilling Spot capacity, but optimizes for capacity first.</p>
        /// <p>Valid values are whole numbers starting at <code>0</code>. The lower the number, the higher the priority. If no number is set, the override has the lowest priority. You can set the same priority for different launch template overrides.</p>
        pub fn priority(mut self, input: f64) -> Self {
            self.priority = Some(input);
            self
        }
        /// <p>The priority for the launch template override. The highest priority is launched first.</p>
        /// <p>If the On-Demand <code>AllocationStrategy</code> is set to <code>prioritized</code>, EC2 Fleet uses priority to determine which launch template override to use first in fulfilling On-Demand capacity.</p>
        /// <p>If the Spot <code>AllocationStrategy</code> is set to <code>capacity-optimized-prioritized</code>, EC2 Fleet uses priority on a best-effort basis to determine which launch template override to use in fulfilling Spot capacity, but optimizes for capacity first.</p>
        /// <p>Valid values are whole numbers starting at <code>0</code>. The lower the number, the higher the priority. If no number is set, the override has the lowest priority. You can set the same priority for different launch template overrides.</p>
        pub fn set_priority(mut self, input: std::option::Option<f64>) -> Self {
            self.priority = input;
            self
        }
        /// <p>The location where the instance launched, if applicable.</p>
        pub fn placement(mut self, input: crate::model::PlacementResponse) -> Self {
            self.placement = Some(input);
            self
        }
        /// <p>The location where the instance launched, if applicable.</p>
        pub fn set_placement(
            mut self,
            input: std::option::Option<crate::model::PlacementResponse>,
        ) -> Self {
            self.placement = input;
            self
        }
        /// <p>The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with those attributes.</p> <note>
        /// <p>If you specify <code>InstanceRequirements</code>, you can't specify <code>InstanceType</code>.</p>
        /// </note>
        pub fn instance_requirements(mut self, input: crate::model::InstanceRequirements) -> Self {
            self.instance_requirements = Some(input);
            self
        }
        /// <p>The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with those attributes.</p> <note>
        /// <p>If you specify <code>InstanceRequirements</code>, you can't specify <code>InstanceType</code>.</p>
        /// </note>
        pub fn set_instance_requirements(
            mut self,
            input: std::option::Option<crate::model::InstanceRequirements>,
        ) -> Self {
            self.instance_requirements = input;
            self
        }
        /// <p>The ID of the AMI. An AMI is required to launch an instance. The AMI ID must be specified here or in the launch template.</p>
        pub fn image_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.image_id = Some(input.into());
            self
        }
        /// <p>The ID of the AMI. An AMI is required to launch an instance. The AMI ID must be specified here or in the launch template.</p>
        pub fn set_image_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.image_id = input;
            self
        }
        /// Consumes the builder and constructs a [`FleetLaunchTemplateOverrides`](crate::model::FleetLaunchTemplateOverrides).
        pub fn build(self) -> crate::model::FleetLaunchTemplateOverrides {
            crate::model::FleetLaunchTemplateOverrides {
                instance_type: self.instance_type,
                max_price: self.max_price,
                subnet_id: self.subnet_id,
                availability_zone: self.availability_zone,
                weighted_capacity: self.weighted_capacity,
                priority: self.priority,
                placement: self.placement,
                instance_requirements: self.instance_requirements,
                image_id: self.image_id,
            }
        }
    }
}
impl FleetLaunchTemplateOverrides {
    /// Creates a new builder-style object to manufacture [`FleetLaunchTemplateOverrides`](crate::model::FleetLaunchTemplateOverrides).
    pub fn builder() -> crate::model::fleet_launch_template_overrides::Builder {
        crate::model::fleet_launch_template_overrides::Builder::default()
    }
}

/// <p>Describes the placement of an instance.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct PlacementResponse {
    /// <p>The name of the placement group that the instance is in.</p>
    #[doc(hidden)]
    pub group_name: std::option::Option<std::string::String>,
}
impl PlacementResponse {
    /// <p>The name of the placement group that the instance is in.</p>
    pub fn group_name(&self) -> std::option::Option<&str> {
        self.group_name.as_deref()
    }
}
/// See [`PlacementResponse`](crate::model::PlacementResponse).
pub mod placement_response {

    /// A builder for [`PlacementResponse`](crate::model::PlacementResponse).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) group_name: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The name of the placement group that the instance is in.</p>
        pub fn group_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.group_name = Some(input.into());
            self
        }
        /// <p>The name of the placement group that the instance is in.</p>
        pub fn set_group_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.group_name = input;
            self
        }
        /// Consumes the builder and constructs a [`PlacementResponse`](crate::model::PlacementResponse).
        pub fn build(self) -> crate::model::PlacementResponse {
            crate::model::PlacementResponse {
                group_name: self.group_name,
            }
        }
    }
}
impl PlacementResponse {
    /// Creates a new builder-style object to manufacture [`PlacementResponse`](crate::model::PlacementResponse).
    pub fn builder() -> crate::model::placement_response::Builder {
        crate::model::placement_response::Builder::default()
    }
}

/// <p>Describes the instances that could not be launched by the fleet.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DescribeFleetError {
    /// <p>The launch templates and overrides that were used for launching the instances. The values that you specify in the Overrides replace the values in the launch template.</p>
    #[doc(hidden)]
    pub launch_template_and_overrides:
        std::option::Option<crate::model::LaunchTemplateAndOverridesResponse>,
    /// <p>Indicates if the instance that could not be launched was a Spot Instance or On-Demand Instance.</p>
    #[doc(hidden)]
    pub lifecycle: std::option::Option<crate::model::InstanceLifecycle>,
    /// <p>The error code that indicates why the instance could not be launched. For more information about error codes, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/errors-overview.html.html">Error codes</a>.</p>
    #[doc(hidden)]
    pub error_code: std::option::Option<std::string::String>,
    /// <p>The error message that describes why the instance could not be launched. For more information about error messages, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/errors-overview.html.html">Error codes</a>.</p>
    #[doc(hidden)]
    pub error_message: std::option::Option<std::string::String>,
}
impl DescribeFleetError {
    /// <p>The launch templates and overrides that were used for launching the instances. The values that you specify in the Overrides replace the values in the launch template.</p>
    pub fn launch_template_and_overrides(
        &self,
    ) -> std::option::Option<&crate::model::LaunchTemplateAndOverridesResponse> {
        self.launch_template_and_overrides.as_ref()
    }
    /// <p>Indicates if the instance that could not be launched was a Spot Instance or On-Demand Instance.</p>
    pub fn lifecycle(&self) -> std::option::Option<&crate::model::InstanceLifecycle> {
        self.lifecycle.as_ref()
    }
    /// <p>The error code that indicates why the instance could not be launched. For more information about error codes, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/errors-overview.html.html">Error codes</a>.</p>
    pub fn error_code(&self) -> std::option::Option<&str> {
        self.error_code.as_deref()
    }
    /// <p>The error message that describes why the instance could not be launched. For more information about error messages, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/errors-overview.html.html">Error codes</a>.</p>
    pub fn error_message(&self) -> std::option::Option<&str> {
        self.error_message.as_deref()
    }
}
/// See [`DescribeFleetError`](crate::model::DescribeFleetError).
pub mod describe_fleet_error {

    /// A builder for [`DescribeFleetError`](crate::model::DescribeFleetError).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) launch_template_and_overrides:
            std::option::Option<crate::model::LaunchTemplateAndOverridesResponse>,
        pub(crate) lifecycle: std::option::Option<crate::model::InstanceLifecycle>,
        pub(crate) error_code: std::option::Option<std::string::String>,
        pub(crate) error_message: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The launch templates and overrides that were used for launching the instances. The values that you specify in the Overrides replace the values in the launch template.</p>
        pub fn launch_template_and_overrides(
            mut self,
            input: crate::model::LaunchTemplateAndOverridesResponse,
        ) -> Self {
            self.launch_template_and_overrides = Some(input);
            self
        }
        /// <p>The launch templates and overrides that were used for launching the instances. The values that you specify in the Overrides replace the values in the launch template.</p>
        pub fn set_launch_template_and_overrides(
            mut self,
            input: std::option::Option<crate::model::LaunchTemplateAndOverridesResponse>,
        ) -> Self {
            self.launch_template_and_overrides = input;
            self
        }
        /// <p>Indicates if the instance that could not be launched was a Spot Instance or On-Demand Instance.</p>
        pub fn lifecycle(mut self, input: crate::model::InstanceLifecycle) -> Self {
            self.lifecycle = Some(input);
            self
        }
        /// <p>Indicates if the instance that could not be launched was a Spot Instance or On-Demand Instance.</p>
        pub fn set_lifecycle(
            mut self,
            input: std::option::Option<crate::model::InstanceLifecycle>,
        ) -> Self {
            self.lifecycle = input;
            self
        }
        /// <p>The error code that indicates why the instance could not be launched. For more information about error codes, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/errors-overview.html.html">Error codes</a>.</p>
        pub fn error_code(mut self, input: impl Into<std::string::String>) -> Self {
            self.error_code = Some(input.into());
            self
        }
        /// <p>The error code that indicates why the instance could not be launched. For more information about error codes, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/errors-overview.html.html">Error codes</a>.</p>
        pub fn set_error_code(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.error_code = input;
            self
        }
        /// <p>The error message that describes why the instance could not be launched. For more information about error messages, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/errors-overview.html.html">Error codes</a>.</p>
        pub fn error_message(mut self, input: impl Into<std::string::String>) -> Self {
            self.error_message = Some(input.into());
            self
        }
        /// <p>The error message that describes why the instance could not be launched. For more information about error messages, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/errors-overview.html.html">Error codes</a>.</p>
        pub fn set_error_message(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.error_message = input;
            self
        }
        /// Consumes the builder and constructs a [`DescribeFleetError`](crate::model::DescribeFleetError).
        pub fn build(self) -> crate::model::DescribeFleetError {
            crate::model::DescribeFleetError {
                launch_template_and_overrides: self.launch_template_and_overrides,
                lifecycle: self.lifecycle,
                error_code: self.error_code,
                error_message: self.error_message,
            }
        }
    }
}
impl DescribeFleetError {
    /// Creates a new builder-style object to manufacture [`DescribeFleetError`](crate::model::DescribeFleetError).
    pub fn builder() -> crate::model::describe_fleet_error::Builder {
        crate::model::describe_fleet_error::Builder::default()
    }
}

/// <p>Describes the configuration of On-Demand Instances in an EC2 Fleet.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct OnDemandOptions {
    /// <p>The strategy that determines the order of the launch template overrides to use in fulfilling On-Demand capacity.</p>
    /// <p> <code>lowest-price</code> - EC2 Fleet uses price to determine the order, launching the lowest price first.</p>
    /// <p> <code>prioritized</code> - EC2 Fleet uses the priority that you assigned to each launch template override, launching the highest priority first.</p>
    /// <p>Default: <code>lowest-price</code> </p>
    #[doc(hidden)]
    pub allocation_strategy: std::option::Option<crate::model::FleetOnDemandAllocationStrategy>,
    /// <p>The strategy for using unused Capacity Reservations for fulfilling On-Demand capacity.</p>
    /// <p>Supported only for fleets of type <code>instant</code>.</p>
    #[doc(hidden)]
    pub capacity_reservation_options: std::option::Option<crate::model::CapacityReservationOptions>,
    /// <p>Indicates that the fleet uses a single instance type to launch all On-Demand Instances in the fleet.</p>
    /// <p>Supported only for fleets of type <code>instant</code>.</p>
    #[doc(hidden)]
    pub single_instance_type: std::option::Option<bool>,
    /// <p>Indicates that the fleet launches all On-Demand Instances into a single Availability Zone.</p>
    /// <p>Supported only for fleets of type <code>instant</code>.</p>
    #[doc(hidden)]
    pub single_availability_zone: std::option::Option<bool>,
    /// <p>The minimum target capacity for On-Demand Instances in the fleet. If the minimum target capacity is not reached, the fleet launches no instances.</p>
    /// <p>Supported only for fleets of type <code>instant</code>.</p>
    /// <p>At least one of the following must be specified: <code>SingleAvailabilityZone</code> | <code>SingleInstanceType</code> </p>
    #[doc(hidden)]
    pub min_target_capacity: std::option::Option<i32>,
    /// <p>The maximum amount per hour for On-Demand Instances that you're willing to pay.</p>
    #[doc(hidden)]
    pub max_total_price: std::option::Option<std::string::String>,
}
impl OnDemandOptions {
    /// <p>The strategy that determines the order of the launch template overrides to use in fulfilling On-Demand capacity.</p>
    /// <p> <code>lowest-price</code> - EC2 Fleet uses price to determine the order, launching the lowest price first.</p>
    /// <p> <code>prioritized</code> - EC2 Fleet uses the priority that you assigned to each launch template override, launching the highest priority first.</p>
    /// <p>Default: <code>lowest-price</code> </p>
    pub fn allocation_strategy(
        &self,
    ) -> std::option::Option<&crate::model::FleetOnDemandAllocationStrategy> {
        self.allocation_strategy.as_ref()
    }
    /// <p>The strategy for using unused Capacity Reservations for fulfilling On-Demand capacity.</p>
    /// <p>Supported only for fleets of type <code>instant</code>.</p>
    pub fn capacity_reservation_options(
        &self,
    ) -> std::option::Option<&crate::model::CapacityReservationOptions> {
        self.capacity_reservation_options.as_ref()
    }
    /// <p>Indicates that the fleet uses a single instance type to launch all On-Demand Instances in the fleet.</p>
    /// <p>Supported only for fleets of type <code>instant</code>.</p>
    pub fn single_instance_type(&self) -> std::option::Option<bool> {
        self.single_instance_type
    }
    /// <p>Indicates that the fleet launches all On-Demand Instances into a single Availability Zone.</p>
    /// <p>Supported only for fleets of type <code>instant</code>.</p>
    pub fn single_availability_zone(&self) -> std::option::Option<bool> {
        self.single_availability_zone
    }
    /// <p>The minimum target capacity for On-Demand Instances in the fleet. If the minimum target capacity is not reached, the fleet launches no instances.</p>
    /// <p>Supported only for fleets of type <code>instant</code>.</p>
    /// <p>At least one of the following must be specified: <code>SingleAvailabilityZone</code> | <code>SingleInstanceType</code> </p>
    pub fn min_target_capacity(&self) -> std::option::Option<i32> {
        self.min_target_capacity
    }
    /// <p>The maximum amount per hour for On-Demand Instances that you're willing to pay.</p>
    pub fn max_total_price(&self) -> std::option::Option<&str> {
        self.max_total_price.as_deref()
    }
}
/// See [`OnDemandOptions`](crate::model::OnDemandOptions).
pub mod on_demand_options {

    /// A builder for [`OnDemandOptions`](crate::model::OnDemandOptions).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) allocation_strategy:
            std::option::Option<crate::model::FleetOnDemandAllocationStrategy>,
        pub(crate) capacity_reservation_options:
            std::option::Option<crate::model::CapacityReservationOptions>,
        pub(crate) single_instance_type: std::option::Option<bool>,
        pub(crate) single_availability_zone: std::option::Option<bool>,
        pub(crate) min_target_capacity: std::option::Option<i32>,
        pub(crate) max_total_price: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The strategy that determines the order of the launch template overrides to use in fulfilling On-Demand capacity.</p>
        /// <p> <code>lowest-price</code> - EC2 Fleet uses price to determine the order, launching the lowest price first.</p>
        /// <p> <code>prioritized</code> - EC2 Fleet uses the priority that you assigned to each launch template override, launching the highest priority first.</p>
        /// <p>Default: <code>lowest-price</code> </p>
        pub fn allocation_strategy(
            mut self,
            input: crate::model::FleetOnDemandAllocationStrategy,
        ) -> Self {
            self.allocation_strategy = Some(input);
            self
        }
        /// <p>The strategy that determines the order of the launch template overrides to use in fulfilling On-Demand capacity.</p>
        /// <p> <code>lowest-price</code> - EC2 Fleet uses price to determine the order, launching the lowest price first.</p>
        /// <p> <code>prioritized</code> - EC2 Fleet uses the priority that you assigned to each launch template override, launching the highest priority first.</p>
        /// <p>Default: <code>lowest-price</code> </p>
        pub fn set_allocation_strategy(
            mut self,
            input: std::option::Option<crate::model::FleetOnDemandAllocationStrategy>,
        ) -> Self {
            self.allocation_strategy = input;
            self
        }
        /// <p>The strategy for using unused Capacity Reservations for fulfilling On-Demand capacity.</p>
        /// <p>Supported only for fleets of type <code>instant</code>.</p>
        pub fn capacity_reservation_options(
            mut self,
            input: crate::model::CapacityReservationOptions,
        ) -> Self {
            self.capacity_reservation_options = Some(input);
            self
        }
        /// <p>The strategy for using unused Capacity Reservations for fulfilling On-Demand capacity.</p>
        /// <p>Supported only for fleets of type <code>instant</code>.</p>
        pub fn set_capacity_reservation_options(
            mut self,
            input: std::option::Option<crate::model::CapacityReservationOptions>,
        ) -> Self {
            self.capacity_reservation_options = input;
            self
        }
        /// <p>Indicates that the fleet uses a single instance type to launch all On-Demand Instances in the fleet.</p>
        /// <p>Supported only for fleets of type <code>instant</code>.</p>
        pub fn single_instance_type(mut self, input: bool) -> Self {
            self.single_instance_type = Some(input);
            self
        }
        /// <p>Indicates that the fleet uses a single instance type to launch all On-Demand Instances in the fleet.</p>
        /// <p>Supported only for fleets of type <code>instant</code>.</p>
        pub fn set_single_instance_type(mut self, input: std::option::Option<bool>) -> Self {
            self.single_instance_type = input;
            self
        }
        /// <p>Indicates that the fleet launches all On-Demand Instances into a single Availability Zone.</p>
        /// <p>Supported only for fleets of type <code>instant</code>.</p>
        pub fn single_availability_zone(mut self, input: bool) -> Self {
            self.single_availability_zone = Some(input);
            self
        }
        /// <p>Indicates that the fleet launches all On-Demand Instances into a single Availability Zone.</p>
        /// <p>Supported only for fleets of type <code>instant</code>.</p>
        pub fn set_single_availability_zone(mut self, input: std::option::Option<bool>) -> Self {
            self.single_availability_zone = input;
            self
        }
        /// <p>The minimum target capacity for On-Demand Instances in the fleet. If the minimum target capacity is not reached, the fleet launches no instances.</p>
        /// <p>Supported only for fleets of type <code>instant</code>.</p>
        /// <p>At least one of the following must be specified: <code>SingleAvailabilityZone</code> | <code>SingleInstanceType</code> </p>
        pub fn min_target_capacity(mut self, input: i32) -> Self {
            self.min_target_capacity = Some(input);
            self
        }
        /// <p>The minimum target capacity for On-Demand Instances in the fleet. If the minimum target capacity is not reached, the fleet launches no instances.</p>
        /// <p>Supported only for fleets of type <code>instant</code>.</p>
        /// <p>At least one of the following must be specified: <code>SingleAvailabilityZone</code> | <code>SingleInstanceType</code> </p>
        pub fn set_min_target_capacity(mut self, input: std::option::Option<i32>) -> Self {
            self.min_target_capacity = input;
            self
        }
        /// <p>The maximum amount per hour for On-Demand Instances that you're willing to pay.</p>
        pub fn max_total_price(mut self, input: impl Into<std::string::String>) -> Self {
            self.max_total_price = Some(input.into());
            self
        }
        /// <p>The maximum amount per hour for On-Demand Instances that you're willing to pay.</p>
        pub fn set_max_total_price(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.max_total_price = input;
            self
        }
        /// Consumes the builder and constructs a [`OnDemandOptions`](crate::model::OnDemandOptions).
        pub fn build(self) -> crate::model::OnDemandOptions {
            crate::model::OnDemandOptions {
                allocation_strategy: self.allocation_strategy,
                capacity_reservation_options: self.capacity_reservation_options,
                single_instance_type: self.single_instance_type,
                single_availability_zone: self.single_availability_zone,
                min_target_capacity: self.min_target_capacity,
                max_total_price: self.max_total_price,
            }
        }
    }
}
impl OnDemandOptions {
    /// Creates a new builder-style object to manufacture [`OnDemandOptions`](crate::model::OnDemandOptions).
    pub fn builder() -> crate::model::on_demand_options::Builder {
        crate::model::on_demand_options::Builder::default()
    }
}

/// <p>Describes the strategy for using unused Capacity Reservations for fulfilling On-Demand capacity.</p> <note>
/// <p>This strategy can only be used if the EC2 Fleet is of type <code>instant</code>.</p>
/// </note>
/// <p>For more information about Capacity Reservations, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-capacity-reservations.html">On-Demand Capacity Reservations</a> in the <i>Amazon EC2 User Guide</i>. For examples of using Capacity Reservations in an EC2 Fleet, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet-examples.html">EC2 Fleet example configurations</a> in the <i>Amazon EC2 User Guide</i>.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CapacityReservationOptions {
    /// <p>Indicates whether to use unused Capacity Reservations for fulfilling On-Demand capacity.</p>
    /// <p>If you specify <code>use-capacity-reservations-first</code>, the fleet uses unused Capacity Reservations to fulfill On-Demand capacity up to the target On-Demand capacity. If multiple instance pools have unused Capacity Reservations, the On-Demand allocation strategy (<code>lowest-price</code> or <code>prioritized</code>) is applied. If the number of unused Capacity Reservations is less than the On-Demand target capacity, the remaining On-Demand target capacity is launched according to the On-Demand allocation strategy (<code>lowest-price</code> or <code>prioritized</code>).</p>
    /// <p>If you do not specify a value, the fleet fulfils the On-Demand capacity according to the chosen On-Demand allocation strategy.</p>
    #[doc(hidden)]
    pub usage_strategy: std::option::Option<crate::model::FleetCapacityReservationUsageStrategy>,
}
impl CapacityReservationOptions {
    /// <p>Indicates whether to use unused Capacity Reservations for fulfilling On-Demand capacity.</p>
    /// <p>If you specify <code>use-capacity-reservations-first</code>, the fleet uses unused Capacity Reservations to fulfill On-Demand capacity up to the target On-Demand capacity. If multiple instance pools have unused Capacity Reservations, the On-Demand allocation strategy (<code>lowest-price</code> or <code>prioritized</code>) is applied. If the number of unused Capacity Reservations is less than the On-Demand target capacity, the remaining On-Demand target capacity is launched according to the On-Demand allocation strategy (<code>lowest-price</code> or <code>prioritized</code>).</p>
    /// <p>If you do not specify a value, the fleet fulfils the On-Demand capacity according to the chosen On-Demand allocation strategy.</p>
    pub fn usage_strategy(
        &self,
    ) -> std::option::Option<&crate::model::FleetCapacityReservationUsageStrategy> {
        self.usage_strategy.as_ref()
    }
}
/// See [`CapacityReservationOptions`](crate::model::CapacityReservationOptions).
pub mod capacity_reservation_options {

    /// A builder for [`CapacityReservationOptions`](crate::model::CapacityReservationOptions).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) usage_strategy:
            std::option::Option<crate::model::FleetCapacityReservationUsageStrategy>,
    }
    impl Builder {
        /// <p>Indicates whether to use unused Capacity Reservations for fulfilling On-Demand capacity.</p>
        /// <p>If you specify <code>use-capacity-reservations-first</code>, the fleet uses unused Capacity Reservations to fulfill On-Demand capacity up to the target On-Demand capacity. If multiple instance pools have unused Capacity Reservations, the On-Demand allocation strategy (<code>lowest-price</code> or <code>prioritized</code>) is applied. If the number of unused Capacity Reservations is less than the On-Demand target capacity, the remaining On-Demand target capacity is launched according to the On-Demand allocation strategy (<code>lowest-price</code> or <code>prioritized</code>).</p>
        /// <p>If you do not specify a value, the fleet fulfils the On-Demand capacity according to the chosen On-Demand allocation strategy.</p>
        pub fn usage_strategy(
            mut self,
            input: crate::model::FleetCapacityReservationUsageStrategy,
        ) -> Self {
            self.usage_strategy = Some(input);
            self
        }
        /// <p>Indicates whether to use unused Capacity Reservations for fulfilling On-Demand capacity.</p>
        /// <p>If you specify <code>use-capacity-reservations-first</code>, the fleet uses unused Capacity Reservations to fulfill On-Demand capacity up to the target On-Demand capacity. If multiple instance pools have unused Capacity Reservations, the On-Demand allocation strategy (<code>lowest-price</code> or <code>prioritized</code>) is applied. If the number of unused Capacity Reservations is less than the On-Demand target capacity, the remaining On-Demand target capacity is launched according to the On-Demand allocation strategy (<code>lowest-price</code> or <code>prioritized</code>).</p>
        /// <p>If you do not specify a value, the fleet fulfils the On-Demand capacity according to the chosen On-Demand allocation strategy.</p>
        pub fn set_usage_strategy(
            mut self,
            input: std::option::Option<crate::model::FleetCapacityReservationUsageStrategy>,
        ) -> Self {
            self.usage_strategy = input;
            self
        }
        /// Consumes the builder and constructs a [`CapacityReservationOptions`](crate::model::CapacityReservationOptions).
        pub fn build(self) -> crate::model::CapacityReservationOptions {
            crate::model::CapacityReservationOptions {
                usage_strategy: self.usage_strategy,
            }
        }
    }
}
impl CapacityReservationOptions {
    /// Creates a new builder-style object to manufacture [`CapacityReservationOptions`](crate::model::CapacityReservationOptions).
    pub fn builder() -> crate::model::capacity_reservation_options::Builder {
        crate::model::capacity_reservation_options::Builder::default()
    }
}

/// When writing a match expression against `FleetCapacityReservationUsageStrategy`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let fleetcapacityreservationusagestrategy = unimplemented!();
/// match fleetcapacityreservationusagestrategy {
///     FleetCapacityReservationUsageStrategy::UseCapacityReservationsFirst => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `fleetcapacityreservationusagestrategy` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `FleetCapacityReservationUsageStrategy::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `FleetCapacityReservationUsageStrategy::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `FleetCapacityReservationUsageStrategy::NewFeature` is defined.
/// Specifically, when `fleetcapacityreservationusagestrategy` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `FleetCapacityReservationUsageStrategy::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 FleetCapacityReservationUsageStrategy {
    #[allow(missing_docs)] // documentation missing in model
    UseCapacityReservationsFirst,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for FleetCapacityReservationUsageStrategy {
    fn from(s: &str) -> Self {
        match s {
            "use-capacity-reservations-first" => {
                FleetCapacityReservationUsageStrategy::UseCapacityReservationsFirst
            }
            other => FleetCapacityReservationUsageStrategy::Unknown(
                crate::types::UnknownVariantValue(other.to_owned()),
            ),
        }
    }
}
impl std::str::FromStr for FleetCapacityReservationUsageStrategy {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(FleetCapacityReservationUsageStrategy::from(s))
    }
}
impl FleetCapacityReservationUsageStrategy {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            FleetCapacityReservationUsageStrategy::UseCapacityReservationsFirst => {
                "use-capacity-reservations-first"
            }
            FleetCapacityReservationUsageStrategy::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["use-capacity-reservations-first"]
    }
}
impl AsRef<str> for FleetCapacityReservationUsageStrategy {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `FleetOnDemandAllocationStrategy`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let fleetondemandallocationstrategy = unimplemented!();
/// match fleetondemandallocationstrategy {
///     FleetOnDemandAllocationStrategy::LowestPrice => { /* ... */ },
///     FleetOnDemandAllocationStrategy::Prioritized => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `fleetondemandallocationstrategy` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `FleetOnDemandAllocationStrategy::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `FleetOnDemandAllocationStrategy::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `FleetOnDemandAllocationStrategy::NewFeature` is defined.
/// Specifically, when `fleetondemandallocationstrategy` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `FleetOnDemandAllocationStrategy::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 FleetOnDemandAllocationStrategy {
    #[allow(missing_docs)] // documentation missing in model
    LowestPrice,
    #[allow(missing_docs)] // documentation missing in model
    Prioritized,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for FleetOnDemandAllocationStrategy {
    fn from(s: &str) -> Self {
        match s {
            "lowest-price" => FleetOnDemandAllocationStrategy::LowestPrice,
            "prioritized" => FleetOnDemandAllocationStrategy::Prioritized,
            other => FleetOnDemandAllocationStrategy::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for FleetOnDemandAllocationStrategy {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(FleetOnDemandAllocationStrategy::from(s))
    }
}
impl FleetOnDemandAllocationStrategy {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            FleetOnDemandAllocationStrategy::LowestPrice => "lowest-price",
            FleetOnDemandAllocationStrategy::Prioritized => "prioritized",
            FleetOnDemandAllocationStrategy::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["lowest-price", "prioritized"]
    }
}
impl AsRef<str> for FleetOnDemandAllocationStrategy {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes the configuration of Spot Instances in an EC2 Fleet.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SpotOptions {
    /// <p>The strategy that determines how to allocate the target Spot Instance capacity across the Spot Instance pools specified by the EC2 Fleet launch configuration. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet-allocation-strategy.html">Allocation strategies for Spot Instances</a> in the <i>Amazon EC2 User Guide</i>.</p>
    /// <dl>
    /// <dt>
    /// price-capacity-optimized (recommended)
    /// </dt>
    /// <dd>
    /// <p>EC2 Fleet identifies the pools with the highest capacity availability for the number of instances that are launching. This means that we will request Spot Instances from the pools that we believe have the lowest chance of interruption in the near term. EC2 Fleet then requests Spot Instances from the lowest priced of these pools.</p>
    /// </dd>
    /// <dt>
    /// capacity-optimized
    /// </dt>
    /// <dd>
    /// <p>EC2 Fleet identifies the pools with the highest capacity availability for the number of instances that are launching. This means that we will request Spot Instances from the pools that we believe have the lowest chance of interruption in the near term. To give certain instance types a higher chance of launching first, use <code>capacity-optimized-prioritized</code>. Set a priority for each instance type by using the <code>Priority</code> parameter for <code>LaunchTemplateOverrides</code>. You can assign the same priority to different <code>LaunchTemplateOverrides</code>. EC2 implements the priorities on a best-effort basis, but optimizes for capacity first. <code>capacity-optimized-prioritized</code> is supported only if your EC2 Fleet uses a launch template. Note that if the On-Demand <code>AllocationStrategy</code> is set to <code>prioritized</code>, the same priority is applied when fulfilling On-Demand capacity.</p>
    /// </dd>
    /// <dt>
    /// diversified
    /// </dt>
    /// <dd>
    /// <p>EC2 Fleet requests instances from all of the Spot Instance pools that you specify.</p>
    /// </dd>
    /// <dt>
    /// lowest-price
    /// </dt>
    /// <dd>
    /// <p>EC2 Fleet requests instances from the lowest priced Spot Instance pool that has available capacity. If the lowest priced pool doesn't have available capacity, the Spot Instances come from the next lowest priced pool that has available capacity. If a pool runs out of capacity before fulfilling your desired capacity, EC2 Fleet will continue to fulfill your request by drawing from the next lowest priced pool. To ensure that your desired capacity is met, you might receive Spot Instances from several pools. Because this strategy only considers instance price and not capacity availability, it might lead to high interruption rates.</p>
    /// </dd>
    /// </dl>
    /// <p>Default: <code>lowest-price</code> </p>
    #[doc(hidden)]
    pub allocation_strategy: std::option::Option<crate::model::SpotAllocationStrategy>,
    /// <p>The strategies for managing your workloads on your Spot Instances that will be interrupted. Currently only the capacity rebalance strategy is available.</p>
    #[doc(hidden)]
    pub maintenance_strategies: std::option::Option<crate::model::FleetSpotMaintenanceStrategies>,
    /// <p>The behavior when a Spot Instance is interrupted.</p>
    /// <p>Default: <code>terminate</code> </p>
    #[doc(hidden)]
    pub instance_interruption_behavior:
        std::option::Option<crate::model::SpotInstanceInterruptionBehavior>,
    /// <p>The number of Spot pools across which to allocate your target Spot capacity. Supported only when <code>AllocationStrategy</code> is set to <code>lowest-price</code>. EC2 Fleet selects the cheapest Spot pools and evenly allocates your target Spot capacity across the number of Spot pools that you specify.</p>
    /// <p>Note that EC2 Fleet attempts to draw Spot Instances from the number of pools that you specify on a best effort basis. If a pool runs out of Spot capacity before fulfilling your target capacity, EC2 Fleet will continue to fulfill your request by drawing from the next cheapest pool. To ensure that your target capacity is met, you might receive Spot Instances from more than the number of pools that you specified. Similarly, if most of the pools have no Spot capacity, you might receive your full target capacity from fewer than the number of pools that you specified.</p>
    #[doc(hidden)]
    pub instance_pools_to_use_count: std::option::Option<i32>,
    /// <p>Indicates that the fleet uses a single instance type to launch all Spot Instances in the fleet.</p>
    /// <p>Supported only for fleets of type <code>instant</code>.</p>
    #[doc(hidden)]
    pub single_instance_type: std::option::Option<bool>,
    /// <p>Indicates that the fleet launches all Spot Instances into a single Availability Zone.</p>
    /// <p>Supported only for fleets of type <code>instant</code>.</p>
    #[doc(hidden)]
    pub single_availability_zone: std::option::Option<bool>,
    /// <p>The minimum target capacity for Spot Instances in the fleet. If the minimum target capacity is not reached, the fleet launches no instances.</p>
    /// <p>Supported only for fleets of type <code>instant</code>.</p>
    /// <p>At least one of the following must be specified: <code>SingleAvailabilityZone</code> | <code>SingleInstanceType</code> </p>
    #[doc(hidden)]
    pub min_target_capacity: std::option::Option<i32>,
    /// <p>The maximum amount per hour for Spot Instances that you're willing to pay. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.</p> <important>
    /// <p>If you specify a maximum price, your Spot Instances will be interrupted more frequently than if you do not specify this parameter.</p>
    /// </important>
    #[doc(hidden)]
    pub max_total_price: std::option::Option<std::string::String>,
}
impl SpotOptions {
    /// <p>The strategy that determines how to allocate the target Spot Instance capacity across the Spot Instance pools specified by the EC2 Fleet launch configuration. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet-allocation-strategy.html">Allocation strategies for Spot Instances</a> in the <i>Amazon EC2 User Guide</i>.</p>
    /// <dl>
    /// <dt>
    /// price-capacity-optimized (recommended)
    /// </dt>
    /// <dd>
    /// <p>EC2 Fleet identifies the pools with the highest capacity availability for the number of instances that are launching. This means that we will request Spot Instances from the pools that we believe have the lowest chance of interruption in the near term. EC2 Fleet then requests Spot Instances from the lowest priced of these pools.</p>
    /// </dd>
    /// <dt>
    /// capacity-optimized
    /// </dt>
    /// <dd>
    /// <p>EC2 Fleet identifies the pools with the highest capacity availability for the number of instances that are launching. This means that we will request Spot Instances from the pools that we believe have the lowest chance of interruption in the near term. To give certain instance types a higher chance of launching first, use <code>capacity-optimized-prioritized</code>. Set a priority for each instance type by using the <code>Priority</code> parameter for <code>LaunchTemplateOverrides</code>. You can assign the same priority to different <code>LaunchTemplateOverrides</code>. EC2 implements the priorities on a best-effort basis, but optimizes for capacity first. <code>capacity-optimized-prioritized</code> is supported only if your EC2 Fleet uses a launch template. Note that if the On-Demand <code>AllocationStrategy</code> is set to <code>prioritized</code>, the same priority is applied when fulfilling On-Demand capacity.</p>
    /// </dd>
    /// <dt>
    /// diversified
    /// </dt>
    /// <dd>
    /// <p>EC2 Fleet requests instances from all of the Spot Instance pools that you specify.</p>
    /// </dd>
    /// <dt>
    /// lowest-price
    /// </dt>
    /// <dd>
    /// <p>EC2 Fleet requests instances from the lowest priced Spot Instance pool that has available capacity. If the lowest priced pool doesn't have available capacity, the Spot Instances come from the next lowest priced pool that has available capacity. If a pool runs out of capacity before fulfilling your desired capacity, EC2 Fleet will continue to fulfill your request by drawing from the next lowest priced pool. To ensure that your desired capacity is met, you might receive Spot Instances from several pools. Because this strategy only considers instance price and not capacity availability, it might lead to high interruption rates.</p>
    /// </dd>
    /// </dl>
    /// <p>Default: <code>lowest-price</code> </p>
    pub fn allocation_strategy(
        &self,
    ) -> std::option::Option<&crate::model::SpotAllocationStrategy> {
        self.allocation_strategy.as_ref()
    }
    /// <p>The strategies for managing your workloads on your Spot Instances that will be interrupted. Currently only the capacity rebalance strategy is available.</p>
    pub fn maintenance_strategies(
        &self,
    ) -> std::option::Option<&crate::model::FleetSpotMaintenanceStrategies> {
        self.maintenance_strategies.as_ref()
    }
    /// <p>The behavior when a Spot Instance is interrupted.</p>
    /// <p>Default: <code>terminate</code> </p>
    pub fn instance_interruption_behavior(
        &self,
    ) -> std::option::Option<&crate::model::SpotInstanceInterruptionBehavior> {
        self.instance_interruption_behavior.as_ref()
    }
    /// <p>The number of Spot pools across which to allocate your target Spot capacity. Supported only when <code>AllocationStrategy</code> is set to <code>lowest-price</code>. EC2 Fleet selects the cheapest Spot pools and evenly allocates your target Spot capacity across the number of Spot pools that you specify.</p>
    /// <p>Note that EC2 Fleet attempts to draw Spot Instances from the number of pools that you specify on a best effort basis. If a pool runs out of Spot capacity before fulfilling your target capacity, EC2 Fleet will continue to fulfill your request by drawing from the next cheapest pool. To ensure that your target capacity is met, you might receive Spot Instances from more than the number of pools that you specified. Similarly, if most of the pools have no Spot capacity, you might receive your full target capacity from fewer than the number of pools that you specified.</p>
    pub fn instance_pools_to_use_count(&self) -> std::option::Option<i32> {
        self.instance_pools_to_use_count
    }
    /// <p>Indicates that the fleet uses a single instance type to launch all Spot Instances in the fleet.</p>
    /// <p>Supported only for fleets of type <code>instant</code>.</p>
    pub fn single_instance_type(&self) -> std::option::Option<bool> {
        self.single_instance_type
    }
    /// <p>Indicates that the fleet launches all Spot Instances into a single Availability Zone.</p>
    /// <p>Supported only for fleets of type <code>instant</code>.</p>
    pub fn single_availability_zone(&self) -> std::option::Option<bool> {
        self.single_availability_zone
    }
    /// <p>The minimum target capacity for Spot Instances in the fleet. If the minimum target capacity is not reached, the fleet launches no instances.</p>
    /// <p>Supported only for fleets of type <code>instant</code>.</p>
    /// <p>At least one of the following must be specified: <code>SingleAvailabilityZone</code> | <code>SingleInstanceType</code> </p>
    pub fn min_target_capacity(&self) -> std::option::Option<i32> {
        self.min_target_capacity
    }
    /// <p>The maximum amount per hour for Spot Instances that you're willing to pay. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.</p> <important>
    /// <p>If you specify a maximum price, your Spot Instances will be interrupted more frequently than if you do not specify this parameter.</p>
    /// </important>
    pub fn max_total_price(&self) -> std::option::Option<&str> {
        self.max_total_price.as_deref()
    }
}
/// See [`SpotOptions`](crate::model::SpotOptions).
pub mod spot_options {

    /// A builder for [`SpotOptions`](crate::model::SpotOptions).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) allocation_strategy: std::option::Option<crate::model::SpotAllocationStrategy>,
        pub(crate) maintenance_strategies:
            std::option::Option<crate::model::FleetSpotMaintenanceStrategies>,
        pub(crate) instance_interruption_behavior:
            std::option::Option<crate::model::SpotInstanceInterruptionBehavior>,
        pub(crate) instance_pools_to_use_count: std::option::Option<i32>,
        pub(crate) single_instance_type: std::option::Option<bool>,
        pub(crate) single_availability_zone: std::option::Option<bool>,
        pub(crate) min_target_capacity: std::option::Option<i32>,
        pub(crate) max_total_price: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The strategy that determines how to allocate the target Spot Instance capacity across the Spot Instance pools specified by the EC2 Fleet launch configuration. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet-allocation-strategy.html">Allocation strategies for Spot Instances</a> in the <i>Amazon EC2 User Guide</i>.</p>
        /// <dl>
        /// <dt>
        /// price-capacity-optimized (recommended)
        /// </dt>
        /// <dd>
        /// <p>EC2 Fleet identifies the pools with the highest capacity availability for the number of instances that are launching. This means that we will request Spot Instances from the pools that we believe have the lowest chance of interruption in the near term. EC2 Fleet then requests Spot Instances from the lowest priced of these pools.</p>
        /// </dd>
        /// <dt>
        /// capacity-optimized
        /// </dt>
        /// <dd>
        /// <p>EC2 Fleet identifies the pools with the highest capacity availability for the number of instances that are launching. This means that we will request Spot Instances from the pools that we believe have the lowest chance of interruption in the near term. To give certain instance types a higher chance of launching first, use <code>capacity-optimized-prioritized</code>. Set a priority for each instance type by using the <code>Priority</code> parameter for <code>LaunchTemplateOverrides</code>. You can assign the same priority to different <code>LaunchTemplateOverrides</code>. EC2 implements the priorities on a best-effort basis, but optimizes for capacity first. <code>capacity-optimized-prioritized</code> is supported only if your EC2 Fleet uses a launch template. Note that if the On-Demand <code>AllocationStrategy</code> is set to <code>prioritized</code>, the same priority is applied when fulfilling On-Demand capacity.</p>
        /// </dd>
        /// <dt>
        /// diversified
        /// </dt>
        /// <dd>
        /// <p>EC2 Fleet requests instances from all of the Spot Instance pools that you specify.</p>
        /// </dd>
        /// <dt>
        /// lowest-price
        /// </dt>
        /// <dd>
        /// <p>EC2 Fleet requests instances from the lowest priced Spot Instance pool that has available capacity. If the lowest priced pool doesn't have available capacity, the Spot Instances come from the next lowest priced pool that has available capacity. If a pool runs out of capacity before fulfilling your desired capacity, EC2 Fleet will continue to fulfill your request by drawing from the next lowest priced pool. To ensure that your desired capacity is met, you might receive Spot Instances from several pools. Because this strategy only considers instance price and not capacity availability, it might lead to high interruption rates.</p>
        /// </dd>
        /// </dl>
        /// <p>Default: <code>lowest-price</code> </p>
        pub fn allocation_strategy(mut self, input: crate::model::SpotAllocationStrategy) -> Self {
            self.allocation_strategy = Some(input);
            self
        }
        /// <p>The strategy that determines how to allocate the target Spot Instance capacity across the Spot Instance pools specified by the EC2 Fleet launch configuration. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet-allocation-strategy.html">Allocation strategies for Spot Instances</a> in the <i>Amazon EC2 User Guide</i>.</p>
        /// <dl>
        /// <dt>
        /// price-capacity-optimized (recommended)
        /// </dt>
        /// <dd>
        /// <p>EC2 Fleet identifies the pools with the highest capacity availability for the number of instances that are launching. This means that we will request Spot Instances from the pools that we believe have the lowest chance of interruption in the near term. EC2 Fleet then requests Spot Instances from the lowest priced of these pools.</p>
        /// </dd>
        /// <dt>
        /// capacity-optimized
        /// </dt>
        /// <dd>
        /// <p>EC2 Fleet identifies the pools with the highest capacity availability for the number of instances that are launching. This means that we will request Spot Instances from the pools that we believe have the lowest chance of interruption in the near term. To give certain instance types a higher chance of launching first, use <code>capacity-optimized-prioritized</code>. Set a priority for each instance type by using the <code>Priority</code> parameter for <code>LaunchTemplateOverrides</code>. You can assign the same priority to different <code>LaunchTemplateOverrides</code>. EC2 implements the priorities on a best-effort basis, but optimizes for capacity first. <code>capacity-optimized-prioritized</code> is supported only if your EC2 Fleet uses a launch template. Note that if the On-Demand <code>AllocationStrategy</code> is set to <code>prioritized</code>, the same priority is applied when fulfilling On-Demand capacity.</p>
        /// </dd>
        /// <dt>
        /// diversified
        /// </dt>
        /// <dd>
        /// <p>EC2 Fleet requests instances from all of the Spot Instance pools that you specify.</p>
        /// </dd>
        /// <dt>
        /// lowest-price
        /// </dt>
        /// <dd>
        /// <p>EC2 Fleet requests instances from the lowest priced Spot Instance pool that has available capacity. If the lowest priced pool doesn't have available capacity, the Spot Instances come from the next lowest priced pool that has available capacity. If a pool runs out of capacity before fulfilling your desired capacity, EC2 Fleet will continue to fulfill your request by drawing from the next lowest priced pool. To ensure that your desired capacity is met, you might receive Spot Instances from several pools. Because this strategy only considers instance price and not capacity availability, it might lead to high interruption rates.</p>
        /// </dd>
        /// </dl>
        /// <p>Default: <code>lowest-price</code> </p>
        pub fn set_allocation_strategy(
            mut self,
            input: std::option::Option<crate::model::SpotAllocationStrategy>,
        ) -> Self {
            self.allocation_strategy = input;
            self
        }
        /// <p>The strategies for managing your workloads on your Spot Instances that will be interrupted. Currently only the capacity rebalance strategy is available.</p>
        pub fn maintenance_strategies(
            mut self,
            input: crate::model::FleetSpotMaintenanceStrategies,
        ) -> Self {
            self.maintenance_strategies = Some(input);
            self
        }
        /// <p>The strategies for managing your workloads on your Spot Instances that will be interrupted. Currently only the capacity rebalance strategy is available.</p>
        pub fn set_maintenance_strategies(
            mut self,
            input: std::option::Option<crate::model::FleetSpotMaintenanceStrategies>,
        ) -> Self {
            self.maintenance_strategies = input;
            self
        }
        /// <p>The behavior when a Spot Instance is interrupted.</p>
        /// <p>Default: <code>terminate</code> </p>
        pub fn instance_interruption_behavior(
            mut self,
            input: crate::model::SpotInstanceInterruptionBehavior,
        ) -> Self {
            self.instance_interruption_behavior = Some(input);
            self
        }
        /// <p>The behavior when a Spot Instance is interrupted.</p>
        /// <p>Default: <code>terminate</code> </p>
        pub fn set_instance_interruption_behavior(
            mut self,
            input: std::option::Option<crate::model::SpotInstanceInterruptionBehavior>,
        ) -> Self {
            self.instance_interruption_behavior = input;
            self
        }
        /// <p>The number of Spot pools across which to allocate your target Spot capacity. Supported only when <code>AllocationStrategy</code> is set to <code>lowest-price</code>. EC2 Fleet selects the cheapest Spot pools and evenly allocates your target Spot capacity across the number of Spot pools that you specify.</p>
        /// <p>Note that EC2 Fleet attempts to draw Spot Instances from the number of pools that you specify on a best effort basis. If a pool runs out of Spot capacity before fulfilling your target capacity, EC2 Fleet will continue to fulfill your request by drawing from the next cheapest pool. To ensure that your target capacity is met, you might receive Spot Instances from more than the number of pools that you specified. Similarly, if most of the pools have no Spot capacity, you might receive your full target capacity from fewer than the number of pools that you specified.</p>
        pub fn instance_pools_to_use_count(mut self, input: i32) -> Self {
            self.instance_pools_to_use_count = Some(input);
            self
        }
        /// <p>The number of Spot pools across which to allocate your target Spot capacity. Supported only when <code>AllocationStrategy</code> is set to <code>lowest-price</code>. EC2 Fleet selects the cheapest Spot pools and evenly allocates your target Spot capacity across the number of Spot pools that you specify.</p>
        /// <p>Note that EC2 Fleet attempts to draw Spot Instances from the number of pools that you specify on a best effort basis. If a pool runs out of Spot capacity before fulfilling your target capacity, EC2 Fleet will continue to fulfill your request by drawing from the next cheapest pool. To ensure that your target capacity is met, you might receive Spot Instances from more than the number of pools that you specified. Similarly, if most of the pools have no Spot capacity, you might receive your full target capacity from fewer than the number of pools that you specified.</p>
        pub fn set_instance_pools_to_use_count(mut self, input: std::option::Option<i32>) -> Self {
            self.instance_pools_to_use_count = input;
            self
        }
        /// <p>Indicates that the fleet uses a single instance type to launch all Spot Instances in the fleet.</p>
        /// <p>Supported only for fleets of type <code>instant</code>.</p>
        pub fn single_instance_type(mut self, input: bool) -> Self {
            self.single_instance_type = Some(input);
            self
        }
        /// <p>Indicates that the fleet uses a single instance type to launch all Spot Instances in the fleet.</p>
        /// <p>Supported only for fleets of type <code>instant</code>.</p>
        pub fn set_single_instance_type(mut self, input: std::option::Option<bool>) -> Self {
            self.single_instance_type = input;
            self
        }
        /// <p>Indicates that the fleet launches all Spot Instances into a single Availability Zone.</p>
        /// <p>Supported only for fleets of type <code>instant</code>.</p>
        pub fn single_availability_zone(mut self, input: bool) -> Self {
            self.single_availability_zone = Some(input);
            self
        }
        /// <p>Indicates that the fleet launches all Spot Instances into a single Availability Zone.</p>
        /// <p>Supported only for fleets of type <code>instant</code>.</p>
        pub fn set_single_availability_zone(mut self, input: std::option::Option<bool>) -> Self {
            self.single_availability_zone = input;
            self
        }
        /// <p>The minimum target capacity for Spot Instances in the fleet. If the minimum target capacity is not reached, the fleet launches no instances.</p>
        /// <p>Supported only for fleets of type <code>instant</code>.</p>
        /// <p>At least one of the following must be specified: <code>SingleAvailabilityZone</code> | <code>SingleInstanceType</code> </p>
        pub fn min_target_capacity(mut self, input: i32) -> Self {
            self.min_target_capacity = Some(input);
            self
        }
        /// <p>The minimum target capacity for Spot Instances in the fleet. If the minimum target capacity is not reached, the fleet launches no instances.</p>
        /// <p>Supported only for fleets of type <code>instant</code>.</p>
        /// <p>At least one of the following must be specified: <code>SingleAvailabilityZone</code> | <code>SingleInstanceType</code> </p>
        pub fn set_min_target_capacity(mut self, input: std::option::Option<i32>) -> Self {
            self.min_target_capacity = input;
            self
        }
        /// <p>The maximum amount per hour for Spot Instances that you're willing to pay. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.</p> <important>
        /// <p>If you specify a maximum price, your Spot Instances will be interrupted more frequently than if you do not specify this parameter.</p>
        /// </important>
        pub fn max_total_price(mut self, input: impl Into<std::string::String>) -> Self {
            self.max_total_price = Some(input.into());
            self
        }
        /// <p>The maximum amount per hour for Spot Instances that you're willing to pay. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.</p> <important>
        /// <p>If you specify a maximum price, your Spot Instances will be interrupted more frequently than if you do not specify this parameter.</p>
        /// </important>
        pub fn set_max_total_price(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.max_total_price = input;
            self
        }
        /// Consumes the builder and constructs a [`SpotOptions`](crate::model::SpotOptions).
        pub fn build(self) -> crate::model::SpotOptions {
            crate::model::SpotOptions {
                allocation_strategy: self.allocation_strategy,
                maintenance_strategies: self.maintenance_strategies,
                instance_interruption_behavior: self.instance_interruption_behavior,
                instance_pools_to_use_count: self.instance_pools_to_use_count,
                single_instance_type: self.single_instance_type,
                single_availability_zone: self.single_availability_zone,
                min_target_capacity: self.min_target_capacity,
                max_total_price: self.max_total_price,
            }
        }
    }
}
impl SpotOptions {
    /// Creates a new builder-style object to manufacture [`SpotOptions`](crate::model::SpotOptions).
    pub fn builder() -> crate::model::spot_options::Builder {
        crate::model::spot_options::Builder::default()
    }
}

/// When writing a match expression against `SpotInstanceInterruptionBehavior`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let spotinstanceinterruptionbehavior = unimplemented!();
/// match spotinstanceinterruptionbehavior {
///     SpotInstanceInterruptionBehavior::Hibernate => { /* ... */ },
///     SpotInstanceInterruptionBehavior::Stop => { /* ... */ },
///     SpotInstanceInterruptionBehavior::Terminate => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `spotinstanceinterruptionbehavior` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `SpotInstanceInterruptionBehavior::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `SpotInstanceInterruptionBehavior::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `SpotInstanceInterruptionBehavior::NewFeature` is defined.
/// Specifically, when `spotinstanceinterruptionbehavior` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `SpotInstanceInterruptionBehavior::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 SpotInstanceInterruptionBehavior {
    #[allow(missing_docs)] // documentation missing in model
    Hibernate,
    #[allow(missing_docs)] // documentation missing in model
    Stop,
    #[allow(missing_docs)] // documentation missing in model
    Terminate,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for SpotInstanceInterruptionBehavior {
    fn from(s: &str) -> Self {
        match s {
            "hibernate" => SpotInstanceInterruptionBehavior::Hibernate,
            "stop" => SpotInstanceInterruptionBehavior::Stop,
            "terminate" => SpotInstanceInterruptionBehavior::Terminate,
            other => SpotInstanceInterruptionBehavior::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for SpotInstanceInterruptionBehavior {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(SpotInstanceInterruptionBehavior::from(s))
    }
}
impl SpotInstanceInterruptionBehavior {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            SpotInstanceInterruptionBehavior::Hibernate => "hibernate",
            SpotInstanceInterruptionBehavior::Stop => "stop",
            SpotInstanceInterruptionBehavior::Terminate => "terminate",
            SpotInstanceInterruptionBehavior::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["hibernate", "stop", "terminate"]
    }
}
impl AsRef<str> for SpotInstanceInterruptionBehavior {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>The strategies for managing your Spot Instances that are at an elevated risk of being interrupted.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct FleetSpotMaintenanceStrategies {
    /// <p>The strategy to use when Amazon EC2 emits a signal that your Spot Instance is at an elevated risk of being interrupted.</p>
    #[doc(hidden)]
    pub capacity_rebalance: std::option::Option<crate::model::FleetSpotCapacityRebalance>,
}
impl FleetSpotMaintenanceStrategies {
    /// <p>The strategy to use when Amazon EC2 emits a signal that your Spot Instance is at an elevated risk of being interrupted.</p>
    pub fn capacity_rebalance(
        &self,
    ) -> std::option::Option<&crate::model::FleetSpotCapacityRebalance> {
        self.capacity_rebalance.as_ref()
    }
}
/// See [`FleetSpotMaintenanceStrategies`](crate::model::FleetSpotMaintenanceStrategies).
pub mod fleet_spot_maintenance_strategies {

    /// A builder for [`FleetSpotMaintenanceStrategies`](crate::model::FleetSpotMaintenanceStrategies).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) capacity_rebalance:
            std::option::Option<crate::model::FleetSpotCapacityRebalance>,
    }
    impl Builder {
        /// <p>The strategy to use when Amazon EC2 emits a signal that your Spot Instance is at an elevated risk of being interrupted.</p>
        pub fn capacity_rebalance(
            mut self,
            input: crate::model::FleetSpotCapacityRebalance,
        ) -> Self {
            self.capacity_rebalance = Some(input);
            self
        }
        /// <p>The strategy to use when Amazon EC2 emits a signal that your Spot Instance is at an elevated risk of being interrupted.</p>
        pub fn set_capacity_rebalance(
            mut self,
            input: std::option::Option<crate::model::FleetSpotCapacityRebalance>,
        ) -> Self {
            self.capacity_rebalance = input;
            self
        }
        /// Consumes the builder and constructs a [`FleetSpotMaintenanceStrategies`](crate::model::FleetSpotMaintenanceStrategies).
        pub fn build(self) -> crate::model::FleetSpotMaintenanceStrategies {
            crate::model::FleetSpotMaintenanceStrategies {
                capacity_rebalance: self.capacity_rebalance,
            }
        }
    }
}
impl FleetSpotMaintenanceStrategies {
    /// Creates a new builder-style object to manufacture [`FleetSpotMaintenanceStrategies`](crate::model::FleetSpotMaintenanceStrategies).
    pub fn builder() -> crate::model::fleet_spot_maintenance_strategies::Builder {
        crate::model::fleet_spot_maintenance_strategies::Builder::default()
    }
}

/// <p>The strategy to use when Amazon EC2 emits a signal that your Spot Instance is at an elevated risk of being interrupted.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct FleetSpotCapacityRebalance {
    /// <p>The replacement strategy to use. Only available for fleets of type <code>maintain</code>.</p>
    /// <p> <code>launch</code> - EC2 Fleet launches a new replacement Spot Instance when a rebalance notification is emitted for an existing Spot Instance in the fleet. EC2 Fleet does not terminate the instances that receive a rebalance notification. You can terminate the old instances, or you can leave them running. You are charged for all instances while they are running. </p>
    /// <p> <code>launch-before-terminate</code> - EC2 Fleet launches a new replacement Spot Instance when a rebalance notification is emitted for an existing Spot Instance in the fleet, and then, after a delay that you specify (in <code>TerminationDelay</code>), terminates the instances that received a rebalance notification.</p>
    #[doc(hidden)]
    pub replacement_strategy: std::option::Option<crate::model::FleetReplacementStrategy>,
    /// <p>The amount of time (in seconds) that Amazon EC2 waits before terminating the old Spot Instance after launching a new replacement Spot Instance.</p>
    /// <p>Required when <code>ReplacementStrategy</code> is set to <code>launch-before-terminate</code>.</p>
    /// <p>Not valid when <code>ReplacementStrategy</code> is set to <code>launch</code>.</p>
    /// <p>Valid values: Minimum value of <code>120</code> seconds. Maximum value of <code>7200</code> seconds.</p>
    #[doc(hidden)]
    pub termination_delay: std::option::Option<i32>,
}
impl FleetSpotCapacityRebalance {
    /// <p>The replacement strategy to use. Only available for fleets of type <code>maintain</code>.</p>
    /// <p> <code>launch</code> - EC2 Fleet launches a new replacement Spot Instance when a rebalance notification is emitted for an existing Spot Instance in the fleet. EC2 Fleet does not terminate the instances that receive a rebalance notification. You can terminate the old instances, or you can leave them running. You are charged for all instances while they are running. </p>
    /// <p> <code>launch-before-terminate</code> - EC2 Fleet launches a new replacement Spot Instance when a rebalance notification is emitted for an existing Spot Instance in the fleet, and then, after a delay that you specify (in <code>TerminationDelay</code>), terminates the instances that received a rebalance notification.</p>
    pub fn replacement_strategy(
        &self,
    ) -> std::option::Option<&crate::model::FleetReplacementStrategy> {
        self.replacement_strategy.as_ref()
    }
    /// <p>The amount of time (in seconds) that Amazon EC2 waits before terminating the old Spot Instance after launching a new replacement Spot Instance.</p>
    /// <p>Required when <code>ReplacementStrategy</code> is set to <code>launch-before-terminate</code>.</p>
    /// <p>Not valid when <code>ReplacementStrategy</code> is set to <code>launch</code>.</p>
    /// <p>Valid values: Minimum value of <code>120</code> seconds. Maximum value of <code>7200</code> seconds.</p>
    pub fn termination_delay(&self) -> std::option::Option<i32> {
        self.termination_delay
    }
}
/// See [`FleetSpotCapacityRebalance`](crate::model::FleetSpotCapacityRebalance).
pub mod fleet_spot_capacity_rebalance {

    /// A builder for [`FleetSpotCapacityRebalance`](crate::model::FleetSpotCapacityRebalance).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) replacement_strategy:
            std::option::Option<crate::model::FleetReplacementStrategy>,
        pub(crate) termination_delay: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>The replacement strategy to use. Only available for fleets of type <code>maintain</code>.</p>
        /// <p> <code>launch</code> - EC2 Fleet launches a new replacement Spot Instance when a rebalance notification is emitted for an existing Spot Instance in the fleet. EC2 Fleet does not terminate the instances that receive a rebalance notification. You can terminate the old instances, or you can leave them running. You are charged for all instances while they are running. </p>
        /// <p> <code>launch-before-terminate</code> - EC2 Fleet launches a new replacement Spot Instance when a rebalance notification is emitted for an existing Spot Instance in the fleet, and then, after a delay that you specify (in <code>TerminationDelay</code>), terminates the instances that received a rebalance notification.</p>
        pub fn replacement_strategy(
            mut self,
            input: crate::model::FleetReplacementStrategy,
        ) -> Self {
            self.replacement_strategy = Some(input);
            self
        }
        /// <p>The replacement strategy to use. Only available for fleets of type <code>maintain</code>.</p>
        /// <p> <code>launch</code> - EC2 Fleet launches a new replacement Spot Instance when a rebalance notification is emitted for an existing Spot Instance in the fleet. EC2 Fleet does not terminate the instances that receive a rebalance notification. You can terminate the old instances, or you can leave them running. You are charged for all instances while they are running. </p>
        /// <p> <code>launch-before-terminate</code> - EC2 Fleet launches a new replacement Spot Instance when a rebalance notification is emitted for an existing Spot Instance in the fleet, and then, after a delay that you specify (in <code>TerminationDelay</code>), terminates the instances that received a rebalance notification.</p>
        pub fn set_replacement_strategy(
            mut self,
            input: std::option::Option<crate::model::FleetReplacementStrategy>,
        ) -> Self {
            self.replacement_strategy = input;
            self
        }
        /// <p>The amount of time (in seconds) that Amazon EC2 waits before terminating the old Spot Instance after launching a new replacement Spot Instance.</p>
        /// <p>Required when <code>ReplacementStrategy</code> is set to <code>launch-before-terminate</code>.</p>
        /// <p>Not valid when <code>ReplacementStrategy</code> is set to <code>launch</code>.</p>
        /// <p>Valid values: Minimum value of <code>120</code> seconds. Maximum value of <code>7200</code> seconds.</p>
        pub fn termination_delay(mut self, input: i32) -> Self {
            self.termination_delay = Some(input);
            self
        }
        /// <p>The amount of time (in seconds) that Amazon EC2 waits before terminating the old Spot Instance after launching a new replacement Spot Instance.</p>
        /// <p>Required when <code>ReplacementStrategy</code> is set to <code>launch-before-terminate</code>.</p>
        /// <p>Not valid when <code>ReplacementStrategy</code> is set to <code>launch</code>.</p>
        /// <p>Valid values: Minimum value of <code>120</code> seconds. Maximum value of <code>7200</code> seconds.</p>
        pub fn set_termination_delay(mut self, input: std::option::Option<i32>) -> Self {
            self.termination_delay = input;
            self
        }
        /// Consumes the builder and constructs a [`FleetSpotCapacityRebalance`](crate::model::FleetSpotCapacityRebalance).
        pub fn build(self) -> crate::model::FleetSpotCapacityRebalance {
            crate::model::FleetSpotCapacityRebalance {
                replacement_strategy: self.replacement_strategy,
                termination_delay: self.termination_delay,
            }
        }
    }
}
impl FleetSpotCapacityRebalance {
    /// Creates a new builder-style object to manufacture [`FleetSpotCapacityRebalance`](crate::model::FleetSpotCapacityRebalance).
    pub fn builder() -> crate::model::fleet_spot_capacity_rebalance::Builder {
        crate::model::fleet_spot_capacity_rebalance::Builder::default()
    }
}

/// When writing a match expression against `FleetReplacementStrategy`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let fleetreplacementstrategy = unimplemented!();
/// match fleetreplacementstrategy {
///     FleetReplacementStrategy::Launch => { /* ... */ },
///     FleetReplacementStrategy::LaunchBeforeTerminate => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `fleetreplacementstrategy` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `FleetReplacementStrategy::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `FleetReplacementStrategy::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `FleetReplacementStrategy::NewFeature` is defined.
/// Specifically, when `fleetreplacementstrategy` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `FleetReplacementStrategy::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 FleetReplacementStrategy {
    #[allow(missing_docs)] // documentation missing in model
    Launch,
    #[allow(missing_docs)] // documentation missing in model
    LaunchBeforeTerminate,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for FleetReplacementStrategy {
    fn from(s: &str) -> Self {
        match s {
            "launch" => FleetReplacementStrategy::Launch,
            "launch-before-terminate" => FleetReplacementStrategy::LaunchBeforeTerminate,
            other => FleetReplacementStrategy::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for FleetReplacementStrategy {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(FleetReplacementStrategy::from(s))
    }
}
impl FleetReplacementStrategy {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            FleetReplacementStrategy::Launch => "launch",
            FleetReplacementStrategy::LaunchBeforeTerminate => "launch-before-terminate",
            FleetReplacementStrategy::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["launch", "launch-before-terminate"]
    }
}
impl AsRef<str> for FleetReplacementStrategy {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `SpotAllocationStrategy`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let spotallocationstrategy = unimplemented!();
/// match spotallocationstrategy {
///     SpotAllocationStrategy::CapacityOptimized => { /* ... */ },
///     SpotAllocationStrategy::CapacityOptimizedPrioritized => { /* ... */ },
///     SpotAllocationStrategy::Diversified => { /* ... */ },
///     SpotAllocationStrategy::LowestPrice => { /* ... */ },
///     SpotAllocationStrategy::PriceCapacityOptimized => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `spotallocationstrategy` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `SpotAllocationStrategy::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `SpotAllocationStrategy::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `SpotAllocationStrategy::NewFeature` is defined.
/// Specifically, when `spotallocationstrategy` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `SpotAllocationStrategy::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 SpotAllocationStrategy {
    #[allow(missing_docs)] // documentation missing in model
    CapacityOptimized,
    #[allow(missing_docs)] // documentation missing in model
    CapacityOptimizedPrioritized,
    #[allow(missing_docs)] // documentation missing in model
    Diversified,
    #[allow(missing_docs)] // documentation missing in model
    LowestPrice,
    #[allow(missing_docs)] // documentation missing in model
    PriceCapacityOptimized,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for SpotAllocationStrategy {
    fn from(s: &str) -> Self {
        match s {
            "capacity-optimized" => SpotAllocationStrategy::CapacityOptimized,
            "capacity-optimized-prioritized" => {
                SpotAllocationStrategy::CapacityOptimizedPrioritized
            }
            "diversified" => SpotAllocationStrategy::Diversified,
            "lowest-price" => SpotAllocationStrategy::LowestPrice,
            "price-capacity-optimized" => SpotAllocationStrategy::PriceCapacityOptimized,
            other => {
                SpotAllocationStrategy::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for SpotAllocationStrategy {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(SpotAllocationStrategy::from(s))
    }
}
impl SpotAllocationStrategy {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            SpotAllocationStrategy::CapacityOptimized => "capacity-optimized",
            SpotAllocationStrategy::CapacityOptimizedPrioritized => {
                "capacity-optimized-prioritized"
            }
            SpotAllocationStrategy::Diversified => "diversified",
            SpotAllocationStrategy::LowestPrice => "lowest-price",
            SpotAllocationStrategy::PriceCapacityOptimized => "price-capacity-optimized",
            SpotAllocationStrategy::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &[
            "capacity-optimized",
            "capacity-optimized-prioritized",
            "diversified",
            "lowest-price",
            "price-capacity-optimized",
        ]
    }
}
impl AsRef<str> for SpotAllocationStrategy {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>The number of units to request. You can choose to set the target capacity in terms of instances or a performance characteristic that is important to your application workload, such as vCPUs, memory, or I/O. If the request type is <code>maintain</code>, you can specify a target capacity of 0 and add capacity later.</p>
/// <p>You can use the On-Demand Instance <code>MaxTotalPrice</code> parameter, the Spot Instance <code>MaxTotalPrice</code>, or both to ensure that your fleet cost does not exceed your budget. If you set a maximum price per hour for the On-Demand Instances and Spot Instances in your request, EC2 Fleet will launch instances until it reaches the maximum amount that you're willing to pay. When the maximum amount you're willing to pay is reached, the fleet stops launching instances even if it hasn’t met the target capacity. The <code>MaxTotalPrice</code> parameters are located in <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_OnDemandOptions.html">OnDemandOptions</a> and <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_SpotOptions">SpotOptions</a>.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TargetCapacitySpecification {
    /// <p>The number of units to request, filled using <code>DefaultTargetCapacityType</code>.</p>
    #[doc(hidden)]
    pub total_target_capacity: std::option::Option<i32>,
    /// <p>The number of On-Demand units to request. If you specify a target capacity for Spot units, you cannot specify a target capacity for On-Demand units.</p>
    #[doc(hidden)]
    pub on_demand_target_capacity: std::option::Option<i32>,
    /// <p>The maximum number of Spot units to launch. If you specify a target capacity for On-Demand units, you cannot specify a target capacity for Spot units.</p>
    #[doc(hidden)]
    pub spot_target_capacity: std::option::Option<i32>,
    /// <p>The default <code>TotalTargetCapacity</code>, which is either <code>Spot</code> or <code>On-Demand</code>.</p>
    #[doc(hidden)]
    pub default_target_capacity_type: std::option::Option<crate::model::DefaultTargetCapacityType>,
    /// <p>The unit for the target capacity. <code>TargetCapacityUnitType</code> can only be specified when <code>InstanceRequirements</code> is specified.</p>
    /// <p>Default: <code>units</code> (translates to number of instances)</p>
    #[doc(hidden)]
    pub target_capacity_unit_type: std::option::Option<crate::model::TargetCapacityUnitType>,
}
impl TargetCapacitySpecification {
    /// <p>The number of units to request, filled using <code>DefaultTargetCapacityType</code>.</p>
    pub fn total_target_capacity(&self) -> std::option::Option<i32> {
        self.total_target_capacity
    }
    /// <p>The number of On-Demand units to request. If you specify a target capacity for Spot units, you cannot specify a target capacity for On-Demand units.</p>
    pub fn on_demand_target_capacity(&self) -> std::option::Option<i32> {
        self.on_demand_target_capacity
    }
    /// <p>The maximum number of Spot units to launch. If you specify a target capacity for On-Demand units, you cannot specify a target capacity for Spot units.</p>
    pub fn spot_target_capacity(&self) -> std::option::Option<i32> {
        self.spot_target_capacity
    }
    /// <p>The default <code>TotalTargetCapacity</code>, which is either <code>Spot</code> or <code>On-Demand</code>.</p>
    pub fn default_target_capacity_type(
        &self,
    ) -> std::option::Option<&crate::model::DefaultTargetCapacityType> {
        self.default_target_capacity_type.as_ref()
    }
    /// <p>The unit for the target capacity. <code>TargetCapacityUnitType</code> can only be specified when <code>InstanceRequirements</code> is specified.</p>
    /// <p>Default: <code>units</code> (translates to number of instances)</p>
    pub fn target_capacity_unit_type(
        &self,
    ) -> std::option::Option<&crate::model::TargetCapacityUnitType> {
        self.target_capacity_unit_type.as_ref()
    }
}
/// See [`TargetCapacitySpecification`](crate::model::TargetCapacitySpecification).
pub mod target_capacity_specification {

    /// A builder for [`TargetCapacitySpecification`](crate::model::TargetCapacitySpecification).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) total_target_capacity: std::option::Option<i32>,
        pub(crate) on_demand_target_capacity: std::option::Option<i32>,
        pub(crate) spot_target_capacity: std::option::Option<i32>,
        pub(crate) default_target_capacity_type:
            std::option::Option<crate::model::DefaultTargetCapacityType>,
        pub(crate) target_capacity_unit_type:
            std::option::Option<crate::model::TargetCapacityUnitType>,
    }
    impl Builder {
        /// <p>The number of units to request, filled using <code>DefaultTargetCapacityType</code>.</p>
        pub fn total_target_capacity(mut self, input: i32) -> Self {
            self.total_target_capacity = Some(input);
            self
        }
        /// <p>The number of units to request, filled using <code>DefaultTargetCapacityType</code>.</p>
        pub fn set_total_target_capacity(mut self, input: std::option::Option<i32>) -> Self {
            self.total_target_capacity = input;
            self
        }
        /// <p>The number of On-Demand units to request. If you specify a target capacity for Spot units, you cannot specify a target capacity for On-Demand units.</p>
        pub fn on_demand_target_capacity(mut self, input: i32) -> Self {
            self.on_demand_target_capacity = Some(input);
            self
        }
        /// <p>The number of On-Demand units to request. If you specify a target capacity for Spot units, you cannot specify a target capacity for On-Demand units.</p>
        pub fn set_on_demand_target_capacity(mut self, input: std::option::Option<i32>) -> Self {
            self.on_demand_target_capacity = input;
            self
        }
        /// <p>The maximum number of Spot units to launch. If you specify a target capacity for On-Demand units, you cannot specify a target capacity for Spot units.</p>
        pub fn spot_target_capacity(mut self, input: i32) -> Self {
            self.spot_target_capacity = Some(input);
            self
        }
        /// <p>The maximum number of Spot units to launch. If you specify a target capacity for On-Demand units, you cannot specify a target capacity for Spot units.</p>
        pub fn set_spot_target_capacity(mut self, input: std::option::Option<i32>) -> Self {
            self.spot_target_capacity = input;
            self
        }
        /// <p>The default <code>TotalTargetCapacity</code>, which is either <code>Spot</code> or <code>On-Demand</code>.</p>
        pub fn default_target_capacity_type(
            mut self,
            input: crate::model::DefaultTargetCapacityType,
        ) -> Self {
            self.default_target_capacity_type = Some(input);
            self
        }
        /// <p>The default <code>TotalTargetCapacity</code>, which is either <code>Spot</code> or <code>On-Demand</code>.</p>
        pub fn set_default_target_capacity_type(
            mut self,
            input: std::option::Option<crate::model::DefaultTargetCapacityType>,
        ) -> Self {
            self.default_target_capacity_type = input;
            self
        }
        /// <p>The unit for the target capacity. <code>TargetCapacityUnitType</code> can only be specified when <code>InstanceRequirements</code> is specified.</p>
        /// <p>Default: <code>units</code> (translates to number of instances)</p>
        pub fn target_capacity_unit_type(
            mut self,
            input: crate::model::TargetCapacityUnitType,
        ) -> Self {
            self.target_capacity_unit_type = Some(input);
            self
        }
        /// <p>The unit for the target capacity. <code>TargetCapacityUnitType</code> can only be specified when <code>InstanceRequirements</code> is specified.</p>
        /// <p>Default: <code>units</code> (translates to number of instances)</p>
        pub fn set_target_capacity_unit_type(
            mut self,
            input: std::option::Option<crate::model::TargetCapacityUnitType>,
        ) -> Self {
            self.target_capacity_unit_type = input;
            self
        }
        /// Consumes the builder and constructs a [`TargetCapacitySpecification`](crate::model::TargetCapacitySpecification).
        pub fn build(self) -> crate::model::TargetCapacitySpecification {
            crate::model::TargetCapacitySpecification {
                total_target_capacity: self.total_target_capacity,
                on_demand_target_capacity: self.on_demand_target_capacity,
                spot_target_capacity: self.spot_target_capacity,
                default_target_capacity_type: self.default_target_capacity_type,
                target_capacity_unit_type: self.target_capacity_unit_type,
            }
        }
    }
}
impl TargetCapacitySpecification {
    /// Creates a new builder-style object to manufacture [`TargetCapacitySpecification`](crate::model::TargetCapacitySpecification).
    pub fn builder() -> crate::model::target_capacity_specification::Builder {
        crate::model::target_capacity_specification::Builder::default()
    }
}

/// <p>Describes a launch template and overrides.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct FleetLaunchTemplateConfig {
    /// <p>The launch template.</p>
    #[doc(hidden)]
    pub launch_template_specification:
        std::option::Option<crate::model::FleetLaunchTemplateSpecification>,
    /// <p>Any parameters that you specify override the same parameters in the launch template.</p>
    #[doc(hidden)]
    pub overrides: std::option::Option<std::vec::Vec<crate::model::FleetLaunchTemplateOverrides>>,
}
impl FleetLaunchTemplateConfig {
    /// <p>The launch template.</p>
    pub fn launch_template_specification(
        &self,
    ) -> std::option::Option<&crate::model::FleetLaunchTemplateSpecification> {
        self.launch_template_specification.as_ref()
    }
    /// <p>Any parameters that you specify override the same parameters in the launch template.</p>
    pub fn overrides(&self) -> std::option::Option<&[crate::model::FleetLaunchTemplateOverrides]> {
        self.overrides.as_deref()
    }
}
/// See [`FleetLaunchTemplateConfig`](crate::model::FleetLaunchTemplateConfig).
pub mod fleet_launch_template_config {

    /// A builder for [`FleetLaunchTemplateConfig`](crate::model::FleetLaunchTemplateConfig).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) launch_template_specification:
            std::option::Option<crate::model::FleetLaunchTemplateSpecification>,
        pub(crate) overrides:
            std::option::Option<std::vec::Vec<crate::model::FleetLaunchTemplateOverrides>>,
    }
    impl Builder {
        /// <p>The launch template.</p>
        pub fn launch_template_specification(
            mut self,
            input: crate::model::FleetLaunchTemplateSpecification,
        ) -> Self {
            self.launch_template_specification = Some(input);
            self
        }
        /// <p>The launch template.</p>
        pub fn set_launch_template_specification(
            mut self,
            input: std::option::Option<crate::model::FleetLaunchTemplateSpecification>,
        ) -> Self {
            self.launch_template_specification = input;
            self
        }
        /// Appends an item to `overrides`.
        ///
        /// To override the contents of this collection use [`set_overrides`](Self::set_overrides).
        ///
        /// <p>Any parameters that you specify override the same parameters in the launch template.</p>
        pub fn overrides(mut self, input: crate::model::FleetLaunchTemplateOverrides) -> Self {
            let mut v = self.overrides.unwrap_or_default();
            v.push(input);
            self.overrides = Some(v);
            self
        }
        /// <p>Any parameters that you specify override the same parameters in the launch template.</p>
        pub fn set_overrides(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::FleetLaunchTemplateOverrides>>,
        ) -> Self {
            self.overrides = input;
            self
        }
        /// Consumes the builder and constructs a [`FleetLaunchTemplateConfig`](crate::model::FleetLaunchTemplateConfig).
        pub fn build(self) -> crate::model::FleetLaunchTemplateConfig {
            crate::model::FleetLaunchTemplateConfig {
                launch_template_specification: self.launch_template_specification,
                overrides: self.overrides,
            }
        }
    }
}
impl FleetLaunchTemplateConfig {
    /// Creates a new builder-style object to manufacture [`FleetLaunchTemplateConfig`](crate::model::FleetLaunchTemplateConfig).
    pub fn builder() -> crate::model::fleet_launch_template_config::Builder {
        crate::model::fleet_launch_template_config::Builder::default()
    }
}

/// When writing a match expression against `FleetStateCode`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let fleetstatecode = unimplemented!();
/// match fleetstatecode {
///     FleetStateCode::Active => { /* ... */ },
///     FleetStateCode::Deleted => { /* ... */ },
///     FleetStateCode::DeletedRunning => { /* ... */ },
///     FleetStateCode::DeletedTerminatingInstances => { /* ... */ },
///     FleetStateCode::Failed => { /* ... */ },
///     FleetStateCode::Modifying => { /* ... */ },
///     FleetStateCode::Submitted => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `fleetstatecode` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `FleetStateCode::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `FleetStateCode::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `FleetStateCode::NewFeature` is defined.
/// Specifically, when `fleetstatecode` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `FleetStateCode::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 FleetStateCode {
    #[allow(missing_docs)] // documentation missing in model
    Active,
    #[allow(missing_docs)] // documentation missing in model
    Deleted,
    #[allow(missing_docs)] // documentation missing in model
    DeletedRunning,
    #[allow(missing_docs)] // documentation missing in model
    DeletedTerminatingInstances,
    #[allow(missing_docs)] // documentation missing in model
    Failed,
    #[allow(missing_docs)] // documentation missing in model
    Modifying,
    #[allow(missing_docs)] // documentation missing in model
    Submitted,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for FleetStateCode {
    fn from(s: &str) -> Self {
        match s {
            "active" => FleetStateCode::Active,
            "deleted" => FleetStateCode::Deleted,
            "deleted_running" => FleetStateCode::DeletedRunning,
            "deleted_terminating" => FleetStateCode::DeletedTerminatingInstances,
            "failed" => FleetStateCode::Failed,
            "modifying" => FleetStateCode::Modifying,
            "submitted" => FleetStateCode::Submitted,
            other => FleetStateCode::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for FleetStateCode {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(FleetStateCode::from(s))
    }
}
impl FleetStateCode {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            FleetStateCode::Active => "active",
            FleetStateCode::Deleted => "deleted",
            FleetStateCode::DeletedRunning => "deleted_running",
            FleetStateCode::DeletedTerminatingInstances => "deleted_terminating",
            FleetStateCode::Failed => "failed",
            FleetStateCode::Modifying => "modifying",
            FleetStateCode::Submitted => "submitted",
            FleetStateCode::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &[
            "active",
            "deleted",
            "deleted_running",
            "deleted_terminating",
            "failed",
            "modifying",
            "submitted",
        ]
    }
}
impl AsRef<str> for FleetStateCode {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `FleetActivityStatus`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let fleetactivitystatus = unimplemented!();
/// match fleetactivitystatus {
///     FleetActivityStatus::Error => { /* ... */ },
///     FleetActivityStatus::Fulfilled => { /* ... */ },
///     FleetActivityStatus::PendingFulfillment => { /* ... */ },
///     FleetActivityStatus::PendingTermination => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `fleetactivitystatus` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `FleetActivityStatus::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `FleetActivityStatus::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `FleetActivityStatus::NewFeature` is defined.
/// Specifically, when `fleetactivitystatus` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `FleetActivityStatus::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 FleetActivityStatus {
    #[allow(missing_docs)] // documentation missing in model
    Error,
    #[allow(missing_docs)] // documentation missing in model
    Fulfilled,
    #[allow(missing_docs)] // documentation missing in model
    PendingFulfillment,
    #[allow(missing_docs)] // documentation missing in model
    PendingTermination,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for FleetActivityStatus {
    fn from(s: &str) -> Self {
        match s {
            "error" => FleetActivityStatus::Error,
            "fulfilled" => FleetActivityStatus::Fulfilled,
            "pending_fulfillment" => FleetActivityStatus::PendingFulfillment,
            "pending_termination" => FleetActivityStatus::PendingTermination,
            other => {
                FleetActivityStatus::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for FleetActivityStatus {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(FleetActivityStatus::from(s))
    }
}
impl FleetActivityStatus {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            FleetActivityStatus::Error => "error",
            FleetActivityStatus::Fulfilled => "fulfilled",
            FleetActivityStatus::PendingFulfillment => "pending_fulfillment",
            FleetActivityStatus::PendingTermination => "pending_termination",
            FleetActivityStatus::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &[
            "error",
            "fulfilled",
            "pending_fulfillment",
            "pending_termination",
        ]
    }
}
impl AsRef<str> for FleetActivityStatus {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes an event in the history of an EC2 Fleet.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct HistoryRecordEntry {
    /// <p>Information about the event.</p>
    #[doc(hidden)]
    pub event_information: std::option::Option<crate::model::EventInformation>,
    /// <p>The event type.</p>
    #[doc(hidden)]
    pub event_type: std::option::Option<crate::model::FleetEventType>,
    /// <p>The date and time of the event, in UTC format (for example, <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).</p>
    #[doc(hidden)]
    pub timestamp: std::option::Option<aws_smithy_types::DateTime>,
}
impl HistoryRecordEntry {
    /// <p>Information about the event.</p>
    pub fn event_information(&self) -> std::option::Option<&crate::model::EventInformation> {
        self.event_information.as_ref()
    }
    /// <p>The event type.</p>
    pub fn event_type(&self) -> std::option::Option<&crate::model::FleetEventType> {
        self.event_type.as_ref()
    }
    /// <p>The date and time of the event, in UTC format (for example, <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).</p>
    pub fn timestamp(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.timestamp.as_ref()
    }
}
/// See [`HistoryRecordEntry`](crate::model::HistoryRecordEntry).
pub mod history_record_entry {

    /// A builder for [`HistoryRecordEntry`](crate::model::HistoryRecordEntry).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) event_information: std::option::Option<crate::model::EventInformation>,
        pub(crate) event_type: std::option::Option<crate::model::FleetEventType>,
        pub(crate) timestamp: std::option::Option<aws_smithy_types::DateTime>,
    }
    impl Builder {
        /// <p>Information about the event.</p>
        pub fn event_information(mut self, input: crate::model::EventInformation) -> Self {
            self.event_information = Some(input);
            self
        }
        /// <p>Information about the event.</p>
        pub fn set_event_information(
            mut self,
            input: std::option::Option<crate::model::EventInformation>,
        ) -> Self {
            self.event_information = input;
            self
        }
        /// <p>The event type.</p>
        pub fn event_type(mut self, input: crate::model::FleetEventType) -> Self {
            self.event_type = Some(input);
            self
        }
        /// <p>The event type.</p>
        pub fn set_event_type(
            mut self,
            input: std::option::Option<crate::model::FleetEventType>,
        ) -> Self {
            self.event_type = input;
            self
        }
        /// <p>The date and time of the event, in UTC format (for example, <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).</p>
        pub fn timestamp(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.timestamp = Some(input);
            self
        }
        /// <p>The date and time of the event, in UTC format (for example, <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).</p>
        pub fn set_timestamp(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.timestamp = input;
            self
        }
        /// Consumes the builder and constructs a [`HistoryRecordEntry`](crate::model::HistoryRecordEntry).
        pub fn build(self) -> crate::model::HistoryRecordEntry {
            crate::model::HistoryRecordEntry {
                event_information: self.event_information,
                event_type: self.event_type,
                timestamp: self.timestamp,
            }
        }
    }
}
impl HistoryRecordEntry {
    /// Creates a new builder-style object to manufacture [`HistoryRecordEntry`](crate::model::HistoryRecordEntry).
    pub fn builder() -> crate::model::history_record_entry::Builder {
        crate::model::history_record_entry::Builder::default()
    }
}

/// When writing a match expression against `FleetEventType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let fleeteventtype = unimplemented!();
/// match fleeteventtype {
///     FleetEventType::FleetChange => { /* ... */ },
///     FleetEventType::InstanceChange => { /* ... */ },
///     FleetEventType::ServiceError => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `fleeteventtype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `FleetEventType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `FleetEventType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `FleetEventType::NewFeature` is defined.
/// Specifically, when `fleeteventtype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `FleetEventType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 FleetEventType {
    #[allow(missing_docs)] // documentation missing in model
    FleetChange,
    #[allow(missing_docs)] // documentation missing in model
    InstanceChange,
    #[allow(missing_docs)] // documentation missing in model
    ServiceError,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for FleetEventType {
    fn from(s: &str) -> Self {
        match s {
            "fleet-change" => FleetEventType::FleetChange,
            "instance-change" => FleetEventType::InstanceChange,
            "service-error" => FleetEventType::ServiceError,
            other => FleetEventType::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for FleetEventType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(FleetEventType::from(s))
    }
}
impl FleetEventType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            FleetEventType::FleetChange => "fleet-change",
            FleetEventType::InstanceChange => "instance-change",
            FleetEventType::ServiceError => "service-error",
            FleetEventType::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["fleet-change", "instance-change", "service-error"]
    }
}
impl AsRef<str> for FleetEventType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes fast snapshot restores for a snapshot.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DescribeFastSnapshotRestoreSuccessItem {
    /// <p>The ID of the snapshot.</p>
    #[doc(hidden)]
    pub snapshot_id: std::option::Option<std::string::String>,
    /// <p>The Availability Zone.</p>
    #[doc(hidden)]
    pub availability_zone: std::option::Option<std::string::String>,
    /// <p>The state of fast snapshot restores.</p>
    #[doc(hidden)]
    pub state: std::option::Option<crate::model::FastSnapshotRestoreStateCode>,
    /// <p>The reason for the state transition. The possible values are as follows:</p>
    /// <ul>
    /// <li> <p> <code>Client.UserInitiated</code> - The state successfully transitioned to <code>enabling</code> or <code>disabling</code>.</p> </li>
    /// <li> <p> <code>Client.UserInitiated - Lifecycle state transition</code> - The state successfully transitioned to <code>optimizing</code>, <code>enabled</code>, or <code>disabled</code>.</p> </li>
    /// </ul>
    #[doc(hidden)]
    pub state_transition_reason: std::option::Option<std::string::String>,
    /// <p>The ID of the Amazon Web Services account that enabled fast snapshot restores on the snapshot.</p>
    #[doc(hidden)]
    pub owner_id: std::option::Option<std::string::String>,
    /// <p>The Amazon Web Services owner alias that enabled fast snapshot restores on the snapshot. This is intended for future use.</p>
    #[doc(hidden)]
    pub owner_alias: std::option::Option<std::string::String>,
    /// <p>The time at which fast snapshot restores entered the <code>enabling</code> state.</p>
    #[doc(hidden)]
    pub enabling_time: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The time at which fast snapshot restores entered the <code>optimizing</code> state.</p>
    #[doc(hidden)]
    pub optimizing_time: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The time at which fast snapshot restores entered the <code>enabled</code> state.</p>
    #[doc(hidden)]
    pub enabled_time: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The time at which fast snapshot restores entered the <code>disabling</code> state.</p>
    #[doc(hidden)]
    pub disabling_time: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The time at which fast snapshot restores entered the <code>disabled</code> state.</p>
    #[doc(hidden)]
    pub disabled_time: std::option::Option<aws_smithy_types::DateTime>,
}
impl DescribeFastSnapshotRestoreSuccessItem {
    /// <p>The ID of the snapshot.</p>
    pub fn snapshot_id(&self) -> std::option::Option<&str> {
        self.snapshot_id.as_deref()
    }
    /// <p>The Availability Zone.</p>
    pub fn availability_zone(&self) -> std::option::Option<&str> {
        self.availability_zone.as_deref()
    }
    /// <p>The state of fast snapshot restores.</p>
    pub fn state(&self) -> std::option::Option<&crate::model::FastSnapshotRestoreStateCode> {
        self.state.as_ref()
    }
    /// <p>The reason for the state transition. The possible values are as follows:</p>
    /// <ul>
    /// <li> <p> <code>Client.UserInitiated</code> - The state successfully transitioned to <code>enabling</code> or <code>disabling</code>.</p> </li>
    /// <li> <p> <code>Client.UserInitiated - Lifecycle state transition</code> - The state successfully transitioned to <code>optimizing</code>, <code>enabled</code>, or <code>disabled</code>.</p> </li>
    /// </ul>
    pub fn state_transition_reason(&self) -> std::option::Option<&str> {
        self.state_transition_reason.as_deref()
    }
    /// <p>The ID of the Amazon Web Services account that enabled fast snapshot restores on the snapshot.</p>
    pub fn owner_id(&self) -> std::option::Option<&str> {
        self.owner_id.as_deref()
    }
    /// <p>The Amazon Web Services owner alias that enabled fast snapshot restores on the snapshot. This is intended for future use.</p>
    pub fn owner_alias(&self) -> std::option::Option<&str> {
        self.owner_alias.as_deref()
    }
    /// <p>The time at which fast snapshot restores entered the <code>enabling</code> state.</p>
    pub fn enabling_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.enabling_time.as_ref()
    }
    /// <p>The time at which fast snapshot restores entered the <code>optimizing</code> state.</p>
    pub fn optimizing_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.optimizing_time.as_ref()
    }
    /// <p>The time at which fast snapshot restores entered the <code>enabled</code> state.</p>
    pub fn enabled_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.enabled_time.as_ref()
    }
    /// <p>The time at which fast snapshot restores entered the <code>disabling</code> state.</p>
    pub fn disabling_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.disabling_time.as_ref()
    }
    /// <p>The time at which fast snapshot restores entered the <code>disabled</code> state.</p>
    pub fn disabled_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.disabled_time.as_ref()
    }
}
/// See [`DescribeFastSnapshotRestoreSuccessItem`](crate::model::DescribeFastSnapshotRestoreSuccessItem).
pub mod describe_fast_snapshot_restore_success_item {

    /// A builder for [`DescribeFastSnapshotRestoreSuccessItem`](crate::model::DescribeFastSnapshotRestoreSuccessItem).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) snapshot_id: std::option::Option<std::string::String>,
        pub(crate) availability_zone: std::option::Option<std::string::String>,
        pub(crate) state: std::option::Option<crate::model::FastSnapshotRestoreStateCode>,
        pub(crate) state_transition_reason: std::option::Option<std::string::String>,
        pub(crate) owner_id: std::option::Option<std::string::String>,
        pub(crate) owner_alias: std::option::Option<std::string::String>,
        pub(crate) enabling_time: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) optimizing_time: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) enabled_time: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) disabling_time: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) disabled_time: std::option::Option<aws_smithy_types::DateTime>,
    }
    impl Builder {
        /// <p>The ID of the snapshot.</p>
        pub fn snapshot_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.snapshot_id = Some(input.into());
            self
        }
        /// <p>The ID of the snapshot.</p>
        pub fn set_snapshot_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.snapshot_id = input;
            self
        }
        /// <p>The Availability Zone.</p>
        pub fn availability_zone(mut self, input: impl Into<std::string::String>) -> Self {
            self.availability_zone = Some(input.into());
            self
        }
        /// <p>The Availability Zone.</p>
        pub fn set_availability_zone(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.availability_zone = input;
            self
        }
        /// <p>The state of fast snapshot restores.</p>
        pub fn state(mut self, input: crate::model::FastSnapshotRestoreStateCode) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>The state of fast snapshot restores.</p>
        pub fn set_state(
            mut self,
            input: std::option::Option<crate::model::FastSnapshotRestoreStateCode>,
        ) -> Self {
            self.state = input;
            self
        }
        /// <p>The reason for the state transition. The possible values are as follows:</p>
        /// <ul>
        /// <li> <p> <code>Client.UserInitiated</code> - The state successfully transitioned to <code>enabling</code> or <code>disabling</code>.</p> </li>
        /// <li> <p> <code>Client.UserInitiated - Lifecycle state transition</code> - The state successfully transitioned to <code>optimizing</code>, <code>enabled</code>, or <code>disabled</code>.</p> </li>
        /// </ul>
        pub fn state_transition_reason(mut self, input: impl Into<std::string::String>) -> Self {
            self.state_transition_reason = Some(input.into());
            self
        }
        /// <p>The reason for the state transition. The possible values are as follows:</p>
        /// <ul>
        /// <li> <p> <code>Client.UserInitiated</code> - The state successfully transitioned to <code>enabling</code> or <code>disabling</code>.</p> </li>
        /// <li> <p> <code>Client.UserInitiated - Lifecycle state transition</code> - The state successfully transitioned to <code>optimizing</code>, <code>enabled</code>, or <code>disabled</code>.</p> </li>
        /// </ul>
        pub fn set_state_transition_reason(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.state_transition_reason = input;
            self
        }
        /// <p>The ID of the Amazon Web Services account that enabled fast snapshot restores on the snapshot.</p>
        pub fn owner_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.owner_id = Some(input.into());
            self
        }
        /// <p>The ID of the Amazon Web Services account that enabled fast snapshot restores on the snapshot.</p>
        pub fn set_owner_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.owner_id = input;
            self
        }
        /// <p>The Amazon Web Services owner alias that enabled fast snapshot restores on the snapshot. This is intended for future use.</p>
        pub fn owner_alias(mut self, input: impl Into<std::string::String>) -> Self {
            self.owner_alias = Some(input.into());
            self
        }
        /// <p>The Amazon Web Services owner alias that enabled fast snapshot restores on the snapshot. This is intended for future use.</p>
        pub fn set_owner_alias(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.owner_alias = input;
            self
        }
        /// <p>The time at which fast snapshot restores entered the <code>enabling</code> state.</p>
        pub fn enabling_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.enabling_time = Some(input);
            self
        }
        /// <p>The time at which fast snapshot restores entered the <code>enabling</code> state.</p>
        pub fn set_enabling_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.enabling_time = input;
            self
        }
        /// <p>The time at which fast snapshot restores entered the <code>optimizing</code> state.</p>
        pub fn optimizing_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.optimizing_time = Some(input);
            self
        }
        /// <p>The time at which fast snapshot restores entered the <code>optimizing</code> state.</p>
        pub fn set_optimizing_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.optimizing_time = input;
            self
        }
        /// <p>The time at which fast snapshot restores entered the <code>enabled</code> state.</p>
        pub fn enabled_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.enabled_time = Some(input);
            self
        }
        /// <p>The time at which fast snapshot restores entered the <code>enabled</code> state.</p>
        pub fn set_enabled_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.enabled_time = input;
            self
        }
        /// <p>The time at which fast snapshot restores entered the <code>disabling</code> state.</p>
        pub fn disabling_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.disabling_time = Some(input);
            self
        }
        /// <p>The time at which fast snapshot restores entered the <code>disabling</code> state.</p>
        pub fn set_disabling_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.disabling_time = input;
            self
        }
        /// <p>The time at which fast snapshot restores entered the <code>disabled</code> state.</p>
        pub fn disabled_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.disabled_time = Some(input);
            self
        }
        /// <p>The time at which fast snapshot restores entered the <code>disabled</code> state.</p>
        pub fn set_disabled_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.disabled_time = input;
            self
        }
        /// Consumes the builder and constructs a [`DescribeFastSnapshotRestoreSuccessItem`](crate::model::DescribeFastSnapshotRestoreSuccessItem).
        pub fn build(self) -> crate::model::DescribeFastSnapshotRestoreSuccessItem {
            crate::model::DescribeFastSnapshotRestoreSuccessItem {
                snapshot_id: self.snapshot_id,
                availability_zone: self.availability_zone,
                state: self.state,
                state_transition_reason: self.state_transition_reason,
                owner_id: self.owner_id,
                owner_alias: self.owner_alias,
                enabling_time: self.enabling_time,
                optimizing_time: self.optimizing_time,
                enabled_time: self.enabled_time,
                disabling_time: self.disabling_time,
                disabled_time: self.disabled_time,
            }
        }
    }
}
impl DescribeFastSnapshotRestoreSuccessItem {
    /// Creates a new builder-style object to manufacture [`DescribeFastSnapshotRestoreSuccessItem`](crate::model::DescribeFastSnapshotRestoreSuccessItem).
    pub fn builder() -> crate::model::describe_fast_snapshot_restore_success_item::Builder {
        crate::model::describe_fast_snapshot_restore_success_item::Builder::default()
    }
}

/// <p>Describe details about a fast-launch enabled Windows image that meets the requested criteria. Criteria are defined by the <code>DescribeFastLaunchImages</code> action filters.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DescribeFastLaunchImagesSuccessItem {
    /// <p>The image ID that identifies the fast-launch enabled Windows image.</p>
    #[doc(hidden)]
    pub image_id: std::option::Option<std::string::String>,
    /// <p>The resource type that is used for pre-provisioning the Windows AMI. Supported values include: <code>snapshot</code>.</p>
    #[doc(hidden)]
    pub resource_type: std::option::Option<crate::model::FastLaunchResourceType>,
    /// <p>A group of parameters that are used for pre-provisioning the associated Windows AMI using snapshots.</p>
    #[doc(hidden)]
    pub snapshot_configuration:
        std::option::Option<crate::model::FastLaunchSnapshotConfigurationResponse>,
    /// <p>The launch template that the fast-launch enabled Windows AMI uses when it launches Windows instances from pre-provisioned snapshots.</p>
    #[doc(hidden)]
    pub launch_template:
        std::option::Option<crate::model::FastLaunchLaunchTemplateSpecificationResponse>,
    /// <p>The maximum number of parallel instances that are launched for creating resources.</p>
    #[doc(hidden)]
    pub max_parallel_launches: std::option::Option<i32>,
    /// <p>The owner ID for the fast-launch enabled Windows AMI.</p>
    #[doc(hidden)]
    pub owner_id: std::option::Option<std::string::String>,
    /// <p>The current state of faster launching for the specified Windows AMI.</p>
    #[doc(hidden)]
    pub state: std::option::Option<crate::model::FastLaunchStateCode>,
    /// <p>The reason that faster launching for the Windows AMI changed to the current state.</p>
    #[doc(hidden)]
    pub state_transition_reason: std::option::Option<std::string::String>,
    /// <p>The time that faster launching for the Windows AMI changed to the current state.</p>
    #[doc(hidden)]
    pub state_transition_time: std::option::Option<aws_smithy_types::DateTime>,
}
impl DescribeFastLaunchImagesSuccessItem {
    /// <p>The image ID that identifies the fast-launch enabled Windows image.</p>
    pub fn image_id(&self) -> std::option::Option<&str> {
        self.image_id.as_deref()
    }
    /// <p>The resource type that is used for pre-provisioning the Windows AMI. Supported values include: <code>snapshot</code>.</p>
    pub fn resource_type(&self) -> std::option::Option<&crate::model::FastLaunchResourceType> {
        self.resource_type.as_ref()
    }
    /// <p>A group of parameters that are used for pre-provisioning the associated Windows AMI using snapshots.</p>
    pub fn snapshot_configuration(
        &self,
    ) -> std::option::Option<&crate::model::FastLaunchSnapshotConfigurationResponse> {
        self.snapshot_configuration.as_ref()
    }
    /// <p>The launch template that the fast-launch enabled Windows AMI uses when it launches Windows instances from pre-provisioned snapshots.</p>
    pub fn launch_template(
        &self,
    ) -> std::option::Option<&crate::model::FastLaunchLaunchTemplateSpecificationResponse> {
        self.launch_template.as_ref()
    }
    /// <p>The maximum number of parallel instances that are launched for creating resources.</p>
    pub fn max_parallel_launches(&self) -> std::option::Option<i32> {
        self.max_parallel_launches
    }
    /// <p>The owner ID for the fast-launch enabled Windows AMI.</p>
    pub fn owner_id(&self) -> std::option::Option<&str> {
        self.owner_id.as_deref()
    }
    /// <p>The current state of faster launching for the specified Windows AMI.</p>
    pub fn state(&self) -> std::option::Option<&crate::model::FastLaunchStateCode> {
        self.state.as_ref()
    }
    /// <p>The reason that faster launching for the Windows AMI changed to the current state.</p>
    pub fn state_transition_reason(&self) -> std::option::Option<&str> {
        self.state_transition_reason.as_deref()
    }
    /// <p>The time that faster launching for the Windows AMI changed to the current state.</p>
    pub fn state_transition_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.state_transition_time.as_ref()
    }
}
/// See [`DescribeFastLaunchImagesSuccessItem`](crate::model::DescribeFastLaunchImagesSuccessItem).
pub mod describe_fast_launch_images_success_item {

    /// A builder for [`DescribeFastLaunchImagesSuccessItem`](crate::model::DescribeFastLaunchImagesSuccessItem).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) image_id: std::option::Option<std::string::String>,
        pub(crate) resource_type: std::option::Option<crate::model::FastLaunchResourceType>,
        pub(crate) snapshot_configuration:
            std::option::Option<crate::model::FastLaunchSnapshotConfigurationResponse>,
        pub(crate) launch_template:
            std::option::Option<crate::model::FastLaunchLaunchTemplateSpecificationResponse>,
        pub(crate) max_parallel_launches: std::option::Option<i32>,
        pub(crate) owner_id: std::option::Option<std::string::String>,
        pub(crate) state: std::option::Option<crate::model::FastLaunchStateCode>,
        pub(crate) state_transition_reason: std::option::Option<std::string::String>,
        pub(crate) state_transition_time: std::option::Option<aws_smithy_types::DateTime>,
    }
    impl Builder {
        /// <p>The image ID that identifies the fast-launch enabled Windows image.</p>
        pub fn image_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.image_id = Some(input.into());
            self
        }
        /// <p>The image ID that identifies the fast-launch enabled Windows image.</p>
        pub fn set_image_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.image_id = input;
            self
        }
        /// <p>The resource type that is used for pre-provisioning the Windows AMI. Supported values include: <code>snapshot</code>.</p>
        pub fn resource_type(mut self, input: crate::model::FastLaunchResourceType) -> Self {
            self.resource_type = Some(input);
            self
        }
        /// <p>The resource type that is used for pre-provisioning the Windows AMI. Supported values include: <code>snapshot</code>.</p>
        pub fn set_resource_type(
            mut self,
            input: std::option::Option<crate::model::FastLaunchResourceType>,
        ) -> Self {
            self.resource_type = input;
            self
        }
        /// <p>A group of parameters that are used for pre-provisioning the associated Windows AMI using snapshots.</p>
        pub fn snapshot_configuration(
            mut self,
            input: crate::model::FastLaunchSnapshotConfigurationResponse,
        ) -> Self {
            self.snapshot_configuration = Some(input);
            self
        }
        /// <p>A group of parameters that are used for pre-provisioning the associated Windows AMI using snapshots.</p>
        pub fn set_snapshot_configuration(
            mut self,
            input: std::option::Option<crate::model::FastLaunchSnapshotConfigurationResponse>,
        ) -> Self {
            self.snapshot_configuration = input;
            self
        }
        /// <p>The launch template that the fast-launch enabled Windows AMI uses when it launches Windows instances from pre-provisioned snapshots.</p>
        pub fn launch_template(
            mut self,
            input: crate::model::FastLaunchLaunchTemplateSpecificationResponse,
        ) -> Self {
            self.launch_template = Some(input);
            self
        }
        /// <p>The launch template that the fast-launch enabled Windows AMI uses when it launches Windows instances from pre-provisioned snapshots.</p>
        pub fn set_launch_template(
            mut self,
            input: std::option::Option<crate::model::FastLaunchLaunchTemplateSpecificationResponse>,
        ) -> Self {
            self.launch_template = input;
            self
        }
        /// <p>The maximum number of parallel instances that are launched for creating resources.</p>
        pub fn max_parallel_launches(mut self, input: i32) -> Self {
            self.max_parallel_launches = Some(input);
            self
        }
        /// <p>The maximum number of parallel instances that are launched for creating resources.</p>
        pub fn set_max_parallel_launches(mut self, input: std::option::Option<i32>) -> Self {
            self.max_parallel_launches = input;
            self
        }
        /// <p>The owner ID for the fast-launch enabled Windows AMI.</p>
        pub fn owner_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.owner_id = Some(input.into());
            self
        }
        /// <p>The owner ID for the fast-launch enabled Windows AMI.</p>
        pub fn set_owner_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.owner_id = input;
            self
        }
        /// <p>The current state of faster launching for the specified Windows AMI.</p>
        pub fn state(mut self, input: crate::model::FastLaunchStateCode) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>The current state of faster launching for the specified Windows AMI.</p>
        pub fn set_state(
            mut self,
            input: std::option::Option<crate::model::FastLaunchStateCode>,
        ) -> Self {
            self.state = input;
            self
        }
        /// <p>The reason that faster launching for the Windows AMI changed to the current state.</p>
        pub fn state_transition_reason(mut self, input: impl Into<std::string::String>) -> Self {
            self.state_transition_reason = Some(input.into());
            self
        }
        /// <p>The reason that faster launching for the Windows AMI changed to the current state.</p>
        pub fn set_state_transition_reason(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.state_transition_reason = input;
            self
        }
        /// <p>The time that faster launching for the Windows AMI changed to the current state.</p>
        pub fn state_transition_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.state_transition_time = Some(input);
            self
        }
        /// <p>The time that faster launching for the Windows AMI changed to the current state.</p>
        pub fn set_state_transition_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.state_transition_time = input;
            self
        }
        /// Consumes the builder and constructs a [`DescribeFastLaunchImagesSuccessItem`](crate::model::DescribeFastLaunchImagesSuccessItem).
        pub fn build(self) -> crate::model::DescribeFastLaunchImagesSuccessItem {
            crate::model::DescribeFastLaunchImagesSuccessItem {
                image_id: self.image_id,
                resource_type: self.resource_type,
                snapshot_configuration: self.snapshot_configuration,
                launch_template: self.launch_template,
                max_parallel_launches: self.max_parallel_launches,
                owner_id: self.owner_id,
                state: self.state,
                state_transition_reason: self.state_transition_reason,
                state_transition_time: self.state_transition_time,
            }
        }
    }
}
impl DescribeFastLaunchImagesSuccessItem {
    /// Creates a new builder-style object to manufacture [`DescribeFastLaunchImagesSuccessItem`](crate::model::DescribeFastLaunchImagesSuccessItem).
    pub fn builder() -> crate::model::describe_fast_launch_images_success_item::Builder {
        crate::model::describe_fast_launch_images_success_item::Builder::default()
    }
}

/// <p>Describes an export instance task.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ExportTask {
    /// <p>A description of the resource being exported.</p>
    #[doc(hidden)]
    pub description: std::option::Option<std::string::String>,
    /// <p>The ID of the export task.</p>
    #[doc(hidden)]
    pub export_task_id: std::option::Option<std::string::String>,
    /// <p>Information about the export task.</p>
    #[doc(hidden)]
    pub export_to_s3_task: std::option::Option<crate::model::ExportToS3Task>,
    /// <p>Information about the instance to export.</p>
    #[doc(hidden)]
    pub instance_export_details: std::option::Option<crate::model::InstanceExportDetails>,
    /// <p>The state of the export task.</p>
    #[doc(hidden)]
    pub state: std::option::Option<crate::model::ExportTaskState>,
    /// <p>The status message related to the export task.</p>
    #[doc(hidden)]
    pub status_message: std::option::Option<std::string::String>,
    /// <p>The tags for the export task.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl ExportTask {
    /// <p>A description of the resource being exported.</p>
    pub fn description(&self) -> std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The ID of the export task.</p>
    pub fn export_task_id(&self) -> std::option::Option<&str> {
        self.export_task_id.as_deref()
    }
    /// <p>Information about the export task.</p>
    pub fn export_to_s3_task(&self) -> std::option::Option<&crate::model::ExportToS3Task> {
        self.export_to_s3_task.as_ref()
    }
    /// <p>Information about the instance to export.</p>
    pub fn instance_export_details(
        &self,
    ) -> std::option::Option<&crate::model::InstanceExportDetails> {
        self.instance_export_details.as_ref()
    }
    /// <p>The state of the export task.</p>
    pub fn state(&self) -> std::option::Option<&crate::model::ExportTaskState> {
        self.state.as_ref()
    }
    /// <p>The status message related to the export task.</p>
    pub fn status_message(&self) -> std::option::Option<&str> {
        self.status_message.as_deref()
    }
    /// <p>The tags for the export task.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
}
/// See [`ExportTask`](crate::model::ExportTask).
pub mod export_task {

    /// A builder for [`ExportTask`](crate::model::ExportTask).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) description: std::option::Option<std::string::String>,
        pub(crate) export_task_id: std::option::Option<std::string::String>,
        pub(crate) export_to_s3_task: std::option::Option<crate::model::ExportToS3Task>,
        pub(crate) instance_export_details:
            std::option::Option<crate::model::InstanceExportDetails>,
        pub(crate) state: std::option::Option<crate::model::ExportTaskState>,
        pub(crate) status_message: std::option::Option<std::string::String>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    }
    impl Builder {
        /// <p>A description of the resource being exported.</p>
        pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
            self.description = Some(input.into());
            self
        }
        /// <p>A description of the resource being exported.</p>
        pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.description = input;
            self
        }
        /// <p>The ID of the export task.</p>
        pub fn export_task_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.export_task_id = Some(input.into());
            self
        }
        /// <p>The ID of the export task.</p>
        pub fn set_export_task_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.export_task_id = input;
            self
        }
        /// <p>Information about the export task.</p>
        pub fn export_to_s3_task(mut self, input: crate::model::ExportToS3Task) -> Self {
            self.export_to_s3_task = Some(input);
            self
        }
        /// <p>Information about the export task.</p>
        pub fn set_export_to_s3_task(
            mut self,
            input: std::option::Option<crate::model::ExportToS3Task>,
        ) -> Self {
            self.export_to_s3_task = input;
            self
        }
        /// <p>Information about the instance to export.</p>
        pub fn instance_export_details(
            mut self,
            input: crate::model::InstanceExportDetails,
        ) -> Self {
            self.instance_export_details = Some(input);
            self
        }
        /// <p>Information about the instance to export.</p>
        pub fn set_instance_export_details(
            mut self,
            input: std::option::Option<crate::model::InstanceExportDetails>,
        ) -> Self {
            self.instance_export_details = input;
            self
        }
        /// <p>The state of the export task.</p>
        pub fn state(mut self, input: crate::model::ExportTaskState) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>The state of the export task.</p>
        pub fn set_state(
            mut self,
            input: std::option::Option<crate::model::ExportTaskState>,
        ) -> Self {
            self.state = input;
            self
        }
        /// <p>The status message related to the export task.</p>
        pub fn status_message(mut self, input: impl Into<std::string::String>) -> Self {
            self.status_message = Some(input.into());
            self
        }
        /// <p>The status message related to the export task.</p>
        pub fn set_status_message(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.status_message = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>The tags for the export task.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>The tags for the export task.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// Consumes the builder and constructs a [`ExportTask`](crate::model::ExportTask).
        pub fn build(self) -> crate::model::ExportTask {
            crate::model::ExportTask {
                description: self.description,
                export_task_id: self.export_task_id,
                export_to_s3_task: self.export_to_s3_task,
                instance_export_details: self.instance_export_details,
                state: self.state,
                status_message: self.status_message,
                tags: self.tags,
            }
        }
    }
}
impl ExportTask {
    /// Creates a new builder-style object to manufacture [`ExportTask`](crate::model::ExportTask).
    pub fn builder() -> crate::model::export_task::Builder {
        crate::model::export_task::Builder::default()
    }
}

/// When writing a match expression against `ExportTaskState`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let exporttaskstate = unimplemented!();
/// match exporttaskstate {
///     ExportTaskState::Active => { /* ... */ },
///     ExportTaskState::Cancelled => { /* ... */ },
///     ExportTaskState::Cancelling => { /* ... */ },
///     ExportTaskState::Completed => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `exporttaskstate` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `ExportTaskState::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `ExportTaskState::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `ExportTaskState::NewFeature` is defined.
/// Specifically, when `exporttaskstate` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `ExportTaskState::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 ExportTaskState {
    #[allow(missing_docs)] // documentation missing in model
    Active,
    #[allow(missing_docs)] // documentation missing in model
    Cancelled,
    #[allow(missing_docs)] // documentation missing in model
    Cancelling,
    #[allow(missing_docs)] // documentation missing in model
    Completed,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for ExportTaskState {
    fn from(s: &str) -> Self {
        match s {
            "active" => ExportTaskState::Active,
            "cancelled" => ExportTaskState::Cancelled,
            "cancelling" => ExportTaskState::Cancelling,
            "completed" => ExportTaskState::Completed,
            other => ExportTaskState::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for ExportTaskState {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(ExportTaskState::from(s))
    }
}
impl ExportTaskState {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            ExportTaskState::Active => "active",
            ExportTaskState::Cancelled => "cancelled",
            ExportTaskState::Cancelling => "cancelling",
            ExportTaskState::Completed => "completed",
            ExportTaskState::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["active", "cancelled", "cancelling", "completed"]
    }
}
impl AsRef<str> for ExportTaskState {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes an instance to export.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InstanceExportDetails {
    /// <p>The ID of the resource being exported.</p>
    #[doc(hidden)]
    pub instance_id: std::option::Option<std::string::String>,
    /// <p>The target virtualization environment.</p>
    #[doc(hidden)]
    pub target_environment: std::option::Option<crate::model::ExportEnvironment>,
}
impl InstanceExportDetails {
    /// <p>The ID of the resource being exported.</p>
    pub fn instance_id(&self) -> std::option::Option<&str> {
        self.instance_id.as_deref()
    }
    /// <p>The target virtualization environment.</p>
    pub fn target_environment(&self) -> std::option::Option<&crate::model::ExportEnvironment> {
        self.target_environment.as_ref()
    }
}
/// See [`InstanceExportDetails`](crate::model::InstanceExportDetails).
pub mod instance_export_details {

    /// A builder for [`InstanceExportDetails`](crate::model::InstanceExportDetails).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) instance_id: std::option::Option<std::string::String>,
        pub(crate) target_environment: std::option::Option<crate::model::ExportEnvironment>,
    }
    impl Builder {
        /// <p>The ID of the resource being exported.</p>
        pub fn instance_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.instance_id = Some(input.into());
            self
        }
        /// <p>The ID of the resource being exported.</p>
        pub fn set_instance_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.instance_id = input;
            self
        }
        /// <p>The target virtualization environment.</p>
        pub fn target_environment(mut self, input: crate::model::ExportEnvironment) -> Self {
            self.target_environment = Some(input);
            self
        }
        /// <p>The target virtualization environment.</p>
        pub fn set_target_environment(
            mut self,
            input: std::option::Option<crate::model::ExportEnvironment>,
        ) -> Self {
            self.target_environment = input;
            self
        }
        /// Consumes the builder and constructs a [`InstanceExportDetails`](crate::model::InstanceExportDetails).
        pub fn build(self) -> crate::model::InstanceExportDetails {
            crate::model::InstanceExportDetails {
                instance_id: self.instance_id,
                target_environment: self.target_environment,
            }
        }
    }
}
impl InstanceExportDetails {
    /// Creates a new builder-style object to manufacture [`InstanceExportDetails`](crate::model::InstanceExportDetails).
    pub fn builder() -> crate::model::instance_export_details::Builder {
        crate::model::instance_export_details::Builder::default()
    }
}

/// When writing a match expression against `ExportEnvironment`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let exportenvironment = unimplemented!();
/// match exportenvironment {
///     ExportEnvironment::Citrix => { /* ... */ },
///     ExportEnvironment::Microsoft => { /* ... */ },
///     ExportEnvironment::Vmware => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `exportenvironment` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `ExportEnvironment::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `ExportEnvironment::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `ExportEnvironment::NewFeature` is defined.
/// Specifically, when `exportenvironment` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `ExportEnvironment::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 ExportEnvironment {
    #[allow(missing_docs)] // documentation missing in model
    Citrix,
    #[allow(missing_docs)] // documentation missing in model
    Microsoft,
    #[allow(missing_docs)] // documentation missing in model
    Vmware,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for ExportEnvironment {
    fn from(s: &str) -> Self {
        match s {
            "citrix" => ExportEnvironment::Citrix,
            "microsoft" => ExportEnvironment::Microsoft,
            "vmware" => ExportEnvironment::Vmware,
            other => {
                ExportEnvironment::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for ExportEnvironment {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(ExportEnvironment::from(s))
    }
}
impl ExportEnvironment {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            ExportEnvironment::Citrix => "citrix",
            ExportEnvironment::Microsoft => "microsoft",
            ExportEnvironment::Vmware => "vmware",
            ExportEnvironment::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["citrix", "microsoft", "vmware"]
    }
}
impl AsRef<str> for ExportEnvironment {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes the format and location for the export task.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ExportToS3Task {
    /// <p>The container format used to combine disk images with metadata (such as OVF). If absent, only the disk image is exported.</p>
    #[doc(hidden)]
    pub container_format: std::option::Option<crate::model::ContainerFormat>,
    /// <p>The format for the exported image.</p>
    #[doc(hidden)]
    pub disk_image_format: std::option::Option<crate::model::DiskImageFormat>,
    /// <p>The Amazon S3 bucket for the destination image. The destination bucket must exist and have an access control list (ACL) attached that specifies the Region-specific canonical account ID for the <code>Grantee</code>. For more information about the ACL to your S3 bucket, see <a href="https://docs.aws.amazon.com/vm-import/latest/userguide/vmexport.html#vmexport-prerequisites">Prerequisites</a> in the VM Import/Export User Guide.</p>
    #[doc(hidden)]
    pub s3_bucket: std::option::Option<std::string::String>,
    /// <p>The encryption key for your S3 bucket.</p>
    #[doc(hidden)]
    pub s3_key: std::option::Option<std::string::String>,
}
impl ExportToS3Task {
    /// <p>The container format used to combine disk images with metadata (such as OVF). If absent, only the disk image is exported.</p>
    pub fn container_format(&self) -> std::option::Option<&crate::model::ContainerFormat> {
        self.container_format.as_ref()
    }
    /// <p>The format for the exported image.</p>
    pub fn disk_image_format(&self) -> std::option::Option<&crate::model::DiskImageFormat> {
        self.disk_image_format.as_ref()
    }
    /// <p>The Amazon S3 bucket for the destination image. The destination bucket must exist and have an access control list (ACL) attached that specifies the Region-specific canonical account ID for the <code>Grantee</code>. For more information about the ACL to your S3 bucket, see <a href="https://docs.aws.amazon.com/vm-import/latest/userguide/vmexport.html#vmexport-prerequisites">Prerequisites</a> in the VM Import/Export User Guide.</p>
    pub fn s3_bucket(&self) -> std::option::Option<&str> {
        self.s3_bucket.as_deref()
    }
    /// <p>The encryption key for your S3 bucket.</p>
    pub fn s3_key(&self) -> std::option::Option<&str> {
        self.s3_key.as_deref()
    }
}
/// See [`ExportToS3Task`](crate::model::ExportToS3Task).
pub mod export_to_s3_task {

    /// A builder for [`ExportToS3Task`](crate::model::ExportToS3Task).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) container_format: std::option::Option<crate::model::ContainerFormat>,
        pub(crate) disk_image_format: std::option::Option<crate::model::DiskImageFormat>,
        pub(crate) s3_bucket: std::option::Option<std::string::String>,
        pub(crate) s3_key: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The container format used to combine disk images with metadata (such as OVF). If absent, only the disk image is exported.</p>
        pub fn container_format(mut self, input: crate::model::ContainerFormat) -> Self {
            self.container_format = Some(input);
            self
        }
        /// <p>The container format used to combine disk images with metadata (such as OVF). If absent, only the disk image is exported.</p>
        pub fn set_container_format(
            mut self,
            input: std::option::Option<crate::model::ContainerFormat>,
        ) -> Self {
            self.container_format = input;
            self
        }
        /// <p>The format for the exported image.</p>
        pub fn disk_image_format(mut self, input: crate::model::DiskImageFormat) -> Self {
            self.disk_image_format = Some(input);
            self
        }
        /// <p>The format for the exported image.</p>
        pub fn set_disk_image_format(
            mut self,
            input: std::option::Option<crate::model::DiskImageFormat>,
        ) -> Self {
            self.disk_image_format = input;
            self
        }
        /// <p>The Amazon S3 bucket for the destination image. The destination bucket must exist and have an access control list (ACL) attached that specifies the Region-specific canonical account ID for the <code>Grantee</code>. For more information about the ACL to your S3 bucket, see <a href="https://docs.aws.amazon.com/vm-import/latest/userguide/vmexport.html#vmexport-prerequisites">Prerequisites</a> in the VM Import/Export User Guide.</p>
        pub fn s3_bucket(mut self, input: impl Into<std::string::String>) -> Self {
            self.s3_bucket = Some(input.into());
            self
        }
        /// <p>The Amazon S3 bucket for the destination image. The destination bucket must exist and have an access control list (ACL) attached that specifies the Region-specific canonical account ID for the <code>Grantee</code>. For more information about the ACL to your S3 bucket, see <a href="https://docs.aws.amazon.com/vm-import/latest/userguide/vmexport.html#vmexport-prerequisites">Prerequisites</a> in the VM Import/Export User Guide.</p>
        pub fn set_s3_bucket(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.s3_bucket = input;
            self
        }
        /// <p>The encryption key for your S3 bucket.</p>
        pub fn s3_key(mut self, input: impl Into<std::string::String>) -> Self {
            self.s3_key = Some(input.into());
            self
        }
        /// <p>The encryption key for your S3 bucket.</p>
        pub fn set_s3_key(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.s3_key = input;
            self
        }
        /// Consumes the builder and constructs a [`ExportToS3Task`](crate::model::ExportToS3Task).
        pub fn build(self) -> crate::model::ExportToS3Task {
            crate::model::ExportToS3Task {
                container_format: self.container_format,
                disk_image_format: self.disk_image_format,
                s3_bucket: self.s3_bucket,
                s3_key: self.s3_key,
            }
        }
    }
}
impl ExportToS3Task {
    /// Creates a new builder-style object to manufacture [`ExportToS3Task`](crate::model::ExportToS3Task).
    pub fn builder() -> crate::model::export_to_s3_task::Builder {
        crate::model::export_to_s3_task::Builder::default()
    }
}

/// When writing a match expression against `ContainerFormat`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let containerformat = unimplemented!();
/// match containerformat {
///     ContainerFormat::Ova => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `containerformat` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `ContainerFormat::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `ContainerFormat::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `ContainerFormat::NewFeature` is defined.
/// Specifically, when `containerformat` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `ContainerFormat::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 ContainerFormat {
    #[allow(missing_docs)] // documentation missing in model
    Ova,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for ContainerFormat {
    fn from(s: &str) -> Self {
        match s {
            "ova" => ContainerFormat::Ova,
            other => ContainerFormat::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for ContainerFormat {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(ContainerFormat::from(s))
    }
}
impl ContainerFormat {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            ContainerFormat::Ova => "ova",
            ContainerFormat::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["ova"]
    }
}
impl AsRef<str> for ContainerFormat {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes an export image task.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ExportImageTask {
    /// <p>A description of the image being exported.</p>
    #[doc(hidden)]
    pub description: std::option::Option<std::string::String>,
    /// <p>The ID of the export image task.</p>
    #[doc(hidden)]
    pub export_image_task_id: std::option::Option<std::string::String>,
    /// <p>The ID of the image.</p>
    #[doc(hidden)]
    pub image_id: std::option::Option<std::string::String>,
    /// <p>The percent complete of the export image task.</p>
    #[doc(hidden)]
    pub progress: std::option::Option<std::string::String>,
    /// <p>Information about the destination Amazon S3 bucket.</p>
    #[doc(hidden)]
    pub s3_export_location: std::option::Option<crate::model::ExportTaskS3Location>,
    /// <p>The status of the export image task. The possible values are <code>active</code>, <code>completed</code>, <code>deleting</code>, and <code>deleted</code>.</p>
    #[doc(hidden)]
    pub status: std::option::Option<std::string::String>,
    /// <p>The status message for the export image task.</p>
    #[doc(hidden)]
    pub status_message: std::option::Option<std::string::String>,
    /// <p>Any tags assigned to the export image task.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl ExportImageTask {
    /// <p>A description of the image being exported.</p>
    pub fn description(&self) -> std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The ID of the export image task.</p>
    pub fn export_image_task_id(&self) -> std::option::Option<&str> {
        self.export_image_task_id.as_deref()
    }
    /// <p>The ID of the image.</p>
    pub fn image_id(&self) -> std::option::Option<&str> {
        self.image_id.as_deref()
    }
    /// <p>The percent complete of the export image task.</p>
    pub fn progress(&self) -> std::option::Option<&str> {
        self.progress.as_deref()
    }
    /// <p>Information about the destination Amazon S3 bucket.</p>
    pub fn s3_export_location(&self) -> std::option::Option<&crate::model::ExportTaskS3Location> {
        self.s3_export_location.as_ref()
    }
    /// <p>The status of the export image task. The possible values are <code>active</code>, <code>completed</code>, <code>deleting</code>, and <code>deleted</code>.</p>
    pub fn status(&self) -> std::option::Option<&str> {
        self.status.as_deref()
    }
    /// <p>The status message for the export image task.</p>
    pub fn status_message(&self) -> std::option::Option<&str> {
        self.status_message.as_deref()
    }
    /// <p>Any tags assigned to the export image task.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
}
/// See [`ExportImageTask`](crate::model::ExportImageTask).
pub mod export_image_task {

    /// A builder for [`ExportImageTask`](crate::model::ExportImageTask).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) description: std::option::Option<std::string::String>,
        pub(crate) export_image_task_id: std::option::Option<std::string::String>,
        pub(crate) image_id: std::option::Option<std::string::String>,
        pub(crate) progress: std::option::Option<std::string::String>,
        pub(crate) s3_export_location: std::option::Option<crate::model::ExportTaskS3Location>,
        pub(crate) status: std::option::Option<std::string::String>,
        pub(crate) status_message: std::option::Option<std::string::String>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    }
    impl Builder {
        /// <p>A description of the image being exported.</p>
        pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
            self.description = Some(input.into());
            self
        }
        /// <p>A description of the image being exported.</p>
        pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.description = input;
            self
        }
        /// <p>The ID of the export image task.</p>
        pub fn export_image_task_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.export_image_task_id = Some(input.into());
            self
        }
        /// <p>The ID of the export image task.</p>
        pub fn set_export_image_task_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.export_image_task_id = input;
            self
        }
        /// <p>The ID of the image.</p>
        pub fn image_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.image_id = Some(input.into());
            self
        }
        /// <p>The ID of the image.</p>
        pub fn set_image_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.image_id = input;
            self
        }
        /// <p>The percent complete of the export image task.</p>
        pub fn progress(mut self, input: impl Into<std::string::String>) -> Self {
            self.progress = Some(input.into());
            self
        }
        /// <p>The percent complete of the export image task.</p>
        pub fn set_progress(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.progress = input;
            self
        }
        /// <p>Information about the destination Amazon S3 bucket.</p>
        pub fn s3_export_location(mut self, input: crate::model::ExportTaskS3Location) -> Self {
            self.s3_export_location = Some(input);
            self
        }
        /// <p>Information about the destination Amazon S3 bucket.</p>
        pub fn set_s3_export_location(
            mut self,
            input: std::option::Option<crate::model::ExportTaskS3Location>,
        ) -> Self {
            self.s3_export_location = input;
            self
        }
        /// <p>The status of the export image task. The possible values are <code>active</code>, <code>completed</code>, <code>deleting</code>, and <code>deleted</code>.</p>
        pub fn status(mut self, input: impl Into<std::string::String>) -> Self {
            self.status = Some(input.into());
            self
        }
        /// <p>The status of the export image task. The possible values are <code>active</code>, <code>completed</code>, <code>deleting</code>, and <code>deleted</code>.</p>
        pub fn set_status(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.status = input;
            self
        }
        /// <p>The status message for the export image task.</p>
        pub fn status_message(mut self, input: impl Into<std::string::String>) -> Self {
            self.status_message = Some(input.into());
            self
        }
        /// <p>The status message for the export image task.</p>
        pub fn set_status_message(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.status_message = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>Any tags assigned to the export image task.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>Any tags assigned to the export image task.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// Consumes the builder and constructs a [`ExportImageTask`](crate::model::ExportImageTask).
        pub fn build(self) -> crate::model::ExportImageTask {
            crate::model::ExportImageTask {
                description: self.description,
                export_image_task_id: self.export_image_task_id,
                image_id: self.image_id,
                progress: self.progress,
                s3_export_location: self.s3_export_location,
                status: self.status,
                status_message: self.status_message,
                tags: self.tags,
            }
        }
    }
}
impl ExportImageTask {
    /// Creates a new builder-style object to manufacture [`ExportImageTask`](crate::model::ExportImageTask).
    pub fn builder() -> crate::model::export_image_task::Builder {
        crate::model::export_image_task::Builder::default()
    }
}

/// <p>Describes an Elastic Graphics accelerator.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ElasticGpus {
    /// <p>The ID of the Elastic Graphics accelerator.</p>
    #[doc(hidden)]
    pub elastic_gpu_id: std::option::Option<std::string::String>,
    /// <p>The Availability Zone in the which the Elastic Graphics accelerator resides.</p>
    #[doc(hidden)]
    pub availability_zone: std::option::Option<std::string::String>,
    /// <p>The type of Elastic Graphics accelerator.</p>
    #[doc(hidden)]
    pub elastic_gpu_type: std::option::Option<std::string::String>,
    /// <p>The status of the Elastic Graphics accelerator.</p>
    #[doc(hidden)]
    pub elastic_gpu_health: std::option::Option<crate::model::ElasticGpuHealth>,
    /// <p>The state of the Elastic Graphics accelerator.</p>
    #[doc(hidden)]
    pub elastic_gpu_state: std::option::Option<crate::model::ElasticGpuState>,
    /// <p>The ID of the instance to which the Elastic Graphics accelerator is attached.</p>
    #[doc(hidden)]
    pub instance_id: std::option::Option<std::string::String>,
    /// <p>The tags assigned to the Elastic Graphics accelerator.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl ElasticGpus {
    /// <p>The ID of the Elastic Graphics accelerator.</p>
    pub fn elastic_gpu_id(&self) -> std::option::Option<&str> {
        self.elastic_gpu_id.as_deref()
    }
    /// <p>The Availability Zone in the which the Elastic Graphics accelerator resides.</p>
    pub fn availability_zone(&self) -> std::option::Option<&str> {
        self.availability_zone.as_deref()
    }
    /// <p>The type of Elastic Graphics accelerator.</p>
    pub fn elastic_gpu_type(&self) -> std::option::Option<&str> {
        self.elastic_gpu_type.as_deref()
    }
    /// <p>The status of the Elastic Graphics accelerator.</p>
    pub fn elastic_gpu_health(&self) -> std::option::Option<&crate::model::ElasticGpuHealth> {
        self.elastic_gpu_health.as_ref()
    }
    /// <p>The state of the Elastic Graphics accelerator.</p>
    pub fn elastic_gpu_state(&self) -> std::option::Option<&crate::model::ElasticGpuState> {
        self.elastic_gpu_state.as_ref()
    }
    /// <p>The ID of the instance to which the Elastic Graphics accelerator is attached.</p>
    pub fn instance_id(&self) -> std::option::Option<&str> {
        self.instance_id.as_deref()
    }
    /// <p>The tags assigned to the Elastic Graphics accelerator.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
}
/// See [`ElasticGpus`](crate::model::ElasticGpus).
pub mod elastic_gpus {

    /// A builder for [`ElasticGpus`](crate::model::ElasticGpus).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) elastic_gpu_id: std::option::Option<std::string::String>,
        pub(crate) availability_zone: std::option::Option<std::string::String>,
        pub(crate) elastic_gpu_type: std::option::Option<std::string::String>,
        pub(crate) elastic_gpu_health: std::option::Option<crate::model::ElasticGpuHealth>,
        pub(crate) elastic_gpu_state: std::option::Option<crate::model::ElasticGpuState>,
        pub(crate) instance_id: std::option::Option<std::string::String>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    }
    impl Builder {
        /// <p>The ID of the Elastic Graphics accelerator.</p>
        pub fn elastic_gpu_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.elastic_gpu_id = Some(input.into());
            self
        }
        /// <p>The ID of the Elastic Graphics accelerator.</p>
        pub fn set_elastic_gpu_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.elastic_gpu_id = input;
            self
        }
        /// <p>The Availability Zone in the which the Elastic Graphics accelerator resides.</p>
        pub fn availability_zone(mut self, input: impl Into<std::string::String>) -> Self {
            self.availability_zone = Some(input.into());
            self
        }
        /// <p>The Availability Zone in the which the Elastic Graphics accelerator resides.</p>
        pub fn set_availability_zone(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.availability_zone = input;
            self
        }
        /// <p>The type of Elastic Graphics accelerator.</p>
        pub fn elastic_gpu_type(mut self, input: impl Into<std::string::String>) -> Self {
            self.elastic_gpu_type = Some(input.into());
            self
        }
        /// <p>The type of Elastic Graphics accelerator.</p>
        pub fn set_elastic_gpu_type(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.elastic_gpu_type = input;
            self
        }
        /// <p>The status of the Elastic Graphics accelerator.</p>
        pub fn elastic_gpu_health(mut self, input: crate::model::ElasticGpuHealth) -> Self {
            self.elastic_gpu_health = Some(input);
            self
        }
        /// <p>The status of the Elastic Graphics accelerator.</p>
        pub fn set_elastic_gpu_health(
            mut self,
            input: std::option::Option<crate::model::ElasticGpuHealth>,
        ) -> Self {
            self.elastic_gpu_health = input;
            self
        }
        /// <p>The state of the Elastic Graphics accelerator.</p>
        pub fn elastic_gpu_state(mut self, input: crate::model::ElasticGpuState) -> Self {
            self.elastic_gpu_state = Some(input);
            self
        }
        /// <p>The state of the Elastic Graphics accelerator.</p>
        pub fn set_elastic_gpu_state(
            mut self,
            input: std::option::Option<crate::model::ElasticGpuState>,
        ) -> Self {
            self.elastic_gpu_state = input;
            self
        }
        /// <p>The ID of the instance to which the Elastic Graphics accelerator is attached.</p>
        pub fn instance_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.instance_id = Some(input.into());
            self
        }
        /// <p>The ID of the instance to which the Elastic Graphics accelerator is attached.</p>
        pub fn set_instance_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.instance_id = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>The tags assigned to the Elastic Graphics accelerator.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>The tags assigned to the Elastic Graphics accelerator.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// Consumes the builder and constructs a [`ElasticGpus`](crate::model::ElasticGpus).
        pub fn build(self) -> crate::model::ElasticGpus {
            crate::model::ElasticGpus {
                elastic_gpu_id: self.elastic_gpu_id,
                availability_zone: self.availability_zone,
                elastic_gpu_type: self.elastic_gpu_type,
                elastic_gpu_health: self.elastic_gpu_health,
                elastic_gpu_state: self.elastic_gpu_state,
                instance_id: self.instance_id,
                tags: self.tags,
            }
        }
    }
}
impl ElasticGpus {
    /// Creates a new builder-style object to manufacture [`ElasticGpus`](crate::model::ElasticGpus).
    pub fn builder() -> crate::model::elastic_gpus::Builder {
        crate::model::elastic_gpus::Builder::default()
    }
}

/// When writing a match expression against `ElasticGpuState`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let elasticgpustate = unimplemented!();
/// match elasticgpustate {
///     ElasticGpuState::Attached => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `elasticgpustate` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `ElasticGpuState::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `ElasticGpuState::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `ElasticGpuState::NewFeature` is defined.
/// Specifically, when `elasticgpustate` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `ElasticGpuState::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 ElasticGpuState {
    #[allow(missing_docs)] // documentation missing in model
    Attached,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for ElasticGpuState {
    fn from(s: &str) -> Self {
        match s {
            "ATTACHED" => ElasticGpuState::Attached,
            other => ElasticGpuState::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for ElasticGpuState {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(ElasticGpuState::from(s))
    }
}
impl ElasticGpuState {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            ElasticGpuState::Attached => "ATTACHED",
            ElasticGpuState::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["ATTACHED"]
    }
}
impl AsRef<str> for ElasticGpuState {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes the status of an Elastic Graphics accelerator.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ElasticGpuHealth {
    /// <p>The health status.</p>
    #[doc(hidden)]
    pub status: std::option::Option<crate::model::ElasticGpuStatus>,
}
impl ElasticGpuHealth {
    /// <p>The health status.</p>
    pub fn status(&self) -> std::option::Option<&crate::model::ElasticGpuStatus> {
        self.status.as_ref()
    }
}
/// See [`ElasticGpuHealth`](crate::model::ElasticGpuHealth).
pub mod elastic_gpu_health {

    /// A builder for [`ElasticGpuHealth`](crate::model::ElasticGpuHealth).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) status: std::option::Option<crate::model::ElasticGpuStatus>,
    }
    impl Builder {
        /// <p>The health status.</p>
        pub fn status(mut self, input: crate::model::ElasticGpuStatus) -> Self {
            self.status = Some(input);
            self
        }
        /// <p>The health status.</p>
        pub fn set_status(
            mut self,
            input: std::option::Option<crate::model::ElasticGpuStatus>,
        ) -> Self {
            self.status = input;
            self
        }
        /// Consumes the builder and constructs a [`ElasticGpuHealth`](crate::model::ElasticGpuHealth).
        pub fn build(self) -> crate::model::ElasticGpuHealth {
            crate::model::ElasticGpuHealth {
                status: self.status,
            }
        }
    }
}
impl ElasticGpuHealth {
    /// Creates a new builder-style object to manufacture [`ElasticGpuHealth`](crate::model::ElasticGpuHealth).
    pub fn builder() -> crate::model::elastic_gpu_health::Builder {
        crate::model::elastic_gpu_health::Builder::default()
    }
}

/// When writing a match expression against `ElasticGpuStatus`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let elasticgpustatus = unimplemented!();
/// match elasticgpustatus {
///     ElasticGpuStatus::Impaired => { /* ... */ },
///     ElasticGpuStatus::Ok => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `elasticgpustatus` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `ElasticGpuStatus::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `ElasticGpuStatus::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `ElasticGpuStatus::NewFeature` is defined.
/// Specifically, when `elasticgpustatus` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `ElasticGpuStatus::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 ElasticGpuStatus {
    #[allow(missing_docs)] // documentation missing in model
    Impaired,
    #[allow(missing_docs)] // documentation missing in model
    Ok,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for ElasticGpuStatus {
    fn from(s: &str) -> Self {
        match s {
            "IMPAIRED" => ElasticGpuStatus::Impaired,
            "OK" => ElasticGpuStatus::Ok,
            other => ElasticGpuStatus::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for ElasticGpuStatus {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(ElasticGpuStatus::from(s))
    }
}
impl ElasticGpuStatus {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            ElasticGpuStatus::Impaired => "IMPAIRED",
            ElasticGpuStatus::Ok => "OK",
            ElasticGpuStatus::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["IMPAIRED", "OK"]
    }
}
impl AsRef<str> for ElasticGpuStatus {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes an egress-only internet gateway.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct EgressOnlyInternetGateway {
    /// <p>Information about the attachment of the egress-only internet gateway.</p>
    #[doc(hidden)]
    pub attachments: std::option::Option<std::vec::Vec<crate::model::InternetGatewayAttachment>>,
    /// <p>The ID of the egress-only internet gateway.</p>
    #[doc(hidden)]
    pub egress_only_internet_gateway_id: std::option::Option<std::string::String>,
    /// <p>The tags assigned to the egress-only internet gateway.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl EgressOnlyInternetGateway {
    /// <p>Information about the attachment of the egress-only internet gateway.</p>
    pub fn attachments(&self) -> std::option::Option<&[crate::model::InternetGatewayAttachment]> {
        self.attachments.as_deref()
    }
    /// <p>The ID of the egress-only internet gateway.</p>
    pub fn egress_only_internet_gateway_id(&self) -> std::option::Option<&str> {
        self.egress_only_internet_gateway_id.as_deref()
    }
    /// <p>The tags assigned to the egress-only internet gateway.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
}
/// See [`EgressOnlyInternetGateway`](crate::model::EgressOnlyInternetGateway).
pub mod egress_only_internet_gateway {

    /// A builder for [`EgressOnlyInternetGateway`](crate::model::EgressOnlyInternetGateway).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) attachments:
            std::option::Option<std::vec::Vec<crate::model::InternetGatewayAttachment>>,
        pub(crate) egress_only_internet_gateway_id: std::option::Option<std::string::String>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    }
    impl Builder {
        /// Appends an item to `attachments`.
        ///
        /// To override the contents of this collection use [`set_attachments`](Self::set_attachments).
        ///
        /// <p>Information about the attachment of the egress-only internet gateway.</p>
        pub fn attachments(mut self, input: crate::model::InternetGatewayAttachment) -> Self {
            let mut v = self.attachments.unwrap_or_default();
            v.push(input);
            self.attachments = Some(v);
            self
        }
        /// <p>Information about the attachment of the egress-only internet gateway.</p>
        pub fn set_attachments(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::InternetGatewayAttachment>>,
        ) -> Self {
            self.attachments = input;
            self
        }
        /// <p>The ID of the egress-only internet gateway.</p>
        pub fn egress_only_internet_gateway_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.egress_only_internet_gateway_id = Some(input.into());
            self
        }
        /// <p>The ID of the egress-only internet gateway.</p>
        pub fn set_egress_only_internet_gateway_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.egress_only_internet_gateway_id = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>The tags assigned to the egress-only internet gateway.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>The tags assigned to the egress-only internet gateway.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// Consumes the builder and constructs a [`EgressOnlyInternetGateway`](crate::model::EgressOnlyInternetGateway).
        pub fn build(self) -> crate::model::EgressOnlyInternetGateway {
            crate::model::EgressOnlyInternetGateway {
                attachments: self.attachments,
                egress_only_internet_gateway_id: self.egress_only_internet_gateway_id,
                tags: self.tags,
            }
        }
    }
}
impl EgressOnlyInternetGateway {
    /// Creates a new builder-style object to manufacture [`EgressOnlyInternetGateway`](crate::model::EgressOnlyInternetGateway).
    pub fn builder() -> crate::model::egress_only_internet_gateway::Builder {
        crate::model::egress_only_internet_gateway::Builder::default()
    }
}

/// <p>Describes a set of DHCP options.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DhcpOptions {
    /// <p>One or more DHCP options in the set.</p>
    #[doc(hidden)]
    pub dhcp_configurations: std::option::Option<std::vec::Vec<crate::model::DhcpConfiguration>>,
    /// <p>The ID of the set of DHCP options.</p>
    #[doc(hidden)]
    pub dhcp_options_id: std::option::Option<std::string::String>,
    /// <p>The ID of the Amazon Web Services account that owns the DHCP options set.</p>
    #[doc(hidden)]
    pub owner_id: std::option::Option<std::string::String>,
    /// <p>Any tags assigned to the DHCP options set.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl DhcpOptions {
    /// <p>One or more DHCP options in the set.</p>
    pub fn dhcp_configurations(&self) -> std::option::Option<&[crate::model::DhcpConfiguration]> {
        self.dhcp_configurations.as_deref()
    }
    /// <p>The ID of the set of DHCP options.</p>
    pub fn dhcp_options_id(&self) -> std::option::Option<&str> {
        self.dhcp_options_id.as_deref()
    }
    /// <p>The ID of the Amazon Web Services account that owns the DHCP options set.</p>
    pub fn owner_id(&self) -> std::option::Option<&str> {
        self.owner_id.as_deref()
    }
    /// <p>Any tags assigned to the DHCP options set.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
}
/// See [`DhcpOptions`](crate::model::DhcpOptions).
pub mod dhcp_options {

    /// A builder for [`DhcpOptions`](crate::model::DhcpOptions).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) dhcp_configurations:
            std::option::Option<std::vec::Vec<crate::model::DhcpConfiguration>>,
        pub(crate) dhcp_options_id: std::option::Option<std::string::String>,
        pub(crate) owner_id: std::option::Option<std::string::String>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    }
    impl Builder {
        /// Appends an item to `dhcp_configurations`.
        ///
        /// To override the contents of this collection use [`set_dhcp_configurations`](Self::set_dhcp_configurations).
        ///
        /// <p>One or more DHCP options in the set.</p>
        pub fn dhcp_configurations(mut self, input: crate::model::DhcpConfiguration) -> Self {
            let mut v = self.dhcp_configurations.unwrap_or_default();
            v.push(input);
            self.dhcp_configurations = Some(v);
            self
        }
        /// <p>One or more DHCP options in the set.</p>
        pub fn set_dhcp_configurations(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::DhcpConfiguration>>,
        ) -> Self {
            self.dhcp_configurations = input;
            self
        }
        /// <p>The ID of the set of DHCP options.</p>
        pub fn dhcp_options_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.dhcp_options_id = Some(input.into());
            self
        }
        /// <p>The ID of the set of DHCP options.</p>
        pub fn set_dhcp_options_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.dhcp_options_id = input;
            self
        }
        /// <p>The ID of the Amazon Web Services account that owns the DHCP options set.</p>
        pub fn owner_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.owner_id = Some(input.into());
            self
        }
        /// <p>The ID of the Amazon Web Services account that owns the DHCP options set.</p>
        pub fn set_owner_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.owner_id = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>Any tags assigned to the DHCP options set.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>Any tags assigned to the DHCP options set.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// Consumes the builder and constructs a [`DhcpOptions`](crate::model::DhcpOptions).
        pub fn build(self) -> crate::model::DhcpOptions {
            crate::model::DhcpOptions {
                dhcp_configurations: self.dhcp_configurations,
                dhcp_options_id: self.dhcp_options_id,
                owner_id: self.owner_id,
                tags: self.tags,
            }
        }
    }
}
impl DhcpOptions {
    /// Creates a new builder-style object to manufacture [`DhcpOptions`](crate::model::DhcpOptions).
    pub fn builder() -> crate::model::dhcp_options::Builder {
        crate::model::dhcp_options::Builder::default()
    }
}

/// <p>Describes a DHCP configuration option.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DhcpConfiguration {
    /// <p>The name of a DHCP option.</p>
    #[doc(hidden)]
    pub key: std::option::Option<std::string::String>,
    /// <p>One or more values for the DHCP option.</p>
    #[doc(hidden)]
    pub values: std::option::Option<std::vec::Vec<crate::model::AttributeValue>>,
}
impl DhcpConfiguration {
    /// <p>The name of a DHCP option.</p>
    pub fn key(&self) -> std::option::Option<&str> {
        self.key.as_deref()
    }
    /// <p>One or more values for the DHCP option.</p>
    pub fn values(&self) -> std::option::Option<&[crate::model::AttributeValue]> {
        self.values.as_deref()
    }
}
/// See [`DhcpConfiguration`](crate::model::DhcpConfiguration).
pub mod dhcp_configuration {

    /// A builder for [`DhcpConfiguration`](crate::model::DhcpConfiguration).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) key: std::option::Option<std::string::String>,
        pub(crate) values: std::option::Option<std::vec::Vec<crate::model::AttributeValue>>,
    }
    impl Builder {
        /// <p>The name of a DHCP option.</p>
        pub fn key(mut self, input: impl Into<std::string::String>) -> Self {
            self.key = Some(input.into());
            self
        }
        /// <p>The name of a DHCP option.</p>
        pub fn set_key(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.key = input;
            self
        }
        /// Appends an item to `values`.
        ///
        /// To override the contents of this collection use [`set_values`](Self::set_values).
        ///
        /// <p>One or more values for the DHCP option.</p>
        pub fn values(mut self, input: crate::model::AttributeValue) -> Self {
            let mut v = self.values.unwrap_or_default();
            v.push(input);
            self.values = Some(v);
            self
        }
        /// <p>One or more values for the DHCP option.</p>
        pub fn set_values(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::AttributeValue>>,
        ) -> Self {
            self.values = input;
            self
        }
        /// Consumes the builder and constructs a [`DhcpConfiguration`](crate::model::DhcpConfiguration).
        pub fn build(self) -> crate::model::DhcpConfiguration {
            crate::model::DhcpConfiguration {
                key: self.key,
                values: self.values,
            }
        }
    }
}
impl DhcpConfiguration {
    /// Creates a new builder-style object to manufacture [`DhcpConfiguration`](crate::model::DhcpConfiguration).
    pub fn builder() -> crate::model::dhcp_configuration::Builder {
        crate::model::dhcp_configuration::Builder::default()
    }
}

/// <p>Describes a customer gateway.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CustomerGateway {
    /// <p>The customer gateway's Border Gateway Protocol (BGP) Autonomous System Number (ASN).</p>
    #[doc(hidden)]
    pub bgp_asn: std::option::Option<std::string::String>,
    /// <p>The ID of the customer gateway.</p>
    #[doc(hidden)]
    pub customer_gateway_id: std::option::Option<std::string::String>,
    /// <p>The IP address of the customer gateway device's outside interface.</p>
    #[doc(hidden)]
    pub ip_address: std::option::Option<std::string::String>,
    /// <p>The Amazon Resource Name (ARN) for the customer gateway certificate.</p>
    #[doc(hidden)]
    pub certificate_arn: std::option::Option<std::string::String>,
    /// <p>The current state of the customer gateway (<code>pending | available | deleting | deleted</code>).</p>
    #[doc(hidden)]
    pub state: std::option::Option<std::string::String>,
    /// <p>The type of VPN connection the customer gateway supports (<code>ipsec.1</code>).</p>
    #[doc(hidden)]
    pub r#type: std::option::Option<std::string::String>,
    /// <p>The name of customer gateway device.</p>
    #[doc(hidden)]
    pub device_name: std::option::Option<std::string::String>,
    /// <p>Any tags assigned to the customer gateway.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl CustomerGateway {
    /// <p>The customer gateway's Border Gateway Protocol (BGP) Autonomous System Number (ASN).</p>
    pub fn bgp_asn(&self) -> std::option::Option<&str> {
        self.bgp_asn.as_deref()
    }
    /// <p>The ID of the customer gateway.</p>
    pub fn customer_gateway_id(&self) -> std::option::Option<&str> {
        self.customer_gateway_id.as_deref()
    }
    /// <p>The IP address of the customer gateway device's outside interface.</p>
    pub fn ip_address(&self) -> std::option::Option<&str> {
        self.ip_address.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) for the customer gateway certificate.</p>
    pub fn certificate_arn(&self) -> std::option::Option<&str> {
        self.certificate_arn.as_deref()
    }
    /// <p>The current state of the customer gateway (<code>pending | available | deleting | deleted</code>).</p>
    pub fn state(&self) -> std::option::Option<&str> {
        self.state.as_deref()
    }
    /// <p>The type of VPN connection the customer gateway supports (<code>ipsec.1</code>).</p>
    pub fn r#type(&self) -> std::option::Option<&str> {
        self.r#type.as_deref()
    }
    /// <p>The name of customer gateway device.</p>
    pub fn device_name(&self) -> std::option::Option<&str> {
        self.device_name.as_deref()
    }
    /// <p>Any tags assigned to the customer gateway.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
}
/// See [`CustomerGateway`](crate::model::CustomerGateway).
pub mod customer_gateway {

    /// A builder for [`CustomerGateway`](crate::model::CustomerGateway).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) bgp_asn: std::option::Option<std::string::String>,
        pub(crate) customer_gateway_id: std::option::Option<std::string::String>,
        pub(crate) ip_address: std::option::Option<std::string::String>,
        pub(crate) certificate_arn: std::option::Option<std::string::String>,
        pub(crate) state: std::option::Option<std::string::String>,
        pub(crate) r#type: std::option::Option<std::string::String>,
        pub(crate) device_name: std::option::Option<std::string::String>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    }
    impl Builder {
        /// <p>The customer gateway's Border Gateway Protocol (BGP) Autonomous System Number (ASN).</p>
        pub fn bgp_asn(mut self, input: impl Into<std::string::String>) -> Self {
            self.bgp_asn = Some(input.into());
            self
        }
        /// <p>The customer gateway's Border Gateway Protocol (BGP) Autonomous System Number (ASN).</p>
        pub fn set_bgp_asn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.bgp_asn = input;
            self
        }
        /// <p>The ID of the customer gateway.</p>
        pub fn customer_gateway_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.customer_gateway_id = Some(input.into());
            self
        }
        /// <p>The ID of the customer gateway.</p>
        pub fn set_customer_gateway_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.customer_gateway_id = input;
            self
        }
        /// <p>The IP address of the customer gateway device's outside interface.</p>
        pub fn ip_address(mut self, input: impl Into<std::string::String>) -> Self {
            self.ip_address = Some(input.into());
            self
        }
        /// <p>The IP address of the customer gateway device's outside interface.</p>
        pub fn set_ip_address(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.ip_address = input;
            self
        }
        /// <p>The Amazon Resource Name (ARN) for the customer gateway certificate.</p>
        pub fn certificate_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.certificate_arn = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) for the customer gateway certificate.</p>
        pub fn set_certificate_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.certificate_arn = input;
            self
        }
        /// <p>The current state of the customer gateway (<code>pending | available | deleting | deleted</code>).</p>
        pub fn state(mut self, input: impl Into<std::string::String>) -> Self {
            self.state = Some(input.into());
            self
        }
        /// <p>The current state of the customer gateway (<code>pending | available | deleting | deleted</code>).</p>
        pub fn set_state(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.state = input;
            self
        }
        /// <p>The type of VPN connection the customer gateway supports (<code>ipsec.1</code>).</p>
        pub fn r#type(mut self, input: impl Into<std::string::String>) -> Self {
            self.r#type = Some(input.into());
            self
        }
        /// <p>The type of VPN connection the customer gateway supports (<code>ipsec.1</code>).</p>
        pub fn set_type(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.r#type = input;
            self
        }
        /// <p>The name of customer gateway device.</p>
        pub fn device_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.device_name = Some(input.into());
            self
        }
        /// <p>The name of customer gateway device.</p>
        pub fn set_device_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.device_name = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>Any tags assigned to the customer gateway.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>Any tags assigned to the customer gateway.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// Consumes the builder and constructs a [`CustomerGateway`](crate::model::CustomerGateway).
        pub fn build(self) -> crate::model::CustomerGateway {
            crate::model::CustomerGateway {
                bgp_asn: self.bgp_asn,
                customer_gateway_id: self.customer_gateway_id,
                ip_address: self.ip_address,
                certificate_arn: self.certificate_arn,
                state: self.state,
                r#type: self.r#type,
                device_name: self.device_name,
                tags: self.tags,
            }
        }
    }
}
impl CustomerGateway {
    /// Creates a new builder-style object to manufacture [`CustomerGateway`](crate::model::CustomerGateway).
    pub fn builder() -> crate::model::customer_gateway::Builder {
        crate::model::customer_gateway::Builder::default()
    }
}

/// <p>Describes a customer-owned address pool.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CoipPool {
    /// <p>The ID of the address pool.</p>
    #[doc(hidden)]
    pub pool_id: std::option::Option<std::string::String>,
    /// <p>The address ranges of the address pool.</p>
    #[doc(hidden)]
    pub pool_cidrs: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>The ID of the local gateway route table.</p>
    #[doc(hidden)]
    pub local_gateway_route_table_id: std::option::Option<std::string::String>,
    /// <p>The tags.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    /// <p>The ARN of the address pool.</p>
    #[doc(hidden)]
    pub pool_arn: std::option::Option<std::string::String>,
}
impl CoipPool {
    /// <p>The ID of the address pool.</p>
    pub fn pool_id(&self) -> std::option::Option<&str> {
        self.pool_id.as_deref()
    }
    /// <p>The address ranges of the address pool.</p>
    pub fn pool_cidrs(&self) -> std::option::Option<&[std::string::String]> {
        self.pool_cidrs.as_deref()
    }
    /// <p>The ID of the local gateway route table.</p>
    pub fn local_gateway_route_table_id(&self) -> std::option::Option<&str> {
        self.local_gateway_route_table_id.as_deref()
    }
    /// <p>The tags.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
    /// <p>The ARN of the address pool.</p>
    pub fn pool_arn(&self) -> std::option::Option<&str> {
        self.pool_arn.as_deref()
    }
}
/// See [`CoipPool`](crate::model::CoipPool).
pub mod coip_pool {

    /// A builder for [`CoipPool`](crate::model::CoipPool).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) pool_id: std::option::Option<std::string::String>,
        pub(crate) pool_cidrs: std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) local_gateway_route_table_id: std::option::Option<std::string::String>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        pub(crate) pool_arn: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The ID of the address pool.</p>
        pub fn pool_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.pool_id = Some(input.into());
            self
        }
        /// <p>The ID of the address pool.</p>
        pub fn set_pool_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.pool_id = input;
            self
        }
        /// Appends an item to `pool_cidrs`.
        ///
        /// To override the contents of this collection use [`set_pool_cidrs`](Self::set_pool_cidrs).
        ///
        /// <p>The address ranges of the address pool.</p>
        pub fn pool_cidrs(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.pool_cidrs.unwrap_or_default();
            v.push(input.into());
            self.pool_cidrs = Some(v);
            self
        }
        /// <p>The address ranges of the address pool.</p>
        pub fn set_pool_cidrs(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.pool_cidrs = input;
            self
        }
        /// <p>The ID of the local gateway route table.</p>
        pub fn local_gateway_route_table_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.local_gateway_route_table_id = Some(input.into());
            self
        }
        /// <p>The ID of the local gateway route table.</p>
        pub fn set_local_gateway_route_table_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.local_gateway_route_table_id = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>The tags.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>The tags.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// <p>The ARN of the address pool.</p>
        pub fn pool_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.pool_arn = Some(input.into());
            self
        }
        /// <p>The ARN of the address pool.</p>
        pub fn set_pool_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.pool_arn = input;
            self
        }
        /// Consumes the builder and constructs a [`CoipPool`](crate::model::CoipPool).
        pub fn build(self) -> crate::model::CoipPool {
            crate::model::CoipPool {
                pool_id: self.pool_id,
                pool_cidrs: self.pool_cidrs,
                local_gateway_route_table_id: self.local_gateway_route_table_id,
                tags: self.tags,
                pool_arn: self.pool_arn,
            }
        }
    }
}
impl CoipPool {
    /// Creates a new builder-style object to manufacture [`CoipPool`](crate::model::CoipPool).
    pub fn builder() -> crate::model::coip_pool::Builder {
        crate::model::coip_pool::Builder::default()
    }
}

/// <p>Describes a target network associated with a Client VPN endpoint.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TargetNetwork {
    /// <p>The ID of the association.</p>
    #[doc(hidden)]
    pub association_id: std::option::Option<std::string::String>,
    /// <p>The ID of the VPC in which the target network (subnet) is located.</p>
    #[doc(hidden)]
    pub vpc_id: std::option::Option<std::string::String>,
    /// <p>The ID of the subnet specified as the target network.</p>
    #[doc(hidden)]
    pub target_network_id: std::option::Option<std::string::String>,
    /// <p>The ID of the Client VPN endpoint with which the target network is associated.</p>
    #[doc(hidden)]
    pub client_vpn_endpoint_id: std::option::Option<std::string::String>,
    /// <p>The current state of the target network association.</p>
    #[doc(hidden)]
    pub status: std::option::Option<crate::model::AssociationStatus>,
    /// <p>The IDs of the security groups applied to the target network association.</p>
    #[doc(hidden)]
    pub security_groups: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl TargetNetwork {
    /// <p>The ID of the association.</p>
    pub fn association_id(&self) -> std::option::Option<&str> {
        self.association_id.as_deref()
    }
    /// <p>The ID of the VPC in which the target network (subnet) is located.</p>
    pub fn vpc_id(&self) -> std::option::Option<&str> {
        self.vpc_id.as_deref()
    }
    /// <p>The ID of the subnet specified as the target network.</p>
    pub fn target_network_id(&self) -> std::option::Option<&str> {
        self.target_network_id.as_deref()
    }
    /// <p>The ID of the Client VPN endpoint with which the target network is associated.</p>
    pub fn client_vpn_endpoint_id(&self) -> std::option::Option<&str> {
        self.client_vpn_endpoint_id.as_deref()
    }
    /// <p>The current state of the target network association.</p>
    pub fn status(&self) -> std::option::Option<&crate::model::AssociationStatus> {
        self.status.as_ref()
    }
    /// <p>The IDs of the security groups applied to the target network association.</p>
    pub fn security_groups(&self) -> std::option::Option<&[std::string::String]> {
        self.security_groups.as_deref()
    }
}
/// See [`TargetNetwork`](crate::model::TargetNetwork).
pub mod target_network {

    /// A builder for [`TargetNetwork`](crate::model::TargetNetwork).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) association_id: std::option::Option<std::string::String>,
        pub(crate) vpc_id: std::option::Option<std::string::String>,
        pub(crate) target_network_id: std::option::Option<std::string::String>,
        pub(crate) client_vpn_endpoint_id: std::option::Option<std::string::String>,
        pub(crate) status: std::option::Option<crate::model::AssociationStatus>,
        pub(crate) security_groups: std::option::Option<std::vec::Vec<std::string::String>>,
    }
    impl Builder {
        /// <p>The ID of the association.</p>
        pub fn association_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.association_id = Some(input.into());
            self
        }
        /// <p>The ID of the association.</p>
        pub fn set_association_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.association_id = input;
            self
        }
        /// <p>The ID of the VPC in which the target network (subnet) is located.</p>
        pub fn vpc_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.vpc_id = Some(input.into());
            self
        }
        /// <p>The ID of the VPC in which the target network (subnet) is located.</p>
        pub fn set_vpc_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.vpc_id = input;
            self
        }
        /// <p>The ID of the subnet specified as the target network.</p>
        pub fn target_network_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.target_network_id = Some(input.into());
            self
        }
        /// <p>The ID of the subnet specified as the target network.</p>
        pub fn set_target_network_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.target_network_id = input;
            self
        }
        /// <p>The ID of the Client VPN endpoint with which the target network is associated.</p>
        pub fn client_vpn_endpoint_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.client_vpn_endpoint_id = Some(input.into());
            self
        }
        /// <p>The ID of the Client VPN endpoint with which the target network is associated.</p>
        pub fn set_client_vpn_endpoint_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.client_vpn_endpoint_id = input;
            self
        }
        /// <p>The current state of the target network association.</p>
        pub fn status(mut self, input: crate::model::AssociationStatus) -> Self {
            self.status = Some(input);
            self
        }
        /// <p>The current state of the target network association.</p>
        pub fn set_status(
            mut self,
            input: std::option::Option<crate::model::AssociationStatus>,
        ) -> Self {
            self.status = input;
            self
        }
        /// Appends an item to `security_groups`.
        ///
        /// To override the contents of this collection use [`set_security_groups`](Self::set_security_groups).
        ///
        /// <p>The IDs of the security groups applied to the target network association.</p>
        pub fn security_groups(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.security_groups.unwrap_or_default();
            v.push(input.into());
            self.security_groups = Some(v);
            self
        }
        /// <p>The IDs of the security groups applied to the target network association.</p>
        pub fn set_security_groups(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.security_groups = input;
            self
        }
        /// Consumes the builder and constructs a [`TargetNetwork`](crate::model::TargetNetwork).
        pub fn build(self) -> crate::model::TargetNetwork {
            crate::model::TargetNetwork {
                association_id: self.association_id,
                vpc_id: self.vpc_id,
                target_network_id: self.target_network_id,
                client_vpn_endpoint_id: self.client_vpn_endpoint_id,
                status: self.status,
                security_groups: self.security_groups,
            }
        }
    }
}
impl TargetNetwork {
    /// Creates a new builder-style object to manufacture [`TargetNetwork`](crate::model::TargetNetwork).
    pub fn builder() -> crate::model::target_network::Builder {
        crate::model::target_network::Builder::default()
    }
}

/// <p>Information about a Client VPN endpoint route.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ClientVpnRoute {
    /// <p>The ID of the Client VPN endpoint with which the route is associated.</p>
    #[doc(hidden)]
    pub client_vpn_endpoint_id: std::option::Option<std::string::String>,
    /// <p>The IPv4 address range, in CIDR notation, of the route destination.</p>
    #[doc(hidden)]
    pub destination_cidr: std::option::Option<std::string::String>,
    /// <p>The ID of the subnet through which traffic is routed.</p>
    #[doc(hidden)]
    pub target_subnet: std::option::Option<std::string::String>,
    /// <p>The route type.</p>
    #[doc(hidden)]
    pub r#type: std::option::Option<std::string::String>,
    /// <p>Indicates how the route was associated with the Client VPN endpoint. <code>associate</code> indicates that the route was automatically added when the target network was associated with the Client VPN endpoint. <code>add-route</code> indicates that the route was manually added using the <b>CreateClientVpnRoute</b> action.</p>
    #[doc(hidden)]
    pub origin: std::option::Option<std::string::String>,
    /// <p>The current state of the route.</p>
    #[doc(hidden)]
    pub status: std::option::Option<crate::model::ClientVpnRouteStatus>,
    /// <p>A brief description of the route.</p>
    #[doc(hidden)]
    pub description: std::option::Option<std::string::String>,
}
impl ClientVpnRoute {
    /// <p>The ID of the Client VPN endpoint with which the route is associated.</p>
    pub fn client_vpn_endpoint_id(&self) -> std::option::Option<&str> {
        self.client_vpn_endpoint_id.as_deref()
    }
    /// <p>The IPv4 address range, in CIDR notation, of the route destination.</p>
    pub fn destination_cidr(&self) -> std::option::Option<&str> {
        self.destination_cidr.as_deref()
    }
    /// <p>The ID of the subnet through which traffic is routed.</p>
    pub fn target_subnet(&self) -> std::option::Option<&str> {
        self.target_subnet.as_deref()
    }
    /// <p>The route type.</p>
    pub fn r#type(&self) -> std::option::Option<&str> {
        self.r#type.as_deref()
    }
    /// <p>Indicates how the route was associated with the Client VPN endpoint. <code>associate</code> indicates that the route was automatically added when the target network was associated with the Client VPN endpoint. <code>add-route</code> indicates that the route was manually added using the <b>CreateClientVpnRoute</b> action.</p>
    pub fn origin(&self) -> std::option::Option<&str> {
        self.origin.as_deref()
    }
    /// <p>The current state of the route.</p>
    pub fn status(&self) -> std::option::Option<&crate::model::ClientVpnRouteStatus> {
        self.status.as_ref()
    }
    /// <p>A brief description of the route.</p>
    pub fn description(&self) -> std::option::Option<&str> {
        self.description.as_deref()
    }
}
/// See [`ClientVpnRoute`](crate::model::ClientVpnRoute).
pub mod client_vpn_route {

    /// A builder for [`ClientVpnRoute`](crate::model::ClientVpnRoute).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) client_vpn_endpoint_id: std::option::Option<std::string::String>,
        pub(crate) destination_cidr: std::option::Option<std::string::String>,
        pub(crate) target_subnet: std::option::Option<std::string::String>,
        pub(crate) r#type: std::option::Option<std::string::String>,
        pub(crate) origin: std::option::Option<std::string::String>,
        pub(crate) status: std::option::Option<crate::model::ClientVpnRouteStatus>,
        pub(crate) description: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The ID of the Client VPN endpoint with which the route is associated.</p>
        pub fn client_vpn_endpoint_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.client_vpn_endpoint_id = Some(input.into());
            self
        }
        /// <p>The ID of the Client VPN endpoint with which the route is associated.</p>
        pub fn set_client_vpn_endpoint_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.client_vpn_endpoint_id = input;
            self
        }
        /// <p>The IPv4 address range, in CIDR notation, of the route destination.</p>
        pub fn destination_cidr(mut self, input: impl Into<std::string::String>) -> Self {
            self.destination_cidr = Some(input.into());
            self
        }
        /// <p>The IPv4 address range, in CIDR notation, of the route destination.</p>
        pub fn set_destination_cidr(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.destination_cidr = input;
            self
        }
        /// <p>The ID of the subnet through which traffic is routed.</p>
        pub fn target_subnet(mut self, input: impl Into<std::string::String>) -> Self {
            self.target_subnet = Some(input.into());
            self
        }
        /// <p>The ID of the subnet through which traffic is routed.</p>
        pub fn set_target_subnet(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.target_subnet = input;
            self
        }
        /// <p>The route type.</p>
        pub fn r#type(mut self, input: impl Into<std::string::String>) -> Self {
            self.r#type = Some(input.into());
            self
        }
        /// <p>The route type.</p>
        pub fn set_type(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.r#type = input;
            self
        }
        /// <p>Indicates how the route was associated with the Client VPN endpoint. <code>associate</code> indicates that the route was automatically added when the target network was associated with the Client VPN endpoint. <code>add-route</code> indicates that the route was manually added using the <b>CreateClientVpnRoute</b> action.</p>
        pub fn origin(mut self, input: impl Into<std::string::String>) -> Self {
            self.origin = Some(input.into());
            self
        }
        /// <p>Indicates how the route was associated with the Client VPN endpoint. <code>associate</code> indicates that the route was automatically added when the target network was associated with the Client VPN endpoint. <code>add-route</code> indicates that the route was manually added using the <b>CreateClientVpnRoute</b> action.</p>
        pub fn set_origin(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.origin = input;
            self
        }
        /// <p>The current state of the route.</p>
        pub fn status(mut self, input: crate::model::ClientVpnRouteStatus) -> Self {
            self.status = Some(input);
            self
        }
        /// <p>The current state of the route.</p>
        pub fn set_status(
            mut self,
            input: std::option::Option<crate::model::ClientVpnRouteStatus>,
        ) -> Self {
            self.status = input;
            self
        }
        /// <p>A brief description of the route.</p>
        pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
            self.description = Some(input.into());
            self
        }
        /// <p>A brief description of the route.</p>
        pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.description = input;
            self
        }
        /// Consumes the builder and constructs a [`ClientVpnRoute`](crate::model::ClientVpnRoute).
        pub fn build(self) -> crate::model::ClientVpnRoute {
            crate::model::ClientVpnRoute {
                client_vpn_endpoint_id: self.client_vpn_endpoint_id,
                destination_cidr: self.destination_cidr,
                target_subnet: self.target_subnet,
                r#type: self.r#type,
                origin: self.origin,
                status: self.status,
                description: self.description,
            }
        }
    }
}
impl ClientVpnRoute {
    /// Creates a new builder-style object to manufacture [`ClientVpnRoute`](crate::model::ClientVpnRoute).
    pub fn builder() -> crate::model::client_vpn_route::Builder {
        crate::model::client_vpn_route::Builder::default()
    }
}

/// <p>Describes the state of a Client VPN endpoint route.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ClientVpnRouteStatus {
    /// <p>The state of the Client VPN endpoint route.</p>
    #[doc(hidden)]
    pub code: std::option::Option<crate::model::ClientVpnRouteStatusCode>,
    /// <p>A message about the status of the Client VPN endpoint route, if applicable.</p>
    #[doc(hidden)]
    pub message: std::option::Option<std::string::String>,
}
impl ClientVpnRouteStatus {
    /// <p>The state of the Client VPN endpoint route.</p>
    pub fn code(&self) -> std::option::Option<&crate::model::ClientVpnRouteStatusCode> {
        self.code.as_ref()
    }
    /// <p>A message about the status of the Client VPN endpoint route, if applicable.</p>
    pub fn message(&self) -> std::option::Option<&str> {
        self.message.as_deref()
    }
}
/// See [`ClientVpnRouteStatus`](crate::model::ClientVpnRouteStatus).
pub mod client_vpn_route_status {

    /// A builder for [`ClientVpnRouteStatus`](crate::model::ClientVpnRouteStatus).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) code: std::option::Option<crate::model::ClientVpnRouteStatusCode>,
        pub(crate) message: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The state of the Client VPN endpoint route.</p>
        pub fn code(mut self, input: crate::model::ClientVpnRouteStatusCode) -> Self {
            self.code = Some(input);
            self
        }
        /// <p>The state of the Client VPN endpoint route.</p>
        pub fn set_code(
            mut self,
            input: std::option::Option<crate::model::ClientVpnRouteStatusCode>,
        ) -> Self {
            self.code = input;
            self
        }
        /// <p>A message about the status of the Client VPN endpoint route, if applicable.</p>
        pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
            self.message = Some(input.into());
            self
        }
        /// <p>A message about the status of the Client VPN endpoint route, if applicable.</p>
        pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.message = input;
            self
        }
        /// Consumes the builder and constructs a [`ClientVpnRouteStatus`](crate::model::ClientVpnRouteStatus).
        pub fn build(self) -> crate::model::ClientVpnRouteStatus {
            crate::model::ClientVpnRouteStatus {
                code: self.code,
                message: self.message,
            }
        }
    }
}
impl ClientVpnRouteStatus {
    /// Creates a new builder-style object to manufacture [`ClientVpnRouteStatus`](crate::model::ClientVpnRouteStatus).
    pub fn builder() -> crate::model::client_vpn_route_status::Builder {
        crate::model::client_vpn_route_status::Builder::default()
    }
}

/// When writing a match expression against `ClientVpnRouteStatusCode`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let clientvpnroutestatuscode = unimplemented!();
/// match clientvpnroutestatuscode {
///     ClientVpnRouteStatusCode::Active => { /* ... */ },
///     ClientVpnRouteStatusCode::Creating => { /* ... */ },
///     ClientVpnRouteStatusCode::Deleting => { /* ... */ },
///     ClientVpnRouteStatusCode::Failed => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `clientvpnroutestatuscode` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `ClientVpnRouteStatusCode::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `ClientVpnRouteStatusCode::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `ClientVpnRouteStatusCode::NewFeature` is defined.
/// Specifically, when `clientvpnroutestatuscode` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `ClientVpnRouteStatusCode::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 ClientVpnRouteStatusCode {
    #[allow(missing_docs)] // documentation missing in model
    Active,
    #[allow(missing_docs)] // documentation missing in model
    Creating,
    #[allow(missing_docs)] // documentation missing in model
    Deleting,
    #[allow(missing_docs)] // documentation missing in model
    Failed,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for ClientVpnRouteStatusCode {
    fn from(s: &str) -> Self {
        match s {
            "active" => ClientVpnRouteStatusCode::Active,
            "creating" => ClientVpnRouteStatusCode::Creating,
            "deleting" => ClientVpnRouteStatusCode::Deleting,
            "failed" => ClientVpnRouteStatusCode::Failed,
            other => ClientVpnRouteStatusCode::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for ClientVpnRouteStatusCode {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(ClientVpnRouteStatusCode::from(s))
    }
}
impl ClientVpnRouteStatusCode {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            ClientVpnRouteStatusCode::Active => "active",
            ClientVpnRouteStatusCode::Creating => "creating",
            ClientVpnRouteStatusCode::Deleting => "deleting",
            ClientVpnRouteStatusCode::Failed => "failed",
            ClientVpnRouteStatusCode::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["active", "creating", "deleting", "failed"]
    }
}
impl AsRef<str> for ClientVpnRouteStatusCode {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes a Client VPN endpoint.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ClientVpnEndpoint {
    /// <p>The ID of the Client VPN endpoint.</p>
    #[doc(hidden)]
    pub client_vpn_endpoint_id: std::option::Option<std::string::String>,
    /// <p>A brief description of the endpoint.</p>
    #[doc(hidden)]
    pub description: std::option::Option<std::string::String>,
    /// <p>The current state of the Client VPN endpoint.</p>
    #[doc(hidden)]
    pub status: std::option::Option<crate::model::ClientVpnEndpointStatus>,
    /// <p>The date and time the Client VPN endpoint was created.</p>
    #[doc(hidden)]
    pub creation_time: std::option::Option<std::string::String>,
    /// <p>The date and time the Client VPN endpoint was deleted, if applicable.</p>
    #[doc(hidden)]
    pub deletion_time: std::option::Option<std::string::String>,
    /// <p>The DNS name to be used by clients when connecting to the Client VPN endpoint.</p>
    #[doc(hidden)]
    pub dns_name: std::option::Option<std::string::String>,
    /// <p>The IPv4 address range, in CIDR notation, from which client IP addresses are assigned.</p>
    #[doc(hidden)]
    pub client_cidr_block: std::option::Option<std::string::String>,
    /// <p>Information about the DNS servers to be used for DNS resolution. </p>
    #[doc(hidden)]
    pub dns_servers: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>Indicates whether split-tunnel is enabled in the Client VPN endpoint.</p>
    /// <p>For information about split-tunnel VPN endpoints, see <a href="https://docs.aws.amazon.com/vpn/latest/clientvpn-admin/split-tunnel-vpn.html">Split-Tunnel Client VPN endpoint</a> in the <i>Client VPN Administrator Guide</i>.</p>
    #[doc(hidden)]
    pub split_tunnel: std::option::Option<bool>,
    /// <p>The protocol used by the VPN session.</p>
    #[doc(hidden)]
    pub vpn_protocol: std::option::Option<crate::model::VpnProtocol>,
    /// <p>The transport protocol used by the Client VPN endpoint.</p>
    #[doc(hidden)]
    pub transport_protocol: std::option::Option<crate::model::TransportProtocol>,
    /// <p>The port number for the Client VPN endpoint.</p>
    #[doc(hidden)]
    pub vpn_port: std::option::Option<i32>,
    /// <p>Information about the associated target networks. A target network is a subnet in a VPC.</p>
    #[deprecated(
        note = "This property is deprecated. To view the target networks associated with a Client VPN endpoint, call DescribeClientVpnTargetNetworks and inspect the clientVpnTargetNetworks response element."
    )]
    #[doc(hidden)]
    pub associated_target_networks:
        std::option::Option<std::vec::Vec<crate::model::AssociatedTargetNetwork>>,
    /// <p>The ARN of the server certificate.</p>
    #[doc(hidden)]
    pub server_certificate_arn: std::option::Option<std::string::String>,
    /// <p>Information about the authentication method used by the Client VPN endpoint.</p>
    #[doc(hidden)]
    pub authentication_options:
        std::option::Option<std::vec::Vec<crate::model::ClientVpnAuthentication>>,
    /// <p>Information about the client connection logging options for the Client VPN endpoint.</p>
    #[doc(hidden)]
    pub connection_log_options: std::option::Option<crate::model::ConnectionLogResponseOptions>,
    /// <p>Any tags assigned to the Client VPN endpoint.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    /// <p>The IDs of the security groups for the target network.</p>
    #[doc(hidden)]
    pub security_group_ids: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>The ID of the VPC.</p>
    #[doc(hidden)]
    pub vpc_id: std::option::Option<std::string::String>,
    /// <p>The URL of the self-service portal.</p>
    #[doc(hidden)]
    pub self_service_portal_url: std::option::Option<std::string::String>,
    /// <p>The options for managing connection authorization for new client connections.</p>
    #[doc(hidden)]
    pub client_connect_options: std::option::Option<crate::model::ClientConnectResponseOptions>,
    /// <p>The maximum VPN session duration time in hours.</p>
    /// <p>Valid values: <code>8 | 10 | 12 | 24</code> </p>
    /// <p>Default value: <code>24</code> </p>
    #[doc(hidden)]
    pub session_timeout_hours: std::option::Option<i32>,
    /// <p>Options for enabling a customizable text banner that will be displayed on Amazon Web Services provided clients when a VPN session is established.</p>
    #[doc(hidden)]
    pub client_login_banner_options:
        std::option::Option<crate::model::ClientLoginBannerResponseOptions>,
}
impl ClientVpnEndpoint {
    /// <p>The ID of the Client VPN endpoint.</p>
    pub fn client_vpn_endpoint_id(&self) -> std::option::Option<&str> {
        self.client_vpn_endpoint_id.as_deref()
    }
    /// <p>A brief description of the endpoint.</p>
    pub fn description(&self) -> std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The current state of the Client VPN endpoint.</p>
    pub fn status(&self) -> std::option::Option<&crate::model::ClientVpnEndpointStatus> {
        self.status.as_ref()
    }
    /// <p>The date and time the Client VPN endpoint was created.</p>
    pub fn creation_time(&self) -> std::option::Option<&str> {
        self.creation_time.as_deref()
    }
    /// <p>The date and time the Client VPN endpoint was deleted, if applicable.</p>
    pub fn deletion_time(&self) -> std::option::Option<&str> {
        self.deletion_time.as_deref()
    }
    /// <p>The DNS name to be used by clients when connecting to the Client VPN endpoint.</p>
    pub fn dns_name(&self) -> std::option::Option<&str> {
        self.dns_name.as_deref()
    }
    /// <p>The IPv4 address range, in CIDR notation, from which client IP addresses are assigned.</p>
    pub fn client_cidr_block(&self) -> std::option::Option<&str> {
        self.client_cidr_block.as_deref()
    }
    /// <p>Information about the DNS servers to be used for DNS resolution. </p>
    pub fn dns_servers(&self) -> std::option::Option<&[std::string::String]> {
        self.dns_servers.as_deref()
    }
    /// <p>Indicates whether split-tunnel is enabled in the Client VPN endpoint.</p>
    /// <p>For information about split-tunnel VPN endpoints, see <a href="https://docs.aws.amazon.com/vpn/latest/clientvpn-admin/split-tunnel-vpn.html">Split-Tunnel Client VPN endpoint</a> in the <i>Client VPN Administrator Guide</i>.</p>
    pub fn split_tunnel(&self) -> std::option::Option<bool> {
        self.split_tunnel
    }
    /// <p>The protocol used by the VPN session.</p>
    pub fn vpn_protocol(&self) -> std::option::Option<&crate::model::VpnProtocol> {
        self.vpn_protocol.as_ref()
    }
    /// <p>The transport protocol used by the Client VPN endpoint.</p>
    pub fn transport_protocol(&self) -> std::option::Option<&crate::model::TransportProtocol> {
        self.transport_protocol.as_ref()
    }
    /// <p>The port number for the Client VPN endpoint.</p>
    pub fn vpn_port(&self) -> std::option::Option<i32> {
        self.vpn_port
    }
    /// <p>Information about the associated target networks. A target network is a subnet in a VPC.</p>
    #[deprecated(
        note = "This property is deprecated. To view the target networks associated with a Client VPN endpoint, call DescribeClientVpnTargetNetworks and inspect the clientVpnTargetNetworks response element."
    )]
    pub fn associated_target_networks(
        &self,
    ) -> std::option::Option<&[crate::model::AssociatedTargetNetwork]> {
        self.associated_target_networks.as_deref()
    }
    /// <p>The ARN of the server certificate.</p>
    pub fn server_certificate_arn(&self) -> std::option::Option<&str> {
        self.server_certificate_arn.as_deref()
    }
    /// <p>Information about the authentication method used by the Client VPN endpoint.</p>
    pub fn authentication_options(
        &self,
    ) -> std::option::Option<&[crate::model::ClientVpnAuthentication]> {
        self.authentication_options.as_deref()
    }
    /// <p>Information about the client connection logging options for the Client VPN endpoint.</p>
    pub fn connection_log_options(
        &self,
    ) -> std::option::Option<&crate::model::ConnectionLogResponseOptions> {
        self.connection_log_options.as_ref()
    }
    /// <p>Any tags assigned to the Client VPN endpoint.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
    /// <p>The IDs of the security groups for the target network.</p>
    pub fn security_group_ids(&self) -> std::option::Option<&[std::string::String]> {
        self.security_group_ids.as_deref()
    }
    /// <p>The ID of the VPC.</p>
    pub fn vpc_id(&self) -> std::option::Option<&str> {
        self.vpc_id.as_deref()
    }
    /// <p>The URL of the self-service portal.</p>
    pub fn self_service_portal_url(&self) -> std::option::Option<&str> {
        self.self_service_portal_url.as_deref()
    }
    /// <p>The options for managing connection authorization for new client connections.</p>
    pub fn client_connect_options(
        &self,
    ) -> std::option::Option<&crate::model::ClientConnectResponseOptions> {
        self.client_connect_options.as_ref()
    }
    /// <p>The maximum VPN session duration time in hours.</p>
    /// <p>Valid values: <code>8 | 10 | 12 | 24</code> </p>
    /// <p>Default value: <code>24</code> </p>
    pub fn session_timeout_hours(&self) -> std::option::Option<i32> {
        self.session_timeout_hours
    }
    /// <p>Options for enabling a customizable text banner that will be displayed on Amazon Web Services provided clients when a VPN session is established.</p>
    pub fn client_login_banner_options(
        &self,
    ) -> std::option::Option<&crate::model::ClientLoginBannerResponseOptions> {
        self.client_login_banner_options.as_ref()
    }
}
/// See [`ClientVpnEndpoint`](crate::model::ClientVpnEndpoint).
pub mod client_vpn_endpoint {

    /// A builder for [`ClientVpnEndpoint`](crate::model::ClientVpnEndpoint).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) client_vpn_endpoint_id: std::option::Option<std::string::String>,
        pub(crate) description: std::option::Option<std::string::String>,
        pub(crate) status: std::option::Option<crate::model::ClientVpnEndpointStatus>,
        pub(crate) creation_time: std::option::Option<std::string::String>,
        pub(crate) deletion_time: std::option::Option<std::string::String>,
        pub(crate) dns_name: std::option::Option<std::string::String>,
        pub(crate) client_cidr_block: std::option::Option<std::string::String>,
        pub(crate) dns_servers: std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) split_tunnel: std::option::Option<bool>,
        pub(crate) vpn_protocol: std::option::Option<crate::model::VpnProtocol>,
        pub(crate) transport_protocol: std::option::Option<crate::model::TransportProtocol>,
        pub(crate) vpn_port: std::option::Option<i32>,
        pub(crate) associated_target_networks:
            std::option::Option<std::vec::Vec<crate::model::AssociatedTargetNetwork>>,
        pub(crate) server_certificate_arn: std::option::Option<std::string::String>,
        pub(crate) authentication_options:
            std::option::Option<std::vec::Vec<crate::model::ClientVpnAuthentication>>,
        pub(crate) connection_log_options:
            std::option::Option<crate::model::ConnectionLogResponseOptions>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        pub(crate) security_group_ids: std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) vpc_id: std::option::Option<std::string::String>,
        pub(crate) self_service_portal_url: std::option::Option<std::string::String>,
        pub(crate) client_connect_options:
            std::option::Option<crate::model::ClientConnectResponseOptions>,
        pub(crate) session_timeout_hours: std::option::Option<i32>,
        pub(crate) client_login_banner_options:
            std::option::Option<crate::model::ClientLoginBannerResponseOptions>,
    }
    impl Builder {
        /// <p>The ID of the Client VPN endpoint.</p>
        pub fn client_vpn_endpoint_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.client_vpn_endpoint_id = Some(input.into());
            self
        }
        /// <p>The ID of the Client VPN endpoint.</p>
        pub fn set_client_vpn_endpoint_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.client_vpn_endpoint_id = input;
            self
        }
        /// <p>A brief description of the endpoint.</p>
        pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
            self.description = Some(input.into());
            self
        }
        /// <p>A brief description of the endpoint.</p>
        pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.description = input;
            self
        }
        /// <p>The current state of the Client VPN endpoint.</p>
        pub fn status(mut self, input: crate::model::ClientVpnEndpointStatus) -> Self {
            self.status = Some(input);
            self
        }
        /// <p>The current state of the Client VPN endpoint.</p>
        pub fn set_status(
            mut self,
            input: std::option::Option<crate::model::ClientVpnEndpointStatus>,
        ) -> Self {
            self.status = input;
            self
        }
        /// <p>The date and time the Client VPN endpoint was created.</p>
        pub fn creation_time(mut self, input: impl Into<std::string::String>) -> Self {
            self.creation_time = Some(input.into());
            self
        }
        /// <p>The date and time the Client VPN endpoint was created.</p>
        pub fn set_creation_time(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.creation_time = input;
            self
        }
        /// <p>The date and time the Client VPN endpoint was deleted, if applicable.</p>
        pub fn deletion_time(mut self, input: impl Into<std::string::String>) -> Self {
            self.deletion_time = Some(input.into());
            self
        }
        /// <p>The date and time the Client VPN endpoint was deleted, if applicable.</p>
        pub fn set_deletion_time(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.deletion_time = input;
            self
        }
        /// <p>The DNS name to be used by clients when connecting to the Client VPN endpoint.</p>
        pub fn dns_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.dns_name = Some(input.into());
            self
        }
        /// <p>The DNS name to be used by clients when connecting to the Client VPN endpoint.</p>
        pub fn set_dns_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.dns_name = input;
            self
        }
        /// <p>The IPv4 address range, in CIDR notation, from which client IP addresses are assigned.</p>
        pub fn client_cidr_block(mut self, input: impl Into<std::string::String>) -> Self {
            self.client_cidr_block = Some(input.into());
            self
        }
        /// <p>The IPv4 address range, in CIDR notation, from which client IP addresses are assigned.</p>
        pub fn set_client_cidr_block(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.client_cidr_block = input;
            self
        }
        /// Appends an item to `dns_servers`.
        ///
        /// To override the contents of this collection use [`set_dns_servers`](Self::set_dns_servers).
        ///
        /// <p>Information about the DNS servers to be used for DNS resolution. </p>
        pub fn dns_servers(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.dns_servers.unwrap_or_default();
            v.push(input.into());
            self.dns_servers = Some(v);
            self
        }
        /// <p>Information about the DNS servers to be used for DNS resolution. </p>
        pub fn set_dns_servers(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.dns_servers = input;
            self
        }
        /// <p>Indicates whether split-tunnel is enabled in the Client VPN endpoint.</p>
        /// <p>For information about split-tunnel VPN endpoints, see <a href="https://docs.aws.amazon.com/vpn/latest/clientvpn-admin/split-tunnel-vpn.html">Split-Tunnel Client VPN endpoint</a> in the <i>Client VPN Administrator Guide</i>.</p>
        pub fn split_tunnel(mut self, input: bool) -> Self {
            self.split_tunnel = Some(input);
            self
        }
        /// <p>Indicates whether split-tunnel is enabled in the Client VPN endpoint.</p>
        /// <p>For information about split-tunnel VPN endpoints, see <a href="https://docs.aws.amazon.com/vpn/latest/clientvpn-admin/split-tunnel-vpn.html">Split-Tunnel Client VPN endpoint</a> in the <i>Client VPN Administrator Guide</i>.</p>
        pub fn set_split_tunnel(mut self, input: std::option::Option<bool>) -> Self {
            self.split_tunnel = input;
            self
        }
        /// <p>The protocol used by the VPN session.</p>
        pub fn vpn_protocol(mut self, input: crate::model::VpnProtocol) -> Self {
            self.vpn_protocol = Some(input);
            self
        }
        /// <p>The protocol used by the VPN session.</p>
        pub fn set_vpn_protocol(
            mut self,
            input: std::option::Option<crate::model::VpnProtocol>,
        ) -> Self {
            self.vpn_protocol = input;
            self
        }
        /// <p>The transport protocol used by the Client VPN endpoint.</p>
        pub fn transport_protocol(mut self, input: crate::model::TransportProtocol) -> Self {
            self.transport_protocol = Some(input);
            self
        }
        /// <p>The transport protocol used by the Client VPN endpoint.</p>
        pub fn set_transport_protocol(
            mut self,
            input: std::option::Option<crate::model::TransportProtocol>,
        ) -> Self {
            self.transport_protocol = input;
            self
        }
        /// <p>The port number for the Client VPN endpoint.</p>
        pub fn vpn_port(mut self, input: i32) -> Self {
            self.vpn_port = Some(input);
            self
        }
        /// <p>The port number for the Client VPN endpoint.</p>
        pub fn set_vpn_port(mut self, input: std::option::Option<i32>) -> Self {
            self.vpn_port = input;
            self
        }
        /// Appends an item to `associated_target_networks`.
        ///
        /// To override the contents of this collection use [`set_associated_target_networks`](Self::set_associated_target_networks).
        ///
        /// <p>Information about the associated target networks. A target network is a subnet in a VPC.</p>
        #[deprecated(
            note = "This property is deprecated. To view the target networks associated with a Client VPN endpoint, call DescribeClientVpnTargetNetworks and inspect the clientVpnTargetNetworks response element."
        )]
        pub fn associated_target_networks(
            mut self,
            input: crate::model::AssociatedTargetNetwork,
        ) -> Self {
            let mut v = self.associated_target_networks.unwrap_or_default();
            v.push(input);
            self.associated_target_networks = Some(v);
            self
        }
        /// <p>Information about the associated target networks. A target network is a subnet in a VPC.</p>
        #[deprecated(
            note = "This property is deprecated. To view the target networks associated with a Client VPN endpoint, call DescribeClientVpnTargetNetworks and inspect the clientVpnTargetNetworks response element."
        )]
        pub fn set_associated_target_networks(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::AssociatedTargetNetwork>>,
        ) -> Self {
            self.associated_target_networks = input;
            self
        }
        /// <p>The ARN of the server certificate.</p>
        pub fn server_certificate_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.server_certificate_arn = Some(input.into());
            self
        }
        /// <p>The ARN of the server certificate.</p>
        pub fn set_server_certificate_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.server_certificate_arn = input;
            self
        }
        /// Appends an item to `authentication_options`.
        ///
        /// To override the contents of this collection use [`set_authentication_options`](Self::set_authentication_options).
        ///
        /// <p>Information about the authentication method used by the Client VPN endpoint.</p>
        pub fn authentication_options(
            mut self,
            input: crate::model::ClientVpnAuthentication,
        ) -> Self {
            let mut v = self.authentication_options.unwrap_or_default();
            v.push(input);
            self.authentication_options = Some(v);
            self
        }
        /// <p>Information about the authentication method used by the Client VPN endpoint.</p>
        pub fn set_authentication_options(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::ClientVpnAuthentication>>,
        ) -> Self {
            self.authentication_options = input;
            self
        }
        /// <p>Information about the client connection logging options for the Client VPN endpoint.</p>
        pub fn connection_log_options(
            mut self,
            input: crate::model::ConnectionLogResponseOptions,
        ) -> Self {
            self.connection_log_options = Some(input);
            self
        }
        /// <p>Information about the client connection logging options for the Client VPN endpoint.</p>
        pub fn set_connection_log_options(
            mut self,
            input: std::option::Option<crate::model::ConnectionLogResponseOptions>,
        ) -> Self {
            self.connection_log_options = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>Any tags assigned to the Client VPN endpoint.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>Any tags assigned to the Client VPN endpoint.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// Appends an item to `security_group_ids`.
        ///
        /// To override the contents of this collection use [`set_security_group_ids`](Self::set_security_group_ids).
        ///
        /// <p>The IDs of the security groups for the target network.</p>
        pub fn security_group_ids(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.security_group_ids.unwrap_or_default();
            v.push(input.into());
            self.security_group_ids = Some(v);
            self
        }
        /// <p>The IDs of the security groups for the target network.</p>
        pub fn set_security_group_ids(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.security_group_ids = input;
            self
        }
        /// <p>The ID of the VPC.</p>
        pub fn vpc_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.vpc_id = Some(input.into());
            self
        }
        /// <p>The ID of the VPC.</p>
        pub fn set_vpc_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.vpc_id = input;
            self
        }
        /// <p>The URL of the self-service portal.</p>
        pub fn self_service_portal_url(mut self, input: impl Into<std::string::String>) -> Self {
            self.self_service_portal_url = Some(input.into());
            self
        }
        /// <p>The URL of the self-service portal.</p>
        pub fn set_self_service_portal_url(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.self_service_portal_url = input;
            self
        }
        /// <p>The options for managing connection authorization for new client connections.</p>
        pub fn client_connect_options(
            mut self,
            input: crate::model::ClientConnectResponseOptions,
        ) -> Self {
            self.client_connect_options = Some(input);
            self
        }
        /// <p>The options for managing connection authorization for new client connections.</p>
        pub fn set_client_connect_options(
            mut self,
            input: std::option::Option<crate::model::ClientConnectResponseOptions>,
        ) -> Self {
            self.client_connect_options = input;
            self
        }
        /// <p>The maximum VPN session duration time in hours.</p>
        /// <p>Valid values: <code>8 | 10 | 12 | 24</code> </p>
        /// <p>Default value: <code>24</code> </p>
        pub fn session_timeout_hours(mut self, input: i32) -> Self {
            self.session_timeout_hours = Some(input);
            self
        }
        /// <p>The maximum VPN session duration time in hours.</p>
        /// <p>Valid values: <code>8 | 10 | 12 | 24</code> </p>
        /// <p>Default value: <code>24</code> </p>
        pub fn set_session_timeout_hours(mut self, input: std::option::Option<i32>) -> Self {
            self.session_timeout_hours = input;
            self
        }
        /// <p>Options for enabling a customizable text banner that will be displayed on Amazon Web Services provided clients when a VPN session is established.</p>
        pub fn client_login_banner_options(
            mut self,
            input: crate::model::ClientLoginBannerResponseOptions,
        ) -> Self {
            self.client_login_banner_options = Some(input);
            self
        }
        /// <p>Options for enabling a customizable text banner that will be displayed on Amazon Web Services provided clients when a VPN session is established.</p>
        pub fn set_client_login_banner_options(
            mut self,
            input: std::option::Option<crate::model::ClientLoginBannerResponseOptions>,
        ) -> Self {
            self.client_login_banner_options = input;
            self
        }
        /// Consumes the builder and constructs a [`ClientVpnEndpoint`](crate::model::ClientVpnEndpoint).
        pub fn build(self) -> crate::model::ClientVpnEndpoint {
            crate::model::ClientVpnEndpoint {
                client_vpn_endpoint_id: self.client_vpn_endpoint_id,
                description: self.description,
                status: self.status,
                creation_time: self.creation_time,
                deletion_time: self.deletion_time,
                dns_name: self.dns_name,
                client_cidr_block: self.client_cidr_block,
                dns_servers: self.dns_servers,
                split_tunnel: self.split_tunnel,
                vpn_protocol: self.vpn_protocol,
                transport_protocol: self.transport_protocol,
                vpn_port: self.vpn_port,
                associated_target_networks: self.associated_target_networks,
                server_certificate_arn: self.server_certificate_arn,
                authentication_options: self.authentication_options,
                connection_log_options: self.connection_log_options,
                tags: self.tags,
                security_group_ids: self.security_group_ids,
                vpc_id: self.vpc_id,
                self_service_portal_url: self.self_service_portal_url,
                client_connect_options: self.client_connect_options,
                session_timeout_hours: self.session_timeout_hours,
                client_login_banner_options: self.client_login_banner_options,
            }
        }
    }
}
impl ClientVpnEndpoint {
    /// Creates a new builder-style object to manufacture [`ClientVpnEndpoint`](crate::model::ClientVpnEndpoint).
    pub fn builder() -> crate::model::client_vpn_endpoint::Builder {
        crate::model::client_vpn_endpoint::Builder::default()
    }
}

/// <p>Current state of options for customizable text banner that will be displayed on Amazon Web Services provided clients when a VPN session is established.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ClientLoginBannerResponseOptions {
    /// <p>Current state of text banner feature.</p>
    /// <p>Valid values: <code>true | false</code> </p>
    #[doc(hidden)]
    pub enabled: std::option::Option<bool>,
    /// <p>Customizable text that will be displayed in a banner on Amazon Web Services provided clients when a VPN session is established. UTF-8 encoded characters only. Maximum of 1400 characters.</p>
    #[doc(hidden)]
    pub banner_text: std::option::Option<std::string::String>,
}
impl ClientLoginBannerResponseOptions {
    /// <p>Current state of text banner feature.</p>
    /// <p>Valid values: <code>true | false</code> </p>
    pub fn enabled(&self) -> std::option::Option<bool> {
        self.enabled
    }
    /// <p>Customizable text that will be displayed in a banner on Amazon Web Services provided clients when a VPN session is established. UTF-8 encoded characters only. Maximum of 1400 characters.</p>
    pub fn banner_text(&self) -> std::option::Option<&str> {
        self.banner_text.as_deref()
    }
}
/// See [`ClientLoginBannerResponseOptions`](crate::model::ClientLoginBannerResponseOptions).
pub mod client_login_banner_response_options {

    /// A builder for [`ClientLoginBannerResponseOptions`](crate::model::ClientLoginBannerResponseOptions).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) enabled: std::option::Option<bool>,
        pub(crate) banner_text: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>Current state of text banner feature.</p>
        /// <p>Valid values: <code>true | false</code> </p>
        pub fn enabled(mut self, input: bool) -> Self {
            self.enabled = Some(input);
            self
        }
        /// <p>Current state of text banner feature.</p>
        /// <p>Valid values: <code>true | false</code> </p>
        pub fn set_enabled(mut self, input: std::option::Option<bool>) -> Self {
            self.enabled = input;
            self
        }
        /// <p>Customizable text that will be displayed in a banner on Amazon Web Services provided clients when a VPN session is established. UTF-8 encoded characters only. Maximum of 1400 characters.</p>
        pub fn banner_text(mut self, input: impl Into<std::string::String>) -> Self {
            self.banner_text = Some(input.into());
            self
        }
        /// <p>Customizable text that will be displayed in a banner on Amazon Web Services provided clients when a VPN session is established. UTF-8 encoded characters only. Maximum of 1400 characters.</p>
        pub fn set_banner_text(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.banner_text = input;
            self
        }
        /// Consumes the builder and constructs a [`ClientLoginBannerResponseOptions`](crate::model::ClientLoginBannerResponseOptions).
        pub fn build(self) -> crate::model::ClientLoginBannerResponseOptions {
            crate::model::ClientLoginBannerResponseOptions {
                enabled: self.enabled,
                banner_text: self.banner_text,
            }
        }
    }
}
impl ClientLoginBannerResponseOptions {
    /// Creates a new builder-style object to manufacture [`ClientLoginBannerResponseOptions`](crate::model::ClientLoginBannerResponseOptions).
    pub fn builder() -> crate::model::client_login_banner_response_options::Builder {
        crate::model::client_login_banner_response_options::Builder::default()
    }
}

/// <p>The options for managing connection authorization for new client connections.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ClientConnectResponseOptions {
    /// <p>Indicates whether client connect options are enabled.</p>
    #[doc(hidden)]
    pub enabled: std::option::Option<bool>,
    /// <p>The Amazon Resource Name (ARN) of the Lambda function used for connection authorization.</p>
    #[doc(hidden)]
    pub lambda_function_arn: std::option::Option<std::string::String>,
    /// <p>The status of any updates to the client connect options.</p>
    #[doc(hidden)]
    pub status: std::option::Option<crate::model::ClientVpnEndpointAttributeStatus>,
}
impl ClientConnectResponseOptions {
    /// <p>Indicates whether client connect options are enabled.</p>
    pub fn enabled(&self) -> std::option::Option<bool> {
        self.enabled
    }
    /// <p>The Amazon Resource Name (ARN) of the Lambda function used for connection authorization.</p>
    pub fn lambda_function_arn(&self) -> std::option::Option<&str> {
        self.lambda_function_arn.as_deref()
    }
    /// <p>The status of any updates to the client connect options.</p>
    pub fn status(&self) -> std::option::Option<&crate::model::ClientVpnEndpointAttributeStatus> {
        self.status.as_ref()
    }
}
/// See [`ClientConnectResponseOptions`](crate::model::ClientConnectResponseOptions).
pub mod client_connect_response_options {

    /// A builder for [`ClientConnectResponseOptions`](crate::model::ClientConnectResponseOptions).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) enabled: std::option::Option<bool>,
        pub(crate) lambda_function_arn: std::option::Option<std::string::String>,
        pub(crate) status: std::option::Option<crate::model::ClientVpnEndpointAttributeStatus>,
    }
    impl Builder {
        /// <p>Indicates whether client connect options are enabled.</p>
        pub fn enabled(mut self, input: bool) -> Self {
            self.enabled = Some(input);
            self
        }
        /// <p>Indicates whether client connect options are enabled.</p>
        pub fn set_enabled(mut self, input: std::option::Option<bool>) -> Self {
            self.enabled = input;
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the Lambda function used for connection authorization.</p>
        pub fn lambda_function_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.lambda_function_arn = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the Lambda function used for connection authorization.</p>
        pub fn set_lambda_function_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.lambda_function_arn = input;
            self
        }
        /// <p>The status of any updates to the client connect options.</p>
        pub fn status(mut self, input: crate::model::ClientVpnEndpointAttributeStatus) -> Self {
            self.status = Some(input);
            self
        }
        /// <p>The status of any updates to the client connect options.</p>
        pub fn set_status(
            mut self,
            input: std::option::Option<crate::model::ClientVpnEndpointAttributeStatus>,
        ) -> Self {
            self.status = input;
            self
        }
        /// Consumes the builder and constructs a [`ClientConnectResponseOptions`](crate::model::ClientConnectResponseOptions).
        pub fn build(self) -> crate::model::ClientConnectResponseOptions {
            crate::model::ClientConnectResponseOptions {
                enabled: self.enabled,
                lambda_function_arn: self.lambda_function_arn,
                status: self.status,
            }
        }
    }
}
impl ClientConnectResponseOptions {
    /// Creates a new builder-style object to manufacture [`ClientConnectResponseOptions`](crate::model::ClientConnectResponseOptions).
    pub fn builder() -> crate::model::client_connect_response_options::Builder {
        crate::model::client_connect_response_options::Builder::default()
    }
}

/// <p>Describes the status of the Client VPN endpoint attribute.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ClientVpnEndpointAttributeStatus {
    /// <p>The status code.</p>
    #[doc(hidden)]
    pub code: std::option::Option<crate::model::ClientVpnEndpointAttributeStatusCode>,
    /// <p>The status message.</p>
    #[doc(hidden)]
    pub message: std::option::Option<std::string::String>,
}
impl ClientVpnEndpointAttributeStatus {
    /// <p>The status code.</p>
    pub fn code(&self) -> std::option::Option<&crate::model::ClientVpnEndpointAttributeStatusCode> {
        self.code.as_ref()
    }
    /// <p>The status message.</p>
    pub fn message(&self) -> std::option::Option<&str> {
        self.message.as_deref()
    }
}
/// See [`ClientVpnEndpointAttributeStatus`](crate::model::ClientVpnEndpointAttributeStatus).
pub mod client_vpn_endpoint_attribute_status {

    /// A builder for [`ClientVpnEndpointAttributeStatus`](crate::model::ClientVpnEndpointAttributeStatus).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) code: std::option::Option<crate::model::ClientVpnEndpointAttributeStatusCode>,
        pub(crate) message: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The status code.</p>
        pub fn code(mut self, input: crate::model::ClientVpnEndpointAttributeStatusCode) -> Self {
            self.code = Some(input);
            self
        }
        /// <p>The status code.</p>
        pub fn set_code(
            mut self,
            input: std::option::Option<crate::model::ClientVpnEndpointAttributeStatusCode>,
        ) -> Self {
            self.code = input;
            self
        }
        /// <p>The status message.</p>
        pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
            self.message = Some(input.into());
            self
        }
        /// <p>The status message.</p>
        pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.message = input;
            self
        }
        /// Consumes the builder and constructs a [`ClientVpnEndpointAttributeStatus`](crate::model::ClientVpnEndpointAttributeStatus).
        pub fn build(self) -> crate::model::ClientVpnEndpointAttributeStatus {
            crate::model::ClientVpnEndpointAttributeStatus {
                code: self.code,
                message: self.message,
            }
        }
    }
}
impl ClientVpnEndpointAttributeStatus {
    /// Creates a new builder-style object to manufacture [`ClientVpnEndpointAttributeStatus`](crate::model::ClientVpnEndpointAttributeStatus).
    pub fn builder() -> crate::model::client_vpn_endpoint_attribute_status::Builder {
        crate::model::client_vpn_endpoint_attribute_status::Builder::default()
    }
}

/// When writing a match expression against `ClientVpnEndpointAttributeStatusCode`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let clientvpnendpointattributestatuscode = unimplemented!();
/// match clientvpnendpointattributestatuscode {
///     ClientVpnEndpointAttributeStatusCode::Applied => { /* ... */ },
///     ClientVpnEndpointAttributeStatusCode::Applying => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `clientvpnendpointattributestatuscode` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `ClientVpnEndpointAttributeStatusCode::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `ClientVpnEndpointAttributeStatusCode::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `ClientVpnEndpointAttributeStatusCode::NewFeature` is defined.
/// Specifically, when `clientvpnendpointattributestatuscode` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `ClientVpnEndpointAttributeStatusCode::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 ClientVpnEndpointAttributeStatusCode {
    #[allow(missing_docs)] // documentation missing in model
    Applied,
    #[allow(missing_docs)] // documentation missing in model
    Applying,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for ClientVpnEndpointAttributeStatusCode {
    fn from(s: &str) -> Self {
        match s {
            "applied" => ClientVpnEndpointAttributeStatusCode::Applied,
            "applying" => ClientVpnEndpointAttributeStatusCode::Applying,
            other => ClientVpnEndpointAttributeStatusCode::Unknown(
                crate::types::UnknownVariantValue(other.to_owned()),
            ),
        }
    }
}
impl std::str::FromStr for ClientVpnEndpointAttributeStatusCode {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(ClientVpnEndpointAttributeStatusCode::from(s))
    }
}
impl ClientVpnEndpointAttributeStatusCode {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            ClientVpnEndpointAttributeStatusCode::Applied => "applied",
            ClientVpnEndpointAttributeStatusCode::Applying => "applying",
            ClientVpnEndpointAttributeStatusCode::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["applied", "applying"]
    }
}
impl AsRef<str> for ClientVpnEndpointAttributeStatusCode {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Information about the client connection logging options for a Client VPN endpoint.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ConnectionLogResponseOptions {
    /// <p>Indicates whether client connection logging is enabled for the Client VPN endpoint.</p>
    #[doc(hidden)]
    pub enabled: std::option::Option<bool>,
    /// <p>The name of the Amazon CloudWatch Logs log group to which connection logging data is published.</p>
    #[doc(hidden)]
    pub cloudwatch_log_group: std::option::Option<std::string::String>,
    /// <p>The name of the Amazon CloudWatch Logs log stream to which connection logging data is published.</p>
    #[doc(hidden)]
    pub cloudwatch_log_stream: std::option::Option<std::string::String>,
}
impl ConnectionLogResponseOptions {
    /// <p>Indicates whether client connection logging is enabled for the Client VPN endpoint.</p>
    pub fn enabled(&self) -> std::option::Option<bool> {
        self.enabled
    }
    /// <p>The name of the Amazon CloudWatch Logs log group to which connection logging data is published.</p>
    pub fn cloudwatch_log_group(&self) -> std::option::Option<&str> {
        self.cloudwatch_log_group.as_deref()
    }
    /// <p>The name of the Amazon CloudWatch Logs log stream to which connection logging data is published.</p>
    pub fn cloudwatch_log_stream(&self) -> std::option::Option<&str> {
        self.cloudwatch_log_stream.as_deref()
    }
}
/// See [`ConnectionLogResponseOptions`](crate::model::ConnectionLogResponseOptions).
pub mod connection_log_response_options {

    /// A builder for [`ConnectionLogResponseOptions`](crate::model::ConnectionLogResponseOptions).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) enabled: std::option::Option<bool>,
        pub(crate) cloudwatch_log_group: std::option::Option<std::string::String>,
        pub(crate) cloudwatch_log_stream: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>Indicates whether client connection logging is enabled for the Client VPN endpoint.</p>
        pub fn enabled(mut self, input: bool) -> Self {
            self.enabled = Some(input);
            self
        }
        /// <p>Indicates whether client connection logging is enabled for the Client VPN endpoint.</p>
        pub fn set_enabled(mut self, input: std::option::Option<bool>) -> Self {
            self.enabled = input;
            self
        }
        /// <p>The name of the Amazon CloudWatch Logs log group to which connection logging data is published.</p>
        pub fn cloudwatch_log_group(mut self, input: impl Into<std::string::String>) -> Self {
            self.cloudwatch_log_group = Some(input.into());
            self
        }
        /// <p>The name of the Amazon CloudWatch Logs log group to which connection logging data is published.</p>
        pub fn set_cloudwatch_log_group(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.cloudwatch_log_group = input;
            self
        }
        /// <p>The name of the Amazon CloudWatch Logs log stream to which connection logging data is published.</p>
        pub fn cloudwatch_log_stream(mut self, input: impl Into<std::string::String>) -> Self {
            self.cloudwatch_log_stream = Some(input.into());
            self
        }
        /// <p>The name of the Amazon CloudWatch Logs log stream to which connection logging data is published.</p>
        pub fn set_cloudwatch_log_stream(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.cloudwatch_log_stream = input;
            self
        }
        /// Consumes the builder and constructs a [`ConnectionLogResponseOptions`](crate::model::ConnectionLogResponseOptions).
        pub fn build(self) -> crate::model::ConnectionLogResponseOptions {
            crate::model::ConnectionLogResponseOptions {
                enabled: self.enabled,
                cloudwatch_log_group: self.cloudwatch_log_group,
                cloudwatch_log_stream: self.cloudwatch_log_stream,
            }
        }
    }
}
impl ConnectionLogResponseOptions {
    /// Creates a new builder-style object to manufacture [`ConnectionLogResponseOptions`](crate::model::ConnectionLogResponseOptions).
    pub fn builder() -> crate::model::connection_log_response_options::Builder {
        crate::model::connection_log_response_options::Builder::default()
    }
}

/// <p>Describes the authentication methods used by a Client VPN endpoint. For more information, see <a href="https://docs.aws.amazon.com/vpn/latest/clientvpn-admin/client-authentication.html">Authentication</a> in the <i>Client VPN Administrator Guide</i>.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ClientVpnAuthentication {
    /// <p>The authentication type used.</p>
    #[doc(hidden)]
    pub r#type: std::option::Option<crate::model::ClientVpnAuthenticationType>,
    /// <p>Information about the Active Directory, if applicable.</p>
    #[doc(hidden)]
    pub active_directory: std::option::Option<crate::model::DirectoryServiceAuthentication>,
    /// <p>Information about the authentication certificates, if applicable.</p>
    #[doc(hidden)]
    pub mutual_authentication: std::option::Option<crate::model::CertificateAuthentication>,
    /// <p>Information about the IAM SAML identity provider, if applicable.</p>
    #[doc(hidden)]
    pub federated_authentication: std::option::Option<crate::model::FederatedAuthentication>,
}
impl ClientVpnAuthentication {
    /// <p>The authentication type used.</p>
    pub fn r#type(&self) -> std::option::Option<&crate::model::ClientVpnAuthenticationType> {
        self.r#type.as_ref()
    }
    /// <p>Information about the Active Directory, if applicable.</p>
    pub fn active_directory(
        &self,
    ) -> std::option::Option<&crate::model::DirectoryServiceAuthentication> {
        self.active_directory.as_ref()
    }
    /// <p>Information about the authentication certificates, if applicable.</p>
    pub fn mutual_authentication(
        &self,
    ) -> std::option::Option<&crate::model::CertificateAuthentication> {
        self.mutual_authentication.as_ref()
    }
    /// <p>Information about the IAM SAML identity provider, if applicable.</p>
    pub fn federated_authentication(
        &self,
    ) -> std::option::Option<&crate::model::FederatedAuthentication> {
        self.federated_authentication.as_ref()
    }
}
/// See [`ClientVpnAuthentication`](crate::model::ClientVpnAuthentication).
pub mod client_vpn_authentication {

    /// A builder for [`ClientVpnAuthentication`](crate::model::ClientVpnAuthentication).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) r#type: std::option::Option<crate::model::ClientVpnAuthenticationType>,
        pub(crate) active_directory:
            std::option::Option<crate::model::DirectoryServiceAuthentication>,
        pub(crate) mutual_authentication:
            std::option::Option<crate::model::CertificateAuthentication>,
        pub(crate) federated_authentication:
            std::option::Option<crate::model::FederatedAuthentication>,
    }
    impl Builder {
        /// <p>The authentication type used.</p>
        pub fn r#type(mut self, input: crate::model::ClientVpnAuthenticationType) -> Self {
            self.r#type = Some(input);
            self
        }
        /// <p>The authentication type used.</p>
        pub fn set_type(
            mut self,
            input: std::option::Option<crate::model::ClientVpnAuthenticationType>,
        ) -> Self {
            self.r#type = input;
            self
        }
        /// <p>Information about the Active Directory, if applicable.</p>
        pub fn active_directory(
            mut self,
            input: crate::model::DirectoryServiceAuthentication,
        ) -> Self {
            self.active_directory = Some(input);
            self
        }
        /// <p>Information about the Active Directory, if applicable.</p>
        pub fn set_active_directory(
            mut self,
            input: std::option::Option<crate::model::DirectoryServiceAuthentication>,
        ) -> Self {
            self.active_directory = input;
            self
        }
        /// <p>Information about the authentication certificates, if applicable.</p>
        pub fn mutual_authentication(
            mut self,
            input: crate::model::CertificateAuthentication,
        ) -> Self {
            self.mutual_authentication = Some(input);
            self
        }
        /// <p>Information about the authentication certificates, if applicable.</p>
        pub fn set_mutual_authentication(
            mut self,
            input: std::option::Option<crate::model::CertificateAuthentication>,
        ) -> Self {
            self.mutual_authentication = input;
            self
        }
        /// <p>Information about the IAM SAML identity provider, if applicable.</p>
        pub fn federated_authentication(
            mut self,
            input: crate::model::FederatedAuthentication,
        ) -> Self {
            self.federated_authentication = Some(input);
            self
        }
        /// <p>Information about the IAM SAML identity provider, if applicable.</p>
        pub fn set_federated_authentication(
            mut self,
            input: std::option::Option<crate::model::FederatedAuthentication>,
        ) -> Self {
            self.federated_authentication = input;
            self
        }
        /// Consumes the builder and constructs a [`ClientVpnAuthentication`](crate::model::ClientVpnAuthentication).
        pub fn build(self) -> crate::model::ClientVpnAuthentication {
            crate::model::ClientVpnAuthentication {
                r#type: self.r#type,
                active_directory: self.active_directory,
                mutual_authentication: self.mutual_authentication,
                federated_authentication: self.federated_authentication,
            }
        }
    }
}
impl ClientVpnAuthentication {
    /// Creates a new builder-style object to manufacture [`ClientVpnAuthentication`](crate::model::ClientVpnAuthentication).
    pub fn builder() -> crate::model::client_vpn_authentication::Builder {
        crate::model::client_vpn_authentication::Builder::default()
    }
}

/// <p>Describes the IAM SAML identity providers used for federated authentication.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct FederatedAuthentication {
    /// <p>The Amazon Resource Name (ARN) of the IAM SAML identity provider.</p>
    #[doc(hidden)]
    pub saml_provider_arn: std::option::Option<std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the IAM SAML identity provider for the self-service portal.</p>
    #[doc(hidden)]
    pub self_service_saml_provider_arn: std::option::Option<std::string::String>,
}
impl FederatedAuthentication {
    /// <p>The Amazon Resource Name (ARN) of the IAM SAML identity provider.</p>
    pub fn saml_provider_arn(&self) -> std::option::Option<&str> {
        self.saml_provider_arn.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the IAM SAML identity provider for the self-service portal.</p>
    pub fn self_service_saml_provider_arn(&self) -> std::option::Option<&str> {
        self.self_service_saml_provider_arn.as_deref()
    }
}
/// See [`FederatedAuthentication`](crate::model::FederatedAuthentication).
pub mod federated_authentication {

    /// A builder for [`FederatedAuthentication`](crate::model::FederatedAuthentication).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) saml_provider_arn: std::option::Option<std::string::String>,
        pub(crate) self_service_saml_provider_arn: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The Amazon Resource Name (ARN) of the IAM SAML identity provider.</p>
        pub fn saml_provider_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.saml_provider_arn = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the IAM SAML identity provider.</p>
        pub fn set_saml_provider_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.saml_provider_arn = input;
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the IAM SAML identity provider for the self-service portal.</p>
        pub fn self_service_saml_provider_arn(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.self_service_saml_provider_arn = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the IAM SAML identity provider for the self-service portal.</p>
        pub fn set_self_service_saml_provider_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.self_service_saml_provider_arn = input;
            self
        }
        /// Consumes the builder and constructs a [`FederatedAuthentication`](crate::model::FederatedAuthentication).
        pub fn build(self) -> crate::model::FederatedAuthentication {
            crate::model::FederatedAuthentication {
                saml_provider_arn: self.saml_provider_arn,
                self_service_saml_provider_arn: self.self_service_saml_provider_arn,
            }
        }
    }
}
impl FederatedAuthentication {
    /// Creates a new builder-style object to manufacture [`FederatedAuthentication`](crate::model::FederatedAuthentication).
    pub fn builder() -> crate::model::federated_authentication::Builder {
        crate::model::federated_authentication::Builder::default()
    }
}

/// <p>Information about the client certificate used for authentication.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CertificateAuthentication {
    /// <p>The ARN of the client certificate. </p>
    #[doc(hidden)]
    pub client_root_certificate_chain: std::option::Option<std::string::String>,
}
impl CertificateAuthentication {
    /// <p>The ARN of the client certificate. </p>
    pub fn client_root_certificate_chain(&self) -> std::option::Option<&str> {
        self.client_root_certificate_chain.as_deref()
    }
}
/// See [`CertificateAuthentication`](crate::model::CertificateAuthentication).
pub mod certificate_authentication {

    /// A builder for [`CertificateAuthentication`](crate::model::CertificateAuthentication).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) client_root_certificate_chain: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The ARN of the client certificate. </p>
        pub fn client_root_certificate_chain(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.client_root_certificate_chain = Some(input.into());
            self
        }
        /// <p>The ARN of the client certificate. </p>
        pub fn set_client_root_certificate_chain(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.client_root_certificate_chain = input;
            self
        }
        /// Consumes the builder and constructs a [`CertificateAuthentication`](crate::model::CertificateAuthentication).
        pub fn build(self) -> crate::model::CertificateAuthentication {
            crate::model::CertificateAuthentication {
                client_root_certificate_chain: self.client_root_certificate_chain,
            }
        }
    }
}
impl CertificateAuthentication {
    /// Creates a new builder-style object to manufacture [`CertificateAuthentication`](crate::model::CertificateAuthentication).
    pub fn builder() -> crate::model::certificate_authentication::Builder {
        crate::model::certificate_authentication::Builder::default()
    }
}

/// <p>Describes an Active Directory.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DirectoryServiceAuthentication {
    /// <p>The ID of the Active Directory used for authentication.</p>
    #[doc(hidden)]
    pub directory_id: std::option::Option<std::string::String>,
}
impl DirectoryServiceAuthentication {
    /// <p>The ID of the Active Directory used for authentication.</p>
    pub fn directory_id(&self) -> std::option::Option<&str> {
        self.directory_id.as_deref()
    }
}
/// See [`DirectoryServiceAuthentication`](crate::model::DirectoryServiceAuthentication).
pub mod directory_service_authentication {

    /// A builder for [`DirectoryServiceAuthentication`](crate::model::DirectoryServiceAuthentication).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) directory_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The ID of the Active Directory used for authentication.</p>
        pub fn directory_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.directory_id = Some(input.into());
            self
        }
        /// <p>The ID of the Active Directory used for authentication.</p>
        pub fn set_directory_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.directory_id = input;
            self
        }
        /// Consumes the builder and constructs a [`DirectoryServiceAuthentication`](crate::model::DirectoryServiceAuthentication).
        pub fn build(self) -> crate::model::DirectoryServiceAuthentication {
            crate::model::DirectoryServiceAuthentication {
                directory_id: self.directory_id,
            }
        }
    }
}
impl DirectoryServiceAuthentication {
    /// Creates a new builder-style object to manufacture [`DirectoryServiceAuthentication`](crate::model::DirectoryServiceAuthentication).
    pub fn builder() -> crate::model::directory_service_authentication::Builder {
        crate::model::directory_service_authentication::Builder::default()
    }
}

/// When writing a match expression against `ClientVpnAuthenticationType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let clientvpnauthenticationtype = unimplemented!();
/// match clientvpnauthenticationtype {
///     ClientVpnAuthenticationType::CertificateAuthentication => { /* ... */ },
///     ClientVpnAuthenticationType::DirectoryServiceAuthentication => { /* ... */ },
///     ClientVpnAuthenticationType::FederatedAuthentication => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `clientvpnauthenticationtype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `ClientVpnAuthenticationType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `ClientVpnAuthenticationType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `ClientVpnAuthenticationType::NewFeature` is defined.
/// Specifically, when `clientvpnauthenticationtype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `ClientVpnAuthenticationType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 ClientVpnAuthenticationType {
    #[allow(missing_docs)] // documentation missing in model
    CertificateAuthentication,
    #[allow(missing_docs)] // documentation missing in model
    DirectoryServiceAuthentication,
    #[allow(missing_docs)] // documentation missing in model
    FederatedAuthentication,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for ClientVpnAuthenticationType {
    fn from(s: &str) -> Self {
        match s {
            "certificate-authentication" => ClientVpnAuthenticationType::CertificateAuthentication,
            "directory-service-authentication" => {
                ClientVpnAuthenticationType::DirectoryServiceAuthentication
            }
            "federated-authentication" => ClientVpnAuthenticationType::FederatedAuthentication,
            other => ClientVpnAuthenticationType::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for ClientVpnAuthenticationType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(ClientVpnAuthenticationType::from(s))
    }
}
impl ClientVpnAuthenticationType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            ClientVpnAuthenticationType::CertificateAuthentication => "certificate-authentication",
            ClientVpnAuthenticationType::DirectoryServiceAuthentication => {
                "directory-service-authentication"
            }
            ClientVpnAuthenticationType::FederatedAuthentication => "federated-authentication",
            ClientVpnAuthenticationType::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &[
            "certificate-authentication",
            "directory-service-authentication",
            "federated-authentication",
        ]
    }
}
impl AsRef<str> for ClientVpnAuthenticationType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes a target network that is associated with a Client VPN endpoint. A target network is a subnet in a VPC.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AssociatedTargetNetwork {
    /// <p>The ID of the subnet.</p>
    #[doc(hidden)]
    pub network_id: std::option::Option<std::string::String>,
    /// <p>The target network type.</p>
    #[doc(hidden)]
    pub network_type: std::option::Option<crate::model::AssociatedNetworkType>,
}
impl AssociatedTargetNetwork {
    /// <p>The ID of the subnet.</p>
    pub fn network_id(&self) -> std::option::Option<&str> {
        self.network_id.as_deref()
    }
    /// <p>The target network type.</p>
    pub fn network_type(&self) -> std::option::Option<&crate::model::AssociatedNetworkType> {
        self.network_type.as_ref()
    }
}
/// See [`AssociatedTargetNetwork`](crate::model::AssociatedTargetNetwork).
pub mod associated_target_network {

    /// A builder for [`AssociatedTargetNetwork`](crate::model::AssociatedTargetNetwork).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) network_id: std::option::Option<std::string::String>,
        pub(crate) network_type: std::option::Option<crate::model::AssociatedNetworkType>,
    }
    impl Builder {
        /// <p>The ID of the subnet.</p>
        pub fn network_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.network_id = Some(input.into());
            self
        }
        /// <p>The ID of the subnet.</p>
        pub fn set_network_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.network_id = input;
            self
        }
        /// <p>The target network type.</p>
        pub fn network_type(mut self, input: crate::model::AssociatedNetworkType) -> Self {
            self.network_type = Some(input);
            self
        }
        /// <p>The target network type.</p>
        pub fn set_network_type(
            mut self,
            input: std::option::Option<crate::model::AssociatedNetworkType>,
        ) -> Self {
            self.network_type = input;
            self
        }
        /// Consumes the builder and constructs a [`AssociatedTargetNetwork`](crate::model::AssociatedTargetNetwork).
        pub fn build(self) -> crate::model::AssociatedTargetNetwork {
            crate::model::AssociatedTargetNetwork {
                network_id: self.network_id,
                network_type: self.network_type,
            }
        }
    }
}
impl AssociatedTargetNetwork {
    /// Creates a new builder-style object to manufacture [`AssociatedTargetNetwork`](crate::model::AssociatedTargetNetwork).
    pub fn builder() -> crate::model::associated_target_network::Builder {
        crate::model::associated_target_network::Builder::default()
    }
}

/// When writing a match expression against `AssociatedNetworkType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let associatednetworktype = unimplemented!();
/// match associatednetworktype {
///     AssociatedNetworkType::Vpc => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `associatednetworktype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `AssociatedNetworkType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `AssociatedNetworkType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `AssociatedNetworkType::NewFeature` is defined.
/// Specifically, when `associatednetworktype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `AssociatedNetworkType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 AssociatedNetworkType {
    #[allow(missing_docs)] // documentation missing in model
    Vpc,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for AssociatedNetworkType {
    fn from(s: &str) -> Self {
        match s {
            "vpc" => AssociatedNetworkType::Vpc,
            other => {
                AssociatedNetworkType::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for AssociatedNetworkType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(AssociatedNetworkType::from(s))
    }
}
impl AssociatedNetworkType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            AssociatedNetworkType::Vpc => "vpc",
            AssociatedNetworkType::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["vpc"]
    }
}
impl AsRef<str> for AssociatedNetworkType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `TransportProtocol`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let transportprotocol = unimplemented!();
/// match transportprotocol {
///     TransportProtocol::Tcp => { /* ... */ },
///     TransportProtocol::Udp => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `transportprotocol` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `TransportProtocol::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `TransportProtocol::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `TransportProtocol::NewFeature` is defined.
/// Specifically, when `transportprotocol` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `TransportProtocol::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 TransportProtocol {
    #[allow(missing_docs)] // documentation missing in model
    Tcp,
    #[allow(missing_docs)] // documentation missing in model
    Udp,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for TransportProtocol {
    fn from(s: &str) -> Self {
        match s {
            "tcp" => TransportProtocol::Tcp,
            "udp" => TransportProtocol::Udp,
            other => {
                TransportProtocol::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for TransportProtocol {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(TransportProtocol::from(s))
    }
}
impl TransportProtocol {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            TransportProtocol::Tcp => "tcp",
            TransportProtocol::Udp => "udp",
            TransportProtocol::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["tcp", "udp"]
    }
}
impl AsRef<str> for TransportProtocol {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `VpnProtocol`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let vpnprotocol = unimplemented!();
/// match vpnprotocol {
///     VpnProtocol::Openvpn => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `vpnprotocol` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `VpnProtocol::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `VpnProtocol::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `VpnProtocol::NewFeature` is defined.
/// Specifically, when `vpnprotocol` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `VpnProtocol::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 VpnProtocol {
    #[allow(missing_docs)] // documentation missing in model
    Openvpn,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for VpnProtocol {
    fn from(s: &str) -> Self {
        match s {
            "openvpn" => VpnProtocol::Openvpn,
            other => VpnProtocol::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for VpnProtocol {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(VpnProtocol::from(s))
    }
}
impl VpnProtocol {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            VpnProtocol::Openvpn => "openvpn",
            VpnProtocol::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["openvpn"]
    }
}
impl AsRef<str> for VpnProtocol {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes the state of a Client VPN endpoint.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ClientVpnEndpointStatus {
    /// <p>The state of the Client VPN endpoint. Possible states include:</p>
    /// <ul>
    /// <li> <p> <code>pending-associate</code> - The Client VPN endpoint has been created but no target networks have been associated. The Client VPN endpoint cannot accept connections.</p> </li>
    /// <li> <p> <code>available</code> - The Client VPN endpoint has been created and a target network has been associated. The Client VPN endpoint can accept connections.</p> </li>
    /// <li> <p> <code>deleting</code> - The Client VPN endpoint is being deleted. The Client VPN endpoint cannot accept connections.</p> </li>
    /// <li> <p> <code>deleted</code> - The Client VPN endpoint has been deleted. The Client VPN endpoint cannot accept connections.</p> </li>
    /// </ul>
    #[doc(hidden)]
    pub code: std::option::Option<crate::model::ClientVpnEndpointStatusCode>,
    /// <p>A message about the status of the Client VPN endpoint.</p>
    #[doc(hidden)]
    pub message: std::option::Option<std::string::String>,
}
impl ClientVpnEndpointStatus {
    /// <p>The state of the Client VPN endpoint. Possible states include:</p>
    /// <ul>
    /// <li> <p> <code>pending-associate</code> - The Client VPN endpoint has been created but no target networks have been associated. The Client VPN endpoint cannot accept connections.</p> </li>
    /// <li> <p> <code>available</code> - The Client VPN endpoint has been created and a target network has been associated. The Client VPN endpoint can accept connections.</p> </li>
    /// <li> <p> <code>deleting</code> - The Client VPN endpoint is being deleted. The Client VPN endpoint cannot accept connections.</p> </li>
    /// <li> <p> <code>deleted</code> - The Client VPN endpoint has been deleted. The Client VPN endpoint cannot accept connections.</p> </li>
    /// </ul>
    pub fn code(&self) -> std::option::Option<&crate::model::ClientVpnEndpointStatusCode> {
        self.code.as_ref()
    }
    /// <p>A message about the status of the Client VPN endpoint.</p>
    pub fn message(&self) -> std::option::Option<&str> {
        self.message.as_deref()
    }
}
/// See [`ClientVpnEndpointStatus`](crate::model::ClientVpnEndpointStatus).
pub mod client_vpn_endpoint_status {

    /// A builder for [`ClientVpnEndpointStatus`](crate::model::ClientVpnEndpointStatus).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) code: std::option::Option<crate::model::ClientVpnEndpointStatusCode>,
        pub(crate) message: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The state of the Client VPN endpoint. Possible states include:</p>
        /// <ul>
        /// <li> <p> <code>pending-associate</code> - The Client VPN endpoint has been created but no target networks have been associated. The Client VPN endpoint cannot accept connections.</p> </li>
        /// <li> <p> <code>available</code> - The Client VPN endpoint has been created and a target network has been associated. The Client VPN endpoint can accept connections.</p> </li>
        /// <li> <p> <code>deleting</code> - The Client VPN endpoint is being deleted. The Client VPN endpoint cannot accept connections.</p> </li>
        /// <li> <p> <code>deleted</code> - The Client VPN endpoint has been deleted. The Client VPN endpoint cannot accept connections.</p> </li>
        /// </ul>
        pub fn code(mut self, input: crate::model::ClientVpnEndpointStatusCode) -> Self {
            self.code = Some(input);
            self
        }
        /// <p>The state of the Client VPN endpoint. Possible states include:</p>
        /// <ul>
        /// <li> <p> <code>pending-associate</code> - The Client VPN endpoint has been created but no target networks have been associated. The Client VPN endpoint cannot accept connections.</p> </li>
        /// <li> <p> <code>available</code> - The Client VPN endpoint has been created and a target network has been associated. The Client VPN endpoint can accept connections.</p> </li>
        /// <li> <p> <code>deleting</code> - The Client VPN endpoint is being deleted. The Client VPN endpoint cannot accept connections.</p> </li>
        /// <li> <p> <code>deleted</code> - The Client VPN endpoint has been deleted. The Client VPN endpoint cannot accept connections.</p> </li>
        /// </ul>
        pub fn set_code(
            mut self,
            input: std::option::Option<crate::model::ClientVpnEndpointStatusCode>,
        ) -> Self {
            self.code = input;
            self
        }
        /// <p>A message about the status of the Client VPN endpoint.</p>
        pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
            self.message = Some(input.into());
            self
        }
        /// <p>A message about the status of the Client VPN endpoint.</p>
        pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.message = input;
            self
        }
        /// Consumes the builder and constructs a [`ClientVpnEndpointStatus`](crate::model::ClientVpnEndpointStatus).
        pub fn build(self) -> crate::model::ClientVpnEndpointStatus {
            crate::model::ClientVpnEndpointStatus {
                code: self.code,
                message: self.message,
            }
        }
    }
}
impl ClientVpnEndpointStatus {
    /// Creates a new builder-style object to manufacture [`ClientVpnEndpointStatus`](crate::model::ClientVpnEndpointStatus).
    pub fn builder() -> crate::model::client_vpn_endpoint_status::Builder {
        crate::model::client_vpn_endpoint_status::Builder::default()
    }
}

/// When writing a match expression against `ClientVpnEndpointStatusCode`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let clientvpnendpointstatuscode = unimplemented!();
/// match clientvpnendpointstatuscode {
///     ClientVpnEndpointStatusCode::Available => { /* ... */ },
///     ClientVpnEndpointStatusCode::Deleted => { /* ... */ },
///     ClientVpnEndpointStatusCode::Deleting => { /* ... */ },
///     ClientVpnEndpointStatusCode::PendingAssociate => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `clientvpnendpointstatuscode` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `ClientVpnEndpointStatusCode::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `ClientVpnEndpointStatusCode::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `ClientVpnEndpointStatusCode::NewFeature` is defined.
/// Specifically, when `clientvpnendpointstatuscode` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `ClientVpnEndpointStatusCode::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 ClientVpnEndpointStatusCode {
    #[allow(missing_docs)] // documentation missing in model
    Available,
    #[allow(missing_docs)] // documentation missing in model
    Deleted,
    #[allow(missing_docs)] // documentation missing in model
    Deleting,
    #[allow(missing_docs)] // documentation missing in model
    PendingAssociate,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for ClientVpnEndpointStatusCode {
    fn from(s: &str) -> Self {
        match s {
            "available" => ClientVpnEndpointStatusCode::Available,
            "deleted" => ClientVpnEndpointStatusCode::Deleted,
            "deleting" => ClientVpnEndpointStatusCode::Deleting,
            "pending-associate" => ClientVpnEndpointStatusCode::PendingAssociate,
            other => ClientVpnEndpointStatusCode::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for ClientVpnEndpointStatusCode {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(ClientVpnEndpointStatusCode::from(s))
    }
}
impl ClientVpnEndpointStatusCode {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            ClientVpnEndpointStatusCode::Available => "available",
            ClientVpnEndpointStatusCode::Deleted => "deleted",
            ClientVpnEndpointStatusCode::Deleting => "deleting",
            ClientVpnEndpointStatusCode::PendingAssociate => "pending-associate",
            ClientVpnEndpointStatusCode::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["available", "deleted", "deleting", "pending-associate"]
    }
}
impl AsRef<str> for ClientVpnEndpointStatusCode {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes a client connection.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ClientVpnConnection {
    /// <p>The ID of the Client VPN endpoint to which the client is connected.</p>
    #[doc(hidden)]
    pub client_vpn_endpoint_id: std::option::Option<std::string::String>,
    /// <p>The current date and time.</p>
    #[doc(hidden)]
    pub timestamp: std::option::Option<std::string::String>,
    /// <p>The ID of the client connection.</p>
    #[doc(hidden)]
    pub connection_id: std::option::Option<std::string::String>,
    /// <p>The username of the client who established the client connection. This information is only provided if Active Directory client authentication is used.</p>
    #[doc(hidden)]
    pub username: std::option::Option<std::string::String>,
    /// <p>The date and time the client connection was established.</p>
    #[doc(hidden)]
    pub connection_established_time: std::option::Option<std::string::String>,
    /// <p>The number of bytes sent by the client.</p>
    #[doc(hidden)]
    pub ingress_bytes: std::option::Option<std::string::String>,
    /// <p>The number of bytes received by the client.</p>
    #[doc(hidden)]
    pub egress_bytes: std::option::Option<std::string::String>,
    /// <p>The number of packets sent by the client.</p>
    #[doc(hidden)]
    pub ingress_packets: std::option::Option<std::string::String>,
    /// <p>The number of packets received by the client.</p>
    #[doc(hidden)]
    pub egress_packets: std::option::Option<std::string::String>,
    /// <p>The IP address of the client.</p>
    #[doc(hidden)]
    pub client_ip: std::option::Option<std::string::String>,
    /// <p>The common name associated with the client. This is either the name of the client certificate, or the Active Directory user name.</p>
    #[doc(hidden)]
    pub common_name: std::option::Option<std::string::String>,
    /// <p>The current state of the client connection.</p>
    #[doc(hidden)]
    pub status: std::option::Option<crate::model::ClientVpnConnectionStatus>,
    /// <p>The date and time the client connection was terminated.</p>
    #[doc(hidden)]
    pub connection_end_time: std::option::Option<std::string::String>,
    /// <p>The statuses returned by the client connect handler for posture compliance, if applicable.</p>
    #[doc(hidden)]
    pub posture_compliance_statuses: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl ClientVpnConnection {
    /// <p>The ID of the Client VPN endpoint to which the client is connected.</p>
    pub fn client_vpn_endpoint_id(&self) -> std::option::Option<&str> {
        self.client_vpn_endpoint_id.as_deref()
    }
    /// <p>The current date and time.</p>
    pub fn timestamp(&self) -> std::option::Option<&str> {
        self.timestamp.as_deref()
    }
    /// <p>The ID of the client connection.</p>
    pub fn connection_id(&self) -> std::option::Option<&str> {
        self.connection_id.as_deref()
    }
    /// <p>The username of the client who established the client connection. This information is only provided if Active Directory client authentication is used.</p>
    pub fn username(&self) -> std::option::Option<&str> {
        self.username.as_deref()
    }
    /// <p>The date and time the client connection was established.</p>
    pub fn connection_established_time(&self) -> std::option::Option<&str> {
        self.connection_established_time.as_deref()
    }
    /// <p>The number of bytes sent by the client.</p>
    pub fn ingress_bytes(&self) -> std::option::Option<&str> {
        self.ingress_bytes.as_deref()
    }
    /// <p>The number of bytes received by the client.</p>
    pub fn egress_bytes(&self) -> std::option::Option<&str> {
        self.egress_bytes.as_deref()
    }
    /// <p>The number of packets sent by the client.</p>
    pub fn ingress_packets(&self) -> std::option::Option<&str> {
        self.ingress_packets.as_deref()
    }
    /// <p>The number of packets received by the client.</p>
    pub fn egress_packets(&self) -> std::option::Option<&str> {
        self.egress_packets.as_deref()
    }
    /// <p>The IP address of the client.</p>
    pub fn client_ip(&self) -> std::option::Option<&str> {
        self.client_ip.as_deref()
    }
    /// <p>The common name associated with the client. This is either the name of the client certificate, or the Active Directory user name.</p>
    pub fn common_name(&self) -> std::option::Option<&str> {
        self.common_name.as_deref()
    }
    /// <p>The current state of the client connection.</p>
    pub fn status(&self) -> std::option::Option<&crate::model::ClientVpnConnectionStatus> {
        self.status.as_ref()
    }
    /// <p>The date and time the client connection was terminated.</p>
    pub fn connection_end_time(&self) -> std::option::Option<&str> {
        self.connection_end_time.as_deref()
    }
    /// <p>The statuses returned by the client connect handler for posture compliance, if applicable.</p>
    pub fn posture_compliance_statuses(&self) -> std::option::Option<&[std::string::String]> {
        self.posture_compliance_statuses.as_deref()
    }
}
/// See [`ClientVpnConnection`](crate::model::ClientVpnConnection).
pub mod client_vpn_connection {

    /// A builder for [`ClientVpnConnection`](crate::model::ClientVpnConnection).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) client_vpn_endpoint_id: std::option::Option<std::string::String>,
        pub(crate) timestamp: std::option::Option<std::string::String>,
        pub(crate) connection_id: std::option::Option<std::string::String>,
        pub(crate) username: std::option::Option<std::string::String>,
        pub(crate) connection_established_time: std::option::Option<std::string::String>,
        pub(crate) ingress_bytes: std::option::Option<std::string::String>,
        pub(crate) egress_bytes: std::option::Option<std::string::String>,
        pub(crate) ingress_packets: std::option::Option<std::string::String>,
        pub(crate) egress_packets: std::option::Option<std::string::String>,
        pub(crate) client_ip: std::option::Option<std::string::String>,
        pub(crate) common_name: std::option::Option<std::string::String>,
        pub(crate) status: std::option::Option<crate::model::ClientVpnConnectionStatus>,
        pub(crate) connection_end_time: std::option::Option<std::string::String>,
        pub(crate) posture_compliance_statuses:
            std::option::Option<std::vec::Vec<std::string::String>>,
    }
    impl Builder {
        /// <p>The ID of the Client VPN endpoint to which the client is connected.</p>
        pub fn client_vpn_endpoint_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.client_vpn_endpoint_id = Some(input.into());
            self
        }
        /// <p>The ID of the Client VPN endpoint to which the client is connected.</p>
        pub fn set_client_vpn_endpoint_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.client_vpn_endpoint_id = input;
            self
        }
        /// <p>The current date and time.</p>
        pub fn timestamp(mut self, input: impl Into<std::string::String>) -> Self {
            self.timestamp = Some(input.into());
            self
        }
        /// <p>The current date and time.</p>
        pub fn set_timestamp(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.timestamp = input;
            self
        }
        /// <p>The ID of the client connection.</p>
        pub fn connection_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.connection_id = Some(input.into());
            self
        }
        /// <p>The ID of the client connection.</p>
        pub fn set_connection_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.connection_id = input;
            self
        }
        /// <p>The username of the client who established the client connection. This information is only provided if Active Directory client authentication is used.</p>
        pub fn username(mut self, input: impl Into<std::string::String>) -> Self {
            self.username = Some(input.into());
            self
        }
        /// <p>The username of the client who established the client connection. This information is only provided if Active Directory client authentication is used.</p>
        pub fn set_username(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.username = input;
            self
        }
        /// <p>The date and time the client connection was established.</p>
        pub fn connection_established_time(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.connection_established_time = Some(input.into());
            self
        }
        /// <p>The date and time the client connection was established.</p>
        pub fn set_connection_established_time(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.connection_established_time = input;
            self
        }
        /// <p>The number of bytes sent by the client.</p>
        pub fn ingress_bytes(mut self, input: impl Into<std::string::String>) -> Self {
            self.ingress_bytes = Some(input.into());
            self
        }
        /// <p>The number of bytes sent by the client.</p>
        pub fn set_ingress_bytes(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.ingress_bytes = input;
            self
        }
        /// <p>The number of bytes received by the client.</p>
        pub fn egress_bytes(mut self, input: impl Into<std::string::String>) -> Self {
            self.egress_bytes = Some(input.into());
            self
        }
        /// <p>The number of bytes received by the client.</p>
        pub fn set_egress_bytes(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.egress_bytes = input;
            self
        }
        /// <p>The number of packets sent by the client.</p>
        pub fn ingress_packets(mut self, input: impl Into<std::string::String>) -> Self {
            self.ingress_packets = Some(input.into());
            self
        }
        /// <p>The number of packets sent by the client.</p>
        pub fn set_ingress_packets(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.ingress_packets = input;
            self
        }
        /// <p>The number of packets received by the client.</p>
        pub fn egress_packets(mut self, input: impl Into<std::string::String>) -> Self {
            self.egress_packets = Some(input.into());
            self
        }
        /// <p>The number of packets received by the client.</p>
        pub fn set_egress_packets(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.egress_packets = input;
            self
        }
        /// <p>The IP address of the client.</p>
        pub fn client_ip(mut self, input: impl Into<std::string::String>) -> Self {
            self.client_ip = Some(input.into());
            self
        }
        /// <p>The IP address of the client.</p>
        pub fn set_client_ip(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.client_ip = input;
            self
        }
        /// <p>The common name associated with the client. This is either the name of the client certificate, or the Active Directory user name.</p>
        pub fn common_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.common_name = Some(input.into());
            self
        }
        /// <p>The common name associated with the client. This is either the name of the client certificate, or the Active Directory user name.</p>
        pub fn set_common_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.common_name = input;
            self
        }
        /// <p>The current state of the client connection.</p>
        pub fn status(mut self, input: crate::model::ClientVpnConnectionStatus) -> Self {
            self.status = Some(input);
            self
        }
        /// <p>The current state of the client connection.</p>
        pub fn set_status(
            mut self,
            input: std::option::Option<crate::model::ClientVpnConnectionStatus>,
        ) -> Self {
            self.status = input;
            self
        }
        /// <p>The date and time the client connection was terminated.</p>
        pub fn connection_end_time(mut self, input: impl Into<std::string::String>) -> Self {
            self.connection_end_time = Some(input.into());
            self
        }
        /// <p>The date and time the client connection was terminated.</p>
        pub fn set_connection_end_time(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.connection_end_time = input;
            self
        }
        /// Appends an item to `posture_compliance_statuses`.
        ///
        /// To override the contents of this collection use [`set_posture_compliance_statuses`](Self::set_posture_compliance_statuses).
        ///
        /// <p>The statuses returned by the client connect handler for posture compliance, if applicable.</p>
        pub fn posture_compliance_statuses(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            let mut v = self.posture_compliance_statuses.unwrap_or_default();
            v.push(input.into());
            self.posture_compliance_statuses = Some(v);
            self
        }
        /// <p>The statuses returned by the client connect handler for posture compliance, if applicable.</p>
        pub fn set_posture_compliance_statuses(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.posture_compliance_statuses = input;
            self
        }
        /// Consumes the builder and constructs a [`ClientVpnConnection`](crate::model::ClientVpnConnection).
        pub fn build(self) -> crate::model::ClientVpnConnection {
            crate::model::ClientVpnConnection {
                client_vpn_endpoint_id: self.client_vpn_endpoint_id,
                timestamp: self.timestamp,
                connection_id: self.connection_id,
                username: self.username,
                connection_established_time: self.connection_established_time,
                ingress_bytes: self.ingress_bytes,
                egress_bytes: self.egress_bytes,
                ingress_packets: self.ingress_packets,
                egress_packets: self.egress_packets,
                client_ip: self.client_ip,
                common_name: self.common_name,
                status: self.status,
                connection_end_time: self.connection_end_time,
                posture_compliance_statuses: self.posture_compliance_statuses,
            }
        }
    }
}
impl ClientVpnConnection {
    /// Creates a new builder-style object to manufacture [`ClientVpnConnection`](crate::model::ClientVpnConnection).
    pub fn builder() -> crate::model::client_vpn_connection::Builder {
        crate::model::client_vpn_connection::Builder::default()
    }
}

/// <p>Information about an authorization rule.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AuthorizationRule {
    /// <p>The ID of the Client VPN endpoint with which the authorization rule is associated.</p>
    #[doc(hidden)]
    pub client_vpn_endpoint_id: std::option::Option<std::string::String>,
    /// <p>A brief description of the authorization rule.</p>
    #[doc(hidden)]
    pub description: std::option::Option<std::string::String>,
    /// <p>The ID of the Active Directory group to which the authorization rule grants access.</p>
    #[doc(hidden)]
    pub group_id: std::option::Option<std::string::String>,
    /// <p>Indicates whether the authorization rule grants access to all clients.</p>
    #[doc(hidden)]
    pub access_all: std::option::Option<bool>,
    /// <p>The IPv4 address range, in CIDR notation, of the network to which the authorization rule applies.</p>
    #[doc(hidden)]
    pub destination_cidr: std::option::Option<std::string::String>,
    /// <p>The current state of the authorization rule.</p>
    #[doc(hidden)]
    pub status: std::option::Option<crate::model::ClientVpnAuthorizationRuleStatus>,
}
impl AuthorizationRule {
    /// <p>The ID of the Client VPN endpoint with which the authorization rule is associated.</p>
    pub fn client_vpn_endpoint_id(&self) -> std::option::Option<&str> {
        self.client_vpn_endpoint_id.as_deref()
    }
    /// <p>A brief description of the authorization rule.</p>
    pub fn description(&self) -> std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The ID of the Active Directory group to which the authorization rule grants access.</p>
    pub fn group_id(&self) -> std::option::Option<&str> {
        self.group_id.as_deref()
    }
    /// <p>Indicates whether the authorization rule grants access to all clients.</p>
    pub fn access_all(&self) -> std::option::Option<bool> {
        self.access_all
    }
    /// <p>The IPv4 address range, in CIDR notation, of the network to which the authorization rule applies.</p>
    pub fn destination_cidr(&self) -> std::option::Option<&str> {
        self.destination_cidr.as_deref()
    }
    /// <p>The current state of the authorization rule.</p>
    pub fn status(&self) -> std::option::Option<&crate::model::ClientVpnAuthorizationRuleStatus> {
        self.status.as_ref()
    }
}
/// See [`AuthorizationRule`](crate::model::AuthorizationRule).
pub mod authorization_rule {

    /// A builder for [`AuthorizationRule`](crate::model::AuthorizationRule).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) client_vpn_endpoint_id: std::option::Option<std::string::String>,
        pub(crate) description: std::option::Option<std::string::String>,
        pub(crate) group_id: std::option::Option<std::string::String>,
        pub(crate) access_all: std::option::Option<bool>,
        pub(crate) destination_cidr: std::option::Option<std::string::String>,
        pub(crate) status: std::option::Option<crate::model::ClientVpnAuthorizationRuleStatus>,
    }
    impl Builder {
        /// <p>The ID of the Client VPN endpoint with which the authorization rule is associated.</p>
        pub fn client_vpn_endpoint_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.client_vpn_endpoint_id = Some(input.into());
            self
        }
        /// <p>The ID of the Client VPN endpoint with which the authorization rule is associated.</p>
        pub fn set_client_vpn_endpoint_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.client_vpn_endpoint_id = input;
            self
        }
        /// <p>A brief description of the authorization rule.</p>
        pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
            self.description = Some(input.into());
            self
        }
        /// <p>A brief description of the authorization rule.</p>
        pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.description = input;
            self
        }
        /// <p>The ID of the Active Directory group to which the authorization rule grants access.</p>
        pub fn group_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.group_id = Some(input.into());
            self
        }
        /// <p>The ID of the Active Directory group to which the authorization rule grants access.</p>
        pub fn set_group_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.group_id = input;
            self
        }
        /// <p>Indicates whether the authorization rule grants access to all clients.</p>
        pub fn access_all(mut self, input: bool) -> Self {
            self.access_all = Some(input);
            self
        }
        /// <p>Indicates whether the authorization rule grants access to all clients.</p>
        pub fn set_access_all(mut self, input: std::option::Option<bool>) -> Self {
            self.access_all = input;
            self
        }
        /// <p>The IPv4 address range, in CIDR notation, of the network to which the authorization rule applies.</p>
        pub fn destination_cidr(mut self, input: impl Into<std::string::String>) -> Self {
            self.destination_cidr = Some(input.into());
            self
        }
        /// <p>The IPv4 address range, in CIDR notation, of the network to which the authorization rule applies.</p>
        pub fn set_destination_cidr(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.destination_cidr = input;
            self
        }
        /// <p>The current state of the authorization rule.</p>
        pub fn status(mut self, input: crate::model::ClientVpnAuthorizationRuleStatus) -> Self {
            self.status = Some(input);
            self
        }
        /// <p>The current state of the authorization rule.</p>
        pub fn set_status(
            mut self,
            input: std::option::Option<crate::model::ClientVpnAuthorizationRuleStatus>,
        ) -> Self {
            self.status = input;
            self
        }
        /// Consumes the builder and constructs a [`AuthorizationRule`](crate::model::AuthorizationRule).
        pub fn build(self) -> crate::model::AuthorizationRule {
            crate::model::AuthorizationRule {
                client_vpn_endpoint_id: self.client_vpn_endpoint_id,
                description: self.description,
                group_id: self.group_id,
                access_all: self.access_all,
                destination_cidr: self.destination_cidr,
                status: self.status,
            }
        }
    }
}
impl AuthorizationRule {
    /// Creates a new builder-style object to manufacture [`AuthorizationRule`](crate::model::AuthorizationRule).
    pub fn builder() -> crate::model::authorization_rule::Builder {
        crate::model::authorization_rule::Builder::default()
    }
}

/// <note>
/// <p>We are retiring EC2-Classic. We recommend that you migrate from EC2-Classic to a VPC. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html">Migrate from EC2-Classic to a VPC</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
/// </note>
/// <p>Describes a linked EC2-Classic instance.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ClassicLinkInstance {
    /// <p>A list of security groups.</p>
    #[doc(hidden)]
    pub groups: std::option::Option<std::vec::Vec<crate::model::GroupIdentifier>>,
    /// <p>The ID of the instance.</p>
    #[doc(hidden)]
    pub instance_id: std::option::Option<std::string::String>,
    /// <p>Any tags assigned to the instance.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    /// <p>The ID of the VPC.</p>
    #[doc(hidden)]
    pub vpc_id: std::option::Option<std::string::String>,
}
impl ClassicLinkInstance {
    /// <p>A list of security groups.</p>
    pub fn groups(&self) -> std::option::Option<&[crate::model::GroupIdentifier]> {
        self.groups.as_deref()
    }
    /// <p>The ID of the instance.</p>
    pub fn instance_id(&self) -> std::option::Option<&str> {
        self.instance_id.as_deref()
    }
    /// <p>Any tags assigned to the instance.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
    /// <p>The ID of the VPC.</p>
    pub fn vpc_id(&self) -> std::option::Option<&str> {
        self.vpc_id.as_deref()
    }
}
/// See [`ClassicLinkInstance`](crate::model::ClassicLinkInstance).
pub mod classic_link_instance {

    /// A builder for [`ClassicLinkInstance`](crate::model::ClassicLinkInstance).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) groups: std::option::Option<std::vec::Vec<crate::model::GroupIdentifier>>,
        pub(crate) instance_id: std::option::Option<std::string::String>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        pub(crate) vpc_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// Appends an item to `groups`.
        ///
        /// To override the contents of this collection use [`set_groups`](Self::set_groups).
        ///
        /// <p>A list of security groups.</p>
        pub fn groups(mut self, input: crate::model::GroupIdentifier) -> Self {
            let mut v = self.groups.unwrap_or_default();
            v.push(input);
            self.groups = Some(v);
            self
        }
        /// <p>A list of security groups.</p>
        pub fn set_groups(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::GroupIdentifier>>,
        ) -> Self {
            self.groups = input;
            self
        }
        /// <p>The ID of the instance.</p>
        pub fn instance_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.instance_id = Some(input.into());
            self
        }
        /// <p>The ID of the instance.</p>
        pub fn set_instance_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.instance_id = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>Any tags assigned to the instance.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>Any tags assigned to the instance.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// <p>The ID of the VPC.</p>
        pub fn vpc_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.vpc_id = Some(input.into());
            self
        }
        /// <p>The ID of the VPC.</p>
        pub fn set_vpc_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.vpc_id = input;
            self
        }
        /// Consumes the builder and constructs a [`ClassicLinkInstance`](crate::model::ClassicLinkInstance).
        pub fn build(self) -> crate::model::ClassicLinkInstance {
            crate::model::ClassicLinkInstance {
                groups: self.groups,
                instance_id: self.instance_id,
                tags: self.tags,
                vpc_id: self.vpc_id,
            }
        }
    }
}
impl ClassicLinkInstance {
    /// Creates a new builder-style object to manufacture [`ClassicLinkInstance`](crate::model::ClassicLinkInstance).
    pub fn builder() -> crate::model::classic_link_instance::Builder {
        crate::model::classic_link_instance::Builder::default()
    }
}

/// <p>Describes a carrier gateway.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CarrierGateway {
    /// <p>The ID of the carrier gateway.</p>
    #[doc(hidden)]
    pub carrier_gateway_id: std::option::Option<std::string::String>,
    /// <p>The ID of the VPC associated with the carrier gateway.</p>
    #[doc(hidden)]
    pub vpc_id: std::option::Option<std::string::String>,
    /// <p>The state of the carrier gateway.</p>
    #[doc(hidden)]
    pub state: std::option::Option<crate::model::CarrierGatewayState>,
    /// <p>The Amazon Web Services account ID of the owner of the carrier gateway.</p>
    #[doc(hidden)]
    pub owner_id: std::option::Option<std::string::String>,
    /// <p>The tags assigned to the carrier gateway.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl CarrierGateway {
    /// <p>The ID of the carrier gateway.</p>
    pub fn carrier_gateway_id(&self) -> std::option::Option<&str> {
        self.carrier_gateway_id.as_deref()
    }
    /// <p>The ID of the VPC associated with the carrier gateway.</p>
    pub fn vpc_id(&self) -> std::option::Option<&str> {
        self.vpc_id.as_deref()
    }
    /// <p>The state of the carrier gateway.</p>
    pub fn state(&self) -> std::option::Option<&crate::model::CarrierGatewayState> {
        self.state.as_ref()
    }
    /// <p>The Amazon Web Services account ID of the owner of the carrier gateway.</p>
    pub fn owner_id(&self) -> std::option::Option<&str> {
        self.owner_id.as_deref()
    }
    /// <p>The tags assigned to the carrier gateway.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
}
/// See [`CarrierGateway`](crate::model::CarrierGateway).
pub mod carrier_gateway {

    /// A builder for [`CarrierGateway`](crate::model::CarrierGateway).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) carrier_gateway_id: std::option::Option<std::string::String>,
        pub(crate) vpc_id: std::option::Option<std::string::String>,
        pub(crate) state: std::option::Option<crate::model::CarrierGatewayState>,
        pub(crate) owner_id: std::option::Option<std::string::String>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    }
    impl Builder {
        /// <p>The ID of the carrier gateway.</p>
        pub fn carrier_gateway_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.carrier_gateway_id = Some(input.into());
            self
        }
        /// <p>The ID of the carrier gateway.</p>
        pub fn set_carrier_gateway_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.carrier_gateway_id = input;
            self
        }
        /// <p>The ID of the VPC associated with the carrier gateway.</p>
        pub fn vpc_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.vpc_id = Some(input.into());
            self
        }
        /// <p>The ID of the VPC associated with the carrier gateway.</p>
        pub fn set_vpc_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.vpc_id = input;
            self
        }
        /// <p>The state of the carrier gateway.</p>
        pub fn state(mut self, input: crate::model::CarrierGatewayState) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>The state of the carrier gateway.</p>
        pub fn set_state(
            mut self,
            input: std::option::Option<crate::model::CarrierGatewayState>,
        ) -> Self {
            self.state = input;
            self
        }
        /// <p>The Amazon Web Services account ID of the owner of the carrier gateway.</p>
        pub fn owner_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.owner_id = Some(input.into());
            self
        }
        /// <p>The Amazon Web Services account ID of the owner of the carrier gateway.</p>
        pub fn set_owner_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.owner_id = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>The tags assigned to the carrier gateway.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>The tags assigned to the carrier gateway.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// Consumes the builder and constructs a [`CarrierGateway`](crate::model::CarrierGateway).
        pub fn build(self) -> crate::model::CarrierGateway {
            crate::model::CarrierGateway {
                carrier_gateway_id: self.carrier_gateway_id,
                vpc_id: self.vpc_id,
                state: self.state,
                owner_id: self.owner_id,
                tags: self.tags,
            }
        }
    }
}
impl CarrierGateway {
    /// Creates a new builder-style object to manufacture [`CarrierGateway`](crate::model::CarrierGateway).
    pub fn builder() -> crate::model::carrier_gateway::Builder {
        crate::model::carrier_gateway::Builder::default()
    }
}

/// When writing a match expression against `CarrierGatewayState`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let carriergatewaystate = unimplemented!();
/// match carriergatewaystate {
///     CarrierGatewayState::Available => { /* ... */ },
///     CarrierGatewayState::Deleted => { /* ... */ },
///     CarrierGatewayState::Deleting => { /* ... */ },
///     CarrierGatewayState::Pending => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `carriergatewaystate` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `CarrierGatewayState::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `CarrierGatewayState::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `CarrierGatewayState::NewFeature` is defined.
/// Specifically, when `carriergatewaystate` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `CarrierGatewayState::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 CarrierGatewayState {
    #[allow(missing_docs)] // documentation missing in model
    Available,
    #[allow(missing_docs)] // documentation missing in model
    Deleted,
    #[allow(missing_docs)] // documentation missing in model
    Deleting,
    #[allow(missing_docs)] // documentation missing in model
    Pending,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for CarrierGatewayState {
    fn from(s: &str) -> Self {
        match s {
            "available" => CarrierGatewayState::Available,
            "deleted" => CarrierGatewayState::Deleted,
            "deleting" => CarrierGatewayState::Deleting,
            "pending" => CarrierGatewayState::Pending,
            other => {
                CarrierGatewayState::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for CarrierGatewayState {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(CarrierGatewayState::from(s))
    }
}
impl CarrierGatewayState {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            CarrierGatewayState::Available => "available",
            CarrierGatewayState::Deleted => "deleted",
            CarrierGatewayState::Deleting => "deleting",
            CarrierGatewayState::Pending => "pending",
            CarrierGatewayState::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["available", "deleted", "deleting", "pending"]
    }
}
impl AsRef<str> for CarrierGatewayState {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes a Capacity Reservation.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CapacityReservation {
    /// <p>The ID of the Capacity Reservation.</p>
    #[doc(hidden)]
    pub capacity_reservation_id: std::option::Option<std::string::String>,
    /// <p>The ID of the Amazon Web Services account that owns the Capacity Reservation.</p>
    #[doc(hidden)]
    pub owner_id: std::option::Option<std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the Capacity Reservation.</p>
    #[doc(hidden)]
    pub capacity_reservation_arn: std::option::Option<std::string::String>,
    /// <p>The Availability Zone ID of the Capacity Reservation.</p>
    #[doc(hidden)]
    pub availability_zone_id: std::option::Option<std::string::String>,
    /// <p>The type of instance for which the Capacity Reservation reserves capacity.</p>
    #[doc(hidden)]
    pub instance_type: std::option::Option<std::string::String>,
    /// <p>The type of operating system for which the Capacity Reservation reserves capacity.</p>
    #[doc(hidden)]
    pub instance_platform: std::option::Option<crate::model::CapacityReservationInstancePlatform>,
    /// <p>The Availability Zone in which the capacity is reserved.</p>
    #[doc(hidden)]
    pub availability_zone: std::option::Option<std::string::String>,
    /// <p>Indicates the tenancy of the Capacity Reservation. A Capacity Reservation can have one of the following tenancy settings:</p>
    /// <ul>
    /// <li> <p> <code>default</code> - The Capacity Reservation is created on hardware that is shared with other Amazon Web Services accounts.</p> </li>
    /// <li> <p> <code>dedicated</code> - The Capacity Reservation is created on single-tenant hardware that is dedicated to a single Amazon Web Services account.</p> </li>
    /// </ul>
    #[doc(hidden)]
    pub tenancy: std::option::Option<crate::model::CapacityReservationTenancy>,
    /// <p>The total number of instances for which the Capacity Reservation reserves capacity.</p>
    #[doc(hidden)]
    pub total_instance_count: std::option::Option<i32>,
    /// <p>The remaining capacity. Indicates the number of instances that can be launched in the Capacity Reservation.</p>
    #[doc(hidden)]
    pub available_instance_count: std::option::Option<i32>,
    /// <p>Indicates whether the Capacity Reservation supports EBS-optimized instances. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS- optimized instance.</p>
    #[doc(hidden)]
    pub ebs_optimized: std::option::Option<bool>,
    /// <p> <i>Deprecated.</i> </p>
    #[doc(hidden)]
    pub ephemeral_storage: std::option::Option<bool>,
    /// <p>The current state of the Capacity Reservation. A Capacity Reservation can be in one of the following states:</p>
    /// <ul>
    /// <li> <p> <code>active</code> - The Capacity Reservation is active and the capacity is available for your use.</p> </li>
    /// <li> <p> <code>expired</code> - The Capacity Reservation expired automatically at the date and time specified in your request. The reserved capacity is no longer available for your use.</p> </li>
    /// <li> <p> <code>cancelled</code> - The Capacity Reservation was cancelled. The reserved capacity is no longer available for your use.</p> </li>
    /// <li> <p> <code>pending</code> - The Capacity Reservation request was successful but the capacity provisioning is still pending.</p> </li>
    /// <li> <p> <code>failed</code> - The Capacity Reservation request has failed. A request might fail due to invalid request parameters, capacity constraints, or instance limit constraints. Failed requests are retained for 60 minutes.</p> </li>
    /// </ul>
    #[doc(hidden)]
    pub state: std::option::Option<crate::model::CapacityReservationState>,
    /// <p>The date and time at which the Capacity Reservation was started.</p>
    #[doc(hidden)]
    pub start_date: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The date and time at which the Capacity Reservation expires. When a Capacity Reservation expires, the reserved capacity is released and you can no longer launch instances into it. The Capacity Reservation's state changes to <code>expired</code> when it reaches its end date and time.</p>
    #[doc(hidden)]
    pub end_date: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>Indicates the way in which the Capacity Reservation ends. A Capacity Reservation can have one of the following end types:</p>
    /// <ul>
    /// <li> <p> <code>unlimited</code> - The Capacity Reservation remains active until you explicitly cancel it.</p> </li>
    /// <li> <p> <code>limited</code> - The Capacity Reservation expires automatically at a specified date and time.</p> </li>
    /// </ul>
    #[doc(hidden)]
    pub end_date_type: std::option::Option<crate::model::EndDateType>,
    /// <p>Indicates the type of instance launches that the Capacity Reservation accepts. The options include:</p>
    /// <ul>
    /// <li> <p> <code>open</code> - The Capacity Reservation accepts all instances that have matching attributes (instance type, platform, and Availability Zone). Instances that have matching attributes launch into the Capacity Reservation automatically without specifying any additional parameters.</p> </li>
    /// <li> <p> <code>targeted</code> - The Capacity Reservation only accepts instances that have matching attributes (instance type, platform, and Availability Zone), and explicitly target the Capacity Reservation. This ensures that only permitted instances can use the reserved capacity. </p> </li>
    /// </ul>
    #[doc(hidden)]
    pub instance_match_criteria: std::option::Option<crate::model::InstanceMatchCriteria>,
    /// <p>The date and time at which the Capacity Reservation was created.</p>
    #[doc(hidden)]
    pub create_date: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>Any tags assigned to the Capacity Reservation.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    /// <p>The Amazon Resource Name (ARN) of the Outpost on which the Capacity Reservation was created.</p>
    #[doc(hidden)]
    pub outpost_arn: std::option::Option<std::string::String>,
    /// <p>The ID of the Capacity Reservation Fleet to which the Capacity Reservation belongs. Only valid for Capacity Reservations that were created by a Capacity Reservation Fleet.</p>
    #[doc(hidden)]
    pub capacity_reservation_fleet_id: std::option::Option<std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the cluster placement group in which the Capacity Reservation was created. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/cr-cpg.html"> Capacity Reservations for cluster placement groups</a> in the <i>Amazon EC2 User Guide</i>.</p>
    #[doc(hidden)]
    pub placement_group_arn: std::option::Option<std::string::String>,
    /// <p>Information about instance capacity usage.</p>
    #[doc(hidden)]
    pub capacity_allocations: std::option::Option<std::vec::Vec<crate::model::CapacityAllocation>>,
}
impl CapacityReservation {
    /// <p>The ID of the Capacity Reservation.</p>
    pub fn capacity_reservation_id(&self) -> std::option::Option<&str> {
        self.capacity_reservation_id.as_deref()
    }
    /// <p>The ID of the Amazon Web Services account that owns the Capacity Reservation.</p>
    pub fn owner_id(&self) -> std::option::Option<&str> {
        self.owner_id.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the Capacity Reservation.</p>
    pub fn capacity_reservation_arn(&self) -> std::option::Option<&str> {
        self.capacity_reservation_arn.as_deref()
    }
    /// <p>The Availability Zone ID of the Capacity Reservation.</p>
    pub fn availability_zone_id(&self) -> std::option::Option<&str> {
        self.availability_zone_id.as_deref()
    }
    /// <p>The type of instance for which the Capacity Reservation reserves capacity.</p>
    pub fn instance_type(&self) -> std::option::Option<&str> {
        self.instance_type.as_deref()
    }
    /// <p>The type of operating system for which the Capacity Reservation reserves capacity.</p>
    pub fn instance_platform(
        &self,
    ) -> std::option::Option<&crate::model::CapacityReservationInstancePlatform> {
        self.instance_platform.as_ref()
    }
    /// <p>The Availability Zone in which the capacity is reserved.</p>
    pub fn availability_zone(&self) -> std::option::Option<&str> {
        self.availability_zone.as_deref()
    }
    /// <p>Indicates the tenancy of the Capacity Reservation. A Capacity Reservation can have one of the following tenancy settings:</p>
    /// <ul>
    /// <li> <p> <code>default</code> - The Capacity Reservation is created on hardware that is shared with other Amazon Web Services accounts.</p> </li>
    /// <li> <p> <code>dedicated</code> - The Capacity Reservation is created on single-tenant hardware that is dedicated to a single Amazon Web Services account.</p> </li>
    /// </ul>
    pub fn tenancy(&self) -> std::option::Option<&crate::model::CapacityReservationTenancy> {
        self.tenancy.as_ref()
    }
    /// <p>The total number of instances for which the Capacity Reservation reserves capacity.</p>
    pub fn total_instance_count(&self) -> std::option::Option<i32> {
        self.total_instance_count
    }
    /// <p>The remaining capacity. Indicates the number of instances that can be launched in the Capacity Reservation.</p>
    pub fn available_instance_count(&self) -> std::option::Option<i32> {
        self.available_instance_count
    }
    /// <p>Indicates whether the Capacity Reservation supports EBS-optimized instances. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS- optimized instance.</p>
    pub fn ebs_optimized(&self) -> std::option::Option<bool> {
        self.ebs_optimized
    }
    /// <p> <i>Deprecated.</i> </p>
    pub fn ephemeral_storage(&self) -> std::option::Option<bool> {
        self.ephemeral_storage
    }
    /// <p>The current state of the Capacity Reservation. A Capacity Reservation can be in one of the following states:</p>
    /// <ul>
    /// <li> <p> <code>active</code> - The Capacity Reservation is active and the capacity is available for your use.</p> </li>
    /// <li> <p> <code>expired</code> - The Capacity Reservation expired automatically at the date and time specified in your request. The reserved capacity is no longer available for your use.</p> </li>
    /// <li> <p> <code>cancelled</code> - The Capacity Reservation was cancelled. The reserved capacity is no longer available for your use.</p> </li>
    /// <li> <p> <code>pending</code> - The Capacity Reservation request was successful but the capacity provisioning is still pending.</p> </li>
    /// <li> <p> <code>failed</code> - The Capacity Reservation request has failed. A request might fail due to invalid request parameters, capacity constraints, or instance limit constraints. Failed requests are retained for 60 minutes.</p> </li>
    /// </ul>
    pub fn state(&self) -> std::option::Option<&crate::model::CapacityReservationState> {
        self.state.as_ref()
    }
    /// <p>The date and time at which the Capacity Reservation was started.</p>
    pub fn start_date(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.start_date.as_ref()
    }
    /// <p>The date and time at which the Capacity Reservation expires. When a Capacity Reservation expires, the reserved capacity is released and you can no longer launch instances into it. The Capacity Reservation's state changes to <code>expired</code> when it reaches its end date and time.</p>
    pub fn end_date(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.end_date.as_ref()
    }
    /// <p>Indicates the way in which the Capacity Reservation ends. A Capacity Reservation can have one of the following end types:</p>
    /// <ul>
    /// <li> <p> <code>unlimited</code> - The Capacity Reservation remains active until you explicitly cancel it.</p> </li>
    /// <li> <p> <code>limited</code> - The Capacity Reservation expires automatically at a specified date and time.</p> </li>
    /// </ul>
    pub fn end_date_type(&self) -> std::option::Option<&crate::model::EndDateType> {
        self.end_date_type.as_ref()
    }
    /// <p>Indicates the type of instance launches that the Capacity Reservation accepts. The options include:</p>
    /// <ul>
    /// <li> <p> <code>open</code> - The Capacity Reservation accepts all instances that have matching attributes (instance type, platform, and Availability Zone). Instances that have matching attributes launch into the Capacity Reservation automatically without specifying any additional parameters.</p> </li>
    /// <li> <p> <code>targeted</code> - The Capacity Reservation only accepts instances that have matching attributes (instance type, platform, and Availability Zone), and explicitly target the Capacity Reservation. This ensures that only permitted instances can use the reserved capacity. </p> </li>
    /// </ul>
    pub fn instance_match_criteria(
        &self,
    ) -> std::option::Option<&crate::model::InstanceMatchCriteria> {
        self.instance_match_criteria.as_ref()
    }
    /// <p>The date and time at which the Capacity Reservation was created.</p>
    pub fn create_date(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.create_date.as_ref()
    }
    /// <p>Any tags assigned to the Capacity Reservation.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the Outpost on which the Capacity Reservation was created.</p>
    pub fn outpost_arn(&self) -> std::option::Option<&str> {
        self.outpost_arn.as_deref()
    }
    /// <p>The ID of the Capacity Reservation Fleet to which the Capacity Reservation belongs. Only valid for Capacity Reservations that were created by a Capacity Reservation Fleet.</p>
    pub fn capacity_reservation_fleet_id(&self) -> std::option::Option<&str> {
        self.capacity_reservation_fleet_id.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the cluster placement group in which the Capacity Reservation was created. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/cr-cpg.html"> Capacity Reservations for cluster placement groups</a> in the <i>Amazon EC2 User Guide</i>.</p>
    pub fn placement_group_arn(&self) -> std::option::Option<&str> {
        self.placement_group_arn.as_deref()
    }
    /// <p>Information about instance capacity usage.</p>
    pub fn capacity_allocations(&self) -> std::option::Option<&[crate::model::CapacityAllocation]> {
        self.capacity_allocations.as_deref()
    }
}
/// See [`CapacityReservation`](crate::model::CapacityReservation).
pub mod capacity_reservation {

    /// A builder for [`CapacityReservation`](crate::model::CapacityReservation).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) capacity_reservation_id: std::option::Option<std::string::String>,
        pub(crate) owner_id: std::option::Option<std::string::String>,
        pub(crate) capacity_reservation_arn: std::option::Option<std::string::String>,
        pub(crate) availability_zone_id: std::option::Option<std::string::String>,
        pub(crate) instance_type: std::option::Option<std::string::String>,
        pub(crate) instance_platform:
            std::option::Option<crate::model::CapacityReservationInstancePlatform>,
        pub(crate) availability_zone: std::option::Option<std::string::String>,
        pub(crate) tenancy: std::option::Option<crate::model::CapacityReservationTenancy>,
        pub(crate) total_instance_count: std::option::Option<i32>,
        pub(crate) available_instance_count: std::option::Option<i32>,
        pub(crate) ebs_optimized: std::option::Option<bool>,
        pub(crate) ephemeral_storage: std::option::Option<bool>,
        pub(crate) state: std::option::Option<crate::model::CapacityReservationState>,
        pub(crate) start_date: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) end_date: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) end_date_type: std::option::Option<crate::model::EndDateType>,
        pub(crate) instance_match_criteria:
            std::option::Option<crate::model::InstanceMatchCriteria>,
        pub(crate) create_date: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        pub(crate) outpost_arn: std::option::Option<std::string::String>,
        pub(crate) capacity_reservation_fleet_id: std::option::Option<std::string::String>,
        pub(crate) placement_group_arn: std::option::Option<std::string::String>,
        pub(crate) capacity_allocations:
            std::option::Option<std::vec::Vec<crate::model::CapacityAllocation>>,
    }
    impl Builder {
        /// <p>The ID of the Capacity Reservation.</p>
        pub fn capacity_reservation_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.capacity_reservation_id = Some(input.into());
            self
        }
        /// <p>The ID of the Capacity Reservation.</p>
        pub fn set_capacity_reservation_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.capacity_reservation_id = input;
            self
        }
        /// <p>The ID of the Amazon Web Services account that owns the Capacity Reservation.</p>
        pub fn owner_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.owner_id = Some(input.into());
            self
        }
        /// <p>The ID of the Amazon Web Services account that owns the Capacity Reservation.</p>
        pub fn set_owner_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.owner_id = input;
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the Capacity Reservation.</p>
        pub fn capacity_reservation_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.capacity_reservation_arn = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the Capacity Reservation.</p>
        pub fn set_capacity_reservation_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.capacity_reservation_arn = input;
            self
        }
        /// <p>The Availability Zone ID of the Capacity Reservation.</p>
        pub fn availability_zone_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.availability_zone_id = Some(input.into());
            self
        }
        /// <p>The Availability Zone ID of the Capacity Reservation.</p>
        pub fn set_availability_zone_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.availability_zone_id = input;
            self
        }
        /// <p>The type of instance for which the Capacity Reservation reserves capacity.</p>
        pub fn instance_type(mut self, input: impl Into<std::string::String>) -> Self {
            self.instance_type = Some(input.into());
            self
        }
        /// <p>The type of instance for which the Capacity Reservation reserves capacity.</p>
        pub fn set_instance_type(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.instance_type = input;
            self
        }
        /// <p>The type of operating system for which the Capacity Reservation reserves capacity.</p>
        pub fn instance_platform(
            mut self,
            input: crate::model::CapacityReservationInstancePlatform,
        ) -> Self {
            self.instance_platform = Some(input);
            self
        }
        /// <p>The type of operating system for which the Capacity Reservation reserves capacity.</p>
        pub fn set_instance_platform(
            mut self,
            input: std::option::Option<crate::model::CapacityReservationInstancePlatform>,
        ) -> Self {
            self.instance_platform = input;
            self
        }
        /// <p>The Availability Zone in which the capacity is reserved.</p>
        pub fn availability_zone(mut self, input: impl Into<std::string::String>) -> Self {
            self.availability_zone = Some(input.into());
            self
        }
        /// <p>The Availability Zone in which the capacity is reserved.</p>
        pub fn set_availability_zone(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.availability_zone = input;
            self
        }
        /// <p>Indicates the tenancy of the Capacity Reservation. A Capacity Reservation can have one of the following tenancy settings:</p>
        /// <ul>
        /// <li> <p> <code>default</code> - The Capacity Reservation is created on hardware that is shared with other Amazon Web Services accounts.</p> </li>
        /// <li> <p> <code>dedicated</code> - The Capacity Reservation is created on single-tenant hardware that is dedicated to a single Amazon Web Services account.</p> </li>
        /// </ul>
        pub fn tenancy(mut self, input: crate::model::CapacityReservationTenancy) -> Self {
            self.tenancy = Some(input);
            self
        }
        /// <p>Indicates the tenancy of the Capacity Reservation. A Capacity Reservation can have one of the following tenancy settings:</p>
        /// <ul>
        /// <li> <p> <code>default</code> - The Capacity Reservation is created on hardware that is shared with other Amazon Web Services accounts.</p> </li>
        /// <li> <p> <code>dedicated</code> - The Capacity Reservation is created on single-tenant hardware that is dedicated to a single Amazon Web Services account.</p> </li>
        /// </ul>
        pub fn set_tenancy(
            mut self,
            input: std::option::Option<crate::model::CapacityReservationTenancy>,
        ) -> Self {
            self.tenancy = input;
            self
        }
        /// <p>The total number of instances for which the Capacity Reservation reserves capacity.</p>
        pub fn total_instance_count(mut self, input: i32) -> Self {
            self.total_instance_count = Some(input);
            self
        }
        /// <p>The total number of instances for which the Capacity Reservation reserves capacity.</p>
        pub fn set_total_instance_count(mut self, input: std::option::Option<i32>) -> Self {
            self.total_instance_count = input;
            self
        }
        /// <p>The remaining capacity. Indicates the number of instances that can be launched in the Capacity Reservation.</p>
        pub fn available_instance_count(mut self, input: i32) -> Self {
            self.available_instance_count = Some(input);
            self
        }
        /// <p>The remaining capacity. Indicates the number of instances that can be launched in the Capacity Reservation.</p>
        pub fn set_available_instance_count(mut self, input: std::option::Option<i32>) -> Self {
            self.available_instance_count = input;
            self
        }
        /// <p>Indicates whether the Capacity Reservation supports EBS-optimized instances. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS- optimized instance.</p>
        pub fn ebs_optimized(mut self, input: bool) -> Self {
            self.ebs_optimized = Some(input);
            self
        }
        /// <p>Indicates whether the Capacity Reservation supports EBS-optimized instances. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS- optimized instance.</p>
        pub fn set_ebs_optimized(mut self, input: std::option::Option<bool>) -> Self {
            self.ebs_optimized = input;
            self
        }
        /// <p> <i>Deprecated.</i> </p>
        pub fn ephemeral_storage(mut self, input: bool) -> Self {
            self.ephemeral_storage = Some(input);
            self
        }
        /// <p> <i>Deprecated.</i> </p>
        pub fn set_ephemeral_storage(mut self, input: std::option::Option<bool>) -> Self {
            self.ephemeral_storage = input;
            self
        }
        /// <p>The current state of the Capacity Reservation. A Capacity Reservation can be in one of the following states:</p>
        /// <ul>
        /// <li> <p> <code>active</code> - The Capacity Reservation is active and the capacity is available for your use.</p> </li>
        /// <li> <p> <code>expired</code> - The Capacity Reservation expired automatically at the date and time specified in your request. The reserved capacity is no longer available for your use.</p> </li>
        /// <li> <p> <code>cancelled</code> - The Capacity Reservation was cancelled. The reserved capacity is no longer available for your use.</p> </li>
        /// <li> <p> <code>pending</code> - The Capacity Reservation request was successful but the capacity provisioning is still pending.</p> </li>
        /// <li> <p> <code>failed</code> - The Capacity Reservation request has failed. A request might fail due to invalid request parameters, capacity constraints, or instance limit constraints. Failed requests are retained for 60 minutes.</p> </li>
        /// </ul>
        pub fn state(mut self, input: crate::model::CapacityReservationState) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>The current state of the Capacity Reservation. A Capacity Reservation can be in one of the following states:</p>
        /// <ul>
        /// <li> <p> <code>active</code> - The Capacity Reservation is active and the capacity is available for your use.</p> </li>
        /// <li> <p> <code>expired</code> - The Capacity Reservation expired automatically at the date and time specified in your request. The reserved capacity is no longer available for your use.</p> </li>
        /// <li> <p> <code>cancelled</code> - The Capacity Reservation was cancelled. The reserved capacity is no longer available for your use.</p> </li>
        /// <li> <p> <code>pending</code> - The Capacity Reservation request was successful but the capacity provisioning is still pending.</p> </li>
        /// <li> <p> <code>failed</code> - The Capacity Reservation request has failed. A request might fail due to invalid request parameters, capacity constraints, or instance limit constraints. Failed requests are retained for 60 minutes.</p> </li>
        /// </ul>
        pub fn set_state(
            mut self,
            input: std::option::Option<crate::model::CapacityReservationState>,
        ) -> Self {
            self.state = input;
            self
        }
        /// <p>The date and time at which the Capacity Reservation was started.</p>
        pub fn start_date(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.start_date = Some(input);
            self
        }
        /// <p>The date and time at which the Capacity Reservation was started.</p>
        pub fn set_start_date(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.start_date = input;
            self
        }
        /// <p>The date and time at which the Capacity Reservation expires. When a Capacity Reservation expires, the reserved capacity is released and you can no longer launch instances into it. The Capacity Reservation's state changes to <code>expired</code> when it reaches its end date and time.</p>
        pub fn end_date(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.end_date = Some(input);
            self
        }
        /// <p>The date and time at which the Capacity Reservation expires. When a Capacity Reservation expires, the reserved capacity is released and you can no longer launch instances into it. The Capacity Reservation's state changes to <code>expired</code> when it reaches its end date and time.</p>
        pub fn set_end_date(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.end_date = input;
            self
        }
        /// <p>Indicates the way in which the Capacity Reservation ends. A Capacity Reservation can have one of the following end types:</p>
        /// <ul>
        /// <li> <p> <code>unlimited</code> - The Capacity Reservation remains active until you explicitly cancel it.</p> </li>
        /// <li> <p> <code>limited</code> - The Capacity Reservation expires automatically at a specified date and time.</p> </li>
        /// </ul>
        pub fn end_date_type(mut self, input: crate::model::EndDateType) -> Self {
            self.end_date_type = Some(input);
            self
        }
        /// <p>Indicates the way in which the Capacity Reservation ends. A Capacity Reservation can have one of the following end types:</p>
        /// <ul>
        /// <li> <p> <code>unlimited</code> - The Capacity Reservation remains active until you explicitly cancel it.</p> </li>
        /// <li> <p> <code>limited</code> - The Capacity Reservation expires automatically at a specified date and time.</p> </li>
        /// </ul>
        pub fn set_end_date_type(
            mut self,
            input: std::option::Option<crate::model::EndDateType>,
        ) -> Self {
            self.end_date_type = input;
            self
        }
        /// <p>Indicates the type of instance launches that the Capacity Reservation accepts. The options include:</p>
        /// <ul>
        /// <li> <p> <code>open</code> - The Capacity Reservation accepts all instances that have matching attributes (instance type, platform, and Availability Zone). Instances that have matching attributes launch into the Capacity Reservation automatically without specifying any additional parameters.</p> </li>
        /// <li> <p> <code>targeted</code> - The Capacity Reservation only accepts instances that have matching attributes (instance type, platform, and Availability Zone), and explicitly target the Capacity Reservation. This ensures that only permitted instances can use the reserved capacity. </p> </li>
        /// </ul>
        pub fn instance_match_criteria(
            mut self,
            input: crate::model::InstanceMatchCriteria,
        ) -> Self {
            self.instance_match_criteria = Some(input);
            self
        }
        /// <p>Indicates the type of instance launches that the Capacity Reservation accepts. The options include:</p>
        /// <ul>
        /// <li> <p> <code>open</code> - The Capacity Reservation accepts all instances that have matching attributes (instance type, platform, and Availability Zone). Instances that have matching attributes launch into the Capacity Reservation automatically without specifying any additional parameters.</p> </li>
        /// <li> <p> <code>targeted</code> - The Capacity Reservation only accepts instances that have matching attributes (instance type, platform, and Availability Zone), and explicitly target the Capacity Reservation. This ensures that only permitted instances can use the reserved capacity. </p> </li>
        /// </ul>
        pub fn set_instance_match_criteria(
            mut self,
            input: std::option::Option<crate::model::InstanceMatchCriteria>,
        ) -> Self {
            self.instance_match_criteria = input;
            self
        }
        /// <p>The date and time at which the Capacity Reservation was created.</p>
        pub fn create_date(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.create_date = Some(input);
            self
        }
        /// <p>The date and time at which the Capacity Reservation was created.</p>
        pub fn set_create_date(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.create_date = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>Any tags assigned to the Capacity Reservation.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>Any tags assigned to the Capacity Reservation.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the Outpost on which the Capacity Reservation was created.</p>
        pub fn outpost_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.outpost_arn = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the Outpost on which the Capacity Reservation was created.</p>
        pub fn set_outpost_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.outpost_arn = input;
            self
        }
        /// <p>The ID of the Capacity Reservation Fleet to which the Capacity Reservation belongs. Only valid for Capacity Reservations that were created by a Capacity Reservation Fleet.</p>
        pub fn capacity_reservation_fleet_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.capacity_reservation_fleet_id = Some(input.into());
            self
        }
        /// <p>The ID of the Capacity Reservation Fleet to which the Capacity Reservation belongs. Only valid for Capacity Reservations that were created by a Capacity Reservation Fleet.</p>
        pub fn set_capacity_reservation_fleet_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.capacity_reservation_fleet_id = input;
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the cluster placement group in which the Capacity Reservation was created. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/cr-cpg.html"> Capacity Reservations for cluster placement groups</a> in the <i>Amazon EC2 User Guide</i>.</p>
        pub fn placement_group_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.placement_group_arn = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the cluster placement group in which the Capacity Reservation was created. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/cr-cpg.html"> Capacity Reservations for cluster placement groups</a> in the <i>Amazon EC2 User Guide</i>.</p>
        pub fn set_placement_group_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.placement_group_arn = input;
            self
        }
        /// Appends an item to `capacity_allocations`.
        ///
        /// To override the contents of this collection use [`set_capacity_allocations`](Self::set_capacity_allocations).
        ///
        /// <p>Information about instance capacity usage.</p>
        pub fn capacity_allocations(mut self, input: crate::model::CapacityAllocation) -> Self {
            let mut v = self.capacity_allocations.unwrap_or_default();
            v.push(input);
            self.capacity_allocations = Some(v);
            self
        }
        /// <p>Information about instance capacity usage.</p>
        pub fn set_capacity_allocations(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::CapacityAllocation>>,
        ) -> Self {
            self.capacity_allocations = input;
            self
        }
        /// Consumes the builder and constructs a [`CapacityReservation`](crate::model::CapacityReservation).
        pub fn build(self) -> crate::model::CapacityReservation {
            crate::model::CapacityReservation {
                capacity_reservation_id: self.capacity_reservation_id,
                owner_id: self.owner_id,
                capacity_reservation_arn: self.capacity_reservation_arn,
                availability_zone_id: self.availability_zone_id,
                instance_type: self.instance_type,
                instance_platform: self.instance_platform,
                availability_zone: self.availability_zone,
                tenancy: self.tenancy,
                total_instance_count: self.total_instance_count,
                available_instance_count: self.available_instance_count,
                ebs_optimized: self.ebs_optimized,
                ephemeral_storage: self.ephemeral_storage,
                state: self.state,
                start_date: self.start_date,
                end_date: self.end_date,
                end_date_type: self.end_date_type,
                instance_match_criteria: self.instance_match_criteria,
                create_date: self.create_date,
                tags: self.tags,
                outpost_arn: self.outpost_arn,
                capacity_reservation_fleet_id: self.capacity_reservation_fleet_id,
                placement_group_arn: self.placement_group_arn,
                capacity_allocations: self.capacity_allocations,
            }
        }
    }
}
impl CapacityReservation {
    /// Creates a new builder-style object to manufacture [`CapacityReservation`](crate::model::CapacityReservation).
    pub fn builder() -> crate::model::capacity_reservation::Builder {
        crate::model::capacity_reservation::Builder::default()
    }
}

/// <p>Information about instance capacity usage for a Capacity Reservation.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CapacityAllocation {
    /// <p>The usage type. <code>used</code> indicates that the instance capacity is in use by instances that are running in the Capacity Reservation.</p>
    #[doc(hidden)]
    pub allocation_type: std::option::Option<crate::model::AllocationType>,
    /// <p>The amount of instance capacity associated with the usage. For example a value of <code>4</code> indicates that instance capacity for 4 instances is currently in use.</p>
    #[doc(hidden)]
    pub count: std::option::Option<i32>,
}
impl CapacityAllocation {
    /// <p>The usage type. <code>used</code> indicates that the instance capacity is in use by instances that are running in the Capacity Reservation.</p>
    pub fn allocation_type(&self) -> std::option::Option<&crate::model::AllocationType> {
        self.allocation_type.as_ref()
    }
    /// <p>The amount of instance capacity associated with the usage. For example a value of <code>4</code> indicates that instance capacity for 4 instances is currently in use.</p>
    pub fn count(&self) -> std::option::Option<i32> {
        self.count
    }
}
/// See [`CapacityAllocation`](crate::model::CapacityAllocation).
pub mod capacity_allocation {

    /// A builder for [`CapacityAllocation`](crate::model::CapacityAllocation).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) allocation_type: std::option::Option<crate::model::AllocationType>,
        pub(crate) count: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>The usage type. <code>used</code> indicates that the instance capacity is in use by instances that are running in the Capacity Reservation.</p>
        pub fn allocation_type(mut self, input: crate::model::AllocationType) -> Self {
            self.allocation_type = Some(input);
            self
        }
        /// <p>The usage type. <code>used</code> indicates that the instance capacity is in use by instances that are running in the Capacity Reservation.</p>
        pub fn set_allocation_type(
            mut self,
            input: std::option::Option<crate::model::AllocationType>,
        ) -> Self {
            self.allocation_type = input;
            self
        }
        /// <p>The amount of instance capacity associated with the usage. For example a value of <code>4</code> indicates that instance capacity for 4 instances is currently in use.</p>
        pub fn count(mut self, input: i32) -> Self {
            self.count = Some(input);
            self
        }
        /// <p>The amount of instance capacity associated with the usage. For example a value of <code>4</code> indicates that instance capacity for 4 instances is currently in use.</p>
        pub fn set_count(mut self, input: std::option::Option<i32>) -> Self {
            self.count = input;
            self
        }
        /// Consumes the builder and constructs a [`CapacityAllocation`](crate::model::CapacityAllocation).
        pub fn build(self) -> crate::model::CapacityAllocation {
            crate::model::CapacityAllocation {
                allocation_type: self.allocation_type,
                count: self.count,
            }
        }
    }
}
impl CapacityAllocation {
    /// Creates a new builder-style object to manufacture [`CapacityAllocation`](crate::model::CapacityAllocation).
    pub fn builder() -> crate::model::capacity_allocation::Builder {
        crate::model::capacity_allocation::Builder::default()
    }
}

/// When writing a match expression against `AllocationType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let allocationtype = unimplemented!();
/// match allocationtype {
///     AllocationType::Used => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `allocationtype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `AllocationType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `AllocationType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `AllocationType::NewFeature` is defined.
/// Specifically, when `allocationtype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `AllocationType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 AllocationType {
    #[allow(missing_docs)] // documentation missing in model
    Used,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for AllocationType {
    fn from(s: &str) -> Self {
        match s {
            "used" => AllocationType::Used,
            other => AllocationType::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for AllocationType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(AllocationType::from(s))
    }
}
impl AllocationType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            AllocationType::Used => "used",
            AllocationType::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["used"]
    }
}
impl AsRef<str> for AllocationType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `InstanceMatchCriteria`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let instancematchcriteria = unimplemented!();
/// match instancematchcriteria {
///     InstanceMatchCriteria::Open => { /* ... */ },
///     InstanceMatchCriteria::Targeted => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `instancematchcriteria` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `InstanceMatchCriteria::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `InstanceMatchCriteria::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `InstanceMatchCriteria::NewFeature` is defined.
/// Specifically, when `instancematchcriteria` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `InstanceMatchCriteria::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 InstanceMatchCriteria {
    #[allow(missing_docs)] // documentation missing in model
    Open,
    #[allow(missing_docs)] // documentation missing in model
    Targeted,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for InstanceMatchCriteria {
    fn from(s: &str) -> Self {
        match s {
            "open" => InstanceMatchCriteria::Open,
            "targeted" => InstanceMatchCriteria::Targeted,
            other => {
                InstanceMatchCriteria::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for InstanceMatchCriteria {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(InstanceMatchCriteria::from(s))
    }
}
impl InstanceMatchCriteria {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            InstanceMatchCriteria::Open => "open",
            InstanceMatchCriteria::Targeted => "targeted",
            InstanceMatchCriteria::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["open", "targeted"]
    }
}
impl AsRef<str> for InstanceMatchCriteria {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `CapacityReservationTenancy`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let capacityreservationtenancy = unimplemented!();
/// match capacityreservationtenancy {
///     CapacityReservationTenancy::Dedicated => { /* ... */ },
///     CapacityReservationTenancy::Default => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `capacityreservationtenancy` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `CapacityReservationTenancy::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `CapacityReservationTenancy::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `CapacityReservationTenancy::NewFeature` is defined.
/// Specifically, when `capacityreservationtenancy` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `CapacityReservationTenancy::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 CapacityReservationTenancy {
    #[allow(missing_docs)] // documentation missing in model
    Dedicated,
    #[allow(missing_docs)] // documentation missing in model
    Default,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for CapacityReservationTenancy {
    fn from(s: &str) -> Self {
        match s {
            "dedicated" => CapacityReservationTenancy::Dedicated,
            "default" => CapacityReservationTenancy::Default,
            other => CapacityReservationTenancy::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for CapacityReservationTenancy {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(CapacityReservationTenancy::from(s))
    }
}
impl CapacityReservationTenancy {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            CapacityReservationTenancy::Dedicated => "dedicated",
            CapacityReservationTenancy::Default => "default",
            CapacityReservationTenancy::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["dedicated", "default"]
    }
}
impl AsRef<str> for CapacityReservationTenancy {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `CapacityReservationInstancePlatform`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let capacityreservationinstanceplatform = unimplemented!();
/// match capacityreservationinstanceplatform {
///     CapacityReservationInstancePlatform::LinuxWithSqlServerEnterprise => { /* ... */ },
///     CapacityReservationInstancePlatform::LinuxWithSqlServerStandard => { /* ... */ },
///     CapacityReservationInstancePlatform::LinuxWithSqlServerWeb => { /* ... */ },
///     CapacityReservationInstancePlatform::LinuxUnix => { /* ... */ },
///     CapacityReservationInstancePlatform::RhelWithHa => { /* ... */ },
///     CapacityReservationInstancePlatform::RhelWithHaAndSqlServerEnterprise => { /* ... */ },
///     CapacityReservationInstancePlatform::RhelWithHaAndSqlServerStandard => { /* ... */ },
///     CapacityReservationInstancePlatform::RhelWithSqlServerEnterprise => { /* ... */ },
///     CapacityReservationInstancePlatform::RhelWithSqlServerStandard => { /* ... */ },
///     CapacityReservationInstancePlatform::RhelWithSqlServerWeb => { /* ... */ },
///     CapacityReservationInstancePlatform::RedHatEnterpriseLinux => { /* ... */ },
///     CapacityReservationInstancePlatform::SuseLinux => { /* ... */ },
///     CapacityReservationInstancePlatform::Windows => { /* ... */ },
///     CapacityReservationInstancePlatform::WindowsWithSqlServer => { /* ... */ },
///     CapacityReservationInstancePlatform::WindowsWithSqlServerEnterprise => { /* ... */ },
///     CapacityReservationInstancePlatform::WindowsWithSqlServerStandard => { /* ... */ },
///     CapacityReservationInstancePlatform::WindowsWithSqlServerWeb => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `capacityreservationinstanceplatform` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `CapacityReservationInstancePlatform::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `CapacityReservationInstancePlatform::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `CapacityReservationInstancePlatform::NewFeature` is defined.
/// Specifically, when `capacityreservationinstanceplatform` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `CapacityReservationInstancePlatform::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 CapacityReservationInstancePlatform {
    #[allow(missing_docs)] // documentation missing in model
    LinuxWithSqlServerEnterprise,
    #[allow(missing_docs)] // documentation missing in model
    LinuxWithSqlServerStandard,
    #[allow(missing_docs)] // documentation missing in model
    LinuxWithSqlServerWeb,
    #[allow(missing_docs)] // documentation missing in model
    LinuxUnix,
    #[allow(missing_docs)] // documentation missing in model
    RhelWithHa,
    #[allow(missing_docs)] // documentation missing in model
    RhelWithHaAndSqlServerEnterprise,
    #[allow(missing_docs)] // documentation missing in model
    RhelWithHaAndSqlServerStandard,
    #[allow(missing_docs)] // documentation missing in model
    RhelWithSqlServerEnterprise,
    #[allow(missing_docs)] // documentation missing in model
    RhelWithSqlServerStandard,
    #[allow(missing_docs)] // documentation missing in model
    RhelWithSqlServerWeb,
    #[allow(missing_docs)] // documentation missing in model
    RedHatEnterpriseLinux,
    #[allow(missing_docs)] // documentation missing in model
    SuseLinux,
    #[allow(missing_docs)] // documentation missing in model
    Windows,
    #[allow(missing_docs)] // documentation missing in model
    WindowsWithSqlServer,
    #[allow(missing_docs)] // documentation missing in model
    WindowsWithSqlServerEnterprise,
    #[allow(missing_docs)] // documentation missing in model
    WindowsWithSqlServerStandard,
    #[allow(missing_docs)] // documentation missing in model
    WindowsWithSqlServerWeb,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for CapacityReservationInstancePlatform {
    fn from(s: &str) -> Self {
        match s {
            "Linux with SQL Server Enterprise" => {
                CapacityReservationInstancePlatform::LinuxWithSqlServerEnterprise
            }
            "Linux with SQL Server Standard" => {
                CapacityReservationInstancePlatform::LinuxWithSqlServerStandard
            }
            "Linux with SQL Server Web" => {
                CapacityReservationInstancePlatform::LinuxWithSqlServerWeb
            }
            "Linux/UNIX" => CapacityReservationInstancePlatform::LinuxUnix,
            "RHEL with HA" => CapacityReservationInstancePlatform::RhelWithHa,
            "RHEL with HA and SQL Server Enterprise" => {
                CapacityReservationInstancePlatform::RhelWithHaAndSqlServerEnterprise
            }
            "RHEL with HA and SQL Server Standard" => {
                CapacityReservationInstancePlatform::RhelWithHaAndSqlServerStandard
            }
            "RHEL with SQL Server Enterprise" => {
                CapacityReservationInstancePlatform::RhelWithSqlServerEnterprise
            }
            "RHEL with SQL Server Standard" => {
                CapacityReservationInstancePlatform::RhelWithSqlServerStandard
            }
            "RHEL with SQL Server Web" => CapacityReservationInstancePlatform::RhelWithSqlServerWeb,
            "Red Hat Enterprise Linux" => {
                CapacityReservationInstancePlatform::RedHatEnterpriseLinux
            }
            "SUSE Linux" => CapacityReservationInstancePlatform::SuseLinux,
            "Windows" => CapacityReservationInstancePlatform::Windows,
            "Windows with SQL Server" => CapacityReservationInstancePlatform::WindowsWithSqlServer,
            "Windows with SQL Server Enterprise" => {
                CapacityReservationInstancePlatform::WindowsWithSqlServerEnterprise
            }
            "Windows with SQL Server Standard" => {
                CapacityReservationInstancePlatform::WindowsWithSqlServerStandard
            }
            "Windows with SQL Server Web" => {
                CapacityReservationInstancePlatform::WindowsWithSqlServerWeb
            }
            other => CapacityReservationInstancePlatform::Unknown(
                crate::types::UnknownVariantValue(other.to_owned()),
            ),
        }
    }
}
impl std::str::FromStr for CapacityReservationInstancePlatform {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(CapacityReservationInstancePlatform::from(s))
    }
}
impl CapacityReservationInstancePlatform {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            CapacityReservationInstancePlatform::LinuxWithSqlServerEnterprise => {
                "Linux with SQL Server Enterprise"
            }
            CapacityReservationInstancePlatform::LinuxWithSqlServerStandard => {
                "Linux with SQL Server Standard"
            }
            CapacityReservationInstancePlatform::LinuxWithSqlServerWeb => {
                "Linux with SQL Server Web"
            }
            CapacityReservationInstancePlatform::LinuxUnix => "Linux/UNIX",
            CapacityReservationInstancePlatform::RhelWithHa => "RHEL with HA",
            CapacityReservationInstancePlatform::RhelWithHaAndSqlServerEnterprise => {
                "RHEL with HA and SQL Server Enterprise"
            }
            CapacityReservationInstancePlatform::RhelWithHaAndSqlServerStandard => {
                "RHEL with HA and SQL Server Standard"
            }
            CapacityReservationInstancePlatform::RhelWithSqlServerEnterprise => {
                "RHEL with SQL Server Enterprise"
            }
            CapacityReservationInstancePlatform::RhelWithSqlServerStandard => {
                "RHEL with SQL Server Standard"
            }
            CapacityReservationInstancePlatform::RhelWithSqlServerWeb => "RHEL with SQL Server Web",
            CapacityReservationInstancePlatform::RedHatEnterpriseLinux => {
                "Red Hat Enterprise Linux"
            }
            CapacityReservationInstancePlatform::SuseLinux => "SUSE Linux",
            CapacityReservationInstancePlatform::Windows => "Windows",
            CapacityReservationInstancePlatform::WindowsWithSqlServer => "Windows with SQL Server",
            CapacityReservationInstancePlatform::WindowsWithSqlServerEnterprise => {
                "Windows with SQL Server Enterprise"
            }
            CapacityReservationInstancePlatform::WindowsWithSqlServerStandard => {
                "Windows with SQL Server Standard"
            }
            CapacityReservationInstancePlatform::WindowsWithSqlServerWeb => {
                "Windows with SQL Server Web"
            }
            CapacityReservationInstancePlatform::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &[
            "Linux with SQL Server Enterprise",
            "Linux with SQL Server Standard",
            "Linux with SQL Server Web",
            "Linux/UNIX",
            "RHEL with HA",
            "RHEL with HA and SQL Server Enterprise",
            "RHEL with HA and SQL Server Standard",
            "RHEL with SQL Server Enterprise",
            "RHEL with SQL Server Standard",
            "RHEL with SQL Server Web",
            "Red Hat Enterprise Linux",
            "SUSE Linux",
            "Windows",
            "Windows with SQL Server",
            "Windows with SQL Server Enterprise",
            "Windows with SQL Server Standard",
            "Windows with SQL Server Web",
        ]
    }
}
impl AsRef<str> for CapacityReservationInstancePlatform {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Information about a Capacity Reservation Fleet.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CapacityReservationFleet {
    /// <p>The ID of the Capacity Reservation Fleet.</p>
    #[doc(hidden)]
    pub capacity_reservation_fleet_id: std::option::Option<std::string::String>,
    /// <p>The ARN of the Capacity Reservation Fleet.</p>
    #[doc(hidden)]
    pub capacity_reservation_fleet_arn: std::option::Option<std::string::String>,
    /// <p>The state of the Capacity Reservation Fleet. Possible states include:</p>
    /// <ul>
    /// <li> <p> <code>submitted</code> - The Capacity Reservation Fleet request has been submitted and Amazon Elastic Compute Cloud is preparing to create the Capacity Reservations.</p> </li>
    /// <li> <p> <code>modifying</code> - The Capacity Reservation Fleet is being modified. The Fleet remains in this state until the modification is complete.</p> </li>
    /// <li> <p> <code>active</code> - The Capacity Reservation Fleet has fulfilled its total target capacity and it is attempting to maintain this capacity. The Fleet remains in this state until it is modified or deleted.</p> </li>
    /// <li> <p> <code>partially_fulfilled</code> - The Capacity Reservation Fleet has partially fulfilled its total target capacity. There is insufficient Amazon EC2 to fulfill the total target capacity. The Fleet is attempting to asynchronously fulfill its total target capacity.</p> </li>
    /// <li> <p> <code>expiring</code> - The Capacity Reservation Fleet has reach its end date and it is in the process of expiring. One or more of its Capacity reservations might still be active.</p> </li>
    /// <li> <p> <code>expired</code> - The Capacity Reservation Fleet has reach its end date. The Fleet and its Capacity Reservations are expired. The Fleet can't create new Capacity Reservations.</p> </li>
    /// <li> <p> <code>cancelling</code> - The Capacity Reservation Fleet is in the process of being cancelled. One or more of its Capacity reservations might still be active.</p> </li>
    /// <li> <p> <code>cancelled</code> - The Capacity Reservation Fleet has been manually cancelled. The Fleet and its Capacity Reservations are cancelled and the Fleet can't create new Capacity Reservations.</p> </li>
    /// <li> <p> <code>failed</code> - The Capacity Reservation Fleet failed to reserve capacity for the specified instance types.</p> </li>
    /// </ul>
    #[doc(hidden)]
    pub state: std::option::Option<crate::model::CapacityReservationFleetState>,
    /// <p>The total number of capacity units for which the Capacity Reservation Fleet reserves capacity. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/crfleet-concepts.html#target-capacity">Total target capacity</a> in the Amazon EC2 User Guide.</p>
    #[doc(hidden)]
    pub total_target_capacity: std::option::Option<i32>,
    /// <p>The capacity units that have been fulfilled.</p>
    #[doc(hidden)]
    pub total_fulfilled_capacity: std::option::Option<f64>,
    /// <p>The tenancy of the Capacity Reservation Fleet. Tenancies include:</p>
    /// <ul>
    /// <li> <p> <code>default</code> - The Capacity Reservation Fleet is created on hardware that is shared with other Amazon Web Services accounts.</p> </li>
    /// <li> <p> <code>dedicated</code> - The Capacity Reservation Fleet is created on single-tenant hardware that is dedicated to a single Amazon Web Services account.</p> </li>
    /// </ul>
    #[doc(hidden)]
    pub tenancy: std::option::Option<crate::model::FleetCapacityReservationTenancy>,
    /// <p>The date and time at which the Capacity Reservation Fleet expires.</p>
    #[doc(hidden)]
    pub end_date: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The date and time at which the Capacity Reservation Fleet was created.</p>
    #[doc(hidden)]
    pub create_time: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>Indicates the type of instance launches that the Capacity Reservation Fleet accepts. All Capacity Reservations in the Fleet inherit this instance matching criteria.</p>
    /// <p>Currently, Capacity Reservation Fleets support <code>open</code> instance matching criteria only. This means that instances that have matching attributes (instance type, platform, and Availability Zone) run in the Capacity Reservations automatically. Instances do not need to explicitly target a Capacity Reservation Fleet to use its reserved capacity.</p>
    #[doc(hidden)]
    pub instance_match_criteria: std::option::Option<crate::model::FleetInstanceMatchCriteria>,
    /// <p>The strategy used by the Capacity Reservation Fleet to determine which of the specified instance types to use. For more information, see For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/crfleet-concepts.html#allocation-strategy"> Allocation strategy</a> in the Amazon EC2 User Guide.</p>
    #[doc(hidden)]
    pub allocation_strategy: std::option::Option<std::string::String>,
    /// <p>Information about the instance types for which to reserve the capacity.</p>
    #[doc(hidden)]
    pub instance_type_specifications:
        std::option::Option<std::vec::Vec<crate::model::FleetCapacityReservation>>,
    /// <p>The tags assigned to the Capacity Reservation Fleet.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl CapacityReservationFleet {
    /// <p>The ID of the Capacity Reservation Fleet.</p>
    pub fn capacity_reservation_fleet_id(&self) -> std::option::Option<&str> {
        self.capacity_reservation_fleet_id.as_deref()
    }
    /// <p>The ARN of the Capacity Reservation Fleet.</p>
    pub fn capacity_reservation_fleet_arn(&self) -> std::option::Option<&str> {
        self.capacity_reservation_fleet_arn.as_deref()
    }
    /// <p>The state of the Capacity Reservation Fleet. Possible states include:</p>
    /// <ul>
    /// <li> <p> <code>submitted</code> - The Capacity Reservation Fleet request has been submitted and Amazon Elastic Compute Cloud is preparing to create the Capacity Reservations.</p> </li>
    /// <li> <p> <code>modifying</code> - The Capacity Reservation Fleet is being modified. The Fleet remains in this state until the modification is complete.</p> </li>
    /// <li> <p> <code>active</code> - The Capacity Reservation Fleet has fulfilled its total target capacity and it is attempting to maintain this capacity. The Fleet remains in this state until it is modified or deleted.</p> </li>
    /// <li> <p> <code>partially_fulfilled</code> - The Capacity Reservation Fleet has partially fulfilled its total target capacity. There is insufficient Amazon EC2 to fulfill the total target capacity. The Fleet is attempting to asynchronously fulfill its total target capacity.</p> </li>
    /// <li> <p> <code>expiring</code> - The Capacity Reservation Fleet has reach its end date and it is in the process of expiring. One or more of its Capacity reservations might still be active.</p> </li>
    /// <li> <p> <code>expired</code> - The Capacity Reservation Fleet has reach its end date. The Fleet and its Capacity Reservations are expired. The Fleet can't create new Capacity Reservations.</p> </li>
    /// <li> <p> <code>cancelling</code> - The Capacity Reservation Fleet is in the process of being cancelled. One or more of its Capacity reservations might still be active.</p> </li>
    /// <li> <p> <code>cancelled</code> - The Capacity Reservation Fleet has been manually cancelled. The Fleet and its Capacity Reservations are cancelled and the Fleet can't create new Capacity Reservations.</p> </li>
    /// <li> <p> <code>failed</code> - The Capacity Reservation Fleet failed to reserve capacity for the specified instance types.</p> </li>
    /// </ul>
    pub fn state(&self) -> std::option::Option<&crate::model::CapacityReservationFleetState> {
        self.state.as_ref()
    }
    /// <p>The total number of capacity units for which the Capacity Reservation Fleet reserves capacity. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/crfleet-concepts.html#target-capacity">Total target capacity</a> in the Amazon EC2 User Guide.</p>
    pub fn total_target_capacity(&self) -> std::option::Option<i32> {
        self.total_target_capacity
    }
    /// <p>The capacity units that have been fulfilled.</p>
    pub fn total_fulfilled_capacity(&self) -> std::option::Option<f64> {
        self.total_fulfilled_capacity
    }
    /// <p>The tenancy of the Capacity Reservation Fleet. Tenancies include:</p>
    /// <ul>
    /// <li> <p> <code>default</code> - The Capacity Reservation Fleet is created on hardware that is shared with other Amazon Web Services accounts.</p> </li>
    /// <li> <p> <code>dedicated</code> - The Capacity Reservation Fleet is created on single-tenant hardware that is dedicated to a single Amazon Web Services account.</p> </li>
    /// </ul>
    pub fn tenancy(&self) -> std::option::Option<&crate::model::FleetCapacityReservationTenancy> {
        self.tenancy.as_ref()
    }
    /// <p>The date and time at which the Capacity Reservation Fleet expires.</p>
    pub fn end_date(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.end_date.as_ref()
    }
    /// <p>The date and time at which the Capacity Reservation Fleet was created.</p>
    pub fn create_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.create_time.as_ref()
    }
    /// <p>Indicates the type of instance launches that the Capacity Reservation Fleet accepts. All Capacity Reservations in the Fleet inherit this instance matching criteria.</p>
    /// <p>Currently, Capacity Reservation Fleets support <code>open</code> instance matching criteria only. This means that instances that have matching attributes (instance type, platform, and Availability Zone) run in the Capacity Reservations automatically. Instances do not need to explicitly target a Capacity Reservation Fleet to use its reserved capacity.</p>
    pub fn instance_match_criteria(
        &self,
    ) -> std::option::Option<&crate::model::FleetInstanceMatchCriteria> {
        self.instance_match_criteria.as_ref()
    }
    /// <p>The strategy used by the Capacity Reservation Fleet to determine which of the specified instance types to use. For more information, see For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/crfleet-concepts.html#allocation-strategy"> Allocation strategy</a> in the Amazon EC2 User Guide.</p>
    pub fn allocation_strategy(&self) -> std::option::Option<&str> {
        self.allocation_strategy.as_deref()
    }
    /// <p>Information about the instance types for which to reserve the capacity.</p>
    pub fn instance_type_specifications(
        &self,
    ) -> std::option::Option<&[crate::model::FleetCapacityReservation]> {
        self.instance_type_specifications.as_deref()
    }
    /// <p>The tags assigned to the Capacity Reservation Fleet.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
}
/// See [`CapacityReservationFleet`](crate::model::CapacityReservationFleet).
pub mod capacity_reservation_fleet {

    /// A builder for [`CapacityReservationFleet`](crate::model::CapacityReservationFleet).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) capacity_reservation_fleet_id: std::option::Option<std::string::String>,
        pub(crate) capacity_reservation_fleet_arn: std::option::Option<std::string::String>,
        pub(crate) state: std::option::Option<crate::model::CapacityReservationFleetState>,
        pub(crate) total_target_capacity: std::option::Option<i32>,
        pub(crate) total_fulfilled_capacity: std::option::Option<f64>,
        pub(crate) tenancy: std::option::Option<crate::model::FleetCapacityReservationTenancy>,
        pub(crate) end_date: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) create_time: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) instance_match_criteria:
            std::option::Option<crate::model::FleetInstanceMatchCriteria>,
        pub(crate) allocation_strategy: std::option::Option<std::string::String>,
        pub(crate) instance_type_specifications:
            std::option::Option<std::vec::Vec<crate::model::FleetCapacityReservation>>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    }
    impl Builder {
        /// <p>The ID of the Capacity Reservation Fleet.</p>
        pub fn capacity_reservation_fleet_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.capacity_reservation_fleet_id = Some(input.into());
            self
        }
        /// <p>The ID of the Capacity Reservation Fleet.</p>
        pub fn set_capacity_reservation_fleet_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.capacity_reservation_fleet_id = input;
            self
        }
        /// <p>The ARN of the Capacity Reservation Fleet.</p>
        pub fn capacity_reservation_fleet_arn(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.capacity_reservation_fleet_arn = Some(input.into());
            self
        }
        /// <p>The ARN of the Capacity Reservation Fleet.</p>
        pub fn set_capacity_reservation_fleet_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.capacity_reservation_fleet_arn = input;
            self
        }
        /// <p>The state of the Capacity Reservation Fleet. Possible states include:</p>
        /// <ul>
        /// <li> <p> <code>submitted</code> - The Capacity Reservation Fleet request has been submitted and Amazon Elastic Compute Cloud is preparing to create the Capacity Reservations.</p> </li>
        /// <li> <p> <code>modifying</code> - The Capacity Reservation Fleet is being modified. The Fleet remains in this state until the modification is complete.</p> </li>
        /// <li> <p> <code>active</code> - The Capacity Reservation Fleet has fulfilled its total target capacity and it is attempting to maintain this capacity. The Fleet remains in this state until it is modified or deleted.</p> </li>
        /// <li> <p> <code>partially_fulfilled</code> - The Capacity Reservation Fleet has partially fulfilled its total target capacity. There is insufficient Amazon EC2 to fulfill the total target capacity. The Fleet is attempting to asynchronously fulfill its total target capacity.</p> </li>
        /// <li> <p> <code>expiring</code> - The Capacity Reservation Fleet has reach its end date and it is in the process of expiring. One or more of its Capacity reservations might still be active.</p> </li>
        /// <li> <p> <code>expired</code> - The Capacity Reservation Fleet has reach its end date. The Fleet and its Capacity Reservations are expired. The Fleet can't create new Capacity Reservations.</p> </li>
        /// <li> <p> <code>cancelling</code> - The Capacity Reservation Fleet is in the process of being cancelled. One or more of its Capacity reservations might still be active.</p> </li>
        /// <li> <p> <code>cancelled</code> - The Capacity Reservation Fleet has been manually cancelled. The Fleet and its Capacity Reservations are cancelled and the Fleet can't create new Capacity Reservations.</p> </li>
        /// <li> <p> <code>failed</code> - The Capacity Reservation Fleet failed to reserve capacity for the specified instance types.</p> </li>
        /// </ul>
        pub fn state(mut self, input: crate::model::CapacityReservationFleetState) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>The state of the Capacity Reservation Fleet. Possible states include:</p>
        /// <ul>
        /// <li> <p> <code>submitted</code> - The Capacity Reservation Fleet request has been submitted and Amazon Elastic Compute Cloud is preparing to create the Capacity Reservations.</p> </li>
        /// <li> <p> <code>modifying</code> - The Capacity Reservation Fleet is being modified. The Fleet remains in this state until the modification is complete.</p> </li>
        /// <li> <p> <code>active</code> - The Capacity Reservation Fleet has fulfilled its total target capacity and it is attempting to maintain this capacity. The Fleet remains in this state until it is modified or deleted.</p> </li>
        /// <li> <p> <code>partially_fulfilled</code> - The Capacity Reservation Fleet has partially fulfilled its total target capacity. There is insufficient Amazon EC2 to fulfill the total target capacity. The Fleet is attempting to asynchronously fulfill its total target capacity.</p> </li>
        /// <li> <p> <code>expiring</code> - The Capacity Reservation Fleet has reach its end date and it is in the process of expiring. One or more of its Capacity reservations might still be active.</p> </li>
        /// <li> <p> <code>expired</code> - The Capacity Reservation Fleet has reach its end date. The Fleet and its Capacity Reservations are expired. The Fleet can't create new Capacity Reservations.</p> </li>
        /// <li> <p> <code>cancelling</code> - The Capacity Reservation Fleet is in the process of being cancelled. One or more of its Capacity reservations might still be active.</p> </li>
        /// <li> <p> <code>cancelled</code> - The Capacity Reservation Fleet has been manually cancelled. The Fleet and its Capacity Reservations are cancelled and the Fleet can't create new Capacity Reservations.</p> </li>
        /// <li> <p> <code>failed</code> - The Capacity Reservation Fleet failed to reserve capacity for the specified instance types.</p> </li>
        /// </ul>
        pub fn set_state(
            mut self,
            input: std::option::Option<crate::model::CapacityReservationFleetState>,
        ) -> Self {
            self.state = input;
            self
        }
        /// <p>The total number of capacity units for which the Capacity Reservation Fleet reserves capacity. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/crfleet-concepts.html#target-capacity">Total target capacity</a> in the Amazon EC2 User Guide.</p>
        pub fn total_target_capacity(mut self, input: i32) -> Self {
            self.total_target_capacity = Some(input);
            self
        }
        /// <p>The total number of capacity units for which the Capacity Reservation Fleet reserves capacity. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/crfleet-concepts.html#target-capacity">Total target capacity</a> in the Amazon EC2 User Guide.</p>
        pub fn set_total_target_capacity(mut self, input: std::option::Option<i32>) -> Self {
            self.total_target_capacity = input;
            self
        }
        /// <p>The capacity units that have been fulfilled.</p>
        pub fn total_fulfilled_capacity(mut self, input: f64) -> Self {
            self.total_fulfilled_capacity = Some(input);
            self
        }
        /// <p>The capacity units that have been fulfilled.</p>
        pub fn set_total_fulfilled_capacity(mut self, input: std::option::Option<f64>) -> Self {
            self.total_fulfilled_capacity = input;
            self
        }
        /// <p>The tenancy of the Capacity Reservation Fleet. Tenancies include:</p>
        /// <ul>
        /// <li> <p> <code>default</code> - The Capacity Reservation Fleet is created on hardware that is shared with other Amazon Web Services accounts.</p> </li>
        /// <li> <p> <code>dedicated</code> - The Capacity Reservation Fleet is created on single-tenant hardware that is dedicated to a single Amazon Web Services account.</p> </li>
        /// </ul>
        pub fn tenancy(mut self, input: crate::model::FleetCapacityReservationTenancy) -> Self {
            self.tenancy = Some(input);
            self
        }
        /// <p>The tenancy of the Capacity Reservation Fleet. Tenancies include:</p>
        /// <ul>
        /// <li> <p> <code>default</code> - The Capacity Reservation Fleet is created on hardware that is shared with other Amazon Web Services accounts.</p> </li>
        /// <li> <p> <code>dedicated</code> - The Capacity Reservation Fleet is created on single-tenant hardware that is dedicated to a single Amazon Web Services account.</p> </li>
        /// </ul>
        pub fn set_tenancy(
            mut self,
            input: std::option::Option<crate::model::FleetCapacityReservationTenancy>,
        ) -> Self {
            self.tenancy = input;
            self
        }
        /// <p>The date and time at which the Capacity Reservation Fleet expires.</p>
        pub fn end_date(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.end_date = Some(input);
            self
        }
        /// <p>The date and time at which the Capacity Reservation Fleet expires.</p>
        pub fn set_end_date(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.end_date = input;
            self
        }
        /// <p>The date and time at which the Capacity Reservation Fleet was created.</p>
        pub fn create_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.create_time = Some(input);
            self
        }
        /// <p>The date and time at which the Capacity Reservation Fleet was created.</p>
        pub fn set_create_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.create_time = input;
            self
        }
        /// <p>Indicates the type of instance launches that the Capacity Reservation Fleet accepts. All Capacity Reservations in the Fleet inherit this instance matching criteria.</p>
        /// <p>Currently, Capacity Reservation Fleets support <code>open</code> instance matching criteria only. This means that instances that have matching attributes (instance type, platform, and Availability Zone) run in the Capacity Reservations automatically. Instances do not need to explicitly target a Capacity Reservation Fleet to use its reserved capacity.</p>
        pub fn instance_match_criteria(
            mut self,
            input: crate::model::FleetInstanceMatchCriteria,
        ) -> Self {
            self.instance_match_criteria = Some(input);
            self
        }
        /// <p>Indicates the type of instance launches that the Capacity Reservation Fleet accepts. All Capacity Reservations in the Fleet inherit this instance matching criteria.</p>
        /// <p>Currently, Capacity Reservation Fleets support <code>open</code> instance matching criteria only. This means that instances that have matching attributes (instance type, platform, and Availability Zone) run in the Capacity Reservations automatically. Instances do not need to explicitly target a Capacity Reservation Fleet to use its reserved capacity.</p>
        pub fn set_instance_match_criteria(
            mut self,
            input: std::option::Option<crate::model::FleetInstanceMatchCriteria>,
        ) -> Self {
            self.instance_match_criteria = input;
            self
        }
        /// <p>The strategy used by the Capacity Reservation Fleet to determine which of the specified instance types to use. For more information, see For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/crfleet-concepts.html#allocation-strategy"> Allocation strategy</a> in the Amazon EC2 User Guide.</p>
        pub fn allocation_strategy(mut self, input: impl Into<std::string::String>) -> Self {
            self.allocation_strategy = Some(input.into());
            self
        }
        /// <p>The strategy used by the Capacity Reservation Fleet to determine which of the specified instance types to use. For more information, see For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/crfleet-concepts.html#allocation-strategy"> Allocation strategy</a> in the Amazon EC2 User Guide.</p>
        pub fn set_allocation_strategy(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.allocation_strategy = input;
            self
        }
        /// Appends an item to `instance_type_specifications`.
        ///
        /// To override the contents of this collection use [`set_instance_type_specifications`](Self::set_instance_type_specifications).
        ///
        /// <p>Information about the instance types for which to reserve the capacity.</p>
        pub fn instance_type_specifications(
            mut self,
            input: crate::model::FleetCapacityReservation,
        ) -> Self {
            let mut v = self.instance_type_specifications.unwrap_or_default();
            v.push(input);
            self.instance_type_specifications = Some(v);
            self
        }
        /// <p>Information about the instance types for which to reserve the capacity.</p>
        pub fn set_instance_type_specifications(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::FleetCapacityReservation>>,
        ) -> Self {
            self.instance_type_specifications = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>The tags assigned to the Capacity Reservation Fleet.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>The tags assigned to the Capacity Reservation Fleet.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// Consumes the builder and constructs a [`CapacityReservationFleet`](crate::model::CapacityReservationFleet).
        pub fn build(self) -> crate::model::CapacityReservationFleet {
            crate::model::CapacityReservationFleet {
                capacity_reservation_fleet_id: self.capacity_reservation_fleet_id,
                capacity_reservation_fleet_arn: self.capacity_reservation_fleet_arn,
                state: self.state,
                total_target_capacity: self.total_target_capacity,
                total_fulfilled_capacity: self.total_fulfilled_capacity,
                tenancy: self.tenancy,
                end_date: self.end_date,
                create_time: self.create_time,
                instance_match_criteria: self.instance_match_criteria,
                allocation_strategy: self.allocation_strategy,
                instance_type_specifications: self.instance_type_specifications,
                tags: self.tags,
            }
        }
    }
}
impl CapacityReservationFleet {
    /// Creates a new builder-style object to manufacture [`CapacityReservationFleet`](crate::model::CapacityReservationFleet).
    pub fn builder() -> crate::model::capacity_reservation_fleet::Builder {
        crate::model::capacity_reservation_fleet::Builder::default()
    }
}

/// <p>Information about a Capacity Reservation in a Capacity Reservation Fleet.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct FleetCapacityReservation {
    /// <p>The ID of the Capacity Reservation.</p>
    #[doc(hidden)]
    pub capacity_reservation_id: std::option::Option<std::string::String>,
    /// <p>The ID of the Availability Zone in which the Capacity Reservation reserves capacity.</p>
    #[doc(hidden)]
    pub availability_zone_id: std::option::Option<std::string::String>,
    /// <p>The instance type for which the Capacity Reservation reserves capacity.</p>
    #[doc(hidden)]
    pub instance_type: std::option::Option<crate::model::InstanceType>,
    /// <p>The type of operating system for which the Capacity Reservation reserves capacity.</p>
    #[doc(hidden)]
    pub instance_platform: std::option::Option<crate::model::CapacityReservationInstancePlatform>,
    /// <p>The Availability Zone in which the Capacity Reservation reserves capacity.</p>
    #[doc(hidden)]
    pub availability_zone: std::option::Option<std::string::String>,
    /// <p>The total number of instances for which the Capacity Reservation reserves capacity.</p>
    #[doc(hidden)]
    pub total_instance_count: std::option::Option<i32>,
    /// <p>The number of capacity units fulfilled by the Capacity Reservation. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/crfleet-concepts.html#target-capacity"> Total target capacity</a> in the Amazon EC2 User Guide.</p>
    #[doc(hidden)]
    pub fulfilled_capacity: std::option::Option<f64>,
    /// <p>Indicates whether the Capacity Reservation reserves capacity for EBS-optimized instance types.</p>
    #[doc(hidden)]
    pub ebs_optimized: std::option::Option<bool>,
    /// <p>The date and time at which the Capacity Reservation was created.</p>
    #[doc(hidden)]
    pub create_date: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The weight of the instance type in the Capacity Reservation Fleet. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/crfleet-concepts.html#instance-weight"> Instance type weight</a> in the Amazon EC2 User Guide.</p>
    #[doc(hidden)]
    pub weight: std::option::Option<f64>,
    /// <p>The priority of the instance type in the Capacity Reservation Fleet. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/crfleet-concepts.html#instance-priority"> Instance type priority</a> in the Amazon EC2 User Guide.</p>
    #[doc(hidden)]
    pub priority: std::option::Option<i32>,
}
impl FleetCapacityReservation {
    /// <p>The ID of the Capacity Reservation.</p>
    pub fn capacity_reservation_id(&self) -> std::option::Option<&str> {
        self.capacity_reservation_id.as_deref()
    }
    /// <p>The ID of the Availability Zone in which the Capacity Reservation reserves capacity.</p>
    pub fn availability_zone_id(&self) -> std::option::Option<&str> {
        self.availability_zone_id.as_deref()
    }
    /// <p>The instance type for which the Capacity Reservation reserves capacity.</p>
    pub fn instance_type(&self) -> std::option::Option<&crate::model::InstanceType> {
        self.instance_type.as_ref()
    }
    /// <p>The type of operating system for which the Capacity Reservation reserves capacity.</p>
    pub fn instance_platform(
        &self,
    ) -> std::option::Option<&crate::model::CapacityReservationInstancePlatform> {
        self.instance_platform.as_ref()
    }
    /// <p>The Availability Zone in which the Capacity Reservation reserves capacity.</p>
    pub fn availability_zone(&self) -> std::option::Option<&str> {
        self.availability_zone.as_deref()
    }
    /// <p>The total number of instances for which the Capacity Reservation reserves capacity.</p>
    pub fn total_instance_count(&self) -> std::option::Option<i32> {
        self.total_instance_count
    }
    /// <p>The number of capacity units fulfilled by the Capacity Reservation. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/crfleet-concepts.html#target-capacity"> Total target capacity</a> in the Amazon EC2 User Guide.</p>
    pub fn fulfilled_capacity(&self) -> std::option::Option<f64> {
        self.fulfilled_capacity
    }
    /// <p>Indicates whether the Capacity Reservation reserves capacity for EBS-optimized instance types.</p>
    pub fn ebs_optimized(&self) -> std::option::Option<bool> {
        self.ebs_optimized
    }
    /// <p>The date and time at which the Capacity Reservation was created.</p>
    pub fn create_date(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.create_date.as_ref()
    }
    /// <p>The weight of the instance type in the Capacity Reservation Fleet. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/crfleet-concepts.html#instance-weight"> Instance type weight</a> in the Amazon EC2 User Guide.</p>
    pub fn weight(&self) -> std::option::Option<f64> {
        self.weight
    }
    /// <p>The priority of the instance type in the Capacity Reservation Fleet. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/crfleet-concepts.html#instance-priority"> Instance type priority</a> in the Amazon EC2 User Guide.</p>
    pub fn priority(&self) -> std::option::Option<i32> {
        self.priority
    }
}
/// See [`FleetCapacityReservation`](crate::model::FleetCapacityReservation).
pub mod fleet_capacity_reservation {

    /// A builder for [`FleetCapacityReservation`](crate::model::FleetCapacityReservation).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) capacity_reservation_id: std::option::Option<std::string::String>,
        pub(crate) availability_zone_id: std::option::Option<std::string::String>,
        pub(crate) instance_type: std::option::Option<crate::model::InstanceType>,
        pub(crate) instance_platform:
            std::option::Option<crate::model::CapacityReservationInstancePlatform>,
        pub(crate) availability_zone: std::option::Option<std::string::String>,
        pub(crate) total_instance_count: std::option::Option<i32>,
        pub(crate) fulfilled_capacity: std::option::Option<f64>,
        pub(crate) ebs_optimized: std::option::Option<bool>,
        pub(crate) create_date: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) weight: std::option::Option<f64>,
        pub(crate) priority: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>The ID of the Capacity Reservation.</p>
        pub fn capacity_reservation_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.capacity_reservation_id = Some(input.into());
            self
        }
        /// <p>The ID of the Capacity Reservation.</p>
        pub fn set_capacity_reservation_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.capacity_reservation_id = input;
            self
        }
        /// <p>The ID of the Availability Zone in which the Capacity Reservation reserves capacity.</p>
        pub fn availability_zone_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.availability_zone_id = Some(input.into());
            self
        }
        /// <p>The ID of the Availability Zone in which the Capacity Reservation reserves capacity.</p>
        pub fn set_availability_zone_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.availability_zone_id = input;
            self
        }
        /// <p>The instance type for which the Capacity Reservation reserves capacity.</p>
        pub fn instance_type(mut self, input: crate::model::InstanceType) -> Self {
            self.instance_type = Some(input);
            self
        }
        /// <p>The instance type for which the Capacity Reservation reserves capacity.</p>
        pub fn set_instance_type(
            mut self,
            input: std::option::Option<crate::model::InstanceType>,
        ) -> Self {
            self.instance_type = input;
            self
        }
        /// <p>The type of operating system for which the Capacity Reservation reserves capacity.</p>
        pub fn instance_platform(
            mut self,
            input: crate::model::CapacityReservationInstancePlatform,
        ) -> Self {
            self.instance_platform = Some(input);
            self
        }
        /// <p>The type of operating system for which the Capacity Reservation reserves capacity.</p>
        pub fn set_instance_platform(
            mut self,
            input: std::option::Option<crate::model::CapacityReservationInstancePlatform>,
        ) -> Self {
            self.instance_platform = input;
            self
        }
        /// <p>The Availability Zone in which the Capacity Reservation reserves capacity.</p>
        pub fn availability_zone(mut self, input: impl Into<std::string::String>) -> Self {
            self.availability_zone = Some(input.into());
            self
        }
        /// <p>The Availability Zone in which the Capacity Reservation reserves capacity.</p>
        pub fn set_availability_zone(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.availability_zone = input;
            self
        }
        /// <p>The total number of instances for which the Capacity Reservation reserves capacity.</p>
        pub fn total_instance_count(mut self, input: i32) -> Self {
            self.total_instance_count = Some(input);
            self
        }
        /// <p>The total number of instances for which the Capacity Reservation reserves capacity.</p>
        pub fn set_total_instance_count(mut self, input: std::option::Option<i32>) -> Self {
            self.total_instance_count = input;
            self
        }
        /// <p>The number of capacity units fulfilled by the Capacity Reservation. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/crfleet-concepts.html#target-capacity"> Total target capacity</a> in the Amazon EC2 User Guide.</p>
        pub fn fulfilled_capacity(mut self, input: f64) -> Self {
            self.fulfilled_capacity = Some(input);
            self
        }
        /// <p>The number of capacity units fulfilled by the Capacity Reservation. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/crfleet-concepts.html#target-capacity"> Total target capacity</a> in the Amazon EC2 User Guide.</p>
        pub fn set_fulfilled_capacity(mut self, input: std::option::Option<f64>) -> Self {
            self.fulfilled_capacity = input;
            self
        }
        /// <p>Indicates whether the Capacity Reservation reserves capacity for EBS-optimized instance types.</p>
        pub fn ebs_optimized(mut self, input: bool) -> Self {
            self.ebs_optimized = Some(input);
            self
        }
        /// <p>Indicates whether the Capacity Reservation reserves capacity for EBS-optimized instance types.</p>
        pub fn set_ebs_optimized(mut self, input: std::option::Option<bool>) -> Self {
            self.ebs_optimized = input;
            self
        }
        /// <p>The date and time at which the Capacity Reservation was created.</p>
        pub fn create_date(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.create_date = Some(input);
            self
        }
        /// <p>The date and time at which the Capacity Reservation was created.</p>
        pub fn set_create_date(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.create_date = input;
            self
        }
        /// <p>The weight of the instance type in the Capacity Reservation Fleet. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/crfleet-concepts.html#instance-weight"> Instance type weight</a> in the Amazon EC2 User Guide.</p>
        pub fn weight(mut self, input: f64) -> Self {
            self.weight = Some(input);
            self
        }
        /// <p>The weight of the instance type in the Capacity Reservation Fleet. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/crfleet-concepts.html#instance-weight"> Instance type weight</a> in the Amazon EC2 User Guide.</p>
        pub fn set_weight(mut self, input: std::option::Option<f64>) -> Self {
            self.weight = input;
            self
        }
        /// <p>The priority of the instance type in the Capacity Reservation Fleet. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/crfleet-concepts.html#instance-priority"> Instance type priority</a> in the Amazon EC2 User Guide.</p>
        pub fn priority(mut self, input: i32) -> Self {
            self.priority = Some(input);
            self
        }
        /// <p>The priority of the instance type in the Capacity Reservation Fleet. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/crfleet-concepts.html#instance-priority"> Instance type priority</a> in the Amazon EC2 User Guide.</p>
        pub fn set_priority(mut self, input: std::option::Option<i32>) -> Self {
            self.priority = input;
            self
        }
        /// Consumes the builder and constructs a [`FleetCapacityReservation`](crate::model::FleetCapacityReservation).
        pub fn build(self) -> crate::model::FleetCapacityReservation {
            crate::model::FleetCapacityReservation {
                capacity_reservation_id: self.capacity_reservation_id,
                availability_zone_id: self.availability_zone_id,
                instance_type: self.instance_type,
                instance_platform: self.instance_platform,
                availability_zone: self.availability_zone,
                total_instance_count: self.total_instance_count,
                fulfilled_capacity: self.fulfilled_capacity,
                ebs_optimized: self.ebs_optimized,
                create_date: self.create_date,
                weight: self.weight,
                priority: self.priority,
            }
        }
    }
}
impl FleetCapacityReservation {
    /// Creates a new builder-style object to manufacture [`FleetCapacityReservation`](crate::model::FleetCapacityReservation).
    pub fn builder() -> crate::model::fleet_capacity_reservation::Builder {
        crate::model::fleet_capacity_reservation::Builder::default()
    }
}

/// When writing a match expression against `FleetInstanceMatchCriteria`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let fleetinstancematchcriteria = unimplemented!();
/// match fleetinstancematchcriteria {
///     FleetInstanceMatchCriteria::Open => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `fleetinstancematchcriteria` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `FleetInstanceMatchCriteria::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `FleetInstanceMatchCriteria::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `FleetInstanceMatchCriteria::NewFeature` is defined.
/// Specifically, when `fleetinstancematchcriteria` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `FleetInstanceMatchCriteria::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 FleetInstanceMatchCriteria {
    #[allow(missing_docs)] // documentation missing in model
    Open,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for FleetInstanceMatchCriteria {
    fn from(s: &str) -> Self {
        match s {
            "open" => FleetInstanceMatchCriteria::Open,
            other => FleetInstanceMatchCriteria::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for FleetInstanceMatchCriteria {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(FleetInstanceMatchCriteria::from(s))
    }
}
impl FleetInstanceMatchCriteria {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            FleetInstanceMatchCriteria::Open => "open",
            FleetInstanceMatchCriteria::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["open"]
    }
}
impl AsRef<str> for FleetInstanceMatchCriteria {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `FleetCapacityReservationTenancy`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let fleetcapacityreservationtenancy = unimplemented!();
/// match fleetcapacityreservationtenancy {
///     FleetCapacityReservationTenancy::Default => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `fleetcapacityreservationtenancy` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `FleetCapacityReservationTenancy::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `FleetCapacityReservationTenancy::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `FleetCapacityReservationTenancy::NewFeature` is defined.
/// Specifically, when `fleetcapacityreservationtenancy` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `FleetCapacityReservationTenancy::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 FleetCapacityReservationTenancy {
    #[allow(missing_docs)] // documentation missing in model
    Default,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for FleetCapacityReservationTenancy {
    fn from(s: &str) -> Self {
        match s {
            "default" => FleetCapacityReservationTenancy::Default,
            other => FleetCapacityReservationTenancy::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for FleetCapacityReservationTenancy {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(FleetCapacityReservationTenancy::from(s))
    }
}
impl FleetCapacityReservationTenancy {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            FleetCapacityReservationTenancy::Default => "default",
            FleetCapacityReservationTenancy::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["default"]
    }
}
impl AsRef<str> for FleetCapacityReservationTenancy {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `CapacityReservationFleetState`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let capacityreservationfleetstate = unimplemented!();
/// match capacityreservationfleetstate {
///     CapacityReservationFleetState::Active => { /* ... */ },
///     CapacityReservationFleetState::Cancelled => { /* ... */ },
///     CapacityReservationFleetState::Cancelling => { /* ... */ },
///     CapacityReservationFleetState::Expired => { /* ... */ },
///     CapacityReservationFleetState::Expiring => { /* ... */ },
///     CapacityReservationFleetState::Failed => { /* ... */ },
///     CapacityReservationFleetState::Modifying => { /* ... */ },
///     CapacityReservationFleetState::PartiallyFulfilled => { /* ... */ },
///     CapacityReservationFleetState::Submitted => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `capacityreservationfleetstate` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `CapacityReservationFleetState::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `CapacityReservationFleetState::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `CapacityReservationFleetState::NewFeature` is defined.
/// Specifically, when `capacityreservationfleetstate` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `CapacityReservationFleetState::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 CapacityReservationFleetState {
    #[allow(missing_docs)] // documentation missing in model
    Active,
    #[allow(missing_docs)] // documentation missing in model
    Cancelled,
    #[allow(missing_docs)] // documentation missing in model
    Cancelling,
    #[allow(missing_docs)] // documentation missing in model
    Expired,
    #[allow(missing_docs)] // documentation missing in model
    Expiring,
    #[allow(missing_docs)] // documentation missing in model
    Failed,
    #[allow(missing_docs)] // documentation missing in model
    Modifying,
    #[allow(missing_docs)] // documentation missing in model
    PartiallyFulfilled,
    #[allow(missing_docs)] // documentation missing in model
    Submitted,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for CapacityReservationFleetState {
    fn from(s: &str) -> Self {
        match s {
            "active" => CapacityReservationFleetState::Active,
            "cancelled" => CapacityReservationFleetState::Cancelled,
            "cancelling" => CapacityReservationFleetState::Cancelling,
            "expired" => CapacityReservationFleetState::Expired,
            "expiring" => CapacityReservationFleetState::Expiring,
            "failed" => CapacityReservationFleetState::Failed,
            "modifying" => CapacityReservationFleetState::Modifying,
            "partially_fulfilled" => CapacityReservationFleetState::PartiallyFulfilled,
            "submitted" => CapacityReservationFleetState::Submitted,
            other => CapacityReservationFleetState::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for CapacityReservationFleetState {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(CapacityReservationFleetState::from(s))
    }
}
impl CapacityReservationFleetState {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            CapacityReservationFleetState::Active => "active",
            CapacityReservationFleetState::Cancelled => "cancelled",
            CapacityReservationFleetState::Cancelling => "cancelling",
            CapacityReservationFleetState::Expired => "expired",
            CapacityReservationFleetState::Expiring => "expiring",
            CapacityReservationFleetState::Failed => "failed",
            CapacityReservationFleetState::Modifying => "modifying",
            CapacityReservationFleetState::PartiallyFulfilled => "partially_fulfilled",
            CapacityReservationFleetState::Submitted => "submitted",
            CapacityReservationFleetState::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &[
            "active",
            "cancelled",
            "cancelling",
            "expired",
            "expiring",
            "failed",
            "modifying",
            "partially_fulfilled",
            "submitted",
        ]
    }
}
impl AsRef<str> for CapacityReservationFleetState {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes a bundle task.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct BundleTask {
    /// <p>The ID of the bundle task.</p>
    #[doc(hidden)]
    pub bundle_id: std::option::Option<std::string::String>,
    /// <p>If the task fails, a description of the error.</p>
    #[doc(hidden)]
    pub bundle_task_error: std::option::Option<crate::model::BundleTaskError>,
    /// <p>The ID of the instance associated with this bundle task.</p>
    #[doc(hidden)]
    pub instance_id: std::option::Option<std::string::String>,
    /// <p>The level of task completion, as a percent (for example, 20%).</p>
    #[doc(hidden)]
    pub progress: std::option::Option<std::string::String>,
    /// <p>The time this task started.</p>
    #[doc(hidden)]
    pub start_time: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The state of the task.</p>
    #[doc(hidden)]
    pub state: std::option::Option<crate::model::BundleTaskState>,
    /// <p>The Amazon S3 storage locations.</p>
    #[doc(hidden)]
    pub storage: std::option::Option<crate::model::Storage>,
    /// <p>The time of the most recent update for the task.</p>
    #[doc(hidden)]
    pub update_time: std::option::Option<aws_smithy_types::DateTime>,
}
impl BundleTask {
    /// <p>The ID of the bundle task.</p>
    pub fn bundle_id(&self) -> std::option::Option<&str> {
        self.bundle_id.as_deref()
    }
    /// <p>If the task fails, a description of the error.</p>
    pub fn bundle_task_error(&self) -> std::option::Option<&crate::model::BundleTaskError> {
        self.bundle_task_error.as_ref()
    }
    /// <p>The ID of the instance associated with this bundle task.</p>
    pub fn instance_id(&self) -> std::option::Option<&str> {
        self.instance_id.as_deref()
    }
    /// <p>The level of task completion, as a percent (for example, 20%).</p>
    pub fn progress(&self) -> std::option::Option<&str> {
        self.progress.as_deref()
    }
    /// <p>The time this task started.</p>
    pub fn start_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.start_time.as_ref()
    }
    /// <p>The state of the task.</p>
    pub fn state(&self) -> std::option::Option<&crate::model::BundleTaskState> {
        self.state.as_ref()
    }
    /// <p>The Amazon S3 storage locations.</p>
    pub fn storage(&self) -> std::option::Option<&crate::model::Storage> {
        self.storage.as_ref()
    }
    /// <p>The time of the most recent update for the task.</p>
    pub fn update_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.update_time.as_ref()
    }
}
/// See [`BundleTask`](crate::model::BundleTask).
pub mod bundle_task {

    /// A builder for [`BundleTask`](crate::model::BundleTask).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) bundle_id: std::option::Option<std::string::String>,
        pub(crate) bundle_task_error: std::option::Option<crate::model::BundleTaskError>,
        pub(crate) instance_id: std::option::Option<std::string::String>,
        pub(crate) progress: std::option::Option<std::string::String>,
        pub(crate) start_time: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) state: std::option::Option<crate::model::BundleTaskState>,
        pub(crate) storage: std::option::Option<crate::model::Storage>,
        pub(crate) update_time: std::option::Option<aws_smithy_types::DateTime>,
    }
    impl Builder {
        /// <p>The ID of the bundle task.</p>
        pub fn bundle_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.bundle_id = Some(input.into());
            self
        }
        /// <p>The ID of the bundle task.</p>
        pub fn set_bundle_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.bundle_id = input;
            self
        }
        /// <p>If the task fails, a description of the error.</p>
        pub fn bundle_task_error(mut self, input: crate::model::BundleTaskError) -> Self {
            self.bundle_task_error = Some(input);
            self
        }
        /// <p>If the task fails, a description of the error.</p>
        pub fn set_bundle_task_error(
            mut self,
            input: std::option::Option<crate::model::BundleTaskError>,
        ) -> Self {
            self.bundle_task_error = input;
            self
        }
        /// <p>The ID of the instance associated with this bundle task.</p>
        pub fn instance_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.instance_id = Some(input.into());
            self
        }
        /// <p>The ID of the instance associated with this bundle task.</p>
        pub fn set_instance_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.instance_id = input;
            self
        }
        /// <p>The level of task completion, as a percent (for example, 20%).</p>
        pub fn progress(mut self, input: impl Into<std::string::String>) -> Self {
            self.progress = Some(input.into());
            self
        }
        /// <p>The level of task completion, as a percent (for example, 20%).</p>
        pub fn set_progress(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.progress = input;
            self
        }
        /// <p>The time this task started.</p>
        pub fn start_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.start_time = Some(input);
            self
        }
        /// <p>The time this task started.</p>
        pub fn set_start_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.start_time = input;
            self
        }
        /// <p>The state of the task.</p>
        pub fn state(mut self, input: crate::model::BundleTaskState) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>The state of the task.</p>
        pub fn set_state(
            mut self,
            input: std::option::Option<crate::model::BundleTaskState>,
        ) -> Self {
            self.state = input;
            self
        }
        /// <p>The Amazon S3 storage locations.</p>
        pub fn storage(mut self, input: crate::model::Storage) -> Self {
            self.storage = Some(input);
            self
        }
        /// <p>The Amazon S3 storage locations.</p>
        pub fn set_storage(mut self, input: std::option::Option<crate::model::Storage>) -> Self {
            self.storage = input;
            self
        }
        /// <p>The time of the most recent update for the task.</p>
        pub fn update_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.update_time = Some(input);
            self
        }
        /// <p>The time of the most recent update for the task.</p>
        pub fn set_update_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.update_time = input;
            self
        }
        /// Consumes the builder and constructs a [`BundleTask`](crate::model::BundleTask).
        pub fn build(self) -> crate::model::BundleTask {
            crate::model::BundleTask {
                bundle_id: self.bundle_id,
                bundle_task_error: self.bundle_task_error,
                instance_id: self.instance_id,
                progress: self.progress,
                start_time: self.start_time,
                state: self.state,
                storage: self.storage,
                update_time: self.update_time,
            }
        }
    }
}
impl BundleTask {
    /// Creates a new builder-style object to manufacture [`BundleTask`](crate::model::BundleTask).
    pub fn builder() -> crate::model::bundle_task::Builder {
        crate::model::bundle_task::Builder::default()
    }
}

/// <p>Describes the storage location for an instance store-backed AMI.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Storage {
    /// <p>An Amazon S3 storage location.</p>
    #[doc(hidden)]
    pub s3: std::option::Option<crate::model::S3Storage>,
}
impl Storage {
    /// <p>An Amazon S3 storage location.</p>
    pub fn s3(&self) -> std::option::Option<&crate::model::S3Storage> {
        self.s3.as_ref()
    }
}
/// See [`Storage`](crate::model::Storage).
pub mod storage {

    /// A builder for [`Storage`](crate::model::Storage).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) s3: std::option::Option<crate::model::S3Storage>,
    }
    impl Builder {
        /// <p>An Amazon S3 storage location.</p>
        pub fn s3(mut self, input: crate::model::S3Storage) -> Self {
            self.s3 = Some(input);
            self
        }
        /// <p>An Amazon S3 storage location.</p>
        pub fn set_s3(mut self, input: std::option::Option<crate::model::S3Storage>) -> Self {
            self.s3 = input;
            self
        }
        /// Consumes the builder and constructs a [`Storage`](crate::model::Storage).
        pub fn build(self) -> crate::model::Storage {
            crate::model::Storage { s3: self.s3 }
        }
    }
}
impl Storage {
    /// Creates a new builder-style object to manufacture [`Storage`](crate::model::Storage).
    pub fn builder() -> crate::model::storage::Builder {
        crate::model::storage::Builder::default()
    }
}

/// <p>Describes the storage parameters for Amazon S3 and Amazon S3 buckets for an instance store-backed AMI.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct S3Storage {
    /// <p>The access key ID of the owner of the bucket. Before you specify a value for your access key ID, review and follow the guidance in <a href="https://docs.aws.amazon.com/general/latest/gr/aws-access-keys-best-practices.html">Best practices for managing Amazon Web Services access keys</a>.</p>
    #[doc(hidden)]
    pub aws_access_key_id: std::option::Option<std::string::String>,
    /// <p>The bucket in which to store the AMI. You can specify a bucket that you already own or a new bucket that Amazon EC2 creates on your behalf. If you specify a bucket that belongs to someone else, Amazon EC2 returns an error.</p>
    #[doc(hidden)]
    pub bucket: std::option::Option<std::string::String>,
    /// <p>The beginning of the file name of the AMI.</p>
    #[doc(hidden)]
    pub prefix: std::option::Option<std::string::String>,
    /// <p>An Amazon S3 upload policy that gives Amazon EC2 permission to upload items into Amazon S3 on your behalf.</p>
    #[doc(hidden)]
    pub upload_policy: std::option::Option<aws_smithy_types::Blob>,
    /// <p>The signature of the JSON document.</p>
    #[doc(hidden)]
    pub upload_policy_signature: std::option::Option<std::string::String>,
}
impl S3Storage {
    /// <p>The access key ID of the owner of the bucket. Before you specify a value for your access key ID, review and follow the guidance in <a href="https://docs.aws.amazon.com/general/latest/gr/aws-access-keys-best-practices.html">Best practices for managing Amazon Web Services access keys</a>.</p>
    pub fn aws_access_key_id(&self) -> std::option::Option<&str> {
        self.aws_access_key_id.as_deref()
    }
    /// <p>The bucket in which to store the AMI. You can specify a bucket that you already own or a new bucket that Amazon EC2 creates on your behalf. If you specify a bucket that belongs to someone else, Amazon EC2 returns an error.</p>
    pub fn bucket(&self) -> std::option::Option<&str> {
        self.bucket.as_deref()
    }
    /// <p>The beginning of the file name of the AMI.</p>
    pub fn prefix(&self) -> std::option::Option<&str> {
        self.prefix.as_deref()
    }
    /// <p>An Amazon S3 upload policy that gives Amazon EC2 permission to upload items into Amazon S3 on your behalf.</p>
    pub fn upload_policy(&self) -> std::option::Option<&aws_smithy_types::Blob> {
        self.upload_policy.as_ref()
    }
    /// <p>The signature of the JSON document.</p>
    pub fn upload_policy_signature(&self) -> std::option::Option<&str> {
        self.upload_policy_signature.as_deref()
    }
}
/// See [`S3Storage`](crate::model::S3Storage).
pub mod s3_storage {

    /// A builder for [`S3Storage`](crate::model::S3Storage).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) aws_access_key_id: std::option::Option<std::string::String>,
        pub(crate) bucket: std::option::Option<std::string::String>,
        pub(crate) prefix: std::option::Option<std::string::String>,
        pub(crate) upload_policy: std::option::Option<aws_smithy_types::Blob>,
        pub(crate) upload_policy_signature: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The access key ID of the owner of the bucket. Before you specify a value for your access key ID, review and follow the guidance in <a href="https://docs.aws.amazon.com/general/latest/gr/aws-access-keys-best-practices.html">Best practices for managing Amazon Web Services access keys</a>.</p>
        pub fn aws_access_key_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.aws_access_key_id = Some(input.into());
            self
        }
        /// <p>The access key ID of the owner of the bucket. Before you specify a value for your access key ID, review and follow the guidance in <a href="https://docs.aws.amazon.com/general/latest/gr/aws-access-keys-best-practices.html">Best practices for managing Amazon Web Services access keys</a>.</p>
        pub fn set_aws_access_key_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.aws_access_key_id = input;
            self
        }
        /// <p>The bucket in which to store the AMI. You can specify a bucket that you already own or a new bucket that Amazon EC2 creates on your behalf. If you specify a bucket that belongs to someone else, Amazon EC2 returns an error.</p>
        pub fn bucket(mut self, input: impl Into<std::string::String>) -> Self {
            self.bucket = Some(input.into());
            self
        }
        /// <p>The bucket in which to store the AMI. You can specify a bucket that you already own or a new bucket that Amazon EC2 creates on your behalf. If you specify a bucket that belongs to someone else, Amazon EC2 returns an error.</p>
        pub fn set_bucket(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.bucket = input;
            self
        }
        /// <p>The beginning of the file name of the AMI.</p>
        pub fn prefix(mut self, input: impl Into<std::string::String>) -> Self {
            self.prefix = Some(input.into());
            self
        }
        /// <p>The beginning of the file name of the AMI.</p>
        pub fn set_prefix(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.prefix = input;
            self
        }
        /// <p>An Amazon S3 upload policy that gives Amazon EC2 permission to upload items into Amazon S3 on your behalf.</p>
        pub fn upload_policy(mut self, input: aws_smithy_types::Blob) -> Self {
            self.upload_policy = Some(input);
            self
        }
        /// <p>An Amazon S3 upload policy that gives Amazon EC2 permission to upload items into Amazon S3 on your behalf.</p>
        pub fn set_upload_policy(
            mut self,
            input: std::option::Option<aws_smithy_types::Blob>,
        ) -> Self {
            self.upload_policy = input;
            self
        }
        /// <p>The signature of the JSON document.</p>
        pub fn upload_policy_signature(mut self, input: impl Into<std::string::String>) -> Self {
            self.upload_policy_signature = Some(input.into());
            self
        }
        /// <p>The signature of the JSON document.</p>
        pub fn set_upload_policy_signature(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.upload_policy_signature = input;
            self
        }
        /// Consumes the builder and constructs a [`S3Storage`](crate::model::S3Storage).
        pub fn build(self) -> crate::model::S3Storage {
            crate::model::S3Storage {
                aws_access_key_id: self.aws_access_key_id,
                bucket: self.bucket,
                prefix: self.prefix,
                upload_policy: self.upload_policy,
                upload_policy_signature: self.upload_policy_signature,
            }
        }
    }
}
impl S3Storage {
    /// Creates a new builder-style object to manufacture [`S3Storage`](crate::model::S3Storage).
    pub fn builder() -> crate::model::s3_storage::Builder {
        crate::model::s3_storage::Builder::default()
    }
}

/// When writing a match expression against `BundleTaskState`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let bundletaskstate = unimplemented!();
/// match bundletaskstate {
///     BundleTaskState::Bundling => { /* ... */ },
///     BundleTaskState::Cancelling => { /* ... */ },
///     BundleTaskState::Complete => { /* ... */ },
///     BundleTaskState::Failed => { /* ... */ },
///     BundleTaskState::Pending => { /* ... */ },
///     BundleTaskState::Storing => { /* ... */ },
///     BundleTaskState::WaitingForShutdown => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `bundletaskstate` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `BundleTaskState::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `BundleTaskState::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `BundleTaskState::NewFeature` is defined.
/// Specifically, when `bundletaskstate` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `BundleTaskState::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 BundleTaskState {
    #[allow(missing_docs)] // documentation missing in model
    Bundling,
    #[allow(missing_docs)] // documentation missing in model
    Cancelling,
    #[allow(missing_docs)] // documentation missing in model
    Complete,
    #[allow(missing_docs)] // documentation missing in model
    Failed,
    #[allow(missing_docs)] // documentation missing in model
    Pending,
    #[allow(missing_docs)] // documentation missing in model
    Storing,
    #[allow(missing_docs)] // documentation missing in model
    WaitingForShutdown,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for BundleTaskState {
    fn from(s: &str) -> Self {
        match s {
            "bundling" => BundleTaskState::Bundling,
            "cancelling" => BundleTaskState::Cancelling,
            "complete" => BundleTaskState::Complete,
            "failed" => BundleTaskState::Failed,
            "pending" => BundleTaskState::Pending,
            "storing" => BundleTaskState::Storing,
            "waiting-for-shutdown" => BundleTaskState::WaitingForShutdown,
            other => BundleTaskState::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for BundleTaskState {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(BundleTaskState::from(s))
    }
}
impl BundleTaskState {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            BundleTaskState::Bundling => "bundling",
            BundleTaskState::Cancelling => "cancelling",
            BundleTaskState::Complete => "complete",
            BundleTaskState::Failed => "failed",
            BundleTaskState::Pending => "pending",
            BundleTaskState::Storing => "storing",
            BundleTaskState::WaitingForShutdown => "waiting-for-shutdown",
            BundleTaskState::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &[
            "bundling",
            "cancelling",
            "complete",
            "failed",
            "pending",
            "storing",
            "waiting-for-shutdown",
        ]
    }
}
impl AsRef<str> for BundleTaskState {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes an error for <code>BundleInstance</code>.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct BundleTaskError {
    /// <p>The error code.</p>
    #[doc(hidden)]
    pub code: std::option::Option<std::string::String>,
    /// <p>The error message.</p>
    #[doc(hidden)]
    pub message: std::option::Option<std::string::String>,
}
impl BundleTaskError {
    /// <p>The error code.</p>
    pub fn code(&self) -> std::option::Option<&str> {
        self.code.as_deref()
    }
    /// <p>The error message.</p>
    pub fn message(&self) -> std::option::Option<&str> {
        self.message.as_deref()
    }
}
/// See [`BundleTaskError`](crate::model::BundleTaskError).
pub mod bundle_task_error {

    /// A builder for [`BundleTaskError`](crate::model::BundleTaskError).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) code: std::option::Option<std::string::String>,
        pub(crate) message: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The error code.</p>
        pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
            self.code = Some(input.into());
            self
        }
        /// <p>The error code.</p>
        pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.code = input;
            self
        }
        /// <p>The error message.</p>
        pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
            self.message = Some(input.into());
            self
        }
        /// <p>The error message.</p>
        pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.message = input;
            self
        }
        /// Consumes the builder and constructs a [`BundleTaskError`](crate::model::BundleTaskError).
        pub fn build(self) -> crate::model::BundleTaskError {
            crate::model::BundleTaskError {
                code: self.code,
                message: self.message,
            }
        }
    }
}
impl BundleTaskError {
    /// Creates a new builder-style object to manufacture [`BundleTaskError`](crate::model::BundleTaskError).
    pub fn builder() -> crate::model::bundle_task_error::Builder {
        crate::model::bundle_task_error::Builder::default()
    }
}

/// <p>Describes an Infrastructure Performance subscription.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Subscription {
    /// <p>The Region or Availability Zone that's the source for the subscription. For example, <code>us-east-1</code>.</p>
    #[doc(hidden)]
    pub source: std::option::Option<std::string::String>,
    /// <p>The Region or Availability Zone that's the target for the subscription. For example, <code>eu-west-1</code>.</p>
    #[doc(hidden)]
    pub destination: std::option::Option<std::string::String>,
    /// <p>The metric used for the subscription.</p>
    #[doc(hidden)]
    pub metric: std::option::Option<crate::model::MetricType>,
    /// <p>The statistic used for the subscription.</p>
    #[doc(hidden)]
    pub statistic: std::option::Option<crate::model::StatisticType>,
    /// <p>The data aggregation time for the subscription.</p>
    #[doc(hidden)]
    pub period: std::option::Option<crate::model::PeriodType>,
}
impl Subscription {
    /// <p>The Region or Availability Zone that's the source for the subscription. For example, <code>us-east-1</code>.</p>
    pub fn source(&self) -> std::option::Option<&str> {
        self.source.as_deref()
    }
    /// <p>The Region or Availability Zone that's the target for the subscription. For example, <code>eu-west-1</code>.</p>
    pub fn destination(&self) -> std::option::Option<&str> {
        self.destination.as_deref()
    }
    /// <p>The metric used for the subscription.</p>
    pub fn metric(&self) -> std::option::Option<&crate::model::MetricType> {
        self.metric.as_ref()
    }
    /// <p>The statistic used for the subscription.</p>
    pub fn statistic(&self) -> std::option::Option<&crate::model::StatisticType> {
        self.statistic.as_ref()
    }
    /// <p>The data aggregation time for the subscription.</p>
    pub fn period(&self) -> std::option::Option<&crate::model::PeriodType> {
        self.period.as_ref()
    }
}
/// See [`Subscription`](crate::model::Subscription).
pub mod subscription {

    /// A builder for [`Subscription`](crate::model::Subscription).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) source: std::option::Option<std::string::String>,
        pub(crate) destination: std::option::Option<std::string::String>,
        pub(crate) metric: std::option::Option<crate::model::MetricType>,
        pub(crate) statistic: std::option::Option<crate::model::StatisticType>,
        pub(crate) period: std::option::Option<crate::model::PeriodType>,
    }
    impl Builder {
        /// <p>The Region or Availability Zone that's the source for the subscription. For example, <code>us-east-1</code>.</p>
        pub fn source(mut self, input: impl Into<std::string::String>) -> Self {
            self.source = Some(input.into());
            self
        }
        /// <p>The Region or Availability Zone that's the source for the subscription. For example, <code>us-east-1</code>.</p>
        pub fn set_source(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.source = input;
            self
        }
        /// <p>The Region or Availability Zone that's the target for the subscription. For example, <code>eu-west-1</code>.</p>
        pub fn destination(mut self, input: impl Into<std::string::String>) -> Self {
            self.destination = Some(input.into());
            self
        }
        /// <p>The Region or Availability Zone that's the target for the subscription. For example, <code>eu-west-1</code>.</p>
        pub fn set_destination(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.destination = input;
            self
        }
        /// <p>The metric used for the subscription.</p>
        pub fn metric(mut self, input: crate::model::MetricType) -> Self {
            self.metric = Some(input);
            self
        }
        /// <p>The metric used for the subscription.</p>
        pub fn set_metric(mut self, input: std::option::Option<crate::model::MetricType>) -> Self {
            self.metric = input;
            self
        }
        /// <p>The statistic used for the subscription.</p>
        pub fn statistic(mut self, input: crate::model::StatisticType) -> Self {
            self.statistic = Some(input);
            self
        }
        /// <p>The statistic used for the subscription.</p>
        pub fn set_statistic(
            mut self,
            input: std::option::Option<crate::model::StatisticType>,
        ) -> Self {
            self.statistic = input;
            self
        }
        /// <p>The data aggregation time for the subscription.</p>
        pub fn period(mut self, input: crate::model::PeriodType) -> Self {
            self.period = Some(input);
            self
        }
        /// <p>The data aggregation time for the subscription.</p>
        pub fn set_period(mut self, input: std::option::Option<crate::model::PeriodType>) -> Self {
            self.period = input;
            self
        }
        /// Consumes the builder and constructs a [`Subscription`](crate::model::Subscription).
        pub fn build(self) -> crate::model::Subscription {
            crate::model::Subscription {
                source: self.source,
                destination: self.destination,
                metric: self.metric,
                statistic: self.statistic,
                period: self.period,
            }
        }
    }
}
impl Subscription {
    /// Creates a new builder-style object to manufacture [`Subscription`](crate::model::Subscription).
    pub fn builder() -> crate::model::subscription::Builder {
        crate::model::subscription::Builder::default()
    }
}

/// <p>Describes Availability Zones, Local Zones, and Wavelength Zones.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AvailabilityZone {
    /// <p>The state of the Availability Zone, Local Zone, or Wavelength Zone. This value is always <code>available</code>.</p>
    #[doc(hidden)]
    pub state: std::option::Option<crate::model::AvailabilityZoneState>,
    /// <p>For Availability Zones, this parameter always has the value of <code>opt-in-not-required</code>.</p>
    /// <p>For Local Zones and Wavelength Zones, this parameter is the opt-in status. The possible values are <code>opted-in</code>, and <code>not-opted-in</code>.</p>
    #[doc(hidden)]
    pub opt_in_status: std::option::Option<crate::model::AvailabilityZoneOptInStatus>,
    /// <p>Any messages about the Availability Zone, Local Zone, or Wavelength Zone.</p>
    #[doc(hidden)]
    pub messages: std::option::Option<std::vec::Vec<crate::model::AvailabilityZoneMessage>>,
    /// <p>The name of the Region.</p>
    #[doc(hidden)]
    pub region_name: std::option::Option<std::string::String>,
    /// <p>The name of the Availability Zone, Local Zone, or Wavelength Zone.</p>
    #[doc(hidden)]
    pub zone_name: std::option::Option<std::string::String>,
    /// <p>The ID of the Availability Zone, Local Zone, or Wavelength Zone.</p>
    #[doc(hidden)]
    pub zone_id: std::option::Option<std::string::String>,
    /// <p> For Availability Zones, this parameter has the same value as the Region name.</p>
    /// <p>For Local Zones, the name of the associated group, for example <code>us-west-2-lax-1</code>.</p>
    /// <p>For Wavelength Zones, the name of the associated group, for example <code>us-east-1-wl1-bos-wlz-1</code>.</p>
    #[doc(hidden)]
    pub group_name: std::option::Option<std::string::String>,
    /// <p>The name of the network border group.</p>
    #[doc(hidden)]
    pub network_border_group: std::option::Option<std::string::String>,
    /// <p>The type of zone. The valid values are <code>availability-zone</code>, <code>local-zone</code>, and <code>wavelength-zone</code>.</p>
    #[doc(hidden)]
    pub zone_type: std::option::Option<std::string::String>,
    /// <p>The name of the zone that handles some of the Local Zone or Wavelength Zone control plane operations, such as API calls.</p>
    #[doc(hidden)]
    pub parent_zone_name: std::option::Option<std::string::String>,
    /// <p>The ID of the zone that handles some of the Local Zone or Wavelength Zone control plane operations, such as API calls.</p>
    #[doc(hidden)]
    pub parent_zone_id: std::option::Option<std::string::String>,
}
impl AvailabilityZone {
    /// <p>The state of the Availability Zone, Local Zone, or Wavelength Zone. This value is always <code>available</code>.</p>
    pub fn state(&self) -> std::option::Option<&crate::model::AvailabilityZoneState> {
        self.state.as_ref()
    }
    /// <p>For Availability Zones, this parameter always has the value of <code>opt-in-not-required</code>.</p>
    /// <p>For Local Zones and Wavelength Zones, this parameter is the opt-in status. The possible values are <code>opted-in</code>, and <code>not-opted-in</code>.</p>
    pub fn opt_in_status(&self) -> std::option::Option<&crate::model::AvailabilityZoneOptInStatus> {
        self.opt_in_status.as_ref()
    }
    /// <p>Any messages about the Availability Zone, Local Zone, or Wavelength Zone.</p>
    pub fn messages(&self) -> std::option::Option<&[crate::model::AvailabilityZoneMessage]> {
        self.messages.as_deref()
    }
    /// <p>The name of the Region.</p>
    pub fn region_name(&self) -> std::option::Option<&str> {
        self.region_name.as_deref()
    }
    /// <p>The name of the Availability Zone, Local Zone, or Wavelength Zone.</p>
    pub fn zone_name(&self) -> std::option::Option<&str> {
        self.zone_name.as_deref()
    }
    /// <p>The ID of the Availability Zone, Local Zone, or Wavelength Zone.</p>
    pub fn zone_id(&self) -> std::option::Option<&str> {
        self.zone_id.as_deref()
    }
    /// <p> For Availability Zones, this parameter has the same value as the Region name.</p>
    /// <p>For Local Zones, the name of the associated group, for example <code>us-west-2-lax-1</code>.</p>
    /// <p>For Wavelength Zones, the name of the associated group, for example <code>us-east-1-wl1-bos-wlz-1</code>.</p>
    pub fn group_name(&self) -> std::option::Option<&str> {
        self.group_name.as_deref()
    }
    /// <p>The name of the network border group.</p>
    pub fn network_border_group(&self) -> std::option::Option<&str> {
        self.network_border_group.as_deref()
    }
    /// <p>The type of zone. The valid values are <code>availability-zone</code>, <code>local-zone</code>, and <code>wavelength-zone</code>.</p>
    pub fn zone_type(&self) -> std::option::Option<&str> {
        self.zone_type.as_deref()
    }
    /// <p>The name of the zone that handles some of the Local Zone or Wavelength Zone control plane operations, such as API calls.</p>
    pub fn parent_zone_name(&self) -> std::option::Option<&str> {
        self.parent_zone_name.as_deref()
    }
    /// <p>The ID of the zone that handles some of the Local Zone or Wavelength Zone control plane operations, such as API calls.</p>
    pub fn parent_zone_id(&self) -> std::option::Option<&str> {
        self.parent_zone_id.as_deref()
    }
}
/// See [`AvailabilityZone`](crate::model::AvailabilityZone).
pub mod availability_zone {

    /// A builder for [`AvailabilityZone`](crate::model::AvailabilityZone).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) state: std::option::Option<crate::model::AvailabilityZoneState>,
        pub(crate) opt_in_status: std::option::Option<crate::model::AvailabilityZoneOptInStatus>,
        pub(crate) messages:
            std::option::Option<std::vec::Vec<crate::model::AvailabilityZoneMessage>>,
        pub(crate) region_name: std::option::Option<std::string::String>,
        pub(crate) zone_name: std::option::Option<std::string::String>,
        pub(crate) zone_id: std::option::Option<std::string::String>,
        pub(crate) group_name: std::option::Option<std::string::String>,
        pub(crate) network_border_group: std::option::Option<std::string::String>,
        pub(crate) zone_type: std::option::Option<std::string::String>,
        pub(crate) parent_zone_name: std::option::Option<std::string::String>,
        pub(crate) parent_zone_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The state of the Availability Zone, Local Zone, or Wavelength Zone. This value is always <code>available</code>.</p>
        pub fn state(mut self, input: crate::model::AvailabilityZoneState) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>The state of the Availability Zone, Local Zone, or Wavelength Zone. This value is always <code>available</code>.</p>
        pub fn set_state(
            mut self,
            input: std::option::Option<crate::model::AvailabilityZoneState>,
        ) -> Self {
            self.state = input;
            self
        }
        /// <p>For Availability Zones, this parameter always has the value of <code>opt-in-not-required</code>.</p>
        /// <p>For Local Zones and Wavelength Zones, this parameter is the opt-in status. The possible values are <code>opted-in</code>, and <code>not-opted-in</code>.</p>
        pub fn opt_in_status(mut self, input: crate::model::AvailabilityZoneOptInStatus) -> Self {
            self.opt_in_status = Some(input);
            self
        }
        /// <p>For Availability Zones, this parameter always has the value of <code>opt-in-not-required</code>.</p>
        /// <p>For Local Zones and Wavelength Zones, this parameter is the opt-in status. The possible values are <code>opted-in</code>, and <code>not-opted-in</code>.</p>
        pub fn set_opt_in_status(
            mut self,
            input: std::option::Option<crate::model::AvailabilityZoneOptInStatus>,
        ) -> Self {
            self.opt_in_status = input;
            self
        }
        /// Appends an item to `messages`.
        ///
        /// To override the contents of this collection use [`set_messages`](Self::set_messages).
        ///
        /// <p>Any messages about the Availability Zone, Local Zone, or Wavelength Zone.</p>
        pub fn messages(mut self, input: crate::model::AvailabilityZoneMessage) -> Self {
            let mut v = self.messages.unwrap_or_default();
            v.push(input);
            self.messages = Some(v);
            self
        }
        /// <p>Any messages about the Availability Zone, Local Zone, or Wavelength Zone.</p>
        pub fn set_messages(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::AvailabilityZoneMessage>>,
        ) -> Self {
            self.messages = input;
            self
        }
        /// <p>The name of the Region.</p>
        pub fn region_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.region_name = Some(input.into());
            self
        }
        /// <p>The name of the Region.</p>
        pub fn set_region_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.region_name = input;
            self
        }
        /// <p>The name of the Availability Zone, Local Zone, or Wavelength Zone.</p>
        pub fn zone_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.zone_name = Some(input.into());
            self
        }
        /// <p>The name of the Availability Zone, Local Zone, or Wavelength Zone.</p>
        pub fn set_zone_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.zone_name = input;
            self
        }
        /// <p>The ID of the Availability Zone, Local Zone, or Wavelength Zone.</p>
        pub fn zone_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.zone_id = Some(input.into());
            self
        }
        /// <p>The ID of the Availability Zone, Local Zone, or Wavelength Zone.</p>
        pub fn set_zone_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.zone_id = input;
            self
        }
        /// <p> For Availability Zones, this parameter has the same value as the Region name.</p>
        /// <p>For Local Zones, the name of the associated group, for example <code>us-west-2-lax-1</code>.</p>
        /// <p>For Wavelength Zones, the name of the associated group, for example <code>us-east-1-wl1-bos-wlz-1</code>.</p>
        pub fn group_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.group_name = Some(input.into());
            self
        }
        /// <p> For Availability Zones, this parameter has the same value as the Region name.</p>
        /// <p>For Local Zones, the name of the associated group, for example <code>us-west-2-lax-1</code>.</p>
        /// <p>For Wavelength Zones, the name of the associated group, for example <code>us-east-1-wl1-bos-wlz-1</code>.</p>
        pub fn set_group_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.group_name = input;
            self
        }
        /// <p>The name of the network border group.</p>
        pub fn network_border_group(mut self, input: impl Into<std::string::String>) -> Self {
            self.network_border_group = Some(input.into());
            self
        }
        /// <p>The name of the network border group.</p>
        pub fn set_network_border_group(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.network_border_group = input;
            self
        }
        /// <p>The type of zone. The valid values are <code>availability-zone</code>, <code>local-zone</code>, and <code>wavelength-zone</code>.</p>
        pub fn zone_type(mut self, input: impl Into<std::string::String>) -> Self {
            self.zone_type = Some(input.into());
            self
        }
        /// <p>The type of zone. The valid values are <code>availability-zone</code>, <code>local-zone</code>, and <code>wavelength-zone</code>.</p>
        pub fn set_zone_type(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.zone_type = input;
            self
        }
        /// <p>The name of the zone that handles some of the Local Zone or Wavelength Zone control plane operations, such as API calls.</p>
        pub fn parent_zone_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.parent_zone_name = Some(input.into());
            self
        }
        /// <p>The name of the zone that handles some of the Local Zone or Wavelength Zone control plane operations, such as API calls.</p>
        pub fn set_parent_zone_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.parent_zone_name = input;
            self
        }
        /// <p>The ID of the zone that handles some of the Local Zone or Wavelength Zone control plane operations, such as API calls.</p>
        pub fn parent_zone_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.parent_zone_id = Some(input.into());
            self
        }
        /// <p>The ID of the zone that handles some of the Local Zone or Wavelength Zone control plane operations, such as API calls.</p>
        pub fn set_parent_zone_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.parent_zone_id = input;
            self
        }
        /// Consumes the builder and constructs a [`AvailabilityZone`](crate::model::AvailabilityZone).
        pub fn build(self) -> crate::model::AvailabilityZone {
            crate::model::AvailabilityZone {
                state: self.state,
                opt_in_status: self.opt_in_status,
                messages: self.messages,
                region_name: self.region_name,
                zone_name: self.zone_name,
                zone_id: self.zone_id,
                group_name: self.group_name,
                network_border_group: self.network_border_group,
                zone_type: self.zone_type,
                parent_zone_name: self.parent_zone_name,
                parent_zone_id: self.parent_zone_id,
            }
        }
    }
}
impl AvailabilityZone {
    /// Creates a new builder-style object to manufacture [`AvailabilityZone`](crate::model::AvailabilityZone).
    pub fn builder() -> crate::model::availability_zone::Builder {
        crate::model::availability_zone::Builder::default()
    }
}

/// <p>Describes a message about an Availability Zone, Local Zone, or Wavelength Zone.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AvailabilityZoneMessage {
    /// <p>The message about the Availability Zone, Local Zone, or Wavelength Zone.</p>
    #[doc(hidden)]
    pub message: std::option::Option<std::string::String>,
}
impl AvailabilityZoneMessage {
    /// <p>The message about the Availability Zone, Local Zone, or Wavelength Zone.</p>
    pub fn message(&self) -> std::option::Option<&str> {
        self.message.as_deref()
    }
}
/// See [`AvailabilityZoneMessage`](crate::model::AvailabilityZoneMessage).
pub mod availability_zone_message {

    /// A builder for [`AvailabilityZoneMessage`](crate::model::AvailabilityZoneMessage).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) message: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The message about the Availability Zone, Local Zone, or Wavelength Zone.</p>
        pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
            self.message = Some(input.into());
            self
        }
        /// <p>The message about the Availability Zone, Local Zone, or Wavelength Zone.</p>
        pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.message = input;
            self
        }
        /// Consumes the builder and constructs a [`AvailabilityZoneMessage`](crate::model::AvailabilityZoneMessage).
        pub fn build(self) -> crate::model::AvailabilityZoneMessage {
            crate::model::AvailabilityZoneMessage {
                message: self.message,
            }
        }
    }
}
impl AvailabilityZoneMessage {
    /// Creates a new builder-style object to manufacture [`AvailabilityZoneMessage`](crate::model::AvailabilityZoneMessage).
    pub fn builder() -> crate::model::availability_zone_message::Builder {
        crate::model::availability_zone_message::Builder::default()
    }
}

/// When writing a match expression against `AvailabilityZoneOptInStatus`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let availabilityzoneoptinstatus = unimplemented!();
/// match availabilityzoneoptinstatus {
///     AvailabilityZoneOptInStatus::NotOptedIn => { /* ... */ },
///     AvailabilityZoneOptInStatus::OptInNotRequired => { /* ... */ },
///     AvailabilityZoneOptInStatus::OptedIn => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `availabilityzoneoptinstatus` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `AvailabilityZoneOptInStatus::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `AvailabilityZoneOptInStatus::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `AvailabilityZoneOptInStatus::NewFeature` is defined.
/// Specifically, when `availabilityzoneoptinstatus` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `AvailabilityZoneOptInStatus::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 AvailabilityZoneOptInStatus {
    #[allow(missing_docs)] // documentation missing in model
    NotOptedIn,
    #[allow(missing_docs)] // documentation missing in model
    OptInNotRequired,
    #[allow(missing_docs)] // documentation missing in model
    OptedIn,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for AvailabilityZoneOptInStatus {
    fn from(s: &str) -> Self {
        match s {
            "not-opted-in" => AvailabilityZoneOptInStatus::NotOptedIn,
            "opt-in-not-required" => AvailabilityZoneOptInStatus::OptInNotRequired,
            "opted-in" => AvailabilityZoneOptInStatus::OptedIn,
            other => AvailabilityZoneOptInStatus::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for AvailabilityZoneOptInStatus {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(AvailabilityZoneOptInStatus::from(s))
    }
}
impl AvailabilityZoneOptInStatus {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            AvailabilityZoneOptInStatus::NotOptedIn => "not-opted-in",
            AvailabilityZoneOptInStatus::OptInNotRequired => "opt-in-not-required",
            AvailabilityZoneOptInStatus::OptedIn => "opted-in",
            AvailabilityZoneOptInStatus::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["not-opted-in", "opt-in-not-required", "opted-in"]
    }
}
impl AsRef<str> for AvailabilityZoneOptInStatus {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `AvailabilityZoneState`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let availabilityzonestate = unimplemented!();
/// match availabilityzonestate {
///     AvailabilityZoneState::Available => { /* ... */ },
///     AvailabilityZoneState::Impaired => { /* ... */ },
///     AvailabilityZoneState::Information => { /* ... */ },
///     AvailabilityZoneState::Unavailable => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `availabilityzonestate` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `AvailabilityZoneState::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `AvailabilityZoneState::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `AvailabilityZoneState::NewFeature` is defined.
/// Specifically, when `availabilityzonestate` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `AvailabilityZoneState::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 AvailabilityZoneState {
    #[allow(missing_docs)] // documentation missing in model
    Available,
    #[allow(missing_docs)] // documentation missing in model
    Impaired,
    #[allow(missing_docs)] // documentation missing in model
    Information,
    #[allow(missing_docs)] // documentation missing in model
    Unavailable,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for AvailabilityZoneState {
    fn from(s: &str) -> Self {
        match s {
            "available" => AvailabilityZoneState::Available,
            "impaired" => AvailabilityZoneState::Impaired,
            "information" => AvailabilityZoneState::Information,
            "unavailable" => AvailabilityZoneState::Unavailable,
            other => {
                AvailabilityZoneState::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for AvailabilityZoneState {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(AvailabilityZoneState::from(s))
    }
}
impl AvailabilityZoneState {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            AvailabilityZoneState::Available => "available",
            AvailabilityZoneState::Impaired => "impaired",
            AvailabilityZoneState::Information => "information",
            AvailabilityZoneState::Unavailable => "unavailable",
            AvailabilityZoneState::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["available", "impaired", "information", "unavailable"]
    }
}
impl AsRef<str> for AvailabilityZoneState {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes an Elastic IP address, or a carrier IP address.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Address {
    /// <p>The ID of the instance that the address is associated with (if any).</p>
    #[doc(hidden)]
    pub instance_id: std::option::Option<std::string::String>,
    /// <p>The Elastic IP address.</p>
    #[doc(hidden)]
    pub public_ip: std::option::Option<std::string::String>,
    /// <p>The ID representing the allocation of the address for use with EC2-VPC.</p>
    #[doc(hidden)]
    pub allocation_id: std::option::Option<std::string::String>,
    /// <p>The ID representing the association of the address with an instance in a VPC.</p>
    #[doc(hidden)]
    pub association_id: std::option::Option<std::string::String>,
    /// <p>Indicates whether this Elastic IP address is for use with instances in EC2-Classic (<code>standard</code>) or instances in a VPC (<code>vpc</code>).</p>
    #[doc(hidden)]
    pub domain: std::option::Option<crate::model::DomainType>,
    /// <p>The ID of the network interface.</p>
    #[doc(hidden)]
    pub network_interface_id: std::option::Option<std::string::String>,
    /// <p>The ID of the Amazon Web Services account that owns the network interface.</p>
    #[doc(hidden)]
    pub network_interface_owner_id: std::option::Option<std::string::String>,
    /// <p>The private IP address associated with the Elastic IP address.</p>
    #[doc(hidden)]
    pub private_ip_address: std::option::Option<std::string::String>,
    /// <p>Any tags assigned to the Elastic IP address.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    /// <p>The ID of an address pool.</p>
    #[doc(hidden)]
    pub public_ipv4_pool: std::option::Option<std::string::String>,
    /// <p>The name of the unique set of Availability Zones, Local Zones, or Wavelength Zones from which Amazon Web Services advertises IP addresses.</p>
    #[doc(hidden)]
    pub network_border_group: std::option::Option<std::string::String>,
    /// <p>The customer-owned IP address.</p>
    #[doc(hidden)]
    pub customer_owned_ip: std::option::Option<std::string::String>,
    /// <p>The ID of the customer-owned address pool.</p>
    #[doc(hidden)]
    pub customer_owned_ipv4_pool: std::option::Option<std::string::String>,
    /// <p>The carrier IP address associated. This option is only available for network interfaces which reside in a subnet in a Wavelength Zone (for example an EC2 instance). </p>
    #[doc(hidden)]
    pub carrier_ip: std::option::Option<std::string::String>,
}
impl Address {
    /// <p>The ID of the instance that the address is associated with (if any).</p>
    pub fn instance_id(&self) -> std::option::Option<&str> {
        self.instance_id.as_deref()
    }
    /// <p>The Elastic IP address.</p>
    pub fn public_ip(&self) -> std::option::Option<&str> {
        self.public_ip.as_deref()
    }
    /// <p>The ID representing the allocation of the address for use with EC2-VPC.</p>
    pub fn allocation_id(&self) -> std::option::Option<&str> {
        self.allocation_id.as_deref()
    }
    /// <p>The ID representing the association of the address with an instance in a VPC.</p>
    pub fn association_id(&self) -> std::option::Option<&str> {
        self.association_id.as_deref()
    }
    /// <p>Indicates whether this Elastic IP address is for use with instances in EC2-Classic (<code>standard</code>) or instances in a VPC (<code>vpc</code>).</p>
    pub fn domain(&self) -> std::option::Option<&crate::model::DomainType> {
        self.domain.as_ref()
    }
    /// <p>The ID of the network interface.</p>
    pub fn network_interface_id(&self) -> std::option::Option<&str> {
        self.network_interface_id.as_deref()
    }
    /// <p>The ID of the Amazon Web Services account that owns the network interface.</p>
    pub fn network_interface_owner_id(&self) -> std::option::Option<&str> {
        self.network_interface_owner_id.as_deref()
    }
    /// <p>The private IP address associated with the Elastic IP address.</p>
    pub fn private_ip_address(&self) -> std::option::Option<&str> {
        self.private_ip_address.as_deref()
    }
    /// <p>Any tags assigned to the Elastic IP address.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
    /// <p>The ID of an address pool.</p>
    pub fn public_ipv4_pool(&self) -> std::option::Option<&str> {
        self.public_ipv4_pool.as_deref()
    }
    /// <p>The name of the unique set of Availability Zones, Local Zones, or Wavelength Zones from which Amazon Web Services advertises IP addresses.</p>
    pub fn network_border_group(&self) -> std::option::Option<&str> {
        self.network_border_group.as_deref()
    }
    /// <p>The customer-owned IP address.</p>
    pub fn customer_owned_ip(&self) -> std::option::Option<&str> {
        self.customer_owned_ip.as_deref()
    }
    /// <p>The ID of the customer-owned address pool.</p>
    pub fn customer_owned_ipv4_pool(&self) -> std::option::Option<&str> {
        self.customer_owned_ipv4_pool.as_deref()
    }
    /// <p>The carrier IP address associated. This option is only available for network interfaces which reside in a subnet in a Wavelength Zone (for example an EC2 instance). </p>
    pub fn carrier_ip(&self) -> std::option::Option<&str> {
        self.carrier_ip.as_deref()
    }
}
/// See [`Address`](crate::model::Address).
pub mod address {

    /// A builder for [`Address`](crate::model::Address).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) instance_id: std::option::Option<std::string::String>,
        pub(crate) public_ip: std::option::Option<std::string::String>,
        pub(crate) allocation_id: std::option::Option<std::string::String>,
        pub(crate) association_id: std::option::Option<std::string::String>,
        pub(crate) domain: std::option::Option<crate::model::DomainType>,
        pub(crate) network_interface_id: std::option::Option<std::string::String>,
        pub(crate) network_interface_owner_id: std::option::Option<std::string::String>,
        pub(crate) private_ip_address: std::option::Option<std::string::String>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        pub(crate) public_ipv4_pool: std::option::Option<std::string::String>,
        pub(crate) network_border_group: std::option::Option<std::string::String>,
        pub(crate) customer_owned_ip: std::option::Option<std::string::String>,
        pub(crate) customer_owned_ipv4_pool: std::option::Option<std::string::String>,
        pub(crate) carrier_ip: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The ID of the instance that the address is associated with (if any).</p>
        pub fn instance_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.instance_id = Some(input.into());
            self
        }
        /// <p>The ID of the instance that the address is associated with (if any).</p>
        pub fn set_instance_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.instance_id = input;
            self
        }
        /// <p>The Elastic IP address.</p>
        pub fn public_ip(mut self, input: impl Into<std::string::String>) -> Self {
            self.public_ip = Some(input.into());
            self
        }
        /// <p>The Elastic IP address.</p>
        pub fn set_public_ip(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.public_ip = input;
            self
        }
        /// <p>The ID representing the allocation of the address for use with EC2-VPC.</p>
        pub fn allocation_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.allocation_id = Some(input.into());
            self
        }
        /// <p>The ID representing the allocation of the address for use with EC2-VPC.</p>
        pub fn set_allocation_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.allocation_id = input;
            self
        }
        /// <p>The ID representing the association of the address with an instance in a VPC.</p>
        pub fn association_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.association_id = Some(input.into());
            self
        }
        /// <p>The ID representing the association of the address with an instance in a VPC.</p>
        pub fn set_association_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.association_id = input;
            self
        }
        /// <p>Indicates whether this Elastic IP address is for use with instances in EC2-Classic (<code>standard</code>) or instances in a VPC (<code>vpc</code>).</p>
        pub fn domain(mut self, input: crate::model::DomainType) -> Self {
            self.domain = Some(input);
            self
        }
        /// <p>Indicates whether this Elastic IP address is for use with instances in EC2-Classic (<code>standard</code>) or instances in a VPC (<code>vpc</code>).</p>
        pub fn set_domain(mut self, input: std::option::Option<crate::model::DomainType>) -> Self {
            self.domain = input;
            self
        }
        /// <p>The ID of the network interface.</p>
        pub fn network_interface_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.network_interface_id = Some(input.into());
            self
        }
        /// <p>The ID of the network interface.</p>
        pub fn set_network_interface_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.network_interface_id = input;
            self
        }
        /// <p>The ID of the Amazon Web Services account that owns the network interface.</p>
        pub fn network_interface_owner_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.network_interface_owner_id = Some(input.into());
            self
        }
        /// <p>The ID of the Amazon Web Services account that owns the network interface.</p>
        pub fn set_network_interface_owner_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.network_interface_owner_id = input;
            self
        }
        /// <p>The private IP address associated with the Elastic IP address.</p>
        pub fn private_ip_address(mut self, input: impl Into<std::string::String>) -> Self {
            self.private_ip_address = Some(input.into());
            self
        }
        /// <p>The private IP address associated with the Elastic IP address.</p>
        pub fn set_private_ip_address(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.private_ip_address = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>Any tags assigned to the Elastic IP address.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>Any tags assigned to the Elastic IP address.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// <p>The ID of an address pool.</p>
        pub fn public_ipv4_pool(mut self, input: impl Into<std::string::String>) -> Self {
            self.public_ipv4_pool = Some(input.into());
            self
        }
        /// <p>The ID of an address pool.</p>
        pub fn set_public_ipv4_pool(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.public_ipv4_pool = input;
            self
        }
        /// <p>The name of the unique set of Availability Zones, Local Zones, or Wavelength Zones from which Amazon Web Services advertises IP addresses.</p>
        pub fn network_border_group(mut self, input: impl Into<std::string::String>) -> Self {
            self.network_border_group = Some(input.into());
            self
        }
        /// <p>The name of the unique set of Availability Zones, Local Zones, or Wavelength Zones from which Amazon Web Services advertises IP addresses.</p>
        pub fn set_network_border_group(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.network_border_group = input;
            self
        }
        /// <p>The customer-owned IP address.</p>
        pub fn customer_owned_ip(mut self, input: impl Into<std::string::String>) -> Self {
            self.customer_owned_ip = Some(input.into());
            self
        }
        /// <p>The customer-owned IP address.</p>
        pub fn set_customer_owned_ip(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.customer_owned_ip = input;
            self
        }
        /// <p>The ID of the customer-owned address pool.</p>
        pub fn customer_owned_ipv4_pool(mut self, input: impl Into<std::string::String>) -> Self {
            self.customer_owned_ipv4_pool = Some(input.into());
            self
        }
        /// <p>The ID of the customer-owned address pool.</p>
        pub fn set_customer_owned_ipv4_pool(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.customer_owned_ipv4_pool = input;
            self
        }
        /// <p>The carrier IP address associated. This option is only available for network interfaces which reside in a subnet in a Wavelength Zone (for example an EC2 instance). </p>
        pub fn carrier_ip(mut self, input: impl Into<std::string::String>) -> Self {
            self.carrier_ip = Some(input.into());
            self
        }
        /// <p>The carrier IP address associated. This option is only available for network interfaces which reside in a subnet in a Wavelength Zone (for example an EC2 instance). </p>
        pub fn set_carrier_ip(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.carrier_ip = input;
            self
        }
        /// Consumes the builder and constructs a [`Address`](crate::model::Address).
        pub fn build(self) -> crate::model::Address {
            crate::model::Address {
                instance_id: self.instance_id,
                public_ip: self.public_ip,
                allocation_id: self.allocation_id,
                association_id: self.association_id,
                domain: self.domain,
                network_interface_id: self.network_interface_id,
                network_interface_owner_id: self.network_interface_owner_id,
                private_ip_address: self.private_ip_address,
                tags: self.tags,
                public_ipv4_pool: self.public_ipv4_pool,
                network_border_group: self.network_border_group,
                customer_owned_ip: self.customer_owned_ip,
                customer_owned_ipv4_pool: self.customer_owned_ipv4_pool,
                carrier_ip: self.carrier_ip,
            }
        }
    }
}
impl Address {
    /// Creates a new builder-style object to manufacture [`Address`](crate::model::Address).
    pub fn builder() -> crate::model::address::Builder {
        crate::model::address::Builder::default()
    }
}

/// When writing a match expression against `DomainType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let domaintype = unimplemented!();
/// match domaintype {
///     DomainType::Standard => { /* ... */ },
///     DomainType::Vpc => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `domaintype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `DomainType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `DomainType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `DomainType::NewFeature` is defined.
/// Specifically, when `domaintype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `DomainType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 DomainType {
    #[allow(missing_docs)] // documentation missing in model
    Standard,
    #[allow(missing_docs)] // documentation missing in model
    Vpc,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for DomainType {
    fn from(s: &str) -> Self {
        match s {
            "standard" => DomainType::Standard,
            "vpc" => DomainType::Vpc,
            other => DomainType::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for DomainType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(DomainType::from(s))
    }
}
impl DomainType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            DomainType::Standard => "standard",
            DomainType::Vpc => "vpc",
            DomainType::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["standard", "vpc"]
    }
}
impl AsRef<str> for DomainType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes an account attribute.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AccountAttribute {
    /// <p>The name of the account attribute.</p>
    #[doc(hidden)]
    pub attribute_name: std::option::Option<std::string::String>,
    /// <p>The values for the account attribute.</p>
    #[doc(hidden)]
    pub attribute_values: std::option::Option<std::vec::Vec<crate::model::AccountAttributeValue>>,
}
impl AccountAttribute {
    /// <p>The name of the account attribute.</p>
    pub fn attribute_name(&self) -> std::option::Option<&str> {
        self.attribute_name.as_deref()
    }
    /// <p>The values for the account attribute.</p>
    pub fn attribute_values(&self) -> std::option::Option<&[crate::model::AccountAttributeValue]> {
        self.attribute_values.as_deref()
    }
}
/// See [`AccountAttribute`](crate::model::AccountAttribute).
pub mod account_attribute {

    /// A builder for [`AccountAttribute`](crate::model::AccountAttribute).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) attribute_name: std::option::Option<std::string::String>,
        pub(crate) attribute_values:
            std::option::Option<std::vec::Vec<crate::model::AccountAttributeValue>>,
    }
    impl Builder {
        /// <p>The name of the account attribute.</p>
        pub fn attribute_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.attribute_name = Some(input.into());
            self
        }
        /// <p>The name of the account attribute.</p>
        pub fn set_attribute_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.attribute_name = input;
            self
        }
        /// Appends an item to `attribute_values`.
        ///
        /// To override the contents of this collection use [`set_attribute_values`](Self::set_attribute_values).
        ///
        /// <p>The values for the account attribute.</p>
        pub fn attribute_values(mut self, input: crate::model::AccountAttributeValue) -> Self {
            let mut v = self.attribute_values.unwrap_or_default();
            v.push(input);
            self.attribute_values = Some(v);
            self
        }
        /// <p>The values for the account attribute.</p>
        pub fn set_attribute_values(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::AccountAttributeValue>>,
        ) -> Self {
            self.attribute_values = input;
            self
        }
        /// Consumes the builder and constructs a [`AccountAttribute`](crate::model::AccountAttribute).
        pub fn build(self) -> crate::model::AccountAttribute {
            crate::model::AccountAttribute {
                attribute_name: self.attribute_name,
                attribute_values: self.attribute_values,
            }
        }
    }
}
impl AccountAttribute {
    /// Creates a new builder-style object to manufacture [`AccountAttribute`](crate::model::AccountAttribute).
    pub fn builder() -> crate::model::account_attribute::Builder {
        crate::model::account_attribute::Builder::default()
    }
}

/// <p>Describes a value of an account attribute.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AccountAttributeValue {
    /// <p>The value of the attribute.</p>
    #[doc(hidden)]
    pub attribute_value: std::option::Option<std::string::String>,
}
impl AccountAttributeValue {
    /// <p>The value of the attribute.</p>
    pub fn attribute_value(&self) -> std::option::Option<&str> {
        self.attribute_value.as_deref()
    }
}
/// See [`AccountAttributeValue`](crate::model::AccountAttributeValue).
pub mod account_attribute_value {

    /// A builder for [`AccountAttributeValue`](crate::model::AccountAttributeValue).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) attribute_value: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The value of the attribute.</p>
        pub fn attribute_value(mut self, input: impl Into<std::string::String>) -> Self {
            self.attribute_value = Some(input.into());
            self
        }
        /// <p>The value of the attribute.</p>
        pub fn set_attribute_value(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.attribute_value = input;
            self
        }
        /// Consumes the builder and constructs a [`AccountAttributeValue`](crate::model::AccountAttributeValue).
        pub fn build(self) -> crate::model::AccountAttributeValue {
            crate::model::AccountAttributeValue {
                attribute_value: self.attribute_value,
            }
        }
    }
}
impl AccountAttributeValue {
    /// Creates a new builder-style object to manufacture [`AccountAttributeValue`](crate::model::AccountAttributeValue).
    pub fn builder() -> crate::model::account_attribute_value::Builder {
        crate::model::account_attribute_value::Builder::default()
    }
}

/// When writing a match expression against `AccountAttributeName`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let accountattributename = unimplemented!();
/// match accountattributename {
///     AccountAttributeName::DefaultVpc => { /* ... */ },
///     AccountAttributeName::SupportedPlatforms => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `accountattributename` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `AccountAttributeName::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `AccountAttributeName::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `AccountAttributeName::NewFeature` is defined.
/// Specifically, when `accountattributename` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `AccountAttributeName::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 AccountAttributeName {
    #[allow(missing_docs)] // documentation missing in model
    DefaultVpc,
    #[allow(missing_docs)] // documentation missing in model
    SupportedPlatforms,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for AccountAttributeName {
    fn from(s: &str) -> Self {
        match s {
            "default-vpc" => AccountAttributeName::DefaultVpc,
            "supported-platforms" => AccountAttributeName::SupportedPlatforms,
            other => {
                AccountAttributeName::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for AccountAttributeName {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(AccountAttributeName::from(s))
    }
}
impl AccountAttributeName {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            AccountAttributeName::DefaultVpc => "default-vpc",
            AccountAttributeName::SupportedPlatforms => "supported-platforms",
            AccountAttributeName::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["default-vpc", "supported-platforms"]
    }
}
impl AsRef<str> for AccountAttributeName {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes the deregistered transit gateway multicast group sources.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TransitGatewayMulticastDeregisteredGroupSources {
    /// <p>The ID of the transit gateway multicast domain.</p>
    #[doc(hidden)]
    pub transit_gateway_multicast_domain_id: std::option::Option<std::string::String>,
    /// <p>The network interface IDs of the non-registered members.</p>
    #[doc(hidden)]
    pub deregistered_network_interface_ids: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>The IP address assigned to the transit gateway multicast group.</p>
    #[doc(hidden)]
    pub group_ip_address: std::option::Option<std::string::String>,
}
impl TransitGatewayMulticastDeregisteredGroupSources {
    /// <p>The ID of the transit gateway multicast domain.</p>
    pub fn transit_gateway_multicast_domain_id(&self) -> std::option::Option<&str> {
        self.transit_gateway_multicast_domain_id.as_deref()
    }
    /// <p>The network interface IDs of the non-registered members.</p>
    pub fn deregistered_network_interface_ids(
        &self,
    ) -> std::option::Option<&[std::string::String]> {
        self.deregistered_network_interface_ids.as_deref()
    }
    /// <p>The IP address assigned to the transit gateway multicast group.</p>
    pub fn group_ip_address(&self) -> std::option::Option<&str> {
        self.group_ip_address.as_deref()
    }
}
/// See [`TransitGatewayMulticastDeregisteredGroupSources`](crate::model::TransitGatewayMulticastDeregisteredGroupSources).
pub mod transit_gateway_multicast_deregistered_group_sources {

    /// A builder for [`TransitGatewayMulticastDeregisteredGroupSources`](crate::model::TransitGatewayMulticastDeregisteredGroupSources).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) transit_gateway_multicast_domain_id: std::option::Option<std::string::String>,
        pub(crate) deregistered_network_interface_ids:
            std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) group_ip_address: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The ID of the transit gateway multicast domain.</p>
        pub fn transit_gateway_multicast_domain_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.transit_gateway_multicast_domain_id = Some(input.into());
            self
        }
        /// <p>The ID of the transit gateway multicast domain.</p>
        pub fn set_transit_gateway_multicast_domain_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.transit_gateway_multicast_domain_id = input;
            self
        }
        /// Appends an item to `deregistered_network_interface_ids`.
        ///
        /// To override the contents of this collection use [`set_deregistered_network_interface_ids`](Self::set_deregistered_network_interface_ids).
        ///
        /// <p>The network interface IDs of the non-registered members.</p>
        pub fn deregistered_network_interface_ids(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            let mut v = self.deregistered_network_interface_ids.unwrap_or_default();
            v.push(input.into());
            self.deregistered_network_interface_ids = Some(v);
            self
        }
        /// <p>The network interface IDs of the non-registered members.</p>
        pub fn set_deregistered_network_interface_ids(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.deregistered_network_interface_ids = input;
            self
        }
        /// <p>The IP address assigned to the transit gateway multicast group.</p>
        pub fn group_ip_address(mut self, input: impl Into<std::string::String>) -> Self {
            self.group_ip_address = Some(input.into());
            self
        }
        /// <p>The IP address assigned to the transit gateway multicast group.</p>
        pub fn set_group_ip_address(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.group_ip_address = input;
            self
        }
        /// Consumes the builder and constructs a [`TransitGatewayMulticastDeregisteredGroupSources`](crate::model::TransitGatewayMulticastDeregisteredGroupSources).
        pub fn build(self) -> crate::model::TransitGatewayMulticastDeregisteredGroupSources {
            crate::model::TransitGatewayMulticastDeregisteredGroupSources {
                transit_gateway_multicast_domain_id: self.transit_gateway_multicast_domain_id,
                deregistered_network_interface_ids: self.deregistered_network_interface_ids,
                group_ip_address: self.group_ip_address,
            }
        }
    }
}
impl TransitGatewayMulticastDeregisteredGroupSources {
    /// Creates a new builder-style object to manufacture [`TransitGatewayMulticastDeregisteredGroupSources`](crate::model::TransitGatewayMulticastDeregisteredGroupSources).
    pub fn builder() -> crate::model::transit_gateway_multicast_deregistered_group_sources::Builder
    {
        crate::model::transit_gateway_multicast_deregistered_group_sources::Builder::default()
    }
}

/// <p>Describes the deregistered transit gateway multicast group members.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TransitGatewayMulticastDeregisteredGroupMembers {
    /// <p>The ID of the transit gateway multicast domain.</p>
    #[doc(hidden)]
    pub transit_gateway_multicast_domain_id: std::option::Option<std::string::String>,
    /// <p>The network interface IDs of the deregistered members.</p>
    #[doc(hidden)]
    pub deregistered_network_interface_ids: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>The IP address assigned to the transit gateway multicast group.</p>
    #[doc(hidden)]
    pub group_ip_address: std::option::Option<std::string::String>,
}
impl TransitGatewayMulticastDeregisteredGroupMembers {
    /// <p>The ID of the transit gateway multicast domain.</p>
    pub fn transit_gateway_multicast_domain_id(&self) -> std::option::Option<&str> {
        self.transit_gateway_multicast_domain_id.as_deref()
    }
    /// <p>The network interface IDs of the deregistered members.</p>
    pub fn deregistered_network_interface_ids(
        &self,
    ) -> std::option::Option<&[std::string::String]> {
        self.deregistered_network_interface_ids.as_deref()
    }
    /// <p>The IP address assigned to the transit gateway multicast group.</p>
    pub fn group_ip_address(&self) -> std::option::Option<&str> {
        self.group_ip_address.as_deref()
    }
}
/// See [`TransitGatewayMulticastDeregisteredGroupMembers`](crate::model::TransitGatewayMulticastDeregisteredGroupMembers).
pub mod transit_gateway_multicast_deregistered_group_members {

    /// A builder for [`TransitGatewayMulticastDeregisteredGroupMembers`](crate::model::TransitGatewayMulticastDeregisteredGroupMembers).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) transit_gateway_multicast_domain_id: std::option::Option<std::string::String>,
        pub(crate) deregistered_network_interface_ids:
            std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) group_ip_address: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The ID of the transit gateway multicast domain.</p>
        pub fn transit_gateway_multicast_domain_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.transit_gateway_multicast_domain_id = Some(input.into());
            self
        }
        /// <p>The ID of the transit gateway multicast domain.</p>
        pub fn set_transit_gateway_multicast_domain_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.transit_gateway_multicast_domain_id = input;
            self
        }
        /// Appends an item to `deregistered_network_interface_ids`.
        ///
        /// To override the contents of this collection use [`set_deregistered_network_interface_ids`](Self::set_deregistered_network_interface_ids).
        ///
        /// <p>The network interface IDs of the deregistered members.</p>
        pub fn deregistered_network_interface_ids(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            let mut v = self.deregistered_network_interface_ids.unwrap_or_default();
            v.push(input.into());
            self.deregistered_network_interface_ids = Some(v);
            self
        }
        /// <p>The network interface IDs of the deregistered members.</p>
        pub fn set_deregistered_network_interface_ids(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.deregistered_network_interface_ids = input;
            self
        }
        /// <p>The IP address assigned to the transit gateway multicast group.</p>
        pub fn group_ip_address(mut self, input: impl Into<std::string::String>) -> Self {
            self.group_ip_address = Some(input.into());
            self
        }
        /// <p>The IP address assigned to the transit gateway multicast group.</p>
        pub fn set_group_ip_address(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.group_ip_address = input;
            self
        }
        /// Consumes the builder and constructs a [`TransitGatewayMulticastDeregisteredGroupMembers`](crate::model::TransitGatewayMulticastDeregisteredGroupMembers).
        pub fn build(self) -> crate::model::TransitGatewayMulticastDeregisteredGroupMembers {
            crate::model::TransitGatewayMulticastDeregisteredGroupMembers {
                transit_gateway_multicast_domain_id: self.transit_gateway_multicast_domain_id,
                deregistered_network_interface_ids: self.deregistered_network_interface_ids,
                group_ip_address: self.group_ip_address,
            }
        }
    }
}
impl TransitGatewayMulticastDeregisteredGroupMembers {
    /// Creates a new builder-style object to manufacture [`TransitGatewayMulticastDeregisteredGroupMembers`](crate::model::TransitGatewayMulticastDeregisteredGroupMembers).
    pub fn builder() -> crate::model::transit_gateway_multicast_deregistered_group_members::Builder
    {
        crate::model::transit_gateway_multicast_deregistered_group_members::Builder::default()
    }
}

/// <p>Information about the tag keys to deregister for the current Region. You can either specify individual tag keys or deregister all tag keys in the current Region. You must specify either <code>IncludeAllTagsOfInstance</code> or <code>InstanceTagKeys</code> in the request</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeregisterInstanceTagAttributeRequest {
    /// <p>Indicates whether to deregister all tag keys in the current Region. Specify <code>false</code> to deregister all tag keys.</p>
    #[doc(hidden)]
    pub include_all_tags_of_instance: std::option::Option<bool>,
    /// <p>Information about the tag keys to deregister.</p>
    #[doc(hidden)]
    pub instance_tag_keys: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl DeregisterInstanceTagAttributeRequest {
    /// <p>Indicates whether to deregister all tag keys in the current Region. Specify <code>false</code> to deregister all tag keys.</p>
    pub fn include_all_tags_of_instance(&self) -> std::option::Option<bool> {
        self.include_all_tags_of_instance
    }
    /// <p>Information about the tag keys to deregister.</p>
    pub fn instance_tag_keys(&self) -> std::option::Option<&[std::string::String]> {
        self.instance_tag_keys.as_deref()
    }
}
/// See [`DeregisterInstanceTagAttributeRequest`](crate::model::DeregisterInstanceTagAttributeRequest).
pub mod deregister_instance_tag_attribute_request {

    /// A builder for [`DeregisterInstanceTagAttributeRequest`](crate::model::DeregisterInstanceTagAttributeRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) include_all_tags_of_instance: std::option::Option<bool>,
        pub(crate) instance_tag_keys: std::option::Option<std::vec::Vec<std::string::String>>,
    }
    impl Builder {
        /// <p>Indicates whether to deregister all tag keys in the current Region. Specify <code>false</code> to deregister all tag keys.</p>
        pub fn include_all_tags_of_instance(mut self, input: bool) -> Self {
            self.include_all_tags_of_instance = Some(input);
            self
        }
        /// <p>Indicates whether to deregister all tag keys in the current Region. Specify <code>false</code> to deregister all tag keys.</p>
        pub fn set_include_all_tags_of_instance(
            mut self,
            input: std::option::Option<bool>,
        ) -> Self {
            self.include_all_tags_of_instance = input;
            self
        }
        /// Appends an item to `instance_tag_keys`.
        ///
        /// To override the contents of this collection use [`set_instance_tag_keys`](Self::set_instance_tag_keys).
        ///
        /// <p>Information about the tag keys to deregister.</p>
        pub fn instance_tag_keys(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.instance_tag_keys.unwrap_or_default();
            v.push(input.into());
            self.instance_tag_keys = Some(v);
            self
        }
        /// <p>Information about the tag keys to deregister.</p>
        pub fn set_instance_tag_keys(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.instance_tag_keys = input;
            self
        }
        /// Consumes the builder and constructs a [`DeregisterInstanceTagAttributeRequest`](crate::model::DeregisterInstanceTagAttributeRequest).
        pub fn build(self) -> crate::model::DeregisterInstanceTagAttributeRequest {
            crate::model::DeregisterInstanceTagAttributeRequest {
                include_all_tags_of_instance: self.include_all_tags_of_instance,
                instance_tag_keys: self.instance_tag_keys,
            }
        }
    }
}
impl DeregisterInstanceTagAttributeRequest {
    /// Creates a new builder-style object to manufacture [`DeregisterInstanceTagAttributeRequest`](crate::model::DeregisterInstanceTagAttributeRequest).
    pub fn builder() -> crate::model::deregister_instance_tag_attribute_request::Builder {
        crate::model::deregister_instance_tag_attribute_request::Builder::default()
    }
}

/// <p>Describes a Reserved Instance whose queued purchase was not deleted.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct FailedQueuedPurchaseDeletion {
    /// <p>The error.</p>
    #[doc(hidden)]
    pub error: std::option::Option<crate::model::DeleteQueuedReservedInstancesError>,
    /// <p>The ID of the Reserved Instance.</p>
    #[doc(hidden)]
    pub reserved_instances_id: std::option::Option<std::string::String>,
}
impl FailedQueuedPurchaseDeletion {
    /// <p>The error.</p>
    pub fn error(&self) -> std::option::Option<&crate::model::DeleteQueuedReservedInstancesError> {
        self.error.as_ref()
    }
    /// <p>The ID of the Reserved Instance.</p>
    pub fn reserved_instances_id(&self) -> std::option::Option<&str> {
        self.reserved_instances_id.as_deref()
    }
}
/// See [`FailedQueuedPurchaseDeletion`](crate::model::FailedQueuedPurchaseDeletion).
pub mod failed_queued_purchase_deletion {

    /// A builder for [`FailedQueuedPurchaseDeletion`](crate::model::FailedQueuedPurchaseDeletion).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) error: std::option::Option<crate::model::DeleteQueuedReservedInstancesError>,
        pub(crate) reserved_instances_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The error.</p>
        pub fn error(mut self, input: crate::model::DeleteQueuedReservedInstancesError) -> Self {
            self.error = Some(input);
            self
        }
        /// <p>The error.</p>
        pub fn set_error(
            mut self,
            input: std::option::Option<crate::model::DeleteQueuedReservedInstancesError>,
        ) -> Self {
            self.error = input;
            self
        }
        /// <p>The ID of the Reserved Instance.</p>
        pub fn reserved_instances_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.reserved_instances_id = Some(input.into());
            self
        }
        /// <p>The ID of the Reserved Instance.</p>
        pub fn set_reserved_instances_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.reserved_instances_id = input;
            self
        }
        /// Consumes the builder and constructs a [`FailedQueuedPurchaseDeletion`](crate::model::FailedQueuedPurchaseDeletion).
        pub fn build(self) -> crate::model::FailedQueuedPurchaseDeletion {
            crate::model::FailedQueuedPurchaseDeletion {
                error: self.error,
                reserved_instances_id: self.reserved_instances_id,
            }
        }
    }
}
impl FailedQueuedPurchaseDeletion {
    /// Creates a new builder-style object to manufacture [`FailedQueuedPurchaseDeletion`](crate::model::FailedQueuedPurchaseDeletion).
    pub fn builder() -> crate::model::failed_queued_purchase_deletion::Builder {
        crate::model::failed_queued_purchase_deletion::Builder::default()
    }
}

/// <p>Describes the error for a Reserved Instance whose queued purchase could not be deleted.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteQueuedReservedInstancesError {
    /// <p>The error code.</p>
    #[doc(hidden)]
    pub code: std::option::Option<crate::model::DeleteQueuedReservedInstancesErrorCode>,
    /// <p>The error message.</p>
    #[doc(hidden)]
    pub message: std::option::Option<std::string::String>,
}
impl DeleteQueuedReservedInstancesError {
    /// <p>The error code.</p>
    pub fn code(
        &self,
    ) -> std::option::Option<&crate::model::DeleteQueuedReservedInstancesErrorCode> {
        self.code.as_ref()
    }
    /// <p>The error message.</p>
    pub fn message(&self) -> std::option::Option<&str> {
        self.message.as_deref()
    }
}
/// See [`DeleteQueuedReservedInstancesError`](crate::model::DeleteQueuedReservedInstancesError).
pub mod delete_queued_reserved_instances_error {

    /// A builder for [`DeleteQueuedReservedInstancesError`](crate::model::DeleteQueuedReservedInstancesError).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) code: std::option::Option<crate::model::DeleteQueuedReservedInstancesErrorCode>,
        pub(crate) message: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The error code.</p>
        pub fn code(mut self, input: crate::model::DeleteQueuedReservedInstancesErrorCode) -> Self {
            self.code = Some(input);
            self
        }
        /// <p>The error code.</p>
        pub fn set_code(
            mut self,
            input: std::option::Option<crate::model::DeleteQueuedReservedInstancesErrorCode>,
        ) -> Self {
            self.code = input;
            self
        }
        /// <p>The error message.</p>
        pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
            self.message = Some(input.into());
            self
        }
        /// <p>The error message.</p>
        pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.message = input;
            self
        }
        /// Consumes the builder and constructs a [`DeleteQueuedReservedInstancesError`](crate::model::DeleteQueuedReservedInstancesError).
        pub fn build(self) -> crate::model::DeleteQueuedReservedInstancesError {
            crate::model::DeleteQueuedReservedInstancesError {
                code: self.code,
                message: self.message,
            }
        }
    }
}
impl DeleteQueuedReservedInstancesError {
    /// Creates a new builder-style object to manufacture [`DeleteQueuedReservedInstancesError`](crate::model::DeleteQueuedReservedInstancesError).
    pub fn builder() -> crate::model::delete_queued_reserved_instances_error::Builder {
        crate::model::delete_queued_reserved_instances_error::Builder::default()
    }
}

/// When writing a match expression against `DeleteQueuedReservedInstancesErrorCode`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let deletequeuedreservedinstanceserrorcode = unimplemented!();
/// match deletequeuedreservedinstanceserrorcode {
///     DeleteQueuedReservedInstancesErrorCode::ReservedInstancesIdInvalid => { /* ... */ },
///     DeleteQueuedReservedInstancesErrorCode::ReservedInstancesNotInQueuedState => { /* ... */ },
///     DeleteQueuedReservedInstancesErrorCode::UnexpectedError => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `deletequeuedreservedinstanceserrorcode` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `DeleteQueuedReservedInstancesErrorCode::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `DeleteQueuedReservedInstancesErrorCode::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `DeleteQueuedReservedInstancesErrorCode::NewFeature` is defined.
/// Specifically, when `deletequeuedreservedinstanceserrorcode` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `DeleteQueuedReservedInstancesErrorCode::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 DeleteQueuedReservedInstancesErrorCode {
    #[allow(missing_docs)] // documentation missing in model
    ReservedInstancesIdInvalid,
    #[allow(missing_docs)] // documentation missing in model
    ReservedInstancesNotInQueuedState,
    #[allow(missing_docs)] // documentation missing in model
    UnexpectedError,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for DeleteQueuedReservedInstancesErrorCode {
    fn from(s: &str) -> Self {
        match s {
            "reserved-instances-id-invalid" => {
                DeleteQueuedReservedInstancesErrorCode::ReservedInstancesIdInvalid
            }
            "reserved-instances-not-in-queued-state" => {
                DeleteQueuedReservedInstancesErrorCode::ReservedInstancesNotInQueuedState
            }
            "unexpected-error" => DeleteQueuedReservedInstancesErrorCode::UnexpectedError,
            other => DeleteQueuedReservedInstancesErrorCode::Unknown(
                crate::types::UnknownVariantValue(other.to_owned()),
            ),
        }
    }
}
impl std::str::FromStr for DeleteQueuedReservedInstancesErrorCode {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(DeleteQueuedReservedInstancesErrorCode::from(s))
    }
}
impl DeleteQueuedReservedInstancesErrorCode {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            DeleteQueuedReservedInstancesErrorCode::ReservedInstancesIdInvalid => {
                "reserved-instances-id-invalid"
            }
            DeleteQueuedReservedInstancesErrorCode::ReservedInstancesNotInQueuedState => {
                "reserved-instances-not-in-queued-state"
            }
            DeleteQueuedReservedInstancesErrorCode::UnexpectedError => "unexpected-error",
            DeleteQueuedReservedInstancesErrorCode::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &[
            "reserved-instances-id-invalid",
            "reserved-instances-not-in-queued-state",
            "unexpected-error",
        ]
    }
}
impl AsRef<str> for DeleteQueuedReservedInstancesErrorCode {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes a Reserved Instance whose queued purchase was successfully deleted.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SuccessfulQueuedPurchaseDeletion {
    /// <p>The ID of the Reserved Instance.</p>
    #[doc(hidden)]
    pub reserved_instances_id: std::option::Option<std::string::String>,
}
impl SuccessfulQueuedPurchaseDeletion {
    /// <p>The ID of the Reserved Instance.</p>
    pub fn reserved_instances_id(&self) -> std::option::Option<&str> {
        self.reserved_instances_id.as_deref()
    }
}
/// See [`SuccessfulQueuedPurchaseDeletion`](crate::model::SuccessfulQueuedPurchaseDeletion).
pub mod successful_queued_purchase_deletion {

    /// A builder for [`SuccessfulQueuedPurchaseDeletion`](crate::model::SuccessfulQueuedPurchaseDeletion).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) reserved_instances_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The ID of the Reserved Instance.</p>
        pub fn reserved_instances_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.reserved_instances_id = Some(input.into());
            self
        }
        /// <p>The ID of the Reserved Instance.</p>
        pub fn set_reserved_instances_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.reserved_instances_id = input;
            self
        }
        /// Consumes the builder and constructs a [`SuccessfulQueuedPurchaseDeletion`](crate::model::SuccessfulQueuedPurchaseDeletion).
        pub fn build(self) -> crate::model::SuccessfulQueuedPurchaseDeletion {
            crate::model::SuccessfulQueuedPurchaseDeletion {
                reserved_instances_id: self.reserved_instances_id,
            }
        }
    }
}
impl SuccessfulQueuedPurchaseDeletion {
    /// Creates a new builder-style object to manufacture [`SuccessfulQueuedPurchaseDeletion`](crate::model::SuccessfulQueuedPurchaseDeletion).
    pub fn builder() -> crate::model::successful_queued_purchase_deletion::Builder {
        crate::model::successful_queued_purchase_deletion::Builder::default()
    }
}

/// <p>Describes a launch template version that could not be deleted.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteLaunchTemplateVersionsResponseErrorItem {
    /// <p>The ID of the launch template.</p>
    #[doc(hidden)]
    pub launch_template_id: std::option::Option<std::string::String>,
    /// <p>The name of the launch template.</p>
    #[doc(hidden)]
    pub launch_template_name: std::option::Option<std::string::String>,
    /// <p>The version number of the launch template.</p>
    #[doc(hidden)]
    pub version_number: std::option::Option<i64>,
    /// <p>Information about the error.</p>
    #[doc(hidden)]
    pub response_error: std::option::Option<crate::model::ResponseError>,
}
impl DeleteLaunchTemplateVersionsResponseErrorItem {
    /// <p>The ID of the launch template.</p>
    pub fn launch_template_id(&self) -> std::option::Option<&str> {
        self.launch_template_id.as_deref()
    }
    /// <p>The name of the launch template.</p>
    pub fn launch_template_name(&self) -> std::option::Option<&str> {
        self.launch_template_name.as_deref()
    }
    /// <p>The version number of the launch template.</p>
    pub fn version_number(&self) -> std::option::Option<i64> {
        self.version_number
    }
    /// <p>Information about the error.</p>
    pub fn response_error(&self) -> std::option::Option<&crate::model::ResponseError> {
        self.response_error.as_ref()
    }
}
/// See [`DeleteLaunchTemplateVersionsResponseErrorItem`](crate::model::DeleteLaunchTemplateVersionsResponseErrorItem).
pub mod delete_launch_template_versions_response_error_item {

    /// A builder for [`DeleteLaunchTemplateVersionsResponseErrorItem`](crate::model::DeleteLaunchTemplateVersionsResponseErrorItem).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) launch_template_id: std::option::Option<std::string::String>,
        pub(crate) launch_template_name: std::option::Option<std::string::String>,
        pub(crate) version_number: std::option::Option<i64>,
        pub(crate) response_error: std::option::Option<crate::model::ResponseError>,
    }
    impl Builder {
        /// <p>The ID of the launch template.</p>
        pub fn launch_template_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.launch_template_id = Some(input.into());
            self
        }
        /// <p>The ID of the launch template.</p>
        pub fn set_launch_template_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.launch_template_id = input;
            self
        }
        /// <p>The name of the launch template.</p>
        pub fn launch_template_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.launch_template_name = Some(input.into());
            self
        }
        /// <p>The name of the launch template.</p>
        pub fn set_launch_template_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.launch_template_name = input;
            self
        }
        /// <p>The version number of the launch template.</p>
        pub fn version_number(mut self, input: i64) -> Self {
            self.version_number = Some(input);
            self
        }
        /// <p>The version number of the launch template.</p>
        pub fn set_version_number(mut self, input: std::option::Option<i64>) -> Self {
            self.version_number = input;
            self
        }
        /// <p>Information about the error.</p>
        pub fn response_error(mut self, input: crate::model::ResponseError) -> Self {
            self.response_error = Some(input);
            self
        }
        /// <p>Information about the error.</p>
        pub fn set_response_error(
            mut self,
            input: std::option::Option<crate::model::ResponseError>,
        ) -> Self {
            self.response_error = input;
            self
        }
        /// Consumes the builder and constructs a [`DeleteLaunchTemplateVersionsResponseErrorItem`](crate::model::DeleteLaunchTemplateVersionsResponseErrorItem).
        pub fn build(self) -> crate::model::DeleteLaunchTemplateVersionsResponseErrorItem {
            crate::model::DeleteLaunchTemplateVersionsResponseErrorItem {
                launch_template_id: self.launch_template_id,
                launch_template_name: self.launch_template_name,
                version_number: self.version_number,
                response_error: self.response_error,
            }
        }
    }
}
impl DeleteLaunchTemplateVersionsResponseErrorItem {
    /// Creates a new builder-style object to manufacture [`DeleteLaunchTemplateVersionsResponseErrorItem`](crate::model::DeleteLaunchTemplateVersionsResponseErrorItem).
    pub fn builder() -> crate::model::delete_launch_template_versions_response_error_item::Builder {
        crate::model::delete_launch_template_versions_response_error_item::Builder::default()
    }
}

/// <p>Describes the error that's returned when you cannot delete a launch template version.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ResponseError {
    /// <p>The error code.</p>
    #[doc(hidden)]
    pub code: std::option::Option<crate::model::LaunchTemplateErrorCode>,
    /// <p>The error message, if applicable.</p>
    #[doc(hidden)]
    pub message: std::option::Option<std::string::String>,
}
impl ResponseError {
    /// <p>The error code.</p>
    pub fn code(&self) -> std::option::Option<&crate::model::LaunchTemplateErrorCode> {
        self.code.as_ref()
    }
    /// <p>The error message, if applicable.</p>
    pub fn message(&self) -> std::option::Option<&str> {
        self.message.as_deref()
    }
}
/// See [`ResponseError`](crate::model::ResponseError).
pub mod response_error {

    /// A builder for [`ResponseError`](crate::model::ResponseError).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) code: std::option::Option<crate::model::LaunchTemplateErrorCode>,
        pub(crate) message: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The error code.</p>
        pub fn code(mut self, input: crate::model::LaunchTemplateErrorCode) -> Self {
            self.code = Some(input);
            self
        }
        /// <p>The error code.</p>
        pub fn set_code(
            mut self,
            input: std::option::Option<crate::model::LaunchTemplateErrorCode>,
        ) -> Self {
            self.code = input;
            self
        }
        /// <p>The error message, if applicable.</p>
        pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
            self.message = Some(input.into());
            self
        }
        /// <p>The error message, if applicable.</p>
        pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.message = input;
            self
        }
        /// Consumes the builder and constructs a [`ResponseError`](crate::model::ResponseError).
        pub fn build(self) -> crate::model::ResponseError {
            crate::model::ResponseError {
                code: self.code,
                message: self.message,
            }
        }
    }
}
impl ResponseError {
    /// Creates a new builder-style object to manufacture [`ResponseError`](crate::model::ResponseError).
    pub fn builder() -> crate::model::response_error::Builder {
        crate::model::response_error::Builder::default()
    }
}

/// When writing a match expression against `LaunchTemplateErrorCode`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let launchtemplateerrorcode = unimplemented!();
/// match launchtemplateerrorcode {
///     LaunchTemplateErrorCode::LaunchTemplateIdDoesNotExist => { /* ... */ },
///     LaunchTemplateErrorCode::LaunchTemplateIdMalformed => { /* ... */ },
///     LaunchTemplateErrorCode::LaunchTemplateNameDoesNotExist => { /* ... */ },
///     LaunchTemplateErrorCode::LaunchTemplateNameMalformed => { /* ... */ },
///     LaunchTemplateErrorCode::LaunchTemplateVersionDoesNotExist => { /* ... */ },
///     LaunchTemplateErrorCode::UnexpectedError => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `launchtemplateerrorcode` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `LaunchTemplateErrorCode::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `LaunchTemplateErrorCode::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `LaunchTemplateErrorCode::NewFeature` is defined.
/// Specifically, when `launchtemplateerrorcode` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `LaunchTemplateErrorCode::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 LaunchTemplateErrorCode {
    #[allow(missing_docs)] // documentation missing in model
    LaunchTemplateIdDoesNotExist,
    #[allow(missing_docs)] // documentation missing in model
    LaunchTemplateIdMalformed,
    #[allow(missing_docs)] // documentation missing in model
    LaunchTemplateNameDoesNotExist,
    #[allow(missing_docs)] // documentation missing in model
    LaunchTemplateNameMalformed,
    #[allow(missing_docs)] // documentation missing in model
    LaunchTemplateVersionDoesNotExist,
    #[allow(missing_docs)] // documentation missing in model
    UnexpectedError,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for LaunchTemplateErrorCode {
    fn from(s: &str) -> Self {
        match s {
            "launchTemplateIdDoesNotExist" => LaunchTemplateErrorCode::LaunchTemplateIdDoesNotExist,
            "launchTemplateIdMalformed" => LaunchTemplateErrorCode::LaunchTemplateIdMalformed,
            "launchTemplateNameDoesNotExist" => {
                LaunchTemplateErrorCode::LaunchTemplateNameDoesNotExist
            }
            "launchTemplateNameMalformed" => LaunchTemplateErrorCode::LaunchTemplateNameMalformed,
            "launchTemplateVersionDoesNotExist" => {
                LaunchTemplateErrorCode::LaunchTemplateVersionDoesNotExist
            }
            "unexpectedError" => LaunchTemplateErrorCode::UnexpectedError,
            other => LaunchTemplateErrorCode::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for LaunchTemplateErrorCode {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(LaunchTemplateErrorCode::from(s))
    }
}
impl LaunchTemplateErrorCode {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            LaunchTemplateErrorCode::LaunchTemplateIdDoesNotExist => "launchTemplateIdDoesNotExist",
            LaunchTemplateErrorCode::LaunchTemplateIdMalformed => "launchTemplateIdMalformed",
            LaunchTemplateErrorCode::LaunchTemplateNameDoesNotExist => {
                "launchTemplateNameDoesNotExist"
            }
            LaunchTemplateErrorCode::LaunchTemplateNameMalformed => "launchTemplateNameMalformed",
            LaunchTemplateErrorCode::LaunchTemplateVersionDoesNotExist => {
                "launchTemplateVersionDoesNotExist"
            }
            LaunchTemplateErrorCode::UnexpectedError => "unexpectedError",
            LaunchTemplateErrorCode::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &[
            "launchTemplateIdDoesNotExist",
            "launchTemplateIdMalformed",
            "launchTemplateNameDoesNotExist",
            "launchTemplateNameMalformed",
            "launchTemplateVersionDoesNotExist",
            "unexpectedError",
        ]
    }
}
impl AsRef<str> for LaunchTemplateErrorCode {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes a launch template version that was successfully deleted.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteLaunchTemplateVersionsResponseSuccessItem {
    /// <p>The ID of the launch template.</p>
    #[doc(hidden)]
    pub launch_template_id: std::option::Option<std::string::String>,
    /// <p>The name of the launch template.</p>
    #[doc(hidden)]
    pub launch_template_name: std::option::Option<std::string::String>,
    /// <p>The version number of the launch template.</p>
    #[doc(hidden)]
    pub version_number: std::option::Option<i64>,
}
impl DeleteLaunchTemplateVersionsResponseSuccessItem {
    /// <p>The ID of the launch template.</p>
    pub fn launch_template_id(&self) -> std::option::Option<&str> {
        self.launch_template_id.as_deref()
    }
    /// <p>The name of the launch template.</p>
    pub fn launch_template_name(&self) -> std::option::Option<&str> {
        self.launch_template_name.as_deref()
    }
    /// <p>The version number of the launch template.</p>
    pub fn version_number(&self) -> std::option::Option<i64> {
        self.version_number
    }
}
/// See [`DeleteLaunchTemplateVersionsResponseSuccessItem`](crate::model::DeleteLaunchTemplateVersionsResponseSuccessItem).
pub mod delete_launch_template_versions_response_success_item {

    /// A builder for [`DeleteLaunchTemplateVersionsResponseSuccessItem`](crate::model::DeleteLaunchTemplateVersionsResponseSuccessItem).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) launch_template_id: std::option::Option<std::string::String>,
        pub(crate) launch_template_name: std::option::Option<std::string::String>,
        pub(crate) version_number: std::option::Option<i64>,
    }
    impl Builder {
        /// <p>The ID of the launch template.</p>
        pub fn launch_template_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.launch_template_id = Some(input.into());
            self
        }
        /// <p>The ID of the launch template.</p>
        pub fn set_launch_template_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.launch_template_id = input;
            self
        }
        /// <p>The name of the launch template.</p>
        pub fn launch_template_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.launch_template_name = Some(input.into());
            self
        }
        /// <p>The name of the launch template.</p>
        pub fn set_launch_template_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.launch_template_name = input;
            self
        }
        /// <p>The version number of the launch template.</p>
        pub fn version_number(mut self, input: i64) -> Self {
            self.version_number = Some(input);
            self
        }
        /// <p>The version number of the launch template.</p>
        pub fn set_version_number(mut self, input: std::option::Option<i64>) -> Self {
            self.version_number = input;
            self
        }
        /// Consumes the builder and constructs a [`DeleteLaunchTemplateVersionsResponseSuccessItem`](crate::model::DeleteLaunchTemplateVersionsResponseSuccessItem).
        pub fn build(self) -> crate::model::DeleteLaunchTemplateVersionsResponseSuccessItem {
            crate::model::DeleteLaunchTemplateVersionsResponseSuccessItem {
                launch_template_id: self.launch_template_id,
                launch_template_name: self.launch_template_name,
                version_number: self.version_number,
            }
        }
    }
}
impl DeleteLaunchTemplateVersionsResponseSuccessItem {
    /// Creates a new builder-style object to manufacture [`DeleteLaunchTemplateVersionsResponseSuccessItem`](crate::model::DeleteLaunchTemplateVersionsResponseSuccessItem).
    pub fn builder() -> crate::model::delete_launch_template_versions_response_success_item::Builder
    {
        crate::model::delete_launch_template_versions_response_success_item::Builder::default()
    }
}

/// <p>The state of the event window.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InstanceEventWindowStateChange {
    /// <p>The ID of the event window.</p>
    #[doc(hidden)]
    pub instance_event_window_id: std::option::Option<std::string::String>,
    /// <p>The current state of the event window.</p>
    #[doc(hidden)]
    pub state: std::option::Option<crate::model::InstanceEventWindowState>,
}
impl InstanceEventWindowStateChange {
    /// <p>The ID of the event window.</p>
    pub fn instance_event_window_id(&self) -> std::option::Option<&str> {
        self.instance_event_window_id.as_deref()
    }
    /// <p>The current state of the event window.</p>
    pub fn state(&self) -> std::option::Option<&crate::model::InstanceEventWindowState> {
        self.state.as_ref()
    }
}
/// See [`InstanceEventWindowStateChange`](crate::model::InstanceEventWindowStateChange).
pub mod instance_event_window_state_change {

    /// A builder for [`InstanceEventWindowStateChange`](crate::model::InstanceEventWindowStateChange).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) instance_event_window_id: std::option::Option<std::string::String>,
        pub(crate) state: std::option::Option<crate::model::InstanceEventWindowState>,
    }
    impl Builder {
        /// <p>The ID of the event window.</p>
        pub fn instance_event_window_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.instance_event_window_id = Some(input.into());
            self
        }
        /// <p>The ID of the event window.</p>
        pub fn set_instance_event_window_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.instance_event_window_id = input;
            self
        }
        /// <p>The current state of the event window.</p>
        pub fn state(mut self, input: crate::model::InstanceEventWindowState) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>The current state of the event window.</p>
        pub fn set_state(
            mut self,
            input: std::option::Option<crate::model::InstanceEventWindowState>,
        ) -> Self {
            self.state = input;
            self
        }
        /// Consumes the builder and constructs a [`InstanceEventWindowStateChange`](crate::model::InstanceEventWindowStateChange).
        pub fn build(self) -> crate::model::InstanceEventWindowStateChange {
            crate::model::InstanceEventWindowStateChange {
                instance_event_window_id: self.instance_event_window_id,
                state: self.state,
            }
        }
    }
}
impl InstanceEventWindowStateChange {
    /// Creates a new builder-style object to manufacture [`InstanceEventWindowStateChange`](crate::model::InstanceEventWindowStateChange).
    pub fn builder() -> crate::model::instance_event_window_state_change::Builder {
        crate::model::instance_event_window_state_change::Builder::default()
    }
}

/// <p>Describes an EC2 Fleet that was not successfully deleted.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteFleetErrorItem {
    /// <p>The error.</p>
    #[doc(hidden)]
    pub error: std::option::Option<crate::model::DeleteFleetError>,
    /// <p>The ID of the EC2 Fleet.</p>
    #[doc(hidden)]
    pub fleet_id: std::option::Option<std::string::String>,
}
impl DeleteFleetErrorItem {
    /// <p>The error.</p>
    pub fn error(&self) -> std::option::Option<&crate::model::DeleteFleetError> {
        self.error.as_ref()
    }
    /// <p>The ID of the EC2 Fleet.</p>
    pub fn fleet_id(&self) -> std::option::Option<&str> {
        self.fleet_id.as_deref()
    }
}
/// See [`DeleteFleetErrorItem`](crate::model::DeleteFleetErrorItem).
pub mod delete_fleet_error_item {

    /// A builder for [`DeleteFleetErrorItem`](crate::model::DeleteFleetErrorItem).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) error: std::option::Option<crate::model::DeleteFleetError>,
        pub(crate) fleet_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The error.</p>
        pub fn error(mut self, input: crate::model::DeleteFleetError) -> Self {
            self.error = Some(input);
            self
        }
        /// <p>The error.</p>
        pub fn set_error(
            mut self,
            input: std::option::Option<crate::model::DeleteFleetError>,
        ) -> Self {
            self.error = input;
            self
        }
        /// <p>The ID of the EC2 Fleet.</p>
        pub fn fleet_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.fleet_id = Some(input.into());
            self
        }
        /// <p>The ID of the EC2 Fleet.</p>
        pub fn set_fleet_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.fleet_id = input;
            self
        }
        /// Consumes the builder and constructs a [`DeleteFleetErrorItem`](crate::model::DeleteFleetErrorItem).
        pub fn build(self) -> crate::model::DeleteFleetErrorItem {
            crate::model::DeleteFleetErrorItem {
                error: self.error,
                fleet_id: self.fleet_id,
            }
        }
    }
}
impl DeleteFleetErrorItem {
    /// Creates a new builder-style object to manufacture [`DeleteFleetErrorItem`](crate::model::DeleteFleetErrorItem).
    pub fn builder() -> crate::model::delete_fleet_error_item::Builder {
        crate::model::delete_fleet_error_item::Builder::default()
    }
}

/// <p>Describes an EC2 Fleet error.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteFleetError {
    /// <p>The error code.</p>
    #[doc(hidden)]
    pub code: std::option::Option<crate::model::DeleteFleetErrorCode>,
    /// <p>The description for the error code.</p>
    #[doc(hidden)]
    pub message: std::option::Option<std::string::String>,
}
impl DeleteFleetError {
    /// <p>The error code.</p>
    pub fn code(&self) -> std::option::Option<&crate::model::DeleteFleetErrorCode> {
        self.code.as_ref()
    }
    /// <p>The description for the error code.</p>
    pub fn message(&self) -> std::option::Option<&str> {
        self.message.as_deref()
    }
}
/// See [`DeleteFleetError`](crate::model::DeleteFleetError).
pub mod delete_fleet_error {

    /// A builder for [`DeleteFleetError`](crate::model::DeleteFleetError).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) code: std::option::Option<crate::model::DeleteFleetErrorCode>,
        pub(crate) message: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The error code.</p>
        pub fn code(mut self, input: crate::model::DeleteFleetErrorCode) -> Self {
            self.code = Some(input);
            self
        }
        /// <p>The error code.</p>
        pub fn set_code(
            mut self,
            input: std::option::Option<crate::model::DeleteFleetErrorCode>,
        ) -> Self {
            self.code = input;
            self
        }
        /// <p>The description for the error code.</p>
        pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
            self.message = Some(input.into());
            self
        }
        /// <p>The description for the error code.</p>
        pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.message = input;
            self
        }
        /// Consumes the builder and constructs a [`DeleteFleetError`](crate::model::DeleteFleetError).
        pub fn build(self) -> crate::model::DeleteFleetError {
            crate::model::DeleteFleetError {
                code: self.code,
                message: self.message,
            }
        }
    }
}
impl DeleteFleetError {
    /// Creates a new builder-style object to manufacture [`DeleteFleetError`](crate::model::DeleteFleetError).
    pub fn builder() -> crate::model::delete_fleet_error::Builder {
        crate::model::delete_fleet_error::Builder::default()
    }
}

/// When writing a match expression against `DeleteFleetErrorCode`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let deletefleeterrorcode = unimplemented!();
/// match deletefleeterrorcode {
///     DeleteFleetErrorCode::FleetIdDoesNotExist => { /* ... */ },
///     DeleteFleetErrorCode::FleetIdMalformed => { /* ... */ },
///     DeleteFleetErrorCode::FleetNotInDeletableState => { /* ... */ },
///     DeleteFleetErrorCode::UnexpectedError => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `deletefleeterrorcode` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `DeleteFleetErrorCode::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `DeleteFleetErrorCode::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `DeleteFleetErrorCode::NewFeature` is defined.
/// Specifically, when `deletefleeterrorcode` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `DeleteFleetErrorCode::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 DeleteFleetErrorCode {
    #[allow(missing_docs)] // documentation missing in model
    FleetIdDoesNotExist,
    #[allow(missing_docs)] // documentation missing in model
    FleetIdMalformed,
    #[allow(missing_docs)] // documentation missing in model
    FleetNotInDeletableState,
    #[allow(missing_docs)] // documentation missing in model
    UnexpectedError,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for DeleteFleetErrorCode {
    fn from(s: &str) -> Self {
        match s {
            "fleetIdDoesNotExist" => DeleteFleetErrorCode::FleetIdDoesNotExist,
            "fleetIdMalformed" => DeleteFleetErrorCode::FleetIdMalformed,
            "fleetNotInDeletableState" => DeleteFleetErrorCode::FleetNotInDeletableState,
            "unexpectedError" => DeleteFleetErrorCode::UnexpectedError,
            other => {
                DeleteFleetErrorCode::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for DeleteFleetErrorCode {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(DeleteFleetErrorCode::from(s))
    }
}
impl DeleteFleetErrorCode {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            DeleteFleetErrorCode::FleetIdDoesNotExist => "fleetIdDoesNotExist",
            DeleteFleetErrorCode::FleetIdMalformed => "fleetIdMalformed",
            DeleteFleetErrorCode::FleetNotInDeletableState => "fleetNotInDeletableState",
            DeleteFleetErrorCode::UnexpectedError => "unexpectedError",
            DeleteFleetErrorCode::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &[
            "fleetIdDoesNotExist",
            "fleetIdMalformed",
            "fleetNotInDeletableState",
            "unexpectedError",
        ]
    }
}
impl AsRef<str> for DeleteFleetErrorCode {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes an EC2 Fleet that was successfully deleted.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteFleetSuccessItem {
    /// <p>The current state of the EC2 Fleet.</p>
    #[doc(hidden)]
    pub current_fleet_state: std::option::Option<crate::model::FleetStateCode>,
    /// <p>The previous state of the EC2 Fleet.</p>
    #[doc(hidden)]
    pub previous_fleet_state: std::option::Option<crate::model::FleetStateCode>,
    /// <p>The ID of the EC2 Fleet.</p>
    #[doc(hidden)]
    pub fleet_id: std::option::Option<std::string::String>,
}
impl DeleteFleetSuccessItem {
    /// <p>The current state of the EC2 Fleet.</p>
    pub fn current_fleet_state(&self) -> std::option::Option<&crate::model::FleetStateCode> {
        self.current_fleet_state.as_ref()
    }
    /// <p>The previous state of the EC2 Fleet.</p>
    pub fn previous_fleet_state(&self) -> std::option::Option<&crate::model::FleetStateCode> {
        self.previous_fleet_state.as_ref()
    }
    /// <p>The ID of the EC2 Fleet.</p>
    pub fn fleet_id(&self) -> std::option::Option<&str> {
        self.fleet_id.as_deref()
    }
}
/// See [`DeleteFleetSuccessItem`](crate::model::DeleteFleetSuccessItem).
pub mod delete_fleet_success_item {

    /// A builder for [`DeleteFleetSuccessItem`](crate::model::DeleteFleetSuccessItem).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) current_fleet_state: std::option::Option<crate::model::FleetStateCode>,
        pub(crate) previous_fleet_state: std::option::Option<crate::model::FleetStateCode>,
        pub(crate) fleet_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The current state of the EC2 Fleet.</p>
        pub fn current_fleet_state(mut self, input: crate::model::FleetStateCode) -> Self {
            self.current_fleet_state = Some(input);
            self
        }
        /// <p>The current state of the EC2 Fleet.</p>
        pub fn set_current_fleet_state(
            mut self,
            input: std::option::Option<crate::model::FleetStateCode>,
        ) -> Self {
            self.current_fleet_state = input;
            self
        }
        /// <p>The previous state of the EC2 Fleet.</p>
        pub fn previous_fleet_state(mut self, input: crate::model::FleetStateCode) -> Self {
            self.previous_fleet_state = Some(input);
            self
        }
        /// <p>The previous state of the EC2 Fleet.</p>
        pub fn set_previous_fleet_state(
            mut self,
            input: std::option::Option<crate::model::FleetStateCode>,
        ) -> Self {
            self.previous_fleet_state = input;
            self
        }
        /// <p>The ID of the EC2 Fleet.</p>
        pub fn fleet_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.fleet_id = Some(input.into());
            self
        }
        /// <p>The ID of the EC2 Fleet.</p>
        pub fn set_fleet_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.fleet_id = input;
            self
        }
        /// Consumes the builder and constructs a [`DeleteFleetSuccessItem`](crate::model::DeleteFleetSuccessItem).
        pub fn build(self) -> crate::model::DeleteFleetSuccessItem {
            crate::model::DeleteFleetSuccessItem {
                current_fleet_state: self.current_fleet_state,
                previous_fleet_state: self.previous_fleet_state,
                fleet_id: self.fleet_id,
            }
        }
    }
}
impl DeleteFleetSuccessItem {
    /// Creates a new builder-style object to manufacture [`DeleteFleetSuccessItem`](crate::model::DeleteFleetSuccessItem).
    pub fn builder() -> crate::model::delete_fleet_success_item::Builder {
        crate::model::delete_fleet_success_item::Builder::default()
    }
}

/// <p> Information about a customer-owned IP address range. </p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CoipCidr {
    /// <p> An address range in a customer-owned IP address space. </p>
    #[doc(hidden)]
    pub cidr: std::option::Option<std::string::String>,
    /// <p> The ID of the address pool. </p>
    #[doc(hidden)]
    pub coip_pool_id: std::option::Option<std::string::String>,
    /// <p> The ID of the local gateway route table. </p>
    #[doc(hidden)]
    pub local_gateway_route_table_id: std::option::Option<std::string::String>,
}
impl CoipCidr {
    /// <p> An address range in a customer-owned IP address space. </p>
    pub fn cidr(&self) -> std::option::Option<&str> {
        self.cidr.as_deref()
    }
    /// <p> The ID of the address pool. </p>
    pub fn coip_pool_id(&self) -> std::option::Option<&str> {
        self.coip_pool_id.as_deref()
    }
    /// <p> The ID of the local gateway route table. </p>
    pub fn local_gateway_route_table_id(&self) -> std::option::Option<&str> {
        self.local_gateway_route_table_id.as_deref()
    }
}
/// See [`CoipCidr`](crate::model::CoipCidr).
pub mod coip_cidr {

    /// A builder for [`CoipCidr`](crate::model::CoipCidr).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) cidr: std::option::Option<std::string::String>,
        pub(crate) coip_pool_id: std::option::Option<std::string::String>,
        pub(crate) local_gateway_route_table_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p> An address range in a customer-owned IP address space. </p>
        pub fn cidr(mut self, input: impl Into<std::string::String>) -> Self {
            self.cidr = Some(input.into());
            self
        }
        /// <p> An address range in a customer-owned IP address space. </p>
        pub fn set_cidr(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.cidr = input;
            self
        }
        /// <p> The ID of the address pool. </p>
        pub fn coip_pool_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.coip_pool_id = Some(input.into());
            self
        }
        /// <p> The ID of the address pool. </p>
        pub fn set_coip_pool_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.coip_pool_id = input;
            self
        }
        /// <p> The ID of the local gateway route table. </p>
        pub fn local_gateway_route_table_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.local_gateway_route_table_id = Some(input.into());
            self
        }
        /// <p> The ID of the local gateway route table. </p>
        pub fn set_local_gateway_route_table_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.local_gateway_route_table_id = input;
            self
        }
        /// Consumes the builder and constructs a [`CoipCidr`](crate::model::CoipCidr).
        pub fn build(self) -> crate::model::CoipCidr {
            crate::model::CoipCidr {
                cidr: self.cidr,
                coip_pool_id: self.coip_pool_id,
                local_gateway_route_table_id: self.local_gateway_route_table_id,
            }
        }
    }
}
impl CoipCidr {
    /// Creates a new builder-style object to manufacture [`CoipCidr`](crate::model::CoipCidr).
    pub fn builder() -> crate::model::coip_cidr::Builder {
        crate::model::coip_cidr::Builder::default()
    }
}

/// <p>Describes VPN connection options.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct VpnConnectionOptionsSpecification {
    /// <p>Indicate whether to enable acceleration for the VPN connection.</p>
    /// <p>Default: <code>false</code> </p>
    #[doc(hidden)]
    pub enable_acceleration: std::option::Option<bool>,
    /// <p>Indicate whether the VPN connection uses static routes only. If you are creating a VPN connection for a device that does not support BGP, you must specify <code>true</code>. Use <code>CreateVpnConnectionRoute</code> to create a static route.</p>
    /// <p>Default: <code>false</code> </p>
    #[doc(hidden)]
    pub static_routes_only: std::option::Option<bool>,
    /// <p>Indicate whether the VPN tunnels process IPv4 or IPv6 traffic.</p>
    /// <p>Default: <code>ipv4</code> </p>
    #[doc(hidden)]
    pub tunnel_inside_ip_version: std::option::Option<crate::model::TunnelInsideIpVersion>,
    /// <p>The tunnel options for the VPN connection.</p>
    #[doc(hidden)]
    pub tunnel_options:
        std::option::Option<std::vec::Vec<crate::model::VpnTunnelOptionsSpecification>>,
    /// <p>The IPv4 CIDR on the customer gateway (on-premises) side of the VPN connection.</p>
    /// <p>Default: <code>0.0.0.0/0</code> </p>
    #[doc(hidden)]
    pub local_ipv4_network_cidr: std::option::Option<std::string::String>,
    /// <p>The IPv4 CIDR on the Amazon Web Services side of the VPN connection.</p>
    /// <p>Default: <code>0.0.0.0/0</code> </p>
    #[doc(hidden)]
    pub remote_ipv4_network_cidr: std::option::Option<std::string::String>,
    /// <p>The IPv6 CIDR on the customer gateway (on-premises) side of the VPN connection.</p>
    /// <p>Default: <code>::/0</code> </p>
    #[doc(hidden)]
    pub local_ipv6_network_cidr: std::option::Option<std::string::String>,
    /// <p>The IPv6 CIDR on the Amazon Web Services side of the VPN connection.</p>
    /// <p>Default: <code>::/0</code> </p>
    #[doc(hidden)]
    pub remote_ipv6_network_cidr: std::option::Option<std::string::String>,
    /// <p>The type of IPv4 address assigned to the outside interface of the customer gateway device.</p>
    /// <p>Valid values: <code>PrivateIpv4</code> | <code>PublicIpv4</code> </p>
    /// <p>Default: <code>PublicIpv4</code> </p>
    #[doc(hidden)]
    pub outside_ip_address_type: std::option::Option<std::string::String>,
    /// <p>The transit gateway attachment ID to use for the VPN tunnel.</p>
    /// <p>Required if <code>OutsideIpAddressType</code> is set to <code>PrivateIpv4</code>.</p>
    #[doc(hidden)]
    pub transport_transit_gateway_attachment_id: std::option::Option<std::string::String>,
}
impl VpnConnectionOptionsSpecification {
    /// <p>Indicate whether to enable acceleration for the VPN connection.</p>
    /// <p>Default: <code>false</code> </p>
    pub fn enable_acceleration(&self) -> std::option::Option<bool> {
        self.enable_acceleration
    }
    /// <p>Indicate whether the VPN connection uses static routes only. If you are creating a VPN connection for a device that does not support BGP, you must specify <code>true</code>. Use <code>CreateVpnConnectionRoute</code> to create a static route.</p>
    /// <p>Default: <code>false</code> </p>
    pub fn static_routes_only(&self) -> std::option::Option<bool> {
        self.static_routes_only
    }
    /// <p>Indicate whether the VPN tunnels process IPv4 or IPv6 traffic.</p>
    /// <p>Default: <code>ipv4</code> </p>
    pub fn tunnel_inside_ip_version(
        &self,
    ) -> std::option::Option<&crate::model::TunnelInsideIpVersion> {
        self.tunnel_inside_ip_version.as_ref()
    }
    /// <p>The tunnel options for the VPN connection.</p>
    pub fn tunnel_options(
        &self,
    ) -> std::option::Option<&[crate::model::VpnTunnelOptionsSpecification]> {
        self.tunnel_options.as_deref()
    }
    /// <p>The IPv4 CIDR on the customer gateway (on-premises) side of the VPN connection.</p>
    /// <p>Default: <code>0.0.0.0/0</code> </p>
    pub fn local_ipv4_network_cidr(&self) -> std::option::Option<&str> {
        self.local_ipv4_network_cidr.as_deref()
    }
    /// <p>The IPv4 CIDR on the Amazon Web Services side of the VPN connection.</p>
    /// <p>Default: <code>0.0.0.0/0</code> </p>
    pub fn remote_ipv4_network_cidr(&self) -> std::option::Option<&str> {
        self.remote_ipv4_network_cidr.as_deref()
    }
    /// <p>The IPv6 CIDR on the customer gateway (on-premises) side of the VPN connection.</p>
    /// <p>Default: <code>::/0</code> </p>
    pub fn local_ipv6_network_cidr(&self) -> std::option::Option<&str> {
        self.local_ipv6_network_cidr.as_deref()
    }
    /// <p>The IPv6 CIDR on the Amazon Web Services side of the VPN connection.</p>
    /// <p>Default: <code>::/0</code> </p>
    pub fn remote_ipv6_network_cidr(&self) -> std::option::Option<&str> {
        self.remote_ipv6_network_cidr.as_deref()
    }
    /// <p>The type of IPv4 address assigned to the outside interface of the customer gateway device.</p>
    /// <p>Valid values: <code>PrivateIpv4</code> | <code>PublicIpv4</code> </p>
    /// <p>Default: <code>PublicIpv4</code> </p>
    pub fn outside_ip_address_type(&self) -> std::option::Option<&str> {
        self.outside_ip_address_type.as_deref()
    }
    /// <p>The transit gateway attachment ID to use for the VPN tunnel.</p>
    /// <p>Required if <code>OutsideIpAddressType</code> is set to <code>PrivateIpv4</code>.</p>
    pub fn transport_transit_gateway_attachment_id(&self) -> std::option::Option<&str> {
        self.transport_transit_gateway_attachment_id.as_deref()
    }
}
/// See [`VpnConnectionOptionsSpecification`](crate::model::VpnConnectionOptionsSpecification).
pub mod vpn_connection_options_specification {

    /// A builder for [`VpnConnectionOptionsSpecification`](crate::model::VpnConnectionOptionsSpecification).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) enable_acceleration: std::option::Option<bool>,
        pub(crate) static_routes_only: std::option::Option<bool>,
        pub(crate) tunnel_inside_ip_version:
            std::option::Option<crate::model::TunnelInsideIpVersion>,
        pub(crate) tunnel_options:
            std::option::Option<std::vec::Vec<crate::model::VpnTunnelOptionsSpecification>>,
        pub(crate) local_ipv4_network_cidr: std::option::Option<std::string::String>,
        pub(crate) remote_ipv4_network_cidr: std::option::Option<std::string::String>,
        pub(crate) local_ipv6_network_cidr: std::option::Option<std::string::String>,
        pub(crate) remote_ipv6_network_cidr: std::option::Option<std::string::String>,
        pub(crate) outside_ip_address_type: std::option::Option<std::string::String>,
        pub(crate) transport_transit_gateway_attachment_id:
            std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>Indicate whether to enable acceleration for the VPN connection.</p>
        /// <p>Default: <code>false</code> </p>
        pub fn enable_acceleration(mut self, input: bool) -> Self {
            self.enable_acceleration = Some(input);
            self
        }
        /// <p>Indicate whether to enable acceleration for the VPN connection.</p>
        /// <p>Default: <code>false</code> </p>
        pub fn set_enable_acceleration(mut self, input: std::option::Option<bool>) -> Self {
            self.enable_acceleration = input;
            self
        }
        /// <p>Indicate whether the VPN connection uses static routes only. If you are creating a VPN connection for a device that does not support BGP, you must specify <code>true</code>. Use <code>CreateVpnConnectionRoute</code> to create a static route.</p>
        /// <p>Default: <code>false</code> </p>
        pub fn static_routes_only(mut self, input: bool) -> Self {
            self.static_routes_only = Some(input);
            self
        }
        /// <p>Indicate whether the VPN connection uses static routes only. If you are creating a VPN connection for a device that does not support BGP, you must specify <code>true</code>. Use <code>CreateVpnConnectionRoute</code> to create a static route.</p>
        /// <p>Default: <code>false</code> </p>
        pub fn set_static_routes_only(mut self, input: std::option::Option<bool>) -> Self {
            self.static_routes_only = input;
            self
        }
        /// <p>Indicate whether the VPN tunnels process IPv4 or IPv6 traffic.</p>
        /// <p>Default: <code>ipv4</code> </p>
        pub fn tunnel_inside_ip_version(
            mut self,
            input: crate::model::TunnelInsideIpVersion,
        ) -> Self {
            self.tunnel_inside_ip_version = Some(input);
            self
        }
        /// <p>Indicate whether the VPN tunnels process IPv4 or IPv6 traffic.</p>
        /// <p>Default: <code>ipv4</code> </p>
        pub fn set_tunnel_inside_ip_version(
            mut self,
            input: std::option::Option<crate::model::TunnelInsideIpVersion>,
        ) -> Self {
            self.tunnel_inside_ip_version = input;
            self
        }
        /// Appends an item to `tunnel_options`.
        ///
        /// To override the contents of this collection use [`set_tunnel_options`](Self::set_tunnel_options).
        ///
        /// <p>The tunnel options for the VPN connection.</p>
        pub fn tunnel_options(
            mut self,
            input: crate::model::VpnTunnelOptionsSpecification,
        ) -> Self {
            let mut v = self.tunnel_options.unwrap_or_default();
            v.push(input);
            self.tunnel_options = Some(v);
            self
        }
        /// <p>The tunnel options for the VPN connection.</p>
        pub fn set_tunnel_options(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::VpnTunnelOptionsSpecification>>,
        ) -> Self {
            self.tunnel_options = input;
            self
        }
        /// <p>The IPv4 CIDR on the customer gateway (on-premises) side of the VPN connection.</p>
        /// <p>Default: <code>0.0.0.0/0</code> </p>
        pub fn local_ipv4_network_cidr(mut self, input: impl Into<std::string::String>) -> Self {
            self.local_ipv4_network_cidr = Some(input.into());
            self
        }
        /// <p>The IPv4 CIDR on the customer gateway (on-premises) side of the VPN connection.</p>
        /// <p>Default: <code>0.0.0.0/0</code> </p>
        pub fn set_local_ipv4_network_cidr(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.local_ipv4_network_cidr = input;
            self
        }
        /// <p>The IPv4 CIDR on the Amazon Web Services side of the VPN connection.</p>
        /// <p>Default: <code>0.0.0.0/0</code> </p>
        pub fn remote_ipv4_network_cidr(mut self, input: impl Into<std::string::String>) -> Self {
            self.remote_ipv4_network_cidr = Some(input.into());
            self
        }
        /// <p>The IPv4 CIDR on the Amazon Web Services side of the VPN connection.</p>
        /// <p>Default: <code>0.0.0.0/0</code> </p>
        pub fn set_remote_ipv4_network_cidr(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.remote_ipv4_network_cidr = input;
            self
        }
        /// <p>The IPv6 CIDR on the customer gateway (on-premises) side of the VPN connection.</p>
        /// <p>Default: <code>::/0</code> </p>
        pub fn local_ipv6_network_cidr(mut self, input: impl Into<std::string::String>) -> Self {
            self.local_ipv6_network_cidr = Some(input.into());
            self
        }
        /// <p>The IPv6 CIDR on the customer gateway (on-premises) side of the VPN connection.</p>
        /// <p>Default: <code>::/0</code> </p>
        pub fn set_local_ipv6_network_cidr(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.local_ipv6_network_cidr = input;
            self
        }
        /// <p>The IPv6 CIDR on the Amazon Web Services side of the VPN connection.</p>
        /// <p>Default: <code>::/0</code> </p>
        pub fn remote_ipv6_network_cidr(mut self, input: impl Into<std::string::String>) -> Self {
            self.remote_ipv6_network_cidr = Some(input.into());
            self
        }
        /// <p>The IPv6 CIDR on the Amazon Web Services side of the VPN connection.</p>
        /// <p>Default: <code>::/0</code> </p>
        pub fn set_remote_ipv6_network_cidr(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.remote_ipv6_network_cidr = input;
            self
        }
        /// <p>The type of IPv4 address assigned to the outside interface of the customer gateway device.</p>
        /// <p>Valid values: <code>PrivateIpv4</code> | <code>PublicIpv4</code> </p>
        /// <p>Default: <code>PublicIpv4</code> </p>
        pub fn outside_ip_address_type(mut self, input: impl Into<std::string::String>) -> Self {
            self.outside_ip_address_type = Some(input.into());
            self
        }
        /// <p>The type of IPv4 address assigned to the outside interface of the customer gateway device.</p>
        /// <p>Valid values: <code>PrivateIpv4</code> | <code>PublicIpv4</code> </p>
        /// <p>Default: <code>PublicIpv4</code> </p>
        pub fn set_outside_ip_address_type(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.outside_ip_address_type = input;
            self
        }
        /// <p>The transit gateway attachment ID to use for the VPN tunnel.</p>
        /// <p>Required if <code>OutsideIpAddressType</code> is set to <code>PrivateIpv4</code>.</p>
        pub fn transport_transit_gateway_attachment_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.transport_transit_gateway_attachment_id = Some(input.into());
            self
        }
        /// <p>The transit gateway attachment ID to use for the VPN tunnel.</p>
        /// <p>Required if <code>OutsideIpAddressType</code> is set to <code>PrivateIpv4</code>.</p>
        pub fn set_transport_transit_gateway_attachment_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.transport_transit_gateway_attachment_id = input;
            self
        }
        /// Consumes the builder and constructs a [`VpnConnectionOptionsSpecification`](crate::model::VpnConnectionOptionsSpecification).
        pub fn build(self) -> crate::model::VpnConnectionOptionsSpecification {
            crate::model::VpnConnectionOptionsSpecification {
                enable_acceleration: self.enable_acceleration,
                static_routes_only: self.static_routes_only,
                tunnel_inside_ip_version: self.tunnel_inside_ip_version,
                tunnel_options: self.tunnel_options,
                local_ipv4_network_cidr: self.local_ipv4_network_cidr,
                remote_ipv4_network_cidr: self.remote_ipv4_network_cidr,
                local_ipv6_network_cidr: self.local_ipv6_network_cidr,
                remote_ipv6_network_cidr: self.remote_ipv6_network_cidr,
                outside_ip_address_type: self.outside_ip_address_type,
                transport_transit_gateway_attachment_id: self
                    .transport_transit_gateway_attachment_id,
            }
        }
    }
}
impl VpnConnectionOptionsSpecification {
    /// Creates a new builder-style object to manufacture [`VpnConnectionOptionsSpecification`](crate::model::VpnConnectionOptionsSpecification).
    pub fn builder() -> crate::model::vpn_connection_options_specification::Builder {
        crate::model::vpn_connection_options_specification::Builder::default()
    }
}

/// <p>The tunnel options for a single VPN tunnel.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct VpnTunnelOptionsSpecification {
    /// <p>The range of inside IPv4 addresses for the tunnel. Any specified CIDR blocks must be unique across all VPN connections that use the same virtual private gateway. </p>
    /// <p>Constraints: A size /30 CIDR block from the <code>169.254.0.0/16</code> range. The following CIDR blocks are reserved and cannot be used:</p>
    /// <ul>
    /// <li> <p> <code>169.254.0.0/30</code> </p> </li>
    /// <li> <p> <code>169.254.1.0/30</code> </p> </li>
    /// <li> <p> <code>169.254.2.0/30</code> </p> </li>
    /// <li> <p> <code>169.254.3.0/30</code> </p> </li>
    /// <li> <p> <code>169.254.4.0/30</code> </p> </li>
    /// <li> <p> <code>169.254.5.0/30</code> </p> </li>
    /// <li> <p> <code>169.254.169.252/30</code> </p> </li>
    /// </ul>
    #[doc(hidden)]
    pub tunnel_inside_cidr: std::option::Option<std::string::String>,
    /// <p>The range of inside IPv6 addresses for the tunnel. Any specified CIDR blocks must be unique across all VPN connections that use the same transit gateway.</p>
    /// <p>Constraints: A size /126 CIDR block from the local <code>fd00::/8</code> range.</p>
    #[doc(hidden)]
    pub tunnel_inside_ipv6_cidr: std::option::Option<std::string::String>,
    /// <p>The pre-shared key (PSK) to establish initial authentication between the virtual private gateway and customer gateway.</p>
    /// <p>Constraints: Allowed characters are alphanumeric characters, periods (.), and underscores (_). Must be between 8 and 64 characters in length and cannot start with zero (0).</p>
    #[doc(hidden)]
    pub pre_shared_key: std::option::Option<std::string::String>,
    /// <p>The lifetime for phase 1 of the IKE negotiation, in seconds.</p>
    /// <p>Constraints: A value between 900 and 28,800.</p>
    /// <p>Default: <code>28800</code> </p>
    #[doc(hidden)]
    pub phase1_lifetime_seconds: std::option::Option<i32>,
    /// <p>The lifetime for phase 2 of the IKE negotiation, in seconds.</p>
    /// <p>Constraints: A value between 900 and 3,600. The value must be less than the value for <code>Phase1LifetimeSeconds</code>.</p>
    /// <p>Default: <code>3600</code> </p>
    #[doc(hidden)]
    pub phase2_lifetime_seconds: std::option::Option<i32>,
    /// <p>The margin time, in seconds, before the phase 2 lifetime expires, during which the Amazon Web Services side of the VPN connection performs an IKE rekey. The exact time of the rekey is randomly selected based on the value for <code>RekeyFuzzPercentage</code>.</p>
    /// <p>Constraints: A value between 60 and half of <code>Phase2LifetimeSeconds</code>.</p>
    /// <p>Default: <code>540</code> </p>
    #[doc(hidden)]
    pub rekey_margin_time_seconds: std::option::Option<i32>,
    /// <p>The percentage of the rekey window (determined by <code>RekeyMarginTimeSeconds</code>) during which the rekey time is randomly selected.</p>
    /// <p>Constraints: A value between 0 and 100.</p>
    /// <p>Default: <code>100</code> </p>
    #[doc(hidden)]
    pub rekey_fuzz_percentage: std::option::Option<i32>,
    /// <p>The number of packets in an IKE replay window.</p>
    /// <p>Constraints: A value between 64 and 2048.</p>
    /// <p>Default: <code>1024</code> </p>
    #[doc(hidden)]
    pub replay_window_size: std::option::Option<i32>,
    /// <p>The number of seconds after which a DPD timeout occurs.</p>
    /// <p>Constraints: A value greater than or equal to 30.</p>
    /// <p>Default: <code>30</code> </p>
    #[doc(hidden)]
    pub dpd_timeout_seconds: std::option::Option<i32>,
    /// <p>The action to take after DPD timeout occurs. Specify <code>restart</code> to restart the IKE initiation. Specify <code>clear</code> to end the IKE session.</p>
    /// <p>Valid Values: <code>clear</code> | <code>none</code> | <code>restart</code> </p>
    /// <p>Default: <code>clear</code> </p>
    #[doc(hidden)]
    pub dpd_timeout_action: std::option::Option<std::string::String>,
    /// <p>One or more encryption algorithms that are permitted for the VPN tunnel for phase 1 IKE negotiations.</p>
    /// <p>Valid values: <code>AES128</code> | <code>AES256</code> | <code>AES128-GCM-16</code> | <code>AES256-GCM-16</code> </p>
    #[doc(hidden)]
    pub phase1_encryption_algorithms: std::option::Option<
        std::vec::Vec<crate::model::Phase1EncryptionAlgorithmsRequestListValue>,
    >,
    /// <p>One or more encryption algorithms that are permitted for the VPN tunnel for phase 2 IKE negotiations.</p>
    /// <p>Valid values: <code>AES128</code> | <code>AES256</code> | <code>AES128-GCM-16</code> | <code>AES256-GCM-16</code> </p>
    #[doc(hidden)]
    pub phase2_encryption_algorithms: std::option::Option<
        std::vec::Vec<crate::model::Phase2EncryptionAlgorithmsRequestListValue>,
    >,
    /// <p>One or more integrity algorithms that are permitted for the VPN tunnel for phase 1 IKE negotiations.</p>
    /// <p>Valid values: <code>SHA1</code> | <code>SHA2-256</code> | <code>SHA2-384</code> | <code>SHA2-512</code> </p>
    #[doc(hidden)]
    pub phase1_integrity_algorithms:
        std::option::Option<std::vec::Vec<crate::model::Phase1IntegrityAlgorithmsRequestListValue>>,
    /// <p>One or more integrity algorithms that are permitted for the VPN tunnel for phase 2 IKE negotiations.</p>
    /// <p>Valid values: <code>SHA1</code> | <code>SHA2-256</code> | <code>SHA2-384</code> | <code>SHA2-512</code> </p>
    #[doc(hidden)]
    pub phase2_integrity_algorithms:
        std::option::Option<std::vec::Vec<crate::model::Phase2IntegrityAlgorithmsRequestListValue>>,
    /// <p>One or more Diffie-Hellman group numbers that are permitted for the VPN tunnel for phase 1 IKE negotiations.</p>
    /// <p>Valid values: <code>2</code> | <code>14</code> | <code>15</code> | <code>16</code> | <code>17</code> | <code>18</code> | <code>19</code> | <code>20</code> | <code>21</code> | <code>22</code> | <code>23</code> | <code>24</code> </p>
    #[doc(hidden)]
    pub phase1_dh_group_numbers:
        std::option::Option<std::vec::Vec<crate::model::Phase1DhGroupNumbersRequestListValue>>,
    /// <p>One or more Diffie-Hellman group numbers that are permitted for the VPN tunnel for phase 2 IKE negotiations.</p>
    /// <p>Valid values: <code>2</code> | <code>5</code> | <code>14</code> | <code>15</code> | <code>16</code> | <code>17</code> | <code>18</code> | <code>19</code> | <code>20</code> | <code>21</code> | <code>22</code> | <code>23</code> | <code>24</code> </p>
    #[doc(hidden)]
    pub phase2_dh_group_numbers:
        std::option::Option<std::vec::Vec<crate::model::Phase2DhGroupNumbersRequestListValue>>,
    /// <p>The IKE versions that are permitted for the VPN tunnel.</p>
    /// <p>Valid values: <code>ikev1</code> | <code>ikev2</code> </p>
    #[doc(hidden)]
    pub ike_versions: std::option::Option<std::vec::Vec<crate::model::IkeVersionsRequestListValue>>,
    /// <p>The action to take when the establishing the tunnel for the VPN connection. By default, your customer gateway device must initiate the IKE negotiation and bring up the tunnel. Specify <code>start</code> for Amazon Web Services to initiate the IKE negotiation.</p>
    /// <p>Valid Values: <code>add</code> | <code>start</code> </p>
    /// <p>Default: <code>add</code> </p>
    #[doc(hidden)]
    pub startup_action: std::option::Option<std::string::String>,
    /// <p>Options for logging VPN tunnel activity.</p>
    #[doc(hidden)]
    pub log_options: std::option::Option<crate::model::VpnTunnelLogOptionsSpecification>,
}
impl VpnTunnelOptionsSpecification {
    /// <p>The range of inside IPv4 addresses for the tunnel. Any specified CIDR blocks must be unique across all VPN connections that use the same virtual private gateway. </p>
    /// <p>Constraints: A size /30 CIDR block from the <code>169.254.0.0/16</code> range. The following CIDR blocks are reserved and cannot be used:</p>
    /// <ul>
    /// <li> <p> <code>169.254.0.0/30</code> </p> </li>
    /// <li> <p> <code>169.254.1.0/30</code> </p> </li>
    /// <li> <p> <code>169.254.2.0/30</code> </p> </li>
    /// <li> <p> <code>169.254.3.0/30</code> </p> </li>
    /// <li> <p> <code>169.254.4.0/30</code> </p> </li>
    /// <li> <p> <code>169.254.5.0/30</code> </p> </li>
    /// <li> <p> <code>169.254.169.252/30</code> </p> </li>
    /// </ul>
    pub fn tunnel_inside_cidr(&self) -> std::option::Option<&str> {
        self.tunnel_inside_cidr.as_deref()
    }
    /// <p>The range of inside IPv6 addresses for the tunnel. Any specified CIDR blocks must be unique across all VPN connections that use the same transit gateway.</p>
    /// <p>Constraints: A size /126 CIDR block from the local <code>fd00::/8</code> range.</p>
    pub fn tunnel_inside_ipv6_cidr(&self) -> std::option::Option<&str> {
        self.tunnel_inside_ipv6_cidr.as_deref()
    }
    /// <p>The pre-shared key (PSK) to establish initial authentication between the virtual private gateway and customer gateway.</p>
    /// <p>Constraints: Allowed characters are alphanumeric characters, periods (.), and underscores (_). Must be between 8 and 64 characters in length and cannot start with zero (0).</p>
    pub fn pre_shared_key(&self) -> std::option::Option<&str> {
        self.pre_shared_key.as_deref()
    }
    /// <p>The lifetime for phase 1 of the IKE negotiation, in seconds.</p>
    /// <p>Constraints: A value between 900 and 28,800.</p>
    /// <p>Default: <code>28800</code> </p>
    pub fn phase1_lifetime_seconds(&self) -> std::option::Option<i32> {
        self.phase1_lifetime_seconds
    }
    /// <p>The lifetime for phase 2 of the IKE negotiation, in seconds.</p>
    /// <p>Constraints: A value between 900 and 3,600. The value must be less than the value for <code>Phase1LifetimeSeconds</code>.</p>
    /// <p>Default: <code>3600</code> </p>
    pub fn phase2_lifetime_seconds(&self) -> std::option::Option<i32> {
        self.phase2_lifetime_seconds
    }
    /// <p>The margin time, in seconds, before the phase 2 lifetime expires, during which the Amazon Web Services side of the VPN connection performs an IKE rekey. The exact time of the rekey is randomly selected based on the value for <code>RekeyFuzzPercentage</code>.</p>
    /// <p>Constraints: A value between 60 and half of <code>Phase2LifetimeSeconds</code>.</p>
    /// <p>Default: <code>540</code> </p>
    pub fn rekey_margin_time_seconds(&self) -> std::option::Option<i32> {
        self.rekey_margin_time_seconds
    }
    /// <p>The percentage of the rekey window (determined by <code>RekeyMarginTimeSeconds</code>) during which the rekey time is randomly selected.</p>
    /// <p>Constraints: A value between 0 and 100.</p>
    /// <p>Default: <code>100</code> </p>
    pub fn rekey_fuzz_percentage(&self) -> std::option::Option<i32> {
        self.rekey_fuzz_percentage
    }
    /// <p>The number of packets in an IKE replay window.</p>
    /// <p>Constraints: A value between 64 and 2048.</p>
    /// <p>Default: <code>1024</code> </p>
    pub fn replay_window_size(&self) -> std::option::Option<i32> {
        self.replay_window_size
    }
    /// <p>The number of seconds after which a DPD timeout occurs.</p>
    /// <p>Constraints: A value greater than or equal to 30.</p>
    /// <p>Default: <code>30</code> </p>
    pub fn dpd_timeout_seconds(&self) -> std::option::Option<i32> {
        self.dpd_timeout_seconds
    }
    /// <p>The action to take after DPD timeout occurs. Specify <code>restart</code> to restart the IKE initiation. Specify <code>clear</code> to end the IKE session.</p>
    /// <p>Valid Values: <code>clear</code> | <code>none</code> | <code>restart</code> </p>
    /// <p>Default: <code>clear</code> </p>
    pub fn dpd_timeout_action(&self) -> std::option::Option<&str> {
        self.dpd_timeout_action.as_deref()
    }
    /// <p>One or more encryption algorithms that are permitted for the VPN tunnel for phase 1 IKE negotiations.</p>
    /// <p>Valid values: <code>AES128</code> | <code>AES256</code> | <code>AES128-GCM-16</code> | <code>AES256-GCM-16</code> </p>
    pub fn phase1_encryption_algorithms(
        &self,
    ) -> std::option::Option<&[crate::model::Phase1EncryptionAlgorithmsRequestListValue]> {
        self.phase1_encryption_algorithms.as_deref()
    }
    /// <p>One or more encryption algorithms that are permitted for the VPN tunnel for phase 2 IKE negotiations.</p>
    /// <p>Valid values: <code>AES128</code> | <code>AES256</code> | <code>AES128-GCM-16</code> | <code>AES256-GCM-16</code> </p>
    pub fn phase2_encryption_algorithms(
        &self,
    ) -> std::option::Option<&[crate::model::Phase2EncryptionAlgorithmsRequestListValue]> {
        self.phase2_encryption_algorithms.as_deref()
    }
    /// <p>One or more integrity algorithms that are permitted for the VPN tunnel for phase 1 IKE negotiations.</p>
    /// <p>Valid values: <code>SHA1</code> | <code>SHA2-256</code> | <code>SHA2-384</code> | <code>SHA2-512</code> </p>
    pub fn phase1_integrity_algorithms(
        &self,
    ) -> std::option::Option<&[crate::model::Phase1IntegrityAlgorithmsRequestListValue]> {
        self.phase1_integrity_algorithms.as_deref()
    }
    /// <p>One or more integrity algorithms that are permitted for the VPN tunnel for phase 2 IKE negotiations.</p>
    /// <p>Valid values: <code>SHA1</code> | <code>SHA2-256</code> | <code>SHA2-384</code> | <code>SHA2-512</code> </p>
    pub fn phase2_integrity_algorithms(
        &self,
    ) -> std::option::Option<&[crate::model::Phase2IntegrityAlgorithmsRequestListValue]> {
        self.phase2_integrity_algorithms.as_deref()
    }
    /// <p>One or more Diffie-Hellman group numbers that are permitted for the VPN tunnel for phase 1 IKE negotiations.</p>
    /// <p>Valid values: <code>2</code> | <code>14</code> | <code>15</code> | <code>16</code> | <code>17</code> | <code>18</code> | <code>19</code> | <code>20</code> | <code>21</code> | <code>22</code> | <code>23</code> | <code>24</code> </p>
    pub fn phase1_dh_group_numbers(
        &self,
    ) -> std::option::Option<&[crate::model::Phase1DhGroupNumbersRequestListValue]> {
        self.phase1_dh_group_numbers.as_deref()
    }
    /// <p>One or more Diffie-Hellman group numbers that are permitted for the VPN tunnel for phase 2 IKE negotiations.</p>
    /// <p>Valid values: <code>2</code> | <code>5</code> | <code>14</code> | <code>15</code> | <code>16</code> | <code>17</code> | <code>18</code> | <code>19</code> | <code>20</code> | <code>21</code> | <code>22</code> | <code>23</code> | <code>24</code> </p>
    pub fn phase2_dh_group_numbers(
        &self,
    ) -> std::option::Option<&[crate::model::Phase2DhGroupNumbersRequestListValue]> {
        self.phase2_dh_group_numbers.as_deref()
    }
    /// <p>The IKE versions that are permitted for the VPN tunnel.</p>
    /// <p>Valid values: <code>ikev1</code> | <code>ikev2</code> </p>
    pub fn ike_versions(
        &self,
    ) -> std::option::Option<&[crate::model::IkeVersionsRequestListValue]> {
        self.ike_versions.as_deref()
    }
    /// <p>The action to take when the establishing the tunnel for the VPN connection. By default, your customer gateway device must initiate the IKE negotiation and bring up the tunnel. Specify <code>start</code> for Amazon Web Services to initiate the IKE negotiation.</p>
    /// <p>Valid Values: <code>add</code> | <code>start</code> </p>
    /// <p>Default: <code>add</code> </p>
    pub fn startup_action(&self) -> std::option::Option<&str> {
        self.startup_action.as_deref()
    }
    /// <p>Options for logging VPN tunnel activity.</p>
    pub fn log_options(
        &self,
    ) -> std::option::Option<&crate::model::VpnTunnelLogOptionsSpecification> {
        self.log_options.as_ref()
    }
}
/// See [`VpnTunnelOptionsSpecification`](crate::model::VpnTunnelOptionsSpecification).
pub mod vpn_tunnel_options_specification {

    /// A builder for [`VpnTunnelOptionsSpecification`](crate::model::VpnTunnelOptionsSpecification).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) tunnel_inside_cidr: std::option::Option<std::string::String>,
        pub(crate) tunnel_inside_ipv6_cidr: std::option::Option<std::string::String>,
        pub(crate) pre_shared_key: std::option::Option<std::string::String>,
        pub(crate) phase1_lifetime_seconds: std::option::Option<i32>,
        pub(crate) phase2_lifetime_seconds: std::option::Option<i32>,
        pub(crate) rekey_margin_time_seconds: std::option::Option<i32>,
        pub(crate) rekey_fuzz_percentage: std::option::Option<i32>,
        pub(crate) replay_window_size: std::option::Option<i32>,
        pub(crate) dpd_timeout_seconds: std::option::Option<i32>,
        pub(crate) dpd_timeout_action: std::option::Option<std::string::String>,
        pub(crate) phase1_encryption_algorithms: std::option::Option<
            std::vec::Vec<crate::model::Phase1EncryptionAlgorithmsRequestListValue>,
        >,
        pub(crate) phase2_encryption_algorithms: std::option::Option<
            std::vec::Vec<crate::model::Phase2EncryptionAlgorithmsRequestListValue>,
        >,
        pub(crate) phase1_integrity_algorithms: std::option::Option<
            std::vec::Vec<crate::model::Phase1IntegrityAlgorithmsRequestListValue>,
        >,
        pub(crate) phase2_integrity_algorithms: std::option::Option<
            std::vec::Vec<crate::model::Phase2IntegrityAlgorithmsRequestListValue>,
        >,
        pub(crate) phase1_dh_group_numbers:
            std::option::Option<std::vec::Vec<crate::model::Phase1DhGroupNumbersRequestListValue>>,
        pub(crate) phase2_dh_group_numbers:
            std::option::Option<std::vec::Vec<crate::model::Phase2DhGroupNumbersRequestListValue>>,
        pub(crate) ike_versions:
            std::option::Option<std::vec::Vec<crate::model::IkeVersionsRequestListValue>>,
        pub(crate) startup_action: std::option::Option<std::string::String>,
        pub(crate) log_options: std::option::Option<crate::model::VpnTunnelLogOptionsSpecification>,
    }
    impl Builder {
        /// <p>The range of inside IPv4 addresses for the tunnel. Any specified CIDR blocks must be unique across all VPN connections that use the same virtual private gateway. </p>
        /// <p>Constraints: A size /30 CIDR block from the <code>169.254.0.0/16</code> range. The following CIDR blocks are reserved and cannot be used:</p>
        /// <ul>
        /// <li> <p> <code>169.254.0.0/30</code> </p> </li>
        /// <li> <p> <code>169.254.1.0/30</code> </p> </li>
        /// <li> <p> <code>169.254.2.0/30</code> </p> </li>
        /// <li> <p> <code>169.254.3.0/30</code> </p> </li>
        /// <li> <p> <code>169.254.4.0/30</code> </p> </li>
        /// <li> <p> <code>169.254.5.0/30</code> </p> </li>
        /// <li> <p> <code>169.254.169.252/30</code> </p> </li>
        /// </ul>
        pub fn tunnel_inside_cidr(mut self, input: impl Into<std::string::String>) -> Self {
            self.tunnel_inside_cidr = Some(input.into());
            self
        }
        /// <p>The range of inside IPv4 addresses for the tunnel. Any specified CIDR blocks must be unique across all VPN connections that use the same virtual private gateway. </p>
        /// <p>Constraints: A size /30 CIDR block from the <code>169.254.0.0/16</code> range. The following CIDR blocks are reserved and cannot be used:</p>
        /// <ul>
        /// <li> <p> <code>169.254.0.0/30</code> </p> </li>
        /// <li> <p> <code>169.254.1.0/30</code> </p> </li>
        /// <li> <p> <code>169.254.2.0/30</code> </p> </li>
        /// <li> <p> <code>169.254.3.0/30</code> </p> </li>
        /// <li> <p> <code>169.254.4.0/30</code> </p> </li>
        /// <li> <p> <code>169.254.5.0/30</code> </p> </li>
        /// <li> <p> <code>169.254.169.252/30</code> </p> </li>
        /// </ul>
        pub fn set_tunnel_inside_cidr(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.tunnel_inside_cidr = input;
            self
        }
        /// <p>The range of inside IPv6 addresses for the tunnel. Any specified CIDR blocks must be unique across all VPN connections that use the same transit gateway.</p>
        /// <p>Constraints: A size /126 CIDR block from the local <code>fd00::/8</code> range.</p>
        pub fn tunnel_inside_ipv6_cidr(mut self, input: impl Into<std::string::String>) -> Self {
            self.tunnel_inside_ipv6_cidr = Some(input.into());
            self
        }
        /// <p>The range of inside IPv6 addresses for the tunnel. Any specified CIDR blocks must be unique across all VPN connections that use the same transit gateway.</p>
        /// <p>Constraints: A size /126 CIDR block from the local <code>fd00::/8</code> range.</p>
        pub fn set_tunnel_inside_ipv6_cidr(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.tunnel_inside_ipv6_cidr = input;
            self
        }
        /// <p>The pre-shared key (PSK) to establish initial authentication between the virtual private gateway and customer gateway.</p>
        /// <p>Constraints: Allowed characters are alphanumeric characters, periods (.), and underscores (_). Must be between 8 and 64 characters in length and cannot start with zero (0).</p>
        pub fn pre_shared_key(mut self, input: impl Into<std::string::String>) -> Self {
            self.pre_shared_key = Some(input.into());
            self
        }
        /// <p>The pre-shared key (PSK) to establish initial authentication between the virtual private gateway and customer gateway.</p>
        /// <p>Constraints: Allowed characters are alphanumeric characters, periods (.), and underscores (_). Must be between 8 and 64 characters in length and cannot start with zero (0).</p>
        pub fn set_pre_shared_key(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.pre_shared_key = input;
            self
        }
        /// <p>The lifetime for phase 1 of the IKE negotiation, in seconds.</p>
        /// <p>Constraints: A value between 900 and 28,800.</p>
        /// <p>Default: <code>28800</code> </p>
        pub fn phase1_lifetime_seconds(mut self, input: i32) -> Self {
            self.phase1_lifetime_seconds = Some(input);
            self
        }
        /// <p>The lifetime for phase 1 of the IKE negotiation, in seconds.</p>
        /// <p>Constraints: A value between 900 and 28,800.</p>
        /// <p>Default: <code>28800</code> </p>
        pub fn set_phase1_lifetime_seconds(mut self, input: std::option::Option<i32>) -> Self {
            self.phase1_lifetime_seconds = input;
            self
        }
        /// <p>The lifetime for phase 2 of the IKE negotiation, in seconds.</p>
        /// <p>Constraints: A value between 900 and 3,600. The value must be less than the value for <code>Phase1LifetimeSeconds</code>.</p>
        /// <p>Default: <code>3600</code> </p>
        pub fn phase2_lifetime_seconds(mut self, input: i32) -> Self {
            self.phase2_lifetime_seconds = Some(input);
            self
        }
        /// <p>The lifetime for phase 2 of the IKE negotiation, in seconds.</p>
        /// <p>Constraints: A value between 900 and 3,600. The value must be less than the value for <code>Phase1LifetimeSeconds</code>.</p>
        /// <p>Default: <code>3600</code> </p>
        pub fn set_phase2_lifetime_seconds(mut self, input: std::option::Option<i32>) -> Self {
            self.phase2_lifetime_seconds = input;
            self
        }
        /// <p>The margin time, in seconds, before the phase 2 lifetime expires, during which the Amazon Web Services side of the VPN connection performs an IKE rekey. The exact time of the rekey is randomly selected based on the value for <code>RekeyFuzzPercentage</code>.</p>
        /// <p>Constraints: A value between 60 and half of <code>Phase2LifetimeSeconds</code>.</p>
        /// <p>Default: <code>540</code> </p>
        pub fn rekey_margin_time_seconds(mut self, input: i32) -> Self {
            self.rekey_margin_time_seconds = Some(input);
            self
        }
        /// <p>The margin time, in seconds, before the phase 2 lifetime expires, during which the Amazon Web Services side of the VPN connection performs an IKE rekey. The exact time of the rekey is randomly selected based on the value for <code>RekeyFuzzPercentage</code>.</p>
        /// <p>Constraints: A value between 60 and half of <code>Phase2LifetimeSeconds</code>.</p>
        /// <p>Default: <code>540</code> </p>
        pub fn set_rekey_margin_time_seconds(mut self, input: std::option::Option<i32>) -> Self {
            self.rekey_margin_time_seconds = input;
            self
        }
        /// <p>The percentage of the rekey window (determined by <code>RekeyMarginTimeSeconds</code>) during which the rekey time is randomly selected.</p>
        /// <p>Constraints: A value between 0 and 100.</p>
        /// <p>Default: <code>100</code> </p>
        pub fn rekey_fuzz_percentage(mut self, input: i32) -> Self {
            self.rekey_fuzz_percentage = Some(input);
            self
        }
        /// <p>The percentage of the rekey window (determined by <code>RekeyMarginTimeSeconds</code>) during which the rekey time is randomly selected.</p>
        /// <p>Constraints: A value between 0 and 100.</p>
        /// <p>Default: <code>100</code> </p>
        pub fn set_rekey_fuzz_percentage(mut self, input: std::option::Option<i32>) -> Self {
            self.rekey_fuzz_percentage = input;
            self
        }
        /// <p>The number of packets in an IKE replay window.</p>
        /// <p>Constraints: A value between 64 and 2048.</p>
        /// <p>Default: <code>1024</code> </p>
        pub fn replay_window_size(mut self, input: i32) -> Self {
            self.replay_window_size = Some(input);
            self
        }
        /// <p>The number of packets in an IKE replay window.</p>
        /// <p>Constraints: A value between 64 and 2048.</p>
        /// <p>Default: <code>1024</code> </p>
        pub fn set_replay_window_size(mut self, input: std::option::Option<i32>) -> Self {
            self.replay_window_size = input;
            self
        }
        /// <p>The number of seconds after which a DPD timeout occurs.</p>
        /// <p>Constraints: A value greater than or equal to 30.</p>
        /// <p>Default: <code>30</code> </p>
        pub fn dpd_timeout_seconds(mut self, input: i32) -> Self {
            self.dpd_timeout_seconds = Some(input);
            self
        }
        /// <p>The number of seconds after which a DPD timeout occurs.</p>
        /// <p>Constraints: A value greater than or equal to 30.</p>
        /// <p>Default: <code>30</code> </p>
        pub fn set_dpd_timeout_seconds(mut self, input: std::option::Option<i32>) -> Self {
            self.dpd_timeout_seconds = input;
            self
        }
        /// <p>The action to take after DPD timeout occurs. Specify <code>restart</code> to restart the IKE initiation. Specify <code>clear</code> to end the IKE session.</p>
        /// <p>Valid Values: <code>clear</code> | <code>none</code> | <code>restart</code> </p>
        /// <p>Default: <code>clear</code> </p>
        pub fn dpd_timeout_action(mut self, input: impl Into<std::string::String>) -> Self {
            self.dpd_timeout_action = Some(input.into());
            self
        }
        /// <p>The action to take after DPD timeout occurs. Specify <code>restart</code> to restart the IKE initiation. Specify <code>clear</code> to end the IKE session.</p>
        /// <p>Valid Values: <code>clear</code> | <code>none</code> | <code>restart</code> </p>
        /// <p>Default: <code>clear</code> </p>
        pub fn set_dpd_timeout_action(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.dpd_timeout_action = input;
            self
        }
        /// Appends an item to `phase1_encryption_algorithms`.
        ///
        /// To override the contents of this collection use [`set_phase1_encryption_algorithms`](Self::set_phase1_encryption_algorithms).
        ///
        /// <p>One or more encryption algorithms that are permitted for the VPN tunnel for phase 1 IKE negotiations.</p>
        /// <p>Valid values: <code>AES128</code> | <code>AES256</code> | <code>AES128-GCM-16</code> | <code>AES256-GCM-16</code> </p>
        pub fn phase1_encryption_algorithms(
            mut self,
            input: crate::model::Phase1EncryptionAlgorithmsRequestListValue,
        ) -> Self {
            let mut v = self.phase1_encryption_algorithms.unwrap_or_default();
            v.push(input);
            self.phase1_encryption_algorithms = Some(v);
            self
        }
        /// <p>One or more encryption algorithms that are permitted for the VPN tunnel for phase 1 IKE negotiations.</p>
        /// <p>Valid values: <code>AES128</code> | <code>AES256</code> | <code>AES128-GCM-16</code> | <code>AES256-GCM-16</code> </p>
        pub fn set_phase1_encryption_algorithms(
            mut self,
            input: std::option::Option<
                std::vec::Vec<crate::model::Phase1EncryptionAlgorithmsRequestListValue>,
            >,
        ) -> Self {
            self.phase1_encryption_algorithms = input;
            self
        }
        /// Appends an item to `phase2_encryption_algorithms`.
        ///
        /// To override the contents of this collection use [`set_phase2_encryption_algorithms`](Self::set_phase2_encryption_algorithms).
        ///
        /// <p>One or more encryption algorithms that are permitted for the VPN tunnel for phase 2 IKE negotiations.</p>
        /// <p>Valid values: <code>AES128</code> | <code>AES256</code> | <code>AES128-GCM-16</code> | <code>AES256-GCM-16</code> </p>
        pub fn phase2_encryption_algorithms(
            mut self,
            input: crate::model::Phase2EncryptionAlgorithmsRequestListValue,
        ) -> Self {
            let mut v = self.phase2_encryption_algorithms.unwrap_or_default();
            v.push(input);
            self.phase2_encryption_algorithms = Some(v);
            self
        }
        /// <p>One or more encryption algorithms that are permitted for the VPN tunnel for phase 2 IKE negotiations.</p>
        /// <p>Valid values: <code>AES128</code> | <code>AES256</code> | <code>AES128-GCM-16</code> | <code>AES256-GCM-16</code> </p>
        pub fn set_phase2_encryption_algorithms(
            mut self,
            input: std::option::Option<
                std::vec::Vec<crate::model::Phase2EncryptionAlgorithmsRequestListValue>,
            >,
        ) -> Self {
            self.phase2_encryption_algorithms = input;
            self
        }
        /// Appends an item to `phase1_integrity_algorithms`.
        ///
        /// To override the contents of this collection use [`set_phase1_integrity_algorithms`](Self::set_phase1_integrity_algorithms).
        ///
        /// <p>One or more integrity algorithms that are permitted for the VPN tunnel for phase 1 IKE negotiations.</p>
        /// <p>Valid values: <code>SHA1</code> | <code>SHA2-256</code> | <code>SHA2-384</code> | <code>SHA2-512</code> </p>
        pub fn phase1_integrity_algorithms(
            mut self,
            input: crate::model::Phase1IntegrityAlgorithmsRequestListValue,
        ) -> Self {
            let mut v = self.phase1_integrity_algorithms.unwrap_or_default();
            v.push(input);
            self.phase1_integrity_algorithms = Some(v);
            self
        }
        /// <p>One or more integrity algorithms that are permitted for the VPN tunnel for phase 1 IKE negotiations.</p>
        /// <p>Valid values: <code>SHA1</code> | <code>SHA2-256</code> | <code>SHA2-384</code> | <code>SHA2-512</code> </p>
        pub fn set_phase1_integrity_algorithms(
            mut self,
            input: std::option::Option<
                std::vec::Vec<crate::model::Phase1IntegrityAlgorithmsRequestListValue>,
            >,
        ) -> Self {
            self.phase1_integrity_algorithms = input;
            self
        }
        /// Appends an item to `phase2_integrity_algorithms`.
        ///
        /// To override the contents of this collection use [`set_phase2_integrity_algorithms`](Self::set_phase2_integrity_algorithms).
        ///
        /// <p>One or more integrity algorithms that are permitted for the VPN tunnel for phase 2 IKE negotiations.</p>
        /// <p>Valid values: <code>SHA1</code> | <code>SHA2-256</code> | <code>SHA2-384</code> | <code>SHA2-512</code> </p>
        pub fn phase2_integrity_algorithms(
            mut self,
            input: crate::model::Phase2IntegrityAlgorithmsRequestListValue,
        ) -> Self {
            let mut v = self.phase2_integrity_algorithms.unwrap_or_default();
            v.push(input);
            self.phase2_integrity_algorithms = Some(v);
            self
        }
        /// <p>One or more integrity algorithms that are permitted for the VPN tunnel for phase 2 IKE negotiations.</p>
        /// <p>Valid values: <code>SHA1</code> | <code>SHA2-256</code> | <code>SHA2-384</code> | <code>SHA2-512</code> </p>
        pub fn set_phase2_integrity_algorithms(
            mut self,
            input: std::option::Option<
                std::vec::Vec<crate::model::Phase2IntegrityAlgorithmsRequestListValue>,
            >,
        ) -> Self {
            self.phase2_integrity_algorithms = input;
            self
        }
        /// Appends an item to `phase1_dh_group_numbers`.
        ///
        /// To override the contents of this collection use [`set_phase1_dh_group_numbers`](Self::set_phase1_dh_group_numbers).
        ///
        /// <p>One or more Diffie-Hellman group numbers that are permitted for the VPN tunnel for phase 1 IKE negotiations.</p>
        /// <p>Valid values: <code>2</code> | <code>14</code> | <code>15</code> | <code>16</code> | <code>17</code> | <code>18</code> | <code>19</code> | <code>20</code> | <code>21</code> | <code>22</code> | <code>23</code> | <code>24</code> </p>
        pub fn phase1_dh_group_numbers(
            mut self,
            input: crate::model::Phase1DhGroupNumbersRequestListValue,
        ) -> Self {
            let mut v = self.phase1_dh_group_numbers.unwrap_or_default();
            v.push(input);
            self.phase1_dh_group_numbers = Some(v);
            self
        }
        /// <p>One or more Diffie-Hellman group numbers that are permitted for the VPN tunnel for phase 1 IKE negotiations.</p>
        /// <p>Valid values: <code>2</code> | <code>14</code> | <code>15</code> | <code>16</code> | <code>17</code> | <code>18</code> | <code>19</code> | <code>20</code> | <code>21</code> | <code>22</code> | <code>23</code> | <code>24</code> </p>
        pub fn set_phase1_dh_group_numbers(
            mut self,
            input: std::option::Option<
                std::vec::Vec<crate::model::Phase1DhGroupNumbersRequestListValue>,
            >,
        ) -> Self {
            self.phase1_dh_group_numbers = input;
            self
        }
        /// Appends an item to `phase2_dh_group_numbers`.
        ///
        /// To override the contents of this collection use [`set_phase2_dh_group_numbers`](Self::set_phase2_dh_group_numbers).
        ///
        /// <p>One or more Diffie-Hellman group numbers that are permitted for the VPN tunnel for phase 2 IKE negotiations.</p>
        /// <p>Valid values: <code>2</code> | <code>5</code> | <code>14</code> | <code>15</code> | <code>16</code> | <code>17</code> | <code>18</code> | <code>19</code> | <code>20</code> | <code>21</code> | <code>22</code> | <code>23</code> | <code>24</code> </p>
        pub fn phase2_dh_group_numbers(
            mut self,
            input: crate::model::Phase2DhGroupNumbersRequestListValue,
        ) -> Self {
            let mut v = self.phase2_dh_group_numbers.unwrap_or_default();
            v.push(input);
            self.phase2_dh_group_numbers = Some(v);
            self
        }
        /// <p>One or more Diffie-Hellman group numbers that are permitted for the VPN tunnel for phase 2 IKE negotiations.</p>
        /// <p>Valid values: <code>2</code> | <code>5</code> | <code>14</code> | <code>15</code> | <code>16</code> | <code>17</code> | <code>18</code> | <code>19</code> | <code>20</code> | <code>21</code> | <code>22</code> | <code>23</code> | <code>24</code> </p>
        pub fn set_phase2_dh_group_numbers(
            mut self,
            input: std::option::Option<
                std::vec::Vec<crate::model::Phase2DhGroupNumbersRequestListValue>,
            >,
        ) -> Self {
            self.phase2_dh_group_numbers = input;
            self
        }
        /// Appends an item to `ike_versions`.
        ///
        /// To override the contents of this collection use [`set_ike_versions`](Self::set_ike_versions).
        ///
        /// <p>The IKE versions that are permitted for the VPN tunnel.</p>
        /// <p>Valid values: <code>ikev1</code> | <code>ikev2</code> </p>
        pub fn ike_versions(mut self, input: crate::model::IkeVersionsRequestListValue) -> Self {
            let mut v = self.ike_versions.unwrap_or_default();
            v.push(input);
            self.ike_versions = Some(v);
            self
        }
        /// <p>The IKE versions that are permitted for the VPN tunnel.</p>
        /// <p>Valid values: <code>ikev1</code> | <code>ikev2</code> </p>
        pub fn set_ike_versions(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::IkeVersionsRequestListValue>>,
        ) -> Self {
            self.ike_versions = input;
            self
        }
        /// <p>The action to take when the establishing the tunnel for the VPN connection. By default, your customer gateway device must initiate the IKE negotiation and bring up the tunnel. Specify <code>start</code> for Amazon Web Services to initiate the IKE negotiation.</p>
        /// <p>Valid Values: <code>add</code> | <code>start</code> </p>
        /// <p>Default: <code>add</code> </p>
        pub fn startup_action(mut self, input: impl Into<std::string::String>) -> Self {
            self.startup_action = Some(input.into());
            self
        }
        /// <p>The action to take when the establishing the tunnel for the VPN connection. By default, your customer gateway device must initiate the IKE negotiation and bring up the tunnel. Specify <code>start</code> for Amazon Web Services to initiate the IKE negotiation.</p>
        /// <p>Valid Values: <code>add</code> | <code>start</code> </p>
        /// <p>Default: <code>add</code> </p>
        pub fn set_startup_action(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.startup_action = input;
            self
        }
        /// <p>Options for logging VPN tunnel activity.</p>
        pub fn log_options(
            mut self,
            input: crate::model::VpnTunnelLogOptionsSpecification,
        ) -> Self {
            self.log_options = Some(input);
            self
        }
        /// <p>Options for logging VPN tunnel activity.</p>
        pub fn set_log_options(
            mut self,
            input: std::option::Option<crate::model::VpnTunnelLogOptionsSpecification>,
        ) -> Self {
            self.log_options = input;
            self
        }
        /// Consumes the builder and constructs a [`VpnTunnelOptionsSpecification`](crate::model::VpnTunnelOptionsSpecification).
        pub fn build(self) -> crate::model::VpnTunnelOptionsSpecification {
            crate::model::VpnTunnelOptionsSpecification {
                tunnel_inside_cidr: self.tunnel_inside_cidr,
                tunnel_inside_ipv6_cidr: self.tunnel_inside_ipv6_cidr,
                pre_shared_key: self.pre_shared_key,
                phase1_lifetime_seconds: self.phase1_lifetime_seconds,
                phase2_lifetime_seconds: self.phase2_lifetime_seconds,
                rekey_margin_time_seconds: self.rekey_margin_time_seconds,
                rekey_fuzz_percentage: self.rekey_fuzz_percentage,
                replay_window_size: self.replay_window_size,
                dpd_timeout_seconds: self.dpd_timeout_seconds,
                dpd_timeout_action: self.dpd_timeout_action,
                phase1_encryption_algorithms: self.phase1_encryption_algorithms,
                phase2_encryption_algorithms: self.phase2_encryption_algorithms,
                phase1_integrity_algorithms: self.phase1_integrity_algorithms,
                phase2_integrity_algorithms: self.phase2_integrity_algorithms,
                phase1_dh_group_numbers: self.phase1_dh_group_numbers,
                phase2_dh_group_numbers: self.phase2_dh_group_numbers,
                ike_versions: self.ike_versions,
                startup_action: self.startup_action,
                log_options: self.log_options,
            }
        }
    }
}
impl VpnTunnelOptionsSpecification {
    /// Creates a new builder-style object to manufacture [`VpnTunnelOptionsSpecification`](crate::model::VpnTunnelOptionsSpecification).
    pub fn builder() -> crate::model::vpn_tunnel_options_specification::Builder {
        crate::model::vpn_tunnel_options_specification::Builder::default()
    }
}

/// <p>Options for a device-identity type trust provider.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CreateVerifiedAccessTrustProviderDeviceOptions {
    /// <p>The ID of the tenant application with the device-identity provider.</p>
    #[doc(hidden)]
    pub tenant_id: std::option::Option<std::string::String>,
}
impl CreateVerifiedAccessTrustProviderDeviceOptions {
    /// <p>The ID of the tenant application with the device-identity provider.</p>
    pub fn tenant_id(&self) -> std::option::Option<&str> {
        self.tenant_id.as_deref()
    }
}
/// See [`CreateVerifiedAccessTrustProviderDeviceOptions`](crate::model::CreateVerifiedAccessTrustProviderDeviceOptions).
pub mod create_verified_access_trust_provider_device_options {

    /// A builder for [`CreateVerifiedAccessTrustProviderDeviceOptions`](crate::model::CreateVerifiedAccessTrustProviderDeviceOptions).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) tenant_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The ID of the tenant application with the device-identity provider.</p>
        pub fn tenant_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.tenant_id = Some(input.into());
            self
        }
        /// <p>The ID of the tenant application with the device-identity provider.</p>
        pub fn set_tenant_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.tenant_id = input;
            self
        }
        /// Consumes the builder and constructs a [`CreateVerifiedAccessTrustProviderDeviceOptions`](crate::model::CreateVerifiedAccessTrustProviderDeviceOptions).
        pub fn build(self) -> crate::model::CreateVerifiedAccessTrustProviderDeviceOptions {
            crate::model::CreateVerifiedAccessTrustProviderDeviceOptions {
                tenant_id: self.tenant_id,
            }
        }
    }
}
impl CreateVerifiedAccessTrustProviderDeviceOptions {
    /// Creates a new builder-style object to manufacture [`CreateVerifiedAccessTrustProviderDeviceOptions`](crate::model::CreateVerifiedAccessTrustProviderDeviceOptions).
    pub fn builder() -> crate::model::create_verified_access_trust_provider_device_options::Builder
    {
        crate::model::create_verified_access_trust_provider_device_options::Builder::default()
    }
}

/// <p>Options for an OIDC-based, user-identity type trust provider.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CreateVerifiedAccessTrustProviderOidcOptions {
    /// <p>The OIDC issuer.</p>
    #[doc(hidden)]
    pub issuer: std::option::Option<std::string::String>,
    /// <p>The OIDC authorization endpoint.</p>
    #[doc(hidden)]
    pub authorization_endpoint: std::option::Option<std::string::String>,
    /// <p>The OIDC token endpoint.</p>
    #[doc(hidden)]
    pub token_endpoint: std::option::Option<std::string::String>,
    /// <p>The OIDC user info endpoint.</p>
    #[doc(hidden)]
    pub user_info_endpoint: std::option::Option<std::string::String>,
    /// <p>The client identifier.</p>
    #[doc(hidden)]
    pub client_id: std::option::Option<std::string::String>,
    /// <p>The client secret.</p>
    #[doc(hidden)]
    pub client_secret: std::option::Option<std::string::String>,
    /// <p>OpenID Connect (OIDC) scopes are used by an application during authentication to authorize access to a user's details. Each scope returns a specific set of user attributes.</p>
    #[doc(hidden)]
    pub scope: std::option::Option<std::string::String>,
}
impl CreateVerifiedAccessTrustProviderOidcOptions {
    /// <p>The OIDC issuer.</p>
    pub fn issuer(&self) -> std::option::Option<&str> {
        self.issuer.as_deref()
    }
    /// <p>The OIDC authorization endpoint.</p>
    pub fn authorization_endpoint(&self) -> std::option::Option<&str> {
        self.authorization_endpoint.as_deref()
    }
    /// <p>The OIDC token endpoint.</p>
    pub fn token_endpoint(&self) -> std::option::Option<&str> {
        self.token_endpoint.as_deref()
    }
    /// <p>The OIDC user info endpoint.</p>
    pub fn user_info_endpoint(&self) -> std::option::Option<&str> {
        self.user_info_endpoint.as_deref()
    }
    /// <p>The client identifier.</p>
    pub fn client_id(&self) -> std::option::Option<&str> {
        self.client_id.as_deref()
    }
    /// <p>The client secret.</p>
    pub fn client_secret(&self) -> std::option::Option<&str> {
        self.client_secret.as_deref()
    }
    /// <p>OpenID Connect (OIDC) scopes are used by an application during authentication to authorize access to a user's details. Each scope returns a specific set of user attributes.</p>
    pub fn scope(&self) -> std::option::Option<&str> {
        self.scope.as_deref()
    }
}
/// See [`CreateVerifiedAccessTrustProviderOidcOptions`](crate::model::CreateVerifiedAccessTrustProviderOidcOptions).
pub mod create_verified_access_trust_provider_oidc_options {

    /// A builder for [`CreateVerifiedAccessTrustProviderOidcOptions`](crate::model::CreateVerifiedAccessTrustProviderOidcOptions).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) issuer: std::option::Option<std::string::String>,
        pub(crate) authorization_endpoint: std::option::Option<std::string::String>,
        pub(crate) token_endpoint: std::option::Option<std::string::String>,
        pub(crate) user_info_endpoint: std::option::Option<std::string::String>,
        pub(crate) client_id: std::option::Option<std::string::String>,
        pub(crate) client_secret: std::option::Option<std::string::String>,
        pub(crate) scope: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The OIDC issuer.</p>
        pub fn issuer(mut self, input: impl Into<std::string::String>) -> Self {
            self.issuer = Some(input.into());
            self
        }
        /// <p>The OIDC issuer.</p>
        pub fn set_issuer(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.issuer = input;
            self
        }
        /// <p>The OIDC authorization endpoint.</p>
        pub fn authorization_endpoint(mut self, input: impl Into<std::string::String>) -> Self {
            self.authorization_endpoint = Some(input.into());
            self
        }
        /// <p>The OIDC authorization endpoint.</p>
        pub fn set_authorization_endpoint(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.authorization_endpoint = input;
            self
        }
        /// <p>The OIDC token endpoint.</p>
        pub fn token_endpoint(mut self, input: impl Into<std::string::String>) -> Self {
            self.token_endpoint = Some(input.into());
            self
        }
        /// <p>The OIDC token endpoint.</p>
        pub fn set_token_endpoint(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.token_endpoint = input;
            self
        }
        /// <p>The OIDC user info endpoint.</p>
        pub fn user_info_endpoint(mut self, input: impl Into<std::string::String>) -> Self {
            self.user_info_endpoint = Some(input.into());
            self
        }
        /// <p>The OIDC user info endpoint.</p>
        pub fn set_user_info_endpoint(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.user_info_endpoint = input;
            self
        }
        /// <p>The client identifier.</p>
        pub fn client_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.client_id = Some(input.into());
            self
        }
        /// <p>The client identifier.</p>
        pub fn set_client_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.client_id = input;
            self
        }
        /// <p>The client secret.</p>
        pub fn client_secret(mut self, input: impl Into<std::string::String>) -> Self {
            self.client_secret = Some(input.into());
            self
        }
        /// <p>The client secret.</p>
        pub fn set_client_secret(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.client_secret = input;
            self
        }
        /// <p>OpenID Connect (OIDC) scopes are used by an application during authentication to authorize access to a user's details. Each scope returns a specific set of user attributes.</p>
        pub fn scope(mut self, input: impl Into<std::string::String>) -> Self {
            self.scope = Some(input.into());
            self
        }
        /// <p>OpenID Connect (OIDC) scopes are used by an application during authentication to authorize access to a user's details. Each scope returns a specific set of user attributes.</p>
        pub fn set_scope(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.scope = input;
            self
        }
        /// Consumes the builder and constructs a [`CreateVerifiedAccessTrustProviderOidcOptions`](crate::model::CreateVerifiedAccessTrustProviderOidcOptions).
        pub fn build(self) -> crate::model::CreateVerifiedAccessTrustProviderOidcOptions {
            crate::model::CreateVerifiedAccessTrustProviderOidcOptions {
                issuer: self.issuer,
                authorization_endpoint: self.authorization_endpoint,
                token_endpoint: self.token_endpoint,
                user_info_endpoint: self.user_info_endpoint,
                client_id: self.client_id,
                client_secret: self.client_secret,
                scope: self.scope,
            }
        }
    }
}
impl CreateVerifiedAccessTrustProviderOidcOptions {
    /// Creates a new builder-style object to manufacture [`CreateVerifiedAccessTrustProviderOidcOptions`](crate::model::CreateVerifiedAccessTrustProviderOidcOptions).
    pub fn builder() -> crate::model::create_verified_access_trust_provider_oidc_options::Builder {
        crate::model::create_verified_access_trust_provider_oidc_options::Builder::default()
    }
}

/// <p>Options for a network interface-type endpoint.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CreateVerifiedAccessEndpointEniOptions {
    /// <p>The ID of the network interface.</p>
    #[doc(hidden)]
    pub network_interface_id: std::option::Option<std::string::String>,
    /// <p>The IP protocol.</p>
    #[doc(hidden)]
    pub protocol: std::option::Option<crate::model::VerifiedAccessEndpointProtocol>,
    /// <p>The IP port number.</p>
    #[doc(hidden)]
    pub port: std::option::Option<i32>,
}
impl CreateVerifiedAccessEndpointEniOptions {
    /// <p>The ID of the network interface.</p>
    pub fn network_interface_id(&self) -> std::option::Option<&str> {
        self.network_interface_id.as_deref()
    }
    /// <p>The IP protocol.</p>
    pub fn protocol(&self) -> std::option::Option<&crate::model::VerifiedAccessEndpointProtocol> {
        self.protocol.as_ref()
    }
    /// <p>The IP port number.</p>
    pub fn port(&self) -> std::option::Option<i32> {
        self.port
    }
}
/// See [`CreateVerifiedAccessEndpointEniOptions`](crate::model::CreateVerifiedAccessEndpointEniOptions).
pub mod create_verified_access_endpoint_eni_options {

    /// A builder for [`CreateVerifiedAccessEndpointEniOptions`](crate::model::CreateVerifiedAccessEndpointEniOptions).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) network_interface_id: std::option::Option<std::string::String>,
        pub(crate) protocol: std::option::Option<crate::model::VerifiedAccessEndpointProtocol>,
        pub(crate) port: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>The ID of the network interface.</p>
        pub fn network_interface_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.network_interface_id = Some(input.into());
            self
        }
        /// <p>The ID of the network interface.</p>
        pub fn set_network_interface_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.network_interface_id = input;
            self
        }
        /// <p>The IP protocol.</p>
        pub fn protocol(mut self, input: crate::model::VerifiedAccessEndpointProtocol) -> Self {
            self.protocol = Some(input);
            self
        }
        /// <p>The IP protocol.</p>
        pub fn set_protocol(
            mut self,
            input: std::option::Option<crate::model::VerifiedAccessEndpointProtocol>,
        ) -> Self {
            self.protocol = input;
            self
        }
        /// <p>The IP port number.</p>
        pub fn port(mut self, input: i32) -> Self {
            self.port = Some(input);
            self
        }
        /// <p>The IP port number.</p>
        pub fn set_port(mut self, input: std::option::Option<i32>) -> Self {
            self.port = input;
            self
        }
        /// Consumes the builder and constructs a [`CreateVerifiedAccessEndpointEniOptions`](crate::model::CreateVerifiedAccessEndpointEniOptions).
        pub fn build(self) -> crate::model::CreateVerifiedAccessEndpointEniOptions {
            crate::model::CreateVerifiedAccessEndpointEniOptions {
                network_interface_id: self.network_interface_id,
                protocol: self.protocol,
                port: self.port,
            }
        }
    }
}
impl CreateVerifiedAccessEndpointEniOptions {
    /// Creates a new builder-style object to manufacture [`CreateVerifiedAccessEndpointEniOptions`](crate::model::CreateVerifiedAccessEndpointEniOptions).
    pub fn builder() -> crate::model::create_verified_access_endpoint_eni_options::Builder {
        crate::model::create_verified_access_endpoint_eni_options::Builder::default()
    }
}

/// <p>Describes a load balancer when creating an Amazon Web Services Verified Access endpoint using the <code>load-balancer</code> type.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CreateVerifiedAccessEndpointLoadBalancerOptions {
    /// <p>The IP protocol.</p>
    #[doc(hidden)]
    pub protocol: std::option::Option<crate::model::VerifiedAccessEndpointProtocol>,
    /// <p>The IP port number.</p>
    #[doc(hidden)]
    pub port: std::option::Option<i32>,
    /// <p>The ARN of the load balancer.</p>
    #[doc(hidden)]
    pub load_balancer_arn: std::option::Option<std::string::String>,
    /// <p>The IDs of the subnets.</p>
    #[doc(hidden)]
    pub subnet_ids: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl CreateVerifiedAccessEndpointLoadBalancerOptions {
    /// <p>The IP protocol.</p>
    pub fn protocol(&self) -> std::option::Option<&crate::model::VerifiedAccessEndpointProtocol> {
        self.protocol.as_ref()
    }
    /// <p>The IP port number.</p>
    pub fn port(&self) -> std::option::Option<i32> {
        self.port
    }
    /// <p>The ARN of the load balancer.</p>
    pub fn load_balancer_arn(&self) -> std::option::Option<&str> {
        self.load_balancer_arn.as_deref()
    }
    /// <p>The IDs of the subnets.</p>
    pub fn subnet_ids(&self) -> std::option::Option<&[std::string::String]> {
        self.subnet_ids.as_deref()
    }
}
/// See [`CreateVerifiedAccessEndpointLoadBalancerOptions`](crate::model::CreateVerifiedAccessEndpointLoadBalancerOptions).
pub mod create_verified_access_endpoint_load_balancer_options {

    /// A builder for [`CreateVerifiedAccessEndpointLoadBalancerOptions`](crate::model::CreateVerifiedAccessEndpointLoadBalancerOptions).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) protocol: std::option::Option<crate::model::VerifiedAccessEndpointProtocol>,
        pub(crate) port: std::option::Option<i32>,
        pub(crate) load_balancer_arn: std::option::Option<std::string::String>,
        pub(crate) subnet_ids: std::option::Option<std::vec::Vec<std::string::String>>,
    }
    impl Builder {
        /// <p>The IP protocol.</p>
        pub fn protocol(mut self, input: crate::model::VerifiedAccessEndpointProtocol) -> Self {
            self.protocol = Some(input);
            self
        }
        /// <p>The IP protocol.</p>
        pub fn set_protocol(
            mut self,
            input: std::option::Option<crate::model::VerifiedAccessEndpointProtocol>,
        ) -> Self {
            self.protocol = input;
            self
        }
        /// <p>The IP port number.</p>
        pub fn port(mut self, input: i32) -> Self {
            self.port = Some(input);
            self
        }
        /// <p>The IP port number.</p>
        pub fn set_port(mut self, input: std::option::Option<i32>) -> Self {
            self.port = input;
            self
        }
        /// <p>The ARN of the load balancer.</p>
        pub fn load_balancer_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.load_balancer_arn = Some(input.into());
            self
        }
        /// <p>The ARN of the load balancer.</p>
        pub fn set_load_balancer_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.load_balancer_arn = input;
            self
        }
        /// Appends an item to `subnet_ids`.
        ///
        /// To override the contents of this collection use [`set_subnet_ids`](Self::set_subnet_ids).
        ///
        /// <p>The IDs of the subnets.</p>
        pub fn subnet_ids(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.subnet_ids.unwrap_or_default();
            v.push(input.into());
            self.subnet_ids = Some(v);
            self
        }
        /// <p>The IDs of the subnets.</p>
        pub fn set_subnet_ids(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.subnet_ids = input;
            self
        }
        /// Consumes the builder and constructs a [`CreateVerifiedAccessEndpointLoadBalancerOptions`](crate::model::CreateVerifiedAccessEndpointLoadBalancerOptions).
        pub fn build(self) -> crate::model::CreateVerifiedAccessEndpointLoadBalancerOptions {
            crate::model::CreateVerifiedAccessEndpointLoadBalancerOptions {
                protocol: self.protocol,
                port: self.port,
                load_balancer_arn: self.load_balancer_arn,
                subnet_ids: self.subnet_ids,
            }
        }
    }
}
impl CreateVerifiedAccessEndpointLoadBalancerOptions {
    /// Creates a new builder-style object to manufacture [`CreateVerifiedAccessEndpointLoadBalancerOptions`](crate::model::CreateVerifiedAccessEndpointLoadBalancerOptions).
    pub fn builder() -> crate::model::create_verified_access_endpoint_load_balancer_options::Builder
    {
        crate::model::create_verified_access_endpoint_load_balancer_options::Builder::default()
    }
}

/// <p>Describes the options for a VPC attachment.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CreateTransitGatewayVpcAttachmentRequestOptions {
    /// <p>Enable or disable DNS support. The default is <code>enable</code>.</p>
    #[doc(hidden)]
    pub dns_support: std::option::Option<crate::model::DnsSupportValue>,
    /// <p>Enable or disable IPv6 support. The default is <code>disable</code>.</p>
    #[doc(hidden)]
    pub ipv6_support: std::option::Option<crate::model::Ipv6SupportValue>,
    /// <p>Enable or disable support for appliance mode. If enabled, a traffic flow between a source and destination uses the same Availability Zone for the VPC attachment for the lifetime of that flow. The default is <code>disable</code>.</p>
    #[doc(hidden)]
    pub appliance_mode_support: std::option::Option<crate::model::ApplianceModeSupportValue>,
}
impl CreateTransitGatewayVpcAttachmentRequestOptions {
    /// <p>Enable or disable DNS support. The default is <code>enable</code>.</p>
    pub fn dns_support(&self) -> std::option::Option<&crate::model::DnsSupportValue> {
        self.dns_support.as_ref()
    }
    /// <p>Enable or disable IPv6 support. The default is <code>disable</code>.</p>
    pub fn ipv6_support(&self) -> std::option::Option<&crate::model::Ipv6SupportValue> {
        self.ipv6_support.as_ref()
    }
    /// <p>Enable or disable support for appliance mode. If enabled, a traffic flow between a source and destination uses the same Availability Zone for the VPC attachment for the lifetime of that flow. The default is <code>disable</code>.</p>
    pub fn appliance_mode_support(
        &self,
    ) -> std::option::Option<&crate::model::ApplianceModeSupportValue> {
        self.appliance_mode_support.as_ref()
    }
}
/// See [`CreateTransitGatewayVpcAttachmentRequestOptions`](crate::model::CreateTransitGatewayVpcAttachmentRequestOptions).
pub mod create_transit_gateway_vpc_attachment_request_options {

    /// A builder for [`CreateTransitGatewayVpcAttachmentRequestOptions`](crate::model::CreateTransitGatewayVpcAttachmentRequestOptions).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) dns_support: std::option::Option<crate::model::DnsSupportValue>,
        pub(crate) ipv6_support: std::option::Option<crate::model::Ipv6SupportValue>,
        pub(crate) appliance_mode_support:
            std::option::Option<crate::model::ApplianceModeSupportValue>,
    }
    impl Builder {
        /// <p>Enable or disable DNS support. The default is <code>enable</code>.</p>
        pub fn dns_support(mut self, input: crate::model::DnsSupportValue) -> Self {
            self.dns_support = Some(input);
            self
        }
        /// <p>Enable or disable DNS support. The default is <code>enable</code>.</p>
        pub fn set_dns_support(
            mut self,
            input: std::option::Option<crate::model::DnsSupportValue>,
        ) -> Self {
            self.dns_support = input;
            self
        }
        /// <p>Enable or disable IPv6 support. The default is <code>disable</code>.</p>
        pub fn ipv6_support(mut self, input: crate::model::Ipv6SupportValue) -> Self {
            self.ipv6_support = Some(input);
            self
        }
        /// <p>Enable or disable IPv6 support. The default is <code>disable</code>.</p>
        pub fn set_ipv6_support(
            mut self,
            input: std::option::Option<crate::model::Ipv6SupportValue>,
        ) -> Self {
            self.ipv6_support = input;
            self
        }
        /// <p>Enable or disable support for appliance mode. If enabled, a traffic flow between a source and destination uses the same Availability Zone for the VPC attachment for the lifetime of that flow. The default is <code>disable</code>.</p>
        pub fn appliance_mode_support(
            mut self,
            input: crate::model::ApplianceModeSupportValue,
        ) -> Self {
            self.appliance_mode_support = Some(input);
            self
        }
        /// <p>Enable or disable support for appliance mode. If enabled, a traffic flow between a source and destination uses the same Availability Zone for the VPC attachment for the lifetime of that flow. The default is <code>disable</code>.</p>
        pub fn set_appliance_mode_support(
            mut self,
            input: std::option::Option<crate::model::ApplianceModeSupportValue>,
        ) -> Self {
            self.appliance_mode_support = input;
            self
        }
        /// Consumes the builder and constructs a [`CreateTransitGatewayVpcAttachmentRequestOptions`](crate::model::CreateTransitGatewayVpcAttachmentRequestOptions).
        pub fn build(self) -> crate::model::CreateTransitGatewayVpcAttachmentRequestOptions {
            crate::model::CreateTransitGatewayVpcAttachmentRequestOptions {
                dns_support: self.dns_support,
                ipv6_support: self.ipv6_support,
                appliance_mode_support: self.appliance_mode_support,
            }
        }
    }
}
impl CreateTransitGatewayVpcAttachmentRequestOptions {
    /// Creates a new builder-style object to manufacture [`CreateTransitGatewayVpcAttachmentRequestOptions`](crate::model::CreateTransitGatewayVpcAttachmentRequestOptions).
    pub fn builder() -> crate::model::create_transit_gateway_vpc_attachment_request_options::Builder
    {
        crate::model::create_transit_gateway_vpc_attachment_request_options::Builder::default()
    }
}

/// <p>Describes whether dynamic routing is enabled or disabled for the transit gateway peering request.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CreateTransitGatewayPeeringAttachmentRequestOptions {
    /// <p>Indicates whether dynamic routing is enabled or disabled.</p>
    #[doc(hidden)]
    pub dynamic_routing: std::option::Option<crate::model::DynamicRoutingValue>,
}
impl CreateTransitGatewayPeeringAttachmentRequestOptions {
    /// <p>Indicates whether dynamic routing is enabled or disabled.</p>
    pub fn dynamic_routing(&self) -> std::option::Option<&crate::model::DynamicRoutingValue> {
        self.dynamic_routing.as_ref()
    }
}
/// See [`CreateTransitGatewayPeeringAttachmentRequestOptions`](crate::model::CreateTransitGatewayPeeringAttachmentRequestOptions).
pub mod create_transit_gateway_peering_attachment_request_options {

    /// A builder for [`CreateTransitGatewayPeeringAttachmentRequestOptions`](crate::model::CreateTransitGatewayPeeringAttachmentRequestOptions).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) dynamic_routing: std::option::Option<crate::model::DynamicRoutingValue>,
    }
    impl Builder {
        /// <p>Indicates whether dynamic routing is enabled or disabled.</p>
        pub fn dynamic_routing(mut self, input: crate::model::DynamicRoutingValue) -> Self {
            self.dynamic_routing = Some(input);
            self
        }
        /// <p>Indicates whether dynamic routing is enabled or disabled.</p>
        pub fn set_dynamic_routing(
            mut self,
            input: std::option::Option<crate::model::DynamicRoutingValue>,
        ) -> Self {
            self.dynamic_routing = input;
            self
        }
        /// Consumes the builder and constructs a [`CreateTransitGatewayPeeringAttachmentRequestOptions`](crate::model::CreateTransitGatewayPeeringAttachmentRequestOptions).
        pub fn build(self) -> crate::model::CreateTransitGatewayPeeringAttachmentRequestOptions {
            crate::model::CreateTransitGatewayPeeringAttachmentRequestOptions {
                dynamic_routing: self.dynamic_routing,
            }
        }
    }
}
impl CreateTransitGatewayPeeringAttachmentRequestOptions {
    /// Creates a new builder-style object to manufacture [`CreateTransitGatewayPeeringAttachmentRequestOptions`](crate::model::CreateTransitGatewayPeeringAttachmentRequestOptions).
    pub fn builder(
    ) -> crate::model::create_transit_gateway_peering_attachment_request_options::Builder {
        crate::model::create_transit_gateway_peering_attachment_request_options::Builder::default()
    }
}

/// <p>The options for the transit gateway multicast domain.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CreateTransitGatewayMulticastDomainRequestOptions {
    /// <p>Specify whether to enable Internet Group Management Protocol (IGMP) version 2 for the transit gateway multicast domain.</p>
    #[doc(hidden)]
    pub igmpv2_support: std::option::Option<crate::model::Igmpv2SupportValue>,
    /// <p>Specify whether to enable support for statically configuring multicast group sources for a domain.</p>
    #[doc(hidden)]
    pub static_sources_support: std::option::Option<crate::model::StaticSourcesSupportValue>,
    /// <p>Indicates whether to automatically accept cross-account subnet associations that are associated with the transit gateway multicast domain.</p>
    #[doc(hidden)]
    pub auto_accept_shared_associations:
        std::option::Option<crate::model::AutoAcceptSharedAssociationsValue>,
}
impl CreateTransitGatewayMulticastDomainRequestOptions {
    /// <p>Specify whether to enable Internet Group Management Protocol (IGMP) version 2 for the transit gateway multicast domain.</p>
    pub fn igmpv2_support(&self) -> std::option::Option<&crate::model::Igmpv2SupportValue> {
        self.igmpv2_support.as_ref()
    }
    /// <p>Specify whether to enable support for statically configuring multicast group sources for a domain.</p>
    pub fn static_sources_support(
        &self,
    ) -> std::option::Option<&crate::model::StaticSourcesSupportValue> {
        self.static_sources_support.as_ref()
    }
    /// <p>Indicates whether to automatically accept cross-account subnet associations that are associated with the transit gateway multicast domain.</p>
    pub fn auto_accept_shared_associations(
        &self,
    ) -> std::option::Option<&crate::model::AutoAcceptSharedAssociationsValue> {
        self.auto_accept_shared_associations.as_ref()
    }
}
/// See [`CreateTransitGatewayMulticastDomainRequestOptions`](crate::model::CreateTransitGatewayMulticastDomainRequestOptions).
pub mod create_transit_gateway_multicast_domain_request_options {

    /// A builder for [`CreateTransitGatewayMulticastDomainRequestOptions`](crate::model::CreateTransitGatewayMulticastDomainRequestOptions).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) igmpv2_support: std::option::Option<crate::model::Igmpv2SupportValue>,
        pub(crate) static_sources_support:
            std::option::Option<crate::model::StaticSourcesSupportValue>,
        pub(crate) auto_accept_shared_associations:
            std::option::Option<crate::model::AutoAcceptSharedAssociationsValue>,
    }
    impl Builder {
        /// <p>Specify whether to enable Internet Group Management Protocol (IGMP) version 2 for the transit gateway multicast domain.</p>
        pub fn igmpv2_support(mut self, input: crate::model::Igmpv2SupportValue) -> Self {
            self.igmpv2_support = Some(input);
            self
        }
        /// <p>Specify whether to enable Internet Group Management Protocol (IGMP) version 2 for the transit gateway multicast domain.</p>
        pub fn set_igmpv2_support(
            mut self,
            input: std::option::Option<crate::model::Igmpv2SupportValue>,
        ) -> Self {
            self.igmpv2_support = input;
            self
        }
        /// <p>Specify whether to enable support for statically configuring multicast group sources for a domain.</p>
        pub fn static_sources_support(
            mut self,
            input: crate::model::StaticSourcesSupportValue,
        ) -> Self {
            self.static_sources_support = Some(input);
            self
        }
        /// <p>Specify whether to enable support for statically configuring multicast group sources for a domain.</p>
        pub fn set_static_sources_support(
            mut self,
            input: std::option::Option<crate::model::StaticSourcesSupportValue>,
        ) -> Self {
            self.static_sources_support = input;
            self
        }
        /// <p>Indicates whether to automatically accept cross-account subnet associations that are associated with the transit gateway multicast domain.</p>
        pub fn auto_accept_shared_associations(
            mut self,
            input: crate::model::AutoAcceptSharedAssociationsValue,
        ) -> Self {
            self.auto_accept_shared_associations = Some(input);
            self
        }
        /// <p>Indicates whether to automatically accept cross-account subnet associations that are associated with the transit gateway multicast domain.</p>
        pub fn set_auto_accept_shared_associations(
            mut self,
            input: std::option::Option<crate::model::AutoAcceptSharedAssociationsValue>,
        ) -> Self {
            self.auto_accept_shared_associations = input;
            self
        }
        /// Consumes the builder and constructs a [`CreateTransitGatewayMulticastDomainRequestOptions`](crate::model::CreateTransitGatewayMulticastDomainRequestOptions).
        pub fn build(self) -> crate::model::CreateTransitGatewayMulticastDomainRequestOptions {
            crate::model::CreateTransitGatewayMulticastDomainRequestOptions {
                igmpv2_support: self.igmpv2_support,
                static_sources_support: self.static_sources_support,
                auto_accept_shared_associations: self.auto_accept_shared_associations,
            }
        }
    }
}
impl CreateTransitGatewayMulticastDomainRequestOptions {
    /// Creates a new builder-style object to manufacture [`CreateTransitGatewayMulticastDomainRequestOptions`](crate::model::CreateTransitGatewayMulticastDomainRequestOptions).
    pub fn builder(
    ) -> crate::model::create_transit_gateway_multicast_domain_request_options::Builder {
        crate::model::create_transit_gateway_multicast_domain_request_options::Builder::default()
    }
}

/// <p>The BGP options for the Connect attachment.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TransitGatewayConnectRequestBgpOptions {
    /// <p>The peer Autonomous System Number (ASN).</p>
    #[doc(hidden)]
    pub peer_asn: std::option::Option<i64>,
}
impl TransitGatewayConnectRequestBgpOptions {
    /// <p>The peer Autonomous System Number (ASN).</p>
    pub fn peer_asn(&self) -> std::option::Option<i64> {
        self.peer_asn
    }
}
/// See [`TransitGatewayConnectRequestBgpOptions`](crate::model::TransitGatewayConnectRequestBgpOptions).
pub mod transit_gateway_connect_request_bgp_options {

    /// A builder for [`TransitGatewayConnectRequestBgpOptions`](crate::model::TransitGatewayConnectRequestBgpOptions).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) peer_asn: std::option::Option<i64>,
    }
    impl Builder {
        /// <p>The peer Autonomous System Number (ASN).</p>
        pub fn peer_asn(mut self, input: i64) -> Self {
            self.peer_asn = Some(input);
            self
        }
        /// <p>The peer Autonomous System Number (ASN).</p>
        pub fn set_peer_asn(mut self, input: std::option::Option<i64>) -> Self {
            self.peer_asn = input;
            self
        }
        /// Consumes the builder and constructs a [`TransitGatewayConnectRequestBgpOptions`](crate::model::TransitGatewayConnectRequestBgpOptions).
        pub fn build(self) -> crate::model::TransitGatewayConnectRequestBgpOptions {
            crate::model::TransitGatewayConnectRequestBgpOptions {
                peer_asn: self.peer_asn,
            }
        }
    }
}
impl TransitGatewayConnectRequestBgpOptions {
    /// Creates a new builder-style object to manufacture [`TransitGatewayConnectRequestBgpOptions`](crate::model::TransitGatewayConnectRequestBgpOptions).
    pub fn builder() -> crate::model::transit_gateway_connect_request_bgp_options::Builder {
        crate::model::transit_gateway_connect_request_bgp_options::Builder::default()
    }
}

/// <p>The options for a Connect attachment.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CreateTransitGatewayConnectRequestOptions {
    /// <p>The tunnel protocol.</p>
    #[doc(hidden)]
    pub protocol: std::option::Option<crate::model::ProtocolValue>,
}
impl CreateTransitGatewayConnectRequestOptions {
    /// <p>The tunnel protocol.</p>
    pub fn protocol(&self) -> std::option::Option<&crate::model::ProtocolValue> {
        self.protocol.as_ref()
    }
}
/// See [`CreateTransitGatewayConnectRequestOptions`](crate::model::CreateTransitGatewayConnectRequestOptions).
pub mod create_transit_gateway_connect_request_options {

    /// A builder for [`CreateTransitGatewayConnectRequestOptions`](crate::model::CreateTransitGatewayConnectRequestOptions).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) protocol: std::option::Option<crate::model::ProtocolValue>,
    }
    impl Builder {
        /// <p>The tunnel protocol.</p>
        pub fn protocol(mut self, input: crate::model::ProtocolValue) -> Self {
            self.protocol = Some(input);
            self
        }
        /// <p>The tunnel protocol.</p>
        pub fn set_protocol(
            mut self,
            input: std::option::Option<crate::model::ProtocolValue>,
        ) -> Self {
            self.protocol = input;
            self
        }
        /// Consumes the builder and constructs a [`CreateTransitGatewayConnectRequestOptions`](crate::model::CreateTransitGatewayConnectRequestOptions).
        pub fn build(self) -> crate::model::CreateTransitGatewayConnectRequestOptions {
            crate::model::CreateTransitGatewayConnectRequestOptions {
                protocol: self.protocol,
            }
        }
    }
}
impl CreateTransitGatewayConnectRequestOptions {
    /// Creates a new builder-style object to manufacture [`CreateTransitGatewayConnectRequestOptions`](crate::model::CreateTransitGatewayConnectRequestOptions).
    pub fn builder() -> crate::model::create_transit_gateway_connect_request_options::Builder {
        crate::model::create_transit_gateway_connect_request_options::Builder::default()
    }
}

/// <p>Describes the options for a transit gateway.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TransitGatewayRequestOptions {
    /// <p>A private Autonomous System Number (ASN) for the Amazon side of a BGP session. The range is 64512 to 65534 for 16-bit ASNs and 4200000000 to 4294967294 for 32-bit ASNs. The default is <code>64512</code>.</p>
    #[doc(hidden)]
    pub amazon_side_asn: std::option::Option<i64>,
    /// <p>Enable or disable automatic acceptance of attachment requests. Disabled by default.</p>
    #[doc(hidden)]
    pub auto_accept_shared_attachments:
        std::option::Option<crate::model::AutoAcceptSharedAttachmentsValue>,
    /// <p>Enable or disable automatic association with the default association route table. Enabled by default.</p>
    #[doc(hidden)]
    pub default_route_table_association:
        std::option::Option<crate::model::DefaultRouteTableAssociationValue>,
    /// <p>Enable or disable automatic propagation of routes to the default propagation route table. Enabled by default.</p>
    #[doc(hidden)]
    pub default_route_table_propagation:
        std::option::Option<crate::model::DefaultRouteTablePropagationValue>,
    /// <p>Enable or disable Equal Cost Multipath Protocol support. Enabled by default.</p>
    #[doc(hidden)]
    pub vpn_ecmp_support: std::option::Option<crate::model::VpnEcmpSupportValue>,
    /// <p>Enable or disable DNS support. Enabled by default.</p>
    #[doc(hidden)]
    pub dns_support: std::option::Option<crate::model::DnsSupportValue>,
    /// <p>Indicates whether multicast is enabled on the transit gateway</p>
    #[doc(hidden)]
    pub multicast_support: std::option::Option<crate::model::MulticastSupportValue>,
    /// <p>One or more IPv4 or IPv6 CIDR blocks for the transit gateway. Must be a size /24 CIDR block or larger for IPv4, or a size /64 CIDR block or larger for IPv6.</p>
    #[doc(hidden)]
    pub transit_gateway_cidr_blocks: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl TransitGatewayRequestOptions {
    /// <p>A private Autonomous System Number (ASN) for the Amazon side of a BGP session. The range is 64512 to 65534 for 16-bit ASNs and 4200000000 to 4294967294 for 32-bit ASNs. The default is <code>64512</code>.</p>
    pub fn amazon_side_asn(&self) -> std::option::Option<i64> {
        self.amazon_side_asn
    }
    /// <p>Enable or disable automatic acceptance of attachment requests. Disabled by default.</p>
    pub fn auto_accept_shared_attachments(
        &self,
    ) -> std::option::Option<&crate::model::AutoAcceptSharedAttachmentsValue> {
        self.auto_accept_shared_attachments.as_ref()
    }
    /// <p>Enable or disable automatic association with the default association route table. Enabled by default.</p>
    pub fn default_route_table_association(
        &self,
    ) -> std::option::Option<&crate::model::DefaultRouteTableAssociationValue> {
        self.default_route_table_association.as_ref()
    }
    /// <p>Enable or disable automatic propagation of routes to the default propagation route table. Enabled by default.</p>
    pub fn default_route_table_propagation(
        &self,
    ) -> std::option::Option<&crate::model::DefaultRouteTablePropagationValue> {
        self.default_route_table_propagation.as_ref()
    }
    /// <p>Enable or disable Equal Cost Multipath Protocol support. Enabled by default.</p>
    pub fn vpn_ecmp_support(&self) -> std::option::Option<&crate::model::VpnEcmpSupportValue> {
        self.vpn_ecmp_support.as_ref()
    }
    /// <p>Enable or disable DNS support. Enabled by default.</p>
    pub fn dns_support(&self) -> std::option::Option<&crate::model::DnsSupportValue> {
        self.dns_support.as_ref()
    }
    /// <p>Indicates whether multicast is enabled on the transit gateway</p>
    pub fn multicast_support(&self) -> std::option::Option<&crate::model::MulticastSupportValue> {
        self.multicast_support.as_ref()
    }
    /// <p>One or more IPv4 or IPv6 CIDR blocks for the transit gateway. Must be a size /24 CIDR block or larger for IPv4, or a size /64 CIDR block or larger for IPv6.</p>
    pub fn transit_gateway_cidr_blocks(&self) -> std::option::Option<&[std::string::String]> {
        self.transit_gateway_cidr_blocks.as_deref()
    }
}
/// See [`TransitGatewayRequestOptions`](crate::model::TransitGatewayRequestOptions).
pub mod transit_gateway_request_options {

    /// A builder for [`TransitGatewayRequestOptions`](crate::model::TransitGatewayRequestOptions).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) amazon_side_asn: std::option::Option<i64>,
        pub(crate) auto_accept_shared_attachments:
            std::option::Option<crate::model::AutoAcceptSharedAttachmentsValue>,
        pub(crate) default_route_table_association:
            std::option::Option<crate::model::DefaultRouteTableAssociationValue>,
        pub(crate) default_route_table_propagation:
            std::option::Option<crate::model::DefaultRouteTablePropagationValue>,
        pub(crate) vpn_ecmp_support: std::option::Option<crate::model::VpnEcmpSupportValue>,
        pub(crate) dns_support: std::option::Option<crate::model::DnsSupportValue>,
        pub(crate) multicast_support: std::option::Option<crate::model::MulticastSupportValue>,
        pub(crate) transit_gateway_cidr_blocks:
            std::option::Option<std::vec::Vec<std::string::String>>,
    }
    impl Builder {
        /// <p>A private Autonomous System Number (ASN) for the Amazon side of a BGP session. The range is 64512 to 65534 for 16-bit ASNs and 4200000000 to 4294967294 for 32-bit ASNs. The default is <code>64512</code>.</p>
        pub fn amazon_side_asn(mut self, input: i64) -> Self {
            self.amazon_side_asn = Some(input);
            self
        }
        /// <p>A private Autonomous System Number (ASN) for the Amazon side of a BGP session. The range is 64512 to 65534 for 16-bit ASNs and 4200000000 to 4294967294 for 32-bit ASNs. The default is <code>64512</code>.</p>
        pub fn set_amazon_side_asn(mut self, input: std::option::Option<i64>) -> Self {
            self.amazon_side_asn = input;
            self
        }
        /// <p>Enable or disable automatic acceptance of attachment requests. Disabled by default.</p>
        pub fn auto_accept_shared_attachments(
            mut self,
            input: crate::model::AutoAcceptSharedAttachmentsValue,
        ) -> Self {
            self.auto_accept_shared_attachments = Some(input);
            self
        }
        /// <p>Enable or disable automatic acceptance of attachment requests. Disabled by default.</p>
        pub fn set_auto_accept_shared_attachments(
            mut self,
            input: std::option::Option<crate::model::AutoAcceptSharedAttachmentsValue>,
        ) -> Self {
            self.auto_accept_shared_attachments = input;
            self
        }
        /// <p>Enable or disable automatic association with the default association route table. Enabled by default.</p>
        pub fn default_route_table_association(
            mut self,
            input: crate::model::DefaultRouteTableAssociationValue,
        ) -> Self {
            self.default_route_table_association = Some(input);
            self
        }
        /// <p>Enable or disable automatic association with the default association route table. Enabled by default.</p>
        pub fn set_default_route_table_association(
            mut self,
            input: std::option::Option<crate::model::DefaultRouteTableAssociationValue>,
        ) -> Self {
            self.default_route_table_association = input;
            self
        }
        /// <p>Enable or disable automatic propagation of routes to the default propagation route table. Enabled by default.</p>
        pub fn default_route_table_propagation(
            mut self,
            input: crate::model::DefaultRouteTablePropagationValue,
        ) -> Self {
            self.default_route_table_propagation = Some(input);
            self
        }
        /// <p>Enable or disable automatic propagation of routes to the default propagation route table. Enabled by default.</p>
        pub fn set_default_route_table_propagation(
            mut self,
            input: std::option::Option<crate::model::DefaultRouteTablePropagationValue>,
        ) -> Self {
            self.default_route_table_propagation = input;
            self
        }
        /// <p>Enable or disable Equal Cost Multipath Protocol support. Enabled by default.</p>
        pub fn vpn_ecmp_support(mut self, input: crate::model::VpnEcmpSupportValue) -> Self {
            self.vpn_ecmp_support = Some(input);
            self
        }
        /// <p>Enable or disable Equal Cost Multipath Protocol support. Enabled by default.</p>
        pub fn set_vpn_ecmp_support(
            mut self,
            input: std::option::Option<crate::model::VpnEcmpSupportValue>,
        ) -> Self {
            self.vpn_ecmp_support = input;
            self
        }
        /// <p>Enable or disable DNS support. Enabled by default.</p>
        pub fn dns_support(mut self, input: crate::model::DnsSupportValue) -> Self {
            self.dns_support = Some(input);
            self
        }
        /// <p>Enable or disable DNS support. Enabled by default.</p>
        pub fn set_dns_support(
            mut self,
            input: std::option::Option<crate::model::DnsSupportValue>,
        ) -> Self {
            self.dns_support = input;
            self
        }
        /// <p>Indicates whether multicast is enabled on the transit gateway</p>
        pub fn multicast_support(mut self, input: crate::model::MulticastSupportValue) -> Self {
            self.multicast_support = Some(input);
            self
        }
        /// <p>Indicates whether multicast is enabled on the transit gateway</p>
        pub fn set_multicast_support(
            mut self,
            input: std::option::Option<crate::model::MulticastSupportValue>,
        ) -> Self {
            self.multicast_support = input;
            self
        }
        /// Appends an item to `transit_gateway_cidr_blocks`.
        ///
        /// To override the contents of this collection use [`set_transit_gateway_cidr_blocks`](Self::set_transit_gateway_cidr_blocks).
        ///
        /// <p>One or more IPv4 or IPv6 CIDR blocks for the transit gateway. Must be a size /24 CIDR block or larger for IPv4, or a size /64 CIDR block or larger for IPv6.</p>
        pub fn transit_gateway_cidr_blocks(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            let mut v = self.transit_gateway_cidr_blocks.unwrap_or_default();
            v.push(input.into());
            self.transit_gateway_cidr_blocks = Some(v);
            self
        }
        /// <p>One or more IPv4 or IPv6 CIDR blocks for the transit gateway. Must be a size /24 CIDR block or larger for IPv4, or a size /64 CIDR block or larger for IPv6.</p>
        pub fn set_transit_gateway_cidr_blocks(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.transit_gateway_cidr_blocks = input;
            self
        }
        /// Consumes the builder and constructs a [`TransitGatewayRequestOptions`](crate::model::TransitGatewayRequestOptions).
        pub fn build(self) -> crate::model::TransitGatewayRequestOptions {
            crate::model::TransitGatewayRequestOptions {
                amazon_side_asn: self.amazon_side_asn,
                auto_accept_shared_attachments: self.auto_accept_shared_attachments,
                default_route_table_association: self.default_route_table_association,
                default_route_table_propagation: self.default_route_table_propagation,
                vpn_ecmp_support: self.vpn_ecmp_support,
                dns_support: self.dns_support,
                multicast_support: self.multicast_support,
                transit_gateway_cidr_blocks: self.transit_gateway_cidr_blocks,
            }
        }
    }
}
impl TransitGatewayRequestOptions {
    /// Creates a new builder-style object to manufacture [`TransitGatewayRequestOptions`](crate::model::TransitGatewayRequestOptions).
    pub fn builder() -> crate::model::transit_gateway_request_options::Builder {
        crate::model::transit_gateway_request_options::Builder::default()
    }
}

/// <p>The tags to apply to the AMI object that will be stored in the Amazon S3 bucket. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-tagging.html">Categorizing your storage using tags</a> in the <i>Amazon Simple Storage Service User Guide</i>.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct S3ObjectTag {
    /// <p>The key of the tag.</p>
    /// <p>Constraints: Tag keys are case-sensitive and can be up to 128 Unicode characters in length. May not begin with <code>aws</code>:.</p>
    #[doc(hidden)]
    pub key: std::option::Option<std::string::String>,
    /// <p>The value of the tag.</p>
    /// <p>Constraints: Tag values are case-sensitive and can be up to 256 Unicode characters in length.</p>
    #[doc(hidden)]
    pub value: std::option::Option<std::string::String>,
}
impl S3ObjectTag {
    /// <p>The key of the tag.</p>
    /// <p>Constraints: Tag keys are case-sensitive and can be up to 128 Unicode characters in length. May not begin with <code>aws</code>:.</p>
    pub fn key(&self) -> std::option::Option<&str> {
        self.key.as_deref()
    }
    /// <p>The value of the tag.</p>
    /// <p>Constraints: Tag values are case-sensitive and can be up to 256 Unicode characters in length.</p>
    pub fn value(&self) -> std::option::Option<&str> {
        self.value.as_deref()
    }
}
/// See [`S3ObjectTag`](crate::model::S3ObjectTag).
pub mod s3_object_tag {

    /// A builder for [`S3ObjectTag`](crate::model::S3ObjectTag).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) key: std::option::Option<std::string::String>,
        pub(crate) value: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The key of the tag.</p>
        /// <p>Constraints: Tag keys are case-sensitive and can be up to 128 Unicode characters in length. May not begin with <code>aws</code>:.</p>
        pub fn key(mut self, input: impl Into<std::string::String>) -> Self {
            self.key = Some(input.into());
            self
        }
        /// <p>The key of the tag.</p>
        /// <p>Constraints: Tag keys are case-sensitive and can be up to 128 Unicode characters in length. May not begin with <code>aws</code>:.</p>
        pub fn set_key(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.key = input;
            self
        }
        /// <p>The value of the tag.</p>
        /// <p>Constraints: Tag values are case-sensitive and can be up to 256 Unicode characters in length.</p>
        pub fn value(mut self, input: impl Into<std::string::String>) -> Self {
            self.value = Some(input.into());
            self
        }
        /// <p>The value of the tag.</p>
        /// <p>Constraints: Tag values are case-sensitive and can be up to 256 Unicode characters in length.</p>
        pub fn set_value(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.value = input;
            self
        }
        /// Consumes the builder and constructs a [`S3ObjectTag`](crate::model::S3ObjectTag).
        pub fn build(self) -> crate::model::S3ObjectTag {
            crate::model::S3ObjectTag {
                key: self.key,
                value: self.value,
            }
        }
    }
}
impl S3ObjectTag {
    /// Creates a new builder-style object to manufacture [`S3ObjectTag`](crate::model::S3ObjectTag).
    pub fn builder() -> crate::model::s3_object_tag::Builder {
        crate::model::s3_object_tag::Builder::default()
    }
}

/// <p>Information about a snapshot.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SnapshotInfo {
    /// <p>Description specified by the CreateSnapshotRequest that has been applied to all snapshots.</p>
    #[doc(hidden)]
    pub description: std::option::Option<std::string::String>,
    /// <p>Tags associated with this snapshot.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    /// <p>Indicates whether the snapshot is encrypted.</p>
    #[doc(hidden)]
    pub encrypted: std::option::Option<bool>,
    /// <p>Source volume from which this snapshot was created.</p>
    #[doc(hidden)]
    pub volume_id: std::option::Option<std::string::String>,
    /// <p>Current state of the snapshot.</p>
    #[doc(hidden)]
    pub state: std::option::Option<crate::model::SnapshotState>,
    /// <p>Size of the volume from which this snapshot was created.</p>
    #[doc(hidden)]
    pub volume_size: std::option::Option<i32>,
    /// <p>Time this snapshot was started. This is the same for all snapshots initiated by the same request.</p>
    #[doc(hidden)]
    pub start_time: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>Progress this snapshot has made towards completing.</p>
    #[doc(hidden)]
    pub progress: std::option::Option<std::string::String>,
    /// <p>Account id used when creating this snapshot.</p>
    #[doc(hidden)]
    pub owner_id: std::option::Option<std::string::String>,
    /// <p>Snapshot id that can be used to describe this snapshot.</p>
    #[doc(hidden)]
    pub snapshot_id: std::option::Option<std::string::String>,
    /// <p>The ARN of the Outpost on which the snapshot is stored. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshots-outposts.html">Amazon EBS local snapshots on Outposts</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
    #[doc(hidden)]
    pub outpost_arn: std::option::Option<std::string::String>,
}
impl SnapshotInfo {
    /// <p>Description specified by the CreateSnapshotRequest that has been applied to all snapshots.</p>
    pub fn description(&self) -> std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>Tags associated with this snapshot.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
    /// <p>Indicates whether the snapshot is encrypted.</p>
    pub fn encrypted(&self) -> std::option::Option<bool> {
        self.encrypted
    }
    /// <p>Source volume from which this snapshot was created.</p>
    pub fn volume_id(&self) -> std::option::Option<&str> {
        self.volume_id.as_deref()
    }
    /// <p>Current state of the snapshot.</p>
    pub fn state(&self) -> std::option::Option<&crate::model::SnapshotState> {
        self.state.as_ref()
    }
    /// <p>Size of the volume from which this snapshot was created.</p>
    pub fn volume_size(&self) -> std::option::Option<i32> {
        self.volume_size
    }
    /// <p>Time this snapshot was started. This is the same for all snapshots initiated by the same request.</p>
    pub fn start_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.start_time.as_ref()
    }
    /// <p>Progress this snapshot has made towards completing.</p>
    pub fn progress(&self) -> std::option::Option<&str> {
        self.progress.as_deref()
    }
    /// <p>Account id used when creating this snapshot.</p>
    pub fn owner_id(&self) -> std::option::Option<&str> {
        self.owner_id.as_deref()
    }
    /// <p>Snapshot id that can be used to describe this snapshot.</p>
    pub fn snapshot_id(&self) -> std::option::Option<&str> {
        self.snapshot_id.as_deref()
    }
    /// <p>The ARN of the Outpost on which the snapshot is stored. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshots-outposts.html">Amazon EBS local snapshots on Outposts</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
    pub fn outpost_arn(&self) -> std::option::Option<&str> {
        self.outpost_arn.as_deref()
    }
}
/// See [`SnapshotInfo`](crate::model::SnapshotInfo).
pub mod snapshot_info {

    /// A builder for [`SnapshotInfo`](crate::model::SnapshotInfo).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) description: std::option::Option<std::string::String>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        pub(crate) encrypted: std::option::Option<bool>,
        pub(crate) volume_id: std::option::Option<std::string::String>,
        pub(crate) state: std::option::Option<crate::model::SnapshotState>,
        pub(crate) volume_size: std::option::Option<i32>,
        pub(crate) start_time: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) progress: std::option::Option<std::string::String>,
        pub(crate) owner_id: std::option::Option<std::string::String>,
        pub(crate) snapshot_id: std::option::Option<std::string::String>,
        pub(crate) outpost_arn: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>Description specified by the CreateSnapshotRequest that has been applied to all snapshots.</p>
        pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
            self.description = Some(input.into());
            self
        }
        /// <p>Description specified by the CreateSnapshotRequest that has been applied to all snapshots.</p>
        pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.description = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>Tags associated with this snapshot.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>Tags associated with this snapshot.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// <p>Indicates whether the snapshot is encrypted.</p>
        pub fn encrypted(mut self, input: bool) -> Self {
            self.encrypted = Some(input);
            self
        }
        /// <p>Indicates whether the snapshot is encrypted.</p>
        pub fn set_encrypted(mut self, input: std::option::Option<bool>) -> Self {
            self.encrypted = input;
            self
        }
        /// <p>Source volume from which this snapshot was created.</p>
        pub fn volume_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.volume_id = Some(input.into());
            self
        }
        /// <p>Source volume from which this snapshot was created.</p>
        pub fn set_volume_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.volume_id = input;
            self
        }
        /// <p>Current state of the snapshot.</p>
        pub fn state(mut self, input: crate::model::SnapshotState) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>Current state of the snapshot.</p>
        pub fn set_state(
            mut self,
            input: std::option::Option<crate::model::SnapshotState>,
        ) -> Self {
            self.state = input;
            self
        }
        /// <p>Size of the volume from which this snapshot was created.</p>
        pub fn volume_size(mut self, input: i32) -> Self {
            self.volume_size = Some(input);
            self
        }
        /// <p>Size of the volume from which this snapshot was created.</p>
        pub fn set_volume_size(mut self, input: std::option::Option<i32>) -> Self {
            self.volume_size = input;
            self
        }
        /// <p>Time this snapshot was started. This is the same for all snapshots initiated by the same request.</p>
        pub fn start_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.start_time = Some(input);
            self
        }
        /// <p>Time this snapshot was started. This is the same for all snapshots initiated by the same request.</p>
        pub fn set_start_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.start_time = input;
            self
        }
        /// <p>Progress this snapshot has made towards completing.</p>
        pub fn progress(mut self, input: impl Into<std::string::String>) -> Self {
            self.progress = Some(input.into());
            self
        }
        /// <p>Progress this snapshot has made towards completing.</p>
        pub fn set_progress(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.progress = input;
            self
        }
        /// <p>Account id used when creating this snapshot.</p>
        pub fn owner_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.owner_id = Some(input.into());
            self
        }
        /// <p>Account id used when creating this snapshot.</p>
        pub fn set_owner_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.owner_id = input;
            self
        }
        /// <p>Snapshot id that can be used to describe this snapshot.</p>
        pub fn snapshot_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.snapshot_id = Some(input.into());
            self
        }
        /// <p>Snapshot id that can be used to describe this snapshot.</p>
        pub fn set_snapshot_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.snapshot_id = input;
            self
        }
        /// <p>The ARN of the Outpost on which the snapshot is stored. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshots-outposts.html">Amazon EBS local snapshots on Outposts</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
        pub fn outpost_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.outpost_arn = Some(input.into());
            self
        }
        /// <p>The ARN of the Outpost on which the snapshot is stored. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshots-outposts.html">Amazon EBS local snapshots on Outposts</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
        pub fn set_outpost_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.outpost_arn = input;
            self
        }
        /// Consumes the builder and constructs a [`SnapshotInfo`](crate::model::SnapshotInfo).
        pub fn build(self) -> crate::model::SnapshotInfo {
            crate::model::SnapshotInfo {
                description: self.description,
                tags: self.tags,
                encrypted: self.encrypted,
                volume_id: self.volume_id,
                state: self.state,
                volume_size: self.volume_size,
                start_time: self.start_time,
                progress: self.progress,
                owner_id: self.owner_id,
                snapshot_id: self.snapshot_id,
                outpost_arn: self.outpost_arn,
            }
        }
    }
}
impl SnapshotInfo {
    /// Creates a new builder-style object to manufacture [`SnapshotInfo`](crate::model::SnapshotInfo).
    pub fn builder() -> crate::model::snapshot_info::Builder {
        crate::model::snapshot_info::Builder::default()
    }
}

/// When writing a match expression against `CopyTagsFromSource`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let copytagsfromsource = unimplemented!();
/// match copytagsfromsource {
///     CopyTagsFromSource::Volume => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `copytagsfromsource` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `CopyTagsFromSource::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `CopyTagsFromSource::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `CopyTagsFromSource::NewFeature` is defined.
/// Specifically, when `copytagsfromsource` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `CopyTagsFromSource::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 CopyTagsFromSource {
    #[allow(missing_docs)] // documentation missing in model
    Volume,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for CopyTagsFromSource {
    fn from(s: &str) -> Self {
        match s {
            "volume" => CopyTagsFromSource::Volume,
            other => {
                CopyTagsFromSource::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for CopyTagsFromSource {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(CopyTagsFromSource::from(s))
    }
}
impl CopyTagsFromSource {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            CopyTagsFromSource::Volume => "volume",
            CopyTagsFromSource::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["volume"]
    }
}
impl AsRef<str> for CopyTagsFromSource {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>The instance details to specify which volumes should be snapshotted.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InstanceSpecification {
    /// <p>The instance to specify which volumes should be snapshotted.</p>
    #[doc(hidden)]
    pub instance_id: std::option::Option<std::string::String>,
    /// <p>Excludes the root volume from being snapshotted.</p>
    #[doc(hidden)]
    pub exclude_boot_volume: std::option::Option<bool>,
    /// <p>The IDs of the data (non-root) volumes to exclude from the multi-volume snapshot set. If you specify the ID of the root volume, the request fails. To exclude the root volume, use <b>ExcludeBootVolume</b>.</p>
    /// <p>You can specify up to 40 volume IDs per request.</p>
    #[doc(hidden)]
    pub exclude_data_volume_ids: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl InstanceSpecification {
    /// <p>The instance to specify which volumes should be snapshotted.</p>
    pub fn instance_id(&self) -> std::option::Option<&str> {
        self.instance_id.as_deref()
    }
    /// <p>Excludes the root volume from being snapshotted.</p>
    pub fn exclude_boot_volume(&self) -> std::option::Option<bool> {
        self.exclude_boot_volume
    }
    /// <p>The IDs of the data (non-root) volumes to exclude from the multi-volume snapshot set. If you specify the ID of the root volume, the request fails. To exclude the root volume, use <b>ExcludeBootVolume</b>.</p>
    /// <p>You can specify up to 40 volume IDs per request.</p>
    pub fn exclude_data_volume_ids(&self) -> std::option::Option<&[std::string::String]> {
        self.exclude_data_volume_ids.as_deref()
    }
}
/// See [`InstanceSpecification`](crate::model::InstanceSpecification).
pub mod instance_specification {

    /// A builder for [`InstanceSpecification`](crate::model::InstanceSpecification).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) instance_id: std::option::Option<std::string::String>,
        pub(crate) exclude_boot_volume: std::option::Option<bool>,
        pub(crate) exclude_data_volume_ids: std::option::Option<std::vec::Vec<std::string::String>>,
    }
    impl Builder {
        /// <p>The instance to specify which volumes should be snapshotted.</p>
        pub fn instance_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.instance_id = Some(input.into());
            self
        }
        /// <p>The instance to specify which volumes should be snapshotted.</p>
        pub fn set_instance_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.instance_id = input;
            self
        }
        /// <p>Excludes the root volume from being snapshotted.</p>
        pub fn exclude_boot_volume(mut self, input: bool) -> Self {
            self.exclude_boot_volume = Some(input);
            self
        }
        /// <p>Excludes the root volume from being snapshotted.</p>
        pub fn set_exclude_boot_volume(mut self, input: std::option::Option<bool>) -> Self {
            self.exclude_boot_volume = input;
            self
        }
        /// Appends an item to `exclude_data_volume_ids`.
        ///
        /// To override the contents of this collection use [`set_exclude_data_volume_ids`](Self::set_exclude_data_volume_ids).
        ///
        /// <p>The IDs of the data (non-root) volumes to exclude from the multi-volume snapshot set. If you specify the ID of the root volume, the request fails. To exclude the root volume, use <b>ExcludeBootVolume</b>.</p>
        /// <p>You can specify up to 40 volume IDs per request.</p>
        pub fn exclude_data_volume_ids(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.exclude_data_volume_ids.unwrap_or_default();
            v.push(input.into());
            self.exclude_data_volume_ids = Some(v);
            self
        }
        /// <p>The IDs of the data (non-root) volumes to exclude from the multi-volume snapshot set. If you specify the ID of the root volume, the request fails. To exclude the root volume, use <b>ExcludeBootVolume</b>.</p>
        /// <p>You can specify up to 40 volume IDs per request.</p>
        pub fn set_exclude_data_volume_ids(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.exclude_data_volume_ids = input;
            self
        }
        /// Consumes the builder and constructs a [`InstanceSpecification`](crate::model::InstanceSpecification).
        pub fn build(self) -> crate::model::InstanceSpecification {
            crate::model::InstanceSpecification {
                instance_id: self.instance_id,
                exclude_boot_volume: self.exclude_boot_volume,
                exclude_data_volume_ids: self.exclude_data_volume_ids,
            }
        }
    }
}
impl InstanceSpecification {
    /// Creates a new builder-style object to manufacture [`InstanceSpecification`](crate::model::InstanceSpecification).
    pub fn builder() -> crate::model::instance_specification::Builder {
        crate::model::instance_specification::Builder::default()
    }
}

/// <p>Describes the price for a Reserved Instance.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct PriceScheduleSpecification {
    /// <p>The currency for transacting the Reserved Instance resale. At this time, the only supported currency is <code>USD</code>.</p>
    #[doc(hidden)]
    pub currency_code: std::option::Option<crate::model::CurrencyCodeValues>,
    /// <p>The fixed price for the term.</p>
    #[doc(hidden)]
    pub price: std::option::Option<f64>,
    /// <p>The number of months remaining in the reservation. For example, 2 is the second to the last month before the capacity reservation expires.</p>
    #[doc(hidden)]
    pub term: std::option::Option<i64>,
}
impl PriceScheduleSpecification {
    /// <p>The currency for transacting the Reserved Instance resale. At this time, the only supported currency is <code>USD</code>.</p>
    pub fn currency_code(&self) -> std::option::Option<&crate::model::CurrencyCodeValues> {
        self.currency_code.as_ref()
    }
    /// <p>The fixed price for the term.</p>
    pub fn price(&self) -> std::option::Option<f64> {
        self.price
    }
    /// <p>The number of months remaining in the reservation. For example, 2 is the second to the last month before the capacity reservation expires.</p>
    pub fn term(&self) -> std::option::Option<i64> {
        self.term
    }
}
/// See [`PriceScheduleSpecification`](crate::model::PriceScheduleSpecification).
pub mod price_schedule_specification {

    /// A builder for [`PriceScheduleSpecification`](crate::model::PriceScheduleSpecification).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) currency_code: std::option::Option<crate::model::CurrencyCodeValues>,
        pub(crate) price: std::option::Option<f64>,
        pub(crate) term: std::option::Option<i64>,
    }
    impl Builder {
        /// <p>The currency for transacting the Reserved Instance resale. At this time, the only supported currency is <code>USD</code>.</p>
        pub fn currency_code(mut self, input: crate::model::CurrencyCodeValues) -> Self {
            self.currency_code = Some(input);
            self
        }
        /// <p>The currency for transacting the Reserved Instance resale. At this time, the only supported currency is <code>USD</code>.</p>
        pub fn set_currency_code(
            mut self,
            input: std::option::Option<crate::model::CurrencyCodeValues>,
        ) -> Self {
            self.currency_code = input;
            self
        }
        /// <p>The fixed price for the term.</p>
        pub fn price(mut self, input: f64) -> Self {
            self.price = Some(input);
            self
        }
        /// <p>The fixed price for the term.</p>
        pub fn set_price(mut self, input: std::option::Option<f64>) -> Self {
            self.price = input;
            self
        }
        /// <p>The number of months remaining in the reservation. For example, 2 is the second to the last month before the capacity reservation expires.</p>
        pub fn term(mut self, input: i64) -> Self {
            self.term = Some(input);
            self
        }
        /// <p>The number of months remaining in the reservation. For example, 2 is the second to the last month before the capacity reservation expires.</p>
        pub fn set_term(mut self, input: std::option::Option<i64>) -> Self {
            self.term = input;
            self
        }
        /// Consumes the builder and constructs a [`PriceScheduleSpecification`](crate::model::PriceScheduleSpecification).
        pub fn build(self) -> crate::model::PriceScheduleSpecification {
            crate::model::PriceScheduleSpecification {
                currency_code: self.currency_code,
                price: self.price,
                term: self.term,
            }
        }
    }
}
impl PriceScheduleSpecification {
    /// Creates a new builder-style object to manufacture [`PriceScheduleSpecification`](crate::model::PriceScheduleSpecification).
    pub fn builder() -> crate::model::price_schedule_specification::Builder {
        crate::model::price_schedule_specification::Builder::default()
    }
}

/// When writing a match expression against `NetworkInterfaceCreationType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let networkinterfacecreationtype = unimplemented!();
/// match networkinterfacecreationtype {
///     NetworkInterfaceCreationType::Branch => { /* ... */ },
///     NetworkInterfaceCreationType::Efa => { /* ... */ },
///     NetworkInterfaceCreationType::Trunk => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `networkinterfacecreationtype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `NetworkInterfaceCreationType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `NetworkInterfaceCreationType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `NetworkInterfaceCreationType::NewFeature` is defined.
/// Specifically, when `networkinterfacecreationtype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `NetworkInterfaceCreationType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 NetworkInterfaceCreationType {
    #[allow(missing_docs)] // documentation missing in model
    Branch,
    #[allow(missing_docs)] // documentation missing in model
    Efa,
    #[allow(missing_docs)] // documentation missing in model
    Trunk,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for NetworkInterfaceCreationType {
    fn from(s: &str) -> Self {
        match s {
            "branch" => NetworkInterfaceCreationType::Branch,
            "efa" => NetworkInterfaceCreationType::Efa,
            "trunk" => NetworkInterfaceCreationType::Trunk,
            other => NetworkInterfaceCreationType::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for NetworkInterfaceCreationType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(NetworkInterfaceCreationType::from(s))
    }
}
impl NetworkInterfaceCreationType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            NetworkInterfaceCreationType::Branch => "branch",
            NetworkInterfaceCreationType::Efa => "efa",
            NetworkInterfaceCreationType::Trunk => "trunk",
            NetworkInterfaceCreationType::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["branch", "efa", "trunk"]
    }
}
impl AsRef<str> for NetworkInterfaceCreationType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes a path.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AccessScopePathRequest {
    /// <p>The source.</p>
    #[doc(hidden)]
    pub source: std::option::Option<crate::model::PathStatementRequest>,
    /// <p>The destination.</p>
    #[doc(hidden)]
    pub destination: std::option::Option<crate::model::PathStatementRequest>,
    /// <p>The through resources.</p>
    #[doc(hidden)]
    pub through_resources:
        std::option::Option<std::vec::Vec<crate::model::ThroughResourcesStatementRequest>>,
}
impl AccessScopePathRequest {
    /// <p>The source.</p>
    pub fn source(&self) -> std::option::Option<&crate::model::PathStatementRequest> {
        self.source.as_ref()
    }
    /// <p>The destination.</p>
    pub fn destination(&self) -> std::option::Option<&crate::model::PathStatementRequest> {
        self.destination.as_ref()
    }
    /// <p>The through resources.</p>
    pub fn through_resources(
        &self,
    ) -> std::option::Option<&[crate::model::ThroughResourcesStatementRequest]> {
        self.through_resources.as_deref()
    }
}
/// See [`AccessScopePathRequest`](crate::model::AccessScopePathRequest).
pub mod access_scope_path_request {

    /// A builder for [`AccessScopePathRequest`](crate::model::AccessScopePathRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) source: std::option::Option<crate::model::PathStatementRequest>,
        pub(crate) destination: std::option::Option<crate::model::PathStatementRequest>,
        pub(crate) through_resources:
            std::option::Option<std::vec::Vec<crate::model::ThroughResourcesStatementRequest>>,
    }
    impl Builder {
        /// <p>The source.</p>
        pub fn source(mut self, input: crate::model::PathStatementRequest) -> Self {
            self.source = Some(input);
            self
        }
        /// <p>The source.</p>
        pub fn set_source(
            mut self,
            input: std::option::Option<crate::model::PathStatementRequest>,
        ) -> Self {
            self.source = input;
            self
        }
        /// <p>The destination.</p>
        pub fn destination(mut self, input: crate::model::PathStatementRequest) -> Self {
            self.destination = Some(input);
            self
        }
        /// <p>The destination.</p>
        pub fn set_destination(
            mut self,
            input: std::option::Option<crate::model::PathStatementRequest>,
        ) -> Self {
            self.destination = input;
            self
        }
        /// Appends an item to `through_resources`.
        ///
        /// To override the contents of this collection use [`set_through_resources`](Self::set_through_resources).
        ///
        /// <p>The through resources.</p>
        pub fn through_resources(
            mut self,
            input: crate::model::ThroughResourcesStatementRequest,
        ) -> Self {
            let mut v = self.through_resources.unwrap_or_default();
            v.push(input);
            self.through_resources = Some(v);
            self
        }
        /// <p>The through resources.</p>
        pub fn set_through_resources(
            mut self,
            input: std::option::Option<
                std::vec::Vec<crate::model::ThroughResourcesStatementRequest>,
            >,
        ) -> Self {
            self.through_resources = input;
            self
        }
        /// Consumes the builder and constructs a [`AccessScopePathRequest`](crate::model::AccessScopePathRequest).
        pub fn build(self) -> crate::model::AccessScopePathRequest {
            crate::model::AccessScopePathRequest {
                source: self.source,
                destination: self.destination,
                through_resources: self.through_resources,
            }
        }
    }
}
impl AccessScopePathRequest {
    /// Creates a new builder-style object to manufacture [`AccessScopePathRequest`](crate::model::AccessScopePathRequest).
    pub fn builder() -> crate::model::access_scope_path_request::Builder {
        crate::model::access_scope_path_request::Builder::default()
    }
}

/// <p>Describes a through resource statement.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ThroughResourcesStatementRequest {
    /// <p>The resource statement.</p>
    #[doc(hidden)]
    pub resource_statement: std::option::Option<crate::model::ResourceStatementRequest>,
}
impl ThroughResourcesStatementRequest {
    /// <p>The resource statement.</p>
    pub fn resource_statement(
        &self,
    ) -> std::option::Option<&crate::model::ResourceStatementRequest> {
        self.resource_statement.as_ref()
    }
}
/// See [`ThroughResourcesStatementRequest`](crate::model::ThroughResourcesStatementRequest).
pub mod through_resources_statement_request {

    /// A builder for [`ThroughResourcesStatementRequest`](crate::model::ThroughResourcesStatementRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) resource_statement: std::option::Option<crate::model::ResourceStatementRequest>,
    }
    impl Builder {
        /// <p>The resource statement.</p>
        pub fn resource_statement(mut self, input: crate::model::ResourceStatementRequest) -> Self {
            self.resource_statement = Some(input);
            self
        }
        /// <p>The resource statement.</p>
        pub fn set_resource_statement(
            mut self,
            input: std::option::Option<crate::model::ResourceStatementRequest>,
        ) -> Self {
            self.resource_statement = input;
            self
        }
        /// Consumes the builder and constructs a [`ThroughResourcesStatementRequest`](crate::model::ThroughResourcesStatementRequest).
        pub fn build(self) -> crate::model::ThroughResourcesStatementRequest {
            crate::model::ThroughResourcesStatementRequest {
                resource_statement: self.resource_statement,
            }
        }
    }
}
impl ThroughResourcesStatementRequest {
    /// Creates a new builder-style object to manufacture [`ThroughResourcesStatementRequest`](crate::model::ThroughResourcesStatementRequest).
    pub fn builder() -> crate::model::through_resources_statement_request::Builder {
        crate::model::through_resources_statement_request::Builder::default()
    }
}

/// <p>Describes a resource statement.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ResourceStatementRequest {
    /// <p>The resources.</p>
    #[doc(hidden)]
    pub resources: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>The resource types.</p>
    #[doc(hidden)]
    pub resource_types: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl ResourceStatementRequest {
    /// <p>The resources.</p>
    pub fn resources(&self) -> std::option::Option<&[std::string::String]> {
        self.resources.as_deref()
    }
    /// <p>The resource types.</p>
    pub fn resource_types(&self) -> std::option::Option<&[std::string::String]> {
        self.resource_types.as_deref()
    }
}
/// See [`ResourceStatementRequest`](crate::model::ResourceStatementRequest).
pub mod resource_statement_request {

    /// A builder for [`ResourceStatementRequest`](crate::model::ResourceStatementRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) resources: std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) resource_types: std::option::Option<std::vec::Vec<std::string::String>>,
    }
    impl Builder {
        /// Appends an item to `resources`.
        ///
        /// To override the contents of this collection use [`set_resources`](Self::set_resources).
        ///
        /// <p>The resources.</p>
        pub fn resources(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.resources.unwrap_or_default();
            v.push(input.into());
            self.resources = Some(v);
            self
        }
        /// <p>The resources.</p>
        pub fn set_resources(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.resources = input;
            self
        }
        /// Appends an item to `resource_types`.
        ///
        /// To override the contents of this collection use [`set_resource_types`](Self::set_resource_types).
        ///
        /// <p>The resource types.</p>
        pub fn resource_types(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.resource_types.unwrap_or_default();
            v.push(input.into());
            self.resource_types = Some(v);
            self
        }
        /// <p>The resource types.</p>
        pub fn set_resource_types(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.resource_types = input;
            self
        }
        /// Consumes the builder and constructs a [`ResourceStatementRequest`](crate::model::ResourceStatementRequest).
        pub fn build(self) -> crate::model::ResourceStatementRequest {
            crate::model::ResourceStatementRequest {
                resources: self.resources,
                resource_types: self.resource_types,
            }
        }
    }
}
impl ResourceStatementRequest {
    /// Creates a new builder-style object to manufacture [`ResourceStatementRequest`](crate::model::ResourceStatementRequest).
    pub fn builder() -> crate::model::resource_statement_request::Builder {
        crate::model::resource_statement_request::Builder::default()
    }
}

/// <p>Describes a path statement.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct PathStatementRequest {
    /// <p>The packet header statement.</p>
    #[doc(hidden)]
    pub packet_header_statement: std::option::Option<crate::model::PacketHeaderStatementRequest>,
    /// <p>The resource statement.</p>
    #[doc(hidden)]
    pub resource_statement: std::option::Option<crate::model::ResourceStatementRequest>,
}
impl PathStatementRequest {
    /// <p>The packet header statement.</p>
    pub fn packet_header_statement(
        &self,
    ) -> std::option::Option<&crate::model::PacketHeaderStatementRequest> {
        self.packet_header_statement.as_ref()
    }
    /// <p>The resource statement.</p>
    pub fn resource_statement(
        &self,
    ) -> std::option::Option<&crate::model::ResourceStatementRequest> {
        self.resource_statement.as_ref()
    }
}
/// See [`PathStatementRequest`](crate::model::PathStatementRequest).
pub mod path_statement_request {

    /// A builder for [`PathStatementRequest`](crate::model::PathStatementRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) packet_header_statement:
            std::option::Option<crate::model::PacketHeaderStatementRequest>,
        pub(crate) resource_statement: std::option::Option<crate::model::ResourceStatementRequest>,
    }
    impl Builder {
        /// <p>The packet header statement.</p>
        pub fn packet_header_statement(
            mut self,
            input: crate::model::PacketHeaderStatementRequest,
        ) -> Self {
            self.packet_header_statement = Some(input);
            self
        }
        /// <p>The packet header statement.</p>
        pub fn set_packet_header_statement(
            mut self,
            input: std::option::Option<crate::model::PacketHeaderStatementRequest>,
        ) -> Self {
            self.packet_header_statement = input;
            self
        }
        /// <p>The resource statement.</p>
        pub fn resource_statement(mut self, input: crate::model::ResourceStatementRequest) -> Self {
            self.resource_statement = Some(input);
            self
        }
        /// <p>The resource statement.</p>
        pub fn set_resource_statement(
            mut self,
            input: std::option::Option<crate::model::ResourceStatementRequest>,
        ) -> Self {
            self.resource_statement = input;
            self
        }
        /// Consumes the builder and constructs a [`PathStatementRequest`](crate::model::PathStatementRequest).
        pub fn build(self) -> crate::model::PathStatementRequest {
            crate::model::PathStatementRequest {
                packet_header_statement: self.packet_header_statement,
                resource_statement: self.resource_statement,
            }
        }
    }
}
impl PathStatementRequest {
    /// Creates a new builder-style object to manufacture [`PathStatementRequest`](crate::model::PathStatementRequest).
    pub fn builder() -> crate::model::path_statement_request::Builder {
        crate::model::path_statement_request::Builder::default()
    }
}

/// <p>Describes a packet header statement.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct PacketHeaderStatementRequest {
    /// <p>The source addresses.</p>
    #[doc(hidden)]
    pub source_addresses: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>The destination addresses.</p>
    #[doc(hidden)]
    pub destination_addresses: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>The source ports.</p>
    #[doc(hidden)]
    pub source_ports: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>The destination ports.</p>
    #[doc(hidden)]
    pub destination_ports: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>The source prefix lists.</p>
    #[doc(hidden)]
    pub source_prefix_lists: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>The destination prefix lists.</p>
    #[doc(hidden)]
    pub destination_prefix_lists: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>The protocols.</p>
    #[doc(hidden)]
    pub protocols: std::option::Option<std::vec::Vec<crate::model::Protocol>>,
}
impl PacketHeaderStatementRequest {
    /// <p>The source addresses.</p>
    pub fn source_addresses(&self) -> std::option::Option<&[std::string::String]> {
        self.source_addresses.as_deref()
    }
    /// <p>The destination addresses.</p>
    pub fn destination_addresses(&self) -> std::option::Option<&[std::string::String]> {
        self.destination_addresses.as_deref()
    }
    /// <p>The source ports.</p>
    pub fn source_ports(&self) -> std::option::Option<&[std::string::String]> {
        self.source_ports.as_deref()
    }
    /// <p>The destination ports.</p>
    pub fn destination_ports(&self) -> std::option::Option<&[std::string::String]> {
        self.destination_ports.as_deref()
    }
    /// <p>The source prefix lists.</p>
    pub fn source_prefix_lists(&self) -> std::option::Option<&[std::string::String]> {
        self.source_prefix_lists.as_deref()
    }
    /// <p>The destination prefix lists.</p>
    pub fn destination_prefix_lists(&self) -> std::option::Option<&[std::string::String]> {
        self.destination_prefix_lists.as_deref()
    }
    /// <p>The protocols.</p>
    pub fn protocols(&self) -> std::option::Option<&[crate::model::Protocol]> {
        self.protocols.as_deref()
    }
}
/// See [`PacketHeaderStatementRequest`](crate::model::PacketHeaderStatementRequest).
pub mod packet_header_statement_request {

    /// A builder for [`PacketHeaderStatementRequest`](crate::model::PacketHeaderStatementRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) source_addresses: std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) destination_addresses: std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) source_ports: std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) destination_ports: std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) source_prefix_lists: std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) destination_prefix_lists:
            std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) protocols: std::option::Option<std::vec::Vec<crate::model::Protocol>>,
    }
    impl Builder {
        /// Appends an item to `source_addresses`.
        ///
        /// To override the contents of this collection use [`set_source_addresses`](Self::set_source_addresses).
        ///
        /// <p>The source addresses.</p>
        pub fn source_addresses(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.source_addresses.unwrap_or_default();
            v.push(input.into());
            self.source_addresses = Some(v);
            self
        }
        /// <p>The source addresses.</p>
        pub fn set_source_addresses(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.source_addresses = input;
            self
        }
        /// Appends an item to `destination_addresses`.
        ///
        /// To override the contents of this collection use [`set_destination_addresses`](Self::set_destination_addresses).
        ///
        /// <p>The destination addresses.</p>
        pub fn destination_addresses(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.destination_addresses.unwrap_or_default();
            v.push(input.into());
            self.destination_addresses = Some(v);
            self
        }
        /// <p>The destination addresses.</p>
        pub fn set_destination_addresses(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.destination_addresses = input;
            self
        }
        /// Appends an item to `source_ports`.
        ///
        /// To override the contents of this collection use [`set_source_ports`](Self::set_source_ports).
        ///
        /// <p>The source ports.</p>
        pub fn source_ports(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.source_ports.unwrap_or_default();
            v.push(input.into());
            self.source_ports = Some(v);
            self
        }
        /// <p>The source ports.</p>
        pub fn set_source_ports(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.source_ports = input;
            self
        }
        /// Appends an item to `destination_ports`.
        ///
        /// To override the contents of this collection use [`set_destination_ports`](Self::set_destination_ports).
        ///
        /// <p>The destination ports.</p>
        pub fn destination_ports(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.destination_ports.unwrap_or_default();
            v.push(input.into());
            self.destination_ports = Some(v);
            self
        }
        /// <p>The destination ports.</p>
        pub fn set_destination_ports(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.destination_ports = input;
            self
        }
        /// Appends an item to `source_prefix_lists`.
        ///
        /// To override the contents of this collection use [`set_source_prefix_lists`](Self::set_source_prefix_lists).
        ///
        /// <p>The source prefix lists.</p>
        pub fn source_prefix_lists(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.source_prefix_lists.unwrap_or_default();
            v.push(input.into());
            self.source_prefix_lists = Some(v);
            self
        }
        /// <p>The source prefix lists.</p>
        pub fn set_source_prefix_lists(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.source_prefix_lists = input;
            self
        }
        /// Appends an item to `destination_prefix_lists`.
        ///
        /// To override the contents of this collection use [`set_destination_prefix_lists`](Self::set_destination_prefix_lists).
        ///
        /// <p>The destination prefix lists.</p>
        pub fn destination_prefix_lists(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.destination_prefix_lists.unwrap_or_default();
            v.push(input.into());
            self.destination_prefix_lists = Some(v);
            self
        }
        /// <p>The destination prefix lists.</p>
        pub fn set_destination_prefix_lists(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.destination_prefix_lists = input;
            self
        }
        /// Appends an item to `protocols`.
        ///
        /// To override the contents of this collection use [`set_protocols`](Self::set_protocols).
        ///
        /// <p>The protocols.</p>
        pub fn protocols(mut self, input: crate::model::Protocol) -> Self {
            let mut v = self.protocols.unwrap_or_default();
            v.push(input);
            self.protocols = Some(v);
            self
        }
        /// <p>The protocols.</p>
        pub fn set_protocols(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Protocol>>,
        ) -> Self {
            self.protocols = input;
            self
        }
        /// Consumes the builder and constructs a [`PacketHeaderStatementRequest`](crate::model::PacketHeaderStatementRequest).
        pub fn build(self) -> crate::model::PacketHeaderStatementRequest {
            crate::model::PacketHeaderStatementRequest {
                source_addresses: self.source_addresses,
                destination_addresses: self.destination_addresses,
                source_ports: self.source_ports,
                destination_ports: self.destination_ports,
                source_prefix_lists: self.source_prefix_lists,
                destination_prefix_lists: self.destination_prefix_lists,
                protocols: self.protocols,
            }
        }
    }
}
impl PacketHeaderStatementRequest {
    /// Creates a new builder-style object to manufacture [`PacketHeaderStatementRequest`](crate::model::PacketHeaderStatementRequest).
    pub fn builder() -> crate::model::packet_header_statement_request::Builder {
        crate::model::packet_header_statement_request::Builder::default()
    }
}

/// <p>The error codes and error messages that are returned for the parameters or parameter combinations that are not valid when a new launch template or new version of a launch template is created.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ValidationWarning {
    /// <p>The error codes and error messages.</p>
    #[doc(hidden)]
    pub errors: std::option::Option<std::vec::Vec<crate::model::ValidationError>>,
}
impl ValidationWarning {
    /// <p>The error codes and error messages.</p>
    pub fn errors(&self) -> std::option::Option<&[crate::model::ValidationError]> {
        self.errors.as_deref()
    }
}
/// See [`ValidationWarning`](crate::model::ValidationWarning).
pub mod validation_warning {

    /// A builder for [`ValidationWarning`](crate::model::ValidationWarning).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) errors: std::option::Option<std::vec::Vec<crate::model::ValidationError>>,
    }
    impl Builder {
        /// Appends an item to `errors`.
        ///
        /// To override the contents of this collection use [`set_errors`](Self::set_errors).
        ///
        /// <p>The error codes and error messages.</p>
        pub fn errors(mut self, input: crate::model::ValidationError) -> Self {
            let mut v = self.errors.unwrap_or_default();
            v.push(input);
            self.errors = Some(v);
            self
        }
        /// <p>The error codes and error messages.</p>
        pub fn set_errors(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::ValidationError>>,
        ) -> Self {
            self.errors = input;
            self
        }
        /// Consumes the builder and constructs a [`ValidationWarning`](crate::model::ValidationWarning).
        pub fn build(self) -> crate::model::ValidationWarning {
            crate::model::ValidationWarning {
                errors: self.errors,
            }
        }
    }
}
impl ValidationWarning {
    /// Creates a new builder-style object to manufacture [`ValidationWarning`](crate::model::ValidationWarning).
    pub fn builder() -> crate::model::validation_warning::Builder {
        crate::model::validation_warning::Builder::default()
    }
}

/// <p>The error code and error message that is returned for a parameter or parameter combination that is not valid when a new launch template or new version of a launch template is created.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ValidationError {
    /// <p>The error code that indicates why the parameter or parameter combination is not valid. For more information about error codes, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/errors-overview.html">Error codes</a>.</p>
    #[doc(hidden)]
    pub code: std::option::Option<std::string::String>,
    /// <p>The error message that describes why the parameter or parameter combination is not valid. For more information about error messages, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/errors-overview.html">Error codes</a>.</p>
    #[doc(hidden)]
    pub message: std::option::Option<std::string::String>,
}
impl ValidationError {
    /// <p>The error code that indicates why the parameter or parameter combination is not valid. For more information about error codes, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/errors-overview.html">Error codes</a>.</p>
    pub fn code(&self) -> std::option::Option<&str> {
        self.code.as_deref()
    }
    /// <p>The error message that describes why the parameter or parameter combination is not valid. For more information about error messages, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/errors-overview.html">Error codes</a>.</p>
    pub fn message(&self) -> std::option::Option<&str> {
        self.message.as_deref()
    }
}
/// See [`ValidationError`](crate::model::ValidationError).
pub mod validation_error {

    /// A builder for [`ValidationError`](crate::model::ValidationError).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) code: std::option::Option<std::string::String>,
        pub(crate) message: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The error code that indicates why the parameter or parameter combination is not valid. For more information about error codes, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/errors-overview.html">Error codes</a>.</p>
        pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
            self.code = Some(input.into());
            self
        }
        /// <p>The error code that indicates why the parameter or parameter combination is not valid. For more information about error codes, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/errors-overview.html">Error codes</a>.</p>
        pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.code = input;
            self
        }
        /// <p>The error message that describes why the parameter or parameter combination is not valid. For more information about error messages, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/errors-overview.html">Error codes</a>.</p>
        pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
            self.message = Some(input.into());
            self
        }
        /// <p>The error message that describes why the parameter or parameter combination is not valid. For more information about error messages, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/errors-overview.html">Error codes</a>.</p>
        pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.message = input;
            self
        }
        /// Consumes the builder and constructs a [`ValidationError`](crate::model::ValidationError).
        pub fn build(self) -> crate::model::ValidationError {
            crate::model::ValidationError {
                code: self.code,
                message: self.message,
            }
        }
    }
}
impl ValidationError {
    /// Creates a new builder-style object to manufacture [`ValidationError`](crate::model::ValidationError).
    pub fn builder() -> crate::model::validation_error::Builder {
        crate::model::validation_error::Builder::default()
    }
}

/// <p>The information to include in the launch template.</p> <note>
/// <p>You must specify at least one parameter for the launch template data.</p>
/// </note>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct RequestLaunchTemplateData {
    /// <p>The ID of the kernel.</p> <important>
    /// <p>We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedkernels.html">User provided kernels</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
    /// </important>
    #[doc(hidden)]
    pub kernel_id: std::option::Option<std::string::String>,
    /// <p>Indicates whether the instance is optimized for Amazon EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal Amazon EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS-optimized instance.</p>
    #[doc(hidden)]
    pub ebs_optimized: std::option::Option<bool>,
    /// <p>The name or Amazon Resource Name (ARN) of an IAM instance profile.</p>
    #[doc(hidden)]
    pub iam_instance_profile:
        std::option::Option<crate::model::LaunchTemplateIamInstanceProfileSpecificationRequest>,
    /// <p>The block device mapping.</p>
    #[doc(hidden)]
    pub block_device_mappings:
        std::option::Option<std::vec::Vec<crate::model::LaunchTemplateBlockDeviceMappingRequest>>,
    /// <p>One or more network interfaces. If you specify a network interface, you must specify any security groups and subnets as part of the network interface.</p>
    #[doc(hidden)]
    pub network_interfaces: std::option::Option<
        std::vec::Vec<crate::model::LaunchTemplateInstanceNetworkInterfaceSpecificationRequest>,
    >,
    /// <p>The ID of the AMI. Alternatively, you can specify a Systems Manager parameter, which will resolve to an AMI ID on launch.</p>
    /// <p>Valid formats:</p>
    /// <ul>
    /// <li> <p> <code>ami-17characters00000</code> </p> </li>
    /// <li> <p> <code>resolve:ssm:parameter-name</code> </p> </li>
    /// <li> <p> <code>resolve:ssm:parameter-name:version-number</code> </p> </li>
    /// <li> <p> <code>resolve:ssm:parameter-name:label</code> </p> </li>
    /// </ul>
    /// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html#use-an-ssm-parameter-instead-of-an-ami-id">Use a Systems Manager parameter instead of an AMI ID</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
    #[doc(hidden)]
    pub image_id: std::option::Option<std::string::String>,
    /// <p>The instance type. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html">Instance types</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
    /// <p>If you specify <code>InstanceType</code>, you can't specify <code>InstanceRequirements</code>.</p>
    #[doc(hidden)]
    pub instance_type: std::option::Option<crate::model::InstanceType>,
    /// <p>The name of the key pair. You can create a key pair using <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateKeyPair.html">CreateKeyPair</a> or <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ImportKeyPair.html">ImportKeyPair</a>.</p> <important>
    /// <p>If you do not specify a key pair, you can't connect to the instance unless you choose an AMI that is configured to allow users another way to log in.</p>
    /// </important>
    #[doc(hidden)]
    pub key_name: std::option::Option<std::string::String>,
    /// <p>The monitoring for the instance.</p>
    #[doc(hidden)]
    pub monitoring: std::option::Option<crate::model::LaunchTemplatesMonitoringRequest>,
    /// <p>The placement for the instance.</p>
    #[doc(hidden)]
    pub placement: std::option::Option<crate::model::LaunchTemplatePlacementRequest>,
    /// <p>The ID of the RAM disk.</p> <important>
    /// <p>We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedkernels.html">User provided kernels</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
    /// </important>
    #[doc(hidden)]
    pub ram_disk_id: std::option::Option<std::string::String>,
    /// <p>If you set this parameter to <code>true</code>, you can't terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can. To change this attribute after launch, use <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifyInstanceAttribute.html">ModifyInstanceAttribute</a>. Alternatively, if you set <code>InstanceInitiatedShutdownBehavior</code> to <code>terminate</code>, you can terminate the instance by running the shutdown command from the instance.</p>
    #[doc(hidden)]
    pub disable_api_termination: std::option::Option<bool>,
    /// <p>Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).</p>
    /// <p>Default: <code>stop</code> </p>
    #[doc(hidden)]
    pub instance_initiated_shutdown_behavior: std::option::Option<crate::model::ShutdownBehavior>,
    /// <p>The user data to make available to the instance. You must provide base64-encoded text. User data is limited to 16 KB. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html">Run commands on your Linux instance at launch</a> (Linux) or <a href="https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/instancedata-add-user-data.html">Work with instance user data</a> (Windows) in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
    /// <p>If you are creating the launch template for use with Batch, the user data must be provided in the <a href="https://cloudinit.readthedocs.io/en/latest/topics/format.html#mime-multi-part-archive"> MIME multi-part archive format</a>. For more information, see <a href="https://docs.aws.amazon.com/batch/latest/userguide/launch-templates.html">Amazon EC2 user data in launch templates</a> in the <i>Batch User Guide</i>.</p>
    #[doc(hidden)]
    pub user_data: std::option::Option<std::string::String>,
    /// <p>The tags to apply to the resources that are created during instance launch.</p>
    /// <p>You can specify tags for the following resources only:</p>
    /// <ul>
    /// <li> <p>Instances</p> </li>
    /// <li> <p>Volumes</p> </li>
    /// <li> <p>Elastic graphics</p> </li>
    /// <li> <p>Spot Instance requests</p> </li>
    /// <li> <p>Network interfaces</p> </li>
    /// </ul>
    /// <p>To tag a resource after it has been created, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTags.html">CreateTags</a>.</p> <note>
    /// <p>To tag the launch template itself, you must use the <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateLaunchTemplate.html">TagSpecification</a> parameter.</p>
    /// </note>
    #[doc(hidden)]
    pub tag_specifications:
        std::option::Option<std::vec::Vec<crate::model::LaunchTemplateTagSpecificationRequest>>,
    /// <p>An elastic GPU to associate with the instance.</p>
    #[doc(hidden)]
    pub elastic_gpu_specifications:
        std::option::Option<std::vec::Vec<crate::model::ElasticGpuSpecification>>,
    /// <p> The elastic inference accelerator for the instance. </p>
    #[doc(hidden)]
    pub elastic_inference_accelerators:
        std::option::Option<std::vec::Vec<crate::model::LaunchTemplateElasticInferenceAccelerator>>,
    /// <p>One or more security group IDs. You can create a security group using <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateSecurityGroup.html">CreateSecurityGroup</a>. You cannot specify both a security group ID and security name in the same request.</p>
    #[doc(hidden)]
    pub security_group_ids: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>One or more security group names. For a nondefault VPC, you must use security group IDs instead. You cannot specify both a security group ID and security name in the same request.</p>
    #[doc(hidden)]
    pub security_groups: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>The market (purchasing) option for the instances.</p>
    #[doc(hidden)]
    pub instance_market_options:
        std::option::Option<crate::model::LaunchTemplateInstanceMarketOptionsRequest>,
    /// <p>The credit option for CPU usage of the instance. Valid only for T instances.</p>
    #[doc(hidden)]
    pub credit_specification: std::option::Option<crate::model::CreditSpecificationRequest>,
    /// <p>The CPU options for the instance. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html">Optimizing CPU Options</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
    #[doc(hidden)]
    pub cpu_options: std::option::Option<crate::model::LaunchTemplateCpuOptionsRequest>,
    /// <p>The Capacity Reservation targeting option. If you do not specify this parameter, the instance's Capacity Reservation preference defaults to <code>open</code>, which enables it to run in any open Capacity Reservation that has matching attributes (instance type, platform, Availability Zone).</p>
    #[doc(hidden)]
    pub capacity_reservation_specification:
        std::option::Option<crate::model::LaunchTemplateCapacityReservationSpecificationRequest>,
    /// <p>The license configurations.</p>
    #[doc(hidden)]
    pub license_specifications:
        std::option::Option<std::vec::Vec<crate::model::LaunchTemplateLicenseConfigurationRequest>>,
    /// <p>Indicates whether an instance is enabled for hibernation. This parameter is valid only if the instance meets the <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/hibernating-prerequisites.html">hibernation prerequisites</a>. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html">Hibernate your instance</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
    #[doc(hidden)]
    pub hibernation_options:
        std::option::Option<crate::model::LaunchTemplateHibernationOptionsRequest>,
    /// <p>The metadata options for the instance. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html">Instance metadata and user data</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
    #[doc(hidden)]
    pub metadata_options:
        std::option::Option<crate::model::LaunchTemplateInstanceMetadataOptionsRequest>,
    /// <p>Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves. For more information, see <a href="https://docs.aws.amazon.com/enclaves/latest/user/nitro-enclave.html"> What is Amazon Web Services Nitro Enclaves?</a> in the <i>Amazon Web Services Nitro Enclaves User Guide</i>.</p>
    /// <p>You can't enable Amazon Web Services Nitro Enclaves and hibernation on the same instance.</p>
    #[doc(hidden)]
    pub enclave_options: std::option::Option<crate::model::LaunchTemplateEnclaveOptionsRequest>,
    /// <p>The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with these attributes.</p>
    /// <p>If you specify <code>InstanceRequirements</code>, you can't specify <code>InstanceType</code>.</p>
    #[doc(hidden)]
    pub instance_requirements: std::option::Option<crate::model::InstanceRequirementsRequest>,
    /// <p>The options for the instance hostname. The default values are inherited from the subnet.</p>
    #[doc(hidden)]
    pub private_dns_name_options:
        std::option::Option<crate::model::LaunchTemplatePrivateDnsNameOptionsRequest>,
    /// <p>The maintenance options for the instance.</p>
    #[doc(hidden)]
    pub maintenance_options:
        std::option::Option<crate::model::LaunchTemplateInstanceMaintenanceOptionsRequest>,
    /// <p>Indicates whether to enable the instance for stop protection. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Stop_Start.html#Using_StopProtection">Stop protection</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
    #[doc(hidden)]
    pub disable_api_stop: std::option::Option<bool>,
}
impl RequestLaunchTemplateData {
    /// <p>The ID of the kernel.</p> <important>
    /// <p>We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedkernels.html">User provided kernels</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
    /// </important>
    pub fn kernel_id(&self) -> std::option::Option<&str> {
        self.kernel_id.as_deref()
    }
    /// <p>Indicates whether the instance is optimized for Amazon EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal Amazon EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS-optimized instance.</p>
    pub fn ebs_optimized(&self) -> std::option::Option<bool> {
        self.ebs_optimized
    }
    /// <p>The name or Amazon Resource Name (ARN) of an IAM instance profile.</p>
    pub fn iam_instance_profile(
        &self,
    ) -> std::option::Option<&crate::model::LaunchTemplateIamInstanceProfileSpecificationRequest>
    {
        self.iam_instance_profile.as_ref()
    }
    /// <p>The block device mapping.</p>
    pub fn block_device_mappings(
        &self,
    ) -> std::option::Option<&[crate::model::LaunchTemplateBlockDeviceMappingRequest]> {
        self.block_device_mappings.as_deref()
    }
    /// <p>One or more network interfaces. If you specify a network interface, you must specify any security groups and subnets as part of the network interface.</p>
    pub fn network_interfaces(
        &self,
    ) -> std::option::Option<
        &[crate::model::LaunchTemplateInstanceNetworkInterfaceSpecificationRequest],
    > {
        self.network_interfaces.as_deref()
    }
    /// <p>The ID of the AMI. Alternatively, you can specify a Systems Manager parameter, which will resolve to an AMI ID on launch.</p>
    /// <p>Valid formats:</p>
    /// <ul>
    /// <li> <p> <code>ami-17characters00000</code> </p> </li>
    /// <li> <p> <code>resolve:ssm:parameter-name</code> </p> </li>
    /// <li> <p> <code>resolve:ssm:parameter-name:version-number</code> </p> </li>
    /// <li> <p> <code>resolve:ssm:parameter-name:label</code> </p> </li>
    /// </ul>
    /// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html#use-an-ssm-parameter-instead-of-an-ami-id">Use a Systems Manager parameter instead of an AMI ID</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
    pub fn image_id(&self) -> std::option::Option<&str> {
        self.image_id.as_deref()
    }
    /// <p>The instance type. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html">Instance types</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
    /// <p>If you specify <code>InstanceType</code>, you can't specify <code>InstanceRequirements</code>.</p>
    pub fn instance_type(&self) -> std::option::Option<&crate::model::InstanceType> {
        self.instance_type.as_ref()
    }
    /// <p>The name of the key pair. You can create a key pair using <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateKeyPair.html">CreateKeyPair</a> or <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ImportKeyPair.html">ImportKeyPair</a>.</p> <important>
    /// <p>If you do not specify a key pair, you can't connect to the instance unless you choose an AMI that is configured to allow users another way to log in.</p>
    /// </important>
    pub fn key_name(&self) -> std::option::Option<&str> {
        self.key_name.as_deref()
    }
    /// <p>The monitoring for the instance.</p>
    pub fn monitoring(
        &self,
    ) -> std::option::Option<&crate::model::LaunchTemplatesMonitoringRequest> {
        self.monitoring.as_ref()
    }
    /// <p>The placement for the instance.</p>
    pub fn placement(&self) -> std::option::Option<&crate::model::LaunchTemplatePlacementRequest> {
        self.placement.as_ref()
    }
    /// <p>The ID of the RAM disk.</p> <important>
    /// <p>We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedkernels.html">User provided kernels</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
    /// </important>
    pub fn ram_disk_id(&self) -> std::option::Option<&str> {
        self.ram_disk_id.as_deref()
    }
    /// <p>If you set this parameter to <code>true</code>, you can't terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can. To change this attribute after launch, use <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifyInstanceAttribute.html">ModifyInstanceAttribute</a>. Alternatively, if you set <code>InstanceInitiatedShutdownBehavior</code> to <code>terminate</code>, you can terminate the instance by running the shutdown command from the instance.</p>
    pub fn disable_api_termination(&self) -> std::option::Option<bool> {
        self.disable_api_termination
    }
    /// <p>Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).</p>
    /// <p>Default: <code>stop</code> </p>
    pub fn instance_initiated_shutdown_behavior(
        &self,
    ) -> std::option::Option<&crate::model::ShutdownBehavior> {
        self.instance_initiated_shutdown_behavior.as_ref()
    }
    /// <p>The user data to make available to the instance. You must provide base64-encoded text. User data is limited to 16 KB. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html">Run commands on your Linux instance at launch</a> (Linux) or <a href="https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/instancedata-add-user-data.html">Work with instance user data</a> (Windows) in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
    /// <p>If you are creating the launch template for use with Batch, the user data must be provided in the <a href="https://cloudinit.readthedocs.io/en/latest/topics/format.html#mime-multi-part-archive"> MIME multi-part archive format</a>. For more information, see <a href="https://docs.aws.amazon.com/batch/latest/userguide/launch-templates.html">Amazon EC2 user data in launch templates</a> in the <i>Batch User Guide</i>.</p>
    pub fn user_data(&self) -> std::option::Option<&str> {
        self.user_data.as_deref()
    }
    /// <p>The tags to apply to the resources that are created during instance launch.</p>
    /// <p>You can specify tags for the following resources only:</p>
    /// <ul>
    /// <li> <p>Instances</p> </li>
    /// <li> <p>Volumes</p> </li>
    /// <li> <p>Elastic graphics</p> </li>
    /// <li> <p>Spot Instance requests</p> </li>
    /// <li> <p>Network interfaces</p> </li>
    /// </ul>
    /// <p>To tag a resource after it has been created, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTags.html">CreateTags</a>.</p> <note>
    /// <p>To tag the launch template itself, you must use the <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateLaunchTemplate.html">TagSpecification</a> parameter.</p>
    /// </note>
    pub fn tag_specifications(
        &self,
    ) -> std::option::Option<&[crate::model::LaunchTemplateTagSpecificationRequest]> {
        self.tag_specifications.as_deref()
    }
    /// <p>An elastic GPU to associate with the instance.</p>
    pub fn elastic_gpu_specifications(
        &self,
    ) -> std::option::Option<&[crate::model::ElasticGpuSpecification]> {
        self.elastic_gpu_specifications.as_deref()
    }
    /// <p> The elastic inference accelerator for the instance. </p>
    pub fn elastic_inference_accelerators(
        &self,
    ) -> std::option::Option<&[crate::model::LaunchTemplateElasticInferenceAccelerator]> {
        self.elastic_inference_accelerators.as_deref()
    }
    /// <p>One or more security group IDs. You can create a security group using <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateSecurityGroup.html">CreateSecurityGroup</a>. You cannot specify both a security group ID and security name in the same request.</p>
    pub fn security_group_ids(&self) -> std::option::Option<&[std::string::String]> {
        self.security_group_ids.as_deref()
    }
    /// <p>One or more security group names. For a nondefault VPC, you must use security group IDs instead. You cannot specify both a security group ID and security name in the same request.</p>
    pub fn security_groups(&self) -> std::option::Option<&[std::string::String]> {
        self.security_groups.as_deref()
    }
    /// <p>The market (purchasing) option for the instances.</p>
    pub fn instance_market_options(
        &self,
    ) -> std::option::Option<&crate::model::LaunchTemplateInstanceMarketOptionsRequest> {
        self.instance_market_options.as_ref()
    }
    /// <p>The credit option for CPU usage of the instance. Valid only for T instances.</p>
    pub fn credit_specification(
        &self,
    ) -> std::option::Option<&crate::model::CreditSpecificationRequest> {
        self.credit_specification.as_ref()
    }
    /// <p>The CPU options for the instance. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html">Optimizing CPU Options</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
    pub fn cpu_options(
        &self,
    ) -> std::option::Option<&crate::model::LaunchTemplateCpuOptionsRequest> {
        self.cpu_options.as_ref()
    }
    /// <p>The Capacity Reservation targeting option. If you do not specify this parameter, the instance's Capacity Reservation preference defaults to <code>open</code>, which enables it to run in any open Capacity Reservation that has matching attributes (instance type, platform, Availability Zone).</p>
    pub fn capacity_reservation_specification(
        &self,
    ) -> std::option::Option<&crate::model::LaunchTemplateCapacityReservationSpecificationRequest>
    {
        self.capacity_reservation_specification.as_ref()
    }
    /// <p>The license configurations.</p>
    pub fn license_specifications(
        &self,
    ) -> std::option::Option<&[crate::model::LaunchTemplateLicenseConfigurationRequest]> {
        self.license_specifications.as_deref()
    }
    /// <p>Indicates whether an instance is enabled for hibernation. This parameter is valid only if the instance meets the <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/hibernating-prerequisites.html">hibernation prerequisites</a>. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html">Hibernate your instance</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
    pub fn hibernation_options(
        &self,
    ) -> std::option::Option<&crate::model::LaunchTemplateHibernationOptionsRequest> {
        self.hibernation_options.as_ref()
    }
    /// <p>The metadata options for the instance. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html">Instance metadata and user data</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
    pub fn metadata_options(
        &self,
    ) -> std::option::Option<&crate::model::LaunchTemplateInstanceMetadataOptionsRequest> {
        self.metadata_options.as_ref()
    }
    /// <p>Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves. For more information, see <a href="https://docs.aws.amazon.com/enclaves/latest/user/nitro-enclave.html"> What is Amazon Web Services Nitro Enclaves?</a> in the <i>Amazon Web Services Nitro Enclaves User Guide</i>.</p>
    /// <p>You can't enable Amazon Web Services Nitro Enclaves and hibernation on the same instance.</p>
    pub fn enclave_options(
        &self,
    ) -> std::option::Option<&crate::model::LaunchTemplateEnclaveOptionsRequest> {
        self.enclave_options.as_ref()
    }
    /// <p>The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with these attributes.</p>
    /// <p>If you specify <code>InstanceRequirements</code>, you can't specify <code>InstanceType</code>.</p>
    pub fn instance_requirements(
        &self,
    ) -> std::option::Option<&crate::model::InstanceRequirementsRequest> {
        self.instance_requirements.as_ref()
    }
    /// <p>The options for the instance hostname. The default values are inherited from the subnet.</p>
    pub fn private_dns_name_options(
        &self,
    ) -> std::option::Option<&crate::model::LaunchTemplatePrivateDnsNameOptionsRequest> {
        self.private_dns_name_options.as_ref()
    }
    /// <p>The maintenance options for the instance.</p>
    pub fn maintenance_options(
        &self,
    ) -> std::option::Option<&crate::model::LaunchTemplateInstanceMaintenanceOptionsRequest> {
        self.maintenance_options.as_ref()
    }
    /// <p>Indicates whether to enable the instance for stop protection. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Stop_Start.html#Using_StopProtection">Stop protection</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
    pub fn disable_api_stop(&self) -> std::option::Option<bool> {
        self.disable_api_stop
    }
}
impl std::fmt::Debug for RequestLaunchTemplateData {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("RequestLaunchTemplateData");
        formatter.field("kernel_id", &"*** Sensitive Data Redacted ***");
        formatter.field("ebs_optimized", &"*** Sensitive Data Redacted ***");
        formatter.field("iam_instance_profile", &"*** Sensitive Data Redacted ***");
        formatter.field("block_device_mappings", &"*** Sensitive Data Redacted ***");
        formatter.field("network_interfaces", &"*** Sensitive Data Redacted ***");
        formatter.field("image_id", &"*** Sensitive Data Redacted ***");
        formatter.field("instance_type", &"*** Sensitive Data Redacted ***");
        formatter.field("key_name", &"*** Sensitive Data Redacted ***");
        formatter.field("monitoring", &"*** Sensitive Data Redacted ***");
        formatter.field("placement", &"*** Sensitive Data Redacted ***");
        formatter.field("ram_disk_id", &"*** Sensitive Data Redacted ***");
        formatter.field(
            "disable_api_termination",
            &"*** Sensitive Data Redacted ***",
        );
        formatter.field(
            "instance_initiated_shutdown_behavior",
            &"*** Sensitive Data Redacted ***",
        );
        formatter.field("user_data", &"*** Sensitive Data Redacted ***");
        formatter.field("tag_specifications", &"*** Sensitive Data Redacted ***");
        formatter.field(
            "elastic_gpu_specifications",
            &"*** Sensitive Data Redacted ***",
        );
        formatter.field(
            "elastic_inference_accelerators",
            &"*** Sensitive Data Redacted ***",
        );
        formatter.field("security_group_ids", &"*** Sensitive Data Redacted ***");
        formatter.field("security_groups", &"*** Sensitive Data Redacted ***");
        formatter.field(
            "instance_market_options",
            &"*** Sensitive Data Redacted ***",
        );
        formatter.field("credit_specification", &"*** Sensitive Data Redacted ***");
        formatter.field("cpu_options", &"*** Sensitive Data Redacted ***");
        formatter.field(
            "capacity_reservation_specification",
            &"*** Sensitive Data Redacted ***",
        );
        formatter.field("license_specifications", &"*** Sensitive Data Redacted ***");
        formatter.field("hibernation_options", &"*** Sensitive Data Redacted ***");
        formatter.field("metadata_options", &"*** Sensitive Data Redacted ***");
        formatter.field("enclave_options", &"*** Sensitive Data Redacted ***");
        formatter.field("instance_requirements", &"*** Sensitive Data Redacted ***");
        formatter.field(
            "private_dns_name_options",
            &"*** Sensitive Data Redacted ***",
        );
        formatter.field("maintenance_options", &"*** Sensitive Data Redacted ***");
        formatter.field("disable_api_stop", &"*** Sensitive Data Redacted ***");
        formatter.finish()
    }
}
/// See [`RequestLaunchTemplateData`](crate::model::RequestLaunchTemplateData).
pub mod request_launch_template_data {

    /// A builder for [`RequestLaunchTemplateData`](crate::model::RequestLaunchTemplateData).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default)]
    pub struct Builder {
        pub(crate) kernel_id: std::option::Option<std::string::String>,
        pub(crate) ebs_optimized: std::option::Option<bool>,
        pub(crate) iam_instance_profile:
            std::option::Option<crate::model::LaunchTemplateIamInstanceProfileSpecificationRequest>,
        pub(crate) block_device_mappings: std::option::Option<
            std::vec::Vec<crate::model::LaunchTemplateBlockDeviceMappingRequest>,
        >,
        pub(crate) network_interfaces: std::option::Option<
            std::vec::Vec<crate::model::LaunchTemplateInstanceNetworkInterfaceSpecificationRequest>,
        >,
        pub(crate) image_id: std::option::Option<std::string::String>,
        pub(crate) instance_type: std::option::Option<crate::model::InstanceType>,
        pub(crate) key_name: std::option::Option<std::string::String>,
        pub(crate) monitoring: std::option::Option<crate::model::LaunchTemplatesMonitoringRequest>,
        pub(crate) placement: std::option::Option<crate::model::LaunchTemplatePlacementRequest>,
        pub(crate) ram_disk_id: std::option::Option<std::string::String>,
        pub(crate) disable_api_termination: std::option::Option<bool>,
        pub(crate) instance_initiated_shutdown_behavior:
            std::option::Option<crate::model::ShutdownBehavior>,
        pub(crate) user_data: std::option::Option<std::string::String>,
        pub(crate) tag_specifications:
            std::option::Option<std::vec::Vec<crate::model::LaunchTemplateTagSpecificationRequest>>,
        pub(crate) elastic_gpu_specifications:
            std::option::Option<std::vec::Vec<crate::model::ElasticGpuSpecification>>,
        pub(crate) elastic_inference_accelerators: std::option::Option<
            std::vec::Vec<crate::model::LaunchTemplateElasticInferenceAccelerator>,
        >,
        pub(crate) security_group_ids: std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) security_groups: std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) instance_market_options:
            std::option::Option<crate::model::LaunchTemplateInstanceMarketOptionsRequest>,
        pub(crate) credit_specification:
            std::option::Option<crate::model::CreditSpecificationRequest>,
        pub(crate) cpu_options: std::option::Option<crate::model::LaunchTemplateCpuOptionsRequest>,
        pub(crate) capacity_reservation_specification: std::option::Option<
            crate::model::LaunchTemplateCapacityReservationSpecificationRequest,
        >,
        pub(crate) license_specifications: std::option::Option<
            std::vec::Vec<crate::model::LaunchTemplateLicenseConfigurationRequest>,
        >,
        pub(crate) hibernation_options:
            std::option::Option<crate::model::LaunchTemplateHibernationOptionsRequest>,
        pub(crate) metadata_options:
            std::option::Option<crate::model::LaunchTemplateInstanceMetadataOptionsRequest>,
        pub(crate) enclave_options:
            std::option::Option<crate::model::LaunchTemplateEnclaveOptionsRequest>,
        pub(crate) instance_requirements:
            std::option::Option<crate::model::InstanceRequirementsRequest>,
        pub(crate) private_dns_name_options:
            std::option::Option<crate::model::LaunchTemplatePrivateDnsNameOptionsRequest>,
        pub(crate) maintenance_options:
            std::option::Option<crate::model::LaunchTemplateInstanceMaintenanceOptionsRequest>,
        pub(crate) disable_api_stop: std::option::Option<bool>,
    }
    impl Builder {
        /// <p>The ID of the kernel.</p> <important>
        /// <p>We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedkernels.html">User provided kernels</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
        /// </important>
        pub fn kernel_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.kernel_id = Some(input.into());
            self
        }
        /// <p>The ID of the kernel.</p> <important>
        /// <p>We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedkernels.html">User provided kernels</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
        /// </important>
        pub fn set_kernel_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.kernel_id = input;
            self
        }
        /// <p>Indicates whether the instance is optimized for Amazon EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal Amazon EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS-optimized instance.</p>
        pub fn ebs_optimized(mut self, input: bool) -> Self {
            self.ebs_optimized = Some(input);
            self
        }
        /// <p>Indicates whether the instance is optimized for Amazon EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal Amazon EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS-optimized instance.</p>
        pub fn set_ebs_optimized(mut self, input: std::option::Option<bool>) -> Self {
            self.ebs_optimized = input;
            self
        }
        /// <p>The name or Amazon Resource Name (ARN) of an IAM instance profile.</p>
        pub fn iam_instance_profile(
            mut self,
            input: crate::model::LaunchTemplateIamInstanceProfileSpecificationRequest,
        ) -> Self {
            self.iam_instance_profile = Some(input);
            self
        }
        /// <p>The name or Amazon Resource Name (ARN) of an IAM instance profile.</p>
        pub fn set_iam_instance_profile(
            mut self,
            input: std::option::Option<
                crate::model::LaunchTemplateIamInstanceProfileSpecificationRequest,
            >,
        ) -> Self {
            self.iam_instance_profile = input;
            self
        }
        /// Appends an item to `block_device_mappings`.
        ///
        /// To override the contents of this collection use [`set_block_device_mappings`](Self::set_block_device_mappings).
        ///
        /// <p>The block device mapping.</p>
        pub fn block_device_mappings(
            mut self,
            input: crate::model::LaunchTemplateBlockDeviceMappingRequest,
        ) -> Self {
            let mut v = self.block_device_mappings.unwrap_or_default();
            v.push(input);
            self.block_device_mappings = Some(v);
            self
        }
        /// <p>The block device mapping.</p>
        pub fn set_block_device_mappings(
            mut self,
            input: std::option::Option<
                std::vec::Vec<crate::model::LaunchTemplateBlockDeviceMappingRequest>,
            >,
        ) -> Self {
            self.block_device_mappings = input;
            self
        }
        /// Appends an item to `network_interfaces`.
        ///
        /// To override the contents of this collection use [`set_network_interfaces`](Self::set_network_interfaces).
        ///
        /// <p>One or more network interfaces. If you specify a network interface, you must specify any security groups and subnets as part of the network interface.</p>
        pub fn network_interfaces(
            mut self,
            input: crate::model::LaunchTemplateInstanceNetworkInterfaceSpecificationRequest,
        ) -> Self {
            let mut v = self.network_interfaces.unwrap_or_default();
            v.push(input);
            self.network_interfaces = Some(v);
            self
        }
        /// <p>One or more network interfaces. If you specify a network interface, you must specify any security groups and subnets as part of the network interface.</p>
        pub fn set_network_interfaces(
            mut self,
            input: std::option::Option<
                std::vec::Vec<
                    crate::model::LaunchTemplateInstanceNetworkInterfaceSpecificationRequest,
                >,
            >,
        ) -> Self {
            self.network_interfaces = input;
            self
        }
        /// <p>The ID of the AMI. Alternatively, you can specify a Systems Manager parameter, which will resolve to an AMI ID on launch.</p>
        /// <p>Valid formats:</p>
        /// <ul>
        /// <li> <p> <code>ami-17characters00000</code> </p> </li>
        /// <li> <p> <code>resolve:ssm:parameter-name</code> </p> </li>
        /// <li> <p> <code>resolve:ssm:parameter-name:version-number</code> </p> </li>
        /// <li> <p> <code>resolve:ssm:parameter-name:label</code> </p> </li>
        /// </ul>
        /// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html#use-an-ssm-parameter-instead-of-an-ami-id">Use a Systems Manager parameter instead of an AMI ID</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
        pub fn image_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.image_id = Some(input.into());
            self
        }
        /// <p>The ID of the AMI. Alternatively, you can specify a Systems Manager parameter, which will resolve to an AMI ID on launch.</p>
        /// <p>Valid formats:</p>
        /// <ul>
        /// <li> <p> <code>ami-17characters00000</code> </p> </li>
        /// <li> <p> <code>resolve:ssm:parameter-name</code> </p> </li>
        /// <li> <p> <code>resolve:ssm:parameter-name:version-number</code> </p> </li>
        /// <li> <p> <code>resolve:ssm:parameter-name:label</code> </p> </li>
        /// </ul>
        /// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html#use-an-ssm-parameter-instead-of-an-ami-id">Use a Systems Manager parameter instead of an AMI ID</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
        pub fn set_image_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.image_id = input;
            self
        }
        /// <p>The instance type. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html">Instance types</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
        /// <p>If you specify <code>InstanceType</code>, you can't specify <code>InstanceRequirements</code>.</p>
        pub fn instance_type(mut self, input: crate::model::InstanceType) -> Self {
            self.instance_type = Some(input);
            self
        }
        /// <p>The instance type. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html">Instance types</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
        /// <p>If you specify <code>InstanceType</code>, you can't specify <code>InstanceRequirements</code>.</p>
        pub fn set_instance_type(
            mut self,
            input: std::option::Option<crate::model::InstanceType>,
        ) -> Self {
            self.instance_type = input;
            self
        }
        /// <p>The name of the key pair. You can create a key pair using <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateKeyPair.html">CreateKeyPair</a> or <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ImportKeyPair.html">ImportKeyPair</a>.</p> <important>
        /// <p>If you do not specify a key pair, you can't connect to the instance unless you choose an AMI that is configured to allow users another way to log in.</p>
        /// </important>
        pub fn key_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.key_name = Some(input.into());
            self
        }
        /// <p>The name of the key pair. You can create a key pair using <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateKeyPair.html">CreateKeyPair</a> or <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ImportKeyPair.html">ImportKeyPair</a>.</p> <important>
        /// <p>If you do not specify a key pair, you can't connect to the instance unless you choose an AMI that is configured to allow users another way to log in.</p>
        /// </important>
        pub fn set_key_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.key_name = input;
            self
        }
        /// <p>The monitoring for the instance.</p>
        pub fn monitoring(mut self, input: crate::model::LaunchTemplatesMonitoringRequest) -> Self {
            self.monitoring = Some(input);
            self
        }
        /// <p>The monitoring for the instance.</p>
        pub fn set_monitoring(
            mut self,
            input: std::option::Option<crate::model::LaunchTemplatesMonitoringRequest>,
        ) -> Self {
            self.monitoring = input;
            self
        }
        /// <p>The placement for the instance.</p>
        pub fn placement(mut self, input: crate::model::LaunchTemplatePlacementRequest) -> Self {
            self.placement = Some(input);
            self
        }
        /// <p>The placement for the instance.</p>
        pub fn set_placement(
            mut self,
            input: std::option::Option<crate::model::LaunchTemplatePlacementRequest>,
        ) -> Self {
            self.placement = input;
            self
        }
        /// <p>The ID of the RAM disk.</p> <important>
        /// <p>We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedkernels.html">User provided kernels</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
        /// </important>
        pub fn ram_disk_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.ram_disk_id = Some(input.into());
            self
        }
        /// <p>The ID of the RAM disk.</p> <important>
        /// <p>We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedkernels.html">User provided kernels</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
        /// </important>
        pub fn set_ram_disk_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.ram_disk_id = input;
            self
        }
        /// <p>If you set this parameter to <code>true</code>, you can't terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can. To change this attribute after launch, use <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifyInstanceAttribute.html">ModifyInstanceAttribute</a>. Alternatively, if you set <code>InstanceInitiatedShutdownBehavior</code> to <code>terminate</code>, you can terminate the instance by running the shutdown command from the instance.</p>
        pub fn disable_api_termination(mut self, input: bool) -> Self {
            self.disable_api_termination = Some(input);
            self
        }
        /// <p>If you set this parameter to <code>true</code>, you can't terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can. To change this attribute after launch, use <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifyInstanceAttribute.html">ModifyInstanceAttribute</a>. Alternatively, if you set <code>InstanceInitiatedShutdownBehavior</code> to <code>terminate</code>, you can terminate the instance by running the shutdown command from the instance.</p>
        pub fn set_disable_api_termination(mut self, input: std::option::Option<bool>) -> Self {
            self.disable_api_termination = input;
            self
        }
        /// <p>Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).</p>
        /// <p>Default: <code>stop</code> </p>
        pub fn instance_initiated_shutdown_behavior(
            mut self,
            input: crate::model::ShutdownBehavior,
        ) -> Self {
            self.instance_initiated_shutdown_behavior = Some(input);
            self
        }
        /// <p>Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).</p>
        /// <p>Default: <code>stop</code> </p>
        pub fn set_instance_initiated_shutdown_behavior(
            mut self,
            input: std::option::Option<crate::model::ShutdownBehavior>,
        ) -> Self {
            self.instance_initiated_shutdown_behavior = input;
            self
        }
        /// <p>The user data to make available to the instance. You must provide base64-encoded text. User data is limited to 16 KB. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html">Run commands on your Linux instance at launch</a> (Linux) or <a href="https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/instancedata-add-user-data.html">Work with instance user data</a> (Windows) in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
        /// <p>If you are creating the launch template for use with Batch, the user data must be provided in the <a href="https://cloudinit.readthedocs.io/en/latest/topics/format.html#mime-multi-part-archive"> MIME multi-part archive format</a>. For more information, see <a href="https://docs.aws.amazon.com/batch/latest/userguide/launch-templates.html">Amazon EC2 user data in launch templates</a> in the <i>Batch User Guide</i>.</p>
        pub fn user_data(mut self, input: impl Into<std::string::String>) -> Self {
            self.user_data = Some(input.into());
            self
        }
        /// <p>The user data to make available to the instance. You must provide base64-encoded text. User data is limited to 16 KB. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html">Run commands on your Linux instance at launch</a> (Linux) or <a href="https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/instancedata-add-user-data.html">Work with instance user data</a> (Windows) in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
        /// <p>If you are creating the launch template for use with Batch, the user data must be provided in the <a href="https://cloudinit.readthedocs.io/en/latest/topics/format.html#mime-multi-part-archive"> MIME multi-part archive format</a>. For more information, see <a href="https://docs.aws.amazon.com/batch/latest/userguide/launch-templates.html">Amazon EC2 user data in launch templates</a> in the <i>Batch User Guide</i>.</p>
        pub fn set_user_data(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.user_data = input;
            self
        }
        /// Appends an item to `tag_specifications`.
        ///
        /// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
        ///
        /// <p>The tags to apply to the resources that are created during instance launch.</p>
        /// <p>You can specify tags for the following resources only:</p>
        /// <ul>
        /// <li> <p>Instances</p> </li>
        /// <li> <p>Volumes</p> </li>
        /// <li> <p>Elastic graphics</p> </li>
        /// <li> <p>Spot Instance requests</p> </li>
        /// <li> <p>Network interfaces</p> </li>
        /// </ul>
        /// <p>To tag a resource after it has been created, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTags.html">CreateTags</a>.</p> <note>
        /// <p>To tag the launch template itself, you must use the <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateLaunchTemplate.html">TagSpecification</a> parameter.</p>
        /// </note>
        pub fn tag_specifications(
            mut self,
            input: crate::model::LaunchTemplateTagSpecificationRequest,
        ) -> Self {
            let mut v = self.tag_specifications.unwrap_or_default();
            v.push(input);
            self.tag_specifications = Some(v);
            self
        }
        /// <p>The tags to apply to the resources that are created during instance launch.</p>
        /// <p>You can specify tags for the following resources only:</p>
        /// <ul>
        /// <li> <p>Instances</p> </li>
        /// <li> <p>Volumes</p> </li>
        /// <li> <p>Elastic graphics</p> </li>
        /// <li> <p>Spot Instance requests</p> </li>
        /// <li> <p>Network interfaces</p> </li>
        /// </ul>
        /// <p>To tag a resource after it has been created, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTags.html">CreateTags</a>.</p> <note>
        /// <p>To tag the launch template itself, you must use the <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateLaunchTemplate.html">TagSpecification</a> parameter.</p>
        /// </note>
        pub fn set_tag_specifications(
            mut self,
            input: std::option::Option<
                std::vec::Vec<crate::model::LaunchTemplateTagSpecificationRequest>,
            >,
        ) -> Self {
            self.tag_specifications = input;
            self
        }
        /// Appends an item to `elastic_gpu_specifications`.
        ///
        /// To override the contents of this collection use [`set_elastic_gpu_specifications`](Self::set_elastic_gpu_specifications).
        ///
        /// <p>An elastic GPU to associate with the instance.</p>
        pub fn elastic_gpu_specifications(
            mut self,
            input: crate::model::ElasticGpuSpecification,
        ) -> Self {
            let mut v = self.elastic_gpu_specifications.unwrap_or_default();
            v.push(input);
            self.elastic_gpu_specifications = Some(v);
            self
        }
        /// <p>An elastic GPU to associate with the instance.</p>
        pub fn set_elastic_gpu_specifications(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::ElasticGpuSpecification>>,
        ) -> Self {
            self.elastic_gpu_specifications = input;
            self
        }
        /// Appends an item to `elastic_inference_accelerators`.
        ///
        /// To override the contents of this collection use [`set_elastic_inference_accelerators`](Self::set_elastic_inference_accelerators).
        ///
        /// <p> The elastic inference accelerator for the instance. </p>
        pub fn elastic_inference_accelerators(
            mut self,
            input: crate::model::LaunchTemplateElasticInferenceAccelerator,
        ) -> Self {
            let mut v = self.elastic_inference_accelerators.unwrap_or_default();
            v.push(input);
            self.elastic_inference_accelerators = Some(v);
            self
        }
        /// <p> The elastic inference accelerator for the instance. </p>
        pub fn set_elastic_inference_accelerators(
            mut self,
            input: std::option::Option<
                std::vec::Vec<crate::model::LaunchTemplateElasticInferenceAccelerator>,
            >,
        ) -> Self {
            self.elastic_inference_accelerators = input;
            self
        }
        /// Appends an item to `security_group_ids`.
        ///
        /// To override the contents of this collection use [`set_security_group_ids`](Self::set_security_group_ids).
        ///
        /// <p>One or more security group IDs. You can create a security group using <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateSecurityGroup.html">CreateSecurityGroup</a>. You cannot specify both a security group ID and security name in the same request.</p>
        pub fn security_group_ids(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.security_group_ids.unwrap_or_default();
            v.push(input.into());
            self.security_group_ids = Some(v);
            self
        }
        /// <p>One or more security group IDs. You can create a security group using <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateSecurityGroup.html">CreateSecurityGroup</a>. You cannot specify both a security group ID and security name in the same request.</p>
        pub fn set_security_group_ids(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.security_group_ids = input;
            self
        }
        /// Appends an item to `security_groups`.
        ///
        /// To override the contents of this collection use [`set_security_groups`](Self::set_security_groups).
        ///
        /// <p>One or more security group names. For a nondefault VPC, you must use security group IDs instead. You cannot specify both a security group ID and security name in the same request.</p>
        pub fn security_groups(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.security_groups.unwrap_or_default();
            v.push(input.into());
            self.security_groups = Some(v);
            self
        }
        /// <p>One or more security group names. For a nondefault VPC, you must use security group IDs instead. You cannot specify both a security group ID and security name in the same request.</p>
        pub fn set_security_groups(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.security_groups = input;
            self
        }
        /// <p>The market (purchasing) option for the instances.</p>
        pub fn instance_market_options(
            mut self,
            input: crate::model::LaunchTemplateInstanceMarketOptionsRequest,
        ) -> Self {
            self.instance_market_options = Some(input);
            self
        }
        /// <p>The market (purchasing) option for the instances.</p>
        pub fn set_instance_market_options(
            mut self,
            input: std::option::Option<crate::model::LaunchTemplateInstanceMarketOptionsRequest>,
        ) -> Self {
            self.instance_market_options = input;
            self
        }
        /// <p>The credit option for CPU usage of the instance. Valid only for T instances.</p>
        pub fn credit_specification(
            mut self,
            input: crate::model::CreditSpecificationRequest,
        ) -> Self {
            self.credit_specification = Some(input);
            self
        }
        /// <p>The credit option for CPU usage of the instance. Valid only for T instances.</p>
        pub fn set_credit_specification(
            mut self,
            input: std::option::Option<crate::model::CreditSpecificationRequest>,
        ) -> Self {
            self.credit_specification = input;
            self
        }
        /// <p>The CPU options for the instance. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html">Optimizing CPU Options</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
        pub fn cpu_options(mut self, input: crate::model::LaunchTemplateCpuOptionsRequest) -> Self {
            self.cpu_options = Some(input);
            self
        }
        /// <p>The CPU options for the instance. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html">Optimizing CPU Options</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
        pub fn set_cpu_options(
            mut self,
            input: std::option::Option<crate::model::LaunchTemplateCpuOptionsRequest>,
        ) -> Self {
            self.cpu_options = input;
            self
        }
        /// <p>The Capacity Reservation targeting option. If you do not specify this parameter, the instance's Capacity Reservation preference defaults to <code>open</code>, which enables it to run in any open Capacity Reservation that has matching attributes (instance type, platform, Availability Zone).</p>
        pub fn capacity_reservation_specification(
            mut self,
            input: crate::model::LaunchTemplateCapacityReservationSpecificationRequest,
        ) -> Self {
            self.capacity_reservation_specification = Some(input);
            self
        }
        /// <p>The Capacity Reservation targeting option. If you do not specify this parameter, the instance's Capacity Reservation preference defaults to <code>open</code>, which enables it to run in any open Capacity Reservation that has matching attributes (instance type, platform, Availability Zone).</p>
        pub fn set_capacity_reservation_specification(
            mut self,
            input: std::option::Option<
                crate::model::LaunchTemplateCapacityReservationSpecificationRequest,
            >,
        ) -> Self {
            self.capacity_reservation_specification = input;
            self
        }
        /// Appends an item to `license_specifications`.
        ///
        /// To override the contents of this collection use [`set_license_specifications`](Self::set_license_specifications).
        ///
        /// <p>The license configurations.</p>
        pub fn license_specifications(
            mut self,
            input: crate::model::LaunchTemplateLicenseConfigurationRequest,
        ) -> Self {
            let mut v = self.license_specifications.unwrap_or_default();
            v.push(input);
            self.license_specifications = Some(v);
            self
        }
        /// <p>The license configurations.</p>
        pub fn set_license_specifications(
            mut self,
            input: std::option::Option<
                std::vec::Vec<crate::model::LaunchTemplateLicenseConfigurationRequest>,
            >,
        ) -> Self {
            self.license_specifications = input;
            self
        }
        /// <p>Indicates whether an instance is enabled for hibernation. This parameter is valid only if the instance meets the <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/hibernating-prerequisites.html">hibernation prerequisites</a>. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html">Hibernate your instance</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
        pub fn hibernation_options(
            mut self,
            input: crate::model::LaunchTemplateHibernationOptionsRequest,
        ) -> Self {
            self.hibernation_options = Some(input);
            self
        }
        /// <p>Indicates whether an instance is enabled for hibernation. This parameter is valid only if the instance meets the <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/hibernating-prerequisites.html">hibernation prerequisites</a>. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html">Hibernate your instance</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
        pub fn set_hibernation_options(
            mut self,
            input: std::option::Option<crate::model::LaunchTemplateHibernationOptionsRequest>,
        ) -> Self {
            self.hibernation_options = input;
            self
        }
        /// <p>The metadata options for the instance. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html">Instance metadata and user data</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
        pub fn metadata_options(
            mut self,
            input: crate::model::LaunchTemplateInstanceMetadataOptionsRequest,
        ) -> Self {
            self.metadata_options = Some(input);
            self
        }
        /// <p>The metadata options for the instance. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html">Instance metadata and user data</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
        pub fn set_metadata_options(
            mut self,
            input: std::option::Option<crate::model::LaunchTemplateInstanceMetadataOptionsRequest>,
        ) -> Self {
            self.metadata_options = input;
            self
        }
        /// <p>Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves. For more information, see <a href="https://docs.aws.amazon.com/enclaves/latest/user/nitro-enclave.html"> What is Amazon Web Services Nitro Enclaves?</a> in the <i>Amazon Web Services Nitro Enclaves User Guide</i>.</p>
        /// <p>You can't enable Amazon Web Services Nitro Enclaves and hibernation on the same instance.</p>
        pub fn enclave_options(
            mut self,
            input: crate::model::LaunchTemplateEnclaveOptionsRequest,
        ) -> Self {
            self.enclave_options = Some(input);
            self
        }
        /// <p>Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves. For more information, see <a href="https://docs.aws.amazon.com/enclaves/latest/user/nitro-enclave.html"> What is Amazon Web Services Nitro Enclaves?</a> in the <i>Amazon Web Services Nitro Enclaves User Guide</i>.</p>
        /// <p>You can't enable Amazon Web Services Nitro Enclaves and hibernation on the same instance.</p>
        pub fn set_enclave_options(
            mut self,
            input: std::option::Option<crate::model::LaunchTemplateEnclaveOptionsRequest>,
        ) -> Self {
            self.enclave_options = input;
            self
        }
        /// <p>The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with these attributes.</p>
        /// <p>If you specify <code>InstanceRequirements</code>, you can't specify <code>InstanceType</code>.</p>
        pub fn instance_requirements(
            mut self,
            input: crate::model::InstanceRequirementsRequest,
        ) -> Self {
            self.instance_requirements = Some(input);
            self
        }
        /// <p>The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with these attributes.</p>
        /// <p>If you specify <code>InstanceRequirements</code>, you can't specify <code>InstanceType</code>.</p>
        pub fn set_instance_requirements(
            mut self,
            input: std::option::Option<crate::model::InstanceRequirementsRequest>,
        ) -> Self {
            self.instance_requirements = input;
            self
        }
        /// <p>The options for the instance hostname. The default values are inherited from the subnet.</p>
        pub fn private_dns_name_options(
            mut self,
            input: crate::model::LaunchTemplatePrivateDnsNameOptionsRequest,
        ) -> Self {
            self.private_dns_name_options = Some(input);
            self
        }
        /// <p>The options for the instance hostname. The default values are inherited from the subnet.</p>
        pub fn set_private_dns_name_options(
            mut self,
            input: std::option::Option<crate::model::LaunchTemplatePrivateDnsNameOptionsRequest>,
        ) -> Self {
            self.private_dns_name_options = input;
            self
        }
        /// <p>The maintenance options for the instance.</p>
        pub fn maintenance_options(
            mut self,
            input: crate::model::LaunchTemplateInstanceMaintenanceOptionsRequest,
        ) -> Self {
            self.maintenance_options = Some(input);
            self
        }
        /// <p>The maintenance options for the instance.</p>
        pub fn set_maintenance_options(
            mut self,
            input: std::option::Option<
                crate::model::LaunchTemplateInstanceMaintenanceOptionsRequest,
            >,
        ) -> Self {
            self.maintenance_options = input;
            self
        }
        /// <p>Indicates whether to enable the instance for stop protection. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Stop_Start.html#Using_StopProtection">Stop protection</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
        pub fn disable_api_stop(mut self, input: bool) -> Self {
            self.disable_api_stop = Some(input);
            self
        }
        /// <p>Indicates whether to enable the instance for stop protection. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Stop_Start.html#Using_StopProtection">Stop protection</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
        pub fn set_disable_api_stop(mut self, input: std::option::Option<bool>) -> Self {
            self.disable_api_stop = input;
            self
        }
        /// Consumes the builder and constructs a [`RequestLaunchTemplateData`](crate::model::RequestLaunchTemplateData).
        pub fn build(self) -> crate::model::RequestLaunchTemplateData {
            crate::model::RequestLaunchTemplateData {
                kernel_id: self.kernel_id,
                ebs_optimized: self.ebs_optimized,
                iam_instance_profile: self.iam_instance_profile,
                block_device_mappings: self.block_device_mappings,
                network_interfaces: self.network_interfaces,
                image_id: self.image_id,
                instance_type: self.instance_type,
                key_name: self.key_name,
                monitoring: self.monitoring,
                placement: self.placement,
                ram_disk_id: self.ram_disk_id,
                disable_api_termination: self.disable_api_termination,
                instance_initiated_shutdown_behavior: self.instance_initiated_shutdown_behavior,
                user_data: self.user_data,
                tag_specifications: self.tag_specifications,
                elastic_gpu_specifications: self.elastic_gpu_specifications,
                elastic_inference_accelerators: self.elastic_inference_accelerators,
                security_group_ids: self.security_group_ids,
                security_groups: self.security_groups,
                instance_market_options: self.instance_market_options,
                credit_specification: self.credit_specification,
                cpu_options: self.cpu_options,
                capacity_reservation_specification: self.capacity_reservation_specification,
                license_specifications: self.license_specifications,
                hibernation_options: self.hibernation_options,
                metadata_options: self.metadata_options,
                enclave_options: self.enclave_options,
                instance_requirements: self.instance_requirements,
                private_dns_name_options: self.private_dns_name_options,
                maintenance_options: self.maintenance_options,
                disable_api_stop: self.disable_api_stop,
            }
        }
    }
    impl std::fmt::Debug for Builder {
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
            let mut formatter = f.debug_struct("Builder");
            formatter.field("kernel_id", &"*** Sensitive Data Redacted ***");
            formatter.field("ebs_optimized", &"*** Sensitive Data Redacted ***");
            formatter.field("iam_instance_profile", &"*** Sensitive Data Redacted ***");
            formatter.field("block_device_mappings", &"*** Sensitive Data Redacted ***");
            formatter.field("network_interfaces", &"*** Sensitive Data Redacted ***");
            formatter.field("image_id", &"*** Sensitive Data Redacted ***");
            formatter.field("instance_type", &"*** Sensitive Data Redacted ***");
            formatter.field("key_name", &"*** Sensitive Data Redacted ***");
            formatter.field("monitoring", &"*** Sensitive Data Redacted ***");
            formatter.field("placement", &"*** Sensitive Data Redacted ***");
            formatter.field("ram_disk_id", &"*** Sensitive Data Redacted ***");
            formatter.field(
                "disable_api_termination",
                &"*** Sensitive Data Redacted ***",
            );
            formatter.field(
                "instance_initiated_shutdown_behavior",
                &"*** Sensitive Data Redacted ***",
            );
            formatter.field("user_data", &"*** Sensitive Data Redacted ***");
            formatter.field("tag_specifications", &"*** Sensitive Data Redacted ***");
            formatter.field(
                "elastic_gpu_specifications",
                &"*** Sensitive Data Redacted ***",
            );
            formatter.field(
                "elastic_inference_accelerators",
                &"*** Sensitive Data Redacted ***",
            );
            formatter.field("security_group_ids", &"*** Sensitive Data Redacted ***");
            formatter.field("security_groups", &"*** Sensitive Data Redacted ***");
            formatter.field(
                "instance_market_options",
                &"*** Sensitive Data Redacted ***",
            );
            formatter.field("credit_specification", &"*** Sensitive Data Redacted ***");
            formatter.field("cpu_options", &"*** Sensitive Data Redacted ***");
            formatter.field(
                "capacity_reservation_specification",
                &"*** Sensitive Data Redacted ***",
            );
            formatter.field("license_specifications", &"*** Sensitive Data Redacted ***");
            formatter.field("hibernation_options", &"*** Sensitive Data Redacted ***");
            formatter.field("metadata_options", &"*** Sensitive Data Redacted ***");
            formatter.field("enclave_options", &"*** Sensitive Data Redacted ***");
            formatter.field("instance_requirements", &"*** Sensitive Data Redacted ***");
            formatter.field(
                "private_dns_name_options",
                &"*** Sensitive Data Redacted ***",
            );
            formatter.field("maintenance_options", &"*** Sensitive Data Redacted ***");
            formatter.field("disable_api_stop", &"*** Sensitive Data Redacted ***");
            formatter.finish()
        }
    }
}
impl RequestLaunchTemplateData {
    /// Creates a new builder-style object to manufacture [`RequestLaunchTemplateData`](crate::model::RequestLaunchTemplateData).
    pub fn builder() -> crate::model::request_launch_template_data::Builder {
        crate::model::request_launch_template_data::Builder::default()
    }
}

/// <p>The maintenance options of your instance.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LaunchTemplateInstanceMaintenanceOptionsRequest {
    /// <p>Disables the automatic recovery behavior of your instance or sets it to default. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-recover.html#instance-configuration-recovery">Simplified automatic recovery</a>.</p>
    #[doc(hidden)]
    pub auto_recovery: std::option::Option<crate::model::LaunchTemplateAutoRecoveryState>,
}
impl LaunchTemplateInstanceMaintenanceOptionsRequest {
    /// <p>Disables the automatic recovery behavior of your instance or sets it to default. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-recover.html#instance-configuration-recovery">Simplified automatic recovery</a>.</p>
    pub fn auto_recovery(
        &self,
    ) -> std::option::Option<&crate::model::LaunchTemplateAutoRecoveryState> {
        self.auto_recovery.as_ref()
    }
}
/// See [`LaunchTemplateInstanceMaintenanceOptionsRequest`](crate::model::LaunchTemplateInstanceMaintenanceOptionsRequest).
pub mod launch_template_instance_maintenance_options_request {

    /// A builder for [`LaunchTemplateInstanceMaintenanceOptionsRequest`](crate::model::LaunchTemplateInstanceMaintenanceOptionsRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) auto_recovery:
            std::option::Option<crate::model::LaunchTemplateAutoRecoveryState>,
    }
    impl Builder {
        /// <p>Disables the automatic recovery behavior of your instance or sets it to default. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-recover.html#instance-configuration-recovery">Simplified automatic recovery</a>.</p>
        pub fn auto_recovery(
            mut self,
            input: crate::model::LaunchTemplateAutoRecoveryState,
        ) -> Self {
            self.auto_recovery = Some(input);
            self
        }
        /// <p>Disables the automatic recovery behavior of your instance or sets it to default. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-recover.html#instance-configuration-recovery">Simplified automatic recovery</a>.</p>
        pub fn set_auto_recovery(
            mut self,
            input: std::option::Option<crate::model::LaunchTemplateAutoRecoveryState>,
        ) -> Self {
            self.auto_recovery = input;
            self
        }
        /// Consumes the builder and constructs a [`LaunchTemplateInstanceMaintenanceOptionsRequest`](crate::model::LaunchTemplateInstanceMaintenanceOptionsRequest).
        pub fn build(self) -> crate::model::LaunchTemplateInstanceMaintenanceOptionsRequest {
            crate::model::LaunchTemplateInstanceMaintenanceOptionsRequest {
                auto_recovery: self.auto_recovery,
            }
        }
    }
}
impl LaunchTemplateInstanceMaintenanceOptionsRequest {
    /// Creates a new builder-style object to manufacture [`LaunchTemplateInstanceMaintenanceOptionsRequest`](crate::model::LaunchTemplateInstanceMaintenanceOptionsRequest).
    pub fn builder() -> crate::model::launch_template_instance_maintenance_options_request::Builder
    {
        crate::model::launch_template_instance_maintenance_options_request::Builder::default()
    }
}

/// <p>Describes the options for instance hostnames.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LaunchTemplatePrivateDnsNameOptionsRequest {
    /// <p>The type of hostname for Amazon EC2 instances. For IPv4 only subnets, an instance DNS name must be based on the instance IPv4 address. For IPv6 native subnets, an instance DNS name must be based on the instance ID. For dual-stack subnets, you can specify whether DNS names use the instance IPv4 address or the instance ID.</p>
    #[doc(hidden)]
    pub hostname_type: std::option::Option<crate::model::HostnameType>,
    /// <p>Indicates whether to respond to DNS queries for instance hostnames with DNS A records.</p>
    #[doc(hidden)]
    pub enable_resource_name_dns_a_record: std::option::Option<bool>,
    /// <p>Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records.</p>
    #[doc(hidden)]
    pub enable_resource_name_dns_aaaa_record: std::option::Option<bool>,
}
impl LaunchTemplatePrivateDnsNameOptionsRequest {
    /// <p>The type of hostname for Amazon EC2 instances. For IPv4 only subnets, an instance DNS name must be based on the instance IPv4 address. For IPv6 native subnets, an instance DNS name must be based on the instance ID. For dual-stack subnets, you can specify whether DNS names use the instance IPv4 address or the instance ID.</p>
    pub fn hostname_type(&self) -> std::option::Option<&crate::model::HostnameType> {
        self.hostname_type.as_ref()
    }
    /// <p>Indicates whether to respond to DNS queries for instance hostnames with DNS A records.</p>
    pub fn enable_resource_name_dns_a_record(&self) -> std::option::Option<bool> {
        self.enable_resource_name_dns_a_record
    }
    /// <p>Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records.</p>
    pub fn enable_resource_name_dns_aaaa_record(&self) -> std::option::Option<bool> {
        self.enable_resource_name_dns_aaaa_record
    }
}
/// See [`LaunchTemplatePrivateDnsNameOptionsRequest`](crate::model::LaunchTemplatePrivateDnsNameOptionsRequest).
pub mod launch_template_private_dns_name_options_request {

    /// A builder for [`LaunchTemplatePrivateDnsNameOptionsRequest`](crate::model::LaunchTemplatePrivateDnsNameOptionsRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) hostname_type: std::option::Option<crate::model::HostnameType>,
        pub(crate) enable_resource_name_dns_a_record: std::option::Option<bool>,
        pub(crate) enable_resource_name_dns_aaaa_record: std::option::Option<bool>,
    }
    impl Builder {
        /// <p>The type of hostname for Amazon EC2 instances. For IPv4 only subnets, an instance DNS name must be based on the instance IPv4 address. For IPv6 native subnets, an instance DNS name must be based on the instance ID. For dual-stack subnets, you can specify whether DNS names use the instance IPv4 address or the instance ID.</p>
        pub fn hostname_type(mut self, input: crate::model::HostnameType) -> Self {
            self.hostname_type = Some(input);
            self
        }
        /// <p>The type of hostname for Amazon EC2 instances. For IPv4 only subnets, an instance DNS name must be based on the instance IPv4 address. For IPv6 native subnets, an instance DNS name must be based on the instance ID. For dual-stack subnets, you can specify whether DNS names use the instance IPv4 address or the instance ID.</p>
        pub fn set_hostname_type(
            mut self,
            input: std::option::Option<crate::model::HostnameType>,
        ) -> Self {
            self.hostname_type = input;
            self
        }
        /// <p>Indicates whether to respond to DNS queries for instance hostnames with DNS A records.</p>
        pub fn enable_resource_name_dns_a_record(mut self, input: bool) -> Self {
            self.enable_resource_name_dns_a_record = Some(input);
            self
        }
        /// <p>Indicates whether to respond to DNS queries for instance hostnames with DNS A records.</p>
        pub fn set_enable_resource_name_dns_a_record(
            mut self,
            input: std::option::Option<bool>,
        ) -> Self {
            self.enable_resource_name_dns_a_record = input;
            self
        }
        /// <p>Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records.</p>
        pub fn enable_resource_name_dns_aaaa_record(mut self, input: bool) -> Self {
            self.enable_resource_name_dns_aaaa_record = Some(input);
            self
        }
        /// <p>Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records.</p>
        pub fn set_enable_resource_name_dns_aaaa_record(
            mut self,
            input: std::option::Option<bool>,
        ) -> Self {
            self.enable_resource_name_dns_aaaa_record = input;
            self
        }
        /// Consumes the builder and constructs a [`LaunchTemplatePrivateDnsNameOptionsRequest`](crate::model::LaunchTemplatePrivateDnsNameOptionsRequest).
        pub fn build(self) -> crate::model::LaunchTemplatePrivateDnsNameOptionsRequest {
            crate::model::LaunchTemplatePrivateDnsNameOptionsRequest {
                hostname_type: self.hostname_type,
                enable_resource_name_dns_a_record: self.enable_resource_name_dns_a_record,
                enable_resource_name_dns_aaaa_record: self.enable_resource_name_dns_aaaa_record,
            }
        }
    }
}
impl LaunchTemplatePrivateDnsNameOptionsRequest {
    /// Creates a new builder-style object to manufacture [`LaunchTemplatePrivateDnsNameOptionsRequest`](crate::model::LaunchTemplatePrivateDnsNameOptionsRequest).
    pub fn builder() -> crate::model::launch_template_private_dns_name_options_request::Builder {
        crate::model::launch_template_private_dns_name_options_request::Builder::default()
    }
}

/// <p>Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves. For more information, see <a href="https://docs.aws.amazon.com/enclaves/latest/user/nitro-enclave.html">What is Amazon Web Services Nitro Enclaves?</a> in the <i>Amazon Web Services Nitro Enclaves User Guide</i>.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LaunchTemplateEnclaveOptionsRequest {
    /// <p>To enable the instance for Amazon Web Services Nitro Enclaves, set this parameter to <code>true</code>.</p>
    #[doc(hidden)]
    pub enabled: std::option::Option<bool>,
}
impl LaunchTemplateEnclaveOptionsRequest {
    /// <p>To enable the instance for Amazon Web Services Nitro Enclaves, set this parameter to <code>true</code>.</p>
    pub fn enabled(&self) -> std::option::Option<bool> {
        self.enabled
    }
}
/// See [`LaunchTemplateEnclaveOptionsRequest`](crate::model::LaunchTemplateEnclaveOptionsRequest).
pub mod launch_template_enclave_options_request {

    /// A builder for [`LaunchTemplateEnclaveOptionsRequest`](crate::model::LaunchTemplateEnclaveOptionsRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) enabled: std::option::Option<bool>,
    }
    impl Builder {
        /// <p>To enable the instance for Amazon Web Services Nitro Enclaves, set this parameter to <code>true</code>.</p>
        pub fn enabled(mut self, input: bool) -> Self {
            self.enabled = Some(input);
            self
        }
        /// <p>To enable the instance for Amazon Web Services Nitro Enclaves, set this parameter to <code>true</code>.</p>
        pub fn set_enabled(mut self, input: std::option::Option<bool>) -> Self {
            self.enabled = input;
            self
        }
        /// Consumes the builder and constructs a [`LaunchTemplateEnclaveOptionsRequest`](crate::model::LaunchTemplateEnclaveOptionsRequest).
        pub fn build(self) -> crate::model::LaunchTemplateEnclaveOptionsRequest {
            crate::model::LaunchTemplateEnclaveOptionsRequest {
                enabled: self.enabled,
            }
        }
    }
}
impl LaunchTemplateEnclaveOptionsRequest {
    /// Creates a new builder-style object to manufacture [`LaunchTemplateEnclaveOptionsRequest`](crate::model::LaunchTemplateEnclaveOptionsRequest).
    pub fn builder() -> crate::model::launch_template_enclave_options_request::Builder {
        crate::model::launch_template_enclave_options_request::Builder::default()
    }
}

/// <p>The metadata options for the instance. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html">Instance metadata and user data</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LaunchTemplateInstanceMetadataOptionsRequest {
    /// <p>IMDSv2 uses token-backed sessions. Set the use of HTTP tokens to <code>optional</code> (in other words, set the use of IMDSv2 to <code>optional</code>) or <code>required</code> (in other words, set the use of IMDSv2 to <code>required</code>).</p>
    /// <ul>
    /// <li> <p> <code>optional</code> - When IMDSv2 is optional, you can choose to retrieve instance metadata with or without a session token in your request. If you retrieve the IAM role credentials without a token, the IMDSv1 role credentials are returned. If you retrieve the IAM role credentials using a valid session token, the IMDSv2 role credentials are returned.</p> </li>
    /// <li> <p> <code>required</code> - When IMDSv2 is required, you must send a session token with any instance metadata retrieval requests. In this state, retrieving the IAM role credentials always returns IMDSv2 credentials; IMDSv1 credentials are not available.</p> </li>
    /// </ul>
    /// <p>Default: <code>optional</code> </p>
    #[doc(hidden)]
    pub http_tokens: std::option::Option<crate::model::LaunchTemplateHttpTokensState>,
    /// <p>The desired HTTP PUT response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel.</p>
    /// <p>Default: <code>1</code> </p>
    /// <p>Possible values: Integers from 1 to 64</p>
    #[doc(hidden)]
    pub http_put_response_hop_limit: std::option::Option<i32>,
    /// <p>Enables or disables the HTTP metadata endpoint on your instances. If the parameter is not specified, the default state is <code>enabled</code>.</p> <note>
    /// <p>If you specify a value of <code>disabled</code>, you will not be able to access your instance metadata. </p>
    /// </note>
    #[doc(hidden)]
    pub http_endpoint:
        std::option::Option<crate::model::LaunchTemplateInstanceMetadataEndpointState>,
    /// <p>Enables or disables the IPv6 endpoint for the instance metadata service.</p>
    /// <p>Default: <code>disabled</code> </p>
    #[doc(hidden)]
    pub http_protocol_ipv6:
        std::option::Option<crate::model::LaunchTemplateInstanceMetadataProtocolIpv6>,
    /// <p>Set to <code>enabled</code> to allow access to instance tags from the instance metadata. Set to <code>disabled</code> to turn off access to instance tags from the instance metadata. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html#work-with-tags-in-IMDS">Work with instance tags using the instance metadata</a>.</p>
    /// <p>Default: <code>disabled</code> </p>
    #[doc(hidden)]
    pub instance_metadata_tags:
        std::option::Option<crate::model::LaunchTemplateInstanceMetadataTagsState>,
}
impl LaunchTemplateInstanceMetadataOptionsRequest {
    /// <p>IMDSv2 uses token-backed sessions. Set the use of HTTP tokens to <code>optional</code> (in other words, set the use of IMDSv2 to <code>optional</code>) or <code>required</code> (in other words, set the use of IMDSv2 to <code>required</code>).</p>
    /// <ul>
    /// <li> <p> <code>optional</code> - When IMDSv2 is optional, you can choose to retrieve instance metadata with or without a session token in your request. If you retrieve the IAM role credentials without a token, the IMDSv1 role credentials are returned. If you retrieve the IAM role credentials using a valid session token, the IMDSv2 role credentials are returned.</p> </li>
    /// <li> <p> <code>required</code> - When IMDSv2 is required, you must send a session token with any instance metadata retrieval requests. In this state, retrieving the IAM role credentials always returns IMDSv2 credentials; IMDSv1 credentials are not available.</p> </li>
    /// </ul>
    /// <p>Default: <code>optional</code> </p>
    pub fn http_tokens(&self) -> std::option::Option<&crate::model::LaunchTemplateHttpTokensState> {
        self.http_tokens.as_ref()
    }
    /// <p>The desired HTTP PUT response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel.</p>
    /// <p>Default: <code>1</code> </p>
    /// <p>Possible values: Integers from 1 to 64</p>
    pub fn http_put_response_hop_limit(&self) -> std::option::Option<i32> {
        self.http_put_response_hop_limit
    }
    /// <p>Enables or disables the HTTP metadata endpoint on your instances. If the parameter is not specified, the default state is <code>enabled</code>.</p> <note>
    /// <p>If you specify a value of <code>disabled</code>, you will not be able to access your instance metadata. </p>
    /// </note>
    pub fn http_endpoint(
        &self,
    ) -> std::option::Option<&crate::model::LaunchTemplateInstanceMetadataEndpointState> {
        self.http_endpoint.as_ref()
    }
    /// <p>Enables or disables the IPv6 endpoint for the instance metadata service.</p>
    /// <p>Default: <code>disabled</code> </p>
    pub fn http_protocol_ipv6(
        &self,
    ) -> std::option::Option<&crate::model::LaunchTemplateInstanceMetadataProtocolIpv6> {
        self.http_protocol_ipv6.as_ref()
    }
    /// <p>Set to <code>enabled</code> to allow access to instance tags from the instance metadata. Set to <code>disabled</code> to turn off access to instance tags from the instance metadata. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html#work-with-tags-in-IMDS">Work with instance tags using the instance metadata</a>.</p>
    /// <p>Default: <code>disabled</code> </p>
    pub fn instance_metadata_tags(
        &self,
    ) -> std::option::Option<&crate::model::LaunchTemplateInstanceMetadataTagsState> {
        self.instance_metadata_tags.as_ref()
    }
}
/// See [`LaunchTemplateInstanceMetadataOptionsRequest`](crate::model::LaunchTemplateInstanceMetadataOptionsRequest).
pub mod launch_template_instance_metadata_options_request {

    /// A builder for [`LaunchTemplateInstanceMetadataOptionsRequest`](crate::model::LaunchTemplateInstanceMetadataOptionsRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) http_tokens: std::option::Option<crate::model::LaunchTemplateHttpTokensState>,
        pub(crate) http_put_response_hop_limit: std::option::Option<i32>,
        pub(crate) http_endpoint:
            std::option::Option<crate::model::LaunchTemplateInstanceMetadataEndpointState>,
        pub(crate) http_protocol_ipv6:
            std::option::Option<crate::model::LaunchTemplateInstanceMetadataProtocolIpv6>,
        pub(crate) instance_metadata_tags:
            std::option::Option<crate::model::LaunchTemplateInstanceMetadataTagsState>,
    }
    impl Builder {
        /// <p>IMDSv2 uses token-backed sessions. Set the use of HTTP tokens to <code>optional</code> (in other words, set the use of IMDSv2 to <code>optional</code>) or <code>required</code> (in other words, set the use of IMDSv2 to <code>required</code>).</p>
        /// <ul>
        /// <li> <p> <code>optional</code> - When IMDSv2 is optional, you can choose to retrieve instance metadata with or without a session token in your request. If you retrieve the IAM role credentials without a token, the IMDSv1 role credentials are returned. If you retrieve the IAM role credentials using a valid session token, the IMDSv2 role credentials are returned.</p> </li>
        /// <li> <p> <code>required</code> - When IMDSv2 is required, you must send a session token with any instance metadata retrieval requests. In this state, retrieving the IAM role credentials always returns IMDSv2 credentials; IMDSv1 credentials are not available.</p> </li>
        /// </ul>
        /// <p>Default: <code>optional</code> </p>
        pub fn http_tokens(mut self, input: crate::model::LaunchTemplateHttpTokensState) -> Self {
            self.http_tokens = Some(input);
            self
        }
        /// <p>IMDSv2 uses token-backed sessions. Set the use of HTTP tokens to <code>optional</code> (in other words, set the use of IMDSv2 to <code>optional</code>) or <code>required</code> (in other words, set the use of IMDSv2 to <code>required</code>).</p>
        /// <ul>
        /// <li> <p> <code>optional</code> - When IMDSv2 is optional, you can choose to retrieve instance metadata with or without a session token in your request. If you retrieve the IAM role credentials without a token, the IMDSv1 role credentials are returned. If you retrieve the IAM role credentials using a valid session token, the IMDSv2 role credentials are returned.</p> </li>
        /// <li> <p> <code>required</code> - When IMDSv2 is required, you must send a session token with any instance metadata retrieval requests. In this state, retrieving the IAM role credentials always returns IMDSv2 credentials; IMDSv1 credentials are not available.</p> </li>
        /// </ul>
        /// <p>Default: <code>optional</code> </p>
        pub fn set_http_tokens(
            mut self,
            input: std::option::Option<crate::model::LaunchTemplateHttpTokensState>,
        ) -> Self {
            self.http_tokens = input;
            self
        }
        /// <p>The desired HTTP PUT response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel.</p>
        /// <p>Default: <code>1</code> </p>
        /// <p>Possible values: Integers from 1 to 64</p>
        pub fn http_put_response_hop_limit(mut self, input: i32) -> Self {
            self.http_put_response_hop_limit = Some(input);
            self
        }
        /// <p>The desired HTTP PUT response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel.</p>
        /// <p>Default: <code>1</code> </p>
        /// <p>Possible values: Integers from 1 to 64</p>
        pub fn set_http_put_response_hop_limit(mut self, input: std::option::Option<i32>) -> Self {
            self.http_put_response_hop_limit = input;
            self
        }
        /// <p>Enables or disables the HTTP metadata endpoint on your instances. If the parameter is not specified, the default state is <code>enabled</code>.</p> <note>
        /// <p>If you specify a value of <code>disabled</code>, you will not be able to access your instance metadata. </p>
        /// </note>
        pub fn http_endpoint(
            mut self,
            input: crate::model::LaunchTemplateInstanceMetadataEndpointState,
        ) -> Self {
            self.http_endpoint = Some(input);
            self
        }
        /// <p>Enables or disables the HTTP metadata endpoint on your instances. If the parameter is not specified, the default state is <code>enabled</code>.</p> <note>
        /// <p>If you specify a value of <code>disabled</code>, you will not be able to access your instance metadata. </p>
        /// </note>
        pub fn set_http_endpoint(
            mut self,
            input: std::option::Option<crate::model::LaunchTemplateInstanceMetadataEndpointState>,
        ) -> Self {
            self.http_endpoint = input;
            self
        }
        /// <p>Enables or disables the IPv6 endpoint for the instance metadata service.</p>
        /// <p>Default: <code>disabled</code> </p>
        pub fn http_protocol_ipv6(
            mut self,
            input: crate::model::LaunchTemplateInstanceMetadataProtocolIpv6,
        ) -> Self {
            self.http_protocol_ipv6 = Some(input);
            self
        }
        /// <p>Enables or disables the IPv6 endpoint for the instance metadata service.</p>
        /// <p>Default: <code>disabled</code> </p>
        pub fn set_http_protocol_ipv6(
            mut self,
            input: std::option::Option<crate::model::LaunchTemplateInstanceMetadataProtocolIpv6>,
        ) -> Self {
            self.http_protocol_ipv6 = input;
            self
        }
        /// <p>Set to <code>enabled</code> to allow access to instance tags from the instance metadata. Set to <code>disabled</code> to turn off access to instance tags from the instance metadata. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html#work-with-tags-in-IMDS">Work with instance tags using the instance metadata</a>.</p>
        /// <p>Default: <code>disabled</code> </p>
        pub fn instance_metadata_tags(
            mut self,
            input: crate::model::LaunchTemplateInstanceMetadataTagsState,
        ) -> Self {
            self.instance_metadata_tags = Some(input);
            self
        }
        /// <p>Set to <code>enabled</code> to allow access to instance tags from the instance metadata. Set to <code>disabled</code> to turn off access to instance tags from the instance metadata. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html#work-with-tags-in-IMDS">Work with instance tags using the instance metadata</a>.</p>
        /// <p>Default: <code>disabled</code> </p>
        pub fn set_instance_metadata_tags(
            mut self,
            input: std::option::Option<crate::model::LaunchTemplateInstanceMetadataTagsState>,
        ) -> Self {
            self.instance_metadata_tags = input;
            self
        }
        /// Consumes the builder and constructs a [`LaunchTemplateInstanceMetadataOptionsRequest`](crate::model::LaunchTemplateInstanceMetadataOptionsRequest).
        pub fn build(self) -> crate::model::LaunchTemplateInstanceMetadataOptionsRequest {
            crate::model::LaunchTemplateInstanceMetadataOptionsRequest {
                http_tokens: self.http_tokens,
                http_put_response_hop_limit: self.http_put_response_hop_limit,
                http_endpoint: self.http_endpoint,
                http_protocol_ipv6: self.http_protocol_ipv6,
                instance_metadata_tags: self.instance_metadata_tags,
            }
        }
    }
}
impl LaunchTemplateInstanceMetadataOptionsRequest {
    /// Creates a new builder-style object to manufacture [`LaunchTemplateInstanceMetadataOptionsRequest`](crate::model::LaunchTemplateInstanceMetadataOptionsRequest).
    pub fn builder() -> crate::model::launch_template_instance_metadata_options_request::Builder {
        crate::model::launch_template_instance_metadata_options_request::Builder::default()
    }
}

/// <p>Indicates whether the instance is configured for hibernation. This parameter is valid only if the instance meets the <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/hibernating-prerequisites.html">hibernation prerequisites</a>.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LaunchTemplateHibernationOptionsRequest {
    /// <p>If you set this parameter to <code>true</code>, the instance is enabled for hibernation.</p>
    /// <p>Default: <code>false</code> </p>
    #[doc(hidden)]
    pub configured: std::option::Option<bool>,
}
impl LaunchTemplateHibernationOptionsRequest {
    /// <p>If you set this parameter to <code>true</code>, the instance is enabled for hibernation.</p>
    /// <p>Default: <code>false</code> </p>
    pub fn configured(&self) -> std::option::Option<bool> {
        self.configured
    }
}
/// See [`LaunchTemplateHibernationOptionsRequest`](crate::model::LaunchTemplateHibernationOptionsRequest).
pub mod launch_template_hibernation_options_request {

    /// A builder for [`LaunchTemplateHibernationOptionsRequest`](crate::model::LaunchTemplateHibernationOptionsRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) configured: std::option::Option<bool>,
    }
    impl Builder {
        /// <p>If you set this parameter to <code>true</code>, the instance is enabled for hibernation.</p>
        /// <p>Default: <code>false</code> </p>
        pub fn configured(mut self, input: bool) -> Self {
            self.configured = Some(input);
            self
        }
        /// <p>If you set this parameter to <code>true</code>, the instance is enabled for hibernation.</p>
        /// <p>Default: <code>false</code> </p>
        pub fn set_configured(mut self, input: std::option::Option<bool>) -> Self {
            self.configured = input;
            self
        }
        /// Consumes the builder and constructs a [`LaunchTemplateHibernationOptionsRequest`](crate::model::LaunchTemplateHibernationOptionsRequest).
        pub fn build(self) -> crate::model::LaunchTemplateHibernationOptionsRequest {
            crate::model::LaunchTemplateHibernationOptionsRequest {
                configured: self.configured,
            }
        }
    }
}
impl LaunchTemplateHibernationOptionsRequest {
    /// Creates a new builder-style object to manufacture [`LaunchTemplateHibernationOptionsRequest`](crate::model::LaunchTemplateHibernationOptionsRequest).
    pub fn builder() -> crate::model::launch_template_hibernation_options_request::Builder {
        crate::model::launch_template_hibernation_options_request::Builder::default()
    }
}

/// <p>Describes a license configuration.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LaunchTemplateLicenseConfigurationRequest {
    /// <p>The Amazon Resource Name (ARN) of the license configuration.</p>
    #[doc(hidden)]
    pub license_configuration_arn: std::option::Option<std::string::String>,
}
impl LaunchTemplateLicenseConfigurationRequest {
    /// <p>The Amazon Resource Name (ARN) of the license configuration.</p>
    pub fn license_configuration_arn(&self) -> std::option::Option<&str> {
        self.license_configuration_arn.as_deref()
    }
}
/// See [`LaunchTemplateLicenseConfigurationRequest`](crate::model::LaunchTemplateLicenseConfigurationRequest).
pub mod launch_template_license_configuration_request {

    /// A builder for [`LaunchTemplateLicenseConfigurationRequest`](crate::model::LaunchTemplateLicenseConfigurationRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) license_configuration_arn: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The Amazon Resource Name (ARN) of the license configuration.</p>
        pub fn license_configuration_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.license_configuration_arn = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the license configuration.</p>
        pub fn set_license_configuration_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.license_configuration_arn = input;
            self
        }
        /// Consumes the builder and constructs a [`LaunchTemplateLicenseConfigurationRequest`](crate::model::LaunchTemplateLicenseConfigurationRequest).
        pub fn build(self) -> crate::model::LaunchTemplateLicenseConfigurationRequest {
            crate::model::LaunchTemplateLicenseConfigurationRequest {
                license_configuration_arn: self.license_configuration_arn,
            }
        }
    }
}
impl LaunchTemplateLicenseConfigurationRequest {
    /// Creates a new builder-style object to manufacture [`LaunchTemplateLicenseConfigurationRequest`](crate::model::LaunchTemplateLicenseConfigurationRequest).
    pub fn builder() -> crate::model::launch_template_license_configuration_request::Builder {
        crate::model::launch_template_license_configuration_request::Builder::default()
    }
}

/// <p>Describes an instance's Capacity Reservation targeting option. You can specify only one option at a time. Use the <code>CapacityReservationPreference</code> parameter to configure the instance to run in On-Demand capacity or to run in any <code>open</code> Capacity Reservation that has matching attributes (instance type, platform, Availability Zone). Use the <code>CapacityReservationTarget</code> parameter to explicitly target a specific Capacity Reservation or a Capacity Reservation group.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LaunchTemplateCapacityReservationSpecificationRequest {
    /// <p>Indicates the instance's Capacity Reservation preferences. Possible preferences include:</p>
    /// <ul>
    /// <li> <p> <code>open</code> - The instance can run in any <code>open</code> Capacity Reservation that has matching attributes (instance type, platform, Availability Zone).</p> </li>
    /// <li> <p> <code>none</code> - The instance avoids running in a Capacity Reservation even if one is available. The instance runs in On-Demand capacity.</p> </li>
    /// </ul>
    #[doc(hidden)]
    pub capacity_reservation_preference:
        std::option::Option<crate::model::CapacityReservationPreference>,
    /// <p>Information about the target Capacity Reservation or Capacity Reservation group.</p>
    #[doc(hidden)]
    pub capacity_reservation_target: std::option::Option<crate::model::CapacityReservationTarget>,
}
impl LaunchTemplateCapacityReservationSpecificationRequest {
    /// <p>Indicates the instance's Capacity Reservation preferences. Possible preferences include:</p>
    /// <ul>
    /// <li> <p> <code>open</code> - The instance can run in any <code>open</code> Capacity Reservation that has matching attributes (instance type, platform, Availability Zone).</p> </li>
    /// <li> <p> <code>none</code> - The instance avoids running in a Capacity Reservation even if one is available. The instance runs in On-Demand capacity.</p> </li>
    /// </ul>
    pub fn capacity_reservation_preference(
        &self,
    ) -> std::option::Option<&crate::model::CapacityReservationPreference> {
        self.capacity_reservation_preference.as_ref()
    }
    /// <p>Information about the target Capacity Reservation or Capacity Reservation group.</p>
    pub fn capacity_reservation_target(
        &self,
    ) -> std::option::Option<&crate::model::CapacityReservationTarget> {
        self.capacity_reservation_target.as_ref()
    }
}
/// See [`LaunchTemplateCapacityReservationSpecificationRequest`](crate::model::LaunchTemplateCapacityReservationSpecificationRequest).
pub mod launch_template_capacity_reservation_specification_request {

    /// A builder for [`LaunchTemplateCapacityReservationSpecificationRequest`](crate::model::LaunchTemplateCapacityReservationSpecificationRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) capacity_reservation_preference:
            std::option::Option<crate::model::CapacityReservationPreference>,
        pub(crate) capacity_reservation_target:
            std::option::Option<crate::model::CapacityReservationTarget>,
    }
    impl Builder {
        /// <p>Indicates the instance's Capacity Reservation preferences. Possible preferences include:</p>
        /// <ul>
        /// <li> <p> <code>open</code> - The instance can run in any <code>open</code> Capacity Reservation that has matching attributes (instance type, platform, Availability Zone).</p> </li>
        /// <li> <p> <code>none</code> - The instance avoids running in a Capacity Reservation even if one is available. The instance runs in On-Demand capacity.</p> </li>
        /// </ul>
        pub fn capacity_reservation_preference(
            mut self,
            input: crate::model::CapacityReservationPreference,
        ) -> Self {
            self.capacity_reservation_preference = Some(input);
            self
        }
        /// <p>Indicates the instance's Capacity Reservation preferences. Possible preferences include:</p>
        /// <ul>
        /// <li> <p> <code>open</code> - The instance can run in any <code>open</code> Capacity Reservation that has matching attributes (instance type, platform, Availability Zone).</p> </li>
        /// <li> <p> <code>none</code> - The instance avoids running in a Capacity Reservation even if one is available. The instance runs in On-Demand capacity.</p> </li>
        /// </ul>
        pub fn set_capacity_reservation_preference(
            mut self,
            input: std::option::Option<crate::model::CapacityReservationPreference>,
        ) -> Self {
            self.capacity_reservation_preference = input;
            self
        }
        /// <p>Information about the target Capacity Reservation or Capacity Reservation group.</p>
        pub fn capacity_reservation_target(
            mut self,
            input: crate::model::CapacityReservationTarget,
        ) -> Self {
            self.capacity_reservation_target = Some(input);
            self
        }
        /// <p>Information about the target Capacity Reservation or Capacity Reservation group.</p>
        pub fn set_capacity_reservation_target(
            mut self,
            input: std::option::Option<crate::model::CapacityReservationTarget>,
        ) -> Self {
            self.capacity_reservation_target = input;
            self
        }
        /// Consumes the builder and constructs a [`LaunchTemplateCapacityReservationSpecificationRequest`](crate::model::LaunchTemplateCapacityReservationSpecificationRequest).
        pub fn build(self) -> crate::model::LaunchTemplateCapacityReservationSpecificationRequest {
            crate::model::LaunchTemplateCapacityReservationSpecificationRequest {
                capacity_reservation_preference: self.capacity_reservation_preference,
                capacity_reservation_target: self.capacity_reservation_target,
            }
        }
    }
}
impl LaunchTemplateCapacityReservationSpecificationRequest {
    /// Creates a new builder-style object to manufacture [`LaunchTemplateCapacityReservationSpecificationRequest`](crate::model::LaunchTemplateCapacityReservationSpecificationRequest).
    pub fn builder(
    ) -> crate::model::launch_template_capacity_reservation_specification_request::Builder {
        crate::model::launch_template_capacity_reservation_specification_request::Builder::default()
    }
}

/// <p>The CPU options for the instance. Both the core count and threads per core must be specified in the request.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LaunchTemplateCpuOptionsRequest {
    /// <p>The number of CPU cores for the instance.</p>
    #[doc(hidden)]
    pub core_count: std::option::Option<i32>,
    /// <p>The number of threads per CPU core. To disable multithreading for the instance, specify a value of <code>1</code>. Otherwise, specify the default value of <code>2</code>.</p>
    #[doc(hidden)]
    pub threads_per_core: std::option::Option<i32>,
}
impl LaunchTemplateCpuOptionsRequest {
    /// <p>The number of CPU cores for the instance.</p>
    pub fn core_count(&self) -> std::option::Option<i32> {
        self.core_count
    }
    /// <p>The number of threads per CPU core. To disable multithreading for the instance, specify a value of <code>1</code>. Otherwise, specify the default value of <code>2</code>.</p>
    pub fn threads_per_core(&self) -> std::option::Option<i32> {
        self.threads_per_core
    }
}
/// See [`LaunchTemplateCpuOptionsRequest`](crate::model::LaunchTemplateCpuOptionsRequest).
pub mod launch_template_cpu_options_request {

    /// A builder for [`LaunchTemplateCpuOptionsRequest`](crate::model::LaunchTemplateCpuOptionsRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) core_count: std::option::Option<i32>,
        pub(crate) threads_per_core: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>The number of CPU cores for the instance.</p>
        pub fn core_count(mut self, input: i32) -> Self {
            self.core_count = Some(input);
            self
        }
        /// <p>The number of CPU cores for the instance.</p>
        pub fn set_core_count(mut self, input: std::option::Option<i32>) -> Self {
            self.core_count = input;
            self
        }
        /// <p>The number of threads per CPU core. To disable multithreading for the instance, specify a value of <code>1</code>. Otherwise, specify the default value of <code>2</code>.</p>
        pub fn threads_per_core(mut self, input: i32) -> Self {
            self.threads_per_core = Some(input);
            self
        }
        /// <p>The number of threads per CPU core. To disable multithreading for the instance, specify a value of <code>1</code>. Otherwise, specify the default value of <code>2</code>.</p>
        pub fn set_threads_per_core(mut self, input: std::option::Option<i32>) -> Self {
            self.threads_per_core = input;
            self
        }
        /// Consumes the builder and constructs a [`LaunchTemplateCpuOptionsRequest`](crate::model::LaunchTemplateCpuOptionsRequest).
        pub fn build(self) -> crate::model::LaunchTemplateCpuOptionsRequest {
            crate::model::LaunchTemplateCpuOptionsRequest {
                core_count: self.core_count,
                threads_per_core: self.threads_per_core,
            }
        }
    }
}
impl LaunchTemplateCpuOptionsRequest {
    /// Creates a new builder-style object to manufacture [`LaunchTemplateCpuOptionsRequest`](crate::model::LaunchTemplateCpuOptionsRequest).
    pub fn builder() -> crate::model::launch_template_cpu_options_request::Builder {
        crate::model::launch_template_cpu_options_request::Builder::default()
    }
}

/// <p>The market (purchasing) option for the instances.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LaunchTemplateInstanceMarketOptionsRequest {
    /// <p>The market type.</p>
    #[doc(hidden)]
    pub market_type: std::option::Option<crate::model::MarketType>,
    /// <p>The options for Spot Instances.</p>
    #[doc(hidden)]
    pub spot_options: std::option::Option<crate::model::LaunchTemplateSpotMarketOptionsRequest>,
}
impl LaunchTemplateInstanceMarketOptionsRequest {
    /// <p>The market type.</p>
    pub fn market_type(&self) -> std::option::Option<&crate::model::MarketType> {
        self.market_type.as_ref()
    }
    /// <p>The options for Spot Instances.</p>
    pub fn spot_options(
        &self,
    ) -> std::option::Option<&crate::model::LaunchTemplateSpotMarketOptionsRequest> {
        self.spot_options.as_ref()
    }
}
/// See [`LaunchTemplateInstanceMarketOptionsRequest`](crate::model::LaunchTemplateInstanceMarketOptionsRequest).
pub mod launch_template_instance_market_options_request {

    /// A builder for [`LaunchTemplateInstanceMarketOptionsRequest`](crate::model::LaunchTemplateInstanceMarketOptionsRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) market_type: std::option::Option<crate::model::MarketType>,
        pub(crate) spot_options:
            std::option::Option<crate::model::LaunchTemplateSpotMarketOptionsRequest>,
    }
    impl Builder {
        /// <p>The market type.</p>
        pub fn market_type(mut self, input: crate::model::MarketType) -> Self {
            self.market_type = Some(input);
            self
        }
        /// <p>The market type.</p>
        pub fn set_market_type(
            mut self,
            input: std::option::Option<crate::model::MarketType>,
        ) -> Self {
            self.market_type = input;
            self
        }
        /// <p>The options for Spot Instances.</p>
        pub fn spot_options(
            mut self,
            input: crate::model::LaunchTemplateSpotMarketOptionsRequest,
        ) -> Self {
            self.spot_options = Some(input);
            self
        }
        /// <p>The options for Spot Instances.</p>
        pub fn set_spot_options(
            mut self,
            input: std::option::Option<crate::model::LaunchTemplateSpotMarketOptionsRequest>,
        ) -> Self {
            self.spot_options = input;
            self
        }
        /// Consumes the builder and constructs a [`LaunchTemplateInstanceMarketOptionsRequest`](crate::model::LaunchTemplateInstanceMarketOptionsRequest).
        pub fn build(self) -> crate::model::LaunchTemplateInstanceMarketOptionsRequest {
            crate::model::LaunchTemplateInstanceMarketOptionsRequest {
                market_type: self.market_type,
                spot_options: self.spot_options,
            }
        }
    }
}
impl LaunchTemplateInstanceMarketOptionsRequest {
    /// Creates a new builder-style object to manufacture [`LaunchTemplateInstanceMarketOptionsRequest`](crate::model::LaunchTemplateInstanceMarketOptionsRequest).
    pub fn builder() -> crate::model::launch_template_instance_market_options_request::Builder {
        crate::model::launch_template_instance_market_options_request::Builder::default()
    }
}

/// <p>The options for Spot Instances.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LaunchTemplateSpotMarketOptionsRequest {
    /// <p>The maximum hourly price you're willing to pay for the Spot Instances. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.</p> <important>
    /// <p>If you specify a maximum price, your Spot Instances will be interrupted more frequently than if you do not specify this parameter.</p>
    /// </important>
    #[doc(hidden)]
    pub max_price: std::option::Option<std::string::String>,
    /// <p>The Spot Instance request type.</p>
    #[doc(hidden)]
    pub spot_instance_type: std::option::Option<crate::model::SpotInstanceType>,
    /// <p>Deprecated.</p>
    #[doc(hidden)]
    pub block_duration_minutes: std::option::Option<i32>,
    /// <p>The end date of the request, in UTC format (<i>YYYY-MM-DD</i>T<i>HH:MM:SS</i>Z). Supported only for persistent requests.</p>
    /// <ul>
    /// <li> <p>For a persistent request, the request remains active until the <code>ValidUntil</code> date and time is reached. Otherwise, the request remains active until you cancel it.</p> </li>
    /// <li> <p>For a one-time request, <code>ValidUntil</code> is not supported. The request remains active until all instances launch or you cancel the request.</p> </li>
    /// </ul>
    /// <p>Default: 7 days from the current date</p>
    #[doc(hidden)]
    pub valid_until: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The behavior when a Spot Instance is interrupted. The default is <code>terminate</code>.</p>
    #[doc(hidden)]
    pub instance_interruption_behavior:
        std::option::Option<crate::model::InstanceInterruptionBehavior>,
}
impl LaunchTemplateSpotMarketOptionsRequest {
    /// <p>The maximum hourly price you're willing to pay for the Spot Instances. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.</p> <important>
    /// <p>If you specify a maximum price, your Spot Instances will be interrupted more frequently than if you do not specify this parameter.</p>
    /// </important>
    pub fn max_price(&self) -> std::option::Option<&str> {
        self.max_price.as_deref()
    }
    /// <p>The Spot Instance request type.</p>
    pub fn spot_instance_type(&self) -> std::option::Option<&crate::model::SpotInstanceType> {
        self.spot_instance_type.as_ref()
    }
    /// <p>Deprecated.</p>
    pub fn block_duration_minutes(&self) -> std::option::Option<i32> {
        self.block_duration_minutes
    }
    /// <p>The end date of the request, in UTC format (<i>YYYY-MM-DD</i>T<i>HH:MM:SS</i>Z). Supported only for persistent requests.</p>
    /// <ul>
    /// <li> <p>For a persistent request, the request remains active until the <code>ValidUntil</code> date and time is reached. Otherwise, the request remains active until you cancel it.</p> </li>
    /// <li> <p>For a one-time request, <code>ValidUntil</code> is not supported. The request remains active until all instances launch or you cancel the request.</p> </li>
    /// </ul>
    /// <p>Default: 7 days from the current date</p>
    pub fn valid_until(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.valid_until.as_ref()
    }
    /// <p>The behavior when a Spot Instance is interrupted. The default is <code>terminate</code>.</p>
    pub fn instance_interruption_behavior(
        &self,
    ) -> std::option::Option<&crate::model::InstanceInterruptionBehavior> {
        self.instance_interruption_behavior.as_ref()
    }
}
/// See [`LaunchTemplateSpotMarketOptionsRequest`](crate::model::LaunchTemplateSpotMarketOptionsRequest).
pub mod launch_template_spot_market_options_request {

    /// A builder for [`LaunchTemplateSpotMarketOptionsRequest`](crate::model::LaunchTemplateSpotMarketOptionsRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) max_price: std::option::Option<std::string::String>,
        pub(crate) spot_instance_type: std::option::Option<crate::model::SpotInstanceType>,
        pub(crate) block_duration_minutes: std::option::Option<i32>,
        pub(crate) valid_until: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) instance_interruption_behavior:
            std::option::Option<crate::model::InstanceInterruptionBehavior>,
    }
    impl Builder {
        /// <p>The maximum hourly price you're willing to pay for the Spot Instances. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.</p> <important>
        /// <p>If you specify a maximum price, your Spot Instances will be interrupted more frequently than if you do not specify this parameter.</p>
        /// </important>
        pub fn max_price(mut self, input: impl Into<std::string::String>) -> Self {
            self.max_price = Some(input.into());
            self
        }
        /// <p>The maximum hourly price you're willing to pay for the Spot Instances. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.</p> <important>
        /// <p>If you specify a maximum price, your Spot Instances will be interrupted more frequently than if you do not specify this parameter.</p>
        /// </important>
        pub fn set_max_price(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.max_price = input;
            self
        }
        /// <p>The Spot Instance request type.</p>
        pub fn spot_instance_type(mut self, input: crate::model::SpotInstanceType) -> Self {
            self.spot_instance_type = Some(input);
            self
        }
        /// <p>The Spot Instance request type.</p>
        pub fn set_spot_instance_type(
            mut self,
            input: std::option::Option<crate::model::SpotInstanceType>,
        ) -> Self {
            self.spot_instance_type = input;
            self
        }
        /// <p>Deprecated.</p>
        pub fn block_duration_minutes(mut self, input: i32) -> Self {
            self.block_duration_minutes = Some(input);
            self
        }
        /// <p>Deprecated.</p>
        pub fn set_block_duration_minutes(mut self, input: std::option::Option<i32>) -> Self {
            self.block_duration_minutes = input;
            self
        }
        /// <p>The end date of the request, in UTC format (<i>YYYY-MM-DD</i>T<i>HH:MM:SS</i>Z). Supported only for persistent requests.</p>
        /// <ul>
        /// <li> <p>For a persistent request, the request remains active until the <code>ValidUntil</code> date and time is reached. Otherwise, the request remains active until you cancel it.</p> </li>
        /// <li> <p>For a one-time request, <code>ValidUntil</code> is not supported. The request remains active until all instances launch or you cancel the request.</p> </li>
        /// </ul>
        /// <p>Default: 7 days from the current date</p>
        pub fn valid_until(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.valid_until = Some(input);
            self
        }
        /// <p>The end date of the request, in UTC format (<i>YYYY-MM-DD</i>T<i>HH:MM:SS</i>Z). Supported only for persistent requests.</p>
        /// <ul>
        /// <li> <p>For a persistent request, the request remains active until the <code>ValidUntil</code> date and time is reached. Otherwise, the request remains active until you cancel it.</p> </li>
        /// <li> <p>For a one-time request, <code>ValidUntil</code> is not supported. The request remains active until all instances launch or you cancel the request.</p> </li>
        /// </ul>
        /// <p>Default: 7 days from the current date</p>
        pub fn set_valid_until(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.valid_until = input;
            self
        }
        /// <p>The behavior when a Spot Instance is interrupted. The default is <code>terminate</code>.</p>
        pub fn instance_interruption_behavior(
            mut self,
            input: crate::model::InstanceInterruptionBehavior,
        ) -> Self {
            self.instance_interruption_behavior = Some(input);
            self
        }
        /// <p>The behavior when a Spot Instance is interrupted. The default is <code>terminate</code>.</p>
        pub fn set_instance_interruption_behavior(
            mut self,
            input: std::option::Option<crate::model::InstanceInterruptionBehavior>,
        ) -> Self {
            self.instance_interruption_behavior = input;
            self
        }
        /// Consumes the builder and constructs a [`LaunchTemplateSpotMarketOptionsRequest`](crate::model::LaunchTemplateSpotMarketOptionsRequest).
        pub fn build(self) -> crate::model::LaunchTemplateSpotMarketOptionsRequest {
            crate::model::LaunchTemplateSpotMarketOptionsRequest {
                max_price: self.max_price,
                spot_instance_type: self.spot_instance_type,
                block_duration_minutes: self.block_duration_minutes,
                valid_until: self.valid_until,
                instance_interruption_behavior: self.instance_interruption_behavior,
            }
        }
    }
}
impl LaunchTemplateSpotMarketOptionsRequest {
    /// Creates a new builder-style object to manufacture [`LaunchTemplateSpotMarketOptionsRequest`](crate::model::LaunchTemplateSpotMarketOptionsRequest).
    pub fn builder() -> crate::model::launch_template_spot_market_options_request::Builder {
        crate::model::launch_template_spot_market_options_request::Builder::default()
    }
}

/// <p> Describes an elastic inference accelerator. </p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LaunchTemplateElasticInferenceAccelerator {
    /// <p> The type of elastic inference accelerator. The possible values are eia1.medium, eia1.large, and eia1.xlarge. </p>
    #[doc(hidden)]
    pub r#type: std::option::Option<std::string::String>,
    /// <p> The number of elastic inference accelerators to attach to the instance. </p>
    /// <p>Default: 1</p>
    #[doc(hidden)]
    pub count: std::option::Option<i32>,
}
impl LaunchTemplateElasticInferenceAccelerator {
    /// <p> The type of elastic inference accelerator. The possible values are eia1.medium, eia1.large, and eia1.xlarge. </p>
    pub fn r#type(&self) -> std::option::Option<&str> {
        self.r#type.as_deref()
    }
    /// <p> The number of elastic inference accelerators to attach to the instance. </p>
    /// <p>Default: 1</p>
    pub fn count(&self) -> std::option::Option<i32> {
        self.count
    }
}
/// See [`LaunchTemplateElasticInferenceAccelerator`](crate::model::LaunchTemplateElasticInferenceAccelerator).
pub mod launch_template_elastic_inference_accelerator {

    /// A builder for [`LaunchTemplateElasticInferenceAccelerator`](crate::model::LaunchTemplateElasticInferenceAccelerator).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) r#type: std::option::Option<std::string::String>,
        pub(crate) count: std::option::Option<i32>,
    }
    impl Builder {
        /// <p> The type of elastic inference accelerator. The possible values are eia1.medium, eia1.large, and eia1.xlarge. </p>
        pub fn r#type(mut self, input: impl Into<std::string::String>) -> Self {
            self.r#type = Some(input.into());
            self
        }
        /// <p> The type of elastic inference accelerator. The possible values are eia1.medium, eia1.large, and eia1.xlarge. </p>
        pub fn set_type(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.r#type = input;
            self
        }
        /// <p> The number of elastic inference accelerators to attach to the instance. </p>
        /// <p>Default: 1</p>
        pub fn count(mut self, input: i32) -> Self {
            self.count = Some(input);
            self
        }
        /// <p> The number of elastic inference accelerators to attach to the instance. </p>
        /// <p>Default: 1</p>
        pub fn set_count(mut self, input: std::option::Option<i32>) -> Self {
            self.count = input;
            self
        }
        /// Consumes the builder and constructs a [`LaunchTemplateElasticInferenceAccelerator`](crate::model::LaunchTemplateElasticInferenceAccelerator).
        pub fn build(self) -> crate::model::LaunchTemplateElasticInferenceAccelerator {
            crate::model::LaunchTemplateElasticInferenceAccelerator {
                r#type: self.r#type,
                count: self.count,
            }
        }
    }
}
impl LaunchTemplateElasticInferenceAccelerator {
    /// Creates a new builder-style object to manufacture [`LaunchTemplateElasticInferenceAccelerator`](crate::model::LaunchTemplateElasticInferenceAccelerator).
    pub fn builder() -> crate::model::launch_template_elastic_inference_accelerator::Builder {
        crate::model::launch_template_elastic_inference_accelerator::Builder::default()
    }
}

/// <p>The tags specification for the resources that are created during instance launch.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LaunchTemplateTagSpecificationRequest {
    /// <p>The type of resource to tag.</p>
    /// <p>The <code>Valid Values</code> are all the resource types that can be tagged. However, when creating a launch template, you can specify tags for the following resource types only: <code>instance</code> | <code>volume</code> | <code>elastic-gpu</code> | <code>network-interface</code> | <code>spot-instances-request</code> </p>
    /// <p>To tag a resource after it has been created, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTags.html">CreateTags</a>.</p>
    #[doc(hidden)]
    pub resource_type: std::option::Option<crate::model::ResourceType>,
    /// <p>The tags to apply to the resource.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl LaunchTemplateTagSpecificationRequest {
    /// <p>The type of resource to tag.</p>
    /// <p>The <code>Valid Values</code> are all the resource types that can be tagged. However, when creating a launch template, you can specify tags for the following resource types only: <code>instance</code> | <code>volume</code> | <code>elastic-gpu</code> | <code>network-interface</code> | <code>spot-instances-request</code> </p>
    /// <p>To tag a resource after it has been created, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTags.html">CreateTags</a>.</p>
    pub fn resource_type(&self) -> std::option::Option<&crate::model::ResourceType> {
        self.resource_type.as_ref()
    }
    /// <p>The tags to apply to the resource.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.tags.as_deref()
    }
}
/// See [`LaunchTemplateTagSpecificationRequest`](crate::model::LaunchTemplateTagSpecificationRequest).
pub mod launch_template_tag_specification_request {

    /// A builder for [`LaunchTemplateTagSpecificationRequest`](crate::model::LaunchTemplateTagSpecificationRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) resource_type: std::option::Option<crate::model::ResourceType>,
        pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    }
    impl Builder {
        /// <p>The type of resource to tag.</p>
        /// <p>The <code>Valid Values</code> are all the resource types that can be tagged. However, when creating a launch template, you can specify tags for the following resource types only: <code>instance</code> | <code>volume</code> | <code>elastic-gpu</code> | <code>network-interface</code> | <code>spot-instances-request</code> </p>
        /// <p>To tag a resource after it has been created, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTags.html">CreateTags</a>.</p>
        pub fn resource_type(mut self, input: crate::model::ResourceType) -> Self {
            self.resource_type = Some(input);
            self
        }
        /// <p>The type of resource to tag.</p>
        /// <p>The <code>Valid Values</code> are all the resource types that can be tagged. However, when creating a launch template, you can specify tags for the following resource types only: <code>instance</code> | <code>volume</code> | <code>elastic-gpu</code> | <code>network-interface</code> | <code>spot-instances-request</code> </p>
        /// <p>To tag a resource after it has been created, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTags.html">CreateTags</a>.</p>
        pub fn set_resource_type(
            mut self,
            input: std::option::Option<crate::model::ResourceType>,
        ) -> Self {
            self.resource_type = input;
            self
        }
        /// Appends an item to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>The tags to apply to the resource.</p>
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.tags.unwrap_or_default();
            v.push(input);
            self.tags = Some(v);
            self
        }
        /// <p>The tags to apply to the resource.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.tags = input;
            self
        }
        /// Consumes the builder and constructs a [`LaunchTemplateTagSpecificationRequest`](crate::model::LaunchTemplateTagSpecificationRequest).
        pub fn build(self) -> crate::model::LaunchTemplateTagSpecificationRequest {
            crate::model::LaunchTemplateTagSpecificationRequest {
                resource_type: self.resource_type,
                tags: self.tags,
            }
        }
    }
}
impl LaunchTemplateTagSpecificationRequest {
    /// Creates a new builder-style object to manufacture [`LaunchTemplateTagSpecificationRequest`](crate::model::LaunchTemplateTagSpecificationRequest).
    pub fn builder() -> crate::model::launch_template_tag_specification_request::Builder {
        crate::model::launch_template_tag_specification_request::Builder::default()
    }
}

/// <p>Describes the placement of an instance.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LaunchTemplatePlacementRequest {
    /// <p>The Availability Zone for the instance.</p>
    #[doc(hidden)]
    pub availability_zone: std::option::Option<std::string::String>,
    /// <p>The affinity setting for an instance on a Dedicated Host.</p>
    #[doc(hidden)]
    pub affinity: std::option::Option<std::string::String>,
    /// <p>The name of the placement group for the instance.</p>
    #[doc(hidden)]
    pub group_name: std::option::Option<std::string::String>,
    /// <p>The ID of the Dedicated Host for the instance.</p>
    #[doc(hidden)]
    pub host_id: std::option::Option<std::string::String>,
    /// <p>The tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of dedicated runs on single-tenant hardware.</p>
    #[doc(hidden)]
    pub tenancy: std::option::Option<crate::model::Tenancy>,
    /// <p>Reserved for future use.</p>
    #[doc(hidden)]
    pub spread_domain: std::option::Option<std::string::String>,
    /// <p>The ARN of the host resource group in which to launch the instances. If you specify a host resource group ARN, omit the <b>Tenancy</b> parameter or set it to <code>host</code>.</p>
    #[doc(hidden)]
    pub host_resource_group_arn: std::option::Option<std::string::String>,
    /// <p>The number of the partition the instance should launch in. Valid only if the placement group strategy is set to <code>partition</code>.</p>
    #[doc(hidden)]
    pub partition_number: std::option::Option<i32>,
    /// <p>The Group Id of a placement group. You must specify the Placement Group <b>Group Id</b> to launch an instance in a shared placement group.</p>
    #[doc(hidden)]
    pub group_id: std::option::Option<std::string::String>,
}
impl LaunchTemplatePlacementRequest {
    /// <p>The Availability Zone for the instance.</p>
    pub fn availability_zone(&self) -> std::option::Option<&str> {
        self.availability_zone.as_deref()
    }
    /// <p>The affinity setting for an instance on a Dedicated Host.</p>
    pub fn affinity(&self) -> std::option::Option<&str> {
        self.affinity.as_deref()
    }
    /// <p>The name of the placement group for the instance.</p>
    pub fn group_name(&self) -> std::option::Option<&str> {
        self.group_name.as_deref()
    }
    /// <p>The ID of the Dedicated Host for the instance.</p>
    pub fn host_id(&self) -> std::option::Option<&str> {
        self.host_id.as_deref()
    }
    /// <p>The tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of dedicated runs on single-tenant hardware.</p>
    pub fn tenancy(&self) -> std::option::Option<&crate::model::Tenancy> {
        self.tenancy.as_ref()
    }
    /// <p>Reserved for future use.</p>
    pub fn spread_domain(&self) -> std::option::Option<&str> {
        self.spread_domain.as_deref()
    }
    /// <p>The ARN of the host resource group in which to launch the instances. If you specify a host resource group ARN, omit the <b>Tenancy</b> parameter or set it to <code>host</code>.</p>
    pub fn host_resource_group_arn(&self) -> std::option::Option<&str> {
        self.host_resource_group_arn.as_deref()
    }
    /// <p>The number of the partition the instance should launch in. Valid only if the placement group strategy is set to <code>partition</code>.</p>
    pub fn partition_number(&self) -> std::option::Option<i32> {
        self.partition_number
    }
    /// <p>The Group Id of a placement group. You must specify the Placement Group <b>Group Id</b> to launch an instance in a shared placement group.</p>
    pub fn group_id(&self) -> std::option::Option<&str> {
        self.group_id.as_deref()
    }
}
/// See [`LaunchTemplatePlacementRequest`](crate::model::LaunchTemplatePlacementRequest).
pub mod launch_template_placement_request {

    /// A builder for [`LaunchTemplatePlacementRequest`](crate::model::LaunchTemplatePlacementRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) availability_zone: std::option::Option<std::string::String>,
        pub(crate) affinity: std::option::Option<std::string::String>,
        pub(crate) group_name: std::option::Option<std::string::String>,
        pub(crate) host_id: std::option::Option<std::string::String>,
        pub(crate) tenancy: std::option::Option<crate::model::Tenancy>,
        pub(crate) spread_domain: std::option::Option<std::string::String>,
        pub(crate) host_resource_group_arn: std::option::Option<std::string::String>,
        pub(crate) partition_number: std::option::Option<i32>,
        pub(crate) group_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The Availability Zone for the instance.</p>
        pub fn availability_zone(mut self, input: impl Into<std::string::String>) -> Self {
            self.availability_zone = Some(input.into());
            self
        }
        /// <p>The Availability Zone for the instance.</p>
        pub fn set_availability_zone(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.availability_zone = input;
            self
        }
        /// <p>The affinity setting for an instance on a Dedicated Host.</p>
        pub fn affinity(mut self, input: impl Into<std::string::String>) -> Self {
            self.affinity = Some(input.into());
            self
        }
        /// <p>The affinity setting for an instance on a Dedicated Host.</p>
        pub fn set_affinity(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.affinity = input;
            self
        }
        /// <p>The name of the placement group for the instance.</p>
        pub fn group_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.group_name = Some(input.into());
            self
        }
        /// <p>The name of the placement group for the instance.</p>
        pub fn set_group_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.group_name = input;
            self
        }
        /// <p>The ID of the Dedicated Host for the instance.</p>
        pub fn host_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.host_id = Some(input.into());
            self
        }
        /// <p>The ID of the Dedicated Host for the instance.</p>
        pub fn set_host_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.host_id = input;
            self
        }
        /// <p>The tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of dedicated runs on single-tenant hardware.</p>
        pub fn tenancy(mut self, input: crate::model::Tenancy) -> Self {
            self.tenancy = Some(input);
            self
        }
        /// <p>The tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of dedicated runs on single-tenant hardware.</p>
        pub fn set_tenancy(mut self, input: std::option::Option<crate::model::Tenancy>) -> Self {
            self.tenancy = input;
            self
        }
        /// <p>Reserved for future use.</p>
        pub fn spread_domain(mut self, input: impl Into<std::string::String>) -> Self {
            self.spread_domain = Some(input.into());
            self
        }
        /// <p>Reserved for future use.</p>
        pub fn set_spread_domain(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.spread_domain = input;
            self
        }
        /// <p>The ARN of the host resource group in which to launch the instances. If you specify a host resource group ARN, omit the <b>Tenancy</b> parameter or set it to <code>host</code>.</p>
        pub fn host_resource_group_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.host_resource_group_arn = Some(input.into());
            self
        }
        /// <p>The ARN of the host resource group in which to launch the instances. If you specify a host resource group ARN, omit the <b>Tenancy</b> parameter or set it to <code>host</code>.</p>
        pub fn set_host_resource_group_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.host_resource_group_arn = input;
            self
        }
        /// <p>The number of the partition the instance should launch in. Valid only if the placement group strategy is set to <code>partition</code>.</p>
        pub fn partition_number(mut self, input: i32) -> Self {
            self.partition_number = Some(input);
            self
        }
        /// <p>The number of the partition the instance should launch in. Valid only if the placement group strategy is set to <code>partition</code>.</p>
        pub fn set_partition_number(mut self, input: std::option::Option<i32>) -> Self {
            self.partition_number = input;
            self
        }
        /// <p>The Group Id of a placement group. You must specify the Placement Group <b>Group Id</b> to launch an instance in a shared placement group.</p>
        pub fn group_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.group_id = Some(input.into());
            self
        }
        /// <p>The Group Id of a placement group. You must specify the Placement Group <b>Group Id</b> to launch an instance in a shared placement group.</p>
        pub fn set_group_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.group_id = input;
            self
        }
        /// Consumes the builder and constructs a [`LaunchTemplatePlacementRequest`](crate::model::LaunchTemplatePlacementRequest).
        pub fn build(self) -> crate::model::LaunchTemplatePlacementRequest {
            crate::model::LaunchTemplatePlacementRequest {
                availability_zone: self.availability_zone,
                affinity: self.affinity,
                group_name: self.group_name,
                host_id: self.host_id,
                tenancy: self.tenancy,
                spread_domain: self.spread_domain,
                host_resource_group_arn: self.host_resource_group_arn,
                partition_number: self.partition_number,
                group_id: self.group_id,
            }
        }
    }
}
impl LaunchTemplatePlacementRequest {
    /// Creates a new builder-style object to manufacture [`LaunchTemplatePlacementRequest`](crate::model::LaunchTemplatePlacementRequest).
    pub fn builder() -> crate::model::launch_template_placement_request::Builder {
        crate::model::launch_template_placement_request::Builder::default()
    }
}

/// <p>Describes the monitoring for the instance.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LaunchTemplatesMonitoringRequest {
    /// <p>Specify <code>true</code> to enable detailed monitoring. Otherwise, basic monitoring is enabled.</p>
    #[doc(hidden)]
    pub enabled: std::option::Option<bool>,
}
impl LaunchTemplatesMonitoringRequest {
    /// <p>Specify <code>true</code> to enable detailed monitoring. Otherwise, basic monitoring is enabled.</p>
    pub fn enabled(&self) -> std::option::Option<bool> {
        self.enabled
    }
}
/// See [`LaunchTemplatesMonitoringRequest`](crate::model::LaunchTemplatesMonitoringRequest).
pub mod launch_templates_monitoring_request {

    /// A builder for [`LaunchTemplatesMonitoringRequest`](crate::model::LaunchTemplatesMonitoringRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) enabled: std::option::Option<bool>,
    }
    impl Builder {
        /// <p>Specify <code>true</code> to enable detailed monitoring. Otherwise, basic monitoring is enabled.</p>
        pub fn enabled(mut self, input: bool) -> Self {
            self.enabled = Some(input);
            self
        }
        /// <p>Specify <code>true</code> to enable detailed monitoring. Otherwise, basic monitoring is enabled.</p>
        pub fn set_enabled(mut self, input: std::option::Option<bool>) -> Self {
            self.enabled = input;
            self
        }
        /// Consumes the builder and constructs a [`LaunchTemplatesMonitoringRequest`](crate::model::LaunchTemplatesMonitoringRequest).
        pub fn build(self) -> crate::model::LaunchTemplatesMonitoringRequest {
            crate::model::LaunchTemplatesMonitoringRequest {
                enabled: self.enabled,
            }
        }
    }
}
impl LaunchTemplatesMonitoringRequest {
    /// Creates a new builder-style object to manufacture [`LaunchTemplatesMonitoringRequest`](crate::model::LaunchTemplatesMonitoringRequest).
    pub fn builder() -> crate::model::launch_templates_monitoring_request::Builder {
        crate::model::launch_templates_monitoring_request::Builder::default()
    }
}

/// <p>The parameters for a network interface.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LaunchTemplateInstanceNetworkInterfaceSpecificationRequest {
    /// <p>Associates a Carrier IP address with eth0 for a new network interface.</p>
    /// <p>Use this option when you launch an instance in a Wavelength Zone and want to associate a Carrier IP address with the network interface. For more information about Carrier IP addresses, see <a href="https://docs.aws.amazon.com/wavelength/latest/developerguide/how-wavelengths-work.html#provider-owned-ip">Carrier IP addresses</a> in the <i>Wavelength Developer Guide</i>.</p>
    #[doc(hidden)]
    pub associate_carrier_ip_address: std::option::Option<bool>,
    /// <p>Associates a public IPv4 address with eth0 for a new network interface.</p>
    #[doc(hidden)]
    pub associate_public_ip_address: std::option::Option<bool>,
    /// <p>Indicates whether the network interface is deleted when the instance is terminated.</p>
    #[doc(hidden)]
    pub delete_on_termination: std::option::Option<bool>,
    /// <p>A description for the network interface.</p>
    #[doc(hidden)]
    pub description: std::option::Option<std::string::String>,
    /// <p>The device index for the network interface attachment.</p>
    #[doc(hidden)]
    pub device_index: std::option::Option<i32>,
    /// <p>The IDs of one or more security groups.</p>
    #[doc(hidden)]
    pub groups: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>The type of network interface. To create an Elastic Fabric Adapter (EFA), specify <code>efa</code>. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/efa.html">Elastic Fabric Adapter</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
    /// <p>If you are not creating an EFA, specify <code>interface</code> or omit this parameter.</p>
    /// <p>Valid values: <code>interface</code> | <code>efa</code> </p>
    #[doc(hidden)]
    pub interface_type: std::option::Option<std::string::String>,
    /// <p>The number of IPv6 addresses to assign to a network interface. Amazon EC2 automatically selects the IPv6 addresses from the subnet range. You can't use this option if specifying specific IPv6 addresses.</p>
    #[doc(hidden)]
    pub ipv6_address_count: std::option::Option<i32>,
    /// <p>One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet. You can't use this option if you're specifying a number of IPv6 addresses.</p>
    #[doc(hidden)]
    pub ipv6_addresses:
        std::option::Option<std::vec::Vec<crate::model::InstanceIpv6AddressRequest>>,
    /// <p>The ID of the network interface.</p>
    #[doc(hidden)]
    pub network_interface_id: std::option::Option<std::string::String>,
    /// <p>The primary private IPv4 address of the network interface.</p>
    #[doc(hidden)]
    pub private_ip_address: std::option::Option<std::string::String>,
    /// <p>One or more private IPv4 addresses.</p>
    #[doc(hidden)]
    pub private_ip_addresses:
        std::option::Option<std::vec::Vec<crate::model::PrivateIpAddressSpecification>>,
    /// <p>The number of secondary private IPv4 addresses to assign to a network interface.</p>
    #[doc(hidden)]
    pub secondary_private_ip_address_count: std::option::Option<i32>,
    /// <p>The ID of the subnet for the network interface.</p>
    #[doc(hidden)]
    pub subnet_id: std::option::Option<std::string::String>,
    /// <p>The index of the network card. Some instance types support multiple network cards. The primary network interface must be assigned to network card index 0. The default is network card index 0.</p>
    #[doc(hidden)]
    pub network_card_index: std::option::Option<i32>,
    /// <p>One or more IPv4 prefixes to be assigned to the network interface. You cannot use this option if you use the <code>Ipv4PrefixCount</code> option.</p>
    #[doc(hidden)]
    pub ipv4_prefixes:
        std::option::Option<std::vec::Vec<crate::model::Ipv4PrefixSpecificationRequest>>,
    /// <p>The number of IPv4 prefixes to be automatically assigned to the network interface. You cannot use this option if you use the <code>Ipv4Prefix</code> option.</p>
    #[doc(hidden)]
    pub ipv4_prefix_count: std::option::Option<i32>,
    /// <p>One or more IPv6 prefixes to be assigned to the network interface. You cannot use this option if you use the <code>Ipv6PrefixCount</code> option.</p>
    #[doc(hidden)]
    pub ipv6_prefixes:
        std::option::Option<std::vec::Vec<crate::model::Ipv6PrefixSpecificationRequest>>,
    /// <p>The number of IPv6 prefixes to be automatically assigned to the network interface. You cannot use this option if you use the <code>Ipv6Prefix</code> option.</p>
    #[doc(hidden)]
    pub ipv6_prefix_count: std::option::Option<i32>,
}
impl LaunchTemplateInstanceNetworkInterfaceSpecificationRequest {
    /// <p>Associates a Carrier IP address with eth0 for a new network interface.</p>
    /// <p>Use this option when you launch an instance in a Wavelength Zone and want to associate a Carrier IP address with the network interface. For more information about Carrier IP addresses, see <a href="https://docs.aws.amazon.com/wavelength/latest/developerguide/how-wavelengths-work.html#provider-owned-ip">Carrier IP addresses</a> in the <i>Wavelength Developer Guide</i>.</p>
    pub fn associate_carrier_ip_address(&self) -> std::option::Option<bool> {
        self.associate_carrier_ip_address
    }
    /// <p>Associates a public IPv4 address with eth0 for a new network interface.</p>
    pub fn associate_public_ip_address(&self) -> std::option::Option<bool> {
        self.associate_public_ip_address
    }
    /// <p>Indicates whether the network interface is deleted when the instance is terminated.</p>
    pub fn delete_on_termination(&self) -> std::option::Option<bool> {
        self.delete_on_termination
    }
    /// <p>A description for the network interface.</p>
    pub fn description(&self) -> std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The device index for the network interface attachment.</p>
    pub fn device_index(&self) -> std::option::Option<i32> {
        self.device_index
    }
    /// <p>The IDs of one or more security groups.</p>
    pub fn groups(&self) -> std::option::Option<&[std::string::String]> {
        self.groups.as_deref()
    }
    /// <p>The type of network interface. To create an Elastic Fabric Adapter (EFA), specify <code>efa</code>. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/efa.html">Elastic Fabric Adapter</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
    /// <p>If you are not creating an EFA, specify <code>interface</code> or omit this parameter.</p>
    /// <p>Valid values: <code>interface</code> | <code>efa</code> </p>
    pub fn interface_type(&self) -> std::option::Option<&str> {
        self.interface_type.as_deref()
    }
    /// <p>The number of IPv6 addresses to assign to a network interface. Amazon EC2 automatically selects the IPv6 addresses from the subnet range. You can't use this option if specifying specific IPv6 addresses.</p>
    pub fn ipv6_address_count(&self) -> std::option::Option<i32> {
        self.ipv6_address_count
    }
    /// <p>One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet. You can't use this option if you're specifying a number of IPv6 addresses.</p>
    pub fn ipv6_addresses(
        &self,
    ) -> std::option::Option<&[crate::model::InstanceIpv6AddressRequest]> {
        self.ipv6_addresses.as_deref()
    }
    /// <p>The ID of the network interface.</p>
    pub fn network_interface_id(&self) -> std::option::Option<&str> {
        self.network_interface_id.as_deref()
    }
    /// <p>The primary private IPv4 address of the network interface.</p>
    pub fn private_ip_address(&self) -> std::option::Option<&str> {
        self.private_ip_address.as_deref()
    }
    /// <p>One or more private IPv4 addresses.</p>
    pub fn private_ip_addresses(
        &self,
    ) -> std::option::Option<&[crate::model::PrivateIpAddressSpecification]> {
        self.private_ip_addresses.as_deref()
    }
    /// <p>The number of secondary private IPv4 addresses to assign to a network interface.</p>
    pub fn secondary_private_ip_address_count(&self) -> std::option::Option<i32> {
        self.secondary_private_ip_address_count
    }
    /// <p>The ID of the subnet for the network interface.</p>
    pub fn subnet_id(&self) -> std::option::Option<&str> {
        self.subnet_id.as_deref()
    }
    /// <p>The index of the network card. Some instance types support multiple network cards. The primary network interface must be assigned to network card index 0. The default is network card index 0.</p>
    pub fn network_card_index(&self) -> std::option::Option<i32> {
        self.network_card_index
    }
    /// <p>One or more IPv4 prefixes to be assigned to the network interface. You cannot use this option if you use the <code>Ipv4PrefixCount</code> option.</p>
    pub fn ipv4_prefixes(
        &self,
    ) -> std::option::Option<&[crate::model::Ipv4PrefixSpecificationRequest]> {
        self.ipv4_prefixes.as_deref()
    }
    /// <p>The number of IPv4 prefixes to be automatically assigned to the network interface. You cannot use this option if you use the <code>Ipv4Prefix</code> option.</p>
    pub fn ipv4_prefix_count(&self) -> std::option::Option<i32> {
        self.ipv4_prefix_count
    }
    /// <p>One or more IPv6 prefixes to be assigned to the network interface. You cannot use this option if you use the <code>Ipv6PrefixCount</code> option.</p>
    pub fn ipv6_prefixes(
        &self,
    ) -> std::option::Option<&[crate::model::Ipv6PrefixSpecificationRequest]> {
        self.ipv6_prefixes.as_deref()
    }
    /// <p>The number of IPv6 prefixes to be automatically assigned to the network interface. You cannot use this option if you use the <code>Ipv6Prefix</code> option.</p>
    pub fn ipv6_prefix_count(&self) -> std::option::Option<i32> {
        self.ipv6_prefix_count
    }
}
/// See [`LaunchTemplateInstanceNetworkInterfaceSpecificationRequest`](crate::model::LaunchTemplateInstanceNetworkInterfaceSpecificationRequest).
pub mod launch_template_instance_network_interface_specification_request {

    /// A builder for [`LaunchTemplateInstanceNetworkInterfaceSpecificationRequest`](crate::model::LaunchTemplateInstanceNetworkInterfaceSpecificationRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) associate_carrier_ip_address: std::option::Option<bool>,
        pub(crate) associate_public_ip_address: std::option::Option<bool>,
        pub(crate) delete_on_termination: std::option::Option<bool>,
        pub(crate) description: std::option::Option<std::string::String>,
        pub(crate) device_index: std::option::Option<i32>,
        pub(crate) groups: std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) interface_type: std::option::Option<std::string::String>,
        pub(crate) ipv6_address_count: std::option::Option<i32>,
        pub(crate) ipv6_addresses:
            std::option::Option<std::vec::Vec<crate::model::InstanceIpv6AddressRequest>>,
        pub(crate) network_interface_id: std::option::Option<std::string::String>,
        pub(crate) private_ip_address: std::option::Option<std::string::String>,
        pub(crate) private_ip_addresses:
            std::option::Option<std::vec::Vec<crate::model::PrivateIpAddressSpecification>>,
        pub(crate) secondary_private_ip_address_count: std::option::Option<i32>,
        pub(crate) subnet_id: std::option::Option<std::string::String>,
        pub(crate) network_card_index: std::option::Option<i32>,
        pub(crate) ipv4_prefixes:
            std::option::Option<std::vec::Vec<crate::model::Ipv4PrefixSpecificationRequest>>,
        pub(crate) ipv4_prefix_count: std::option::Option<i32>,
        pub(crate) ipv6_prefixes:
            std::option::Option<std::vec::Vec<crate::model::Ipv6PrefixSpecificationRequest>>,
        pub(crate) ipv6_prefix_count: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>Associates a Carrier IP address with eth0 for a new network interface.</p>
        /// <p>Use this option when you launch an instance in a Wavelength Zone and want to associate a Carrier IP address with the network interface. For more information about Carrier IP addresses, see <a href="https://docs.aws.amazon.com/wavelength/latest/developerguide/how-wavelengths-work.html#provider-owned-ip">Carrier IP addresses</a> in the <i>Wavelength Developer Guide</i>.</p>
        pub fn associate_carrier_ip_address(mut self, input: bool) -> Self {
            self.associate_carrier_ip_address = Some(input);
            self
        }
        /// <p>Associates a Carrier IP address with eth0 for a new network interface.</p>
        /// <p>Use this option when you launch an instance in a Wavelength Zone and want to associate a Carrier IP address with the network interface. For more information about Carrier IP addresses, see <a href="https://docs.aws.amazon.com/wavelength/latest/developerguide/how-wavelengths-work.html#provider-owned-ip">Carrier IP addresses</a> in the <i>Wavelength Developer Guide</i>.</p>
        pub fn set_associate_carrier_ip_address(
            mut self,
            input: std::option::Option<bool>,
        ) -> Self {
            self.associate_carrier_ip_address = input;
            self
        }
        /// <p>Associates a public IPv4 address with eth0 for a new network interface.</p>
        pub fn associate_public_ip_address(mut self, input: bool) -> Self {
            self.associate_public_ip_address = Some(input);
            self
        }
        /// <p>Associates a public IPv4 address with eth0 for a new network interface.</p>
        pub fn set_associate_public_ip_address(mut self, input: std::option::Option<bool>) -> Self {
            self.associate_public_ip_address = input;
            self
        }
        /// <p>Indicates whether the network interface is deleted when the instance is terminated.</p>
        pub fn delete_on_termination(mut self, input: bool) -> Self {
            self.delete_on_termination = Some(input);
            self
        }
        /// <p>Indicates whether the network interface is deleted when the instance is terminated.</p>
        pub fn set_delete_on_termination(mut self, input: std::option::Option<bool>) -> Self {
            self.delete_on_termination = input;
            self
        }
        /// <p>A description for the network interface.</p>
        pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
            self.description = Some(input.into());
            self
        }
        /// <p>A description for the network interface.</p>
        pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.description = input;
            self
        }
        /// <p>The device index for the network interface attachment.</p>
        pub fn device_index(mut self, input: i32) -> Self {
            self.device_index = Some(input);
            self
        }
        /// <p>The device index for the network interface attachment.</p>
        pub fn set_device_index(mut self, input: std::option::Option<i32>) -> Self {
            self.device_index = input;
            self
        }
        /// Appends an item to `groups`.
        ///
        /// To override the contents of this collection use [`set_groups`](Self::set_groups).
        ///
        /// <p>The IDs of one or more security groups.</p>
        pub fn groups(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.groups.unwrap_or_default();
            v.push(input.into());
            self.groups = Some(v);
            self
        }
        /// <p>The IDs of one or more security groups.</p>
        pub fn set_groups(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.groups = input;
            self
        }
        /// <p>The type of network interface. To create an Elastic Fabric Adapter (EFA), specify <code>efa</code>. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/efa.html">Elastic Fabric Adapter</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
        /// <p>If you are not creating an EFA, specify <code>interface</code> or omit this parameter.</p>
        /// <p>Valid values: <code>interface</code> | <code>efa</code> </p>
        pub fn interface_type(mut self, input: impl Into<std::string::String>) -> Self {
            self.interface_type = Some(input.into());
            self
        }
        /// <p>The type of network interface. To create an Elastic Fabric Adapter (EFA), specify <code>efa</code>. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/efa.html">Elastic Fabric Adapter</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
        /// <p>If you are not creating an EFA, specify <code>interface</code> or omit this parameter.</p>
        /// <p>Valid values: <code>interface</code> | <code>efa</code> </p>
        pub fn set_interface_type(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.interface_type = input;
            self
        }
        /// <p>The number of IPv6 addresses to assign to a network interface. Amazon EC2 automatically selects the IPv6 addresses from the subnet range. You can't use this option if specifying specific IPv6 addresses.</p>
        pub fn ipv6_address_count(mut self, input: i32) -> Self {
            self.ipv6_address_count = Some(input);
            self
        }
        /// <p>The number of IPv6 addresses to assign to a network interface. Amazon EC2 automatically selects the IPv6 addresses from the subnet range. You can't use this option if specifying specific IPv6 addresses.</p>
        pub fn set_ipv6_address_count(mut self, input: std::option::Option<i32>) -> Self {
            self.ipv6_address_count = input;
            self
        }
        /// Appends an item to `ipv6_addresses`.
        ///
        /// To override the contents of this collection use [`set_ipv6_addresses`](Self::set_ipv6_addresses).
        ///
        /// <p>One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet. You can't use this option if you're specifying a number of IPv6 addresses.</p>
        pub fn ipv6_addresses(mut self, input: crate::model::InstanceIpv6AddressRequest) -> Self {
            let mut v = self.ipv6_addresses.unwrap_or_default();
            v.push(input);
            self.ipv6_addresses = Some(v);
            self
        }
        /// <p>One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet. You can't use this option if you're specifying a number of IPv6 addresses.</p>
        pub fn set_ipv6_addresses(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::InstanceIpv6AddressRequest>>,
        ) -> Self {
            self.ipv6_addresses = input;
            self
        }
        /// <p>The ID of the network interface.</p>
        pub fn network_interface_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.network_interface_id = Some(input.into());
            self
        }
        /// <p>The ID of the network interface.</p>
        pub fn set_network_interface_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.network_interface_id = input;
            self
        }
        /// <p>The primary private IPv4 address of the network interface.</p>
        pub fn private_ip_address(mut self, input: impl Into<std::string::String>) -> Self {
            self.private_ip_address = Some(input.into());
            self
        }
        /// <p>The primary private IPv4 address of the network interface.</p>
        pub fn set_private_ip_address(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.private_ip_address = input;
            self
        }
        /// Appends an item to `private_ip_addresses`.
        ///
        /// To override the contents of this collection use [`set_private_ip_addresses`](Self::set_private_ip_addresses).
        ///
        /// <p>One or more private IPv4 addresses.</p>
        pub fn private_ip_addresses(
            mut self,
            input: crate::model::PrivateIpAddressSpecification,
        ) -> Self {
            let mut v = self.private_ip_addresses.unwrap_or_default();
            v.push(input);
            self.private_ip_addresses = Some(v);
            self
        }
        /// <p>One or more private IPv4 addresses.</p>
        pub fn set_private_ip_addresses(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::PrivateIpAddressSpecification>>,
        ) -> Self {
            self.private_ip_addresses = input;
            self
        }
        /// <p>The number of secondary private IPv4 addresses to assign to a network interface.</p>
        pub fn secondary_private_ip_address_count(mut self, input: i32) -> Self {
            self.secondary_private_ip_address_count = Some(input);
            self
        }
        /// <p>The number of secondary private IPv4 addresses to assign to a network interface.</p>
        pub fn set_secondary_private_ip_address_count(
            mut self,
            input: std::option::Option<i32>,
        ) -> Self {
            self.secondary_private_ip_address_count = input;
            self
        }
        /// <p>The ID of the subnet for the network interface.</p>
        pub fn subnet_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.subnet_id = Some(input.into());
            self
        }
        /// <p>The ID of the subnet for the network interface.</p>
        pub fn set_subnet_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.subnet_id = input;
            self
        }
        /// <p>The index of the network card. Some instance types support multiple network cards. The primary network interface must be assigned to network card index 0. The default is network card index 0.</p>
        pub fn network_card_index(mut self, input: i32) -> Self {
            self.network_card_index = Some(input);
            self
        }
        /// <p>The index of the network card. Some instance types support multiple network cards. The primary network interface must be assigned to network card index 0. The default is network card index 0.</p>
        pub fn set_network_card_index(mut self, input: std::option::Option<i32>) -> Self {
            self.network_card_index = input;
            self
        }
        /// Appends an item to `ipv4_prefixes`.
        ///
        /// To override the contents of this collection use [`set_ipv4_prefixes`](Self::set_ipv4_prefixes).
        ///
        /// <p>One or more IPv4 prefixes to be assigned to the network interface. You cannot use this option if you use the <code>Ipv4PrefixCount</code> option.</p>
        pub fn ipv4_prefixes(
            mut self,
            input: crate::model::Ipv4PrefixSpecificationRequest,
        ) -> Self {
            let mut v = self.ipv4_prefixes.unwrap_or_default();
            v.push(input);
            self.ipv4_prefixes = Some(v);
            self
        }
        /// <p>One or more IPv4 prefixes to be assigned to the network interface. You cannot use this option if you use the <code>Ipv4PrefixCount</code> option.</p>
        pub fn set_ipv4_prefixes(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Ipv4PrefixSpecificationRequest>>,
        ) -> Self {
            self.ipv4_prefixes = input;
            self
        }
        /// <p>The number of IPv4 prefixes to be automatically assigned to the network interface. You cannot use this option if you use the <code>Ipv4Prefix</code> option.</p>
        pub fn ipv4_prefix_count(mut self, input: i32) -> Self {
            self.ipv4_prefix_count = Some(input);
            self
        }
        /// <p>The number of IPv4 prefixes to be automatically assigned to the network interface. You cannot use this option if you use the <code>Ipv4Prefix</code> option.</p>
        pub fn set_ipv4_prefix_count(mut self, input: std::option::Option<i32>) -> Self {
            self.ipv4_prefix_count = input;
            self
        }
        /// Appends an item to `ipv6_prefixes`.
        ///
        /// To override the contents of this collection use [`set_ipv6_prefixes`](Self::set_ipv6_prefixes).
        ///
        /// <p>One or more IPv6 prefixes to be assigned to the network interface. You cannot use this option if you use the <code>Ipv6PrefixCount</code> option.</p>
        pub fn ipv6_prefixes(
            mut self,
            input: crate::model::Ipv6PrefixSpecificationRequest,
        ) -> Self {
            let mut v = self.ipv6_prefixes.unwrap_or_default();
            v.push(input);
            self.ipv6_prefixes = Some(v);
            self
        }
        /// <p>One or more IPv6 prefixes to be assigned to the network interface. You cannot use this option if you use the <code>Ipv6PrefixCount</code> option.</p>
        pub fn set_ipv6_prefixes(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Ipv6PrefixSpecificationRequest>>,
        ) -> Self {
            self.ipv6_prefixes = input;
            self
        }
        /// <p>The number of IPv6 prefixes to be automatically assigned to the network interface. You cannot use this option if you use the <code>Ipv6Prefix</code> option.</p>
        pub fn ipv6_prefix_count(mut self, input: i32) -> Self {
            self.ipv6_prefix_count = Some(input);
            self
        }
        /// <p>The number of IPv6 prefixes to be automatically assigned to the network interface. You cannot use this option if you use the <code>Ipv6Prefix</code> option.</p>
        pub fn set_ipv6_prefix_count(mut self, input: std::option::Option<i32>) -> Self {
            self.ipv6_prefix_count = input;
            self
        }
        /// Consumes the builder and constructs a [`LaunchTemplateInstanceNetworkInterfaceSpecificationRequest`](crate::model::LaunchTemplateInstanceNetworkInterfaceSpecificationRequest).
        pub fn build(
            self,
        ) -> crate::model::LaunchTemplateInstanceNetworkInterfaceSpecificationRequest {
            crate::model::LaunchTemplateInstanceNetworkInterfaceSpecificationRequest {
                associate_carrier_ip_address: self.associate_carrier_ip_address,
                associate_public_ip_address: self.associate_public_ip_address,
                delete_on_termination: self.delete_on_termination,
                description: self.description,
                device_index: self.device_index,
                groups: self.groups,
                interface_type: self.interface_type,
                ipv6_address_count: self.ipv6_address_count,
                ipv6_addresses: self.ipv6_addresses,
                network_interface_id: self.network_interface_id,
                private_ip_address: self.private_ip_address,
                private_ip_addresses: self.private_ip_addresses,
                secondary_private_ip_address_count: self.secondary_private_ip_address_count,
                subnet_id: self.subnet_id,
                network_card_index: self.network_card_index,
                ipv4_prefixes: self.ipv4_prefixes,
                ipv4_prefix_count: self.ipv4_prefix_count,
                ipv6_prefixes: self.ipv6_prefixes,
                ipv6_prefix_count: self.ipv6_prefix_count,
            }
        }
    }
}
impl LaunchTemplateInstanceNetworkInterfaceSpecificationRequest {
    /// Creates a new builder-style object to manufacture [`LaunchTemplateInstanceNetworkInterfaceSpecificationRequest`](crate::model::LaunchTemplateInstanceNetworkInterfaceSpecificationRequest).
    pub fn builder(
    ) -> crate::model::launch_template_instance_network_interface_specification_request::Builder
    {
        crate::model::launch_template_instance_network_interface_specification_request::Builder::default()
    }
}

/// <p>Describes an IPv6 address.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InstanceIpv6AddressRequest {
    /// <p>The IPv6 address.</p>
    #[doc(hidden)]
    pub ipv6_address: std::option::Option<std::string::String>,
}
impl InstanceIpv6AddressRequest {
    /// <p>The IPv6 address.</p>
    pub fn ipv6_address(&self) -> std::option::Option<&str> {
        self.ipv6_address.as_deref()
    }
}
/// See [`InstanceIpv6AddressRequest`](crate::model::InstanceIpv6AddressRequest).
pub mod instance_ipv6_address_request {

    /// A builder for [`InstanceIpv6AddressRequest`](crate::model::InstanceIpv6AddressRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) ipv6_address: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The IPv6 address.</p>
        pub fn ipv6_address(mut self, input: impl Into<std::string::String>) -> Self {
            self.ipv6_address = Some(input.into());
            self
        }
        /// <p>The IPv6 address.</p>
        pub fn set_ipv6_address(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.ipv6_address = input;
            self
        }
        /// Consumes the builder and constructs a [`InstanceIpv6AddressRequest`](crate::model::InstanceIpv6AddressRequest).
        pub fn build(self) -> crate::model::InstanceIpv6AddressRequest {
            crate::model::InstanceIpv6AddressRequest {
                ipv6_address: self.ipv6_address,
            }
        }
    }
}
impl InstanceIpv6AddressRequest {
    /// Creates a new builder-style object to manufacture [`InstanceIpv6AddressRequest`](crate::model::InstanceIpv6AddressRequest).
    pub fn builder() -> crate::model::instance_ipv6_address_request::Builder {
        crate::model::instance_ipv6_address_request::Builder::default()
    }
}

/// <p>Describes a block device mapping.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LaunchTemplateBlockDeviceMappingRequest {
    /// <p>The device name (for example, /dev/sdh or xvdh).</p>
    #[doc(hidden)]
    pub device_name: std::option::Option<std::string::String>,
    /// <p>The virtual device name (ephemeralN). Instance store volumes are numbered starting from 0. An instance type with 2 available instance store volumes can specify mappings for ephemeral0 and ephemeral1. The number of available instance store volumes depends on the instance type. After you connect to the instance, you must mount the volume.</p>
    #[doc(hidden)]
    pub virtual_name: std::option::Option<std::string::String>,
    /// <p>Parameters used to automatically set up EBS volumes when the instance is launched.</p>
    #[doc(hidden)]
    pub ebs: std::option::Option<crate::model::LaunchTemplateEbsBlockDeviceRequest>,
    /// <p>To omit the device from the block device mapping, specify an empty string.</p>
    #[doc(hidden)]
    pub no_device: std::option::Option<std::string::String>,
}
impl LaunchTemplateBlockDeviceMappingRequest {
    /// <p>The device name (for example, /dev/sdh or xvdh).</p>
    pub fn device_name(&self) -> std::option::Option<&str> {
        self.device_name.as_deref()
    }
    /// <p>The virtual device name (ephemeralN). Instance store volumes are numbered starting from 0. An instance type with 2 available instance store volumes can specify mappings for ephemeral0 and ephemeral1. The number of available instance store volumes depends on the instance type. After you connect to the instance, you must mount the volume.</p>
    pub fn virtual_name(&self) -> std::option::Option<&str> {
        self.virtual_name.as_deref()
    }
    /// <p>Parameters used to automatically set up EBS volumes when the instance is launched.</p>
    pub fn ebs(&self) -> std::option::Option<&crate::model::LaunchTemplateEbsBlockDeviceRequest> {
        self.ebs.as_ref()
    }
    /// <p>To omit the device from the block device mapping, specify an empty string.</p>
    pub fn no_device(&self) -> std::option::Option<&str> {
        self.no_device.as_deref()
    }
}
/// See [`LaunchTemplateBlockDeviceMappingRequest`](crate::model::LaunchTemplateBlockDeviceMappingRequest).
pub mod launch_template_block_device_mapping_request {

    /// A builder for [`LaunchTemplateBlockDeviceMappingRequest`](crate::model::LaunchTemplateBlockDeviceMappingRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) device_name: std::option::Option<std::string::String>,
        pub(crate) virtual_name: std::option::Option<std::string::String>,
        pub(crate) ebs: std::option::Option<crate::model::LaunchTemplateEbsBlockDeviceRequest>,
        pub(crate) no_device: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The device name (for example, /dev/sdh or xvdh).</p>
        pub fn device_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.device_name = Some(input.into());
            self
        }
        /// <p>The device name (for example, /dev/sdh or xvdh).</p>
        pub fn set_device_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.device_name = input;
            self
        }
        /// <p>The virtual device name (ephemeralN). Instance store volumes are numbered starting from 0. An instance type with 2 available instance store volumes can specify mappings for ephemeral0 and ephemeral1. The number of available instance store volumes depends on the instance type. After you connect to the instance, you must mount the volume.</p>
        pub fn virtual_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.virtual_name = Some(input.into());
            self
        }
        /// <p>The virtual device name (ephemeralN). Instance store volumes are numbered starting from 0. An instance type with 2 available instance store volumes can specify mappings for ephemeral0 and ephemeral1. The number of available instance store volumes depends on the instance type. After you connect to the instance, you must mount the volume.</p>
        pub fn set_virtual_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.virtual_name = input;
            self
        }
        /// <p>Parameters used to automatically set up EBS volumes when the instance is launched.</p>
        pub fn ebs(mut self, input: crate::model::LaunchTemplateEbsBlockDeviceRequest) -> Self {
            self.ebs = Some(input);
            self
        }
        /// <p>Parameters used to automatically set up EBS volumes when the instance is launched.</p>
        pub fn set_ebs(
            mut self,
            input: std::option::Option<crate::model::LaunchTemplateEbsBlockDeviceRequest>,
        ) -> Self {
            self.ebs = input;
            self
        }
        /// <p>To omit the device from the block device mapping, specify an empty string.</p>
        pub fn no_device(mut self, input: impl Into<std::string::String>) -> Self {
            self.no_device = Some(input.into());
            self
        }
        /// <p>To omit the device from the block device mapping, specify an empty string.</p>
        pub fn set_no_device(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.no_device = input;
            self
        }
        /// Consumes the builder and constructs a [`LaunchTemplateBlockDeviceMappingRequest`](crate::model::LaunchTemplateBlockDeviceMappingRequest).
        pub fn build(self) -> crate::model::LaunchTemplateBlockDeviceMappingRequest {
            crate::model::LaunchTemplateBlockDeviceMappingRequest {
                device_name: self.device_name,
                virtual_name: self.virtual_name,
                ebs: self.ebs,
                no_device: self.no_device,
            }
        }
    }
}
impl LaunchTemplateBlockDeviceMappingRequest {
    /// Creates a new builder-style object to manufacture [`LaunchTemplateBlockDeviceMappingRequest`](crate::model::LaunchTemplateBlockDeviceMappingRequest).
    pub fn builder() -> crate::model::launch_template_block_device_mapping_request::Builder {
        crate::model::launch_template_block_device_mapping_request::Builder::default()
    }
}

/// <p>The parameters for a block device for an EBS volume.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LaunchTemplateEbsBlockDeviceRequest {
    /// <p>Indicates whether the EBS volume is encrypted. Encrypted volumes can only be attached to instances that support Amazon EBS encryption. If you are creating a volume from a snapshot, you can't specify an encryption value.</p>
    #[doc(hidden)]
    pub encrypted: std::option::Option<bool>,
    /// <p>Indicates whether the EBS volume is deleted on instance termination.</p>
    #[doc(hidden)]
    pub delete_on_termination: std::option::Option<bool>,
    /// <p>The number of I/O operations per second (IOPS). For <code>gp3</code>, <code>io1</code>, and <code>io2</code> volumes, this represents the number of IOPS that are provisioned for the volume. For <code>gp2</code> volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting.</p>
    /// <p>The following are the supported values for each volume type:</p>
    /// <ul>
    /// <li> <p> <code>gp3</code>: 3,000-16,000 IOPS</p> </li>
    /// <li> <p> <code>io1</code>: 100-64,000 IOPS</p> </li>
    /// <li> <p> <code>io2</code>: 100-64,000 IOPS</p> </li>
    /// </ul>
    /// <p>For <code>io1</code> and <code>io2</code> volumes, we guarantee 64,000 IOPS only for <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances">Instances built on the Nitro System</a>. Other instance families guarantee performance up to 32,000 IOPS.</p>
    /// <p>This parameter is supported for <code>io1</code>, <code>io2</code>, and <code>gp3</code> volumes only. This parameter is not supported for <code>gp2</code>, <code>st1</code>, <code>sc1</code>, or <code>standard</code> volumes.</p>
    #[doc(hidden)]
    pub iops: std::option::Option<i32>,
    /// <p>The ARN of the symmetric Key Management Service (KMS) CMK used for encryption.</p>
    #[doc(hidden)]
    pub kms_key_id: std::option::Option<std::string::String>,
    /// <p>The ID of the snapshot.</p>
    #[doc(hidden)]
    pub snapshot_id: std::option::Option<std::string::String>,
    /// <p>The size of the volume, in GiBs. You must specify either a snapshot ID or a volume size. The following are the supported volumes sizes for each volume type:</p>
    /// <ul>
    /// <li> <p> <code>gp2</code> and <code>gp3</code>: 1-16,384</p> </li>
    /// <li> <p> <code>io1</code> and <code>io2</code>: 4-16,384</p> </li>
    /// <li> <p> <code>st1</code> and <code>sc1</code>: 125-16,384</p> </li>
    /// <li> <p> <code>standard</code>: 1-1,024</p> </li>
    /// </ul>
    #[doc(hidden)]
    pub volume_size: std::option::Option<i32>,
    /// <p>The volume type. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html">Amazon EBS volume types</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
    #[doc(hidden)]
    pub volume_type: std::option::Option<crate::model::VolumeType>,
    /// <p>The throughput to provision for a <code>gp3</code> volume, with a maximum of 1,000 MiB/s.</p>
    /// <p>Valid Range: Minimum value of 125. Maximum value of 1000.</p>
    #[doc(hidden)]
    pub throughput: std::option::Option<i32>,
}
impl LaunchTemplateEbsBlockDeviceRequest {
    /// <p>Indicates whether the EBS volume is encrypted. Encrypted volumes can only be attached to instances that support Amazon EBS encryption. If you are creating a volume from a snapshot, you can't specify an encryption value.</p>
    pub fn encrypted(&self) -> std::option::Option<bool> {
        self.encrypted
    }
    /// <p>Indicates whether the EBS volume is deleted on instance termination.</p>
    pub fn delete_on_termination(&self) -> std::option::Option<bool> {
        self.delete_on_termination
    }
    /// <p>The number of I/O operations per second (IOPS). For <code>gp3</code>, <code>io1</code>, and <code>io2</code> volumes, this represents the number of IOPS that are provisioned for the volume. For <code>gp2</code> volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting.</p>
    /// <p>The following are the supported values for each volume type:</p>
    /// <ul>
    /// <li> <p> <code>gp3</code>: 3,000-16,000 IOPS</p> </li>
    /// <li> <p> <code>io1</code>: 100-64,000 IOPS</p> </li>
    /// <li> <p> <code>io2</code>: 100-64,000 IOPS</p> </li>
    /// </ul>
    /// <p>For <code>io1</code> and <code>io2</code> volumes, we guarantee 64,000 IOPS only for <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances">Instances built on the Nitro System</a>. Other instance families guarantee performance up to 32,000 IOPS.</p>
    /// <p>This parameter is supported for <code>io1</code>, <code>io2</code>, and <code>gp3</code> volumes only. This parameter is not supported for <code>gp2</code>, <code>st1</code>, <code>sc1</code>, or <code>standard</code> volumes.</p>
    pub fn iops(&self) -> std::option::Option<i32> {
        self.iops
    }
    /// <p>The ARN of the symmetric Key Management Service (KMS) CMK used for encryption.</p>
    pub fn kms_key_id(&self) -> std::option::Option<&str> {
        self.kms_key_id.as_deref()
    }
    /// <p>The ID of the snapshot.</p>
    pub fn snapshot_id(&self) -> std::option::Option<&str> {
        self.snapshot_id.as_deref()
    }
    /// <p>The size of the volume, in GiBs. You must specify either a snapshot ID or a volume size. The following are the supported volumes sizes for each volume type:</p>
    /// <ul>
    /// <li> <p> <code>gp2</code> and <code>gp3</code>: 1-16,384</p> </li>
    /// <li> <p> <code>io1</code> and <code>io2</code>: 4-16,384</p> </li>
    /// <li> <p> <code>st1</code> and <code>sc1</code>: 125-16,384</p> </li>
    /// <li> <p> <code>standard</code>: 1-1,024</p> </li>
    /// </ul>
    pub fn volume_size(&self) -> std::option::Option<i32> {
        self.volume_size
    }
    /// <p>The volume type. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html">Amazon EBS volume types</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
    pub fn volume_type(&self) -> std::option::Option<&crate::model::VolumeType> {
        self.volume_type.as_ref()
    }
    /// <p>The throughput to provision for a <code>gp3</code> volume, with a maximum of 1,000 MiB/s.</p>
    /// <p>Valid Range: Minimum value of 125. Maximum value of 1000.</p>
    pub fn throughput(&self) -> std::option::Option<i32> {
        self.throughput
    }
}
/// See [`LaunchTemplateEbsBlockDeviceRequest`](crate::model::LaunchTemplateEbsBlockDeviceRequest).
pub mod launch_template_ebs_block_device_request {

    /// A builder for [`LaunchTemplateEbsBlockDeviceRequest`](crate::model::LaunchTemplateEbsBlockDeviceRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) encrypted: std::option::Option<bool>,
        pub(crate) delete_on_termination: std::option::Option<bool>,
        pub(crate) iops: std::option::Option<i32>,
        pub(crate) kms_key_id: std::option::Option<std::string::String>,
        pub(crate) snapshot_id: std::option::Option<std::string::String>,
        pub(crate) volume_size: std::option::Option<i32>,
        pub(crate) volume_type: std::option::Option<crate::model::VolumeType>,
        pub(crate) throughput: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>Indicates whether the EBS volume is encrypted. Encrypted volumes can only be attached to instances that support Amazon EBS encryption. If you are creating a volume from a snapshot, you can't specify an encryption value.</p>
        pub fn encrypted(mut self, input: bool) -> Self {
            self.encrypted = Some(input);
            self
        }
        /// <p>Indicates whether the EBS volume is encrypted. Encrypted volumes can only be attached to instances that support Amazon EBS encryption. If you are creating a volume from a snapshot, you can't specify an encryption value.</p>
        pub fn set_encrypted(mut self, input: std::option::Option<bool>) -> Self {
            self.encrypted = input;
            self
        }
        /// <p>Indicates whether the EBS volume is deleted on instance termination.</p>
        pub fn delete_on_termination(mut self, input: bool) -> Self {
            self.delete_on_termination = Some(input);
            self
        }
        /// <p>Indicates whether the EBS volume is deleted on instance termination.</p>
        pub fn set_delete_on_termination(mut self, input: std::option::Option<bool>) -> Self {
            self.delete_on_termination = input;
            self
        }
        /// <p>The number of I/O operations per second (IOPS). For <code>gp3</code>, <code>io1</code>, and <code>io2</code> volumes, this represents the number of IOPS that are provisioned for the volume. For <code>gp2</code> volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting.</p>
        /// <p>The following are the supported values for each volume type:</p>
        /// <ul>
        /// <li> <p> <code>gp3</code>: 3,000-16,000 IOPS</p> </li>
        /// <li> <p> <code>io1</code>: 100-64,000 IOPS</p> </li>
        /// <li> <p> <code>io2</code>: 100-64,000 IOPS</p> </li>
        /// </ul>
        /// <p>For <code>io1</code> and <code>io2</code> volumes, we guarantee 64,000 IOPS only for <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances">Instances built on the Nitro System</a>. Other instance families guarantee performance up to 32,000 IOPS.</p>
        /// <p>This parameter is supported for <code>io1</code>, <code>io2</code>, and <code>gp3</code> volumes only. This parameter is not supported for <code>gp2</code>, <code>st1</code>, <code>sc1</code>, or <code>standard</code> volumes.</p>
        pub fn iops(mut self, input: i32) -> Self {
            self.iops = Some(input);
            self
        }
        /// <p>The number of I/O operations per second (IOPS). For <code>gp3</code>, <code>io1</code>, and <code>io2</code> volumes, this represents the number of IOPS that are provisioned for the volume. For <code>gp2</code> volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting.</p>
        /// <p>The following are the supported values for each volume type:</p>
        /// <ul>
        /// <li> <p> <code>gp3</code>: 3,000-16,000 IOPS</p> </li>
        /// <li> <p> <code>io1</code>: 100-64,000 IOPS</p> </li>
        /// <li> <p> <code>io2</code>: 100-64,000 IOPS</p> </li>
        /// </ul>
        /// <p>For <code>io1</code> and <code>io2</code> volumes, we guarantee 64,000 IOPS only for <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances">Instances built on the Nitro System</a>. Other instance families guarantee performance up to 32,000 IOPS.</p>
        /// <p>This parameter is supported for <code>io1</code>, <code>io2</code>, and <code>gp3</code> volumes only. This parameter is not supported for <code>gp2</code>, <code>st1</code>, <code>sc1</code>, or <code>standard</code> volumes.</p>
        pub fn set_iops(mut self, input: std::option::Option<i32>) -> Self {
            self.iops = input;
            self
        }
        /// <p>The ARN of the symmetric Key Management Service (KMS) CMK used for encryption.</p>
        pub fn kms_key_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.kms_key_id = Some(input.into());
            self
        }
        /// <p>The ARN of the symmetric Key Management Service (KMS) CMK used for encryption.</p>
        pub fn set_kms_key_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.kms_key_id = input;
            self
        }
        /// <p>The ID of the snapshot.</p>
        pub fn snapshot_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.snapshot_id = Some(input.into());
            self
        }
        /// <p>The ID of the snapshot.</p>
        pub fn set_snapshot_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.snapshot_id = input;
            self
        }
        /// <p>The size of the volume, in GiBs. You must specify either a snapshot ID or a volume size. The following are the supported volumes sizes for each volume type:</p>
        /// <ul>
        /// <li> <p> <code>gp2</code> and <code>gp3</code>: 1-16,384</p> </li>
        /// <li> <p> <code>io1</code> and <code>io2</code>: 4-16,384</p> </li>
        /// <li> <p> <code>st1</code> and <code>sc1</code>: 125-16,384</p> </li>
        /// <li> <p> <code>standard</code>: 1-1,024</p> </li>
        /// </ul>
        pub fn volume_size(mut self, input: i32) -> Self {
            self.volume_size = Some(input);
            self
        }
        /// <p>The size of the volume, in GiBs. You must specify either a snapshot ID or a volume size. The following are the supported volumes sizes for each volume type:</p>
        /// <ul>
        /// <li> <p> <code>gp2</code> and <code>gp3</code>: 1-16,384</p> </li>
        /// <li> <p> <code>io1</code> and <code>io2</code>: 4-16,384</p> </li>
        /// <li> <p> <code>st1</code> and <code>sc1</code>: 125-16,384</p> </li>
        /// <li> <p> <code>standard</code>: 1-1,024</p> </li>
        /// </ul>
        pub fn set_volume_size(mut self, input: std::option::Option<i32>) -> Self {
            self.volume_size = input;
            self
        }
        /// <p>The volume type. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html">Amazon EBS volume types</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
        pub fn volume_type(mut self, input: crate::model::VolumeType) -> Self {
            self.volume_type = Some(input);
            self
        }
        /// <p>The volume type. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html">Amazon EBS volume types</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
        pub fn set_volume_type(
            mut self,
            input: std::option::Option<crate::model::VolumeType>,
        ) -> Self {
            self.volume_type = input;
            self
        }
        /// <p>The throughput to provision for a <code>gp3</code> volume, with a maximum of 1,000 MiB/s.</p>
        /// <p>Valid Range: Minimum value of 125. Maximum value of 1000.</p>
        pub fn throughput(mut self, input: i32) -> Self {
            self.throughput = Some(input);
            self
        }
        /// <p>The throughput to provision for a <code>gp3</code> volume, with a maximum of 1,000 MiB/s.</p>
        /// <p>Valid Range: Minimum value of 125. Maximum value of 1000.</p>
        pub fn set_throughput(mut self, input: std::option::Option<i32>) -> Self {
            self.throughput = input;
            self
        }
        /// Consumes the builder and constructs a [`LaunchTemplateEbsBlockDeviceRequest`](crate::model::LaunchTemplateEbsBlockDeviceRequest).
        pub fn build(self) -> crate::model::LaunchTemplateEbsBlockDeviceRequest {
            crate::model::LaunchTemplateEbsBlockDeviceRequest {
                encrypted: self.encrypted,
                delete_on_termination: self.delete_on_termination,
                iops: self.iops,
                kms_key_id: self.kms_key_id,
                snapshot_id: self.snapshot_id,
                volume_size: self.volume_size,
                volume_type: self.volume_type,
                throughput: self.throughput,
            }
        }
    }
}
impl LaunchTemplateEbsBlockDeviceRequest {
    /// Creates a new builder-style object to manufacture [`LaunchTemplateEbsBlockDeviceRequest`](crate::model::LaunchTemplateEbsBlockDeviceRequest).
    pub fn builder() -> crate::model::launch_template_ebs_block_device_request::Builder {
        crate::model::launch_template_ebs_block_device_request::Builder::default()
    }
}

/// <p>An IAM instance profile.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LaunchTemplateIamInstanceProfileSpecificationRequest {
    /// <p>The Amazon Resource Name (ARN) of the instance profile.</p>
    #[doc(hidden)]
    pub arn: std::option::Option<std::string::String>,
    /// <p>The name of the instance profile.</p>
    #[doc(hidden)]
    pub name: std::option::Option<std::string::String>,
}
impl LaunchTemplateIamInstanceProfileSpecificationRequest {
    /// <p>The Amazon Resource Name (ARN) of the instance profile.</p>
    pub fn arn(&self) -> std::option::Option<&str> {
        self.arn.as_deref()
    }
    /// <p>The name of the instance profile.</p>
    pub fn name(&self) -> std::option::Option<&str> {
        self.name.as_deref()
    }
}
/// See [`LaunchTemplateIamInstanceProfileSpecificationRequest`](crate::model::LaunchTemplateIamInstanceProfileSpecificationRequest).
pub mod launch_template_iam_instance_profile_specification_request {

    /// A builder for [`LaunchTemplateIamInstanceProfileSpecificationRequest`](crate::model::LaunchTemplateIamInstanceProfileSpecificationRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) arn: std::option::Option<std::string::String>,
        pub(crate) name: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The Amazon Resource Name (ARN) of the instance profile.</p>
        pub fn arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.arn = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the instance profile.</p>
        pub fn set_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.arn = input;
            self
        }
        /// <p>The name of the instance profile.</p>
        pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
            self.name = Some(input.into());
            self
        }
        /// <p>The name of the instance profile.</p>
        pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.name = input;
            self
        }
        /// Consumes the builder and constructs a [`LaunchTemplateIamInstanceProfileSpecificationRequest`](crate::model::LaunchTemplateIamInstanceProfileSpecificationRequest).
        pub fn build(self) -> crate::model::LaunchTemplateIamInstanceProfileSpecificationRequest {
            crate::model::LaunchTemplateIamInstanceProfileSpecificationRequest {
                arn: self.arn,
                name: self.name,
            }
        }
    }
}
impl LaunchTemplateIamInstanceProfileSpecificationRequest {
    /// Creates a new builder-style object to manufacture [`LaunchTemplateIamInstanceProfileSpecificationRequest`](crate::model::LaunchTemplateIamInstanceProfileSpecificationRequest).
    pub fn builder(
    ) -> crate::model::launch_template_iam_instance_profile_specification_request::Builder {
        crate::model::launch_template_iam_instance_profile_specification_request::Builder::default()
    }
}

/// When writing a match expression against `KeyFormat`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let keyformat = unimplemented!();
/// match keyformat {
///     KeyFormat::Pem => { /* ... */ },
///     KeyFormat::Ppk => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `keyformat` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `KeyFormat::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `KeyFormat::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `KeyFormat::NewFeature` is defined.
/// Specifically, when `keyformat` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `KeyFormat::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 KeyFormat {
    #[allow(missing_docs)] // documentation missing in model
    Pem,
    #[allow(missing_docs)] // documentation missing in model
    Ppk,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for KeyFormat {
    fn from(s: &str) -> Self {
        match s {
            "pem" => KeyFormat::Pem,
            "ppk" => KeyFormat::Ppk,
            other => KeyFormat::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for KeyFormat {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(KeyFormat::from(s))
    }
}
impl KeyFormat {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            KeyFormat::Pem => "pem",
            KeyFormat::Ppk => "ppk",
            KeyFormat::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["pem", "ppk"]
    }
}
impl AsRef<str> for KeyFormat {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes an export instance task.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ExportToS3TaskSpecification {
    /// <p>The container format used to combine disk images with metadata (such as OVF). If absent, only the disk image is exported.</p>
    #[doc(hidden)]
    pub container_format: std::option::Option<crate::model::ContainerFormat>,
    /// <p>The format for the exported image.</p>
    #[doc(hidden)]
    pub disk_image_format: std::option::Option<crate::model::DiskImageFormat>,
    /// <p>The Amazon S3 bucket for the destination image. The destination bucket must exist and have an access control list (ACL) attached that specifies the Region-specific canonical account ID for the <code>Grantee</code>. For more information about the ACL to your S3 bucket, see <a href="https://docs.aws.amazon.com/vm-import/latest/userguide/vmexport.html#vmexport-prerequisites">Prerequisites</a> in the VM Import/Export User Guide.</p>
    #[doc(hidden)]
    pub s3_bucket: std::option::Option<std::string::String>,
    /// <p>The image is written to a single object in the Amazon S3 bucket at the S3 key s3prefix + exportTaskId + '.' + diskImageFormat.</p>
    #[doc(hidden)]
    pub s3_prefix: std::option::Option<std::string::String>,
}
impl ExportToS3TaskSpecification {
    /// <p>The container format used to combine disk images with metadata (such as OVF). If absent, only the disk image is exported.</p>
    pub fn container_format(&self) -> std::option::Option<&crate::model::ContainerFormat> {
        self.container_format.as_ref()
    }
    /// <p>The format for the exported image.</p>
    pub fn disk_image_format(&self) -> std::option::Option<&crate::model::DiskImageFormat> {
        self.disk_image_format.as_ref()
    }
    /// <p>The Amazon S3 bucket for the destination image. The destination bucket must exist and have an access control list (ACL) attached that specifies the Region-specific canonical account ID for the <code>Grantee</code>. For more information about the ACL to your S3 bucket, see <a href="https://docs.aws.amazon.com/vm-import/latest/userguide/vmexport.html#vmexport-prerequisites">Prerequisites</a> in the VM Import/Export User Guide.</p>
    pub fn s3_bucket(&self) -> std::option::Option<&str> {
        self.s3_bucket.as_deref()
    }
    /// <p>The image is written to a single object in the Amazon S3 bucket at the S3 key s3prefix + exportTaskId + '.' + diskImageFormat.</p>
    pub fn s3_prefix(&self) -> std::option::Option<&str> {
        self.s3_prefix.as_deref()
    }
}
/// See [`ExportToS3TaskSpecification`](crate::model::ExportToS3TaskSpecification).
pub mod export_to_s3_task_specification {

    /// A builder for [`ExportToS3TaskSpecification`](crate::model::ExportToS3TaskSpecification).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) container_format: std::option::Option<crate::model::ContainerFormat>,
        pub(crate) disk_image_format: std::option::Option<crate::model::DiskImageFormat>,
        pub(crate) s3_bucket: std::option::Option<std::string::String>,
        pub(crate) s3_prefix: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The container format used to combine disk images with metadata (such as OVF). If absent, only the disk image is exported.</p>
        pub fn container_format(mut self, input: crate::model::ContainerFormat) -> Self {
            self.container_format = Some(input);
            self
        }
        /// <p>The container format used to combine disk images with metadata (such as OVF). If absent, only the disk image is exported.</p>
        pub fn set_container_format(
            mut self,
            input: std::option::Option<crate::model::ContainerFormat>,
        ) -> Self {
            self.container_format = input;
            self
        }
        /// <p>The format for the exported image.</p>
        pub fn disk_image_format(mut self, input: crate::model::DiskImageFormat) -> Self {
            self.disk_image_format = Some(input);
            self
        }
        /// <p>The format for the exported image.</p>
        pub fn set_disk_image_format(
            mut self,
            input: std::option::Option<crate::model::DiskImageFormat>,
        ) -> Self {
            self.disk_image_format = input;
            self
        }
        /// <p>The Amazon S3 bucket for the destination image. The destination bucket must exist and have an access control list (ACL) attached that specifies the Region-specific canonical account ID for the <code>Grantee</code>. For more information about the ACL to your S3 bucket, see <a href="https://docs.aws.amazon.com/vm-import/latest/userguide/vmexport.html#vmexport-prerequisites">Prerequisites</a> in the VM Import/Export User Guide.</p>
        pub fn s3_bucket(mut self, input: impl Into<std::string::String>) -> Self {
            self.s3_bucket = Some(input.into());
            self
        }
        /// <p>The Amazon S3 bucket for the destination image. The destination bucket must exist and have an access control list (ACL) attached that specifies the Region-specific canonical account ID for the <code>Grantee</code>. For more information about the ACL to your S3 bucket, see <a href="https://docs.aws.amazon.com/vm-import/latest/userguide/vmexport.html#vmexport-prerequisites">Prerequisites</a> in the VM Import/Export User Guide.</p>
        pub fn set_s3_bucket(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.s3_bucket = input;
            self
        }
        /// <p>The image is written to a single object in the Amazon S3 bucket at the S3 key s3prefix + exportTaskId + '.' + diskImageFormat.</p>
        pub fn s3_prefix(mut self, input: impl Into<std::string::String>) -> Self {
            self.s3_prefix = Some(input.into());
            self
        }
        /// <p>The image is written to a single object in the Amazon S3 bucket at the S3 key s3prefix + exportTaskId + '.' + diskImageFormat.</p>
        pub fn set_s3_prefix(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.s3_prefix = input;
            self
        }
        /// Consumes the builder and constructs a [`ExportToS3TaskSpecification`](crate::model::ExportToS3TaskSpecification).
        pub fn build(self) -> crate::model::ExportToS3TaskSpecification {
            crate::model::ExportToS3TaskSpecification {
                container_format: self.container_format,
                disk_image_format: self.disk_image_format,
                s3_bucket: self.s3_bucket,
                s3_prefix: self.s3_prefix,
            }
        }
    }
}
impl ExportToS3TaskSpecification {
    /// Creates a new builder-style object to manufacture [`ExportToS3TaskSpecification`](crate::model::ExportToS3TaskSpecification).
    pub fn builder() -> crate::model::export_to_s3_task_specification::Builder {
        crate::model::export_to_s3_task_specification::Builder::default()
    }
}

/// <p>Describes a storage location in Amazon S3.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct StorageLocation {
    /// <p>The name of the S3 bucket.</p>
    #[doc(hidden)]
    pub bucket: std::option::Option<std::string::String>,
    /// <p>The key.</p>
    #[doc(hidden)]
    pub key: std::option::Option<std::string::String>,
}
impl StorageLocation {
    /// <p>The name of the S3 bucket.</p>
    pub fn bucket(&self) -> std::option::Option<&str> {
        self.bucket.as_deref()
    }
    /// <p>The key.</p>
    pub fn key(&self) -> std::option::Option<&str> {
        self.key.as_deref()
    }
}
/// See [`StorageLocation`](crate::model::StorageLocation).
pub mod storage_location {

    /// A builder for [`StorageLocation`](crate::model::StorageLocation).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) bucket: std::option::Option<std::string::String>,
        pub(crate) key: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The name of the S3 bucket.</p>
        pub fn bucket(mut self, input: impl Into<std::string::String>) -> Self {
            self.bucket = Some(input.into());
            self
        }
        /// <p>The name of the S3 bucket.</p>
        pub fn set_bucket(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.bucket = input;
            self
        }
        /// <p>The key.</p>
        pub fn key(mut self, input: impl Into<std::string::String>) -> Self {
            self.key = Some(input.into());
            self
        }
        /// <p>The key.</p>
        pub fn set_key(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.key = input;
            self
        }
        /// Consumes the builder and constructs a [`StorageLocation`](crate::model::StorageLocation).
        pub fn build(self) -> crate::model::StorageLocation {
            crate::model::StorageLocation {
                bucket: self.bucket,
                key: self.key,
            }
        }
    }
}
impl StorageLocation {
    /// Creates a new builder-style object to manufacture [`StorageLocation`](crate::model::StorageLocation).
    pub fn builder() -> crate::model::storage_location::Builder {
        crate::model::storage_location::Builder::default()
    }
}

/// <p>Describes the destination options for a flow log.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DestinationOptionsRequest {
    /// <p>The format for the flow log. The default is <code>plain-text</code>.</p>
    #[doc(hidden)]
    pub file_format: std::option::Option<crate::model::DestinationFileFormat>,
    /// <p>Indicates whether to use Hive-compatible prefixes for flow logs stored in Amazon S3. The default is <code>false</code>.</p>
    #[doc(hidden)]
    pub hive_compatible_partitions: std::option::Option<bool>,
    /// <p>Indicates whether to partition the flow log per hour. This reduces the cost and response time for queries. The default is <code>false</code>.</p>
    #[doc(hidden)]
    pub per_hour_partition: std::option::Option<bool>,
}
impl DestinationOptionsRequest {
    /// <p>The format for the flow log. The default is <code>plain-text</code>.</p>
    pub fn file_format(&self) -> std::option::Option<&crate::model::DestinationFileFormat> {
        self.file_format.as_ref()
    }
    /// <p>Indicates whether to use Hive-compatible prefixes for flow logs stored in Amazon S3. The default is <code>false</code>.</p>
    pub fn hive_compatible_partitions(&self) -> std::option::Option<bool> {
        self.hive_compatible_partitions
    }
    /// <p>Indicates whether to partition the flow log per hour. This reduces the cost and response time for queries. The default is <code>false</code>.</p>
    pub fn per_hour_partition(&self) -> std::option::Option<bool> {
        self.per_hour_partition
    }
}
/// See [`DestinationOptionsRequest`](crate::model::DestinationOptionsRequest).
pub mod destination_options_request {

    /// A builder for [`DestinationOptionsRequest`](crate::model::DestinationOptionsRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) file_format: std::option::Option<crate::model::DestinationFileFormat>,
        pub(crate) hive_compatible_partitions: std::option::Option<bool>,
        pub(crate) per_hour_partition: std::option::Option<bool>,
    }
    impl Builder {
        /// <p>The format for the flow log. The default is <code>plain-text</code>.</p>
        pub fn file_format(mut self, input: crate::model::DestinationFileFormat) -> Self {
            self.file_format = Some(input);
            self
        }
        /// <p>The format for the flow log. The default is <code>plain-text</code>.</p>
        pub fn set_file_format(
            mut self,
            input: std::option::Option<crate::model::DestinationFileFormat>,
        ) -> Self {
            self.file_format = input;
            self
        }
        /// <p>Indicates whether to use Hive-compatible prefixes for flow logs stored in Amazon S3. The default is <code>false</code>.</p>
        pub fn hive_compatible_partitions(mut self, input: bool) -> Self {
            self.hive_compatible_partitions = Some(input);
            self
        }
        /// <p>Indicates whether to use Hive-compatible prefixes for flow logs stored in Amazon S3. The default is <code>false</code>.</p>
        pub fn set_hive_compatible_partitions(mut self, input: std::option::Option<bool>) -> Self {
            self.hive_compatible_partitions = input;
            self
        }
        /// <p>Indicates whether to partition the flow log per hour. This reduces the cost and response time for queries. The default is <code>false</code>.</p>
        pub fn per_hour_partition(mut self, input: bool) -> Self {
            self.per_hour_partition = Some(input);
            self
        }
        /// <p>Indicates whether to partition the flow log per hour. This reduces the cost and response time for queries. The default is <code>false</code>.</p>
        pub fn set_per_hour_partition(mut self, input: std::option::Option<bool>) -> Self {
            self.per_hour_partition = input;
            self
        }
        /// Consumes the builder and constructs a [`DestinationOptionsRequest`](crate::model::DestinationOptionsRequest).
        pub fn build(self) -> crate::model::DestinationOptionsRequest {
            crate::model::DestinationOptionsRequest {
                file_format: self.file_format,
                hive_compatible_partitions: self.hive_compatible_partitions,
                per_hour_partition: self.per_hour_partition,
            }
        }
    }
}
impl DestinationOptionsRequest {
    /// Creates a new builder-style object to manufacture [`DestinationOptionsRequest`](crate::model::DestinationOptionsRequest).
    pub fn builder() -> crate::model::destination_options_request::Builder {
        crate::model::destination_options_request::Builder::default()
    }
}

/// When writing a match expression against `FlowLogsResourceType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let flowlogsresourcetype = unimplemented!();
/// match flowlogsresourcetype {
///     FlowLogsResourceType::NetworkInterface => { /* ... */ },
///     FlowLogsResourceType::Subnet => { /* ... */ },
///     FlowLogsResourceType::TransitGateway => { /* ... */ },
///     FlowLogsResourceType::TransitGatewayAttachment => { /* ... */ },
///     FlowLogsResourceType::Vpc => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `flowlogsresourcetype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `FlowLogsResourceType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `FlowLogsResourceType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `FlowLogsResourceType::NewFeature` is defined.
/// Specifically, when `flowlogsresourcetype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `FlowLogsResourceType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 FlowLogsResourceType {
    #[allow(missing_docs)] // documentation missing in model
    NetworkInterface,
    #[allow(missing_docs)] // documentation missing in model
    Subnet,
    #[allow(missing_docs)] // documentation missing in model
    TransitGateway,
    #[allow(missing_docs)] // documentation missing in model
    TransitGatewayAttachment,
    #[allow(missing_docs)] // documentation missing in model
    Vpc,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for FlowLogsResourceType {
    fn from(s: &str) -> Self {
        match s {
            "NetworkInterface" => FlowLogsResourceType::NetworkInterface,
            "Subnet" => FlowLogsResourceType::Subnet,
            "TransitGateway" => FlowLogsResourceType::TransitGateway,
            "TransitGatewayAttachment" => FlowLogsResourceType::TransitGatewayAttachment,
            "VPC" => FlowLogsResourceType::Vpc,
            other => {
                FlowLogsResourceType::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for FlowLogsResourceType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(FlowLogsResourceType::from(s))
    }
}
impl FlowLogsResourceType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            FlowLogsResourceType::NetworkInterface => "NetworkInterface",
            FlowLogsResourceType::Subnet => "Subnet",
            FlowLogsResourceType::TransitGateway => "TransitGateway",
            FlowLogsResourceType::TransitGatewayAttachment => "TransitGatewayAttachment",
            FlowLogsResourceType::Vpc => "VPC",
            FlowLogsResourceType::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &[
            "NetworkInterface",
            "Subnet",
            "TransitGateway",
            "TransitGatewayAttachment",
            "VPC",
        ]
    }
}
impl AsRef<str> for FlowLogsResourceType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes the instances that were launched by the fleet.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CreateFleetInstance {
    /// <p>The launch templates and overrides that were used for launching the instances. The values that you specify in the Overrides replace the values in the launch template.</p>
    #[doc(hidden)]
    pub launch_template_and_overrides:
        std::option::Option<crate::model::LaunchTemplateAndOverridesResponse>,
    /// <p>Indicates if the instance that was launched is a Spot Instance or On-Demand Instance.</p>
    #[doc(hidden)]
    pub lifecycle: std::option::Option<crate::model::InstanceLifecycle>,
    /// <p>The IDs of the instances.</p>
    #[doc(hidden)]
    pub instance_ids: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>The instance type.</p>
    #[doc(hidden)]
    pub instance_type: std::option::Option<crate::model::InstanceType>,
    /// <p>The value is <code>Windows</code> for Windows instances. Otherwise, the value is blank.</p>
    #[doc(hidden)]
    pub platform: std::option::Option<crate::model::PlatformValues>,
}
impl CreateFleetInstance {
    /// <p>The launch templates and overrides that were used for launching the instances. The values that you specify in the Overrides replace the values in the launch template.</p>
    pub fn launch_template_and_overrides(
        &self,
    ) -> std::option::Option<&crate::model::LaunchTemplateAndOverridesResponse> {
        self.launch_template_and_overrides.as_ref()
    }
    /// <p>Indicates if the instance that was launched is a Spot Instance or On-Demand Instance.</p>
    pub fn lifecycle(&self) -> std::option::Option<&crate::model::InstanceLifecycle> {
        self.lifecycle.as_ref()
    }
    /// <p>The IDs of the instances.</p>
    pub fn instance_ids(&self) -> std::option::Option<&[std::string::String]> {
        self.instance_ids.as_deref()
    }
    /// <p>The instance type.</p>
    pub fn instance_type(&self) -> std::option::Option<&crate::model::InstanceType> {
        self.instance_type.as_ref()
    }
    /// <p>The value is <code>Windows</code> for Windows instances. Otherwise, the value is blank.</p>
    pub fn platform(&self) -> std::option::Option<&crate::model::PlatformValues> {
        self.platform.as_ref()
    }
}
/// See [`CreateFleetInstance`](crate::model::CreateFleetInstance).
pub mod create_fleet_instance {

    /// A builder for [`CreateFleetInstance`](crate::model::CreateFleetInstance).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) launch_template_and_overrides:
            std::option::Option<crate::model::LaunchTemplateAndOverridesResponse>,
        pub(crate) lifecycle: std::option::Option<crate::model::InstanceLifecycle>,
        pub(crate) instance_ids: std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) instance_type: std::option::Option<crate::model::InstanceType>,
        pub(crate) platform: std::option::Option<crate::model::PlatformValues>,
    }
    impl Builder {
        /// <p>The launch templates and overrides that were used for launching the instances. The values that you specify in the Overrides replace the values in the launch template.</p>
        pub fn launch_template_and_overrides(
            mut self,
            input: crate::model::LaunchTemplateAndOverridesResponse,
        ) -> Self {
            self.launch_template_and_overrides = Some(input);
            self
        }
        /// <p>The launch templates and overrides that were used for launching the instances. The values that you specify in the Overrides replace the values in the launch template.</p>
        pub fn set_launch_template_and_overrides(
            mut self,
            input: std::option::Option<crate::model::LaunchTemplateAndOverridesResponse>,
        ) -> Self {
            self.launch_template_and_overrides = input;
            self
        }
        /// <p>Indicates if the instance that was launched is a Spot Instance or On-Demand Instance.</p>
        pub fn lifecycle(mut self, input: crate::model::InstanceLifecycle) -> Self {
            self.lifecycle = Some(input);
            self
        }
        /// <p>Indicates if the instance that was launched is a Spot Instance or On-Demand Instance.</p>
        pub fn set_lifecycle(
            mut self,
            input: std::option::Option<crate::model::InstanceLifecycle>,
        ) -> Self {
            self.lifecycle = input;
            self
        }
        /// Appends an item to `instance_ids`.
        ///
        /// To override the contents of this collection use [`set_instance_ids`](Self::set_instance_ids).
        ///
        /// <p>The IDs of the instances.</p>
        pub fn instance_ids(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.instance_ids.unwrap_or_default();
            v.push(input.into());
            self.instance_ids = Some(v);
            self
        }
        /// <p>The IDs of the instances.</p>
        pub fn set_instance_ids(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.instance_ids = input;
            self
        }
        /// <p>The instance type.</p>
        pub fn instance_type(mut self, input: crate::model::InstanceType) -> Self {
            self.instance_type = Some(input);
            self
        }
        /// <p>The instance type.</p>
        pub fn set_instance_type(
            mut self,
            input: std::option::Option<crate::model::InstanceType>,
        ) -> Self {
            self.instance_type = input;
            self
        }
        /// <p>The value is <code>Windows</code> for Windows instances. Otherwise, the value is blank.</p>
        pub fn platform(mut self, input: crate::model::PlatformValues) -> Self {
            self.platform = Some(input);
            self
        }
        /// <p>The value is <code>Windows</code> for Windows instances. Otherwise, the value is blank.</p>
        pub fn set_platform(
            mut self,
            input: std::option::Option<crate::model::PlatformValues>,
        ) -> Self {
            self.platform = input;
            self
        }
        /// Consumes the builder and constructs a [`CreateFleetInstance`](crate::model::CreateFleetInstance).
        pub fn build(self) -> crate::model::CreateFleetInstance {
            crate::model::CreateFleetInstance {
                launch_template_and_overrides: self.launch_template_and_overrides,
                lifecycle: self.lifecycle,
                instance_ids: self.instance_ids,
                instance_type: self.instance_type,
                platform: self.platform,
            }
        }
    }
}
impl CreateFleetInstance {
    /// Creates a new builder-style object to manufacture [`CreateFleetInstance`](crate::model::CreateFleetInstance).
    pub fn builder() -> crate::model::create_fleet_instance::Builder {
        crate::model::create_fleet_instance::Builder::default()
    }
}

/// <p>Describes the instances that could not be launched by the fleet.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CreateFleetError {
    /// <p>The launch templates and overrides that were used for launching the instances. The values that you specify in the Overrides replace the values in the launch template.</p>
    #[doc(hidden)]
    pub launch_template_and_overrides:
        std::option::Option<crate::model::LaunchTemplateAndOverridesResponse>,
    /// <p>Indicates if the instance that could not be launched was a Spot Instance or On-Demand Instance.</p>
    #[doc(hidden)]
    pub lifecycle: std::option::Option<crate::model::InstanceLifecycle>,
    /// <p>The error code that indicates why the instance could not be launched. For more information about error codes, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/errors-overview.html.html">Error codes</a>.</p>
    #[doc(hidden)]
    pub error_code: std::option::Option<std::string::String>,
    /// <p>The error message that describes why the instance could not be launched. For more information about error messages, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/errors-overview.html.html">Error codes</a>.</p>
    #[doc(hidden)]
    pub error_message: std::option::Option<std::string::String>,
}
impl CreateFleetError {
    /// <p>The launch templates and overrides that were used for launching the instances. The values that you specify in the Overrides replace the values in the launch template.</p>
    pub fn launch_template_and_overrides(
        &self,
    ) -> std::option::Option<&crate::model::LaunchTemplateAndOverridesResponse> {
        self.launch_template_and_overrides.as_ref()
    }
    /// <p>Indicates if the instance that could not be launched was a Spot Instance or On-Demand Instance.</p>
    pub fn lifecycle(&self) -> std::option::Option<&crate::model::InstanceLifecycle> {
        self.lifecycle.as_ref()
    }
    /// <p>The error code that indicates why the instance could not be launched. For more information about error codes, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/errors-overview.html.html">Error codes</a>.</p>
    pub fn error_code(&self) -> std::option::Option<&str> {
        self.error_code.as_deref()
    }
    /// <p>The error message that describes why the instance could not be launched. For more information about error messages, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/errors-overview.html.html">Error codes</a>.</p>
    pub fn error_message(&self) -> std::option::Option<&str> {
        self.error_message.as_deref()
    }
}
/// See [`CreateFleetError`](crate::model::CreateFleetError).
pub mod create_fleet_error {

    /// A builder for [`CreateFleetError`](crate::model::CreateFleetError).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) launch_template_and_overrides:
            std::option::Option<crate::model::LaunchTemplateAndOverridesResponse>,
        pub(crate) lifecycle: std::option::Option<crate::model::InstanceLifecycle>,
        pub(crate) error_code: std::option::Option<std::string::String>,
        pub(crate) error_message: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The launch templates and overrides that were used for launching the instances. The values that you specify in the Overrides replace the values in the launch template.</p>
        pub fn launch_template_and_overrides(
            mut self,
            input: crate::model::LaunchTemplateAndOverridesResponse,
        ) -> Self {
            self.launch_template_and_overrides = Some(input);
            self
        }
        /// <p>The launch templates and overrides that were used for launching the instances. The values that you specify in the Overrides replace the values in the launch template.</p>
        pub fn set_launch_template_and_overrides(
            mut self,
            input: std::option::Option<crate::model::LaunchTemplateAndOverridesResponse>,
        ) -> Self {
            self.launch_template_and_overrides = input;
            self
        }
        /// <p>Indicates if the instance that could not be launched was a Spot Instance or On-Demand Instance.</p>
        pub fn lifecycle(mut self, input: crate::model::InstanceLifecycle) -> Self {
            self.lifecycle = Some(input);
            self
        }
        /// <p>Indicates if the instance that could not be launched was a Spot Instance or On-Demand Instance.</p>
        pub fn set_lifecycle(
            mut self,
            input: std::option::Option<crate::model::InstanceLifecycle>,
        ) -> Self {
            self.lifecycle = input;
            self
        }
        /// <p>The error code that indicates why the instance could not be launched. For more information about error codes, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/errors-overview.html.html">Error codes</a>.</p>
        pub fn error_code(mut self, input: impl Into<std::string::String>) -> Self {
            self.error_code = Some(input.into());
            self
        }
        /// <p>The error code that indicates why the instance could not be launched. For more information about error codes, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/errors-overview.html.html">Error codes</a>.</p>
        pub fn set_error_code(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.error_code = input;
            self
        }
        /// <p>The error message that describes why the instance could not be launched. For more information about error messages, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/errors-overview.html.html">Error codes</a>.</p>
        pub fn error_message(mut self, input: impl Into<std::string::String>) -> Self {
            self.error_message = Some(input.into());
            self
        }
        /// <p>The error message that describes why the instance could not be launched. For more information about error messages, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/errors-overview.html.html">Error codes</a>.</p>
        pub fn set_error_message(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.error_message = input;
            self
        }
        /// Consumes the builder and constructs a [`CreateFleetError`](crate::model::CreateFleetError).
        pub fn build(self) -> crate::model::CreateFleetError {
            crate::model::CreateFleetError {
                launch_template_and_overrides: self.launch_template_and_overrides,
                lifecycle: self.lifecycle,
                error_code: self.error_code,
                error_message: self.error_message,
            }
        }
    }
}
impl CreateFleetError {
    /// Creates a new builder-style object to manufacture [`CreateFleetError`](crate::model::CreateFleetError).
    pub fn builder() -> crate::model::create_fleet_error::Builder {
        crate::model::create_fleet_error::Builder::default()
    }
}

/// <p>Describes the configuration of On-Demand Instances in an EC2 Fleet.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct OnDemandOptionsRequest {
    /// <p>The strategy that determines the order of the launch template overrides to use in fulfilling On-Demand capacity.</p>
    /// <p> <code>lowest-price</code> - EC2 Fleet uses price to determine the order, launching the lowest price first.</p>
    /// <p> <code>prioritized</code> - EC2 Fleet uses the priority that you assigned to each launch template override, launching the highest priority first.</p>
    /// <p>Default: <code>lowest-price</code> </p>
    #[doc(hidden)]
    pub allocation_strategy: std::option::Option<crate::model::FleetOnDemandAllocationStrategy>,
    /// <p>The strategy for using unused Capacity Reservations for fulfilling On-Demand capacity.</p>
    /// <p>Supported only for fleets of type <code>instant</code>.</p>
    #[doc(hidden)]
    pub capacity_reservation_options:
        std::option::Option<crate::model::CapacityReservationOptionsRequest>,
    /// <p>Indicates that the fleet uses a single instance type to launch all On-Demand Instances in the fleet.</p>
    /// <p>Supported only for fleets of type <code>instant</code>.</p>
    #[doc(hidden)]
    pub single_instance_type: std::option::Option<bool>,
    /// <p>Indicates that the fleet launches all On-Demand Instances into a single Availability Zone.</p>
    /// <p>Supported only for fleets of type <code>instant</code>.</p>
    #[doc(hidden)]
    pub single_availability_zone: std::option::Option<bool>,
    /// <p>The minimum target capacity for On-Demand Instances in the fleet. If the minimum target capacity is not reached, the fleet launches no instances.</p>
    /// <p>Supported only for fleets of type <code>instant</code>.</p>
    /// <p>At least one of the following must be specified: <code>SingleAvailabilityZone</code> | <code>SingleInstanceType</code> </p>
    #[doc(hidden)]
    pub min_target_capacity: std::option::Option<i32>,
    /// <p>The maximum amount per hour for On-Demand Instances that you're willing to pay.</p>
    #[doc(hidden)]
    pub max_total_price: std::option::Option<std::string::String>,
}
impl OnDemandOptionsRequest {
    /// <p>The strategy that determines the order of the launch template overrides to use in fulfilling On-Demand capacity.</p>
    /// <p> <code>lowest-price</code> - EC2 Fleet uses price to determine the order, launching the lowest price first.</p>
    /// <p> <code>prioritized</code> - EC2 Fleet uses the priority that you assigned to each launch template override, launching the highest priority first.</p>
    /// <p>Default: <code>lowest-price</code> </p>
    pub fn allocation_strategy(
        &self,
    ) -> std::option::Option<&crate::model::FleetOnDemandAllocationStrategy> {
        self.allocation_strategy.as_ref()
    }
    /// <p>The strategy for using unused Capacity Reservations for fulfilling On-Demand capacity.</p>
    /// <p>Supported only for fleets of type <code>instant</code>.</p>
    pub fn capacity_reservation_options(
        &self,
    ) -> std::option::Option<&crate::model::CapacityReservationOptionsRequest> {
        self.capacity_reservation_options.as_ref()
    }
    /// <p>Indicates that the fleet uses a single instance type to launch all On-Demand Instances in the fleet.</p>
    /// <p>Supported only for fleets of type <code>instant</code>.</p>
    pub fn single_instance_type(&self) -> std::option::Option<bool> {
        self.single_instance_type
    }
    /// <p>Indicates that the fleet launches all On-Demand Instances into a single Availability Zone.</p>
    /// <p>Supported only for fleets of type <code>instant</code>.</p>
    pub fn single_availability_zone(&self) -> std::option::Option<bool> {
        self.single_availability_zone
    }
    /// <p>The minimum target capacity for On-Demand Instances in the fleet. If the minimum target capacity is not reached, the fleet launches no instances.</p>
    /// <p>Supported only for fleets of type <code>instant</code>.</p>
    /// <p>At least one of the following must be specified: <code>SingleAvailabilityZone</code> | <code>SingleInstanceType</code> </p>
    pub fn min_target_capacity(&self) -> std::option::Option<i32> {
        self.min_target_capacity
    }
    /// <p>The maximum amount per hour for On-Demand Instances that you're willing to pay.</p>
    pub fn max_total_price(&self) -> std::option::Option<&str> {
        self.max_total_price.as_deref()
    }
}
/// See [`OnDemandOptionsRequest`](crate::model::OnDemandOptionsRequest).
pub mod on_demand_options_request {

    /// A builder for [`OnDemandOptionsRequest`](crate::model::OnDemandOptionsRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) allocation_strategy:
            std::option::Option<crate::model::FleetOnDemandAllocationStrategy>,
        pub(crate) capacity_reservation_options:
            std::option::Option<crate::model::CapacityReservationOptionsRequest>,
        pub(crate) single_instance_type: std::option::Option<bool>,
        pub(crate) single_availability_zone: std::option::Option<bool>,
        pub(crate) min_target_capacity: std::option::Option<i32>,
        pub(crate) max_total_price: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The strategy that determines the order of the launch template overrides to use in fulfilling On-Demand capacity.</p>
        /// <p> <code>lowest-price</code> - EC2 Fleet uses price to determine the order, launching the lowest price first.</p>
        /// <p> <code>prioritized</code> - EC2 Fleet uses the priority that you assigned to each launch template override, launching the highest priority first.</p>
        /// <p>Default: <code>lowest-price</code> </p>
        pub fn allocation_strategy(
            mut self,
            input: crate::model::FleetOnDemandAllocationStrategy,
        ) -> Self {
            self.allocation_strategy = Some(input);
            self
        }
        /// <p>The strategy that determines the order of the launch template overrides to use in fulfilling On-Demand capacity.</p>
        /// <p> <code>lowest-price</code> - EC2 Fleet uses price to determine the order, launching the lowest price first.</p>
        /// <p> <code>prioritized</code> - EC2 Fleet uses the priority that you assigned to each launch template override, launching the highest priority first.</p>
        /// <p>Default: <code>lowest-price</code> </p>
        pub fn set_allocation_strategy(
            mut self,
            input: std::option::Option<crate::model::FleetOnDemandAllocationStrategy>,
        ) -> Self {
            self.allocation_strategy = input;
            self
        }
        /// <p>The strategy for using unused Capacity Reservations for fulfilling On-Demand capacity.</p>
        /// <p>Supported only for fleets of type <code>instant</code>.</p>
        pub fn capacity_reservation_options(
            mut self,
            input: crate::model::CapacityReservationOptionsRequest,
        ) -> Self {
            self.capacity_reservation_options = Some(input);
            self
        }
        /// <p>The strategy for using unused Capacity Reservations for fulfilling On-Demand capacity.</p>
        /// <p>Supported only for fleets of type <code>instant</code>.</p>
        pub fn set_capacity_reservation_options(
            mut self,
            input: std::option::Option<crate::model::CapacityReservationOptionsRequest>,
        ) -> Self {
            self.capacity_reservation_options = input;
            self
        }
        /// <p>Indicates that the fleet uses a single instance type to launch all On-Demand Instances in the fleet.</p>
        /// <p>Supported only for fleets of type <code>instant</code>.</p>
        pub fn single_instance_type(mut self, input: bool) -> Self {
            self.single_instance_type = Some(input);
            self
        }
        /// <p>Indicates that the fleet uses a single instance type to launch all On-Demand Instances in the fleet.</p>
        /// <p>Supported only for fleets of type <code>instant</code>.</p>
        pub fn set_single_instance_type(mut self, input: std::option::Option<bool>) -> Self {
            self.single_instance_type = input;
            self
        }
        /// <p>Indicates that the fleet launches all On-Demand Instances into a single Availability Zone.</p>
        /// <p>Supported only for fleets of type <code>instant</code>.</p>
        pub fn single_availability_zone(mut self, input: bool) -> Self {
            self.single_availability_zone = Some(input);
            self
        }
        /// <p>Indicates that the fleet launches all On-Demand Instances into a single Availability Zone.</p>
        /// <p>Supported only for fleets of type <code>instant</code>.</p>
        pub fn set_single_availability_zone(mut self, input: std::option::Option<bool>) -> Self {
            self.single_availability_zone = input;
            self
        }
        /// <p>The minimum target capacity for On-Demand Instances in the fleet. If the minimum target capacity is not reached, the fleet launches no instances.</p>
        /// <p>Supported only for fleets of type <code>instant</code>.</p>
        /// <p>At least one of the following must be specified: <code>SingleAvailabilityZone</code> | <code>SingleInstanceType</code> </p>
        pub fn min_target_capacity(mut self, input: i32) -> Self {
            self.min_target_capacity = Some(input);
            self
        }
        /// <p>The minimum target capacity for On-Demand Instances in the fleet. If the minimum target capacity is not reached, the fleet launches no instances.</p>
        /// <p>Supported only for fleets of type <code>instant</code>.</p>
        /// <p>At least one of the following must be specified: <code>SingleAvailabilityZone</code> | <code>SingleInstanceType</code> </p>
        pub fn set_min_target_capacity(mut self, input: std::option::Option<i32>) -> Self {
            self.min_target_capacity = input;
            self
        }
        /// <p>The maximum amount per hour for On-Demand Instances that you're willing to pay.</p>
        pub fn max_total_price(mut self, input: impl Into<std::string::String>) -> Self {
            self.max_total_price = Some(input.into());
            self
        }
        /// <p>The maximum amount per hour for On-Demand Instances that you're willing to pay.</p>
        pub fn set_max_total_price(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.max_total_price = input;
            self
        }
        /// Consumes the builder and constructs a [`OnDemandOptionsRequest`](crate::model::OnDemandOptionsRequest).
        pub fn build(self) -> crate::model::OnDemandOptionsRequest {
            crate::model::OnDemandOptionsRequest {
                allocation_strategy: self.allocation_strategy,
                capacity_reservation_options: self.capacity_reservation_options,
                single_instance_type: self.single_instance_type,
                single_availability_zone: self.single_availability_zone,
                min_target_capacity: self.min_target_capacity,
                max_total_price: self.max_total_price,
            }
        }
    }
}
impl OnDemandOptionsRequest {
    /// Creates a new builder-style object to manufacture [`OnDemandOptionsRequest`](crate::model::OnDemandOptionsRequest).
    pub fn builder() -> crate::model::on_demand_options_request::Builder {
        crate::model::on_demand_options_request::Builder::default()
    }
}

/// <p>Describes the strategy for using unused Capacity Reservations for fulfilling On-Demand capacity.</p> <note>
/// <p>This strategy can only be used if the EC2 Fleet is of type <code>instant</code>.</p>
/// </note>
/// <p>For more information about Capacity Reservations, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-capacity-reservations.html">On-Demand Capacity Reservations</a> in the <i>Amazon EC2 User Guide</i>. For examples of using Capacity Reservations in an EC2 Fleet, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet-examples.html">EC2 Fleet example configurations</a> in the <i>Amazon EC2 User Guide</i>.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CapacityReservationOptionsRequest {
    /// <p>Indicates whether to use unused Capacity Reservations for fulfilling On-Demand capacity.</p>
    /// <p>If you specify <code>use-capacity-reservations-first</code>, the fleet uses unused Capacity Reservations to fulfill On-Demand capacity up to the target On-Demand capacity. If multiple instance pools have unused Capacity Reservations, the On-Demand allocation strategy (<code>lowest-price</code> or <code>prioritized</code>) is applied. If the number of unused Capacity Reservations is less than the On-Demand target capacity, the remaining On-Demand target capacity is launched according to the On-Demand allocation strategy (<code>lowest-price</code> or <code>prioritized</code>).</p>
    /// <p>If you do not specify a value, the fleet fulfils the On-Demand capacity according to the chosen On-Demand allocation strategy.</p>
    #[doc(hidden)]
    pub usage_strategy: std::option::Option<crate::model::FleetCapacityReservationUsageStrategy>,
}
impl CapacityReservationOptionsRequest {
    /// <p>Indicates whether to use unused Capacity Reservations for fulfilling On-Demand capacity.</p>
    /// <p>If you specify <code>use-capacity-reservations-first</code>, the fleet uses unused Capacity Reservations to fulfill On-Demand capacity up to the target On-Demand capacity. If multiple instance pools have unused Capacity Reservations, the On-Demand allocation strategy (<code>lowest-price</code> or <code>prioritized</code>) is applied. If the number of unused Capacity Reservations is less than the On-Demand target capacity, the remaining On-Demand target capacity is launched according to the On-Demand allocation strategy (<code>lowest-price</code> or <code>prioritized</code>).</p>
    /// <p>If you do not specify a value, the fleet fulfils the On-Demand capacity according to the chosen On-Demand allocation strategy.</p>
    pub fn usage_strategy(
        &self,
    ) -> std::option::Option<&crate::model::FleetCapacityReservationUsageStrategy> {
        self.usage_strategy.as_ref()
    }
}
/// See [`CapacityReservationOptionsRequest`](crate::model::CapacityReservationOptionsRequest).
pub mod capacity_reservation_options_request {

    /// A builder for [`CapacityReservationOptionsRequest`](crate::model::CapacityReservationOptionsRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) usage_strategy:
            std::option::Option<crate::model::FleetCapacityReservationUsageStrategy>,
    }
    impl Builder {
        /// <p>Indicates whether to use unused Capacity Reservations for fulfilling On-Demand capacity.</p>
        /// <p>If you specify <code>use-capacity-reservations-first</code>, the fleet uses unused Capacity Reservations to fulfill On-Demand capacity up to the target On-Demand capacity. If multiple instance pools have unused Capacity Reservations, the On-Demand allocation strategy (<code>lowest-price</code> or <code>prioritized</code>) is applied. If the number of unused Capacity Reservations is less than the On-Demand target capacity, the remaining On-Demand target capacity is launched according to the On-Demand allocation strategy (<code>lowest-price</code> or <code>prioritized</code>).</p>
        /// <p>If you do not specify a value, the fleet fulfils the On-Demand capacity according to the chosen On-Demand allocation strategy.</p>
        pub fn usage_strategy(
            mut self,
            input: crate::model::FleetCapacityReservationUsageStrategy,
        ) -> Self {
            self.usage_strategy = Some(input);
            self
        }
        /// <p>Indicates whether to use unused Capacity Reservations for fulfilling On-Demand capacity.</p>
        /// <p>If you specify <code>use-capacity-reservations-first</code>, the fleet uses unused Capacity Reservations to fulfill On-Demand capacity up to the target On-Demand capacity. If multiple instance pools have unused Capacity Reservations, the On-Demand allocation strategy (<code>lowest-price</code> or <code>prioritized</code>) is applied. If the number of unused Capacity Reservations is less than the On-Demand target capacity, the remaining On-Demand target capacity is launched according to the On-Demand allocation strategy (<code>lowest-price</code> or <code>prioritized</code>).</p>
        /// <p>If you do not specify a value, the fleet fulfils the On-Demand capacity according to the chosen On-Demand allocation strategy.</p>
        pub fn set_usage_strategy(
            mut self,
            input: std::option::Option<crate::model::FleetCapacityReservationUsageStrategy>,
        ) -> Self {
            self.usage_strategy = input;
            self
        }
        /// Consumes the builder and constructs a [`CapacityReservationOptionsRequest`](crate::model::CapacityReservationOptionsRequest).
        pub fn build(self) -> crate::model::CapacityReservationOptionsRequest {
            crate::model::CapacityReservationOptionsRequest {
                usage_strategy: self.usage_strategy,
            }
        }
    }
}
impl CapacityReservationOptionsRequest {
    /// Creates a new builder-style object to manufacture [`CapacityReservationOptionsRequest`](crate::model::CapacityReservationOptionsRequest).
    pub fn builder() -> crate::model::capacity_reservation_options_request::Builder {
        crate::model::capacity_reservation_options_request::Builder::default()
    }
}

/// <p>Describes the configuration of Spot Instances in an EC2 Fleet request.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SpotOptionsRequest {
    /// <p>The strategy that determines how to allocate the target Spot Instance capacity across the Spot Instance pools specified by the EC2 Fleet launch configuration. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet-allocation-strategy.html">Allocation strategies for Spot Instances</a> in the <i>Amazon EC2 User Guide</i>.</p>
    /// <dl>
    /// <dt>
    /// price-capacity-optimized (recommended)
    /// </dt>
    /// <dd>
    /// <p>EC2 Fleet identifies the pools with the highest capacity availability for the number of instances that are launching. This means that we will request Spot Instances from the pools that we believe have the lowest chance of interruption in the near term. EC2 Fleet then requests Spot Instances from the lowest priced of these pools.</p>
    /// </dd>
    /// <dt>
    /// capacity-optimized
    /// </dt>
    /// <dd>
    /// <p>EC2 Fleet identifies the pools with the highest capacity availability for the number of instances that are launching. This means that we will request Spot Instances from the pools that we believe have the lowest chance of interruption in the near term. To give certain instance types a higher chance of launching first, use <code>capacity-optimized-prioritized</code>. Set a priority for each instance type by using the <code>Priority</code> parameter for <code>LaunchTemplateOverrides</code>. You can assign the same priority to different <code>LaunchTemplateOverrides</code>. EC2 implements the priorities on a best-effort basis, but optimizes for capacity first. <code>capacity-optimized-prioritized</code> is supported only if your EC2 Fleet uses a launch template. Note that if the On-Demand <code>AllocationStrategy</code> is set to <code>prioritized</code>, the same priority is applied when fulfilling On-Demand capacity.</p>
    /// </dd>
    /// <dt>
    /// diversified
    /// </dt>
    /// <dd>
    /// <p>EC2 Fleet requests instances from all of the Spot Instance pools that you specify.</p>
    /// </dd>
    /// <dt>
    /// lowest-price
    /// </dt>
    /// <dd>
    /// <p>EC2 Fleet requests instances from the lowest priced Spot Instance pool that has available capacity. If the lowest priced pool doesn't have available capacity, the Spot Instances come from the next lowest priced pool that has available capacity. If a pool runs out of capacity before fulfilling your desired capacity, EC2 Fleet will continue to fulfill your request by drawing from the next lowest priced pool. To ensure that your desired capacity is met, you might receive Spot Instances from several pools. Because this strategy only considers instance price and not capacity availability, it might lead to high interruption rates.</p>
    /// </dd>
    /// </dl>
    /// <p>Default: <code>lowest-price</code> </p>
    #[doc(hidden)]
    pub allocation_strategy: std::option::Option<crate::model::SpotAllocationStrategy>,
    /// <p>The strategies for managing your Spot Instances that are at an elevated risk of being interrupted.</p>
    #[doc(hidden)]
    pub maintenance_strategies:
        std::option::Option<crate::model::FleetSpotMaintenanceStrategiesRequest>,
    /// <p>The behavior when a Spot Instance is interrupted.</p>
    /// <p>Default: <code>terminate</code> </p>
    #[doc(hidden)]
    pub instance_interruption_behavior:
        std::option::Option<crate::model::SpotInstanceInterruptionBehavior>,
    /// <p>The number of Spot pools across which to allocate your target Spot capacity. Supported only when Spot <code>AllocationStrategy</code> is set to <code>lowest-price</code>. EC2 Fleet selects the cheapest Spot pools and evenly allocates your target Spot capacity across the number of Spot pools that you specify.</p>
    /// <p>Note that EC2 Fleet attempts to draw Spot Instances from the number of pools that you specify on a best effort basis. If a pool runs out of Spot capacity before fulfilling your target capacity, EC2 Fleet will continue to fulfill your request by drawing from the next cheapest pool. To ensure that your target capacity is met, you might receive Spot Instances from more than the number of pools that you specified. Similarly, if most of the pools have no Spot capacity, you might receive your full target capacity from fewer than the number of pools that you specified.</p>
    #[doc(hidden)]
    pub instance_pools_to_use_count: std::option::Option<i32>,
    /// <p>Indicates that the fleet uses a single instance type to launch all Spot Instances in the fleet.</p>
    /// <p>Supported only for fleets of type <code>instant</code>.</p>
    #[doc(hidden)]
    pub single_instance_type: std::option::Option<bool>,
    /// <p>Indicates that the fleet launches all Spot Instances into a single Availability Zone.</p>
    /// <p>Supported only for fleets of type <code>instant</code>.</p>
    #[doc(hidden)]
    pub single_availability_zone: std::option::Option<bool>,
    /// <p>The minimum target capacity for Spot Instances in the fleet. If the minimum target capacity is not reached, the fleet launches no instances.</p>
    /// <p>Supported only for fleets of type <code>instant</code>.</p>
    /// <p>At least one of the following must be specified: <code>SingleAvailabilityZone</code> | <code>SingleInstanceType</code> </p>
    #[doc(hidden)]
    pub min_target_capacity: std::option::Option<i32>,
    /// <p>The maximum amount per hour for Spot Instances that you're willing to pay. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.</p> <important>
    /// <p>If you specify a maximum price, your Spot Instances will be interrupted more frequently than if you do not specify this parameter.</p>
    /// </important>
    #[doc(hidden)]
    pub max_total_price: std::option::Option<std::string::String>,
}
impl SpotOptionsRequest {
    /// <p>The strategy that determines how to allocate the target Spot Instance capacity across the Spot Instance pools specified by the EC2 Fleet launch configuration. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet-allocation-strategy.html">Allocation strategies for Spot Instances</a> in the <i>Amazon EC2 User Guide</i>.</p>
    /// <dl>
    /// <dt>
    /// price-capacity-optimized (recommended)
    /// </dt>
    /// <dd>
    /// <p>EC2 Fleet identifies the pools with the highest capacity availability for the number of instances that are launching. This means that we will request Spot Instances from the pools that we believe have the lowest chance of interruption in the near term. EC2 Fleet then requests Spot Instances from the lowest priced of these pools.</p>
    /// </dd>
    /// <dt>
    /// capacity-optimized
    /// </dt>
    /// <dd>
    /// <p>EC2 Fleet identifies the pools with the highest capacity availability for the number of instances that are launching. This means that we will request Spot Instances from the pools that we believe have the lowest chance of interruption in the near term. To give certain instance types a higher chance of launching first, use <code>capacity-optimized-prioritized</code>. Set a priority for each instance type by using the <code>Priority</code> parameter for <code>LaunchTemplateOverrides</code>. You can assign the same priority to different <code>LaunchTemplateOverrides</code>. EC2 implements the priorities on a best-effort basis, but optimizes for capacity first. <code>capacity-optimized-prioritized</code> is supported only if your EC2 Fleet uses a launch template. Note that if the On-Demand <code>AllocationStrategy</code> is set to <code>prioritized</code>, the same priority is applied when fulfilling On-Demand capacity.</p>
    /// </dd>
    /// <dt>
    /// diversified
    /// </dt>
    /// <dd>
    /// <p>EC2 Fleet requests instances from all of the Spot Instance pools that you specify.</p>
    /// </dd>
    /// <dt>
    /// lowest-price
    /// </dt>
    /// <dd>
    /// <p>EC2 Fleet requests instances from the lowest priced Spot Instance pool that has available capacity. If the lowest priced pool doesn't have available capacity, the Spot Instances come from the next lowest priced pool that has available capacity. If a pool runs out of capacity before fulfilling your desired capacity, EC2 Fleet will continue to fulfill your request by drawing from the next lowest priced pool. To ensure that your desired capacity is met, you might receive Spot Instances from several pools. Because this strategy only considers instance price and not capacity availability, it might lead to high interruption rates.</p>
    /// </dd>
    /// </dl>
    /// <p>Default: <code>lowest-price</code> </p>
    pub fn allocation_strategy(
        &self,
    ) -> std::option::Option<&crate::model::SpotAllocationStrategy> {
        self.allocation_strategy.as_ref()
    }
    /// <p>The strategies for managing your Spot Instances that are at an elevated risk of being interrupted.</p>
    pub fn maintenance_strategies(
        &self,
    ) -> std::option::Option<&crate::model::FleetSpotMaintenanceStrategiesRequest> {
        self.maintenance_strategies.as_ref()
    }
    /// <p>The behavior when a Spot Instance is interrupted.</p>
    /// <p>Default: <code>terminate</code> </p>
    pub fn instance_interruption_behavior(
        &self,
    ) -> std::option::Option<&crate::model::SpotInstanceInterruptionBehavior> {
        self.instance_interruption_behavior.as_ref()
    }
    /// <p>The number of Spot pools across which to allocate your target Spot capacity. Supported only when Spot <code>AllocationStrategy</code> is set to <code>lowest-price</code>. EC2 Fleet selects the cheapest Spot pools and evenly allocates your target Spot capacity across the number of Spot pools that you specify.</p>
    /// <p>Note that EC2 Fleet attempts to draw Spot Instances from the number of pools that you specify on a best effort basis. If a pool runs out of Spot capacity before fulfilling your target capacity, EC2 Fleet will continue to fulfill your request by drawing from the next cheapest pool. To ensure that your target capacity is met, you might receive Spot Instances from more than the number of pools that you specified. Similarly, if most of the pools have no Spot capacity, you might receive your full target capacity from fewer than the number of pools that you specified.</p>
    pub fn instance_pools_to_use_count(&self) -> std::option::Option<i32> {
        self.instance_pools_to_use_count
    }
    /// <p>Indicates that the fleet uses a single instance type to launch all Spot Instances in the fleet.</p>
    /// <p>Supported only for fleets of type <code>instant</code>.</p>
    pub fn single_instance_type(&self) -> std::option::Option<bool> {
        self.single_instance_type
    }
    /// <p>Indicates that the fleet launches all Spot Instances into a single Availability Zone.</p>
    /// <p>Supported only for fleets of type <code>instant</code>.</p>
    pub fn single_availability_zone(&self) -> std::option::Option<bool> {
        self.single_availability_zone
    }
    /// <p>The minimum target capacity for Spot Instances in the fleet. If the minimum target capacity is not reached, the fleet launches no instances.</p>
    /// <p>Supported only for fleets of type <code>instant</code>.</p>
    /// <p>At least one of the following must be specified: <code>SingleAvailabilityZone</code> | <code>SingleInstanceType</code> </p>
    pub fn min_target_capacity(&self) -> std::option::Option<i32> {
        self.min_target_capacity
    }
    /// <p>The maximum amount per hour for Spot Instances that you're willing to pay. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.</p> <important>
    /// <p>If you specify a maximum price, your Spot Instances will be interrupted more frequently than if you do not specify this parameter.</p>
    /// </important>
    pub fn max_total_price(&self) -> std::option::Option<&str> {
        self.max_total_price.as_deref()
    }
}
/// See [`SpotOptionsRequest`](crate::model::SpotOptionsRequest).
pub mod spot_options_request {

    /// A builder for [`SpotOptionsRequest`](crate::model::SpotOptionsRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) allocation_strategy: std::option::Option<crate::model::SpotAllocationStrategy>,
        pub(crate) maintenance_strategies:
            std::option::Option<crate::model::FleetSpotMaintenanceStrategiesRequest>,
        pub(crate) instance_interruption_behavior:
            std::option::Option<crate::model::SpotInstanceInterruptionBehavior>,
        pub(crate) instance_pools_to_use_count: std::option::Option<i32>,
        pub(crate) single_instance_type: std::option::Option<bool>,
        pub(crate) single_availability_zone: std::option::Option<bool>,
        pub(crate) min_target_capacity: std::option::Option<i32>,
        pub(crate) max_total_price: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The strategy that determines how to allocate the target Spot Instance capacity across the Spot Instance pools specified by the EC2 Fleet launch configuration. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet-allocation-strategy.html">Allocation strategies for Spot Instances</a> in the <i>Amazon EC2 User Guide</i>.</p>
        /// <dl>
        /// <dt>
        /// price-capacity-optimized (recommended)
        /// </dt>
        /// <dd>
        /// <p>EC2 Fleet identifies the pools with the highest capacity availability for the number of instances that are launching. This means that we will request Spot Instances from the pools that we believe have the lowest chance of interruption in the near term. EC2 Fleet then requests Spot Instances from the lowest priced of these pools.</p>
        /// </dd>
        /// <dt>
        /// capacity-optimized
        /// </dt>
        /// <dd>
        /// <p>EC2 Fleet identifies the pools with the highest capacity availability for the number of instances that are launching. This means that we will request Spot Instances from the pools that we believe have the lowest chance of interruption in the near term. To give certain instance types a higher chance of launching first, use <code>capacity-optimized-prioritized</code>. Set a priority for each instance type by using the <code>Priority</code> parameter for <code>LaunchTemplateOverrides</code>. You can assign the same priority to different <code>LaunchTemplateOverrides</code>. EC2 implements the priorities on a best-effort basis, but optimizes for capacity first. <code>capacity-optimized-prioritized</code> is supported only if your EC2 Fleet uses a launch template. Note that if the On-Demand <code>AllocationStrategy</code> is set to <code>prioritized</code>, the same priority is applied when fulfilling On-Demand capacity.</p>
        /// </dd>
        /// <dt>
        /// diversified
        /// </dt>
        /// <dd>
        /// <p>EC2 Fleet requests instances from all of the Spot Instance pools that you specify.</p>
        /// </dd>
        /// <dt>
        /// lowest-price
        /// </dt>
        /// <dd>
        /// <p>EC2 Fleet requests instances from the lowest priced Spot Instance pool that has available capacity. If the lowest priced pool doesn't have available capacity, the Spot Instances come from the next lowest priced pool that has available capacity. If a pool runs out of capacity before fulfilling your desired capacity, EC2 Fleet will continue to fulfill your request by drawing from the next lowest priced pool. To ensure that your desired capacity is met, you might receive Spot Instances from several pools. Because this strategy only considers instance price and not capacity availability, it might lead to high interruption rates.</p>
        /// </dd>
        /// </dl>
        /// <p>Default: <code>lowest-price</code> </p>
        pub fn allocation_strategy(mut self, input: crate::model::SpotAllocationStrategy) -> Self {
            self.allocation_strategy = Some(input);
            self
        }
        /// <p>The strategy that determines how to allocate the target Spot Instance capacity across the Spot Instance pools specified by the EC2 Fleet launch configuration. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet-allocation-strategy.html">Allocation strategies for Spot Instances</a> in the <i>Amazon EC2 User Guide</i>.</p>
        /// <dl>
        /// <dt>
        /// price-capacity-optimized (recommended)
        /// </dt>
        /// <dd>
        /// <p>EC2 Fleet identifies the pools with the highest capacity availability for the number of instances that are launching. This means that we will request Spot Instances from the pools that we believe have the lowest chance of interruption in the near term. EC2 Fleet then requests Spot Instances from the lowest priced of these pools.</p>
        /// </dd>
        /// <dt>
        /// capacity-optimized
        /// </dt>
        /// <dd>
        /// <p>EC2 Fleet identifies the pools with the highest capacity availability for the number of instances that are launching. This means that we will request Spot Instances from the pools that we believe have the lowest chance of interruption in the near term. To give certain instance types a higher chance of launching first, use <code>capacity-optimized-prioritized</code>. Set a priority for each instance type by using the <code>Priority</code> parameter for <code>LaunchTemplateOverrides</code>. You can assign the same priority to different <code>LaunchTemplateOverrides</code>. EC2 implements the priorities on a best-effort basis, but optimizes for capacity first. <code>capacity-optimized-prioritized</code> is supported only if your EC2 Fleet uses a launch template. Note that if the On-Demand <code>AllocationStrategy</code> is set to <code>prioritized</code>, the same priority is applied when fulfilling On-Demand capacity.</p>
        /// </dd>
        /// <dt>
        /// diversified
        /// </dt>
        /// <dd>
        /// <p>EC2 Fleet requests instances from all of the Spot Instance pools that you specify.</p>
        /// </dd>
        /// <dt>
        /// lowest-price
        /// </dt>
        /// <dd>
        /// <p>EC2 Fleet requests instances from the lowest priced Spot Instance pool that has available capacity. If the lowest priced pool doesn't have available capacity, the Spot Instances come from the next lowest priced pool that has available capacity. If a pool runs out of capacity before fulfilling your desired capacity, EC2 Fleet will continue to fulfill your request by drawing from the next lowest priced pool. To ensure that your desired capacity is met, you might receive Spot Instances from several pools. Because this strategy only considers instance price and not capacity availability, it might lead to high interruption rates.</p>
        /// </dd>
        /// </dl>
        /// <p>Default: <code>lowest-price</code> </p>
        pub fn set_allocation_strategy(
            mut self,
            input: std::option::Option<crate::model::SpotAllocationStrategy>,
        ) -> Self {
            self.allocation_strategy = input;
            self
        }
        /// <p>The strategies for managing your Spot Instances that are at an elevated risk of being interrupted.</p>
        pub fn maintenance_strategies(
            mut self,
            input: crate::model::FleetSpotMaintenanceStrategiesRequest,
        ) -> Self {
            self.maintenance_strategies = Some(input);
            self
        }
        /// <p>The strategies for managing your Spot Instances that are at an elevated risk of being interrupted.</p>
        pub fn set_maintenance_strategies(
            mut self,
            input: std::option::Option<crate::model::FleetSpotMaintenanceStrategiesRequest>,
        ) -> Self {
            self.maintenance_strategies = input;
            self
        }
        /// <p>The behavior when a Spot Instance is interrupted.</p>
        /// <p>Default: <code>terminate</code> </p>
        pub fn instance_interruption_behavior(
            mut self,
            input: crate::model::SpotInstanceInterruptionBehavior,
        ) -> Self {
            self.instance_interruption_behavior = Some(input);
            self
        }
        /// <p>The behavior when a Spot Instance is interrupted.</p>
        /// <p>Default: <code>terminate</code> </p>
        pub fn set_instance_interruption_behavior(
            mut self,
            input: std::option::Option<crate::model::SpotInstanceInterruptionBehavior>,
        ) -> Self {
            self.instance_interruption_behavior = input;
            self
        }
        /// <p>The number of Spot pools across which to allocate your target Spot capacity. Supported only when Spot <code>AllocationStrategy</code> is set to <code>lowest-price</code>. EC2 Fleet selects the cheapest Spot pools and evenly allocates your target Spot capacity across the number of Spot pools that you specify.</p>
        /// <p>Note that EC2 Fleet attempts to draw Spot Instances from the number of pools that you specify on a best effort basis. If a pool runs out of Spot capacity before fulfilling your target capacity, EC2 Fleet will continue to fulfill your request by drawing from the next cheapest pool. To ensure that your target capacity is met, you might receive Spot Instances from more than the number of pools that you specified. Similarly, if most of the pools have no Spot capacity, you might receive your full target capacity from fewer than the number of pools that you specified.</p>
        pub fn instance_pools_to_use_count(mut self, input: i32) -> Self {
            self.instance_pools_to_use_count = Some(input);
            self
        }
        /// <p>The number of Spot pools across which to allocate your target Spot capacity. Supported only when Spot <code>AllocationStrategy</code> is set to <code>lowest-price</code>. EC2 Fleet selects the cheapest Spot pools and evenly allocates your target Spot capacity across the number of Spot pools that you specify.</p>
        /// <p>Note that EC2 Fleet attempts to draw Spot Instances from the number of pools that you specify on a best effort basis. If a pool runs out of Spot capacity before fulfilling your target capacity, EC2 Fleet will continue to fulfill your request by drawing from the next cheapest pool. To ensure that your target capacity is met, you might receive Spot Instances from more than the number of pools that you specified. Similarly, if most of the pools have no Spot capacity, you might receive your full target capacity from fewer than the number of pools that you specified.</p>
        pub fn set_instance_pools_to_use_count(mut self, input: std::option::Option<i32>) -> Self {
            self.instance_pools_to_use_count = input;
            self
        }
        /// <p>Indicates that the fleet uses a single instance type to launch all Spot Instances in the fleet.</p>
        /// <p>Supported only for fleets of type <code>instant</code>.</p>
        pub fn single_instance_type(mut self, input: bool) -> Self {
            self.single_instance_type = Some(input);
            self
        }
        /// <p>Indicates that the fleet uses a single instance type to launch all Spot Instances in the fleet.</p>
        /// <p>Supported only for fleets of type <code>instant</code>.</p>
        pub fn set_single_instance_type(mut self, input: std::option::Option<bool>) -> Self {
            self.single_instance_type = input;
            self
        }
        /// <p>Indicates that the fleet launches all Spot Instances into a single Availability Zone.</p>
        /// <p>Supported only for fleets of type <code>instant</code>.</p>
        pub fn single_availability_zone(mut self, input: bool) -> Self {
            self.single_availability_zone = Some(input);
            self
        }
        /// <p>Indicates that the fleet launches all Spot Instances into a single Availability Zone.</p>
        /// <p>Supported only for fleets of type <code>instant</code>.</p>
        pub fn set_single_availability_zone(mut self, input: std::option::Option<bool>) -> Self {
            self.single_availability_zone = input;
            self
        }
        /// <p>The minimum target capacity for Spot Instances in the fleet. If the minimum target capacity is not reached, the fleet launches no instances.</p>
        /// <p>Supported only for fleets of type <code>instant</code>.</p>
        /// <p>At least one of the following must be specified: <code>SingleAvailabilityZone</code> | <code>SingleInstanceType</code> </p>
        pub fn min_target_capacity(mut self, input: i32) -> Self {
            self.min_target_capacity = Some(input);
            self
        }
        /// <p>The minimum target capacity for Spot Instances in the fleet. If the minimum target capacity is not reached, the fleet launches no instances.</p>
        /// <p>Supported only for fleets of type <code>instant</code>.</p>
        /// <p>At least one of the following must be specified: <code>SingleAvailabilityZone</code> | <code>SingleInstanceType</code> </p>
        pub fn set_min_target_capacity(mut self, input: std::option::Option<i32>) -> Self {
            self.min_target_capacity = input;
            self
        }
        /// <p>The maximum amount per hour for Spot Instances that you're willing to pay. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.</p> <important>
        /// <p>If you specify a maximum price, your Spot Instances will be interrupted more frequently than if you do not specify this parameter.</p>
        /// </important>
        pub fn max_total_price(mut self, input: impl Into<std::string::String>) -> Self {
            self.max_total_price = Some(input.into());
            self
        }
        /// <p>The maximum amount per hour for Spot Instances that you're willing to pay. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.</p> <important>
        /// <p>If you specify a maximum price, your Spot Instances will be interrupted more frequently than if you do not specify this parameter.</p>
        /// </important>
        pub fn set_max_total_price(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.max_total_price = input;
            self
        }
        /// Consumes the builder and constructs a [`SpotOptionsRequest`](crate::model::SpotOptionsRequest).
        pub fn build(self) -> crate::model::SpotOptionsRequest {
            crate::model::SpotOptionsRequest {
                allocation_strategy: self.allocation_strategy,
                maintenance_strategies: self.maintenance_strategies,
                instance_interruption_behavior: self.instance_interruption_behavior,
                instance_pools_to_use_count: self.instance_pools_to_use_count,
                single_instance_type: self.single_instance_type,
                single_availability_zone: self.single_availability_zone,
                min_target_capacity: self.min_target_capacity,
                max_total_price: self.max_total_price,
            }
        }
    }
}
impl SpotOptionsRequest {
    /// Creates a new builder-style object to manufacture [`SpotOptionsRequest`](crate::model::SpotOptionsRequest).
    pub fn builder() -> crate::model::spot_options_request::Builder {
        crate::model::spot_options_request::Builder::default()
    }
}

/// <p>The strategies for managing your Spot Instances that are at an elevated risk of being interrupted.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct FleetSpotMaintenanceStrategiesRequest {
    /// <p>The strategy to use when Amazon EC2 emits a signal that your Spot Instance is at an elevated risk of being interrupted.</p>
    #[doc(hidden)]
    pub capacity_rebalance: std::option::Option<crate::model::FleetSpotCapacityRebalanceRequest>,
}
impl FleetSpotMaintenanceStrategiesRequest {
    /// <p>The strategy to use when Amazon EC2 emits a signal that your Spot Instance is at an elevated risk of being interrupted.</p>
    pub fn capacity_rebalance(
        &self,
    ) -> std::option::Option<&crate::model::FleetSpotCapacityRebalanceRequest> {
        self.capacity_rebalance.as_ref()
    }
}
/// See [`FleetSpotMaintenanceStrategiesRequest`](crate::model::FleetSpotMaintenanceStrategiesRequest).
pub mod fleet_spot_maintenance_strategies_request {

    /// A builder for [`FleetSpotMaintenanceStrategiesRequest`](crate::model::FleetSpotMaintenanceStrategiesRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) capacity_rebalance:
            std::option::Option<crate::model::FleetSpotCapacityRebalanceRequest>,
    }
    impl Builder {
        /// <p>The strategy to use when Amazon EC2 emits a signal that your Spot Instance is at an elevated risk of being interrupted.</p>
        pub fn capacity_rebalance(
            mut self,
            input: crate::model::FleetSpotCapacityRebalanceRequest,
        ) -> Self {
            self.capacity_rebalance = Some(input);
            self
        }
        /// <p>The strategy to use when Amazon EC2 emits a signal that your Spot Instance is at an elevated risk of being interrupted.</p>
        pub fn set_capacity_rebalance(
            mut self,
            input: std::option::Option<crate::model::FleetSpotCapacityRebalanceRequest>,
        ) -> Self {
            self.capacity_rebalance = input;
            self
        }
        /// Consumes the builder and constructs a [`FleetSpotMaintenanceStrategiesRequest`](crate::model::FleetSpotMaintenanceStrategiesRequest).
        pub fn build(self) -> crate::model::FleetSpotMaintenanceStrategiesRequest {
            crate::model::FleetSpotMaintenanceStrategiesRequest {
                capacity_rebalance: self.capacity_rebalance,
            }
        }
    }
}
impl FleetSpotMaintenanceStrategiesRequest {
    /// Creates a new builder-style object to manufacture [`FleetSpotMaintenanceStrategiesRequest`](crate::model::FleetSpotMaintenanceStrategiesRequest).
    pub fn builder() -> crate::model::fleet_spot_maintenance_strategies_request::Builder {
        crate::model::fleet_spot_maintenance_strategies_request::Builder::default()
    }
}

/// <p>The Spot Instance replacement strategy to use when Amazon EC2 emits a rebalance notification signal that your Spot Instance is at an elevated risk of being interrupted. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet-capacity-rebalance.html">Capacity rebalancing</a> in the <i>Amazon EC2 User Guide</i>.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct FleetSpotCapacityRebalanceRequest {
    /// <p>The replacement strategy to use. Only available for fleets of type <code>maintain</code>.</p>
    /// <p> <code>launch</code> - EC2 Fleet launches a replacement Spot Instance when a rebalance notification is emitted for an existing Spot Instance in the fleet. EC2 Fleet does not terminate the instances that receive a rebalance notification. You can terminate the old instances, or you can leave them running. You are charged for all instances while they are running. </p>
    /// <p> <code>launch-before-terminate</code> - EC2 Fleet launches a replacement Spot Instance when a rebalance notification is emitted for an existing Spot Instance in the fleet, and then, after a delay that you specify (in <code>TerminationDelay</code>), terminates the instances that received a rebalance notification.</p>
    #[doc(hidden)]
    pub replacement_strategy: std::option::Option<crate::model::FleetReplacementStrategy>,
    /// <p>The amount of time (in seconds) that Amazon EC2 waits before terminating the old Spot Instance after launching a new replacement Spot Instance.</p>
    /// <p>Required when <code>ReplacementStrategy</code> is set to <code>launch-before-terminate</code>.</p>
    /// <p>Not valid when <code>ReplacementStrategy</code> is set to <code>launch</code>.</p>
    /// <p>Valid values: Minimum value of <code>120</code> seconds. Maximum value of <code>7200</code> seconds.</p>
    #[doc(hidden)]
    pub termination_delay: std::option::Option<i32>,
}
impl FleetSpotCapacityRebalanceRequest {
    /// <p>The replacement strategy to use. Only available for fleets of type <code>maintain</code>.</p>
    /// <p> <code>launch</code> - EC2 Fleet launches a replacement Spot Instance when a rebalance notification is emitted for an existing Spot Instance in the fleet. EC2 Fleet does not terminate the instances that receive a rebalance notification. You can terminate the old instances, or you can leave them running. You are charged for all instances while they are running. </p>
    /// <p> <code>launch-before-terminate</code> - EC2 Fleet launches a replacement Spot Instance when a rebalance notification is emitted for an existing Spot Instance in the fleet, and then, after a delay that you specify (in <code>TerminationDelay</code>), terminates the instances that received a rebalance notification.</p>
    pub fn replacement_strategy(
        &self,
    ) -> std::option::Option<&crate::model::FleetReplacementStrategy> {
        self.replacement_strategy.as_ref()
    }
    /// <p>The amount of time (in seconds) that Amazon EC2 waits before terminating the old Spot Instance after launching a new replacement Spot Instance.</p>
    /// <p>Required when <code>ReplacementStrategy</code> is set to <code>launch-before-terminate</code>.</p>
    /// <p>Not valid when <code>ReplacementStrategy</code> is set to <code>launch</code>.</p>
    /// <p>Valid values: Minimum value of <code>120</code> seconds. Maximum value of <code>7200</code> seconds.</p>
    pub fn termination_delay(&self) -> std::option::Option<i32> {
        self.termination_delay
    }
}
/// See [`FleetSpotCapacityRebalanceRequest`](crate::model::FleetSpotCapacityRebalanceRequest).
pub mod fleet_spot_capacity_rebalance_request {

    /// A builder for [`FleetSpotCapacityRebalanceRequest`](crate::model::FleetSpotCapacityRebalanceRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) replacement_strategy:
            std::option::Option<crate::model::FleetReplacementStrategy>,
        pub(crate) termination_delay: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>The replacement strategy to use. Only available for fleets of type <code>maintain</code>.</p>
        /// <p> <code>launch</code> - EC2 Fleet launches a replacement Spot Instance when a rebalance notification is emitted for an existing Spot Instance in the fleet. EC2 Fleet does not terminate the instances that receive a rebalance notification. You can terminate the old instances, or you can leave them running. You are charged for all instances while they are running. </p>
        /// <p> <code>launch-before-terminate</code> - EC2 Fleet launches a replacement Spot Instance when a rebalance notification is emitted for an existing Spot Instance in the fleet, and then, after a delay that you specify (in <code>TerminationDelay</code>), terminates the instances that received a rebalance notification.</p>
        pub fn replacement_strategy(
            mut self,
            input: crate::model::FleetReplacementStrategy,
        ) -> Self {
            self.replacement_strategy = Some(input);
            self
        }
        /// <p>The replacement strategy to use. Only available for fleets of type <code>maintain</code>.</p>
        /// <p> <code>launch</code> - EC2 Fleet launches a replacement Spot Instance when a rebalance notification is emitted for an existing Spot Instance in the fleet. EC2 Fleet does not terminate the instances that receive a rebalance notification. You can terminate the old instances, or you can leave them running. You are charged for all instances while they are running. </p>
        /// <p> <code>launch-before-terminate</code> - EC2 Fleet launches a replacement Spot Instance when a rebalance notification is emitted for an existing Spot Instance in the fleet, and then, after a delay that you specify (in <code>TerminationDelay</code>), terminates the instances that received a rebalance notification.</p>
        pub fn set_replacement_strategy(
            mut self,
            input: std::option::Option<crate::model::FleetReplacementStrategy>,
        ) -> Self {
            self.replacement_strategy = input;
            self
        }
        /// <p>The amount of time (in seconds) that Amazon EC2 waits before terminating the old Spot Instance after launching a new replacement Spot Instance.</p>
        /// <p>Required when <code>ReplacementStrategy</code> is set to <code>launch-before-terminate</code>.</p>
        /// <p>Not valid when <code>ReplacementStrategy</code> is set to <code>launch</code>.</p>
        /// <p>Valid values: Minimum value of <code>120</code> seconds. Maximum value of <code>7200</code> seconds.</p>
        pub fn termination_delay(mut self, input: i32) -> Self {
            self.termination_delay = Some(input);
            self
        }
        /// <p>The amount of time (in seconds) that Amazon EC2 waits before terminating the old Spot Instance after launching a new replacement Spot Instance.</p>
        /// <p>Required when <code>ReplacementStrategy</code> is set to <code>launch-before-terminate</code>.</p>
        /// <p>Not valid when <code>ReplacementStrategy</code> is set to <code>launch</code>.</p>
        /// <p>Valid values: Minimum value of <code>120</code> seconds. Maximum value of <code>7200</code> seconds.</p>
        pub fn set_termination_delay(mut self, input: std::option::Option<i32>) -> Self {
            self.termination_delay = input;
            self
        }
        /// Consumes the builder and constructs a [`FleetSpotCapacityRebalanceRequest`](crate::model::FleetSpotCapacityRebalanceRequest).
        pub fn build(self) -> crate::model::FleetSpotCapacityRebalanceRequest {
            crate::model::FleetSpotCapacityRebalanceRequest {
                replacement_strategy: self.replacement_strategy,
                termination_delay: self.termination_delay,
            }
        }
    }
}
impl FleetSpotCapacityRebalanceRequest {
    /// Creates a new builder-style object to manufacture [`FleetSpotCapacityRebalanceRequest`](crate::model::FleetSpotCapacityRebalanceRequest).
    pub fn builder() -> crate::model::fleet_spot_capacity_rebalance_request::Builder {
        crate::model::fleet_spot_capacity_rebalance_request::Builder::default()
    }
}

/// <p>Describes a DHCP configuration option.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct NewDhcpConfiguration {
    /// <p>The name of a DHCP option.</p>
    #[doc(hidden)]
    pub key: std::option::Option<std::string::String>,
    /// <p>One or more values for the DHCP option.</p>
    #[doc(hidden)]
    pub values: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl NewDhcpConfiguration {
    /// <p>The name of a DHCP option.</p>
    pub fn key(&self) -> std::option::Option<&str> {
        self.key.as_deref()
    }
    /// <p>One or more values for the DHCP option.</p>
    pub fn values(&self) -> std::option::Option<&[std::string::String]> {
        self.values.as_deref()
    }
}
/// See [`NewDhcpConfiguration`](crate::model::NewDhcpConfiguration).
pub mod new_dhcp_configuration {

    /// A builder for [`NewDhcpConfiguration`](crate::model::NewDhcpConfiguration).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) key: std::option::Option<std::string::String>,
        pub(crate) values: std::option::Option<std::vec::Vec<std::string::String>>,
    }
    impl Builder {
        /// <p>The name of a DHCP option.</p>
        pub fn key(mut self, input: impl Into<std::string::String>) -> Self {
            self.key = Some(input.into());
            self
        }
        /// <p>The name of a DHCP option.</p>
        pub fn set_key(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.key = input;
            self
        }
        /// Appends an item to `values`.
        ///
        /// To override the contents of this collection use [`set_values`](Self::set_values).
        ///
        /// <p>One or more values for the DHCP option.</p>
        pub fn values(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.values.unwrap_or_default();
            v.push(input.into());
            self.values = Some(v);
            self
        }
        /// <p>One or more values for the DHCP option.</p>
        pub fn set_values(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.values = input;
            self
        }
        /// Consumes the builder and constructs a [`NewDhcpConfiguration`](crate::model::NewDhcpConfiguration).
        pub fn build(self) -> crate::model::NewDhcpConfiguration {
            crate::model::NewDhcpConfiguration {
                key: self.key,
                values: self.values,
            }
        }
    }
}
impl NewDhcpConfiguration {
    /// Creates a new builder-style object to manufacture [`NewDhcpConfiguration`](crate::model::NewDhcpConfiguration).
    pub fn builder() -> crate::model::new_dhcp_configuration::Builder {
        crate::model::new_dhcp_configuration::Builder::default()
    }
}

/// <p>Describes the authentication method to be used by a Client VPN endpoint. For more information, see <a href="https://docs.aws.amazon.com/vpn/latest/clientvpn-admin/authentication-authrization.html#client-authentication">Authentication</a> in the <i>Client VPN Administrator Guide</i>.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ClientVpnAuthenticationRequest {
    /// <p>The type of client authentication to be used.</p>
    #[doc(hidden)]
    pub r#type: std::option::Option<crate::model::ClientVpnAuthenticationType>,
    /// <p>Information about the Active Directory to be used, if applicable. You must provide this information if <b>Type</b> is <code>directory-service-authentication</code>.</p>
    #[doc(hidden)]
    pub active_directory: std::option::Option<crate::model::DirectoryServiceAuthenticationRequest>,
    /// <p>Information about the authentication certificates to be used, if applicable. You must provide this information if <b>Type</b> is <code>certificate-authentication</code>.</p>
    #[doc(hidden)]
    pub mutual_authentication: std::option::Option<crate::model::CertificateAuthenticationRequest>,
    /// <p>Information about the IAM SAML identity provider to be used, if applicable. You must provide this information if <b>Type</b> is <code>federated-authentication</code>.</p>
    #[doc(hidden)]
    pub federated_authentication: std::option::Option<crate::model::FederatedAuthenticationRequest>,
}
impl ClientVpnAuthenticationRequest {
    /// <p>The type of client authentication to be used.</p>
    pub fn r#type(&self) -> std::option::Option<&crate::model::ClientVpnAuthenticationType> {
        self.r#type.as_ref()
    }
    /// <p>Information about the Active Directory to be used, if applicable. You must provide this information if <b>Type</b> is <code>directory-service-authentication</code>.</p>
    pub fn active_directory(
        &self,
    ) -> std::option::Option<&crate::model::DirectoryServiceAuthenticationRequest> {
        self.active_directory.as_ref()
    }
    /// <p>Information about the authentication certificates to be used, if applicable. You must provide this information if <b>Type</b> is <code>certificate-authentication</code>.</p>
    pub fn mutual_authentication(
        &self,
    ) -> std::option::Option<&crate::model::CertificateAuthenticationRequest> {
        self.mutual_authentication.as_ref()
    }
    /// <p>Information about the IAM SAML identity provider to be used, if applicable. You must provide this information if <b>Type</b> is <code>federated-authentication</code>.</p>
    pub fn federated_authentication(
        &self,
    ) -> std::option::Option<&crate::model::FederatedAuthenticationRequest> {
        self.federated_authentication.as_ref()
    }
}
/// See [`ClientVpnAuthenticationRequest`](crate::model::ClientVpnAuthenticationRequest).
pub mod client_vpn_authentication_request {

    /// A builder for [`ClientVpnAuthenticationRequest`](crate::model::ClientVpnAuthenticationRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) r#type: std::option::Option<crate::model::ClientVpnAuthenticationType>,
        pub(crate) active_directory:
            std::option::Option<crate::model::DirectoryServiceAuthenticationRequest>,
        pub(crate) mutual_authentication:
            std::option::Option<crate::model::CertificateAuthenticationRequest>,
        pub(crate) federated_authentication:
            std::option::Option<crate::model::FederatedAuthenticationRequest>,
    }
    impl Builder {
        /// <p>The type of client authentication to be used.</p>
        pub fn r#type(mut self, input: crate::model::ClientVpnAuthenticationType) -> Self {
            self.r#type = Some(input);
            self
        }
        /// <p>The type of client authentication to be used.</p>
        pub fn set_type(
            mut self,
            input: std::option::Option<crate::model::ClientVpnAuthenticationType>,
        ) -> Self {
            self.r#type = input;
            self
        }
        /// <p>Information about the Active Directory to be used, if applicable. You must provide this information if <b>Type</b> is <code>directory-service-authentication</code>.</p>
        pub fn active_directory(
            mut self,
            input: crate::model::DirectoryServiceAuthenticationRequest,
        ) -> Self {
            self.active_directory = Some(input);
            self
        }
        /// <p>Information about the Active Directory to be used, if applicable. You must provide this information if <b>Type</b> is <code>directory-service-authentication</code>.</p>
        pub fn set_active_directory(
            mut self,
            input: std::option::Option<crate::model::DirectoryServiceAuthenticationRequest>,
        ) -> Self {
            self.active_directory = input;
            self
        }
        /// <p>Information about the authentication certificates to be used, if applicable. You must provide this information if <b>Type</b> is <code>certificate-authentication</code>.</p>
        pub fn mutual_authentication(
            mut self,
            input: crate::model::CertificateAuthenticationRequest,
        ) -> Self {
            self.mutual_authentication = Some(input);
            self
        }
        /// <p>Information about the authentication certificates to be used, if applicable. You must provide this information if <b>Type</b> is <code>certificate-authentication</code>.</p>
        pub fn set_mutual_authentication(
            mut self,
            input: std::option::Option<crate::model::CertificateAuthenticationRequest>,
        ) -> Self {
            self.mutual_authentication = input;
            self
        }
        /// <p>Information about the IAM SAML identity provider to be used, if applicable. You must provide this information if <b>Type</b> is <code>federated-authentication</code>.</p>
        pub fn federated_authentication(
            mut self,
            input: crate::model::FederatedAuthenticationRequest,
        ) -> Self {
            self.federated_authentication = Some(input);
            self
        }
        /// <p>Information about the IAM SAML identity provider to be used, if applicable. You must provide this information if <b>Type</b> is <code>federated-authentication</code>.</p>
        pub fn set_federated_authentication(
            mut self,
            input: std::option::Option<crate::model::FederatedAuthenticationRequest>,
        ) -> Self {
            self.federated_authentication = input;
            self
        }
        /// Consumes the builder and constructs a [`ClientVpnAuthenticationRequest`](crate::model::ClientVpnAuthenticationRequest).
        pub fn build(self) -> crate::model::ClientVpnAuthenticationRequest {
            crate::model::ClientVpnAuthenticationRequest {
                r#type: self.r#type,
                active_directory: self.active_directory,
                mutual_authentication: self.mutual_authentication,
                federated_authentication: self.federated_authentication,
            }
        }
    }
}
impl ClientVpnAuthenticationRequest {
    /// Creates a new builder-style object to manufacture [`ClientVpnAuthenticationRequest`](crate::model::ClientVpnAuthenticationRequest).
    pub fn builder() -> crate::model::client_vpn_authentication_request::Builder {
        crate::model::client_vpn_authentication_request::Builder::default()
    }
}

/// <p>The IAM SAML identity provider used for federated authentication.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct FederatedAuthenticationRequest {
    /// <p>The Amazon Resource Name (ARN) of the IAM SAML identity provider.</p>
    #[doc(hidden)]
    pub saml_provider_arn: std::option::Option<std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the IAM SAML identity provider for the self-service portal.</p>
    #[doc(hidden)]
    pub self_service_saml_provider_arn: std::option::Option<std::string::String>,
}
impl FederatedAuthenticationRequest {
    /// <p>The Amazon Resource Name (ARN) of the IAM SAML identity provider.</p>
    pub fn saml_provider_arn(&self) -> std::option::Option<&str> {
        self.saml_provider_arn.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the IAM SAML identity provider for the self-service portal.</p>
    pub fn self_service_saml_provider_arn(&self) -> std::option::Option<&str> {
        self.self_service_saml_provider_arn.as_deref()
    }
}
/// See [`FederatedAuthenticationRequest`](crate::model::FederatedAuthenticationRequest).
pub mod federated_authentication_request {

    /// A builder for [`FederatedAuthenticationRequest`](crate::model::FederatedAuthenticationRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) saml_provider_arn: std::option::Option<std::string::String>,
        pub(crate) self_service_saml_provider_arn: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The Amazon Resource Name (ARN) of the IAM SAML identity provider.</p>
        pub fn saml_provider_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.saml_provider_arn = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the IAM SAML identity provider.</p>
        pub fn set_saml_provider_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.saml_provider_arn = input;
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the IAM SAML identity provider for the self-service portal.</p>
        pub fn self_service_saml_provider_arn(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.self_service_saml_provider_arn = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the IAM SAML identity provider for the self-service portal.</p>
        pub fn set_self_service_saml_provider_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.self_service_saml_provider_arn = input;
            self
        }
        /// Consumes the builder and constructs a [`FederatedAuthenticationRequest`](crate::model::FederatedAuthenticationRequest).
        pub fn build(self) -> crate::model::FederatedAuthenticationRequest {
            crate::model::FederatedAuthenticationRequest {
                saml_provider_arn: self.saml_provider_arn,
                self_service_saml_provider_arn: self.self_service_saml_provider_arn,
            }
        }
    }
}
impl FederatedAuthenticationRequest {
    /// Creates a new builder-style object to manufacture [`FederatedAuthenticationRequest`](crate::model::FederatedAuthenticationRequest).
    pub fn builder() -> crate::model::federated_authentication_request::Builder {
        crate::model::federated_authentication_request::Builder::default()
    }
}

/// <p>Information about the client certificate to be used for authentication.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CertificateAuthenticationRequest {
    /// <p>The ARN of the client certificate. The certificate must be signed by a certificate authority (CA) and it must be provisioned in Certificate Manager (ACM).</p>
    #[doc(hidden)]
    pub client_root_certificate_chain_arn: std::option::Option<std::string::String>,
}
impl CertificateAuthenticationRequest {
    /// <p>The ARN of the client certificate. The certificate must be signed by a certificate authority (CA) and it must be provisioned in Certificate Manager (ACM).</p>
    pub fn client_root_certificate_chain_arn(&self) -> std::option::Option<&str> {
        self.client_root_certificate_chain_arn.as_deref()
    }
}
/// See [`CertificateAuthenticationRequest`](crate::model::CertificateAuthenticationRequest).
pub mod certificate_authentication_request {

    /// A builder for [`CertificateAuthenticationRequest`](crate::model::CertificateAuthenticationRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) client_root_certificate_chain_arn: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The ARN of the client certificate. The certificate must be signed by a certificate authority (CA) and it must be provisioned in Certificate Manager (ACM).</p>
        pub fn client_root_certificate_chain_arn(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.client_root_certificate_chain_arn = Some(input.into());
            self
        }
        /// <p>The ARN of the client certificate. The certificate must be signed by a certificate authority (CA) and it must be provisioned in Certificate Manager (ACM).</p>
        pub fn set_client_root_certificate_chain_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.client_root_certificate_chain_arn = input;
            self
        }
        /// Consumes the builder and constructs a [`CertificateAuthenticationRequest`](crate::model::CertificateAuthenticationRequest).
        pub fn build(self) -> crate::model::CertificateAuthenticationRequest {
            crate::model::CertificateAuthenticationRequest {
                client_root_certificate_chain_arn: self.client_root_certificate_chain_arn,
            }
        }
    }
}
impl CertificateAuthenticationRequest {
    /// Creates a new builder-style object to manufacture [`CertificateAuthenticationRequest`](crate::model::CertificateAuthenticationRequest).
    pub fn builder() -> crate::model::certificate_authentication_request::Builder {
        crate::model::certificate_authentication_request::Builder::default()
    }
}

/// <p>Describes the Active Directory to be used for client authentication.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DirectoryServiceAuthenticationRequest {
    /// <p>The ID of the Active Directory to be used for authentication.</p>
    #[doc(hidden)]
    pub directory_id: std::option::Option<std::string::String>,
}
impl DirectoryServiceAuthenticationRequest {
    /// <p>The ID of the Active Directory to be used for authentication.</p>
    pub fn directory_id(&self) -> std::option::Option<&str> {
        self.directory_id.as_deref()
    }
}
/// See [`DirectoryServiceAuthenticationRequest`](crate::model::DirectoryServiceAuthenticationRequest).
pub mod directory_service_authentication_request {

    /// A builder for [`DirectoryServiceAuthenticationRequest`](crate::model::DirectoryServiceAuthenticationRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) directory_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The ID of the Active Directory to be used for authentication.</p>
        pub fn directory_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.directory_id = Some(input.into());
            self
        }
        /// <p>The ID of the Active Directory to be used for authentication.</p>
        pub fn set_directory_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.directory_id = input;
            self
        }
        /// Consumes the builder and constructs a [`DirectoryServiceAuthenticationRequest`](crate::model::DirectoryServiceAuthenticationRequest).
        pub fn build(self) -> crate::model::DirectoryServiceAuthenticationRequest {
            crate::model::DirectoryServiceAuthenticationRequest {
                directory_id: self.directory_id,
            }
        }
    }
}
impl DirectoryServiceAuthenticationRequest {
    /// Creates a new builder-style object to manufacture [`DirectoryServiceAuthenticationRequest`](crate::model::DirectoryServiceAuthenticationRequest).
    pub fn builder() -> crate::model::directory_service_authentication_request::Builder {
        crate::model::directory_service_authentication_request::Builder::default()
    }
}

/// <p>Information about an instance type to use in a Capacity Reservation Fleet.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ReservationFleetInstanceSpecification {
    /// <p>The instance type for which the Capacity Reservation Fleet reserves capacity.</p>
    #[doc(hidden)]
    pub instance_type: std::option::Option<crate::model::InstanceType>,
    /// <p>The type of operating system for which the Capacity Reservation Fleet reserves capacity.</p>
    #[doc(hidden)]
    pub instance_platform: std::option::Option<crate::model::CapacityReservationInstancePlatform>,
    /// <p>The number of capacity units provided by the specified instance type. This value, together with the total target capacity that you specify for the Fleet determine the number of instances for which the Fleet reserves capacity. Both values are based on units that make sense for your workload. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/crfleet-concepts.html#target-capacity">Total target capacity</a> in the Amazon EC2 User Guide.</p>
    #[doc(hidden)]
    pub weight: std::option::Option<f64>,
    /// <p>The Availability Zone in which the Capacity Reservation Fleet reserves the capacity. A Capacity Reservation Fleet can't span Availability Zones. All instance type specifications that you specify for the Fleet must use the same Availability Zone.</p>
    #[doc(hidden)]
    pub availability_zone: std::option::Option<std::string::String>,
    /// <p>The ID of the Availability Zone in which the Capacity Reservation Fleet reserves the capacity. A Capacity Reservation Fleet can't span Availability Zones. All instance type specifications that you specify for the Fleet must use the same Availability Zone.</p>
    #[doc(hidden)]
    pub availability_zone_id: std::option::Option<std::string::String>,
    /// <p>Indicates whether the Capacity Reservation Fleet supports EBS-optimized instances types. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using EBS-optimized instance types.</p>
    #[doc(hidden)]
    pub ebs_optimized: std::option::Option<bool>,
    /// <p>The priority to assign to the instance type. This value is used to determine which of the instance types specified for the Fleet should be prioritized for use. A lower value indicates a high priority. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/crfleet-concepts.html#instance-priority">Instance type priority</a> in the Amazon EC2 User Guide.</p>
    #[doc(hidden)]
    pub priority: std::option::Option<i32>,
}
impl ReservationFleetInstanceSpecification {
    /// <p>The instance type for which the Capacity Reservation Fleet reserves capacity.</p>
    pub fn instance_type(&self) -> std::option::Option<&crate::model::InstanceType> {
        self.instance_type.as_ref()
    }
    /// <p>The type of operating system for which the Capacity Reservation Fleet reserves capacity.</p>
    pub fn instance_platform(
        &self,
    ) -> std::option::Option<&crate::model::CapacityReservationInstancePlatform> {
        self.instance_platform.as_ref()
    }
    /// <p>The number of capacity units provided by the specified instance type. This value, together with the total target capacity that you specify for the Fleet determine the number of instances for which the Fleet reserves capacity. Both values are based on units that make sense for your workload. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/crfleet-concepts.html#target-capacity">Total target capacity</a> in the Amazon EC2 User Guide.</p>
    pub fn weight(&self) -> std::option::Option<f64> {
        self.weight
    }
    /// <p>The Availability Zone in which the Capacity Reservation Fleet reserves the capacity. A Capacity Reservation Fleet can't span Availability Zones. All instance type specifications that you specify for the Fleet must use the same Availability Zone.</p>
    pub fn availability_zone(&self) -> std::option::Option<&str> {
        self.availability_zone.as_deref()
    }
    /// <p>The ID of the Availability Zone in which the Capacity Reservation Fleet reserves the capacity. A Capacity Reservation Fleet can't span Availability Zones. All instance type specifications that you specify for the Fleet must use the same Availability Zone.</p>
    pub fn availability_zone_id(&self) -> std::option::Option<&str> {
        self.availability_zone_id.as_deref()
    }
    /// <p>Indicates whether the Capacity Reservation Fleet supports EBS-optimized instances types. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using EBS-optimized instance types.</p>
    pub fn ebs_optimized(&self) -> std::option::Option<bool> {
        self.ebs_optimized
    }
    /// <p>The priority to assign to the instance type. This value is used to determine which of the instance types specified for the Fleet should be prioritized for use. A lower value indicates a high priority. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/crfleet-concepts.html#instance-priority">Instance type priority</a> in the Amazon EC2 User Guide.</p>
    pub fn priority(&self) -> std::option::Option<i32> {
        self.priority
    }
}
/// See [`ReservationFleetInstanceSpecification`](crate::model::ReservationFleetInstanceSpecification).
pub mod reservation_fleet_instance_specification {

    /// A builder for [`ReservationFleetInstanceSpecification`](crate::model::ReservationFleetInstanceSpecification).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) instance_type: std::option::Option<crate::model::InstanceType>,
        pub(crate) instance_platform:
            std::option::Option<crate::model::CapacityReservationInstancePlatform>,
        pub(crate) weight: std::option::Option<f64>,
        pub(crate) availability_zone: std::option::Option<std::string::String>,
        pub(crate) availability_zone_id: std::option::Option<std::string::String>,
        pub(crate) ebs_optimized: std::option::Option<bool>,
        pub(crate) priority: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>The instance type for which the Capacity Reservation Fleet reserves capacity.</p>
        pub fn instance_type(mut self, input: crate::model::InstanceType) -> Self {
            self.instance_type = Some(input);
            self
        }
        /// <p>The instance type for which the Capacity Reservation Fleet reserves capacity.</p>
        pub fn set_instance_type(
            mut self,
            input: std::option::Option<crate::model::InstanceType>,
        ) -> Self {
            self.instance_type = input;
            self
        }
        /// <p>The type of operating system for which the Capacity Reservation Fleet reserves capacity.</p>
        pub fn instance_platform(
            mut self,
            input: crate::model::CapacityReservationInstancePlatform,
        ) -> Self {
            self.instance_platform = Some(input);
            self
        }
        /// <p>The type of operating system for which the Capacity Reservation Fleet reserves capacity.</p>
        pub fn set_instance_platform(
            mut self,
            input: std::option::Option<crate::model::CapacityReservationInstancePlatform>,
        ) -> Self {
            self.instance_platform = input;
            self
        }
        /// <p>The number of capacity units provided by the specified instance type. This value, together with the total target capacity that you specify for the Fleet determine the number of instances for which the Fleet reserves capacity. Both values are based on units that make sense for your workload. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/crfleet-concepts.html#target-capacity">Total target capacity</a> in the Amazon EC2 User Guide.</p>
        pub fn weight(mut self, input: f64) -> Self {
            self.weight = Some(input);
            self
        }
        /// <p>The number of capacity units provided by the specified instance type. This value, together with the total target capacity that you specify for the Fleet determine the number of instances for which the Fleet reserves capacity. Both values are based on units that make sense for your workload. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/crfleet-concepts.html#target-capacity">Total target capacity</a> in the Amazon EC2 User Guide.</p>
        pub fn set_weight(mut self, input: std::option::Option<f64>) -> Self {
            self.weight = input;
            self
        }
        /// <p>The Availability Zone in which the Capacity Reservation Fleet reserves the capacity. A Capacity Reservation Fleet can't span Availability Zones. All instance type specifications that you specify for the Fleet must use the same Availability Zone.</p>
        pub fn availability_zone(mut self, input: impl Into<std::string::String>) -> Self {
            self.availability_zone = Some(input.into());
            self
        }
        /// <p>The Availability Zone in which the Capacity Reservation Fleet reserves the capacity. A Capacity Reservation Fleet can't span Availability Zones. All instance type specifications that you specify for the Fleet must use the same Availability Zone.</p>
        pub fn set_availability_zone(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.availability_zone = input;
            self
        }
        /// <p>The ID of the Availability Zone in which the Capacity Reservation Fleet reserves the capacity. A Capacity Reservation Fleet can't span Availability Zones. All instance type specifications that you specify for the Fleet must use the same Availability Zone.</p>
        pub fn availability_zone_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.availability_zone_id = Some(input.into());
            self
        }
        /// <p>The ID of the Availability Zone in which the Capacity Reservation Fleet reserves the capacity. A Capacity Reservation Fleet can't span Availability Zones. All instance type specifications that you specify for the Fleet must use the same Availability Zone.</p>
        pub fn set_availability_zone_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.availability_zone_id = input;
            self
        }
        /// <p>Indicates whether the Capacity Reservation Fleet supports EBS-optimized instances types. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using EBS-optimized instance types.</p>
        pub fn ebs_optimized(mut self, input: bool) -> Self {
            self.ebs_optimized = Some(input);
            self
        }
        /// <p>Indicates whether the Capacity Reservation Fleet supports EBS-optimized instances types. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using EBS-optimized instance types.</p>
        pub fn set_ebs_optimized(mut self, input: std::option::Option<bool>) -> Self {
            self.ebs_optimized = input;
            self
        }
        /// <p>The priority to assign to the instance type. This value is used to determine which of the instance types specified for the Fleet should be prioritized for use. A lower value indicates a high priority. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/crfleet-concepts.html#instance-priority">Instance type priority</a> in the Amazon EC2 User Guide.</p>
        pub fn priority(mut self, input: i32) -> Self {
            self.priority = Some(input);
            self
        }
        /// <p>The priority to assign to the instance type. This value is used to determine which of the instance types specified for the Fleet should be prioritized for use. A lower value indicates a high priority. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/crfleet-concepts.html#instance-priority">Instance type priority</a> in the Amazon EC2 User Guide.</p>
        pub fn set_priority(mut self, input: std::option::Option<i32>) -> Self {
            self.priority = input;
            self
        }
        /// Consumes the builder and constructs a [`ReservationFleetInstanceSpecification`](crate::model::ReservationFleetInstanceSpecification).
        pub fn build(self) -> crate::model::ReservationFleetInstanceSpecification {
            crate::model::ReservationFleetInstanceSpecification {
                instance_type: self.instance_type,
                instance_platform: self.instance_platform,
                weight: self.weight,
                availability_zone: self.availability_zone,
                availability_zone_id: self.availability_zone_id,
                ebs_optimized: self.ebs_optimized,
                priority: self.priority,
            }
        }
    }
}
impl ReservationFleetInstanceSpecification {
    /// Creates a new builder-style object to manufacture [`ReservationFleetInstanceSpecification`](crate::model::ReservationFleetInstanceSpecification).
    pub fn builder() -> crate::model::reservation_fleet_instance_specification::Builder {
        crate::model::reservation_fleet_instance_specification::Builder::default()
    }
}

/// <p>Describes a request to cancel a Spot Instance.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CancelledSpotInstanceRequest {
    /// <p>The ID of the Spot Instance request.</p>
    #[doc(hidden)]
    pub spot_instance_request_id: std::option::Option<std::string::String>,
    /// <p>The state of the Spot Instance request.</p>
    #[doc(hidden)]
    pub state: std::option::Option<crate::model::CancelSpotInstanceRequestState>,
}
impl CancelledSpotInstanceRequest {
    /// <p>The ID of the Spot Instance request.</p>
    pub fn spot_instance_request_id(&self) -> std::option::Option<&str> {
        self.spot_instance_request_id.as_deref()
    }
    /// <p>The state of the Spot Instance request.</p>
    pub fn state(&self) -> std::option::Option<&crate::model::CancelSpotInstanceRequestState> {
        self.state.as_ref()
    }
}
/// See [`CancelledSpotInstanceRequest`](crate::model::CancelledSpotInstanceRequest).
pub mod cancelled_spot_instance_request {

    /// A builder for [`CancelledSpotInstanceRequest`](crate::model::CancelledSpotInstanceRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) spot_instance_request_id: std::option::Option<std::string::String>,
        pub(crate) state: std::option::Option<crate::model::CancelSpotInstanceRequestState>,
    }
    impl Builder {
        /// <p>The ID of the Spot Instance request.</p>
        pub fn spot_instance_request_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.spot_instance_request_id = Some(input.into());
            self
        }
        /// <p>The ID of the Spot Instance request.</p>
        pub fn set_spot_instance_request_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.spot_instance_request_id = input;
            self
        }
        /// <p>The state of the Spot Instance request.</p>
        pub fn state(mut self, input: crate::model::CancelSpotInstanceRequestState) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>The state of the Spot Instance request.</p>
        pub fn set_state(
            mut self,
            input: std::option::Option<crate::model::CancelSpotInstanceRequestState>,
        ) -> Self {
            self.state = input;
            self
        }
        /// Consumes the builder and constructs a [`CancelledSpotInstanceRequest`](crate::model::CancelledSpotInstanceRequest).
        pub fn build(self) -> crate::model::CancelledSpotInstanceRequest {
            crate::model::CancelledSpotInstanceRequest {
                spot_instance_request_id: self.spot_instance_request_id,
                state: self.state,
            }
        }
    }
}
impl CancelledSpotInstanceRequest {
    /// Creates a new builder-style object to manufacture [`CancelledSpotInstanceRequest`](crate::model::CancelledSpotInstanceRequest).
    pub fn builder() -> crate::model::cancelled_spot_instance_request::Builder {
        crate::model::cancelled_spot_instance_request::Builder::default()
    }
}

/// When writing a match expression against `CancelSpotInstanceRequestState`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let cancelspotinstancerequeststate = unimplemented!();
/// match cancelspotinstancerequeststate {
///     CancelSpotInstanceRequestState::Active => { /* ... */ },
///     CancelSpotInstanceRequestState::Cancelled => { /* ... */ },
///     CancelSpotInstanceRequestState::Closed => { /* ... */ },
///     CancelSpotInstanceRequestState::Completed => { /* ... */ },
///     CancelSpotInstanceRequestState::Open => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `cancelspotinstancerequeststate` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `CancelSpotInstanceRequestState::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `CancelSpotInstanceRequestState::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `CancelSpotInstanceRequestState::NewFeature` is defined.
/// Specifically, when `cancelspotinstancerequeststate` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `CancelSpotInstanceRequestState::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 CancelSpotInstanceRequestState {
    #[allow(missing_docs)] // documentation missing in model
    Active,
    #[allow(missing_docs)] // documentation missing in model
    Cancelled,
    #[allow(missing_docs)] // documentation missing in model
    Closed,
    #[allow(missing_docs)] // documentation missing in model
    Completed,
    #[allow(missing_docs)] // documentation missing in model
    Open,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for CancelSpotInstanceRequestState {
    fn from(s: &str) -> Self {
        match s {
            "active" => CancelSpotInstanceRequestState::Active,
            "cancelled" => CancelSpotInstanceRequestState::Cancelled,
            "closed" => CancelSpotInstanceRequestState::Closed,
            "completed" => CancelSpotInstanceRequestState::Completed,
            "open" => CancelSpotInstanceRequestState::Open,
            other => CancelSpotInstanceRequestState::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for CancelSpotInstanceRequestState {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(CancelSpotInstanceRequestState::from(s))
    }
}
impl CancelSpotInstanceRequestState {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            CancelSpotInstanceRequestState::Active => "active",
            CancelSpotInstanceRequestState::Cancelled => "cancelled",
            CancelSpotInstanceRequestState::Closed => "closed",
            CancelSpotInstanceRequestState::Completed => "completed",
            CancelSpotInstanceRequestState::Open => "open",
            CancelSpotInstanceRequestState::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["active", "cancelled", "closed", "completed", "open"]
    }
}
impl AsRef<str> for CancelSpotInstanceRequestState {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes a Spot Fleet request that was not successfully canceled.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CancelSpotFleetRequestsErrorItem {
    /// <p>The error.</p>
    #[doc(hidden)]
    pub error: std::option::Option<crate::model::CancelSpotFleetRequestsError>,
    /// <p>The ID of the Spot Fleet request.</p>
    #[doc(hidden)]
    pub spot_fleet_request_id: std::option::Option<std::string::String>,
}
impl CancelSpotFleetRequestsErrorItem {
    /// <p>The error.</p>
    pub fn error(&self) -> std::option::Option<&crate::model::CancelSpotFleetRequestsError> {
        self.error.as_ref()
    }
    /// <p>The ID of the Spot Fleet request.</p>
    pub fn spot_fleet_request_id(&self) -> std::option::Option<&str> {
        self.spot_fleet_request_id.as_deref()
    }
}
/// See [`CancelSpotFleetRequestsErrorItem`](crate::model::CancelSpotFleetRequestsErrorItem).
pub mod cancel_spot_fleet_requests_error_item {

    /// A builder for [`CancelSpotFleetRequestsErrorItem`](crate::model::CancelSpotFleetRequestsErrorItem).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) error: std::option::Option<crate::model::CancelSpotFleetRequestsError>,
        pub(crate) spot_fleet_request_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The error.</p>
        pub fn error(mut self, input: crate::model::CancelSpotFleetRequestsError) -> Self {
            self.error = Some(input);
            self
        }
        /// <p>The error.</p>
        pub fn set_error(
            mut self,
            input: std::option::Option<crate::model::CancelSpotFleetRequestsError>,
        ) -> Self {
            self.error = input;
            self
        }
        /// <p>The ID of the Spot Fleet request.</p>
        pub fn spot_fleet_request_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.spot_fleet_request_id = Some(input.into());
            self
        }
        /// <p>The ID of the Spot Fleet request.</p>
        pub fn set_spot_fleet_request_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.spot_fleet_request_id = input;
            self
        }
        /// Consumes the builder and constructs a [`CancelSpotFleetRequestsErrorItem`](crate::model::CancelSpotFleetRequestsErrorItem).
        pub fn build(self) -> crate::model::CancelSpotFleetRequestsErrorItem {
            crate::model::CancelSpotFleetRequestsErrorItem {
                error: self.error,
                spot_fleet_request_id: self.spot_fleet_request_id,
            }
        }
    }
}
impl CancelSpotFleetRequestsErrorItem {
    /// Creates a new builder-style object to manufacture [`CancelSpotFleetRequestsErrorItem`](crate::model::CancelSpotFleetRequestsErrorItem).
    pub fn builder() -> crate::model::cancel_spot_fleet_requests_error_item::Builder {
        crate::model::cancel_spot_fleet_requests_error_item::Builder::default()
    }
}

/// <p>Describes a Spot Fleet error.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CancelSpotFleetRequestsError {
    /// <p>The error code.</p>
    #[doc(hidden)]
    pub code: std::option::Option<crate::model::CancelBatchErrorCode>,
    /// <p>The description for the error code.</p>
    #[doc(hidden)]
    pub message: std::option::Option<std::string::String>,
}
impl CancelSpotFleetRequestsError {
    /// <p>The error code.</p>
    pub fn code(&self) -> std::option::Option<&crate::model::CancelBatchErrorCode> {
        self.code.as_ref()
    }
    /// <p>The description for the error code.</p>
    pub fn message(&self) -> std::option::Option<&str> {
        self.message.as_deref()
    }
}
/// See [`CancelSpotFleetRequestsError`](crate::model::CancelSpotFleetRequestsError).
pub mod cancel_spot_fleet_requests_error {

    /// A builder for [`CancelSpotFleetRequestsError`](crate::model::CancelSpotFleetRequestsError).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) code: std::option::Option<crate::model::CancelBatchErrorCode>,
        pub(crate) message: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The error code.</p>
        pub fn code(mut self, input: crate::model::CancelBatchErrorCode) -> Self {
            self.code = Some(input);
            self
        }
        /// <p>The error code.</p>
        pub fn set_code(
            mut self,
            input: std::option::Option<crate::model::CancelBatchErrorCode>,
        ) -> Self {
            self.code = input;
            self
        }
        /// <p>The description for the error code.</p>
        pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
            self.message = Some(input.into());
            self
        }
        /// <p>The description for the error code.</p>
        pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.message = input;
            self
        }
        /// Consumes the builder and constructs a [`CancelSpotFleetRequestsError`](crate::model::CancelSpotFleetRequestsError).
        pub fn build(self) -> crate::model::CancelSpotFleetRequestsError {
            crate::model::CancelSpotFleetRequestsError {
                code: self.code,
                message: self.message,
            }
        }
    }
}
impl CancelSpotFleetRequestsError {
    /// Creates a new builder-style object to manufacture [`CancelSpotFleetRequestsError`](crate::model::CancelSpotFleetRequestsError).
    pub fn builder() -> crate::model::cancel_spot_fleet_requests_error::Builder {
        crate::model::cancel_spot_fleet_requests_error::Builder::default()
    }
}

/// When writing a match expression against `CancelBatchErrorCode`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let cancelbatcherrorcode = unimplemented!();
/// match cancelbatcherrorcode {
///     CancelBatchErrorCode::FleetRequestIdDoesNotExist => { /* ... */ },
///     CancelBatchErrorCode::FleetRequestIdMalformed => { /* ... */ },
///     CancelBatchErrorCode::FleetRequestNotInCancellableState => { /* ... */ },
///     CancelBatchErrorCode::UnexpectedError => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `cancelbatcherrorcode` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `CancelBatchErrorCode::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `CancelBatchErrorCode::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `CancelBatchErrorCode::NewFeature` is defined.
/// Specifically, when `cancelbatcherrorcode` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `CancelBatchErrorCode::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[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 CancelBatchErrorCode {
    #[allow(missing_docs)] // documentation missing in model
    FleetRequestIdDoesNotExist,
    #[allow(missing_docs)] // documentation missing in model
    FleetRequestIdMalformed,
    #[allow(missing_docs)] // documentation missing in model
    FleetRequestNotInCancellableState,
    #[allow(missing_docs)] // documentation missing in model
    UnexpectedError,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for CancelBatchErrorCode {
    fn from(s: &str) -> Self {
        match s {
            "fleetRequestIdDoesNotExist" => CancelBatchErrorCode::FleetRequestIdDoesNotExist,
            "fleetRequestIdMalformed" => CancelBatchErrorCode::FleetRequestIdMalformed,
            "fleetRequestNotInCancellableState" => {
                CancelBatchErrorCode::FleetRequestNotInCancellableState
            }
            "unexpectedError" => CancelBatchErrorCode::UnexpectedError,
            other => {
                CancelBatchErrorCode::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for CancelBatchErrorCode {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(CancelBatchErrorCode::from(s))
    }
}
impl CancelBatchErrorCode {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            CancelBatchErrorCode::FleetRequestIdDoesNotExist => "fleetRequestIdDoesNotExist",
            CancelBatchErrorCode::FleetRequestIdMalformed => "fleetRequestIdMalformed",
            CancelBatchErrorCode::FleetRequestNotInCancellableState => {
                "fleetRequestNotInCancellableState"
            }
            CancelBatchErrorCode::UnexpectedError => "unexpectedError",
            CancelBatchErrorCode::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &[
            "fleetRequestIdDoesNotExist",
            "fleetRequestIdMalformed",
            "fleetRequestNotInCancellableState",
            "unexpectedError",
        ]
    }
}
impl AsRef<str> for CancelBatchErrorCode {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes a Spot Fleet request that was successfully canceled.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CancelSpotFleetRequestsSuccessItem {
    /// <p>The current state of the Spot Fleet request.</p>
    #[doc(hidden)]
    pub current_spot_fleet_request_state: std::option::Option<crate::model::BatchState>,
    /// <p>The previous state of the Spot Fleet request.</p>
    #[doc(hidden)]
    pub previous_spot_fleet_request_state: std::option::Option<crate::model::BatchState>,
    /// <p>The ID of the Spot Fleet request.</p>
    #[doc(hidden)]
    pub spot_fleet_request_id: std::option::Option<std::string::String>,
}
impl CancelSpotFleetRequestsSuccessItem {
    /// <p>The current state of the Spot Fleet request.</p>
    pub fn current_spot_fleet_request_state(
        &self,
    ) -> std::option::Option<&crate::model::BatchState> {
        self.current_spot_fleet_request_state.as_ref()
    }
    /// <p>The previous state of the Spot Fleet request.</p>
    pub fn previous_spot_fleet_request_state(
        &self,
    ) -> std::option::Option<&crate::model::BatchState> {
        self.previous_spot_fleet_request_state.as_ref()
    }
    /// <p>The ID of the Spot Fleet request.</p>
    pub fn spot_fleet_request_id(&self) -> std::option::Option<&str> {
        self.spot_fleet_request_id.as_deref()
    }
}
/// See [`CancelSpotFleetRequestsSuccessItem`](crate::model::CancelSpotFleetRequestsSuccessItem).
pub mod cancel_spot_fleet_requests_success_item {

    /// A builder for [`CancelSpotFleetRequestsSuccessItem`](crate::model::CancelSpotFleetRequestsSuccessItem).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) current_spot_fleet_request_state: std::option::Option<crate::model::BatchState>,
        pub(crate) previous_spot_fleet_request_state: std::option::Option<crate::model::BatchState>,
        pub(crate) spot_fleet_request_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The current state of the Spot Fleet request.</p>
        pub fn current_spot_fleet_request_state(mut self, input: crate::model::BatchState) -> Self {
            self.current_spot_fleet_request_state = Some(input);
            self
        }
        /// <p>The current state of the Spot Fleet request.</p>
        pub fn set_current_spot_fleet_request_state(
            mut self,
            input: std::option::Option<crate::model::BatchState>,
        ) -> Self {
            self.current_spot_fleet_request_state = input;
            self
        }
        /// <p>The previous state of the Spot Fleet request.</p>
        pub fn previous_spot_fleet_request_state(
            mut self,
            input: crate::model::BatchState,
        ) -> Self {
            self.previous_spot_fleet_request_state = Some(input);
            self
        }
        /// <p>The previous state of the Spot Fleet request.</p>
        pub fn set_previous_spot_fleet_request_state(
            mut self,
            input: std::option::Option<crate::model::BatchState>,
        ) -> Self {
            self.previous_spot_fleet_request_state = input;
            self
        }
        /// <p>The ID of the Spot Fleet request.</p>
        pub fn spot_fleet_request_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.spot_fleet_request_id = Some(input.into());
            self
        }
        /// <p>The ID of the Spot Fleet request.</p>
        pub fn set_spot_fleet_request_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.spot_fleet_request_id = input;
            self
        }
        /// Consumes the builder and constructs a [`CancelSpotFleetRequestsSuccessItem`](crate::model::CancelSpotFleetRequestsSuccessItem).
        pub fn build(self) -> crate::model::CancelSpotFleetRequestsSuccessItem {
            crate::model::CancelSpotFleetRequestsSuccessItem {
                current_spot_fleet_request_state: self.current_spot_fleet_request_state,
                previous_spot_fleet_request_state: self.previous_spot_fleet_request_state,
                spot_fleet_request_id: self.spot_fleet_request_id,
            }
        }
    }
}
impl CancelSpotFleetRequestsSuccessItem {
    /// Creates a new builder-style object to manufacture [`CancelSpotFleetRequestsSuccessItem`](crate::model::CancelSpotFleetRequestsSuccessItem).
    pub fn builder() -> crate::model::cancel_spot_fleet_requests_success_item::Builder {
        crate::model::cancel_spot_fleet_requests_success_item::Builder::default()
    }
}

/// <p>Describes a Capacity Reservation Fleet that could not be cancelled.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct FailedCapacityReservationFleetCancellationResult {
    /// <p>The ID of the Capacity Reservation Fleet that could not be cancelled.</p>
    #[doc(hidden)]
    pub capacity_reservation_fleet_id: std::option::Option<std::string::String>,
    /// <p>Information about the Capacity Reservation Fleet cancellation error.</p>
    #[doc(hidden)]
    pub cancel_capacity_reservation_fleet_error:
        std::option::Option<crate::model::CancelCapacityReservationFleetError>,
}
impl FailedCapacityReservationFleetCancellationResult {
    /// <p>The ID of the Capacity Reservation Fleet that could not be cancelled.</p>
    pub fn capacity_reservation_fleet_id(&self) -> std::option::Option<&str> {
        self.capacity_reservation_fleet_id.as_deref()
    }
    /// <p>Information about the Capacity Reservation Fleet cancellation error.</p>
    pub fn cancel_capacity_reservation_fleet_error(
        &self,
    ) -> std::option::Option<&crate::model::CancelCapacityReservationFleetError> {
        self.cancel_capacity_reservation_fleet_error.as_ref()
    }
}
/// See [`FailedCapacityReservationFleetCancellationResult`](crate::model::FailedCapacityReservationFleetCancellationResult).
pub mod failed_capacity_reservation_fleet_cancellation_result {

    /// A builder for [`FailedCapacityReservationFleetCancellationResult`](crate::model::FailedCapacityReservationFleetCancellationResult).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) capacity_reservation_fleet_id: std::option::Option<std::string::String>,
        pub(crate) cancel_capacity_reservation_fleet_error:
            std::option::Option<crate::model::CancelCapacityReservationFleetError>,
    }
    impl Builder {
        /// <p>The ID of the Capacity Reservation Fleet that could not be cancelled.</p>
        pub fn capacity_reservation_fleet_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.capacity_reservation_fleet_id = Some(input.into());
            self
        }
        /// <p>The ID of the Capacity Reservation Fleet that could not be cancelled.</p>
        pub fn set_capacity_reservation_fleet_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.capacity_reservation_fleet_id = input;
            self
        }
        /// <p>Information about the Capacity Reservation Fleet cancellation error.</p>
        pub fn cancel_capacity_reservation_fleet_error(
            mut self,
            input: crate::model::CancelCapacityReservationFleetError,
        ) -> Self {
            self.cancel_capacity_reservation_fleet_error = Some(input);
            self
        }
        /// <p>Information about the Capacity Reservation Fleet cancellation error.</p>
        pub fn set_cancel_capacity_reservation_fleet_error(
            mut self,
            input: std::option::Option<crate::model::CancelCapacityReservationFleetError>,
        ) -> Self {
            self.cancel_capacity_reservation_fleet_error = input;
            self
        }
        /// Consumes the builder and constructs a [`FailedCapacityReservationFleetCancellationResult`](crate::model::FailedCapacityReservationFleetCancellationResult).
        pub fn build(self) -> crate::model::FailedCapacityReservationFleetCancellationResult {
            crate::model::FailedCapacityReservationFleetCancellationResult {
                capacity_reservation_fleet_id: self.capacity_reservation_fleet_id,
                cancel_capacity_reservation_fleet_error: self
                    .cancel_capacity_reservation_fleet_error,
            }
        }
    }
}
impl FailedCapacityReservationFleetCancellationResult {
    /// Creates a new builder-style object to manufacture [`FailedCapacityReservationFleetCancellationResult`](crate::model::FailedCapacityReservationFleetCancellationResult).
    pub fn builder() -> crate::model::failed_capacity_reservation_fleet_cancellation_result::Builder
    {
        crate::model::failed_capacity_reservation_fleet_cancellation_result::Builder::default()
    }
}

/// <p>Describes a Capacity Reservation Fleet cancellation error.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CancelCapacityReservationFleetError {
    /// <p>The error code.</p>
    #[doc(hidden)]
    pub code: std::option::Option<std::string::String>,
    /// <p>The error message.</p>
    #[doc(hidden)]
    pub message: std::option::Option<std::string::String>,
}
impl CancelCapacityReservationFleetError {
    /// <p>The error code.</p>
    pub fn code(&self) -> std::option::Option<&str> {
        self.code.as_deref()
    }
    /// <p>The error message.</p>
    pub fn message(&self) -> std::option::Option<&str> {
        self.message.as_deref()
    }
}
/// See [`CancelCapacityReservationFleetError`](crate::model::CancelCapacityReservationFleetError).
pub mod cancel_capacity_reservation_fleet_error {

    /// A builder for [`CancelCapacityReservationFleetError`](crate::model::CancelCapacityReservationFleetError).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) code: std::option::Option<std::string::String>,
        pub(crate) message: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The error code.</p>
        pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
            self.code = Some(input.into());
            self
        }
        /// <p>The error code.</p>
        pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.code = input;
            self
        }
        /// <p>The error message.</p>
        pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
            self.message = Some(input.into());
            self
        }
        /// <p>The error message.</p>
        pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.message = input;
            self
        }
        /// Consumes the builder and constructs a [`CancelCapacityReservationFleetError`](crate::model::CancelCapacityReservationFleetError).
        pub fn build(self) -> crate::model::CancelCapacityReservationFleetError {
            crate::model::CancelCapacityReservationFleetError {
                code: self.code,
                message: self.message,
            }
        }
    }
}
impl CancelCapacityReservationFleetError {
    /// Creates a new builder-style object to manufacture [`CancelCapacityReservationFleetError`](crate::model::CancelCapacityReservationFleetError).
    pub fn builder() -> crate::model::cancel_capacity_reservation_fleet_error::Builder {
        crate::model::cancel_capacity_reservation_fleet_error::Builder::default()
    }
}

/// <p>Describes a Capacity Reservation Fleet that was successfully cancelled.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CapacityReservationFleetCancellationState {
    /// <p>The current state of the Capacity Reservation Fleet.</p>
    #[doc(hidden)]
    pub current_fleet_state: std::option::Option<crate::model::CapacityReservationFleetState>,
    /// <p>The previous state of the Capacity Reservation Fleet.</p>
    #[doc(hidden)]
    pub previous_fleet_state: std::option::Option<crate::model::CapacityReservationFleetState>,
    /// <p>The ID of the Capacity Reservation Fleet that was successfully cancelled.</p>
    #[doc(hidden)]
    pub capacity_reservation_fleet_id: std::option::Option<std::string::String>,
}
impl CapacityReservationFleetCancellationState {
    /// <p>The current state of the Capacity Reservation Fleet.</p>
    pub fn current_fleet_state(
        &self,
    ) -> std::option::Option<&crate::model::CapacityReservationFleetState> {
        self.current_fleet_state.as_ref()
    }
    /// <p>The previous state of the Capacity Reservation Fleet.</p>
    pub fn previous_fleet_state(
        &self,
    ) -> std::option::Option<&crate::model::CapacityReservationFleetState> {
        self.previous_fleet_state.as_ref()
    }
    /// <p>The ID of the Capacity Reservation Fleet that was successfully cancelled.</p>
    pub fn capacity_reservation_fleet_id(&self) -> std::option::Option<&str> {
        self.capacity_reservation_fleet_id.as_deref()
    }
}
/// See [`CapacityReservationFleetCancellationState`](crate::model::CapacityReservationFleetCancellationState).
pub mod capacity_reservation_fleet_cancellation_state {

    /// A builder for [`CapacityReservationFleetCancellationState`](crate::model::CapacityReservationFleetCancellationState).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) current_fleet_state:
            std::option::Option<crate::model::CapacityReservationFleetState>,
        pub(crate) previous_fleet_state:
            std::option::Option<crate::model::CapacityReservationFleetState>,
        pub(crate) capacity_reservation_fleet_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The current state of the Capacity Reservation Fleet.</p>
        pub fn current_fleet_state(
            mut self,
            input: crate::model::CapacityReservationFleetState,
        ) -> Self {
            self.current_fleet_state = Some(input);
            self
        }
        /// <p>The current state of the Capacity Reservation Fleet.</p>
        pub fn set_current_fleet_state(
            mut self,
            input: std::option::Option<crate::model::CapacityReservationFleetState>,
        ) -> Self {
            self.current_fleet_state = input;
            self
        }
        /// <p>The previous state of the Capacity Reservation Fleet.</p>
        pub fn previous_fleet_state(
            mut self,
            input: crate::model::CapacityReservationFleetState,
        ) -> Self {
            self.previous_fleet_state = Some(input);
            self
        }
        /// <p>The previous state of the Capacity Reservation Fleet.</p>
        pub fn set_previous_fleet_state(
            mut self,
            input: std::option::Option<crate::model::CapacityReservationFleetState>,
        ) -> Self {
            self.previous_fleet_state = input;
            self
        }
        /// <p>The ID of the Capacity Reservation Fleet that was successfully cancelled.</p>
        pub fn capacity_reservation_fleet_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.capacity_reservation_fleet_id = Some(input.into());
            self
        }
        /// <p>The ID of the Capacity Reservation Fleet that was successfully cancelled.</p>
        pub fn set_capacity_reservation_fleet_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.capacity_reservation_fleet_id = input;
            self
        }
        /// Consumes the builder and constructs a [`CapacityReservationFleetCancellationState`](crate::model::CapacityReservationFleetCancellationState).
        pub fn build(self) -> crate::model::CapacityReservationFleetCancellationState {
            crate::model::CapacityReservationFleetCancellationState {
                current_fleet_state: self.current_fleet_state,
                previous_fleet_state: self.previous_fleet_state,
                capacity_reservation_fleet_id: self.capacity_reservation_fleet_id,
            }
        }
    }
}
impl CapacityReservationFleetCancellationState {
    /// Creates a new builder-style object to manufacture [`CapacityReservationFleetCancellationState`](crate::model::CapacityReservationFleetCancellationState).
    pub fn builder() -> crate::model::capacity_reservation_fleet_cancellation_state::Builder {
        crate::model::capacity_reservation_fleet_cancellation_state::Builder::default()
    }
}

/// <p>One or more targets associated with the specified event window. Only one <i>type</i> of target (instance ID, instance tag, or Dedicated Host ID) can be associated with an event window.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InstanceEventWindowAssociationRequest {
    /// <p>The IDs of the instances to associate with the event window. If the instance is on a Dedicated Host, you can't specify the Instance ID parameter; you must use the Dedicated Host ID parameter.</p>
    #[doc(hidden)]
    pub instance_ids: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>The instance tags to associate with the event window. Any instances associated with the tags will be associated with the event window.</p>
    #[doc(hidden)]
    pub instance_tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
    /// <p>The IDs of the Dedicated Hosts to associate with the event window.</p>
    #[doc(hidden)]
    pub dedicated_host_ids: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl InstanceEventWindowAssociationRequest {
    /// <p>The IDs of the instances to associate with the event window. If the instance is on a Dedicated Host, you can't specify the Instance ID parameter; you must use the Dedicated Host ID parameter.</p>
    pub fn instance_ids(&self) -> std::option::Option<&[std::string::String]> {
        self.instance_ids.as_deref()
    }
    /// <p>The instance tags to associate with the event window. Any instances associated with the tags will be associated with the event window.</p>
    pub fn instance_tags(&self) -> std::option::Option<&[crate::model::Tag]> {
        self.instance_tags.as_deref()
    }
    /// <p>The IDs of the Dedicated Hosts to associate with the event window.</p>
    pub fn dedicated_host_ids(&self) -> std::option::Option<&[std::string::String]> {
        self.dedicated_host_ids.as_deref()
    }
}
/// See [`InstanceEventWindowAssociationRequest`](crate::model::InstanceEventWindowAssociationRequest).
pub mod instance_event_window_association_request {

    /// A builder for [`InstanceEventWindowAssociationRequest`](crate::model::InstanceEventWindowAssociationRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) instance_ids: std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) instance_tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        pub(crate) dedicated_host_ids: std::option::Option<std::vec::Vec<std::string::String>>,
    }
    impl Builder {
        /// Appends an item to `instance_ids`.
        ///
        /// To override the contents of this collection use [`set_instance_ids`](Self::set_instance_ids).
        ///
        /// <p>The IDs of the instances to associate with the event window. If the instance is on a Dedicated Host, you can't specify the Instance ID parameter; you must use the Dedicated Host ID parameter.</p>
        pub fn instance_ids(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.instance_ids.unwrap_or_default();
            v.push(input.into());
            self.instance_ids = Some(v);
            self
        }
        /// <p>The IDs of the instances to associate with the event window. If the instance is on a Dedicated Host, you can't specify the Instance ID parameter; you must use the Dedicated Host ID parameter.</p>
        pub fn set_instance_ids(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.instance_ids = input;
            self
        }
        /// Appends an item to `instance_tags`.
        ///
        /// To override the contents of this collection use [`set_instance_tags`](Self::set_instance_tags).
        ///
        /// <p>The instance tags to associate with the event window. Any instances associated with the tags will be associated with the event window.</p>
        pub fn instance_tags(mut self, input: crate::model::Tag) -> Self {
            let mut v = self.instance_tags.unwrap_or_default();
            v.push(input);
            self.instance_tags = Some(v);
            self
        }
        /// <p>The instance tags to associate with the event window. Any instances associated with the tags will be associated with the event window.</p>
        pub fn set_instance_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.instance_tags = input;
            self
        }
        /// Appends an item to `dedicated_host_ids`.
        ///
        /// To override the contents of this collection use [`set_dedicated_host_ids`](Self::set_dedicated_host_ids).
        ///
        /// <p>The IDs of the Dedicated Hosts to associate with the event window.</p>
        pub fn dedicated_host_ids(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.dedicated_host_ids.unwrap_or_default();
            v.push(input.into());
            self.dedicated_host_ids = Some(v);
            self
        }
        /// <p>The IDs of the Dedicated Hosts to associate with the event window.</p>
        pub fn set_dedicated_host_ids(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.dedicated_host_ids = input;
            self
        }
        /// Consumes the builder and constructs a [`InstanceEventWindowAssociationRequest`](crate::model::InstanceEventWindowAssociationRequest).
        pub fn build(self) -> crate::model::InstanceEventWindowAssociationRequest {
            crate::model::InstanceEventWindowAssociationRequest {
                instance_ids: self.instance_ids,
                instance_tags: self.instance_tags,
                dedicated_host_ids: self.dedicated_host_ids,
            }
        }
    }
}
impl InstanceEventWindowAssociationRequest {
    /// Creates a new builder-style object to manufacture [`InstanceEventWindowAssociationRequest`](crate::model::InstanceEventWindowAssociationRequest).
    pub fn builder() -> crate::model::instance_event_window_association_request::Builder {
        crate::model::instance_event_window_association_request::Builder::default()
    }
}

/// <p>Describes the private IP addresses assigned to a network interface.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AssignedPrivateIpAddress {
    /// <p>The private IP address assigned to the network interface.</p>
    #[doc(hidden)]
    pub private_ip_address: std::option::Option<std::string::String>,
}
impl AssignedPrivateIpAddress {
    /// <p>The private IP address assigned to the network interface.</p>
    pub fn private_ip_address(&self) -> std::option::Option<&str> {
        self.private_ip_address.as_deref()
    }
}
/// See [`AssignedPrivateIpAddress`](crate::model::AssignedPrivateIpAddress).
pub mod assigned_private_ip_address {

    /// A builder for [`AssignedPrivateIpAddress`](crate::model::AssignedPrivateIpAddress).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) private_ip_address: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The private IP address assigned to the network interface.</p>
        pub fn private_ip_address(mut self, input: impl Into<std::string::String>) -> Self {
            self.private_ip_address = Some(input.into());
            self
        }
        /// <p>The private IP address assigned to the network interface.</p>
        pub fn set_private_ip_address(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.private_ip_address = input;
            self
        }
        /// Consumes the builder and constructs a [`AssignedPrivateIpAddress`](crate::model::AssignedPrivateIpAddress).
        pub fn build(self) -> crate::model::AssignedPrivateIpAddress {
            crate::model::AssignedPrivateIpAddress {
                private_ip_address: self.private_ip_address,
            }
        }
    }
}
impl AssignedPrivateIpAddress {
    /// Creates a new builder-style object to manufacture [`AssignedPrivateIpAddress`](crate::model::AssignedPrivateIpAddress).
    pub fn builder() -> crate::model::assigned_private_ip_address::Builder {
        crate::model::assigned_private_ip_address::Builder::default()
    }
}