Class: OvirtSDK4::NetworkFilterParameter

Inherits:
Identified 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 = {}) ⇒ NetworkFilterParameter

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

  • :comment (String)

    The value of attribute comment.

  • :description (String)

    The value of attribute description.

  • :id (String)

    The value of attribute id.

  • :name (String)

    The value of attribute name.

  • :nic (Nic, Hash)

    The value of attribute nic.

  • :value (String)

    The value of attribute value.



10810
10811
10812
10813
10814
# File 'lib/ovirtsdk4/types.rb', line 10810

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

Instance Method Details

#==(other) ⇒ Object

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



10819
10820
10821
10822
10823
# File 'lib/ovirtsdk4/types.rb', line 10819

def ==(other)
  super &&
  @nic == other.nic &&
  @value == other.value
end

#commentString

Returns the value of the comment attribute.

Returns:

  • (String)


10680
10681
10682
# File 'lib/ovirtsdk4/types.rb', line 10680

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)


10689
10690
10691
# File 'lib/ovirtsdk4/types.rb', line 10689

def comment=(value)
  @comment = value
end

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)


10698
10699
10700
# File 'lib/ovirtsdk4/types.rb', line 10698

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)


10707
10708
10709
# File 'lib/ovirtsdk4/types.rb', line 10707

def description=(value)
  @description = value
end

#hashObject

Generates a hash value for this object.



10828
10829
10830
10831
10832
# File 'lib/ovirtsdk4/types.rb', line 10828

def hash
  super +
  @nic.hash +
  @value.hash
end

#idString

Returns the value of the id attribute.

Returns:

  • (String)


10716
10717
10718
# File 'lib/ovirtsdk4/types.rb', line 10716

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)


10725
10726
10727
# File 'lib/ovirtsdk4/types.rb', line 10725

def id=(value)
  @id = value
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)


10734
10735
10736
# File 'lib/ovirtsdk4/types.rb', line 10734

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)


10743
10744
10745
# File 'lib/ovirtsdk4/types.rb', line 10743

def name=(value)
  @name = value
end

#nicNic

Returns the value of the nic attribute.

Returns:



10752
10753
10754
# File 'lib/ovirtsdk4/types.rb', line 10752

def nic
  @nic
end

#nic=(value) ⇒ Object

Sets the value of the nic attribute.

The value parameter can be an instance of OvirtSDK4::Nic or a hash. If it is a hash then a new instance will be created passing the hash as the opts parameter to the constructor.

Parameters:

  • value (Nic, Hash)


10765
10766
10767
10768
10769
10770
# File 'lib/ovirtsdk4/types.rb', line 10765

def nic=(value)
  if value.is_a?(Hash)
    value = Nic.new(value)
  end
  @nic = value
end

#valueString

Returns the value of the value attribute.

Returns:

  • (String)


10777
10778
10779
# File 'lib/ovirtsdk4/types.rb', line 10777

def value
  @value
end

#value=(value) ⇒ Object

Sets the value of the value attribute.

Parameters:

  • value (String)


10786
10787
10788
# File 'lib/ovirtsdk4/types.rb', line 10786

def value=(value)
  @value = value
end