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.
14462 14463 14464 14465 14466 14467 14468 14469 14470 14471 14472 14473 14474 14475 |
# File 'lib/ovirtsdk4/types.rb', line 14462 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.
14480 14481 14482 14483 14484 14485 14486 14487 14488 14489 14490 14491 14492 14493 |
# File 'lib/ovirtsdk4/types.rb', line 14480 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.
14082 14083 14084 |
# File 'lib/ovirtsdk4/types.rb', line 14082 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.
14095 14096 14097 14098 14099 14100 |
# File 'lib/ovirtsdk4/types.rb', line 14095 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.
14107 14108 14109 |
# File 'lib/ovirtsdk4/types.rb', line 14107 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
14116 14117 14118 |
# File 'lib/ovirtsdk4/types.rb', line 14116 def comment=(value) @comment = value end |
#data_center ⇒ DataCenter
Returns the value of the data_center
attribute.
14125 14126 14127 |
# File 'lib/ovirtsdk4/types.rb', line 14125 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.
14138 14139 14140 14141 14142 14143 |
# File 'lib/ovirtsdk4/types.rb', line 14138 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.
14150 14151 14152 |
# File 'lib/ovirtsdk4/types.rb', line 14150 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
14159 14160 14161 |
# File 'lib/ovirtsdk4/types.rb', line 14159 def description=(value) @description = value end |
#disk ⇒ Disk
Returns the value of the disk
attribute.
14168 14169 14170 |
# File 'lib/ovirtsdk4/types.rb', line 14168 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.
14181 14182 14183 14184 14185 14186 |
# File 'lib/ovirtsdk4/types.rb', line 14181 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.
14193 14194 14195 |
# File 'lib/ovirtsdk4/types.rb', line 14193 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.
14206 14207 14208 14209 14210 14211 |
# File 'lib/ovirtsdk4/types.rb', line 14206 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.
14498 14499 14500 14501 14502 14503 14504 14505 14506 14507 14508 14509 14510 14511 |
# File 'lib/ovirtsdk4/types.rb', line 14498 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.
14218 14219 14220 |
# File 'lib/ovirtsdk4/types.rb', line 14218 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.
14231 14232 14233 14234 14235 14236 |
# File 'lib/ovirtsdk4/types.rb', line 14231 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.
14243 14244 14245 |
# File 'lib/ovirtsdk4/types.rb', line 14243 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
14252 14253 14254 |
# File 'lib/ovirtsdk4/types.rb', line 14252 def id=(value) @id = value end |
#name ⇒ String
Returns the value of the name
attribute.
14261 14262 14263 |
# File 'lib/ovirtsdk4/types.rb', line 14261 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
14270 14271 14272 |
# File 'lib/ovirtsdk4/types.rb', line 14270 def name=(value) @name = value end |
#role ⇒ Role
Returns the value of the role
attribute.
14279 14280 14281 |
# File 'lib/ovirtsdk4/types.rb', line 14279 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.
14292 14293 14294 14295 14296 14297 |
# File 'lib/ovirtsdk4/types.rb', line 14292 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.
14304 14305 14306 |
# File 'lib/ovirtsdk4/types.rb', line 14304 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.
14317 14318 14319 14320 14321 14322 |
# File 'lib/ovirtsdk4/types.rb', line 14317 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.
14329 14330 14331 |
# File 'lib/ovirtsdk4/types.rb', line 14329 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.
14342 14343 14344 14345 14346 14347 |
# File 'lib/ovirtsdk4/types.rb', line 14342 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.
14354 14355 14356 |
# File 'lib/ovirtsdk4/types.rb', line 14354 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.
14367 14368 14369 14370 14371 14372 |
# File 'lib/ovirtsdk4/types.rb', line 14367 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.
14379 14380 14381 |
# File 'lib/ovirtsdk4/types.rb', line 14379 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.
14392 14393 14394 14395 14396 14397 |
# File 'lib/ovirtsdk4/types.rb', line 14392 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.
14404 14405 14406 |
# File 'lib/ovirtsdk4/types.rb', line 14404 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.
14417 14418 14419 14420 14421 14422 |
# File 'lib/ovirtsdk4/types.rb', line 14417 def vm_pool=(value) if value.is_a?(Hash) value = VmPool.new(value) end @vm_pool = value end |