Class: CandidApiClient::Tasks::V3::Types::TaskUpdateV3
- Inherits:
-
Object
- Object
- CandidApiClient::Tasks::V3::Types::TaskUpdateV3
- Defined in:
- lib/candidhealth/tasks/v_3/types/task_update_v_3.rb
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
- #assignee_user_id ⇒ String readonly
- #blocks_claim_submission ⇒ Boolean readonly
- #status ⇒ CandidApiClient::Tasks::Commons::Types::TaskStatus readonly
Class Method Summary collapse
-
.from_json(json_object:) ⇒ CandidApiClient::Tasks::V3::Types::TaskUpdateV3
Deserialize a JSON object to an instance of TaskUpdateV3.
-
.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(status: OMIT, assignee_user_id: OMIT, blocks_claim_submission: OMIT, additional_properties: nil) ⇒ CandidApiClient::Tasks::V3::Types::TaskUpdateV3 constructor
-
#to_json(*_args) ⇒ String
Serialize an instance of TaskUpdateV3 to a JSON object.
Constructor Details
#initialize(status: OMIT, assignee_user_id: OMIT, blocks_claim_submission: OMIT, additional_properties: nil) ⇒ CandidApiClient::Tasks::V3::Types::TaskUpdateV3
31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/candidhealth/tasks/v_3/types/task_update_v_3.rb', line 31 def initialize(status: OMIT, assignee_user_id: OMIT, blocks_claim_submission: OMIT, additional_properties: nil) @status = status if status != OMIT @assignee_user_id = assignee_user_id if assignee_user_id != OMIT @blocks_claim_submission = blocks_claim_submission if blocks_claim_submission != OMIT @additional_properties = additional_properties @_field_set = { "status": status, "assignee_user_id": assignee_user_id, "blocks_claim_submission": blocks_claim_submission }.reject do |_k, v| v == OMIT end end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
19 20 21 |
# File 'lib/candidhealth/tasks/v_3/types/task_update_v_3.rb', line 19 def additional_properties @additional_properties end |
#assignee_user_id ⇒ String (readonly)
15 16 17 |
# File 'lib/candidhealth/tasks/v_3/types/task_update_v_3.rb', line 15 def assignee_user_id @assignee_user_id end |
#blocks_claim_submission ⇒ Boolean (readonly)
17 18 19 |
# File 'lib/candidhealth/tasks/v_3/types/task_update_v_3.rb', line 17 def blocks_claim_submission @blocks_claim_submission end |
#status ⇒ CandidApiClient::Tasks::Commons::Types::TaskStatus (readonly)
13 14 15 |
# File 'lib/candidhealth/tasks/v_3/types/task_update_v_3.rb', line 13 def status @status end |
Class Method Details
.from_json(json_object:) ⇒ CandidApiClient::Tasks::V3::Types::TaskUpdateV3
Deserialize a JSON object to an instance of TaskUpdateV3
50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/candidhealth/tasks/v_3/types/task_update_v_3.rb', line 50 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) status = struct["status"] assignee_user_id = struct["assignee_user_id"] blocks_claim_submission = struct["blocks_claim_submission"] new( status: status, assignee_user_id: assignee_user_id, blocks_claim_submission: blocks_claim_submission, 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.
76 77 78 79 80 |
# File 'lib/candidhealth/tasks/v_3/types/task_update_v_3.rb', line 76 def self.validate_raw(obj:) obj.status&.is_a?(CandidApiClient::Tasks::Commons::Types::TaskStatus) != false || raise("Passed value for field obj.status is not the expected type, validation failed.") obj.assignee_user_id&.is_a?(String) != false || raise("Passed value for field obj.assignee_user_id is not the expected type, validation failed.") obj.blocks_claim_submission&.is_a?(Boolean) != false || raise("Passed value for field obj.blocks_claim_submission is not the expected type, validation failed.") end |
Instance Method Details
#to_json(*_args) ⇒ String
Serialize an instance of TaskUpdateV3 to a JSON object
66 67 68 |
# File 'lib/candidhealth/tasks/v_3/types/task_update_v_3.rb', line 66 def to_json(*_args) @_field_set&.to_json end |