aws_sdk_datapipeline/operation/activate_pipeline/
_activate_pipeline_input.rs

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
100
101
102
103
104
105
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Contains the parameters for ActivatePipeline.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ActivatePipelineInput {
    /// <p>The ID of the pipeline.</p>
    pub pipeline_id: ::std::option::Option<::std::string::String>,
    /// <p>A list of parameter values to pass to the pipeline at activation.</p>
    pub parameter_values: ::std::option::Option<::std::vec::Vec<crate::types::ParameterValue>>,
    /// <p>The date and time to resume the pipeline. By default, the pipeline resumes from the last completed execution.</p>
    pub start_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
}
impl ActivatePipelineInput {
    /// <p>The ID of the pipeline.</p>
    pub fn pipeline_id(&self) -> ::std::option::Option<&str> {
        self.pipeline_id.as_deref()
    }
    /// <p>A list of parameter values to pass to the pipeline at activation.</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 `.parameter_values.is_none()`.
    pub fn parameter_values(&self) -> &[crate::types::ParameterValue] {
        self.parameter_values.as_deref().unwrap_or_default()
    }
    /// <p>The date and time to resume the pipeline. By default, the pipeline resumes from the last completed execution.</p>
    pub fn start_timestamp(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.start_timestamp.as_ref()
    }
}
impl ActivatePipelineInput {
    /// Creates a new builder-style object to manufacture [`ActivatePipelineInput`](crate::operation::activate_pipeline::ActivatePipelineInput).
    pub fn builder() -> crate::operation::activate_pipeline::builders::ActivatePipelineInputBuilder {
        crate::operation::activate_pipeline::builders::ActivatePipelineInputBuilder::default()
    }
}

/// A builder for [`ActivatePipelineInput`](crate::operation::activate_pipeline::ActivatePipelineInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ActivatePipelineInputBuilder {
    pub(crate) pipeline_id: ::std::option::Option<::std::string::String>,
    pub(crate) parameter_values: ::std::option::Option<::std::vec::Vec<crate::types::ParameterValue>>,
    pub(crate) start_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
}
impl ActivatePipelineInputBuilder {
    /// <p>The ID of the pipeline.</p>
    /// This field is required.
    pub fn pipeline_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.pipeline_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the pipeline.</p>
    pub fn set_pipeline_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.pipeline_id = input;
        self
    }
    /// <p>The ID of the pipeline.</p>
    pub fn get_pipeline_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.pipeline_id
    }
    /// Appends an item to `parameter_values`.
    ///
    /// To override the contents of this collection use [`set_parameter_values`](Self::set_parameter_values).
    ///
    /// <p>A list of parameter values to pass to the pipeline at activation.</p>
    pub fn parameter_values(mut self, input: crate::types::ParameterValue) -> Self {
        let mut v = self.parameter_values.unwrap_or_default();
        v.push(input);
        self.parameter_values = ::std::option::Option::Some(v);
        self
    }
    /// <p>A list of parameter values to pass to the pipeline at activation.</p>
    pub fn set_parameter_values(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ParameterValue>>) -> Self {
        self.parameter_values = input;
        self
    }
    /// <p>A list of parameter values to pass to the pipeline at activation.</p>
    pub fn get_parameter_values(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ParameterValue>> {
        &self.parameter_values
    }
    /// <p>The date and time to resume the pipeline. By default, the pipeline resumes from the last completed execution.</p>
    pub fn start_timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.start_timestamp = ::std::option::Option::Some(input);
        self
    }
    /// <p>The date and time to resume the pipeline. By default, the pipeline resumes from the last completed execution.</p>
    pub fn set_start_timestamp(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.start_timestamp = input;
        self
    }
    /// <p>The date and time to resume the pipeline. By default, the pipeline resumes from the last completed execution.</p>
    pub fn get_start_timestamp(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.start_timestamp
    }
    /// Consumes the builder and constructs a [`ActivatePipelineInput`](crate::operation::activate_pipeline::ActivatePipelineInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::activate_pipeline::ActivatePipelineInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::activate_pipeline::ActivatePipelineInput {
            pipeline_id: self.pipeline_id,
            parameter_values: self.parameter_values,
            start_timestamp: self.start_timestamp,
        })
    }
}