Class: Google::Apis::CloudassetV1::VersionedResource

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

Overview

Resource representation as defined by the corresponding service providing the resource for a given API version.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ VersionedResource

Returns a new instance of VersionedResource.



6209
6210
6211
# File 'lib/google/apis/cloudasset_v1/classes.rb', line 6209

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

Instance Attribute Details

#resourceHash<String,Object>

JSON representation of the resource as defined by the corresponding service providing this resource. Example: If the resource is an instance provided by Compute Engine, this field will contain the JSON representation of the instance as defined by Compute Engine: https://cloud.google.com/compute/docs/ reference/rest/v1/instances. You can find the resource definition for each supported resource type in this table: https://cloud.google.com/asset- inventory/docs/supported-asset-types Corresponds to the JSON property resource

Returns:

  • (Hash<String,Object>)


6200
6201
6202
# File 'lib/google/apis/cloudasset_v1/classes.rb', line 6200

def resource
  @resource
end

#versionString

API version of the resource. Example: If the resource is an instance provided by Compute Engine v1 API as defined in https://cloud.google.com/compute/docs/ reference/rest/v1/instances, version will be "v1". Corresponds to the JSON property version

Returns:

  • (String)


6207
6208
6209
# File 'lib/google/apis/cloudasset_v1/classes.rb', line 6207

def version
  @version
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



6214
6215
6216
6217
# File 'lib/google/apis/cloudasset_v1/classes.rb', line 6214

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