Class: OvirtSDK4::Domain
- Inherits:
-
Identified
- Object
- Struct
- Identified
- OvirtSDK4::Domain
- 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. -
#comment ⇒ String
Returns the value of the
comment
attribute. -
#comment=(value) ⇒ Object
Sets the value of the
comment
attribute. -
#description ⇒ String
Returns the value of the
description
attribute. -
#description=(value) ⇒ Object
Sets the value of the
description
attribute. -
#groups ⇒ Array<Group>
Returns the value of the
groups
attribute. -
#groups=(list) ⇒ Object
Sets the value of the
groups
attribute. -
#hash ⇒ Object
Generates a hash value for this object.
-
#id ⇒ String
Returns the value of the
id
attribute. -
#id=(value) ⇒ Object
Sets the value of the
id
attribute. -
#initialize(opts = {}) ⇒ Domain
constructor
Creates a new instance of the Domain class.
-
#name ⇒ String
Returns the value of the
name
attribute. -
#name=(value) ⇒ Object
Sets the value of the
name
attribute. -
#user ⇒ User
Returns the value of the
user
attribute. -
#user=(value) ⇒ Object
Sets the value of the
user
attribute. -
#users ⇒ Array<User>
Returns the value of the
users
attribute. -
#users=(list) ⇒ Object
Sets the value of the
users
attribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ Domain
Creates a new instance of the OvirtSDK4::Domain class.
38961 38962 38963 38964 38965 38966 |
# File 'lib/ovirtsdk4/types.rb', line 38961 def initialize(opts = {}) super(opts) self.groups = opts[:groups] self.user = opts[:user] self.users = opts[:users] end |
Instance Method Details
#==(other) ⇒ Object
Returns true
if self
and other
have the same attributes and values.
38971 38972 38973 38974 38975 38976 |
# File 'lib/ovirtsdk4/types.rb', line 38971 def ==(other) super && @groups == other.groups && @user == other.user && @users == other.users end |
#comment ⇒ String
Returns the value of the comment
attribute.
38795 38796 38797 |
# File 'lib/ovirtsdk4/types.rb', line 38795 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
38804 38805 38806 |
# File 'lib/ovirtsdk4/types.rb', line 38804 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description
attribute.
38813 38814 38815 |
# File 'lib/ovirtsdk4/types.rb', line 38813 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
38822 38823 38824 |
# File 'lib/ovirtsdk4/types.rb', line 38822 def description=(value) @description = value end |
#groups ⇒ Array<Group>
Returns the value of the groups
attribute.
38831 38832 38833 |
# File 'lib/ovirtsdk4/types.rb', line 38831 def groups @groups end |
#groups=(list) ⇒ Object
Sets the value of the groups
attribute.
38840 38841 38842 38843 38844 38845 38846 38847 38848 38849 38850 |
# File 'lib/ovirtsdk4/types.rb', line 38840 def groups=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = Group.new(value) end end end @groups = list end |
#hash ⇒ Object
Generates a hash value for this object.
38981 38982 38983 38984 38985 38986 |
# File 'lib/ovirtsdk4/types.rb', line 38981 def hash super + @groups.hash + @user.hash + @users.hash end |
#id ⇒ String
Returns the value of the id
attribute.
38857 38858 38859 |
# File 'lib/ovirtsdk4/types.rb', line 38857 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
38866 38867 38868 |
# File 'lib/ovirtsdk4/types.rb', line 38866 def id=(value) @id = value end |
#name ⇒ String
Returns the value of the name
attribute.
38875 38876 38877 |
# File 'lib/ovirtsdk4/types.rb', line 38875 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
38884 38885 38886 |
# File 'lib/ovirtsdk4/types.rb', line 38884 def name=(value) @name = value end |
#user ⇒ User
Returns the value of the user
attribute.
38893 38894 38895 |
# File 'lib/ovirtsdk4/types.rb', line 38893 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.
38906 38907 38908 38909 38910 38911 |
# File 'lib/ovirtsdk4/types.rb', line 38906 def user=(value) if value.is_a?(Hash) value = User.new(value) end @user = value end |
#users ⇒ Array<User>
Returns the value of the users
attribute.
38918 38919 38920 |
# File 'lib/ovirtsdk4/types.rb', line 38918 def users @users end |
#users=(list) ⇒ Object
Sets the value of the users
attribute.
38927 38928 38929 38930 38931 38932 38933 38934 38935 38936 38937 |
# File 'lib/ovirtsdk4/types.rb', line 38927 def users=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = User.new(value) end end end @users = list end |