aws-sdk-emr 1.121.0

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

/// <p>The input for the <code>DescribeJobFlows</code> operation.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DescribeJobFlowsInput {
    /// <p>Return only job flows created after this date and time.</p>
    pub created_after: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>Return only job flows created before this date and time.</p>
    pub created_before: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>Return only job flows whose job flow ID is contained in this list.</p>
    pub job_flow_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>Return only job flows whose state is contained in this list.</p>
    pub job_flow_states: ::std::option::Option<::std::vec::Vec<crate::types::JobFlowExecutionState>>,
}
impl DescribeJobFlowsInput {
    /// <p>Return only job flows created after this date and time.</p>
    pub fn created_after(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.created_after.as_ref()
    }
    /// <p>Return only job flows created before this date and time.</p>
    pub fn created_before(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.created_before.as_ref()
    }
    /// <p>Return only job flows whose job flow ID is contained in this list.</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 `.job_flow_ids.is_none()`.
    pub fn job_flow_ids(&self) -> &[::std::string::String] {
        self.job_flow_ids.as_deref().unwrap_or_default()
    }
    /// <p>Return only job flows whose state is contained in this list.</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 `.job_flow_states.is_none()`.
    pub fn job_flow_states(&self) -> &[crate::types::JobFlowExecutionState] {
        self.job_flow_states.as_deref().unwrap_or_default()
    }
}
impl DescribeJobFlowsInput {
    /// Creates a new builder-style object to manufacture [`DescribeJobFlowsInput`](crate::operation::describe_job_flows::DescribeJobFlowsInput).
    pub fn builder() -> crate::operation::describe_job_flows::builders::DescribeJobFlowsInputBuilder {
        crate::operation::describe_job_flows::builders::DescribeJobFlowsInputBuilder::default()
    }
}

/// A builder for [`DescribeJobFlowsInput`](crate::operation::describe_job_flows::DescribeJobFlowsInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DescribeJobFlowsInputBuilder {
    pub(crate) created_after: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) created_before: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) job_flow_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) job_flow_states: ::std::option::Option<::std::vec::Vec<crate::types::JobFlowExecutionState>>,
}
impl DescribeJobFlowsInputBuilder {
    /// <p>Return only job flows created after this date and time.</p>
    pub fn created_after(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.created_after = ::std::option::Option::Some(input);
        self
    }
    /// <p>Return only job flows created after this date and time.</p>
    pub fn set_created_after(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.created_after = input;
        self
    }
    /// <p>Return only job flows created after this date and time.</p>
    pub fn get_created_after(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.created_after
    }
    /// <p>Return only job flows created before this date and time.</p>
    pub fn created_before(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.created_before = ::std::option::Option::Some(input);
        self
    }
    /// <p>Return only job flows created before this date and time.</p>
    pub fn set_created_before(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.created_before = input;
        self
    }
    /// <p>Return only job flows created before this date and time.</p>
    pub fn get_created_before(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.created_before
    }
    /// Appends an item to `job_flow_ids`.
    ///
    /// To override the contents of this collection use [`set_job_flow_ids`](Self::set_job_flow_ids).
    ///
    /// <p>Return only job flows whose job flow ID is contained in this list.</p>
    pub fn job_flow_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.job_flow_ids.unwrap_or_default();
        v.push(input.into());
        self.job_flow_ids = ::std::option::Option::Some(v);
        self
    }
    /// <p>Return only job flows whose job flow ID is contained in this list.</p>
    pub fn set_job_flow_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.job_flow_ids = input;
        self
    }
    /// <p>Return only job flows whose job flow ID is contained in this list.</p>
    pub fn get_job_flow_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.job_flow_ids
    }
    /// Appends an item to `job_flow_states`.
    ///
    /// To override the contents of this collection use [`set_job_flow_states`](Self::set_job_flow_states).
    ///
    /// <p>Return only job flows whose state is contained in this list.</p>
    pub fn job_flow_states(mut self, input: crate::types::JobFlowExecutionState) -> Self {
        let mut v = self.job_flow_states.unwrap_or_default();
        v.push(input);
        self.job_flow_states = ::std::option::Option::Some(v);
        self
    }
    /// <p>Return only job flows whose state is contained in this list.</p>
    pub fn set_job_flow_states(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::JobFlowExecutionState>>) -> Self {
        self.job_flow_states = input;
        self
    }
    /// <p>Return only job flows whose state is contained in this list.</p>
    pub fn get_job_flow_states(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::JobFlowExecutionState>> {
        &self.job_flow_states
    }
    /// Consumes the builder and constructs a [`DescribeJobFlowsInput`](crate::operation::describe_job_flows::DescribeJobFlowsInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::describe_job_flows::DescribeJobFlowsInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::describe_job_flows::DescribeJobFlowsInput {
            created_after: self.created_after,
            created_before: self.created_before,
            job_flow_ids: self.job_flow_ids,
            job_flow_states: self.job_flow_states,
        })
    }
}