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.
38106 38107 38108 38109 38110 38111 |
# File 'lib/ovirtsdk4/types.rb', line 38106 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.
38116 38117 38118 38119 38120 38121 |
# File 'lib/ovirtsdk4/types.rb', line 38116 def ==(other) super && @groups == other.groups && @user == other.user && @users == other.users end |
#comment ⇒ String
Returns the value of the comment
attribute.
37940 37941 37942 |
# File 'lib/ovirtsdk4/types.rb', line 37940 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
37949 37950 37951 |
# File 'lib/ovirtsdk4/types.rb', line 37949 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description
attribute.
37958 37959 37960 |
# File 'lib/ovirtsdk4/types.rb', line 37958 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
37967 37968 37969 |
# File 'lib/ovirtsdk4/types.rb', line 37967 def description=(value) @description = value end |
#groups ⇒ Array<Group>
Returns the value of the groups
attribute.
37976 37977 37978 |
# File 'lib/ovirtsdk4/types.rb', line 37976 def groups @groups end |
#groups=(list) ⇒ Object
Sets the value of the groups
attribute.
37985 37986 37987 37988 37989 37990 37991 37992 37993 37994 37995 |
# File 'lib/ovirtsdk4/types.rb', line 37985 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.
38126 38127 38128 38129 38130 38131 |
# File 'lib/ovirtsdk4/types.rb', line 38126 def hash super + @groups.hash + @user.hash + @users.hash end |
#id ⇒ String
Returns the value of the id
attribute.
38002 38003 38004 |
# File 'lib/ovirtsdk4/types.rb', line 38002 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
38011 38012 38013 |
# File 'lib/ovirtsdk4/types.rb', line 38011 def id=(value) @id = value end |
#name ⇒ String
Returns the value of the name
attribute.
38020 38021 38022 |
# File 'lib/ovirtsdk4/types.rb', line 38020 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
38029 38030 38031 |
# File 'lib/ovirtsdk4/types.rb', line 38029 def name=(value) @name = value end |
#user ⇒ User
Returns the value of the user
attribute.
38038 38039 38040 |
# File 'lib/ovirtsdk4/types.rb', line 38038 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.
38051 38052 38053 38054 38055 38056 |
# File 'lib/ovirtsdk4/types.rb', line 38051 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.
38063 38064 38065 |
# File 'lib/ovirtsdk4/types.rb', line 38063 def users @users end |
#users=(list) ⇒ Object
Sets the value of the users
attribute.
38072 38073 38074 38075 38076 38077 38078 38079 38080 38081 38082 |
# File 'lib/ovirtsdk4/types.rb', line 38072 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 |