@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getGroupName() == null) ? 0 : getGroupName().hashCode()); hashCode = prime * hashCode + ((getGroupId() == null) ? 0 : getGroupId().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 (getGroupName() != null) sb.append("GroupName: ").append(getGroupName()).append(","); if (getGroupId() != null) sb.append("GroupId: ").append(getGroupId()); sb.append("}"); return sb.toString(); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof GroupIdentifier == false) return false; GroupIdentifier other = (GroupIdentifier) obj; if (other.getGroupName() == null ^ this.getGroupName() == null) return false; if (other.getGroupName() != null && other.getGroupName().equals(this.getGroupName()) == false) return false; if (other.getGroupId() == null ^ this.getGroupId() == null) return false; if (other.getGroupId() != null && other.getGroupId().equals(this.getGroupId()) == false) return false; return true; }
if (group.getGroupId() != null) { request.addParameter("LaunchSpecification.SecurityGroupId." + groupIdCount++, group.getGroupId());
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getGroupName() == null) ? 0 : getGroupName().hashCode()); hashCode = prime * hashCode + ((getGroupId() == null) ? 0 : getGroupId().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof GroupIdentifier == false) return false; GroupIdentifier other = (GroupIdentifier)obj; if (other.getGroupName() == null ^ this.getGroupName() == null) return false; if (other.getGroupName() != null && other.getGroupName().equals(this.getGroupName()) == false) return false; if (other.getGroupId() == null ^ this.getGroupId() == null) return false; if (other.getGroupId() != null && other.getGroupId().equals(this.getGroupId()) == false) return false; return true; }
/** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getGroupName() != null) sb.append("GroupName: " + getGroupName() + ","); if (getGroupId() != null) sb.append("GroupId: " + getGroupId() ); sb.append("}"); return sb.toString(); }
for (GroupIdentifier group : requestSpotInstancesRequest.getLaunchSpecification() .getAllSecurityGroups()) { if (group.getGroupId() != null) { request.addParameter("LaunchSpecification.SecurityGroupId." + groupIdCount++, group.getGroupId());
if (launchSpecificationAllSecurityGroupsListValue.getGroupId() != null) { request.addParameter("LaunchSpecification.GroupSet." + allSecurityGroupsListIndex + ".GroupId", StringUtils.fromString(launchSpecificationAllSecurityGroupsListValue.getGroupId()));
public SecurityGroup(GroupIdentifier id) { this.id = id.getGroupId(); this.name = id.getGroupName(); } }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getGroupName() == null) ? 0 : getGroupName().hashCode()); hashCode = prime * hashCode + ((getGroupId() == null) ? 0 : getGroupId().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 (getGroupName() != null) sb.append("GroupName: ").append(getGroupName()).append(","); if (getGroupId() != null) sb.append("GroupId: ").append(getGroupId()); sb.append("}"); return sb.toString(); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof GroupIdentifier == false) return false; GroupIdentifier other = (GroupIdentifier) obj; if (other.getGroupName() == null ^ this.getGroupName() == null) return false; if (other.getGroupName() != null && other.getGroupName().equals(this.getGroupName()) == false) return false; if (other.getGroupId() == null ^ this.getGroupId() == null) return false; if (other.getGroupId() != null && other.getGroupId().equals(this.getGroupId()) == false) return false; return true; }
if (spotFleetLaunchSpecificationSecurityGroupsListValue.getGroupId() != null) { request.addParameter("SpotFleetRequestConfig.LaunchSpecifications." + launchSpecificationsListIndex + ".GroupSet." + securityGroupsListIndex + ".GroupId", StringUtils.fromString(spotFleetLaunchSpecificationSecurityGroupsListValue.getGroupId()));
private boolean verifySecurityGroups(Instance instance) { boolean result = false; List<String> expectedIds = new ArrayList<String>(); for (SecurityGroupRefTask group : getSecurityGroupRefs()) { expectedIds.add(group.fetchSecurityGroup().getId()); } List<String> foundIds = new ArrayList<String>(); List<GroupIdentifier> gids = instance.getSecurityGroups(); if (gids != null && !gids.isEmpty()) { for (GroupIdentifier gid : gids) { foundIds.add(gid.getGroupId()); } } return result; }
HashMultimap<String, Object> shouldFilter = HashMultimap.create(); Map<String, Object> mustTermsFilter = new HashMap<>(); mustFilter.put(convertAttributetoKeyword(PacmanRuleConstants.GROUP_ID), securityGrp.getGroupId()); mustFilter.put(convertAttributetoKeyword(PacmanRuleConstants.CIDRIP), cidrIp); mustFilter.put(convertAttributetoKeyword(PacmanSdkConstants.TYPE), PacmanRuleConstants.INBOUND);
for (GroupIdentifier groupIdentifier : groups) updatedSecurityGroups.add(groupIdentifier.getGroupId());
for (GroupIdentifier groupIdentifier : groups) updatedSecurityGroups.add(groupIdentifier.getGroupId());
request.addParameter("LaunchSpecification.GroupSet." + allSecurityGroupsListIndex + ".GroupName", StringUtils.fromString(groupIdentifierMember.getGroupName())); if (groupIdentifierMember.getGroupId() != null) { request.addParameter("LaunchSpecification.GroupSet." + allSecurityGroupsListIndex + ".GroupId", StringUtils.fromString(groupIdentifierMember.getGroupId()));
request.addParameter("SpotFleetRequestConfig.LaunchSpecifications." + launchSpecificationsListIndex + ".GroupSet." + securityGroupsListIndex + ".GroupName", StringUtils.fromString(groupIdentifierMember.getGroupName())); if (groupIdentifierMember.getGroupId() != null) { request.addParameter("SpotFleetRequestConfig.LaunchSpecifications." + launchSpecificationsListIndex + ".GroupSet." + securityGroupsListIndex + ".GroupId", StringUtils.fromString(groupIdentifierMember.getGroupId()));