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.


13906
13907
13908
13909
13910
13911
13912
13913
13914
13915
13916
13917
13918
13919
# File 'lib/ovirtsdk4/types.rb', line 13906

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.


13924
13925
13926
13927
13928
13929
13930
13931
13932
13933
13934
13935
13936
13937
# File 'lib/ovirtsdk4/types.rb', line 13924

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:


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

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:


13539
13540
13541
13542
13543
13544
# File 'lib/ovirtsdk4/types.rb', line 13539

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)

13551
13552
13553
# File 'lib/ovirtsdk4/types.rb', line 13551

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)

13560
13561
13562
# File 'lib/ovirtsdk4/types.rb', line 13560

def comment=(value)
  @comment = value
end

#data_centerDataCenter

Returns the value of the data_center attribute.

Returns:


13569
13570
13571
# File 'lib/ovirtsdk4/types.rb', line 13569

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:


13582
13583
13584
13585
13586
13587
# File 'lib/ovirtsdk4/types.rb', line 13582

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)

13594
13595
13596
# File 'lib/ovirtsdk4/types.rb', line 13594

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)

13603
13604
13605
# File 'lib/ovirtsdk4/types.rb', line 13603

def description=(value)
  @description = value
end

#diskDisk

Returns the value of the disk attribute.

Returns:


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

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)

13625
13626
13627
13628
13629
13630
# File 'lib/ovirtsdk4/types.rb', line 13625

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:


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

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:


13650
13651
13652
13653
13654
13655
# File 'lib/ovirtsdk4/types.rb', line 13650

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

#hashObject

Generates a hash value for this object.


13942
13943
13944
13945
13946
13947
13948
13949
13950
13951
13952
13953
13954
13955
# File 'lib/ovirtsdk4/types.rb', line 13942

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:


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

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)

13675
13676
13677
13678
13679
13680
# File 'lib/ovirtsdk4/types.rb', line 13675

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)

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

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)

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

def id=(value)
  @id = value
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)

13705
13706
13707
# File 'lib/ovirtsdk4/types.rb', line 13705

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)

13714
13715
13716
# File 'lib/ovirtsdk4/types.rb', line 13714

def name=(value)
  @name = value
end

#roleRole

Returns the value of the role attribute.

Returns:


13723
13724
13725
# File 'lib/ovirtsdk4/types.rb', line 13723

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)

13736
13737
13738
13739
13740
13741
# File 'lib/ovirtsdk4/types.rb', line 13736

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:


13748
13749
13750
# File 'lib/ovirtsdk4/types.rb', line 13748

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:


13761
13762
13763
13764
13765
13766
# File 'lib/ovirtsdk4/types.rb', line 13761

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:


13773
13774
13775
# File 'lib/ovirtsdk4/types.rb', line 13773

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:


13786
13787
13788
13789
13790
13791
# File 'lib/ovirtsdk4/types.rb', line 13786

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:


13798
13799
13800
# File 'lib/ovirtsdk4/types.rb', line 13798

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)

13811
13812
13813
13814
13815
13816
# File 'lib/ovirtsdk4/types.rb', line 13811

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:


13823
13824
13825
# File 'lib/ovirtsdk4/types.rb', line 13823

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)

13836
13837
13838
13839
13840
13841
# File 'lib/ovirtsdk4/types.rb', line 13836

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:


13848
13849
13850
# File 'lib/ovirtsdk4/types.rb', line 13848

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:


13861
13862
13863
13864
13865
13866
# File 'lib/ovirtsdk4/types.rb', line 13861

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