aws_sdk_securityhub/types/_aws_ec2_launch_template_data_network_interface_set_ipv4_prefixes_details.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Provides details on one or more IPv4 prefixes for a network interface.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct AwsEc2LaunchTemplateDataNetworkInterfaceSetIpv4PrefixesDetails {
7 /// <p>The IPv4 prefix. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-prefix-eni.html">Assigning prefixes to Amazon EC2 network interfaces</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
8 pub ipv4_prefix: ::std::option::Option<::std::string::String>,
9}
10impl AwsEc2LaunchTemplateDataNetworkInterfaceSetIpv4PrefixesDetails {
11 /// <p>The IPv4 prefix. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-prefix-eni.html">Assigning prefixes to Amazon EC2 network interfaces</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
12 pub fn ipv4_prefix(&self) -> ::std::option::Option<&str> {
13 self.ipv4_prefix.as_deref()
14 }
15}
16impl AwsEc2LaunchTemplateDataNetworkInterfaceSetIpv4PrefixesDetails {
17 /// Creates a new builder-style object to manufacture [`AwsEc2LaunchTemplateDataNetworkInterfaceSetIpv4PrefixesDetails`](crate::types::AwsEc2LaunchTemplateDataNetworkInterfaceSetIpv4PrefixesDetails).
18 pub fn builder() -> crate::types::builders::AwsEc2LaunchTemplateDataNetworkInterfaceSetIpv4PrefixesDetailsBuilder {
19 crate::types::builders::AwsEc2LaunchTemplateDataNetworkInterfaceSetIpv4PrefixesDetailsBuilder::default()
20 }
21}
22
23/// A builder for [`AwsEc2LaunchTemplateDataNetworkInterfaceSetIpv4PrefixesDetails`](crate::types::AwsEc2LaunchTemplateDataNetworkInterfaceSetIpv4PrefixesDetails).
24#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
25#[non_exhaustive]
26pub struct AwsEc2LaunchTemplateDataNetworkInterfaceSetIpv4PrefixesDetailsBuilder {
27 pub(crate) ipv4_prefix: ::std::option::Option<::std::string::String>,
28}
29impl AwsEc2LaunchTemplateDataNetworkInterfaceSetIpv4PrefixesDetailsBuilder {
30 /// <p>The IPv4 prefix. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-prefix-eni.html">Assigning prefixes to Amazon EC2 network interfaces</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
31 pub fn ipv4_prefix(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
32 self.ipv4_prefix = ::std::option::Option::Some(input.into());
33 self
34 }
35 /// <p>The IPv4 prefix. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-prefix-eni.html">Assigning prefixes to Amazon EC2 network interfaces</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
36 pub fn set_ipv4_prefix(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
37 self.ipv4_prefix = input;
38 self
39 }
40 /// <p>The IPv4 prefix. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-prefix-eni.html">Assigning prefixes to Amazon EC2 network interfaces</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
41 pub fn get_ipv4_prefix(&self) -> &::std::option::Option<::std::string::String> {
42 &self.ipv4_prefix
43 }
44 /// Consumes the builder and constructs a [`AwsEc2LaunchTemplateDataNetworkInterfaceSetIpv4PrefixesDetails`](crate::types::AwsEc2LaunchTemplateDataNetworkInterfaceSetIpv4PrefixesDetails).
45 pub fn build(self) -> crate::types::AwsEc2LaunchTemplateDataNetworkInterfaceSetIpv4PrefixesDetails {
46 crate::types::AwsEc2LaunchTemplateDataNetworkInterfaceSetIpv4PrefixesDetails {
47 ipv4_prefix: self.ipv4_prefix,
48 }
49 }
50}