Class: OvirtSDK4::ExternalDiscoveredHost

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

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

  • :external_host_provider (ExternalHostProvider, Hash)

    The value of attribute external_host_provider.

  • :id (String)

    The value of attribute id.

  • :ip (String)

    The value of attribute ip.

  • :last_report (String)

    The value of attribute last_report.

  • :mac (String)

    The value of attribute mac.

  • :name (String)

    The value of attribute name.

  • :subnet_name (String)

    The value of attribute subnet_name.



37059
37060
37061
37062
37063
37064
37065
37066
# File 'lib/ovirtsdk4/types.rb', line 37059

def initialize(opts = {})
  super(opts)
  self.external_host_provider = opts[:external_host_provider]
  self.ip = opts[:ip]
  self.last_report = opts[:last_report]
  self.mac = opts[:mac]
  self.subnet_name = opts[:subnet_name]
end

Instance Method Details

#==(other) ⇒ Object

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



37071
37072
37073
37074
37075
37076
37077
37078
# File 'lib/ovirtsdk4/types.rb', line 37071

def ==(other)
  super &&
  @external_host_provider == other.external_host_provider &&
  @ip == other.ip &&
  @last_report == other.last_report &&
  @mac == other.mac &&
  @subnet_name == other.subnet_name
end

#commentString

Returns the value of the comment attribute.

Returns:

  • (String)


36869
36870
36871
# File 'lib/ovirtsdk4/types.rb', line 36869

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)


36878
36879
36880
# File 'lib/ovirtsdk4/types.rb', line 36878

def comment=(value)
  @comment = value
end

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)


36887
36888
36889
# File 'lib/ovirtsdk4/types.rb', line 36887

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)


36896
36897
36898
# File 'lib/ovirtsdk4/types.rb', line 36896

def description=(value)
  @description = value
end

#external_host_providerExternalHostProvider

Returns the value of the external_host_provider attribute.



36905
36906
36907
# File 'lib/ovirtsdk4/types.rb', line 36905

def external_host_provider
  @external_host_provider
end

#external_host_provider=(value) ⇒ Object

Sets the value of the external_host_provider attribute.

The value parameter can be an instance of OvirtSDK4::ExternalHostProvider 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.

Parameters:



36918
36919
36920
36921
36922
36923
# File 'lib/ovirtsdk4/types.rb', line 36918

def external_host_provider=(value)
  if value.is_a?(Hash)
    value = ExternalHostProvider.new(value)
  end
  @external_host_provider = value
end

#hashObject

Generates a hash value for this object.



37083
37084
37085
37086
37087
37088
37089
37090
# File 'lib/ovirtsdk4/types.rb', line 37083

def hash
  super +
  @external_host_provider.hash +
  @ip.hash +
  @last_report.hash +
  @mac.hash +
  @subnet_name.hash
end

#idString

Returns the value of the id attribute.

Returns:

  • (String)


36930
36931
36932
# File 'lib/ovirtsdk4/types.rb', line 36930

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)


36939
36940
36941
# File 'lib/ovirtsdk4/types.rb', line 36939

def id=(value)
  @id = value
end

#ipString

Returns the value of the ip attribute.

Returns:

  • (String)


36948
36949
36950
# File 'lib/ovirtsdk4/types.rb', line 36948

def ip
  @ip
end

#ip=(value) ⇒ Object

Sets the value of the ip attribute.

Parameters:

  • value (String)


36957
36958
36959
# File 'lib/ovirtsdk4/types.rb', line 36957

def ip=(value)
  @ip = value
end

#last_reportString

Returns the value of the last_report attribute.

Returns:

  • (String)


36966
36967
36968
# File 'lib/ovirtsdk4/types.rb', line 36966

def last_report
  @last_report
end

#last_report=(value) ⇒ Object

Sets the value of the last_report attribute.

Parameters:

  • value (String)


36975
36976
36977
# File 'lib/ovirtsdk4/types.rb', line 36975

def last_report=(value)
  @last_report = value
end

#macString

Returns the value of the mac attribute.

Returns:

  • (String)


36984
36985
36986
# File 'lib/ovirtsdk4/types.rb', line 36984

def mac
  @mac
end

#mac=(value) ⇒ Object

Sets the value of the mac attribute.

Parameters:

  • value (String)


36993
36994
36995
# File 'lib/ovirtsdk4/types.rb', line 36993

def mac=(value)
  @mac = value
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)


37002
37003
37004
# File 'lib/ovirtsdk4/types.rb', line 37002

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)


37011
37012
37013
# File 'lib/ovirtsdk4/types.rb', line 37011

def name=(value)
  @name = value
end

#subnet_nameString

Returns the value of the subnet_name attribute.

Returns:

  • (String)


37020
37021
37022
# File 'lib/ovirtsdk4/types.rb', line 37020

def subnet_name
  @subnet_name
end

#subnet_name=(value) ⇒ Object

Sets the value of the subnet_name attribute.

Parameters:

  • value (String)


37029
37030
37031
# File 'lib/ovirtsdk4/types.rb', line 37029

def subnet_name=(value)
  @subnet_name = value
end