aws_sdk_proton/operation/get_deployment/
_get_deployment_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct GetDeploymentInput {
6 pub id: ::std::option::Option<::std::string::String>,
8 pub environment_name: ::std::option::Option<::std::string::String>,
10 pub service_name: ::std::option::Option<::std::string::String>,
12 pub service_instance_name: ::std::option::Option<::std::string::String>,
14 pub component_name: ::std::option::Option<::std::string::String>,
16}
17impl GetDeploymentInput {
18 pub fn id(&self) -> ::std::option::Option<&str> {
20 self.id.as_deref()
21 }
22 pub fn environment_name(&self) -> ::std::option::Option<&str> {
24 self.environment_name.as_deref()
25 }
26 pub fn service_name(&self) -> ::std::option::Option<&str> {
28 self.service_name.as_deref()
29 }
30 pub fn service_instance_name(&self) -> ::std::option::Option<&str> {
32 self.service_instance_name.as_deref()
33 }
34 pub fn component_name(&self) -> ::std::option::Option<&str> {
36 self.component_name.as_deref()
37 }
38}
39impl GetDeploymentInput {
40 pub fn builder() -> crate::operation::get_deployment::builders::GetDeploymentInputBuilder {
42 crate::operation::get_deployment::builders::GetDeploymentInputBuilder::default()
43 }
44}
45
46#[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 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 pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
65 self.id = input;
66 self
67 }
68 pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
70 &self.id
71 }
72 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 pub fn set_environment_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
79 self.environment_name = input;
80 self
81 }
82 pub fn get_environment_name(&self) -> &::std::option::Option<::std::string::String> {
84 &self.environment_name
85 }
86 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 pub fn set_service_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
93 self.service_name = input;
94 self
95 }
96 pub fn get_service_name(&self) -> &::std::option::Option<::std::string::String> {
98 &self.service_name
99 }
100 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 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 pub fn get_service_instance_name(&self) -> &::std::option::Option<::std::string::String> {
112 &self.service_instance_name
113 }
114 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 pub fn set_component_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
121 self.component_name = input;
122 self
123 }
124 pub fn get_component_name(&self) -> &::std::option::Option<::std::string::String> {
126 &self.component_name
127 }
128 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}