Class: OCI::DataScience::Models::PipelineStepRun
- Inherits:
-
Object
- Object
- OCI::DataScience::Models::PipelineStepRun
- Defined in:
- lib/oci/data_science/models/pipeline_step_run.rb
Overview
Detail of each StepRun. This class has direct subclasses. If you are using this class as input to a service operations then you should favor using a subclass over the base class
Direct Known Subclasses
PipelineContainerStepRun, PipelineCustomScriptStepRun, PipelineDataflowStepRun, PipelineMLJobStepRun
Constant Summary collapse
- STEP_TYPE_ENUM =
[ STEP_TYPE_ML_JOB = 'ML_JOB'.freeze, STEP_TYPE_CUSTOM_SCRIPT = 'CUSTOM_SCRIPT'.freeze, STEP_TYPE_CONTAINER = 'CONTAINER'.freeze, STEP_TYPE_DATAFLOW = 'DATAFLOW'.freeze, STEP_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- LIFECYCLE_STATE_ENUM =
[ LIFECYCLE_STATE_WAITING = 'WAITING'.freeze, LIFECYCLE_STATE_ACCEPTED = 'ACCEPTED'.freeze, LIFECYCLE_STATE_IN_PROGRESS = 'IN_PROGRESS'.freeze, LIFECYCLE_STATE_FAILED = 'FAILED'.freeze, LIFECYCLE_STATE_SUCCEEDED = 'SUCCEEDED'.freeze, LIFECYCLE_STATE_CANCELING = 'CANCELING'.freeze, LIFECYCLE_STATE_CANCELED = 'CANCELED'.freeze, LIFECYCLE_STATE_DELETED = 'DELETED'.freeze, LIFECYCLE_STATE_SKIPPED = 'SKIPPED'.freeze, LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#lifecycle_details ⇒ String
Details of the state of the step run.
-
#lifecycle_state ⇒ String
The state of the step run.
-
#step_name ⇒ String
[Required] The name of the step.
-
#step_type ⇒ String
[Required] The type of step.
-
#time_finished ⇒ DateTime
The date and time the pipeline step run finshed executing in the timestamp format defined by RFC3339.
-
#time_started ⇒ DateTime
[Required] The date and time the pipeline step run was started in the timestamp format defined by RFC3339.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.get_subtype(object_hash) ⇒ Object
Given the hash representation of a subtype of this class, use the info in the hash to return the class of the subtype.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ PipelineStepRun
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 = {}) ⇒ PipelineStepRun
Initializes the object
116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 |
# File 'lib/oci/data_science/models/pipeline_step_run.rb', line 116 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 } self.step_type = attributes[:'stepType'] if attributes[:'stepType'] raise 'You cannot provide both :stepType and :step_type' if attributes.key?(:'stepType') && attributes.key?(:'step_type') self.step_type = attributes[:'step_type'] if attributes[:'step_type'] self.time_started = attributes[:'timeStarted'] if attributes[:'timeStarted'] raise 'You cannot provide both :timeStarted and :time_started' if attributes.key?(:'timeStarted') && attributes.key?(:'time_started') self.time_started = attributes[:'time_started'] if attributes[:'time_started'] self.time_finished = attributes[:'timeFinished'] if attributes[:'timeFinished'] raise 'You cannot provide both :timeFinished and :time_finished' if attributes.key?(:'timeFinished') && attributes.key?(:'time_finished') self.time_finished = attributes[:'time_finished'] if attributes[:'time_finished'] self.step_name = attributes[:'stepName'] if attributes[:'stepName'] raise 'You cannot provide both :stepName and :step_name' if attributes.key?(:'stepName') && attributes.key?(:'step_name') self.step_name = attributes[:'step_name'] if attributes[:'step_name'] self.lifecycle_state = attributes[:'lifecycleState'] if attributes[:'lifecycleState'] raise 'You cannot provide both :lifecycleState and :lifecycle_state' if attributes.key?(:'lifecycleState') && attributes.key?(:'lifecycle_state') self.lifecycle_state = attributes[:'lifecycle_state'] if attributes[:'lifecycle_state'] self.lifecycle_details = attributes[:'lifecycleDetails'] if attributes[:'lifecycleDetails'] raise 'You cannot provide both :lifecycleDetails and :lifecycle_details' if attributes.key?(:'lifecycleDetails') && attributes.key?(:'lifecycle_details') self.lifecycle_details = attributes[:'lifecycle_details'] if attributes[:'lifecycle_details'] end |
Instance Attribute Details
#lifecycle_details ⇒ String
Details of the state of the step run.
56 57 58 |
# File 'lib/oci/data_science/models/pipeline_step_run.rb', line 56 def lifecycle_details @lifecycle_details end |
#lifecycle_state ⇒ String
The state of the step run.
52 53 54 |
# File 'lib/oci/data_science/models/pipeline_step_run.rb', line 52 def lifecycle_state @lifecycle_state end |
#step_name ⇒ String
[Required] The name of the step.
48 49 50 |
# File 'lib/oci/data_science/models/pipeline_step_run.rb', line 48 def step_name @step_name end |
#step_type ⇒ String
[Required] The type of step.
36 37 38 |
# File 'lib/oci/data_science/models/pipeline_step_run.rb', line 36 def step_type @step_type end |
#time_finished ⇒ DateTime
The date and time the pipeline step run finshed executing in the timestamp format defined by RFC3339.
44 45 46 |
# File 'lib/oci/data_science/models/pipeline_step_run.rb', line 44 def time_finished @time_finished end |
#time_started ⇒ DateTime
[Required] The date and time the pipeline step run was started in the timestamp format defined by RFC3339.
40 41 42 |
# File 'lib/oci/data_science/models/pipeline_step_run.rb', line 40 def time_started @time_started end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/oci/data_science/models/pipeline_step_run.rb', line 59 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'step_type': :'stepType', 'time_started': :'timeStarted', 'time_finished': :'timeFinished', 'step_name': :'stepName', 'lifecycle_state': :'lifecycleState', 'lifecycle_details': :'lifecycleDetails' # rubocop:enable Style/SymbolLiteral } end |
.get_subtype(object_hash) ⇒ Object
Given the hash representation of a subtype of this class, use the info in the hash to return the class of the subtype.
91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/oci/data_science/models/pipeline_step_run.rb', line 91 def self.get_subtype(object_hash) type = object_hash[:'stepType'] # rubocop:disable Style/SymbolLiteral return 'OCI::DataScience::Models::PipelineContainerStepRun' if type == 'CONTAINER' return 'OCI::DataScience::Models::PipelineCustomScriptStepRun' if type == 'CUSTOM_SCRIPT' return 'OCI::DataScience::Models::PipelineMLJobStepRun' if type == 'ML_JOB' return 'OCI::DataScience::Models::PipelineDataflowStepRun' if type == 'DATAFLOW' # TODO: Log a warning when the subtype is not found. 'OCI::DataScience::Models::PipelineStepRun' end |
.swagger_types ⇒ Object
Attribute type mapping.
73 74 75 76 77 78 79 80 81 82 83 84 |
# File 'lib/oci/data_science/models/pipeline_step_run.rb', line 73 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'step_type': :'String', 'time_started': :'DateTime', 'time_finished': :'DateTime', 'step_name': :'String', 'lifecycle_state': :'String', 'lifecycle_details': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
192 193 194 195 196 197 198 199 200 201 202 |
# File 'lib/oci/data_science/models/pipeline_step_run.rb', line 192 def ==(other) return true if equal?(other) self.class == other.class && step_type == other.step_type && time_started == other.time_started && time_finished == other.time_finished && step_name == other.step_name && lifecycle_state == other.lifecycle_state && lifecycle_details == other.lifecycle_details end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 |
# File 'lib/oci/data_science/models/pipeline_step_run.rb', line 227 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) public_method("#{key}=").call( attributes[self.class.attribute_map[key]] .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) } ) end elsif !attributes[self.class.attribute_map[key]].nil? public_method("#{key}=").call( OCI::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) ⇒ Boolean
207 208 209 |
# File 'lib/oci/data_science/models/pipeline_step_run.rb', line 207 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
216 217 218 |
# File 'lib/oci/data_science/models/pipeline_step_run.rb', line 216 def hash [step_type, time_started, time_finished, step_name, lifecycle_state, lifecycle_details].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
260 261 262 263 264 265 266 267 268 269 |
# File 'lib/oci/data_science/models/pipeline_step_run.rb', line 260 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = public_method(attr).call next if value.nil? && !instance_variable_defined?("@#{attr}") hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
254 255 256 |
# File 'lib/oci/data_science/models/pipeline_step_run.rb', line 254 def to_s to_hash.to_s end |