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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateChannelNamespaceInput {
/// <p>The <code>Api</code> ID.</p>
pub api_id: ::std::option::Option<::std::string::String>,
/// <p>The name of the <code>ChannelNamespace</code>.</p>
pub name: ::std::option::Option<::std::string::String>,
/// <p>The authorization mode to use for subscribing to messages on the channel namespace. This configuration overrides the default <code>Api</code> authorization configuration.</p>
pub subscribe_auth_modes: ::std::option::Option<::std::vec::Vec<crate::types::AuthMode>>,
/// <p>The authorization mode to use for publishing messages on the channel namespace. This configuration overrides the default <code>Api</code> authorization configuration.</p>
pub publish_auth_modes: ::std::option::Option<::std::vec::Vec<crate::types::AuthMode>>,
/// <p>The event handler functions that run custom business logic to process published events and subscribe requests.</p>
pub code_handlers: ::std::option::Option<::std::string::String>,
/// <p>The configuration for the <code>OnPublish</code> and <code>OnSubscribe</code> handlers.</p>
pub handler_configs: ::std::option::Option<crate::types::HandlerConfigs>,
}
impl UpdateChannelNamespaceInput {
/// <p>The <code>Api</code> ID.</p>
pub fn api_id(&self) -> ::std::option::Option<&str> {
self.api_id.as_deref()
}
/// <p>The name of the <code>ChannelNamespace</code>.</p>
pub fn name(&self) -> ::std::option::Option<&str> {
self.name.as_deref()
}
/// <p>The authorization mode to use for subscribing to messages on the channel namespace. This configuration overrides the default <code>Api</code> authorization configuration.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.subscribe_auth_modes.is_none()`.
pub fn subscribe_auth_modes(&self) -> &[crate::types::AuthMode] {
self.subscribe_auth_modes.as_deref().unwrap_or_default()
}
/// <p>The authorization mode to use for publishing messages on the channel namespace. This configuration overrides the default <code>Api</code> authorization configuration.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.publish_auth_modes.is_none()`.
pub fn publish_auth_modes(&self) -> &[crate::types::AuthMode] {
self.publish_auth_modes.as_deref().unwrap_or_default()
}
/// <p>The event handler functions that run custom business logic to process published events and subscribe requests.</p>
pub fn code_handlers(&self) -> ::std::option::Option<&str> {
self.code_handlers.as_deref()
}
/// <p>The configuration for the <code>OnPublish</code> and <code>OnSubscribe</code> handlers.</p>
pub fn handler_configs(&self) -> ::std::option::Option<&crate::types::HandlerConfigs> {
self.handler_configs.as_ref()
}
}
impl UpdateChannelNamespaceInput {
/// Creates a new builder-style object to manufacture [`UpdateChannelNamespaceInput`](crate::operation::update_channel_namespace::UpdateChannelNamespaceInput).
pub fn builder() -> crate::operation::update_channel_namespace::builders::UpdateChannelNamespaceInputBuilder {
crate::operation::update_channel_namespace::builders::UpdateChannelNamespaceInputBuilder::default()
}
}
/// A builder for [`UpdateChannelNamespaceInput`](crate::operation::update_channel_namespace::UpdateChannelNamespaceInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateChannelNamespaceInputBuilder {
pub(crate) api_id: ::std::option::Option<::std::string::String>,
pub(crate) name: ::std::option::Option<::std::string::String>,
pub(crate) subscribe_auth_modes: ::std::option::Option<::std::vec::Vec<crate::types::AuthMode>>,
pub(crate) publish_auth_modes: ::std::option::Option<::std::vec::Vec<crate::types::AuthMode>>,
pub(crate) code_handlers: ::std::option::Option<::std::string::String>,
pub(crate) handler_configs: ::std::option::Option<crate::types::HandlerConfigs>,
}
impl UpdateChannelNamespaceInputBuilder {
/// <p>The <code>Api</code> ID.</p>
/// This field is required.
pub fn api_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.api_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The <code>Api</code> ID.</p>
pub fn set_api_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.api_id = input;
self
}
/// <p>The <code>Api</code> ID.</p>
pub fn get_api_id(&self) -> &::std::option::Option<::std::string::String> {
&self.api_id
}
/// <p>The name of the <code>ChannelNamespace</code>.</p>
/// This field is required.
pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of the <code>ChannelNamespace</code>.</p>
pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.name = input;
self
}
/// <p>The name of the <code>ChannelNamespace</code>.</p>
pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
&self.name
}
/// Appends an item to `subscribe_auth_modes`.
///
/// To override the contents of this collection use [`set_subscribe_auth_modes`](Self::set_subscribe_auth_modes).
///
/// <p>The authorization mode to use for subscribing to messages on the channel namespace. This configuration overrides the default <code>Api</code> authorization configuration.</p>
pub fn subscribe_auth_modes(mut self, input: crate::types::AuthMode) -> Self {
let mut v = self.subscribe_auth_modes.unwrap_or_default();
v.push(input);
self.subscribe_auth_modes = ::std::option::Option::Some(v);
self
}
/// <p>The authorization mode to use for subscribing to messages on the channel namespace. This configuration overrides the default <code>Api</code> authorization configuration.</p>
pub fn set_subscribe_auth_modes(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AuthMode>>) -> Self {
self.subscribe_auth_modes = input;
self
}
/// <p>The authorization mode to use for subscribing to messages on the channel namespace. This configuration overrides the default <code>Api</code> authorization configuration.</p>
pub fn get_subscribe_auth_modes(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AuthMode>> {
&self.subscribe_auth_modes
}
/// Appends an item to `publish_auth_modes`.
///
/// To override the contents of this collection use [`set_publish_auth_modes`](Self::set_publish_auth_modes).
///
/// <p>The authorization mode to use for publishing messages on the channel namespace. This configuration overrides the default <code>Api</code> authorization configuration.</p>
pub fn publish_auth_modes(mut self, input: crate::types::AuthMode) -> Self {
let mut v = self.publish_auth_modes.unwrap_or_default();
v.push(input);
self.publish_auth_modes = ::std::option::Option::Some(v);
self
}
/// <p>The authorization mode to use for publishing messages on the channel namespace. This configuration overrides the default <code>Api</code> authorization configuration.</p>
pub fn set_publish_auth_modes(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AuthMode>>) -> Self {
self.publish_auth_modes = input;
self
}
/// <p>The authorization mode to use for publishing messages on the channel namespace. This configuration overrides the default <code>Api</code> authorization configuration.</p>
pub fn get_publish_auth_modes(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AuthMode>> {
&self.publish_auth_modes
}
/// <p>The event handler functions that run custom business logic to process published events and subscribe requests.</p>
pub fn code_handlers(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.code_handlers = ::std::option::Option::Some(input.into());
self
}
/// <p>The event handler functions that run custom business logic to process published events and subscribe requests.</p>
pub fn set_code_handlers(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.code_handlers = input;
self
}
/// <p>The event handler functions that run custom business logic to process published events and subscribe requests.</p>
pub fn get_code_handlers(&self) -> &::std::option::Option<::std::string::String> {
&self.code_handlers
}
/// <p>The configuration for the <code>OnPublish</code> and <code>OnSubscribe</code> handlers.</p>
pub fn handler_configs(mut self, input: crate::types::HandlerConfigs) -> Self {
self.handler_configs = ::std::option::Option::Some(input);
self
}
/// <p>The configuration for the <code>OnPublish</code> and <code>OnSubscribe</code> handlers.</p>
pub fn set_handler_configs(mut self, input: ::std::option::Option<crate::types::HandlerConfigs>) -> Self {
self.handler_configs = input;
self
}
/// <p>The configuration for the <code>OnPublish</code> and <code>OnSubscribe</code> handlers.</p>
pub fn get_handler_configs(&self) -> &::std::option::Option<crate::types::HandlerConfigs> {
&self.handler_configs
}
/// Consumes the builder and constructs a [`UpdateChannelNamespaceInput`](crate::operation::update_channel_namespace::UpdateChannelNamespaceInput).
pub fn build(
self,
) -> ::std::result::Result<
crate::operation::update_channel_namespace::UpdateChannelNamespaceInput,
::aws_smithy_types::error::operation::BuildError,
> {
::std::result::Result::Ok(crate::operation::update_channel_namespace::UpdateChannelNamespaceInput {
api_id: self.api_id,
name: self.name,
subscribe_auth_modes: self.subscribe_auth_modes,
publish_auth_modes: self.publish_auth_modes,
code_handlers: self.code_handlers,
handler_configs: self.handler_configs,
})
}
}