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 Amazon Simple Notification Service (Amazon SNS) topic or topics to notify in order to report job status.</p><important>
/// <p>To receive notifications, you must also subscribe to the new topic in the Amazon SNS console.</p>
/// </important>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Notifications {
/// <p>The Amazon Simple Notification Service (Amazon SNS) topic that you want to notify when Elastic Transcoder has started to process the job.</p>
pub progressing: ::std::option::Option<::std::string::String>,
/// <p>The Amazon SNS topic that you want to notify when Elastic Transcoder has finished processing the job.</p>
pub completed: ::std::option::Option<::std::string::String>,
/// <p>The Amazon SNS topic that you want to notify when Elastic Transcoder encounters a warning condition.</p>
pub warning: ::std::option::Option<::std::string::String>,
/// <p>The Amazon SNS topic that you want to notify when Elastic Transcoder encounters an error condition.</p>
pub error: ::std::option::Option<::std::string::String>,
}
impl Notifications {
/// <p>The Amazon Simple Notification Service (Amazon SNS) topic that you want to notify when Elastic Transcoder has started to process the job.</p>
pub fn progressing(&self) -> ::std::option::Option<&str> {
self.progressing.as_deref()
}
/// <p>The Amazon SNS topic that you want to notify when Elastic Transcoder has finished processing the job.</p>
pub fn completed(&self) -> ::std::option::Option<&str> {
self.completed.as_deref()
}
/// <p>The Amazon SNS topic that you want to notify when Elastic Transcoder encounters a warning condition.</p>
pub fn warning(&self) -> ::std::option::Option<&str> {
self.warning.as_deref()
}
/// <p>The Amazon SNS topic that you want to notify when Elastic Transcoder encounters an error condition.</p>
pub fn error(&self) -> ::std::option::Option<&str> {
self.error.as_deref()
}
}
impl Notifications {
/// Creates a new builder-style object to manufacture [`Notifications`](crate::types::Notifications).
pub fn builder() -> crate::types::builders::NotificationsBuilder {
crate::types::builders::NotificationsBuilder::default()
}
}
/// A builder for [`Notifications`](crate::types::Notifications).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct NotificationsBuilder {
pub(crate) progressing: ::std::option::Option<::std::string::String>,
pub(crate) completed: ::std::option::Option<::std::string::String>,
pub(crate) warning: ::std::option::Option<::std::string::String>,
pub(crate) error: ::std::option::Option<::std::string::String>,
}
impl NotificationsBuilder {
/// <p>The Amazon Simple Notification Service (Amazon SNS) topic that you want to notify when Elastic Transcoder has started to process the job.</p>
pub fn progressing(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.progressing = ::std::option::Option::Some(input.into());
self
}
/// <p>The Amazon Simple Notification Service (Amazon SNS) topic that you want to notify when Elastic Transcoder has started to process the job.</p>
pub fn set_progressing(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.progressing = input;
self
}
/// <p>The Amazon Simple Notification Service (Amazon SNS) topic that you want to notify when Elastic Transcoder has started to process the job.</p>
pub fn get_progressing(&self) -> &::std::option::Option<::std::string::String> {
&self.progressing
}
/// <p>The Amazon SNS topic that you want to notify when Elastic Transcoder has finished processing the job.</p>
pub fn completed(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.completed = ::std::option::Option::Some(input.into());
self
}
/// <p>The Amazon SNS topic that you want to notify when Elastic Transcoder has finished processing the job.</p>
pub fn set_completed(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.completed = input;
self
}
/// <p>The Amazon SNS topic that you want to notify when Elastic Transcoder has finished processing the job.</p>
pub fn get_completed(&self) -> &::std::option::Option<::std::string::String> {
&self.completed
}
/// <p>The Amazon SNS topic that you want to notify when Elastic Transcoder encounters a warning condition.</p>
pub fn warning(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.warning = ::std::option::Option::Some(input.into());
self
}
/// <p>The Amazon SNS topic that you want to notify when Elastic Transcoder encounters a warning condition.</p>
pub fn set_warning(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.warning = input;
self
}
/// <p>The Amazon SNS topic that you want to notify when Elastic Transcoder encounters a warning condition.</p>
pub fn get_warning(&self) -> &::std::option::Option<::std::string::String> {
&self.warning
}
/// <p>The Amazon SNS topic that you want to notify when Elastic Transcoder encounters an error condition.</p>
pub fn error(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.error = ::std::option::Option::Some(input.into());
self
}
/// <p>The Amazon SNS topic that you want to notify when Elastic Transcoder encounters an error condition.</p>
pub fn set_error(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.error = input;
self
}
/// <p>The Amazon SNS topic that you want to notify when Elastic Transcoder encounters an error condition.</p>
pub fn get_error(&self) -> &::std::option::Option<::std::string::String> {
&self.error
}
/// Consumes the builder and constructs a [`Notifications`](crate::types::Notifications).
pub fn build(self) -> crate::types::Notifications {
crate::types::Notifications {
progressing: self.progressing,
completed: self.completed,
warning: self.warning,
error: self.error,
}
}
}