/** * * * <pre> * If push delivery is used with this subscription, this field is * used to configure it. An empty `pushConfig` signifies that the subscriber * will pull and ack messages using API methods. * </pre> * * <code>.google.pubsub.v1.PushConfig push_config = 4;</code> */ public Builder setPushConfig(com.google.pubsub.v1.PushConfig value) { if (pushConfigBuilder_ == null) { if (value == null) { throw new NullPointerException(); } pushConfig_ = value; onChanged(); } else { pushConfigBuilder_.setMessage(value); } return this; } /**
/** * * * <pre> * How long to retain unacknowledged messages in the subscription's backlog, * from the moment a message is published. * If `retain_acked_messages` is true, then this also configures the retention * of acknowledged messages, and thus configures how far back in time a `Seek` * can be done. Defaults to 7 days. Cannot be more than 7 days or less than 10 * minutes.<br><br> * <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.protobuf.Duration message_retention_duration = 8;</code> */ public Builder setMessageRetentionDuration(com.google.protobuf.Duration value) { if (messageRetentionDurationBuilder_ == null) { if (value == null) { throw new NullPointerException(); } messageRetentionDuration_ = value; onChanged(); } else { messageRetentionDurationBuilder_.setMessage(value); } 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 setTopicBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); topic_ = value; 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 Builder setExpirationPolicy( com.google.pubsub.v1.ExpirationPolicy.Builder builderForValue) { if (expirationPolicyBuilder_ == null) { expirationPolicy_ = builderForValue.build(); onChanged(); } else { expirationPolicyBuilder_.setMessage(builderForValue.build()); } 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 Builder clearExpirationPolicy() { if (expirationPolicyBuilder_ == null) { expirationPolicy_ = null; onChanged(); } else { expirationPolicy_ = null; expirationPolicyBuilder_ = null; } return this; } /**
/** * * * <pre> * How long to retain unacknowledged messages in the subscription's backlog, * from the moment a message is published. * If `retain_acked_messages` is true, then this also configures the retention * of acknowledged messages, and thus configures how far back in time a `Seek` * can be done. Defaults to 7 days. Cannot be more than 7 days or less than 10 * minutes.<br><br> * <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.protobuf.Duration message_retention_duration = 8;</code> */ public Builder clearMessageRetentionDuration() { if (messageRetentionDurationBuilder_ == null) { messageRetentionDuration_ = null; onChanged(); } else { messageRetentionDuration_ = null; messageRetentionDurationBuilder_ = null; } return this; } /**
/** * * * <pre> * If push delivery is used with this subscription, this field is * used to configure it. An empty `pushConfig` signifies that the subscriber * will pull and ack messages using API methods. * </pre> * * <code>.google.pubsub.v1.PushConfig push_config = 4;</code> */ public Builder mergePushConfig(com.google.pubsub.v1.PushConfig value) { if (pushConfigBuilder_ == null) { if (pushConfig_ != null) { pushConfig_ = com.google.pubsub.v1.PushConfig.newBuilder(pushConfig_) .mergeFrom(value) .buildPartial(); } else { pushConfig_ = value; } onChanged(); } else { pushConfigBuilder_.mergeFrom(value); } return this; } /**
/** * * * <pre> * The name of the subscription. It must have the format * `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must * start with a letter, and contain only letters (`[A-Za-z]`), numbers * (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), * plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters * in length, and it must not start with `"goog"`. * </pre> * * <code>string name = 1;</code> */ public Builder setNameBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); name_ = value; onChanged(); return this; }
/** * * * <pre> * Indicates whether to retain acknowledged messages. If true, then * messages are not expunged from the subscription's backlog, even if they are * acknowledged, until they fall out of the `message_retention_duration` * window. This must be true if you would like to * <a href="https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time"> * Seek to a timestamp</a>. * <br><br> * <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>bool retain_acked_messages = 7;</code> */ public Builder setRetainAckedMessages(boolean value) { retainAckedMessages_ = value; onChanged(); return this; } /**
/** * * * <pre> * Indicates whether to retain acknowledged messages. If true, then * messages are not expunged from the subscription's backlog, even if they are * acknowledged, until they fall out of the `message_retention_duration` * window. This must be true if you would like to * <a href="https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time"> * Seek to a timestamp</a>. * <br><br> * <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>bool retain_acked_messages = 7;</code> */ public Builder clearRetainAckedMessages() { retainAckedMessages_ = false; onChanged(); return this; }
/** * * * <pre> * The name of the subscription. It must have the format * `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must * start with a letter, and contain only letters (`[A-Za-z]`), numbers * (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), * plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters * in length, and it must not start with `"goog"`. * </pre> * * <code>string name = 1;</code> */ public Builder setName(java.lang.String value) { if (value == null) { throw new NullPointerException(); } name_ = value; onChanged(); return this; } /**
/** * * * <pre> * If push delivery is used with this subscription, this field is * used to configure it. An empty `pushConfig` signifies that the subscriber * will pull and ack messages using API methods. * </pre> * * <code>.google.pubsub.v1.PushConfig push_config = 4;</code> */ public Builder clearPushConfig() { if (pushConfigBuilder_ == null) { pushConfig_ = null; onChanged(); } else { pushConfig_ = null; pushConfigBuilder_ = null; } 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.ExpirationPolicy.Builder getExpirationPolicyBuilder() { onChanged(); return getExpirationPolicyFieldBuilder().getBuilder(); } /**
/** * * * <pre> * How long to retain unacknowledged messages in the subscription's backlog, * from the moment a message is published. * If `retain_acked_messages` is true, then this also configures the retention * of acknowledged messages, and thus configures how far back in time a `Seek` * can be done. Defaults to 7 days. Cannot be more than 7 days or less than 10 * minutes.<br><br> * <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.protobuf.Duration message_retention_duration = 8;</code> */ public com.google.protobuf.Duration.Builder getMessageRetentionDurationBuilder() { onChanged(); return getMessageRetentionDurationFieldBuilder().getBuilder(); } /**
/** * * * <pre> * If push delivery is used with this subscription, this field is * used to configure it. An empty `pushConfig` signifies that the subscriber * will pull and ack messages using API methods. * </pre> * * <code>.google.pubsub.v1.PushConfig push_config = 4;</code> */ public Builder setPushConfig(com.google.pubsub.v1.PushConfig.Builder builderForValue) { if (pushConfigBuilder_ == null) { pushConfig_ = builderForValue.build(); onChanged(); } else { pushConfigBuilder_.setMessage(builderForValue.build()); } 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 setTopic(java.lang.String value) { if (value == null) { throw new NullPointerException(); } topic_ = value; onChanged(); return this; } /**
/** * * * <pre> * The name of the subscription. It must have the format * `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must * start with a letter, and contain only letters (`[A-Za-z]`), numbers * (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), * plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters * in length, and it must not start with `"goog"`. * </pre> * * <code>string name = 1;</code> */ public Builder clearName() { name_ = getDefaultInstance().getName(); 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; } /**
/** * * * <pre> * If push delivery is used with this subscription, this field is * used to configure it. An empty `pushConfig` signifies that the subscriber * will pull and ack messages using API methods. * </pre> * * <code>.google.pubsub.v1.PushConfig push_config = 4;</code> */ public com.google.pubsub.v1.PushConfig.Builder getPushConfigBuilder() { onChanged(); return getPushConfigFieldBuilder().getBuilder(); } /**
private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetMutableLabels() { onChanged(); ; if (labels_ == null) { labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); } if (!labels_.isMutable()) { labels_ = labels_.copy(); } return labels_; }