Class: OracleBMC::LoadBalancer::Models::WorkRequest
- Inherits:
-
Object
- Object
- OracleBMC::LoadBalancer::Models::WorkRequest
- Defined in:
- lib/oraclebmc/load_balancer/models/work_request.rb
Constant Summary collapse
- LIFECYCLE_STATE_ENUM =
[LIFECYCLE_STATE_ACCEPTED = 'ACCEPTED', LIFECYCLE_STATE_IN_PROGRESS = 'IN_PROGRESS', LIFECYCLE_STATE_FAILED = 'FAILED', LIFECYCLE_STATE_SUCCEEDED = 'SUCCEEDED']
Instance Attribute Summary collapse
- #error_details ⇒ Array<OracleBMC::LoadBalancer::Models::WorkRequestError>
-
#id ⇒ String
The [OCID](docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the work request.
- #lifecycle_state ⇒ String
-
#load_balancer_id ⇒ String
The [OCID](docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer with which the work request is associated.
-
#message ⇒ String
A collection of data, related to the load balancer provisioning process, that helps with debugging in the event of failure.
-
#time_accepted ⇒ DateTime
The date and time the work request was created, in the format defined by RFC3339.
-
#time_finished ⇒ DateTime
The date and time the work request was completed, in the format defined by RFC3339.
-
#type ⇒ String
The type of action the work request represents.
Instance Method Summary collapse
-
#==(other_object) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other_object) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ WorkRequest
constructor
Initializes the object.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
Constructor Details
#initialize(attributes = {}) ⇒ WorkRequest
Initializes the object
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 |
# File 'lib/oraclebmc/load_balancer/models/work_request.rb', line 63 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v} if attributes[:'id'] self.id = attributes[:'id'] end if attributes[:'loadBalancerId'] self.load_balancer_id = attributes[:'loadBalancerId'] end if attributes[:'type'] self.type = attributes[:'type'] end if attributes[:'lifecycleState'] self.lifecycle_state = attributes[:'lifecycleState'] end if attributes[:'message'] self. = attributes[:'message'] end if attributes[:'timeAccepted'] self.time_accepted = attributes[:'timeAccepted'] end if attributes[:'timeFinished'] self.time_finished = attributes[:'timeFinished'] end if attributes[:'errorDetails'] self.error_details = attributes[:'errorDetails'] end end |
Instance Attribute Details
#error_details ⇒ Array<OracleBMC::LoadBalancer::Models::WorkRequestError>
58 59 60 |
# File 'lib/oraclebmc/load_balancer/models/work_request.rb', line 58 def error_details @error_details end |
#id ⇒ String
The [OCID](docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the work request.
15 16 17 |
# File 'lib/oraclebmc/load_balancer/models/work_request.rb', line 15 def id @id end |
#lifecycle_state ⇒ String
29 30 31 |
# File 'lib/oraclebmc/load_balancer/models/work_request.rb', line 29 def lifecycle_state @lifecycle_state end |
#load_balancer_id ⇒ String
The [OCID](docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer with which the work request is associated.
21 22 23 |
# File 'lib/oraclebmc/load_balancer/models/work_request.rb', line 21 def load_balancer_id @load_balancer_id end |
#message ⇒ String
A collection of data, related to the load balancer provisioning process, that helps with debugging in the event of failure. Possible data elements include:
-
workflow name
-
event ID
-
work request ID
-
load balancer ID
-
workflow completion message
41 42 43 |
# File 'lib/oraclebmc/load_balancer/models/work_request.rb', line 41 def @message end |
#time_accepted ⇒ DateTime
The date and time the work request was created, in the format defined by RFC3339.
Example: ‘2016-08-25T21:10:29.600Z`
48 49 50 |
# File 'lib/oraclebmc/load_balancer/models/work_request.rb', line 48 def time_accepted @time_accepted end |
#time_finished ⇒ DateTime
The date and time the work request was completed, in the format defined by RFC3339.
Example: ‘2016-08-25T21:10:29.600Z`
55 56 57 |
# File 'lib/oraclebmc/load_balancer/models/work_request.rb', line 55 def time_finished @time_finished end |
#type ⇒ String
The type of action the work request represents.
26 27 28 |
# File 'lib/oraclebmc/load_balancer/models/work_request.rb', line 26 def type @type end |
Instance Method Details
#==(other_object) ⇒ Object
Checks equality by comparing each attribute.
115 116 117 118 119 120 121 122 123 124 125 126 |
# File 'lib/oraclebmc/load_balancer/models/work_request.rb', line 115 def ==(other_object) return true if self.equal?(other_object) self.class == other_object.class && id == other_object.id && load_balancer_id == other_object.load_balancer_id && type == other_object.type && lifecycle_state == other_object.lifecycle_state && == other_object. && time_accepted == other_object.time_accepted && time_finished == other_object.time_finished && error_details == other_object.error_details end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 |
# File 'lib/oraclebmc/load_balancer/models/work_request.rb', line 143 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /^Array<(.*)>/i # check to ensure the input is an array given that the the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OracleBMC::Internal::Util.convert_to_type($1, v) } ) end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{key}=", OracleBMC::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(other_object) ⇒ Boolean
130 131 132 |
# File 'lib/oraclebmc/load_balancer/models/work_request.rb', line 130 def eql?(other_object) self == other_object end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
136 137 138 |
# File 'lib/oraclebmc/load_balancer/models/work_request.rb', line 136 def hash [id, load_balancer_id, type, lifecycle_state, , time_accepted, time_finished, error_details].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
168 169 170 171 172 173 174 175 176 |
# File 'lib/oraclebmc/load_balancer/models/work_request.rb', line 168 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) next if value.nil? hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
162 163 164 |
# File 'lib/oraclebmc/load_balancer/models/work_request.rb', line 162 def to_s to_hash.to_s end |