aws-sdk-omics 1.99.0

AWS SDK for Amazon Omics
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetReferenceMetadataOutput {
    /// <p>The reference's ID.</p>
    pub id: ::std::string::String,
    /// <p>The reference's ARN.</p>
    pub arn: ::std::string::String,
    /// <p>The reference's reference store ID.</p>
    pub reference_store_id: ::std::string::String,
    /// <p>The reference's MD5 checksum.</p>
    pub md5: ::std::string::String,
    /// <p>The reference's status.</p>
    pub status: ::std::option::Option<crate::types::ReferenceStatus>,
    /// <p>The reference's name.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>The reference's description.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>When the reference was created.</p>
    pub creation_time: ::aws_smithy_types::DateTime,
    /// <p>When the reference was updated.</p>
    pub update_time: ::aws_smithy_types::DateTime,
    /// <p>The reference's files.</p>
    pub files: ::std::option::Option<crate::types::ReferenceFiles>,
    /// <p>The reference's creation type.</p>
    pub creation_type: ::std::option::Option<crate::types::ReferenceCreationType>,
    /// <p>The reference's creation job ID.</p>
    pub creation_job_id: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl GetReferenceMetadataOutput {
    /// <p>The reference's ID.</p>
    pub fn id(&self) -> &str {
        use std::ops::Deref;
        self.id.deref()
    }
    /// <p>The reference's ARN.</p>
    pub fn arn(&self) -> &str {
        use std::ops::Deref;
        self.arn.deref()
    }
    /// <p>The reference's reference store ID.</p>
    pub fn reference_store_id(&self) -> &str {
        use std::ops::Deref;
        self.reference_store_id.deref()
    }
    /// <p>The reference's MD5 checksum.</p>
    pub fn md5(&self) -> &str {
        use std::ops::Deref;
        self.md5.deref()
    }
    /// <p>The reference's status.</p>
    pub fn status(&self) -> ::std::option::Option<&crate::types::ReferenceStatus> {
        self.status.as_ref()
    }
    /// <p>The reference's name.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The reference's description.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>When the reference was created.</p>
    pub fn creation_time(&self) -> &::aws_smithy_types::DateTime {
        &self.creation_time
    }
    /// <p>When the reference was updated.</p>
    pub fn update_time(&self) -> &::aws_smithy_types::DateTime {
        &self.update_time
    }
    /// <p>The reference's files.</p>
    pub fn files(&self) -> ::std::option::Option<&crate::types::ReferenceFiles> {
        self.files.as_ref()
    }
    /// <p>The reference's creation type.</p>
    pub fn creation_type(&self) -> ::std::option::Option<&crate::types::ReferenceCreationType> {
        self.creation_type.as_ref()
    }
    /// <p>The reference's creation job ID.</p>
    pub fn creation_job_id(&self) -> ::std::option::Option<&str> {
        self.creation_job_id.as_deref()
    }
}
impl ::aws_types::request_id::RequestId for GetReferenceMetadataOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl GetReferenceMetadataOutput {
    /// Creates a new builder-style object to manufacture [`GetReferenceMetadataOutput`](crate::operation::get_reference_metadata::GetReferenceMetadataOutput).
    pub fn builder() -> crate::operation::get_reference_metadata::builders::GetReferenceMetadataOutputBuilder {
        crate::operation::get_reference_metadata::builders::GetReferenceMetadataOutputBuilder::default()
    }
}

/// A builder for [`GetReferenceMetadataOutput`](crate::operation::get_reference_metadata::GetReferenceMetadataOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetReferenceMetadataOutputBuilder {
    pub(crate) id: ::std::option::Option<::std::string::String>,
    pub(crate) arn: ::std::option::Option<::std::string::String>,
    pub(crate) reference_store_id: ::std::option::Option<::std::string::String>,
    pub(crate) md5: ::std::option::Option<::std::string::String>,
    pub(crate) status: ::std::option::Option<crate::types::ReferenceStatus>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) update_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) files: ::std::option::Option<crate::types::ReferenceFiles>,
    pub(crate) creation_type: ::std::option::Option<crate::types::ReferenceCreationType>,
    pub(crate) creation_job_id: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl GetReferenceMetadataOutputBuilder {
    /// <p>The reference's ID.</p>
    /// This field is required.
    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The reference's ID.</p>
    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.id = input;
        self
    }
    /// <p>The reference's ID.</p>
    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.id
    }
    /// <p>The reference's ARN.</p>
    /// This field is required.
    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The reference's ARN.</p>
    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.arn = input;
        self
    }
    /// <p>The reference's ARN.</p>
    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.arn
    }
    /// <p>The reference's reference store ID.</p>
    /// This field is required.
    pub fn reference_store_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.reference_store_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The reference's reference store ID.</p>
    pub fn set_reference_store_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.reference_store_id = input;
        self
    }
    /// <p>The reference's reference store ID.</p>
    pub fn get_reference_store_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.reference_store_id
    }
    /// <p>The reference's MD5 checksum.</p>
    /// This field is required.
    pub fn md5(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.md5 = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The reference's MD5 checksum.</p>
    pub fn set_md5(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.md5 = input;
        self
    }
    /// <p>The reference's MD5 checksum.</p>
    pub fn get_md5(&self) -> &::std::option::Option<::std::string::String> {
        &self.md5
    }
    /// <p>The reference's status.</p>
    pub fn status(mut self, input: crate::types::ReferenceStatus) -> Self {
        self.status = ::std::option::Option::Some(input);
        self
    }
    /// <p>The reference's status.</p>
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::ReferenceStatus>) -> Self {
        self.status = input;
        self
    }
    /// <p>The reference's status.</p>
    pub fn get_status(&self) -> &::std::option::Option<crate::types::ReferenceStatus> {
        &self.status
    }
    /// <p>The reference's name.</p>
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The reference's name.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The reference's name.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>The reference's description.</p>
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The reference's description.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>The reference's description.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// <p>When the reference was created.</p>
    /// This field is required.
    pub fn creation_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.creation_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>When the reference was created.</p>
    pub fn set_creation_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.creation_time = input;
        self
    }
    /// <p>When the reference was created.</p>
    pub fn get_creation_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.creation_time
    }
    /// <p>When the reference was updated.</p>
    /// This field is required.
    pub fn update_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.update_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>When the reference was updated.</p>
    pub fn set_update_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.update_time = input;
        self
    }
    /// <p>When the reference was updated.</p>
    pub fn get_update_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.update_time
    }
    /// <p>The reference's files.</p>
    pub fn files(mut self, input: crate::types::ReferenceFiles) -> Self {
        self.files = ::std::option::Option::Some(input);
        self
    }
    /// <p>The reference's files.</p>
    pub fn set_files(mut self, input: ::std::option::Option<crate::types::ReferenceFiles>) -> Self {
        self.files = input;
        self
    }
    /// <p>The reference's files.</p>
    pub fn get_files(&self) -> &::std::option::Option<crate::types::ReferenceFiles> {
        &self.files
    }
    /// <p>The reference's creation type.</p>
    pub fn creation_type(mut self, input: crate::types::ReferenceCreationType) -> Self {
        self.creation_type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The reference's creation type.</p>
    pub fn set_creation_type(mut self, input: ::std::option::Option<crate::types::ReferenceCreationType>) -> Self {
        self.creation_type = input;
        self
    }
    /// <p>The reference's creation type.</p>
    pub fn get_creation_type(&self) -> &::std::option::Option<crate::types::ReferenceCreationType> {
        &self.creation_type
    }
    /// <p>The reference's creation job ID.</p>
    pub fn creation_job_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.creation_job_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The reference's creation job ID.</p>
    pub fn set_creation_job_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.creation_job_id = input;
        self
    }
    /// <p>The reference's creation job ID.</p>
    pub fn get_creation_job_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.creation_job_id
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`GetReferenceMetadataOutput`](crate::operation::get_reference_metadata::GetReferenceMetadataOutput).
    /// This method will fail if any of the following fields are not set:
    /// - [`id`](crate::operation::get_reference_metadata::builders::GetReferenceMetadataOutputBuilder::id)
    /// - [`arn`](crate::operation::get_reference_metadata::builders::GetReferenceMetadataOutputBuilder::arn)
    /// - [`reference_store_id`](crate::operation::get_reference_metadata::builders::GetReferenceMetadataOutputBuilder::reference_store_id)
    /// - [`md5`](crate::operation::get_reference_metadata::builders::GetReferenceMetadataOutputBuilder::md5)
    /// - [`creation_time`](crate::operation::get_reference_metadata::builders::GetReferenceMetadataOutputBuilder::creation_time)
    /// - [`update_time`](crate::operation::get_reference_metadata::builders::GetReferenceMetadataOutputBuilder::update_time)
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::get_reference_metadata::GetReferenceMetadataOutput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::get_reference_metadata::GetReferenceMetadataOutput {
            id: self.id.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "id",
                    "id was not specified but it is required when building GetReferenceMetadataOutput",
                )
            })?,
            arn: self.arn.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "arn",
                    "arn was not specified but it is required when building GetReferenceMetadataOutput",
                )
            })?,
            reference_store_id: self.reference_store_id.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "reference_store_id",
                    "reference_store_id was not specified but it is required when building GetReferenceMetadataOutput",
                )
            })?,
            md5: self.md5.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "md5",
                    "md5 was not specified but it is required when building GetReferenceMetadataOutput",
                )
            })?,
            status: self.status,
            name: self.name,
            description: self.description,
            creation_time: self.creation_time.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "creation_time",
                    "creation_time was not specified but it is required when building GetReferenceMetadataOutput",
                )
            })?,
            update_time: self.update_time.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "update_time",
                    "update_time was not specified but it is required when building GetReferenceMetadataOutput",
                )
            })?,
            files: self.files,
            creation_type: self.creation_type,
            creation_job_id: self.creation_job_id,
            _request_id: self._request_id,
        })
    }
}