All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.activemq.store.kahadb.data.KahaAddScheduledJobCommand Maven / Gradle / Ivy

There is a newer version: 6.1.2
Show newest version
//
// Generated by protoc, do not edit by hand.
//
package org.apache.activemq.store.kahadb.data;


public final class KahaAddScheduledJobCommand extends KahaAddScheduledJobCommandBase implements org.apache.activemq.store.kahadb.JournalCommand {

   public java.util.ArrayList missingFields() {
      java.util.ArrayList missingFields = super.missingFields();
      if(  !hasScheduler() ) {
         missingFields.add("scheduler");
      }
      if(  !hasJobId() ) {
         missingFields.add("job_id");
      }
      if(  !hasStartTime() ) {
         missingFields.add("start_time");
      }
      if(  !hasCronEntry() ) {
         missingFields.add("cron_entry");
      }
      if(  !hasDelay() ) {
         missingFields.add("delay");
      }
      if(  !hasPeriod() ) {
         missingFields.add("period");
      }
      if(  !hasRepeat() ) {
         missingFields.add("repeat");
      }
      if(  !hasPayload() ) {
         missingFields.add("payload");
      }
      if(  !hasNextExecutionTime() ) {
         missingFields.add("next_execution_time");
      }
      return missingFields;
   }

   public void clear() {
      super.clear();
      clearScheduler();
      clearJobId();
      clearStartTime();
      clearCronEntry();
      clearDelay();
      clearPeriod();
      clearRepeat();
      clearPayload();
      clearNextExecutionTime();
   }

   public KahaAddScheduledJobCommand clone() {
      return new KahaAddScheduledJobCommand().mergeFrom(this);
   }

   public KahaAddScheduledJobCommand mergeFrom(KahaAddScheduledJobCommand other) {
      if (other.hasScheduler()) {
         setScheduler(other.getScheduler());
      }
      if (other.hasJobId()) {
         setJobId(other.getJobId());
      }
      if (other.hasStartTime()) {
         setStartTime(other.getStartTime());
      }
      if (other.hasCronEntry()) {
         setCronEntry(other.getCronEntry());
      }
      if (other.hasDelay()) {
         setDelay(other.getDelay());
      }
      if (other.hasPeriod()) {
         setPeriod(other.getPeriod());
      }
      if (other.hasRepeat()) {
         setRepeat(other.getRepeat());
      }
      if (other.hasPayload()) {
         setPayload(other.getPayload());
      }
      if (other.hasNextExecutionTime()) {
         setNextExecutionTime(other.getNextExecutionTime());
      }
      return this;
   }

   public int serializedSizeUnframed() {
      if (memoizedSerializedSize != -1)
         return memoizedSerializedSize;

      int size = 0;
      if (hasScheduler()) {
         size += org.apache.activemq.protobuf.CodedOutputStream.computeStringSize(1, getScheduler());
      }
      if (hasJobId()) {
         size += org.apache.activemq.protobuf.CodedOutputStream.computeStringSize(2, getJobId());
      }
      if (hasStartTime()) {
         size += org.apache.activemq.protobuf.CodedOutputStream.computeInt64Size(3, getStartTime());
      }
      if (hasCronEntry()) {
         size += org.apache.activemq.protobuf.CodedOutputStream.computeStringSize(4, getCronEntry());
      }
      if (hasDelay()) {
         size += org.apache.activemq.protobuf.CodedOutputStream.computeInt64Size(5, getDelay());
      }
      if (hasPeriod()) {
         size += org.apache.activemq.protobuf.CodedOutputStream.computeInt64Size(6, getPeriod());
      }
      if (hasRepeat()) {
         size += org.apache.activemq.protobuf.CodedOutputStream.computeInt32Size(7, getRepeat());
      }
      if (hasPayload()) {
         size += org.apache.activemq.protobuf.CodedOutputStream.computeBytesSize(8, getPayload());
      }
      if (hasNextExecutionTime()) {
         size += org.apache.activemq.protobuf.CodedOutputStream.computeInt64Size(9, getNextExecutionTime());
      }
      memoizedSerializedSize = size;
      return size;
   }

   public KahaAddScheduledJobCommand mergeUnframed(org.apache.activemq.protobuf.CodedInputStream input) throws java.io.IOException {
      while (true) {
         int tag = input.readTag();
         if ((tag & 0x07) == 4) {
            return this;
         }
         switch (tag) {
         case 0:
            return this;
         default: {
            break;
         }
         case 10:
            setScheduler(input.readString());
            break;
         case 18:
            setJobId(input.readString());
            break;
         case 24:
            setStartTime(input.readInt64());
            break;
         case 34:
            setCronEntry(input.readString());
            break;
         case 40:
            setDelay(input.readInt64());
            break;
         case 48:
            setPeriod(input.readInt64());
            break;
         case 56:
            setRepeat(input.readInt32());
            break;
         case 66:
            setPayload(input.readBytes());
            break;
         case 72:
            setNextExecutionTime(input.readInt64());
            break;
         }
      }
   }
   public void writeUnframed(org.apache.activemq.protobuf.CodedOutputStream output) throws java.io.IOException {
      if (hasScheduler()) {
         output.writeString(1, getScheduler());
      }
      if (hasJobId()) {
         output.writeString(2, getJobId());
      }
      if (hasStartTime()) {
         output.writeInt64(3, getStartTime());
      }
      if (hasCronEntry()) {
         output.writeString(4, getCronEntry());
      }
      if (hasDelay()) {
         output.writeInt64(5, getDelay());
      }
      if (hasPeriod()) {
         output.writeInt64(6, getPeriod());
      }
      if (hasRepeat()) {
         output.writeInt32(7, getRepeat());
      }
      if (hasPayload()) {
         output.writeBytes(8, getPayload());
      }
      if (hasNextExecutionTime()) {
         output.writeInt64(9, getNextExecutionTime());
      }
   }

   public static KahaAddScheduledJobCommand parseUnframed(org.apache.activemq.protobuf.CodedInputStream data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException, java.io.IOException {
      return new KahaAddScheduledJobCommand().mergeUnframed(data).checktInitialized();
   }

   public static KahaAddScheduledJobCommand parseUnframed(org.apache.activemq.protobuf.Buffer data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException {
      return new KahaAddScheduledJobCommand().mergeUnframed(data).checktInitialized();
   }

   public static KahaAddScheduledJobCommand parseUnframed(byte[] data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException {
      return new KahaAddScheduledJobCommand().mergeUnframed(data).checktInitialized();
   }

   public static KahaAddScheduledJobCommand parseUnframed(java.io.InputStream data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException, java.io.IOException {
      return new KahaAddScheduledJobCommand().mergeUnframed(data).checktInitialized();
   }

   public static KahaAddScheduledJobCommand parseFramed(org.apache.activemq.protobuf.CodedInputStream data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException, java.io.IOException {
      return new KahaAddScheduledJobCommand().mergeFramed(data).checktInitialized();
   }

   public static KahaAddScheduledJobCommand parseFramed(org.apache.activemq.protobuf.Buffer data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException {
      return new KahaAddScheduledJobCommand().mergeFramed(data).checktInitialized();
   }

   public static KahaAddScheduledJobCommand parseFramed(byte[] data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException {
      return new KahaAddScheduledJobCommand().mergeFramed(data).checktInitialized();
   }

   public static KahaAddScheduledJobCommand parseFramed(java.io.InputStream data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException, java.io.IOException {
      return new KahaAddScheduledJobCommand().mergeFramed(data).checktInitialized();
   }

   public String toString() {
      return toString(new java.lang.StringBuilder(), "").toString();
   }

   public java.lang.StringBuilder toString(java.lang.StringBuilder sb, String prefix) {
      if(  hasScheduler() ) {
         sb.append(prefix+"scheduler: ");
         sb.append(getScheduler());
         sb.append("\n");
      }
      if(  hasJobId() ) {
         sb.append(prefix+"job_id: ");
         sb.append(getJobId());
         sb.append("\n");
      }
      if(  hasStartTime() ) {
         sb.append(prefix+"start_time: ");
         sb.append(getStartTime());
         sb.append("\n");
      }
      if(  hasCronEntry() ) {
         sb.append(prefix+"cron_entry: ");
         sb.append(getCronEntry());
         sb.append("\n");
      }
      if(  hasDelay() ) {
         sb.append(prefix+"delay: ");
         sb.append(getDelay());
         sb.append("\n");
      }
      if(  hasPeriod() ) {
         sb.append(prefix+"period: ");
         sb.append(getPeriod());
         sb.append("\n");
      }
      if(  hasRepeat() ) {
         sb.append(prefix+"repeat: ");
         sb.append(getRepeat());
         sb.append("\n");
      }
      if(  hasPayload() ) {
         sb.append(prefix+"payload: ");
         sb.append(getPayload());
         sb.append("\n");
      }
      if(  hasNextExecutionTime() ) {
         sb.append(prefix+"next_execution_time: ");
         sb.append(getNextExecutionTime());
         sb.append("\n");
      }
      return sb;
   }

   public void visit(org.apache.activemq.store.kahadb.Visitor visitor) throws java.io.IOException {
      visitor.visit(this);
   }

   public KahaEntryType type() {
      return KahaEntryType.KAHA_ADD_SCHEDULED_JOB_COMMAND;
   }

   public boolean equals(Object obj) {
      if( obj==this )
         return true;
      
      if( obj==null || obj.getClass()!=KahaAddScheduledJobCommand.class )
         return false;
      
      return equals((KahaAddScheduledJobCommand)obj);
   }
   
   public boolean equals(KahaAddScheduledJobCommand obj) {
      if (hasScheduler() ^ obj.hasScheduler() ) 
         return false;
      if (hasScheduler() && ( !getScheduler().equals(obj.getScheduler()) ))
         return false;
      if (hasJobId() ^ obj.hasJobId() ) 
         return false;
      if (hasJobId() && ( !getJobId().equals(obj.getJobId()) ))
         return false;
      if (hasStartTime() ^ obj.hasStartTime() ) 
         return false;
      if (hasStartTime() && ( getStartTime()!=obj.getStartTime() ))
         return false;
      if (hasCronEntry() ^ obj.hasCronEntry() ) 
         return false;
      if (hasCronEntry() && ( !getCronEntry().equals(obj.getCronEntry()) ))
         return false;
      if (hasDelay() ^ obj.hasDelay() ) 
         return false;
      if (hasDelay() && ( getDelay()!=obj.getDelay() ))
         return false;
      if (hasPeriod() ^ obj.hasPeriod() ) 
         return false;
      if (hasPeriod() && ( getPeriod()!=obj.getPeriod() ))
         return false;
      if (hasRepeat() ^ obj.hasRepeat() ) 
         return false;
      if (hasRepeat() && ( getRepeat()!=obj.getRepeat() ))
         return false;
      if (hasPayload() ^ obj.hasPayload() ) 
         return false;
      if (hasPayload() && ( !getPayload().equals(obj.getPayload()) ))
         return false;
      if (hasNextExecutionTime() ^ obj.hasNextExecutionTime() ) 
         return false;
      if (hasNextExecutionTime() && ( getNextExecutionTime()!=obj.getNextExecutionTime() ))
         return false;
      return true;
   }
   
   public int hashCode() {
      int rc=-1874430263;
      if (hasScheduler()) {
         rc ^= ( 1843257499^getScheduler().hashCode() );
      }
      if (hasJobId()) {
         rc ^= ( 71743896^getJobId().hashCode() );
      }
      if (hasStartTime()) {
         rc ^= ( -125326801^(new Long(getStartTime())).hashCode() );
      }
      if (hasCronEntry()) {
         rc ^= ( -1078466972^getCronEntry().hashCode() );
      }
      if (hasDelay()) {
         rc ^= ( 65915235^(new Long(getDelay())).hashCode() );
      }
      if (hasPeriod()) {
         rc ^= ( -1907858975^(new Long(getPeriod())).hashCode() );
      }
      if (hasRepeat()) {
         rc ^= ( -1850664517^getRepeat() );
      }
      if (hasPayload()) {
         rc ^= ( 877951342^getPayload().hashCode() );
      }
      if (hasNextExecutionTime()) {
         rc ^= ( 1882983858^(new Long(getNextExecutionTime())).hashCode() );
      }
      return rc;
   }
   
}

abstract class KahaAddScheduledJobCommandBase extends org.apache.activemq.protobuf.BaseMessage {

   // required string scheduler = 1;
   private java.lang.String f_scheduler = null;
   private boolean b_scheduler;

   public boolean hasScheduler() {
      return this.b_scheduler;
   }

   public java.lang.String getScheduler() {
      return this.f_scheduler;
   }

   public T setScheduler(java.lang.String scheduler) {
      loadAndClear();
      this.b_scheduler = true;
      this.f_scheduler = scheduler;
      return (T)this;
   }

   public void clearScheduler() {
      loadAndClear();
      this.b_scheduler = false;
      this.f_scheduler = null;
   }

   // required string job_id = 2;
   private java.lang.String f_jobId = null;
   private boolean b_jobId;

   public boolean hasJobId() {
      return this.b_jobId;
   }

   public java.lang.String getJobId() {
      return this.f_jobId;
   }

   public T setJobId(java.lang.String jobId) {
      loadAndClear();
      this.b_jobId = true;
      this.f_jobId = jobId;
      return (T)this;
   }

   public void clearJobId() {
      loadAndClear();
      this.b_jobId = false;
      this.f_jobId = null;
   }

   // required int64 start_time = 3;
   private long f_startTime = 0;
   private boolean b_startTime;

   public boolean hasStartTime() {
      return this.b_startTime;
   }

   public long getStartTime() {
      return this.f_startTime;
   }

   public T setStartTime(long startTime) {
      loadAndClear();
      this.b_startTime = true;
      this.f_startTime = startTime;
      return (T)this;
   }

   public void clearStartTime() {
      loadAndClear();
      this.b_startTime = false;
      this.f_startTime = 0;
   }

   // required string cron_entry = 4;
   private java.lang.String f_cronEntry = null;
   private boolean b_cronEntry;

   public boolean hasCronEntry() {
      return this.b_cronEntry;
   }

   public java.lang.String getCronEntry() {
      return this.f_cronEntry;
   }

   public T setCronEntry(java.lang.String cronEntry) {
      loadAndClear();
      this.b_cronEntry = true;
      this.f_cronEntry = cronEntry;
      return (T)this;
   }

   public void clearCronEntry() {
      loadAndClear();
      this.b_cronEntry = false;
      this.f_cronEntry = null;
   }

   // required int64 delay = 5;
   private long f_delay = 0;
   private boolean b_delay;

   public boolean hasDelay() {
      return this.b_delay;
   }

   public long getDelay() {
      return this.f_delay;
   }

   public T setDelay(long delay) {
      loadAndClear();
      this.b_delay = true;
      this.f_delay = delay;
      return (T)this;
   }

   public void clearDelay() {
      loadAndClear();
      this.b_delay = false;
      this.f_delay = 0;
   }

   // required int64 period = 6;
   private long f_period = 0;
   private boolean b_period;

   public boolean hasPeriod() {
      return this.b_period;
   }

   public long getPeriod() {
      return this.f_period;
   }

   public T setPeriod(long period) {
      loadAndClear();
      this.b_period = true;
      this.f_period = period;
      return (T)this;
   }

   public void clearPeriod() {
      loadAndClear();
      this.b_period = false;
      this.f_period = 0;
   }

   // required int32 repeat = 7;
   private int f_repeat = 0;
   private boolean b_repeat;

   public boolean hasRepeat() {
      return this.b_repeat;
   }

   public int getRepeat() {
      return this.f_repeat;
   }

   public T setRepeat(int repeat) {
      loadAndClear();
      this.b_repeat = true;
      this.f_repeat = repeat;
      return (T)this;
   }

   public void clearRepeat() {
      loadAndClear();
      this.b_repeat = false;
      this.f_repeat = 0;
   }

   // required bytes payload = 8;
   private org.apache.activemq.protobuf.Buffer f_payload = null;
   private boolean b_payload;

   public boolean hasPayload() {
      return this.b_payload;
   }

   public org.apache.activemq.protobuf.Buffer getPayload() {
      return this.f_payload;
   }

   public T setPayload(org.apache.activemq.protobuf.Buffer payload) {
      loadAndClear();
      this.b_payload = true;
      this.f_payload = payload;
      return (T)this;
   }

   public void clearPayload() {
      loadAndClear();
      this.b_payload = false;
      this.f_payload = null;
   }

   // required int64 next_execution_time = 9;
   private long f_nextExecutionTime = 0;
   private boolean b_nextExecutionTime;

   public boolean hasNextExecutionTime() {
      return this.b_nextExecutionTime;
   }

   public long getNextExecutionTime() {
      return this.f_nextExecutionTime;
   }

   public T setNextExecutionTime(long nextExecutionTime) {
      loadAndClear();
      this.b_nextExecutionTime = true;
      this.f_nextExecutionTime = nextExecutionTime;
      return (T)this;
   }

   public void clearNextExecutionTime() {
      loadAndClear();
      this.b_nextExecutionTime = false;
      this.f_nextExecutionTime = 0;
   }

}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy