aws_sdk_apigatewayv2/operation/update_deployment/
_update_deployment_input.rs

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