Class: OvirtSDK4::KatelloErratum

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 = {}) ⇒ KatelloErratum

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

Options Hash (opts):

  • :comment (String)

    The value of attribute comment.

  • :description (String)

    The value of attribute description.

  • :host (Host, Hash)

    The value of attribute host.

  • :id (String)

    The value of attribute id.

  • :issued (DateTime)

    The value of attribute issued.

  • :name (String)

    The value of attribute name.

  • :packages (Array<Package>, Array<Hash>)

    The values of attribute packages.

  • :severity (String)

    The value of attribute severity.

  • :solution (String)

    The value of attribute solution.

  • :summary (String)

    The value of attribute summary.

  • :title (String)

    The value of attribute title.

  • :type (String)

    The value of attribute type.

  • :vm (Vm, Hash)

    The value of attribute vm.



8557
8558
8559
8560
8561
8562
8563
8564
8565
8566
8567
8568
# File 'lib/ovirtsdk4/types.rb', line 8557

def initialize(opts = {})
  super(opts)
  self.host = opts[:host]
  self.issued = opts[:issued]
  self.packages = opts[:packages]
  self.severity = opts[:severity]
  self.solution = opts[:solution]
  self.summary = opts[:summary]
  self.title = opts[:title]
  self.type = opts[:type]
  self.vm = opts[:vm]
end

Instance Method Details

#==(other) ⇒ Object

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



8573
8574
8575
8576
8577
8578
8579
8580
8581
8582
8583
8584
# File 'lib/ovirtsdk4/types.rb', line 8573

def ==(other)
  super &&
  @host == other.host &&
  @issued == other.issued &&
  @packages == other.packages &&
  @severity == other.severity &&
  @solution == other.solution &&
  @summary == other.summary &&
  @title == other.title &&
  @type == other.type &&
  @vm == other.vm
end

#commentString

Returns the value of the comment attribute.



8272
8273
8274
# File 'lib/ovirtsdk4/types.rb', line 8272

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.



8281
8282
8283
# File 'lib/ovirtsdk4/types.rb', line 8281

def comment=(value)
  @comment = value
end

#descriptionString

Returns the value of the description attribute.



8290
8291
8292
# File 'lib/ovirtsdk4/types.rb', line 8290

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.



8299
8300
8301
# File 'lib/ovirtsdk4/types.rb', line 8299

def description=(value)
  @description = value
end

#hashObject

Generates a hash value for this object.



8589
8590
8591
8592
8593
8594
8595
8596
8597
8598
8599
8600
# File 'lib/ovirtsdk4/types.rb', line 8589

def hash
  super +
  @host.hash +
  @issued.hash +
  @packages.hash +
  @severity.hash +
  @solution.hash +
  @summary.hash +
  @title.hash +
  @type.hash +
  @vm.hash
end

#hostHost

Returns the value of the host attribute.



8308
8309
8310
# File 'lib/ovirtsdk4/types.rb', line 8308

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.



8321
8322
8323
8324
8325
8326
# File 'lib/ovirtsdk4/types.rb', line 8321

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

#idString

Returns the value of the id attribute.



8333
8334
8335
# File 'lib/ovirtsdk4/types.rb', line 8333

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.



8342
8343
8344
# File 'lib/ovirtsdk4/types.rb', line 8342

def id=(value)
  @id = value
end

#issuedDateTime

Returns the value of the issued attribute.



8351
8352
8353
# File 'lib/ovirtsdk4/types.rb', line 8351

def issued
  @issued
end

#issued=(value) ⇒ Object

Sets the value of the issued attribute.



8360
8361
8362
# File 'lib/ovirtsdk4/types.rb', line 8360

def issued=(value)
  @issued = value
end

#nameString

Returns the value of the name attribute.



8369
8370
8371
# File 'lib/ovirtsdk4/types.rb', line 8369

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.



8378
8379
8380
# File 'lib/ovirtsdk4/types.rb', line 8378

def name=(value)
  @name = value
end

#packagesArray<Package>

Returns the value of the packages attribute.



8387
8388
8389
# File 'lib/ovirtsdk4/types.rb', line 8387

def packages
  @packages
end

#packages=(list) ⇒ Object

Sets the value of the packages attribute.



8396
8397
8398
8399
8400
8401
8402
8403
8404
8405
8406
# File 'lib/ovirtsdk4/types.rb', line 8396

def packages=(list)
  if list.class == Array
    list = List.new(list)
    list.each_with_index do |value, index|
      if value.is_a?(Hash)
        list[index] = Package.new(value)
      end
    end
  end
  @packages = list
end

#severityString

Returns the value of the severity attribute.



8413
8414
8415
# File 'lib/ovirtsdk4/types.rb', line 8413

def severity
  @severity
end

#severity=(value) ⇒ Object

Sets the value of the severity attribute.



8422
8423
8424
# File 'lib/ovirtsdk4/types.rb', line 8422

def severity=(value)
  @severity = value
end

#solutionString

Returns the value of the solution attribute.



8431
8432
8433
# File 'lib/ovirtsdk4/types.rb', line 8431

def solution
  @solution
end

#solution=(value) ⇒ Object

Sets the value of the solution attribute.



8440
8441
8442
# File 'lib/ovirtsdk4/types.rb', line 8440

def solution=(value)
  @solution = value
end

#summaryString

Returns the value of the summary attribute.



8449
8450
8451
# File 'lib/ovirtsdk4/types.rb', line 8449

def summary
  @summary
end

#summary=(value) ⇒ Object

Sets the value of the summary attribute.



8458
8459
8460
# File 'lib/ovirtsdk4/types.rb', line 8458

def summary=(value)
  @summary = value
end

#titleString

Returns the value of the title attribute.



8467
8468
8469
# File 'lib/ovirtsdk4/types.rb', line 8467

def title
  @title
end

#title=(value) ⇒ Object

Sets the value of the title attribute.



8476
8477
8478
# File 'lib/ovirtsdk4/types.rb', line 8476

def title=(value)
  @title = value
end

#typeString

Returns the value of the type attribute.



8485
8486
8487
# File 'lib/ovirtsdk4/types.rb', line 8485

def type
  @type
end

#type=(value) ⇒ Object

Sets the value of the type attribute.



8494
8495
8496
# File 'lib/ovirtsdk4/types.rb', line 8494

def type=(value)
  @type = value
end

#vmVm

Returns the value of the vm attribute.



8503
8504
8505
# File 'lib/ovirtsdk4/types.rb', line 8503

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.



8516
8517
8518
8519
8520
8521
# File 'lib/ovirtsdk4/types.rb', line 8516

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