aws_sdk_proton/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 deployment that you want to get the detailed data for.</p>
7    pub id: ::std::option::Option<::std::string::String>,
8    /// <p>The name of a environment that you want to get the detailed data for.</p>
9    pub environment_name: ::std::option::Option<::std::string::String>,
10    /// <p>The name of the service associated with the given deployment ID.</p>
11    pub service_name: ::std::option::Option<::std::string::String>,
12    /// <p>The name of the service instance associated with the given deployment ID. <code>serviceName</code> must be specified to identify the service instance.</p>
13    pub service_instance_name: ::std::option::Option<::std::string::String>,
14    /// <p>The name of a component that you want to get the detailed data for.</p>
15    pub component_name: ::std::option::Option<::std::string::String>,
16}
17impl GetDeploymentInput {
18    /// <p>The ID of the deployment that you want to get the detailed data for.</p>
19    pub fn id(&self) -> ::std::option::Option<&str> {
20        self.id.as_deref()
21    }
22    /// <p>The name of a environment that you want to get the detailed data for.</p>
23    pub fn environment_name(&self) -> ::std::option::Option<&str> {
24        self.environment_name.as_deref()
25    }
26    /// <p>The name of the service associated with the given deployment ID.</p>
27    pub fn service_name(&self) -> ::std::option::Option<&str> {
28        self.service_name.as_deref()
29    }
30    /// <p>The name of the service instance associated with the given deployment ID. <code>serviceName</code> must be specified to identify the service instance.</p>
31    pub fn service_instance_name(&self) -> ::std::option::Option<&str> {
32        self.service_instance_name.as_deref()
33    }
34    /// <p>The name of a component that you want to get the detailed data for.</p>
35    pub fn component_name(&self) -> ::std::option::Option<&str> {
36        self.component_name.as_deref()
37    }
38}
39impl GetDeploymentInput {
40    /// Creates a new builder-style object to manufacture [`GetDeploymentInput`](crate::operation::get_deployment::GetDeploymentInput).
41    pub fn builder() -> crate::operation::get_deployment::builders::GetDeploymentInputBuilder {
42        crate::operation::get_deployment::builders::GetDeploymentInputBuilder::default()
43    }
44}
45
46/// A builder for [`GetDeploymentInput`](crate::operation::get_deployment::GetDeploymentInput).
47#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
48#[non_exhaustive]
49pub struct GetDeploymentInputBuilder {
50    pub(crate) id: ::std::option::Option<::std::string::String>,
51    pub(crate) environment_name: ::std::option::Option<::std::string::String>,
52    pub(crate) service_name: ::std::option::Option<::std::string::String>,
53    pub(crate) service_instance_name: ::std::option::Option<::std::string::String>,
54    pub(crate) component_name: ::std::option::Option<::std::string::String>,
55}
56impl GetDeploymentInputBuilder {
57    /// <p>The ID of the deployment that you want to get the detailed data for.</p>
58    /// This field is required.
59    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
60        self.id = ::std::option::Option::Some(input.into());
61        self
62    }
63    /// <p>The ID of the deployment that you want to get the detailed data for.</p>
64    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
65        self.id = input;
66        self
67    }
68    /// <p>The ID of the deployment that you want to get the detailed data for.</p>
69    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
70        &self.id
71    }
72    /// <p>The name of a environment that you want to get the detailed data for.</p>
73    pub fn environment_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
74        self.environment_name = ::std::option::Option::Some(input.into());
75        self
76    }
77    /// <p>The name of a environment that you want to get the detailed data for.</p>
78    pub fn set_environment_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
79        self.environment_name = input;
80        self
81    }
82    /// <p>The name of a environment that you want to get the detailed data for.</p>
83    pub fn get_environment_name(&self) -> &::std::option::Option<::std::string::String> {
84        &self.environment_name
85    }
86    /// <p>The name of the service associated with the given deployment ID.</p>
87    pub fn service_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
88        self.service_name = ::std::option::Option::Some(input.into());
89        self
90    }
91    /// <p>The name of the service associated with the given deployment ID.</p>
92    pub fn set_service_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
93        self.service_name = input;
94        self
95    }
96    /// <p>The name of the service associated with the given deployment ID.</p>
97    pub fn get_service_name(&self) -> &::std::option::Option<::std::string::String> {
98        &self.service_name
99    }
100    /// <p>The name of the service instance associated with the given deployment ID. <code>serviceName</code> must be specified to identify the service instance.</p>
101    pub fn service_instance_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
102        self.service_instance_name = ::std::option::Option::Some(input.into());
103        self
104    }
105    /// <p>The name of the service instance associated with the given deployment ID. <code>serviceName</code> must be specified to identify the service instance.</p>
106    pub fn set_service_instance_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
107        self.service_instance_name = input;
108        self
109    }
110    /// <p>The name of the service instance associated with the given deployment ID. <code>serviceName</code> must be specified to identify the service instance.</p>
111    pub fn get_service_instance_name(&self) -> &::std::option::Option<::std::string::String> {
112        &self.service_instance_name
113    }
114    /// <p>The name of a component that you want to get the detailed data for.</p>
115    pub fn component_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
116        self.component_name = ::std::option::Option::Some(input.into());
117        self
118    }
119    /// <p>The name of a component that you want to get the detailed data for.</p>
120    pub fn set_component_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
121        self.component_name = input;
122        self
123    }
124    /// <p>The name of a component that you want to get the detailed data for.</p>
125    pub fn get_component_name(&self) -> &::std::option::Option<::std::string::String> {
126        &self.component_name
127    }
128    /// Consumes the builder and constructs a [`GetDeploymentInput`](crate::operation::get_deployment::GetDeploymentInput).
129    pub fn build(
130        self,
131    ) -> ::std::result::Result<crate::operation::get_deployment::GetDeploymentInput, ::aws_smithy_types::error::operation::BuildError> {
132        ::std::result::Result::Ok(crate::operation::get_deployment::GetDeploymentInput {
133            id: self.id,
134            environment_name: self.environment_name,
135            service_name: self.service_name,
136            service_instance_name: self.service_instance_name,
137            component_name: self.component_name,
138        })
139    }
140}