Class: OvirtSDK4::GracePeriod

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

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



4726
4727
4728
4729
# File 'lib/ovirtsdk4/types.rb', line 4726

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

Instance Method Details

#==(other) ⇒ Object

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



4734
4735
4736
4737
# File 'lib/ovirtsdk4/types.rb', line 4734

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

#expiryInteger

Returns the value of the expiry attribute.

Returns:

  • (Integer)


4703
4704
4705
# File 'lib/ovirtsdk4/types.rb', line 4703

def expiry
  @expiry
end

#expiry=(value) ⇒ Object

Sets the value of the expiry attribute.

Parameters:

  • value (Integer)


4712
4713
4714
# File 'lib/ovirtsdk4/types.rb', line 4712

def expiry=(value)
  @expiry = value
end

#hashObject

Generates a hash value for this object.



4742
4743
4744
4745
# File 'lib/ovirtsdk4/types.rb', line 4742

def hash
  super +
  @expiry.hash
end