Class: OvirtSDK4::NetworkFilter

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

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

  • :version (Version, Hash)

    The value of attribute version.



10653
10654
10655
10656
# File 'lib/ovirtsdk4/types.rb', line 10653

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

Instance Method Details

#==(other) ⇒ Object

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



10661
10662
10663
10664
# File 'lib/ovirtsdk4/types.rb', line 10661

def ==(other)
  super &&
  @version == other.version
end

#commentString

Returns the value of the comment attribute.

Returns:

  • (String)


10543
10544
10545
# File 'lib/ovirtsdk4/types.rb', line 10543

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)


10552
10553
10554
# File 'lib/ovirtsdk4/types.rb', line 10552

def comment=(value)
  @comment = value
end

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)


10561
10562
10563
# File 'lib/ovirtsdk4/types.rb', line 10561

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)


10570
10571
10572
# File 'lib/ovirtsdk4/types.rb', line 10570

def description=(value)
  @description = value
end

#hashObject

Generates a hash value for this object.



10669
10670
10671
10672
# File 'lib/ovirtsdk4/types.rb', line 10669

def hash
  super +
  @version.hash
end

#idString

Returns the value of the id attribute.

Returns:

  • (String)


10579
10580
10581
# File 'lib/ovirtsdk4/types.rb', line 10579

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)


10588
10589
10590
# File 'lib/ovirtsdk4/types.rb', line 10588

def id=(value)
  @id = value
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)


10597
10598
10599
# File 'lib/ovirtsdk4/types.rb', line 10597

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)


10606
10607
10608
# File 'lib/ovirtsdk4/types.rb', line 10606

def name=(value)
  @name = value
end

#versionVersion

Returns the value of the version attribute.

Returns:



10615
10616
10617
# File 'lib/ovirtsdk4/types.rb', line 10615

def version
  @version
end

#version=(value) ⇒ Object

Sets the value of the version attribute.

The value parameter can be an instance of Version 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:



10628
10629
10630
10631
10632
10633
# File 'lib/ovirtsdk4/types.rb', line 10628

def version=(value)
  if value.is_a?(Hash)
    value = Version.new(value)
  end
  @version = value
end