aws-sdk-ec2 1.222.0

AWS SDK for Amazon Elastic Compute Cloud
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ResetAddressAttributeInput {
    /// <p>\[EC2-VPC\] The allocation ID.</p>
    pub allocation_id: ::std::option::Option<::std::string::String>,
    /// <p>The attribute of the IP address.</p>
    pub attribute: ::std::option::Option<crate::types::AddressAttributeName>,
    /// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
    pub dry_run: ::std::option::Option<bool>,
}
impl ResetAddressAttributeInput {
    /// <p>\[EC2-VPC\] The allocation ID.</p>
    pub fn allocation_id(&self) -> ::std::option::Option<&str> {
        self.allocation_id.as_deref()
    }
    /// <p>The attribute of the IP address.</p>
    pub fn attribute(&self) -> ::std::option::Option<&crate::types::AddressAttributeName> {
        self.attribute.as_ref()
    }
    /// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
    pub fn dry_run(&self) -> ::std::option::Option<bool> {
        self.dry_run
    }
}
impl ResetAddressAttributeInput {
    /// Creates a new builder-style object to manufacture [`ResetAddressAttributeInput`](crate::operation::reset_address_attribute::ResetAddressAttributeInput).
    pub fn builder() -> crate::operation::reset_address_attribute::builders::ResetAddressAttributeInputBuilder {
        crate::operation::reset_address_attribute::builders::ResetAddressAttributeInputBuilder::default()
    }
}

/// A builder for [`ResetAddressAttributeInput`](crate::operation::reset_address_attribute::ResetAddressAttributeInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ResetAddressAttributeInputBuilder {
    pub(crate) allocation_id: ::std::option::Option<::std::string::String>,
    pub(crate) attribute: ::std::option::Option<crate::types::AddressAttributeName>,
    pub(crate) dry_run: ::std::option::Option<bool>,
}
impl ResetAddressAttributeInputBuilder {
    /// <p>\[EC2-VPC\] The allocation ID.</p>
    /// This field is required.
    pub fn allocation_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.allocation_id = ::std::option::Option::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>\[EC2-VPC\] The allocation ID.</p>
    pub fn get_allocation_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.allocation_id
    }
    /// <p>The attribute of the IP address.</p>
    /// This field is required.
    pub fn attribute(mut self, input: crate::types::AddressAttributeName) -> Self {
        self.attribute = ::std::option::Option::Some(input);
        self
    }
    /// <p>The attribute of the IP address.</p>
    pub fn set_attribute(mut self, input: ::std::option::Option<crate::types::AddressAttributeName>) -> Self {
        self.attribute = input;
        self
    }
    /// <p>The attribute of the IP address.</p>
    pub fn get_attribute(&self) -> &::std::option::Option<crate::types::AddressAttributeName> {
        &self.attribute
    }
    /// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
    pub fn dry_run(mut self, input: bool) -> Self {
        self.dry_run = ::std::option::Option::Some(input);
        self
    }
    /// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
    pub fn set_dry_run(mut self, input: ::std::option::Option<bool>) -> Self {
        self.dry_run = input;
        self
    }
    /// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
    pub fn get_dry_run(&self) -> &::std::option::Option<bool> {
        &self.dry_run
    }
    /// Consumes the builder and constructs a [`ResetAddressAttributeInput`](crate::operation::reset_address_attribute::ResetAddressAttributeInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::reset_address_attribute::ResetAddressAttributeInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::reset_address_attribute::ResetAddressAttributeInput {
            allocation_id: self.allocation_id,
            attribute: self.attribute,
            dry_run: self.dry_run,
        })
    }
}