#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetRouteResponseOutput {
pub model_selection_expression: ::std::option::Option<::std::string::String>,
pub response_models: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
pub response_parameters: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::ParameterConstraints>>,
pub route_response_id: ::std::option::Option<::std::string::String>,
pub route_response_key: ::std::option::Option<::std::string::String>,
_request_id: Option<String>,
}
impl GetRouteResponseOutput {
pub fn model_selection_expression(&self) -> ::std::option::Option<&str> {
self.model_selection_expression.as_deref()
}
pub fn response_models(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
self.response_models.as_ref()
}
pub fn response_parameters(
&self,
) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, crate::types::ParameterConstraints>> {
self.response_parameters.as_ref()
}
pub fn route_response_id(&self) -> ::std::option::Option<&str> {
self.route_response_id.as_deref()
}
pub fn route_response_key(&self) -> ::std::option::Option<&str> {
self.route_response_key.as_deref()
}
}
impl ::aws_types::request_id::RequestId for GetRouteResponseOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl GetRouteResponseOutput {
pub fn builder() -> crate::operation::get_route_response::builders::GetRouteResponseOutputBuilder {
crate::operation::get_route_response::builders::GetRouteResponseOutputBuilder::default()
}
}
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct GetRouteResponseOutputBuilder {
pub(crate) model_selection_expression: ::std::option::Option<::std::string::String>,
pub(crate) response_models: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
pub(crate) response_parameters: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::ParameterConstraints>>,
pub(crate) route_response_id: ::std::option::Option<::std::string::String>,
pub(crate) route_response_key: ::std::option::Option<::std::string::String>,
_request_id: Option<String>,
}
impl GetRouteResponseOutputBuilder {
pub fn model_selection_expression(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.model_selection_expression = ::std::option::Option::Some(input.into());
self
}
pub fn set_model_selection_expression(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.model_selection_expression = input;
self
}
pub fn get_model_selection_expression(&self) -> &::std::option::Option<::std::string::String> {
&self.model_selection_expression
}
pub fn response_models(
mut self,
k: impl ::std::convert::Into<::std::string::String>,
v: impl ::std::convert::Into<::std::string::String>,
) -> Self {
let mut hash_map = self.response_models.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.response_models = ::std::option::Option::Some(hash_map);
self
}
pub fn set_response_models(
mut self,
input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
) -> Self {
self.response_models = input;
self
}
pub fn get_response_models(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
&self.response_models
}
pub fn response_parameters(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::ParameterConstraints) -> Self {
let mut hash_map = self.response_parameters.unwrap_or_default();
hash_map.insert(k.into(), v);
self.response_parameters = ::std::option::Option::Some(hash_map);
self
}
pub fn set_response_parameters(
mut self,
input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::ParameterConstraints>>,
) -> Self {
self.response_parameters = input;
self
}
pub fn get_response_parameters(
&self,
) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::ParameterConstraints>> {
&self.response_parameters
}
pub fn route_response_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.route_response_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_route_response_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.route_response_id = input;
self
}
pub fn get_route_response_id(&self) -> &::std::option::Option<::std::string::String> {
&self.route_response_id
}
pub fn route_response_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.route_response_key = ::std::option::Option::Some(input.into());
self
}
pub fn set_route_response_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.route_response_key = input;
self
}
pub fn get_route_response_key(&self) -> &::std::option::Option<::std::string::String> {
&self.route_response_key
}
pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
self._request_id = Some(request_id.into());
self
}
pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
self._request_id = request_id;
self
}
pub fn build(self) -> crate::operation::get_route_response::GetRouteResponseOutput {
crate::operation::get_route_response::GetRouteResponseOutput {
model_selection_expression: self.model_selection_expression,
response_models: self.response_models,
response_parameters: self.response_parameters,
route_response_id: self.route_response_id,
route_response_key: self.route_response_key,
_request_id: self._request_id,
}
}
}