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 AssociateResolverRuleInput {
    /// <p>The ID of the Resolver rule that you want to associate with the VPC. To list the existing Resolver rules, use <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_ListResolverRules.html">ListResolverRules</a>.</p>
    pub resolver_rule_id: ::std::option::Option<::std::string::String>,
    /// <p>A name for the association that you're creating between a Resolver rule and a VPC.</p>
    /// <p>The name can be up to 64 characters long and can contain letters (a-z, A-Z), numbers (0-9), hyphens (-), underscores (_), and spaces. The name cannot consist of only numbers.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>The ID of the VPC that you want to associate the Resolver rule with.</p>
    pub vpc_id: ::std::option::Option<::std::string::String>,
}
impl AssociateResolverRuleInput {
    /// <p>The ID of the Resolver rule that you want to associate with the VPC. To list the existing Resolver rules, use <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_ListResolverRules.html">ListResolverRules</a>.</p>
    pub fn resolver_rule_id(&self) -> ::std::option::Option<&str> {
        self.resolver_rule_id.as_deref()
    }
    /// <p>A name for the association that you're creating between a Resolver rule and a VPC.</p>
    /// <p>The name can be up to 64 characters long and can contain letters (a-z, A-Z), numbers (0-9), hyphens (-), underscores (_), and spaces. The name cannot consist of only numbers.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The ID of the VPC that you want to associate the Resolver rule with.</p>
    pub fn vpc_id(&self) -> ::std::option::Option<&str> {
        self.vpc_id.as_deref()
    }
}
impl AssociateResolverRuleInput {
    /// Creates a new builder-style object to manufacture [`AssociateResolverRuleInput`](crate::operation::associate_resolver_rule::AssociateResolverRuleInput).
    pub fn builder() -> crate::operation::associate_resolver_rule::builders::AssociateResolverRuleInputBuilder {
        crate::operation::associate_resolver_rule::builders::AssociateResolverRuleInputBuilder::default()
    }
}

/// A builder for [`AssociateResolverRuleInput`](crate::operation::associate_resolver_rule::AssociateResolverRuleInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct AssociateResolverRuleInputBuilder {
    pub(crate) resolver_rule_id: ::std::option::Option<::std::string::String>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) vpc_id: ::std::option::Option<::std::string::String>,
}
impl AssociateResolverRuleInputBuilder {
    /// <p>The ID of the Resolver rule that you want to associate with the VPC. To list the existing Resolver rules, use <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_ListResolverRules.html">ListResolverRules</a>.</p>
    /// This field is required.
    pub fn resolver_rule_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.resolver_rule_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the Resolver rule that you want to associate with the VPC. To list the existing Resolver rules, use <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_ListResolverRules.html">ListResolverRules</a>.</p>
    pub fn set_resolver_rule_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.resolver_rule_id = input;
        self
    }
    /// <p>The ID of the Resolver rule that you want to associate with the VPC. To list the existing Resolver rules, use <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_ListResolverRules.html">ListResolverRules</a>.</p>
    pub fn get_resolver_rule_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.resolver_rule_id
    }
    /// <p>A name for the association that you're creating between a Resolver rule and a VPC.</p>
    /// <p>The name can be up to 64 characters long and can contain letters (a-z, A-Z), numbers (0-9), hyphens (-), underscores (_), and spaces. The name cannot consist of only numbers.</p>
    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 name for the association that you're creating between a Resolver rule and a VPC.</p>
    /// <p>The name can be up to 64 characters long and can contain letters (a-z, A-Z), numbers (0-9), hyphens (-), underscores (_), and spaces. The name cannot consist of only numbers.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>A name for the association that you're creating between a Resolver rule and a VPC.</p>
    /// <p>The name can be up to 64 characters long and can contain letters (a-z, A-Z), numbers (0-9), hyphens (-), underscores (_), and spaces. The name cannot consist of only numbers.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>The ID of the VPC that you want to associate the Resolver rule with.</p>
    /// This field is required.
    pub fn vpc_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.vpc_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the VPC that you want to associate the Resolver rule with.</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 that you want to associate the Resolver rule with.</p>
    pub fn get_vpc_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.vpc_id
    }
    /// Consumes the builder and constructs a [`AssociateResolverRuleInput`](crate::operation::associate_resolver_rule::AssociateResolverRuleInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::associate_resolver_rule::AssociateResolverRuleInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::associate_resolver_rule::AssociateResolverRuleInput {
            resolver_rule_id: self.resolver_rule_id,
            name: self.name,
            vpc_id: self.vpc_id,
        })
    }
}