Class: OvirtSDK4::Step

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

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

Options Hash (opts):

  • :comment (String)

    The value of attribute comment.

  • :description (String)

    The value of attribute description.

  • :end_time (DateTime)

    The value of attribute end_time.

  • :execution_host (Host, Hash)

    The value of attribute execution_host.

  • :external (Boolean)

    The value of attribute external.

  • :external_type (ExternalSystemType)

    The value of attribute external_type.

  • :id (String)

    The value of attribute id.

  • :job (Job, Hash)

    The value of attribute job.

  • :name (String)

    The value of attribute name.

  • :number (Integer)

    The value of attribute number.

  • :parent_step (Step, Hash)

    The value of attribute parent_step.

  • :progress (Integer)

    The value of attribute progress.

  • :start_time (DateTime)

    The value of attribute start_time.

  • :statistics (Array<Statistic>, Array<Hash>)

    The values of attribute statistics.

  • :status (StepStatus)

    The value of attribute status.

  • :type (StepEnum)

    The value of attribute type.



21404
21405
21406
21407
21408
21409
21410
21411
21412
21413
21414
21415
21416
21417
21418
# File 'lib/ovirtsdk4/types.rb', line 21404

def initialize(opts = {})
  super(opts)
  self.end_time = opts[:end_time]
  self.execution_host = opts[:execution_host]
  self.external = opts[:external]
  self.external_type = opts[:external_type]
  self.job = opts[:job]
  self.number = opts[:number]
  self.parent_step = opts[:parent_step]
  self.progress = opts[:progress]
  self.start_time = opts[:start_time]
  self.statistics = opts[:statistics]
  self.status = opts[:status]
  self.type = opts[:type]
end

Instance Method Details

#==(other) ⇒ Object

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



21423
21424
21425
21426
21427
21428
21429
21430
21431
21432
21433
21434
21435
21436
21437
# File 'lib/ovirtsdk4/types.rb', line 21423

def ==(other)
  super &&
  @end_time == other.end_time &&
  @execution_host == other.execution_host &&
  @external == other.external &&
  @external_type == other.external_type &&
  @job == other.job &&
  @number == other.number &&
  @parent_step == other.parent_step &&
  @progress == other.progress &&
  @start_time == other.start_time &&
  @statistics == other.statistics &&
  @status == other.status &&
  @type == other.type
end

#commentString

Returns the value of the comment attribute.



21052
21053
21054
# File 'lib/ovirtsdk4/types.rb', line 21052

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.



21061
21062
21063
# File 'lib/ovirtsdk4/types.rb', line 21061

def comment=(value)
  @comment = value
end

#descriptionString

Returns the value of the description attribute.



21070
21071
21072
# File 'lib/ovirtsdk4/types.rb', line 21070

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.



21079
21080
21081
# File 'lib/ovirtsdk4/types.rb', line 21079

def description=(value)
  @description = value
end

#end_timeDateTime

Returns the value of the end_time attribute.



21088
21089
21090
# File 'lib/ovirtsdk4/types.rb', line 21088

def end_time
  @end_time
end

#end_time=(value) ⇒ Object

Sets the value of the end_time attribute.



21097
21098
21099
# File 'lib/ovirtsdk4/types.rb', line 21097

def end_time=(value)
  @end_time = value
end

#execution_hostHost

Returns the value of the execution_host attribute.



21106
21107
21108
# File 'lib/ovirtsdk4/types.rb', line 21106

def execution_host
  @execution_host
end

#execution_host=(value) ⇒ Object

Sets the value of the execution_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.



21119
21120
21121
21122
21123
21124
# File 'lib/ovirtsdk4/types.rb', line 21119

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

#externalBoolean

Returns the value of the external attribute.



21131
21132
21133
# File 'lib/ovirtsdk4/types.rb', line 21131

def external
  @external
end

#external=(value) ⇒ Object

Sets the value of the external attribute.



21140
21141
21142
# File 'lib/ovirtsdk4/types.rb', line 21140

def external=(value)
  @external = value
end

#external_typeExternalSystemType

Returns the value of the external_type attribute.



21149
21150
21151
# File 'lib/ovirtsdk4/types.rb', line 21149

def external_type
  @external_type
end

#external_type=(value) ⇒ Object

Sets the value of the external_type attribute.



21158
21159
21160
# File 'lib/ovirtsdk4/types.rb', line 21158

def external_type=(value)
  @external_type = value
end

#hashObject

Generates a hash value for this object.



21442
21443
21444
21445
21446
21447
21448
21449
21450
21451
21452
21453
21454
21455
21456
# File 'lib/ovirtsdk4/types.rb', line 21442

def hash
  super +
  @end_time.hash +
  @execution_host.hash +
  @external.hash +
  @external_type.hash +
  @job.hash +
  @number.hash +
  @parent_step.hash +
  @progress.hash +
  @start_time.hash +
  @statistics.hash +
  @status.hash +
  @type.hash
end

#idString

Returns the value of the id attribute.



21167
21168
21169
# File 'lib/ovirtsdk4/types.rb', line 21167

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.



21176
21177
21178
# File 'lib/ovirtsdk4/types.rb', line 21176

def id=(value)
  @id = value
end

#jobJob

Returns the value of the job attribute.



21185
21186
21187
# File 'lib/ovirtsdk4/types.rb', line 21185

def job
  @job
end

#job=(value) ⇒ Object

Sets the value of the job attribute.

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



21198
21199
21200
21201
21202
21203
# File 'lib/ovirtsdk4/types.rb', line 21198

def job=(value)
  if value.is_a?(Hash)
    value = Job.new(value)
  end
  @job = value
end

#nameString

Returns the value of the name attribute.



21210
21211
21212
# File 'lib/ovirtsdk4/types.rb', line 21210

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.



21219
21220
21221
# File 'lib/ovirtsdk4/types.rb', line 21219

def name=(value)
  @name = value
end

#numberInteger

Returns the value of the number attribute.



21228
21229
21230
# File 'lib/ovirtsdk4/types.rb', line 21228

def number
  @number
end

#number=(value) ⇒ Object

Sets the value of the number attribute.



21237
21238
21239
# File 'lib/ovirtsdk4/types.rb', line 21237

def number=(value)
  @number = value
end

#parent_stepStep

Returns the value of the parent_step attribute.



21246
21247
21248
# File 'lib/ovirtsdk4/types.rb', line 21246

def parent_step
  @parent_step
end

#parent_step=(value) ⇒ Object

Sets the value of the parent_step attribute.

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



21259
21260
21261
21262
21263
21264
# File 'lib/ovirtsdk4/types.rb', line 21259

def parent_step=(value)
  if value.is_a?(Hash)
    value = Step.new(value)
  end
  @parent_step = value
end

#progressInteger

Returns the value of the progress attribute.



21271
21272
21273
# File 'lib/ovirtsdk4/types.rb', line 21271

def progress
  @progress
end

#progress=(value) ⇒ Object

Sets the value of the progress attribute.



21280
21281
21282
# File 'lib/ovirtsdk4/types.rb', line 21280

def progress=(value)
  @progress = value
end

#start_timeDateTime

Returns the value of the start_time attribute.



21289
21290
21291
# File 'lib/ovirtsdk4/types.rb', line 21289

def start_time
  @start_time
end

#start_time=(value) ⇒ Object

Sets the value of the start_time attribute.



21298
21299
21300
# File 'lib/ovirtsdk4/types.rb', line 21298

def start_time=(value)
  @start_time = value
end

#statisticsArray<Statistic>

Returns the value of the statistics attribute.



21307
21308
21309
# File 'lib/ovirtsdk4/types.rb', line 21307

def statistics
  @statistics
end

#statistics=(list) ⇒ Object

Sets the value of the statistics attribute.



21316
21317
21318
21319
21320
21321
21322
21323
21324
21325
21326
# File 'lib/ovirtsdk4/types.rb', line 21316

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

#statusStepStatus

Returns the value of the status attribute.



21333
21334
21335
# File 'lib/ovirtsdk4/types.rb', line 21333

def status
  @status
end

#status=(value) ⇒ Object

Sets the value of the status attribute.



21342
21343
21344
# File 'lib/ovirtsdk4/types.rb', line 21342

def status=(value)
  @status = value
end

#typeStepEnum

Returns the value of the type attribute.



21351
21352
21353
# File 'lib/ovirtsdk4/types.rb', line 21351

def type
  @type
end

#type=(value) ⇒ Object

Sets the value of the type attribute.



21360
21361
21362
# File 'lib/ovirtsdk4/types.rb', line 21360

def type=(value)
  @type = value
end