#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct PutPipelineDefinitionInput {
pub pipeline_id: ::std::option::Option<::std::string::String>,
pub pipeline_objects: ::std::option::Option<::std::vec::Vec<crate::types::PipelineObject>>,
pub parameter_objects: ::std::option::Option<::std::vec::Vec<crate::types::ParameterObject>>,
pub parameter_values: ::std::option::Option<::std::vec::Vec<crate::types::ParameterValue>>,
}
impl PutPipelineDefinitionInput {
pub fn pipeline_id(&self) -> ::std::option::Option<&str> {
self.pipeline_id.as_deref()
}
pub fn pipeline_objects(&self) -> &[crate::types::PipelineObject] {
self.pipeline_objects.as_deref().unwrap_or_default()
}
pub fn parameter_objects(&self) -> &[crate::types::ParameterObject] {
self.parameter_objects.as_deref().unwrap_or_default()
}
pub fn parameter_values(&self) -> &[crate::types::ParameterValue] {
self.parameter_values.as_deref().unwrap_or_default()
}
}
impl PutPipelineDefinitionInput {
pub fn builder() -> crate::operation::put_pipeline_definition::builders::PutPipelineDefinitionInputBuilder {
crate::operation::put_pipeline_definition::builders::PutPipelineDefinitionInputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct PutPipelineDefinitionInputBuilder {
pub(crate) pipeline_id: ::std::option::Option<::std::string::String>,
pub(crate) pipeline_objects: ::std::option::Option<::std::vec::Vec<crate::types::PipelineObject>>,
pub(crate) parameter_objects: ::std::option::Option<::std::vec::Vec<crate::types::ParameterObject>>,
pub(crate) parameter_values: ::std::option::Option<::std::vec::Vec<crate::types::ParameterValue>>,
}
impl PutPipelineDefinitionInputBuilder {
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 pipeline_objects(mut self, input: crate::types::PipelineObject) -> Self {
let mut v = self.pipeline_objects.unwrap_or_default();
v.push(input);
self.pipeline_objects = ::std::option::Option::Some(v);
self
}
pub fn set_pipeline_objects(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::PipelineObject>>) -> Self {
self.pipeline_objects = input;
self
}
pub fn get_pipeline_objects(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::PipelineObject>> {
&self.pipeline_objects
}
pub fn parameter_objects(mut self, input: crate::types::ParameterObject) -> Self {
let mut v = self.parameter_objects.unwrap_or_default();
v.push(input);
self.parameter_objects = ::std::option::Option::Some(v);
self
}
pub fn set_parameter_objects(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ParameterObject>>) -> Self {
self.parameter_objects = input;
self
}
pub fn get_parameter_objects(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ParameterObject>> {
&self.parameter_objects
}
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 build(
self,
) -> ::std::result::Result<crate::operation::put_pipeline_definition::PutPipelineDefinitionInput, ::aws_smithy_types::error::operation::BuildError>
{
::std::result::Result::Ok(crate::operation::put_pipeline_definition::PutPipelineDefinitionInput {
pipeline_id: self.pipeline_id,
pipeline_objects: self.pipeline_objects,
parameter_objects: self.parameter_objects,
parameter_values: self.parameter_values,
})
}
}