CloudVolumeStorage.java

  1. package com.capitalone.dashboard.model;


  2. import org.springframework.data.mongodb.core.index.Indexed;
  3. import org.springframework.data.mongodb.core.mapping.Document;

  4. import java.util.ArrayList;
  5. import java.util.List;

  6. @Document(collection = "cloud_volume")
  7. public class CloudVolumeStorage extends BaseModel{
  8.     @Indexed
  9.     private String volumeId;

  10.     @Indexed
  11.     private String accountNumber;
  12.     private String status;
  13.     private long creationDate;
  14.     private int size;
  15.     private List<NameValue> tags = new ArrayList<>();
  16.     private boolean encrypted;
  17.     private String type;
  18.     private String zone;
  19.     private List<String> attachInstances = new ArrayList<>();


  20.     public String getVolumeId() {
  21.         return volumeId;
  22.     }

  23.     public void setVolumeId(String volumeId) {
  24.         this.volumeId = volumeId;
  25.     }

  26.     public String getAccountNumber() {
  27.         return accountNumber;
  28.     }

  29.     public void setAccountNumber(String accountNumber) {
  30.         this.accountNumber = accountNumber;
  31.     }

  32.     public String getStatus() {
  33.         return status;
  34.     }

  35.     public void setStatus(String status) {
  36.         this.status = status;
  37.     }

  38.     public long getCreationDate() {
  39.         return creationDate;
  40.     }

  41.     public void setCreationDate(long creationDate) {
  42.         this.creationDate = creationDate;
  43.     }

  44.     public int getSize() {
  45.         return size;
  46.     }

  47.     public void setSize(int size) {
  48.         this.size = size;
  49.     }

  50.     public List<NameValue> getTags() {
  51.         return tags;
  52.     }


  53.     public boolean isEncrypted() {
  54.         return encrypted;
  55.     }

  56.     public void setEncrypted(boolean encrypted) {
  57.         this.encrypted = encrypted;
  58.     }

  59.     public String getType() {
  60.         return type;
  61.     }

  62.     public void setType(String type) {
  63.         this.type = type;
  64.     }

  65.     public String getZone() {
  66.         return zone;
  67.     }

  68.     public void setZone(String zone) {
  69.         this.zone = zone;
  70.     }

  71.     public List<String> getAttachInstances() {
  72.         return attachInstances;
  73.     }

  74.     @Override
  75.     public boolean equals(Object o) {
  76.         if (this == o) return true;
  77.         if (o == null || getClass() != o.getClass()) return false;

  78.         CloudVolumeStorage that = (CloudVolumeStorage) o;

  79.         return volumeId != null ? volumeId.equals(that.volumeId) : that.volumeId == null;

  80.     }

  81.     @Override
  82.     public int hashCode() {
  83.         return volumeId != null ? volumeId.hashCode() : 0;
  84.     }
  85. }