#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateRouteResponseInput {
pub api_id: ::std::option::Option<::std::string::String>,
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_id: ::std::option::Option<::std::string::String>,
pub route_response_key: ::std::option::Option<::std::string::String>,
}
impl CreateRouteResponseInput {
pub fn api_id(&self) -> ::std::option::Option<&str> {
self.api_id.as_deref()
}
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_id(&self) -> ::std::option::Option<&str> {
self.route_id.as_deref()
}
pub fn route_response_key(&self) -> ::std::option::Option<&str> {
self.route_response_key.as_deref()
}
}
impl CreateRouteResponseInput {
pub fn builder() -> crate::operation::create_route_response::builders::CreateRouteResponseInputBuilder {
crate::operation::create_route_response::builders::CreateRouteResponseInputBuilder::default()
}
}
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct CreateRouteResponseInputBuilder {
pub(crate) api_id: ::std::option::Option<::std::string::String>,
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_id: ::std::option::Option<::std::string::String>,
pub(crate) route_response_key: ::std::option::Option<::std::string::String>,
}
impl CreateRouteResponseInputBuilder {
pub fn api_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.api_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_api_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.api_id = input;
self
}
pub fn get_api_id(&self) -> &::std::option::Option<::std::string::String> {
&self.api_id
}
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_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.route_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_route_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.route_id = input;
self
}
pub fn get_route_id(&self) -> &::std::option::Option<::std::string::String> {
&self.route_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 fn build(
self,
) -> ::std::result::Result<crate::operation::create_route_response::CreateRouteResponseInput, ::aws_smithy_types::error::operation::BuildError>
{
::std::result::Result::Ok(crate::operation::create_route_response::CreateRouteResponseInput {
api_id: self.api_id,
model_selection_expression: self.model_selection_expression,
response_models: self.response_models,
response_parameters: self.response_parameters,
route_id: self.route_id,
route_response_key: self.route_response_key,
})
}
}