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
A topic resource.Protobuf type
google.pubsub.v1.Topic- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA topic resource.static enumThe state of the topic.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 Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessageLite.InternalOneOfEnum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class com.google.protobuf.GeneratedMessageV3
alwaysUseFieldBuilders, unknownFieldsFields inherited from class com.google.protobuf.AbstractMessage
memoizedSizeFields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode -
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsLabels(String key) Optional.booleanstatic Topicstatic final com.google.protobuf.Descriptors.DescriptorOptional.Optional.Optional.com.google.protobuf.ByteStringOptional.Deprecated.intOptional.Optional.getLabelsOrDefault(String key, String defaultValue) Optional.getLabelsOrThrow(String key) Optional.com.google.protobuf.DurationOptional.com.google.protobuf.DurationOrBuilderOptional.Optional.Optional.getName()Required.com.google.protobuf.ByteStringRequired.com.google.protobuf.Parser<Topic>booleanOptional.Optional.Optional.intgetState()Output only.intOutput only.inthashCode()booleanOptional.booleanOptional.booleanOptional.booleanOptional.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableprotected com.google.protobuf.MapFieldReflectionAccessorinternalGetMapFieldReflection(int number) final booleanstatic Topic.Builderstatic Topic.BuildernewBuilder(Topic prototype) protected Topic.BuildernewBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) protected ObjectnewInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) static TopicparseDelimitedFrom(InputStream input) static TopicparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static TopicparseFrom(byte[] data) static TopicparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static TopicparseFrom(com.google.protobuf.ByteString data) static TopicparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static TopicparseFrom(com.google.protobuf.CodedInputStream input) static TopicparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static TopicparseFrom(InputStream input) static TopicparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static TopicparseFrom(ByteBuffer data) static TopicparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<Topic>parser()voidwriteTo(com.google.protobuf.CodedOutputStream output) Methods inherited from class com.google.protobuf.GeneratedMessageV3
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, 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, writeStringNoTagMethods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLite
toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Field Details
-
NAME_FIELD_NUMBER
public static final int NAME_FIELD_NUMBER- See Also:
-
LABELS_FIELD_NUMBER
public static final int LABELS_FIELD_NUMBER- See Also:
-
MESSAGE_STORAGE_POLICY_FIELD_NUMBER
public static final int MESSAGE_STORAGE_POLICY_FIELD_NUMBER- See Also:
-
KMS_KEY_NAME_FIELD_NUMBER
public static final int KMS_KEY_NAME_FIELD_NUMBER- See Also:
-
SCHEMA_SETTINGS_FIELD_NUMBER
public static final int SCHEMA_SETTINGS_FIELD_NUMBER- See Also:
-
SATISFIES_PZS_FIELD_NUMBER
public static final int SATISFIES_PZS_FIELD_NUMBER- See Also:
-
MESSAGE_RETENTION_DURATION_FIELD_NUMBER
public static final int MESSAGE_RETENTION_DURATION_FIELD_NUMBER- See Also:
-
STATE_FIELD_NUMBER
public static final int STATE_FIELD_NUMBER- See Also:
-
INGESTION_DATA_SOURCE_SETTINGS_FIELD_NUMBER
public static final int INGESTION_DATA_SOURCE_SETTINGS_FIELD_NUMBER- See Also:
-
-
Method Details
-
newInstance
- Overrides:
newInstancein classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetMapFieldReflection
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number) - Overrides:
internalGetMapFieldReflectionin classcom.google.protobuf.GeneratedMessageV3
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3
-
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:
getNamein 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:
getNameBytesin interfaceTopicOrBuilder- Returns:
- The bytes for name.
-
getLabelsCount
public int getLabelsCount()Description copied from interface:TopicOrBuilderOptional. See [Creating and managing labels] (https://cloud.google.com/pubsub/docs/labels).
map<string, string> labels = 2 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getLabelsCountin interfaceTopicOrBuilder
-
containsLabels
Optional. See [Creating and managing labels] (https://cloud.google.com/pubsub/docs/labels).
map<string, string> labels = 2 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
containsLabelsin interfaceTopicOrBuilder
-
getLabels
Deprecated.UsegetLabelsMap()instead.- Specified by:
getLabelsin interfaceTopicOrBuilder
-
getLabelsMap
Optional. See [Creating and managing labels] (https://cloud.google.com/pubsub/docs/labels).
map<string, string> labels = 2 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getLabelsMapin interfaceTopicOrBuilder
-
getLabelsOrDefault
Optional. See [Creating and managing labels] (https://cloud.google.com/pubsub/docs/labels).
map<string, string> labels = 2 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getLabelsOrDefaultin interfaceTopicOrBuilder
-
getLabelsOrThrow
Optional. See [Creating and managing labels] (https://cloud.google.com/pubsub/docs/labels).
map<string, string> labels = 2 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getLabelsOrThrowin interfaceTopicOrBuilder
-
hasMessageStoragePolicy
public boolean hasMessageStoragePolicy()Optional. 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 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
hasMessageStoragePolicyin interfaceTopicOrBuilder- Returns:
- Whether the messageStoragePolicy field is set.
-
getMessageStoragePolicy
Optional. 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 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getMessageStoragePolicyin interfaceTopicOrBuilder- Returns:
- The messageStoragePolicy.
-
getMessageStoragePolicyOrBuilder
Optional. 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 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getMessageStoragePolicyOrBuilderin interfaceTopicOrBuilder
-
getKmsKeyName
Optional. 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 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getKmsKeyNamein interfaceTopicOrBuilder- Returns:
- The kmsKeyName.
-
getKmsKeyNameBytes
public com.google.protobuf.ByteString getKmsKeyNameBytes()Optional. 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 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getKmsKeyNameBytesin interfaceTopicOrBuilder- Returns:
- The bytes for kmsKeyName.
-
hasSchemaSettings
public boolean hasSchemaSettings()Optional. Settings for validating messages published against a schema.
.google.pubsub.v1.SchemaSettings schema_settings = 6 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
hasSchemaSettingsin interfaceTopicOrBuilder- Returns:
- Whether the schemaSettings field is set.
-
getSchemaSettings
Optional. Settings for validating messages published against a schema.
.google.pubsub.v1.SchemaSettings schema_settings = 6 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getSchemaSettingsin interfaceTopicOrBuilder- Returns:
- The schemaSettings.
-
getSchemaSettingsOrBuilder
Optional. Settings for validating messages published against a schema.
.google.pubsub.v1.SchemaSettings schema_settings = 6 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getSchemaSettingsOrBuilderin interfaceTopicOrBuilder
-
getSatisfiesPzs
public boolean getSatisfiesPzs()Optional. 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 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getSatisfiesPzsin interfaceTopicOrBuilder- Returns:
- The satisfiesPzs.
-
hasMessageRetentionDuration
public boolean hasMessageRetentionDuration()Optional. 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 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
hasMessageRetentionDurationin interfaceTopicOrBuilder- Returns:
- Whether the messageRetentionDuration field is set.
-
getMessageRetentionDuration
public com.google.protobuf.Duration getMessageRetentionDuration()Optional. 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 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getMessageRetentionDurationin interfaceTopicOrBuilder- Returns:
- The messageRetentionDuration.
-
getMessageRetentionDurationOrBuilder
public com.google.protobuf.DurationOrBuilder getMessageRetentionDurationOrBuilder()Optional. 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 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getMessageRetentionDurationOrBuilderin interfaceTopicOrBuilder
-
getStateValue
public int getStateValue()Output only. An output-only field indicating the state of the topic.
.google.pubsub.v1.Topic.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getStateValuein interfaceTopicOrBuilder- Returns:
- The enum numeric value on the wire for state.
-
getState
Output only. An output-only field indicating the state of the topic.
.google.pubsub.v1.Topic.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getStatein interfaceTopicOrBuilder- Returns:
- The state.
-
hasIngestionDataSourceSettings
public boolean hasIngestionDataSourceSettings()Optional. Settings for ingestion from a data source into this topic.
.google.pubsub.v1.IngestionDataSourceSettings ingestion_data_source_settings = 10 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
hasIngestionDataSourceSettingsin interfaceTopicOrBuilder- Returns:
- Whether the ingestionDataSourceSettings field is set.
-
getIngestionDataSourceSettings
Optional. Settings for ingestion from a data source into this topic.
.google.pubsub.v1.IngestionDataSourceSettings ingestion_data_source_settings = 10 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getIngestionDataSourceSettingsin interfaceTopicOrBuilder- Returns:
- The ingestionDataSourceSettings.
-
getIngestionDataSourceSettingsOrBuilder
Optional. Settings for ingestion from a data source into this topic.
.google.pubsub.v1.IngestionDataSourceSettings ingestion_data_source_settings = 10 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getIngestionDataSourceSettingsOrBuilderin interfaceTopicOrBuilder
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3
-
writeTo
- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessageV3- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessageV3
-
equals
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein 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
- Throws:
IOException
-
parseFrom
public static Topic parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static Topic parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static Topic parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
newBuilderForType
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
-
newBuilder
-
toBuilder
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected Topic.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) - Specified by:
newBuilderForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstance
-
parser
-
getParserForType
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-