@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getReplicationGroupId() == null) ? 0 : getReplicationGroupId().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getPendingModifiedValues() == null) ? 0 : getPendingModifiedValues().hashCode()); hashCode = prime * hashCode + ((getMemberClusters() == null) ? 0 : getMemberClusters().hashCode()); hashCode = prime * hashCode + ((getNodeGroups() == null) ? 0 : getNodeGroups().hashCode()); hashCode = prime * hashCode + ((getSnapshottingClusterId() == null) ? 0 : getSnapshottingClusterId().hashCode()); hashCode = prime * hashCode + ((getAutomaticFailover() == null) ? 0 : getAutomaticFailover().hashCode()); hashCode = prime * hashCode + ((getConfigurationEndpoint() == null) ? 0 : getConfigurationEndpoint().hashCode()); hashCode = prime * hashCode + ((getSnapshotRetentionLimit() == null) ? 0 : getSnapshotRetentionLimit().hashCode()); hashCode = prime * hashCode + ((getSnapshotWindow() == null) ? 0 : getSnapshotWindow().hashCode()); hashCode = prime * hashCode + ((getClusterEnabled() == null) ? 0 : getClusterEnabled().hashCode()); hashCode = prime * hashCode + ((getCacheNodeType() == null) ? 0 : getCacheNodeType().hashCode()); hashCode = prime * hashCode + ((getAuthTokenEnabled() == null) ? 0 : getAuthTokenEnabled().hashCode()); hashCode = prime * hashCode + ((getTransitEncryptionEnabled() == null) ? 0 : getTransitEncryptionEnabled().hashCode()); hashCode = prime * hashCode + ((getAtRestEncryptionEnabled() == null) ? 0 : getAtRestEncryptionEnabled().hashCode()); return hashCode; }
public ReplicationGroup unmarshall(StaxUnmarshallerContext context) throws Exception { ReplicationGroup replicationGroup = new ReplicationGroup(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; replicationGroup.setReplicationGroupId(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; replicationGroup.setDescription(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; replicationGroup.setStatus(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; replicationGroup.setPendingModifiedValues(ReplicationGroupPendingModifiedValuesStaxUnmarshaller.getInstance().unmarshall(context)); continue; replicationGroup.withMemberClusters(new ArrayList<String>()); continue; replicationGroup.withMemberClusters(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; replicationGroup.withNodeGroups(new ArrayList<NodeGroup>()); continue; replicationGroup.withNodeGroups(NodeGroupStaxUnmarshaller.getInstance().unmarshall(context)); continue; replicationGroup.setSnapshottingClusterId(StringStaxUnmarshaller.getInstance().unmarshall(context));
Map<String,ReplicationGroup> replGrpMap = replicationGroupList.stream().collect(Collectors.toMap(rplGrp -> rplGrp.getReplicationGroupId(),rplGrp->rplGrp)); Endpoint endPoint ; if(rplGrp!=null){ elastiCacheVH.setDescription(rplGrp.getDescription()); elastiCacheVH.setNoOfNodes(rplGrp.getMemberClusters().size()); endPoint = rplGrp.getConfigurationEndpoint(); if(endPoint==null){ endPoint = rplGrp.getNodeGroups().stream().filter(obj->obj.getPrimaryEndpoint()!=null).map(obj-> obj.getPrimaryEndpoint()).findAny().get();
for (NodeGroup nodeGroup: replicationGroup.getNodeGroups()) { for (NodeGroupMember nodeGroupMember: nodeGroup.getNodeGroupMembers()) { clusterIdToNodeGroupMember.put(nodeGroupMember.getCacheClusterId(), nodeGroupMember);
public ReplicationGroup unmarshall(StaxUnmarshallerContext context) throws Exception { ReplicationGroup replicationGroup = new ReplicationGroup(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; replicationGroup.setReplicationGroupId(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; replicationGroup.setDescription(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; replicationGroup.setStatus(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; replicationGroup.setPendingModifiedValues(ReplicationGroupPendingModifiedValuesStaxUnmarshaller.getInstance().unmarshall(context)); continue; replicationGroup.withMemberClusters(new ArrayList<String>()); continue; replicationGroup.withMemberClusters(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; replicationGroup.withNodeGroups(new ArrayList<NodeGroup>()); continue; replicationGroup.withNodeGroups(NodeGroupStaxUnmarshaller.getInstance().unmarshall(context)); continue; replicationGroup.setSnapshottingClusterId(StringStaxUnmarshaller.getInstance().unmarshall(context));
return false; ReplicationGroup other = (ReplicationGroup) obj; if (other.getReplicationGroupId() == null ^ this.getReplicationGroupId() == null) return false; if (other.getReplicationGroupId() != null && other.getReplicationGroupId().equals(this.getReplicationGroupId()) == false) return false; if (other.getDescription() == null ^ this.getDescription() == null) return false; if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false) return false; if (other.getStatus() == null ^ this.getStatus() == null) return false; if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false) return false; if (other.getPendingModifiedValues() == null ^ this.getPendingModifiedValues() == null) return false; if (other.getPendingModifiedValues() != null && other.getPendingModifiedValues().equals(this.getPendingModifiedValues()) == false) return false; if (other.getMemberClusters() == null ^ this.getMemberClusters() == null) return false; if (other.getMemberClusters() != null && other.getMemberClusters().equals(this.getMemberClusters()) == false) return false; if (other.getNodeGroups() == null ^ this.getNodeGroups() == null) return false; if (other.getNodeGroups() != null && other.getNodeGroups().equals(this.getNodeGroups()) == false) return false; if (other.getSnapshottingClusterId() == null ^ this.getSnapshottingClusterId() == null) return false; if (other.getSnapshottingClusterId() != null && other.getSnapshottingClusterId().equals(this.getSnapshottingClusterId()) == false)
StringBuilder sb = new StringBuilder(); sb.append("{"); if (getReplicationGroupId() != null) sb.append("ReplicationGroupId: ").append(getReplicationGroupId()).append(","); if (getDescription() != null) sb.append("Description: ").append(getDescription()).append(","); if (getStatus() != null) sb.append("Status: ").append(getStatus()).append(","); if (getPendingModifiedValues() != null) sb.append("PendingModifiedValues: ").append(getPendingModifiedValues()).append(","); if (getMemberClusters() != null) sb.append("MemberClusters: ").append(getMemberClusters()).append(","); if (getNodeGroups() != null) sb.append("NodeGroups: ").append(getNodeGroups()).append(","); if (getSnapshottingClusterId() != null) sb.append("SnapshottingClusterId: ").append(getSnapshottingClusterId()).append(","); if (getAutomaticFailover() != null) sb.append("AutomaticFailover: ").append(getAutomaticFailover()).append(","); if (getConfigurationEndpoint() != null) sb.append("ConfigurationEndpoint: ").append(getConfigurationEndpoint()).append(","); if (getSnapshotRetentionLimit() != null) sb.append("SnapshotRetentionLimit: ").append(getSnapshotRetentionLimit()).append(","); if (getSnapshotWindow() != null) sb.append("SnapshotWindow: ").append(getSnapshotWindow()).append(","); if (getClusterEnabled() != null) sb.append("ClusterEnabled: ").append(getClusterEnabled()).append(","); if (getCacheNodeType() != null) sb.append("CacheNodeType: ").append(getCacheNodeType()).append(","); if (getAuthTokenEnabled() != null)
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getReplicationGroupId() == null) ? 0 : getReplicationGroupId().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getPendingModifiedValues() == null) ? 0 : getPendingModifiedValues().hashCode()); hashCode = prime * hashCode + ((getMemberClusters() == null) ? 0 : getMemberClusters().hashCode()); hashCode = prime * hashCode + ((getNodeGroups() == null) ? 0 : getNodeGroups().hashCode()); hashCode = prime * hashCode + ((getSnapshottingClusterId() == null) ? 0 : getSnapshottingClusterId().hashCode()); hashCode = prime * hashCode + ((getAutomaticFailover() == null) ? 0 : getAutomaticFailover().hashCode()); hashCode = prime * hashCode + ((getConfigurationEndpoint() == null) ? 0 : getConfigurationEndpoint().hashCode()); hashCode = prime * hashCode + ((getSnapshotRetentionLimit() == null) ? 0 : getSnapshotRetentionLimit().hashCode()); hashCode = prime * hashCode + ((getSnapshotWindow() == null) ? 0 : getSnapshotWindow().hashCode()); hashCode = prime * hashCode + ((getClusterEnabled() == null) ? 0 : getClusterEnabled().hashCode()); hashCode = prime * hashCode + ((getCacheNodeType() == null) ? 0 : getCacheNodeType().hashCode()); hashCode = prime * hashCode + ((getAuthTokenEnabled() == null) ? 0 : getAuthTokenEnabled().hashCode()); hashCode = prime * hashCode + ((getTransitEncryptionEnabled() == null) ? 0 : getTransitEncryptionEnabled().hashCode()); hashCode = prime * hashCode + ((getAtRestEncryptionEnabled() == null) ? 0 : getAtRestEncryptionEnabled().hashCode()); return hashCode; }
return false; ReplicationGroup other = (ReplicationGroup) obj; if (other.getReplicationGroupId() == null ^ this.getReplicationGroupId() == null) return false; if (other.getReplicationGroupId() != null && other.getReplicationGroupId().equals(this.getReplicationGroupId()) == false) return false; if (other.getDescription() == null ^ this.getDescription() == null) return false; if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false) return false; if (other.getStatus() == null ^ this.getStatus() == null) return false; if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false) return false; if (other.getPendingModifiedValues() == null ^ this.getPendingModifiedValues() == null) return false; if (other.getPendingModifiedValues() != null && other.getPendingModifiedValues().equals(this.getPendingModifiedValues()) == false) return false; if (other.getMemberClusters() == null ^ this.getMemberClusters() == null) return false; if (other.getMemberClusters() != null && other.getMemberClusters().equals(this.getMemberClusters()) == false) return false; if (other.getNodeGroups() == null ^ this.getNodeGroups() == null) return false; if (other.getNodeGroups() != null && other.getNodeGroups().equals(this.getNodeGroups()) == false) return false; if (other.getSnapshottingClusterId() == null ^ this.getSnapshottingClusterId() == null) return false; if (other.getSnapshottingClusterId() != null && other.getSnapshottingClusterId().equals(this.getSnapshottingClusterId()) == false)
StringBuilder sb = new StringBuilder(); sb.append("{"); if (getReplicationGroupId() != null) sb.append("ReplicationGroupId: ").append(getReplicationGroupId()).append(","); if (getDescription() != null) sb.append("Description: ").append(getDescription()).append(","); if (getStatus() != null) sb.append("Status: ").append(getStatus()).append(","); if (getPendingModifiedValues() != null) sb.append("PendingModifiedValues: ").append(getPendingModifiedValues()).append(","); if (getMemberClusters() != null) sb.append("MemberClusters: ").append(getMemberClusters()).append(","); if (getNodeGroups() != null) sb.append("NodeGroups: ").append(getNodeGroups()).append(","); if (getSnapshottingClusterId() != null) sb.append("SnapshottingClusterId: ").append(getSnapshottingClusterId()).append(","); if (getAutomaticFailover() != null) sb.append("AutomaticFailover: ").append(getAutomaticFailover()).append(","); if (getConfigurationEndpoint() != null) sb.append("ConfigurationEndpoint: ").append(getConfigurationEndpoint()).append(","); if (getSnapshotRetentionLimit() != null) sb.append("SnapshotRetentionLimit: ").append(getSnapshotRetentionLimit()).append(","); if (getSnapshotWindow() != null) sb.append("SnapshotWindow: ").append(getSnapshotWindow()).append(","); if (getClusterEnabled() != null) sb.append("ClusterEnabled: ").append(getClusterEnabled()).append(","); if (getCacheNodeType() != null) sb.append("CacheNodeType: ").append(getCacheNodeType()).append(","); if (getAuthTokenEnabled() != null)