aws_sdk_datapipeline/operation/activate_pipeline/
_activate_pipeline_input.rs#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ActivatePipelineInput {
pub pipeline_id: ::std::option::Option<::std::string::String>,
pub parameter_values: ::std::option::Option<::std::vec::Vec<crate::types::ParameterValue>>,
pub start_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
}
impl ActivatePipelineInput {
pub fn pipeline_id(&self) -> ::std::option::Option<&str> {
self.pipeline_id.as_deref()
}
pub fn parameter_values(&self) -> &[crate::types::ParameterValue] {
self.parameter_values.as_deref().unwrap_or_default()
}
pub fn start_timestamp(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.start_timestamp.as_ref()
}
}
impl ActivatePipelineInput {
pub fn builder() -> crate::operation::activate_pipeline::builders::ActivatePipelineInputBuilder {
crate::operation::activate_pipeline::builders::ActivatePipelineInputBuilder::default()
}
}
#[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 {
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
}
pub fn set_pipeline_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.pipeline_id = input;
self
}
pub fn get_pipeline_id(&self) -> &::std::option::Option<::std::string::String> {
&self.pipeline_id
}
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
}
pub fn set_parameter_values(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ParameterValue>>) -> Self {
self.parameter_values = input;
self
}
pub fn get_parameter_values(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ParameterValue>> {
&self.parameter_values
}
pub fn start_timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.start_timestamp = ::std::option::Option::Some(input);
self
}
pub fn set_start_timestamp(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.start_timestamp = input;
self
}
pub fn get_start_timestamp(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.start_timestamp
}
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,
})
}
}