public Request<CreatePolicyVersionRequest> marshall(
      CreatePolicyVersionRequest createPolicyVersionRequest) {

    if (createPolicyVersionRequest == null) {
      throw new AmazonClientException("Invalid argument passed to marshall(...)");
    }

    Request<CreatePolicyVersionRequest> request =
        new DefaultRequest<CreatePolicyVersionRequest>(
            createPolicyVersionRequest, "AmazonIdentityManagement");
    request.addParameter("Action", "CreatePolicyVersion");
    request.addParameter("Version", "2010-05-08");
    request.setHttpMethod(HttpMethodName.POST);

    if (createPolicyVersionRequest.getPolicyArn() != null) {
      request.addParameter(
          "PolicyArn", StringUtils.fromString(createPolicyVersionRequest.getPolicyArn()));
    }

    if (createPolicyVersionRequest.getPolicyDocument() != null) {
      request.addParameter(
          "PolicyDocument", StringUtils.fromString(createPolicyVersionRequest.getPolicyDocument()));
    }

    if (createPolicyVersionRequest.getSetAsDefault() != null) {
      request.addParameter(
          "SetAsDefault", StringUtils.fromBoolean(createPolicyVersionRequest.getSetAsDefault()));
    }

    return request;
  }
  public Request<DeleteDBInstanceRequest> marshall(
      DeleteDBInstanceRequest deleteDBInstanceRequest) {
    Request<DeleteDBInstanceRequest> request =
        new DefaultRequest<DeleteDBInstanceRequest>(deleteDBInstanceRequest, "AmazonRDS");
    request.addParameter("Action", "DeleteDBInstance");
    request.addParameter("Version", "2010-07-28");
    if (deleteDBInstanceRequest != null) {
      if (deleteDBInstanceRequest.getDBInstanceIdentifier() != null) {
        request.addParameter(
            "DBInstanceIdentifier",
            StringUtils.fromString(deleteDBInstanceRequest.getDBInstanceIdentifier()));
      }
    }
    if (deleteDBInstanceRequest != null) {
      if (deleteDBInstanceRequest.isSkipFinalSnapshot() != null) {
        request.addParameter(
            "SkipFinalSnapshot",
            StringUtils.fromBoolean(deleteDBInstanceRequest.isSkipFinalSnapshot()));
      }
    }
    if (deleteDBInstanceRequest != null) {
      if (deleteDBInstanceRequest.getFinalDBSnapshotIdentifier() != null) {
        request.addParameter(
            "FinalDBSnapshotIdentifier",
            StringUtils.fromString(deleteDBInstanceRequest.getFinalDBSnapshotIdentifier()));
      }
    }

    return request;
  }
  public Request<StopInstancesRequest> marshall(StopInstancesRequest stopInstancesRequest) {

    if (stopInstancesRequest == null) {
      throw new AmazonClientException("Invalid argument passed to marshall(...)");
    }

    Request<StopInstancesRequest> request =
        new DefaultRequest<StopInstancesRequest>(stopInstancesRequest, "AmazonEC2");
    request.addParameter("Action", "StopInstances");
    request.addParameter("Version", "2016-04-01");
    request.setHttpMethod(HttpMethodName.POST);

    com.amazonaws.internal.SdkInternalList<String> instanceIdsList =
        (com.amazonaws.internal.SdkInternalList<String>) stopInstancesRequest.getInstanceIds();
    if (!instanceIdsList.isEmpty() || !instanceIdsList.isAutoConstruct()) {
      int instanceIdsListIndex = 1;

      for (String instanceIdsListValue : instanceIdsList) {
        if (instanceIdsListValue != null) {
          request.addParameter(
              "InstanceId." + instanceIdsListIndex, StringUtils.fromString(instanceIdsListValue));
        }
        instanceIdsListIndex++;
      }
    }

    if (stopInstancesRequest.getForce() != null) {
      request.addParameter("Force", StringUtils.fromBoolean(stopInstancesRequest.getForce()));
    }

    return request;
  }
  public Request<CreateImageRequest> marshall(CreateImageRequest createImageRequest) {

    if (createImageRequest == null) {
      throw new AmazonClientException("Invalid argument passed to marshall(...)");
    }

    Request<CreateImageRequest> request =
        new DefaultRequest<CreateImageRequest>(createImageRequest, "AmazonEC2");
    request.addParameter("Action", "CreateImage");
    request.addParameter("Version", "2012-04-01");

    if (createImageRequest.getInstanceId() != null) {
      request.addParameter(
          "InstanceId", StringUtils.fromString(createImageRequest.getInstanceId()));
    }
    if (createImageRequest.getName() != null) {
      request.addParameter("Name", StringUtils.fromString(createImageRequest.getName()));
    }
    if (createImageRequest.getDescription() != null) {
      request.addParameter(
          "Description", StringUtils.fromString(createImageRequest.getDescription()));
    }
    if (createImageRequest.isNoReboot() != null) {
      request.addParameter("NoReboot", StringUtils.fromBoolean(createImageRequest.isNoReboot()));
    }

    return request;
  }
  public Request<DetachVolumeRequest> marshall(DetachVolumeRequest detachVolumeRequest) {

    if (detachVolumeRequest == null) {
      throw new AmazonClientException("Invalid argument passed to marshall(...)");
    }

    Request<DetachVolumeRequest> request =
        new DefaultRequest<DetachVolumeRequest>(detachVolumeRequest, "AmazonEC2");
    request.addParameter("Action", "DetachVolume");
    request.addParameter("Version", "2014-05-01");

    if (detachVolumeRequest.getVolumeId() != null) {
      request.addParameter("VolumeId", StringUtils.fromString(detachVolumeRequest.getVolumeId()));
    }
    if (detachVolumeRequest.getInstanceId() != null) {
      request.addParameter(
          "InstanceId", StringUtils.fromString(detachVolumeRequest.getInstanceId()));
    }
    if (detachVolumeRequest.getDevice() != null) {
      request.addParameter("Device", StringUtils.fromString(detachVolumeRequest.getDevice()));
    }
    if (detachVolumeRequest.isForce() != null) {
      request.addParameter("Force", StringUtils.fromBoolean(detachVolumeRequest.isForce()));
    }

    return request;
  }
  public Request<DeleteReplicationGroupRequest> marshall(
      DeleteReplicationGroupRequest deleteReplicationGroupRequest) {

    if (deleteReplicationGroupRequest == null) {
      throw new AmazonClientException("Invalid argument passed to marshall(...)");
    }

    Request<DeleteReplicationGroupRequest> request =
        new DefaultRequest<DeleteReplicationGroupRequest>(
            deleteReplicationGroupRequest, "AmazonElastiCache");
    request.addParameter("Action", "DeleteReplicationGroup");
    request.addParameter("Version", "2015-02-02");

    if (deleteReplicationGroupRequest.getReplicationGroupId() != null) {
      request.addParameter(
          "ReplicationGroupId",
          StringUtils.fromString(deleteReplicationGroupRequest.getReplicationGroupId()));
    }
    if (deleteReplicationGroupRequest.isRetainPrimaryCluster() != null) {
      request.addParameter(
          "RetainPrimaryCluster",
          StringUtils.fromBoolean(deleteReplicationGroupRequest.isRetainPrimaryCluster()));
    }
    if (deleteReplicationGroupRequest.getFinalSnapshotIdentifier() != null) {
      request.addParameter(
          "FinalSnapshotIdentifier",
          StringUtils.fromString(deleteReplicationGroupRequest.getFinalSnapshotIdentifier()));
    }

    return request;
  }
  public Request<DeleteClusterRequest> marshall(DeleteClusterRequest deleteClusterRequest) {

    if (deleteClusterRequest == null) {
      throw new AmazonClientException("Invalid argument passed to marshall(...)");
    }

    Request<DeleteClusterRequest> request =
        new DefaultRequest<DeleteClusterRequest>(deleteClusterRequest, "AmazonRedshift");
    request.addParameter("Action", "DeleteCluster");
    request.addParameter("Version", "2012-12-01");

    if (deleteClusterRequest.getClusterIdentifier() != null) {
      request.addParameter(
          "ClusterIdentifier", StringUtils.fromString(deleteClusterRequest.getClusterIdentifier()));
    }
    if (deleteClusterRequest.isSkipFinalClusterSnapshot() != null) {
      request.addParameter(
          "SkipFinalClusterSnapshot",
          StringUtils.fromBoolean(deleteClusterRequest.isSkipFinalClusterSnapshot()));
    }
    if (deleteClusterRequest.getFinalClusterSnapshotIdentifier() != null) {
      request.addParameter(
          "FinalClusterSnapshotIdentifier",
          StringUtils.fromString(deleteClusterRequest.getFinalClusterSnapshotIdentifier()));
    }

    return request;
  }
  public Request<CreateOrUpdateTagsRequest> marshall(
      CreateOrUpdateTagsRequest createOrUpdateTagsRequest) {

    if (createOrUpdateTagsRequest == null) {
      throw new AmazonClientException("Invalid argument passed to marshall(...)");
    }

    Request<CreateOrUpdateTagsRequest> request =
        new DefaultRequest<CreateOrUpdateTagsRequest>(
            createOrUpdateTagsRequest, "AmazonAutoScaling");
    request.addParameter("Action", "CreateOrUpdateTags");
    request.addParameter("Version", "2011-01-01");

    java.util.List<Tag> tagsList = createOrUpdateTagsRequest.getTags();
    int tagsListIndex = 1;

    for (Tag tagsListValue : tagsList) {
      Tag tagMember = tagsListValue;
      if (tagMember != null) {
        if (tagMember.getResourceId() != null) {
          request.addParameter(
              "Tags.member." + tagsListIndex + ".ResourceId",
              StringUtils.fromString(tagMember.getResourceId()));
        }
        if (tagMember.getResourceType() != null) {
          request.addParameter(
              "Tags.member." + tagsListIndex + ".ResourceType",
              StringUtils.fromString(tagMember.getResourceType()));
        }
        if (tagMember.getKey() != null) {
          request.addParameter(
              "Tags.member." + tagsListIndex + ".Key", StringUtils.fromString(tagMember.getKey()));
        }
        if (tagMember.getValue() != null) {
          request.addParameter(
              "Tags.member." + tagsListIndex + ".Value",
              StringUtils.fromString(tagMember.getValue()));
        }
        if (tagMember.isPropagateAtLaunch() != null) {
          request.addParameter(
              "Tags.member." + tagsListIndex + ".PropagateAtLaunch",
              StringUtils.fromBoolean(tagMember.isPropagateAtLaunch()));
        }
      }

      tagsListIndex++;
    }

    return request;
  }
  public Request<ModifyEventSubscriptionRequest> marshall(
      ModifyEventSubscriptionRequest modifyEventSubscriptionRequest) {

    if (modifyEventSubscriptionRequest == null) {
      throw new AmazonClientException("Invalid argument passed to marshall(...)");
    }

    Request<ModifyEventSubscriptionRequest> request =
        new DefaultRequest<ModifyEventSubscriptionRequest>(
            modifyEventSubscriptionRequest, "AmazonRDS");
    request.addParameter("Action", "ModifyEventSubscription");
    request.addParameter("Version", "2013-02-12");

    if (modifyEventSubscriptionRequest.getSubscriptionName() != null) {
      request.addParameter(
          "SubscriptionName",
          StringUtils.fromString(modifyEventSubscriptionRequest.getSubscriptionName()));
    }
    if (modifyEventSubscriptionRequest.getSnsTopicArn() != null) {
      request.addParameter(
          "SnsTopicArn", StringUtils.fromString(modifyEventSubscriptionRequest.getSnsTopicArn()));
    }
    if (modifyEventSubscriptionRequest.getSourceType() != null) {
      request.addParameter(
          "SourceType", StringUtils.fromString(modifyEventSubscriptionRequest.getSourceType()));
    }

    java.util.List<String> eventCategoriesList =
        modifyEventSubscriptionRequest.getEventCategories();
    int eventCategoriesListIndex = 1;

    for (String eventCategoriesListValue : eventCategoriesList) {
      if (eventCategoriesListValue != null) {
        request.addParameter(
            "EventCategories.EventCategory." + eventCategoriesListIndex,
            StringUtils.fromString(eventCategoriesListValue));
      }

      eventCategoriesListIndex++;
    }
    if (modifyEventSubscriptionRequest.isEnabled() != null) {
      request.addParameter(
          "Enabled", StringUtils.fromBoolean(modifyEventSubscriptionRequest.isEnabled()));
    }

    return request;
  }
  public Request<AssignPrivateIpAddressesRequest> marshall(
      AssignPrivateIpAddressesRequest assignPrivateIpAddressesRequest) {

    if (assignPrivateIpAddressesRequest == null) {
      throw new AmazonClientException("Invalid argument passed to marshall(...)");
    }

    Request<AssignPrivateIpAddressesRequest> request =
        new DefaultRequest<AssignPrivateIpAddressesRequest>(
            assignPrivateIpAddressesRequest, "AmazonEC2");
    request.addParameter("Action", "AssignPrivateIpAddresses");
    request.addParameter("Version", "2013-07-15");

    if (assignPrivateIpAddressesRequest.getNetworkInterfaceId() != null) {
      request.addParameter(
          "NetworkInterfaceId",
          StringUtils.fromString(assignPrivateIpAddressesRequest.getNetworkInterfaceId()));
    }

    java.util.List<String> privateIpAddressesList =
        assignPrivateIpAddressesRequest.getPrivateIpAddresses();
    int privateIpAddressesListIndex = 1;

    for (String privateIpAddressesListValue : privateIpAddressesList) {
      if (privateIpAddressesListValue != null) {
        request.addParameter(
            "PrivateIpAddress." + privateIpAddressesListIndex,
            StringUtils.fromString(privateIpAddressesListValue));
      }

      privateIpAddressesListIndex++;
    }
    if (assignPrivateIpAddressesRequest.getSecondaryPrivateIpAddressCount() != null) {
      request.addParameter(
          "SecondaryPrivateIpAddressCount",
          StringUtils.fromInteger(
              assignPrivateIpAddressesRequest.getSecondaryPrivateIpAddressCount()));
    }
    if (assignPrivateIpAddressesRequest.isAllowReassignment() != null) {
      request.addParameter(
          "AllowReassignment",
          StringUtils.fromBoolean(assignPrivateIpAddressesRequest.isAllowReassignment()));
    }

    return request;
  }
  public Request<CancelSpotFleetRequestsRequest> marshall(
      CancelSpotFleetRequestsRequest cancelSpotFleetRequestsRequest) {

    if (cancelSpotFleetRequestsRequest == null) {
      throw new SdkClientException("Invalid argument passed to marshall(...)");
    }

    Request<CancelSpotFleetRequestsRequest> request =
        new DefaultRequest<CancelSpotFleetRequestsRequest>(
            cancelSpotFleetRequestsRequest, "AmazonEC2");
    request.addParameter("Action", "CancelSpotFleetRequests");
    request.addParameter("Version", "2016-11-15");
    request.setHttpMethod(HttpMethodName.POST);

    com.amazonaws.internal.SdkInternalList<String>
        cancelSpotFleetRequestsRequestSpotFleetRequestIdsList =
            (com.amazonaws.internal.SdkInternalList<String>)
                cancelSpotFleetRequestsRequest.getSpotFleetRequestIds();
    if (!cancelSpotFleetRequestsRequestSpotFleetRequestIdsList.isEmpty()
        || !cancelSpotFleetRequestsRequestSpotFleetRequestIdsList.isAutoConstruct()) {
      int spotFleetRequestIdsListIndex = 1;

      for (String cancelSpotFleetRequestsRequestSpotFleetRequestIdsListValue :
          cancelSpotFleetRequestsRequestSpotFleetRequestIdsList) {
        if (cancelSpotFleetRequestsRequestSpotFleetRequestIdsListValue != null) {
          request.addParameter(
              "SpotFleetRequestId." + spotFleetRequestIdsListIndex,
              StringUtils.fromString(cancelSpotFleetRequestsRequestSpotFleetRequestIdsListValue));
        }
        spotFleetRequestIdsListIndex++;
      }
    }

    if (cancelSpotFleetRequestsRequest.getTerminateInstances() != null) {
      request.addParameter(
          "TerminateInstances",
          StringUtils.fromBoolean(cancelSpotFleetRequestsRequest.getTerminateInstances()));
    }

    return request;
  }
  public Request<AcceptCertificateTransferRequest> marshall(
      AcceptCertificateTransferRequest acceptCertificateTransferRequest) {

    if (acceptCertificateTransferRequest == null) {
      throw new AmazonClientException("Invalid argument passed to marshall(...)");
    }

    Request<AcceptCertificateTransferRequest> request =
        new DefaultRequest<AcceptCertificateTransferRequest>(
            acceptCertificateTransferRequest, "AWSIot");

    request.setHttpMethod(HttpMethodName.PATCH);

    String uriResourcePath = "/accept-certificate-transfer/{certificateId}";

    uriResourcePath =
        uriResourcePath.replace(
            "{certificateId}",
            (acceptCertificateTransferRequest.getCertificateId() != null)
                ? SdkHttpUtils.urlEncode(
                    StringUtils.fromString(acceptCertificateTransferRequest.getCertificateId()),
                    false)
                : "");
    request.setResourcePath(uriResourcePath);

    if (acceptCertificateTransferRequest.getSetAsActive() != null) {
      request.addParameter(
          "setAsActive",
          StringUtils.fromBoolean(acceptCertificateTransferRequest.getSetAsActive()));
    }

    request.setContent(new ByteArrayInputStream(new byte[0]));
    if (!request.getHeaders().containsKey("Content-Type")) {
      request.addHeader("Content-Type", protocolFactory.getContentType());
    }

    return request;
  }
  public Request<ListCertificatesRequest> marshall(
      ListCertificatesRequest listCertificatesRequest) {

    if (listCertificatesRequest == null) {
      throw new AmazonClientException("Invalid argument passed to marshall(...)");
    }

    Request<ListCertificatesRequest> request =
        new DefaultRequest<ListCertificatesRequest>(listCertificatesRequest, "AWSIot");

    request.setHttpMethod(HttpMethodName.GET);

    String uriResourcePath = "/certificates";

    request.setResourcePath(uriResourcePath);

    if (listCertificatesRequest.getPageSize() != null) {
      request.addParameter(
          "pageSize", StringUtils.fromInteger(listCertificatesRequest.getPageSize()));
    }

    if (listCertificatesRequest.getMarker() != null) {
      request.addParameter("marker", StringUtils.fromString(listCertificatesRequest.getMarker()));
    }

    if (listCertificatesRequest.getAscendingOrder() != null) {
      request.addParameter(
          "isAscendingOrder", StringUtils.fromBoolean(listCertificatesRequest.getAscendingOrder()));
    }

    request.setContent(new ByteArrayInputStream(new byte[0]));
    if (!request.getHeaders().containsKey("Content-Type")) {
      request.addHeader("Content-Type", DEFAULT_CONTENT_TYPE);
    }

    return request;
  }
  public Request<ModifySubnetAttributeRequest> marshall(
      ModifySubnetAttributeRequest modifySubnetAttributeRequest) {

    if (modifySubnetAttributeRequest == null) {
      throw new AmazonClientException("Invalid argument passed to marshall(...)");
    }

    Request<ModifySubnetAttributeRequest> request =
        new DefaultRequest<ModifySubnetAttributeRequest>(modifySubnetAttributeRequest, "AmazonEC2");
    request.addParameter("Action", "ModifySubnetAttribute");
    request.addParameter("Version", "2015-10-01");

    if (modifySubnetAttributeRequest.getSubnetId() != null) {
      request.addParameter(
          "SubnetId", StringUtils.fromString(modifySubnetAttributeRequest.getSubnetId()));
    }
    if (modifySubnetAttributeRequest.isMapPublicIpOnLaunch() != null) {
      request.addParameter(
          "MapPublicIpOnLaunch.Value",
          StringUtils.fromBoolean(modifySubnetAttributeRequest.isMapPublicIpOnLaunch()));
    }

    return request;
  }
  public Request<RebootDBInstanceRequest> marshall(
      RebootDBInstanceRequest rebootDBInstanceRequest) {

    if (rebootDBInstanceRequest == null) {
      throw new AmazonClientException("Invalid argument passed to marshall(...)");
    }

    Request<RebootDBInstanceRequest> request =
        new DefaultRequest<RebootDBInstanceRequest>(rebootDBInstanceRequest, "AmazonRDS");
    request.addParameter("Action", "RebootDBInstance");
    request.addParameter("Version", "2013-09-09");

    if (rebootDBInstanceRequest.getDBInstanceIdentifier() != null) {
      request.addParameter(
          "DBInstanceIdentifier",
          StringUtils.fromString(rebootDBInstanceRequest.getDBInstanceIdentifier()));
    }
    if (rebootDBInstanceRequest.isForceFailover() != null) {
      request.addParameter(
          "ForceFailover", StringUtils.fromBoolean(rebootDBInstanceRequest.isForceFailover()));
    }

    return request;
  }
  public Request<ListPoliciesRequest> marshall(ListPoliciesRequest listPoliciesRequest) {

    if (listPoliciesRequest == null) {
      throw new AmazonClientException("Invalid argument passed to marshall(...)");
    }

    Request<ListPoliciesRequest> request =
        new DefaultRequest<ListPoliciesRequest>(listPoliciesRequest, "AmazonIdentityManagement");
    request.addParameter("Action", "ListPolicies");
    request.addParameter("Version", "2010-05-08");
    request.setHttpMethod(HttpMethodName.POST);

    if (listPoliciesRequest.getScope() != null) {
      request.addParameter("Scope", StringUtils.fromString(listPoliciesRequest.getScope()));
    }

    if (listPoliciesRequest.getOnlyAttached() != null) {
      request.addParameter(
          "OnlyAttached", StringUtils.fromBoolean(listPoliciesRequest.getOnlyAttached()));
    }

    if (listPoliciesRequest.getPathPrefix() != null) {
      request.addParameter(
          "PathPrefix", StringUtils.fromString(listPoliciesRequest.getPathPrefix()));
    }

    if (listPoliciesRequest.getMarker() != null) {
      request.addParameter("Marker", StringUtils.fromString(listPoliciesRequest.getMarker()));
    }

    if (listPoliciesRequest.getMaxItems() != null) {
      request.addParameter("MaxItems", StringUtils.fromInteger(listPoliciesRequest.getMaxItems()));
    }

    return request;
  }
  public Request<DetachNetworkInterfaceRequest> marshall(
      DetachNetworkInterfaceRequest detachNetworkInterfaceRequest) {

    if (detachNetworkInterfaceRequest == null) {
      throw new AmazonClientException("Invalid argument passed to marshall(...)");
    }

    Request<DetachNetworkInterfaceRequest> request =
        new DefaultRequest<DetachNetworkInterfaceRequest>(
            detachNetworkInterfaceRequest, "AmazonEC2");
    request.addParameter("Action", "DetachNetworkInterface");
    request.addParameter("Version", "2012-10-01");

    if (detachNetworkInterfaceRequest.getAttachmentId() != null) {
      request.addParameter(
          "AttachmentId", StringUtils.fromString(detachNetworkInterfaceRequest.getAttachmentId()));
    }
    if (detachNetworkInterfaceRequest.isForce() != null) {
      request.addParameter(
          "Force", StringUtils.fromBoolean(detachNetworkInterfaceRequest.isForce()));
    }

    return request;
  }
  public Request<ModifyDBInstanceRequest> marshall(
      ModifyDBInstanceRequest modifyDBInstanceRequest) {

    if (modifyDBInstanceRequest == null) {
      throw new AmazonClientException("Invalid argument passed to marshall(...)");
    }

    Request<ModifyDBInstanceRequest> request =
        new DefaultRequest<ModifyDBInstanceRequest>(modifyDBInstanceRequest, "AmazonRDS");
    request.addParameter("Action", "ModifyDBInstance");
    request.addParameter("Version", "2014-10-31");
    request.setHttpMethod(HttpMethodName.POST);

    if (modifyDBInstanceRequest.getDBInstanceIdentifier() != null) {
      request.addParameter(
          "DBInstanceIdentifier",
          StringUtils.fromString(modifyDBInstanceRequest.getDBInstanceIdentifier()));
    }

    if (modifyDBInstanceRequest.getAllocatedStorage() != null) {
      request.addParameter(
          "AllocatedStorage",
          StringUtils.fromInteger(modifyDBInstanceRequest.getAllocatedStorage()));
    }

    if (modifyDBInstanceRequest.getDBInstanceClass() != null) {
      request.addParameter(
          "DBInstanceClass", StringUtils.fromString(modifyDBInstanceRequest.getDBInstanceClass()));
    }

    if (modifyDBInstanceRequest.getDBSubnetGroupName() != null) {
      request.addParameter(
          "DBSubnetGroupName",
          StringUtils.fromString(modifyDBInstanceRequest.getDBSubnetGroupName()));
    }

    com.amazonaws.internal.SdkInternalList<String> dBSecurityGroupsList =
        (com.amazonaws.internal.SdkInternalList<String>)
            modifyDBInstanceRequest.getDBSecurityGroups();
    if (!dBSecurityGroupsList.isEmpty() || !dBSecurityGroupsList.isAutoConstruct()) {
      int dBSecurityGroupsListIndex = 1;

      for (String dBSecurityGroupsListValue : dBSecurityGroupsList) {
        if (dBSecurityGroupsListValue != null) {
          request.addParameter(
              "DBSecurityGroups.DBSecurityGroupName." + dBSecurityGroupsListIndex,
              StringUtils.fromString(dBSecurityGroupsListValue));
        }
        dBSecurityGroupsListIndex++;
      }
    }

    com.amazonaws.internal.SdkInternalList<String> vpcSecurityGroupIdsList =
        (com.amazonaws.internal.SdkInternalList<String>)
            modifyDBInstanceRequest.getVpcSecurityGroupIds();
    if (!vpcSecurityGroupIdsList.isEmpty() || !vpcSecurityGroupIdsList.isAutoConstruct()) {
      int vpcSecurityGroupIdsListIndex = 1;

      for (String vpcSecurityGroupIdsListValue : vpcSecurityGroupIdsList) {
        if (vpcSecurityGroupIdsListValue != null) {
          request.addParameter(
              "VpcSecurityGroupIds.VpcSecurityGroupId." + vpcSecurityGroupIdsListIndex,
              StringUtils.fromString(vpcSecurityGroupIdsListValue));
        }
        vpcSecurityGroupIdsListIndex++;
      }
    }

    if (modifyDBInstanceRequest.getApplyImmediately() != null) {
      request.addParameter(
          "ApplyImmediately",
          StringUtils.fromBoolean(modifyDBInstanceRequest.getApplyImmediately()));
    }

    if (modifyDBInstanceRequest.getMasterUserPassword() != null) {
      request.addParameter(
          "MasterUserPassword",
          StringUtils.fromString(modifyDBInstanceRequest.getMasterUserPassword()));
    }

    if (modifyDBInstanceRequest.getDBParameterGroupName() != null) {
      request.addParameter(
          "DBParameterGroupName",
          StringUtils.fromString(modifyDBInstanceRequest.getDBParameterGroupName()));
    }

    if (modifyDBInstanceRequest.getBackupRetentionPeriod() != null) {
      request.addParameter(
          "BackupRetentionPeriod",
          StringUtils.fromInteger(modifyDBInstanceRequest.getBackupRetentionPeriod()));
    }

    if (modifyDBInstanceRequest.getPreferredBackupWindow() != null) {
      request.addParameter(
          "PreferredBackupWindow",
          StringUtils.fromString(modifyDBInstanceRequest.getPreferredBackupWindow()));
    }

    if (modifyDBInstanceRequest.getPreferredMaintenanceWindow() != null) {
      request.addParameter(
          "PreferredMaintenanceWindow",
          StringUtils.fromString(modifyDBInstanceRequest.getPreferredMaintenanceWindow()));
    }

    if (modifyDBInstanceRequest.getMultiAZ() != null) {
      request.addParameter(
          "MultiAZ", StringUtils.fromBoolean(modifyDBInstanceRequest.getMultiAZ()));
    }

    if (modifyDBInstanceRequest.getEngineVersion() != null) {
      request.addParameter(
          "EngineVersion", StringUtils.fromString(modifyDBInstanceRequest.getEngineVersion()));
    }

    if (modifyDBInstanceRequest.getAllowMajorVersionUpgrade() != null) {
      request.addParameter(
          "AllowMajorVersionUpgrade",
          StringUtils.fromBoolean(modifyDBInstanceRequest.getAllowMajorVersionUpgrade()));
    }

    if (modifyDBInstanceRequest.getAutoMinorVersionUpgrade() != null) {
      request.addParameter(
          "AutoMinorVersionUpgrade",
          StringUtils.fromBoolean(modifyDBInstanceRequest.getAutoMinorVersionUpgrade()));
    }

    if (modifyDBInstanceRequest.getLicenseModel() != null) {
      request.addParameter(
          "LicenseModel", StringUtils.fromString(modifyDBInstanceRequest.getLicenseModel()));
    }

    if (modifyDBInstanceRequest.getIops() != null) {
      request.addParameter("Iops", StringUtils.fromInteger(modifyDBInstanceRequest.getIops()));
    }

    if (modifyDBInstanceRequest.getOptionGroupName() != null) {
      request.addParameter(
          "OptionGroupName", StringUtils.fromString(modifyDBInstanceRequest.getOptionGroupName()));
    }

    if (modifyDBInstanceRequest.getNewDBInstanceIdentifier() != null) {
      request.addParameter(
          "NewDBInstanceIdentifier",
          StringUtils.fromString(modifyDBInstanceRequest.getNewDBInstanceIdentifier()));
    }

    if (modifyDBInstanceRequest.getStorageType() != null) {
      request.addParameter(
          "StorageType", StringUtils.fromString(modifyDBInstanceRequest.getStorageType()));
    }

    if (modifyDBInstanceRequest.getTdeCredentialArn() != null) {
      request.addParameter(
          "TdeCredentialArn",
          StringUtils.fromString(modifyDBInstanceRequest.getTdeCredentialArn()));
    }

    if (modifyDBInstanceRequest.getTdeCredentialPassword() != null) {
      request.addParameter(
          "TdeCredentialPassword",
          StringUtils.fromString(modifyDBInstanceRequest.getTdeCredentialPassword()));
    }

    if (modifyDBInstanceRequest.getCACertificateIdentifier() != null) {
      request.addParameter(
          "CACertificateIdentifier",
          StringUtils.fromString(modifyDBInstanceRequest.getCACertificateIdentifier()));
    }

    if (modifyDBInstanceRequest.getDomain() != null) {
      request.addParameter("Domain", StringUtils.fromString(modifyDBInstanceRequest.getDomain()));
    }

    if (modifyDBInstanceRequest.getCopyTagsToSnapshot() != null) {
      request.addParameter(
          "CopyTagsToSnapshot",
          StringUtils.fromBoolean(modifyDBInstanceRequest.getCopyTagsToSnapshot()));
    }

    if (modifyDBInstanceRequest.getMonitoringInterval() != null) {
      request.addParameter(
          "MonitoringInterval",
          StringUtils.fromInteger(modifyDBInstanceRequest.getMonitoringInterval()));
    }

    if (modifyDBInstanceRequest.getDBPortNumber() != null) {
      request.addParameter(
          "DBPortNumber", StringUtils.fromInteger(modifyDBInstanceRequest.getDBPortNumber()));
    }

    if (modifyDBInstanceRequest.getPubliclyAccessible() != null) {
      request.addParameter(
          "PubliclyAccessible",
          StringUtils.fromBoolean(modifyDBInstanceRequest.getPubliclyAccessible()));
    }

    if (modifyDBInstanceRequest.getMonitoringRoleArn() != null) {
      request.addParameter(
          "MonitoringRoleArn",
          StringUtils.fromString(modifyDBInstanceRequest.getMonitoringRoleArn()));
    }

    if (modifyDBInstanceRequest.getDomainIAMRoleName() != null) {
      request.addParameter(
          "DomainIAMRoleName",
          StringUtils.fromString(modifyDBInstanceRequest.getDomainIAMRoleName()));
    }

    if (modifyDBInstanceRequest.getPromotionTier() != null) {
      request.addParameter(
          "PromotionTier", StringUtils.fromInteger(modifyDBInstanceRequest.getPromotionTier()));
    }

    return request;
  }
  public Request<CreateDBClusterRequest> marshall(CreateDBClusterRequest createDBClusterRequest) {

    if (createDBClusterRequest == null) {
      throw new SdkClientException("Invalid argument passed to marshall(...)");
    }

    Request<CreateDBClusterRequest> request =
        new DefaultRequest<CreateDBClusterRequest>(createDBClusterRequest, "AmazonRDS");
    request.addParameter("Action", "CreateDBCluster");
    request.addParameter("Version", "2014-10-31");
    request.setHttpMethod(HttpMethodName.POST);

    com.amazonaws.internal.SdkInternalList<String> availabilityZonesList =
        (com.amazonaws.internal.SdkInternalList<String>)
            createDBClusterRequest.getAvailabilityZones();
    if (!availabilityZonesList.isEmpty() || !availabilityZonesList.isAutoConstruct()) {
      int availabilityZonesListIndex = 1;

      for (String availabilityZonesListValue : availabilityZonesList) {
        if (availabilityZonesListValue != null) {
          request.addParameter(
              "AvailabilityZones.AvailabilityZone." + availabilityZonesListIndex,
              StringUtils.fromString(availabilityZonesListValue));
        }
        availabilityZonesListIndex++;
      }
    }

    if (createDBClusterRequest.getBackupRetentionPeriod() != null) {
      request.addParameter(
          "BackupRetentionPeriod",
          StringUtils.fromInteger(createDBClusterRequest.getBackupRetentionPeriod()));
    }

    if (createDBClusterRequest.getCharacterSetName() != null) {
      request.addParameter(
          "CharacterSetName", StringUtils.fromString(createDBClusterRequest.getCharacterSetName()));
    }

    if (createDBClusterRequest.getDatabaseName() != null) {
      request.addParameter(
          "DatabaseName", StringUtils.fromString(createDBClusterRequest.getDatabaseName()));
    }

    if (createDBClusterRequest.getDBClusterIdentifier() != null) {
      request.addParameter(
          "DBClusterIdentifier",
          StringUtils.fromString(createDBClusterRequest.getDBClusterIdentifier()));
    }

    if (createDBClusterRequest.getDBClusterParameterGroupName() != null) {
      request.addParameter(
          "DBClusterParameterGroupName",
          StringUtils.fromString(createDBClusterRequest.getDBClusterParameterGroupName()));
    }

    com.amazonaws.internal.SdkInternalList<String> vpcSecurityGroupIdsList =
        (com.amazonaws.internal.SdkInternalList<String>)
            createDBClusterRequest.getVpcSecurityGroupIds();
    if (!vpcSecurityGroupIdsList.isEmpty() || !vpcSecurityGroupIdsList.isAutoConstruct()) {
      int vpcSecurityGroupIdsListIndex = 1;

      for (String vpcSecurityGroupIdsListValue : vpcSecurityGroupIdsList) {
        if (vpcSecurityGroupIdsListValue != null) {
          request.addParameter(
              "VpcSecurityGroupIds.VpcSecurityGroupId." + vpcSecurityGroupIdsListIndex,
              StringUtils.fromString(vpcSecurityGroupIdsListValue));
        }
        vpcSecurityGroupIdsListIndex++;
      }
    }

    if (createDBClusterRequest.getDBSubnetGroupName() != null) {
      request.addParameter(
          "DBSubnetGroupName",
          StringUtils.fromString(createDBClusterRequest.getDBSubnetGroupName()));
    }

    if (createDBClusterRequest.getEngine() != null) {
      request.addParameter("Engine", StringUtils.fromString(createDBClusterRequest.getEngine()));
    }

    if (createDBClusterRequest.getEngineVersion() != null) {
      request.addParameter(
          "EngineVersion", StringUtils.fromString(createDBClusterRequest.getEngineVersion()));
    }

    if (createDBClusterRequest.getPort() != null) {
      request.addParameter("Port", StringUtils.fromInteger(createDBClusterRequest.getPort()));
    }

    if (createDBClusterRequest.getMasterUsername() != null) {
      request.addParameter(
          "MasterUsername", StringUtils.fromString(createDBClusterRequest.getMasterUsername()));
    }

    if (createDBClusterRequest.getMasterUserPassword() != null) {
      request.addParameter(
          "MasterUserPassword",
          StringUtils.fromString(createDBClusterRequest.getMasterUserPassword()));
    }

    if (createDBClusterRequest.getOptionGroupName() != null) {
      request.addParameter(
          "OptionGroupName", StringUtils.fromString(createDBClusterRequest.getOptionGroupName()));
    }

    if (createDBClusterRequest.getPreferredBackupWindow() != null) {
      request.addParameter(
          "PreferredBackupWindow",
          StringUtils.fromString(createDBClusterRequest.getPreferredBackupWindow()));
    }

    if (createDBClusterRequest.getPreferredMaintenanceWindow() != null) {
      request.addParameter(
          "PreferredMaintenanceWindow",
          StringUtils.fromString(createDBClusterRequest.getPreferredMaintenanceWindow()));
    }

    if (createDBClusterRequest.getReplicationSourceIdentifier() != null) {
      request.addParameter(
          "ReplicationSourceIdentifier",
          StringUtils.fromString(createDBClusterRequest.getReplicationSourceIdentifier()));
    }

    com.amazonaws.internal.SdkInternalList<Tag> tagsList =
        (com.amazonaws.internal.SdkInternalList<Tag>) createDBClusterRequest.getTags();
    if (!tagsList.isEmpty() || !tagsList.isAutoConstruct()) {
      int tagsListIndex = 1;

      for (Tag tagsListValue : tagsList) {

        if (tagsListValue.getKey() != null) {
          request.addParameter(
              "Tags.Tag." + tagsListIndex + ".Key", StringUtils.fromString(tagsListValue.getKey()));
        }

        if (tagsListValue.getValue() != null) {
          request.addParameter(
              "Tags.Tag." + tagsListIndex + ".Value",
              StringUtils.fromString(tagsListValue.getValue()));
        }
        tagsListIndex++;
      }
    }

    if (createDBClusterRequest.getStorageEncrypted() != null) {
      request.addParameter(
          "StorageEncrypted",
          StringUtils.fromBoolean(createDBClusterRequest.getStorageEncrypted()));
    }

    if (createDBClusterRequest.getKmsKeyId() != null) {
      request.addParameter(
          "KmsKeyId", StringUtils.fromString(createDBClusterRequest.getKmsKeyId()));
    }

    return request;
  }
  public Request<CreateDBInstanceReadReplicaRequest> marshall(
      CreateDBInstanceReadReplicaRequest createDBInstanceReadReplicaRequest) {

    if (createDBInstanceReadReplicaRequest == null) {
      throw new SdkClientException("Invalid argument passed to marshall(...)");
    }

    Request<CreateDBInstanceReadReplicaRequest> request =
        new DefaultRequest<CreateDBInstanceReadReplicaRequest>(
            createDBInstanceReadReplicaRequest, "AmazonRDS");
    request.addParameter("Action", "CreateDBInstanceReadReplica");
    request.addParameter("Version", "2014-10-31");
    request.setHttpMethod(HttpMethodName.POST);

    if (createDBInstanceReadReplicaRequest.getDBInstanceIdentifier() != null) {
      request.addParameter(
          "DBInstanceIdentifier",
          StringUtils.fromString(createDBInstanceReadReplicaRequest.getDBInstanceIdentifier()));
    }

    if (createDBInstanceReadReplicaRequest.getSourceDBInstanceIdentifier() != null) {
      request.addParameter(
          "SourceDBInstanceIdentifier",
          StringUtils.fromString(
              createDBInstanceReadReplicaRequest.getSourceDBInstanceIdentifier()));
    }

    if (createDBInstanceReadReplicaRequest.getDBInstanceClass() != null) {
      request.addParameter(
          "DBInstanceClass",
          StringUtils.fromString(createDBInstanceReadReplicaRequest.getDBInstanceClass()));
    }

    if (createDBInstanceReadReplicaRequest.getAvailabilityZone() != null) {
      request.addParameter(
          "AvailabilityZone",
          StringUtils.fromString(createDBInstanceReadReplicaRequest.getAvailabilityZone()));
    }

    if (createDBInstanceReadReplicaRequest.getPort() != null) {
      request.addParameter(
          "Port", StringUtils.fromInteger(createDBInstanceReadReplicaRequest.getPort()));
    }

    if (createDBInstanceReadReplicaRequest.getAutoMinorVersionUpgrade() != null) {
      request.addParameter(
          "AutoMinorVersionUpgrade",
          StringUtils.fromBoolean(createDBInstanceReadReplicaRequest.getAutoMinorVersionUpgrade()));
    }

    if (createDBInstanceReadReplicaRequest.getIops() != null) {
      request.addParameter(
          "Iops", StringUtils.fromInteger(createDBInstanceReadReplicaRequest.getIops()));
    }

    if (createDBInstanceReadReplicaRequest.getOptionGroupName() != null) {
      request.addParameter(
          "OptionGroupName",
          StringUtils.fromString(createDBInstanceReadReplicaRequest.getOptionGroupName()));
    }

    if (createDBInstanceReadReplicaRequest.getPubliclyAccessible() != null) {
      request.addParameter(
          "PubliclyAccessible",
          StringUtils.fromBoolean(createDBInstanceReadReplicaRequest.getPubliclyAccessible()));
    }

    com.amazonaws.internal.SdkInternalList<Tag> tagsList =
        (com.amazonaws.internal.SdkInternalList<Tag>) createDBInstanceReadReplicaRequest.getTags();
    if (!tagsList.isEmpty() || !tagsList.isAutoConstruct()) {
      int tagsListIndex = 1;

      for (Tag tagsListValue : tagsList) {

        if (tagsListValue.getKey() != null) {
          request.addParameter(
              "Tags.Tag." + tagsListIndex + ".Key", StringUtils.fromString(tagsListValue.getKey()));
        }

        if (tagsListValue.getValue() != null) {
          request.addParameter(
              "Tags.Tag." + tagsListIndex + ".Value",
              StringUtils.fromString(tagsListValue.getValue()));
        }
        tagsListIndex++;
      }
    }

    if (createDBInstanceReadReplicaRequest.getDBSubnetGroupName() != null) {
      request.addParameter(
          "DBSubnetGroupName",
          StringUtils.fromString(createDBInstanceReadReplicaRequest.getDBSubnetGroupName()));
    }

    if (createDBInstanceReadReplicaRequest.getStorageType() != null) {
      request.addParameter(
          "StorageType",
          StringUtils.fromString(createDBInstanceReadReplicaRequest.getStorageType()));
    }

    if (createDBInstanceReadReplicaRequest.getCopyTagsToSnapshot() != null) {
      request.addParameter(
          "CopyTagsToSnapshot",
          StringUtils.fromBoolean(createDBInstanceReadReplicaRequest.getCopyTagsToSnapshot()));
    }

    if (createDBInstanceReadReplicaRequest.getMonitoringInterval() != null) {
      request.addParameter(
          "MonitoringInterval",
          StringUtils.fromInteger(createDBInstanceReadReplicaRequest.getMonitoringInterval()));
    }

    if (createDBInstanceReadReplicaRequest.getMonitoringRoleArn() != null) {
      request.addParameter(
          "MonitoringRoleArn",
          StringUtils.fromString(createDBInstanceReadReplicaRequest.getMonitoringRoleArn()));
    }

    return request;
  }
  public Request<DescribeReservedDBInstancesRequest> marshall(
      DescribeReservedDBInstancesRequest describeReservedDBInstancesRequest) {

    if (describeReservedDBInstancesRequest == null) {
      throw new AmazonClientException("Invalid argument passed to marshall(...)");
    }

    Request<DescribeReservedDBInstancesRequest> request =
        new DefaultRequest<DescribeReservedDBInstancesRequest>(
            describeReservedDBInstancesRequest, "AmazonRDS");
    request.addParameter("Action", "DescribeReservedDBInstances");
    request.addParameter("Version", "2013-09-09");

    if (describeReservedDBInstancesRequest.getReservedDBInstanceId() != null) {
      request.addParameter(
          "ReservedDBInstanceId",
          StringUtils.fromString(describeReservedDBInstancesRequest.getReservedDBInstanceId()));
    }
    if (describeReservedDBInstancesRequest.getReservedDBInstancesOfferingId() != null) {
      request.addParameter(
          "ReservedDBInstancesOfferingId",
          StringUtils.fromString(
              describeReservedDBInstancesRequest.getReservedDBInstancesOfferingId()));
    }
    if (describeReservedDBInstancesRequest.getDBInstanceClass() != null) {
      request.addParameter(
          "DBInstanceClass",
          StringUtils.fromString(describeReservedDBInstancesRequest.getDBInstanceClass()));
    }
    if (describeReservedDBInstancesRequest.getDuration() != null) {
      request.addParameter(
          "Duration", StringUtils.fromString(describeReservedDBInstancesRequest.getDuration()));
    }
    if (describeReservedDBInstancesRequest.getProductDescription() != null) {
      request.addParameter(
          "ProductDescription",
          StringUtils.fromString(describeReservedDBInstancesRequest.getProductDescription()));
    }
    if (describeReservedDBInstancesRequest.getOfferingType() != null) {
      request.addParameter(
          "OfferingType",
          StringUtils.fromString(describeReservedDBInstancesRequest.getOfferingType()));
    }
    if (describeReservedDBInstancesRequest.isMultiAZ() != null) {
      request.addParameter(
          "MultiAZ", StringUtils.fromBoolean(describeReservedDBInstancesRequest.isMultiAZ()));
    }

    java.util.List<Filter> filtersList = describeReservedDBInstancesRequest.getFilters();
    int filtersListIndex = 1;

    for (Filter filtersListValue : filtersList) {
      Filter filterMember = filtersListValue;
      if (filterMember != null) {
        if (filterMember.getFilterName() != null) {
          request.addParameter(
              "Filters.Filter." + filtersListIndex + ".FilterName",
              StringUtils.fromString(filterMember.getFilterName()));
        }

        java.util.List<String> filterValueList = filterMember.getFilterValue();
        int filterValueListIndex = 1;

        for (String filterValueListValue : filterValueList) {
          if (filterValueListValue != null) {
            request.addParameter(
                "Filters.Filter." + filtersListIndex + ".FilterValue.Value." + filterValueListIndex,
                StringUtils.fromString(filterValueListValue));
          }

          filterValueListIndex++;
        }
      }

      filtersListIndex++;
    }
    if (describeReservedDBInstancesRequest.getMaxRecords() != null) {
      request.addParameter(
          "MaxRecords",
          StringUtils.fromInteger(describeReservedDBInstancesRequest.getMaxRecords()));
    }
    if (describeReservedDBInstancesRequest.getMarker() != null) {
      request.addParameter(
          "Marker", StringUtils.fromString(describeReservedDBInstancesRequest.getMarker()));
    }

    return request;
  }
  public Request<CreateDBInstanceRequest> marshall(
      CreateDBInstanceRequest createDBInstanceRequest) {

    if (createDBInstanceRequest == null) {
      throw new SdkClientException("Invalid argument passed to marshall(...)");
    }

    Request<CreateDBInstanceRequest> request =
        new DefaultRequest<CreateDBInstanceRequest>(createDBInstanceRequest, "AmazonRDS");
    request.addParameter("Action", "CreateDBInstance");
    request.addParameter("Version", "2014-10-31");
    request.setHttpMethod(HttpMethodName.POST);

    if (createDBInstanceRequest.getDBName() != null) {
      request.addParameter("DBName", StringUtils.fromString(createDBInstanceRequest.getDBName()));
    }

    if (createDBInstanceRequest.getDBInstanceIdentifier() != null) {
      request.addParameter(
          "DBInstanceIdentifier",
          StringUtils.fromString(createDBInstanceRequest.getDBInstanceIdentifier()));
    }

    if (createDBInstanceRequest.getAllocatedStorage() != null) {
      request.addParameter(
          "AllocatedStorage",
          StringUtils.fromInteger(createDBInstanceRequest.getAllocatedStorage()));
    }

    if (createDBInstanceRequest.getDBInstanceClass() != null) {
      request.addParameter(
          "DBInstanceClass", StringUtils.fromString(createDBInstanceRequest.getDBInstanceClass()));
    }

    if (createDBInstanceRequest.getEngine() != null) {
      request.addParameter("Engine", StringUtils.fromString(createDBInstanceRequest.getEngine()));
    }

    if (createDBInstanceRequest.getMasterUsername() != null) {
      request.addParameter(
          "MasterUsername", StringUtils.fromString(createDBInstanceRequest.getMasterUsername()));
    }

    if (createDBInstanceRequest.getMasterUserPassword() != null) {
      request.addParameter(
          "MasterUserPassword",
          StringUtils.fromString(createDBInstanceRequest.getMasterUserPassword()));
    }

    com.amazonaws.internal.SdkInternalList<String> dBSecurityGroupsList =
        (com.amazonaws.internal.SdkInternalList<String>)
            createDBInstanceRequest.getDBSecurityGroups();
    if (!dBSecurityGroupsList.isEmpty() || !dBSecurityGroupsList.isAutoConstruct()) {
      int dBSecurityGroupsListIndex = 1;

      for (String dBSecurityGroupsListValue : dBSecurityGroupsList) {
        if (dBSecurityGroupsListValue != null) {
          request.addParameter(
              "DBSecurityGroups.DBSecurityGroupName." + dBSecurityGroupsListIndex,
              StringUtils.fromString(dBSecurityGroupsListValue));
        }
        dBSecurityGroupsListIndex++;
      }
    }

    com.amazonaws.internal.SdkInternalList<String> vpcSecurityGroupIdsList =
        (com.amazonaws.internal.SdkInternalList<String>)
            createDBInstanceRequest.getVpcSecurityGroupIds();
    if (!vpcSecurityGroupIdsList.isEmpty() || !vpcSecurityGroupIdsList.isAutoConstruct()) {
      int vpcSecurityGroupIdsListIndex = 1;

      for (String vpcSecurityGroupIdsListValue : vpcSecurityGroupIdsList) {
        if (vpcSecurityGroupIdsListValue != null) {
          request.addParameter(
              "VpcSecurityGroupIds.VpcSecurityGroupId." + vpcSecurityGroupIdsListIndex,
              StringUtils.fromString(vpcSecurityGroupIdsListValue));
        }
        vpcSecurityGroupIdsListIndex++;
      }
    }

    if (createDBInstanceRequest.getAvailabilityZone() != null) {
      request.addParameter(
          "AvailabilityZone",
          StringUtils.fromString(createDBInstanceRequest.getAvailabilityZone()));
    }

    if (createDBInstanceRequest.getDBSubnetGroupName() != null) {
      request.addParameter(
          "DBSubnetGroupName",
          StringUtils.fromString(createDBInstanceRequest.getDBSubnetGroupName()));
    }

    if (createDBInstanceRequest.getPreferredMaintenanceWindow() != null) {
      request.addParameter(
          "PreferredMaintenanceWindow",
          StringUtils.fromString(createDBInstanceRequest.getPreferredMaintenanceWindow()));
    }

    if (createDBInstanceRequest.getDBParameterGroupName() != null) {
      request.addParameter(
          "DBParameterGroupName",
          StringUtils.fromString(createDBInstanceRequest.getDBParameterGroupName()));
    }

    if (createDBInstanceRequest.getBackupRetentionPeriod() != null) {
      request.addParameter(
          "BackupRetentionPeriod",
          StringUtils.fromInteger(createDBInstanceRequest.getBackupRetentionPeriod()));
    }

    if (createDBInstanceRequest.getPreferredBackupWindow() != null) {
      request.addParameter(
          "PreferredBackupWindow",
          StringUtils.fromString(createDBInstanceRequest.getPreferredBackupWindow()));
    }

    if (createDBInstanceRequest.getPort() != null) {
      request.addParameter("Port", StringUtils.fromInteger(createDBInstanceRequest.getPort()));
    }

    if (createDBInstanceRequest.getMultiAZ() != null) {
      request.addParameter(
          "MultiAZ", StringUtils.fromBoolean(createDBInstanceRequest.getMultiAZ()));
    }

    if (createDBInstanceRequest.getEngineVersion() != null) {
      request.addParameter(
          "EngineVersion", StringUtils.fromString(createDBInstanceRequest.getEngineVersion()));
    }

    if (createDBInstanceRequest.getAutoMinorVersionUpgrade() != null) {
      request.addParameter(
          "AutoMinorVersionUpgrade",
          StringUtils.fromBoolean(createDBInstanceRequest.getAutoMinorVersionUpgrade()));
    }

    if (createDBInstanceRequest.getLicenseModel() != null) {
      request.addParameter(
          "LicenseModel", StringUtils.fromString(createDBInstanceRequest.getLicenseModel()));
    }

    if (createDBInstanceRequest.getIops() != null) {
      request.addParameter("Iops", StringUtils.fromInteger(createDBInstanceRequest.getIops()));
    }

    if (createDBInstanceRequest.getOptionGroupName() != null) {
      request.addParameter(
          "OptionGroupName", StringUtils.fromString(createDBInstanceRequest.getOptionGroupName()));
    }

    if (createDBInstanceRequest.getCharacterSetName() != null) {
      request.addParameter(
          "CharacterSetName",
          StringUtils.fromString(createDBInstanceRequest.getCharacterSetName()));
    }

    if (createDBInstanceRequest.getPubliclyAccessible() != null) {
      request.addParameter(
          "PubliclyAccessible",
          StringUtils.fromBoolean(createDBInstanceRequest.getPubliclyAccessible()));
    }

    com.amazonaws.internal.SdkInternalList<Tag> tagsList =
        (com.amazonaws.internal.SdkInternalList<Tag>) createDBInstanceRequest.getTags();
    if (!tagsList.isEmpty() || !tagsList.isAutoConstruct()) {
      int tagsListIndex = 1;

      for (Tag tagsListValue : tagsList) {

        if (tagsListValue.getKey() != null) {
          request.addParameter(
              "Tags.Tag." + tagsListIndex + ".Key", StringUtils.fromString(tagsListValue.getKey()));
        }

        if (tagsListValue.getValue() != null) {
          request.addParameter(
              "Tags.Tag." + tagsListIndex + ".Value",
              StringUtils.fromString(tagsListValue.getValue()));
        }
        tagsListIndex++;
      }
    }

    if (createDBInstanceRequest.getDBClusterIdentifier() != null) {
      request.addParameter(
          "DBClusterIdentifier",
          StringUtils.fromString(createDBInstanceRequest.getDBClusterIdentifier()));
    }

    if (createDBInstanceRequest.getStorageType() != null) {
      request.addParameter(
          "StorageType", StringUtils.fromString(createDBInstanceRequest.getStorageType()));
    }

    if (createDBInstanceRequest.getTdeCredentialArn() != null) {
      request.addParameter(
          "TdeCredentialArn",
          StringUtils.fromString(createDBInstanceRequest.getTdeCredentialArn()));
    }

    if (createDBInstanceRequest.getTdeCredentialPassword() != null) {
      request.addParameter(
          "TdeCredentialPassword",
          StringUtils.fromString(createDBInstanceRequest.getTdeCredentialPassword()));
    }

    if (createDBInstanceRequest.getStorageEncrypted() != null) {
      request.addParameter(
          "StorageEncrypted",
          StringUtils.fromBoolean(createDBInstanceRequest.getStorageEncrypted()));
    }

    if (createDBInstanceRequest.getKmsKeyId() != null) {
      request.addParameter(
          "KmsKeyId", StringUtils.fromString(createDBInstanceRequest.getKmsKeyId()));
    }

    if (createDBInstanceRequest.getDomain() != null) {
      request.addParameter("Domain", StringUtils.fromString(createDBInstanceRequest.getDomain()));
    }

    if (createDBInstanceRequest.getCopyTagsToSnapshot() != null) {
      request.addParameter(
          "CopyTagsToSnapshot",
          StringUtils.fromBoolean(createDBInstanceRequest.getCopyTagsToSnapshot()));
    }

    if (createDBInstanceRequest.getMonitoringInterval() != null) {
      request.addParameter(
          "MonitoringInterval",
          StringUtils.fromInteger(createDBInstanceRequest.getMonitoringInterval()));
    }

    if (createDBInstanceRequest.getMonitoringRoleArn() != null) {
      request.addParameter(
          "MonitoringRoleArn",
          StringUtils.fromString(createDBInstanceRequest.getMonitoringRoleArn()));
    }

    if (createDBInstanceRequest.getDomainIAMRoleName() != null) {
      request.addParameter(
          "DomainIAMRoleName",
          StringUtils.fromString(createDBInstanceRequest.getDomainIAMRoleName()));
    }

    if (createDBInstanceRequest.getPromotionTier() != null) {
      request.addParameter(
          "PromotionTier", StringUtils.fromInteger(createDBInstanceRequest.getPromotionTier()));
    }

    if (createDBInstanceRequest.getTimezone() != null) {
      request.addParameter(
          "Timezone", StringUtils.fromString(createDBInstanceRequest.getTimezone()));
    }

    return request;
  }
  public Request<DescribeEnvironmentsRequest> marshall(
      DescribeEnvironmentsRequest describeEnvironmentsRequest) {

    if (describeEnvironmentsRequest == null) {
      throw new AmazonClientException("Invalid argument passed to marshall(...)");
    }

    Request<DescribeEnvironmentsRequest> request =
        new DefaultRequest<DescribeEnvironmentsRequest>(
            describeEnvironmentsRequest, "AWSElasticBeanstalk");
    request.addParameter("Action", "DescribeEnvironments");
    request.addParameter("Version", "2010-12-01");

    if (describeEnvironmentsRequest.getApplicationName() != null) {
      request.addParameter(
          "ApplicationName",
          StringUtils.fromString(describeEnvironmentsRequest.getApplicationName()));
    }
    if (describeEnvironmentsRequest.getVersionLabel() != null) {
      request.addParameter(
          "VersionLabel", StringUtils.fromString(describeEnvironmentsRequest.getVersionLabel()));
    }

    java.util.List<String> environmentIdsList = describeEnvironmentsRequest.getEnvironmentIds();
    int environmentIdsListIndex = 1;

    for (String environmentIdsListValue : environmentIdsList) {
      if (environmentIdsListValue != null) {
        request.addParameter(
            "EnvironmentIds.member." + environmentIdsListIndex,
            StringUtils.fromString(environmentIdsListValue));
      }

      environmentIdsListIndex++;
    }

    java.util.List<String> environmentNamesList = describeEnvironmentsRequest.getEnvironmentNames();
    int environmentNamesListIndex = 1;

    for (String environmentNamesListValue : environmentNamesList) {
      if (environmentNamesListValue != null) {
        request.addParameter(
            "EnvironmentNames.member." + environmentNamesListIndex,
            StringUtils.fromString(environmentNamesListValue));
      }

      environmentNamesListIndex++;
    }
    if (describeEnvironmentsRequest.isIncludeDeleted() != null) {
      request.addParameter(
          "IncludeDeleted",
          StringUtils.fromBoolean(describeEnvironmentsRequest.isIncludeDeleted()));
    }
    if (describeEnvironmentsRequest.getIncludedDeletedBackTo() != null) {
      request.addParameter(
          "IncludedDeletedBackTo",
          StringUtils.fromDate(describeEnvironmentsRequest.getIncludedDeletedBackTo()));
    }

    return request;
  }
  public Request<RegisterImageRequest> marshall(RegisterImageRequest registerImageRequest) {

    if (registerImageRequest == null) {
      throw new AmazonClientException("Invalid argument passed to marshall(...)");
    }

    Request<RegisterImageRequest> request =
        new DefaultRequest<RegisterImageRequest>(registerImageRequest, "AmazonEC2");
    request.addParameter("Action", "RegisterImage");
    request.addParameter("Version", "2014-05-01");

    if (registerImageRequest.getImageLocation() != null) {
      request.addParameter(
          "ImageLocation", StringUtils.fromString(registerImageRequest.getImageLocation()));
    }
    if (registerImageRequest.getName() != null) {
      request.addParameter("Name", StringUtils.fromString(registerImageRequest.getName()));
    }
    if (registerImageRequest.getDescription() != null) {
      request.addParameter(
          "Description", StringUtils.fromString(registerImageRequest.getDescription()));
    }
    if (registerImageRequest.getArchitecture() != null) {
      request.addParameter(
          "Architecture", StringUtils.fromString(registerImageRequest.getArchitecture()));
    }
    if (registerImageRequest.getKernelId() != null) {
      request.addParameter("KernelId", StringUtils.fromString(registerImageRequest.getKernelId()));
    }
    if (registerImageRequest.getRamdiskId() != null) {
      request.addParameter(
          "RamdiskId", StringUtils.fromString(registerImageRequest.getRamdiskId()));
    }
    if (registerImageRequest.getRootDeviceName() != null) {
      request.addParameter(
          "RootDeviceName", StringUtils.fromString(registerImageRequest.getRootDeviceName()));
    }

    java.util.List<BlockDeviceMapping> blockDeviceMappingsList =
        registerImageRequest.getBlockDeviceMappings();
    int blockDeviceMappingsListIndex = 1;

    for (BlockDeviceMapping blockDeviceMappingsListValue : blockDeviceMappingsList) {
      BlockDeviceMapping blockDeviceMappingMember = blockDeviceMappingsListValue;
      if (blockDeviceMappingMember != null) {
        if (blockDeviceMappingMember.getVirtualName() != null) {
          request.addParameter(
              "BlockDeviceMapping." + blockDeviceMappingsListIndex + ".VirtualName",
              StringUtils.fromString(blockDeviceMappingMember.getVirtualName()));
        }
        if (blockDeviceMappingMember.getDeviceName() != null) {
          request.addParameter(
              "BlockDeviceMapping." + blockDeviceMappingsListIndex + ".DeviceName",
              StringUtils.fromString(blockDeviceMappingMember.getDeviceName()));
        }
        EbsBlockDevice ebsBlockDeviceEbs = blockDeviceMappingMember.getEbs();
        if (ebsBlockDeviceEbs != null) {
          if (ebsBlockDeviceEbs.getSnapshotId() != null) {
            request.addParameter(
                "BlockDeviceMapping." + blockDeviceMappingsListIndex + ".Ebs.SnapshotId",
                StringUtils.fromString(ebsBlockDeviceEbs.getSnapshotId()));
          }
          if (ebsBlockDeviceEbs.getVolumeSize() != null) {
            request.addParameter(
                "BlockDeviceMapping." + blockDeviceMappingsListIndex + ".Ebs.VolumeSize",
                StringUtils.fromInteger(ebsBlockDeviceEbs.getVolumeSize()));
          }
          if (ebsBlockDeviceEbs.isDeleteOnTermination() != null) {
            request.addParameter(
                "BlockDeviceMapping." + blockDeviceMappingsListIndex + ".Ebs.DeleteOnTermination",
                StringUtils.fromBoolean(ebsBlockDeviceEbs.isDeleteOnTermination()));
          }
          if (ebsBlockDeviceEbs.getVolumeType() != null) {
            request.addParameter(
                "BlockDeviceMapping." + blockDeviceMappingsListIndex + ".Ebs.VolumeType",
                StringUtils.fromString(ebsBlockDeviceEbs.getVolumeType()));
          }
          if (ebsBlockDeviceEbs.getIops() != null) {
            request.addParameter(
                "BlockDeviceMapping." + blockDeviceMappingsListIndex + ".Ebs.Iops",
                StringUtils.fromInteger(ebsBlockDeviceEbs.getIops()));
          }
          if (ebsBlockDeviceEbs.isEncrypted() != null) {
            request.addParameter(
                "BlockDeviceMapping." + blockDeviceMappingsListIndex + ".Ebs.Encrypted",
                StringUtils.fromBoolean(ebsBlockDeviceEbs.isEncrypted()));
          }
        }
        if (blockDeviceMappingMember.getNoDevice() != null) {
          request.addParameter(
              "BlockDeviceMapping." + blockDeviceMappingsListIndex + ".NoDevice",
              StringUtils.fromString(blockDeviceMappingMember.getNoDevice()));
        }
      }

      blockDeviceMappingsListIndex++;
    }
    if (registerImageRequest.getVirtualizationType() != null) {
      request.addParameter(
          "VirtualizationType",
          StringUtils.fromString(registerImageRequest.getVirtualizationType()));
    }
    if (registerImageRequest.getSriovNetSupport() != null) {
      request.addParameter(
          "SriovNetSupport", StringUtils.fromString(registerImageRequest.getSriovNetSupport()));
    }

    return request;
  }
  public Request<ModifyInstanceAttributeRequest> marshall(
      ModifyInstanceAttributeRequest modifyInstanceAttributeRequest) {

    if (modifyInstanceAttributeRequest == null) {
      throw new AmazonClientException("Invalid argument passed to marshall(...)");
    }

    Request<ModifyInstanceAttributeRequest> request =
        new DefaultRequest<ModifyInstanceAttributeRequest>(
            modifyInstanceAttributeRequest, "AmazonEC2");
    request.addParameter("Action", "ModifyInstanceAttribute");
    request.addParameter("Version", "2012-10-01");

    if (modifyInstanceAttributeRequest.getInstanceId() != null) {
      request.addParameter(
          "InstanceId", StringUtils.fromString(modifyInstanceAttributeRequest.getInstanceId()));
    }
    if (modifyInstanceAttributeRequest.getAttribute() != null) {
      request.addParameter(
          "Attribute", StringUtils.fromString(modifyInstanceAttributeRequest.getAttribute()));
    }
    if (modifyInstanceAttributeRequest.getValue() != null) {
      request.addParameter(
          "Value", StringUtils.fromString(modifyInstanceAttributeRequest.getValue()));
    }

    java.util.List<InstanceBlockDeviceMappingSpecification> blockDeviceMappingsList =
        modifyInstanceAttributeRequest.getBlockDeviceMappings();
    int blockDeviceMappingsListIndex = 1;

    for (InstanceBlockDeviceMappingSpecification blockDeviceMappingsListValue :
        blockDeviceMappingsList) {
      InstanceBlockDeviceMappingSpecification instanceBlockDeviceMappingSpecificationMember =
          blockDeviceMappingsListValue;
      if (instanceBlockDeviceMappingSpecificationMember != null) {
        if (instanceBlockDeviceMappingSpecificationMember.getDeviceName() != null) {
          request.addParameter(
              "BlockDeviceMapping." + blockDeviceMappingsListIndex + ".DeviceName",
              StringUtils.fromString(
                  instanceBlockDeviceMappingSpecificationMember.getDeviceName()));
        }
        EbsInstanceBlockDeviceSpecification ebsInstanceBlockDeviceSpecificationEbs =
            instanceBlockDeviceMappingSpecificationMember.getEbs();
        if (ebsInstanceBlockDeviceSpecificationEbs != null) {
          if (ebsInstanceBlockDeviceSpecificationEbs.getVolumeId() != null) {
            request.addParameter(
                "BlockDeviceMapping." + blockDeviceMappingsListIndex + ".Ebs.VolumeId",
                StringUtils.fromString(ebsInstanceBlockDeviceSpecificationEbs.getVolumeId()));
          }
          if (ebsInstanceBlockDeviceSpecificationEbs.isDeleteOnTermination() != null) {
            request.addParameter(
                "BlockDeviceMapping." + blockDeviceMappingsListIndex + ".Ebs.DeleteOnTermination",
                StringUtils.fromBoolean(
                    ebsInstanceBlockDeviceSpecificationEbs.isDeleteOnTermination()));
          }
        }
        if (instanceBlockDeviceMappingSpecificationMember.getVirtualName() != null) {
          request.addParameter(
              "BlockDeviceMapping." + blockDeviceMappingsListIndex + ".VirtualName",
              StringUtils.fromString(
                  instanceBlockDeviceMappingSpecificationMember.getVirtualName()));
        }
        if (instanceBlockDeviceMappingSpecificationMember.getNoDevice() != null) {
          request.addParameter(
              "BlockDeviceMapping." + blockDeviceMappingsListIndex + ".NoDevice",
              StringUtils.fromString(instanceBlockDeviceMappingSpecificationMember.getNoDevice()));
        }
      }

      blockDeviceMappingsListIndex++;
    }
    if (modifyInstanceAttributeRequest.isSourceDestCheck() != null) {
      request.addParameter(
          "SourceDestCheck.Value",
          StringUtils.fromBoolean(modifyInstanceAttributeRequest.isSourceDestCheck()));
    }
    if (modifyInstanceAttributeRequest.isDisableApiTermination() != null) {
      request.addParameter(
          "DisableApiTermination.Value",
          StringUtils.fromBoolean(modifyInstanceAttributeRequest.isDisableApiTermination()));
    }
    if (modifyInstanceAttributeRequest.getInstanceType() != null) {
      request.addParameter(
          "InstanceType.Value",
          StringUtils.fromString(modifyInstanceAttributeRequest.getInstanceType()));
    }
    if (modifyInstanceAttributeRequest.getKernel() != null) {
      request.addParameter(
          "Kernel.Value", StringUtils.fromString(modifyInstanceAttributeRequest.getKernel()));
    }
    if (modifyInstanceAttributeRequest.getRamdisk() != null) {
      request.addParameter(
          "Ramdisk.Value", StringUtils.fromString(modifyInstanceAttributeRequest.getRamdisk()));
    }
    if (modifyInstanceAttributeRequest.getUserData() != null) {
      request.addParameter(
          "UserData.Value", StringUtils.fromString(modifyInstanceAttributeRequest.getUserData()));
    }
    if (modifyInstanceAttributeRequest.getInstanceInitiatedShutdownBehavior() != null) {
      request.addParameter(
          "InstanceInitiatedShutdownBehavior.Value",
          StringUtils.fromString(
              modifyInstanceAttributeRequest.getInstanceInitiatedShutdownBehavior()));
    }

    java.util.List<String> groupsList = modifyInstanceAttributeRequest.getGroups();
    int groupsListIndex = 1;

    for (String groupsListValue : groupsList) {
      if (groupsListValue != null) {
        request.addParameter("GroupId." + groupsListIndex, StringUtils.fromString(groupsListValue));
      }

      groupsListIndex++;
    }
    if (modifyInstanceAttributeRequest.isEbsOptimized() != null) {
      request.addParameter(
          "EbsOptimized.Value",
          StringUtils.fromBoolean(modifyInstanceAttributeRequest.isEbsOptimized()));
    }

    return request;
  }
  public Request<RestoreDBInstanceToPointInTimeRequest> marshall(
      RestoreDBInstanceToPointInTimeRequest restoreDBInstanceToPointInTimeRequest) {

    if (restoreDBInstanceToPointInTimeRequest == null) {
      throw new AmazonClientException("Invalid argument passed to marshall(...)");
    }

    Request<RestoreDBInstanceToPointInTimeRequest> request =
        new DefaultRequest<RestoreDBInstanceToPointInTimeRequest>(
            restoreDBInstanceToPointInTimeRequest, "AmazonRDS");
    request.addParameter("Action", "RestoreDBInstanceToPointInTime");
    request.addParameter("Version", "2013-01-10");

    if (restoreDBInstanceToPointInTimeRequest.getSourceDBInstanceIdentifier() != null) {
      request.addParameter(
          "SourceDBInstanceIdentifier",
          StringUtils.fromString(
              restoreDBInstanceToPointInTimeRequest.getSourceDBInstanceIdentifier()));
    }
    if (restoreDBInstanceToPointInTimeRequest.getTargetDBInstanceIdentifier() != null) {
      request.addParameter(
          "TargetDBInstanceIdentifier",
          StringUtils.fromString(
              restoreDBInstanceToPointInTimeRequest.getTargetDBInstanceIdentifier()));
    }
    if (restoreDBInstanceToPointInTimeRequest.getRestoreTime() != null) {
      request.addParameter(
          "RestoreTime",
          StringUtils.fromDate(restoreDBInstanceToPointInTimeRequest.getRestoreTime()));
    }
    if (restoreDBInstanceToPointInTimeRequest.isUseLatestRestorableTime() != null) {
      request.addParameter(
          "UseLatestRestorableTime",
          StringUtils.fromBoolean(
              restoreDBInstanceToPointInTimeRequest.isUseLatestRestorableTime()));
    }
    if (restoreDBInstanceToPointInTimeRequest.getDBInstanceClass() != null) {
      request.addParameter(
          "DBInstanceClass",
          StringUtils.fromString(restoreDBInstanceToPointInTimeRequest.getDBInstanceClass()));
    }
    if (restoreDBInstanceToPointInTimeRequest.getPort() != null) {
      request.addParameter(
          "Port", StringUtils.fromInteger(restoreDBInstanceToPointInTimeRequest.getPort()));
    }
    if (restoreDBInstanceToPointInTimeRequest.getAvailabilityZone() != null) {
      request.addParameter(
          "AvailabilityZone",
          StringUtils.fromString(restoreDBInstanceToPointInTimeRequest.getAvailabilityZone()));
    }
    if (restoreDBInstanceToPointInTimeRequest.getDBSubnetGroupName() != null) {
      request.addParameter(
          "DBSubnetGroupName",
          StringUtils.fromString(restoreDBInstanceToPointInTimeRequest.getDBSubnetGroupName()));
    }
    if (restoreDBInstanceToPointInTimeRequest.isMultiAZ() != null) {
      request.addParameter(
          "MultiAZ", StringUtils.fromBoolean(restoreDBInstanceToPointInTimeRequest.isMultiAZ()));
    }
    if (restoreDBInstanceToPointInTimeRequest.isPubliclyAccessible() != null) {
      request.addParameter(
          "PubliclyAccessible",
          StringUtils.fromBoolean(restoreDBInstanceToPointInTimeRequest.isPubliclyAccessible()));
    }
    if (restoreDBInstanceToPointInTimeRequest.isAutoMinorVersionUpgrade() != null) {
      request.addParameter(
          "AutoMinorVersionUpgrade",
          StringUtils.fromBoolean(
              restoreDBInstanceToPointInTimeRequest.isAutoMinorVersionUpgrade()));
    }
    if (restoreDBInstanceToPointInTimeRequest.getLicenseModel() != null) {
      request.addParameter(
          "LicenseModel",
          StringUtils.fromString(restoreDBInstanceToPointInTimeRequest.getLicenseModel()));
    }
    if (restoreDBInstanceToPointInTimeRequest.getDBName() != null) {
      request.addParameter(
          "DBName", StringUtils.fromString(restoreDBInstanceToPointInTimeRequest.getDBName()));
    }
    if (restoreDBInstanceToPointInTimeRequest.getEngine() != null) {
      request.addParameter(
          "Engine", StringUtils.fromString(restoreDBInstanceToPointInTimeRequest.getEngine()));
    }
    if (restoreDBInstanceToPointInTimeRequest.getIops() != null) {
      request.addParameter(
          "Iops", StringUtils.fromInteger(restoreDBInstanceToPointInTimeRequest.getIops()));
    }
    if (restoreDBInstanceToPointInTimeRequest.getOptionGroupName() != null) {
      request.addParameter(
          "OptionGroupName",
          StringUtils.fromString(restoreDBInstanceToPointInTimeRequest.getOptionGroupName()));
    }

    return request;
  }
  public Request<ModifyDBInstanceRequest> marshall(
      ModifyDBInstanceRequest modifyDBInstanceRequest) {

    if (modifyDBInstanceRequest == null) {
      throw new AmazonClientException("Invalid argument passed to marshall(...)");
    }

    Request<ModifyDBInstanceRequest> request =
        new DefaultRequest<ModifyDBInstanceRequest>(modifyDBInstanceRequest, "AmazonRDS");
    request.addParameter("Action", "ModifyDBInstance");
    request.addParameter("Version", "2011-04-01");

    if (modifyDBInstanceRequest.getDBInstanceIdentifier() != null) {
      request.addParameter(
          "DBInstanceIdentifier",
          StringUtils.fromString(modifyDBInstanceRequest.getDBInstanceIdentifier()));
    }
    if (modifyDBInstanceRequest.getAllocatedStorage() != null) {
      request.addParameter(
          "AllocatedStorage",
          StringUtils.fromInteger(modifyDBInstanceRequest.getAllocatedStorage()));
    }
    if (modifyDBInstanceRequest.getDBInstanceClass() != null) {
      request.addParameter(
          "DBInstanceClass", StringUtils.fromString(modifyDBInstanceRequest.getDBInstanceClass()));
    }

    java.util.List<String> dBSecurityGroupsList = modifyDBInstanceRequest.getDBSecurityGroups();
    int dBSecurityGroupsListIndex = 1;

    for (String dBSecurityGroupsListValue : dBSecurityGroupsList) {
      if (dBSecurityGroupsListValue != null) {
        request.addParameter(
            "DBSecurityGroups.DBSecurityGroupName." + dBSecurityGroupsListIndex,
            StringUtils.fromString(dBSecurityGroupsListValue));
      }

      dBSecurityGroupsListIndex++;
    }
    if (modifyDBInstanceRequest.isApplyImmediately() != null) {
      request.addParameter(
          "ApplyImmediately",
          StringUtils.fromBoolean(modifyDBInstanceRequest.isApplyImmediately()));
    }
    if (modifyDBInstanceRequest.getMasterUserPassword() != null) {
      request.addParameter(
          "MasterUserPassword",
          StringUtils.fromString(modifyDBInstanceRequest.getMasterUserPassword()));
    }
    if (modifyDBInstanceRequest.getDBParameterGroupName() != null) {
      request.addParameter(
          "DBParameterGroupName",
          StringUtils.fromString(modifyDBInstanceRequest.getDBParameterGroupName()));
    }
    if (modifyDBInstanceRequest.getBackupRetentionPeriod() != null) {
      request.addParameter(
          "BackupRetentionPeriod",
          StringUtils.fromInteger(modifyDBInstanceRequest.getBackupRetentionPeriod()));
    }
    if (modifyDBInstanceRequest.getPreferredBackupWindow() != null) {
      request.addParameter(
          "PreferredBackupWindow",
          StringUtils.fromString(modifyDBInstanceRequest.getPreferredBackupWindow()));
    }
    if (modifyDBInstanceRequest.getPreferredMaintenanceWindow() != null) {
      request.addParameter(
          "PreferredMaintenanceWindow",
          StringUtils.fromString(modifyDBInstanceRequest.getPreferredMaintenanceWindow()));
    }
    if (modifyDBInstanceRequest.isMultiAZ() != null) {
      request.addParameter("MultiAZ", StringUtils.fromBoolean(modifyDBInstanceRequest.isMultiAZ()));
    }
    if (modifyDBInstanceRequest.getEngineVersion() != null) {
      request.addParameter(
          "EngineVersion", StringUtils.fromString(modifyDBInstanceRequest.getEngineVersion()));
    }
    if (modifyDBInstanceRequest.isAllowMajorVersionUpgrade() != null) {
      request.addParameter(
          "AllowMajorVersionUpgrade",
          StringUtils.fromBoolean(modifyDBInstanceRequest.isAllowMajorVersionUpgrade()));
    }
    if (modifyDBInstanceRequest.isAutoMinorVersionUpgrade() != null) {
      request.addParameter(
          "AutoMinorVersionUpgrade",
          StringUtils.fromBoolean(modifyDBInstanceRequest.isAutoMinorVersionUpgrade()));
    }

    return request;
  }
  public Request<DescribeInstanceStatusRequest> marshall(
      DescribeInstanceStatusRequest describeInstanceStatusRequest) {

    if (describeInstanceStatusRequest == null) {
      throw new AmazonClientException("Invalid argument passed to marshall(...)");
    }

    Request<DescribeInstanceStatusRequest> request =
        new DefaultRequest<DescribeInstanceStatusRequest>(
            describeInstanceStatusRequest, "AmazonEC2");
    request.addParameter("Action", "DescribeInstanceStatus");
    request.addParameter("Version", "2015-10-01");

    java.util.List<String> instanceIdsList = describeInstanceStatusRequest.getInstanceIds();
    int instanceIdsListIndex = 1;

    for (String instanceIdsListValue : instanceIdsList) {
      if (instanceIdsListValue != null) {
        request.addParameter(
            "InstanceId." + instanceIdsListIndex, StringUtils.fromString(instanceIdsListValue));
      }

      instanceIdsListIndex++;
    }

    java.util.List<Filter> filtersList = describeInstanceStatusRequest.getFilters();
    int filtersListIndex = 1;

    for (Filter filtersListValue : filtersList) {
      Filter filterMember = filtersListValue;
      if (filterMember != null) {
        if (filterMember.getName() != null) {
          request.addParameter(
              "Filter." + filtersListIndex + ".Name",
              StringUtils.fromString(filterMember.getName()));
        }

        java.util.List<String> valuesList = filterMember.getValues();
        int valuesListIndex = 1;

        for (String valuesListValue : valuesList) {
          if (valuesListValue != null) {
            request.addParameter(
                "Filter." + filtersListIndex + ".Value." + valuesListIndex,
                StringUtils.fromString(valuesListValue));
          }

          valuesListIndex++;
        }
      }

      filtersListIndex++;
    }
    if (describeInstanceStatusRequest.getNextToken() != null) {
      request.addParameter(
          "NextToken", StringUtils.fromString(describeInstanceStatusRequest.getNextToken()));
    }
    if (describeInstanceStatusRequest.getMaxResults() != null) {
      request.addParameter(
          "MaxResults", StringUtils.fromInteger(describeInstanceStatusRequest.getMaxResults()));
    }
    if (describeInstanceStatusRequest.isIncludeAllInstances() != null) {
      request.addParameter(
          "IncludeAllInstances",
          StringUtils.fromBoolean(describeInstanceStatusRequest.isIncludeAllInstances()));
    }

    return request;
  }