Class: OvirtSDK4::PowerManagement
- Defined in:
- lib/ovirtsdk4/types.rb,
lib/ovirtsdk4/types.rb
Instance Method Summary collapse
-
#==(other) ⇒ Object
Returns
trueifselfandotherhave the same attributes and values. -
#address ⇒ String
Returns the value of the
addressattribute. -
#address=(value) ⇒ Object
Sets the value of the
addressattribute. -
#agents ⇒ Array<Agent>
Returns the value of the
agentsattribute. -
#agents=(list) ⇒ Object
Sets the value of the
agentsattribute. -
#automatic_pm_enabled ⇒ Boolean
Returns the value of the
automatic_pm_enabledattribute. -
#automatic_pm_enabled=(value) ⇒ Object
Sets the value of the
automatic_pm_enabledattribute. -
#enabled ⇒ Boolean
Returns the value of the
enabledattribute. -
#enabled=(value) ⇒ Object
Sets the value of the
enabledattribute. -
#hash ⇒ Object
Generates a hash value for this object.
-
#initialize(opts = {}) ⇒ PowerManagement
constructor
Creates a new instance of the PowerManagement class.
-
#kdump_detection ⇒ Boolean
Returns the value of the
kdump_detectionattribute. -
#kdump_detection=(value) ⇒ Object
Sets the value of the
kdump_detectionattribute. -
#options ⇒ Array<Option>
Returns the value of the
optionsattribute. -
#options=(list) ⇒ Object
Sets the value of the
optionsattribute. -
#password ⇒ String
Returns the value of the
passwordattribute. -
#password=(value) ⇒ Object
Sets the value of the
passwordattribute. -
#pm_proxies ⇒ Array<PmProxy>
Returns the value of the
pm_proxiesattribute. -
#pm_proxies=(list) ⇒ Object
Sets the value of the
pm_proxiesattribute. -
#status ⇒ PowerManagementStatus
Returns the value of the
statusattribute. -
#status=(value) ⇒ Object
Sets the value of the
statusattribute. -
#type ⇒ String
Returns the value of the
typeattribute. -
#type=(value) ⇒ Object
Sets the value of the
typeattribute. -
#username ⇒ String
Returns the value of the
usernameattribute. -
#username=(value) ⇒ Object
Sets the value of the
usernameattribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ PowerManagement
Creates a new instance of the OvirtSDK4::PowerManagement class.
15271 15272 15273 15274 15275 15276 15277 15278 15279 15280 15281 15282 15283 15284 |
# File 'lib/ovirtsdk4/types.rb', line 15271 def initialize(opts = {}) super(opts) self.address = opts[:address] self.agents = opts[:agents] self.automatic_pm_enabled = opts[:automatic_pm_enabled] self.enabled = opts[:enabled] self.kdump_detection = opts[:kdump_detection] self. = opts[:options] self.password = opts[:password] self.pm_proxies = opts[:pm_proxies] self.status = opts[:status] self.type = opts[:type] self.username = opts[:username] end |
Instance Method Details
#==(other) ⇒ Object
Returns true if self and other have the same attributes and values.
15289 15290 15291 15292 15293 15294 15295 15296 15297 15298 15299 15300 15301 15302 |
# File 'lib/ovirtsdk4/types.rb', line 15289 def ==(other) super && @address == other.address && @agents == other.agents && @automatic_pm_enabled == other.automatic_pm_enabled && @enabled == other.enabled && @kdump_detection == other.kdump_detection && @options == other. && @password == other.password && @pm_proxies == other.pm_proxies && @status == other.status && @type == other.type && @username == other.username end |
#address ⇒ String
Returns the value of the address attribute.
15024 15025 15026 |
# File 'lib/ovirtsdk4/types.rb', line 15024 def address @address end |
#address=(value) ⇒ Object
Sets the value of the address attribute.
15033 15034 15035 |
# File 'lib/ovirtsdk4/types.rb', line 15033 def address=(value) @address = value end |
#agents ⇒ Array<Agent>
Returns the value of the agents attribute.
15042 15043 15044 |
# File 'lib/ovirtsdk4/types.rb', line 15042 def agents @agents end |
#agents=(list) ⇒ Object
Sets the value of the agents attribute.
15051 15052 15053 15054 15055 15056 15057 15058 15059 15060 15061 |
# File 'lib/ovirtsdk4/types.rb', line 15051 def agents=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = Agent.new(value) end end end @agents = list end |
#automatic_pm_enabled ⇒ Boolean
Returns the value of the automatic_pm_enabled attribute.
15068 15069 15070 |
# File 'lib/ovirtsdk4/types.rb', line 15068 def automatic_pm_enabled @automatic_pm_enabled end |
#automatic_pm_enabled=(value) ⇒ Object
Sets the value of the automatic_pm_enabled attribute.
15077 15078 15079 |
# File 'lib/ovirtsdk4/types.rb', line 15077 def automatic_pm_enabled=(value) @automatic_pm_enabled = value end |
#enabled ⇒ Boolean
Returns the value of the enabled attribute.
15086 15087 15088 |
# File 'lib/ovirtsdk4/types.rb', line 15086 def enabled @enabled end |
#enabled=(value) ⇒ Object
Sets the value of the enabled attribute.
15095 15096 15097 |
# File 'lib/ovirtsdk4/types.rb', line 15095 def enabled=(value) @enabled = value end |
#hash ⇒ Object
Generates a hash value for this object.
15307 15308 15309 15310 15311 15312 15313 15314 15315 15316 15317 15318 15319 15320 |
# File 'lib/ovirtsdk4/types.rb', line 15307 def hash super + @address.hash + @agents.hash + @automatic_pm_enabled.hash + @enabled.hash + @kdump_detection.hash + @options.hash + @password.hash + @pm_proxies.hash + @status.hash + @type.hash + @username.hash end |
#kdump_detection ⇒ Boolean
Returns the value of the kdump_detection attribute.
15104 15105 15106 |
# File 'lib/ovirtsdk4/types.rb', line 15104 def kdump_detection @kdump_detection end |
#kdump_detection=(value) ⇒ Object
Sets the value of the kdump_detection attribute.
15113 15114 15115 |
# File 'lib/ovirtsdk4/types.rb', line 15113 def kdump_detection=(value) @kdump_detection = value end |
#options ⇒ Array<Option>
Returns the value of the options attribute.
15122 15123 15124 |
# File 'lib/ovirtsdk4/types.rb', line 15122 def @options end |
#options=(list) ⇒ Object
Sets the value of the options attribute.
15131 15132 15133 15134 15135 15136 15137 15138 15139 15140 15141 |
# File 'lib/ovirtsdk4/types.rb', line 15131 def (list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = Option.new(value) end end end @options = list end |
#password ⇒ String
Returns the value of the password attribute.
15148 15149 15150 |
# File 'lib/ovirtsdk4/types.rb', line 15148 def password @password end |
#password=(value) ⇒ Object
Sets the value of the password attribute.
15157 15158 15159 |
# File 'lib/ovirtsdk4/types.rb', line 15157 def password=(value) @password = value end |
#pm_proxies ⇒ Array<PmProxy>
Returns the value of the pm_proxies attribute.
15166 15167 15168 |
# File 'lib/ovirtsdk4/types.rb', line 15166 def pm_proxies @pm_proxies end |
#pm_proxies=(list) ⇒ Object
Sets the value of the pm_proxies attribute.
15175 15176 15177 15178 15179 15180 15181 15182 15183 15184 15185 |
# File 'lib/ovirtsdk4/types.rb', line 15175 def pm_proxies=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = PmProxy.new(value) end end end @pm_proxies = list end |
#status ⇒ PowerManagementStatus
Returns the value of the status attribute.
15192 15193 15194 |
# File 'lib/ovirtsdk4/types.rb', line 15192 def status @status end |
#status=(value) ⇒ Object
Sets the value of the status attribute.
15201 15202 15203 |
# File 'lib/ovirtsdk4/types.rb', line 15201 def status=(value) @status = value end |
#type ⇒ String
Returns the value of the type attribute.
15210 15211 15212 |
# File 'lib/ovirtsdk4/types.rb', line 15210 def type @type end |
#type=(value) ⇒ Object
Sets the value of the type attribute.
15219 15220 15221 |
# File 'lib/ovirtsdk4/types.rb', line 15219 def type=(value) @type = value end |
#username ⇒ String
Returns the value of the username attribute.
15228 15229 15230 |
# File 'lib/ovirtsdk4/types.rb', line 15228 def username @username end |
#username=(value) ⇒ Object
Sets the value of the username attribute.
15237 15238 15239 |
# File 'lib/ovirtsdk4/types.rb', line 15237 def username=(value) @username = value end |