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
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
// 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 GetSegmentSnapshotOutput {
/// <p>The unique identifier of the segment snapshot.</p>
pub snapshot_id: ::std::string::String,
/// <p>The status of the asynchronous job for exporting the segment snapshot.</p>
pub status: crate::types::SegmentSnapshotStatus,
/// <p>The status message of the asynchronous job for exporting the segment snapshot.</p>
pub status_message: ::std::option::Option<::std::string::String>,
/// <p>The format in which the segment will be exported.</p>
pub data_format: crate::types::DataFormat,
/// <p>The Amazon Resource Name (ARN) of the KMS key used to encrypt the exported segment.</p>
pub encryption_key: ::std::option::Option<::std::string::String>,
/// <p>The Amazon Resource Name (ARN) of the IAM role that allows Customer Profiles service principal to assume the role for conducting KMS and S3 operations.</p>
pub role_arn: ::std::option::Option<::std::string::String>,
/// <p>The destination to which the segment will be exported. This field must be provided if the request is not submitted from the Connect Customer Admin Website.</p>
pub destination_uri: ::std::option::Option<::std::string::String>,
_request_id: Option<String>,
}
impl GetSegmentSnapshotOutput {
/// <p>The unique identifier of the segment snapshot.</p>
pub fn snapshot_id(&self) -> &str {
use std::ops::Deref;
self.snapshot_id.deref()
}
/// <p>The status of the asynchronous job for exporting the segment snapshot.</p>
pub fn status(&self) -> &crate::types::SegmentSnapshotStatus {
&self.status
}
/// <p>The status message of the asynchronous job for exporting the segment snapshot.</p>
pub fn status_message(&self) -> ::std::option::Option<&str> {
self.status_message.as_deref()
}
/// <p>The format in which the segment will be exported.</p>
pub fn data_format(&self) -> &crate::types::DataFormat {
&self.data_format
}
/// <p>The Amazon Resource Name (ARN) of the KMS key used to encrypt the exported segment.</p>
pub fn encryption_key(&self) -> ::std::option::Option<&str> {
self.encryption_key.as_deref()
}
/// <p>The Amazon Resource Name (ARN) of the IAM role that allows Customer Profiles service principal to assume the role for conducting KMS and S3 operations.</p>
pub fn role_arn(&self) -> ::std::option::Option<&str> {
self.role_arn.as_deref()
}
/// <p>The destination to which the segment will be exported. This field must be provided if the request is not submitted from the Connect Customer Admin Website.</p>
pub fn destination_uri(&self) -> ::std::option::Option<&str> {
self.destination_uri.as_deref()
}
}
impl ::aws_types::request_id::RequestId for GetSegmentSnapshotOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl GetSegmentSnapshotOutput {
/// Creates a new builder-style object to manufacture [`GetSegmentSnapshotOutput`](crate::operation::get_segment_snapshot::GetSegmentSnapshotOutput).
pub fn builder() -> crate::operation::get_segment_snapshot::builders::GetSegmentSnapshotOutputBuilder {
crate::operation::get_segment_snapshot::builders::GetSegmentSnapshotOutputBuilder::default()
}
}
/// A builder for [`GetSegmentSnapshotOutput`](crate::operation::get_segment_snapshot::GetSegmentSnapshotOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetSegmentSnapshotOutputBuilder {
pub(crate) snapshot_id: ::std::option::Option<::std::string::String>,
pub(crate) status: ::std::option::Option<crate::types::SegmentSnapshotStatus>,
pub(crate) status_message: ::std::option::Option<::std::string::String>,
pub(crate) data_format: ::std::option::Option<crate::types::DataFormat>,
pub(crate) encryption_key: ::std::option::Option<::std::string::String>,
pub(crate) role_arn: ::std::option::Option<::std::string::String>,
pub(crate) destination_uri: ::std::option::Option<::std::string::String>,
_request_id: Option<String>,
}
impl GetSegmentSnapshotOutputBuilder {
/// <p>The unique identifier of the segment snapshot.</p>
/// This field is required.
pub fn snapshot_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.snapshot_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The unique identifier of the segment snapshot.</p>
pub fn set_snapshot_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.snapshot_id = input;
self
}
/// <p>The unique identifier of the segment snapshot.</p>
pub fn get_snapshot_id(&self) -> &::std::option::Option<::std::string::String> {
&self.snapshot_id
}
/// <p>The status of the asynchronous job for exporting the segment snapshot.</p>
/// This field is required.
pub fn status(mut self, input: crate::types::SegmentSnapshotStatus) -> Self {
self.status = ::std::option::Option::Some(input);
self
}
/// <p>The status of the asynchronous job for exporting the segment snapshot.</p>
pub fn set_status(mut self, input: ::std::option::Option<crate::types::SegmentSnapshotStatus>) -> Self {
self.status = input;
self
}
/// <p>The status of the asynchronous job for exporting the segment snapshot.</p>
pub fn get_status(&self) -> &::std::option::Option<crate::types::SegmentSnapshotStatus> {
&self.status
}
/// <p>The status message of the asynchronous job for exporting the segment snapshot.</p>
pub fn status_message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.status_message = ::std::option::Option::Some(input.into());
self
}
/// <p>The status message of the asynchronous job for exporting the segment snapshot.</p>
pub fn set_status_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.status_message = input;
self
}
/// <p>The status message of the asynchronous job for exporting the segment snapshot.</p>
pub fn get_status_message(&self) -> &::std::option::Option<::std::string::String> {
&self.status_message
}
/// <p>The format in which the segment will be exported.</p>
/// This field is required.
pub fn data_format(mut self, input: crate::types::DataFormat) -> Self {
self.data_format = ::std::option::Option::Some(input);
self
}
/// <p>The format in which the segment will be exported.</p>
pub fn set_data_format(mut self, input: ::std::option::Option<crate::types::DataFormat>) -> Self {
self.data_format = input;
self
}
/// <p>The format in which the segment will be exported.</p>
pub fn get_data_format(&self) -> &::std::option::Option<crate::types::DataFormat> {
&self.data_format
}
/// <p>The Amazon Resource Name (ARN) of the KMS key used to encrypt the exported segment.</p>
pub fn encryption_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.encryption_key = ::std::option::Option::Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) of the KMS key used to encrypt the exported segment.</p>
pub fn set_encryption_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.encryption_key = input;
self
}
/// <p>The Amazon Resource Name (ARN) of the KMS key used to encrypt the exported segment.</p>
pub fn get_encryption_key(&self) -> &::std::option::Option<::std::string::String> {
&self.encryption_key
}
/// <p>The Amazon Resource Name (ARN) of the IAM role that allows Customer Profiles service principal to assume the role for conducting KMS and S3 operations.</p>
pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.role_arn = ::std::option::Option::Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) of the IAM role that allows Customer Profiles service principal to assume the role for conducting KMS and S3 operations.</p>
pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.role_arn = input;
self
}
/// <p>The Amazon Resource Name (ARN) of the IAM role that allows Customer Profiles service principal to assume the role for conducting KMS and S3 operations.</p>
pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.role_arn
}
/// <p>The destination to which the segment will be exported. This field must be provided if the request is not submitted from the Connect Customer Admin Website.</p>
pub fn destination_uri(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.destination_uri = ::std::option::Option::Some(input.into());
self
}
/// <p>The destination to which the segment will be exported. This field must be provided if the request is not submitted from the Connect Customer Admin Website.</p>
pub fn set_destination_uri(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.destination_uri = input;
self
}
/// <p>The destination to which the segment will be exported. This field must be provided if the request is not submitted from the Connect Customer Admin Website.</p>
pub fn get_destination_uri(&self) -> &::std::option::Option<::std::string::String> {
&self.destination_uri
}
pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
self._request_id = Some(request_id.into());
self
}
pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
self._request_id = request_id;
self
}
/// Consumes the builder and constructs a [`GetSegmentSnapshotOutput`](crate::operation::get_segment_snapshot::GetSegmentSnapshotOutput).
/// This method will fail if any of the following fields are not set:
/// - [`snapshot_id`](crate::operation::get_segment_snapshot::builders::GetSegmentSnapshotOutputBuilder::snapshot_id)
/// - [`status`](crate::operation::get_segment_snapshot::builders::GetSegmentSnapshotOutputBuilder::status)
/// - [`data_format`](crate::operation::get_segment_snapshot::builders::GetSegmentSnapshotOutputBuilder::data_format)
pub fn build(
self,
) -> ::std::result::Result<crate::operation::get_segment_snapshot::GetSegmentSnapshotOutput, ::aws_smithy_types::error::operation::BuildError>
{
::std::result::Result::Ok(crate::operation::get_segment_snapshot::GetSegmentSnapshotOutput {
snapshot_id: self.snapshot_id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"snapshot_id",
"snapshot_id was not specified but it is required when building GetSegmentSnapshotOutput",
)
})?,
status: self.status.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"status",
"status was not specified but it is required when building GetSegmentSnapshotOutput",
)
})?,
status_message: self.status_message,
data_format: self.data_format.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"data_format",
"data_format was not specified but it is required when building GetSegmentSnapshotOutput",
)
})?,
encryption_key: self.encryption_key,
role_arn: self.role_arn,
destination_uri: self.destination_uri,
_request_id: self._request_id,
})
}
}