aws-sdk-route53resolver 1.111.0

AWS SDK for Amazon Route 53 Resolver
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 CreateOutpostResolverInput {
    /// <p>A unique string that identifies the request and that allows failed requests to be retried without the risk of running the operation twice.</p>
    /// <p><code>CreatorRequestId</code> can be any unique string, for example, a date/time stamp.</p>
    pub creator_request_id: ::std::option::Option<::std::string::String>,
    /// <p>A friendly name that lets you easily find a configuration in the Resolver dashboard in the Route&nbsp;53 console.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>Number of Amazon EC2 instances for the Resolver on Outpost. The default and minimal value is 4.</p>
    pub instance_count: ::std::option::Option<i32>,
    /// <p>The Amazon EC2 instance type. If you specify this, you must also specify a value for the <code>OutpostArn</code>.</p>
    pub preferred_instance_type: ::std::option::Option<::std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the Outpost. If you specify this, you must also specify a value for the <code>PreferredInstanceType</code>.</p>
    pub outpost_arn: ::std::option::Option<::std::string::String>,
    /// <p>A string that helps identify the Route&nbsp;53 Resolvers on Outpost.</p>
    pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
}
impl CreateOutpostResolverInput {
    /// <p>A unique string that identifies the request and that allows failed requests to be retried without the risk of running the operation twice.</p>
    /// <p><code>CreatorRequestId</code> can be any unique string, for example, a date/time stamp.</p>
    pub fn creator_request_id(&self) -> ::std::option::Option<&str> {
        self.creator_request_id.as_deref()
    }
    /// <p>A friendly name that lets you easily find a configuration in the Resolver dashboard in the Route&nbsp;53 console.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>Number of Amazon EC2 instances for the Resolver on Outpost. The default and minimal value is 4.</p>
    pub fn instance_count(&self) -> ::std::option::Option<i32> {
        self.instance_count
    }
    /// <p>The Amazon EC2 instance type. If you specify this, you must also specify a value for the <code>OutpostArn</code>.</p>
    pub fn preferred_instance_type(&self) -> ::std::option::Option<&str> {
        self.preferred_instance_type.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the Outpost. If you specify this, you must also specify a value for the <code>PreferredInstanceType</code>.</p>
    pub fn outpost_arn(&self) -> ::std::option::Option<&str> {
        self.outpost_arn.as_deref()
    }
    /// <p>A string that helps identify the Route&nbsp;53 Resolvers on Outpost.</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 `.tags.is_none()`.
    pub fn tags(&self) -> &[crate::types::Tag] {
        self.tags.as_deref().unwrap_or_default()
    }
}
impl CreateOutpostResolverInput {
    /// Creates a new builder-style object to manufacture [`CreateOutpostResolverInput`](crate::operation::create_outpost_resolver::CreateOutpostResolverInput).
    pub fn builder() -> crate::operation::create_outpost_resolver::builders::CreateOutpostResolverInputBuilder {
        crate::operation::create_outpost_resolver::builders::CreateOutpostResolverInputBuilder::default()
    }
}

/// A builder for [`CreateOutpostResolverInput`](crate::operation::create_outpost_resolver::CreateOutpostResolverInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateOutpostResolverInputBuilder {
    pub(crate) creator_request_id: ::std::option::Option<::std::string::String>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) instance_count: ::std::option::Option<i32>,
    pub(crate) preferred_instance_type: ::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::types::Tag>>,
}
impl CreateOutpostResolverInputBuilder {
    /// <p>A unique string that identifies the request and that allows failed requests to be retried without the risk of running the operation twice.</p>
    /// <p><code>CreatorRequestId</code> can be any unique string, for example, a date/time stamp.</p>
    /// This field is required.
    pub fn creator_request_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.creator_request_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A unique string that identifies the request and that allows failed requests to be retried without the risk of running the operation twice.</p>
    /// <p><code>CreatorRequestId</code> can be any unique string, for example, a date/time stamp.</p>
    pub fn set_creator_request_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.creator_request_id = input;
        self
    }
    /// <p>A unique string that identifies the request and that allows failed requests to be retried without the risk of running the operation twice.</p>
    /// <p><code>CreatorRequestId</code> can be any unique string, for example, a date/time stamp.</p>
    pub fn get_creator_request_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.creator_request_id
    }
    /// <p>A friendly name that lets you easily find a configuration in the Resolver dashboard in the Route&nbsp;53 console.</p>
    /// This field is required.
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A friendly name that lets you easily find a configuration in the Resolver dashboard in the Route&nbsp;53 console.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>A friendly name that lets you easily find a configuration in the Resolver dashboard in the Route&nbsp;53 console.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>Number of Amazon EC2 instances for the Resolver on Outpost. The default and minimal value is 4.</p>
    pub fn instance_count(mut self, input: i32) -> Self {
        self.instance_count = ::std::option::Option::Some(input);
        self
    }
    /// <p>Number of Amazon EC2 instances for the Resolver on Outpost. The default and minimal value is 4.</p>
    pub fn set_instance_count(mut self, input: ::std::option::Option<i32>) -> Self {
        self.instance_count = input;
        self
    }
    /// <p>Number of Amazon EC2 instances for the Resolver on Outpost. The default and minimal value is 4.</p>
    pub fn get_instance_count(&self) -> &::std::option::Option<i32> {
        &self.instance_count
    }
    /// <p>The Amazon EC2 instance type. If you specify this, you must also specify a value for the <code>OutpostArn</code>.</p>
    /// This field is required.
    pub fn preferred_instance_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.preferred_instance_type = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon EC2 instance type. If you specify this, you must also specify a value for the <code>OutpostArn</code>.</p>
    pub fn set_preferred_instance_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.preferred_instance_type = input;
        self
    }
    /// <p>The Amazon EC2 instance type. If you specify this, you must also specify a value for the <code>OutpostArn</code>.</p>
    pub fn get_preferred_instance_type(&self) -> &::std::option::Option<::std::string::String> {
        &self.preferred_instance_type
    }
    /// <p>The Amazon Resource Name (ARN) of the Outpost. If you specify this, you must also specify a value for the <code>PreferredInstanceType</code>.</p>
    /// This field is required.
    pub fn outpost_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.outpost_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the Outpost. If you specify this, you must also specify a value for the <code>PreferredInstanceType</code>.</p>
    pub fn set_outpost_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.outpost_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the Outpost. If you specify this, you must also specify a value for the <code>PreferredInstanceType</code>.</p>
    pub fn get_outpost_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.outpost_arn
    }
    /// Appends an item to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>A string that helps identify the Route&nbsp;53 Resolvers on Outpost.</p>
    pub fn tags(mut self, input: crate::types::Tag) -> Self {
        let mut v = self.tags.unwrap_or_default();
        v.push(input);
        self.tags = ::std::option::Option::Some(v);
        self
    }
    /// <p>A string that helps identify the Route&nbsp;53 Resolvers on Outpost.</p>
    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
        self.tags = input;
        self
    }
    /// <p>A string that helps identify the Route&nbsp;53 Resolvers on Outpost.</p>
    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
        &self.tags
    }
    /// Consumes the builder and constructs a [`CreateOutpostResolverInput`](crate::operation::create_outpost_resolver::CreateOutpostResolverInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::create_outpost_resolver::CreateOutpostResolverInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::create_outpost_resolver::CreateOutpostResolverInput {
            creator_request_id: self.creator_request_id,
            name: self.name,
            instance_count: self.instance_count,
            preferred_instance_type: self.preferred_instance_type,
            outpost_arn: self.outpost_arn,
            tags: self.tags,
        })
    }
}