Class: Google::Apis::CloudresourcemanagerV1beta1::ResourceId

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
generated/google/apis/cloudresourcemanager_v1beta1/classes.rb,
generated/google/apis/cloudresourcemanager_v1beta1/representations.rb,
generated/google/apis/cloudresourcemanager_v1beta1/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 AppEngine app, a Compute Engine instance, a Cloud SQL database, and so on.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Google::Apis::Core::JsonObjectSupport

#to_json

Methods included from Google::Apis::Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ ResourceId

Returns a new instance of ResourceId.



115
116
117
# File 'generated/google/apis/cloudresourcemanager_v1beta1/classes.rb', line 115

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

Instance Attribute Details

#idString

Required field for 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)


113
114
115
# File 'generated/google/apis/cloudresourcemanager_v1beta1/classes.rb', line 113

def id
  @id
end

#typeString

Required field representing the resource type this id is for. At present, the valid types are "project" and "organization". Corresponds to the JSON property type

Returns:

  • (String)


107
108
109
# File 'generated/google/apis/cloudresourcemanager_v1beta1/classes.rb', line 107

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



120
121
122
123
# File 'generated/google/apis/cloudresourcemanager_v1beta1/classes.rb', line 120

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