Class: OvirtSDK4::Vlan

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

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

  • :id (Integer)

    The value of attribute id.



24186
24187
24188
24189
# File 'lib/ovirtsdk4/types.rb', line 24186

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

Instance Method Details

#==(other) ⇒ Object

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



24194
24195
24196
24197
# File 'lib/ovirtsdk4/types.rb', line 24194

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

#hashObject

Generates a hash value for this object.



24202
24203
24204
24205
# File 'lib/ovirtsdk4/types.rb', line 24202

def hash
  super +
  @id.hash
end

#idInteger

Returns the value of the id attribute.

Returns:

  • (Integer)


24163
24164
24165
# File 'lib/ovirtsdk4/types.rb', line 24163

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (Integer)


24172
24173
24174
# File 'lib/ovirtsdk4/types.rb', line 24172

def id=(value)
  @id = value
end