Class: OvirtSDK4::LinkLayerDiscoveryProtocolElement

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

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

  • :oui (Integer)

    The value of attribute oui.

  • :properties (Array<Property>, Array<Hash>)

    The values of attribute properties.

  • :subtype (Integer)

    The value of attribute subtype.

  • :type (Integer)

    The value of attribute type.



8278
8279
8280
8281
8282
8283
8284
# File 'lib/ovirtsdk4/types.rb', line 8278

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

Instance Method Details

#==(other) ⇒ Object

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



8289
8290
8291
8292
8293
8294
8295
# File 'lib/ovirtsdk4/types.rb', line 8289

def ==(other)
  super &&
  @oui == other.oui &&
  @properties == other.properties &&
  @subtype == other.subtype &&
  @type == other.type
end

#commentString

Returns the value of the comment attribute.

Returns:

  • (String)


8107
8108
8109
# File 'lib/ovirtsdk4/types.rb', line 8107

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)


8116
8117
8118
# File 'lib/ovirtsdk4/types.rb', line 8116

def comment=(value)
  @comment = value
end

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)


8125
8126
8127
# File 'lib/ovirtsdk4/types.rb', line 8125

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)


8134
8135
8136
# File 'lib/ovirtsdk4/types.rb', line 8134

def description=(value)
  @description = value
end

#hashObject

Generates a hash value for this object.



8300
8301
8302
8303
8304
8305
8306
# File 'lib/ovirtsdk4/types.rb', line 8300

def hash
  super +
  @oui.hash +
  @properties.hash +
  @subtype.hash +
  @type.hash
end

#idString

Returns the value of the id attribute.

Returns:

  • (String)


8143
8144
8145
# File 'lib/ovirtsdk4/types.rb', line 8143

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)


8152
8153
8154
# File 'lib/ovirtsdk4/types.rb', line 8152

def id=(value)
  @id = value
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)


8161
8162
8163
# File 'lib/ovirtsdk4/types.rb', line 8161

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)


8170
8171
8172
# File 'lib/ovirtsdk4/types.rb', line 8170

def name=(value)
  @name = value
end

#ouiInteger

Returns the value of the oui attribute.

Returns:

  • (Integer)


8179
8180
8181
# File 'lib/ovirtsdk4/types.rb', line 8179

def oui
  @oui
end

#oui=(value) ⇒ Object

Sets the value of the oui attribute.

Parameters:

  • value (Integer)


8188
8189
8190
# File 'lib/ovirtsdk4/types.rb', line 8188

def oui=(value)
  @oui = value
end

#propertiesArray<Property>

Returns the value of the properties attribute.

Returns:



8197
8198
8199
# File 'lib/ovirtsdk4/types.rb', line 8197

def properties
  @properties
end

#properties=(list) ⇒ Object

Sets the value of the properties attribute.

Parameters:



8206
8207
8208
8209
8210
8211
8212
8213
8214
8215
8216
# File 'lib/ovirtsdk4/types.rb', line 8206

def properties=(list)
  if list.class == Array
    list = List.new(list)
    list.each_with_index do |value, index|
      if value.is_a?(Hash)
        list[index] = Property.new(value)
      end
    end
  end
  @properties = list
end

#subtypeInteger

Returns the value of the subtype attribute.

Returns:

  • (Integer)


8223
8224
8225
# File 'lib/ovirtsdk4/types.rb', line 8223

def subtype
  @subtype
end

#subtype=(value) ⇒ Object

Sets the value of the subtype attribute.

Parameters:

  • value (Integer)


8232
8233
8234
# File 'lib/ovirtsdk4/types.rb', line 8232

def subtype=(value)
  @subtype = value
end

#typeInteger

Returns the value of the type attribute.

Returns:

  • (Integer)


8241
8242
8243
# File 'lib/ovirtsdk4/types.rb', line 8241

def type
  @type
end

#type=(value) ⇒ Object

Sets the value of the type attribute.

Parameters:

  • value (Integer)


8250
8251
8252
# File 'lib/ovirtsdk4/types.rb', line 8250

def type=(value)
  @type = value
end