Class: Merge::Ats::DebugModeLog
- Inherits:
-
Object
- Object
- Merge::Ats::DebugModeLog
- Defined in:
- lib/merge_ruby_client/ats/types/debug_mode_log.rb
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
- #dashboard_view ⇒ String readonly
- #log_id ⇒ String readonly
- #log_summary ⇒ Merge::Ats::DebugModelLogSummary readonly
Class Method Summary collapse
-
.from_json(json_object:) ⇒ Merge::Ats::DebugModeLog
Deserialize a JSON object to an instance of DebugModeLog.
-
.validate_raw(obj:) ⇒ Void
Leveraged for Union-type generation, validate_raw attempts to parse the given hash and check each fields type against the current object’s property definitions.
Instance Method Summary collapse
- #initialize(log_id:, dashboard_view:, log_summary:, additional_properties: nil) ⇒ Merge::Ats::DebugModeLog constructor
-
#to_json(*_args) ⇒ String
Serialize an instance of DebugModeLog to a JSON object.
Constructor Details
#initialize(log_id:, dashboard_view:, log_summary:, additional_properties: nil) ⇒ Merge::Ats::DebugModeLog
29 30 31 32 33 34 35 |
# File 'lib/merge_ruby_client/ats/types/debug_mode_log.rb', line 29 def initialize(log_id:, dashboard_view:, log_summary:, additional_properties: nil) @log_id = log_id @dashboard_view = dashboard_view @log_summary = log_summary @additional_properties = additional_properties @_field_set = { "log_id": log_id, "dashboard_view": dashboard_view, "log_summary": log_summary } end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
17 18 19 |
# File 'lib/merge_ruby_client/ats/types/debug_mode_log.rb', line 17 def additional_properties @additional_properties end |
#dashboard_view ⇒ String (readonly)
13 14 15 |
# File 'lib/merge_ruby_client/ats/types/debug_mode_log.rb', line 13 def dashboard_view @dashboard_view end |
#log_id ⇒ String (readonly)
11 12 13 |
# File 'lib/merge_ruby_client/ats/types/debug_mode_log.rb', line 11 def log_id @log_id end |
#log_summary ⇒ Merge::Ats::DebugModelLogSummary (readonly)
15 16 17 |
# File 'lib/merge_ruby_client/ats/types/debug_mode_log.rb', line 15 def log_summary @log_summary end |
Class Method Details
.from_json(json_object:) ⇒ Merge::Ats::DebugModeLog
Deserialize a JSON object to an instance of DebugModeLog
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/merge_ruby_client/ats/types/debug_mode_log.rb', line 41 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) log_id = parsed_json["log_id"] dashboard_view = parsed_json["dashboard_view"] if parsed_json["log_summary"].nil? log_summary = nil else log_summary = parsed_json["log_summary"].to_json log_summary = Merge::Ats::DebugModelLogSummary.from_json(json_object: log_summary) end new( log_id: log_id, dashboard_view: dashboard_view, log_summary: log_summary, additional_properties: struct ) end |
.validate_raw(obj:) ⇒ Void
Leveraged for Union-type generation, validate_raw attempts to parse the given
hash and check each fields type against the current object's property
definitions.
73 74 75 76 77 |
# File 'lib/merge_ruby_client/ats/types/debug_mode_log.rb', line 73 def self.validate_raw(obj:) obj.log_id.is_a?(String) != false || raise("Passed value for field obj.log_id is not the expected type, validation failed.") obj.dashboard_view.is_a?(String) != false || raise("Passed value for field obj.dashboard_view is not the expected type, validation failed.") Merge::Ats::DebugModelLogSummary.validate_raw(obj: obj.log_summary) end |
Instance Method Details
#to_json(*_args) ⇒ String
Serialize an instance of DebugModeLog to a JSON object
63 64 65 |
# File 'lib/merge_ruby_client/ats/types/debug_mode_log.rb', line 63 def to_json(*_args) @_field_set&.to_json end |