Class: OvirtSDK4::Permission
- Inherits:
-
Identified
- Object
- Struct
- Identified
- OvirtSDK4::Permission
- Defined in:
- lib/ovirtsdk4/types.rb,
lib/ovirtsdk4/types.rb
Instance Method Summary collapse
-
#==(other) ⇒ Object
Returns
trueifselfandotherhave the same attributes and values. -
#cluster ⇒ Cluster
Returns the value of the
clusterattribute. -
#cluster=(value) ⇒ Object
Sets the value of the
clusterattribute. -
#comment ⇒ String
Returns the value of the
commentattribute. -
#comment=(value) ⇒ Object
Sets the value of the
commentattribute. -
#data_center ⇒ DataCenter
Returns the value of the
data_centerattribute. -
#data_center=(value) ⇒ Object
Sets the value of the
data_centerattribute. -
#description ⇒ String
Returns the value of the
descriptionattribute. -
#description=(value) ⇒ Object
Sets the value of the
descriptionattribute. -
#disk ⇒ Disk
Returns the value of the
diskattribute. -
#disk=(value) ⇒ Object
Sets the value of the
diskattribute. -
#group ⇒ Group
Returns the value of the
groupattribute. -
#group=(value) ⇒ Object
Sets the value of the
groupattribute. -
#hash ⇒ Object
Generates a hash value for this object.
-
#host ⇒ Host
Returns the value of the
hostattribute. -
#host=(value) ⇒ Object
Sets the value of the
hostattribute. -
#id ⇒ String
Returns the value of the
idattribute. -
#id=(value) ⇒ Object
Sets the value of the
idattribute. -
#initialize(opts = {}) ⇒ Permission
constructor
Creates a new instance of the Permission class.
-
#name ⇒ String
Returns the value of the
nameattribute. -
#name=(value) ⇒ Object
Sets the value of the
nameattribute. -
#role ⇒ Role
Returns the value of the
roleattribute. -
#role=(value) ⇒ Object
Sets the value of the
roleattribute. -
#storage_domain ⇒ StorageDomain
Returns the value of the
storage_domainattribute. -
#storage_domain=(value) ⇒ Object
Sets the value of the
storage_domainattribute. -
#template ⇒ Template
Returns the value of the
templateattribute. -
#template=(value) ⇒ Object
Sets the value of the
templateattribute. -
#user ⇒ User
Returns the value of the
userattribute. -
#user=(value) ⇒ Object
Sets the value of the
userattribute. -
#vm ⇒ Vm
Returns the value of the
vmattribute. -
#vm=(value) ⇒ Object
Sets the value of the
vmattribute. -
#vm_pool ⇒ VmPool
Returns the value of the
vm_poolattribute. -
#vm_pool=(value) ⇒ Object
Sets the value of the
vm_poolattribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ Permission
Creates a new instance of the OvirtSDK4::Permission class.
14732 14733 14734 14735 14736 14737 14738 14739 14740 14741 14742 14743 14744 14745 |
# File 'lib/ovirtsdk4/types.rb', line 14732 def initialize(opts = {}) super(opts) self.cluster = opts[:cluster] self.data_center = opts[:data_center] self.disk = opts[:disk] self.group = opts[:group] self.host = opts[:host] self.role = opts[:role] self.storage_domain = opts[:storage_domain] self.template = opts[:template] self.user = opts[:user] self.vm = opts[:vm] self.vm_pool = opts[:vm_pool] end |
Instance Method Details
#==(other) ⇒ Object
Returns true if self and other have the same attributes and values.
14750 14751 14752 14753 14754 14755 14756 14757 14758 14759 14760 14761 14762 14763 |
# File 'lib/ovirtsdk4/types.rb', line 14750 def ==(other) super && @cluster == other.cluster && @data_center == other.data_center && @disk == other.disk && @group == other.group && @host == other.host && @role == other.role && @storage_domain == other.storage_domain && @template == other.template && @user == other.user && @vm == other.vm && @vm_pool == other.vm_pool end |
#cluster ⇒ Cluster
Returns the value of the cluster attribute.
14352 14353 14354 |
# File 'lib/ovirtsdk4/types.rb', line 14352 def cluster @cluster end |
#cluster=(value) ⇒ Object
Sets the value of the cluster attribute.
The value parameter can be an instance of Cluster 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.
14365 14366 14367 14368 14369 14370 |
# File 'lib/ovirtsdk4/types.rb', line 14365 def cluster=(value) if value.is_a?(Hash) value = Cluster.new(value) end @cluster = value end |
#comment ⇒ String
Returns the value of the comment attribute.
14377 14378 14379 |
# File 'lib/ovirtsdk4/types.rb', line 14377 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment attribute.
14386 14387 14388 |
# File 'lib/ovirtsdk4/types.rb', line 14386 def comment=(value) @comment = value end |
#data_center ⇒ DataCenter
Returns the value of the data_center attribute.
14395 14396 14397 |
# File 'lib/ovirtsdk4/types.rb', line 14395 def data_center @data_center end |
#data_center=(value) ⇒ Object
Sets the value of the data_center attribute.
The value parameter can be an instance of DataCenter 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.
14408 14409 14410 14411 14412 14413 |
# File 'lib/ovirtsdk4/types.rb', line 14408 def data_center=(value) if value.is_a?(Hash) value = DataCenter.new(value) end @data_center = value end |
#description ⇒ String
Returns the value of the description attribute.
14420 14421 14422 |
# File 'lib/ovirtsdk4/types.rb', line 14420 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description attribute.
14429 14430 14431 |
# File 'lib/ovirtsdk4/types.rb', line 14429 def description=(value) @description = value end |
#disk ⇒ Disk
Returns the value of the disk attribute.
14438 14439 14440 |
# File 'lib/ovirtsdk4/types.rb', line 14438 def disk @disk end |
#disk=(value) ⇒ Object
Sets the value of the disk attribute.
The value parameter can be an instance of Disk 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.
14451 14452 14453 14454 14455 14456 |
# File 'lib/ovirtsdk4/types.rb', line 14451 def disk=(value) if value.is_a?(Hash) value = Disk.new(value) end @disk = value end |
#group ⇒ Group
Returns the value of the group attribute.
14463 14464 14465 |
# File 'lib/ovirtsdk4/types.rb', line 14463 def group @group end |
#group=(value) ⇒ Object
Sets the value of the group attribute.
The value parameter can be an instance of Group 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.
14476 14477 14478 14479 14480 14481 |
# File 'lib/ovirtsdk4/types.rb', line 14476 def group=(value) if value.is_a?(Hash) value = Group.new(value) end @group = value end |
#hash ⇒ Object
Generates a hash value for this object.
14768 14769 14770 14771 14772 14773 14774 14775 14776 14777 14778 14779 14780 14781 |
# File 'lib/ovirtsdk4/types.rb', line 14768 def hash super + @cluster.hash + @data_center.hash + @disk.hash + @group.hash + @host.hash + @role.hash + @storage_domain.hash + @template.hash + @user.hash + @vm.hash + @vm_pool.hash end |
#host ⇒ Host
Returns the value of the host attribute.
14488 14489 14490 |
# File 'lib/ovirtsdk4/types.rb', line 14488 def host @host end |
#host=(value) ⇒ Object
Sets the value of the host attribute.
The value parameter can be an instance of Host 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.
14501 14502 14503 14504 14505 14506 |
# File 'lib/ovirtsdk4/types.rb', line 14501 def host=(value) if value.is_a?(Hash) value = Host.new(value) end @host = value end |
#id ⇒ String
Returns the value of the id attribute.
14513 14514 14515 |
# File 'lib/ovirtsdk4/types.rb', line 14513 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id attribute.
14522 14523 14524 |
# File 'lib/ovirtsdk4/types.rb', line 14522 def id=(value) @id = value end |
#name ⇒ String
Returns the value of the name attribute.
14531 14532 14533 |
# File 'lib/ovirtsdk4/types.rb', line 14531 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name attribute.
14540 14541 14542 |
# File 'lib/ovirtsdk4/types.rb', line 14540 def name=(value) @name = value end |
#role ⇒ Role
Returns the value of the role attribute.
14549 14550 14551 |
# File 'lib/ovirtsdk4/types.rb', line 14549 def role @role end |
#role=(value) ⇒ Object
Sets the value of the role attribute.
The value parameter can be an instance of Role 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.
14562 14563 14564 14565 14566 14567 |
# File 'lib/ovirtsdk4/types.rb', line 14562 def role=(value) if value.is_a?(Hash) value = Role.new(value) end @role = value end |
#storage_domain ⇒ StorageDomain
Returns the value of the storage_domain attribute.
14574 14575 14576 |
# File 'lib/ovirtsdk4/types.rb', line 14574 def storage_domain @storage_domain end |
#storage_domain=(value) ⇒ Object
Sets the value of the storage_domain attribute.
The value parameter can be an instance of StorageDomain 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.
14587 14588 14589 14590 14591 14592 |
# File 'lib/ovirtsdk4/types.rb', line 14587 def storage_domain=(value) if value.is_a?(Hash) value = StorageDomain.new(value) end @storage_domain = value end |
#template ⇒ Template
Returns the value of the template attribute.
14599 14600 14601 |
# File 'lib/ovirtsdk4/types.rb', line 14599 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.
14612 14613 14614 14615 14616 14617 |
# File 'lib/ovirtsdk4/types.rb', line 14612 def template=(value) if value.is_a?(Hash) value = Template.new(value) end @template = value end |
#user ⇒ User
Returns the value of the user attribute.
14624 14625 14626 |
# File 'lib/ovirtsdk4/types.rb', line 14624 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.
14637 14638 14639 14640 14641 14642 |
# File 'lib/ovirtsdk4/types.rb', line 14637 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.
14649 14650 14651 |
# File 'lib/ovirtsdk4/types.rb', line 14649 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.
14662 14663 14664 14665 14666 14667 |
# File 'lib/ovirtsdk4/types.rb', line 14662 def vm=(value) if value.is_a?(Hash) value = Vm.new(value) end @vm = value end |
#vm_pool ⇒ VmPool
Returns the value of the vm_pool attribute.
14674 14675 14676 |
# File 'lib/ovirtsdk4/types.rb', line 14674 def vm_pool @vm_pool end |
#vm_pool=(value) ⇒ Object
Sets the value of the vm_pool attribute.
The value parameter can be an instance of VmPool 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.
14687 14688 14689 14690 14691 14692 |
# File 'lib/ovirtsdk4/types.rb', line 14687 def vm_pool=(value) if value.is_a?(Hash) value = VmPool.new(value) end @vm_pool = value end |