aws_sdk_codepipeline/operation/update_pipeline/
_update_pipeline_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Represents the input of an <code>UpdatePipeline</code> action.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct UpdatePipelineInput {
7    /// <p>The name of the pipeline to be updated.</p>
8    pub pipeline: ::std::option::Option<crate::types::PipelineDeclaration>,
9}
10impl UpdatePipelineInput {
11    /// <p>The name of the pipeline to be updated.</p>
12    pub fn pipeline(&self) -> ::std::option::Option<&crate::types::PipelineDeclaration> {
13        self.pipeline.as_ref()
14    }
15}
16impl UpdatePipelineInput {
17    /// Creates a new builder-style object to manufacture [`UpdatePipelineInput`](crate::operation::update_pipeline::UpdatePipelineInput).
18    pub fn builder() -> crate::operation::update_pipeline::builders::UpdatePipelineInputBuilder {
19        crate::operation::update_pipeline::builders::UpdatePipelineInputBuilder::default()
20    }
21}
22
23/// A builder for [`UpdatePipelineInput`](crate::operation::update_pipeline::UpdatePipelineInput).
24#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
25#[non_exhaustive]
26pub struct UpdatePipelineInputBuilder {
27    pub(crate) pipeline: ::std::option::Option<crate::types::PipelineDeclaration>,
28}
29impl UpdatePipelineInputBuilder {
30    /// <p>The name of the pipeline to be updated.</p>
31    /// This field is required.
32    pub fn pipeline(mut self, input: crate::types::PipelineDeclaration) -> Self {
33        self.pipeline = ::std::option::Option::Some(input);
34        self
35    }
36    /// <p>The name of the pipeline to be updated.</p>
37    pub fn set_pipeline(mut self, input: ::std::option::Option<crate::types::PipelineDeclaration>) -> Self {
38        self.pipeline = input;
39        self
40    }
41    /// <p>The name of the pipeline to be updated.</p>
42    pub fn get_pipeline(&self) -> &::std::option::Option<crate::types::PipelineDeclaration> {
43        &self.pipeline
44    }
45    /// Consumes the builder and constructs a [`UpdatePipelineInput`](crate::operation::update_pipeline::UpdatePipelineInput).
46    pub fn build(
47        self,
48    ) -> ::std::result::Result<crate::operation::update_pipeline::UpdatePipelineInput, ::aws_smithy_types::error::operation::BuildError> {
49        ::std::result::Result::Ok(crate::operation::update_pipeline::UpdatePipelineInput { pipeline: self.pipeline })
50    }
51}