Class: Google::Apis::DatabasecenterV1beta::Tag

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

Overview

Tag is a key value pair attached to a resource.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Tag

Returns a new instance of Tag.



2449
2450
2451
# File 'lib/google/apis/databasecenter_v1beta/classes.rb', line 2449

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

Instance Attribute Details

#inheritedBoolean Also known as: inherited?

Indicates the inheritance status of a tag value attached to the given resource. If the tag value is inherited from one of the resource's ancestors, inherited will be true. If false, then the tag value is directly attached to the resource. Corresponds to the JSON property inherited

Returns:

  • (Boolean)


2426
2427
2428
# File 'lib/google/apis/databasecenter_v1beta/classes.rb', line 2426

def inherited
  @inherited
end

#keyString

Corresponds to the JSON property key

Returns:

  • (String)


2432
2433
2434
# File 'lib/google/apis/databasecenter_v1beta/classes.rb', line 2432

def key
  @key
end

#sourceString

The source of the tag. According to https://cloud.google.com/resource-manager/ docs/tags/tags-overview#tags_and_labels, tags can be created only at the project or organization level. Tags can be inherited from different project as well not just the current project where the database resource is present. Format: "projects/PROJECT_ID", "projects/PROJECT_NUMBER", "organizations/ ORGANIZATION_ID" Corresponds to the JSON property source

Returns:

  • (String)


2442
2443
2444
# File 'lib/google/apis/databasecenter_v1beta/classes.rb', line 2442

def source
  @source
end

#valueString

The value part of the tag. Corresponds to the JSON property value

Returns:

  • (String)


2447
2448
2449
# File 'lib/google/apis/databasecenter_v1beta/classes.rb', line 2447

def value
  @value
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2454
2455
2456
2457
2458
2459
# File 'lib/google/apis/databasecenter_v1beta/classes.rb', line 2454

def update!(**args)
  @inherited = args[:inherited] if args.key?(:inherited)
  @key = args[:key] if args.key?(:key)
  @source = args[:source] if args.key?(:source)
  @value = args[:value] if args.key?(:value)
end