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.



13755
13756
13757
13758
13759
13760
13761
13762
13763
13764
13765
13766
13767
13768
# File 'lib/ovirtsdk4/types.rb', line 13755

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.



13773
13774
13775
13776
13777
13778
13779
13780
13781
13782
13783
13784
13785
13786
# File 'lib/ovirtsdk4/types.rb', line 13773

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:



13375
13376
13377
# File 'lib/ovirtsdk4/types.rb', line 13375

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:



13388
13389
13390
13391
13392
13393
# File 'lib/ovirtsdk4/types.rb', line 13388

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)


13400
13401
13402
# File 'lib/ovirtsdk4/types.rb', line 13400

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)


13409
13410
13411
# File 'lib/ovirtsdk4/types.rb', line 13409

def comment=(value)
  @comment = value
end

#data_centerDataCenter

Returns the value of the data_center attribute.

Returns:



13418
13419
13420
# File 'lib/ovirtsdk4/types.rb', line 13418

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:



13431
13432
13433
13434
13435
13436
# File 'lib/ovirtsdk4/types.rb', line 13431

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)


13443
13444
13445
# File 'lib/ovirtsdk4/types.rb', line 13443

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)


13452
13453
13454
# File 'lib/ovirtsdk4/types.rb', line 13452

def description=(value)
  @description = value
end

#diskDisk

Returns the value of the disk attribute.

Returns:



13461
13462
13463
# File 'lib/ovirtsdk4/types.rb', line 13461

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)


13474
13475
13476
13477
13478
13479
# File 'lib/ovirtsdk4/types.rb', line 13474

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:



13486
13487
13488
# File 'lib/ovirtsdk4/types.rb', line 13486

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:



13499
13500
13501
13502
13503
13504
# File 'lib/ovirtsdk4/types.rb', line 13499

def group=(value)
  if value.is_a?(Hash)
    value = Group.new(value)
  end
  @group = value
end

#hashObject

Generates a hash value for this object.



13791
13792
13793
13794
13795
13796
13797
13798
13799
13800
13801
13802
13803
13804
# File 'lib/ovirtsdk4/types.rb', line 13791

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:



13511
13512
13513
# File 'lib/ovirtsdk4/types.rb', line 13511

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)


13524
13525
13526
13527
13528
13529
# File 'lib/ovirtsdk4/types.rb', line 13524

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)


13536
13537
13538
# File 'lib/ovirtsdk4/types.rb', line 13536

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)


13545
13546
13547
# File 'lib/ovirtsdk4/types.rb', line 13545

def id=(value)
  @id = value
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)


13554
13555
13556
# File 'lib/ovirtsdk4/types.rb', line 13554

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)


13563
13564
13565
# File 'lib/ovirtsdk4/types.rb', line 13563

def name=(value)
  @name = value
end

#roleRole

Returns the value of the role attribute.

Returns:



13572
13573
13574
# File 'lib/ovirtsdk4/types.rb', line 13572

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)


13585
13586
13587
13588
13589
13590
# File 'lib/ovirtsdk4/types.rb', line 13585

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:



13597
13598
13599
# File 'lib/ovirtsdk4/types.rb', line 13597

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:



13610
13611
13612
13613
13614
13615
# File 'lib/ovirtsdk4/types.rb', line 13610

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:



13622
13623
13624
# File 'lib/ovirtsdk4/types.rb', line 13622

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:



13635
13636
13637
13638
13639
13640
# File 'lib/ovirtsdk4/types.rb', line 13635

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:



13647
13648
13649
# File 'lib/ovirtsdk4/types.rb', line 13647

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)


13660
13661
13662
13663
13664
13665
# File 'lib/ovirtsdk4/types.rb', line 13660

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:



13672
13673
13674
# File 'lib/ovirtsdk4/types.rb', line 13672

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)


13685
13686
13687
13688
13689
13690
# File 'lib/ovirtsdk4/types.rb', line 13685

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:



13697
13698
13699
# File 'lib/ovirtsdk4/types.rb', line 13697

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:



13710
13711
13712
13713
13714
13715
# File 'lib/ovirtsdk4/types.rb', line 13710

def vm_pool=(value)
  if value.is_a?(Hash)
    value = VmPool.new(value)
  end
  @vm_pool = value
end