@java.lang.Override public Builder newBuilderForType() { return newBuilder(); }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.pubsub.v1.ModifyAckDeadlineRequest)) { return super.equals(obj); } com.google.pubsub.v1.ModifyAckDeadlineRequest other = (com.google.pubsub.v1.ModifyAckDeadlineRequest) obj; boolean result = true; result = result && getSubscription().equals(other.getSubscription()); result = result && getAckIdsList().equals(other.getAckIdsList()); result = result && (getAckDeadlineSeconds() == other.getAckDeadlineSeconds()); result = result && unknownFields.equals(other.unknownFields); return result; }
public Builder mergeFrom(com.google.pubsub.v1.ModifyAckDeadlineRequest other) { if (other == com.google.pubsub.v1.ModifyAckDeadlineRequest.getDefaultInstance()) return this; if (!other.getSubscription().isEmpty()) { subscription_ = other.subscription_; onChanged(); } if (!other.ackIds_.isEmpty()) { if (ackIds_.isEmpty()) { ackIds_ = other.ackIds_; bitField0_ = (bitField0_ & ~0x00000002); } else { ensureAckIdsIsMutable(); ackIds_.addAll(other.ackIds_); } onChanged(); } if (other.getAckDeadlineSeconds() != 0) { setAckDeadlineSeconds(other.getAckDeadlineSeconds()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
@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(); } hash = (37 * hash) + ACK_DEADLINE_SECONDS_FIELD_NUMBER; hash = (53 * hash) + getAckDeadlineSeconds(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
/** * * * <pre> * The name of the subscription. * 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 int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getSubscriptionBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, subscription_); } if (ackDeadlineSeconds_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, ackDeadlineSeconds_); } { int dataSize = 0; for (int i = 0; i < ackIds_.size(); i++) { dataSize += computeStringSizeNoTag(ackIds_.getRaw(i)); } size += dataSize; size += 1 * getAckIdsList().size(); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptorForType().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(); } hash = (37 * hash) + ACK_DEADLINE_SECONDS_FIELD_NUMBER; hash = (53 * hash) + getAckDeadlineSeconds(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
@Override public void modifyAckDeadline( ModifyAckDeadlineRequest request, StreamObserver<Empty> responseObserver) { for (String ackId : request.getAckIdsList()) { addReceivedModifyAckDeadline(new ModifyAckDeadline(ackId, request.getAckDeadlineSeconds())); } responseObserver.onNext(Empty.getDefaultInstance()); responseObserver.onCompleted(); }
@java.lang.Override public com.google.pubsub.v1.ModifyAckDeadlineRequest getDefaultInstanceForType() { return com.google.pubsub.v1.ModifyAckDeadlineRequest.getDefaultInstance(); }
@java.lang.Override public com.google.pubsub.v1.ModifyAckDeadlineRequest build() { com.google.pubsub.v1.ModifyAckDeadlineRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; }
@java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getSubscriptionBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, subscription_); } if (ackDeadlineSeconds_ != 0) { output.writeInt32(3, ackDeadlineSeconds_); } for (int i = 0; i < ackIds_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, ackIds_.getRaw(i)); } unknownFields.writeTo(output); }
@java.lang.Override public com.google.pubsub.v1.ModifyAckDeadlineRequest buildPartial() { com.google.pubsub.v1.ModifyAckDeadlineRequest result = new com.google.pubsub.v1.ModifyAckDeadlineRequest(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; result.subscription_ = subscription_; if (((bitField0_ & 0x00000002) == 0x00000002)) { ackIds_ = ackIds_.getUnmodifiableView(); bitField0_ = (bitField0_ & ~0x00000002); } result.ackIds_ = ackIds_; result.ackDeadlineSeconds_ = ackDeadlineSeconds_; result.bitField0_ = to_bitField0_; onBuilt(); return result; }
if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { done = true; makeExtensionsImmutable();
ackIds_ = ackIds_.getUnmodifiableView(); makeExtensionsImmutable();
@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(); } hash = (37 * hash) + ACK_DEADLINE_SECONDS_FIELD_NUMBER; hash = (53 * hash) + getAckDeadlineSeconds(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getSubscriptionBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, subscription_); } if (ackDeadlineSeconds_ != 0) { size += com.google.protobuf.CodedOutputStream .computeInt32Size(3, ackDeadlineSeconds_); } { int dataSize = 0; for (int i = 0; i < ackIds_.size(); i++) { dataSize += computeStringSizeNoTag(ackIds_.getRaw(i)); } size += dataSize; size += 1 * getAckIdsList().size(); } memoizedSize = size; return size; }
/** * <code>optional string subscription = 1;</code> * * <pre> * The name of the subscription. * </pre> */ public Builder clearSubscription() { subscription_ = getDefaultInstance().getSubscription(); onChanged(); return this; } /**
.setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( com.google.pubsub.v1.ModifyAckDeadlineRequest.getDefaultInstance())) .setResponseMarshaller( io.grpc.protobuf.ProtoUtils.marshaller(
public com.google.pubsub.v1.ModifyAckDeadlineRequest build() { com.google.pubsub.v1.ModifyAckDeadlineRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; }
@java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getSubscriptionBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, subscription_); } if (ackDeadlineSeconds_ != 0) { output.writeInt32(3, ackDeadlineSeconds_); } for (int i = 0; i < ackIds_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, ackIds_.getRaw(i)); } unknownFields.writeTo(output); }