Class: OvirtSDK4::Configuration

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

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

  • :data (String)

    The value of attribute data.

  • :type (ConfigurationType)

    The value of attribute type.



2007
2008
2009
2010
2011
# File 'lib/ovirtsdk4/types.rb', line 2007

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

Instance Method Details

#==(other) ⇒ Object

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



2016
2017
2018
2019
2020
# File 'lib/ovirtsdk4/types.rb', line 2016

def ==(other)
  super &&
  @data == other.data &&
  @type == other.type
end

#dataString

Returns the value of the data attribute.

Returns:

  • (String)


1964
1965
1966
# File 'lib/ovirtsdk4/types.rb', line 1964

def data
  @data
end

#data=(value) ⇒ Object

Sets the value of the data attribute.

Parameters:

  • value (String)


1973
1974
1975
# File 'lib/ovirtsdk4/types.rb', line 1973

def data=(value)
  @data = value
end

#hashObject

Generates a hash value for this object.



2025
2026
2027
2028
2029
# File 'lib/ovirtsdk4/types.rb', line 2025

def hash
  super +
  @data.hash +
  @type.hash
end

#typeConfigurationType

Returns the value of the type attribute.

Returns:



1982
1983
1984
# File 'lib/ovirtsdk4/types.rb', line 1982

def type
  @type
end

#type=(value) ⇒ Object

Sets the value of the type attribute.

Parameters:



1991
1992
1993
# File 'lib/ovirtsdk4/types.rb', line 1991

def type=(value)
  @type = value
end