Class: Google::Apis::PubsubliteV1::Topic

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/pubsublite_v1/classes.rb,
lib/google/apis/pubsublite_v1/representations.rb,
lib/google/apis/pubsublite_v1/representations.rb

Overview

Metadata about a topic resource.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Topic

Returns a new instance of Topic.



913
914
915
# File 'lib/google/apis/pubsublite_v1/classes.rb', line 913

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#nameString

The name of the topic. Structured like: projects/project_number/locations/ location/topics/topic_id Corresponds to the JSON property name

Returns:

  • (String)


896
897
898
# File 'lib/google/apis/pubsublite_v1/classes.rb', line 896

def name
  @name
end

#partition_configGoogle::Apis::PubsubliteV1::PartitionConfig

The settings for a topic's partitions. Corresponds to the JSON property partitionConfig



901
902
903
# File 'lib/google/apis/pubsublite_v1/classes.rb', line 901

def partition_config
  @partition_config
end

#reservation_configGoogle::Apis::PubsubliteV1::ReservationConfig

The settings for this topic's Reservation usage. Corresponds to the JSON property reservationConfig



906
907
908
# File 'lib/google/apis/pubsublite_v1/classes.rb', line 906

def reservation_config
  @reservation_config
end

#retention_configGoogle::Apis::PubsubliteV1::RetentionConfig

The settings for a topic's message retention. Corresponds to the JSON property retentionConfig



911
912
913
# File 'lib/google/apis/pubsublite_v1/classes.rb', line 911

def retention_config
  @retention_config
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



918
919
920
921
922
923
# File 'lib/google/apis/pubsublite_v1/classes.rb', line 918

def update!(**args)
  @name = args[:name] if args.key?(:name)
  @partition_config = args[:partition_config] if args.key?(:partition_config)
  @reservation_config = args[:reservation_config] if args.key?(:reservation_config)
  @retention_config = args[:retention_config] if args.key?(:retention_config)
end