#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct GetActivationCredentialsOutput {
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_expires_at: ::aws_smithy_types::DateTime,
pub activation_token: ::std::string::String,
_request_id: Option<String>,
}
impl GetActivationCredentialsOutput {
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_expires_at(&self) -> &::aws_smithy_types::DateTime {
&self.activation_token_expires_at
}
pub fn activation_token(&self) -> &str {
use std::ops::Deref;
self.activation_token.deref()
}
}
impl ::std::fmt::Debug for GetActivationCredentialsOutput {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("GetActivationCredentialsOutput");
formatter.field("image", &"*** Sensitive Data Redacted ***");
formatter.field("aws_ova_image_root_certificate_download_url", &"*** Sensitive Data Redacted ***");
formatter.field("activation_token_expires_at", &self.activation_token_expires_at);
formatter.field("activation_token", &"*** Sensitive Data Redacted ***");
formatter.field("_request_id", &self._request_id);
formatter.finish()
}
}
impl ::aws_types::request_id::RequestId for GetActivationCredentialsOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl GetActivationCredentialsOutput {
pub fn builder() -> crate::operation::get_activation_credentials::builders::GetActivationCredentialsOutputBuilder {
crate::operation::get_activation_credentials::builders::GetActivationCredentialsOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct GetActivationCredentialsOutputBuilder {
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_expires_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) activation_token: ::std::option::Option<::std::string::String>,
_request_id: Option<String>,
}
impl GetActivationCredentialsOutputBuilder {
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_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 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(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::get_activation_credentials::GetActivationCredentialsOutput,
::aws_smithy_types::error::operation::BuildError,
> {
::std::result::Result::Ok(crate::operation::get_activation_credentials::GetActivationCredentialsOutput {
image: self.image,
aws_ova_image_root_certificate_download_url: self.aws_ova_image_root_certificate_download_url,
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 GetActivationCredentialsOutput",
)
})?,
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 GetActivationCredentialsOutput",
)
})?,
_request_id: self._request_id,
})
}
}
impl ::std::fmt::Debug for GetActivationCredentialsOutputBuilder {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("GetActivationCredentialsOutputBuilder");
formatter.field("image", &"*** Sensitive Data Redacted ***");
formatter.field("aws_ova_image_root_certificate_download_url", &"*** Sensitive Data Redacted ***");
formatter.field("activation_token_expires_at", &self.activation_token_expires_at);
formatter.field("activation_token", &"*** Sensitive Data Redacted ***");
formatter.field("_request_id", &self._request_id);
formatter.finish()
}
}