Class: OvirtSDK4::SerialNumber

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 = {}) ⇒ SerialNumber

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

Options Hash (opts):

  • :policy (SerialNumberPolicy)

    The value of attribute policy.

  • :value (String)

    The value of attribute value.



19542
19543
19544
19545
19546
# File 'lib/ovirtsdk4/types.rb', line 19542

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

Instance Method Details

#==(other) ⇒ Object

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



19551
19552
19553
19554
19555
# File 'lib/ovirtsdk4/types.rb', line 19551

def ==(other)
  super &&
  @policy == other.policy &&
  @value == other.value
end

#hashObject

Generates a hash value for this object.



19560
19561
19562
19563
19564
# File 'lib/ovirtsdk4/types.rb', line 19560

def hash
  super +
  @policy.hash +
  @value.hash
end

#policySerialNumberPolicy

Returns the value of the policy attribute.



19499
19500
19501
# File 'lib/ovirtsdk4/types.rb', line 19499

def policy
  @policy
end

#policy=(value) ⇒ Object

Sets the value of the policy attribute.



19508
19509
19510
# File 'lib/ovirtsdk4/types.rb', line 19508

def policy=(value)
  @policy = value
end

#valueString

Returns the value of the value attribute.



19517
19518
19519
# File 'lib/ovirtsdk4/types.rb', line 19517

def value
  @value
end

#value=(value) ⇒ Object

Sets the value of the value attribute.



19526
19527
19528
# File 'lib/ovirtsdk4/types.rb', line 19526

def value=(value)
  @value = value
end