aws_sdk_waf/operation/delete_sql_injection_match_set/_delete_sql_injection_match_set_input.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>A request to delete a <code>SqlInjectionMatchSet</code> from AWS WAF.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct DeleteSqlInjectionMatchSetInput {
7 /// <p>The <code>SqlInjectionMatchSetId</code> of the <code>SqlInjectionMatchSet</code> that you want to delete. <code>SqlInjectionMatchSetId</code> is returned by <code>CreateSqlInjectionMatchSet</code> and by <code>ListSqlInjectionMatchSets</code>.</p>
8 pub sql_injection_match_set_id: ::std::option::Option<::std::string::String>,
9 /// <p>The value returned by the most recent call to <code>GetChangeToken</code>.</p>
10 pub change_token: ::std::option::Option<::std::string::String>,
11}
12impl DeleteSqlInjectionMatchSetInput {
13 /// <p>The <code>SqlInjectionMatchSetId</code> of the <code>SqlInjectionMatchSet</code> that you want to delete. <code>SqlInjectionMatchSetId</code> is returned by <code>CreateSqlInjectionMatchSet</code> and by <code>ListSqlInjectionMatchSets</code>.</p>
14 pub fn sql_injection_match_set_id(&self) -> ::std::option::Option<&str> {
15 self.sql_injection_match_set_id.as_deref()
16 }
17 /// <p>The value returned by the most recent call to <code>GetChangeToken</code>.</p>
18 pub fn change_token(&self) -> ::std::option::Option<&str> {
19 self.change_token.as_deref()
20 }
21}
22impl DeleteSqlInjectionMatchSetInput {
23 /// Creates a new builder-style object to manufacture [`DeleteSqlInjectionMatchSetInput`](crate::operation::delete_sql_injection_match_set::DeleteSqlInjectionMatchSetInput).
24 pub fn builder() -> crate::operation::delete_sql_injection_match_set::builders::DeleteSqlInjectionMatchSetInputBuilder {
25 crate::operation::delete_sql_injection_match_set::builders::DeleteSqlInjectionMatchSetInputBuilder::default()
26 }
27}
28
29/// A builder for [`DeleteSqlInjectionMatchSetInput`](crate::operation::delete_sql_injection_match_set::DeleteSqlInjectionMatchSetInput).
30#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
31#[non_exhaustive]
32pub struct DeleteSqlInjectionMatchSetInputBuilder {
33 pub(crate) sql_injection_match_set_id: ::std::option::Option<::std::string::String>,
34 pub(crate) change_token: ::std::option::Option<::std::string::String>,
35}
36impl DeleteSqlInjectionMatchSetInputBuilder {
37 /// <p>The <code>SqlInjectionMatchSetId</code> of the <code>SqlInjectionMatchSet</code> that you want to delete. <code>SqlInjectionMatchSetId</code> is returned by <code>CreateSqlInjectionMatchSet</code> and by <code>ListSqlInjectionMatchSets</code>.</p>
38 /// This field is required.
39 pub fn sql_injection_match_set_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
40 self.sql_injection_match_set_id = ::std::option::Option::Some(input.into());
41 self
42 }
43 /// <p>The <code>SqlInjectionMatchSetId</code> of the <code>SqlInjectionMatchSet</code> that you want to delete. <code>SqlInjectionMatchSetId</code> is returned by <code>CreateSqlInjectionMatchSet</code> and by <code>ListSqlInjectionMatchSets</code>.</p>
44 pub fn set_sql_injection_match_set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
45 self.sql_injection_match_set_id = input;
46 self
47 }
48 /// <p>The <code>SqlInjectionMatchSetId</code> of the <code>SqlInjectionMatchSet</code> that you want to delete. <code>SqlInjectionMatchSetId</code> is returned by <code>CreateSqlInjectionMatchSet</code> and by <code>ListSqlInjectionMatchSets</code>.</p>
49 pub fn get_sql_injection_match_set_id(&self) -> &::std::option::Option<::std::string::String> {
50 &self.sql_injection_match_set_id
51 }
52 /// <p>The value returned by the most recent call to <code>GetChangeToken</code>.</p>
53 /// This field is required.
54 pub fn change_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
55 self.change_token = ::std::option::Option::Some(input.into());
56 self
57 }
58 /// <p>The value returned by the most recent call to <code>GetChangeToken</code>.</p>
59 pub fn set_change_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
60 self.change_token = input;
61 self
62 }
63 /// <p>The value returned by the most recent call to <code>GetChangeToken</code>.</p>
64 pub fn get_change_token(&self) -> &::std::option::Option<::std::string::String> {
65 &self.change_token
66 }
67 /// Consumes the builder and constructs a [`DeleteSqlInjectionMatchSetInput`](crate::operation::delete_sql_injection_match_set::DeleteSqlInjectionMatchSetInput).
68 pub fn build(
69 self,
70 ) -> ::std::result::Result<
71 crate::operation::delete_sql_injection_match_set::DeleteSqlInjectionMatchSetInput,
72 ::aws_smithy_types::error::operation::BuildError,
73 > {
74 ::std::result::Result::Ok(crate::operation::delete_sql_injection_match_set::DeleteSqlInjectionMatchSetInput {
75 sql_injection_match_set_id: self.sql_injection_match_set_id,
76 change_token: self.change_token,
77 })
78 }
79}