class OvirtSDK4::Event

Public Class Methods

new(opts = {}) click to toggle source

Creates a new instance of the {Event} 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 [Cluster, Hash] :cluster The value of attribute `cluster`.

@option opts [Integer] :code The value of attribute `code`.

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

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

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

@option opts [Integer] :custom_id The value of attribute `custom_id`.

@option opts [DataCenter, Hash] :data_center The value of attribute `data_center`.

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

@option opts [Integer] :flood_rate The value of attribute `flood_rate`.

@option opts [Host, Hash] :host The value of attribute `host`.

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

@option opts [Integer] :index The value of attribute `index`.

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

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

@option opts [LogSeverity] :severity The value of attribute `severity`.

@option opts [StorageDomain, Hash] :storage_domain The value of attribute `storage_domain`.

@option opts [Template, Hash] :template The value of attribute `template`.

@option opts [DateTime] :time The value of attribute `time`.

@option opts [User, Hash] :user The value of attribute `user`.

@option opts [Vm, Hash] :vm The value of attribute `vm`.

Calls superclass method OvirtSDK4::Identified.new
# File lib/ovirtsdk4/types.rb, line 36654
def initialize(opts = {})
  super(opts)
  self.cluster = opts[:cluster]
  self.code = opts[:code]
  self.correlation_id = opts[:correlation_id]
  self.custom_data = opts[:custom_data]
  self.custom_id = opts[:custom_id]
  self.data_center = opts[:data_center]
  self.flood_rate = opts[:flood_rate]
  self.host = opts[:host]
  self.index = opts[:index]
  self.origin = opts[:origin]
  self.severity = opts[:severity]
  self.storage_domain = opts[:storage_domain]
  self.template = opts[:template]
  self.time = opts[:time]
  self.user = opts[:user]
  self.vm = opts[:vm]
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::Identified#==
# File lib/ovirtsdk4/types.rb, line 36677
def ==(other)
  super &&
  @cluster == other.cluster &&
  @code == other.code &&
  @correlation_id == other.correlation_id &&
  @custom_data == other.custom_data &&
  @custom_id == other.custom_id &&
  @data_center == other.data_center &&
  @flood_rate == other.flood_rate &&
  @host == other.host &&
  @index == other.index &&
  @origin == other.origin &&
  @severity == other.severity &&
  @storage_domain == other.storage_domain &&
  @template == other.template &&
  @time == other.time &&
  @user == other.user &&
  @vm == other.vm
end
cluster() click to toggle source

Returns the value of the `cluster` attribute.

@return [Cluster]

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

Sets the value of the `cluster` attribute.

@param value [Cluster, Hash]

The `value` parameter can be an instance of {OvirtSDK4::Cluster} 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.

# File lib/ovirtsdk4/types.rb, line 36215
def cluster=(value)
  if value.is_a?(Hash)
    value = Cluster.new(value)
  end
  @cluster = value
end
code() click to toggle source

Returns the value of the `code` attribute.

@return [Integer]

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

Sets the value of the `code` attribute.

@param value [Integer]

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

Returns the value of the `comment` attribute.

@return [String]

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

Sets the value of the `comment` attribute.

@param value [String]

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

Returns the value of the `correlation_id` attribute.

@return [String]

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

Sets the value of the `correlation_id` attribute.

@param value [String]

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

Returns the value of the `custom_data` attribute.

@return [String]

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

Sets the value of the `custom_data` attribute.

@param value [String]

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

Returns the value of the `custom_id` attribute.

@return [Integer]

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

Sets the value of the `custom_id` attribute.

@param value [Integer]

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

Returns the value of the `data_center` attribute.

@return [DataCenter]

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

Sets the value of the `data_center` attribute.

@param value [DataCenter, Hash]

The `value` parameter can be an instance of {OvirtSDK4::DataCenter} 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.

# File lib/ovirtsdk4/types.rb, line 36330
def data_center=(value)
  if value.is_a?(Hash)
    value = DataCenter.new(value)
  end
  @data_center = value
end
description() click to toggle source

Returns the value of the `description` attribute.

@return [String]

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

Sets the value of the `description` attribute.

@param value [String]

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

Returns the value of the `flood_rate` attribute.

@return [Integer]

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

Sets the value of the `flood_rate` attribute.

@param value [Integer]

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

Generates a hash value for this object.

Calls superclass method OvirtSDK4::Identified#hash
# File lib/ovirtsdk4/types.rb, line 36700
def hash
  super +
  @cluster.hash +
  @code.hash +
  @correlation_id.hash +
  @custom_data.hash +
  @custom_id.hash +
  @data_center.hash +
  @flood_rate.hash +
  @host.hash +
  @index.hash +
  @origin.hash +
  @severity.hash +
  @storage_domain.hash +
  @template.hash +
  @time.hash +
  @user.hash +
  @vm.hash
end
host() click to toggle source

Returns the value of the `host` attribute.

@return [Host]

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

Sets the value of the `host` attribute.

@param value [Host, Hash]

The `value` parameter can be an instance of {OvirtSDK4::Host} 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.

# File lib/ovirtsdk4/types.rb, line 36391
def host=(value)
  if value.is_a?(Hash)
    value = Host.new(value)
  end
  @host = value
end
id() click to toggle source

Returns the value of the `id` attribute.

@return [String]

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

Sets the value of the `id` attribute.

@param value [String]

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

Returns the value of the `index` attribute.

@return [Integer]

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

Sets the value of the `index` attribute.

@param value [Integer]

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

Returns the value of the `name` attribute.

@return [String]

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

Sets the value of the `name` attribute.

@param value [String]

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

Returns the value of the `origin` attribute.

@return [String]

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

Sets the value of the `origin` attribute.

@param value [String]

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

Returns the value of the `severity` attribute.

@return [LogSeverity]

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

Sets the value of the `severity` attribute.

@param value [LogSeverity]

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

Returns the value of the `storage_domain` attribute.

@return [StorageDomain]

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

Sets the value of the `storage_domain` attribute.

@param value [StorageDomain, Hash]

The `value` parameter can be an instance of {OvirtSDK4::StorageDomain} 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.

# File lib/ovirtsdk4/types.rb, line 36506
def storage_domain=(value)
  if value.is_a?(Hash)
    value = StorageDomain.new(value)
  end
  @storage_domain = value
end
template() click to toggle source

Returns the value of the `template` attribute.

@return [Template]

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

Sets the value of the `template` attribute.

@param value [Template, Hash]

The `value` parameter can be an instance of {OvirtSDK4::Template} 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.

# File lib/ovirtsdk4/types.rb, line 36531
def template=(value)
  if value.is_a?(Hash)
    value = Template.new(value)
  end
  @template = value
end
time() click to toggle source

Returns the value of the `time` attribute.

@return [DateTime]

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

Sets the value of the `time` attribute.

@param value [DateTime]

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

Returns the value of the `user` attribute.

@return [User]

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

Sets the value of the `user` attribute.

@param value [User, Hash]

The `value` parameter can be an instance of {OvirtSDK4::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.

# File lib/ovirtsdk4/types.rb, line 36574
def user=(value)
  if value.is_a?(Hash)
    value = User.new(value)
  end
  @user = value
end
vm() click to toggle source

Returns the value of the `vm` attribute.

@return [Vm]

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

Sets the value of the `vm` attribute.

@param value [Vm, Hash]

The `value` parameter can be an instance of {OvirtSDK4::Vm} 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.

# File lib/ovirtsdk4/types.rb, line 36599
def vm=(value)
  if value.is_a?(Hash)
    value = Vm.new(value)
  end
  @vm = value
end