pub(crate) fn de_cloud_autonomous_vm_cluster_summary<'a, I>(
tokens: &mut ::std::iter::Peekable<I>,
_value: &'a [u8],
) -> ::std::result::Result<Option<crate::types::CloudAutonomousVmClusterSummary>, ::aws_smithy_json::deserialize::error::DeserializeError>
where
I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
{
match tokens.next().transpose()? {
Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder = crate::types::builders::CloudAutonomousVmClusterSummaryBuilder::default();
loop {
match tokens.next().transpose()? {
Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
"cloudAutonomousVmClusterId" => {
builder = builder.set_cloud_autonomous_vm_cluster_id(
::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"cloudAutonomousVmClusterArn" => {
builder = builder.set_cloud_autonomous_vm_cluster_arn(
::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"odbNetworkId" => {
builder = builder.set_odb_network_id(
::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"odbNetworkArn" => {
builder = builder.set_odb_network_arn(
::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"ociResourceAnchorName" => {
builder = builder.set_oci_resource_anchor_name(
::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"percentProgress" => {
builder = builder.set_percent_progress(
::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?.map(|v| v.to_f32_lossy()),
);
}
"displayName" => {
builder = builder.set_display_name(
::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"status" => {
builder = builder.set_status(
::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
.map(|s| s.to_unescaped().map(|u| crate::types::ResourceStatus::from(u.as_ref())))
.transpose()?,
);
}
"statusReason" => {
builder = builder.set_status_reason(
::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"cloudExadataInfrastructureId" => {
builder = builder.set_cloud_exadata_infrastructure_id(
::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"cloudExadataInfrastructureArn" => {
builder = builder.set_cloud_exadata_infrastructure_arn(
::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"autonomousDataStoragePercentage" => {
builder = builder.set_autonomous_data_storage_percentage(
::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?.map(|v| v.to_f32_lossy()),
);
}
"autonomousDataStorageSizeInTBs" => {
builder = builder.set_autonomous_data_storage_size_in_tbs(
::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?.map(|v| v.to_f64_lossy()),
);
}
"availableAutonomousDataStorageSizeInTBs" => {
builder = builder.set_available_autonomous_data_storage_size_in_tbs(
::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?.map(|v| v.to_f64_lossy()),
);
}
"availableContainerDatabases" => {
builder = builder.set_available_container_databases(
::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
.map(i32::try_from)
.transpose()?,
);
}
"availableCpus" => {
builder = builder.set_available_cpus(
::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?.map(|v| v.to_f32_lossy()),
);
}
"computeModel" => {
builder = builder.set_compute_model(
::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
.map(|s| s.to_unescaped().map(|u| crate::types::ComputeModel::from(u.as_ref())))
.transpose()?,
);
}
"cpuCoreCount" => {
builder = builder.set_cpu_core_count(
::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
.map(i32::try_from)
.transpose()?,
);
}
"cpuCoreCountPerNode" => {
builder = builder.set_cpu_core_count_per_node(
::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
.map(i32::try_from)
.transpose()?,
);
}
"cpuPercentage" => {
builder = builder.set_cpu_percentage(
::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?.map(|v| v.to_f32_lossy()),
);
}
"dataStorageSizeInGBs" => {
builder = builder.set_data_storage_size_in_gbs(
::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?.map(|v| v.to_f64_lossy()),
);
}
"dataStorageSizeInTBs" => {
builder = builder.set_data_storage_size_in_tbs(
::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?.map(|v| v.to_f64_lossy()),
);
}
"dbNodeStorageSizeInGBs" => {
builder = builder.set_db_node_storage_size_in_gbs(
::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
.map(i32::try_from)
.transpose()?,
);
}
"dbServers" => {
builder = builder.set_db_servers(crate::protocol_serde::shape_string_list::de_string_list(tokens, _value)?);
}
"description" => {
builder = builder.set_description(
::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"domain" => {
builder = builder.set_domain(
::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"exadataStorageInTBsLowestScaledValue" => {
builder = builder.set_exadata_storage_in_tbs_lowest_scaled_value(
::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?.map(|v| v.to_f64_lossy()),
);
}
"hostname" => {
builder = builder.set_hostname(
::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"ocid" => {
builder = builder.set_ocid(
::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"ociUrl" => {
builder = builder.set_oci_url(
::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"isMtlsEnabledVmCluster" => {
builder =
builder.set_is_mtls_enabled_vm_cluster(::aws_smithy_json::deserialize::token::expect_bool_or_null(tokens.next())?);
}
"licenseModel" => {
builder = builder.set_license_model(
::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
.map(|s| s.to_unescaped().map(|u| crate::types::LicenseModel::from(u.as_ref())))
.transpose()?,
);
}
"maintenanceWindow" => {
builder = builder
.set_maintenance_window(crate::protocol_serde::shape_maintenance_window::de_maintenance_window(tokens, _value)?);
}
"maxAcdsLowestScaledValue" => {
builder = builder.set_max_acds_lowest_scaled_value(
::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
.map(i32::try_from)
.transpose()?,
);
}
"memoryPerOracleComputeUnitInGBs" => {
builder = builder.set_memory_per_oracle_compute_unit_in_gbs(
::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
.map(i32::try_from)
.transpose()?,
);
}
"memorySizeInGBs" => {
builder = builder.set_memory_size_in_gbs(
::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
.map(i32::try_from)
.transpose()?,
);
}
"nodeCount" => {
builder = builder.set_node_count(
::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
.map(i32::try_from)
.transpose()?,
);
}
"nonProvisionableAutonomousContainerDatabases" => {
builder = builder.set_non_provisionable_autonomous_container_databases(
::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
.map(i32::try_from)
.transpose()?,
);
}
"provisionableAutonomousContainerDatabases" => {
builder = builder.set_provisionable_autonomous_container_databases(
::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
.map(i32::try_from)
.transpose()?,
);
}
"provisionedAutonomousContainerDatabases" => {
builder = builder.set_provisioned_autonomous_container_databases(
::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
.map(i32::try_from)
.transpose()?,
);
}
"provisionedCpus" => {
builder = builder.set_provisioned_cpus(
::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?.map(|v| v.to_f32_lossy()),
);
}
"reclaimableCpus" => {
builder = builder.set_reclaimable_cpus(
::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?.map(|v| v.to_f32_lossy()),
);
}
"reservedCpus" => {
builder = builder.set_reserved_cpus(
::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?.map(|v| v.to_f32_lossy()),
);
}
"scanListenerPortNonTls" => {
builder = builder.set_scan_listener_port_non_tls(
::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
.map(i32::try_from)
.transpose()?,
);
}
"scanListenerPortTls" => {
builder = builder.set_scan_listener_port_tls(
::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
.map(i32::try_from)
.transpose()?,
);
}
"shape" => {
builder = builder.set_shape(
::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"createdAt" => {
builder = builder.set_created_at(::aws_smithy_json::deserialize::token::expect_timestamp_or_null(
tokens.next(),
::aws_smithy_types::date_time::Format::DateTimeWithOffset,
)?);
}
"timeDatabaseSslCertificateExpires" => {
builder =
builder.set_time_database_ssl_certificate_expires(::aws_smithy_json::deserialize::token::expect_timestamp_or_null(
tokens.next(),
::aws_smithy_types::date_time::Format::DateTimeWithOffset,
)?);
}
"timeOrdsCertificateExpires" => {
builder = builder.set_time_ords_certificate_expires(::aws_smithy_json::deserialize::token::expect_timestamp_or_null(
tokens.next(),
::aws_smithy_types::date_time::Format::DateTimeWithOffset,
)?);
}
"timeZone" => {
builder = builder.set_time_zone(
::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"totalContainerDatabases" => {
builder = builder.set_total_container_databases(
::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
.map(i32::try_from)
.transpose()?,
);
}
"iamRoles" => {
builder = builder.set_iam_roles(crate::protocol_serde::shape_iam_role_list::de_iam_role_list(tokens, _value)?);
}
_ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
},
other => {
return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {other:?}"
)))
}
}
}
Ok(Some(
crate::serde_util::cloud_autonomous_vm_cluster_summary_correct_errors(builder)
.build()
.map_err(|err| ::aws_smithy_json::deserialize::error::DeserializeError::custom_source("Response was invalid", err))?,
))
}
_ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
)),
}
}