software.amazon.awssdk.services.databasemigration.transform.TableStatisticsMarshaller Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dms Show documentation
Show all versions of dms Show documentation
The AWS Java SDK for AWS Database Migration Service module holds the client classes that are used for
communicating with AWS Database Migration Service.
/*
* Copyright 2012-2017 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 software.amazon.awssdk.services.databasemigration.transform;
import javax.annotation.Generated;
import software.amazon.awssdk.core.exception.SdkClientException;
import software.amazon.awssdk.services.databasemigration.model.*;
import software.amazon.awssdk.core.protocol.*;
import software.amazon.awssdk.annotations.SdkInternalApi;
/**
* TableStatisticsMarshaller
*/
@Generated("software.amazon.awssdk:aws-java-sdk-code-generator")
@SdkInternalApi
public class TableStatisticsMarshaller {
private static final MarshallingInfo SCHEMANAME_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("SchemaName").build();
private static final MarshallingInfo TABLENAME_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("TableName").build();
private static final MarshallingInfo INSERTS_BINDING = MarshallingInfo.builder(MarshallingType.LONG)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("Inserts").build();
private static final MarshallingInfo DELETES_BINDING = MarshallingInfo.builder(MarshallingType.LONG)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("Deletes").build();
private static final MarshallingInfo UPDATES_BINDING = MarshallingInfo.builder(MarshallingType.LONG)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("Updates").build();
private static final MarshallingInfo DDLS_BINDING = MarshallingInfo.builder(MarshallingType.LONG)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("Ddls").build();
private static final MarshallingInfo FULLLOADROWS_BINDING = MarshallingInfo.builder(MarshallingType.LONG)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("FullLoadRows").build();
private static final MarshallingInfo FULLLOADCONDTNLCHKFAILEDROWS_BINDING = MarshallingInfo
.builder(MarshallingType.LONG).marshallLocation(MarshallLocation.PAYLOAD)
.marshallLocationName("FullLoadCondtnlChkFailedRows").build();
private static final MarshallingInfo FULLLOADERRORROWS_BINDING = MarshallingInfo.builder(MarshallingType.LONG)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("FullLoadErrorRows").build();
private static final MarshallingInfo LASTUPDATETIME_BINDING = MarshallingInfo
.builder(MarshallingType.INSTANT).marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("LastUpdateTime")
.build();
private static final MarshallingInfo TABLESTATE_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("TableState").build();
private static final MarshallingInfo VALIDATIONPENDINGRECORDS_BINDING = MarshallingInfo.builder(MarshallingType.LONG)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("ValidationPendingRecords").build();
private static final MarshallingInfo VALIDATIONFAILEDRECORDS_BINDING = MarshallingInfo.builder(MarshallingType.LONG)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("ValidationFailedRecords").build();
private static final MarshallingInfo VALIDATIONSUSPENDEDRECORDS_BINDING = MarshallingInfo.builder(MarshallingType.LONG)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("ValidationSuspendedRecords").build();
private static final MarshallingInfo VALIDATIONSTATE_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("ValidationState").build();
private static final TableStatisticsMarshaller INSTANCE = new TableStatisticsMarshaller();
public static TableStatisticsMarshaller getInstance() {
return INSTANCE;
}
/**
* Marshall the given parameter object.
*/
public void marshall(TableStatistics tableStatistics, ProtocolMarshaller protocolMarshaller) {
if (tableStatistics == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(tableStatistics.schemaName(), SCHEMANAME_BINDING);
protocolMarshaller.marshall(tableStatistics.tableName(), TABLENAME_BINDING);
protocolMarshaller.marshall(tableStatistics.inserts(), INSERTS_BINDING);
protocolMarshaller.marshall(tableStatistics.deletes(), DELETES_BINDING);
protocolMarshaller.marshall(tableStatistics.updates(), UPDATES_BINDING);
protocolMarshaller.marshall(tableStatistics.ddls(), DDLS_BINDING);
protocolMarshaller.marshall(tableStatistics.fullLoadRows(), FULLLOADROWS_BINDING);
protocolMarshaller.marshall(tableStatistics.fullLoadCondtnlChkFailedRows(), FULLLOADCONDTNLCHKFAILEDROWS_BINDING);
protocolMarshaller.marshall(tableStatistics.fullLoadErrorRows(), FULLLOADERRORROWS_BINDING);
protocolMarshaller.marshall(tableStatistics.lastUpdateTime(), LASTUPDATETIME_BINDING);
protocolMarshaller.marshall(tableStatistics.tableState(), TABLESTATE_BINDING);
protocolMarshaller.marshall(tableStatistics.validationPendingRecords(), VALIDATIONPENDINGRECORDS_BINDING);
protocolMarshaller.marshall(tableStatistics.validationFailedRecords(), VALIDATIONFAILEDRECORDS_BINDING);
protocolMarshaller.marshall(tableStatistics.validationSuspendedRecords(), VALIDATIONSUSPENDEDRECORDS_BINDING);
protocolMarshaller.marshall(tableStatistics.validationState(), VALIDATIONSTATE_BINDING);
} catch (Exception e) {
throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);
}
}
}