Class MessageStoragePolicy.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<MessageStoragePolicy.Builder>
com.google.pubsub.v1.MessageStoragePolicy.Builder
All Implemented Interfaces:
com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, MessageStoragePolicyOrBuilder, Cloneable
Enclosing class:
MessageStoragePolicy

public static final class MessageStoragePolicy.Builder extends com.google.protobuf.GeneratedMessage.Builder<MessageStoragePolicy.Builder> implements MessageStoragePolicyOrBuilder
 A policy constraining the storage of messages published to the topic.
 
Protobuf type google.pubsub.v1.MessageStoragePolicy
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<MessageStoragePolicy.Builder>
    • clear

      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<MessageStoragePolicy.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<MessageStoragePolicy.Builder>
    • getDefaultInstanceForType

      public MessageStoragePolicy getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public MessageStoragePolicy build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public MessageStoragePolicy buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public MessageStoragePolicy.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<MessageStoragePolicy.Builder>
    • mergeFrom

    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<MessageStoragePolicy.Builder>
    • mergeFrom

      public MessageStoragePolicy.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<MessageStoragePolicy.Builder>
      Throws:
      IOException
    • getAllowedPersistenceRegionsList

      public com.google.protobuf.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];
      Specified by:
      getAllowedPersistenceRegionsList in interface MessageStoragePolicyOrBuilder
      Returns:
      A list containing the allowedPersistenceRegions.
    • 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];
      Specified by:
      getAllowedPersistenceRegionsCount in interface MessageStoragePolicyOrBuilder
      Returns:
      The count of allowedPersistenceRegions.
    • getAllowedPersistenceRegions

      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];
      Specified by:
      getAllowedPersistenceRegions in interface MessageStoragePolicyOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The allowedPersistenceRegions at the given index.
    • getAllowedPersistenceRegionsBytes

      public com.google.protobuf.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];
      Specified by:
      getAllowedPersistenceRegionsBytes in interface MessageStoragePolicyOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the allowedPersistenceRegions at the given index.
    • setAllowedPersistenceRegions

      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:
      index - The index to set the value at.
      value - The allowedPersistenceRegions to set.
      Returns:
      This builder for chaining.
    • addAllowedPersistenceRegions

      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];
      Parameters:
      value - The allowedPersistenceRegions to add.
      Returns:
      This builder for chaining.
    • addAllAllowedPersistenceRegions

      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];
      Parameters:
      values - The allowedPersistenceRegions to add.
      Returns:
      This builder for chaining.
    • 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:
      This builder for chaining.
    • addAllowedPersistenceRegionsBytes

      public MessageStoragePolicy.Builder addAllowedPersistenceRegionsBytes(com.google.protobuf.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];
      Parameters:
      value - The bytes of the allowedPersistenceRegions to add.
      Returns:
      This builder for chaining.
    • 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];
      Specified by:
      getEnforceInTransit in interface MessageStoragePolicyOrBuilder
      Returns:
      The enforceInTransit.
    • setEnforceInTransit

      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];
      Parameters:
      value - The enforceInTransit to set.
      Returns:
      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:
      This builder for chaining.