#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateGatewayResponseOutput {
pub response_type: ::std::option::Option<crate::types::GatewayResponseType>,
pub status_code: ::std::option::Option<::std::string::String>,
pub response_parameters: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
pub response_templates: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
pub default_response: bool,
_request_id: Option<String>,
}
impl UpdateGatewayResponseOutput {
pub fn response_type(&self) -> ::std::option::Option<&crate::types::GatewayResponseType> {
self.response_type.as_ref()
}
pub fn status_code(&self) -> ::std::option::Option<&str> {
self.status_code.as_deref()
}
pub fn response_parameters(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
self.response_parameters.as_ref()
}
pub fn response_templates(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
self.response_templates.as_ref()
}
pub fn default_response(&self) -> bool {
self.default_response
}
}
impl ::aws_types::request_id::RequestId for UpdateGatewayResponseOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl UpdateGatewayResponseOutput {
pub fn builder() -> crate::operation::update_gateway_response::builders::UpdateGatewayResponseOutputBuilder {
crate::operation::update_gateway_response::builders::UpdateGatewayResponseOutputBuilder::default()
}
}
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct UpdateGatewayResponseOutputBuilder {
pub(crate) response_type: ::std::option::Option<crate::types::GatewayResponseType>,
pub(crate) status_code: ::std::option::Option<::std::string::String>,
pub(crate) response_parameters: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
pub(crate) response_templates: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
pub(crate) default_response: ::std::option::Option<bool>,
_request_id: Option<String>,
}
impl UpdateGatewayResponseOutputBuilder {
pub fn response_type(mut self, input: crate::types::GatewayResponseType) -> Self {
self.response_type = ::std::option::Option::Some(input);
self
}
pub fn set_response_type(mut self, input: ::std::option::Option<crate::types::GatewayResponseType>) -> Self {
self.response_type = input;
self
}
pub fn get_response_type(&self) -> &::std::option::Option<crate::types::GatewayResponseType> {
&self.response_type
}
pub fn status_code(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.status_code = ::std::option::Option::Some(input.into());
self
}
pub fn set_status_code(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.status_code = input;
self
}
pub fn get_status_code(&self) -> &::std::option::Option<::std::string::String> {
&self.status_code
}
pub fn response_parameters(
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_parameters.unwrap_or_default();
hash_map.insert(k.into(), v.into());
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, ::std::string::String>>,
) -> Self {
self.response_parameters = input;
self
}
pub fn get_response_parameters(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
&self.response_parameters
}
pub fn response_templates(
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_templates.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.response_templates = ::std::option::Option::Some(hash_map);
self
}
pub fn set_response_templates(
mut self,
input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
) -> Self {
self.response_templates = input;
self
}
pub fn get_response_templates(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
&self.response_templates
}
pub fn default_response(mut self, input: bool) -> Self {
self.default_response = ::std::option::Option::Some(input);
self
}
pub fn set_default_response(mut self, input: ::std::option::Option<bool>) -> Self {
self.default_response = input;
self
}
pub fn get_default_response(&self) -> &::std::option::Option<bool> {
&self.default_response
}
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::update_gateway_response::UpdateGatewayResponseOutput {
crate::operation::update_gateway_response::UpdateGatewayResponseOutput {
response_type: self.response_type,
status_code: self.status_code,
response_parameters: self.response_parameters,
response_templates: self.response_templates,
default_response: self.default_response.unwrap_or_default(),
_request_id: self._request_id,
}
}
}