public static final class MessageStoragePolicy.Builder extends GeneratedMessage.Builder<MessageStoragePolicy.Builder> implements MessageStoragePolicyOrBuilderA policy constraining the storage of messages published to the topic.
Protobuf type google.pubsub.v1.MessageStoragePolicy
Inheritance
java.lang.Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessage.Builder > MessageStoragePolicy.BuilderImplements
MessageStoragePolicyOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
Methods
addAllAllowedPersistenceRegions(Iterable<String> values)
public MessageStoragePolicy.Builder addAllAllowedPersistenceRegions(Iterable<String> values)Optional. A list of IDs of Google Cloud regions where messages that are published to the topic may be persisted in storage. Messages published by publishers running in non-allowed Google Cloud regions (or running outside of Google Cloud altogether) are routed for storage in one of the allowed regions. An empty list means that no regions are allowed, and is not a valid configuration.
repeated string allowed_persistence_regions = 1 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
values |
Iterable<String>The allowedPersistenceRegions to add. |
| Returns | |
|---|---|
| Type | Description |
MessageStoragePolicy.Builder |
This builder for chaining. |
addAllowedPersistenceRegions(String value)
public MessageStoragePolicy.Builder addAllowedPersistenceRegions(String value)Optional. A list of IDs of Google Cloud regions where messages that are published to the topic may be persisted in storage. Messages published by publishers running in non-allowed Google Cloud regions (or running outside of Google Cloud altogether) are routed for storage in one of the allowed regions. An empty list means that no regions are allowed, and is not a valid configuration.
repeated string allowed_persistence_regions = 1 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe allowedPersistenceRegions to add. |
| Returns | |
|---|---|
| Type | Description |
MessageStoragePolicy.Builder |
This builder for chaining. |
addAllowedPersistenceRegionsBytes(ByteString value)
public MessageStoragePolicy.Builder addAllowedPersistenceRegionsBytes(ByteString value)Optional. A list of IDs of Google Cloud regions where messages that are published to the topic may be persisted in storage. Messages published by publishers running in non-allowed Google Cloud regions (or running outside of Google Cloud altogether) are routed for storage in one of the allowed regions. An empty list means that no regions are allowed, and is not a valid configuration.
repeated string allowed_persistence_regions = 1 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes of the allowedPersistenceRegions to add. |
| Returns | |
|---|---|
| Type | Description |
MessageStoragePolicy.Builder |
This builder for chaining. |
build()
public MessageStoragePolicy build()| Returns | |
|---|---|
| Type | Description |
MessageStoragePolicy |
|
buildPartial()
public MessageStoragePolicy buildPartial()| Returns | |
|---|---|
| Type | Description |
MessageStoragePolicy |
|
clear()
public MessageStoragePolicy.Builder clear()| Returns | |
|---|---|
| Type | Description |
MessageStoragePolicy.Builder |
|
clearAllowedPersistenceRegions()
public MessageStoragePolicy.Builder clearAllowedPersistenceRegions()Optional. A list of IDs of Google Cloud regions where messages that are published to the topic may be persisted in storage. Messages published by publishers running in non-allowed Google Cloud regions (or running outside of Google Cloud altogether) are routed for storage in one of the allowed regions. An empty list means that no regions are allowed, and is not a valid configuration.
repeated string allowed_persistence_regions = 1 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
MessageStoragePolicy.Builder |
This builder for chaining. |
clearEnforceInTransit()
public MessageStoragePolicy.Builder clearEnforceInTransit() Optional. If true, allowed_persistence_regions is also used to enforce
in-transit guarantees for messages. That is, Pub/Sub will fail
Publish operations on this topic and subscribe operations
on any subscription attached to this topic in any region that is
not in allowed_persistence_regions.
bool enforce_in_transit = 2 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
MessageStoragePolicy.Builder |
This builder for chaining. |
getAllowedPersistenceRegions(int index)
public String getAllowedPersistenceRegions(int index)Optional. A list of IDs of Google Cloud regions where messages that are published to the topic may be persisted in storage. Messages published by publishers running in non-allowed Google Cloud regions (or running outside of Google Cloud altogether) are routed for storage in one of the allowed regions. An empty list means that no regions are allowed, and is not a valid configuration.
repeated string allowed_persistence_regions = 1 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
index |
intThe index of the element to return. |
| Returns | |
|---|---|
| Type | Description |
String |
The allowedPersistenceRegions at the given index. |
getAllowedPersistenceRegionsBytes(int index)
public ByteString getAllowedPersistenceRegionsBytes(int index)Optional. A list of IDs of Google Cloud regions where messages that are published to the topic may be persisted in storage. Messages published by publishers running in non-allowed Google Cloud regions (or running outside of Google Cloud altogether) are routed for storage in one of the allowed regions. An empty list means that no regions are allowed, and is not a valid configuration.
repeated string allowed_persistence_regions = 1 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
index |
intThe index of the value to return. |
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes of the allowedPersistenceRegions at the given index. |
getAllowedPersistenceRegionsCount()
public int getAllowedPersistenceRegionsCount()Optional. A list of IDs of Google Cloud regions where messages that are published to the topic may be persisted in storage. Messages published by publishers running in non-allowed Google Cloud regions (or running outside of Google Cloud altogether) are routed for storage in one of the allowed regions. An empty list means that no regions are allowed, and is not a valid configuration.
repeated string allowed_persistence_regions = 1 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
int |
The count of allowedPersistenceRegions. |
getAllowedPersistenceRegionsList()
public ProtocolStringList getAllowedPersistenceRegionsList()Optional. A list of IDs of Google Cloud regions where messages that are published to the topic may be persisted in storage. Messages published by publishers running in non-allowed Google Cloud regions (or running outside of Google Cloud altogether) are routed for storage in one of the allowed regions. An empty list means that no regions are allowed, and is not a valid configuration.
repeated string allowed_persistence_regions = 1 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
ProtocolStringList |
A list containing the allowedPersistenceRegions. |
getDefaultInstanceForType()
public MessageStoragePolicy getDefaultInstanceForType()| Returns | |
|---|---|
| Type | Description |
MessageStoragePolicy |
|
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
getEnforceInTransit()
public boolean getEnforceInTransit() Optional. If true, allowed_persistence_regions is also used to enforce
in-transit guarantees for messages. That is, Pub/Sub will fail
Publish operations on this topic and subscribe operations
on any subscription attached to this topic in any region that is
not in allowed_persistence_regions.
bool enforce_in_transit = 2 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
boolean |
The enforceInTransit. |
internalGetFieldAccessorTable()
protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
isInitialized()
public final boolean isInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public MessageStoragePolicy.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
MessageStoragePolicy.Builder |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
mergeFrom(Message other)
public MessageStoragePolicy.Builder mergeFrom(Message other)| Parameter | |
|---|---|
| Name | Description |
other |
Message |
| Returns | |
|---|---|
| Type | Description |
MessageStoragePolicy.Builder |
|
mergeFrom(MessageStoragePolicy other)
public MessageStoragePolicy.Builder mergeFrom(MessageStoragePolicy other)| Parameter | |
|---|---|
| Name | Description |
other |
MessageStoragePolicy |
| Returns | |
|---|---|
| Type | Description |
MessageStoragePolicy.Builder |
|
setAllowedPersistenceRegions(int index, String value)
public MessageStoragePolicy.Builder setAllowedPersistenceRegions(int index, String value)Optional. A list of IDs of Google Cloud regions where messages that are published to the topic may be persisted in storage. Messages published by publishers running in non-allowed Google Cloud regions (or running outside of Google Cloud altogether) are routed for storage in one of the allowed regions. An empty list means that no regions are allowed, and is not a valid configuration.
repeated string allowed_persistence_regions = 1 [(.google.api.field_behavior) = OPTIONAL];
| Parameters | |
|---|---|
| Name | Description |
index |
intThe index to set the value at. |
value |
StringThe allowedPersistenceRegions to set. |
| Returns | |
|---|---|
| Type | Description |
MessageStoragePolicy.Builder |
This builder for chaining. |
setEnforceInTransit(boolean value)
public MessageStoragePolicy.Builder setEnforceInTransit(boolean value) Optional. If true, allowed_persistence_regions is also used to enforce
in-transit guarantees for messages. That is, Pub/Sub will fail
Publish operations on this topic and subscribe operations
on any subscription attached to this topic in any region that is
not in allowed_persistence_regions.
bool enforce_in_transit = 2 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
booleanThe enforceInTransit to set. |
| Returns | |
|---|---|
| Type | Description |
MessageStoragePolicy.Builder |
This builder for chaining. |