Class: OvirtSDK4::GraphicsConsole

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

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

  • :comment (String)

    The value of attribute comment.

  • :description (String)

    The value of attribute description.

  • :id (String)

    The value of attribute id.

  • :instance_type (InstanceType, Hash)

    The value of attribute instance_type.

  • :name (String)

    The value of attribute name.

  • :port (Integer)

    The value of attribute port.

  • :protocol (GraphicsType)

    The value of attribute protocol.

  • :template (Template, Hash)

    The value of attribute template.

  • :tls_port (Integer)

    The value of attribute tls_port.

  • :vm (Vm, Hash)

    The value of attribute vm.


41942
41943
41944
41945
41946
41947
41948
41949
41950
41951
# File 'lib/ovirtsdk4/types.rb', line 41942

def initialize(opts = {})
  super(opts)
  self.address = opts[:address]
  self.instance_type = opts[:instance_type]
  self.port = opts[:port]
  self.protocol = opts[:protocol]
  self.template = opts[:template]
  self.tls_port = opts[:tls_port]
  self.vm = opts[:vm]
end

Instance Method Details

#==(other) ⇒ Object

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


41956
41957
41958
41959
41960
41961
41962
41963
41964
41965
# File 'lib/ovirtsdk4/types.rb', line 41956

def ==(other)
  super &&
  @address == other.address &&
  @instance_type == other.instance_type &&
  @port == other.port &&
  @protocol == other.protocol &&
  @template == other.template &&
  @tls_port == other.tls_port &&
  @vm == other.vm
end

#addressString

Returns the value of the address attribute.

Returns:

  • (String)

41698
41699
41700
# File 'lib/ovirtsdk4/types.rb', line 41698

def address
  @address
end

#address=(value) ⇒ Object

Sets the value of the address attribute.

Parameters:

  • value (String)

41707
41708
41709
# File 'lib/ovirtsdk4/types.rb', line 41707

def address=(value)
  @address = value
end

#commentString

Returns the value of the comment attribute.

Returns:

  • (String)

41716
41717
41718
# File 'lib/ovirtsdk4/types.rb', line 41716

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)

41725
41726
41727
# File 'lib/ovirtsdk4/types.rb', line 41725

def comment=(value)
  @comment = value
end

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)

41734
41735
41736
# File 'lib/ovirtsdk4/types.rb', line 41734

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)

41743
41744
41745
# File 'lib/ovirtsdk4/types.rb', line 41743

def description=(value)
  @description = value
end

#hashObject

Generates a hash value for this object.


41970
41971
41972
41973
41974
41975
41976
41977
41978
41979
# File 'lib/ovirtsdk4/types.rb', line 41970

def hash
  super +
  @address.hash +
  @instance_type.hash +
  @port.hash +
  @protocol.hash +
  @template.hash +
  @tls_port.hash +
  @vm.hash
end

#idString

Returns the value of the id attribute.

Returns:

  • (String)

41752
41753
41754
# File 'lib/ovirtsdk4/types.rb', line 41752

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)

41761
41762
41763
# File 'lib/ovirtsdk4/types.rb', line 41761

def id=(value)
  @id = value
end

#instance_typeInstanceType

Returns the value of the instance_type attribute.

Returns:


41770
41771
41772
# File 'lib/ovirtsdk4/types.rb', line 41770

def instance_type
  @instance_type
end

#instance_type=(value) ⇒ Object

Sets the value of the instance_type attribute.

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


41783
41784
41785
41786
41787
41788
# File 'lib/ovirtsdk4/types.rb', line 41783

def instance_type=(value)
  if value.is_a?(Hash)
    value = InstanceType.new(value)
  end
  @instance_type = value
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)

41795
41796
41797
# File 'lib/ovirtsdk4/types.rb', line 41795

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)

41804
41805
41806
# File 'lib/ovirtsdk4/types.rb', line 41804

def name=(value)
  @name = value
end

#portInteger

Returns the value of the port attribute.

Returns:

  • (Integer)

41813
41814
41815
# File 'lib/ovirtsdk4/types.rb', line 41813

def port
  @port
end

#port=(value) ⇒ Object

Sets the value of the port attribute.

Parameters:

  • value (Integer)

41822
41823
41824
# File 'lib/ovirtsdk4/types.rb', line 41822

def port=(value)
  @port = value
end

#protocolGraphicsType

Returns the value of the protocol attribute.

Returns:


41831
41832
41833
# File 'lib/ovirtsdk4/types.rb', line 41831

def protocol
  @protocol
end

#protocol=(value) ⇒ Object

Sets the value of the protocol attribute.

Parameters:


41840
41841
41842
# File 'lib/ovirtsdk4/types.rb', line 41840

def protocol=(value)
  @protocol = value
end

#templateTemplate

Returns the value of the template attribute.

Returns:


41849
41850
41851
# File 'lib/ovirtsdk4/types.rb', line 41849

def template
  @template
end

#template=(value) ⇒ Object

Sets the value of the template attribute.

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


41862
41863
41864
41865
41866
41867
# File 'lib/ovirtsdk4/types.rb', line 41862

def template=(value)
  if value.is_a?(Hash)
    value = Template.new(value)
  end
  @template = value
end

#tls_portInteger

Returns the value of the tls_port attribute.

Returns:

  • (Integer)

41874
41875
41876
# File 'lib/ovirtsdk4/types.rb', line 41874

def tls_port
  @tls_port
end

#tls_port=(value) ⇒ Object

Sets the value of the tls_port attribute.

Parameters:

  • value (Integer)

41883
41884
41885
# File 'lib/ovirtsdk4/types.rb', line 41883

def tls_port=(value)
  @tls_port = value
end

#vmVm

Returns the value of the vm attribute.

Returns:


41892
41893
41894
# File 'lib/ovirtsdk4/types.rb', line 41892

def vm
  @vm
end

#vm=(value) ⇒ Object

Sets the value of the vm attribute.

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

  • value (Vm, Hash)

41905
41906
41907
41908
41909
41910
# File 'lib/ovirtsdk4/types.rb', line 41905

def vm=(value)
  if value.is_a?(Hash)
    value = Vm.new(value)
  end
  @vm = value
end