aws-sdk-ivs 1.91.0

AWS SDK for Amazon Interactive Video Service
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Specifies information needed to stream using the SRT protocol.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct Srt {
    /// <p>The endpoint to be used when streaming with IVS using the SRT protocol.</p>
    pub endpoint: ::std::option::Option<::std::string::String>,
    /// <p>Auto-generated passphrase to enable encryption. This field is applicable only if the end user has <i>not</i> enabled the <code>insecureIngest</code> option for the channel.</p>
    pub passphrase: ::std::option::Option<::std::string::String>,
}
impl Srt {
    /// <p>The endpoint to be used when streaming with IVS using the SRT protocol.</p>
    pub fn endpoint(&self) -> ::std::option::Option<&str> {
        self.endpoint.as_deref()
    }
    /// <p>Auto-generated passphrase to enable encryption. This field is applicable only if the end user has <i>not</i> enabled the <code>insecureIngest</code> option for the channel.</p>
    pub fn passphrase(&self) -> ::std::option::Option<&str> {
        self.passphrase.as_deref()
    }
}
impl ::std::fmt::Debug for Srt {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("Srt");
        formatter.field("endpoint", &self.endpoint);
        formatter.field("passphrase", &"*** Sensitive Data Redacted ***");
        formatter.finish()
    }
}
impl Srt {
    /// Creates a new builder-style object to manufacture [`Srt`](crate::types::Srt).
    pub fn builder() -> crate::types::builders::SrtBuilder {
        crate::types::builders::SrtBuilder::default()
    }
}

/// A builder for [`Srt`](crate::types::Srt).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct SrtBuilder {
    pub(crate) endpoint: ::std::option::Option<::std::string::String>,
    pub(crate) passphrase: ::std::option::Option<::std::string::String>,
}
impl SrtBuilder {
    /// <p>The endpoint to be used when streaming with IVS using the SRT protocol.</p>
    pub fn endpoint(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.endpoint = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The endpoint to be used when streaming with IVS using the SRT protocol.</p>
    pub fn set_endpoint(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.endpoint = input;
        self
    }
    /// <p>The endpoint to be used when streaming with IVS using the SRT protocol.</p>
    pub fn get_endpoint(&self) -> &::std::option::Option<::std::string::String> {
        &self.endpoint
    }
    /// <p>Auto-generated passphrase to enable encryption. This field is applicable only if the end user has <i>not</i> enabled the <code>insecureIngest</code> option for the channel.</p>
    pub fn passphrase(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.passphrase = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Auto-generated passphrase to enable encryption. This field is applicable only if the end user has <i>not</i> enabled the <code>insecureIngest</code> option for the channel.</p>
    pub fn set_passphrase(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.passphrase = input;
        self
    }
    /// <p>Auto-generated passphrase to enable encryption. This field is applicable only if the end user has <i>not</i> enabled the <code>insecureIngest</code> option for the channel.</p>
    pub fn get_passphrase(&self) -> &::std::option::Option<::std::string::String> {
        &self.passphrase
    }
    /// Consumes the builder and constructs a [`Srt`](crate::types::Srt).
    pub fn build(self) -> crate::types::Srt {
        crate::types::Srt {
            endpoint: self.endpoint,
            passphrase: self.passphrase,
        }
    }
}
impl ::std::fmt::Debug for SrtBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("SrtBuilder");
        formatter.field("endpoint", &self.endpoint);
        formatter.field("passphrase", &"*** Sensitive Data Redacted ***");
        formatter.finish()
    }
}