Class: OvirtSDK4::Ticket

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

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

  • :expiry (Integer)

    The value of attribute expiry.

  • :value (String)

    The value of attribute value.


22890
22891
22892
22893
22894
# File 'lib/ovirtsdk4/types.rb', line 22890

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

Instance Method Details

#==(other) ⇒ Object

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


22899
22900
22901
22902
22903
# File 'lib/ovirtsdk4/types.rb', line 22899

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

#expiryInteger

Returns the value of the expiry attribute.

Returns:

  • (Integer)

22847
22848
22849
# File 'lib/ovirtsdk4/types.rb', line 22847

def expiry
  @expiry
end

#expiry=(value) ⇒ Object

Sets the value of the expiry attribute.

Parameters:

  • value (Integer)

22856
22857
22858
# File 'lib/ovirtsdk4/types.rb', line 22856

def expiry=(value)
  @expiry = value
end

#hashObject

Generates a hash value for this object.


22908
22909
22910
22911
22912
# File 'lib/ovirtsdk4/types.rb', line 22908

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

#valueString

Returns the value of the value attribute.

Returns:

  • (String)

22865
22866
22867
# File 'lib/ovirtsdk4/types.rb', line 22865

def value
  @value
end

#value=(value) ⇒ Object

Sets the value of the value attribute.

Parameters:

  • value (String)

22874
22875
22876
# File 'lib/ovirtsdk4/types.rb', line 22874

def value=(value)
  @value = value
end