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

com.amazonaws.services.mgn.model.transform.SourceServerMarshaller Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Application Migration module holds the client classes that are used for communicating with Application Migration Service

There is a newer version: 1.12.778
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.mgn.model.transform;

import java.util.Map;

import javax.annotation.Generated;

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

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

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

    private static final MarshallingInfo APPLICATIONID_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("applicationID").build();
    private static final MarshallingInfo ARN_BINDING = MarshallingInfo.builder(MarshallingType.STRING).marshallLocation(MarshallLocation.PAYLOAD)
            .marshallLocationName("arn").build();
    private static final MarshallingInfo CONNECTORACTION_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("connectorAction").build();
    private static final MarshallingInfo DATAREPLICATIONINFO_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("dataReplicationInfo").build();
    private static final MarshallingInfo FQDNFORACTIONFRAMEWORK_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("fqdnForActionFramework").build();
    private static final MarshallingInfo ISARCHIVED_BINDING = MarshallingInfo.builder(MarshallingType.BOOLEAN)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("isArchived").build();
    private static final MarshallingInfo LAUNCHEDINSTANCE_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("launchedInstance").build();
    private static final MarshallingInfo LIFECYCLE_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("lifeCycle").build();
    private static final MarshallingInfo REPLICATIONTYPE_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("replicationType").build();
    private static final MarshallingInfo SOURCEPROPERTIES_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("sourceProperties").build();
    private static final MarshallingInfo SOURCESERVERID_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("sourceServerID").build();
    private static final MarshallingInfo TAGS_BINDING = MarshallingInfo.builder(MarshallingType.MAP).marshallLocation(MarshallLocation.PAYLOAD)
            .marshallLocationName("tags").build();
    private static final MarshallingInfo USERPROVIDEDID_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("userProvidedID").build();
    private static final MarshallingInfo VCENTERCLIENTID_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("vcenterClientID").build();

    private static final SourceServerMarshaller instance = new SourceServerMarshaller();

    public static SourceServerMarshaller getInstance() {
        return instance;
    }

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

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

        try {
            protocolMarshaller.marshall(sourceServer.getApplicationID(), APPLICATIONID_BINDING);
            protocolMarshaller.marshall(sourceServer.getArn(), ARN_BINDING);
            protocolMarshaller.marshall(sourceServer.getConnectorAction(), CONNECTORACTION_BINDING);
            protocolMarshaller.marshall(sourceServer.getDataReplicationInfo(), DATAREPLICATIONINFO_BINDING);
            protocolMarshaller.marshall(sourceServer.getFqdnForActionFramework(), FQDNFORACTIONFRAMEWORK_BINDING);
            protocolMarshaller.marshall(sourceServer.getIsArchived(), ISARCHIVED_BINDING);
            protocolMarshaller.marshall(sourceServer.getLaunchedInstance(), LAUNCHEDINSTANCE_BINDING);
            protocolMarshaller.marshall(sourceServer.getLifeCycle(), LIFECYCLE_BINDING);
            protocolMarshaller.marshall(sourceServer.getReplicationType(), REPLICATIONTYPE_BINDING);
            protocolMarshaller.marshall(sourceServer.getSourceProperties(), SOURCEPROPERTIES_BINDING);
            protocolMarshaller.marshall(sourceServer.getSourceServerID(), SOURCESERVERID_BINDING);
            protocolMarshaller.marshall(sourceServer.getTags(), TAGS_BINDING);
            protocolMarshaller.marshall(sourceServer.getUserProvidedID(), USERPROVIDEDID_BINDING);
            protocolMarshaller.marshall(sourceServer.getVcenterClientID(), VCENTERCLIENTID_BINDING);
        } catch (Exception e) {
            throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy