Class: OvirtSDK4::Fault

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

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

  • :detail (String)

    The value of attribute detail.

  • :reason (String)

    The value of attribute reason.


3857
3858
3859
3860
3861
# File 'lib/ovirtsdk4/types.rb', line 3857

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

Instance Method Details

#==(other) ⇒ Object

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


3866
3867
3868
3869
3870
# File 'lib/ovirtsdk4/types.rb', line 3866

def ==(other)
  super &&
  @detail == other.detail &&
  @reason == other.reason
end

#detailString

Returns the value of the detail attribute.

Returns:

  • (String)

3814
3815
3816
# File 'lib/ovirtsdk4/types.rb', line 3814

def detail
  @detail
end

#detail=(value) ⇒ Object

Sets the value of the detail attribute.

Parameters:

  • value (String)

3823
3824
3825
# File 'lib/ovirtsdk4/types.rb', line 3823

def detail=(value)
  @detail = value
end

#hashObject

Generates a hash value for this object.


3875
3876
3877
3878
3879
# File 'lib/ovirtsdk4/types.rb', line 3875

def hash
  super +
  @detail.hash +
  @reason.hash
end

#reasonString

Returns the value of the reason attribute.

Returns:

  • (String)

3832
3833
3834
# File 'lib/ovirtsdk4/types.rb', line 3832

def reason
  @reason
end

#reason=(value) ⇒ Object

Sets the value of the reason attribute.

Parameters:

  • value (String)

3841
3842
3843
# File 'lib/ovirtsdk4/types.rb', line 3841

def reason=(value)
  @reason = value
end