Class: OvirtSDK4::AffinityRule

Inherits:
Struct
  • Object
show all
Defined in:
lib/ovirtsdk4/types.rb,
lib/ovirtsdk4/types.rb

Overview

These forward declarations are required in order to avoid circular dependencies.

Instance Method Summary collapse

Methods included from Type

#dig, #href, #href=

Constructor Details

#initialize(opts = {}) ⇒ AffinityRule

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

  • :enabled (Boolean)

    The value of attribute enabled.

  • :enforcing (Boolean)

    The value of attribute enforcing.

  • :positive (Boolean)

    The value of attribute positive.



723
724
725
726
727
728
# File 'lib/ovirtsdk4/types.rb', line 723

def initialize(opts = {})
  super(opts)
  self.enabled = opts[:enabled]
  self.enforcing = opts[:enforcing]
  self.positive = opts[:positive]
end

Instance Method Details

#==(other) ⇒ Object

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



733
734
735
736
737
738
# File 'lib/ovirtsdk4/types.rb', line 733

def ==(other)
  super &&
  @enabled == other.enabled &&
  @enforcing == other.enforcing &&
  @positive == other.positive
end

#enabledBoolean

Returns the value of the enabled attribute.

Returns:

  • (Boolean)


660
661
662
# File 'lib/ovirtsdk4/types.rb', line 660

def enabled
  @enabled
end

#enabled=(value) ⇒ Object

Sets the value of the enabled attribute.

Parameters:

  • value (Boolean)


669
670
671
# File 'lib/ovirtsdk4/types.rb', line 669

def enabled=(value)
  @enabled = value
end

#enforcingBoolean

Returns the value of the enforcing attribute.

Returns:

  • (Boolean)


678
679
680
# File 'lib/ovirtsdk4/types.rb', line 678

def enforcing
  @enforcing
end

#enforcing=(value) ⇒ Object

Sets the value of the enforcing attribute.

Parameters:

  • value (Boolean)


687
688
689
# File 'lib/ovirtsdk4/types.rb', line 687

def enforcing=(value)
  @enforcing = value
end

#hashObject

Generates a hash value for this object.



743
744
745
746
747
748
# File 'lib/ovirtsdk4/types.rb', line 743

def hash
  super +
  @enabled.hash +
  @enforcing.hash +
  @positive.hash
end

#positiveBoolean

Returns the value of the positive attribute.

Returns:

  • (Boolean)


696
697
698
# File 'lib/ovirtsdk4/types.rb', line 696

def positive
  @positive
end

#positive=(value) ⇒ Object

Sets the value of the positive attribute.

Parameters:

  • value (Boolean)


705
706
707
# File 'lib/ovirtsdk4/types.rb', line 705

def positive=(value)
  @positive = value
end