aws_sdk_appconfig/operation/get_deployment/
_get_deployment_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct GetDeploymentInput {
6    /// <p>The ID of the application that includes the deployment you want to get.</p>
7    pub application_id: ::std::option::Option<::std::string::String>,
8    /// <p>The ID of the environment that includes the deployment you want to get.</p>
9    pub environment_id: ::std::option::Option<::std::string::String>,
10    /// <p>The sequence number of the deployment.</p>
11    pub deployment_number: ::std::option::Option<i32>,
12}
13impl GetDeploymentInput {
14    /// <p>The ID of the application that includes the deployment you want to get.</p>
15    pub fn application_id(&self) -> ::std::option::Option<&str> {
16        self.application_id.as_deref()
17    }
18    /// <p>The ID of the environment that includes the deployment you want to get.</p>
19    pub fn environment_id(&self) -> ::std::option::Option<&str> {
20        self.environment_id.as_deref()
21    }
22    /// <p>The sequence number of the deployment.</p>
23    pub fn deployment_number(&self) -> ::std::option::Option<i32> {
24        self.deployment_number
25    }
26}
27impl GetDeploymentInput {
28    /// Creates a new builder-style object to manufacture [`GetDeploymentInput`](crate::operation::get_deployment::GetDeploymentInput).
29    pub fn builder() -> crate::operation::get_deployment::builders::GetDeploymentInputBuilder {
30        crate::operation::get_deployment::builders::GetDeploymentInputBuilder::default()
31    }
32}
33
34/// A builder for [`GetDeploymentInput`](crate::operation::get_deployment::GetDeploymentInput).
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
36#[non_exhaustive]
37pub struct GetDeploymentInputBuilder {
38    pub(crate) application_id: ::std::option::Option<::std::string::String>,
39    pub(crate) environment_id: ::std::option::Option<::std::string::String>,
40    pub(crate) deployment_number: ::std::option::Option<i32>,
41}
42impl GetDeploymentInputBuilder {
43    /// <p>The ID of the application that includes the deployment you want to get.</p>
44    /// This field is required.
45    pub fn application_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
46        self.application_id = ::std::option::Option::Some(input.into());
47        self
48    }
49    /// <p>The ID of the application that includes the deployment you want to get.</p>
50    pub fn set_application_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
51        self.application_id = input;
52        self
53    }
54    /// <p>The ID of the application that includes the deployment you want to get.</p>
55    pub fn get_application_id(&self) -> &::std::option::Option<::std::string::String> {
56        &self.application_id
57    }
58    /// <p>The ID of the environment that includes the deployment you want to get.</p>
59    /// This field is required.
60    pub fn environment_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
61        self.environment_id = ::std::option::Option::Some(input.into());
62        self
63    }
64    /// <p>The ID of the environment that includes the deployment you want to get.</p>
65    pub fn set_environment_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
66        self.environment_id = input;
67        self
68    }
69    /// <p>The ID of the environment that includes the deployment you want to get.</p>
70    pub fn get_environment_id(&self) -> &::std::option::Option<::std::string::String> {
71        &self.environment_id
72    }
73    /// <p>The sequence number of the deployment.</p>
74    /// This field is required.
75    pub fn deployment_number(mut self, input: i32) -> Self {
76        self.deployment_number = ::std::option::Option::Some(input);
77        self
78    }
79    /// <p>The sequence number of the deployment.</p>
80    pub fn set_deployment_number(mut self, input: ::std::option::Option<i32>) -> Self {
81        self.deployment_number = input;
82        self
83    }
84    /// <p>The sequence number of the deployment.</p>
85    pub fn get_deployment_number(&self) -> &::std::option::Option<i32> {
86        &self.deployment_number
87    }
88    /// Consumes the builder and constructs a [`GetDeploymentInput`](crate::operation::get_deployment::GetDeploymentInput).
89    pub fn build(
90        self,
91    ) -> ::std::result::Result<crate::operation::get_deployment::GetDeploymentInput, ::aws_smithy_types::error::operation::BuildError> {
92        ::std::result::Result::Ok(crate::operation::get_deployment::GetDeploymentInput {
93            application_id: self.application_id,
94            environment_id: self.environment_id,
95            deployment_number: self.deployment_number,
96        })
97    }
98}