Class: OvirtSDK4::Event

Inherits:
Identified show all
Defined in:
lib/ovirtsdk4/types.rb,
lib/ovirtsdk4/types.rb

Instance Method Summary collapse

Methods included from Type

#dig, #href, #href=

Constructor Details

#initialize(opts = {}) ⇒ Event

Creates a new instance of the OvirtSDK4::Event class.

Parameters:

  • opts (Hash) (defaults to: {})

    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.

Options Hash (opts):

  • :cluster (Cluster, Hash)

    The value of attribute cluster.

  • :code (Integer)

    The value of attribute code.

  • :comment (String)

    The value of attribute comment.

  • :correlation_id (String)

    The value of attribute correlation_id.

  • :custom_data (String)

    The value of attribute custom_data.

  • :custom_id (Integer)

    The value of attribute custom_id.

  • :data_center (DataCenter, Hash)

    The value of attribute data_center.

  • :description (String)

    The value of attribute description.

  • :flood_rate (Integer)

    The value of attribute flood_rate.

  • :host (Host, Hash)

    The value of attribute host.

  • :id (String)

    The value of attribute id.

  • :index (Integer)

    The value of attribute index.

  • :name (String)

    The value of attribute name.

  • :origin (String)

    The value of attribute origin.

  • :severity (LogSeverity)

    The value of attribute severity.

  • :storage_domain (StorageDomain, Hash)

    The value of attribute storage_domain.

  • :template (Template, Hash)

    The value of attribute template.

  • :time (DateTime)

    The value of attribute time.

  • :user (User, Hash)

    The value of attribute user.

  • :vm (Vm, Hash)

    The value of attribute vm.



36707
36708
36709
36710
36711
36712
36713
36714
36715
36716
36717
36718
36719
36720
36721
36722
36723
36724
36725
# File 'lib/ovirtsdk4/types.rb', line 36707

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

Instance Method Details

#==(other) ⇒ Object

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



36730
36731
36732
36733
36734
36735
36736
36737
36738
36739
36740
36741
36742
36743
36744
36745
36746
36747
36748
# File 'lib/ovirtsdk4/types.rb', line 36730

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

#clusterCluster

Returns the value of the cluster attribute.

Returns:



36255
36256
36257
# File 'lib/ovirtsdk4/types.rb', line 36255

def cluster
  @cluster
end

#cluster=(value) ⇒ Object

Sets the value of the cluster attribute.

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

Parameters:



36268
36269
36270
36271
36272
36273
# File 'lib/ovirtsdk4/types.rb', line 36268

def cluster=(value)
  if value.is_a?(Hash)
    value = Cluster.new(value)
  end
  @cluster = value
end

#codeInteger

Returns the value of the code attribute.

Returns:

  • (Integer)


36280
36281
36282
# File 'lib/ovirtsdk4/types.rb', line 36280

def code
  @code
end

#code=(value) ⇒ Object

Sets the value of the code attribute.

Parameters:

  • value (Integer)


36289
36290
36291
# File 'lib/ovirtsdk4/types.rb', line 36289

def code=(value)
  @code = value
end

#commentString

Returns the value of the comment attribute.

Returns:

  • (String)


36298
36299
36300
# File 'lib/ovirtsdk4/types.rb', line 36298

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)


36307
36308
36309
# File 'lib/ovirtsdk4/types.rb', line 36307

def comment=(value)
  @comment = value
end

#correlation_idString

Returns the value of the correlation_id attribute.

Returns:

  • (String)


36316
36317
36318
# File 'lib/ovirtsdk4/types.rb', line 36316

def correlation_id
  @correlation_id
end

#correlation_id=(value) ⇒ Object

Sets the value of the correlation_id attribute.

Parameters:

  • value (String)


36325
36326
36327
# File 'lib/ovirtsdk4/types.rb', line 36325

def correlation_id=(value)
  @correlation_id = value
end

#custom_dataString

Returns the value of the custom_data attribute.

Returns:

  • (String)


36334
36335
36336
# File 'lib/ovirtsdk4/types.rb', line 36334

def custom_data
  @custom_data
end

#custom_data=(value) ⇒ Object

Sets the value of the custom_data attribute.

Parameters:

  • value (String)


36343
36344
36345
# File 'lib/ovirtsdk4/types.rb', line 36343

def custom_data=(value)
  @custom_data = value
end

#custom_idInteger

Returns the value of the custom_id attribute.

Returns:

  • (Integer)


36352
36353
36354
# File 'lib/ovirtsdk4/types.rb', line 36352

def custom_id
  @custom_id
end

#custom_id=(value) ⇒ Object

Sets the value of the custom_id attribute.

Parameters:

  • value (Integer)


36361
36362
36363
# File 'lib/ovirtsdk4/types.rb', line 36361

def custom_id=(value)
  @custom_id = value
end

#data_centerDataCenter

Returns the value of the data_center attribute.

Returns:



36370
36371
36372
# File 'lib/ovirtsdk4/types.rb', line 36370

def data_center
  @data_center
end

#data_center=(value) ⇒ Object

Sets the value of the data_center attribute.

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

Parameters:



36383
36384
36385
36386
36387
36388
# File 'lib/ovirtsdk4/types.rb', line 36383

def data_center=(value)
  if value.is_a?(Hash)
    value = DataCenter.new(value)
  end
  @data_center = value
end

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)


36395
36396
36397
# File 'lib/ovirtsdk4/types.rb', line 36395

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)


36404
36405
36406
# File 'lib/ovirtsdk4/types.rb', line 36404

def description=(value)
  @description = value
end

#flood_rateInteger

Returns the value of the flood_rate attribute.

Returns:

  • (Integer)


36413
36414
36415
# File 'lib/ovirtsdk4/types.rb', line 36413

def flood_rate
  @flood_rate
end

#flood_rate=(value) ⇒ Object

Sets the value of the flood_rate attribute.

Parameters:

  • value (Integer)


36422
36423
36424
# File 'lib/ovirtsdk4/types.rb', line 36422

def flood_rate=(value)
  @flood_rate = value
end

#hashObject

Generates a hash value for this object.



36753
36754
36755
36756
36757
36758
36759
36760
36761
36762
36763
36764
36765
36766
36767
36768
36769
36770
36771
# File 'lib/ovirtsdk4/types.rb', line 36753

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

#hostHost

Returns the value of the host attribute.

Returns:



36431
36432
36433
# File 'lib/ovirtsdk4/types.rb', line 36431

def host
  @host
end

#host=(value) ⇒ Object

Sets the value of the host attribute.

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

Parameters:

  • value (Host, Hash)


36444
36445
36446
36447
36448
36449
# File 'lib/ovirtsdk4/types.rb', line 36444

def host=(value)
  if value.is_a?(Hash)
    value = Host.new(value)
  end
  @host = value
end

#idString

Returns the value of the id attribute.

Returns:

  • (String)


36456
36457
36458
# File 'lib/ovirtsdk4/types.rb', line 36456

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)


36465
36466
36467
# File 'lib/ovirtsdk4/types.rb', line 36465

def id=(value)
  @id = value
end

#indexInteger

Returns the value of the index attribute.

Returns:

  • (Integer)


36474
36475
36476
# File 'lib/ovirtsdk4/types.rb', line 36474

def index
  @index
end

#index=(value) ⇒ Object

Sets the value of the index attribute.

Parameters:

  • value (Integer)


36483
36484
36485
# File 'lib/ovirtsdk4/types.rb', line 36483

def index=(value)
  @index = value
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)


36492
36493
36494
# File 'lib/ovirtsdk4/types.rb', line 36492

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)


36501
36502
36503
# File 'lib/ovirtsdk4/types.rb', line 36501

def name=(value)
  @name = value
end

#originString

Returns the value of the origin attribute.

Returns:

  • (String)


36510
36511
36512
# File 'lib/ovirtsdk4/types.rb', line 36510

def origin
  @origin
end

#origin=(value) ⇒ Object

Sets the value of the origin attribute.

Parameters:

  • value (String)


36519
36520
36521
# File 'lib/ovirtsdk4/types.rb', line 36519

def origin=(value)
  @origin = value
end

#severityLogSeverity

Returns the value of the severity attribute.

Returns:



36528
36529
36530
# File 'lib/ovirtsdk4/types.rb', line 36528

def severity
  @severity
end

#severity=(value) ⇒ Object

Sets the value of the severity attribute.

Parameters:



36537
36538
36539
# File 'lib/ovirtsdk4/types.rb', line 36537

def severity=(value)
  @severity = value
end

#storage_domainStorageDomain

Returns the value of the storage_domain attribute.

Returns:



36546
36547
36548
# File 'lib/ovirtsdk4/types.rb', line 36546

def storage_domain
  @storage_domain
end

#storage_domain=(value) ⇒ Object

Sets the value of the storage_domain attribute.

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

Parameters:



36559
36560
36561
36562
36563
36564
# File 'lib/ovirtsdk4/types.rb', line 36559

def storage_domain=(value)
  if value.is_a?(Hash)
    value = StorageDomain.new(value)
  end
  @storage_domain = value
end

#templateTemplate

Returns the value of the template attribute.

Returns:



36571
36572
36573
# File 'lib/ovirtsdk4/types.rb', line 36571

def template
  @template
end

#template=(value) ⇒ Object

Sets the value of the template attribute.

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

Parameters:



36584
36585
36586
36587
36588
36589
# File 'lib/ovirtsdk4/types.rb', line 36584

def template=(value)
  if value.is_a?(Hash)
    value = Template.new(value)
  end
  @template = value
end

#timeDateTime

Returns the value of the time attribute.

Returns:

  • (DateTime)


36596
36597
36598
# File 'lib/ovirtsdk4/types.rb', line 36596

def time
  @time
end

#time=(value) ⇒ Object

Sets the value of the time attribute.

Parameters:

  • value (DateTime)


36605
36606
36607
# File 'lib/ovirtsdk4/types.rb', line 36605

def time=(value)
  @time = value
end

#userUser

Returns the value of the user attribute.

Returns:



36614
36615
36616
# File 'lib/ovirtsdk4/types.rb', line 36614

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.

Parameters:

  • value (User, Hash)


36627
36628
36629
36630
36631
36632
# File 'lib/ovirtsdk4/types.rb', line 36627

def user=(value)
  if value.is_a?(Hash)
    value = User.new(value)
  end
  @user = value
end

#vmVm

Returns the value of the vm attribute.

Returns:



36639
36640
36641
# File 'lib/ovirtsdk4/types.rb', line 36639

def vm
  @vm
end

#vm=(value) ⇒ Object

Sets the value of the vm attribute.

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

Parameters:

  • value (Vm, Hash)


36652
36653
36654
36655
36656
36657
# File 'lib/ovirtsdk4/types.rb', line 36652

def vm=(value)
  if value.is_a?(Hash)
    value = Vm.new(value)
  end
  @vm = value
end