Class: Google::Apis::CloudresourcemanagerV1::ResourceId

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

Overview

A container to reference an id for any resource type. A resource in Google Cloud Platform is a generic term for something you (a developer) may want to interact with through one of our API's. Some examples are an App Engine app, a Compute Engine instance, a Cloud SQL database, and so on.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ResourceId

Returns a new instance of ResourceId.



1762
1763
1764
# File 'lib/google/apis/cloudresourcemanager_v1/classes.rb', line 1762

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

Instance Attribute Details

#idString

The type-specific id. This should correspond to the id used in the type- specific API's. Corresponds to the JSON property id

Returns:

  • (String)


1754
1755
1756
# File 'lib/google/apis/cloudresourcemanager_v1/classes.rb', line 1754

def id
  @id
end

#typeString

The resource type this id is for. At present, the valid types are: " organization", "folder", and "project". Corresponds to the JSON property type

Returns:

  • (String)


1760
1761
1762
# File 'lib/google/apis/cloudresourcemanager_v1/classes.rb', line 1760

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1767
1768
1769
1770
# File 'lib/google/apis/cloudresourcemanager_v1/classes.rb', line 1767

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