All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.applicationautoscaling.model.transform.TargetTrackingScalingPolicyConfigurationMarshaller Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS Application Auto Scaling module holds the client classes that are used for communicating with AWS Application Auto Scaling service.

There is a newer version: 1.12.780
Show newest version
/*
 * Copyright 2019-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
 * the License. A copy of the License is located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 */
package com.amazonaws.services.applicationautoscaling.model.transform;

import javax.annotation.Generated;

import com.amazonaws.SdkClientException;
import com.amazonaws.services.applicationautoscaling.model.*;

import com.amazonaws.protocol.*;
import com.amazonaws.annotation.SdkInternalApi;

/**
 * TargetTrackingScalingPolicyConfigurationMarshaller
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
@SdkInternalApi
public class TargetTrackingScalingPolicyConfigurationMarshaller {

    private static final MarshallingInfo TARGETVALUE_BINDING = MarshallingInfo.builder(MarshallingType.DOUBLE)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("TargetValue").build();
    private static final MarshallingInfo PREDEFINEDMETRICSPECIFICATION_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("PredefinedMetricSpecification").build();
    private static final MarshallingInfo CUSTOMIZEDMETRICSPECIFICATION_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("CustomizedMetricSpecification").build();
    private static final MarshallingInfo SCALEOUTCOOLDOWN_BINDING = MarshallingInfo.builder(MarshallingType.INTEGER)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("ScaleOutCooldown").build();
    private static final MarshallingInfo SCALEINCOOLDOWN_BINDING = MarshallingInfo.builder(MarshallingType.INTEGER)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("ScaleInCooldown").build();
    private static final MarshallingInfo DISABLESCALEIN_BINDING = MarshallingInfo.builder(MarshallingType.BOOLEAN)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("DisableScaleIn").build();

    private static final TargetTrackingScalingPolicyConfigurationMarshaller instance = new TargetTrackingScalingPolicyConfigurationMarshaller();

    public static TargetTrackingScalingPolicyConfigurationMarshaller getInstance() {
        return instance;
    }

    /**
     * Marshall the given parameter object.
     */
    public void marshall(TargetTrackingScalingPolicyConfiguration targetTrackingScalingPolicyConfiguration, ProtocolMarshaller protocolMarshaller) {

        if (targetTrackingScalingPolicyConfiguration == null) {
            throw new SdkClientException("Invalid argument passed to marshall(...)");
        }

        try {
            protocolMarshaller.marshall(targetTrackingScalingPolicyConfiguration.getTargetValue(), TARGETVALUE_BINDING);
            protocolMarshaller.marshall(targetTrackingScalingPolicyConfiguration.getPredefinedMetricSpecification(), PREDEFINEDMETRICSPECIFICATION_BINDING);
            protocolMarshaller.marshall(targetTrackingScalingPolicyConfiguration.getCustomizedMetricSpecification(), CUSTOMIZEDMETRICSPECIFICATION_BINDING);
            protocolMarshaller.marshall(targetTrackingScalingPolicyConfiguration.getScaleOutCooldown(), SCALEOUTCOOLDOWN_BINDING);
            protocolMarshaller.marshall(targetTrackingScalingPolicyConfiguration.getScaleInCooldown(), SCALEINCOOLDOWN_BINDING);
            protocolMarshaller.marshall(targetTrackingScalingPolicyConfiguration.getDisableScaleIn(), DISABLESCALEIN_BINDING);
        } catch (Exception e) {
            throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy