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.



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

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)


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

def inherited
  @inherited
end

#keyString

Corresponds to the JSON property key

Returns:

  • (String)


2439
2440
2441
# File 'lib/google/apis/databasecenter_v1beta/classes.rb', line 2439

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)


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

def source
  @source
end

#valueString

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

Returns:

  • (String)


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

def value
  @value
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2461
2462
2463
2464
2465
2466
# File 'lib/google/apis/databasecenter_v1beta/classes.rb', line 2461

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