aws-sdk-ec2 1.223.0

AWS SDK for Amazon Elastic Compute Cloud
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 CreateFlowLogsOutput {
    /// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
    pub client_token: ::std::option::Option<::std::string::String>,
    /// <p>The IDs of the flow logs.</p>
    pub flow_log_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>Information about the flow logs that could not be created successfully.</p>
    pub unsuccessful: ::std::option::Option<::std::vec::Vec<crate::types::UnsuccessfulItem>>,
    _request_id: Option<String>,
}
impl CreateFlowLogsOutput {
    /// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
    pub fn client_token(&self) -> ::std::option::Option<&str> {
        self.client_token.as_deref()
    }
    /// <p>The IDs of the flow logs.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.flow_log_ids.is_none()`.
    pub fn flow_log_ids(&self) -> &[::std::string::String] {
        self.flow_log_ids.as_deref().unwrap_or_default()
    }
    /// <p>Information about the flow logs that could not be created successfully.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.unsuccessful.is_none()`.
    pub fn unsuccessful(&self) -> &[crate::types::UnsuccessfulItem] {
        self.unsuccessful.as_deref().unwrap_or_default()
    }
}
impl ::aws_types::request_id::RequestId for CreateFlowLogsOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl CreateFlowLogsOutput {
    /// Creates a new builder-style object to manufacture [`CreateFlowLogsOutput`](crate::operation::create_flow_logs::CreateFlowLogsOutput).
    pub fn builder() -> crate::operation::create_flow_logs::builders::CreateFlowLogsOutputBuilder {
        crate::operation::create_flow_logs::builders::CreateFlowLogsOutputBuilder::default()
    }
}

/// A builder for [`CreateFlowLogsOutput`](crate::operation::create_flow_logs::CreateFlowLogsOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateFlowLogsOutputBuilder {
    pub(crate) client_token: ::std::option::Option<::std::string::String>,
    pub(crate) flow_log_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) unsuccessful: ::std::option::Option<::std::vec::Vec<crate::types::UnsuccessfulItem>>,
    _request_id: Option<String>,
}
impl CreateFlowLogsOutputBuilder {
    /// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.client_token = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.client_token = input;
        self
    }
    /// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.client_token
    }
    /// Appends an item to `flow_log_ids`.
    ///
    /// To override the contents of this collection use [`set_flow_log_ids`](Self::set_flow_log_ids).
    ///
    /// <p>The IDs of the flow logs.</p>
    pub fn flow_log_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.flow_log_ids.unwrap_or_default();
        v.push(input.into());
        self.flow_log_ids = ::std::option::Option::Some(v);
        self
    }
    /// <p>The IDs of the flow logs.</p>
    pub fn set_flow_log_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.flow_log_ids = input;
        self
    }
    /// <p>The IDs of the flow logs.</p>
    pub fn get_flow_log_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.flow_log_ids
    }
    /// Appends an item to `unsuccessful`.
    ///
    /// To override the contents of this collection use [`set_unsuccessful`](Self::set_unsuccessful).
    ///
    /// <p>Information about the flow logs that could not be created successfully.</p>
    pub fn unsuccessful(mut self, input: crate::types::UnsuccessfulItem) -> Self {
        let mut v = self.unsuccessful.unwrap_or_default();
        v.push(input);
        self.unsuccessful = ::std::option::Option::Some(v);
        self
    }
    /// <p>Information about the flow logs that could not be created successfully.</p>
    pub fn set_unsuccessful(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::UnsuccessfulItem>>) -> Self {
        self.unsuccessful = input;
        self
    }
    /// <p>Information about the flow logs that could not be created successfully.</p>
    pub fn get_unsuccessful(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::UnsuccessfulItem>> {
        &self.unsuccessful
    }
    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 [`CreateFlowLogsOutput`](crate::operation::create_flow_logs::CreateFlowLogsOutput).
    pub fn build(self) -> crate::operation::create_flow_logs::CreateFlowLogsOutput {
        crate::operation::create_flow_logs::CreateFlowLogsOutput {
            client_token: self.client_token,
            flow_log_ids: self.flow_log_ids,
            unsuccessful: self.unsuccessful,
            _request_id: self._request_id,
        }
    }
}