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<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"); 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++; } java.util.List<String> vpcSecurityGroupIdsList = modifyDBInstanceRequest.getVpcSecurityGroupIds(); int vpcSecurityGroupIdsListIndex = 1; for (String vpcSecurityGroupIdsListValue : vpcSecurityGroupIdsList) { if (vpcSecurityGroupIdsListValue != null) { request.addParameter( "VpcSecurityGroupIds.VpcSecurityGroupId." + vpcSecurityGroupIdsListIndex, StringUtils.fromString(vpcSecurityGroupIdsListValue)); } vpcSecurityGroupIdsListIndex++; } 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())); } 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.isCopyTagsToSnapshot() != null) { request.addParameter( "CopyTagsToSnapshot", StringUtils.fromBoolean(modifyDBInstanceRequest.isCopyTagsToSnapshot())); } if (modifyDBInstanceRequest.getMonitoringInterval() != null) { request.addParameter( "MonitoringInterval", StringUtils.fromInteger(modifyDBInstanceRequest.getMonitoringInterval())); } if (modifyDBInstanceRequest.getDBPortNumber() != null) { request.addParameter( "DBPortNumber", StringUtils.fromInteger(modifyDBInstanceRequest.getDBPortNumber())); } if (modifyDBInstanceRequest.isPubliclyAccessible() != null) { request.addParameter( "PubliclyAccessible", StringUtils.fromBoolean(modifyDBInstanceRequest.isPubliclyAccessible())); } if (modifyDBInstanceRequest.getMonitoringRoleArn() != null) { request.addParameter( "MonitoringRoleArn", StringUtils.fromString(modifyDBInstanceRequest.getMonitoringRoleArn())); } return request; }