Class: SimpleAcp::Models::RunResumeRequest
- Defined in:
- lib/simple_acp/models/run.rb
Overview
Request body for resuming a run
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Base
#==, attribute, attributes, #hash, #initialize, own_attributes, #to_h, #to_json
Constructor Details
This class inherits a constructor from SimpleAcp::Models::Base
Class Method Details
.from_hash(hash) ⇒ Object
277 278 279 280 281 282 283 284 285 286 287 |
# File 'lib/simple_acp/models/run.rb', line 277 def self.from_hash(hash) return nil if hash.nil? instance = super if hash["await_resume"] || hash[:await_resume] instance.await_resume = AwaitResume.from_hash(hash["await_resume"] || hash[:await_resume]) end instance end |
Instance Method Details
#valid? ⇒ Boolean
289 290 291 292 293 294 295 |
# File 'lib/simple_acp/models/run.rb', line 289 def valid? return false unless Types.valid_uuid?(@run_id) return false if @await_resume.nil? return false unless Types::RunMode.valid?(@mode) true end |