#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ImportImageTask {
pub architecture: ::std::option::Option<::std::string::String>,
pub description: ::std::option::Option<::std::string::String>,
pub encrypted: ::std::option::Option<bool>,
pub hypervisor: ::std::option::Option<::std::string::String>,
pub image_id: ::std::option::Option<::std::string::String>,
pub import_task_id: ::std::option::Option<::std::string::String>,
pub kms_key_id: ::std::option::Option<::std::string::String>,
pub license_type: ::std::option::Option<::std::string::String>,
pub platform: ::std::option::Option<::std::string::String>,
pub progress: ::std::option::Option<::std::string::String>,
pub snapshot_details: ::std::option::Option<::std::vec::Vec<crate::types::SnapshotDetail>>,
pub status: ::std::option::Option<::std::string::String>,
pub status_message: ::std::option::Option<::std::string::String>,
pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
pub license_specifications: ::std::option::Option<::std::vec::Vec<crate::types::ImportImageLicenseConfigurationResponse>>,
pub usage_operation: ::std::option::Option<::std::string::String>,
pub boot_mode: ::std::option::Option<crate::types::BootModeValues>,
}
impl ImportImageTask {
pub fn architecture(&self) -> ::std::option::Option<&str> {
self.architecture.as_deref()
}
pub fn description(&self) -> ::std::option::Option<&str> {
self.description.as_deref()
}
pub fn encrypted(&self) -> ::std::option::Option<bool> {
self.encrypted
}
pub fn hypervisor(&self) -> ::std::option::Option<&str> {
self.hypervisor.as_deref()
}
pub fn image_id(&self) -> ::std::option::Option<&str> {
self.image_id.as_deref()
}
pub fn import_task_id(&self) -> ::std::option::Option<&str> {
self.import_task_id.as_deref()
}
pub fn kms_key_id(&self) -> ::std::option::Option<&str> {
self.kms_key_id.as_deref()
}
pub fn license_type(&self) -> ::std::option::Option<&str> {
self.license_type.as_deref()
}
pub fn platform(&self) -> ::std::option::Option<&str> {
self.platform.as_deref()
}
pub fn progress(&self) -> ::std::option::Option<&str> {
self.progress.as_deref()
}
pub fn snapshot_details(&self) -> ::std::option::Option<&[crate::types::SnapshotDetail]> {
self.snapshot_details.as_deref()
}
pub fn status(&self) -> ::std::option::Option<&str> {
self.status.as_deref()
}
pub fn status_message(&self) -> ::std::option::Option<&str> {
self.status_message.as_deref()
}
pub fn tags(&self) -> ::std::option::Option<&[crate::types::Tag]> {
self.tags.as_deref()
}
pub fn license_specifications(&self) -> ::std::option::Option<&[crate::types::ImportImageLicenseConfigurationResponse]> {
self.license_specifications.as_deref()
}
pub fn usage_operation(&self) -> ::std::option::Option<&str> {
self.usage_operation.as_deref()
}
pub fn boot_mode(&self) -> ::std::option::Option<&crate::types::BootModeValues> {
self.boot_mode.as_ref()
}
}
impl ImportImageTask {
pub fn builder() -> crate::types::builders::ImportImageTaskBuilder {
crate::types::builders::ImportImageTaskBuilder::default()
}
}
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct ImportImageTaskBuilder {
pub(crate) architecture: ::std::option::Option<::std::string::String>,
pub(crate) description: ::std::option::Option<::std::string::String>,
pub(crate) encrypted: ::std::option::Option<bool>,
pub(crate) hypervisor: ::std::option::Option<::std::string::String>,
pub(crate) image_id: ::std::option::Option<::std::string::String>,
pub(crate) import_task_id: ::std::option::Option<::std::string::String>,
pub(crate) kms_key_id: ::std::option::Option<::std::string::String>,
pub(crate) license_type: ::std::option::Option<::std::string::String>,
pub(crate) platform: ::std::option::Option<::std::string::String>,
pub(crate) progress: ::std::option::Option<::std::string::String>,
pub(crate) snapshot_details: ::std::option::Option<::std::vec::Vec<crate::types::SnapshotDetail>>,
pub(crate) status: ::std::option::Option<::std::string::String>,
pub(crate) status_message: ::std::option::Option<::std::string::String>,
pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
pub(crate) license_specifications: ::std::option::Option<::std::vec::Vec<crate::types::ImportImageLicenseConfigurationResponse>>,
pub(crate) usage_operation: ::std::option::Option<::std::string::String>,
pub(crate) boot_mode: ::std::option::Option<crate::types::BootModeValues>,
}
impl ImportImageTaskBuilder {
pub fn architecture(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.architecture = ::std::option::Option::Some(input.into());
self
}
pub fn set_architecture(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.architecture = input;
self
}
pub fn get_architecture(&self) -> &::std::option::Option<::std::string::String> {
&self.architecture
}
pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.description = ::std::option::Option::Some(input.into());
self
}
pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.description = input;
self
}
pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
&self.description
}
pub fn encrypted(mut self, input: bool) -> Self {
self.encrypted = ::std::option::Option::Some(input);
self
}
pub fn set_encrypted(mut self, input: ::std::option::Option<bool>) -> Self {
self.encrypted = input;
self
}
pub fn get_encrypted(&self) -> &::std::option::Option<bool> {
&self.encrypted
}
pub fn hypervisor(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.hypervisor = ::std::option::Option::Some(input.into());
self
}
pub fn set_hypervisor(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.hypervisor = input;
self
}
pub fn get_hypervisor(&self) -> &::std::option::Option<::std::string::String> {
&self.hypervisor
}
pub fn image_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.image_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_image_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.image_id = input;
self
}
pub fn get_image_id(&self) -> &::std::option::Option<::std::string::String> {
&self.image_id
}
pub fn import_task_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.import_task_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_import_task_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.import_task_id = input;
self
}
pub fn get_import_task_id(&self) -> &::std::option::Option<::std::string::String> {
&self.import_task_id
}
pub fn kms_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.kms_key_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_kms_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.kms_key_id = input;
self
}
pub fn get_kms_key_id(&self) -> &::std::option::Option<::std::string::String> {
&self.kms_key_id
}
pub fn license_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.license_type = ::std::option::Option::Some(input.into());
self
}
pub fn set_license_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.license_type = input;
self
}
pub fn get_license_type(&self) -> &::std::option::Option<::std::string::String> {
&self.license_type
}
pub fn platform(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.platform = ::std::option::Option::Some(input.into());
self
}
pub fn set_platform(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.platform = input;
self
}
pub fn get_platform(&self) -> &::std::option::Option<::std::string::String> {
&self.platform
}
pub fn progress(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.progress = ::std::option::Option::Some(input.into());
self
}
pub fn set_progress(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.progress = input;
self
}
pub fn get_progress(&self) -> &::std::option::Option<::std::string::String> {
&self.progress
}
pub fn snapshot_details(mut self, input: crate::types::SnapshotDetail) -> Self {
let mut v = self.snapshot_details.unwrap_or_default();
v.push(input);
self.snapshot_details = ::std::option::Option::Some(v);
self
}
pub fn set_snapshot_details(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::SnapshotDetail>>) -> Self {
self.snapshot_details = input;
self
}
pub fn get_snapshot_details(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::SnapshotDetail>> {
&self.snapshot_details
}
pub fn status(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.status = ::std::option::Option::Some(input.into());
self
}
pub fn set_status(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.status = input;
self
}
pub fn get_status(&self) -> &::std::option::Option<::std::string::String> {
&self.status
}
pub fn status_message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.status_message = ::std::option::Option::Some(input.into());
self
}
pub fn set_status_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.status_message = input;
self
}
pub fn get_status_message(&self) -> &::std::option::Option<::std::string::String> {
&self.status_message
}
pub fn tags(mut self, input: crate::types::Tag) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input);
self.tags = ::std::option::Option::Some(v);
self
}
pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
self.tags = input;
self
}
pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
&self.tags
}
pub fn license_specifications(mut self, input: crate::types::ImportImageLicenseConfigurationResponse) -> Self {
let mut v = self.license_specifications.unwrap_or_default();
v.push(input);
self.license_specifications = ::std::option::Option::Some(v);
self
}
pub fn set_license_specifications(
mut self,
input: ::std::option::Option<::std::vec::Vec<crate::types::ImportImageLicenseConfigurationResponse>>,
) -> Self {
self.license_specifications = input;
self
}
pub fn get_license_specifications(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ImportImageLicenseConfigurationResponse>> {
&self.license_specifications
}
pub fn usage_operation(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.usage_operation = ::std::option::Option::Some(input.into());
self
}
pub fn set_usage_operation(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.usage_operation = input;
self
}
pub fn get_usage_operation(&self) -> &::std::option::Option<::std::string::String> {
&self.usage_operation
}
pub fn boot_mode(mut self, input: crate::types::BootModeValues) -> Self {
self.boot_mode = ::std::option::Option::Some(input);
self
}
pub fn set_boot_mode(mut self, input: ::std::option::Option<crate::types::BootModeValues>) -> Self {
self.boot_mode = input;
self
}
pub fn get_boot_mode(&self) -> &::std::option::Option<crate::types::BootModeValues> {
&self.boot_mode
}
pub fn build(self) -> crate::types::ImportImageTask {
crate::types::ImportImageTask {
architecture: self.architecture,
description: self.description,
encrypted: self.encrypted,
hypervisor: self.hypervisor,
image_id: self.image_id,
import_task_id: self.import_task_id,
kms_key_id: self.kms_key_id,
license_type: self.license_type,
platform: self.platform,
progress: self.progress,
snapshot_details: self.snapshot_details,
status: self.status,
status_message: self.status_message,
tags: self.tags,
license_specifications: self.license_specifications,
usage_operation: self.usage_operation,
boot_mode: self.boot_mode,
}
}
}