aws_sdk_batch/operation/describe_jobs/
_describe_jobs_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Contains the parameters for <code>DescribeJobs</code>.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct DescribeJobsInput {
7    /// <p>A list of up to 100 job IDs.</p>
8    pub jobs: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
9}
10impl DescribeJobsInput {
11    /// <p>A list of up to 100 job IDs.</p>
12    ///
13    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.jobs.is_none()`.
14    pub fn jobs(&self) -> &[::std::string::String] {
15        self.jobs.as_deref().unwrap_or_default()
16    }
17}
18impl DescribeJobsInput {
19    /// Creates a new builder-style object to manufacture [`DescribeJobsInput`](crate::operation::describe_jobs::DescribeJobsInput).
20    pub fn builder() -> crate::operation::describe_jobs::builders::DescribeJobsInputBuilder {
21        crate::operation::describe_jobs::builders::DescribeJobsInputBuilder::default()
22    }
23}
24
25/// A builder for [`DescribeJobsInput`](crate::operation::describe_jobs::DescribeJobsInput).
26#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
27#[non_exhaustive]
28pub struct DescribeJobsInputBuilder {
29    pub(crate) jobs: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
30}
31impl DescribeJobsInputBuilder {
32    /// Appends an item to `jobs`.
33    ///
34    /// To override the contents of this collection use [`set_jobs`](Self::set_jobs).
35    ///
36    /// <p>A list of up to 100 job IDs.</p>
37    pub fn jobs(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
38        let mut v = self.jobs.unwrap_or_default();
39        v.push(input.into());
40        self.jobs = ::std::option::Option::Some(v);
41        self
42    }
43    /// <p>A list of up to 100 job IDs.</p>
44    pub fn set_jobs(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
45        self.jobs = input;
46        self
47    }
48    /// <p>A list of up to 100 job IDs.</p>
49    pub fn get_jobs(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
50        &self.jobs
51    }
52    /// Consumes the builder and constructs a [`DescribeJobsInput`](crate::operation::describe_jobs::DescribeJobsInput).
53    pub fn build(
54        self,
55    ) -> ::std::result::Result<crate::operation::describe_jobs::DescribeJobsInput, ::aws_smithy_types::error::operation::BuildError> {
56        ::std::result::Result::Ok(crate::operation::describe_jobs::DescribeJobsInput { jobs: self.jobs })
57    }
58}