Class Topic (1.141.3)

  public 
  
 final 
  
 class 
 Topic 
  
 extends 
  
 GeneratedMessageV3 
  
 implements 
  
 TopicOrBuilder 
 

A topic resource.

Protobuf type google.pubsub.v1.Topic

Implements

TopicOrBuilder

Static Fields

INGESTION_DATA_SOURCE_SETTINGS_FIELD_NUMBER

  public 
  
 static 
  
 final 
  
 int 
  
 INGESTION_DATA_SOURCE_SETTINGS_FIELD_NUMBER 
 
Field Value
Type
Description
int

KMS_KEY_NAME_FIELD_NUMBER

  public 
  
 static 
  
 final 
  
 int 
  
 KMS_KEY_NAME_FIELD_NUMBER 
 
Field Value
Type
Description
int

LABELS_FIELD_NUMBER

  public 
  
 static 
  
 final 
  
 int 
  
 LABELS_FIELD_NUMBER 
 
Field Value
Type
Description
int

MESSAGE_RETENTION_DURATION_FIELD_NUMBER

  public 
  
 static 
  
 final 
  
 int 
  
 MESSAGE_RETENTION_DURATION_FIELD_NUMBER 
 
Field Value
Type
Description
int

MESSAGE_STORAGE_POLICY_FIELD_NUMBER

  public 
  
 static 
  
 final 
  
 int 
  
 MESSAGE_STORAGE_POLICY_FIELD_NUMBER 
 
Field Value
Type
Description
int

MESSAGE_TRANSFORMS_FIELD_NUMBER

  public 
  
 static 
  
 final 
  
 int 
  
 MESSAGE_TRANSFORMS_FIELD_NUMBER 
 
Field Value
Type
Description
int

NAME_FIELD_NUMBER

  public 
  
 static 
  
 final 
  
 int 
  
 NAME_FIELD_NUMBER 
 
Field Value
Type
Description
int

SATISFIES_PZS_FIELD_NUMBER

  public 
  
 static 
  
 final 
  
 int 
  
 SATISFIES_PZS_FIELD_NUMBER 
 
Field Value
Type
Description
int

SCHEMA_SETTINGS_FIELD_NUMBER

  public 
  
 static 
  
 final 
  
 int 
  
 SCHEMA_SETTINGS_FIELD_NUMBER 
 
Field Value
Type
Description
int

STATE_FIELD_NUMBER

  public 
  
 static 
  
 final 
  
 int 
  
 STATE_FIELD_NUMBER 
 
Field Value
Type
Description
int

Static Methods

getDefaultInstance()

  public 
  
 static 
  
 Topic 
  
 getDefaultInstance 
 () 
 
Returns
Type
Description

getDescriptor()

  public 
  
 static 
  
 final 
  
 Descriptors 
 . 
 Descriptor 
  
 getDescriptor 
 () 
 
Returns
Type
Description

newBuilder()

  public 
  
 static 
  
 Topic 
 . 
 Builder 
  
 newBuilder 
 () 
 
Returns
Type
Description

newBuilder(Topic prototype)

  public 
  
 static 
  
 Topic 
 . 
 Builder 
  
 newBuilder 
 ( 
 Topic 
  
 prototype 
 ) 
 
Parameter
Name
Description
prototype
Returns
Type
Description

parseDelimitedFrom(InputStream input)

  public 
  
 static 
  
 Topic 
  
 parseDelimitedFrom 
 ( 
 InputStream 
  
 input 
 ) 
 
Parameter
Name
Description
input
Returns
Type
Description
Exceptions
Type
Description

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

  public 
  
 static 
  
 Topic 
  
 parseDelimitedFrom 
 ( 
 InputStream 
  
 input 
 , 
  
 ExtensionRegistryLite 
  
 extensionRegistry 
 ) 
 
Parameters
Name
Description
input
extensionRegistry
Returns
Type
Description
Exceptions
Type
Description

parseFrom(byte[] data)

  public 
  
 static 
  
 Topic 
  
 parseFrom 
 ( 
 byte 
 [] 
  
 data 
 ) 
 
Parameter
Name
Description
data
byte []
Returns
Type
Description
Exceptions
Type
Description

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

  public 
  
 static 
  
 Topic 
  
 parseFrom 
 ( 
 byte 
 [] 
  
 data 
 , 
  
 ExtensionRegistryLite 
  
 extensionRegistry 
 ) 
 
Parameters
Name
Description
data
byte []
extensionRegistry
Returns
Type
Description
Exceptions
Type
Description

parseFrom(ByteString data)

  public 
  
 static 
  
 Topic 
  
 parseFrom 
 ( 
 ByteString 
  
 data 
 ) 
 
Parameter
Name
Description
data
Returns
Type
Description
Exceptions
Type
Description

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

  public 
  
 static 
  
 Topic 
  
 parseFrom 
 ( 
 ByteString 
  
 data 
 , 
  
 ExtensionRegistryLite 
  
 extensionRegistry 
 ) 
 
Parameters
Name
Description
data
extensionRegistry
Returns
Type
Description
Exceptions
Type
Description

parseFrom(CodedInputStream input)

  public 
  
 static 
  
 Topic 
  
 parseFrom 
 ( 
 CodedInputStream 
  
 input 
 ) 
 
Parameter
Name
Description
Returns
Type
Description
Exceptions
Type
Description

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

  public 
  
 static 
  
 Topic 
  
 parseFrom 
 ( 
 CodedInputStream 
  
 input 
 , 
  
 ExtensionRegistryLite 
  
 extensionRegistry 
 ) 
 
Parameters
Name
Description
extensionRegistry
Returns
Type
Description
Exceptions
Type
Description

parseFrom(InputStream input)

  public 
  
 static 
  
 Topic 
  
 parseFrom 
 ( 
 InputStream 
  
 input 
 ) 
 
Parameter
Name
Description
input
Returns
Type
Description
Exceptions
Type
Description

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

  public 
  
 static 
  
 Topic 
  
 parseFrom 
 ( 
 InputStream 
  
 input 
 , 
  
 ExtensionRegistryLite 
  
 extensionRegistry 
 ) 
 
Parameters
Name
Description
input
extensionRegistry
Returns
Type
Description
Exceptions
Type
Description

parseFrom(ByteBuffer data)

  public 
  
 static 
  
 Topic 
  
 parseFrom 
 ( 
 ByteBuffer 
  
 data 
 ) 
 
Parameter
Name
Description
data
Returns
Type
Description
Exceptions
Type
Description

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

  public 
  
 static 
  
 Topic 
  
 parseFrom 
 ( 
 ByteBuffer 
  
 data 
 , 
  
 ExtensionRegistryLite 
  
 extensionRegistry 
 ) 
 
Parameters
Name
Description
data
extensionRegistry
Returns
Type
Description
Exceptions
Type
Description

parser()

  public 
  
 static 
  
 Parser<Topic> 
  
 parser 
 () 
 
Returns
Type
Description

Methods

containsLabels(String key)

  public 
  
 boolean 
  
 containsLabels 
 ( 
 String 
  
 key 
 ) 
 

Optional. See Creating and managing labels .

map<string, string> labels = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name
Description
key
Returns
Type
Description

equals(Object obj)

  public 
  
 boolean 
  
 equals 
 ( 
 Object 
  
 obj 
 ) 
 
Parameter
Name
Description
obj
Returns
Type
Description
Overrides

getDefaultInstanceForType()

  public 
  
 Topic 
  
 getDefaultInstanceForType 
 () 
 
Returns
Type
Description

getIngestionDataSourceSettings()

  public 
  
 IngestionDataSourceSettings 
  
 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];

Returns
Type
Description

The ingestionDataSourceSettings.

getIngestionDataSourceSettingsOrBuilder()

  public 
  
 IngestionDataSourceSettingsOrBuilder 
  
 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];

Returns
Type
Description

getKmsKeyName()

  public 
  
 String 
  
 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];

Returns
Type
Description

The kmsKeyName.

getKmsKeyNameBytes()

  public 
  
 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];

Returns
Type
Description

The bytes for kmsKeyName.

getLabels() (deprecated)

  public 
  
 Map<String 
 , 
 String 
>  
 getLabels 
 () 
 

Use #getLabelsMap() instead.

Returns
Type
Description
Map < String , String >

getLabelsCount()

  public 
  
 int 
  
 getLabelsCount 
 () 
 

Optional. See Creating and managing labels .

map<string, string> labels = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type
Description
int

getLabelsMap()

  public 
  
 Map<String 
 , 
 String 
>  
 getLabelsMap 
 () 
 

Optional. See Creating and managing labels .

map<string, string> labels = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type
Description
Map < String , String >

getLabelsOrDefault(String key, String defaultValue)

  public 
  
 String 
  
 getLabelsOrDefault 
 ( 
 String 
  
 key 
 , 
  
 String 
  
 defaultValue 
 ) 
 

Optional. See Creating and managing labels .

map<string, string> labels = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name
Description
key
defaultValue
Returns
Type
Description

getLabelsOrThrow(String key)

  public 
  
 String 
  
 getLabelsOrThrow 
 ( 
 String 
  
 key 
 ) 
 

Optional. See Creating and managing labels .

map<string, string> labels = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name
Description
key
Returns
Type
Description

getMessageRetentionDuration()

  public 
  
 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 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];

Returns
Type
Description

The messageRetentionDuration.

getMessageRetentionDurationOrBuilder()

  public 
  
 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 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];

Returns
Type
Description

getMessageStoragePolicy()

  public 
  
 MessageStoragePolicy 
  
 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];

Returns
Type
Description

The messageStoragePolicy.

getMessageStoragePolicyOrBuilder()

  public 
  
 MessageStoragePolicyOrBuilder 
  
 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];

Returns
Type
Description

getMessageTransforms(int index)

  public 
  
 MessageTransform 
  
 getMessageTransforms 
 ( 
 int 
  
 index 
 ) 
 

Optional. Transforms to be applied to messages published to the topic. Transforms are applied in the order specified.

repeated .google.pubsub.v1.MessageTransform message_transforms = 13 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name
Description
index
int
Returns
Type
Description

getMessageTransformsCount()

  public 
  
 int 
  
 getMessageTransformsCount 
 () 
 

Optional. Transforms to be applied to messages published to the topic. Transforms are applied in the order specified.

repeated .google.pubsub.v1.MessageTransform message_transforms = 13 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type
Description
int

getMessageTransformsList()

  public 
  
 List<MessageTransform> 
  
 getMessageTransformsList 
 () 
 

Optional. Transforms to be applied to messages published to the topic. Transforms are applied in the order specified.

repeated .google.pubsub.v1.MessageTransform message_transforms = 13 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type
Description

getMessageTransformsOrBuilder(int index)

  public 
  
 MessageTransformOrBuilder 
  
 getMessageTransformsOrBuilder 
 ( 
 int 
  
 index 
 ) 
 

Optional. Transforms to be applied to messages published to the topic. Transforms are applied in the order specified.

repeated .google.pubsub.v1.MessageTransform message_transforms = 13 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name
Description
index
int
Returns
Type
Description

getMessageTransformsOrBuilderList()

  public 
  
 List 
< ? 
  
 extends 
  
 MessageTransformOrBuilder 
>  
 getMessageTransformsOrBuilderList 
 () 
 

Optional. Transforms to be applied to messages published to the topic. Transforms are applied in the order specified.

repeated .google.pubsub.v1.MessageTransform message_transforms = 13 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type
Description
List < ? extends com.google.pubsub.v1.MessageTransformOrBuilder >

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];

Returns
Type
Description

The name.

getNameBytes()

  public 
  
 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];

Returns
Type
Description

The bytes for name.

getParserForType()

  public 
  
 Parser<Topic> 
  
 getParserForType 
 () 
 
Returns
Type
Description
Overrides

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];

Returns
Type
Description

The satisfiesPzs.

getSchemaSettings()

  public 
  
 SchemaSettings 
  
 getSchemaSettings 
 () 
 

Optional. Settings for validating messages published against a schema.

.google.pubsub.v1.SchemaSettings schema_settings = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type
Description

The schemaSettings.

getSchemaSettingsOrBuilder()

  public 
  
 SchemaSettingsOrBuilder 
  
 getSchemaSettingsOrBuilder 
 () 
 

Optional. Settings for validating messages published against a schema.

.google.pubsub.v1.SchemaSettings schema_settings = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type
Description

getSerializedSize()

  public 
  
 int 
  
 getSerializedSize 
 () 
 
Returns
Type
Description
int
Overrides

getState()

  public 
  
 Topic 
 . 
 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];

Returns
Type
Description

The state.

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];

Returns
Type
Description
int

The enum numeric value on the wire for 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];

Returns
Type
Description

Whether the ingestionDataSourceSettings field is set.

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 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];

Returns
Type
Description

Whether the messageRetentionDuration field is set.

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];

Returns
Type
Description

Whether the messageStoragePolicy field is set.

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];

Returns
Type
Description

Whether the schemaSettings field is set.

hashCode()

  public 
  
 int 
  
 hashCode 
 () 
 
Returns
Type
Description
int
Overrides

internalGetFieldAccessorTable()

  protected 
  
 GeneratedMessageV3 
 . 
 FieldAccessorTable 
  
 internalGetFieldAccessorTable 
 () 
 
Returns
Type
Description
Overrides

internalGetMapFieldReflection(int number)

  protected 
  
 MapFieldReflectionAccessor 
  
 internalGetMapFieldReflection 
 ( 
 int 
  
 number 
 ) 
 
Parameter
Name
Description
number
int
Returns
Type
Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)

isInitialized()

  public 
  
 final 
  
 boolean 
  
 isInitialized 
 () 
 
Returns
Type
Description
Overrides

newBuilderForType()

  public 
  
 Topic 
 . 
 Builder 
  
 newBuilderForType 
 () 
 
Returns
Type
Description

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

  protected 
  
 Topic 
 . 
 Builder 
  
 newBuilderForType 
 ( 
 GeneratedMessageV3 
 . 
 BuilderParent 
  
 parent 
 ) 
 
Parameter
Name
Description
parent
Returns
Type
Description
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

  protected 
  
 Object 
  
 newInstance 
 ( 
 GeneratedMessageV3 
 . 
 UnusedPrivateParameter 
  
 unused 
 ) 
 
Parameter
Name
Description
Returns
Type
Description
Overrides

toBuilder()

  public 
  
 Topic 
 . 
 Builder 
  
 toBuilder 
 () 
 
Returns
Type
Description

writeTo(CodedOutputStream output)

  public 
  
 void 
  
 writeTo 
 ( 
 CodedOutputStream 
  
 output 
 ) 
 
Parameter
Name
Description
Overrides
Exceptions
Type
Description
Design a Mobile Site
View Site in Mobile | Classic
Share by: