@Test public void testEquals() { new EqualsTester() .addEqualityGroup( new TransitGatewayAttachment( "attach", "tgw", "my-acc", ResourceType.VPC, "resId", "res-acc", null), new TransitGatewayAttachment( "attach", "tgw", "my-acc", ResourceType.VPC, "resId", "res-acc", null)) .addEqualityGroup( new TransitGatewayAttachment( "other", "tgw", "my-acc", ResourceType.VPC, "resId", "res-acc", null)) .addEqualityGroup( new TransitGatewayAttachment( "attach", "other", "my-acc", ResourceType.VPC, "resId", "res-acc", null)) .addEqualityGroup( new TransitGatewayAttachment( "attach", "tgw", "other", ResourceType.VPC, "resId", "res-acc", null)) .addEqualityGroup( new TransitGatewayAttachment( "attach", "tgw", "my-acc", ResourceType.PEERING, "resId", "res-acc", null)) .addEqualityGroup( new TransitGatewayAttachment( "attach", "tgw", "my-acc", ResourceType.VPC, "other", "res-acc", null)) .addEqualityGroup( new TransitGatewayAttachment( "attach", "tgw", "my-acc", ResourceType.VPC, "resId", "other", null)) .addEqualityGroup( new TransitGatewayAttachment( "attach", "tgw", "my-acc", ResourceType.VPC, "resId", "res-acc", new Association("rt", "state"))) .testEquals(); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof TransitGatewayAttachment)) { return false; } TransitGatewayAttachment that = (TransitGatewayAttachment) o; return Objects.equals(_attachmentId, that._attachmentId) && Objects.equals(_gatewayId, that._gatewayId) && _gatewayOwnerId.equals(that._gatewayOwnerId) && _resourceType == that._resourceType && Objects.equals(_resourceId, that._resourceId) && _resourceOwnerId.equals(that._resourceOwnerId) && Objects.equals(_association, that._association); }
TransitGatewayAttachment implements AwsVpcEntity, Serializable { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof TransitGatewayAttachment)) { return false; } TransitGatewayAttachment that = (TransitGatewayAttachment) o; return Objects.equals(_attachmentId, that._attachmentId) && Objects.equals(_gatewayId, that._gatewayId) && _gatewayOwnerId.equals(that._gatewayOwnerId) && _resourceType == that._resourceType && Objects.equals(_resourceId, that._resourceId) && _resourceOwnerId.equals(that._resourceOwnerId) && Objects.equals(_association, that._association); } }
TransitGatewayAttachment implements AwsVpcEntity, Serializable { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof TransitGatewayAttachment)) { return false; } TransitGatewayAttachment that = (TransitGatewayAttachment) o; return Objects.equals(_attachmentId, that._attachmentId) && Objects.equals(_gatewayId, that._gatewayId) && _gatewayOwnerId.equals(that._gatewayOwnerId) && _resourceType == that._resourceType && Objects.equals(_resourceId, that._resourceId) && _resourceOwnerId.equals(that._resourceOwnerId) && Objects.equals(_association, that._association); } TransitGatewayAttachment(
      String attachmentId,
      String gatewayId,
      String gatewayOwnerId,
      ResourceType resourceType,
      String resourceId,
      String resourceOwnerId,
      @Nullable Association association); }
TransitGatewayAttachment implements AwsVpcEntity, Serializable { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof TransitGatewayAttachment)) { return false; } TransitGatewayAttachment that = (TransitGatewayAttachment) o; return Objects.equals(_attachmentId, that._attachmentId) && Objects.equals(_gatewayId, that._gatewayId) && _gatewayOwnerId.equals(that._gatewayOwnerId) && _resourceType == that._resourceType && Objects.equals(_resourceId, that._resourceId) && _resourceOwnerId.equals(that._resourceOwnerId) && Objects.equals(_association, that._association); } TransitGatewayAttachment(
      String attachmentId,
      String gatewayId,
      String gatewayOwnerId,
      ResourceType resourceType,
      String resourceId,
      String resourceOwnerId,
      @Nullable Association association); @Nullable Association getAssociation(); @Nonnull @Override String getId(); @Nonnull String getGatewayId(); @Nonnull String getGatewayOwnerId(); @Nonnull ResourceType getResourceType(); @Nonnull String getResourceId(); @Nonnull String getResourceOwnerId(); @Override boolean equals(Object o); @Override int hashCode(); }
TransitGatewayAttachment implements AwsVpcEntity, Serializable { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof TransitGatewayAttachment)) { return false; } TransitGatewayAttachment that = (TransitGatewayAttachment) o; return Objects.equals(_attachmentId, that._attachmentId) && Objects.equals(_gatewayId, that._gatewayId) && _gatewayOwnerId.equals(that._gatewayOwnerId) && _resourceType == that._resourceType && Objects.equals(_resourceId, that._resourceId) && _resourceOwnerId.equals(that._resourceOwnerId) && Objects.equals(_association, that._association); } TransitGatewayAttachment(
      String attachmentId,
      String gatewayId,
      String gatewayOwnerId,
      ResourceType resourceType,
      String resourceId,
      String resourceOwnerId,
      @Nullable Association association); @Nullable Association getAssociation(); @Nonnull @Override String getId(); @Nonnull String getGatewayId(); @Nonnull String getGatewayOwnerId(); @Nonnull ResourceType getResourceType(); @Nonnull String getResourceId(); @Nonnull String getResourceOwnerId(); @Override boolean equals(Object o); @Override int hashCode();  }