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.


8284
8285
8286
8287
8288
8289
8290
# File 'lib/ovirtsdk4/types.rb', line 8284

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.


8295
8296
8297
8298
8299
8300
8301
# File 'lib/ovirtsdk4/types.rb', line 8295

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)

8113
8114
8115
# File 'lib/ovirtsdk4/types.rb', line 8113

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)

8122
8123
8124
# File 'lib/ovirtsdk4/types.rb', line 8122

def comment=(value)
  @comment = value
end

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)

8131
8132
8133
# File 'lib/ovirtsdk4/types.rb', line 8131

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)

8140
8141
8142
# File 'lib/ovirtsdk4/types.rb', line 8140

def description=(value)
  @description = value
end

#hashObject

Generates a hash value for this object.


8306
8307
8308
8309
8310
8311
8312
# File 'lib/ovirtsdk4/types.rb', line 8306

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

#idString

Returns the value of the id attribute.

Returns:

  • (String)

8149
8150
8151
# File 'lib/ovirtsdk4/types.rb', line 8149

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)

8158
8159
8160
# File 'lib/ovirtsdk4/types.rb', line 8158

def id=(value)
  @id = value
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)

8167
8168
8169
# File 'lib/ovirtsdk4/types.rb', line 8167

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)

8176
8177
8178
# File 'lib/ovirtsdk4/types.rb', line 8176

def name=(value)
  @name = value
end

#ouiInteger

Returns the value of the oui attribute.

Returns:

  • (Integer)

8185
8186
8187
# File 'lib/ovirtsdk4/types.rb', line 8185

def oui
  @oui
end

#oui=(value) ⇒ Object

Sets the value of the oui attribute.

Parameters:

  • value (Integer)

8194
8195
8196
# File 'lib/ovirtsdk4/types.rb', line 8194

def oui=(value)
  @oui = value
end

#propertiesArray<Property>

Returns the value of the properties attribute.

Returns:


8203
8204
8205
# File 'lib/ovirtsdk4/types.rb', line 8203

def properties
  @properties
end

#properties=(list) ⇒ Object

Sets the value of the properties attribute.

Parameters:


8212
8213
8214
8215
8216
8217
8218
8219
8220
8221
8222
# File 'lib/ovirtsdk4/types.rb', line 8212

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)

8229
8230
8231
# File 'lib/ovirtsdk4/types.rb', line 8229

def subtype
  @subtype
end

#subtype=(value) ⇒ Object

Sets the value of the subtype attribute.

Parameters:

  • value (Integer)

8238
8239
8240
# File 'lib/ovirtsdk4/types.rb', line 8238

def subtype=(value)
  @subtype = value
end

#typeInteger

Returns the value of the type attribute.

Returns:

  • (Integer)

8247
8248
8249
# File 'lib/ovirtsdk4/types.rb', line 8247

def type
  @type
end

#type=(value) ⇒ Object

Sets the value of the type attribute.

Parameters:

  • value (Integer)

8256
8257
8258
# File 'lib/ovirtsdk4/types.rb', line 8256

def type=(value)
  @type = value
end