aws_sdk_apigatewayv2/operation/update_route_response/
_update_route_response_output.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 UpdateRouteResponseOutput {
6    /// <p>Represents the model selection expression of a route response. Supported only for WebSocket APIs.</p>
7    pub model_selection_expression: ::std::option::Option<::std::string::String>,
8    /// <p>Represents the response models of a route response.</p>
9    pub response_models: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
10    /// <p>Represents the response parameters of a route response.</p>
11    pub response_parameters: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::ParameterConstraints>>,
12    /// <p>Represents the identifier of a route response.</p>
13    pub route_response_id: ::std::option::Option<::std::string::String>,
14    /// <p>Represents the route response key of a route response.</p>
15    pub route_response_key: ::std::option::Option<::std::string::String>,
16    _request_id: Option<String>,
17}
18impl UpdateRouteResponseOutput {
19    /// <p>Represents the model selection expression of a route response. Supported only for WebSocket APIs.</p>
20    pub fn model_selection_expression(&self) -> ::std::option::Option<&str> {
21        self.model_selection_expression.as_deref()
22    }
23    /// <p>Represents the response models of a route response.</p>
24    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    /// <p>Represents the response parameters of a route response.</p>
28    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    /// <p>Represents the identifier of a route response.</p>
34    pub fn route_response_id(&self) -> ::std::option::Option<&str> {
35        self.route_response_id.as_deref()
36    }
37    /// <p>Represents the route response key of a route response.</p>
38    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    /// Creates a new builder-style object to manufacture [`UpdateRouteResponseOutput`](crate::operation::update_route_response::UpdateRouteResponseOutput).
49    pub fn builder() -> crate::operation::update_route_response::builders::UpdateRouteResponseOutputBuilder {
50        crate::operation::update_route_response::builders::UpdateRouteResponseOutputBuilder::default()
51    }
52}
53
54/// A builder for [`UpdateRouteResponseOutput`](crate::operation::update_route_response::UpdateRouteResponseOutput).
55#[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    /// <p>Represents the model selection expression of a route response. Supported only for WebSocket APIs.</p>
67    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    /// <p>Represents the model selection expression of a route response. Supported only for WebSocket APIs.</p>
72    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    /// <p>Represents the model selection expression of a route response. Supported only for WebSocket APIs.</p>
77    pub fn get_model_selection_expression(&self) -> &::std::option::Option<::std::string::String> {
78        &self.model_selection_expression
79    }
80    /// Adds a key-value pair to `response_models`.
81    ///
82    /// To override the contents of this collection use [`set_response_models`](Self::set_response_models).
83    ///
84    /// <p>Represents the response models of a route response.</p>
85    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    /// <p>Represents the response models of a route response.</p>
96    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    /// <p>Represents the response models of a route response.</p>
104    pub fn get_response_models(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
105        &self.response_models
106    }
107    /// Adds a key-value pair to `response_parameters`.
108    ///
109    /// To override the contents of this collection use [`set_response_parameters`](Self::set_response_parameters).
110    ///
111    /// <p>Represents the response parameters of a route response.</p>
112    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    /// <p>Represents the response parameters of a route response.</p>
119    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    /// <p>Represents the response parameters of a route response.</p>
127    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    /// <p>Represents the identifier of a route response.</p>
133    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    /// <p>Represents the identifier of a route response.</p>
138    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    /// <p>Represents the identifier of a route response.</p>
143    pub fn get_route_response_id(&self) -> &::std::option::Option<::std::string::String> {
144        &self.route_response_id
145    }
146    /// <p>Represents the route response key of a route response.</p>
147    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    /// <p>Represents the route response key of a route response.</p>
152    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    /// <p>Represents the route response key of a route response.</p>
157    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    /// Consumes the builder and constructs a [`UpdateRouteResponseOutput`](crate::operation::update_route_response::UpdateRouteResponseOutput).
170    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}