aws-sdk-licensemanager 1.95.0

AWS SDK for AWS License Manager
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub fn ser_update_license_configuration_input_input(
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::operation::update_license_configuration::UpdateLicenseConfigurationInput,
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    if let Some(var_1) = &input.license_configuration_arn {
        object.key("LicenseConfigurationArn").string(var_1.as_str());
    }
    if let Some(var_2) = &input.license_configuration_status {
        object.key("LicenseConfigurationStatus").string(var_2.as_str());
    }
    if let Some(var_3) = &input.license_rules {
        let mut array_4 = object.key("LicenseRules").start_array();
        for item_5 in var_3 {
            {
                array_4.value().string(item_5.as_str());
            }
        }
        array_4.finish();
    }
    if let Some(var_6) = &input.license_count {
        object.key("LicenseCount").number(
            #[allow(clippy::useless_conversion)]
            ::aws_smithy_types::Number::NegInt((*var_6).into()),
        );
    }
    if let Some(var_7) = &input.license_count_hard_limit {
        object.key("LicenseCountHardLimit").boolean(*var_7);
    }
    if let Some(var_8) = &input.name {
        object.key("Name").string(var_8.as_str());
    }
    if let Some(var_9) = &input.description {
        object.key("Description").string(var_9.as_str());
    }
    if let Some(var_10) = &input.product_information_list {
        let mut array_11 = object.key("ProductInformationList").start_array();
        for item_12 in var_10 {
            {
                #[allow(unused_mut)]
                let mut object_13 = array_11.value().start_object();
                crate::protocol_serde::shape_product_information::ser_product_information(&mut object_13, item_12)?;
                object_13.finish();
            }
        }
        array_11.finish();
    }
    if let Some(var_14) = &input.disassociate_when_not_found {
        object.key("DisassociateWhenNotFound").boolean(*var_14);
    }
    if let Some(var_15) = &input.license_expiry {
        object.key("LicenseExpiry").number(
            #[allow(clippy::useless_conversion)]
            ::aws_smithy_types::Number::NegInt((*var_15).into()),
        );
    }
    Ok(())
}