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.



6156
6157
6158
# File 'lib/google/apis/cloudasset_v1/classes.rb', line 6156

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>)


6147
6148
6149
# File 'lib/google/apis/cloudasset_v1/classes.rb', line 6147

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)


6154
6155
6156
# File 'lib/google/apis/cloudasset_v1/classes.rb', line 6154

def version
  @version
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



6161
6162
6163
6164
# File 'lib/google/apis/cloudasset_v1/classes.rb', line 6161

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