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
// 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 UpdateFlowEntitlementInput {
/// <p>A description of the entitlement. This description appears only on the MediaConnect console and will not be seen by the subscriber or end user.</p>
pub description: ::std::option::Option<::std::string::String>,
/// <p>The type of encryption that will be used on the output associated with this entitlement. Allowable encryption types: static-key, speke.</p>
pub encryption: ::std::option::Option<crate::types::UpdateEncryption>,
/// <p>The Amazon Resource Name (ARN) of the entitlement that you want to update.</p>
pub entitlement_arn: ::std::option::Option<::std::string::String>,
/// <p>An indication of whether you want to enable the entitlement to allow access, or disable it to stop streaming content to the subscriber’s flow temporarily. If you don’t specify the <code>entitlementStatus</code> field in your request, MediaConnect leaves the value unchanged.</p>
pub entitlement_status: ::std::option::Option<crate::types::EntitlementStatus>,
/// <p>The ARN of the flow that is associated with the entitlement that you want to update.</p>
pub flow_arn: ::std::option::Option<::std::string::String>,
/// <p>The Amazon Web Services account IDs that you want to share your content with. The receiving accounts (subscribers) will be allowed to create their own flow using your content as the source.</p>
pub subscribers: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl UpdateFlowEntitlementInput {
/// <p>A description of the entitlement. This description appears only on the MediaConnect console and will not be seen by the subscriber or end user.</p>
pub fn description(&self) -> ::std::option::Option<&str> {
self.description.as_deref()
}
/// <p>The type of encryption that will be used on the output associated with this entitlement. Allowable encryption types: static-key, speke.</p>
pub fn encryption(&self) -> ::std::option::Option<&crate::types::UpdateEncryption> {
self.encryption.as_ref()
}
/// <p>The Amazon Resource Name (ARN) of the entitlement that you want to update.</p>
pub fn entitlement_arn(&self) -> ::std::option::Option<&str> {
self.entitlement_arn.as_deref()
}
/// <p>An indication of whether you want to enable the entitlement to allow access, or disable it to stop streaming content to the subscriber’s flow temporarily. If you don’t specify the <code>entitlementStatus</code> field in your request, MediaConnect leaves the value unchanged.</p>
pub fn entitlement_status(&self) -> ::std::option::Option<&crate::types::EntitlementStatus> {
self.entitlement_status.as_ref()
}
/// <p>The ARN of the flow that is associated with the entitlement that you want to update.</p>
pub fn flow_arn(&self) -> ::std::option::Option<&str> {
self.flow_arn.as_deref()
}
/// <p>The Amazon Web Services account IDs that you want to share your content with. The receiving accounts (subscribers) will be allowed to create their own flow using your content as the source.</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 `.subscribers.is_none()`.
pub fn subscribers(&self) -> &[::std::string::String] {
self.subscribers.as_deref().unwrap_or_default()
}
}
impl UpdateFlowEntitlementInput {
/// Creates a new builder-style object to manufacture [`UpdateFlowEntitlementInput`](crate::operation::update_flow_entitlement::UpdateFlowEntitlementInput).
pub fn builder() -> crate::operation::update_flow_entitlement::builders::UpdateFlowEntitlementInputBuilder {
crate::operation::update_flow_entitlement::builders::UpdateFlowEntitlementInputBuilder::default()
}
}
/// A builder for [`UpdateFlowEntitlementInput`](crate::operation::update_flow_entitlement::UpdateFlowEntitlementInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateFlowEntitlementInputBuilder {
pub(crate) description: ::std::option::Option<::std::string::String>,
pub(crate) encryption: ::std::option::Option<crate::types::UpdateEncryption>,
pub(crate) entitlement_arn: ::std::option::Option<::std::string::String>,
pub(crate) entitlement_status: ::std::option::Option<crate::types::EntitlementStatus>,
pub(crate) flow_arn: ::std::option::Option<::std::string::String>,
pub(crate) subscribers: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl UpdateFlowEntitlementInputBuilder {
/// <p>A description of the entitlement. This description appears only on the MediaConnect console and will not be seen by the subscriber or end user.</p>
pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.description = ::std::option::Option::Some(input.into());
self
}
/// <p>A description of the entitlement. This description appears only on the MediaConnect console and will not be seen by the subscriber or end user.</p>
pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.description = input;
self
}
/// <p>A description of the entitlement. This description appears only on the MediaConnect console and will not be seen by the subscriber or end user.</p>
pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
&self.description
}
/// <p>The type of encryption that will be used on the output associated with this entitlement. Allowable encryption types: static-key, speke.</p>
pub fn encryption(mut self, input: crate::types::UpdateEncryption) -> Self {
self.encryption = ::std::option::Option::Some(input);
self
}
/// <p>The type of encryption that will be used on the output associated with this entitlement. Allowable encryption types: static-key, speke.</p>
pub fn set_encryption(mut self, input: ::std::option::Option<crate::types::UpdateEncryption>) -> Self {
self.encryption = input;
self
}
/// <p>The type of encryption that will be used on the output associated with this entitlement. Allowable encryption types: static-key, speke.</p>
pub fn get_encryption(&self) -> &::std::option::Option<crate::types::UpdateEncryption> {
&self.encryption
}
/// <p>The Amazon Resource Name (ARN) of the entitlement that you want to update.</p>
/// This field is required.
pub fn entitlement_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.entitlement_arn = ::std::option::Option::Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) of the entitlement that you want to update.</p>
pub fn set_entitlement_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.entitlement_arn = input;
self
}
/// <p>The Amazon Resource Name (ARN) of the entitlement that you want to update.</p>
pub fn get_entitlement_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.entitlement_arn
}
/// <p>An indication of whether you want to enable the entitlement to allow access, or disable it to stop streaming content to the subscriber’s flow temporarily. If you don’t specify the <code>entitlementStatus</code> field in your request, MediaConnect leaves the value unchanged.</p>
pub fn entitlement_status(mut self, input: crate::types::EntitlementStatus) -> Self {
self.entitlement_status = ::std::option::Option::Some(input);
self
}
/// <p>An indication of whether you want to enable the entitlement to allow access, or disable it to stop streaming content to the subscriber’s flow temporarily. If you don’t specify the <code>entitlementStatus</code> field in your request, MediaConnect leaves the value unchanged.</p>
pub fn set_entitlement_status(mut self, input: ::std::option::Option<crate::types::EntitlementStatus>) -> Self {
self.entitlement_status = input;
self
}
/// <p>An indication of whether you want to enable the entitlement to allow access, or disable it to stop streaming content to the subscriber’s flow temporarily. If you don’t specify the <code>entitlementStatus</code> field in your request, MediaConnect leaves the value unchanged.</p>
pub fn get_entitlement_status(&self) -> &::std::option::Option<crate::types::EntitlementStatus> {
&self.entitlement_status
}
/// <p>The ARN of the flow that is associated with the entitlement that you want to update.</p>
/// This field is required.
pub fn flow_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.flow_arn = ::std::option::Option::Some(input.into());
self
}
/// <p>The ARN of the flow that is associated with the entitlement that you want to update.</p>
pub fn set_flow_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.flow_arn = input;
self
}
/// <p>The ARN of the flow that is associated with the entitlement that you want to update.</p>
pub fn get_flow_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.flow_arn
}
/// Appends an item to `subscribers`.
///
/// To override the contents of this collection use [`set_subscribers`](Self::set_subscribers).
///
/// <p>The Amazon Web Services account IDs that you want to share your content with. The receiving accounts (subscribers) will be allowed to create their own flow using your content as the source.</p>
pub fn subscribers(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.subscribers.unwrap_or_default();
v.push(input.into());
self.subscribers = ::std::option::Option::Some(v);
self
}
/// <p>The Amazon Web Services account IDs that you want to share your content with. The receiving accounts (subscribers) will be allowed to create their own flow using your content as the source.</p>
pub fn set_subscribers(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.subscribers = input;
self
}
/// <p>The Amazon Web Services account IDs that you want to share your content with. The receiving accounts (subscribers) will be allowed to create their own flow using your content as the source.</p>
pub fn get_subscribers(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.subscribers
}
/// Consumes the builder and constructs a [`UpdateFlowEntitlementInput`](crate::operation::update_flow_entitlement::UpdateFlowEntitlementInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::update_flow_entitlement::UpdateFlowEntitlementInput, ::aws_smithy_types::error::operation::BuildError>
{
::std::result::Result::Ok(crate::operation::update_flow_entitlement::UpdateFlowEntitlementInput {
description: self.description,
encryption: self.encryption,
entitlement_arn: self.entitlement_arn,
entitlement_status: self.entitlement_status,
flow_arn: self.flow_arn,
subscribers: self.subscribers,
})
}
}