Class: Google::Apis::MigrationcenterV1alpha1::Asset

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

Overview

An asset represents a resource in your environment. Asset types include virtual machines and databases.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Asset

Returns a new instance of Asset.



372
373
374
# File 'lib/google/apis/migrationcenter_v1alpha1/classes.rb', line 372

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

Instance Attribute Details

#attributesHash<String,String>

Generic asset attributes. Corresponds to the JSON property attributes

Returns:

  • (Hash<String,String>)


340
341
342
# File 'lib/google/apis/migrationcenter_v1alpha1/classes.rb', line 340

def attributes
  @attributes
end

#create_timeString

Output only. The timestamp when the asset was created. Corresponds to the JSON property createTime

Returns:

  • (String)


345
346
347
# File 'lib/google/apis/migrationcenter_v1alpha1/classes.rb', line 345

def create_time
  @create_time
end

#labelsHash<String,String>

Labels as key value pairs. Corresponds to the JSON property labels

Returns:

  • (Hash<String,String>)


350
351
352
# File 'lib/google/apis/migrationcenter_v1alpha1/classes.rb', line 350

def labels
  @labels
end

#nameString

Output only. The full name of the asset. Corresponds to the JSON property name

Returns:

  • (String)


355
356
357
# File 'lib/google/apis/migrationcenter_v1alpha1/classes.rb', line 355

def name
  @name
end

#sourcesArray<String>

Output only. The list of sources contributing to the asset. Corresponds to the JSON property sources

Returns:

  • (Array<String>)


360
361
362
# File 'lib/google/apis/migrationcenter_v1alpha1/classes.rb', line 360

def sources
  @sources
end

#update_timeString

Output only. The timestamp when the asset was last updated. Corresponds to the JSON property updateTime

Returns:

  • (String)


365
366
367
# File 'lib/google/apis/migrationcenter_v1alpha1/classes.rb', line 365

def update_time
  @update_time
end

#virtual_machine_detailsGoogle::Apis::MigrationcenterV1alpha1::VirtualMachineDetails

Details of a VirtualMachine. Corresponds to the JSON property virtualMachineDetails



370
371
372
# File 'lib/google/apis/migrationcenter_v1alpha1/classes.rb', line 370

def virtual_machine_details
  @virtual_machine_details
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



377
378
379
380
381
382
383
384
385
# File 'lib/google/apis/migrationcenter_v1alpha1/classes.rb', line 377

def update!(**args)
  @attributes = args[:attributes] if args.key?(:attributes)
  @create_time = args[:create_time] if args.key?(:create_time)
  @labels = args[:labels] if args.key?(:labels)
  @name = args[:name] if args.key?(:name)
  @sources = args[:sources] if args.key?(:sources)
  @update_time = args[:update_time] if args.key?(:update_time)
  @virtual_machine_details = args[:virtual_machine_details] if args.key?(:virtual_machine_details)
end