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.

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):

  • :policy (SerialNumberPolicy)

    The value of attribute policy.

  • :value (String)

    The value of attribute value.


18693
18694
18695
18696
18697
# File 'lib/ovirtsdk4/types.rb', line 18693

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.


18702
18703
18704
18705
18706
# File 'lib/ovirtsdk4/types.rb', line 18702

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

#hashObject

Generates a hash value for this object.


18711
18712
18713
18714
18715
# File 'lib/ovirtsdk4/types.rb', line 18711

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

#policySerialNumberPolicy

Returns the value of the policy attribute.

Returns:


18650
18651
18652
# File 'lib/ovirtsdk4/types.rb', line 18650

def policy
  @policy
end

#policy=(value) ⇒ Object

Sets the value of the policy attribute.

Parameters:


18659
18660
18661
# File 'lib/ovirtsdk4/types.rb', line 18659

def policy=(value)
  @policy = value
end

#valueString

Returns the value of the value attribute.

Returns:

  • (String)

18668
18669
18670
# File 'lib/ovirtsdk4/types.rb', line 18668

def value
  @value
end

#value=(value) ⇒ Object

Sets the value of the value attribute.

Parameters:

  • value (String)

18677
18678
18679
# File 'lib/ovirtsdk4/types.rb', line 18677

def value=(value)
  @value = value
end