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