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.
18779 18780 18781 18782 18783 18784 18785 18786 |
# File 'lib/ovirtsdk4/types.rb', line 18779 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.
18791 18792 18793 18794 18795 18796 18797 18798 |
# File 'lib/ovirtsdk4/types.rb', line 18791 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.
18575 18576 18577 |
# File 'lib/ovirtsdk4/types.rb', line 18575 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
18584 18585 18586 |
# File 'lib/ovirtsdk4/types.rb', line 18584 def comment=(value) @comment = value end |
#console_user ⇒ Boolean
Returns the value of the console_user
attribute.
18593 18594 18595 |
# File 'lib/ovirtsdk4/types.rb', line 18593 def console_user @console_user end |
#console_user=(value) ⇒ Object
Sets the value of the console_user
attribute.
18602 18603 18604 |
# File 'lib/ovirtsdk4/types.rb', line 18602 def console_user=(value) @console_user = value end |
#description ⇒ String
Returns the value of the description
attribute.
18611 18612 18613 |
# File 'lib/ovirtsdk4/types.rb', line 18611 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
18620 18621 18622 |
# File 'lib/ovirtsdk4/types.rb', line 18620 def description=(value) @description = value end |
#hash ⇒ Object
Generates a hash value for this object.
18803 18804 18805 18806 18807 18808 18809 18810 |
# File 'lib/ovirtsdk4/types.rb', line 18803 def hash super + @console_user.hash + @ip.hash + @protocol.hash + @user.hash + @vm.hash end |
#id ⇒ String
Returns the value of the id
attribute.
18629 18630 18631 |
# File 'lib/ovirtsdk4/types.rb', line 18629 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
18638 18639 18640 |
# File 'lib/ovirtsdk4/types.rb', line 18638 def id=(value) @id = value end |
#ip ⇒ Ip
Returns the value of the ip
attribute.
18647 18648 18649 |
# File 'lib/ovirtsdk4/types.rb', line 18647 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.
18660 18661 18662 18663 18664 18665 |
# File 'lib/ovirtsdk4/types.rb', line 18660 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.
18672 18673 18674 |
# File 'lib/ovirtsdk4/types.rb', line 18672 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
18681 18682 18683 |
# File 'lib/ovirtsdk4/types.rb', line 18681 def name=(value) @name = value end |
#protocol ⇒ String
Returns the value of the protocol
attribute.
18690 18691 18692 |
# File 'lib/ovirtsdk4/types.rb', line 18690 def protocol @protocol end |
#protocol=(value) ⇒ Object
Sets the value of the protocol
attribute.
18699 18700 18701 |
# File 'lib/ovirtsdk4/types.rb', line 18699 def protocol=(value) @protocol = value end |
#user ⇒ User
Returns the value of the user
attribute.
18708 18709 18710 |
# File 'lib/ovirtsdk4/types.rb', line 18708 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.
18721 18722 18723 18724 18725 18726 |
# File 'lib/ovirtsdk4/types.rb', line 18721 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.
18733 18734 18735 |
# File 'lib/ovirtsdk4/types.rb', line 18733 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.
18746 18747 18748 18749 18750 18751 |
# File 'lib/ovirtsdk4/types.rb', line 18746 def vm=(value) if value.is_a?(Hash) value = Vm.new(value) end @vm = value end |