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
trueifselfandotherhave the same attributes and values. -
#comment ⇒ String
Returns the value of the
commentattribute. -
#comment=(value) ⇒ Object
Sets the value of the
commentattribute. -
#description ⇒ String
Returns the value of the
descriptionattribute. -
#description=(value) ⇒ Object
Sets the value of the
descriptionattribute. -
#groups ⇒ Array<Group>
Returns the value of the
groupsattribute. -
#groups=(list) ⇒ Object
Sets the value of the
groupsattribute. -
#hash ⇒ Object
Generates a hash value for this object.
-
#id ⇒ String
Returns the value of the
idattribute. -
#id=(value) ⇒ Object
Sets the value of the
idattribute. -
#initialize(opts = {}) ⇒ Domain
constructor
Creates a new instance of the Domain class.
-
#name ⇒ String
Returns the value of the
nameattribute. -
#name=(value) ⇒ Object
Sets the value of the
nameattribute. -
#user ⇒ User
Returns the value of the
userattribute. -
#user=(value) ⇒ Object
Sets the value of the
userattribute. -
#users ⇒ Array<User>
Returns the value of the
usersattribute. -
#users=(list) ⇒ Object
Sets the value of the
usersattribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ Domain
Creates a new instance of the OvirtSDK4::Domain class.
39254 39255 39256 39257 39258 39259 |
# File 'lib/ovirtsdk4/types.rb', line 39254 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.
39264 39265 39266 39267 39268 39269 |
# File 'lib/ovirtsdk4/types.rb', line 39264 def ==(other) super && @groups == other.groups && @user == other.user && @users == other.users end |
#comment ⇒ String
Returns the value of the comment attribute.
39088 39089 39090 |
# File 'lib/ovirtsdk4/types.rb', line 39088 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment attribute.
39097 39098 39099 |
# File 'lib/ovirtsdk4/types.rb', line 39097 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description attribute.
39106 39107 39108 |
# File 'lib/ovirtsdk4/types.rb', line 39106 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description attribute.
39115 39116 39117 |
# File 'lib/ovirtsdk4/types.rb', line 39115 def description=(value) @description = value end |
#groups ⇒ Array<Group>
Returns the value of the groups attribute.
39124 39125 39126 |
# File 'lib/ovirtsdk4/types.rb', line 39124 def groups @groups end |
#groups=(list) ⇒ Object
Sets the value of the groups attribute.
39133 39134 39135 39136 39137 39138 39139 39140 39141 39142 39143 |
# File 'lib/ovirtsdk4/types.rb', line 39133 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.
39274 39275 39276 39277 39278 39279 |
# File 'lib/ovirtsdk4/types.rb', line 39274 def hash super + @groups.hash + @user.hash + @users.hash end |
#id ⇒ String
Returns the value of the id attribute.
39150 39151 39152 |
# File 'lib/ovirtsdk4/types.rb', line 39150 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id attribute.
39159 39160 39161 |
# File 'lib/ovirtsdk4/types.rb', line 39159 def id=(value) @id = value end |
#name ⇒ String
Returns the value of the name attribute.
39168 39169 39170 |
# File 'lib/ovirtsdk4/types.rb', line 39168 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name attribute.
39177 39178 39179 |
# File 'lib/ovirtsdk4/types.rb', line 39177 def name=(value) @name = value end |
#user ⇒ User
Returns the value of the user attribute.
39186 39187 39188 |
# File 'lib/ovirtsdk4/types.rb', line 39186 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.
39199 39200 39201 39202 39203 39204 |
# File 'lib/ovirtsdk4/types.rb', line 39199 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.
39211 39212 39213 |
# File 'lib/ovirtsdk4/types.rb', line 39211 def users @users end |
#users=(list) ⇒ Object
Sets the value of the users attribute.
39220 39221 39222 39223 39224 39225 39226 39227 39228 39229 39230 |
# File 'lib/ovirtsdk4/types.rb', line 39220 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 |