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.



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

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.



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

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

#detailString

Returns the value of the detail attribute.

Returns:

  • (String)


3779
3780
3781
# File 'lib/ovirtsdk4/types.rb', line 3779

def detail
  @detail
end

#detail=(value) ⇒ Object

Sets the value of the detail attribute.

Parameters:

  • value (String)


3788
3789
3790
# File 'lib/ovirtsdk4/types.rb', line 3788

def detail=(value)
  @detail = value
end

#hashObject

Generates a hash value for this object.



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

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

#reasonString

Returns the value of the reason attribute.

Returns:

  • (String)


3797
3798
3799
# File 'lib/ovirtsdk4/types.rb', line 3797

def reason
  @reason
end

#reason=(value) ⇒ Object

Sets the value of the reason attribute.

Parameters:

  • value (String)


3806
3807
3808
# File 'lib/ovirtsdk4/types.rb', line 3806

def reason=(value)
  @reason = value
end