#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct CreateApplianceOutput {
pub appliance_arn: ::std::string::String,
pub created_at: ::aws_smithy_types::DateTime,
pub image: ::std::option::Option<::std::string::String>,
pub aws_ova_image_root_certificate_download_url: ::std::option::Option<::std::string::String>,
pub activation_token: ::std::string::String,
pub activation_token_expires_at: ::aws_smithy_types::DateTime,
_request_id: Option<String>,
}
impl CreateApplianceOutput {
pub fn appliance_arn(&self) -> &str {
use std::ops::Deref;
self.appliance_arn.deref()
}
pub fn created_at(&self) -> &::aws_smithy_types::DateTime {
&self.created_at
}
pub fn image(&self) -> ::std::option::Option<&str> {
self.image.as_deref()
}
pub fn aws_ova_image_root_certificate_download_url(&self) -> ::std::option::Option<&str> {
self.aws_ova_image_root_certificate_download_url.as_deref()
}
pub fn activation_token(&self) -> &str {
use std::ops::Deref;
self.activation_token.deref()
}
pub fn activation_token_expires_at(&self) -> &::aws_smithy_types::DateTime {
&self.activation_token_expires_at
}
}
impl ::std::fmt::Debug for CreateApplianceOutput {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("CreateApplianceOutput");
formatter.field("appliance_arn", &self.appliance_arn);
formatter.field("created_at", &self.created_at);
formatter.field("image", &"*** Sensitive Data Redacted ***");
formatter.field("aws_ova_image_root_certificate_download_url", &"*** Sensitive Data Redacted ***");
formatter.field("activation_token", &"*** Sensitive Data Redacted ***");
formatter.field("activation_token_expires_at", &self.activation_token_expires_at);
formatter.field("_request_id", &self._request_id);
formatter.finish()
}
}
impl ::aws_types::request_id::RequestId for CreateApplianceOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl CreateApplianceOutput {
pub fn builder() -> crate::operation::create_appliance::builders::CreateApplianceOutputBuilder {
crate::operation::create_appliance::builders::CreateApplianceOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct CreateApplianceOutputBuilder {
pub(crate) appliance_arn: ::std::option::Option<::std::string::String>,
pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) image: ::std::option::Option<::std::string::String>,
pub(crate) aws_ova_image_root_certificate_download_url: ::std::option::Option<::std::string::String>,
pub(crate) activation_token: ::std::option::Option<::std::string::String>,
pub(crate) activation_token_expires_at: ::std::option::Option<::aws_smithy_types::DateTime>,
_request_id: Option<String>,
}
impl CreateApplianceOutputBuilder {
pub fn appliance_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.appliance_arn = ::std::option::Option::Some(input.into());
self
}
pub fn set_appliance_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.appliance_arn = input;
self
}
pub fn get_appliance_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.appliance_arn
}
pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.created_at = ::std::option::Option::Some(input);
self
}
pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.created_at = input;
self
}
pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.created_at
}
pub fn image(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.image = ::std::option::Option::Some(input.into());
self
}
pub fn set_image(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.image = input;
self
}
pub fn get_image(&self) -> &::std::option::Option<::std::string::String> {
&self.image
}
pub fn aws_ova_image_root_certificate_download_url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.aws_ova_image_root_certificate_download_url = ::std::option::Option::Some(input.into());
self
}
pub fn set_aws_ova_image_root_certificate_download_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.aws_ova_image_root_certificate_download_url = input;
self
}
pub fn get_aws_ova_image_root_certificate_download_url(&self) -> &::std::option::Option<::std::string::String> {
&self.aws_ova_image_root_certificate_download_url
}
pub fn activation_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.activation_token = ::std::option::Option::Some(input.into());
self
}
pub fn set_activation_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.activation_token = input;
self
}
pub fn get_activation_token(&self) -> &::std::option::Option<::std::string::String> {
&self.activation_token
}
pub fn activation_token_expires_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.activation_token_expires_at = ::std::option::Option::Some(input);
self
}
pub fn set_activation_token_expires_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.activation_token_expires_at = input;
self
}
pub fn get_activation_token_expires_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.activation_token_expires_at
}
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,
) -> ::std::result::Result<crate::operation::create_appliance::CreateApplianceOutput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::create_appliance::CreateApplianceOutput {
appliance_arn: self.appliance_arn.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"appliance_arn",
"appliance_arn was not specified but it is required when building CreateApplianceOutput",
)
})?,
created_at: self.created_at.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"created_at",
"created_at was not specified but it is required when building CreateApplianceOutput",
)
})?,
image: self.image,
aws_ova_image_root_certificate_download_url: self.aws_ova_image_root_certificate_download_url,
activation_token: self.activation_token.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"activation_token",
"activation_token was not specified but it is required when building CreateApplianceOutput",
)
})?,
activation_token_expires_at: self.activation_token_expires_at.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"activation_token_expires_at",
"activation_token_expires_at was not specified but it is required when building CreateApplianceOutput",
)
})?,
_request_id: self._request_id,
})
}
}
impl ::std::fmt::Debug for CreateApplianceOutputBuilder {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("CreateApplianceOutputBuilder");
formatter.field("appliance_arn", &self.appliance_arn);
formatter.field("created_at", &self.created_at);
formatter.field("image", &"*** Sensitive Data Redacted ***");
formatter.field("aws_ova_image_root_certificate_download_url", &"*** Sensitive Data Redacted ***");
formatter.field("activation_token", &"*** Sensitive Data Redacted ***");
formatter.field("activation_token_expires_at", &self.activation_token_expires_at);
formatter.field("_request_id", &self._request_id);
formatter.finish()
}
}