com.amazonaws.services.emrserverless.model.transform.JobRunSummaryMarshaller Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aws-java-sdk-emrserverless Show documentation
Show all versions of aws-java-sdk-emrserverless Show documentation
The AWS Java SDK for EMR Serverless module holds the client classes that are used for communicating with EMR Serverless Service
The 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.emrserverless.model.transform;
import javax.annotation.Generated;
import com.amazonaws.SdkClientException;
import com.amazonaws.services.emrserverless.model.*;
import com.amazonaws.protocol.*;
import com.amazonaws.annotation.SdkInternalApi;
/**
* JobRunSummaryMarshaller
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
@SdkInternalApi
public class JobRunSummaryMarshaller {
private static final MarshallingInfo APPLICATIONID_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("applicationId").build();
private static final MarshallingInfo ID_BINDING = MarshallingInfo.builder(MarshallingType.STRING).marshallLocation(MarshallLocation.PAYLOAD)
.marshallLocationName("id").build();
private static final MarshallingInfo NAME_BINDING = MarshallingInfo.builder(MarshallingType.STRING).marshallLocation(MarshallLocation.PAYLOAD)
.marshallLocationName("name").build();
private static final MarshallingInfo MODE_BINDING = MarshallingInfo.builder(MarshallingType.STRING).marshallLocation(MarshallLocation.PAYLOAD)
.marshallLocationName("mode").build();
private static final MarshallingInfo ARN_BINDING = MarshallingInfo.builder(MarshallingType.STRING).marshallLocation(MarshallLocation.PAYLOAD)
.marshallLocationName("arn").build();
private static final MarshallingInfo CREATEDBY_BINDING = MarshallingInfo.builder(MarshallingType.STRING).marshallLocation(MarshallLocation.PAYLOAD)
.marshallLocationName("createdBy").build();
private static final MarshallingInfo CREATEDAT_BINDING = MarshallingInfo.builder(MarshallingType.DATE)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("createdAt").timestampFormat("unixTimestamp").build();
private static final MarshallingInfo UPDATEDAT_BINDING = MarshallingInfo.builder(MarshallingType.DATE)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("updatedAt").timestampFormat("unixTimestamp").build();
private static final MarshallingInfo EXECUTIONROLE_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("executionRole").build();
private static final MarshallingInfo STATE_BINDING = MarshallingInfo.builder(MarshallingType.STRING).marshallLocation(MarshallLocation.PAYLOAD)
.marshallLocationName("state").build();
private static final MarshallingInfo STATEDETAILS_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("stateDetails").build();
private static final MarshallingInfo RELEASELABEL_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("releaseLabel").build();
private static final MarshallingInfo TYPE_BINDING = MarshallingInfo.builder(MarshallingType.STRING).marshallLocation(MarshallLocation.PAYLOAD)
.marshallLocationName("type").build();
private static final MarshallingInfo ATTEMPT_BINDING = MarshallingInfo.builder(MarshallingType.INTEGER).marshallLocation(MarshallLocation.PAYLOAD)
.marshallLocationName("attempt").build();
private static final MarshallingInfo ATTEMPTCREATEDAT_BINDING = MarshallingInfo.builder(MarshallingType.DATE)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("attemptCreatedAt").timestampFormat("unixTimestamp").build();
private static final MarshallingInfo ATTEMPTUPDATEDAT_BINDING = MarshallingInfo.builder(MarshallingType.DATE)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("attemptUpdatedAt").timestampFormat("unixTimestamp").build();
private static final JobRunSummaryMarshaller instance = new JobRunSummaryMarshaller();
public static JobRunSummaryMarshaller getInstance() {
return instance;
}
/**
* Marshall the given parameter object.
*/
public void marshall(JobRunSummary jobRunSummary, ProtocolMarshaller protocolMarshaller) {
if (jobRunSummary == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(jobRunSummary.getApplicationId(), APPLICATIONID_BINDING);
protocolMarshaller.marshall(jobRunSummary.getId(), ID_BINDING);
protocolMarshaller.marshall(jobRunSummary.getName(), NAME_BINDING);
protocolMarshaller.marshall(jobRunSummary.getMode(), MODE_BINDING);
protocolMarshaller.marshall(jobRunSummary.getArn(), ARN_BINDING);
protocolMarshaller.marshall(jobRunSummary.getCreatedBy(), CREATEDBY_BINDING);
protocolMarshaller.marshall(jobRunSummary.getCreatedAt(), CREATEDAT_BINDING);
protocolMarshaller.marshall(jobRunSummary.getUpdatedAt(), UPDATEDAT_BINDING);
protocolMarshaller.marshall(jobRunSummary.getExecutionRole(), EXECUTIONROLE_BINDING);
protocolMarshaller.marshall(jobRunSummary.getState(), STATE_BINDING);
protocolMarshaller.marshall(jobRunSummary.getStateDetails(), STATEDETAILS_BINDING);
protocolMarshaller.marshall(jobRunSummary.getReleaseLabel(), RELEASELABEL_BINDING);
protocolMarshaller.marshall(jobRunSummary.getType(), TYPE_BINDING);
protocolMarshaller.marshall(jobRunSummary.getAttempt(), ATTEMPT_BINDING);
protocolMarshaller.marshall(jobRunSummary.getAttemptCreatedAt(), ATTEMPTCREATEDAT_BINDING);
protocolMarshaller.marshall(jobRunSummary.getAttemptUpdatedAt(), ATTEMPTUPDATEDAT_BINDING);
} catch (Exception e) {
throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy