Class: OvirtSDK4::Permission

Inherits:
Identified show all
Defined in:
lib/ovirtsdk4/types.rb,
lib/ovirtsdk4/types.rb

Instance Method Summary collapse

Methods included from Type

#dig, #href, #href=

Constructor Details

#initialize(opts = {}) ⇒ Permission

Creates a new instance of the OvirtSDK4::Permission class.

Parameters:

  • opts (Hash) (defaults to: {})

    A hash containing the attributes of the object. The keys of the hash should be symbols corresponding to the names of the attributes. The values of the hash should be the values of the attributes.

Options Hash (opts):

  • :cluster (Cluster, Hash)

    The value of attribute cluster.

  • :comment (String)

    The value of attribute comment.

  • :data_center (DataCenter, Hash)

    The value of attribute data_center.

  • :description (String)

    The value of attribute description.

  • :disk (Disk, Hash)

    The value of attribute disk.

  • :group (Group, Hash)

    The value of attribute group.

  • :host (Host, Hash)

    The value of attribute host.

  • :id (String)

    The value of attribute id.

  • :name (String)

    The value of attribute name.

  • :role (Role, Hash)

    The value of attribute role.

  • :storage_domain (StorageDomain, Hash)

    The value of attribute storage_domain.

  • :template (Template, Hash)

    The value of attribute template.

  • :user (User, Hash)

    The value of attribute user.

  • :vm (Vm, Hash)

    The value of attribute vm.

  • :vm_pool (VmPool, Hash)

    The value of attribute vm_pool.



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

#clusterCluster

Returns the value of the cluster attribute.

Returns:



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.

Parameters:



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

#commentString

Returns the value of the comment attribute.

Returns:

  • (String)


14107
14108
14109
# File 'lib/ovirtsdk4/types.rb', line 14107

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)


14116
14117
14118
# File 'lib/ovirtsdk4/types.rb', line 14116

def comment=(value)
  @comment = value
end

#data_centerDataCenter

Returns the value of the data_center attribute.

Returns:



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.

Parameters:



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

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)


14150
14151
14152
# File 'lib/ovirtsdk4/types.rb', line 14150

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)


14159
14160
14161
# File 'lib/ovirtsdk4/types.rb', line 14159

def description=(value)
  @description = value
end

#diskDisk

Returns the value of the disk attribute.

Returns:



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.

Parameters:

  • value (Disk, Hash)


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

#groupGroup

Returns the value of the group attribute.

Returns:



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.

Parameters:



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

#hashObject

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

#hostHost

Returns the value of the host attribute.

Returns:



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.

Parameters:

  • value (Host, Hash)


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

#idString

Returns the value of the id attribute.

Returns:

  • (String)


14243
14244
14245
# File 'lib/ovirtsdk4/types.rb', line 14243

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)


14252
14253
14254
# File 'lib/ovirtsdk4/types.rb', line 14252

def id=(value)
  @id = value
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)


14261
14262
14263
# File 'lib/ovirtsdk4/types.rb', line 14261

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)


14270
14271
14272
# File 'lib/ovirtsdk4/types.rb', line 14270

def name=(value)
  @name = value
end

#roleRole

Returns the value of the role attribute.

Returns:



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.

Parameters:

  • value (Role, Hash)


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_domainStorageDomain

Returns the value of the storage_domain attribute.

Returns:



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.

Parameters:



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

#templateTemplate

Returns the value of the template attribute.

Returns:



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.

Parameters:



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

#userUser

Returns the value of the user attribute.

Returns:



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.

Parameters:

  • value (User, Hash)


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

#vmVm

Returns the value of the vm attribute.

Returns:



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.

Parameters:

  • value (Vm, Hash)


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_poolVmPool

Returns the value of the vm_pool attribute.

Returns:



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.

Parameters:



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