aws-sdk-elastictranscoder 1.99.0

AWS SDK for Amazon Elastic Transcoder
Documentation
// 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,
        }
    }
}