Class: OvirtSDK4::Application

Inherits:
Identified show all
Defined in:
lib/ovirtsdk4/types.rb,
lib/ovirtsdk4/types.rb

Instance Method Summary collapse

Methods included from Type

#dig, #href, #href=

Constructor Details

#initialize(opts = {}) ⇒ Application

Creates a new instance of the OvirtSDK4::Application class.

Options Hash (opts):

  • :comment (String)

    The value of attribute comment.

  • :description (String)

    The value of attribute description.

  • :id (String)

    The value of attribute id.

  • :name (String)

    The value of attribute name.

  • :vm (Vm, Hash)

    The value of attribute vm.



32417
32418
32419
32420
# File 'lib/ovirtsdk4/types.rb', line 32417

def initialize(opts = {})
  super(opts)
  self.vm = opts[:vm]
end

Instance Method Details

#==(other) ⇒ Object

Returns true if self and other have the same attributes and values.



32425
32426
32427
32428
# File 'lib/ovirtsdk4/types.rb', line 32425

def ==(other)
  super &&
  @vm == other.vm
end

#commentString

Returns the value of the comment attribute.



32307
32308
32309
# File 'lib/ovirtsdk4/types.rb', line 32307

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.



32316
32317
32318
# File 'lib/ovirtsdk4/types.rb', line 32316

def comment=(value)
  @comment = value
end

#descriptionString

Returns the value of the description attribute.



32325
32326
32327
# File 'lib/ovirtsdk4/types.rb', line 32325

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.



32334
32335
32336
# File 'lib/ovirtsdk4/types.rb', line 32334

def description=(value)
  @description = value
end

#hashObject

Generates a hash value for this object.



32433
32434
32435
32436
# File 'lib/ovirtsdk4/types.rb', line 32433

def hash
  super +
  @vm.hash
end

#idString

Returns the value of the id attribute.



32343
32344
32345
# File 'lib/ovirtsdk4/types.rb', line 32343

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.



32352
32353
32354
# File 'lib/ovirtsdk4/types.rb', line 32352

def id=(value)
  @id = value
end

#nameString

Returns the value of the name attribute.



32361
32362
32363
# File 'lib/ovirtsdk4/types.rb', line 32361

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.



32370
32371
32372
# File 'lib/ovirtsdk4/types.rb', line 32370

def name=(value)
  @name = value
end

#vmVm

Returns the value of the vm attribute.



32379
32380
32381
# File 'lib/ovirtsdk4/types.rb', line 32379

def vm
  @vm
end

#vm=(value) ⇒ Object

Sets the value of the vm attribute.

The value parameter can be an instance of Vm or a hash. If it is a hash then a new instance will be created passing the hash as the opts parameter to the constructor.



32392
32393
32394
32395
32396
32397
# File 'lib/ovirtsdk4/types.rb', line 32392

def vm=(value)
  if value.is_a?(Hash)
    value = Vm.new(value)
  end
  @vm = value
end