aws_sdk_codepipeline/operation/get_pipeline/
_get_pipeline_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Represents the output of a <code>GetPipeline</code> action.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct GetPipelineOutput {
7    /// <p>Represents the structure of actions and stages to be performed in the pipeline.</p>
8    pub pipeline: ::std::option::Option<crate::types::PipelineDeclaration>,
9    /// <p>Represents the pipeline metadata information returned as part of the output of a <code>GetPipeline</code> action.</p>
10    pub metadata: ::std::option::Option<crate::types::PipelineMetadata>,
11    _request_id: Option<String>,
12}
13impl GetPipelineOutput {
14    /// <p>Represents the structure of actions and stages to be performed in the pipeline.</p>
15    pub fn pipeline(&self) -> ::std::option::Option<&crate::types::PipelineDeclaration> {
16        self.pipeline.as_ref()
17    }
18    /// <p>Represents the pipeline metadata information returned as part of the output of a <code>GetPipeline</code> action.</p>
19    pub fn metadata(&self) -> ::std::option::Option<&crate::types::PipelineMetadata> {
20        self.metadata.as_ref()
21    }
22}
23impl ::aws_types::request_id::RequestId for GetPipelineOutput {
24    fn request_id(&self) -> Option<&str> {
25        self._request_id.as_deref()
26    }
27}
28impl GetPipelineOutput {
29    /// Creates a new builder-style object to manufacture [`GetPipelineOutput`](crate::operation::get_pipeline::GetPipelineOutput).
30    pub fn builder() -> crate::operation::get_pipeline::builders::GetPipelineOutputBuilder {
31        crate::operation::get_pipeline::builders::GetPipelineOutputBuilder::default()
32    }
33}
34
35/// A builder for [`GetPipelineOutput`](crate::operation::get_pipeline::GetPipelineOutput).
36#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
37#[non_exhaustive]
38pub struct GetPipelineOutputBuilder {
39    pub(crate) pipeline: ::std::option::Option<crate::types::PipelineDeclaration>,
40    pub(crate) metadata: ::std::option::Option<crate::types::PipelineMetadata>,
41    _request_id: Option<String>,
42}
43impl GetPipelineOutputBuilder {
44    /// <p>Represents the structure of actions and stages to be performed in the pipeline.</p>
45    pub fn pipeline(mut self, input: crate::types::PipelineDeclaration) -> Self {
46        self.pipeline = ::std::option::Option::Some(input);
47        self
48    }
49    /// <p>Represents the structure of actions and stages to be performed in the pipeline.</p>
50    pub fn set_pipeline(mut self, input: ::std::option::Option<crate::types::PipelineDeclaration>) -> Self {
51        self.pipeline = input;
52        self
53    }
54    /// <p>Represents the structure of actions and stages to be performed in the pipeline.</p>
55    pub fn get_pipeline(&self) -> &::std::option::Option<crate::types::PipelineDeclaration> {
56        &self.pipeline
57    }
58    /// <p>Represents the pipeline metadata information returned as part of the output of a <code>GetPipeline</code> action.</p>
59    pub fn metadata(mut self, input: crate::types::PipelineMetadata) -> Self {
60        self.metadata = ::std::option::Option::Some(input);
61        self
62    }
63    /// <p>Represents the pipeline metadata information returned as part of the output of a <code>GetPipeline</code> action.</p>
64    pub fn set_metadata(mut self, input: ::std::option::Option<crate::types::PipelineMetadata>) -> Self {
65        self.metadata = input;
66        self
67    }
68    /// <p>Represents the pipeline metadata information returned as part of the output of a <code>GetPipeline</code> action.</p>
69    pub fn get_metadata(&self) -> &::std::option::Option<crate::types::PipelineMetadata> {
70        &self.metadata
71    }
72    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
73        self._request_id = Some(request_id.into());
74        self
75    }
76
77    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
78        self._request_id = request_id;
79        self
80    }
81    /// Consumes the builder and constructs a [`GetPipelineOutput`](crate::operation::get_pipeline::GetPipelineOutput).
82    pub fn build(self) -> crate::operation::get_pipeline::GetPipelineOutput {
83        crate::operation::get_pipeline::GetPipelineOutput {
84            pipeline: self.pipeline,
85            metadata: self.metadata,
86            _request_id: self._request_id,
87        }
88    }
89}