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
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
// 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 CreateDataSubscriptionInput {
/// The catalog the subscription belongs to.
pub catalog: ::std::option::Option<::std::string::String>,
/// The name of the dataset to subscribe to.
pub dataset_name: ::std::option::Option<::std::string::String>,
/// How the dataset is delivered.
pub delivery_method: ::std::option::Option<crate::types::DeliveryMethod>,
/// The ARN of the S3 bucket in the caller's account that receives deliveries.
pub s3_arn: ::std::option::Option<::std::string::String>,
/// The ARN of the caller-owned KMS key used to encrypt delivered objects.
pub kms_key_arn: ::std::option::Option<::std::string::String>,
/// A unique, case-sensitive identifier that ensures the idempotency of the request. Reusing a token within 24 hours with the same parameters returns the original subscription; reusing it with different parameters is rejected.
pub client_token: ::std::option::Option<::std::string::String>,
/// Optional tags to apply to the subscription at creation (tag-on-create). Up to 50 tags; key length 1-128, value length 0-256; keys beginning with the reserved `aws:` prefix are rejected. The backend authorizes the tags (aws:RequestTag / aws:TagKeys) and registers them with Tagris as part of the create.
pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl CreateDataSubscriptionInput {
/// The catalog the subscription belongs to.
pub fn catalog(&self) -> ::std::option::Option<&str> {
self.catalog.as_deref()
}
/// The name of the dataset to subscribe to.
pub fn dataset_name(&self) -> ::std::option::Option<&str> {
self.dataset_name.as_deref()
}
/// How the dataset is delivered.
pub fn delivery_method(&self) -> ::std::option::Option<&crate::types::DeliveryMethod> {
self.delivery_method.as_ref()
}
/// The ARN of the S3 bucket in the caller's account that receives deliveries.
pub fn s3_arn(&self) -> ::std::option::Option<&str> {
self.s3_arn.as_deref()
}
/// The ARN of the caller-owned KMS key used to encrypt delivered objects.
pub fn kms_key_arn(&self) -> ::std::option::Option<&str> {
self.kms_key_arn.as_deref()
}
/// A unique, case-sensitive identifier that ensures the idempotency of the request. Reusing a token within 24 hours with the same parameters returns the original subscription; reusing it with different parameters is rejected.
pub fn client_token(&self) -> ::std::option::Option<&str> {
self.client_token.as_deref()
}
/// Optional tags to apply to the subscription at creation (tag-on-create). Up to 50 tags; key length 1-128, value length 0-256; keys beginning with the reserved `aws:` prefix are rejected. The backend authorizes the tags (aws:RequestTag / aws:TagKeys) and registers them with Tagris as part of the create.
pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
self.tags.as_ref()
}
}
impl CreateDataSubscriptionInput {
/// Creates a new builder-style object to manufacture [`CreateDataSubscriptionInput`](crate::operation::create_data_subscription::CreateDataSubscriptionInput).
pub fn builder() -> crate::operation::create_data_subscription::builders::CreateDataSubscriptionInputBuilder {
crate::operation::create_data_subscription::builders::CreateDataSubscriptionInputBuilder::default()
}
}
/// A builder for [`CreateDataSubscriptionInput`](crate::operation::create_data_subscription::CreateDataSubscriptionInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateDataSubscriptionInputBuilder {
pub(crate) catalog: ::std::option::Option<::std::string::String>,
pub(crate) dataset_name: ::std::option::Option<::std::string::String>,
pub(crate) delivery_method: ::std::option::Option<crate::types::DeliveryMethod>,
pub(crate) s3_arn: ::std::option::Option<::std::string::String>,
pub(crate) kms_key_arn: ::std::option::Option<::std::string::String>,
pub(crate) client_token: ::std::option::Option<::std::string::String>,
pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl CreateDataSubscriptionInputBuilder {
/// The catalog the subscription belongs to.
/// This field is required.
pub fn catalog(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.catalog = ::std::option::Option::Some(input.into());
self
}
/// The catalog the subscription belongs to.
pub fn set_catalog(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.catalog = input;
self
}
/// The catalog the subscription belongs to.
pub fn get_catalog(&self) -> &::std::option::Option<::std::string::String> {
&self.catalog
}
/// The name of the dataset to subscribe to.
/// This field is required.
pub fn dataset_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.dataset_name = ::std::option::Option::Some(input.into());
self
}
/// The name of the dataset to subscribe to.
pub fn set_dataset_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.dataset_name = input;
self
}
/// The name of the dataset to subscribe to.
pub fn get_dataset_name(&self) -> &::std::option::Option<::std::string::String> {
&self.dataset_name
}
/// How the dataset is delivered.
/// This field is required.
pub fn delivery_method(mut self, input: crate::types::DeliveryMethod) -> Self {
self.delivery_method = ::std::option::Option::Some(input);
self
}
/// How the dataset is delivered.
pub fn set_delivery_method(mut self, input: ::std::option::Option<crate::types::DeliveryMethod>) -> Self {
self.delivery_method = input;
self
}
/// How the dataset is delivered.
pub fn get_delivery_method(&self) -> &::std::option::Option<crate::types::DeliveryMethod> {
&self.delivery_method
}
/// The ARN of the S3 bucket in the caller's account that receives deliveries.
/// This field is required.
pub fn s3_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.s3_arn = ::std::option::Option::Some(input.into());
self
}
/// The ARN of the S3 bucket in the caller's account that receives deliveries.
pub fn set_s3_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.s3_arn = input;
self
}
/// The ARN of the S3 bucket in the caller's account that receives deliveries.
pub fn get_s3_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.s3_arn
}
/// The ARN of the caller-owned KMS key used to encrypt delivered objects.
/// This field is required.
pub fn kms_key_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.kms_key_arn = ::std::option::Option::Some(input.into());
self
}
/// The ARN of the caller-owned KMS key used to encrypt delivered objects.
pub fn set_kms_key_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.kms_key_arn = input;
self
}
/// The ARN of the caller-owned KMS key used to encrypt delivered objects.
pub fn get_kms_key_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.kms_key_arn
}
/// A unique, case-sensitive identifier that ensures the idempotency of the request. Reusing a token within 24 hours with the same parameters returns the original subscription; reusing it with different parameters is rejected.
pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.client_token = ::std::option::Option::Some(input.into());
self
}
/// A unique, case-sensitive identifier that ensures the idempotency of the request. Reusing a token within 24 hours with the same parameters returns the original subscription; reusing it with different parameters is rejected.
pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.client_token = input;
self
}
/// A unique, case-sensitive identifier that ensures the idempotency of the request. Reusing a token within 24 hours with the same parameters returns the original subscription; reusing it with different parameters is rejected.
pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
&self.client_token
}
/// Adds a key-value pair to `tags`.
///
/// To override the contents of this collection use [`set_tags`](Self::set_tags).
///
/// Optional tags to apply to the subscription at creation (tag-on-create). Up to 50 tags; key length 1-128, value length 0-256; keys beginning with the reserved `aws:` prefix are rejected. The backend authorizes the tags (aws:RequestTag / aws:TagKeys) and registers them with Tagris as part of the create.
pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut hash_map = self.tags.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.tags = ::std::option::Option::Some(hash_map);
self
}
/// Optional tags to apply to the subscription at creation (tag-on-create). Up to 50 tags; key length 1-128, value length 0-256; keys beginning with the reserved `aws:` prefix are rejected. The backend authorizes the tags (aws:RequestTag / aws:TagKeys) and registers them with Tagris as part of the create.
pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
self.tags = input;
self
}
/// Optional tags to apply to the subscription at creation (tag-on-create). Up to 50 tags; key length 1-128, value length 0-256; keys beginning with the reserved `aws:` prefix are rejected. The backend authorizes the tags (aws:RequestTag / aws:TagKeys) and registers them with Tagris as part of the create.
pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
&self.tags
}
/// Consumes the builder and constructs a [`CreateDataSubscriptionInput`](crate::operation::create_data_subscription::CreateDataSubscriptionInput).
pub fn build(
self,
) -> ::std::result::Result<
crate::operation::create_data_subscription::CreateDataSubscriptionInput,
::aws_smithy_types::error::operation::BuildError,
> {
::std::result::Result::Ok(crate::operation::create_data_subscription::CreateDataSubscriptionInput {
catalog: self.catalog,
dataset_name: self.dataset_name,
delivery_method: self.delivery_method,
s3_arn: self.s3_arn,
kms_key_arn: self.kms_key_arn,
client_token: self.client_token,
tags: self.tags,
})
}
}