#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ImportAssetFromApiGatewayApiRequestDetails {
pub api_description: ::std::option::Option<::std::string::String>,
pub api_id: ::std::string::String,
pub api_key: ::std::option::Option<::std::string::String>,
pub api_name: ::std::string::String,
pub api_specification_md5_hash: ::std::string::String,
pub data_set_id: ::std::string::String,
pub protocol_type: crate::types::ProtocolType,
pub revision_id: ::std::string::String,
pub stage: ::std::string::String,
}
impl ImportAssetFromApiGatewayApiRequestDetails {
pub fn api_description(&self) -> ::std::option::Option<&str> {
self.api_description.as_deref()
}
pub fn api_id(&self) -> &str {
use std::ops::Deref;
self.api_id.deref()
}
pub fn api_key(&self) -> ::std::option::Option<&str> {
self.api_key.as_deref()
}
pub fn api_name(&self) -> &str {
use std::ops::Deref;
self.api_name.deref()
}
pub fn api_specification_md5_hash(&self) -> &str {
use std::ops::Deref;
self.api_specification_md5_hash.deref()
}
pub fn data_set_id(&self) -> &str {
use std::ops::Deref;
self.data_set_id.deref()
}
pub fn protocol_type(&self) -> &crate::types::ProtocolType {
&self.protocol_type
}
pub fn revision_id(&self) -> &str {
use std::ops::Deref;
self.revision_id.deref()
}
pub fn stage(&self) -> &str {
use std::ops::Deref;
self.stage.deref()
}
}
impl ImportAssetFromApiGatewayApiRequestDetails {
pub fn builder() -> crate::types::builders::ImportAssetFromApiGatewayApiRequestDetailsBuilder {
crate::types::builders::ImportAssetFromApiGatewayApiRequestDetailsBuilder::default()
}
}
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct ImportAssetFromApiGatewayApiRequestDetailsBuilder {
pub(crate) api_description: ::std::option::Option<::std::string::String>,
pub(crate) api_id: ::std::option::Option<::std::string::String>,
pub(crate) api_key: ::std::option::Option<::std::string::String>,
pub(crate) api_name: ::std::option::Option<::std::string::String>,
pub(crate) api_specification_md5_hash: ::std::option::Option<::std::string::String>,
pub(crate) data_set_id: ::std::option::Option<::std::string::String>,
pub(crate) protocol_type: ::std::option::Option<crate::types::ProtocolType>,
pub(crate) revision_id: ::std::option::Option<::std::string::String>,
pub(crate) stage: ::std::option::Option<::std::string::String>,
}
impl ImportAssetFromApiGatewayApiRequestDetailsBuilder {
pub fn api_description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.api_description = ::std::option::Option::Some(input.into());
self
}
pub fn set_api_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.api_description = input;
self
}
pub fn get_api_description(&self) -> &::std::option::Option<::std::string::String> {
&self.api_description
}
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 api_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.api_key = ::std::option::Option::Some(input.into());
self
}
pub fn set_api_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.api_key = input;
self
}
pub fn get_api_key(&self) -> &::std::option::Option<::std::string::String> {
&self.api_key
}
pub fn api_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.api_name = ::std::option::Option::Some(input.into());
self
}
pub fn set_api_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.api_name = input;
self
}
pub fn get_api_name(&self) -> &::std::option::Option<::std::string::String> {
&self.api_name
}
pub fn api_specification_md5_hash(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.api_specification_md5_hash = ::std::option::Option::Some(input.into());
self
}
pub fn set_api_specification_md5_hash(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.api_specification_md5_hash = input;
self
}
pub fn get_api_specification_md5_hash(&self) -> &::std::option::Option<::std::string::String> {
&self.api_specification_md5_hash
}
pub fn data_set_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.data_set_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_data_set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.data_set_id = input;
self
}
pub fn get_data_set_id(&self) -> &::std::option::Option<::std::string::String> {
&self.data_set_id
}
pub fn protocol_type(mut self, input: crate::types::ProtocolType) -> Self {
self.protocol_type = ::std::option::Option::Some(input);
self
}
pub fn set_protocol_type(mut self, input: ::std::option::Option<crate::types::ProtocolType>) -> Self {
self.protocol_type = input;
self
}
pub fn get_protocol_type(&self) -> &::std::option::Option<crate::types::ProtocolType> {
&self.protocol_type
}
pub fn revision_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.revision_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_revision_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.revision_id = input;
self
}
pub fn get_revision_id(&self) -> &::std::option::Option<::std::string::String> {
&self.revision_id
}
pub fn stage(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.stage = ::std::option::Option::Some(input.into());
self
}
pub fn set_stage(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.stage = input;
self
}
pub fn get_stage(&self) -> &::std::option::Option<::std::string::String> {
&self.stage
}
pub fn build(
self,
) -> ::std::result::Result<crate::types::ImportAssetFromApiGatewayApiRequestDetails, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::types::ImportAssetFromApiGatewayApiRequestDetails {
api_description: self.api_description,
api_id: self.api_id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"api_id",
"api_id was not specified but it is required when building ImportAssetFromApiGatewayApiRequestDetails",
)
})?,
api_key: self.api_key,
api_name: self.api_name.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"api_name",
"api_name was not specified but it is required when building ImportAssetFromApiGatewayApiRequestDetails",
)
})?,
api_specification_md5_hash: self.api_specification_md5_hash.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"api_specification_md5_hash",
"api_specification_md5_hash was not specified but it is required when building ImportAssetFromApiGatewayApiRequestDetails",
)
})?,
data_set_id: self.data_set_id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"data_set_id",
"data_set_id was not specified but it is required when building ImportAssetFromApiGatewayApiRequestDetails",
)
})?,
protocol_type: self.protocol_type.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"protocol_type",
"protocol_type was not specified but it is required when building ImportAssetFromApiGatewayApiRequestDetails",
)
})?,
revision_id: self.revision_id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"revision_id",
"revision_id was not specified but it is required when building ImportAssetFromApiGatewayApiRequestDetails",
)
})?,
stage: self.stage.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"stage",
"stage was not specified but it is required when building ImportAssetFromApiGatewayApiRequestDetails",
)
})?,
})
}
}