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.

Parameters:

  • opts (Hash) (defaults to: {})

    A hash containing the attributes of the object. The keys of the hash should be symbols corresponding to the names of the attributes. The values of the hash should be the values of the attributes.

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.



30317
30318
30319
30320
# File 'lib/ovirtsdk4/types.rb', line 30317

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.



30325
30326
30327
30328
# File 'lib/ovirtsdk4/types.rb', line 30325

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

#commentString

Returns the value of the comment attribute.

Returns:

  • (String)


30207
30208
30209
# File 'lib/ovirtsdk4/types.rb', line 30207

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)


30216
30217
30218
# File 'lib/ovirtsdk4/types.rb', line 30216

def comment=(value)
  @comment = value
end

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)


30225
30226
30227
# File 'lib/ovirtsdk4/types.rb', line 30225

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)


30234
30235
30236
# File 'lib/ovirtsdk4/types.rb', line 30234

def description=(value)
  @description = value
end

#hashObject

Generates a hash value for this object.



30333
30334
30335
30336
# File 'lib/ovirtsdk4/types.rb', line 30333

def hash
  super +
  @vm.hash
end

#idString

Returns the value of the id attribute.

Returns:

  • (String)


30243
30244
30245
# File 'lib/ovirtsdk4/types.rb', line 30243

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)


30252
30253
30254
# File 'lib/ovirtsdk4/types.rb', line 30252

def id=(value)
  @id = value
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)


30261
30262
30263
# File 'lib/ovirtsdk4/types.rb', line 30261

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)


30270
30271
30272
# File 'lib/ovirtsdk4/types.rb', line 30270

def name=(value)
  @name = value
end

#vmVm

Returns the value of the vm attribute.

Returns:



30279
30280
30281
# File 'lib/ovirtsdk4/types.rb', line 30279

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.

Parameters:

  • value (Vm, Hash)


30292
30293
30294
30295
30296
30297
# File 'lib/ovirtsdk4/types.rb', line 30292

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