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

org.apache.activemq.store.kahadb.data.KahaRemoveScheduledJobCommand 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 KahaRemoveScheduledJobCommand extends KahaRemoveScheduledJobCommandBase 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(  !hasNextExecutionTime() ) {
         missingFields.add("next_execution_time");
      }
      return missingFields;
   }

   public void clear() {
      super.clear();
      clearScheduler();
      clearJobId();
      clearNextExecutionTime();
   }

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

   public KahaRemoveScheduledJobCommand mergeFrom(KahaRemoveScheduledJobCommand other) {
      if (other.hasScheduler()) {
         setScheduler(other.getScheduler());
      }
      if (other.hasJobId()) {
         setJobId(other.getJobId());
      }
      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 (hasNextExecutionTime()) {
         size += org.apache.activemq.protobuf.CodedOutputStream.computeInt64Size(3, getNextExecutionTime());
      }
      memoizedSerializedSize = size;
      return size;
   }

   public KahaRemoveScheduledJobCommand 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:
            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 (hasNextExecutionTime()) {
         output.writeInt64(3, getNextExecutionTime());
      }
   }

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

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

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

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

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

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

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

   public static KahaRemoveScheduledJobCommand parseFramed(java.io.InputStream data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException, java.io.IOException {
      return new KahaRemoveScheduledJobCommand().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(  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_REMOVE_SCHEDULED_JOB_COMMAND;
   }

   public boolean equals(Object obj) {
      if( obj==this )
         return true;
      
      if( obj==null || obj.getClass()!=KahaRemoveScheduledJobCommand.class )
         return false;
      
      return equals((KahaRemoveScheduledJobCommand)obj);
   }
   
   public boolean equals(KahaRemoveScheduledJobCommand 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 (hasNextExecutionTime() ^ obj.hasNextExecutionTime() ) 
         return false;
      if (hasNextExecutionTime() && ( getNextExecutionTime()!=obj.getNextExecutionTime() ))
         return false;
      return true;
   }
   
   public int hashCode() {
      int rc=425904136;
      if (hasScheduler()) {
         rc ^= ( 1843257499^getScheduler().hashCode() );
      }
      if (hasJobId()) {
         rc ^= ( 71743896^getJobId().hashCode() );
      }
      if (hasNextExecutionTime()) {
         rc ^= ( 1882983858^(new Long(getNextExecutionTime())).hashCode() );
      }
      return rc;
   }
   
}

abstract class KahaRemoveScheduledJobCommandBase 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 next_execution_time = 3;
   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