lingara 0.2.0.pre.alpha.6 → 0.3.0.pre.alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (150) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +17 -0
  3. data/lib/lingara/client.rb +17 -2
  4. data/lib/lingara/minted_token.rb +33 -7
  5. data/lib/lingara/models/activate_canvas_request.rb +1 -1
  6. data/lib/lingara/models/activate_dialogue_request.rb +1 -1
  7. data/lib/lingara/models/allowance_row.rb +1 -1
  8. data/lib/lingara/models/app_context_slice.rb +1 -1
  9. data/lib/lingara/models/app_disabled_data.rb +1 -1
  10. data/lib/lingara/models/app_enabled_data.rb +1 -1
  11. data/lib/lingara/models/app_installed_data.rb +1 -1
  12. data/lib/lingara/models/app_uninstalled_data.rb +1 -1
  13. data/lib/lingara/models/atom_kind.rb +44 -0
  14. data/lib/lingara/models/beat.rb +389 -0
  15. data/lib/lingara/models/canvas.rb +1 -1
  16. data/lib/lingara/models/canvas_activation_outcome.rb +1 -1
  17. data/lib/lingara/models/canvas_active.rb +1 -1
  18. data/lib/lingara/models/canvas_definition.rb +1 -1
  19. data/lib/lingara/models/canvas_draft.rb +1 -1
  20. data/lib/lingara/models/canvas_dry_run.rb +1 -1
  21. data/lib/lingara/models/canvas_edge.rb +1 -1
  22. data/lib/lingara/models/canvas_made_object.rb +1 -1
  23. data/lib/lingara/models/canvas_node.rb +1 -1
  24. data/lib/lingara/models/canvas_node_kind.rb +1 -1
  25. data/lib/lingara/models/canvas_object_ref.rb +1 -1
  26. data/lib/lingara/models/canvas_page.rb +1 -1
  27. data/lib/lingara/models/canvas_param.rb +1 -1
  28. data/lib/lingara/models/canvas_plan.rb +1 -1
  29. data/lib/lingara/models/canvas_recipe.rb +1 -1
  30. data/lib/lingara/models/canvas_summary.rb +1 -1
  31. data/lib/lingara/models/canvas_verdict.rb +1 -1
  32. data/lib/lingara/models/canvas_verdict_kind.rb +1 -1
  33. data/lib/lingara/models/create_canvas_request.rb +1 -1
  34. data/lib/lingara/models/create_dialogue_request.rb +2 -2
  35. data/lib/lingara/models/create_lesson_plan_event_error.rb +1 -1
  36. data/lib/lingara/models/create_lesson_plan_event_phase.rb +1 -1
  37. data/lib/lingara/models/create_lesson_plan_event_result.rb +1 -1
  38. data/lib/lingara/models/create_lesson_plan_event_started.rb +1 -1
  39. data/lib/lingara/models/dialogue.rb +1 -1
  40. data/lib/lingara/models/dialogue_active.rb +2 -2
  41. data/lib/lingara/models/dialogue_draft.rb +2 -2
  42. data/lib/lingara/models/dialogue_entry.rb +1 -1
  43. data/lib/lingara/models/dialogue_npc.rb +17 -6
  44. data/lib/lingara/models/dialogue_page.rb +1 -1
  45. data/lib/lingara/models/dialogue_plan_request.rb +620 -0
  46. data/lib/lingara/models/dialogue_plan_response.rb +105 -0
  47. data/lib/lingara/models/dialogue_plan_response_one_of.rb +287 -0
  48. data/lib/lingara/models/dialogue_plan_response_one_of1.rb +287 -0
  49. data/lib/lingara/models/dialogue_rule.rb +6 -2
  50. data/lib/lingara/models/dialogue_summary.rb +1 -1
  51. data/lib/lingara/models/dialogue_transition.rb +1 -1
  52. data/lib/lingara/models/dialogue_turn_request.rb +1 -1
  53. data/lib/lingara/models/dialogue_warning.rb +1 -1
  54. data/lib/lingara/models/dialogue_warning_code.rb +5 -2
  55. data/lib/lingara/models/embed_player_link.rb +1 -1
  56. data/lib/lingara/models/embed_token.rb +16 -5
  57. data/lib/lingara/models/embed_token_request.rb +43 -6
  58. data/lib/lingara/models/error_envelope.rb +1 -1
  59. data/lib/lingara/models/event_envelope.rb +1 -1
  60. data/lib/lingara/models/event_page.rb +1 -1
  61. data/lib/lingara/models/exit.rb +247 -0
  62. data/lib/lingara/models/fact_value.rb +1 -1
  63. data/lib/lingara/models/generate_vocabulary_event_done.rb +1 -1
  64. data/lib/lingara/models/generate_vocabulary_event_error.rb +1 -1
  65. data/lib/lingara/models/generate_vocabulary_event_item.rb +1 -1
  66. data/lib/lingara/models/generate_vocabulary_event_started.rb +1 -1
  67. data/lib/lingara/models/graph_checkpoint.rb +40 -5
  68. data/lib/lingara/models/graph_edge.rb +1 -1
  69. data/lib/lingara/models/inbound_event_accepted.rb +1 -1
  70. data/lib/lingara/models/kept_reason.rb +43 -0
  71. data/lib/lingara/models/lesson_plan.rb +1 -1
  72. data/lib/lingara/models/lesson_plan_content.rb +1 -1
  73. data/lib/lingara/models/lesson_plan_create_request.rb +1 -1
  74. data/lib/lingara/models/lesson_plan_failed_data.rb +1 -1
  75. data/lib/lingara/models/lesson_plan_ready_data.rb +1 -1
  76. data/lib/lingara/models/link_status.rb +1 -1
  77. data/lib/lingara/models/notice.rb +1 -1
  78. data/lib/lingara/models/npc.rb +1 -1
  79. data/lib/lingara/models/npc_disposition.rb +299 -0
  80. data/lib/lingara/models/npc_language.rb +1 -1
  81. data/lib/lingara/models/pedagogy.rb +1 -1
  82. data/lib/lingara/models/plan_fail_reason.rb +1 -1
  83. data/lib/lingara/models/plan_fragment.rb +265 -0
  84. data/lib/lingara/models/plan_pending.rb +1 -1
  85. data/lib/lingara/models/plan_phase.rb +1 -1
  86. data/lib/lingara/models/plan_question.rb +1 -1
  87. data/lib/lingara/models/plan_ready_status.rb +1 -1
  88. data/lib/lingara/models/plan_reason.rb +42 -0
  89. data/lib/lingara/models/plan_result.rb +1 -1
  90. data/lib/lingara/models/plan_set.rb +1 -1
  91. data/lib/lingara/models/plan_started.rb +1 -1
  92. data/lib/lingara/models/plan_status.rb +1 -1
  93. data/lib/lingara/models/plan_word.rb +1 -1
  94. data/lib/lingara/models/practice_completed_data.rb +1 -1
  95. data/lib/lingara/models/practice_item.rb +1 -1
  96. data/lib/lingara/models/practice_outcome.rb +1 -1
  97. data/lib/lingara/models/reaction_report.rb +1 -1
  98. data/lib/lingara/models/reaction_status.rb +1 -1
  99. data/lib/lingara/models/rename_canvas_request.rb +1 -1
  100. data/lib/lingara/models/rename_dialogue_request.rb +1 -1
  101. data/lib/lingara/models/save_canvas_draft_request.rb +1 -1
  102. data/lib/lingara/models/save_dialogue_draft_request.rb +2 -2
  103. data/lib/lingara/models/send_dialogue_turn_event_delta.rb +1 -1
  104. data/lib/lingara/models/send_dialogue_turn_event_done.rb +1 -1
  105. data/lib/lingara/models/send_dialogue_turn_event_error.rb +1 -1
  106. data/lib/lingara/models/send_dialogue_turn_event_notice.rb +1 -1
  107. data/lib/lingara/models/send_dialogue_turn_event_transition.rb +1 -1
  108. data/lib/lingara/models/send_tutor_message_event_delta.rb +1 -1
  109. data/lib/lingara/models/send_tutor_message_event_done.rb +1 -1
  110. data/lib/lingara/models/send_tutor_message_event_error.rb +1 -1
  111. data/lib/lingara/models/send_tutor_message_event_notice.rb +1 -1
  112. data/lib/lingara/models/speaker.rb +1 -1
  113. data/lib/lingara/models/stream_error.rb +1 -1
  114. data/lib/lingara/models/stream_events_event_done.rb +1 -1
  115. data/lib/lingara/models/stream_events_event_error.rb +1 -1
  116. data/lib/lingara/models/stream_events_event_event.rb +1 -1
  117. data/lib/lingara/models/stream_lesson_plan_event_error.rb +1 -1
  118. data/lib/lingara/models/stream_lesson_plan_event_pending.rb +1 -1
  119. data/lib/lingara/models/stream_lesson_plan_event_phase.rb +1 -1
  120. data/lib/lingara/models/stream_lesson_plan_event_result.rb +1 -1
  121. data/lib/lingara/models/stream_lesson_plan_event_started.rb +1 -1
  122. data/lib/lingara/models/threshold_scope.rb +1 -1
  123. data/lib/lingara/models/turn_delta.rb +1 -1
  124. data/lib/lingara/models/turn_entry.rb +1 -1
  125. data/lib/lingara/models/turn_role.rb +1 -1
  126. data/lib/lingara/models/tutor_turn_request.rb +1 -1
  127. data/lib/lingara/models/update_available.rb +279 -0
  128. data/lib/lingara/models/usage.rb +1 -1
  129. data/lib/lingara/models/usage_ledger.rb +1 -1
  130. data/lib/lingara/models/usage_threshold_reached_data.rb +1 -1
  131. data/lib/lingara/models/version_detail.rb +1 -1
  132. data/lib/lingara/models/version_history_entry.rb +1 -1
  133. data/lib/lingara/models/version_list.rb +1 -1
  134. data/lib/lingara/models/version_spec.rb +1 -1
  135. data/lib/lingara/models/version_state.rb +1 -1
  136. data/lib/lingara/models/version_summary.rb +1 -1
  137. data/lib/lingara/models/visited_beat.rb +269 -0
  138. data/lib/lingara/models/vocab_example.rb +1 -1
  139. data/lib/lingara/models/vocab_item.rb +1 -1
  140. data/lib/lingara/models/vocab_meta.rb +1 -1
  141. data/lib/lingara/models/vocab_request.rb +1 -1
  142. data/lib/lingara/models/vocab_started.rb +1 -1
  143. data/lib/lingara/models/world_context_changed.rb +1 -1
  144. data/lib/lingara/models/world_practice_completed.rb +1 -1
  145. data/lib/lingara/models/world_practice_requested.rb +1 -1
  146. data/lib/lingara/operations.rb +9 -0
  147. data/lib/lingara/response.rb +6 -1
  148. data/lib/lingara/version.rb +3 -3
  149. data/sig/lingara.rbs +7 -1
  150. metadata +15 -2
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Generate vocabulary lists and lesson plans, and hold tutor conversations, in the languages Lingara teaches. Each call is paid for by the client that makes it: an `allowance` client spends its owner's allowance, and a `metered` client is billed for its usage.
5
5
 
6
- The version of the OpenAPI document: 2026-10-simple-tarpon
6
+ The version of the OpenAPI document: 2026-10-dauntless-hoopoe
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.14.0
@@ -21,12 +21,16 @@ module Lingara
21
21
 
22
22
  attr_accessor :may_disclose
23
23
 
24
+ # The one outcome the character should drive toward, as plain-language text. The other edges are never shown to it.
25
+ attr_accessor :steer
26
+
24
27
  # Attribute mapping from ruby-style variable name to JSON key.
25
28
  def self.attribute_map
26
29
  {
27
30
  :'id' => :'id',
28
31
  :'goal' => :'goal',
29
- :'may_disclose' => :'may_disclose'
32
+ :'may_disclose' => :'may_disclose',
33
+ :'steer' => :'steer'
30
34
  }
31
35
  end
32
36
 
@@ -45,13 +49,15 @@ module Lingara
45
49
  {
46
50
  :'id' => :'String',
47
51
  :'goal' => :'String',
48
- :'may_disclose' => :'Array<String>'
52
+ :'may_disclose' => :'Array<String>',
53
+ :'steer' => :'String'
49
54
  }
50
55
  end
51
56
 
52
57
  # List of attributes with nullable: true
53
58
  def self.openapi_nullable
54
59
  Set.new([
60
+ :'steer'
55
61
  ])
56
62
  end
57
63
 
@@ -88,6 +94,10 @@ module Lingara
88
94
  self.may_disclose = value
89
95
  end
90
96
  end
97
+
98
+ if attributes.key?(:'steer')
99
+ self.steer = attributes[:'steer']
100
+ end
91
101
  end
92
102
 
93
103
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -120,6 +130,14 @@ module Lingara
120
130
  invalid_properties.push('invalid value for "may_disclose", number of items must be less than or equal to 16.')
121
131
  end
122
132
 
133
+ if !@steer.nil? && @steer.to_s.length > 200
134
+ invalid_properties.push('invalid value for "steer", the character length must be smaller than or equal to 200.')
135
+ end
136
+
137
+ if !@steer.nil? && @steer.to_s.length < 1
138
+ invalid_properties.push('invalid value for "steer", the character length must be greater than or equal to 1.')
139
+ end
140
+
123
141
  invalid_properties
124
142
  end
125
143
 
@@ -133,6 +151,8 @@ module Lingara
133
151
  return false if @goal.to_s.length > 240
134
152
  return false if @goal.to_s.length < 1
135
153
  return false if !@may_disclose.nil? && @may_disclose.length > 16
154
+ return false if !@steer.nil? && @steer.to_s.length > 200
155
+ return false if !@steer.nil? && @steer.to_s.length < 1
136
156
  true
137
157
  end
138
158
 
@@ -183,6 +203,20 @@ module Lingara
183
203
  @may_disclose = may_disclose
184
204
  end
185
205
 
206
+ # Custom attribute writer method with validation
207
+ # @param [Object] steer Value to be assigned
208
+ def steer=(steer)
209
+ if !steer.nil? && steer.to_s.length > 200
210
+ fail ArgumentError, 'invalid value for "steer", the character length must be smaller than or equal to 200.'
211
+ end
212
+
213
+ if !steer.nil? && steer.to_s.length < 1
214
+ fail ArgumentError, 'invalid value for "steer", the character length must be greater than or equal to 1.'
215
+ end
216
+
217
+ @steer = steer
218
+ end
219
+
186
220
  # Checks equality by comparing each attribute.
187
221
  # @param [Object] Object to be compared
188
222
  def ==(o)
@@ -190,7 +224,8 @@ module Lingara
190
224
  self.class == o.class &&
191
225
  id == o.id &&
192
226
  goal == o.goal &&
193
- may_disclose == o.may_disclose
227
+ may_disclose == o.may_disclose &&
228
+ steer == o.steer
194
229
  end
195
230
 
196
231
  # @see the `==` method
@@ -202,7 +237,7 @@ module Lingara
202
237
  # Calculates hash code according to all attributes.
203
238
  # @return [Integer] Hash code
204
239
  def hash
205
- [id, goal, may_disclose].hash
240
+ [id, goal, may_disclose, steer].hash
206
241
  end
207
242
 
208
243
  # Builds the object from hash
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Generate vocabulary lists and lesson plans, and hold tutor conversations, in the languages Lingara teaches. Each call is paid for by the client that makes it: an `allowance` client spends its owner's allowance, and a `metered` client is billed for its usage.
5
5
 
6
- The version of the OpenAPI document: 2026-10-simple-tarpon
6
+ The version of the OpenAPI document: 2026-10-dauntless-hoopoe
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.14.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Generate vocabulary lists and lesson plans, and hold tutor conversations, in the languages Lingara teaches. Each call is paid for by the client that makes it: an `allowance` client spends its owner's allowance, and a `metered` client is billed for its usage.
5
5
 
6
- The version of the OpenAPI document: 2026-10-simple-tarpon
6
+ The version of the OpenAPI document: 2026-10-dauntless-hoopoe
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.14.0
@@ -0,0 +1,43 @@
1
+ =begin
2
+ #Lingara API
3
+
4
+ #Generate vocabulary lists and lesson plans, and hold tutor conversations, in the languages Lingara teaches. Each call is paid for by the client that makes it: an `allowance` client spends its owner's allowance, and a `metered` client is billed for its usage.
5
+
6
+ The version of the OpenAPI document: 2026-10-dauntless-hoopoe
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.14.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Lingara
17
+ class KeptReason
18
+ UNAVAILABLE = "unavailable".freeze
19
+ TIMEOUT = "timeout".freeze
20
+ UNPARSEABLE = "unparseable".freeze
21
+ REJECTED = "rejected".freeze
22
+ UNKNOWN_DEFAULT_OPEN_API = "unknown_default_open_api".freeze
23
+
24
+ def self.all_vars
25
+ @all_vars ||= [UNAVAILABLE, TIMEOUT, UNPARSEABLE, REJECTED, UNKNOWN_DEFAULT_OPEN_API].freeze
26
+ end
27
+
28
+ # Builds the enum from string
29
+ # @param [String] The enum value in the form of the string
30
+ # @return [String] The enum value
31
+ def self.build_from_hash(value)
32
+ new.build_from_hash(value)
33
+ end
34
+
35
+ # Builds the enum from string
36
+ # @param [String] The enum value in the form of the string
37
+ # @return [String] The enum value
38
+ def build_from_hash(value)
39
+ return value if KeptReason.all_vars.include?(value)
40
+ raise "Invalid ENUM value #{value} for class #KeptReason"
41
+ end
42
+ end
43
+ end
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Generate vocabulary lists and lesson plans, and hold tutor conversations, in the languages Lingara teaches. Each call is paid for by the client that makes it: an `allowance` client spends its owner's allowance, and a `metered` client is billed for its usage.
5
5
 
6
- The version of the OpenAPI document: 2026-10-simple-tarpon
6
+ The version of the OpenAPI document: 2026-10-dauntless-hoopoe
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.14.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Generate vocabulary lists and lesson plans, and hold tutor conversations, in the languages Lingara teaches. Each call is paid for by the client that makes it: an `allowance` client spends its owner's allowance, and a `metered` client is billed for its usage.
5
5
 
6
- The version of the OpenAPI document: 2026-10-simple-tarpon
6
+ The version of the OpenAPI document: 2026-10-dauntless-hoopoe
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.14.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Generate vocabulary lists and lesson plans, and hold tutor conversations, in the languages Lingara teaches. Each call is paid for by the client that makes it: an `allowance` client spends its owner's allowance, and a `metered` client is billed for its usage.
5
5
 
6
- The version of the OpenAPI document: 2026-10-simple-tarpon
6
+ The version of the OpenAPI document: 2026-10-dauntless-hoopoe
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.14.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Generate vocabulary lists and lesson plans, and hold tutor conversations, in the languages Lingara teaches. Each call is paid for by the client that makes it: an `allowance` client spends its owner's allowance, and a `metered` client is billed for its usage.
5
5
 
6
- The version of the OpenAPI document: 2026-10-simple-tarpon
6
+ The version of the OpenAPI document: 2026-10-dauntless-hoopoe
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.14.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Generate vocabulary lists and lesson plans, and hold tutor conversations, in the languages Lingara teaches. Each call is paid for by the client that makes it: an `allowance` client spends its owner's allowance, and a `metered` client is billed for its usage.
5
5
 
6
- The version of the OpenAPI document: 2026-10-simple-tarpon
6
+ The version of the OpenAPI document: 2026-10-dauntless-hoopoe
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.14.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Generate vocabulary lists and lesson plans, and hold tutor conversations, in the languages Lingara teaches. Each call is paid for by the client that makes it: an `allowance` client spends its owner's allowance, and a `metered` client is billed for its usage.
5
5
 
6
- The version of the OpenAPI document: 2026-10-simple-tarpon
6
+ The version of the OpenAPI document: 2026-10-dauntless-hoopoe
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.14.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Generate vocabulary lists and lesson plans, and hold tutor conversations, in the languages Lingara teaches. Each call is paid for by the client that makes it: an `allowance` client spends its owner's allowance, and a `metered` client is billed for its usage.
5
5
 
6
- The version of the OpenAPI document: 2026-10-simple-tarpon
6
+ The version of the OpenAPI document: 2026-10-dauntless-hoopoe
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.14.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Generate vocabulary lists and lesson plans, and hold tutor conversations, in the languages Lingara teaches. Each call is paid for by the client that makes it: an `allowance` client spends its owner's allowance, and a `metered` client is billed for its usage.
5
5
 
6
- The version of the OpenAPI document: 2026-10-simple-tarpon
6
+ The version of the OpenAPI document: 2026-10-dauntless-hoopoe
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.14.0
@@ -0,0 +1,299 @@
1
+ =begin
2
+ #Lingara API
3
+
4
+ #Generate vocabulary lists and lesson plans, and hold tutor conversations, in the languages Lingara teaches. Each call is paid for by the client that makes it: an `allowance` client spends its owner's allowance, and a `metered` client is billed for its usage.
5
+
6
+ The version of the OpenAPI document: 2026-10-dauntless-hoopoe
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.14.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Lingara
17
+ class NpcDisposition
18
+ attr_accessor :suggestibility
19
+
20
+ attr_accessor :initiative
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'suggestibility' => :'suggestibility',
26
+ :'initiative' => :'initiative'
27
+ }
28
+ end
29
+
30
+ # Returns attribute mapping this model knows about
31
+ def self.acceptable_attribute_map
32
+ attribute_map
33
+ end
34
+
35
+ # Returns all the JSON keys this model knows about
36
+ def self.acceptable_attributes
37
+ acceptable_attribute_map.values
38
+ end
39
+
40
+ # Attribute type mapping.
41
+ def self.openapi_types
42
+ {
43
+ :'suggestibility' => :'Float',
44
+ :'initiative' => :'Float'
45
+ }
46
+ end
47
+
48
+ # List of attributes with nullable: true
49
+ def self.openapi_nullable
50
+ Set.new([
51
+ ])
52
+ end
53
+
54
+ # Initializes the object
55
+ # @param [Hash] attributes Model attributes in the form of hash
56
+ def initialize(attributes = {})
57
+ if (!attributes.is_a?(Hash))
58
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Lingara::NpcDisposition` initialize method"
59
+ end
60
+
61
+ # check to see if the attribute exists and convert string to symbol for hash key
62
+ acceptable_attribute_map = self.class.acceptable_attribute_map
63
+ attributes = attributes.each_with_object({}) { |(k, v), h|
64
+ if (!acceptable_attribute_map.key?(k.to_sym))
65
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Lingara::NpcDisposition`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
66
+ end
67
+ h[k.to_sym] = v
68
+ }
69
+
70
+ if attributes.key?(:'suggestibility')
71
+ self.suggestibility = attributes[:'suggestibility']
72
+ else
73
+ self.suggestibility = nil
74
+ end
75
+
76
+ if attributes.key?(:'initiative')
77
+ self.initiative = attributes[:'initiative']
78
+ else
79
+ self.initiative = nil
80
+ end
81
+ end
82
+
83
+ # Show invalid properties with the reasons. Usually used together with valid?
84
+ # @return Array for valid properties with the reasons
85
+ def list_invalid_properties
86
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
87
+ invalid_properties = Array.new
88
+ if @suggestibility.nil?
89
+ invalid_properties.push('invalid value for "suggestibility", suggestibility cannot be nil.')
90
+ end
91
+
92
+ if @suggestibility > 1
93
+ invalid_properties.push('invalid value for "suggestibility", must be smaller than or equal to 1.')
94
+ end
95
+
96
+ if @suggestibility < 0
97
+ invalid_properties.push('invalid value for "suggestibility", must be greater than or equal to 0.')
98
+ end
99
+
100
+ if @initiative.nil?
101
+ invalid_properties.push('invalid value for "initiative", initiative cannot be nil.')
102
+ end
103
+
104
+ if @initiative > 1
105
+ invalid_properties.push('invalid value for "initiative", must be smaller than or equal to 1.')
106
+ end
107
+
108
+ if @initiative < 0
109
+ invalid_properties.push('invalid value for "initiative", must be greater than or equal to 0.')
110
+ end
111
+
112
+ invalid_properties
113
+ end
114
+
115
+ # Check to see if the all the properties in the model are valid
116
+ # @return true if the model is valid
117
+ def valid?
118
+ warn '[DEPRECATED] the `valid?` method is obsolete'
119
+ return false if @suggestibility.nil?
120
+ return false if @suggestibility > 1
121
+ return false if @suggestibility < 0
122
+ return false if @initiative.nil?
123
+ return false if @initiative > 1
124
+ return false if @initiative < 0
125
+ true
126
+ end
127
+
128
+ # Custom attribute writer method with validation
129
+ # @param [Object] suggestibility Value to be assigned
130
+ def suggestibility=(suggestibility)
131
+ if suggestibility.nil?
132
+ fail ArgumentError, 'suggestibility cannot be nil'
133
+ end
134
+
135
+ if suggestibility > 1
136
+ fail ArgumentError, 'invalid value for "suggestibility", must be smaller than or equal to 1.'
137
+ end
138
+
139
+ if suggestibility < 0
140
+ fail ArgumentError, 'invalid value for "suggestibility", must be greater than or equal to 0.'
141
+ end
142
+
143
+ @suggestibility = suggestibility
144
+ end
145
+
146
+ # Custom attribute writer method with validation
147
+ # @param [Object] initiative Value to be assigned
148
+ def initiative=(initiative)
149
+ if initiative.nil?
150
+ fail ArgumentError, 'initiative cannot be nil'
151
+ end
152
+
153
+ if initiative > 1
154
+ fail ArgumentError, 'invalid value for "initiative", must be smaller than or equal to 1.'
155
+ end
156
+
157
+ if initiative < 0
158
+ fail ArgumentError, 'invalid value for "initiative", must be greater than or equal to 0.'
159
+ end
160
+
161
+ @initiative = initiative
162
+ end
163
+
164
+ # Checks equality by comparing each attribute.
165
+ # @param [Object] Object to be compared
166
+ def ==(o)
167
+ return true if self.equal?(o)
168
+ self.class == o.class &&
169
+ suggestibility == o.suggestibility &&
170
+ initiative == o.initiative
171
+ end
172
+
173
+ # @see the `==` method
174
+ # @param [Object] Object to be compared
175
+ def eql?(o)
176
+ self == o
177
+ end
178
+
179
+ # Calculates hash code according to all attributes.
180
+ # @return [Integer] Hash code
181
+ def hash
182
+ [suggestibility, initiative].hash
183
+ end
184
+
185
+ # Builds the object from hash
186
+ # @param [Hash] attributes Model attributes in the form of hash
187
+ # @return [Object] Returns the model itself
188
+ def self.build_from_hash(attributes)
189
+ return nil unless attributes.is_a?(Hash)
190
+ attributes = attributes.transform_keys(&:to_sym)
191
+ transformed_hash = {}
192
+ openapi_types.each_pair do |key, type|
193
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
194
+ transformed_hash["#{key}"] = nil
195
+ elsif type =~ /\AArray<(.*)>/i
196
+ # check to ensure the input is an array given that the attribute
197
+ # is documented as an array but the input is not
198
+ if attributes[attribute_map[key]].is_a?(Array)
199
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
200
+ end
201
+ elsif !attributes[attribute_map[key]].nil?
202
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
203
+ end
204
+ end
205
+ new(transformed_hash)
206
+ end
207
+
208
+ # Deserializes the data based on type
209
+ # @param string type Data type
210
+ # @param string value Value to be deserialized
211
+ # @return [Object] Deserialized data
212
+ def self._deserialize(type, value)
213
+ case type.to_sym
214
+ when :Time
215
+ Time.parse(value)
216
+ when :Date
217
+ Date.parse(value)
218
+ when :String
219
+ value.to_s
220
+ when :Integer
221
+ value.to_i
222
+ when :Float
223
+ value.to_f
224
+ when :Boolean
225
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
226
+ true
227
+ else
228
+ false
229
+ end
230
+ when :Object
231
+ # generic object (usually a Hash), return directly
232
+ value
233
+ when /\AArray<(?<inner_type>.+)>\z/
234
+ inner_type = Regexp.last_match[:inner_type]
235
+ value.map { |v| _deserialize(inner_type, v) }
236
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
237
+ k_type = Regexp.last_match[:k_type]
238
+ v_type = Regexp.last_match[:v_type]
239
+ {}.tap do |hash|
240
+ value.each do |k, v|
241
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
242
+ end
243
+ end
244
+ else # model
245
+ # models (e.g. Pet) or oneOf
246
+ klass = Lingara.const_get(type)
247
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
248
+ end
249
+ end
250
+
251
+ # Returns the string representation of the object
252
+ # @return [String] String presentation of the object
253
+ def to_s
254
+ to_hash.to_s
255
+ end
256
+
257
+ # to_body is an alias to to_hash (backward compatibility)
258
+ # @return [Hash] Returns the object in the form of hash
259
+ def to_body
260
+ to_hash
261
+ end
262
+
263
+ # Returns the object in the form of hash
264
+ # @return [Hash] Returns the object in the form of hash
265
+ def to_hash
266
+ hash = {}
267
+ self.class.attribute_map.each_pair do |attr, param|
268
+ value = self.send(attr)
269
+ if value.nil?
270
+ is_nullable = self.class.openapi_nullable.include?(attr)
271
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
272
+ end
273
+
274
+ hash[param] = _to_hash(value)
275
+ end
276
+ hash
277
+ end
278
+
279
+ # Outputs non-array value in the form of hash
280
+ # For object, use to_hash. Otherwise, just return the value
281
+ # @param [Object] value Any valid value
282
+ # @return [Hash] Returns the value in the form of hash
283
+ def _to_hash(value)
284
+ if value.is_a?(Array)
285
+ value.compact.map { |v| _to_hash(v) }
286
+ elsif value.is_a?(Hash)
287
+ {}.tap do |hash|
288
+ value.each { |k, v| hash[k] = _to_hash(v) }
289
+ end
290
+ elsif value.respond_to? :to_hash
291
+ value.to_hash
292
+ else
293
+ value
294
+ end
295
+ end
296
+
297
+ end
298
+
299
+ end
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Generate vocabulary lists and lesson plans, and hold tutor conversations, in the languages Lingara teaches. Each call is paid for by the client that makes it: an `allowance` client spends its owner's allowance, and a `metered` client is billed for its usage.
5
5
 
6
- The version of the OpenAPI document: 2026-10-simple-tarpon
6
+ The version of the OpenAPI document: 2026-10-dauntless-hoopoe
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.14.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Generate vocabulary lists and lesson plans, and hold tutor conversations, in the languages Lingara teaches. Each call is paid for by the client that makes it: an `allowance` client spends its owner's allowance, and a `metered` client is billed for its usage.
5
5
 
6
- The version of the OpenAPI document: 2026-10-simple-tarpon
6
+ The version of the OpenAPI document: 2026-10-dauntless-hoopoe
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.14.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Generate vocabulary lists and lesson plans, and hold tutor conversations, in the languages Lingara teaches. Each call is paid for by the client that makes it: an `allowance` client spends its owner's allowance, and a `metered` client is billed for its usage.
5
5
 
6
- The version of the OpenAPI document: 2026-10-simple-tarpon
6
+ The version of the OpenAPI document: 2026-10-dauntless-hoopoe
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.14.0