Class: OvirtSDK4::Job
- Inherits:
-
Identified
- Object
- Struct
- Identified
- OvirtSDK4::Job
- Defined in:
- lib/ovirtsdk4/types.rb,
lib/ovirtsdk4/types.rb
Instance Method Summary collapse
-
#==(other) ⇒ Object
Returns
true
ifself
andother
have the same attributes and values. -
#auto_cleared ⇒ Boolean
Returns the value of the
auto_cleared
attribute. -
#auto_cleared=(value) ⇒ Object
Sets the value of the
auto_cleared
attribute. -
#comment ⇒ String
Returns the value of the
comment
attribute. -
#comment=(value) ⇒ Object
Sets the value of the
comment
attribute. -
#description ⇒ String
Returns the value of the
description
attribute. -
#description=(value) ⇒ Object
Sets the value of the
description
attribute. -
#end_time ⇒ DateTime
Returns the value of the
end_time
attribute. -
#end_time=(value) ⇒ Object
Sets the value of the
end_time
attribute. -
#external ⇒ Boolean
Returns the value of the
external
attribute. -
#external=(value) ⇒ Object
Sets the value of the
external
attribute. -
#hash ⇒ Object
Generates a hash value for this object.
-
#id ⇒ String
Returns the value of the
id
attribute. -
#id=(value) ⇒ Object
Sets the value of the
id
attribute. -
#initialize(opts = {}) ⇒ Job
constructor
Creates a new instance of the Job class.
-
#last_updated ⇒ DateTime
Returns the value of the
last_updated
attribute. -
#last_updated=(value) ⇒ Object
Sets the value of the
last_updated
attribute. -
#name ⇒ String
Returns the value of the
name
attribute. -
#name=(value) ⇒ Object
Sets the value of the
name
attribute. -
#owner ⇒ User
Returns the value of the
owner
attribute. -
#owner=(value) ⇒ Object
Sets the value of the
owner
attribute. -
#start_time ⇒ DateTime
Returns the value of the
start_time
attribute. -
#start_time=(value) ⇒ Object
Sets the value of the
start_time
attribute. -
#status ⇒ JobStatus
Returns the value of the
status
attribute. -
#status=(value) ⇒ Object
Sets the value of the
status
attribute. -
#steps ⇒ Array<Step>
Returns the value of the
steps
attribute. -
#steps=(list) ⇒ Object
Sets the value of the
steps
attribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ Job
Creates a new instance of the OvirtSDK4::Job class.
7616 7617 7618 7619 7620 7621 7622 7623 7624 7625 7626 |
# File 'lib/ovirtsdk4/types.rb', line 7616 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 |
Instance Method Details
#==(other) ⇒ Object
Returns true
if self
and other
have the same attributes and values.
7631 7632 7633 7634 7635 7636 7637 7638 7639 7640 7641 |
# File 'lib/ovirtsdk4/types.rb', line 7631 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 ⇒ Boolean
Returns the value of the auto_cleared
attribute.
7358 7359 7360 |
# File 'lib/ovirtsdk4/types.rb', line 7358 def auto_cleared @auto_cleared end |
#auto_cleared=(value) ⇒ Object
Sets the value of the auto_cleared
attribute.
7367 7368 7369 |
# File 'lib/ovirtsdk4/types.rb', line 7367 def auto_cleared=(value) @auto_cleared = value end |
#comment ⇒ String
Returns the value of the comment
attribute.
7376 7377 7378 |
# File 'lib/ovirtsdk4/types.rb', line 7376 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
7385 7386 7387 |
# File 'lib/ovirtsdk4/types.rb', line 7385 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description
attribute.
7394 7395 7396 |
# File 'lib/ovirtsdk4/types.rb', line 7394 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
7403 7404 7405 |
# File 'lib/ovirtsdk4/types.rb', line 7403 def description=(value) @description = value end |
#end_time ⇒ DateTime
Returns the value of the end_time
attribute.
7412 7413 7414 |
# File 'lib/ovirtsdk4/types.rb', line 7412 def end_time @end_time end |
#end_time=(value) ⇒ Object
Sets the value of the end_time
attribute.
7421 7422 7423 |
# File 'lib/ovirtsdk4/types.rb', line 7421 def end_time=(value) @end_time = value end |
#external ⇒ Boolean
Returns the value of the external
attribute.
7430 7431 7432 |
# File 'lib/ovirtsdk4/types.rb', line 7430 def external @external end |
#external=(value) ⇒ Object
Sets the value of the external
attribute.
7439 7440 7441 |
# File 'lib/ovirtsdk4/types.rb', line 7439 def external=(value) @external = value end |
#hash ⇒ Object
Generates a hash value for this object.
7646 7647 7648 7649 7650 7651 7652 7653 7654 7655 7656 |
# File 'lib/ovirtsdk4/types.rb', line 7646 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 ⇒ String
Returns the value of the id
attribute.
7448 7449 7450 |
# File 'lib/ovirtsdk4/types.rb', line 7448 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
7457 7458 7459 |
# File 'lib/ovirtsdk4/types.rb', line 7457 def id=(value) @id = value end |
#last_updated ⇒ DateTime
Returns the value of the last_updated
attribute.
7466 7467 7468 |
# File 'lib/ovirtsdk4/types.rb', line 7466 def last_updated @last_updated end |
#last_updated=(value) ⇒ Object
Sets the value of the last_updated
attribute.
7475 7476 7477 |
# File 'lib/ovirtsdk4/types.rb', line 7475 def last_updated=(value) @last_updated = value end |
#name ⇒ String
Returns the value of the name
attribute.
7484 7485 7486 |
# File 'lib/ovirtsdk4/types.rb', line 7484 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
7493 7494 7495 |
# File 'lib/ovirtsdk4/types.rb', line 7493 def name=(value) @name = value end |
#owner ⇒ User
Returns the value of the owner
attribute.
7502 7503 7504 |
# File 'lib/ovirtsdk4/types.rb', line 7502 def owner @owner end |
#owner=(value) ⇒ Object
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.
7515 7516 7517 7518 7519 7520 |
# File 'lib/ovirtsdk4/types.rb', line 7515 def owner=(value) if value.is_a?(Hash) value = User.new(value) end @owner = value end |
#start_time ⇒ DateTime
Returns the value of the start_time
attribute.
7527 7528 7529 |
# File 'lib/ovirtsdk4/types.rb', line 7527 def start_time @start_time end |
#start_time=(value) ⇒ Object
Sets the value of the start_time
attribute.
7536 7537 7538 |
# File 'lib/ovirtsdk4/types.rb', line 7536 def start_time=(value) @start_time = value end |
#status ⇒ JobStatus
Returns the value of the status
attribute.
7545 7546 7547 |
# File 'lib/ovirtsdk4/types.rb', line 7545 def status @status end |
#status=(value) ⇒ Object
Sets the value of the status
attribute.
7554 7555 7556 |
# File 'lib/ovirtsdk4/types.rb', line 7554 def status=(value) @status = value end |
#steps ⇒ Array<Step>
Returns the value of the steps
attribute.
7563 7564 7565 |
# File 'lib/ovirtsdk4/types.rb', line 7563 def steps @steps end |
#steps=(list) ⇒ Object
Sets the value of the steps
attribute.
7572 7573 7574 7575 7576 7577 7578 7579 7580 7581 7582 |
# File 'lib/ovirtsdk4/types.rb', line 7572 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 |