/** * * * <pre> * A policy that specifies the conditions for this subscription's expiration. * A subscription is considered active as long as any connected subscriber is * successfully consuming messages from the subscription or is issuing * operations on the subscription. If `expiration_policy` is not set, a * *default policy* with `ttl` of 31 days will be used. The minimum allowed * value for `expiration_policy.ttl` is 1 day. * <b>BETA:</b> This feature is part of a beta release. This API might be * changed in backward-incompatible ways and is not recommended for production * use. It is not subject to any SLA or deprecation policy. * </pre> * * <code>.google.pubsub.v1.ExpirationPolicy expiration_policy = 11;</code> */ public com.google.pubsub.v1.ExpirationPolicyOrBuilder getExpirationPolicyOrBuilder() { return getExpirationPolicy(); }
@java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } if (!getTopicBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, topic_); } if (pushConfig_ != null) { output.writeMessage(4, getPushConfig()); } if (ackDeadlineSeconds_ != 0) { output.writeInt32(5, ackDeadlineSeconds_); } if (retainAckedMessages_ != false) { output.writeBool(7, retainAckedMessages_); } if (messageRetentionDuration_ != null) { output.writeMessage(8, getMessageRetentionDuration()); } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 9); if (expirationPolicy_ != null) { output.writeMessage(11, getExpirationPolicy()); } unknownFields.writeTo(output); }
size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getExpirationPolicy());
hash = (53 * hash) + getExpirationPolicy().hashCode();
@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; }
/** * * * <pre> * A policy that specifies the conditions for this subscription's expiration. * A subscription is considered active as long as any connected subscriber is * successfully consuming messages from the subscription or is issuing * operations on the subscription. If `expiration_policy` is not set, a * *default policy* with `ttl` of 31 days will be used. The minimum allowed * value for `expiration_policy.ttl` is 1 day. * <b>BETA:</b> This feature is part of a beta release. This API might be * changed in backward-incompatible ways and is not recommended for production * use. It is not subject to any SLA or deprecation policy. * </pre> * * <code>.google.pubsub.v1.ExpirationPolicy expiration_policy = 11;</code> */ public com.google.pubsub.v1.ExpirationPolicyOrBuilder getExpirationPolicyOrBuilder() { return getExpirationPolicy(); }
@java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } if (!getTopicBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, topic_); } if (pushConfig_ != null) { output.writeMessage(4, getPushConfig()); } if (ackDeadlineSeconds_ != 0) { output.writeInt32(5, ackDeadlineSeconds_); } if (retainAckedMessages_ != false) { output.writeBool(7, retainAckedMessages_); } if (messageRetentionDuration_ != null) { output.writeMessage(8, getMessageRetentionDuration()); } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 9); if (expirationPolicy_ != null) { output.writeMessage(11, getExpirationPolicy()); } unknownFields.writeTo(output); }
size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getExpirationPolicy());
hash = (53 * hash) + getExpirationPolicy().hashCode();
@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; }