/*
 * (c) 2020 Pluto Inc.
 */
package tv.pluto.mongo.entities.common;

import com.google.gson.annotations.JsonAdapter;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.bson.BsonType;
import org.bson.codecs.pojo.annotations.BsonRepresentation;
import org.bson.types.ObjectId;
import tv.pluto.mongo.utils.json.ObjectIdAdapter;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class Source {
  private String file = "";

  @JsonAdapter(ObjectIdAdapter.class)
  private ObjectId id;

  private String type = "";

  @BsonRepresentation(BsonType.OBJECT_ID)
  private String clip;

  private String encryption = "";
  private String adSparxAdPolicy;

  public String getFile() {
    return file == null ? "" : file;
  }

  public String getType() {
    return type == null ? "" : type;
  }

  public String getClip() {
    return clip == null ? "" : clip;
  }

  public String getEncryption() {
    return encryption == null ? "" : encryption;
  }

  public String getAdSparxAdPolicy() {
    return adSparxAdPolicy == null ? "" : adSparxAdPolicy;
  }
}
