Class: OvirtSDK4::Session
- Inherits:
-
Identified
- Object
- Struct
- Identified
- OvirtSDK4::Session
- Defined in:
- lib/ovirtsdk4/types.rb,
lib/ovirtsdk4/types.rb
Instance Method Summary collapse
-
#==(other) ⇒ Object
Returns
true
ifself
andother
have the same attributes and values. -
#comment ⇒ String
Returns the value of the
comment
attribute. -
#comment=(value) ⇒ Object
Sets the value of the
comment
attribute. -
#console_user ⇒ Boolean
Returns the value of the
console_user
attribute. -
#console_user=(value) ⇒ Object
Sets the value of the
console_user
attribute. -
#description ⇒ String
Returns the value of the
description
attribute. -
#description=(value) ⇒ Object
Sets the value of the
description
attribute. -
#hash ⇒ Object
Generates a hash value for this object.
-
#id ⇒ String
Returns the value of the
id
attribute. -
#id=(value) ⇒ Object
Sets the value of the
id
attribute. -
#initialize(opts = {}) ⇒ Session
constructor
Creates a new instance of the Session class.
-
#ip ⇒ Ip
Returns the value of the
ip
attribute. -
#ip=(value) ⇒ Object
Sets the value of the
ip
attribute. -
#name ⇒ String
Returns the value of the
name
attribute. -
#name=(value) ⇒ Object
Sets the value of the
name
attribute. -
#protocol ⇒ String
Returns the value of the
protocol
attribute. -
#protocol=(value) ⇒ Object
Sets the value of the
protocol
attribute. -
#user ⇒ User
Returns the value of the
user
attribute. -
#user=(value) ⇒ Object
Sets the value of the
user
attribute. -
#vm ⇒ Vm
Returns the value of the
vm
attribute. -
#vm=(value) ⇒ Object
Sets the value of the
vm
attribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ Session
Creates a new instance of the OvirtSDK4::Session class.
18507 18508 18509 18510 18511 18512 18513 18514 |
# File 'lib/ovirtsdk4/types.rb', line 18507 def initialize(opts = {}) super(opts) self.console_user = opts[:console_user] self.ip = opts[:ip] self.protocol = opts[:protocol] self.user = opts[:user] self.vm = opts[:vm] end |
Instance Method Details
#==(other) ⇒ Object
Returns true
if self
and other
have the same attributes and values.
18519 18520 18521 18522 18523 18524 18525 18526 |
# File 'lib/ovirtsdk4/types.rb', line 18519 def ==(other) super && @console_user == other.console_user && @ip == other.ip && @protocol == other.protocol && @user == other.user && @vm == other.vm end |
#comment ⇒ String
Returns the value of the comment
attribute.
18303 18304 18305 |
# File 'lib/ovirtsdk4/types.rb', line 18303 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
18312 18313 18314 |
# File 'lib/ovirtsdk4/types.rb', line 18312 def comment=(value) @comment = value end |
#console_user ⇒ Boolean
Returns the value of the console_user
attribute.
18321 18322 18323 |
# File 'lib/ovirtsdk4/types.rb', line 18321 def console_user @console_user end |
#console_user=(value) ⇒ Object
Sets the value of the console_user
attribute.
18330 18331 18332 |
# File 'lib/ovirtsdk4/types.rb', line 18330 def console_user=(value) @console_user = value end |
#description ⇒ String
Returns the value of the description
attribute.
18339 18340 18341 |
# File 'lib/ovirtsdk4/types.rb', line 18339 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
18348 18349 18350 |
# File 'lib/ovirtsdk4/types.rb', line 18348 def description=(value) @description = value end |
#hash ⇒ Object
Generates a hash value for this object.
18531 18532 18533 18534 18535 18536 18537 18538 |
# File 'lib/ovirtsdk4/types.rb', line 18531 def hash super + @console_user.hash + @ip.hash + @protocol.hash + @user.hash + @vm.hash end |
#id ⇒ String
Returns the value of the id
attribute.
18357 18358 18359 |
# File 'lib/ovirtsdk4/types.rb', line 18357 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
18366 18367 18368 |
# File 'lib/ovirtsdk4/types.rb', line 18366 def id=(value) @id = value end |
#ip ⇒ Ip
Returns the value of the ip
attribute.
18375 18376 18377 |
# File 'lib/ovirtsdk4/types.rb', line 18375 def ip @ip end |
#ip=(value) ⇒ Object
Sets the value of the ip
attribute.
The value
parameter can be an instance of Ip 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.
18388 18389 18390 18391 18392 18393 |
# File 'lib/ovirtsdk4/types.rb', line 18388 def ip=(value) if value.is_a?(Hash) value = Ip.new(value) end @ip = value end |
#name ⇒ String
Returns the value of the name
attribute.
18400 18401 18402 |
# File 'lib/ovirtsdk4/types.rb', line 18400 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
18409 18410 18411 |
# File 'lib/ovirtsdk4/types.rb', line 18409 def name=(value) @name = value end |
#protocol ⇒ String
Returns the value of the protocol
attribute.
18418 18419 18420 |
# File 'lib/ovirtsdk4/types.rb', line 18418 def protocol @protocol end |
#protocol=(value) ⇒ Object
Sets the value of the protocol
attribute.
18427 18428 18429 |
# File 'lib/ovirtsdk4/types.rb', line 18427 def protocol=(value) @protocol = value end |
#user ⇒ User
Returns the value of the user
attribute.
18436 18437 18438 |
# File 'lib/ovirtsdk4/types.rb', line 18436 def user @user end |
#user=(value) ⇒ Object
Sets the value of the user
attribute.
The value
parameter can be an instance of User 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.
18449 18450 18451 18452 18453 18454 |
# File 'lib/ovirtsdk4/types.rb', line 18449 def user=(value) if value.is_a?(Hash) value = User.new(value) end @user = value end |
#vm ⇒ Vm
Returns the value of the vm
attribute.
18461 18462 18463 |
# File 'lib/ovirtsdk4/types.rb', line 18461 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.
18474 18475 18476 18477 18478 18479 |
# File 'lib/ovirtsdk4/types.rb', line 18474 def vm=(value) if value.is_a?(Hash) value = Vm.new(value) end @vm = value end |