public Request<CreateEnvironmentRequest> marshall(
      CreateEnvironmentRequest createEnvironmentRequest) {
    Request<CreateEnvironmentRequest> request =
        new DefaultRequest<CreateEnvironmentRequest>(
            createEnvironmentRequest, "AWSElasticBeanstalk");
    request.addParameter("Action", "CreateEnvironment");
    request.addParameter("Version", "2010-12-01");
    if (createEnvironmentRequest != null) {
      if (createEnvironmentRequest.getApplicationName() != null) {
        request.addParameter(
            "ApplicationName",
            StringUtils.fromString(createEnvironmentRequest.getApplicationName()));
      }
    }
    if (createEnvironmentRequest != null) {
      if (createEnvironmentRequest.getVersionLabel() != null) {
        request.addParameter(
            "VersionLabel", StringUtils.fromString(createEnvironmentRequest.getVersionLabel()));
      }
    }
    if (createEnvironmentRequest != null) {
      if (createEnvironmentRequest.getEnvironmentName() != null) {
        request.addParameter(
            "EnvironmentName",
            StringUtils.fromString(createEnvironmentRequest.getEnvironmentName()));
      }
    }
    if (createEnvironmentRequest != null) {
      if (createEnvironmentRequest.getTemplateName() != null) {
        request.addParameter(
            "TemplateName", StringUtils.fromString(createEnvironmentRequest.getTemplateName()));
      }
    }
    if (createEnvironmentRequest != null) {
      if (createEnvironmentRequest.getSolutionStackName() != null) {
        request.addParameter(
            "SolutionStackName",
            StringUtils.fromString(createEnvironmentRequest.getSolutionStackName()));
      }
    }
    if (createEnvironmentRequest != null) {
      if (createEnvironmentRequest.getCNAMEPrefix() != null) {
        request.addParameter(
            "CNAMEPrefix", StringUtils.fromString(createEnvironmentRequest.getCNAMEPrefix()));
      }
    }
    if (createEnvironmentRequest != null) {
      if (createEnvironmentRequest.getDescription() != null) {
        request.addParameter(
            "Description", StringUtils.fromString(createEnvironmentRequest.getDescription()));
      }
    }

    if (createEnvironmentRequest != null) {
      java.util.List<ConfigurationOptionSetting> optionSettingsList =
          createEnvironmentRequest.getOptionSettings();
      int optionSettingsListIndex = 1;
      for (ConfigurationOptionSetting optionSettingsListValue : optionSettingsList) {
        if (optionSettingsListValue != null) {
          if (optionSettingsListValue.getNamespace() != null) {
            request.addParameter(
                "OptionSettings.member." + optionSettingsListIndex + ".Namespace",
                StringUtils.fromString(optionSettingsListValue.getNamespace()));
          }
        }
        if (optionSettingsListValue != null) {
          if (optionSettingsListValue.getOptionName() != null) {
            request.addParameter(
                "OptionSettings.member." + optionSettingsListIndex + ".OptionName",
                StringUtils.fromString(optionSettingsListValue.getOptionName()));
          }
        }
        if (optionSettingsListValue != null) {
          if (optionSettingsListValue.getValue() != null) {
            request.addParameter(
                "OptionSettings.member." + optionSettingsListIndex + ".Value",
                StringUtils.fromString(optionSettingsListValue.getValue()));
          }
        }

        optionSettingsListIndex++;
      }
    }

    if (createEnvironmentRequest != null) {
      java.util.List<OptionSpecification> optionsToRemoveList =
          createEnvironmentRequest.getOptionsToRemove();
      int optionsToRemoveListIndex = 1;
      for (OptionSpecification optionsToRemoveListValue : optionsToRemoveList) {
        if (optionsToRemoveListValue != null) {
          if (optionsToRemoveListValue.getNamespace() != null) {
            request.addParameter(
                "OptionsToRemove.member." + optionsToRemoveListIndex + ".Namespace",
                StringUtils.fromString(optionsToRemoveListValue.getNamespace()));
          }
        }
        if (optionsToRemoveListValue != null) {
          if (optionsToRemoveListValue.getOptionName() != null) {
            request.addParameter(
                "OptionsToRemove.member." + optionsToRemoveListIndex + ".OptionName",
                StringUtils.fromString(optionsToRemoveListValue.getOptionName()));
          }
        }

        optionsToRemoveListIndex++;
      }
    }

    return request;
  }
 public void addOptionToRemove(final OptionSpecification os) {
   if (os.getOptionName().equals("ImageId")) {
     addOption(
         new OptionSetting("ImageId", "ami-0000000c", "transcend:autoscaling:launchconfiguration"),
         true);
   } else if (os.getOptionName().equals("Notification Endpoint")) {
     addOption(
         new OptionSetting("Notification Endpoint", null, "transcend:elasticbeanstalk:sns:topics"),
         true);
   } else if (os.getOptionName().equals("PARAM1")) {
     addOption(
         new OptionSetting("PARAM1", null, "transcend:elasticbeanstalk:application:environment"),
         true);
   } else if (os.getOptionName().equals("PARAM2")) {
     addOption(
         new OptionSetting("PARAM2", null, "transcend:elasticbeanstalk:application:environment"),
         true);
   } else if (os.getOptionName().equals("PARAM3")) {
     addOption(
         new OptionSetting("PARAM3", null, "transcend:elasticbeanstalk:application:environment"),
         true);
   } else if (os.getOptionName().equals("PARAM4")) {
     addOption(
         new OptionSetting("PARAM4", null, "transcend:elasticbeanstalk:application:environment"),
         true);
   } else if (os.getOptionName().equals("PARAM5")) {
     addOption(
         new OptionSetting("PARAM5", null, "transcend:elasticbeanstalk:application:environment"),
         true);
   } else if (os.getOptionName().equals("JDBC_CONNECTION_STRING")) {
     addOption(
         new OptionSetting(
             "JDBC_CONNECTION_STRING", null, "transcend:elasticbeanstalk:application:environment"),
         true);
   } else if (os.getOptionName().equals("SecurityGroups")) {
     addOption(
         new OptionSetting(
             "SecurityGroups",
             "elasticbeanstalk-default",
             "transcend:autoscaling:launchconfiguration"),
         true);
   } else if (os.getOptionName().equals("UnhealthyThreshold")) {
     addOption(new OptionSetting("UnhealthyThreshold", "5", "transcend:elb:healthcheck"), true);
   } else if (os.getOptionName().equals("InstanceType")) {
     addOption(
         new OptionSetting("InstanceType", "m1.tiny", "transcend:autoscaling:launchconfiguration"),
         true);
   } else if (os.getOptionName().equals("Statistic")) {
     addOption(new OptionSetting("Statistic", "Average", "transcend:autoscaling:trigger"), true);
   } else if (os.getOptionName().equals("LoadBalancerHTTPSPort")) {
     addOption(
         new OptionSetting("LoadBalancerHTTPSPort", "OFF", "transcend:elb:loadbalancer"), true);
   } else if (os.getOptionName().equals("Stickiness Cookie Expiration")) {
     addOption(
         new OptionSetting("Stickiness Cookie Expiration", "0", "transcend:elb:policies"), true);
   } else if (os.getOptionName().equals("MeasureName")) {
     addOption(
         new OptionSetting("MeasureName", "NetworkOut", "transcend:autoscaling:trigger"), true);
   } else if (os.getOptionName().equals("Interval")) {
     addOption(new OptionSetting("Interval", "30", "transcend:elb:healthcheck"), true);
   } else if (os.getOptionName().equals("Application Healthcheck URL")) {
     addOption(
         new OptionSetting(
             "Application Healthcheck URL", "/", "transcend:elasticbeanstalk:application"),
         true);
   } else if (os.getOptionName().equals("Notification Topic ARN")) {
     addOption(
         new OptionSetting(
             "Notification Topic ARN", null, "transcend:elasticbeanstalk:sns:topics"),
         true);
   } else if (os.getOptionName().equals("LowerBreachScaleIncrement")) {
     addOption(
         new OptionSetting("LowerBreachScaleIncrement", "-1", "transcend:autoscaling:trigger"),
         true);
   } else if (os.getOptionName().equals("XX:MaxPermSize")) {
     addOption(
         new OptionSetting(
             "XX:MaxPermSize", "64m", "transcend:elasticbeanstalk:container:tomcat:jvmoptions"),
         true);
   } else if (os.getOptionName().equals("UpperBreachScaleIncrement")) {
     addOption(
         new OptionSetting("UpperBreachScaleIncrement", "1", "transcend:autoscaling:trigger"),
         true);
   } else if (os.getOptionName().equals("MinSize")) {
     addOption(new OptionSetting("MinSize", "1", "transcend:autoscaling:asg"), true);
   } else if (os.getOptionName().equals("Custom Availability Zones")) {
     addOption(
         new OptionSetting("Custom Availability Zones", "nova", "transcend:autoscaling:asg"),
         true);
   } else if (os.getOptionName().equals("Availability Zones")) {
     addOption(
         new OptionSetting("Availability Zones", "Any 1", "transcend:autoscaling:asg"), true);
   } else if (os.getOptionName().equals("LogPublicationControl")) {
     addOption(
         new OptionSetting(
             "LogPublicationControl", "false", "transcend:elasticbeanstalk:hostmanager"),
         true);
   } else if (os.getOptionName().equals("JVM Options")) {
     addOption(
         new OptionSetting(
             "JVM Options", null, "transcend:elasticbeanstalk:container:tomcat:jvmoptions"),
         true);
   } else if (os.getOptionName().equals("Notification Topic Name")) {
     addOption(
         new OptionSetting(
             "Notification Topic Name", null, "transcend:elasticbeanstalk:sns:topics"),
         true);
   } else if (os.getOptionName().equals("LoadBalancerHTTPPort")) {
     addOption(
         new OptionSetting("LoadBalancerHTTPPort", "80", "transcend:elb:loadbalancer"), true);
   } else if (os.getOptionName().equals("Timeout")) {
     addOption(new OptionSetting("Timeout", "5", "transcend:elb:healthcheck"), true);
   } else if (os.getOptionName().equals("BreachDuration")) {
     addOption(new OptionSetting("BreachDuration", "2", "transcend:autoscaling:trigger"), true);
   } else if (os.getOptionName().equals("MonitoringInterval")) {
     addOption(
         new OptionSetting(
             "MonitoringInterval", "5 minute", "transcend:autoscaling:launchconfiguration"),
         true);
   } else if (os.getOptionName().equals("MaxSize")) {
     addOption(new OptionSetting("MaxSize", "4", "transcend:autoscaling:asg"), true);
   } else if (os.getOptionName().equals("LowerThreshold")) {
     addOption(
         new OptionSetting("LowerThreshold", "2000000", "transcend:autoscaling:trigger"), true);
   } else if (os.getOptionName().equals("AWS_SECRET_KEY")) {
     addOption(
         new OptionSetting(
             "AWS_SECRET_KEY", null, "transcend:elasticbeanstalk:application:environment"),
         true);
   } else if (os.getOptionName().equals("AWS_ACCESS_KEY_ID")) {
     addOption(
         new OptionSetting(
             "AWS_ACCESS_KEY_ID", null, "transcend:elasticbeanstalk:application:environment"),
         true);
   } else if (os.getOptionName().equals("UpperThresholds")) {
     addOption(
         new OptionSetting("UpperThresholds", "6000000", "transcend:autoscaling:trigger"), true);
   } else if (os.getOptionName().equals("Notification Protocol")) {
     addOption(
         new OptionSetting(
             "Notification Protocol", "email", "transcend:elasticbeanstalk:sns:topics"),
         true);
   } else if (os.getOptionName().equals("Unit")) {
     addOption(new OptionSetting("Unit", "Bytes", "transcend:autoscaling:trigger"), true);
   } else if (os.getOptionName().equals("Xmx")) {
     addOption(
         new OptionSetting(
             "Xmx", "256m", "transcend:elasticbeanstalk:container:tomcat:jvmoptions"),
         true);
   } else if (os.getOptionName().equals("Cooldown")) {
     addOption(new OptionSetting("Cooldown", "360", "transcend:autoscaling:asg"), true);
   } else if (os.getOptionName().equals("Period")) {
     addOption(new OptionSetting("Period", "1", "transcend:autoscaling:trigger"), true);
   } else if (os.getOptionName().equals("Xms")) {
     addOption(
         new OptionSetting(
             "Xms", "256m", "transcend:elasticbeanstalk:container:tomcat:jvmoptions"),
         true);
   } else if (os.getOptionName().equals("EC2KeyName")) {
     addOption(
         new OptionSetting("EC2KeyName", null, "transcend:autoscaling:launchconfiguration"), true);
   } else if (os.getOptionName().equals("Stickiness Policy")) {
     addOption(new OptionSetting("Stickiness Policy", "false", "transcend:elb:policies"), true);
   } else if (os.getOptionName().equals("HealthyThreshold")) {
     addOption(new OptionSetting("HealthyThreshold", "3", "transcend:elb:healthcheck"), true);
   } else if (os.getOptionName().equals("SSLCertificateId")) {
     addOption(new OptionSetting("SSLCertificateId", null, "transcend:elb:loadbalancer"), true);
   } else {
     // TODO throw ElasticBeanStalkQueryFaults.invalidParameterValue();
   }
 }