Class: OvirtSDK4::Spm

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

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

  • :priority (Integer)

    The value of attribute priority.

  • :status (SpmStatus)

    The value of attribute status.


19234
19235
19236
19237
19238
# File 'lib/ovirtsdk4/types.rb', line 19234

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

Instance Method Details

#==(other) ⇒ Object

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


19243
19244
19245
19246
19247
# File 'lib/ovirtsdk4/types.rb', line 19243

def ==(other)
  super &&
  @priority == other.priority &&
  @status == other.status
end

#hashObject

Generates a hash value for this object.


19252
19253
19254
19255
19256
# File 'lib/ovirtsdk4/types.rb', line 19252

def hash
  super +
  @priority.hash +
  @status.hash
end

#priorityInteger

Returns the value of the priority attribute.

Returns:

  • (Integer)

19191
19192
19193
# File 'lib/ovirtsdk4/types.rb', line 19191

def priority
  @priority
end

#priority=(value) ⇒ Object

Sets the value of the priority attribute.

Parameters:

  • value (Integer)

19200
19201
19202
# File 'lib/ovirtsdk4/types.rb', line 19200

def priority=(value)
  @priority = value
end

#statusSpmStatus

Returns the value of the status attribute.

Returns:


19209
19210
19211
# File 'lib/ovirtsdk4/types.rb', line 19209

def status
  @status
end

#status=(value) ⇒ Object

Sets the value of the status attribute.

Parameters:


19218
19219
19220
# File 'lib/ovirtsdk4/types.rb', line 19218

def status=(value)
  @status = value
end