aws_sdk_apigatewayv2/operation/update_route_response/
_update_route_response_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct UpdateRouteResponseOutput {
6 pub model_selection_expression: ::std::option::Option<::std::string::String>,
8 pub response_models: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
10 pub response_parameters: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::ParameterConstraints>>,
12 pub route_response_id: ::std::option::Option<::std::string::String>,
14 pub route_response_key: ::std::option::Option<::std::string::String>,
16 _request_id: Option<String>,
17}
18impl UpdateRouteResponseOutput {
19 pub fn model_selection_expression(&self) -> ::std::option::Option<&str> {
21 self.model_selection_expression.as_deref()
22 }
23 pub fn response_models(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
25 self.response_models.as_ref()
26 }
27 pub fn response_parameters(
29 &self,
30 ) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, crate::types::ParameterConstraints>> {
31 self.response_parameters.as_ref()
32 }
33 pub fn route_response_id(&self) -> ::std::option::Option<&str> {
35 self.route_response_id.as_deref()
36 }
37 pub fn route_response_key(&self) -> ::std::option::Option<&str> {
39 self.route_response_key.as_deref()
40 }
41}
42impl ::aws_types::request_id::RequestId for UpdateRouteResponseOutput {
43 fn request_id(&self) -> Option<&str> {
44 self._request_id.as_deref()
45 }
46}
47impl UpdateRouteResponseOutput {
48 pub fn builder() -> crate::operation::update_route_response::builders::UpdateRouteResponseOutputBuilder {
50 crate::operation::update_route_response::builders::UpdateRouteResponseOutputBuilder::default()
51 }
52}
53
54#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
56#[non_exhaustive]
57pub struct UpdateRouteResponseOutputBuilder {
58 pub(crate) model_selection_expression: ::std::option::Option<::std::string::String>,
59 pub(crate) response_models: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
60 pub(crate) response_parameters: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::ParameterConstraints>>,
61 pub(crate) route_response_id: ::std::option::Option<::std::string::String>,
62 pub(crate) route_response_key: ::std::option::Option<::std::string::String>,
63 _request_id: Option<String>,
64}
65impl UpdateRouteResponseOutputBuilder {
66 pub fn model_selection_expression(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
68 self.model_selection_expression = ::std::option::Option::Some(input.into());
69 self
70 }
71 pub fn set_model_selection_expression(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
73 self.model_selection_expression = input;
74 self
75 }
76 pub fn get_model_selection_expression(&self) -> &::std::option::Option<::std::string::String> {
78 &self.model_selection_expression
79 }
80 pub fn response_models(
86 mut self,
87 k: impl ::std::convert::Into<::std::string::String>,
88 v: impl ::std::convert::Into<::std::string::String>,
89 ) -> Self {
90 let mut hash_map = self.response_models.unwrap_or_default();
91 hash_map.insert(k.into(), v.into());
92 self.response_models = ::std::option::Option::Some(hash_map);
93 self
94 }
95 pub fn set_response_models(
97 mut self,
98 input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
99 ) -> Self {
100 self.response_models = input;
101 self
102 }
103 pub fn get_response_models(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
105 &self.response_models
106 }
107 pub fn response_parameters(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::ParameterConstraints) -> Self {
113 let mut hash_map = self.response_parameters.unwrap_or_default();
114 hash_map.insert(k.into(), v);
115 self.response_parameters = ::std::option::Option::Some(hash_map);
116 self
117 }
118 pub fn set_response_parameters(
120 mut self,
121 input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::ParameterConstraints>>,
122 ) -> Self {
123 self.response_parameters = input;
124 self
125 }
126 pub fn get_response_parameters(
128 &self,
129 ) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::ParameterConstraints>> {
130 &self.response_parameters
131 }
132 pub fn route_response_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
134 self.route_response_id = ::std::option::Option::Some(input.into());
135 self
136 }
137 pub fn set_route_response_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
139 self.route_response_id = input;
140 self
141 }
142 pub fn get_route_response_id(&self) -> &::std::option::Option<::std::string::String> {
144 &self.route_response_id
145 }
146 pub fn route_response_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
148 self.route_response_key = ::std::option::Option::Some(input.into());
149 self
150 }
151 pub fn set_route_response_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
153 self.route_response_key = input;
154 self
155 }
156 pub fn get_route_response_key(&self) -> &::std::option::Option<::std::string::String> {
158 &self.route_response_key
159 }
160 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
161 self._request_id = Some(request_id.into());
162 self
163 }
164
165 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
166 self._request_id = request_id;
167 self
168 }
169 pub fn build(self) -> crate::operation::update_route_response::UpdateRouteResponseOutput {
171 crate::operation::update_route_response::UpdateRouteResponseOutput {
172 model_selection_expression: self.model_selection_expression,
173 response_models: self.response_models,
174 response_parameters: self.response_parameters,
175 route_response_id: self.route_response_id,
176 route_response_key: self.route_response_key,
177 _request_id: self._request_id,
178 }
179 }
180}