com.amazonaws.services.docdbelastic.model.transform.ClusterMarshaller Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aws-java-sdk-docdbelastic Show documentation
Show all versions of aws-java-sdk-docdbelastic Show documentation
The AWS Java SDK for Amazon DocumentDB Elastic Clusters module holds the client classes that are used for communicating with Amazon DocumentDB Elastic Clusters Service
/*
* 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.docdbelastic.model.transform;
import java.util.List;
import javax.annotation.Generated;
import com.amazonaws.SdkClientException;
import com.amazonaws.services.docdbelastic.model.*;
import com.amazonaws.protocol.*;
import com.amazonaws.annotation.SdkInternalApi;
/**
* ClusterMarshaller
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
@SdkInternalApi
public class ClusterMarshaller {
private static final MarshallingInfo ADMINUSERNAME_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("adminUserName").build();
private static final MarshallingInfo AUTHTYPE_BINDING = MarshallingInfo.builder(MarshallingType.STRING).marshallLocation(MarshallLocation.PAYLOAD)
.marshallLocationName("authType").build();
private static final MarshallingInfo BACKUPRETENTIONPERIOD_BINDING = MarshallingInfo.builder(MarshallingType.INTEGER)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("backupRetentionPeriod").build();
private static final MarshallingInfo CLUSTERARN_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("clusterArn").build();
private static final MarshallingInfo CLUSTERENDPOINT_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("clusterEndpoint").build();
private static final MarshallingInfo CLUSTERNAME_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("clusterName").build();
private static final MarshallingInfo CREATETIME_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("createTime").build();
private static final MarshallingInfo KMSKEYID_BINDING = MarshallingInfo.builder(MarshallingType.STRING).marshallLocation(MarshallLocation.PAYLOAD)
.marshallLocationName("kmsKeyId").build();
private static final MarshallingInfo PREFERREDBACKUPWINDOW_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("preferredBackupWindow").build();
private static final MarshallingInfo PREFERREDMAINTENANCEWINDOW_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("preferredMaintenanceWindow").build();
private static final MarshallingInfo SHARDCAPACITY_BINDING = MarshallingInfo.builder(MarshallingType.INTEGER)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("shardCapacity").build();
private static final MarshallingInfo SHARDCOUNT_BINDING = MarshallingInfo.builder(MarshallingType.INTEGER)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("shardCount").build();
private static final MarshallingInfo SHARDINSTANCECOUNT_BINDING = MarshallingInfo.builder(MarshallingType.INTEGER)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("shardInstanceCount").build();
private static final MarshallingInfo SHARDS_BINDING = MarshallingInfo.builder(MarshallingType.LIST).marshallLocation(MarshallLocation.PAYLOAD)
.marshallLocationName("shards").build();
private static final MarshallingInfo STATUS_BINDING = MarshallingInfo.builder(MarshallingType.STRING).marshallLocation(MarshallLocation.PAYLOAD)
.marshallLocationName("status").build();
private static final MarshallingInfo SUBNETIDS_BINDING = MarshallingInfo.builder(MarshallingType.LIST).marshallLocation(MarshallLocation.PAYLOAD)
.marshallLocationName("subnetIds").build();
private static final MarshallingInfo VPCSECURITYGROUPIDS_BINDING = MarshallingInfo.builder(MarshallingType.LIST)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("vpcSecurityGroupIds").build();
private static final ClusterMarshaller instance = new ClusterMarshaller();
public static ClusterMarshaller getInstance() {
return instance;
}
/**
* Marshall the given parameter object.
*/
public void marshall(Cluster cluster, ProtocolMarshaller protocolMarshaller) {
if (cluster == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(cluster.getAdminUserName(), ADMINUSERNAME_BINDING);
protocolMarshaller.marshall(cluster.getAuthType(), AUTHTYPE_BINDING);
protocolMarshaller.marshall(cluster.getBackupRetentionPeriod(), BACKUPRETENTIONPERIOD_BINDING);
protocolMarshaller.marshall(cluster.getClusterArn(), CLUSTERARN_BINDING);
protocolMarshaller.marshall(cluster.getClusterEndpoint(), CLUSTERENDPOINT_BINDING);
protocolMarshaller.marshall(cluster.getClusterName(), CLUSTERNAME_BINDING);
protocolMarshaller.marshall(cluster.getCreateTime(), CREATETIME_BINDING);
protocolMarshaller.marshall(cluster.getKmsKeyId(), KMSKEYID_BINDING);
protocolMarshaller.marshall(cluster.getPreferredBackupWindow(), PREFERREDBACKUPWINDOW_BINDING);
protocolMarshaller.marshall(cluster.getPreferredMaintenanceWindow(), PREFERREDMAINTENANCEWINDOW_BINDING);
protocolMarshaller.marshall(cluster.getShardCapacity(), SHARDCAPACITY_BINDING);
protocolMarshaller.marshall(cluster.getShardCount(), SHARDCOUNT_BINDING);
protocolMarshaller.marshall(cluster.getShardInstanceCount(), SHARDINSTANCECOUNT_BINDING);
protocolMarshaller.marshall(cluster.getShards(), SHARDS_BINDING);
protocolMarshaller.marshall(cluster.getStatus(), STATUS_BINDING);
protocolMarshaller.marshall(cluster.getSubnetIds(), SUBNETIDS_BINDING);
protocolMarshaller.marshall(cluster.getVpcSecurityGroupIds(), VPCSECURITYGROUPIDS_BINDING);
} catch (Exception e) {
throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);
}
}
}