-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
523934e
commit 547c077
Showing
3 changed files
with
91 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
...ement-api-server/src/main/java/com/datastax/mgmtapi/resources/models/SnapshotDetails.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
/* | ||
* Copyright DataStax, Inc. | ||
* | ||
* Please see the included license file for details. | ||
*/ | ||
package com.datastax.mgmtapi.resources.models; | ||
|
||
import com.fasterxml.jackson.annotation.JsonCreator; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import java.util.List; | ||
import java.util.Map; | ||
import java.util.Objects; | ||
|
||
public class SnapshotDetails extends BaseEntity { | ||
|
||
@JsonProperty(value = "entity", required = true) | ||
public final List<Map<String, String>> entity; | ||
|
||
@JsonCreator | ||
public SnapshotDetails( | ||
@JsonProperty("entity") List<Map<String, String>> entity, | ||
@JsonProperty("variant") BaseEntity.Variant variant, | ||
@JsonProperty("annotations") List<String> annotations, | ||
@JsonProperty("mediaType") BaseEntity.MediaType mediaType, | ||
@JsonProperty("language") String language, | ||
@JsonProperty("encoding") String encoding) { | ||
super(variant, annotations, mediaType, language, encoding); | ||
this.entity = entity; | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
int hash = super.hashCode(); | ||
hash = 83 * hash + Objects.hashCode(this.entity); | ||
return hash; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object obj) { | ||
if (this == obj) { | ||
return true; | ||
} | ||
if (obj == null) { | ||
return false; | ||
} | ||
if (getClass() != obj.getClass()) { | ||
return false; | ||
} | ||
final SnapshotDetails other = (SnapshotDetails) obj; | ||
if (!Objects.equals(this.entity, other.entity)) { | ||
return false; | ||
} | ||
return super.equals(obj); | ||
} | ||
} |