Class: Google::Apis::ComputeV1::ResourceMetadata

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

Overview

Standardized resource metadata common to all compute resources.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ResourceMetadata

Returns a new instance of ResourceMetadata.



49885
49886
49887
# File 'lib/google/apis/compute_v1/classes.rb', line 49885

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

Instance Attribute Details

#api_versionString

The version of the API interface that this resource was retrieved through. For example, "2025-01-01" or "2025-01-01-preview". Corresponds to the JSON property apiVersion

Returns:

  • (String)


49876
49877
49878
# File 'lib/google/apis/compute_v1/classes.rb', line 49876

def api_version
  @api_version
end

#resource_typeString

The canonical resource type name in the format of a resource type as defined by AIP-123. For example, "compute.googleapis.com/Instance". Corresponds to the JSON property resourceType

Returns:

  • (String)


49883
49884
49885
# File 'lib/google/apis/compute_v1/classes.rb', line 49883

def resource_type
  @resource_type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



49890
49891
49892
49893
# File 'lib/google/apis/compute_v1/classes.rb', line 49890

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