aws_sdk_elastictranscoder/operation/test_role/_test_role_input.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>The <code>TestRoleRequest</code> structure.</p>
4#[deprecated]
5#[non_exhaustive]
6#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
7pub struct TestRoleInput {
8 /// <p>The IAM Amazon Resource Name (ARN) for the role that you want Elastic Transcoder to test.</p>
9 pub role: ::std::option::Option<::std::string::String>,
10 /// <p>The Amazon S3 bucket that contains media files to be transcoded. The action attempts to read from this bucket.</p>
11 pub input_bucket: ::std::option::Option<::std::string::String>,
12 /// <p>The Amazon S3 bucket that Elastic Transcoder writes transcoded media files to. The action attempts to read from this bucket.</p>
13 pub output_bucket: ::std::option::Option<::std::string::String>,
14 /// <p>The ARNs of one or more Amazon Simple Notification Service (Amazon SNS) topics that you want the action to send a test notification to.</p>
15 pub topics: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
16}
17impl TestRoleInput {
18 /// <p>The IAM Amazon Resource Name (ARN) for the role that you want Elastic Transcoder to test.</p>
19 pub fn role(&self) -> ::std::option::Option<&str> {
20 self.role.as_deref()
21 }
22 /// <p>The Amazon S3 bucket that contains media files to be transcoded. The action attempts to read from this bucket.</p>
23 pub fn input_bucket(&self) -> ::std::option::Option<&str> {
24 self.input_bucket.as_deref()
25 }
26 /// <p>The Amazon S3 bucket that Elastic Transcoder writes transcoded media files to. The action attempts to read from this bucket.</p>
27 pub fn output_bucket(&self) -> ::std::option::Option<&str> {
28 self.output_bucket.as_deref()
29 }
30 /// <p>The ARNs of one or more Amazon Simple Notification Service (Amazon SNS) topics that you want the action to send a test notification to.</p>
31 ///
32 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.topics.is_none()`.
33 pub fn topics(&self) -> &[::std::string::String] {
34 self.topics.as_deref().unwrap_or_default()
35 }
36}
37impl TestRoleInput {
38 /// Creates a new builder-style object to manufacture [`TestRoleInput`](crate::operation::test_role::TestRoleInput).
39 pub fn builder() -> crate::operation::test_role::builders::TestRoleInputBuilder {
40 crate::operation::test_role::builders::TestRoleInputBuilder::default()
41 }
42}
43
44/// A builder for [`TestRoleInput`](crate::operation::test_role::TestRoleInput).
45#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
46#[non_exhaustive]
47pub struct TestRoleInputBuilder {
48 pub(crate) role: ::std::option::Option<::std::string::String>,
49 pub(crate) input_bucket: ::std::option::Option<::std::string::String>,
50 pub(crate) output_bucket: ::std::option::Option<::std::string::String>,
51 pub(crate) topics: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
52}
53impl TestRoleInputBuilder {
54 /// <p>The IAM Amazon Resource Name (ARN) for the role that you want Elastic Transcoder to test.</p>
55 /// This field is required.
56 pub fn role(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
57 self.role = ::std::option::Option::Some(input.into());
58 self
59 }
60 /// <p>The IAM Amazon Resource Name (ARN) for the role that you want Elastic Transcoder to test.</p>
61 pub fn set_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
62 self.role = input;
63 self
64 }
65 /// <p>The IAM Amazon Resource Name (ARN) for the role that you want Elastic Transcoder to test.</p>
66 pub fn get_role(&self) -> &::std::option::Option<::std::string::String> {
67 &self.role
68 }
69 /// <p>The Amazon S3 bucket that contains media files to be transcoded. The action attempts to read from this bucket.</p>
70 /// This field is required.
71 pub fn input_bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
72 self.input_bucket = ::std::option::Option::Some(input.into());
73 self
74 }
75 /// <p>The Amazon S3 bucket that contains media files to be transcoded. The action attempts to read from this bucket.</p>
76 pub fn set_input_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
77 self.input_bucket = input;
78 self
79 }
80 /// <p>The Amazon S3 bucket that contains media files to be transcoded. The action attempts to read from this bucket.</p>
81 pub fn get_input_bucket(&self) -> &::std::option::Option<::std::string::String> {
82 &self.input_bucket
83 }
84 /// <p>The Amazon S3 bucket that Elastic Transcoder writes transcoded media files to. The action attempts to read from this bucket.</p>
85 /// This field is required.
86 pub fn output_bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
87 self.output_bucket = ::std::option::Option::Some(input.into());
88 self
89 }
90 /// <p>The Amazon S3 bucket that Elastic Transcoder writes transcoded media files to. The action attempts to read from this bucket.</p>
91 pub fn set_output_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
92 self.output_bucket = input;
93 self
94 }
95 /// <p>The Amazon S3 bucket that Elastic Transcoder writes transcoded media files to. The action attempts to read from this bucket.</p>
96 pub fn get_output_bucket(&self) -> &::std::option::Option<::std::string::String> {
97 &self.output_bucket
98 }
99 /// Appends an item to `topics`.
100 ///
101 /// To override the contents of this collection use [`set_topics`](Self::set_topics).
102 ///
103 /// <p>The ARNs of one or more Amazon Simple Notification Service (Amazon SNS) topics that you want the action to send a test notification to.</p>
104 pub fn topics(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
105 let mut v = self.topics.unwrap_or_default();
106 v.push(input.into());
107 self.topics = ::std::option::Option::Some(v);
108 self
109 }
110 /// <p>The ARNs of one or more Amazon Simple Notification Service (Amazon SNS) topics that you want the action to send a test notification to.</p>
111 pub fn set_topics(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
112 self.topics = input;
113 self
114 }
115 /// <p>The ARNs of one or more Amazon Simple Notification Service (Amazon SNS) topics that you want the action to send a test notification to.</p>
116 pub fn get_topics(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
117 &self.topics
118 }
119 /// Consumes the builder and constructs a [`TestRoleInput`](crate::operation::test_role::TestRoleInput).
120 pub fn build(self) -> ::std::result::Result<crate::operation::test_role::TestRoleInput, ::aws_smithy_types::error::operation::BuildError> {
121 ::std::result::Result::Ok(crate::operation::test_role::TestRoleInput {
122 role: self.role,
123 input_bucket: self.input_bucket,
124 output_bucket: self.output_bucket,
125 topics: self.topics,
126 })
127 }
128}