1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>The input for the CreateTopicRule operation.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateTopicRuleInput {
/// <p>The name of the rule.</p>
pub rule_name: ::std::option::Option<::std::string::String>,
/// <p>The rule payload.</p>
pub topic_rule_payload: ::std::option::Option<crate::types::TopicRulePayload>,
/// <p>Metadata which can be used to manage the topic rule.</p><note>
/// <p>For URI Request parameters use format: ...key1=value1&key2=value2...</p>
/// <p>For the CLI command-line parameter use format: --tags "key1=value1&key2=value2..."</p>
/// <p>For the cli-input-json file use format: "tags": "key1=value1&key2=value2..."</p>
/// </note>
pub tags: ::std::option::Option<::std::string::String>,
}
impl CreateTopicRuleInput {
/// <p>The name of the rule.</p>
pub fn rule_name(&self) -> ::std::option::Option<&str> {
self.rule_name.as_deref()
}
/// <p>The rule payload.</p>
pub fn topic_rule_payload(&self) -> ::std::option::Option<&crate::types::TopicRulePayload> {
self.topic_rule_payload.as_ref()
}
/// <p>Metadata which can be used to manage the topic rule.</p><note>
/// <p>For URI Request parameters use format: ...key1=value1&key2=value2...</p>
/// <p>For the CLI command-line parameter use format: --tags "key1=value1&key2=value2..."</p>
/// <p>For the cli-input-json file use format: "tags": "key1=value1&key2=value2..."</p>
/// </note>
pub fn tags(&self) -> ::std::option::Option<&str> {
self.tags.as_deref()
}
}
impl CreateTopicRuleInput {
/// Creates a new builder-style object to manufacture [`CreateTopicRuleInput`](crate::operation::create_topic_rule::CreateTopicRuleInput).
pub fn builder() -> crate::operation::create_topic_rule::builders::CreateTopicRuleInputBuilder {
crate::operation::create_topic_rule::builders::CreateTopicRuleInputBuilder::default()
}
}
/// A builder for [`CreateTopicRuleInput`](crate::operation::create_topic_rule::CreateTopicRuleInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateTopicRuleInputBuilder {
pub(crate) rule_name: ::std::option::Option<::std::string::String>,
pub(crate) topic_rule_payload: ::std::option::Option<crate::types::TopicRulePayload>,
pub(crate) tags: ::std::option::Option<::std::string::String>,
}
impl CreateTopicRuleInputBuilder {
/// <p>The name of the rule.</p>
/// This field is required.
pub fn rule_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.rule_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of the rule.</p>
pub fn set_rule_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.rule_name = input;
self
}
/// <p>The name of the rule.</p>
pub fn get_rule_name(&self) -> &::std::option::Option<::std::string::String> {
&self.rule_name
}
/// <p>The rule payload.</p>
/// This field is required.
pub fn topic_rule_payload(mut self, input: crate::types::TopicRulePayload) -> Self {
self.topic_rule_payload = ::std::option::Option::Some(input);
self
}
/// <p>The rule payload.</p>
pub fn set_topic_rule_payload(mut self, input: ::std::option::Option<crate::types::TopicRulePayload>) -> Self {
self.topic_rule_payload = input;
self
}
/// <p>The rule payload.</p>
pub fn get_topic_rule_payload(&self) -> &::std::option::Option<crate::types::TopicRulePayload> {
&self.topic_rule_payload
}
/// <p>Metadata which can be used to manage the topic rule.</p><note>
/// <p>For URI Request parameters use format: ...key1=value1&key2=value2...</p>
/// <p>For the CLI command-line parameter use format: --tags "key1=value1&key2=value2..."</p>
/// <p>For the cli-input-json file use format: "tags": "key1=value1&key2=value2..."</p>
/// </note>
pub fn tags(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.tags = ::std::option::Option::Some(input.into());
self
}
/// <p>Metadata which can be used to manage the topic rule.</p><note>
/// <p>For URI Request parameters use format: ...key1=value1&key2=value2...</p>
/// <p>For the CLI command-line parameter use format: --tags "key1=value1&key2=value2..."</p>
/// <p>For the cli-input-json file use format: "tags": "key1=value1&key2=value2..."</p>
/// </note>
pub fn set_tags(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.tags = input;
self
}
/// <p>Metadata which can be used to manage the topic rule.</p><note>
/// <p>For URI Request parameters use format: ...key1=value1&key2=value2...</p>
/// <p>For the CLI command-line parameter use format: --tags "key1=value1&key2=value2..."</p>
/// <p>For the cli-input-json file use format: "tags": "key1=value1&key2=value2..."</p>
/// </note>
pub fn get_tags(&self) -> &::std::option::Option<::std::string::String> {
&self.tags
}
/// Consumes the builder and constructs a [`CreateTopicRuleInput`](crate::operation::create_topic_rule::CreateTopicRuleInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::create_topic_rule::CreateTopicRuleInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::create_topic_rule::CreateTopicRuleInput {
rule_name: self.rule_name,
topic_rule_payload: self.topic_rule_payload,
tags: self.tags,
})
}
}