software.amazon.awssdk.services.databasemigration.transform.S3SettingsMarshaller 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.SdkClientException;
import software.amazon.awssdk.services.databasemigration.model.*;
import software.amazon.awssdk.core.protocol.*;
import software.amazon.awssdk.annotations.SdkInternalApi;
/**
* S3SettingsMarshaller
*/
@Generated("software.amazon.awssdk:aws-java-sdk-code-generator")
@SdkInternalApi
public class S3SettingsMarshaller {
private static final MarshallingInfo SERVICEACCESSROLEARN_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("ServiceAccessRoleArn").build();
private static final MarshallingInfo EXTERNALTABLEDEFINITION_BINDING = MarshallingInfo
.builder(MarshallingType.STRING).marshallLocation(MarshallLocation.PAYLOAD)
.marshallLocationName("ExternalTableDefinition").build();
private static final MarshallingInfo CSVROWDELIMITER_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("CsvRowDelimiter").build();
private static final MarshallingInfo CSVDELIMITER_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("CsvDelimiter").build();
private static final MarshallingInfo BUCKETFOLDER_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("BucketFolder").build();
private static final MarshallingInfo BUCKETNAME_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("BucketName").build();
private static final MarshallingInfo COMPRESSIONTYPE_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("CompressionType").build();
private static final S3SettingsMarshaller INSTANCE = new S3SettingsMarshaller();
public static S3SettingsMarshaller getInstance() {
return INSTANCE;
}
/**
* Marshall the given parameter object.
*/
public void marshall(S3Settings s3Settings, ProtocolMarshaller protocolMarshaller) {
if (s3Settings == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(s3Settings.serviceAccessRoleArn(), SERVICEACCESSROLEARN_BINDING);
protocolMarshaller.marshall(s3Settings.externalTableDefinition(), EXTERNALTABLEDEFINITION_BINDING);
protocolMarshaller.marshall(s3Settings.csvRowDelimiter(), CSVROWDELIMITER_BINDING);
protocolMarshaller.marshall(s3Settings.csvDelimiter(), CSVDELIMITER_BINDING);
protocolMarshaller.marshall(s3Settings.bucketFolder(), BUCKETFOLDER_BINDING);
protocolMarshaller.marshall(s3Settings.bucketName(), BUCKETNAME_BINDING);
protocolMarshaller.marshall(s3Settings.compressionTypeString(), COMPRESSIONTYPE_BINDING);
} catch (Exception e) {
throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);
}
}
}