Class: OvirtSDK4::GuestOperatingSystem

Inherits:
Struct
  • Object
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 = {}) ⇒ GuestOperatingSystem

Creates a new instance of the OvirtSDK4::GuestOperatingSystem 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):

  • :architecture (String)

    The value of attribute architecture.

  • :codename (String)

    The value of attribute codename.

  • :distribution (String)

    The value of attribute distribution.

  • :family (String)

    The value of attribute family.

  • :kernel (Kernel, Hash)

    The value of attribute kernel.

  • :version (Version, Hash)

    The value of attribute version.



4500
4501
4502
4503
4504
4505
4506
4507
4508
# File 'lib/ovirtsdk4/types.rb', line 4500

def initialize(opts = {})
  super(opts)
  self.architecture = opts[:architecture]
  self.codename = opts[:codename]
  self.distribution = opts[:distribution]
  self.family = opts[:family]
  self.kernel = opts[:kernel]
  self.version = opts[:version]
end

Instance Method Details

#==(other) ⇒ Object

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



4513
4514
4515
4516
4517
4518
4519
4520
4521
# File 'lib/ovirtsdk4/types.rb', line 4513

def ==(other)
  super &&
  @architecture == other.architecture &&
  @codename == other.codename &&
  @distribution == other.distribution &&
  @family == other.family &&
  @kernel == other.kernel &&
  @version == other.version
end

#architectureString

Returns the value of the architecture attribute.

Returns:

  • (String)


4363
4364
4365
# File 'lib/ovirtsdk4/types.rb', line 4363

def architecture
  @architecture
end

#architecture=(value) ⇒ Object

Sets the value of the architecture attribute.

Parameters:

  • value (String)


4372
4373
4374
# File 'lib/ovirtsdk4/types.rb', line 4372

def architecture=(value)
  @architecture = value
end

#codenameString

Returns the value of the codename attribute.

Returns:

  • (String)


4381
4382
4383
# File 'lib/ovirtsdk4/types.rb', line 4381

def codename
  @codename
end

#codename=(value) ⇒ Object

Sets the value of the codename attribute.

Parameters:

  • value (String)


4390
4391
4392
# File 'lib/ovirtsdk4/types.rb', line 4390

def codename=(value)
  @codename = value
end

#distributionString

Returns the value of the distribution attribute.

Returns:

  • (String)


4399
4400
4401
# File 'lib/ovirtsdk4/types.rb', line 4399

def distribution
  @distribution
end

#distribution=(value) ⇒ Object

Sets the value of the distribution attribute.

Parameters:

  • value (String)


4408
4409
4410
# File 'lib/ovirtsdk4/types.rb', line 4408

def distribution=(value)
  @distribution = value
end

#familyString

Returns the value of the family attribute.

Returns:

  • (String)


4417
4418
4419
# File 'lib/ovirtsdk4/types.rb', line 4417

def family
  @family
end

#family=(value) ⇒ Object

Sets the value of the family attribute.

Parameters:

  • value (String)


4426
4427
4428
# File 'lib/ovirtsdk4/types.rb', line 4426

def family=(value)
  @family = value
end

#hashObject

Generates a hash value for this object.



4526
4527
4528
4529
4530
4531
4532
4533
4534
# File 'lib/ovirtsdk4/types.rb', line 4526

def hash
  super +
  @architecture.hash +
  @codename.hash +
  @distribution.hash +
  @family.hash +
  @kernel.hash +
  @version.hash
end

#kernelKernel

Returns the value of the kernel attribute.

Returns:



4435
4436
4437
# File 'lib/ovirtsdk4/types.rb', line 4435

def kernel
  @kernel
end

#kernel=(value) ⇒ Object

Sets the value of the kernel attribute.

The value parameter can be an instance of Kernel 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:



4448
4449
4450
4451
4452
4453
# File 'lib/ovirtsdk4/types.rb', line 4448

def kernel=(value)
  if value.is_a?(Hash)
    value = Kernel.new(value)
  end
  @kernel = value
end

#versionVersion

Returns the value of the version attribute.

Returns:



4460
4461
4462
# File 'lib/ovirtsdk4/types.rb', line 4460

def version
  @version
end

#version=(value) ⇒ Object

Sets the value of the version attribute.

The value parameter can be an instance of Version 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:



4473
4474
4475
4476
4477
4478
# File 'lib/ovirtsdk4/types.rb', line 4473

def version=(value)
  if value.is_a?(Hash)
    value = Version.new(value)
  end
  @version = value
end