aws_sdk_codepipeline/operation/get_pipeline/_get_pipeline_input.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Represents the input of a <code>GetPipeline</code> action.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct GetPipelineInput {
7 /// <p>The name of the pipeline for which you want to get information. Pipeline names must be unique in an Amazon Web Services account.</p>
8 pub name: ::std::option::Option<::std::string::String>,
9 /// <p>The version number of the pipeline. If you do not specify a version, defaults to the current version.</p>
10 pub version: ::std::option::Option<i32>,
11}
12impl GetPipelineInput {
13 /// <p>The name of the pipeline for which you want to get information. Pipeline names must be unique in an Amazon Web Services account.</p>
14 pub fn name(&self) -> ::std::option::Option<&str> {
15 self.name.as_deref()
16 }
17 /// <p>The version number of the pipeline. If you do not specify a version, defaults to the current version.</p>
18 pub fn version(&self) -> ::std::option::Option<i32> {
19 self.version
20 }
21}
22impl GetPipelineInput {
23 /// Creates a new builder-style object to manufacture [`GetPipelineInput`](crate::operation::get_pipeline::GetPipelineInput).
24 pub fn builder() -> crate::operation::get_pipeline::builders::GetPipelineInputBuilder {
25 crate::operation::get_pipeline::builders::GetPipelineInputBuilder::default()
26 }
27}
28
29/// A builder for [`GetPipelineInput`](crate::operation::get_pipeline::GetPipelineInput).
30#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
31#[non_exhaustive]
32pub struct GetPipelineInputBuilder {
33 pub(crate) name: ::std::option::Option<::std::string::String>,
34 pub(crate) version: ::std::option::Option<i32>,
35}
36impl GetPipelineInputBuilder {
37 /// <p>The name of the pipeline for which you want to get information. Pipeline names must be unique in an Amazon Web Services account.</p>
38 /// This field is required.
39 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
40 self.name = ::std::option::Option::Some(input.into());
41 self
42 }
43 /// <p>The name of the pipeline for which you want to get information. Pipeline names must be unique in an Amazon Web Services account.</p>
44 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
45 self.name = input;
46 self
47 }
48 /// <p>The name of the pipeline for which you want to get information. Pipeline names must be unique in an Amazon Web Services account.</p>
49 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
50 &self.name
51 }
52 /// <p>The version number of the pipeline. If you do not specify a version, defaults to the current version.</p>
53 pub fn version(mut self, input: i32) -> Self {
54 self.version = ::std::option::Option::Some(input);
55 self
56 }
57 /// <p>The version number of the pipeline. If you do not specify a version, defaults to the current version.</p>
58 pub fn set_version(mut self, input: ::std::option::Option<i32>) -> Self {
59 self.version = input;
60 self
61 }
62 /// <p>The version number of the pipeline. If you do not specify a version, defaults to the current version.</p>
63 pub fn get_version(&self) -> &::std::option::Option<i32> {
64 &self.version
65 }
66 /// Consumes the builder and constructs a [`GetPipelineInput`](crate::operation::get_pipeline::GetPipelineInput).
67 pub fn build(self) -> ::std::result::Result<crate::operation::get_pipeline::GetPipelineInput, ::aws_smithy_types::error::operation::BuildError> {
68 ::std::result::Result::Ok(crate::operation::get_pipeline::GetPipelineInput {
69 name: self.name,
70 version: self.version,
71 })
72 }
73}