class OvirtSDK4::IpAddressAssignment

Public Class Methods

new(opts = {}) click to toggle source

Creates a new instance of the {IpAddressAssignment} 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] :assignment_method The value of attribute `assignment_method`.

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

Calls superclass method OvirtSDK4::Struct.new
# File lib/ovirtsdk4/types.rb, line 6262
def initialize(opts = {})
  super(opts)
  self.assignment_method = opts[:assignment_method]
  self.ip = opts[:ip]
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 6271
def ==(other)
  super &&
  @assignment_method == other.assignment_method &&
  @ip == other.ip
end
assignment_method() click to toggle source

Returns the value of the `assignment_method` attribute.

@return [BootProtocol]

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

Sets the value of the `assignment_method` attribute.

@param value [BootProtocol]

# File lib/ovirtsdk4/types.rb, line 6221
def assignment_method=(value)
  @assignment_method = 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 6280
def hash
  super +
  @assignment_method.hash +
  @ip.hash
end
ip() click to toggle source

Returns the value of the `ip` attribute.

@return [Ip]

# File lib/ovirtsdk4/types.rb, line 6230
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 6243
def ip=(value)
  if value.is_a?(Hash)
    value = Ip.new(value)
  end
  @ip = value
end