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.
36219 36220 36221 36222 36223 36224 |
# File 'lib/ovirtsdk4/types.rb', line 36219 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.
36229 36230 36231 36232 36233 36234 |
# File 'lib/ovirtsdk4/types.rb', line 36229 def ==(other) super && @groups == other.groups && @user == other.user && @users == other.users end |
#comment ⇒ String
Returns the value of the comment
attribute.
36053 36054 36055 |
# File 'lib/ovirtsdk4/types.rb', line 36053 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
36062 36063 36064 |
# File 'lib/ovirtsdk4/types.rb', line 36062 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description
attribute.
36071 36072 36073 |
# File 'lib/ovirtsdk4/types.rb', line 36071 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
36080 36081 36082 |
# File 'lib/ovirtsdk4/types.rb', line 36080 def description=(value) @description = value end |
#groups ⇒ Array<Group>
Returns the value of the groups
attribute.
36089 36090 36091 |
# File 'lib/ovirtsdk4/types.rb', line 36089 def groups @groups end |
#groups=(list) ⇒ Object
Sets the value of the groups
attribute.
36098 36099 36100 36101 36102 36103 36104 36105 36106 36107 36108 |
# File 'lib/ovirtsdk4/types.rb', line 36098 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.
36239 36240 36241 36242 36243 36244 |
# File 'lib/ovirtsdk4/types.rb', line 36239 def hash super + @groups.hash + @user.hash + @users.hash end |
#id ⇒ String
Returns the value of the id
attribute.
36115 36116 36117 |
# File 'lib/ovirtsdk4/types.rb', line 36115 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
36124 36125 36126 |
# File 'lib/ovirtsdk4/types.rb', line 36124 def id=(value) @id = value end |
#name ⇒ String
Returns the value of the name
attribute.
36133 36134 36135 |
# File 'lib/ovirtsdk4/types.rb', line 36133 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
36142 36143 36144 |
# File 'lib/ovirtsdk4/types.rb', line 36142 def name=(value) @name = value end |
#user ⇒ User
Returns the value of the user
attribute.
36151 36152 36153 |
# File 'lib/ovirtsdk4/types.rb', line 36151 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.
36164 36165 36166 36167 36168 36169 |
# File 'lib/ovirtsdk4/types.rb', line 36164 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.
36176 36177 36178 |
# File 'lib/ovirtsdk4/types.rb', line 36176 def users @users end |
#users=(list) ⇒ Object
Sets the value of the users
attribute.
36185 36186 36187 36188 36189 36190 36191 36192 36193 36194 36195 |
# File 'lib/ovirtsdk4/types.rb', line 36185 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 |