aws-sdk-deadline 1.96.0

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

/// <p>The job attachments.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Attachments {
    /// <p>The manifest properties for the attachments.</p>
    pub manifests: ::std::vec::Vec<crate::types::ManifestProperties>,
    /// <p>The file system location for the attachments.</p>
    pub file_system: crate::types::JobAttachmentsFileSystem,
}
impl Attachments {
    /// <p>The manifest properties for the attachments.</p>
    pub fn manifests(&self) -> &[crate::types::ManifestProperties] {
        use std::ops::Deref;
        self.manifests.deref()
    }
    /// <p>The file system location for the attachments.</p>
    pub fn file_system(&self) -> &crate::types::JobAttachmentsFileSystem {
        &self.file_system
    }
}
impl Attachments {
    /// Creates a new builder-style object to manufacture [`Attachments`](crate::types::Attachments).
    pub fn builder() -> crate::types::builders::AttachmentsBuilder {
        crate::types::builders::AttachmentsBuilder::default()
    }
}

/// A builder for [`Attachments`](crate::types::Attachments).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct AttachmentsBuilder {
    pub(crate) manifests: ::std::option::Option<::std::vec::Vec<crate::types::ManifestProperties>>,
    pub(crate) file_system: ::std::option::Option<crate::types::JobAttachmentsFileSystem>,
}
impl AttachmentsBuilder {
    /// Appends an item to `manifests`.
    ///
    /// To override the contents of this collection use [`set_manifests`](Self::set_manifests).
    ///
    /// <p>The manifest properties for the attachments.</p>
    pub fn manifests(mut self, input: crate::types::ManifestProperties) -> Self {
        let mut v = self.manifests.unwrap_or_default();
        v.push(input);
        self.manifests = ::std::option::Option::Some(v);
        self
    }
    /// <p>The manifest properties for the attachments.</p>
    pub fn set_manifests(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ManifestProperties>>) -> Self {
        self.manifests = input;
        self
    }
    /// <p>The manifest properties for the attachments.</p>
    pub fn get_manifests(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ManifestProperties>> {
        &self.manifests
    }
    /// <p>The file system location for the attachments.</p>
    pub fn file_system(mut self, input: crate::types::JobAttachmentsFileSystem) -> Self {
        self.file_system = ::std::option::Option::Some(input);
        self
    }
    /// <p>The file system location for the attachments.</p>
    pub fn set_file_system(mut self, input: ::std::option::Option<crate::types::JobAttachmentsFileSystem>) -> Self {
        self.file_system = input;
        self
    }
    /// <p>The file system location for the attachments.</p>
    pub fn get_file_system(&self) -> &::std::option::Option<crate::types::JobAttachmentsFileSystem> {
        &self.file_system
    }
    /// Consumes the builder and constructs a [`Attachments`](crate::types::Attachments).
    /// This method will fail if any of the following fields are not set:
    /// - [`manifests`](crate::types::builders::AttachmentsBuilder::manifests)
    pub fn build(self) -> ::std::result::Result<crate::types::Attachments, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::types::Attachments {
            manifests: self.manifests.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "manifests",
                    "manifests was not specified but it is required when building Attachments",
                )
            })?,
            file_system: self.file_system.unwrap_or(
                "COPIED"
                    .parse::<crate::types::JobAttachmentsFileSystem>()
                    .expect("static value validated to member"),
            ),
        })
    }
}