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.
19509 19510 19511 19512 19513 19514 19515 19516 |
# File 'lib/ovirtsdk4/types.rb', line 19509 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.
19521 19522 19523 19524 19525 19526 19527 19528 |
# File 'lib/ovirtsdk4/types.rb', line 19521 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.
19305 19306 19307 |
# File 'lib/ovirtsdk4/types.rb', line 19305 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
19314 19315 19316 |
# File 'lib/ovirtsdk4/types.rb', line 19314 def comment=(value) @comment = value end |
#console_user ⇒ Boolean
Returns the value of the console_user
attribute.
19323 19324 19325 |
# File 'lib/ovirtsdk4/types.rb', line 19323 def console_user @console_user end |
#console_user=(value) ⇒ Object
Sets the value of the console_user
attribute.
19332 19333 19334 |
# File 'lib/ovirtsdk4/types.rb', line 19332 def console_user=(value) @console_user = value end |
#description ⇒ String
Returns the value of the description
attribute.
19341 19342 19343 |
# File 'lib/ovirtsdk4/types.rb', line 19341 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
19350 19351 19352 |
# File 'lib/ovirtsdk4/types.rb', line 19350 def description=(value) @description = value end |
#hash ⇒ Object
Generates a hash value for this object.
19533 19534 19535 19536 19537 19538 19539 19540 |
# File 'lib/ovirtsdk4/types.rb', line 19533 def hash super + @console_user.hash + @ip.hash + @protocol.hash + @user.hash + @vm.hash end |
#id ⇒ String
Returns the value of the id
attribute.
19359 19360 19361 |
# File 'lib/ovirtsdk4/types.rb', line 19359 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
19368 19369 19370 |
# File 'lib/ovirtsdk4/types.rb', line 19368 def id=(value) @id = value end |
#ip ⇒ Ip
Returns the value of the ip
attribute.
19377 19378 19379 |
# File 'lib/ovirtsdk4/types.rb', line 19377 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.
19390 19391 19392 19393 19394 19395 |
# File 'lib/ovirtsdk4/types.rb', line 19390 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.
19402 19403 19404 |
# File 'lib/ovirtsdk4/types.rb', line 19402 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
19411 19412 19413 |
# File 'lib/ovirtsdk4/types.rb', line 19411 def name=(value) @name = value end |
#protocol ⇒ String
Returns the value of the protocol
attribute.
19420 19421 19422 |
# File 'lib/ovirtsdk4/types.rb', line 19420 def protocol @protocol end |
#protocol=(value) ⇒ Object
Sets the value of the protocol
attribute.
19429 19430 19431 |
# File 'lib/ovirtsdk4/types.rb', line 19429 def protocol=(value) @protocol = value end |
#user ⇒ User
Returns the value of the user
attribute.
19438 19439 19440 |
# File 'lib/ovirtsdk4/types.rb', line 19438 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.
19451 19452 19453 19454 19455 19456 |
# File 'lib/ovirtsdk4/types.rb', line 19451 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.
19463 19464 19465 |
# File 'lib/ovirtsdk4/types.rb', line 19463 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.
19476 19477 19478 19479 19480 19481 |
# File 'lib/ovirtsdk4/types.rb', line 19476 def vm=(value) if value.is_a?(Hash) value = Vm.new(value) end @vm = value end |