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
true
ifself
andother
have the same attributes and values. -
#cluster ⇒ Cluster
Returns the value of the
cluster
attribute. -
#cluster=(value) ⇒ Object
Sets the value of the
cluster
attribute. -
#comment ⇒ String
Returns the value of the
comment
attribute. -
#comment=(value) ⇒ Object
Sets the value of the
comment
attribute. -
#data_center ⇒ DataCenter
Returns the value of the
data_center
attribute. -
#data_center=(value) ⇒ Object
Sets the value of the
data_center
attribute. -
#description ⇒ String
Returns the value of the
description
attribute. -
#description=(value) ⇒ Object
Sets the value of the
description
attribute. -
#disk ⇒ Disk
Returns the value of the
disk
attribute. -
#disk=(value) ⇒ Object
Sets the value of the
disk
attribute. -
#group ⇒ Group
Returns the value of the
group
attribute. -
#group=(value) ⇒ Object
Sets the value of the
group
attribute. -
#hash ⇒ Object
Generates a hash value for this object.
-
#host ⇒ Host
Returns the value of the
host
attribute. -
#host=(value) ⇒ Object
Sets the value of the
host
attribute. -
#id ⇒ String
Returns the value of the
id
attribute. -
#id=(value) ⇒ Object
Sets the value of the
id
attribute. -
#initialize(opts = {}) ⇒ Permission
constructor
Creates a new instance of the Permission class.
-
#name ⇒ String
Returns the value of the
name
attribute. -
#name=(value) ⇒ Object
Sets the value of the
name
attribute. -
#role ⇒ Role
Returns the value of the
role
attribute. -
#role=(value) ⇒ Object
Sets the value of the
role
attribute. -
#storage_domain ⇒ StorageDomain
Returns the value of the
storage_domain
attribute. -
#storage_domain=(value) ⇒ Object
Sets the value of the
storage_domain
attribute. -
#template ⇒ Template
Returns the value of the
template
attribute. -
#template=(value) ⇒ Object
Sets the value of the
template
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. -
#vm_pool ⇒ VmPool
Returns the value of the
vm_pool
attribute. -
#vm_pool=(value) ⇒ Object
Sets the value of the
vm_pool
attribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ Permission
Creates a new instance of the OvirtSDK4::Permission class.
13653 13654 13655 13656 13657 13658 13659 13660 13661 13662 13663 13664 13665 13666 |
# File 'lib/ovirtsdk4/types.rb', line 13653 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.
13671 13672 13673 13674 13675 13676 13677 13678 13679 13680 13681 13682 13683 13684 |
# File 'lib/ovirtsdk4/types.rb', line 13671 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.
13273 13274 13275 |
# File 'lib/ovirtsdk4/types.rb', line 13273 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.
13286 13287 13288 13289 13290 13291 |
# File 'lib/ovirtsdk4/types.rb', line 13286 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.
13298 13299 13300 |
# File 'lib/ovirtsdk4/types.rb', line 13298 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
13307 13308 13309 |
# File 'lib/ovirtsdk4/types.rb', line 13307 def comment=(value) @comment = value end |
#data_center ⇒ DataCenter
Returns the value of the data_center
attribute.
13316 13317 13318 |
# File 'lib/ovirtsdk4/types.rb', line 13316 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.
13329 13330 13331 13332 13333 13334 |
# File 'lib/ovirtsdk4/types.rb', line 13329 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.
13341 13342 13343 |
# File 'lib/ovirtsdk4/types.rb', line 13341 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
13350 13351 13352 |
# File 'lib/ovirtsdk4/types.rb', line 13350 def description=(value) @description = value end |
#disk ⇒ Disk
Returns the value of the disk
attribute.
13359 13360 13361 |
# File 'lib/ovirtsdk4/types.rb', line 13359 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.
13372 13373 13374 13375 13376 13377 |
# File 'lib/ovirtsdk4/types.rb', line 13372 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.
13384 13385 13386 |
# File 'lib/ovirtsdk4/types.rb', line 13384 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.
13397 13398 13399 13400 13401 13402 |
# File 'lib/ovirtsdk4/types.rb', line 13397 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.
13689 13690 13691 13692 13693 13694 13695 13696 13697 13698 13699 13700 13701 13702 |
# File 'lib/ovirtsdk4/types.rb', line 13689 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.
13409 13410 13411 |
# File 'lib/ovirtsdk4/types.rb', line 13409 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.
13422 13423 13424 13425 13426 13427 |
# File 'lib/ovirtsdk4/types.rb', line 13422 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.
13434 13435 13436 |
# File 'lib/ovirtsdk4/types.rb', line 13434 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
13443 13444 13445 |
# File 'lib/ovirtsdk4/types.rb', line 13443 def id=(value) @id = value end |
#name ⇒ String
Returns the value of the name
attribute.
13452 13453 13454 |
# File 'lib/ovirtsdk4/types.rb', line 13452 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
13461 13462 13463 |
# File 'lib/ovirtsdk4/types.rb', line 13461 def name=(value) @name = value end |
#role ⇒ Role
Returns the value of the role
attribute.
13470 13471 13472 |
# File 'lib/ovirtsdk4/types.rb', line 13470 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.
13483 13484 13485 13486 13487 13488 |
# File 'lib/ovirtsdk4/types.rb', line 13483 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.
13495 13496 13497 |
# File 'lib/ovirtsdk4/types.rb', line 13495 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.
13508 13509 13510 13511 13512 13513 |
# File 'lib/ovirtsdk4/types.rb', line 13508 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.
13520 13521 13522 |
# File 'lib/ovirtsdk4/types.rb', line 13520 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.
13533 13534 13535 13536 13537 13538 |
# File 'lib/ovirtsdk4/types.rb', line 13533 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.
13545 13546 13547 |
# File 'lib/ovirtsdk4/types.rb', line 13545 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.
13558 13559 13560 13561 13562 13563 |
# File 'lib/ovirtsdk4/types.rb', line 13558 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.
13570 13571 13572 |
# File 'lib/ovirtsdk4/types.rb', line 13570 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.
13583 13584 13585 13586 13587 13588 |
# File 'lib/ovirtsdk4/types.rb', line 13583 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.
13595 13596 13597 |
# File 'lib/ovirtsdk4/types.rb', line 13595 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.
13608 13609 13610 13611 13612 13613 |
# File 'lib/ovirtsdk4/types.rb', line 13608 def vm_pool=(value) if value.is_a?(Hash) value = VmPool.new(value) end @vm_pool = value end |