aws-sdk-voiceid 1.80.0

AWS SDK for Amazon Voice ID
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Contains all the information about a speaker.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct Speaker {
    /// <p>The identifier of the domain that contains the speaker.</p>
    pub domain_id: ::std::option::Option<::std::string::String>,
    /// <p>The client-provided identifier for the speaker.</p>
    pub customer_speaker_id: ::std::option::Option<::std::string::String>,
    /// <p>The service-generated identifier for the speaker.</p>
    pub generated_speaker_id: ::std::option::Option<::std::string::String>,
    /// <p>The current status of the speaker.</p>
    pub status: ::std::option::Option<crate::types::SpeakerStatus>,
    /// <p>A timestamp of when the speaker was created.</p>
    pub created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>A timestamp of the speaker's last update.</p>
    pub updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The timestamp of when the speaker was last accessed for enrollment, re-enrollment or a successful authentication. This timestamp is accurate to one hour.</p>
    pub last_accessed_at: ::std::option::Option<::aws_smithy_types::DateTime>,
}
impl Speaker {
    /// <p>The identifier of the domain that contains the speaker.</p>
    pub fn domain_id(&self) -> ::std::option::Option<&str> {
        self.domain_id.as_deref()
    }
    /// <p>The client-provided identifier for the speaker.</p>
    pub fn customer_speaker_id(&self) -> ::std::option::Option<&str> {
        self.customer_speaker_id.as_deref()
    }
    /// <p>The service-generated identifier for the speaker.</p>
    pub fn generated_speaker_id(&self) -> ::std::option::Option<&str> {
        self.generated_speaker_id.as_deref()
    }
    /// <p>The current status of the speaker.</p>
    pub fn status(&self) -> ::std::option::Option<&crate::types::SpeakerStatus> {
        self.status.as_ref()
    }
    /// <p>A timestamp of when the speaker was created.</p>
    pub fn created_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.created_at.as_ref()
    }
    /// <p>A timestamp of the speaker's last update.</p>
    pub fn updated_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.updated_at.as_ref()
    }
    /// <p>The timestamp of when the speaker was last accessed for enrollment, re-enrollment or a successful authentication. This timestamp is accurate to one hour.</p>
    pub fn last_accessed_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.last_accessed_at.as_ref()
    }
}
impl ::std::fmt::Debug for Speaker {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("Speaker");
        formatter.field("domain_id", &self.domain_id);
        formatter.field("customer_speaker_id", &"*** Sensitive Data Redacted ***");
        formatter.field("generated_speaker_id", &self.generated_speaker_id);
        formatter.field("status", &self.status);
        formatter.field("created_at", &self.created_at);
        formatter.field("updated_at", &self.updated_at);
        formatter.field("last_accessed_at", &self.last_accessed_at);
        formatter.finish()
    }
}
impl Speaker {
    /// Creates a new builder-style object to manufacture [`Speaker`](crate::types::Speaker).
    pub fn builder() -> crate::types::builders::SpeakerBuilder {
        crate::types::builders::SpeakerBuilder::default()
    }
}

/// A builder for [`Speaker`](crate::types::Speaker).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct SpeakerBuilder {
    pub(crate) domain_id: ::std::option::Option<::std::string::String>,
    pub(crate) customer_speaker_id: ::std::option::Option<::std::string::String>,
    pub(crate) generated_speaker_id: ::std::option::Option<::std::string::String>,
    pub(crate) status: ::std::option::Option<crate::types::SpeakerStatus>,
    pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) last_accessed_at: ::std::option::Option<::aws_smithy_types::DateTime>,
}
impl SpeakerBuilder {
    /// <p>The identifier of the domain that contains the speaker.</p>
    pub fn domain_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.domain_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The identifier of the domain that contains the speaker.</p>
    pub fn set_domain_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.domain_id = input;
        self
    }
    /// <p>The identifier of the domain that contains the speaker.</p>
    pub fn get_domain_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.domain_id
    }
    /// <p>The client-provided identifier for the speaker.</p>
    pub fn customer_speaker_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.customer_speaker_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The client-provided identifier for the speaker.</p>
    pub fn set_customer_speaker_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.customer_speaker_id = input;
        self
    }
    /// <p>The client-provided identifier for the speaker.</p>
    pub fn get_customer_speaker_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.customer_speaker_id
    }
    /// <p>The service-generated identifier for the speaker.</p>
    pub fn generated_speaker_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.generated_speaker_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The service-generated identifier for the speaker.</p>
    pub fn set_generated_speaker_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.generated_speaker_id = input;
        self
    }
    /// <p>The service-generated identifier for the speaker.</p>
    pub fn get_generated_speaker_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.generated_speaker_id
    }
    /// <p>The current status of the speaker.</p>
    pub fn status(mut self, input: crate::types::SpeakerStatus) -> Self {
        self.status = ::std::option::Option::Some(input);
        self
    }
    /// <p>The current status of the speaker.</p>
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::SpeakerStatus>) -> Self {
        self.status = input;
        self
    }
    /// <p>The current status of the speaker.</p>
    pub fn get_status(&self) -> &::std::option::Option<crate::types::SpeakerStatus> {
        &self.status
    }
    /// <p>A timestamp of when the speaker was created.</p>
    pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.created_at = ::std::option::Option::Some(input);
        self
    }
    /// <p>A timestamp of when the speaker was created.</p>
    pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.created_at = input;
        self
    }
    /// <p>A timestamp of when the speaker was created.</p>
    pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.created_at
    }
    /// <p>A timestamp of the speaker's last update.</p>
    pub fn updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.updated_at = ::std::option::Option::Some(input);
        self
    }
    /// <p>A timestamp of the speaker's last update.</p>
    pub fn set_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.updated_at = input;
        self
    }
    /// <p>A timestamp of the speaker's last update.</p>
    pub fn get_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.updated_at
    }
    /// <p>The timestamp of when the speaker was last accessed for enrollment, re-enrollment or a successful authentication. This timestamp is accurate to one hour.</p>
    pub fn last_accessed_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.last_accessed_at = ::std::option::Option::Some(input);
        self
    }
    /// <p>The timestamp of when the speaker was last accessed for enrollment, re-enrollment or a successful authentication. This timestamp is accurate to one hour.</p>
    pub fn set_last_accessed_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.last_accessed_at = input;
        self
    }
    /// <p>The timestamp of when the speaker was last accessed for enrollment, re-enrollment or a successful authentication. This timestamp is accurate to one hour.</p>
    pub fn get_last_accessed_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.last_accessed_at
    }
    /// Consumes the builder and constructs a [`Speaker`](crate::types::Speaker).
    pub fn build(self) -> crate::types::Speaker {
        crate::types::Speaker {
            domain_id: self.domain_id,
            customer_speaker_id: self.customer_speaker_id,
            generated_speaker_id: self.generated_speaker_id,
            status: self.status,
            created_at: self.created_at,
            updated_at: self.updated_at,
            last_accessed_at: self.last_accessed_at,
        }
    }
}
impl ::std::fmt::Debug for SpeakerBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("SpeakerBuilder");
        formatter.field("domain_id", &self.domain_id);
        formatter.field("customer_speaker_id", &"*** Sensitive Data Redacted ***");
        formatter.field("generated_speaker_id", &self.generated_speaker_id);
        formatter.field("status", &self.status);
        formatter.field("created_at", &self.created_at);
        formatter.field("updated_at", &self.updated_at);
        formatter.field("last_accessed_at", &self.last_accessed_at);
        formatter.finish()
    }
}