public static final class Topic.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Topic.Builder> implements TopicOrBuilder
A topic resource.Protobuf type
google.pubsub.v1.Topic| Modifier and Type | Method and Description |
|---|---|
Topic.Builder |
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
Topic |
build() |
Topic |
buildPartial() |
Topic.Builder |
clear() |
Topic.Builder |
clearField(com.google.protobuf.Descriptors.FieldDescriptor field) |
Topic.Builder |
clearKmsKeyName()
The resource name of the Cloud KMS CryptoKey to be used to protect access
to messages published on this topic.
|
Topic.Builder |
clearLabels() |
Topic.Builder |
clearMessageStoragePolicy()
Policy constraining the set of Google Cloud Platform regions where messages
published to the topic may be stored.
|
Topic.Builder |
clearName()
Required.
|
Topic.Builder |
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) |
Topic.Builder |
clone() |
boolean |
containsLabels(String key)
See [Creating and managing labels]
(https://cloud.google.com/pubsub/docs/labels).
|
Topic |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Descriptors.Descriptor |
getDescriptorForType() |
String |
getKmsKeyName()
The resource name of the Cloud KMS CryptoKey to be used to protect access
to messages published on this topic.
|
com.google.protobuf.ByteString |
getKmsKeyNameBytes()
The resource name of the Cloud KMS CryptoKey to be used to protect access
to messages published on this topic.
|
Map<String,String> |
getLabels()
Deprecated.
|
int |
getLabelsCount()
See [Creating and managing labels]
(https://cloud.google.com/pubsub/docs/labels).
|
Map<String,String> |
getLabelsMap()
See [Creating and managing labels]
(https://cloud.google.com/pubsub/docs/labels).
|
String |
getLabelsOrDefault(String key,
String defaultValue)
See [Creating and managing labels]
(https://cloud.google.com/pubsub/docs/labels).
|
String |
getLabelsOrThrow(String key)
See [Creating and managing labels]
(https://cloud.google.com/pubsub/docs/labels).
|
MessageStoragePolicy |
getMessageStoragePolicy()
Policy constraining the set of Google Cloud Platform regions where messages
published to the topic may be stored.
|
MessageStoragePolicy.Builder |
getMessageStoragePolicyBuilder()
Policy constraining the set of Google Cloud Platform regions where messages
published to the topic may be stored.
|
MessageStoragePolicyOrBuilder |
getMessageStoragePolicyOrBuilder()
Policy constraining the set of Google Cloud Platform regions where messages
published to the topic may be stored.
|
Map<String,String> |
getMutableLabels()
Deprecated.
|
String |
getName()
Required.
|
com.google.protobuf.ByteString |
getNameBytes()
Required.
|
boolean |
hasMessageStoragePolicy()
Policy constraining the set of Google Cloud Platform regions where messages
published to the topic may be stored.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
protected com.google.protobuf.MapField |
internalGetMapField(int number) |
protected com.google.protobuf.MapField |
internalGetMutableMapField(int number) |
boolean |
isInitialized() |
Topic.Builder |
mergeFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
Topic.Builder |
mergeFrom(com.google.protobuf.Message other) |
Topic.Builder |
mergeFrom(Topic other) |
Topic.Builder |
mergeMessageStoragePolicy(MessageStoragePolicy value)
Policy constraining the set of Google Cloud Platform regions where messages
published to the topic may be stored.
|
Topic.Builder |
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
Topic.Builder |
putAllLabels(Map<String,String> values)
See [Creating and managing labels]
(https://cloud.google.com/pubsub/docs/labels).
|
Topic.Builder |
putLabels(String key,
String value)
See [Creating and managing labels]
(https://cloud.google.com/pubsub/docs/labels).
|
Topic.Builder |
removeLabels(String key)
See [Creating and managing labels]
(https://cloud.google.com/pubsub/docs/labels).
|
Topic.Builder |
setField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
Topic.Builder |
setKmsKeyName(String value)
The resource name of the Cloud KMS CryptoKey to be used to protect access
to messages published on this topic.
|
Topic.Builder |
setKmsKeyNameBytes(com.google.protobuf.ByteString value)
The resource name of the Cloud KMS CryptoKey to be used to protect access
to messages published on this topic.
|
Topic.Builder |
setMessageStoragePolicy(MessageStoragePolicy.Builder builderForValue)
Policy constraining the set of Google Cloud Platform regions where messages
published to the topic may be stored.
|
Topic.Builder |
setMessageStoragePolicy(MessageStoragePolicy value)
Policy constraining the set of Google Cloud Platform regions where messages
published to the topic may be stored.
|
Topic.Builder |
setName(String value)
Required.
|
Topic.Builder |
setNameBytes(com.google.protobuf.ByteString value)
Required.
|
Topic.Builder |
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
Object value) |
Topic.Builder |
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, isClean, markClean, newBuilderForField, onBuilt, onChanged, setUnknownFieldsProto3findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringaddAll, addAll, mergeFrom, newUninitializedMessageExceptionequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.MapField internalGetMapField(int number)
internalGetMapField in class com.google.protobuf.GeneratedMessageV3.Builder<Topic.Builder>protected com.google.protobuf.MapField internalGetMutableMapField(int number)
internalGetMutableMapField in class com.google.protobuf.GeneratedMessageV3.Builder<Topic.Builder>protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<Topic.Builder>public Topic.Builder clear()
clear in interface com.google.protobuf.Message.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessageV3.Builder<Topic.Builder>public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
getDescriptorForType in interface com.google.protobuf.Message.BuildergetDescriptorForType in interface com.google.protobuf.MessageOrBuildergetDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<Topic.Builder>public Topic getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic Topic build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic Topic buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic Topic.Builder clone()
clone in interface com.google.protobuf.Message.Builderclone in interface com.google.protobuf.MessageLite.Builderclone in class com.google.protobuf.GeneratedMessageV3.Builder<Topic.Builder>public Topic.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
setField in interface com.google.protobuf.Message.BuildersetField in class com.google.protobuf.GeneratedMessageV3.Builder<Topic.Builder>public Topic.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
clearField in interface com.google.protobuf.Message.BuilderclearField in class com.google.protobuf.GeneratedMessageV3.Builder<Topic.Builder>public Topic.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
clearOneof in interface com.google.protobuf.Message.BuilderclearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<Topic.Builder>public Topic.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
setRepeatedField in interface com.google.protobuf.Message.BuildersetRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Topic.Builder>public Topic.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
addRepeatedField in interface com.google.protobuf.Message.BuilderaddRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Topic.Builder>public Topic.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<Topic.Builder>public Topic.Builder mergeFrom(Topic other)
public final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<Topic.Builder>public Topic.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in interface com.google.protobuf.MessageLite.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<Topic.Builder>IOExceptionpublic String getName()
Required. The name of the topic. It must have the format
`"projects/{project}/topics/{topic}"`. `{topic}` 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"`.
string name = 1 [(.google.api.field_behavior) = REQUIRED];getName in interface TopicOrBuilderpublic com.google.protobuf.ByteString getNameBytes()
Required. The name of the topic. It must have the format
`"projects/{project}/topics/{topic}"`. `{topic}` 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"`.
string name = 1 [(.google.api.field_behavior) = REQUIRED];getNameBytes in interface TopicOrBuilderpublic Topic.Builder setName(String value)
Required. The name of the topic. It must have the format
`"projects/{project}/topics/{topic}"`. `{topic}` 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"`.
string name = 1 [(.google.api.field_behavior) = REQUIRED];value - The name to set.public Topic.Builder clearName()
Required. The name of the topic. It must have the format
`"projects/{project}/topics/{topic}"`. `{topic}` 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"`.
string name = 1 [(.google.api.field_behavior) = REQUIRED];public Topic.Builder setNameBytes(com.google.protobuf.ByteString value)
Required. The name of the topic. It must have the format
`"projects/{project}/topics/{topic}"`. `{topic}` 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"`.
string name = 1 [(.google.api.field_behavior) = REQUIRED];value - The bytes for name to set.public int getLabelsCount()
TopicOrBuilderSee [Creating and managing labels] (https://cloud.google.com/pubsub/docs/labels).
map<string, string> labels = 2;getLabelsCount in interface TopicOrBuilderpublic boolean containsLabels(String key)
See [Creating and managing labels] (https://cloud.google.com/pubsub/docs/labels).
map<string, string> labels = 2;containsLabels in interface TopicOrBuilder@Deprecated public Map<String,String> getLabels()
getLabelsMap() instead.getLabels in interface TopicOrBuilderpublic Map<String,String> getLabelsMap()
See [Creating and managing labels] (https://cloud.google.com/pubsub/docs/labels).
map<string, string> labels = 2;getLabelsMap in interface TopicOrBuilderpublic String getLabelsOrDefault(String key, String defaultValue)
See [Creating and managing labels] (https://cloud.google.com/pubsub/docs/labels).
map<string, string> labels = 2;getLabelsOrDefault in interface TopicOrBuilderpublic String getLabelsOrThrow(String key)
See [Creating and managing labels] (https://cloud.google.com/pubsub/docs/labels).
map<string, string> labels = 2;getLabelsOrThrow in interface TopicOrBuilderpublic Topic.Builder clearLabels()
public Topic.Builder removeLabels(String key)
See [Creating and managing labels] (https://cloud.google.com/pubsub/docs/labels).
map<string, string> labels = 2;@Deprecated public Map<String,String> getMutableLabels()
public Topic.Builder putLabels(String key, String value)
See [Creating and managing labels] (https://cloud.google.com/pubsub/docs/labels).
map<string, string> labels = 2;public Topic.Builder putAllLabels(Map<String,String> values)
See [Creating and managing labels] (https://cloud.google.com/pubsub/docs/labels).
map<string, string> labels = 2;public boolean hasMessageStoragePolicy()
Policy constraining the set of Google Cloud Platform regions where messages published to the topic may be stored. If not present, then no constraints are in effect.
.google.pubsub.v1.MessageStoragePolicy message_storage_policy = 3;hasMessageStoragePolicy in interface TopicOrBuilderpublic MessageStoragePolicy getMessageStoragePolicy()
Policy constraining the set of Google Cloud Platform regions where messages published to the topic may be stored. If not present, then no constraints are in effect.
.google.pubsub.v1.MessageStoragePolicy message_storage_policy = 3;getMessageStoragePolicy in interface TopicOrBuilderpublic Topic.Builder setMessageStoragePolicy(MessageStoragePolicy value)
Policy constraining the set of Google Cloud Platform regions where messages published to the topic may be stored. If not present, then no constraints are in effect.
.google.pubsub.v1.MessageStoragePolicy message_storage_policy = 3;public Topic.Builder setMessageStoragePolicy(MessageStoragePolicy.Builder builderForValue)
Policy constraining the set of Google Cloud Platform regions where messages published to the topic may be stored. If not present, then no constraints are in effect.
.google.pubsub.v1.MessageStoragePolicy message_storage_policy = 3;public Topic.Builder mergeMessageStoragePolicy(MessageStoragePolicy value)
Policy constraining the set of Google Cloud Platform regions where messages published to the topic may be stored. If not present, then no constraints are in effect.
.google.pubsub.v1.MessageStoragePolicy message_storage_policy = 3;public Topic.Builder clearMessageStoragePolicy()
Policy constraining the set of Google Cloud Platform regions where messages published to the topic may be stored. If not present, then no constraints are in effect.
.google.pubsub.v1.MessageStoragePolicy message_storage_policy = 3;public MessageStoragePolicy.Builder getMessageStoragePolicyBuilder()
Policy constraining the set of Google Cloud Platform regions where messages published to the topic may be stored. If not present, then no constraints are in effect.
.google.pubsub.v1.MessageStoragePolicy message_storage_policy = 3;public MessageStoragePolicyOrBuilder getMessageStoragePolicyOrBuilder()
Policy constraining the set of Google Cloud Platform regions where messages published to the topic may be stored. If not present, then no constraints are in effect.
.google.pubsub.v1.MessageStoragePolicy message_storage_policy = 3;getMessageStoragePolicyOrBuilder in interface TopicOrBuilderpublic String getKmsKeyName()
The resource name of the Cloud KMS CryptoKey to be used to protect access to messages published on this topic. The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
string kms_key_name = 5;getKmsKeyName in interface TopicOrBuilderpublic com.google.protobuf.ByteString getKmsKeyNameBytes()
The resource name of the Cloud KMS CryptoKey to be used to protect access to messages published on this topic. The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
string kms_key_name = 5;getKmsKeyNameBytes in interface TopicOrBuilderpublic Topic.Builder setKmsKeyName(String value)
The resource name of the Cloud KMS CryptoKey to be used to protect access to messages published on this topic. The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
string kms_key_name = 5;value - The kmsKeyName to set.public Topic.Builder clearKmsKeyName()
The resource name of the Cloud KMS CryptoKey to be used to protect access to messages published on this topic. The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
string kms_key_name = 5;public Topic.Builder setKmsKeyNameBytes(com.google.protobuf.ByteString value)
The resource name of the Cloud KMS CryptoKey to be used to protect access to messages published on this topic. The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
string kms_key_name = 5;value - The bytes for kmsKeyName to set.public final Topic.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
setUnknownFields in interface com.google.protobuf.Message.BuildersetUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Topic.Builder>public final Topic.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
mergeUnknownFields in interface com.google.protobuf.Message.BuildermergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Topic.Builder>Copyright © 2020 Google LLC. All rights reserved.