
com.amazonaws.services.stepfunctions.model.transform.HistoryEventMarshaller Maven / Gradle / Ivy
/*
* Copyright 2015-2020 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.stepfunctions.model.transform;
import javax.annotation.Generated;
import com.amazonaws.SdkClientException;
import com.amazonaws.services.stepfunctions.model.*;
import com.amazonaws.protocol.*;
import com.amazonaws.annotation.SdkInternalApi;
/**
* HistoryEventMarshaller
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
@SdkInternalApi
public class HistoryEventMarshaller {
private static final MarshallingInfo TIMESTAMP_BINDING = MarshallingInfo.builder(MarshallingType.DATE)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("timestamp").timestampFormat("unixTimestamp").build();
private static final MarshallingInfo TYPE_BINDING = MarshallingInfo.builder(MarshallingType.STRING).marshallLocation(MarshallLocation.PAYLOAD)
.marshallLocationName("type").build();
private static final MarshallingInfo ID_BINDING = MarshallingInfo.builder(MarshallingType.LONG).marshallLocation(MarshallLocation.PAYLOAD)
.marshallLocationName("id").build();
private static final MarshallingInfo PREVIOUSEVENTID_BINDING = MarshallingInfo.builder(MarshallingType.LONG)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("previousEventId").build();
private static final MarshallingInfo ACTIVITYFAILEDEVENTDETAILS_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("activityFailedEventDetails").build();
private static final MarshallingInfo ACTIVITYSCHEDULEFAILEDEVENTDETAILS_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("activityScheduleFailedEventDetails").build();
private static final MarshallingInfo ACTIVITYSCHEDULEDEVENTDETAILS_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("activityScheduledEventDetails").build();
private static final MarshallingInfo ACTIVITYSTARTEDEVENTDETAILS_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("activityStartedEventDetails").build();
private static final MarshallingInfo ACTIVITYSUCCEEDEDEVENTDETAILS_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("activitySucceededEventDetails").build();
private static final MarshallingInfo ACTIVITYTIMEDOUTEVENTDETAILS_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("activityTimedOutEventDetails").build();
private static final MarshallingInfo TASKFAILEDEVENTDETAILS_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("taskFailedEventDetails").build();
private static final MarshallingInfo TASKSCHEDULEDEVENTDETAILS_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("taskScheduledEventDetails").build();
private static final MarshallingInfo TASKSTARTFAILEDEVENTDETAILS_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("taskStartFailedEventDetails").build();
private static final MarshallingInfo TASKSTARTEDEVENTDETAILS_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("taskStartedEventDetails").build();
private static final MarshallingInfo TASKSUBMITFAILEDEVENTDETAILS_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("taskSubmitFailedEventDetails").build();
private static final MarshallingInfo TASKSUBMITTEDEVENTDETAILS_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("taskSubmittedEventDetails").build();
private static final MarshallingInfo TASKSUCCEEDEDEVENTDETAILS_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("taskSucceededEventDetails").build();
private static final MarshallingInfo TASKTIMEDOUTEVENTDETAILS_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("taskTimedOutEventDetails").build();
private static final MarshallingInfo EXECUTIONFAILEDEVENTDETAILS_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("executionFailedEventDetails").build();
private static final MarshallingInfo EXECUTIONSTARTEDEVENTDETAILS_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("executionStartedEventDetails").build();
private static final MarshallingInfo EXECUTIONSUCCEEDEDEVENTDETAILS_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("executionSucceededEventDetails").build();
private static final MarshallingInfo EXECUTIONABORTEDEVENTDETAILS_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("executionAbortedEventDetails").build();
private static final MarshallingInfo EXECUTIONTIMEDOUTEVENTDETAILS_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("executionTimedOutEventDetails").build();
private static final MarshallingInfo MAPSTATESTARTEDEVENTDETAILS_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("mapStateStartedEventDetails").build();
private static final MarshallingInfo MAPITERATIONSTARTEDEVENTDETAILS_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("mapIterationStartedEventDetails").build();
private static final MarshallingInfo MAPITERATIONSUCCEEDEDEVENTDETAILS_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("mapIterationSucceededEventDetails").build();
private static final MarshallingInfo MAPITERATIONFAILEDEVENTDETAILS_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("mapIterationFailedEventDetails").build();
private static final MarshallingInfo MAPITERATIONABORTEDEVENTDETAILS_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("mapIterationAbortedEventDetails").build();
private static final MarshallingInfo LAMBDAFUNCTIONFAILEDEVENTDETAILS_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("lambdaFunctionFailedEventDetails").build();
private static final MarshallingInfo LAMBDAFUNCTIONSCHEDULEFAILEDEVENTDETAILS_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("lambdaFunctionScheduleFailedEventDetails").build();
private static final MarshallingInfo LAMBDAFUNCTIONSCHEDULEDEVENTDETAILS_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("lambdaFunctionScheduledEventDetails").build();
private static final MarshallingInfo LAMBDAFUNCTIONSTARTFAILEDEVENTDETAILS_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("lambdaFunctionStartFailedEventDetails").build();
private static final MarshallingInfo LAMBDAFUNCTIONSUCCEEDEDEVENTDETAILS_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("lambdaFunctionSucceededEventDetails").build();
private static final MarshallingInfo LAMBDAFUNCTIONTIMEDOUTEVENTDETAILS_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("lambdaFunctionTimedOutEventDetails").build();
private static final MarshallingInfo STATEENTEREDEVENTDETAILS_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("stateEnteredEventDetails").build();
private static final MarshallingInfo STATEEXITEDEVENTDETAILS_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("stateExitedEventDetails").build();
private static final HistoryEventMarshaller instance = new HistoryEventMarshaller();
public static HistoryEventMarshaller getInstance() {
return instance;
}
/**
* Marshall the given parameter object.
*/
public void marshall(HistoryEvent historyEvent, ProtocolMarshaller protocolMarshaller) {
if (historyEvent == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(historyEvent.getTimestamp(), TIMESTAMP_BINDING);
protocolMarshaller.marshall(historyEvent.getType(), TYPE_BINDING);
protocolMarshaller.marshall(historyEvent.getId(), ID_BINDING);
protocolMarshaller.marshall(historyEvent.getPreviousEventId(), PREVIOUSEVENTID_BINDING);
protocolMarshaller.marshall(historyEvent.getActivityFailedEventDetails(), ACTIVITYFAILEDEVENTDETAILS_BINDING);
protocolMarshaller.marshall(historyEvent.getActivityScheduleFailedEventDetails(), ACTIVITYSCHEDULEFAILEDEVENTDETAILS_BINDING);
protocolMarshaller.marshall(historyEvent.getActivityScheduledEventDetails(), ACTIVITYSCHEDULEDEVENTDETAILS_BINDING);
protocolMarshaller.marshall(historyEvent.getActivityStartedEventDetails(), ACTIVITYSTARTEDEVENTDETAILS_BINDING);
protocolMarshaller.marshall(historyEvent.getActivitySucceededEventDetails(), ACTIVITYSUCCEEDEDEVENTDETAILS_BINDING);
protocolMarshaller.marshall(historyEvent.getActivityTimedOutEventDetails(), ACTIVITYTIMEDOUTEVENTDETAILS_BINDING);
protocolMarshaller.marshall(historyEvent.getTaskFailedEventDetails(), TASKFAILEDEVENTDETAILS_BINDING);
protocolMarshaller.marshall(historyEvent.getTaskScheduledEventDetails(), TASKSCHEDULEDEVENTDETAILS_BINDING);
protocolMarshaller.marshall(historyEvent.getTaskStartFailedEventDetails(), TASKSTARTFAILEDEVENTDETAILS_BINDING);
protocolMarshaller.marshall(historyEvent.getTaskStartedEventDetails(), TASKSTARTEDEVENTDETAILS_BINDING);
protocolMarshaller.marshall(historyEvent.getTaskSubmitFailedEventDetails(), TASKSUBMITFAILEDEVENTDETAILS_BINDING);
protocolMarshaller.marshall(historyEvent.getTaskSubmittedEventDetails(), TASKSUBMITTEDEVENTDETAILS_BINDING);
protocolMarshaller.marshall(historyEvent.getTaskSucceededEventDetails(), TASKSUCCEEDEDEVENTDETAILS_BINDING);
protocolMarshaller.marshall(historyEvent.getTaskTimedOutEventDetails(), TASKTIMEDOUTEVENTDETAILS_BINDING);
protocolMarshaller.marshall(historyEvent.getExecutionFailedEventDetails(), EXECUTIONFAILEDEVENTDETAILS_BINDING);
protocolMarshaller.marshall(historyEvent.getExecutionStartedEventDetails(), EXECUTIONSTARTEDEVENTDETAILS_BINDING);
protocolMarshaller.marshall(historyEvent.getExecutionSucceededEventDetails(), EXECUTIONSUCCEEDEDEVENTDETAILS_BINDING);
protocolMarshaller.marshall(historyEvent.getExecutionAbortedEventDetails(), EXECUTIONABORTEDEVENTDETAILS_BINDING);
protocolMarshaller.marshall(historyEvent.getExecutionTimedOutEventDetails(), EXECUTIONTIMEDOUTEVENTDETAILS_BINDING);
protocolMarshaller.marshall(historyEvent.getMapStateStartedEventDetails(), MAPSTATESTARTEDEVENTDETAILS_BINDING);
protocolMarshaller.marshall(historyEvent.getMapIterationStartedEventDetails(), MAPITERATIONSTARTEDEVENTDETAILS_BINDING);
protocolMarshaller.marshall(historyEvent.getMapIterationSucceededEventDetails(), MAPITERATIONSUCCEEDEDEVENTDETAILS_BINDING);
protocolMarshaller.marshall(historyEvent.getMapIterationFailedEventDetails(), MAPITERATIONFAILEDEVENTDETAILS_BINDING);
protocolMarshaller.marshall(historyEvent.getMapIterationAbortedEventDetails(), MAPITERATIONABORTEDEVENTDETAILS_BINDING);
protocolMarshaller.marshall(historyEvent.getLambdaFunctionFailedEventDetails(), LAMBDAFUNCTIONFAILEDEVENTDETAILS_BINDING);
protocolMarshaller.marshall(historyEvent.getLambdaFunctionScheduleFailedEventDetails(), LAMBDAFUNCTIONSCHEDULEFAILEDEVENTDETAILS_BINDING);
protocolMarshaller.marshall(historyEvent.getLambdaFunctionScheduledEventDetails(), LAMBDAFUNCTIONSCHEDULEDEVENTDETAILS_BINDING);
protocolMarshaller.marshall(historyEvent.getLambdaFunctionStartFailedEventDetails(), LAMBDAFUNCTIONSTARTFAILEDEVENTDETAILS_BINDING);
protocolMarshaller.marshall(historyEvent.getLambdaFunctionSucceededEventDetails(), LAMBDAFUNCTIONSUCCEEDEDEVENTDETAILS_BINDING);
protocolMarshaller.marshall(historyEvent.getLambdaFunctionTimedOutEventDetails(), LAMBDAFUNCTIONTIMEDOUTEVENTDETAILS_BINDING);
protocolMarshaller.marshall(historyEvent.getStateEnteredEventDetails(), STATEENTEREDEVENTDETAILS_BINDING);
protocolMarshaller.marshall(historyEvent.getStateExitedEventDetails(), STATEEXITEDEVENTDETAILS_BINDING);
} catch (Exception e) {
throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy