aws_sdk_ec2/operation/delete_network_acl_entry/
_delete_network_acl_entry_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DeleteNetworkAclEntryInput {
6    /// <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>
7    pub dry_run: ::std::option::Option<bool>,
8    /// <p>The ID of the network ACL.</p>
9    pub network_acl_id: ::std::option::Option<::std::string::String>,
10    /// <p>The rule number of the entry to delete.</p>
11    pub rule_number: ::std::option::Option<i32>,
12    /// <p>Indicates whether the rule is an egress rule.</p>
13    pub egress: ::std::option::Option<bool>,
14}
15impl DeleteNetworkAclEntryInput {
16    /// <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>
17    pub fn dry_run(&self) -> ::std::option::Option<bool> {
18        self.dry_run
19    }
20    /// <p>The ID of the network ACL.</p>
21    pub fn network_acl_id(&self) -> ::std::option::Option<&str> {
22        self.network_acl_id.as_deref()
23    }
24    /// <p>The rule number of the entry to delete.</p>
25    pub fn rule_number(&self) -> ::std::option::Option<i32> {
26        self.rule_number
27    }
28    /// <p>Indicates whether the rule is an egress rule.</p>
29    pub fn egress(&self) -> ::std::option::Option<bool> {
30        self.egress
31    }
32}
33impl DeleteNetworkAclEntryInput {
34    /// Creates a new builder-style object to manufacture [`DeleteNetworkAclEntryInput`](crate::operation::delete_network_acl_entry::DeleteNetworkAclEntryInput).
35    pub fn builder() -> crate::operation::delete_network_acl_entry::builders::DeleteNetworkAclEntryInputBuilder {
36        crate::operation::delete_network_acl_entry::builders::DeleteNetworkAclEntryInputBuilder::default()
37    }
38}
39
40/// A builder for [`DeleteNetworkAclEntryInput`](crate::operation::delete_network_acl_entry::DeleteNetworkAclEntryInput).
41#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct DeleteNetworkAclEntryInputBuilder {
44    pub(crate) dry_run: ::std::option::Option<bool>,
45    pub(crate) network_acl_id: ::std::option::Option<::std::string::String>,
46    pub(crate) rule_number: ::std::option::Option<i32>,
47    pub(crate) egress: ::std::option::Option<bool>,
48}
49impl DeleteNetworkAclEntryInputBuilder {
50    /// <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>
51    pub fn dry_run(mut self, input: bool) -> Self {
52        self.dry_run = ::std::option::Option::Some(input);
53        self
54    }
55    /// <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>
56    pub fn set_dry_run(mut self, input: ::std::option::Option<bool>) -> Self {
57        self.dry_run = input;
58        self
59    }
60    /// <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>
61    pub fn get_dry_run(&self) -> &::std::option::Option<bool> {
62        &self.dry_run
63    }
64    /// <p>The ID of the network ACL.</p>
65    /// This field is required.
66    pub fn network_acl_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
67        self.network_acl_id = ::std::option::Option::Some(input.into());
68        self
69    }
70    /// <p>The ID of the network ACL.</p>
71    pub fn set_network_acl_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
72        self.network_acl_id = input;
73        self
74    }
75    /// <p>The ID of the network ACL.</p>
76    pub fn get_network_acl_id(&self) -> &::std::option::Option<::std::string::String> {
77        &self.network_acl_id
78    }
79    /// <p>The rule number of the entry to delete.</p>
80    /// This field is required.
81    pub fn rule_number(mut self, input: i32) -> Self {
82        self.rule_number = ::std::option::Option::Some(input);
83        self
84    }
85    /// <p>The rule number of the entry to delete.</p>
86    pub fn set_rule_number(mut self, input: ::std::option::Option<i32>) -> Self {
87        self.rule_number = input;
88        self
89    }
90    /// <p>The rule number of the entry to delete.</p>
91    pub fn get_rule_number(&self) -> &::std::option::Option<i32> {
92        &self.rule_number
93    }
94    /// <p>Indicates whether the rule is an egress rule.</p>
95    /// This field is required.
96    pub fn egress(mut self, input: bool) -> Self {
97        self.egress = ::std::option::Option::Some(input);
98        self
99    }
100    /// <p>Indicates whether the rule is an egress rule.</p>
101    pub fn set_egress(mut self, input: ::std::option::Option<bool>) -> Self {
102        self.egress = input;
103        self
104    }
105    /// <p>Indicates whether the rule is an egress rule.</p>
106    pub fn get_egress(&self) -> &::std::option::Option<bool> {
107        &self.egress
108    }
109    /// Consumes the builder and constructs a [`DeleteNetworkAclEntryInput`](crate::operation::delete_network_acl_entry::DeleteNetworkAclEntryInput).
110    pub fn build(
111        self,
112    ) -> ::std::result::Result<crate::operation::delete_network_acl_entry::DeleteNetworkAclEntryInput, ::aws_smithy_types::error::operation::BuildError>
113    {
114        ::std::result::Result::Ok(crate::operation::delete_network_acl_entry::DeleteNetworkAclEntryInput {
115            dry_run: self.dry_run,
116            network_acl_id: self.network_acl_id,
117            rule_number: self.rule_number,
118            egress: self.egress,
119        })
120    }
121}