1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Contains the parameters for SetStatus.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SetStatusInput {
    /// <p>The ID of the pipeline that contains the objects.</p>
    #[doc(hidden)]
    pub pipeline_id: std::option::Option<std::string::String>,
    /// <p>The IDs of the objects. The corresponding objects can be either physical or components, but not a mix of both types.</p>
    #[doc(hidden)]
    pub object_ids: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>The status to be set on all the objects specified in <code>objectIds</code>. For components, use <code>PAUSE</code> or <code>RESUME</code>. For instances, use <code>TRY_CANCEL</code>, <code>RERUN</code>, or <code>MARK_FINISHED</code>.</p>
    #[doc(hidden)]
    pub status: std::option::Option<std::string::String>,
}
impl SetStatusInput {
    /// <p>The ID of the pipeline that contains the objects.</p>
    pub fn pipeline_id(&self) -> std::option::Option<&str> {
        self.pipeline_id.as_deref()
    }
    /// <p>The IDs of the objects. The corresponding objects can be either physical or components, but not a mix of both types.</p>
    pub fn object_ids(&self) -> std::option::Option<&[std::string::String]> {
        self.object_ids.as_deref()
    }
    /// <p>The status to be set on all the objects specified in <code>objectIds</code>. For components, use <code>PAUSE</code> or <code>RESUME</code>. For instances, use <code>TRY_CANCEL</code>, <code>RERUN</code>, or <code>MARK_FINISHED</code>.</p>
    pub fn status(&self) -> std::option::Option<&str> {
        self.status.as_deref()
    }
}
impl SetStatusInput {
    /// Creates a new builder-style object to manufacture [`SetStatusInput`](crate::operation::set_status::SetStatusInput).
    pub fn builder() -> crate::operation::set_status::builders::SetStatusInputBuilder {
        crate::operation::set_status::builders::SetStatusInputBuilder::default()
    }
}

/// A builder for [`SetStatusInput`](crate::operation::set_status::SetStatusInput).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct SetStatusInputBuilder {
    pub(crate) pipeline_id: std::option::Option<std::string::String>,
    pub(crate) object_ids: std::option::Option<std::vec::Vec<std::string::String>>,
    pub(crate) status: std::option::Option<std::string::String>,
}
impl SetStatusInputBuilder {
    /// <p>The ID of the pipeline that contains the objects.</p>
    pub fn pipeline_id(mut self, input: impl Into<std::string::String>) -> Self {
        self.pipeline_id = Some(input.into());
        self
    }
    /// <p>The ID of the pipeline that contains the objects.</p>
    pub fn set_pipeline_id(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.pipeline_id = input;
        self
    }
    /// Appends an item to `object_ids`.
    ///
    /// To override the contents of this collection use [`set_object_ids`](Self::set_object_ids).
    ///
    /// <p>The IDs of the objects. The corresponding objects can be either physical or components, but not a mix of both types.</p>
    pub fn object_ids(mut self, input: impl Into<std::string::String>) -> Self {
        let mut v = self.object_ids.unwrap_or_default();
        v.push(input.into());
        self.object_ids = Some(v);
        self
    }
    /// <p>The IDs of the objects. The corresponding objects can be either physical or components, but not a mix of both types.</p>
    pub fn set_object_ids(
        mut self,
        input: std::option::Option<std::vec::Vec<std::string::String>>,
    ) -> Self {
        self.object_ids = input;
        self
    }
    /// <p>The status to be set on all the objects specified in <code>objectIds</code>. For components, use <code>PAUSE</code> or <code>RESUME</code>. For instances, use <code>TRY_CANCEL</code>, <code>RERUN</code>, or <code>MARK_FINISHED</code>.</p>
    pub fn status(mut self, input: impl Into<std::string::String>) -> Self {
        self.status = Some(input.into());
        self
    }
    /// <p>The status to be set on all the objects specified in <code>objectIds</code>. For components, use <code>PAUSE</code> or <code>RESUME</code>. For instances, use <code>TRY_CANCEL</code>, <code>RERUN</code>, or <code>MARK_FINISHED</code>.</p>
    pub fn set_status(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.status = input;
        self
    }
    /// Consumes the builder and constructs a [`SetStatusInput`](crate::operation::set_status::SetStatusInput).
    pub fn build(
        self,
    ) -> Result<
        crate::operation::set_status::SetStatusInput,
        aws_smithy_http::operation::error::BuildError,
    > {
        Ok(crate::operation::set_status::SetStatusInput {
            pipeline_id: self.pipeline_id,
            object_ids: self.object_ids,
            status: self.status,
        })
    }
}