@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getResourceName() == null) ? 0 : getResourceName().hashCode()); hashCode = prime * hashCode + ((getNamespace() == null) ? 0 : getNamespace().hashCode()); hashCode = prime * hashCode + ((getOptionName() == null) ? 0 : getOptionName().hashCode()); hashCode = prime * hashCode + ((getValue() == null) ? 0 : getValue().hashCode()); return hashCode; }
/** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getResourceName() != null) sb.append("ResourceName: ").append(getResourceName()).append(","); if (getNamespace() != null) sb.append("Namespace: ").append(getNamespace()).append(","); if (getOptionName() != null) sb.append("OptionName: ").append(getOptionName()).append(","); if (getValue() != null) sb.append("Value: ").append(getValue()); sb.append("}"); return sb.toString(); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ConfigurationOptionSetting == false) return false; ConfigurationOptionSetting other = (ConfigurationOptionSetting) obj; if (other.getResourceName() == null ^ this.getResourceName() == null) return false; if (other.getResourceName() != null && other.getResourceName().equals(this.getResourceName()) == false) return false; if (other.getNamespace() == null ^ this.getNamespace() == null) return false; if (other.getNamespace() != null && other.getNamespace().equals(this.getNamespace()) == false) return false; if (other.getOptionName() == null ^ this.getOptionName() == null) return false; if (other.getOptionName() != null && other.getOptionName().equals(this.getOptionName()) == false) return false; if (other.getValue() == null ^ this.getValue() == null) return false; if (other.getValue() != null && other.getValue().equals(this.getValue()) == false) return false; return true; }
if (optionSettingsListValue.getNamespace() != null) { request.addParameter("OptionSettings.member." + optionSettingsListIndex + ".Namespace", StringUtils.fromString(optionSettingsListValue.getNamespace()));
if (optionSettingsListValue.getNamespace() != null) { request.addParameter("OptionSettings.member." + optionSettingsListIndex + ".Namespace", StringUtils.fromString(optionSettingsListValue.getNamespace()));
if (optionSettingsListValue.getNamespace() != null) { request.addParameter("OptionSettings.member." + optionSettingsListIndex + ".Namespace", StringUtils.fromString(optionSettingsListValue.getNamespace()));
if (optionSettingsListValue.getNamespace() != null) { request.addParameter("OptionSettings.member." + optionSettingsListIndex + ".Namespace", StringUtils.fromString(optionSettingsListValue.getNamespace()));
if (optionSettingsListValue.getNamespace() != null) { request.addParameter("OptionSettings.member." + optionSettingsListIndex + ".Namespace", StringUtils.fromString(optionSettingsListValue.getNamespace()));
if (optionSettingsListValue.getNamespace() != null) { request.addParameter("OptionSettings.member." + optionSettingsListIndex + ".Namespace", StringUtils.fromString(optionSettingsListValue.getNamespace()));
public static boolean optionSettingMatchesP(ConfigurationOptionSetting optionSetting, String namespace, String option) { return namespace.equals(optionSetting.getNamespace()) && option.equals(optionSetting.getOptionName()); } }
protected boolean contextDoesNotContainsEC2Role(CreateEnvironmentContext context) { boolean found = false; for (ConfigurationOptionSetting opt : context.getOptionSettings()) { found = opt.getOptionName().equals("IamInstanceProfile") && opt.getNamespace().equals("aws:autoscaling:launchconfiguration"); if (found) { break; } } return !found; } }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getResourceName() == null) ? 0 : getResourceName().hashCode()); hashCode = prime * hashCode + ((getNamespace() == null) ? 0 : getNamespace().hashCode()); hashCode = prime * hashCode + ((getOptionName() == null) ? 0 : getOptionName().hashCode()); hashCode = prime * hashCode + ((getValue() == null) ? 0 : getValue().hashCode()); return hashCode; }
/** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getResourceName() != null) sb.append("ResourceName: ").append(getResourceName()).append(","); if (getNamespace() != null) sb.append("Namespace: ").append(getNamespace()).append(","); if (getOptionName() != null) sb.append("OptionName: ").append(getOptionName()).append(","); if (getValue() != null) sb.append("Value: ").append(getValue()); sb.append("}"); return sb.toString(); }
} else if (COMMON_PARAMETERS.containsKey(k)) { String v = "" + properties.get(k); String namespace = COMMON_PARAMETERS.get(k).getNamespace(); String optionName = COMMON_PARAMETERS.get(k).getOptionName();
buf.add(String.format(" <%s>%s</%1$s>", "namespace", setting.getNamespace())); buf.add(String.format(" <%s>%s</%1$s>", "optionName", setting.getOptionName())); buf.add(String.format(" <%s>%s</%1$s>", "value", setting.getValue()));
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ConfigurationOptionSetting == false) return false; ConfigurationOptionSetting other = (ConfigurationOptionSetting) obj; if (other.getResourceName() == null ^ this.getResourceName() == null) return false; if (other.getResourceName() != null && other.getResourceName().equals(this.getResourceName()) == false) return false; if (other.getNamespace() == null ^ this.getNamespace() == null) return false; if (other.getNamespace() != null && other.getNamespace().equals(this.getNamespace()) == false) return false; if (other.getOptionName() == null ^ this.getOptionName() == null) return false; if (other.getOptionName() != null && other.getOptionName().equals(this.getOptionName()) == false) return false; if (other.getValue() == null ^ this.getValue() == null) return false; if (other.getValue() != null && other.getValue().equals(this.getValue()) == false) return false; return true; }
@Override public int compare(ConfigurationOptionSetting o1, ConfigurationOptionSetting o2) { return new CompareToBuilder() .append(o1.getNamespace(), o2.getNamespace()) .append(o1.getOptionName(), o2.getOptionName()) .append(o1.getValue(), o2.getValue()) .toComparison(); } };
bInvalid = (optionSetting.getNamespace().equals("aws:cloudformation:template:parameter") && optionSetting.getOptionName().equals("AppSource")); bInvalid = (optionSetting.getNamespace().equals("aws:elasticbeanstalk:sns:topics") && optionSetting.getOptionName().equals("Notification Topic ARN"));
if (optionSettingsListValue.getNamespace() != null) { request.addParameter("OptionSettings.member." + optionSettingsListIndex + ".Namespace", StringUtils.fromString(optionSettingsListValue.getNamespace()));
if (optionSettingsListValue.getNamespace() != null) { request.addParameter("OptionSettings.member." + optionSettingsListIndex + ".Namespace", StringUtils.fromString(optionSettingsListValue.getNamespace()));