Class: CandidApiClient::Tasks::V3::Types::TaskUpdateV3

Inherits:
Object
  • Object
show all
Defined in:
lib/candidhealth/tasks/v_3/types/task_update_v_3.rb

Constant Summary collapse

OMIT =
Object.new

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(status: OMIT, assignee_user_id: OMIT, blocks_claim_submission: OMIT, additional_properties: nil) ⇒ CandidApiClient::Tasks::V3::Types::TaskUpdateV3

Parameters:

  • status (CandidApiClient::Tasks::Commons::Types::TaskStatus) (defaults to: OMIT)
  • assignee_user_id (String) (defaults to: OMIT)
  • blocks_claim_submission (Boolean) (defaults to: OMIT)
  • additional_properties (OpenStruct) (defaults to: nil)

    Additional properties unmapped to the current class definition



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_propertiesOpenStruct (readonly)

Returns Additional properties unmapped to the current class definition.

Returns:

  • (OpenStruct)

    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_idString (readonly)

Returns:

  • (String)


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_submissionBoolean (readonly)

Returns:

  • (Boolean)


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

#statusCandidApiClient::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

Parameters:

  • json_object (String)

Returns:



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.

Parameters:

  • obj (Object)

Returns:

  • (Void)


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

Returns:

  • (String)


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