package com.inspect.ivs.view;

import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

public class IvsRecStopView implements Serializable {
   @JsonProperty("StreamID")
   private String StreamID;
   @JsonProperty("RecordCount")
   private int RecordCount;
   @JsonProperty("RecordList")
   private List<IvsRecStopView.Record> RecordList = new ArrayList();

   public IvsRecStopView(String StreamID, int RecordCount) {
      this.StreamID = StreamID;
      this.RecordCount = RecordCount;
   }

   public void addRecord(String startTime, String endTime, String downloadUrl) {
      this.RecordList.add(new IvsRecStopView.Record(startTime, endTime, downloadUrl));
   }

   public String toJSON() {
      return JSONObject.toJSONString(this);
   }

   public String getStreamID() {
      return this.StreamID;
   }

   public int getRecordCount() {
      return this.RecordCount;
   }

   public List<IvsRecStopView.Record> getRecordList() {
      return this.RecordList;
   }

   @JsonProperty("StreamID")
   public void setStreamID(String StreamID) {
      this.StreamID = StreamID;
   }

   @JsonProperty("RecordCount")
   public void setRecordCount(int RecordCount) {
      this.RecordCount = RecordCount;
   }

   @JsonProperty("RecordList")
   public void setRecordList(List<IvsRecStopView.Record> RecordList) {
      this.RecordList = RecordList;
   }

   public boolean equals(Object o) {
      if(o == this) {
         return true;
      } else if(!(o instanceof IvsRecStopView)) {
         return false;
      } else {
         IvsRecStopView other = (IvsRecStopView)o;
         if(!other.canEqual(this)) {
            return false;
         } else if(this.getRecordCount() != other.getRecordCount()) {
            return false;
         } else {
            Object this$StreamID = this.getStreamID();
            Object other$StreamID = other.getStreamID();
            if(this$StreamID == null) {
               if(other$StreamID != null) {
                  return false;
               }
            } else if(!this$StreamID.equals(other$StreamID)) {
               return false;
            }

            Object this$RecordList = this.getRecordList();
            Object other$RecordList = other.getRecordList();
            if(this$RecordList == null) {
               if(other$RecordList != null) {
                  return false;
               }
            } else if(!this$RecordList.equals(other$RecordList)) {
               return false;
            }

            return true;
         }
      }
   }

   protected boolean canEqual(Object other) {
      return other instanceof IvsRecStopView;
   }

   public int hashCode() {
      int PRIME = 1;
      int result = 1;
      result = result * 59 + this.getRecordCount();
      Object $StreamID = this.getStreamID();
      result = result * 59 + ($StreamID == null?43:$StreamID.hashCode());
      Object $RecordList = this.getRecordList();
      result = result * 59 + ($RecordList == null?43:$RecordList.hashCode());
      return result;
   }

   public String toString() {
      return "SipbRecordStopView(StreamID=" + this.getStreamID() + ", RecordCount=" + this.getRecordCount() + ", RecordList=" + this.getRecordList() + ")";
   }

   public IvsRecStopView() {
   }

   class Record implements Serializable {
      @JsonProperty("StartTime")
      private String StartTime;
      @JsonProperty("EndTime")
      private String EndTime;
      @JsonProperty("DownloadURL")
      private String DownloadURL;

      public String getStartTime() {
         return this.StartTime;
      }

      public String getEndTime() {
         return this.EndTime;
      }

      public String getDownloadURL() {
         return this.DownloadURL;
      }

      @JsonProperty("StartTime")
      public void setStartTime(String StartTime) {
         this.StartTime = StartTime;
      }

      @JsonProperty("EndTime")
      public void setEndTime(String EndTime) {
         this.EndTime = EndTime;
      }

      @JsonProperty("DownloadURL")
      public void setDownloadURL(String DownloadURL) {
         this.DownloadURL = DownloadURL;
      }

      public boolean equals(Object o) {
         if(o == this) {
            return true;
         } else if(!(o instanceof IvsRecStopView.Record)) {
            return false;
         } else {
            IvsRecStopView.Record other = (IvsRecStopView.Record)o;
            if(!other.canEqual(this)) {
               return false;
            } else {
               label47: {
                  Object this$StartTime = this.getStartTime();
                  Object other$StartTime = other.getStartTime();
                  if(this$StartTime == null) {
                     if(other$StartTime == null) {
                        break label47;
                     }
                  } else if(this$StartTime.equals(other$StartTime)) {
                     break label47;
                  }

                  return false;
               }

               Object this$EndTime = this.getEndTime();
               Object other$EndTime = other.getEndTime();
               if(this$EndTime == null) {
                  if(other$EndTime != null) {
                     return false;
                  }
               } else if(!this$EndTime.equals(other$EndTime)) {
                  return false;
               }

               Object this$DownloadURL = this.getDownloadURL();
               Object other$DownloadURL = other.getDownloadURL();
               if(this$DownloadURL == null) {
                  if(other$DownloadURL != null) {
                     return false;
                  }
               } else if(!this$DownloadURL.equals(other$DownloadURL)) {
                  return false;
               }

               return true;
            }
         }
      }

      protected boolean canEqual(Object other) {
         return other instanceof IvsRecStopView.Record;
      }

      public int hashCode() {
         int PRIME = 1;
         int resultx = 1;
         Object $StartTime = this.getStartTime();
         int result = resultx * 59 + ($StartTime == null?43:$StartTime.hashCode());
         Object $EndTime = this.getEndTime();
         result = result * 59 + ($EndTime == null?43:$EndTime.hashCode());
         Object $DownloadURL = this.getDownloadURL();
         result = result * 59 + ($DownloadURL == null?43:$DownloadURL.hashCode());
         return result;
      }

      public String toString() {
         return "SipbRecordStopView.Record(StartTime=" + this.getStartTime() + ", EndTime=" + this.getEndTime() + ", DownloadURL=" + this.getDownloadURL() + ")";
      }

      public Record() {
      }

      public Record(String StartTime, String EndTime, String DownloadURL) {
         this.StartTime = StartTime;
         this.EndTime = EndTime;
         this.DownloadURL = DownloadURL;
      }
   }
}
