aws-sdk-medialive 0.26.0

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

/// Placeholder documentation for BatchDeleteResponse
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct BatchDeleteOutput {
    /// List of failed operations
    #[doc(hidden)]
    pub failed: std::option::Option<std::vec::Vec<crate::types::BatchFailedResultModel>>,
    /// List of successful operations
    #[doc(hidden)]
    pub successful: std::option::Option<std::vec::Vec<crate::types::BatchSuccessfulResultModel>>,
    _request_id: Option<String>,
}
impl BatchDeleteOutput {
    /// List of failed operations
    pub fn failed(&self) -> std::option::Option<&[crate::types::BatchFailedResultModel]> {
        self.failed.as_deref()
    }
    /// List of successful operations
    pub fn successful(&self) -> std::option::Option<&[crate::types::BatchSuccessfulResultModel]> {
        self.successful.as_deref()
    }
}
impl aws_http::request_id::RequestId for BatchDeleteOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl BatchDeleteOutput {
    /// Creates a new builder-style object to manufacture [`BatchDeleteOutput`](crate::operation::batch_delete::BatchDeleteOutput).
    pub fn builder() -> crate::operation::batch_delete::builders::BatchDeleteOutputBuilder {
        crate::operation::batch_delete::builders::BatchDeleteOutputBuilder::default()
    }
}

/// A builder for [`BatchDeleteOutput`](crate::operation::batch_delete::BatchDeleteOutput).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct BatchDeleteOutputBuilder {
    pub(crate) failed: std::option::Option<std::vec::Vec<crate::types::BatchFailedResultModel>>,
    pub(crate) successful:
        std::option::Option<std::vec::Vec<crate::types::BatchSuccessfulResultModel>>,
    _request_id: Option<String>,
}
impl BatchDeleteOutputBuilder {
    /// Appends an item to `failed`.
    ///
    /// To override the contents of this collection use [`set_failed`](Self::set_failed).
    ///
    /// List of failed operations
    pub fn failed(mut self, input: crate::types::BatchFailedResultModel) -> Self {
        let mut v = self.failed.unwrap_or_default();
        v.push(input);
        self.failed = Some(v);
        self
    }
    /// List of failed operations
    pub fn set_failed(
        mut self,
        input: std::option::Option<std::vec::Vec<crate::types::BatchFailedResultModel>>,
    ) -> Self {
        self.failed = input;
        self
    }
    /// Appends an item to `successful`.
    ///
    /// To override the contents of this collection use [`set_successful`](Self::set_successful).
    ///
    /// List of successful operations
    pub fn successful(mut self, input: crate::types::BatchSuccessfulResultModel) -> Self {
        let mut v = self.successful.unwrap_or_default();
        v.push(input);
        self.successful = Some(v);
        self
    }
    /// List of successful operations
    pub fn set_successful(
        mut self,
        input: std::option::Option<std::vec::Vec<crate::types::BatchSuccessfulResultModel>>,
    ) -> Self {
        self.successful = input;
        self
    }
    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 [`BatchDeleteOutput`](crate::operation::batch_delete::BatchDeleteOutput).
    pub fn build(self) -> crate::operation::batch_delete::BatchDeleteOutput {
        crate::operation::batch_delete::BatchDeleteOutput {
            failed: self.failed,
            successful: self.successful,
            _request_id: self._request_id,
        }
    }
}