class OvirtSDK4::Job

Public Class Methods

new(opts = {}) click to toggle source

Creates a new instance of the {Job} class.

@param opts [Hash] 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.

@option opts [Boolean] :auto_cleared The value of attribute `auto_cleared`.

@option opts [String] :comment The value of attribute `comment`.

@option opts [String] :description The value of attribute `description`.

@option opts [DateTime] :end_time The value of attribute `end_time`.

@option opts [Boolean] :external The value of attribute `external`.

@option opts [String] :id The value of attribute `id`.

@option opts [DateTime] :last_updated The value of attribute `last_updated`.

@option opts [String] :name The value of attribute `name`.

@option opts [User, Hash] :owner The value of attribute `owner`.

@option opts [DateTime] :start_time The value of attribute `start_time`.

@option opts [JobStatus] :status The value of attribute `status`.

@option opts [Array<Step>, Array<Hash>] :steps The values of attribute `steps`.

Calls superclass method OvirtSDK4::Identified.new
# File lib/ovirtsdk4/types.rb, line 7176
def initialize(opts = {})
  super(opts)
  self.auto_cleared = opts[:auto_cleared]
  self.end_time = opts[:end_time]
  self.external = opts[:external]
  self.last_updated = opts[:last_updated]
  self.owner = opts[:owner]
  self.start_time = opts[:start_time]
  self.status = opts[:status]
  self.steps = opts[:steps]
end

Public Instance Methods

==(other) click to toggle source

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

Calls superclass method OvirtSDK4::Identified#==
# File lib/ovirtsdk4/types.rb, line 7191
def ==(other)
  super &&
  @auto_cleared == other.auto_cleared &&
  @end_time == other.end_time &&
  @external == other.external &&
  @last_updated == other.last_updated &&
  @owner == other.owner &&
  @start_time == other.start_time &&
  @status == other.status &&
  @steps == other.steps
end
auto_cleared() click to toggle source

Returns the value of the `auto_cleared` attribute.

@return [Boolean]

# File lib/ovirtsdk4/types.rb, line 6918
def auto_cleared
  @auto_cleared
end
auto_cleared=(value) click to toggle source

Sets the value of the `auto_cleared` attribute.

@param value [Boolean]

# File lib/ovirtsdk4/types.rb, line 6927
def auto_cleared=(value)
  @auto_cleared = value
end
comment() click to toggle source

Returns the value of the `comment` attribute.

@return [String]

# File lib/ovirtsdk4/types.rb, line 6936
def comment
  @comment
end
comment=(value) click to toggle source

Sets the value of the `comment` attribute.

@param value [String]

# File lib/ovirtsdk4/types.rb, line 6945
def comment=(value)
  @comment = value
end
description() click to toggle source

Returns the value of the `description` attribute.

@return [String]

# File lib/ovirtsdk4/types.rb, line 6954
def description
  @description
end
description=(value) click to toggle source

Sets the value of the `description` attribute.

@param value [String]

# File lib/ovirtsdk4/types.rb, line 6963
def description=(value)
  @description = value
end
end_time() click to toggle source

Returns the value of the `end_time` attribute.

@return [DateTime]

# File lib/ovirtsdk4/types.rb, line 6972
def end_time
  @end_time
end
end_time=(value) click to toggle source

Sets the value of the `end_time` attribute.

@param value [DateTime]

# File lib/ovirtsdk4/types.rb, line 6981
def end_time=(value)
  @end_time = value
end
external() click to toggle source

Returns the value of the `external` attribute.

@return [Boolean]

# File lib/ovirtsdk4/types.rb, line 6990
def external
  @external
end
external=(value) click to toggle source

Sets the value of the `external` attribute.

@param value [Boolean]

# File lib/ovirtsdk4/types.rb, line 6999
def external=(value)
  @external = value
end
hash() click to toggle source

Generates a hash value for this object.

Calls superclass method OvirtSDK4::Identified#hash
# File lib/ovirtsdk4/types.rb, line 7206
def hash
  super +
  @auto_cleared.hash +
  @end_time.hash +
  @external.hash +
  @last_updated.hash +
  @owner.hash +
  @start_time.hash +
  @status.hash +
  @steps.hash
end
id() click to toggle source

Returns the value of the `id` attribute.

@return [String]

# File lib/ovirtsdk4/types.rb, line 7008
def id
  @id
end
id=(value) click to toggle source

Sets the value of the `id` attribute.

@param value [String]

# File lib/ovirtsdk4/types.rb, line 7017
def id=(value)
  @id = value
end
last_updated() click to toggle source

Returns the value of the `last_updated` attribute.

@return [DateTime]

# File lib/ovirtsdk4/types.rb, line 7026
def last_updated
  @last_updated
end
last_updated=(value) click to toggle source

Sets the value of the `last_updated` attribute.

@param value [DateTime]

# File lib/ovirtsdk4/types.rb, line 7035
def last_updated=(value)
  @last_updated = value
end
name() click to toggle source

Returns the value of the `name` attribute.

@return [String]

# File lib/ovirtsdk4/types.rb, line 7044
def name
  @name
end
name=(value) click to toggle source

Sets the value of the `name` attribute.

@param value [String]

# File lib/ovirtsdk4/types.rb, line 7053
def name=(value)
  @name = value
end
owner() click to toggle source

Returns the value of the `owner` attribute.

@return [User]

# File lib/ovirtsdk4/types.rb, line 7062
def owner
  @owner
end
owner=(value) click to toggle source

Sets the value of the `owner` attribute.

@param value [User, Hash]

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

# File lib/ovirtsdk4/types.rb, line 7075
def owner=(value)
  if value.is_a?(Hash)
    value = User.new(value)
  end
  @owner = value
end
start_time() click to toggle source

Returns the value of the `start_time` attribute.

@return [DateTime]

# File lib/ovirtsdk4/types.rb, line 7087
def start_time
  @start_time
end
start_time=(value) click to toggle source

Sets the value of the `start_time` attribute.

@param value [DateTime]

# File lib/ovirtsdk4/types.rb, line 7096
def start_time=(value)
  @start_time = value
end
status() click to toggle source

Returns the value of the `status` attribute.

@return [JobStatus]

# File lib/ovirtsdk4/types.rb, line 7105
def status
  @status
end
status=(value) click to toggle source

Sets the value of the `status` attribute.

@param value [JobStatus]

# File lib/ovirtsdk4/types.rb, line 7114
def status=(value)
  @status = value
end
steps() click to toggle source

Returns the value of the `steps` attribute.

@return [Array<Step>]

# File lib/ovirtsdk4/types.rb, line 7123
def steps
  @steps
end
steps=(list) click to toggle source

Sets the value of the `steps` attribute.

@param list [Array<Step>]

# File lib/ovirtsdk4/types.rb, line 7132
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