/** * * * <pre> * The name of the topic from which this subscription is receiving messages. * Format is `projects/{project}/topics/{topic}`. * The value of this field will be `_deleted-topic_` if the topic has been * deleted. * </pre> * * <code>string topic = 2;</code> */ public Builder clearTopic() { topic_ = getDefaultInstance().getTopic(); onChanged(); return this; } /**
hash = (53 * hash) + getName().hashCode(); hash = (37 * hash) + TOPIC_FIELD_NUMBER; hash = (53 * hash) + getTopic().hashCode(); if (hasPushConfig()) { hash = (37 * hash) + PUSH_CONFIG_FIELD_NUMBER;
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.pubsub.v1.Subscription)) { return super.equals(obj); } com.google.pubsub.v1.Subscription other = (com.google.pubsub.v1.Subscription) obj; boolean result = true; result = result && getName().equals(other.getName()); result = result && getTopic().equals(other.getTopic()); result = result && (hasPushConfig() == other.hasPushConfig()); if (hasPushConfig()) { result = result && getPushConfig().equals(other.getPushConfig()); } result = result && (getAckDeadlineSeconds() == other.getAckDeadlineSeconds()); result = result && (getRetainAckedMessages() == other.getRetainAckedMessages()); result = result && (hasMessageRetentionDuration() == other.hasMessageRetentionDuration()); if (hasMessageRetentionDuration()) { result = result && getMessageRetentionDuration().equals(other.getMessageRetentionDuration()); } result = result && internalGetLabels().equals(other.internalGetLabels()); result = result && (hasExpirationPolicy() == other.hasExpirationPolicy()); if (hasExpirationPolicy()) { result = result && getExpirationPolicy().equals(other.getExpirationPolicy()); } result = result && unknownFields.equals(other.unknownFields); return result; }
public Builder mergeFrom(com.google.pubsub.v1.Subscription other) { if (other == com.google.pubsub.v1.Subscription.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); } if (!other.getTopic().isEmpty()) { topic_ = other.topic_; onChanged(); } if (other.hasPushConfig()) { mergePushConfig(other.getPushConfig()); } if (other.getAckDeadlineSeconds() != 0) { setAckDeadlineSeconds(other.getAckDeadlineSeconds()); } if (other.getRetainAckedMessages() != false) { setRetainAckedMessages(other.getRetainAckedMessages()); } if (other.hasMessageRetentionDuration()) { mergeMessageRetentionDuration(other.getMessageRetentionDuration()); } internalGetMutableLabels().mergeFrom(other.internalGetLabels()); if (other.hasExpirationPolicy()) { mergeExpirationPolicy(other.getExpirationPolicy()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
Assert.assertEquals(Objects.toString(topic), actualRequest.getTopic()); Assert.assertEquals(pushConfig, actualRequest.getPushConfig()); Assert.assertEquals(ackDeadlineSeconds, actualRequest.getAckDeadlineSeconds());
/** * <code>optional string topic = 2;</code> * * <pre> * The name of the topic from which this subscription is receiving messages. * </pre> */ public Builder clearTopic() { topic_ = getDefaultInstance().getTopic(); onChanged(); return this; } /**
/** * <pre> * The name of the topic from which this subscription is receiving messages. * The value of this field will be `_deleted-topic_` if the topic has been * deleted. * </pre> * * <code>optional string topic = 2;</code> */ public Builder clearTopic() { topic_ = getDefaultInstance().getTopic(); onChanged(); return this; } /**
/** * * * <pre> * The name of the topic from which this subscription is receiving messages. * Format is `projects/{project}/topics/{topic}`. * The value of this field will be `_deleted-topic_` if the topic has been * deleted. * </pre> * * <code>string topic = 2;</code> */ public Builder clearTopic() { topic_ = getDefaultInstance().getTopic(); onChanged(); return this; } /**
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptorForType().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); hash = (37 * hash) + TOPIC_FIELD_NUMBER; hash = (53 * hash) + getTopic().hashCode(); if (hasPushConfig()) { hash = (37 * hash) + PUSH_CONFIG_FIELD_NUMBER; hash = (53 * hash) + getPushConfig().hashCode(); } hash = (37 * hash) + ACK_DEADLINE_SECONDS_FIELD_NUMBER; hash = (53 * hash) + getAckDeadlineSeconds(); 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 com.google.pubsub.v1.Subscription)) { return super.equals(obj); } com.google.pubsub.v1.Subscription other = (com.google.pubsub.v1.Subscription) obj; boolean result = true; result = result && getName() .equals(other.getName()); result = result && getTopic() .equals(other.getTopic()); result = result && (hasPushConfig() == other.hasPushConfig()); if (hasPushConfig()) { result = result && getPushConfig() .equals(other.getPushConfig()); } result = result && (getAckDeadlineSeconds() == other.getAckDeadlineSeconds()); return result; }
public Builder mergeFrom(com.google.pubsub.v1.Subscription other) { if (other == com.google.pubsub.v1.Subscription.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); } if (!other.getTopic().isEmpty()) { topic_ = other.topic_; onChanged(); } if (other.hasPushConfig()) { mergePushConfig(other.getPushConfig()); } if (other.getAckDeadlineSeconds() != 0) { setAckDeadlineSeconds(other.getAckDeadlineSeconds()); } onChanged(); return this; }
public Builder mergeFrom(com.google.pubsub.v1.Subscription other) { if (other == com.google.pubsub.v1.Subscription.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); } if (!other.getTopic().isEmpty()) { topic_ = other.topic_; onChanged(); } if (other.hasPushConfig()) { mergePushConfig(other.getPushConfig()); } if (other.getAckDeadlineSeconds() != 0) { setAckDeadlineSeconds(other.getAckDeadlineSeconds()); } onChanged(); return this; }
hash = (53 * hash) + getName().hashCode(); hash = (37 * hash) + TOPIC_FIELD_NUMBER; hash = (53 * hash) + getTopic().hashCode(); if (hasPushConfig()) { hash = (37 * hash) + PUSH_CONFIG_FIELD_NUMBER;
@Override public List<SubscriptionPath> listSubscriptions(ProjectPath project, TopicPath topic) throws IOException { ListSubscriptionsRequest.Builder request = ListSubscriptionsRequest.newBuilder() .setProject(project.getPath()) .setPageSize(LIST_BATCH_SIZE); ListSubscriptionsResponse response = subscriberStub().listSubscriptions(request.build()); if (response.getSubscriptionsCount() == 0) { return ImmutableList.of(); } List<SubscriptionPath> subscriptions = new ArrayList<>(response.getSubscriptionsCount()); while (true) { for (Subscription subscription : response.getSubscriptionsList()) { if (subscription.getTopic().equals(topic.getPath())) { subscriptions.add(subscriptionPathFromPath(subscription.getName())); } } if (response.getNextPageToken().isEmpty()) { break; } request.setPageToken(response.getNextPageToken()); response = subscriberStub().listSubscriptions(request.build()); } return subscriptions; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.pubsub.v1.Subscription)) { return super.equals(obj); } com.google.pubsub.v1.Subscription other = (com.google.pubsub.v1.Subscription) obj; boolean result = true; result = result && getName().equals(other.getName()); result = result && getTopic().equals(other.getTopic()); result = result && (hasPushConfig() == other.hasPushConfig()); if (hasPushConfig()) { result = result && getPushConfig().equals(other.getPushConfig()); } result = result && (getAckDeadlineSeconds() == other.getAckDeadlineSeconds()); result = result && (getRetainAckedMessages() == other.getRetainAckedMessages()); result = result && (hasMessageRetentionDuration() == other.hasMessageRetentionDuration()); if (hasMessageRetentionDuration()) { result = result && getMessageRetentionDuration().equals(other.getMessageRetentionDuration()); } result = result && internalGetLabels().equals(other.internalGetLabels()); result = result && (hasExpirationPolicy() == other.hasExpirationPolicy()); if (hasExpirationPolicy()) { result = result && getExpirationPolicy().equals(other.getExpirationPolicy()); } result = result && unknownFields.equals(other.unknownFields); return result; }
public Builder mergeFrom(com.google.pubsub.v1.Subscription other) { if (other == com.google.pubsub.v1.Subscription.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); } if (!other.getTopic().isEmpty()) { topic_ = other.topic_; onChanged(); } if (other.hasPushConfig()) { mergePushConfig(other.getPushConfig()); } if (other.getAckDeadlineSeconds() != 0) { setAckDeadlineSeconds(other.getAckDeadlineSeconds()); } if (other.getRetainAckedMessages() != false) { setRetainAckedMessages(other.getRetainAckedMessages()); } if (other.hasMessageRetentionDuration()) { mergeMessageRetentionDuration(other.getMessageRetentionDuration()); } internalGetMutableLabels().mergeFrom(other.internalGetLabels()); if (other.hasExpirationPolicy()) { mergeExpirationPolicy(other.getExpirationPolicy()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }