lingara 0.2.0.pre.alpha.1 → 0.2.0.pre.alpha.3
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.
- checksums.yaml +4 -4
- data/README.md +16 -0
- data/lib/lingara/client.rb +19 -0
- data/lib/lingara/models/allowance_row.rb +1 -1
- data/lib/lingara/models/app_context_slice.rb +1 -1
- data/lib/lingara/models/app_disabled_data.rb +1 -1
- data/lib/lingara/models/app_enabled_data.rb +1 -1
- data/lib/lingara/models/app_installed_data.rb +1 -1
- data/lib/lingara/models/app_uninstalled_data.rb +1 -1
- data/lib/lingara/models/create_lesson_plan_event_error.rb +1 -1
- data/lib/lingara/models/create_lesson_plan_event_phase.rb +1 -1
- data/lib/lingara/models/create_lesson_plan_event_result.rb +1 -1
- data/lib/lingara/models/create_lesson_plan_event_started.rb +1 -1
- data/lib/lingara/models/dialogue_entry.rb +1 -1
- data/lib/lingara/models/dialogue_turn_request.rb +1 -1
- data/lib/lingara/models/embed_player_link.rb +427 -0
- data/lib/lingara/models/embed_token.rb +1 -1
- data/lib/lingara/models/embed_token_request.rb +1 -1
- data/lib/lingara/models/error_envelope.rb +1 -1
- data/lib/lingara/models/event_envelope.rb +1 -1
- data/lib/lingara/models/event_page.rb +1 -1
- data/lib/lingara/models/generate_vocabulary_event_done.rb +1 -1
- data/lib/lingara/models/generate_vocabulary_event_error.rb +1 -1
- data/lib/lingara/models/generate_vocabulary_event_item.rb +1 -1
- data/lib/lingara/models/generate_vocabulary_event_started.rb +1 -1
- data/lib/lingara/models/inbound_event_accepted.rb +1 -1
- data/lib/lingara/models/lesson_plan.rb +1 -1
- data/lib/lingara/models/lesson_plan_content.rb +1 -1
- data/lib/lingara/models/lesson_plan_create_request.rb +1 -1
- data/lib/lingara/models/lesson_plan_failed_data.rb +1 -1
- data/lib/lingara/models/lesson_plan_ready_data.rb +1 -1
- data/lib/lingara/models/link_status.rb +41 -0
- data/lib/lingara/models/notice.rb +1 -1
- data/lib/lingara/models/npc.rb +1 -1
- data/lib/lingara/models/plan_fail_reason.rb +1 -1
- data/lib/lingara/models/plan_pending.rb +1 -1
- data/lib/lingara/models/plan_phase.rb +1 -1
- data/lib/lingara/models/plan_question.rb +1 -1
- data/lib/lingara/models/plan_ready_status.rb +1 -1
- data/lib/lingara/models/plan_result.rb +1 -1
- data/lib/lingara/models/plan_set.rb +1 -1
- data/lib/lingara/models/plan_started.rb +1 -1
- data/lib/lingara/models/plan_status.rb +1 -1
- data/lib/lingara/models/plan_word.rb +1 -1
- data/lib/lingara/models/practice_completed_data.rb +1 -1
- data/lib/lingara/models/practice_item.rb +1 -1
- data/lib/lingara/models/practice_outcome.rb +1 -1
- data/lib/lingara/models/reaction_report.rb +1 -1
- data/lib/lingara/models/reaction_status.rb +1 -1
- data/lib/lingara/models/send_dialogue_turn_event_delta.rb +1 -1
- data/lib/lingara/models/send_dialogue_turn_event_done.rb +1 -1
- data/lib/lingara/models/send_dialogue_turn_event_error.rb +1 -1
- data/lib/lingara/models/send_dialogue_turn_event_notice.rb +1 -1
- data/lib/lingara/models/send_tutor_message_event_delta.rb +1 -1
- data/lib/lingara/models/send_tutor_message_event_done.rb +1 -1
- data/lib/lingara/models/send_tutor_message_event_error.rb +1 -1
- data/lib/lingara/models/send_tutor_message_event_notice.rb +1 -1
- data/lib/lingara/models/speaker.rb +1 -1
- data/lib/lingara/models/stream_error.rb +1 -1
- data/lib/lingara/models/stream_events_event_done.rb +1 -1
- data/lib/lingara/models/stream_events_event_error.rb +1 -1
- data/lib/lingara/models/stream_events_event_event.rb +1 -1
- data/lib/lingara/models/stream_lesson_plan_event_error.rb +1 -1
- data/lib/lingara/models/stream_lesson_plan_event_pending.rb +1 -1
- data/lib/lingara/models/stream_lesson_plan_event_phase.rb +1 -1
- data/lib/lingara/models/stream_lesson_plan_event_result.rb +1 -1
- data/lib/lingara/models/stream_lesson_plan_event_started.rb +1 -1
- data/lib/lingara/models/threshold_scope.rb +1 -1
- data/lib/lingara/models/turn_delta.rb +1 -1
- data/lib/lingara/models/turn_entry.rb +1 -1
- data/lib/lingara/models/turn_role.rb +1 -1
- data/lib/lingara/models/tutor_turn_request.rb +1 -1
- data/lib/lingara/models/usage.rb +1 -1
- data/lib/lingara/models/usage_ledger.rb +1 -1
- data/lib/lingara/models/usage_threshold_reached_data.rb +1 -1
- data/lib/lingara/models/version_detail.rb +1 -1
- data/lib/lingara/models/version_history_entry.rb +1 -1
- data/lib/lingara/models/version_list.rb +1 -1
- data/lib/lingara/models/version_spec.rb +1 -1
- data/lib/lingara/models/version_state.rb +1 -1
- data/lib/lingara/models/version_summary.rb +1 -1
- data/lib/lingara/models/vocab_example.rb +1 -1
- data/lib/lingara/models/vocab_item.rb +1 -1
- data/lib/lingara/models/vocab_meta.rb +1 -1
- data/lib/lingara/models/vocab_request.rb +1 -1
- data/lib/lingara/models/vocab_started.rb +1 -1
- data/lib/lingara/models/world_context_changed.rb +1 -1
- data/lib/lingara/models/world_practice_completed.rb +1 -1
- data/lib/lingara/models/world_practice_requested.rb +1 -1
- data/lib/lingara/operations.rb +18 -0
- data/lib/lingara/version.rb +3 -3
- data/sig/lingara.rbs +3 -0
- metadata +4 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1cfd533625ec4e78a0e68f5327ce5f3af893e26f4e04ab4c25b1e8f2bbdf2e41
|
|
4
|
+
data.tar.gz: 435203b71ac2e9856463fead5cf5c91e852e2ba92b4d9bf1f9b3322609d05791
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3265f0f31df57f75f58f2c0b2465d40ff3770b54c979adaf2d64268a929db753d30125294a78df5f678d616c619e2b854052cb10f66dad0e7ef91b379c3dbd43
|
|
7
|
+
data.tar.gz: c9db5cd1433951e938fdcf2b6aa4bc6564e4abb2d6a386890def4acb96fc8a0396bc9144cccf363bf724f2914fcfc3b445003a86602ef21a7749eeb81b3efa6d
|
data/README.md
CHANGED
|
@@ -185,6 +185,22 @@ tokens. It returns a `Lingara::Response` whose `value` is `nil`. It is
|
|
|
185
185
|
idempotent, since an unknown player is a success too, and it keeps working
|
|
186
186
|
while embedding is switched off for your client.
|
|
187
187
|
|
|
188
|
+
`client.link_embed_player(player_ref)` links a player to the Lingara account
|
|
189
|
+
that granted your app access (`embed:play`); its `value` is an
|
|
190
|
+
`EmbedPlayerLink`. Call it on a client whose `token_source:` returns the
|
|
191
|
+
**player's delegated token** — the one your server received from that
|
|
192
|
+
account's own consent — never on your client-credentials client, which gets
|
|
193
|
+
`403 embed_link_needs_grant`. The library does not obtain that token yet; the
|
|
194
|
+
`link_embed_player` snippet's `delegated_client` builds the client in a few
|
|
195
|
+
lines. A fixed token is retried once on a `401`, so a revoked grant surfaces
|
|
196
|
+
as a `Lingara::ApiError` with status 401. `"existing"` is a success too, and a
|
|
197
|
+
repeat moves what could not move before: call again while
|
|
198
|
+
`kept["lesson_plans"]` is non-zero.
|
|
199
|
+
|
|
200
|
+
`client.unlink_embed_player(player_ref)` ends that link (`embed:mint`, your
|
|
201
|
+
ordinary client); its `value` is `nil`. A `404 embed_link_not_found` after a
|
|
202
|
+
retried call means it was already unlinked.
|
|
203
|
+
|
|
188
204
|
`client.send_dialogue_turn(npc:, source_lang:, target_lang:, level:, line:, history:)`
|
|
189
205
|
streams one NPC reply (`embed:play`, from an embed token or a metered
|
|
190
206
|
client's own token) as `delta` and `notice` events, ending on `done`. The
|
data/lib/lingara/client.rb
CHANGED
|
@@ -177,6 +177,25 @@ module Lingara
|
|
|
177
177
|
no_content("deleteEmbedPlayer", [player_ref])
|
|
178
178
|
end
|
|
179
179
|
|
|
180
|
+
# Links a player to the Lingara account that granted your app access
|
|
181
|
+
# (scope embed:play; ADR 22.10.26t). Call it on a client whose
|
|
182
|
+
# token_source: returns the player's delegated token, from that account's
|
|
183
|
+
# own consent: a client-credentials client is refused 403
|
|
184
|
+
# embed_link_needs_grant. The library does not obtain that token yet. A
|
|
185
|
+
# repeat answers "existing" and moves what could not move before, so a
|
|
186
|
+
# retry is safe: call again while kept["lesson_plans"] is non-zero.
|
|
187
|
+
# Returns a Response whose value is an EmbedPlayerLink.
|
|
188
|
+
def link_embed_player(player_ref)
|
|
189
|
+
json("linkEmbedPlayer", [player_ref])
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
# Ends a player's link (scope embed:mint, on your ordinary client). No
|
|
193
|
+
# live link is 404 embed_link_not_found, which after a retried success
|
|
194
|
+
# means it was already unlinked. Returns a Response whose value is nil.
|
|
195
|
+
def unlink_embed_player(player_ref)
|
|
196
|
+
no_content("unlinkEmbedPlayer", [player_ref])
|
|
197
|
+
end
|
|
198
|
+
|
|
180
199
|
# Streams an NPC's reply to one line (scope embed:play, from an embed
|
|
181
200
|
# token or a metered client's own token): delta and notice events, ending
|
|
182
201
|
# on done. Each turn spends the player's NPC cells and the payer's, so it
|
|
@@ -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-
|
|
6
|
+
The version of the OpenAPI document: 2026-10-virile-dragon
|
|
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-
|
|
6
|
+
The version of the OpenAPI document: 2026-10-virile-dragon
|
|
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-
|
|
6
|
+
The version of the OpenAPI document: 2026-10-virile-dragon
|
|
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-
|
|
6
|
+
The version of the OpenAPI document: 2026-10-virile-dragon
|
|
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-
|
|
6
|
+
The version of the OpenAPI document: 2026-10-virile-dragon
|
|
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-
|
|
6
|
+
The version of the OpenAPI document: 2026-10-virile-dragon
|
|
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-
|
|
6
|
+
The version of the OpenAPI document: 2026-10-virile-dragon
|
|
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-
|
|
6
|
+
The version of the OpenAPI document: 2026-10-virile-dragon
|
|
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-
|
|
6
|
+
The version of the OpenAPI document: 2026-10-virile-dragon
|
|
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-
|
|
6
|
+
The version of the OpenAPI document: 2026-10-virile-dragon
|
|
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-
|
|
6
|
+
The version of the OpenAPI document: 2026-10-virile-dragon
|
|
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-
|
|
6
|
+
The version of the OpenAPI document: 2026-10-virile-dragon
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.14.0
|
|
@@ -0,0 +1,427 @@
|
|
|
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-virile-dragon
|
|
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 EmbedPlayerLink
|
|
18
|
+
attr_accessor :status
|
|
19
|
+
|
|
20
|
+
# The account's `lgr_sub_`: what this player's events carry from now on.
|
|
21
|
+
attr_accessor :subject
|
|
22
|
+
|
|
23
|
+
# The guest's `lgr_sub_`: what the player's earlier events keep. Route both to the same `player_ref`.
|
|
24
|
+
attr_accessor :previous_subject
|
|
25
|
+
|
|
26
|
+
# When the link was made. On an `existing` answer, the first call's time.
|
|
27
|
+
attr_accessor :linked_at
|
|
28
|
+
|
|
29
|
+
# The most a token for this player can now hold: what the account granted, of the scopes a player's token can carry.
|
|
30
|
+
attr_accessor :scopes
|
|
31
|
+
|
|
32
|
+
# Rows this call moved to the account, per table. Only tables with a count appear.
|
|
33
|
+
attr_accessor :carried
|
|
34
|
+
|
|
35
|
+
# Rows this call left with the guest, per table: a plan still being written, or a row the account already had. Call again once `lesson_plans` here has a plan that has finished.
|
|
36
|
+
attr_accessor :kept
|
|
37
|
+
|
|
38
|
+
class EnumAttributeValidator
|
|
39
|
+
attr_reader :datatype
|
|
40
|
+
attr_reader :allowable_values
|
|
41
|
+
|
|
42
|
+
def initialize(datatype, allowable_values)
|
|
43
|
+
@allowable_values = allowable_values.map do |value|
|
|
44
|
+
case datatype.to_s
|
|
45
|
+
when /Integer/i
|
|
46
|
+
value.to_i
|
|
47
|
+
when /Float/i
|
|
48
|
+
value.to_f
|
|
49
|
+
else
|
|
50
|
+
value
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
def valid?(value)
|
|
56
|
+
!value || allowable_values.include?(value)
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
61
|
+
def self.attribute_map
|
|
62
|
+
{
|
|
63
|
+
:'status' => :'status',
|
|
64
|
+
:'subject' => :'subject',
|
|
65
|
+
:'previous_subject' => :'previous_subject',
|
|
66
|
+
:'linked_at' => :'linked_at',
|
|
67
|
+
:'scopes' => :'scopes',
|
|
68
|
+
:'carried' => :'carried',
|
|
69
|
+
:'kept' => :'kept'
|
|
70
|
+
}
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# Returns attribute mapping this model knows about
|
|
74
|
+
def self.acceptable_attribute_map
|
|
75
|
+
attribute_map
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# Returns all the JSON keys this model knows about
|
|
79
|
+
def self.acceptable_attributes
|
|
80
|
+
acceptable_attribute_map.values
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# Attribute type mapping.
|
|
84
|
+
def self.openapi_types
|
|
85
|
+
{
|
|
86
|
+
:'status' => :'LinkStatus',
|
|
87
|
+
:'subject' => :'String',
|
|
88
|
+
:'previous_subject' => :'String',
|
|
89
|
+
:'linked_at' => :'Time',
|
|
90
|
+
:'scopes' => :'Array<String>',
|
|
91
|
+
:'carried' => :'Hash<String, Integer>',
|
|
92
|
+
:'kept' => :'Hash<String, Integer>'
|
|
93
|
+
}
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# List of attributes with nullable: true
|
|
97
|
+
def self.openapi_nullable
|
|
98
|
+
Set.new([
|
|
99
|
+
])
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# Initializes the object
|
|
103
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
104
|
+
def initialize(attributes = {})
|
|
105
|
+
if (!attributes.is_a?(Hash))
|
|
106
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Lingara::EmbedPlayerLink` initialize method"
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
110
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
111
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
112
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
113
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Lingara::EmbedPlayerLink`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
114
|
+
end
|
|
115
|
+
h[k.to_sym] = v
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
if attributes.key?(:'status')
|
|
119
|
+
self.status = attributes[:'status']
|
|
120
|
+
else
|
|
121
|
+
self.status = nil
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
if attributes.key?(:'subject')
|
|
125
|
+
self.subject = attributes[:'subject']
|
|
126
|
+
else
|
|
127
|
+
self.subject = nil
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
if attributes.key?(:'previous_subject')
|
|
131
|
+
self.previous_subject = attributes[:'previous_subject']
|
|
132
|
+
else
|
|
133
|
+
self.previous_subject = nil
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
if attributes.key?(:'linked_at')
|
|
137
|
+
self.linked_at = attributes[:'linked_at']
|
|
138
|
+
else
|
|
139
|
+
self.linked_at = nil
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
if attributes.key?(:'scopes')
|
|
143
|
+
if (value = attributes[:'scopes']).is_a?(Array)
|
|
144
|
+
self.scopes = value
|
|
145
|
+
end
|
|
146
|
+
else
|
|
147
|
+
self.scopes = nil
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
if attributes.key?(:'carried')
|
|
151
|
+
if (value = attributes[:'carried']).is_a?(Hash)
|
|
152
|
+
self.carried = value
|
|
153
|
+
end
|
|
154
|
+
else
|
|
155
|
+
self.carried = nil
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
if attributes.key?(:'kept')
|
|
159
|
+
if (value = attributes[:'kept']).is_a?(Hash)
|
|
160
|
+
self.kept = value
|
|
161
|
+
end
|
|
162
|
+
else
|
|
163
|
+
self.kept = nil
|
|
164
|
+
end
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
168
|
+
# @return Array for valid properties with the reasons
|
|
169
|
+
def list_invalid_properties
|
|
170
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
171
|
+
invalid_properties = Array.new
|
|
172
|
+
if @status.nil?
|
|
173
|
+
invalid_properties.push('invalid value for "status", status cannot be nil.')
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
if @subject.nil?
|
|
177
|
+
invalid_properties.push('invalid value for "subject", subject cannot be nil.')
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
if @previous_subject.nil?
|
|
181
|
+
invalid_properties.push('invalid value for "previous_subject", previous_subject cannot be nil.')
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
if @linked_at.nil?
|
|
185
|
+
invalid_properties.push('invalid value for "linked_at", linked_at cannot be nil.')
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
if @scopes.nil?
|
|
189
|
+
invalid_properties.push('invalid value for "scopes", scopes cannot be nil.')
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
if @carried.nil?
|
|
193
|
+
invalid_properties.push('invalid value for "carried", carried cannot be nil.')
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
if @kept.nil?
|
|
197
|
+
invalid_properties.push('invalid value for "kept", kept cannot be nil.')
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
invalid_properties
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
# Check to see if the all the properties in the model are valid
|
|
204
|
+
# @return true if the model is valid
|
|
205
|
+
def valid?
|
|
206
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
207
|
+
return false if @status.nil?
|
|
208
|
+
return false if @subject.nil?
|
|
209
|
+
return false if @previous_subject.nil?
|
|
210
|
+
return false if @linked_at.nil?
|
|
211
|
+
return false if @scopes.nil?
|
|
212
|
+
return false if @carried.nil?
|
|
213
|
+
return false if @kept.nil?
|
|
214
|
+
true
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
# Custom attribute writer method with validation
|
|
218
|
+
# @param [Object] status Value to be assigned
|
|
219
|
+
def status=(status)
|
|
220
|
+
if status.nil?
|
|
221
|
+
fail ArgumentError, 'status cannot be nil'
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
@status = status
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
# Custom attribute writer method with validation
|
|
228
|
+
# @param [Object] subject Value to be assigned
|
|
229
|
+
def subject=(subject)
|
|
230
|
+
if subject.nil?
|
|
231
|
+
fail ArgumentError, 'subject cannot be nil'
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
@subject = subject
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
# Custom attribute writer method with validation
|
|
238
|
+
# @param [Object] previous_subject Value to be assigned
|
|
239
|
+
def previous_subject=(previous_subject)
|
|
240
|
+
if previous_subject.nil?
|
|
241
|
+
fail ArgumentError, 'previous_subject cannot be nil'
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
@previous_subject = previous_subject
|
|
245
|
+
end
|
|
246
|
+
|
|
247
|
+
# Custom attribute writer method with validation
|
|
248
|
+
# @param [Object] linked_at Value to be assigned
|
|
249
|
+
def linked_at=(linked_at)
|
|
250
|
+
if linked_at.nil?
|
|
251
|
+
fail ArgumentError, 'linked_at cannot be nil'
|
|
252
|
+
end
|
|
253
|
+
|
|
254
|
+
@linked_at = linked_at
|
|
255
|
+
end
|
|
256
|
+
|
|
257
|
+
# Custom attribute writer method with validation
|
|
258
|
+
# @param [Object] scopes Value to be assigned
|
|
259
|
+
def scopes=(scopes)
|
|
260
|
+
if scopes.nil?
|
|
261
|
+
fail ArgumentError, 'scopes cannot be nil'
|
|
262
|
+
end
|
|
263
|
+
|
|
264
|
+
@scopes = scopes
|
|
265
|
+
end
|
|
266
|
+
|
|
267
|
+
# Custom attribute writer method with validation
|
|
268
|
+
# @param [Object] carried Value to be assigned
|
|
269
|
+
def carried=(carried)
|
|
270
|
+
if carried.nil?
|
|
271
|
+
fail ArgumentError, 'carried cannot be nil'
|
|
272
|
+
end
|
|
273
|
+
|
|
274
|
+
@carried = carried
|
|
275
|
+
end
|
|
276
|
+
|
|
277
|
+
# Custom attribute writer method with validation
|
|
278
|
+
# @param [Object] kept Value to be assigned
|
|
279
|
+
def kept=(kept)
|
|
280
|
+
if kept.nil?
|
|
281
|
+
fail ArgumentError, 'kept cannot be nil'
|
|
282
|
+
end
|
|
283
|
+
|
|
284
|
+
@kept = kept
|
|
285
|
+
end
|
|
286
|
+
|
|
287
|
+
# Checks equality by comparing each attribute.
|
|
288
|
+
# @param [Object] Object to be compared
|
|
289
|
+
def ==(o)
|
|
290
|
+
return true if self.equal?(o)
|
|
291
|
+
self.class == o.class &&
|
|
292
|
+
status == o.status &&
|
|
293
|
+
subject == o.subject &&
|
|
294
|
+
previous_subject == o.previous_subject &&
|
|
295
|
+
linked_at == o.linked_at &&
|
|
296
|
+
scopes == o.scopes &&
|
|
297
|
+
carried == o.carried &&
|
|
298
|
+
kept == o.kept
|
|
299
|
+
end
|
|
300
|
+
|
|
301
|
+
# @see the `==` method
|
|
302
|
+
# @param [Object] Object to be compared
|
|
303
|
+
def eql?(o)
|
|
304
|
+
self == o
|
|
305
|
+
end
|
|
306
|
+
|
|
307
|
+
# Calculates hash code according to all attributes.
|
|
308
|
+
# @return [Integer] Hash code
|
|
309
|
+
def hash
|
|
310
|
+
[status, subject, previous_subject, linked_at, scopes, carried, kept].hash
|
|
311
|
+
end
|
|
312
|
+
|
|
313
|
+
# Builds the object from hash
|
|
314
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
315
|
+
# @return [Object] Returns the model itself
|
|
316
|
+
def self.build_from_hash(attributes)
|
|
317
|
+
return nil unless attributes.is_a?(Hash)
|
|
318
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
319
|
+
transformed_hash = {}
|
|
320
|
+
openapi_types.each_pair do |key, type|
|
|
321
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
322
|
+
transformed_hash["#{key}"] = nil
|
|
323
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
324
|
+
# check to ensure the input is an array given that the attribute
|
|
325
|
+
# is documented as an array but the input is not
|
|
326
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
327
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
328
|
+
end
|
|
329
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
330
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
331
|
+
end
|
|
332
|
+
end
|
|
333
|
+
new(transformed_hash)
|
|
334
|
+
end
|
|
335
|
+
|
|
336
|
+
# Deserializes the data based on type
|
|
337
|
+
# @param string type Data type
|
|
338
|
+
# @param string value Value to be deserialized
|
|
339
|
+
# @return [Object] Deserialized data
|
|
340
|
+
def self._deserialize(type, value)
|
|
341
|
+
case type.to_sym
|
|
342
|
+
when :Time
|
|
343
|
+
Time.parse(value)
|
|
344
|
+
when :Date
|
|
345
|
+
Date.parse(value)
|
|
346
|
+
when :String
|
|
347
|
+
value.to_s
|
|
348
|
+
when :Integer
|
|
349
|
+
value.to_i
|
|
350
|
+
when :Float
|
|
351
|
+
value.to_f
|
|
352
|
+
when :Boolean
|
|
353
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
354
|
+
true
|
|
355
|
+
else
|
|
356
|
+
false
|
|
357
|
+
end
|
|
358
|
+
when :Object
|
|
359
|
+
# generic object (usually a Hash), return directly
|
|
360
|
+
value
|
|
361
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
362
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
363
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
364
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
365
|
+
k_type = Regexp.last_match[:k_type]
|
|
366
|
+
v_type = Regexp.last_match[:v_type]
|
|
367
|
+
{}.tap do |hash|
|
|
368
|
+
value.each do |k, v|
|
|
369
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
370
|
+
end
|
|
371
|
+
end
|
|
372
|
+
else # model
|
|
373
|
+
# models (e.g. Pet) or oneOf
|
|
374
|
+
klass = Lingara.const_get(type)
|
|
375
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
376
|
+
end
|
|
377
|
+
end
|
|
378
|
+
|
|
379
|
+
# Returns the string representation of the object
|
|
380
|
+
# @return [String] String presentation of the object
|
|
381
|
+
def to_s
|
|
382
|
+
to_hash.to_s
|
|
383
|
+
end
|
|
384
|
+
|
|
385
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
386
|
+
# @return [Hash] Returns the object in the form of hash
|
|
387
|
+
def to_body
|
|
388
|
+
to_hash
|
|
389
|
+
end
|
|
390
|
+
|
|
391
|
+
# Returns the object in the form of hash
|
|
392
|
+
# @return [Hash] Returns the object in the form of hash
|
|
393
|
+
def to_hash
|
|
394
|
+
hash = {}
|
|
395
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
396
|
+
value = self.send(attr)
|
|
397
|
+
if value.nil?
|
|
398
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
399
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
400
|
+
end
|
|
401
|
+
|
|
402
|
+
hash[param] = _to_hash(value)
|
|
403
|
+
end
|
|
404
|
+
hash
|
|
405
|
+
end
|
|
406
|
+
|
|
407
|
+
# Outputs non-array value in the form of hash
|
|
408
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
409
|
+
# @param [Object] value Any valid value
|
|
410
|
+
# @return [Hash] Returns the value in the form of hash
|
|
411
|
+
def _to_hash(value)
|
|
412
|
+
if value.is_a?(Array)
|
|
413
|
+
value.compact.map { |v| _to_hash(v) }
|
|
414
|
+
elsif value.is_a?(Hash)
|
|
415
|
+
{}.tap do |hash|
|
|
416
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
417
|
+
end
|
|
418
|
+
elsif value.respond_to? :to_hash
|
|
419
|
+
value.to_hash
|
|
420
|
+
else
|
|
421
|
+
value
|
|
422
|
+
end
|
|
423
|
+
end
|
|
424
|
+
|
|
425
|
+
end
|
|
426
|
+
|
|
427
|
+
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-
|
|
6
|
+
The version of the OpenAPI document: 2026-10-virile-dragon
|
|
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-
|
|
6
|
+
The version of the OpenAPI document: 2026-10-virile-dragon
|
|
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-
|
|
6
|
+
The version of the OpenAPI document: 2026-10-virile-dragon
|
|
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-
|
|
6
|
+
The version of the OpenAPI document: 2026-10-virile-dragon
|
|
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-
|
|
6
|
+
The version of the OpenAPI document: 2026-10-virile-dragon
|
|
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-
|
|
6
|
+
The version of the OpenAPI document: 2026-10-virile-dragon
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.14.0
|