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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>The <code>TestRoleRequest</code> structure.</p>
#[deprecated]
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct TestRoleInput {
/// <p>The IAM Amazon Resource Name (ARN) for the role that you want Elastic Transcoder to test.</p>
pub role: ::std::option::Option<::std::string::String>,
/// <p>The Amazon S3 bucket that contains media files to be transcoded. The action attempts to read from this bucket.</p>
pub input_bucket: ::std::option::Option<::std::string::String>,
/// <p>The Amazon S3 bucket that Elastic Transcoder writes transcoded media files to. The action attempts to read from this bucket.</p>
pub output_bucket: ::std::option::Option<::std::string::String>,
/// <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>
pub topics: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl TestRoleInput {
/// <p>The IAM Amazon Resource Name (ARN) for the role that you want Elastic Transcoder to test.</p>
pub fn role(&self) -> ::std::option::Option<&str> {
self.role.as_deref()
}
/// <p>The Amazon S3 bucket that contains media files to be transcoded. The action attempts to read from this bucket.</p>
pub fn input_bucket(&self) -> ::std::option::Option<&str> {
self.input_bucket.as_deref()
}
/// <p>The Amazon S3 bucket that Elastic Transcoder writes transcoded media files to. The action attempts to read from this bucket.</p>
pub fn output_bucket(&self) -> ::std::option::Option<&str> {
self.output_bucket.as_deref()
}
/// <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>
///
/// 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()`.
pub fn topics(&self) -> &[::std::string::String] {
self.topics.as_deref().unwrap_or_default()
}
}
impl TestRoleInput {
/// Creates a new builder-style object to manufacture [`TestRoleInput`](crate::operation::test_role::TestRoleInput).
pub fn builder() -> crate::operation::test_role::builders::TestRoleInputBuilder {
crate::operation::test_role::builders::TestRoleInputBuilder::default()
}
}
/// A builder for [`TestRoleInput`](crate::operation::test_role::TestRoleInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct TestRoleInputBuilder {
pub(crate) role: ::std::option::Option<::std::string::String>,
pub(crate) input_bucket: ::std::option::Option<::std::string::String>,
pub(crate) output_bucket: ::std::option::Option<::std::string::String>,
pub(crate) topics: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl TestRoleInputBuilder {
/// <p>The IAM Amazon Resource Name (ARN) for the role that you want Elastic Transcoder to test.</p>
/// This field is required.
pub fn role(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.role = ::std::option::Option::Some(input.into());
self
}
/// <p>The IAM Amazon Resource Name (ARN) for the role that you want Elastic Transcoder to test.</p>
pub fn set_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.role = input;
self
}
/// <p>The IAM Amazon Resource Name (ARN) for the role that you want Elastic Transcoder to test.</p>
pub fn get_role(&self) -> &::std::option::Option<::std::string::String> {
&self.role
}
/// <p>The Amazon S3 bucket that contains media files to be transcoded. The action attempts to read from this bucket.</p>
/// This field is required.
pub fn input_bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.input_bucket = ::std::option::Option::Some(input.into());
self
}
/// <p>The Amazon S3 bucket that contains media files to be transcoded. The action attempts to read from this bucket.</p>
pub fn set_input_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.input_bucket = input;
self
}
/// <p>The Amazon S3 bucket that contains media files to be transcoded. The action attempts to read from this bucket.</p>
pub fn get_input_bucket(&self) -> &::std::option::Option<::std::string::String> {
&self.input_bucket
}
/// <p>The Amazon S3 bucket that Elastic Transcoder writes transcoded media files to. The action attempts to read from this bucket.</p>
/// This field is required.
pub fn output_bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.output_bucket = ::std::option::Option::Some(input.into());
self
}
/// <p>The Amazon S3 bucket that Elastic Transcoder writes transcoded media files to. The action attempts to read from this bucket.</p>
pub fn set_output_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.output_bucket = input;
self
}
/// <p>The Amazon S3 bucket that Elastic Transcoder writes transcoded media files to. The action attempts to read from this bucket.</p>
pub fn get_output_bucket(&self) -> &::std::option::Option<::std::string::String> {
&self.output_bucket
}
/// Appends an item to `topics`.
///
/// To override the contents of this collection use [`set_topics`](Self::set_topics).
///
/// <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>
pub fn topics(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.topics.unwrap_or_default();
v.push(input.into());
self.topics = ::std::option::Option::Some(v);
self
}
/// <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>
pub fn set_topics(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.topics = input;
self
}
/// <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>
pub fn get_topics(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.topics
}
/// Consumes the builder and constructs a [`TestRoleInput`](crate::operation::test_role::TestRoleInput).
pub fn build(self) -> ::std::result::Result<crate::operation::test_role::TestRoleInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::test_role::TestRoleInput {
role: self.role,
input_bucket: self.input_bucket,
output_bucket: self.output_bucket,
topics: self.topics,
})
}
}