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.



41229
41230
41231
41232
41233
41234
41235
41236
41237
41238
# File 'lib/ovirtsdk4/types.rb', line 41229

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.



41243
41244
41245
41246
41247
41248
41249
41250
41251
41252
# File 'lib/ovirtsdk4/types.rb', line 41243

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)


40985
40986
40987
# File 'lib/ovirtsdk4/types.rb', line 40985

def address
  @address
end

#address=(value) ⇒ Object

Sets the value of the address attribute.

Parameters:

  • value (String)


40994
40995
40996
# File 'lib/ovirtsdk4/types.rb', line 40994

def address=(value)
  @address = value
end

#commentString

Returns the value of the comment attribute.

Returns:

  • (String)


41003
41004
41005
# File 'lib/ovirtsdk4/types.rb', line 41003

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)


41012
41013
41014
# File 'lib/ovirtsdk4/types.rb', line 41012

def comment=(value)
  @comment = value
end

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)


41021
41022
41023
# File 'lib/ovirtsdk4/types.rb', line 41021

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)


41030
41031
41032
# File 'lib/ovirtsdk4/types.rb', line 41030

def description=(value)
  @description = value
end

#hashObject

Generates a hash value for this object.



41257
41258
41259
41260
41261
41262
41263
41264
41265
41266
# File 'lib/ovirtsdk4/types.rb', line 41257

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)


41039
41040
41041
# File 'lib/ovirtsdk4/types.rb', line 41039

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)


41048
41049
41050
# File 'lib/ovirtsdk4/types.rb', line 41048

def id=(value)
  @id = value
end

#instance_typeInstanceType

Returns the value of the instance_type attribute.

Returns:



41057
41058
41059
# File 'lib/ovirtsdk4/types.rb', line 41057

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:



41070
41071
41072
41073
41074
41075
# File 'lib/ovirtsdk4/types.rb', line 41070

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)


41082
41083
41084
# File 'lib/ovirtsdk4/types.rb', line 41082

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)


41091
41092
41093
# File 'lib/ovirtsdk4/types.rb', line 41091

def name=(value)
  @name = value
end

#portInteger

Returns the value of the port attribute.

Returns:

  • (Integer)


41100
41101
41102
# File 'lib/ovirtsdk4/types.rb', line 41100

def port
  @port
end

#port=(value) ⇒ Object

Sets the value of the port attribute.

Parameters:

  • value (Integer)


41109
41110
41111
# File 'lib/ovirtsdk4/types.rb', line 41109

def port=(value)
  @port = value
end

#protocolGraphicsType

Returns the value of the protocol attribute.

Returns:



41118
41119
41120
# File 'lib/ovirtsdk4/types.rb', line 41118

def protocol
  @protocol
end

#protocol=(value) ⇒ Object

Sets the value of the protocol attribute.

Parameters:



41127
41128
41129
# File 'lib/ovirtsdk4/types.rb', line 41127

def protocol=(value)
  @protocol = value
end

#templateTemplate

Returns the value of the template attribute.

Returns:



41136
41137
41138
# File 'lib/ovirtsdk4/types.rb', line 41136

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:



41149
41150
41151
41152
41153
41154
# File 'lib/ovirtsdk4/types.rb', line 41149

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)


41161
41162
41163
# File 'lib/ovirtsdk4/types.rb', line 41161

def tls_port
  @tls_port
end

#tls_port=(value) ⇒ Object

Sets the value of the tls_port attribute.

Parameters:

  • value (Integer)


41170
41171
41172
# File 'lib/ovirtsdk4/types.rb', line 41170

def tls_port=(value)
  @tls_port = value
end

#vmVm

Returns the value of the vm attribute.

Returns:



41179
41180
41181
# File 'lib/ovirtsdk4/types.rb', line 41179

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)


41192
41193
41194
41195
41196
41197
# File 'lib/ovirtsdk4/types.rb', line 41192

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