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.
13607 13608 13609 13610 13611 13612 13613 13614 13615 13616 13617 13618 13619 13620 |
# File 'lib/ovirtsdk4/types.rb', line 13607 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.
13625 13626 13627 13628 13629 13630 13631 13632 13633 13634 13635 13636 13637 13638 |
# File 'lib/ovirtsdk4/types.rb', line 13625 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.
13227 13228 13229 |
# File 'lib/ovirtsdk4/types.rb', line 13227 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.
13240 13241 13242 13243 13244 13245 |
# File 'lib/ovirtsdk4/types.rb', line 13240 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.
13252 13253 13254 |
# File 'lib/ovirtsdk4/types.rb', line 13252 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
13261 13262 13263 |
# File 'lib/ovirtsdk4/types.rb', line 13261 def comment=(value) @comment = value end |
#data_center ⇒ DataCenter
Returns the value of the data_center
attribute.
13270 13271 13272 |
# File 'lib/ovirtsdk4/types.rb', line 13270 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.
13283 13284 13285 13286 13287 13288 |
# File 'lib/ovirtsdk4/types.rb', line 13283 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.
13295 13296 13297 |
# File 'lib/ovirtsdk4/types.rb', line 13295 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
13304 13305 13306 |
# File 'lib/ovirtsdk4/types.rb', line 13304 def description=(value) @description = value end |
#disk ⇒ Disk
Returns the value of the disk
attribute.
13313 13314 13315 |
# File 'lib/ovirtsdk4/types.rb', line 13313 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.
13326 13327 13328 13329 13330 13331 |
# File 'lib/ovirtsdk4/types.rb', line 13326 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.
13338 13339 13340 |
# File 'lib/ovirtsdk4/types.rb', line 13338 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.
13351 13352 13353 13354 13355 13356 |
# File 'lib/ovirtsdk4/types.rb', line 13351 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.
13643 13644 13645 13646 13647 13648 13649 13650 13651 13652 13653 13654 13655 13656 |
# File 'lib/ovirtsdk4/types.rb', line 13643 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.
13363 13364 13365 |
# File 'lib/ovirtsdk4/types.rb', line 13363 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.
13376 13377 13378 13379 13380 13381 |
# File 'lib/ovirtsdk4/types.rb', line 13376 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.
13388 13389 13390 |
# File 'lib/ovirtsdk4/types.rb', line 13388 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
13397 13398 13399 |
# File 'lib/ovirtsdk4/types.rb', line 13397 def id=(value) @id = value end |
#name ⇒ String
Returns the value of the name
attribute.
13406 13407 13408 |
# File 'lib/ovirtsdk4/types.rb', line 13406 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
13415 13416 13417 |
# File 'lib/ovirtsdk4/types.rb', line 13415 def name=(value) @name = value end |
#role ⇒ Role
Returns the value of the role
attribute.
13424 13425 13426 |
# File 'lib/ovirtsdk4/types.rb', line 13424 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.
13437 13438 13439 13440 13441 13442 |
# File 'lib/ovirtsdk4/types.rb', line 13437 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.
13449 13450 13451 |
# File 'lib/ovirtsdk4/types.rb', line 13449 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.
13462 13463 13464 13465 13466 13467 |
# File 'lib/ovirtsdk4/types.rb', line 13462 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.
13474 13475 13476 |
# File 'lib/ovirtsdk4/types.rb', line 13474 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.
13487 13488 13489 13490 13491 13492 |
# File 'lib/ovirtsdk4/types.rb', line 13487 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.
13499 13500 13501 |
# File 'lib/ovirtsdk4/types.rb', line 13499 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.
13512 13513 13514 13515 13516 13517 |
# File 'lib/ovirtsdk4/types.rb', line 13512 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.
13524 13525 13526 |
# File 'lib/ovirtsdk4/types.rb', line 13524 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.
13537 13538 13539 13540 13541 13542 |
# File 'lib/ovirtsdk4/types.rb', line 13537 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.
13549 13550 13551 |
# File 'lib/ovirtsdk4/types.rb', line 13549 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.
13562 13563 13564 13565 13566 13567 |
# File 'lib/ovirtsdk4/types.rb', line 13562 def vm_pool=(value) if value.is_a?(Hash) value = VmPool.new(value) end @vm_pool = value end |