@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); hash = (37 * hash) + CORRELATIONKEY_FIELD_NUMBER; hash = (53 * hash) + getCorrelationKey().hashCode(); hash = (37 * hash) + TIMETOLIVE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getTimeToLive()); hash = (37 * hash) + MESSAGEID_FIELD_NUMBER; hash = (53 * hash) + getMessageId().hashCode(); hash = (37 * hash) + PAYLOAD_FIELD_NUMBER; hash = (53 * hash) + getPayload().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof io.zeebe.gateway.protocol.GatewayOuterClass.PublishMessageRequest)) { return super.equals(obj); } io.zeebe.gateway.protocol.GatewayOuterClass.PublishMessageRequest other = (io.zeebe.gateway.protocol.GatewayOuterClass.PublishMessageRequest) obj; boolean result = true; result = result && getName() .equals(other.getName()); result = result && getCorrelationKey() .equals(other.getCorrelationKey()); result = result && (getTimeToLive() == other.getTimeToLive()); result = result && getMessageId() .equals(other.getMessageId()); result = result && getPayload() .equals(other.getPayload()); result = result && unknownFields.equals(other.unknownFields); return result; }
public Builder mergeFrom(io.zeebe.gateway.protocol.GatewayOuterClass.PublishMessageRequest other) { if (other == io.zeebe.gateway.protocol.GatewayOuterClass.PublishMessageRequest.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); } if (!other.getCorrelationKey().isEmpty()) { correlationKey_ = other.correlationKey_; onChanged(); } if (other.getTimeToLive() != 0L) { setTimeToLive(other.getTimeToLive()); } if (!other.getMessageId().isEmpty()) { messageId_ = other.messageId_; onChanged(); } if (!other.getPayload().isEmpty()) { payload_ = other.payload_; onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
/** * <pre> * the message payload as a JSON document; see CreateWorkflowInstanceRequest for the * rules about payloads * </pre> * * <code>string payload = 5;</code> */ public Builder clearPayload() { payload_ = getDefaultInstance().getPayload(); onChanged(); return this; } /**
public static BrokerPublishMessageRequest toPublishMessageRequest( PublishMessageRequest grpcRequest) { final BrokerPublishMessageRequest brokerRequest = new BrokerPublishMessageRequest(grpcRequest.getName(), grpcRequest.getCorrelationKey()); brokerRequest .setMessageId(grpcRequest.getMessageId()) .setTimeToLive(grpcRequest.getTimeToLive()) .setPayload(ensureJsonSet(grpcRequest.getPayload())); return brokerRequest; }