@java.lang.Override public Builder newBuilderForType() { return newBuilder(); }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + SUBSCRIPTION_FIELD_NUMBER; hash = (53 * hash) + getSubscription().hashCode(); if (getAckIdsCount() > 0) { hash = (37 * hash) + ACK_IDS_FIELD_NUMBER; hash = (53 * hash) + getAckIdsList().hashCode(); } if (getModifyDeadlineSecondsCount() > 0) { hash = (37 * hash) + MODIFY_DEADLINE_SECONDS_FIELD_NUMBER; hash = (53 * hash) + getModifyDeadlineSecondsList().hashCode(); } if (getModifyDeadlineAckIdsCount() > 0) { hash = (37 * hash) + MODIFY_DEADLINE_ACK_IDS_FIELD_NUMBER; hash = (53 * hash) + getModifyDeadlineAckIdsList().hashCode(); } hash = (37 * hash) + STREAM_ACK_DEADLINE_SECONDS_FIELD_NUMBER; hash = (53 * hash) + getStreamAckDeadlineSeconds(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
public Builder mergeFrom(com.google.pubsub.v1.StreamingPullRequest other) { if (other == com.google.pubsub.v1.StreamingPullRequest.getDefaultInstance()) return this; if (!other.getSubscription().isEmpty()) { subscription_ = other.subscription_; onChanged(); if (other.getStreamAckDeadlineSeconds() != 0) { setStreamAckDeadlineSeconds(other.getStreamAckDeadlineSeconds());
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.pubsub.v1.StreamingPullRequest)) { return super.equals(obj); } com.google.pubsub.v1.StreamingPullRequest other = (com.google.pubsub.v1.StreamingPullRequest) obj; boolean result = true; result = result && getSubscription().equals(other.getSubscription()); result = result && getAckIdsList().equals(other.getAckIdsList()); result = result && getModifyDeadlineSecondsList().equals(other.getModifyDeadlineSecondsList()); result = result && getModifyDeadlineAckIdsList().equals(other.getModifyDeadlineAckIdsList()); result = result && (getStreamAckDeadlineSeconds() == other.getStreamAckDeadlineSeconds()); result = result && unknownFields.equals(other.unknownFields); return result; }
/** * * * <pre> * The subscription for which to initialize the new stream. This must be * provided in the first request on the stream, and must not be set in * subsequent requests from client to server. * Format is `projects/{project}/subscriptions/{sub}`. * </pre> * * <code>string subscription = 1;</code> */ public Builder clearSubscription() { subscription_ = getDefaultInstance().getSubscription(); onChanged(); return this; } /**
if (!getSubscriptionBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, subscription_); dataSize += computeStringSizeNoTag(ackIds_.getRaw(i)); size += 1 * getAckIdsList().size(); if (!getModifyDeadlineSecondsList().isEmpty()) { size += 1; size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize); dataSize += computeStringSizeNoTag(modifyDeadlineAckIds_.getRaw(i)); size += 1 * getModifyDeadlineAckIdsList().size();
@java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (!getSubscriptionBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, subscription_); } for (int i = 0; i < ackIds_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, ackIds_.getRaw(i)); } if (getModifyDeadlineSecondsList().size() > 0) { output.writeUInt32NoTag(26); output.writeUInt32NoTag(modifyDeadlineSecondsMemoizedSerializedSize); } for (int i = 0; i < modifyDeadlineSeconds_.size(); i++) { output.writeInt32NoTag(modifyDeadlineSeconds_.get(i)); } for (int i = 0; i < modifyDeadlineAckIds_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString( output, 4, modifyDeadlineAckIds_.getRaw(i)); } if (streamAckDeadlineSeconds_ != 0) { output.writeInt32(5, streamAckDeadlineSeconds_); } unknownFields.writeTo(output); }
@java.lang.Override public com.google.pubsub.v1.StreamingPullRequest getDefaultInstanceForType() { return com.google.pubsub.v1.StreamingPullRequest.getDefaultInstance(); }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.pubsub.v1.StreamingPullRequest)) { return super.equals(obj); } com.google.pubsub.v1.StreamingPullRequest other = (com.google.pubsub.v1.StreamingPullRequest) obj; boolean result = true; result = result && getSubscription().equals(other.getSubscription()); result = result && getAckIdsList().equals(other.getAckIdsList()); result = result && getModifyDeadlineSecondsList().equals(other.getModifyDeadlineSecondsList()); result = result && getModifyDeadlineAckIdsList().equals(other.getModifyDeadlineAckIdsList()); result = result && (getStreamAckDeadlineSeconds() == other.getStreamAckDeadlineSeconds()); result = result && unknownFields.equals(other.unknownFields); return result; }
if (!getSubscriptionBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, subscription_); dataSize += computeStringSizeNoTag(ackIds_.getRaw(i)); size += 1 * getAckIdsList().size(); if (!getModifyDeadlineSecondsList().isEmpty()) { size += 1; size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize); dataSize += computeStringSizeNoTag(modifyDeadlineAckIds_.getRaw(i)); size += 1 * getModifyDeadlineAckIdsList().size();
/** * * * <pre> * The subscription for which to initialize the new stream. This must be * provided in the first request on the stream, and must not be set in * subsequent requests from client to server. * Format is `projects/{project}/subscriptions/{sub}`. * </pre> * * <code>string subscription = 1;</code> */ public Builder clearSubscription() { subscription_ = getDefaultInstance().getSubscription(); onChanged(); return this; } /**
@java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (!getSubscriptionBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, subscription_); } for (int i = 0; i < ackIds_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, ackIds_.getRaw(i)); } if (getModifyDeadlineSecondsList().size() > 0) { output.writeUInt32NoTag(26); output.writeUInt32NoTag(modifyDeadlineSecondsMemoizedSerializedSize); } for (int i = 0; i < modifyDeadlineSeconds_.size(); i++) { output.writeInt32NoTag(modifyDeadlineSeconds_.get(i)); } for (int i = 0; i < modifyDeadlineAckIds_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString( output, 4, modifyDeadlineAckIds_.getRaw(i)); } if (streamAckDeadlineSeconds_ != 0) { output.writeInt32(5, streamAckDeadlineSeconds_); } unknownFields.writeTo(output); }
.setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( com.google.pubsub.v1.StreamingPullRequest.getDefaultInstance())) .setResponseMarshaller( io.grpc.protobuf.ProtoUtils.marshaller(
@Override public void onNext(StreamingPullRequest request) { synchronized (stream) { if (!request.getSubscription().isEmpty()) { if (!subscription.isEmpty() && !subscription.equals(request.getSubscription())) { responseObserver.onError( new StatusException( if (request.getStreamAckDeadlineSeconds() == 0) { responseObserver.onError( new StatusException( subscription = request.getSubscription(); subscriptionInitialized.set(true); subscriptionInitialized.notifyAll(); if (request.getStreamAckDeadlineSeconds() > 0) { synchronized (messageAckDeadline) { messageAckDeadline.set(request.getStreamAckDeadlineSeconds()); messageAckDeadline.notifyAll(); if (request.getAckIdsCount() > 0) { addReceivedAcks(request.getAckIdsList()); if (request.getModifyDeadlineAckIdsCount() > 0) { if (request.getModifyDeadlineAckIdsCount() != request.getModifyDeadlineSecondsCount()) { closeStream(stream); responseObserver.onError( Iterator<String> ackIds = request.getModifyDeadlineAckIdsList().iterator();
public Builder mergeFrom(com.google.pubsub.v1.StreamingPullRequest other) { if (other == com.google.pubsub.v1.StreamingPullRequest.getDefaultInstance()) return this; if (!other.getSubscription().isEmpty()) { subscription_ = other.subscription_; onChanged(); if (other.getStreamAckDeadlineSeconds() != 0) { setStreamAckDeadlineSeconds(other.getStreamAckDeadlineSeconds());
requests.add(StreamingPullRequest.newBuilder());
@java.lang.Override public com.google.pubsub.v1.StreamingPullRequest getDefaultInstanceForType() { return com.google.pubsub.v1.StreamingPullRequest.getDefaultInstance(); }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + SUBSCRIPTION_FIELD_NUMBER; hash = (53 * hash) + getSubscription().hashCode(); if (getAckIdsCount() > 0) { hash = (37 * hash) + ACK_IDS_FIELD_NUMBER; hash = (53 * hash) + getAckIdsList().hashCode(); } if (getModifyDeadlineSecondsCount() > 0) { hash = (37 * hash) + MODIFY_DEADLINE_SECONDS_FIELD_NUMBER; hash = (53 * hash) + getModifyDeadlineSecondsList().hashCode(); } if (getModifyDeadlineAckIdsCount() > 0) { hash = (37 * hash) + MODIFY_DEADLINE_ACK_IDS_FIELD_NUMBER; hash = (53 * hash) + getModifyDeadlineAckIdsList().hashCode(); } hash = (37 * hash) + STREAM_ACK_DEADLINE_SECONDS_FIELD_NUMBER; hash = (53 * hash) + getStreamAckDeadlineSeconds(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
StreamingPullRequest.newBuilder() .setSubscription(subscription) .setStreamAckDeadlineSeconds(60)
.setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( com.google.pubsub.v1.StreamingPullRequest.getDefaultInstance())) .setResponseMarshaller( io.grpc.protobuf.ProtoUtils.marshaller(