class OvirtSDK4::NicConfiguration

Public Class Methods

new(opts = {}) click to toggle source

Creates a new instance of the {NicConfiguration} class.

@param opts [Hash] 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.

@option opts [BootProtocol] :boot_protocol The value of attribute `boot_protocol`.

@option opts [Ip, Hash] :ip The value of attribute `ip`.

@option opts [Ip, Hash] :ipv6 The value of attribute `ipv6`.

@option opts [BootProtocol] :ipv6_boot_protocol The value of attribute `ipv6_boot_protocol`.

@option opts [String] :name The value of attribute `name`.

@option opts [Boolean] :on_boot The value of attribute `on_boot`.

Calls superclass method OvirtSDK4::Struct::new
# File lib/ovirtsdk4/types.rb, line 12043
def initialize(opts = {})
  super(opts)
  self.boot_protocol = opts[:boot_protocol]
  self.ip = opts[:ip]
  self.ipv6 = opts[:ipv6]
  self.ipv6_boot_protocol = opts[:ipv6_boot_protocol]
  self.name = opts[:name]
  self.on_boot = opts[:on_boot]
end

Public Instance Methods

==(other) click to toggle source

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

Calls superclass method OvirtSDK4::Struct#==
# File lib/ovirtsdk4/types.rb, line 12056
def ==(other)
  super &&
  @boot_protocol == other.boot_protocol &&
  @ip == other.ip &&
  @ipv6 == other.ipv6 &&
  @ipv6_boot_protocol == other.ipv6_boot_protocol &&
  @name == other.name &&
  @on_boot == other.on_boot
end
boot_protocol() click to toggle source

Returns the value of the `boot_protocol` attribute.

@return [BootProtocol]

# File lib/ovirtsdk4/types.rb, line 11906
def boot_protocol
  @boot_protocol
end
boot_protocol=(value) click to toggle source

Sets the value of the `boot_protocol` attribute.

@param value [BootProtocol]

# File lib/ovirtsdk4/types.rb, line 11915
def boot_protocol=(value)
  @boot_protocol = value
end
hash() click to toggle source

Generates a hash value for this object.

Calls superclass method OvirtSDK4::Struct#hash
# File lib/ovirtsdk4/types.rb, line 12069
def hash
  super +
  @boot_protocol.hash +
  @ip.hash +
  @ipv6.hash +
  @ipv6_boot_protocol.hash +
  @name.hash +
  @on_boot.hash
end
ip() click to toggle source

Returns the value of the `ip` attribute.

@return [Ip]

# File lib/ovirtsdk4/types.rb, line 11924
def ip
  @ip
end
ip=(value) click to toggle source

Sets the value of the `ip` attribute.

@param value [Ip, Hash]

The `value` parameter can be an instance of {OvirtSDK4::Ip} 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.

# File lib/ovirtsdk4/types.rb, line 11937
def ip=(value)
  if value.is_a?(Hash)
    value = Ip.new(value)
  end
  @ip = value
end
ipv6() click to toggle source

Returns the value of the `ipv6` attribute.

@return [Ip]

# File lib/ovirtsdk4/types.rb, line 11949
def ipv6
  @ipv6
end
ipv6=(value) click to toggle source

Sets the value of the `ipv6` attribute.

@param value [Ip, Hash]

The `value` parameter can be an instance of {OvirtSDK4::Ip} 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.

# File lib/ovirtsdk4/types.rb, line 11962
def ipv6=(value)
  if value.is_a?(Hash)
    value = Ip.new(value)
  end
  @ipv6 = value
end
ipv6_boot_protocol() click to toggle source

Returns the value of the `ipv6_boot_protocol` attribute.

@return [BootProtocol]

# File lib/ovirtsdk4/types.rb, line 11974
def ipv6_boot_protocol
  @ipv6_boot_protocol
end
ipv6_boot_protocol=(value) click to toggle source

Sets the value of the `ipv6_boot_protocol` attribute.

@param value [BootProtocol]

# File lib/ovirtsdk4/types.rb, line 11983
def ipv6_boot_protocol=(value)
  @ipv6_boot_protocol = value
end
name() click to toggle source

Returns the value of the `name` attribute.

@return [String]

# File lib/ovirtsdk4/types.rb, line 11992
def name
  @name
end
name=(value) click to toggle source

Sets the value of the `name` attribute.

@param value [String]

# File lib/ovirtsdk4/types.rb, line 12001
def name=(value)
  @name = value
end
on_boot() click to toggle source

Returns the value of the `on_boot` attribute.

@return [Boolean]

# File lib/ovirtsdk4/types.rb, line 12010
def on_boot
  @on_boot
end
on_boot=(value) click to toggle source

Sets the value of the `on_boot` attribute.

@param value [Boolean]

# File lib/ovirtsdk4/types.rb, line 12019
def on_boot=(value)
  @on_boot = value
end