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.



40706
40707
40708
40709
40710
40711
40712
40713
40714
40715
# File 'lib/ovirtsdk4/types.rb', line 40706

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.



40720
40721
40722
40723
40724
40725
40726
40727
40728
40729
# File 'lib/ovirtsdk4/types.rb', line 40720

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)


40462
40463
40464
# File 'lib/ovirtsdk4/types.rb', line 40462

def address
  @address
end

#address=(value) ⇒ Object

Sets the value of the address attribute.

Parameters:

  • value (String)


40471
40472
40473
# File 'lib/ovirtsdk4/types.rb', line 40471

def address=(value)
  @address = value
end

#commentString

Returns the value of the comment attribute.

Returns:

  • (String)


40480
40481
40482
# File 'lib/ovirtsdk4/types.rb', line 40480

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)


40489
40490
40491
# File 'lib/ovirtsdk4/types.rb', line 40489

def comment=(value)
  @comment = value
end

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)


40498
40499
40500
# File 'lib/ovirtsdk4/types.rb', line 40498

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)


40507
40508
40509
# File 'lib/ovirtsdk4/types.rb', line 40507

def description=(value)
  @description = value
end

#hashObject

Generates a hash value for this object.



40734
40735
40736
40737
40738
40739
40740
40741
40742
40743
# File 'lib/ovirtsdk4/types.rb', line 40734

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)


40516
40517
40518
# File 'lib/ovirtsdk4/types.rb', line 40516

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)


40525
40526
40527
# File 'lib/ovirtsdk4/types.rb', line 40525

def id=(value)
  @id = value
end

#instance_typeInstanceType

Returns the value of the instance_type attribute.

Returns:



40534
40535
40536
# File 'lib/ovirtsdk4/types.rb', line 40534

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:



40547
40548
40549
40550
40551
40552
# File 'lib/ovirtsdk4/types.rb', line 40547

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)


40559
40560
40561
# File 'lib/ovirtsdk4/types.rb', line 40559

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)


40568
40569
40570
# File 'lib/ovirtsdk4/types.rb', line 40568

def name=(value)
  @name = value
end

#portInteger

Returns the value of the port attribute.

Returns:

  • (Integer)


40577
40578
40579
# File 'lib/ovirtsdk4/types.rb', line 40577

def port
  @port
end

#port=(value) ⇒ Object

Sets the value of the port attribute.

Parameters:

  • value (Integer)


40586
40587
40588
# File 'lib/ovirtsdk4/types.rb', line 40586

def port=(value)
  @port = value
end

#protocolGraphicsType

Returns the value of the protocol attribute.

Returns:



40595
40596
40597
# File 'lib/ovirtsdk4/types.rb', line 40595

def protocol
  @protocol
end

#protocol=(value) ⇒ Object

Sets the value of the protocol attribute.

Parameters:



40604
40605
40606
# File 'lib/ovirtsdk4/types.rb', line 40604

def protocol=(value)
  @protocol = value
end

#templateTemplate

Returns the value of the template attribute.

Returns:



40613
40614
40615
# File 'lib/ovirtsdk4/types.rb', line 40613

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:



40626
40627
40628
40629
40630
40631
# File 'lib/ovirtsdk4/types.rb', line 40626

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)


40638
40639
40640
# File 'lib/ovirtsdk4/types.rb', line 40638

def tls_port
  @tls_port
end

#tls_port=(value) ⇒ Object

Sets the value of the tls_port attribute.

Parameters:

  • value (Integer)


40647
40648
40649
# File 'lib/ovirtsdk4/types.rb', line 40647

def tls_port=(value)
  @tls_port = value
end

#vmVm

Returns the value of the vm attribute.

Returns:



40656
40657
40658
# File 'lib/ovirtsdk4/types.rb', line 40656

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)


40669
40670
40671
40672
40673
40674
# File 'lib/ovirtsdk4/types.rb', line 40669

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