aws_sdk_ec2/types/
_launch_template_private_dns_name_options.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Describes the options for instance hostnames.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct LaunchTemplatePrivateDnsNameOptions {
7    /// <p>The type of hostname to assign to an instance.</p>
8    pub hostname_type: ::std::option::Option<crate::types::HostnameType>,
9    /// <p>Indicates whether to respond to DNS queries for instance hostnames with DNS A records.</p>
10    pub enable_resource_name_dns_a_record: ::std::option::Option<bool>,
11    /// <p>Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records.</p>
12    pub enable_resource_name_dns_aaaa_record: ::std::option::Option<bool>,
13}
14impl LaunchTemplatePrivateDnsNameOptions {
15    /// <p>The type of hostname to assign to an instance.</p>
16    pub fn hostname_type(&self) -> ::std::option::Option<&crate::types::HostnameType> {
17        self.hostname_type.as_ref()
18    }
19    /// <p>Indicates whether to respond to DNS queries for instance hostnames with DNS A records.</p>
20    pub fn enable_resource_name_dns_a_record(&self) -> ::std::option::Option<bool> {
21        self.enable_resource_name_dns_a_record
22    }
23    /// <p>Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records.</p>
24    pub fn enable_resource_name_dns_aaaa_record(&self) -> ::std::option::Option<bool> {
25        self.enable_resource_name_dns_aaaa_record
26    }
27}
28impl LaunchTemplatePrivateDnsNameOptions {
29    /// Creates a new builder-style object to manufacture [`LaunchTemplatePrivateDnsNameOptions`](crate::types::LaunchTemplatePrivateDnsNameOptions).
30    pub fn builder() -> crate::types::builders::LaunchTemplatePrivateDnsNameOptionsBuilder {
31        crate::types::builders::LaunchTemplatePrivateDnsNameOptionsBuilder::default()
32    }
33}
34
35/// A builder for [`LaunchTemplatePrivateDnsNameOptions`](crate::types::LaunchTemplatePrivateDnsNameOptions).
36#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
37#[non_exhaustive]
38pub struct LaunchTemplatePrivateDnsNameOptionsBuilder {
39    pub(crate) hostname_type: ::std::option::Option<crate::types::HostnameType>,
40    pub(crate) enable_resource_name_dns_a_record: ::std::option::Option<bool>,
41    pub(crate) enable_resource_name_dns_aaaa_record: ::std::option::Option<bool>,
42}
43impl LaunchTemplatePrivateDnsNameOptionsBuilder {
44    /// <p>The type of hostname to assign to an instance.</p>
45    pub fn hostname_type(mut self, input: crate::types::HostnameType) -> Self {
46        self.hostname_type = ::std::option::Option::Some(input);
47        self
48    }
49    /// <p>The type of hostname to assign to an instance.</p>
50    pub fn set_hostname_type(mut self, input: ::std::option::Option<crate::types::HostnameType>) -> Self {
51        self.hostname_type = input;
52        self
53    }
54    /// <p>The type of hostname to assign to an instance.</p>
55    pub fn get_hostname_type(&self) -> &::std::option::Option<crate::types::HostnameType> {
56        &self.hostname_type
57    }
58    /// <p>Indicates whether to respond to DNS queries for instance hostnames with DNS A records.</p>
59    pub fn enable_resource_name_dns_a_record(mut self, input: bool) -> Self {
60        self.enable_resource_name_dns_a_record = ::std::option::Option::Some(input);
61        self
62    }
63    /// <p>Indicates whether to respond to DNS queries for instance hostnames with DNS A records.</p>
64    pub fn set_enable_resource_name_dns_a_record(mut self, input: ::std::option::Option<bool>) -> Self {
65        self.enable_resource_name_dns_a_record = input;
66        self
67    }
68    /// <p>Indicates whether to respond to DNS queries for instance hostnames with DNS A records.</p>
69    pub fn get_enable_resource_name_dns_a_record(&self) -> &::std::option::Option<bool> {
70        &self.enable_resource_name_dns_a_record
71    }
72    /// <p>Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records.</p>
73    pub fn enable_resource_name_dns_aaaa_record(mut self, input: bool) -> Self {
74        self.enable_resource_name_dns_aaaa_record = ::std::option::Option::Some(input);
75        self
76    }
77    /// <p>Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records.</p>
78    pub fn set_enable_resource_name_dns_aaaa_record(mut self, input: ::std::option::Option<bool>) -> Self {
79        self.enable_resource_name_dns_aaaa_record = input;
80        self
81    }
82    /// <p>Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records.</p>
83    pub fn get_enable_resource_name_dns_aaaa_record(&self) -> &::std::option::Option<bool> {
84        &self.enable_resource_name_dns_aaaa_record
85    }
86    /// Consumes the builder and constructs a [`LaunchTemplatePrivateDnsNameOptions`](crate::types::LaunchTemplatePrivateDnsNameOptions).
87    pub fn build(self) -> crate::types::LaunchTemplatePrivateDnsNameOptions {
88        crate::types::LaunchTemplatePrivateDnsNameOptions {
89            hostname_type: self.hostname_type,
90            enable_resource_name_dns_a_record: self.enable_resource_name_dns_a_record,
91            enable_resource_name_dns_aaaa_record: self.enable_resource_name_dns_aaaa_record,
92        }
93    }
94}