result = result && (getKey() == other.getKey()); result = result && getType() .equals(other.getType()); result = result && (hasJobHeaders() == other.hasJobHeaders()); if (hasJobHeaders()) { result = result && getJobHeaders() .equals(other.getJobHeaders()); result = result && getCustomHeaders() .equals(other.getCustomHeaders()); result = result && getWorker() .equals(other.getWorker()); result = result && (getRetries() == other.getRetries()); result = result && (getDeadline() == other.getDeadline()); result = result && getPayload() .equals(other.getPayload()); result = result && unknownFields.equals(other.unknownFields); return result;
@java.lang.Override public io.zeebe.gateway.protocol.GatewayOuterClass.ActivatedJob buildPartial() { io.zeebe.gateway.protocol.GatewayOuterClass.ActivatedJob result = new io.zeebe.gateway.protocol.GatewayOuterClass.ActivatedJob(this); result.key_ = key_; result.type_ = type_; if (jobHeadersBuilder_ == null) { result.jobHeaders_ = jobHeaders_; } else { result.jobHeaders_ = jobHeadersBuilder_.build(); } result.customHeaders_ = customHeaders_; result.worker_ = worker_; result.retries_ = retries_; result.deadline_ = deadline_; result.payload_ = payload_; onBuilt(); return result; }
.computeInt64Size(1, key_); if (!getTypeBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, type_); .computeMessageSize(3, getJobHeaders()); if (!getCustomHeadersBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, customHeaders_); if (!getWorkerBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, worker_); .computeInt64Size(7, deadline_); if (!getPayloadBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, payload_);
@java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (key_ != 0L) { output.writeInt64(1, key_); } if (!getTypeBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, type_); } if (jobHeaders_ != null) { output.writeMessage(3, getJobHeaders()); } if (!getCustomHeadersBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, customHeaders_); } if (!getWorkerBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, worker_); } if (retries_ != 0) { output.writeInt32(6, retries_); } if (deadline_ != 0L) { output.writeInt64(7, deadline_); } if (!getPayloadBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 8, payload_); } unknownFields.writeTo(output); }
public Builder mergeFrom(io.zeebe.gateway.protocol.GatewayOuterClass.ActivatedJob other) { if (other == io.zeebe.gateway.protocol.GatewayOuterClass.ActivatedJob.getDefaultInstance()) return this; if (other.getKey() != 0L) { setKey(other.getKey()); if (!other.getType().isEmpty()) { type_ = other.type_; onChanged(); if (other.hasJobHeaders()) { mergeJobHeaders(other.getJobHeaders()); if (!other.getCustomHeaders().isEmpty()) { customHeaders_ = other.customHeaders_; onChanged(); if (!other.getWorker().isEmpty()) { worker_ = other.worker_; onChanged(); if (other.getRetries() != 0) { setRetries(other.getRetries()); if (other.getDeadline() != 0L) { setDeadline(other.getDeadline()); if (!other.getPayload().isEmpty()) { payload_ = other.payload_; onChanged();
hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + KEY_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getKey()); hash = (37 * hash) + TYPE_FIELD_NUMBER; hash = (53 * hash) + getType().hashCode(); if (hasJobHeaders()) { hash = (37 * hash) + JOBHEADERS_FIELD_NUMBER; hash = (53 * hash) + getJobHeaders().hashCode(); hash = (53 * hash) + getCustomHeaders().hashCode(); hash = (37 * hash) + WORKER_FIELD_NUMBER; hash = (53 * hash) + getWorker().hashCode(); hash = (37 * hash) + RETRIES_FIELD_NUMBER; hash = (53 * hash) + getRetries(); hash = (37 * hash) + DEADLINE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getDeadline()); hash = (37 * hash) + PAYLOAD_FIELD_NUMBER; hash = (53 * hash) + getPayload().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash;
public static ActivateJobsResponse toActivateJobsResponse( long key, JobBatchRecord brokerResponse) { final ActivateJobsResponse.Builder responseBuilder = ActivateJobsResponse.newBuilder(); final Iterator<LongValue> jobKeys = brokerResponse.jobKeys().iterator(); final Iterator<JobRecord> jobs = brokerResponse.jobs().iterator(); while (jobKeys.hasNext() && jobs.hasNext()) { final LongValue jobKey = jobKeys.next(); final JobRecord job = jobs.next(); final ActivatedJob activatedJob = ActivatedJob.newBuilder() .setKey(jobKey.getValue()) .setType(bufferAsString(job.getType())) .setJobHeaders(fromBrokerJobHeaders(job.getHeaders())) .setCustomHeaders(bufferAsJson(job.getCustomHeaders())) .setWorker(bufferAsString(job.getWorker())) .setRetries(job.getRetries()) .setDeadline(job.getDeadline()) .setPayload(bufferAsJson(job.getPayload())) .build(); responseBuilder.addJobs(activatedJob); } return responseBuilder.build(); }
@java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() {
/** * <pre> * a set of custom headers defined during modelling; returned as a serialized * JSON document * </pre> * * <code>string customHeaders = 4;</code> */ public Builder clearCustomHeaders() { customHeaders_ = getDefaultInstance().getCustomHeaders(); onChanged(); return this; } /**
/** * <pre> * JSON document, computed at activation time, consisting of all visible variables to * the task scope * </pre> * * <code>string payload = 8;</code> */ public Builder clearPayload() { payload_ = getDefaultInstance().getPayload(); onChanged(); return this; } /**
/** * <pre> * the type of the job (should match what was requested) * </pre> * * <code>string type = 2;</code> */ public Builder clearType() { type_ = getDefaultInstance().getType(); onChanged(); return this; } /**
/** * <pre> * the name of the worker which activated this job * </pre> * * <code>string worker = 5;</code> */ public Builder clearWorker() { worker_ = getDefaultInstance().getWorker(); onChanged(); return this; } /**
/** * <pre> * a set of headers tying the job to a workflow instance/task instance * </pre> * * <code>.gateway_protocol.JobHeaders jobHeaders = 3;</code> */ public io.zeebe.gateway.protocol.GatewayOuterClass.JobHeadersOrBuilder getJobHeadersOrBuilder() { return getJobHeaders(); }
public ActivatedJobImpl(ZeebeObjectMapper objectMapper, GatewayOuterClass.ActivatedJob job) { this.objectMapper = objectMapper; key = job.getKey(); type = job.getType(); headers = new JobHeadersImpl(job.getJobHeaders()); customHeaders = objectMapper.fromJsonAsMap(job.getCustomHeaders()); worker = job.getWorker(); retries = job.getRetries(); deadline = Instant.ofEpochMilli(job.getDeadline()); payload = job.getPayload(); }
public ActivatedJobImpl(ZeebeObjectMapper objectMapper, GatewayOuterClass.ActivatedJob job) { this.objectMapper = objectMapper; key = job.getKey(); type = job.getType(); headers = new JobHeadersImpl(job.getJobHeaders()); customHeaders = objectMapper.fromJsonAsMap(job.getCustomHeaders()); worker = job.getWorker(); retries = job.getRetries(); deadline = Instant.ofEpochMilli(job.getDeadline()); payload = job.getPayload(); }