package com.inspect.ivs.domain;

import com.inspect.ivs.constant.IvsMediaPort;
import java.io.Serializable;

public class MediaAddr implements Serializable {
   private IPInfo dstIP = new IPInfo();
   private int audioPort = 30500;
   private int videoPort = IvsMediaPort.getPort().intValue();
   private String reserve;

   public IPInfo getDstIP() {
      return this.dstIP;
   }

   public int getAudioPort() {
      return this.audioPort;
   }

   public int getVideoPort() {
      return this.videoPort;
   }

   public String getReserve() {
      return this.reserve;
   }

   public void setDstIP(IPInfo dstIP) {
      this.dstIP = dstIP;
   }

   public void setAudioPort(int audioPort) {
      this.audioPort = audioPort;
   }

   public void setVideoPort(int videoPort) {
      this.videoPort = videoPort;
   }

   public void setReserve(String reserve) {
      this.reserve = reserve;
   }

   public boolean equals(Object o) {
      if(o == this) {
         return true;
      } else if(!(o instanceof MediaAddr)) {
         return false;
      } else {
         MediaAddr other = (MediaAddr)o;
         if(!other.canEqual(this)) {
            return false;
         } else if(this.getAudioPort() != other.getAudioPort()) {
            return false;
         } else if(this.getVideoPort() != other.getVideoPort()) {
            return false;
         } else {
            label40: {
               Object this$dstIP = this.getDstIP();
               Object other$dstIP = other.getDstIP();
               if(this$dstIP == null) {
                  if(other$dstIP == null) {
                     break label40;
                  }
               } else if(this$dstIP.equals(other$dstIP)) {
                  break label40;
               }

               return false;
            }

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

            return true;
         }
      }
   }

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

   public int hashCode() {
      int PRIME = 1;
      int result = 1;
      result = result * 59 + this.getAudioPort();
      result = result * 59 + this.getVideoPort();
      Object $dstIP = this.getDstIP();
      result = result * 59 + ($dstIP == null?43:$dstIP.hashCode());
      Object $reserve = this.getReserve();
      result = result * 59 + ($reserve == null?43:$reserve.hashCode());
      return result;
   }

   public String toString() {
      return "MediaAddr(dstIP=" + this.getDstIP() + ", audioPort=" + this.getAudioPort() + ", videoPort=" + this.getVideoPort() + ", reserve=" + this.getReserve() + ")";
   }
}
