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.

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):

  • :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.



20233
20234
20235
20236
20237
20238
20239
20240
20241
20242
20243
20244
20245
20246
20247
# File 'lib/ovirtsdk4/types.rb', line 20233

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.



20252
20253
20254
20255
20256
20257
20258
20259
20260
20261
20262
20263
20264
20265
20266
# File 'lib/ovirtsdk4/types.rb', line 20252

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.

Returns:

  • (String)


19881
19882
19883
# File 'lib/ovirtsdk4/types.rb', line 19881

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)


19890
19891
19892
# File 'lib/ovirtsdk4/types.rb', line 19890

def comment=(value)
  @comment = value
end

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)


19899
19900
19901
# File 'lib/ovirtsdk4/types.rb', line 19899

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)


19908
19909
19910
# File 'lib/ovirtsdk4/types.rb', line 19908

def description=(value)
  @description = value
end

#end_timeDateTime

Returns the value of the end_time attribute.

Returns:

  • (DateTime)


19917
19918
19919
# File 'lib/ovirtsdk4/types.rb', line 19917

def end_time
  @end_time
end

#end_time=(value) ⇒ Object

Sets the value of the end_time attribute.

Parameters:

  • value (DateTime)


19926
19927
19928
# File 'lib/ovirtsdk4/types.rb', line 19926

def end_time=(value)
  @end_time = value
end

#execution_hostHost

Returns the value of the execution_host attribute.

Returns:



19935
19936
19937
# File 'lib/ovirtsdk4/types.rb', line 19935

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.

Parameters:

  • value (Host, Hash)


19948
19949
19950
19951
19952
19953
# File 'lib/ovirtsdk4/types.rb', line 19948

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.

Returns:

  • (Boolean)


19960
19961
19962
# File 'lib/ovirtsdk4/types.rb', line 19960

def external
  @external
end

#external=(value) ⇒ Object

Sets the value of the external attribute.

Parameters:

  • value (Boolean)


19969
19970
19971
# File 'lib/ovirtsdk4/types.rb', line 19969

def external=(value)
  @external = value
end

#external_typeExternalSystemType

Returns the value of the external_type attribute.

Returns:



19978
19979
19980
# File 'lib/ovirtsdk4/types.rb', line 19978

def external_type
  @external_type
end

#external_type=(value) ⇒ Object

Sets the value of the external_type attribute.

Parameters:



19987
19988
19989
# File 'lib/ovirtsdk4/types.rb', line 19987

def external_type=(value)
  @external_type = value
end

#hashObject

Generates a hash value for this object.



20271
20272
20273
20274
20275
20276
20277
20278
20279
20280
20281
20282
20283
20284
20285
# File 'lib/ovirtsdk4/types.rb', line 20271

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.

Returns:

  • (String)


19996
19997
19998
# File 'lib/ovirtsdk4/types.rb', line 19996

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)


20005
20006
20007
# File 'lib/ovirtsdk4/types.rb', line 20005

def id=(value)
  @id = value
end

#jobJob

Returns the value of the job attribute.

Returns:



20014
20015
20016
# File 'lib/ovirtsdk4/types.rb', line 20014

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.

Parameters:

  • value (Job, Hash)


20027
20028
20029
20030
20031
20032
# File 'lib/ovirtsdk4/types.rb', line 20027

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

#nameString

Returns the value of the name attribute.

Returns:

  • (String)


20039
20040
20041
# File 'lib/ovirtsdk4/types.rb', line 20039

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)


20048
20049
20050
# File 'lib/ovirtsdk4/types.rb', line 20048

def name=(value)
  @name = value
end

#numberInteger

Returns the value of the number attribute.

Returns:

  • (Integer)


20057
20058
20059
# File 'lib/ovirtsdk4/types.rb', line 20057

def number
  @number
end

#number=(value) ⇒ Object

Sets the value of the number attribute.

Parameters:

  • value (Integer)


20066
20067
20068
# File 'lib/ovirtsdk4/types.rb', line 20066

def number=(value)
  @number = value
end

#parent_stepStep

Returns the value of the parent_step attribute.

Returns:



20075
20076
20077
# File 'lib/ovirtsdk4/types.rb', line 20075

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.

Parameters:

  • value (Step, Hash)


20088
20089
20090
20091
20092
20093
# File 'lib/ovirtsdk4/types.rb', line 20088

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.

Returns:

  • (Integer)


20100
20101
20102
# File 'lib/ovirtsdk4/types.rb', line 20100

def progress
  @progress
end

#progress=(value) ⇒ Object

Sets the value of the progress attribute.

Parameters:

  • value (Integer)


20109
20110
20111
# File 'lib/ovirtsdk4/types.rb', line 20109

def progress=(value)
  @progress = value
end

#start_timeDateTime

Returns the value of the start_time attribute.

Returns:

  • (DateTime)


20118
20119
20120
# File 'lib/ovirtsdk4/types.rb', line 20118

def start_time
  @start_time
end

#start_time=(value) ⇒ Object

Sets the value of the start_time attribute.

Parameters:

  • value (DateTime)


20127
20128
20129
# File 'lib/ovirtsdk4/types.rb', line 20127

def start_time=(value)
  @start_time = value
end

#statisticsArray<Statistic>

Returns the value of the statistics attribute.

Returns:



20136
20137
20138
# File 'lib/ovirtsdk4/types.rb', line 20136

def statistics
  @statistics
end

#statistics=(list) ⇒ Object

Sets the value of the statistics attribute.

Parameters:



20145
20146
20147
20148
20149
20150
20151
20152
20153
20154
20155
# File 'lib/ovirtsdk4/types.rb', line 20145

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.

Returns:



20162
20163
20164
# File 'lib/ovirtsdk4/types.rb', line 20162

def status
  @status
end

#status=(value) ⇒ Object

Sets the value of the status attribute.

Parameters:



20171
20172
20173
# File 'lib/ovirtsdk4/types.rb', line 20171

def status=(value)
  @status = value
end

#typeStepEnum

Returns the value of the type attribute.

Returns:



20180
20181
20182
# File 'lib/ovirtsdk4/types.rb', line 20180

def type
  @type
end

#type=(value) ⇒ Object

Sets the value of the type attribute.

Parameters:



20189
20190
20191
# File 'lib/ovirtsdk4/types.rb', line 20189

def type=(value)
  @type = value
end