aws_sdk_datapipeline/operation/deactivate_pipeline/
_deactivate_pipeline_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Contains the parameters for DeactivatePipeline.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct DeactivatePipelineInput {
7    /// <p>The ID of the pipeline.</p>
8    pub pipeline_id: ::std::option::Option<::std::string::String>,
9    /// <p>Indicates whether to cancel any running objects. The default is true, which sets the state of any running objects to <code>CANCELED</code>. If this value is false, the pipeline is deactivated after all running objects finish.</p>
10    pub cancel_active: ::std::option::Option<bool>,
11}
12impl DeactivatePipelineInput {
13    /// <p>The ID of the pipeline.</p>
14    pub fn pipeline_id(&self) -> ::std::option::Option<&str> {
15        self.pipeline_id.as_deref()
16    }
17    /// <p>Indicates whether to cancel any running objects. The default is true, which sets the state of any running objects to <code>CANCELED</code>. If this value is false, the pipeline is deactivated after all running objects finish.</p>
18    pub fn cancel_active(&self) -> ::std::option::Option<bool> {
19        self.cancel_active
20    }
21}
22impl DeactivatePipelineInput {
23    /// Creates a new builder-style object to manufacture [`DeactivatePipelineInput`](crate::operation::deactivate_pipeline::DeactivatePipelineInput).
24    pub fn builder() -> crate::operation::deactivate_pipeline::builders::DeactivatePipelineInputBuilder {
25        crate::operation::deactivate_pipeline::builders::DeactivatePipelineInputBuilder::default()
26    }
27}
28
29/// A builder for [`DeactivatePipelineInput`](crate::operation::deactivate_pipeline::DeactivatePipelineInput).
30#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
31#[non_exhaustive]
32pub struct DeactivatePipelineInputBuilder {
33    pub(crate) pipeline_id: ::std::option::Option<::std::string::String>,
34    pub(crate) cancel_active: ::std::option::Option<bool>,
35}
36impl DeactivatePipelineInputBuilder {
37    /// <p>The ID of the pipeline.</p>
38    /// This field is required.
39    pub fn pipeline_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
40        self.pipeline_id = ::std::option::Option::Some(input.into());
41        self
42    }
43    /// <p>The ID of the pipeline.</p>
44    pub fn set_pipeline_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
45        self.pipeline_id = input;
46        self
47    }
48    /// <p>The ID of the pipeline.</p>
49    pub fn get_pipeline_id(&self) -> &::std::option::Option<::std::string::String> {
50        &self.pipeline_id
51    }
52    /// <p>Indicates whether to cancel any running objects. The default is true, which sets the state of any running objects to <code>CANCELED</code>. If this value is false, the pipeline is deactivated after all running objects finish.</p>
53    pub fn cancel_active(mut self, input: bool) -> Self {
54        self.cancel_active = ::std::option::Option::Some(input);
55        self
56    }
57    /// <p>Indicates whether to cancel any running objects. The default is true, which sets the state of any running objects to <code>CANCELED</code>. If this value is false, the pipeline is deactivated after all running objects finish.</p>
58    pub fn set_cancel_active(mut self, input: ::std::option::Option<bool>) -> Self {
59        self.cancel_active = input;
60        self
61    }
62    /// <p>Indicates whether to cancel any running objects. The default is true, which sets the state of any running objects to <code>CANCELED</code>. If this value is false, the pipeline is deactivated after all running objects finish.</p>
63    pub fn get_cancel_active(&self) -> &::std::option::Option<bool> {
64        &self.cancel_active
65    }
66    /// Consumes the builder and constructs a [`DeactivatePipelineInput`](crate::operation::deactivate_pipeline::DeactivatePipelineInput).
67    pub fn build(
68        self,
69    ) -> ::std::result::Result<crate::operation::deactivate_pipeline::DeactivatePipelineInput, ::aws_smithy_types::error::operation::BuildError> {
70        ::std::result::Result::Ok(crate::operation::deactivate_pipeline::DeactivatePipelineInput {
71            pipeline_id: self.pipeline_id,
72            cancel_active: self.cancel_active,
73        })
74    }
75}