Class: OvirtSDK4::CustomProperty

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

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

  • :name (String)

    The value of attribute name.

  • :regexp (String)

    The value of attribute regexp.

  • :value (String)

    The value of attribute value.



2747
2748
2749
2750
2751
2752
# File 'lib/ovirtsdk4/types.rb', line 2747

def initialize(opts = {})
  super(opts)
  self.name = opts[:name]
  self.regexp = opts[:regexp]
  self.value = opts[:value]
end

Instance Method Details

#==(other) ⇒ Object

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



2757
2758
2759
2760
2761
2762
# File 'lib/ovirtsdk4/types.rb', line 2757

def ==(other)
  super &&
  @name == other.name &&
  @regexp == other.regexp &&
  @value == other.value
end

#hashObject

Generates a hash value for this object.



2767
2768
2769
2770
2771
2772
# File 'lib/ovirtsdk4/types.rb', line 2767

def hash
  super +
  @name.hash +
  @regexp.hash +
  @value.hash
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)


2684
2685
2686
# File 'lib/ovirtsdk4/types.rb', line 2684

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)


2693
2694
2695
# File 'lib/ovirtsdk4/types.rb', line 2693

def name=(value)
  @name = value
end

#regexpString

Returns the value of the regexp attribute.

Returns:

  • (String)


2702
2703
2704
# File 'lib/ovirtsdk4/types.rb', line 2702

def regexp
  @regexp
end

#regexp=(value) ⇒ Object

Sets the value of the regexp attribute.

Parameters:

  • value (String)


2711
2712
2713
# File 'lib/ovirtsdk4/types.rb', line 2711

def regexp=(value)
  @regexp = value
end

#valueString

Returns the value of the value attribute.

Returns:

  • (String)


2720
2721
2722
# File 'lib/ovirtsdk4/types.rb', line 2720

def value
  @value
end

#value=(value) ⇒ Object

Sets the value of the value attribute.

Parameters:

  • value (String)


2729
2730
2731
# File 'lib/ovirtsdk4/types.rb', line 2729

def value=(value)
  @value = value
end