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()
The name of the topic.
|
Topic.Builder |
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) |
Topic.Builder |
clone() |
boolean |
containsLabels(String key)
See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and
managing labels</a>.
|
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 <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and
managing labels</a>.
|
Map<String,String> |
getLabelsMap()
See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and
managing labels</a>.
|
String |
getLabelsOrDefault(String key,
String defaultValue)
See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and
managing labels</a>.
|
String |
getLabelsOrThrow(String key)
See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and
managing labels</a>.
|
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()
The name of the topic.
|
com.google.protobuf.ByteString |
getNameBytes()
The name of the topic.
|
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 <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and
managing labels</a>.
|
Topic.Builder |
putLabels(String key,
String value)
See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and
managing labels</a>.
|
Topic.Builder |
removeLabels(String key)
See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and
managing labels</a>.
|
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)
The name of the topic.
|
Topic.Builder |
setNameBytes(com.google.protobuf.ByteString value)
The name of the topic.
|
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, setUnknownFieldsProto3
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
addAll, addAll, mergeFrom, newUninitializedMessageException
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public 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.Builder
clear
in interface com.google.protobuf.MessageLite.Builder
clear
in class com.google.protobuf.GeneratedMessageV3.Builder<Topic.Builder>
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
getDescriptorForType
in interface com.google.protobuf.Message.Builder
getDescriptorForType
in interface com.google.protobuf.MessageOrBuilder
getDescriptorForType
in class com.google.protobuf.GeneratedMessageV3.Builder<Topic.Builder>
public Topic getDefaultInstanceForType()
getDefaultInstanceForType
in interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType
in interface com.google.protobuf.MessageOrBuilder
public Topic build()
build
in interface com.google.protobuf.Message.Builder
build
in interface com.google.protobuf.MessageLite.Builder
public Topic buildPartial()
buildPartial
in interface com.google.protobuf.Message.Builder
buildPartial
in interface com.google.protobuf.MessageLite.Builder
public Topic.Builder clone()
clone
in interface com.google.protobuf.Message.Builder
clone
in interface com.google.protobuf.MessageLite.Builder
clone
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.Builder
setField
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.Builder
clearField
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.Builder
clearOneof
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.Builder
setRepeatedField
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.Builder
addRepeatedField
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.Builder
mergeFrom
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.MessageLiteOrBuilder
isInitialized
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.Builder
mergeFrom
in interface com.google.protobuf.MessageLite.Builder
mergeFrom
in class com.google.protobuf.AbstractMessage.Builder<Topic.Builder>
IOException
public String getName()
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;
getName
in interface TopicOrBuilder
public com.google.protobuf.ByteString getNameBytes()
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;
getNameBytes
in interface TopicOrBuilder
public Topic.Builder setName(String value)
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;
public Topic.Builder clearName()
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;
public Topic.Builder setNameBytes(com.google.protobuf.ByteString value)
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;
public int getLabelsCount()
TopicOrBuilder
See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and managing labels</a>.
map<string, string> labels = 2;
getLabelsCount
in interface TopicOrBuilder
public boolean containsLabels(String key)
See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and managing labels</a>.
map<string, string> labels = 2;
containsLabels
in interface TopicOrBuilder
@Deprecated public Map<String,String> getLabels()
getLabelsMap()
instead.getLabels
in interface TopicOrBuilder
public Map<String,String> getLabelsMap()
See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and managing labels</a>.
map<string, string> labels = 2;
getLabelsMap
in interface TopicOrBuilder
public String getLabelsOrDefault(String key, String defaultValue)
See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and managing labels</a>.
map<string, string> labels = 2;
getLabelsOrDefault
in interface TopicOrBuilder
public String getLabelsOrThrow(String key)
See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and managing labels</a>.
map<string, string> labels = 2;
getLabelsOrThrow
in interface TopicOrBuilder
public Topic.Builder clearLabels()
public Topic.Builder removeLabels(String key)
See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and managing labels</a>.
map<string, string> labels = 2;
@Deprecated public Map<String,String> getMutableLabels()
public Topic.Builder putLabels(String key, String value)
See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and managing labels</a>.
map<string, string> labels = 2;
public Topic.Builder putAllLabels(Map<String,String> values)
See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and managing labels</a>.
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 TopicOrBuilder
public 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 TopicOrBuilder
public 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 TopicOrBuilder
public 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 TopicOrBuilder
public 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 TopicOrBuilder
public 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;
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;
public final Topic.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
setUnknownFields
in interface com.google.protobuf.Message.Builder
setUnknownFields
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.Builder
mergeUnknownFields
in class com.google.protobuf.GeneratedMessageV3.Builder<Topic.Builder>
Copyright © 2019 Google LLC. All rights reserved.