class OvirtSDK4::PowerManagement

Public Class Methods

new(opts = {}) click to toggle source

Creates a new instance of the {PowerManagement} class.

@param opts [Hash] A hash containing the attributes of the object. The keys of the hash

should be symbols corresponding to the names of the attributes. The values of the hash
should be the values of the attributes.

@option opts [String] :address The value of attribute `address`.

@option opts [Array<Agent>, Array<Hash>] :agents The values of attribute `agents`.

@option opts [Boolean] :automatic_pm_enabled The value of attribute `automatic_pm_enabled`.

@option opts [Boolean] :enabled The value of attribute `enabled`.

@option opts [Boolean] :kdump_detection The value of attribute `kdump_detection`.

@option opts [Array<Option>, Array<Hash>] :options The values of attribute `options`.

@option opts [String] :password The value of attribute `password`.

@option opts [Array<PmProxy>, Array<Hash>] :pm_proxies The values of attribute `pm_proxies`.

@option opts [PowerManagementStatus] :status The value of attribute `status`.

@option opts [String] :type The value of attribute `type`.

@option opts [String] :username The value of attribute `username`.

Calls superclass method OvirtSDK4::Struct.new
# File lib/ovirtsdk4/types.rb, line 13383
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.options = 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

Public Instance Methods

==(other) click to toggle source

Returns `true` if `self` and `other` have the same attributes and values.

Calls superclass method OvirtSDK4::Struct#==
# File lib/ovirtsdk4/types.rb, line 13401
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.options &&
  @password == other.password &&
  @pm_proxies == other.pm_proxies &&
  @status == other.status &&
  @type == other.type &&
  @username == other.username
end
address() click to toggle source

Returns the value of the `address` attribute.

@return [String]

# File lib/ovirtsdk4/types.rb, line 13136
def address
  @address
end
address=(value) click to toggle source

Sets the value of the `address` attribute.

@param value [String]

# File lib/ovirtsdk4/types.rb, line 13145
def address=(value)
  @address = value
end
agents() click to toggle source

Returns the value of the `agents` attribute.

@return [Array<Agent>]

# File lib/ovirtsdk4/types.rb, line 13154
def agents
  @agents
end
agents=(list) click to toggle source

Sets the value of the `agents` attribute.

@param list [Array<Agent>]

# File lib/ovirtsdk4/types.rb, line 13163
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() click to toggle source

Returns the value of the `automatic_pm_enabled` attribute.

@return [Boolean]

# File lib/ovirtsdk4/types.rb, line 13180
def automatic_pm_enabled
  @automatic_pm_enabled
end
automatic_pm_enabled=(value) click to toggle source

Sets the value of the `automatic_pm_enabled` attribute.

@param value [Boolean]

# File lib/ovirtsdk4/types.rb, line 13189
def automatic_pm_enabled=(value)
  @automatic_pm_enabled = value
end
enabled() click to toggle source

Returns the value of the `enabled` attribute.

@return [Boolean]

# File lib/ovirtsdk4/types.rb, line 13198
def enabled
  @enabled
end
enabled=(value) click to toggle source

Sets the value of the `enabled` attribute.

@param value [Boolean]

# File lib/ovirtsdk4/types.rb, line 13207
def enabled=(value)
  @enabled = value
end
hash() click to toggle source

Generates a hash value for this object.

Calls superclass method OvirtSDK4::Struct#hash
# File lib/ovirtsdk4/types.rb, line 13419
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() click to toggle source

Returns the value of the `kdump_detection` attribute.

@return [Boolean]

# File lib/ovirtsdk4/types.rb, line 13216
def kdump_detection
  @kdump_detection
end
kdump_detection=(value) click to toggle source

Sets the value of the `kdump_detection` attribute.

@param value [Boolean]

# File lib/ovirtsdk4/types.rb, line 13225
def kdump_detection=(value)
  @kdump_detection = value
end
options() click to toggle source

Returns the value of the `options` attribute.

@return [Array<Option>]

# File lib/ovirtsdk4/types.rb, line 13234
def options
  @options
end
options=(list) click to toggle source

Sets the value of the `options` attribute.

@param list [Array<Option>]

# File lib/ovirtsdk4/types.rb, line 13243
def options=(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() click to toggle source

Returns the value of the `password` attribute.

@return [String]

# File lib/ovirtsdk4/types.rb, line 13260
def password
  @password
end
password=(value) click to toggle source

Sets the value of the `password` attribute.

@param value [String]

# File lib/ovirtsdk4/types.rb, line 13269
def password=(value)
  @password = value
end
pm_proxies() click to toggle source

Returns the value of the `pm_proxies` attribute.

@return [Array<PmProxy>]

# File lib/ovirtsdk4/types.rb, line 13278
def pm_proxies
  @pm_proxies
end
pm_proxies=(list) click to toggle source

Sets the value of the `pm_proxies` attribute.

@param list [Array<PmProxy>]

# File lib/ovirtsdk4/types.rb, line 13287
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() click to toggle source

Returns the value of the `status` attribute.

@return [PowerManagementStatus]

# File lib/ovirtsdk4/types.rb, line 13304
def status
  @status
end
status=(value) click to toggle source

Sets the value of the `status` attribute.

@param value [PowerManagementStatus]

# File lib/ovirtsdk4/types.rb, line 13313
def status=(value)
  @status = value
end
type() click to toggle source

Returns the value of the `type` attribute.

@return [String]

# File lib/ovirtsdk4/types.rb, line 13322
def type
  @type
end
type=(value) click to toggle source

Sets the value of the `type` attribute.

@param value [String]

# File lib/ovirtsdk4/types.rb, line 13331
def type=(value)
  @type = value
end
username() click to toggle source

Returns the value of the `username` attribute.

@return [String]

# File lib/ovirtsdk4/types.rb, line 13340
def username
  @username
end
username=(value) click to toggle source

Sets the value of the `username` attribute.

@param value [String]

# File lib/ovirtsdk4/types.rb, line 13349
def username=(value)
  @username = value
end