aws-sdk-evs 1.29.0

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

/// <p>The VLANs that Amazon EVS creates during environment creation.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Vlan {
    /// <p>The unique ID of the VLAN.</p>
    pub vlan_id: ::std::option::Option<i32>,
    /// <p>The CIDR block of the VLAN. Amazon EVS VLAN subnets have a minimum CIDR block size of /28 and a maximum size of /24.</p>
    pub cidr: ::std::option::Option<::std::string::String>,
    /// <p>The availability zone of the VLAN.</p>
    pub availability_zone: ::std::option::Option<::std::string::String>,
    /// <p>The VMware VCF traffic type that is carried over the VLAN. For example, a VLAN with a <code>functionName</code> of <code>hcx</code> is being used to carry VMware HCX traffic.</p>
    pub function_name: ::std::option::Option<::std::string::String>,
    /// <p>The unique ID of the VLAN subnet.</p>
    pub subnet_id: ::std::option::Option<::std::string::String>,
    /// <p>The date and time that the VLAN was created.</p>
    pub created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The date and time that the VLAN was modified.</p>
    pub modified_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The state of the VLAN.</p>
    pub vlan_state: ::std::option::Option<crate::types::VlanState>,
    /// <p>The state details of the VLAN.</p>
    pub state_details: ::std::option::Option<::std::string::String>,
    /// <p>An array of Elastic IP address associations.</p>
    pub eip_associations: ::std::option::Option<::std::vec::Vec<crate::types::EipAssociation>>,
    /// <p>Determines if the VLAN that Amazon EVS provisions is public or private.</p>
    pub is_public: ::std::option::Option<bool>,
    /// <p>A unique ID for a network access control list.</p>
    pub network_acl_id: ::std::option::Option<::std::string::String>,
}
impl Vlan {
    /// <p>The unique ID of the VLAN.</p>
    pub fn vlan_id(&self) -> ::std::option::Option<i32> {
        self.vlan_id
    }
    /// <p>The CIDR block of the VLAN. Amazon EVS VLAN subnets have a minimum CIDR block size of /28 and a maximum size of /24.</p>
    pub fn cidr(&self) -> ::std::option::Option<&str> {
        self.cidr.as_deref()
    }
    /// <p>The availability zone of the VLAN.</p>
    pub fn availability_zone(&self) -> ::std::option::Option<&str> {
        self.availability_zone.as_deref()
    }
    /// <p>The VMware VCF traffic type that is carried over the VLAN. For example, a VLAN with a <code>functionName</code> of <code>hcx</code> is being used to carry VMware HCX traffic.</p>
    pub fn function_name(&self) -> ::std::option::Option<&str> {
        self.function_name.as_deref()
    }
    /// <p>The unique ID of the VLAN subnet.</p>
    pub fn subnet_id(&self) -> ::std::option::Option<&str> {
        self.subnet_id.as_deref()
    }
    /// <p>The date and time that the VLAN was created.</p>
    pub fn created_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.created_at.as_ref()
    }
    /// <p>The date and time that the VLAN was modified.</p>
    pub fn modified_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.modified_at.as_ref()
    }
    /// <p>The state of the VLAN.</p>
    pub fn vlan_state(&self) -> ::std::option::Option<&crate::types::VlanState> {
        self.vlan_state.as_ref()
    }
    /// <p>The state details of the VLAN.</p>
    pub fn state_details(&self) -> ::std::option::Option<&str> {
        self.state_details.as_deref()
    }
    /// <p>An array of Elastic IP address associations.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.eip_associations.is_none()`.
    pub fn eip_associations(&self) -> &[crate::types::EipAssociation] {
        self.eip_associations.as_deref().unwrap_or_default()
    }
    /// <p>Determines if the VLAN that Amazon EVS provisions is public or private.</p>
    pub fn is_public(&self) -> ::std::option::Option<bool> {
        self.is_public
    }
    /// <p>A unique ID for a network access control list.</p>
    pub fn network_acl_id(&self) -> ::std::option::Option<&str> {
        self.network_acl_id.as_deref()
    }
}
impl Vlan {
    /// Creates a new builder-style object to manufacture [`Vlan`](crate::types::Vlan).
    pub fn builder() -> crate::types::builders::VlanBuilder {
        crate::types::builders::VlanBuilder::default()
    }
}

/// A builder for [`Vlan`](crate::types::Vlan).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct VlanBuilder {
    pub(crate) vlan_id: ::std::option::Option<i32>,
    pub(crate) cidr: ::std::option::Option<::std::string::String>,
    pub(crate) availability_zone: ::std::option::Option<::std::string::String>,
    pub(crate) function_name: ::std::option::Option<::std::string::String>,
    pub(crate) subnet_id: ::std::option::Option<::std::string::String>,
    pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) modified_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) vlan_state: ::std::option::Option<crate::types::VlanState>,
    pub(crate) state_details: ::std::option::Option<::std::string::String>,
    pub(crate) eip_associations: ::std::option::Option<::std::vec::Vec<crate::types::EipAssociation>>,
    pub(crate) is_public: ::std::option::Option<bool>,
    pub(crate) network_acl_id: ::std::option::Option<::std::string::String>,
}
impl VlanBuilder {
    /// <p>The unique ID of the VLAN.</p>
    pub fn vlan_id(mut self, input: i32) -> Self {
        self.vlan_id = ::std::option::Option::Some(input);
        self
    }
    /// <p>The unique ID of the VLAN.</p>
    pub fn set_vlan_id(mut self, input: ::std::option::Option<i32>) -> Self {
        self.vlan_id = input;
        self
    }
    /// <p>The unique ID of the VLAN.</p>
    pub fn get_vlan_id(&self) -> &::std::option::Option<i32> {
        &self.vlan_id
    }
    /// <p>The CIDR block of the VLAN. Amazon EVS VLAN subnets have a minimum CIDR block size of /28 and a maximum size of /24.</p>
    pub fn cidr(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.cidr = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The CIDR block of the VLAN. Amazon EVS VLAN subnets have a minimum CIDR block size of /28 and a maximum size of /24.</p>
    pub fn set_cidr(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.cidr = input;
        self
    }
    /// <p>The CIDR block of the VLAN. Amazon EVS VLAN subnets have a minimum CIDR block size of /28 and a maximum size of /24.</p>
    pub fn get_cidr(&self) -> &::std::option::Option<::std::string::String> {
        &self.cidr
    }
    /// <p>The availability zone of the VLAN.</p>
    pub fn availability_zone(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.availability_zone = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The availability zone of the VLAN.</p>
    pub fn set_availability_zone(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.availability_zone = input;
        self
    }
    /// <p>The availability zone of the VLAN.</p>
    pub fn get_availability_zone(&self) -> &::std::option::Option<::std::string::String> {
        &self.availability_zone
    }
    /// <p>The VMware VCF traffic type that is carried over the VLAN. For example, a VLAN with a <code>functionName</code> of <code>hcx</code> is being used to carry VMware HCX traffic.</p>
    pub fn function_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.function_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The VMware VCF traffic type that is carried over the VLAN. For example, a VLAN with a <code>functionName</code> of <code>hcx</code> is being used to carry VMware HCX traffic.</p>
    pub fn set_function_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.function_name = input;
        self
    }
    /// <p>The VMware VCF traffic type that is carried over the VLAN. For example, a VLAN with a <code>functionName</code> of <code>hcx</code> is being used to carry VMware HCX traffic.</p>
    pub fn get_function_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.function_name
    }
    /// <p>The unique ID of the VLAN subnet.</p>
    pub fn subnet_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.subnet_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique ID of the VLAN subnet.</p>
    pub fn set_subnet_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.subnet_id = input;
        self
    }
    /// <p>The unique ID of the VLAN subnet.</p>
    pub fn get_subnet_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.subnet_id
    }
    /// <p>The date and time that the VLAN was created.</p>
    pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.created_at = ::std::option::Option::Some(input);
        self
    }
    /// <p>The date and time that the VLAN was created.</p>
    pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.created_at = input;
        self
    }
    /// <p>The date and time that the VLAN was created.</p>
    pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.created_at
    }
    /// <p>The date and time that the VLAN was modified.</p>
    pub fn modified_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.modified_at = ::std::option::Option::Some(input);
        self
    }
    /// <p>The date and time that the VLAN was modified.</p>
    pub fn set_modified_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.modified_at = input;
        self
    }
    /// <p>The date and time that the VLAN was modified.</p>
    pub fn get_modified_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.modified_at
    }
    /// <p>The state of the VLAN.</p>
    pub fn vlan_state(mut self, input: crate::types::VlanState) -> Self {
        self.vlan_state = ::std::option::Option::Some(input);
        self
    }
    /// <p>The state of the VLAN.</p>
    pub fn set_vlan_state(mut self, input: ::std::option::Option<crate::types::VlanState>) -> Self {
        self.vlan_state = input;
        self
    }
    /// <p>The state of the VLAN.</p>
    pub fn get_vlan_state(&self) -> &::std::option::Option<crate::types::VlanState> {
        &self.vlan_state
    }
    /// <p>The state details of the VLAN.</p>
    pub fn state_details(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.state_details = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The state details of the VLAN.</p>
    pub fn set_state_details(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.state_details = input;
        self
    }
    /// <p>The state details of the VLAN.</p>
    pub fn get_state_details(&self) -> &::std::option::Option<::std::string::String> {
        &self.state_details
    }
    /// Appends an item to `eip_associations`.
    ///
    /// To override the contents of this collection use [`set_eip_associations`](Self::set_eip_associations).
    ///
    /// <p>An array of Elastic IP address associations.</p>
    pub fn eip_associations(mut self, input: crate::types::EipAssociation) -> Self {
        let mut v = self.eip_associations.unwrap_or_default();
        v.push(input);
        self.eip_associations = ::std::option::Option::Some(v);
        self
    }
    /// <p>An array of Elastic IP address associations.</p>
    pub fn set_eip_associations(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::EipAssociation>>) -> Self {
        self.eip_associations = input;
        self
    }
    /// <p>An array of Elastic IP address associations.</p>
    pub fn get_eip_associations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::EipAssociation>> {
        &self.eip_associations
    }
    /// <p>Determines if the VLAN that Amazon EVS provisions is public or private.</p>
    pub fn is_public(mut self, input: bool) -> Self {
        self.is_public = ::std::option::Option::Some(input);
        self
    }
    /// <p>Determines if the VLAN that Amazon EVS provisions is public or private.</p>
    pub fn set_is_public(mut self, input: ::std::option::Option<bool>) -> Self {
        self.is_public = input;
        self
    }
    /// <p>Determines if the VLAN that Amazon EVS provisions is public or private.</p>
    pub fn get_is_public(&self) -> &::std::option::Option<bool> {
        &self.is_public
    }
    /// <p>A unique ID for a network access control list.</p>
    pub fn network_acl_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.network_acl_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A unique ID for a network access control list.</p>
    pub fn set_network_acl_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.network_acl_id = input;
        self
    }
    /// <p>A unique ID for a network access control list.</p>
    pub fn get_network_acl_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.network_acl_id
    }
    /// Consumes the builder and constructs a [`Vlan`](crate::types::Vlan).
    pub fn build(self) -> crate::types::Vlan {
        crate::types::Vlan {
            vlan_id: self.vlan_id,
            cidr: self.cidr,
            availability_zone: self.availability_zone,
            function_name: self.function_name,
            subnet_id: self.subnet_id,
            created_at: self.created_at,
            modified_at: self.modified_at,
            vlan_state: self.vlan_state,
            state_details: self.state_details,
            eip_associations: self.eip_associations,
            is_public: self.is_public,
            network_acl_id: self.network_acl_id,
        }
    }
}