Package com.google.pubsub.v1
Class Topic
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite
-
- com.google.protobuf.AbstractMessage
-
- com.google.protobuf.GeneratedMessageV3
-
- com.google.pubsub.v1.Topic
-
- All Implemented Interfaces:
com.google.protobuf.Message
,com.google.protobuf.MessageLite
,com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
,TopicOrBuilder
,Serializable
public final class Topic extends com.google.protobuf.GeneratedMessageV3 implements TopicOrBuilder
A topic resource.
Protobuf typegoogle.pubsub.v1.Topic
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Topic.Builder
A topic resource.-
Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter
-
-
Field Summary
Fields Modifier and Type Field Description static int
KMS_KEY_NAME_FIELD_NUMBER
static int
LABELS_FIELD_NUMBER
static int
MESSAGE_RETENTION_DURATION_FIELD_NUMBER
static int
MESSAGE_STORAGE_POLICY_FIELD_NUMBER
static int
NAME_FIELD_NUMBER
static int
SATISFIES_PZS_FIELD_NUMBER
static int
SCHEMA_SETTINGS_FIELD_NUMBER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
containsLabels(String key)
See [Creating and managing labels] (https://cloud.google.com/pubsub/docs/labels).boolean
equals(Object obj)
static Topic
getDefaultInstance()
Topic
getDefaultInstanceForType()
static com.google.protobuf.Descriptors.Descriptor
getDescriptor()
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).com.google.protobuf.Duration
getMessageRetentionDuration()
Indicates the minimum duration to retain a message after it is published to the topic.com.google.protobuf.DurationOrBuilder
getMessageRetentionDurationOrBuilder()
Indicates the minimum duration to retain a message after it is published to the topic.MessageStoragePolicy
getMessageStoragePolicy()
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.String
getName()
Required.com.google.protobuf.ByteString
getNameBytes()
Required.com.google.protobuf.Parser<Topic>
getParserForType()
boolean
getSatisfiesPzs()
Reserved for future use.SchemaSettings
getSchemaSettings()
Settings for validating messages published against a schema.SchemaSettingsOrBuilder
getSchemaSettingsOrBuilder()
Settings for validating messages published against a schema.int
getSerializedSize()
int
hashCode()
boolean
hasMessageRetentionDuration()
Indicates the minimum duration to retain a message after it is published to the topic.boolean
hasMessageStoragePolicy()
Policy constraining the set of Google Cloud Platform regions where messages published to the topic may be stored.boolean
hasSchemaSettings()
Settings for validating messages published against a schema.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()
protected com.google.protobuf.MapField
internalGetMapField(int number)
boolean
isInitialized()
static Topic.Builder
newBuilder()
static Topic.Builder
newBuilder(Topic prototype)
Topic.Builder
newBuilderForType()
protected Topic.Builder
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
protected Object
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
static Topic
parseDelimitedFrom(InputStream input)
static Topic
parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Topic
parseFrom(byte[] data)
static Topic
parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Topic
parseFrom(com.google.protobuf.ByteString data)
static Topic
parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Topic
parseFrom(com.google.protobuf.CodedInputStream input)
static Topic
parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Topic
parseFrom(InputStream input)
static Topic
parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Topic
parseFrom(ByteBuffer data)
static Topic
parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.protobuf.Parser<Topic>
parser()
Topic.Builder
toBuilder()
void
writeTo(com.google.protobuf.CodedOutputStream output)
-
Methods inherited from class com.google.protobuf.GeneratedMessageV3
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag
-
Methods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
NAME_FIELD_NUMBER
public static final int NAME_FIELD_NUMBER
- See Also:
- Constant Field Values
-
LABELS_FIELD_NUMBER
public static final int LABELS_FIELD_NUMBER
- See Also:
- Constant Field Values
-
MESSAGE_STORAGE_POLICY_FIELD_NUMBER
public static final int MESSAGE_STORAGE_POLICY_FIELD_NUMBER
- See Also:
- Constant Field Values
-
KMS_KEY_NAME_FIELD_NUMBER
public static final int KMS_KEY_NAME_FIELD_NUMBER
- See Also:
- Constant Field Values
-
SCHEMA_SETTINGS_FIELD_NUMBER
public static final int SCHEMA_SETTINGS_FIELD_NUMBER
- See Also:
- Constant Field Values
-
SATISFIES_PZS_FIELD_NUMBER
public static final int SATISFIES_PZS_FIELD_NUMBER
- See Also:
- Constant Field Values
-
MESSAGE_RETENTION_DURATION_FIELD_NUMBER
public static final int MESSAGE_RETENTION_DURATION_FIELD_NUMBER
- See Also:
- Constant Field Values
-
-
Method Detail
-
newInstance
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
- Overrides:
newInstance
in classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetMapField
protected com.google.protobuf.MapField internalGetMapField(int number)
- Overrides:
internalGetMapField
in classcom.google.protobuf.GeneratedMessageV3
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3
-
getName
public 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];
- Specified by:
getName
in interfaceTopicOrBuilder
- Returns:
- The name.
-
getNameBytes
public 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];
- Specified by:
getNameBytes
in interfaceTopicOrBuilder
- Returns:
- The bytes for name.
-
getLabelsCount
public int getLabelsCount()
Description copied from interface:TopicOrBuilder
See [Creating and managing labels] (https://cloud.google.com/pubsub/docs/labels).
map<string, string> labels = 2;
- Specified by:
getLabelsCount
in interfaceTopicOrBuilder
-
containsLabels
public boolean containsLabels(String key)
See [Creating and managing labels] (https://cloud.google.com/pubsub/docs/labels).
map<string, string> labels = 2;
- Specified by:
containsLabels
in interfaceTopicOrBuilder
-
getLabels
@Deprecated public Map<String,String> getLabels()
Deprecated.UsegetLabelsMap()
instead.- Specified by:
getLabels
in interfaceTopicOrBuilder
-
getLabelsMap
public Map<String,String> getLabelsMap()
See [Creating and managing labels] (https://cloud.google.com/pubsub/docs/labels).
map<string, string> labels = 2;
- Specified by:
getLabelsMap
in interfaceTopicOrBuilder
-
getLabelsOrDefault
public String getLabelsOrDefault(String key, String defaultValue)
See [Creating and managing labels] (https://cloud.google.com/pubsub/docs/labels).
map<string, string> labels = 2;
- Specified by:
getLabelsOrDefault
in interfaceTopicOrBuilder
-
getLabelsOrThrow
public String getLabelsOrThrow(String key)
See [Creating and managing labels] (https://cloud.google.com/pubsub/docs/labels).
map<string, string> labels = 2;
- Specified by:
getLabelsOrThrow
in interfaceTopicOrBuilder
-
hasMessageStoragePolicy
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;
- Specified by:
hasMessageStoragePolicy
in interfaceTopicOrBuilder
- Returns:
- Whether the messageStoragePolicy field is set.
-
getMessageStoragePolicy
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;
- Specified by:
getMessageStoragePolicy
in interfaceTopicOrBuilder
- Returns:
- The messageStoragePolicy.
-
getMessageStoragePolicyOrBuilder
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;
- Specified by:
getMessageStoragePolicyOrBuilder
in interfaceTopicOrBuilder
-
getKmsKeyName
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;
- Specified by:
getKmsKeyName
in interfaceTopicOrBuilder
- Returns:
- The kmsKeyName.
-
getKmsKeyNameBytes
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;
- Specified by:
getKmsKeyNameBytes
in interfaceTopicOrBuilder
- Returns:
- The bytes for kmsKeyName.
-
hasSchemaSettings
public boolean hasSchemaSettings()
Settings for validating messages published against a schema.
.google.pubsub.v1.SchemaSettings schema_settings = 6;
- Specified by:
hasSchemaSettings
in interfaceTopicOrBuilder
- Returns:
- Whether the schemaSettings field is set.
-
getSchemaSettings
public SchemaSettings getSchemaSettings()
Settings for validating messages published against a schema.
.google.pubsub.v1.SchemaSettings schema_settings = 6;
- Specified by:
getSchemaSettings
in interfaceTopicOrBuilder
- Returns:
- The schemaSettings.
-
getSchemaSettingsOrBuilder
public SchemaSettingsOrBuilder getSchemaSettingsOrBuilder()
Settings for validating messages published against a schema.
.google.pubsub.v1.SchemaSettings schema_settings = 6;
- Specified by:
getSchemaSettingsOrBuilder
in interfaceTopicOrBuilder
-
getSatisfiesPzs
public boolean getSatisfiesPzs()
Reserved for future use. This field is set only in responses from the server; it is ignored if it is set in any requests.
bool satisfies_pzs = 7;
- Specified by:
getSatisfiesPzs
in interfaceTopicOrBuilder
- Returns:
- The satisfiesPzs.
-
hasMessageRetentionDuration
public boolean hasMessageRetentionDuration()
Indicates the minimum duration to retain a message after it is published to the topic. If this field is set, messages published to the topic in the last `message_retention_duration` are always available to subscribers. For instance, it allows any attached subscription to [seek to a timestamp](https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time) that is up to `message_retention_duration` in the past. If this field is not set, message retention is controlled by settings on individual subscriptions. Cannot be more than 31 days or less than 10 minutes.
.google.protobuf.Duration message_retention_duration = 8;
- Specified by:
hasMessageRetentionDuration
in interfaceTopicOrBuilder
- Returns:
- Whether the messageRetentionDuration field is set.
-
getMessageRetentionDuration
public com.google.protobuf.Duration getMessageRetentionDuration()
Indicates the minimum duration to retain a message after it is published to the topic. If this field is set, messages published to the topic in the last `message_retention_duration` are always available to subscribers. For instance, it allows any attached subscription to [seek to a timestamp](https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time) that is up to `message_retention_duration` in the past. If this field is not set, message retention is controlled by settings on individual subscriptions. Cannot be more than 31 days or less than 10 minutes.
.google.protobuf.Duration message_retention_duration = 8;
- Specified by:
getMessageRetentionDuration
in interfaceTopicOrBuilder
- Returns:
- The messageRetentionDuration.
-
getMessageRetentionDurationOrBuilder
public com.google.protobuf.DurationOrBuilder getMessageRetentionDurationOrBuilder()
Indicates the minimum duration to retain a message after it is published to the topic. If this field is set, messages published to the topic in the last `message_retention_duration` are always available to subscribers. For instance, it allows any attached subscription to [seek to a timestamp](https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time) that is up to `message_retention_duration` in the past. If this field is not set, message retention is controlled by settings on individual subscriptions. Cannot be more than 31 days or less than 10 minutes.
.google.protobuf.Duration message_retention_duration = 8;
- Specified by:
getMessageRetentionDurationOrBuilder
in interfaceTopicOrBuilder
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessageV3
-
writeTo
public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
- Specified by:
writeTo
in interfacecom.google.protobuf.MessageLite
- Overrides:
writeTo
in classcom.google.protobuf.GeneratedMessageV3
- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()
- Specified by:
getSerializedSize
in interfacecom.google.protobuf.MessageLite
- Overrides:
getSerializedSize
in classcom.google.protobuf.GeneratedMessageV3
-
equals
public boolean equals(Object obj)
- Specified by:
equals
in interfacecom.google.protobuf.Message
- Overrides:
equals
in classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfacecom.google.protobuf.Message
- Overrides:
hashCode
in classcom.google.protobuf.AbstractMessage
-
parseFrom
public static Topic parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Topic parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Topic parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Topic parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Topic parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Topic parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Topic parseFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static Topic parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static Topic parseDelimitedFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static Topic parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseFrom
public static Topic parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static Topic parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
newBuilderForType
public Topic.Builder newBuilderForType()
- Specified by:
newBuilderForType
in interfacecom.google.protobuf.Message
- Specified by:
newBuilderForType
in interfacecom.google.protobuf.MessageLite
-
newBuilder
public static Topic.Builder newBuilder()
-
newBuilder
public static Topic.Builder newBuilder(Topic prototype)
-
toBuilder
public Topic.Builder toBuilder()
- Specified by:
toBuilder
in interfacecom.google.protobuf.Message
- Specified by:
toBuilder
in interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected Topic.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
- Specified by:
newBuilderForType
in classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstance
public static Topic getDefaultInstance()
-
parser
public static com.google.protobuf.Parser<Topic> parser()
-
getParserForType
public com.google.protobuf.Parser<Topic> getParserForType()
- Specified by:
getParserForType
in interfacecom.google.protobuf.Message
- Specified by:
getParserForType
in interfacecom.google.protobuf.MessageLite
- Overrides:
getParserForType
in classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
public Topic getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
-