Class: OvirtSDK4::Ip

Inherits:
Struct 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 = {}) ⇒ Ip

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

  • :address (String)

    The value of attribute address.

  • :gateway (String)

    The value of attribute gateway.

  • :netmask (String)

    The value of attribute netmask.

  • :version (IpVersion)

    The value of attribute version.


6584
6585
6586
6587
6588
6589
6590
# File 'lib/ovirtsdk4/types.rb', line 6584

def initialize(opts = {})
  super(opts)
  self.address = opts[:address]
  self.gateway = opts[:gateway]
  self.netmask = opts[:netmask]
  self.version = opts[:version]
end

Instance Method Details

#==(other) ⇒ Object

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


6595
6596
6597
6598
6599
6600
6601
# File 'lib/ovirtsdk4/types.rb', line 6595

def ==(other)
  super &&
  @address == other.address &&
  @gateway == other.gateway &&
  @netmask == other.netmask &&
  @version == other.version
end

#addressString

Returns the value of the address attribute.

Returns:

  • (String)

6501
6502
6503
# File 'lib/ovirtsdk4/types.rb', line 6501

def address
  @address
end

#address=(value) ⇒ Object

Sets the value of the address attribute.

Parameters:

  • value (String)

6510
6511
6512
# File 'lib/ovirtsdk4/types.rb', line 6510

def address=(value)
  @address = value
end

#gatewayString

Returns the value of the gateway attribute.

Returns:

  • (String)

6519
6520
6521
# File 'lib/ovirtsdk4/types.rb', line 6519

def gateway
  @gateway
end

#gateway=(value) ⇒ Object

Sets the value of the gateway attribute.

Parameters:

  • value (String)

6528
6529
6530
# File 'lib/ovirtsdk4/types.rb', line 6528

def gateway=(value)
  @gateway = value
end

#hashObject

Generates a hash value for this object.


6606
6607
6608
6609
6610
6611
6612
# File 'lib/ovirtsdk4/types.rb', line 6606

def hash
  super +
  @address.hash +
  @gateway.hash +
  @netmask.hash +
  @version.hash
end

#netmaskString

Returns the value of the netmask attribute.

Returns:

  • (String)

6537
6538
6539
# File 'lib/ovirtsdk4/types.rb', line 6537

def netmask
  @netmask
end

#netmask=(value) ⇒ Object

Sets the value of the netmask attribute.

Parameters:

  • value (String)

6546
6547
6548
# File 'lib/ovirtsdk4/types.rb', line 6546

def netmask=(value)
  @netmask = value
end

#versionIpVersion

Returns the value of the version attribute.

Returns:


6555
6556
6557
# File 'lib/ovirtsdk4/types.rb', line 6555

def version
  @version
end

#version=(value) ⇒ Object

Sets the value of the version attribute.

Parameters:


6564
6565
6566
# File 'lib/ovirtsdk4/types.rb', line 6564

def version=(value)
  @version = value
end