Class: Google::Apis::PubsubV1::Topic

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

Overview

A topic resource.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Topic

Returns a new instance of Topic



978
979
980
# File 'generated/google/apis/pubsub_v1/classes.rb', line 978

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

Instance Attribute Details

#labelsHash<String,String>

See Creating and managing labels. Corresponds to the JSON property labels

Returns:

  • (Hash<String,String>)


966
967
968
# File 'generated/google/apis/pubsub_v1/classes.rb', line 966

def labels
  @labels
end

#nameString

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". Corresponds to the JSON property name

Returns:

  • (String)


976
977
978
# File 'generated/google/apis/pubsub_v1/classes.rb', line 976

def name
  @name
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



983
984
985
986
# File 'generated/google/apis/pubsub_v1/classes.rb', line 983

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