Class: OvirtSDK4::Job

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

Instance Method Summary (collapse)

Methods included from Type

#href, #href=

Constructor Details

- (Job) initialize(opts = {})

Creates a new instance of the OvirtSDK4::Job 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):

  • :auto_cleared (Boolean)

    The value of attribute auto_cleared.

  • :comment (String)

    The value of attribute comment.

  • :description (String)

    The value of attribute description.

  • :end_time (DateTime)

    The value of attribute end_time.

  • :external (Boolean)

    The value of attribute external.

  • :id (String)

    The value of attribute id.

  • :last_updated (DateTime)

    The value of attribute last_updated.

  • :name (String)

    The value of attribute name.

  • :owner (User, Hash)

    The value of attribute owner.

  • :start_time (DateTime)

    The value of attribute start_time.

  • :status (JobStatus)

    The value of attribute status.

  • :steps (Array<Step>, Array<Hash>)

    The values of attribute steps.



5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
# File 'lib/ovirtsdk4/types.rb', line 5342

def initialize(opts = {})
  super(opts)
  self.auto_cleared = opts[:auto_cleared]
  self.comment = opts[:comment]
  self.description = opts[:description]
  self.end_time = opts[:end_time]
  self.external = opts[:external]
  self.id = opts[:id]
  self.last_updated = opts[:last_updated]
  self.name = opts[:name]
  self.owner = opts[:owner]
  self.start_time = opts[:start_time]
  self.status = opts[:status]
  self.steps = opts[:steps]
end

Instance Method Details

- (Boolean) auto_cleared

Returns the value of the auto_cleared attribute.

Returns:

  • (Boolean)


5085
5086
5087
# File 'lib/ovirtsdk4/types.rb', line 5085

def auto_cleared
  return @auto_cleared
end

- (Object) auto_cleared=(value)

Sets the value of the auto_cleared attribute.

Parameters:

  • value (Boolean)


5094
5095
5096
# File 'lib/ovirtsdk4/types.rb', line 5094

def auto_cleared=(value)
  @auto_cleared = value
end

- (String) comment

Returns the value of the comment attribute.

Returns:

  • (String)


5103
5104
5105
# File 'lib/ovirtsdk4/types.rb', line 5103

def comment
  return @comment
end

- (Object) comment=(value)

Sets the value of the comment attribute.

Parameters:

  • value (String)


5112
5113
5114
# File 'lib/ovirtsdk4/types.rb', line 5112

def comment=(value)
  @comment = value
end

- (String) description

Returns the value of the description attribute.

Returns:

  • (String)


5121
5122
5123
# File 'lib/ovirtsdk4/types.rb', line 5121

def description
  return @description
end

- (Object) description=(value)

Sets the value of the description attribute.

Parameters:

  • value (String)


5130
5131
5132
# File 'lib/ovirtsdk4/types.rb', line 5130

def description=(value)
  @description = value
end

- (DateTime) end_time

Returns the value of the end_time attribute.

Returns:

  • (DateTime)


5139
5140
5141
# File 'lib/ovirtsdk4/types.rb', line 5139

def end_time
  return @end_time
end

- (Object) end_time=(value)

Sets the value of the end_time attribute.

Parameters:

  • value (DateTime)


5148
5149
5150
# File 'lib/ovirtsdk4/types.rb', line 5148

def end_time=(value)
  @end_time = value
end

- (Boolean) external

Returns the value of the external attribute.

Returns:

  • (Boolean)


5157
5158
5159
# File 'lib/ovirtsdk4/types.rb', line 5157

def external
  return @external
end

- (Object) external=(value)

Sets the value of the external attribute.

Parameters:

  • value (Boolean)


5166
5167
5168
# File 'lib/ovirtsdk4/types.rb', line 5166

def external=(value)
  @external = value
end

- (String) id

Returns the value of the id attribute.

Returns:

  • (String)


5175
5176
5177
# File 'lib/ovirtsdk4/types.rb', line 5175

def id
  return @id
end

- (Object) id=(value)

Sets the value of the id attribute.

Parameters:

  • value (String)


5184
5185
5186
# File 'lib/ovirtsdk4/types.rb', line 5184

def id=(value)
  @id = value
end

- (DateTime) last_updated

Returns the value of the last_updated attribute.

Returns:

  • (DateTime)


5193
5194
5195
# File 'lib/ovirtsdk4/types.rb', line 5193

def last_updated
  return @last_updated
end

- (Object) last_updated=(value)

Sets the value of the last_updated attribute.

Parameters:

  • value (DateTime)


5202
5203
5204
# File 'lib/ovirtsdk4/types.rb', line 5202

def last_updated=(value)
  @last_updated = value
end

- (String) name

Returns the value of the name attribute.

Returns:

  • (String)


5211
5212
5213
# File 'lib/ovirtsdk4/types.rb', line 5211

def name
  return @name
end

- (Object) name=(value)

Sets the value of the name attribute.

Parameters:

  • value (String)


5220
5221
5222
# File 'lib/ovirtsdk4/types.rb', line 5220

def name=(value)
  @name = value
end

- (User) owner

Returns the value of the owner attribute.

Returns:



5229
5230
5231
# File 'lib/ovirtsdk4/types.rb', line 5229

def owner
  return @owner
end

- (Object) owner=(value)

Sets the value of the owner 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)


5242
5243
5244
5245
5246
5247
# File 'lib/ovirtsdk4/types.rb', line 5242

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

- (DateTime) start_time

Returns the value of the start_time attribute.

Returns:

  • (DateTime)


5254
5255
5256
# File 'lib/ovirtsdk4/types.rb', line 5254

def start_time
  return @start_time
end

- (Object) start_time=(value)

Sets the value of the start_time attribute.

Parameters:

  • value (DateTime)


5263
5264
5265
# File 'lib/ovirtsdk4/types.rb', line 5263

def start_time=(value)
  @start_time = value
end

- (JobStatus) status

Returns the value of the status attribute.

Returns:



5272
5273
5274
# File 'lib/ovirtsdk4/types.rb', line 5272

def status
  return @status
end

- (Object) status=(value)

Sets the value of the status attribute.

Parameters:



5281
5282
5283
# File 'lib/ovirtsdk4/types.rb', line 5281

def status=(value)
  @status = value
end

- (Array<Step>) steps

Returns the value of the steps attribute.

Returns:



5290
5291
5292
# File 'lib/ovirtsdk4/types.rb', line 5290

def steps
  return @steps
end

- (Object) steps=(list)

Sets the value of the steps attribute.

Parameters:

  • list (Array<Step>)


5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
# File 'lib/ovirtsdk4/types.rb', line 5298

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