com.amazonaws.services.dax.model.transform.CreateClusterRequestMarshaller Maven / Gradle / Ivy
/*
* Copyright 2017-2022 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.dax.model.transform;
import java.util.List;
import javax.annotation.Generated;
import com.amazonaws.SdkClientException;
import com.amazonaws.services.dax.model.*;
import com.amazonaws.protocol.*;
import com.amazonaws.annotation.SdkInternalApi;
/**
* CreateClusterRequestMarshaller
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
@SdkInternalApi
public class CreateClusterRequestMarshaller {
private static final MarshallingInfo CLUSTERNAME_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("ClusterName").build();
private static final MarshallingInfo NODETYPE_BINDING = MarshallingInfo.builder(MarshallingType.STRING).marshallLocation(MarshallLocation.PAYLOAD)
.marshallLocationName("NodeType").build();
private static final MarshallingInfo DESCRIPTION_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("Description").build();
private static final MarshallingInfo REPLICATIONFACTOR_BINDING = MarshallingInfo.builder(MarshallingType.INTEGER)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("ReplicationFactor").build();
private static final MarshallingInfo AVAILABILITYZONES_BINDING = MarshallingInfo.builder(MarshallingType.LIST)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("AvailabilityZones").build();
private static final MarshallingInfo SUBNETGROUPNAME_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("SubnetGroupName").build();
private static final MarshallingInfo SECURITYGROUPIDS_BINDING = MarshallingInfo.builder(MarshallingType.LIST)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("SecurityGroupIds").build();
private static final MarshallingInfo PREFERREDMAINTENANCEWINDOW_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("PreferredMaintenanceWindow").build();
private static final MarshallingInfo NOTIFICATIONTOPICARN_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("NotificationTopicArn").build();
private static final MarshallingInfo IAMROLEARN_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("IamRoleArn").build();
private static final MarshallingInfo PARAMETERGROUPNAME_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("ParameterGroupName").build();
private static final MarshallingInfo TAGS_BINDING = MarshallingInfo.builder(MarshallingType.LIST).marshallLocation(MarshallLocation.PAYLOAD)
.marshallLocationName("Tags").build();
private static final MarshallingInfo SSESPECIFICATION_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("SSESpecification").build();
private static final MarshallingInfo CLUSTERENDPOINTENCRYPTIONTYPE_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("ClusterEndpointEncryptionType").build();
private static final CreateClusterRequestMarshaller instance = new CreateClusterRequestMarshaller();
public static CreateClusterRequestMarshaller getInstance() {
return instance;
}
/**
* Marshall the given parameter object.
*/
public void marshall(CreateClusterRequest createClusterRequest, ProtocolMarshaller protocolMarshaller) {
if (createClusterRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(createClusterRequest.getClusterName(), CLUSTERNAME_BINDING);
protocolMarshaller.marshall(createClusterRequest.getNodeType(), NODETYPE_BINDING);
protocolMarshaller.marshall(createClusterRequest.getDescription(), DESCRIPTION_BINDING);
protocolMarshaller.marshall(createClusterRequest.getReplicationFactor(), REPLICATIONFACTOR_BINDING);
protocolMarshaller.marshall(createClusterRequest.getAvailabilityZones(), AVAILABILITYZONES_BINDING);
protocolMarshaller.marshall(createClusterRequest.getSubnetGroupName(), SUBNETGROUPNAME_BINDING);
protocolMarshaller.marshall(createClusterRequest.getSecurityGroupIds(), SECURITYGROUPIDS_BINDING);
protocolMarshaller.marshall(createClusterRequest.getPreferredMaintenanceWindow(), PREFERREDMAINTENANCEWINDOW_BINDING);
protocolMarshaller.marshall(createClusterRequest.getNotificationTopicArn(), NOTIFICATIONTOPICARN_BINDING);
protocolMarshaller.marshall(createClusterRequest.getIamRoleArn(), IAMROLEARN_BINDING);
protocolMarshaller.marshall(createClusterRequest.getParameterGroupName(), PARAMETERGROUPNAME_BINDING);
protocolMarshaller.marshall(createClusterRequest.getTags(), TAGS_BINDING);
protocolMarshaller.marshall(createClusterRequest.getSSESpecification(), SSESPECIFICATION_BINDING);
protocolMarshaller.marshall(createClusterRequest.getClusterEndpointEncryptionType(), CLUSTERENDPOINTENCRYPTIONTYPE_BINDING);
} catch (Exception e) {
throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);
}
}
}