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.



40326
40327
40328
40329
40330
40331
40332
40333
40334
40335
# File 'lib/ovirtsdk4/types.rb', line 40326

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.



40340
40341
40342
40343
40344
40345
40346
40347
40348
40349
# File 'lib/ovirtsdk4/types.rb', line 40340

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)


40082
40083
40084
# File 'lib/ovirtsdk4/types.rb', line 40082

def address
  @address
end

#address=(value) ⇒ Object

Sets the value of the address attribute.

Parameters:

  • value (String)


40091
40092
40093
# File 'lib/ovirtsdk4/types.rb', line 40091

def address=(value)
  @address = value
end

#commentString

Returns the value of the comment attribute.

Returns:

  • (String)


40100
40101
40102
# File 'lib/ovirtsdk4/types.rb', line 40100

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)


40109
40110
40111
# File 'lib/ovirtsdk4/types.rb', line 40109

def comment=(value)
  @comment = value
end

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)


40118
40119
40120
# File 'lib/ovirtsdk4/types.rb', line 40118

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)


40127
40128
40129
# File 'lib/ovirtsdk4/types.rb', line 40127

def description=(value)
  @description = value
end

#hashObject

Generates a hash value for this object.



40354
40355
40356
40357
40358
40359
40360
40361
40362
40363
# File 'lib/ovirtsdk4/types.rb', line 40354

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)


40136
40137
40138
# File 'lib/ovirtsdk4/types.rb', line 40136

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)


40145
40146
40147
# File 'lib/ovirtsdk4/types.rb', line 40145

def id=(value)
  @id = value
end

#instance_typeInstanceType

Returns the value of the instance_type attribute.

Returns:



40154
40155
40156
# File 'lib/ovirtsdk4/types.rb', line 40154

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:



40167
40168
40169
40170
40171
40172
# File 'lib/ovirtsdk4/types.rb', line 40167

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)


40179
40180
40181
# File 'lib/ovirtsdk4/types.rb', line 40179

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)


40188
40189
40190
# File 'lib/ovirtsdk4/types.rb', line 40188

def name=(value)
  @name = value
end

#portInteger

Returns the value of the port attribute.

Returns:

  • (Integer)


40197
40198
40199
# File 'lib/ovirtsdk4/types.rb', line 40197

def port
  @port
end

#port=(value) ⇒ Object

Sets the value of the port attribute.

Parameters:

  • value (Integer)


40206
40207
40208
# File 'lib/ovirtsdk4/types.rb', line 40206

def port=(value)
  @port = value
end

#protocolGraphicsType

Returns the value of the protocol attribute.

Returns:



40215
40216
40217
# File 'lib/ovirtsdk4/types.rb', line 40215

def protocol
  @protocol
end

#protocol=(value) ⇒ Object

Sets the value of the protocol attribute.

Parameters:



40224
40225
40226
# File 'lib/ovirtsdk4/types.rb', line 40224

def protocol=(value)
  @protocol = value
end

#templateTemplate

Returns the value of the template attribute.

Returns:



40233
40234
40235
# File 'lib/ovirtsdk4/types.rb', line 40233

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:



40246
40247
40248
40249
40250
40251
# File 'lib/ovirtsdk4/types.rb', line 40246

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)


40258
40259
40260
# File 'lib/ovirtsdk4/types.rb', line 40258

def tls_port
  @tls_port
end

#tls_port=(value) ⇒ Object

Sets the value of the tls_port attribute.

Parameters:

  • value (Integer)


40267
40268
40269
# File 'lib/ovirtsdk4/types.rb', line 40267

def tls_port=(value)
  @tls_port = value
end

#vmVm

Returns the value of the vm attribute.

Returns:



40276
40277
40278
# File 'lib/ovirtsdk4/types.rb', line 40276

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)


40289
40290
40291
40292
40293
40294
# File 'lib/ovirtsdk4/types.rb', line 40289

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