opencode_client 1.0.0

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 (769) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/Gemfile.lock +102 -0
  4. data/README.md +423 -0
  5. data/Rakefile +10 -0
  6. data/docs/APIError.md +20 -0
  7. data/docs/APIErrorData.md +28 -0
  8. data/docs/Agent.md +46 -0
  9. data/docs/AgentConfig.md +38 -0
  10. data/docs/AgentConfigPermission.md +28 -0
  11. data/docs/AgentConfigPermissionBash.md +15 -0
  12. data/docs/AgentPart.md +28 -0
  13. data/docs/AgentPartInput.md +24 -0
  14. data/docs/AgentPartSource.md +22 -0
  15. data/docs/AgentPermission.md +28 -0
  16. data/docs/ApiAuth.md +20 -0
  17. data/docs/AppLogRequest.md +24 -0
  18. data/docs/AssistantMessage.md +46 -0
  19. data/docs/AssistantMessageError.md +20 -0
  20. data/docs/AssistantMessagePath.md +20 -0
  21. data/docs/AssistantMessageTime.md +20 -0
  22. data/docs/AssistantMessageTokens.md +24 -0
  23. data/docs/AssistantMessageTokensCache.md +20 -0
  24. data/docs/Auth.md +30 -0
  25. data/docs/BadRequestError.md +22 -0
  26. data/docs/Command.md +28 -0
  27. data/docs/CompactionPart.md +26 -0
  28. data/docs/Config.md +82 -0
  29. data/docs/ConfigAgent.md +30 -0
  30. data/docs/ConfigAutoupdate.md +15 -0
  31. data/docs/ConfigCommandValue.md +26 -0
  32. data/docs/ConfigCompaction.md +20 -0
  33. data/docs/ConfigEnterprise.md +18 -0
  34. data/docs/ConfigExperimental.md +30 -0
  35. data/docs/ConfigExperimentalHook.md +20 -0
  36. data/docs/ConfigExperimentalHookFileEditedValueInner.md +20 -0
  37. data/docs/ConfigFormatter.md +15 -0
  38. data/docs/ConfigFormatterAnyOfValue.md +24 -0
  39. data/docs/ConfigLsp.md +15 -0
  40. data/docs/ConfigLspAnyOfValue.md +26 -0
  41. data/docs/ConfigLspAnyOfValueAnyOf.md +18 -0
  42. data/docs/ConfigLspAnyOfValueAnyOf1.md +26 -0
  43. data/docs/ConfigMode.md +20 -0
  44. data/docs/ConfigProviders200Response.md +20 -0
  45. data/docs/ConfigTui.md +22 -0
  46. data/docs/ConfigTuiScrollAcceleration.md +18 -0
  47. data/docs/ConfigWatcher.md +18 -0
  48. data/docs/DefaultApi.md +5641 -0
  49. data/docs/Event.md +20 -0
  50. data/docs/EventCommandExecuted.md +20 -0
  51. data/docs/EventCommandExecutedProperties.md +24 -0
  52. data/docs/EventFileEdited.md +20 -0
  53. data/docs/EventFileEditedProperties.md +18 -0
  54. data/docs/EventFileWatcherUpdated.md +20 -0
  55. data/docs/EventFileWatcherUpdatedProperties.md +20 -0
  56. data/docs/EventGlobalDisposed.md +20 -0
  57. data/docs/EventInstallationUpdateAvailable.md +20 -0
  58. data/docs/EventInstallationUpdated.md +20 -0
  59. data/docs/EventInstallationUpdatedProperties.md +18 -0
  60. data/docs/EventLspClientDiagnostics.md +20 -0
  61. data/docs/EventLspClientDiagnosticsProperties.md +20 -0
  62. data/docs/EventLspUpdated.md +20 -0
  63. data/docs/EventMcpToolsChanged.md +20 -0
  64. data/docs/EventMcpToolsChangedProperties.md +18 -0
  65. data/docs/EventMessagePartRemoved.md +20 -0
  66. data/docs/EventMessagePartRemovedProperties.md +22 -0
  67. data/docs/EventMessagePartUpdated.md +20 -0
  68. data/docs/EventMessagePartUpdatedProperties.md +20 -0
  69. data/docs/EventMessageRemoved.md +20 -0
  70. data/docs/EventMessageRemovedProperties.md +20 -0
  71. data/docs/EventMessageUpdated.md +20 -0
  72. data/docs/EventMessageUpdatedProperties.md +18 -0
  73. data/docs/EventPermissionReplied.md +20 -0
  74. data/docs/EventPermissionRepliedProperties.md +22 -0
  75. data/docs/EventPermissionUpdated.md +20 -0
  76. data/docs/EventProjectUpdated.md +20 -0
  77. data/docs/EventPtyCreated.md +20 -0
  78. data/docs/EventPtyCreatedProperties.md +18 -0
  79. data/docs/EventPtyDeleted.md +20 -0
  80. data/docs/EventPtyDeletedProperties.md +18 -0
  81. data/docs/EventPtyExited.md +20 -0
  82. data/docs/EventPtyExitedProperties.md +20 -0
  83. data/docs/EventPtyUpdated.md +20 -0
  84. data/docs/EventServerConnected.md +20 -0
  85. data/docs/EventServerInstanceDisposed.md +20 -0
  86. data/docs/EventServerInstanceDisposedProperties.md +18 -0
  87. data/docs/EventSessionCompacted.md +20 -0
  88. data/docs/EventSessionCreated.md +20 -0
  89. data/docs/EventSessionCreatedProperties.md +18 -0
  90. data/docs/EventSessionDeleted.md +20 -0
  91. data/docs/EventSessionDiff.md +20 -0
  92. data/docs/EventSessionDiffProperties.md +20 -0
  93. data/docs/EventSessionError.md +20 -0
  94. data/docs/EventSessionErrorProperties.md +20 -0
  95. data/docs/EventSessionIdle.md +20 -0
  96. data/docs/EventSessionIdleProperties.md +18 -0
  97. data/docs/EventSessionStatus.md +20 -0
  98. data/docs/EventSessionStatusProperties.md +20 -0
  99. data/docs/EventSessionUpdated.md +20 -0
  100. data/docs/EventTodoUpdated.md +20 -0
  101. data/docs/EventTodoUpdatedProperties.md +20 -0
  102. data/docs/EventTuiCommandExecute.md +20 -0
  103. data/docs/EventTuiCommandExecuteProperties.md +18 -0
  104. data/docs/EventTuiCommandExecutePropertiesCommand.md +15 -0
  105. data/docs/EventTuiPromptAppend.md +20 -0
  106. data/docs/EventTuiToastShow.md +20 -0
  107. data/docs/EventVcsBranchUpdated.md +20 -0
  108. data/docs/EventVcsBranchUpdatedProperties.md +18 -0
  109. data/docs/File.md +24 -0
  110. data/docs/FileContent.md +28 -0
  111. data/docs/FileContentPatch.md +28 -0
  112. data/docs/FileContentPatchHunksInner.md +26 -0
  113. data/docs/FileDiff.md +26 -0
  114. data/docs/FileNode.md +26 -0
  115. data/docs/FilePart.md +32 -0
  116. data/docs/FilePartInput.md +28 -0
  117. data/docs/FilePartSource.md +28 -0
  118. data/docs/FilePartSourceText.md +22 -0
  119. data/docs/FileSource.md +22 -0
  120. data/docs/FindText200ResponseInner.md +26 -0
  121. data/docs/FindText200ResponseInnerPath.md +18 -0
  122. data/docs/FindText200ResponseInnerSubmatchesInner.md +22 -0
  123. data/docs/FormatterStatus.md +22 -0
  124. data/docs/GlobalEvent.md +20 -0
  125. data/docs/GlobalHealth200Response.md +20 -0
  126. data/docs/KeybindsConfig.md +188 -0
  127. data/docs/LSPStatus.md +24 -0
  128. data/docs/LayoutConfig.md +15 -0
  129. data/docs/LogLevel.md +15 -0
  130. data/docs/MCPStatus.md +20 -0
  131. data/docs/MCPStatusConnected.md +18 -0
  132. data/docs/MCPStatusDisabled.md +18 -0
  133. data/docs/MCPStatusFailed.md +20 -0
  134. data/docs/MCPStatusNeedsAuth.md +18 -0
  135. data/docs/MCPStatusNeedsClientRegistration.md +20 -0
  136. data/docs/McpAddRequest.md +20 -0
  137. data/docs/McpAddRequestConfig.md +32 -0
  138. data/docs/McpAuthCallbackRequest.md +18 -0
  139. data/docs/McpAuthRemove200Response.md +18 -0
  140. data/docs/McpAuthStart200Response.md +18 -0
  141. data/docs/McpLocalConfig.md +26 -0
  142. data/docs/McpOAuthConfig.md +22 -0
  143. data/docs/McpRemoteConfig.md +28 -0
  144. data/docs/McpRemoteConfigOauth.md +22 -0
  145. data/docs/Message.md +52 -0
  146. data/docs/MessageAbortedError.md +20 -0
  147. data/docs/MessageOutputLengthError.md +20 -0
  148. data/docs/Model.md +40 -0
  149. data/docs/ModelApi.md +22 -0
  150. data/docs/ModelCapabilities.md +30 -0
  151. data/docs/ModelCapabilitiesInput.md +26 -0
  152. data/docs/ModelCapabilitiesInterleaved.md +18 -0
  153. data/docs/ModelCapabilitiesInterleavedAnyOf.md +18 -0
  154. data/docs/ModelCost.md +24 -0
  155. data/docs/ModelCostExperimentalOver200K.md +22 -0
  156. data/docs/NotFoundError.md +20 -0
  157. data/docs/OAuth.md +26 -0
  158. data/docs/Part.md +76 -0
  159. data/docs/PartAnyOf.md +32 -0
  160. data/docs/PatchPart.md +28 -0
  161. data/docs/Path.md +26 -0
  162. data/docs/Permission.md +34 -0
  163. data/docs/PermissionPattern.md +15 -0
  164. data/docs/PermissionRespondRequest.md +18 -0
  165. data/docs/Project.md +28 -0
  166. data/docs/ProjectTime.md +22 -0
  167. data/docs/ProjectUpdateRequest.md +20 -0
  168. data/docs/ProjectUpdateRequestIcon.md +20 -0
  169. data/docs/Provider.md +30 -0
  170. data/docs/ProviderAuthAuthorization.md +22 -0
  171. data/docs/ProviderAuthError.md +20 -0
  172. data/docs/ProviderAuthErrorData.md +20 -0
  173. data/docs/ProviderAuthMethod.md +20 -0
  174. data/docs/ProviderConfig.md +34 -0
  175. data/docs/ProviderConfigModelsValue.md +50 -0
  176. data/docs/ProviderConfigModelsValueInterleaved.md +18 -0
  177. data/docs/ProviderConfigModelsValueInterleavedAnyOf.md +18 -0
  178. data/docs/ProviderConfigOptions.md +26 -0
  179. data/docs/ProviderConfigOptionsTimeout.md +15 -0
  180. data/docs/ProviderList200Response.md +22 -0
  181. data/docs/ProviderList200ResponseAllInner.md +28 -0
  182. data/docs/ProviderList200ResponseAllInnerModelsValue.md +50 -0
  183. data/docs/ProviderList200ResponseAllInnerModelsValueCost.md +26 -0
  184. data/docs/ProviderList200ResponseAllInnerModelsValueCostContextOver200k.md +24 -0
  185. data/docs/ProviderList200ResponseAllInnerModelsValueInterleaved.md +18 -0
  186. data/docs/ProviderList200ResponseAllInnerModelsValueInterleavedAnyOf.md +18 -0
  187. data/docs/ProviderList200ResponseAllInnerModelsValueLimit.md +20 -0
  188. data/docs/ProviderList200ResponseAllInnerModelsValueModalities.md +20 -0
  189. data/docs/ProviderList200ResponseAllInnerModelsValueProvider.md +18 -0
  190. data/docs/ProviderOauthAuthorizeRequest.md +18 -0
  191. data/docs/ProviderOauthCallbackRequest.md +20 -0
  192. data/docs/Pty.md +30 -0
  193. data/docs/PtyCreateRequest.md +26 -0
  194. data/docs/PtyUpdateRequest.md +20 -0
  195. data/docs/PtyUpdateRequestSize.md +20 -0
  196. data/docs/Range.md +20 -0
  197. data/docs/RangeStart.md +20 -0
  198. data/docs/ReasoningPart.md +30 -0
  199. data/docs/RetryPart.md +30 -0
  200. data/docs/ServerConfig.md +22 -0
  201. data/docs/Session.md +36 -0
  202. data/docs/SessionApi.md +145 -0
  203. data/docs/SessionCommandRequest.md +26 -0
  204. data/docs/SessionCreateRequest.md +20 -0
  205. data/docs/SessionForkRequest.md +18 -0
  206. data/docs/SessionInitRequest.md +22 -0
  207. data/docs/SessionMessages200ResponseInner.md +20 -0
  208. data/docs/SessionPrompt200Response.md +20 -0
  209. data/docs/SessionPromptRequest.md +30 -0
  210. data/docs/SessionPromptRequestModel.md +20 -0
  211. data/docs/SessionPromptRequestPartsInner.md +48 -0
  212. data/docs/SessionRevert.md +24 -0
  213. data/docs/SessionRevertRequest.md +20 -0
  214. data/docs/SessionShare.md +18 -0
  215. data/docs/SessionShellRequest.md +22 -0
  216. data/docs/SessionStatus.md +24 -0
  217. data/docs/SessionStatusAnyOf.md +18 -0
  218. data/docs/SessionStatusAnyOf1.md +24 -0
  219. data/docs/SessionStatusAnyOf2.md +18 -0
  220. data/docs/SessionSummarizeRequest.md +22 -0
  221. data/docs/SessionSummary.md +24 -0
  222. data/docs/SessionTime.md +24 -0
  223. data/docs/SessionUpdateRequest.md +20 -0
  224. data/docs/SessionUpdateRequestTime.md +18 -0
  225. data/docs/SnapshotPart.md +26 -0
  226. data/docs/StepFinishPart.md +32 -0
  227. data/docs/StepStartPart.md +26 -0
  228. data/docs/SubtaskPartInput.md +28 -0
  229. data/docs/Symbol.md +22 -0
  230. data/docs/SymbolLocation.md +20 -0
  231. data/docs/SymbolSource.md +28 -0
  232. data/docs/TextPart.md +34 -0
  233. data/docs/TextPartInput.md +30 -0
  234. data/docs/TextPartTime.md +20 -0
  235. data/docs/Todo.md +24 -0
  236. data/docs/ToolListItem.md +22 -0
  237. data/docs/ToolPart.md +32 -0
  238. data/docs/ToolState.md +34 -0
  239. data/docs/ToolStateCompleted.md +30 -0
  240. data/docs/ToolStateCompletedTime.md +22 -0
  241. data/docs/ToolStateError.md +26 -0
  242. data/docs/ToolStateErrorTime.md +20 -0
  243. data/docs/ToolStatePending.md +22 -0
  244. data/docs/ToolStateRunning.md +26 -0
  245. data/docs/ToolStateRunningTime.md +18 -0
  246. data/docs/TuiControlNext200Response.md +20 -0
  247. data/docs/TuiExecuteCommandRequest.md +18 -0
  248. data/docs/TuiPublishRequest.md +20 -0
  249. data/docs/TuiShowToastRequest.md +24 -0
  250. data/docs/UnknownError.md +20 -0
  251. data/docs/UnknownErrorData.md +18 -0
  252. data/docs/UserMessage.md +34 -0
  253. data/docs/UserMessageSummary.md +22 -0
  254. data/docs/UserMessageTime.md +18 -0
  255. data/docs/VcsInfo.md +18 -0
  256. data/docs/WellKnownAuth.md +22 -0
  257. data/git_push.sh +57 -0
  258. data/lib/opencode_client/api/default_api.rb +5442 -0
  259. data/lib/opencode_client/api/session_api.rb +164 -0
  260. data/lib/opencode_client/api_client.rb +374 -0
  261. data/lib/opencode_client/api_error.rb +58 -0
  262. data/lib/opencode_client/api_model_base.rb +88 -0
  263. data/lib/opencode_client/configuration.rb +288 -0
  264. data/lib/opencode_client/models/agent.rb +405 -0
  265. data/lib/opencode_client/models/agent_config.rb +316 -0
  266. data/lib/opencode_client/models/agent_config_permission.rb +262 -0
  267. data/lib/opencode_client/models/agent_config_permission_bash.rb +103 -0
  268. data/lib/opencode_client/models/agent_part.rb +301 -0
  269. data/lib/opencode_client/models/agent_part_input.rb +232 -0
  270. data/lib/opencode_client/models/agent_part_source.rb +252 -0
  271. data/lib/opencode_client/models/agent_permission.rb +287 -0
  272. data/lib/opencode_client/models/api_auth.rb +214 -0
  273. data/lib/opencode_client/models/api_error.rb +214 -0
  274. data/lib/opencode_client/models/api_error_data.rb +230 -0
  275. data/lib/opencode_client/models/app_log_request.rb +255 -0
  276. data/lib/opencode_client/models/assistant_message.rb +501 -0
  277. data/lib/opencode_client/models/assistant_message_error.rb +106 -0
  278. data/lib/opencode_client/models/assistant_message_path.rb +190 -0
  279. data/lib/opencode_client/models/assistant_message_time.rb +173 -0
  280. data/lib/opencode_client/models/assistant_message_tokens.rb +242 -0
  281. data/lib/opencode_client/models/assistant_message_tokens_cache.rb +190 -0
  282. data/lib/opencode_client/models/auth.rb +104 -0
  283. data/lib/opencode_client/models/bad_request_error.rb +228 -0
  284. data/lib/opencode_client/models/command.rb +226 -0
  285. data/lib/opencode_client/models/compaction_part.rb +292 -0
  286. data/lib/opencode_client/models/config.rb +500 -0
  287. data/lib/opencode_client/models/config_agent.rb +202 -0
  288. data/lib/opencode_client/models/config_autoupdate.rb +104 -0
  289. data/lib/opencode_client/models/config_command_value.rb +200 -0
  290. data/lib/opencode_client/models/config_compaction.rb +158 -0
  291. data/lib/opencode_client/models/config_enterprise.rb +148 -0
  292. data/lib/opencode_client/models/config_experimental.rb +208 -0
  293. data/lib/opencode_client/models/config_experimental_hook.rb +160 -0
  294. data/lib/opencode_client/models/config_experimental_hook_file_edited_value_inner.rb +177 -0
  295. data/lib/opencode_client/models/config_formatter.rb +103 -0
  296. data/lib/opencode_client/models/config_formatter_any_of_value.rb +180 -0
  297. data/lib/opencode_client/models/config_lsp.rb +103 -0
  298. data/lib/opencode_client/models/config_lsp_any_of_value.rb +103 -0
  299. data/lib/opencode_client/models/config_lsp_any_of_value_any_of.rb +188 -0
  300. data/lib/opencode_client/models/config_lsp_any_of_value_any_of1.rb +208 -0
  301. data/lib/opencode_client/models/config_mode.rb +157 -0
  302. data/lib/opencode_client/models/config_providers200_response.rb +194 -0
  303. data/lib/opencode_client/models/config_tui.rb +221 -0
  304. data/lib/opencode_client/models/config_tui_scroll_acceleration.rb +166 -0
  305. data/lib/opencode_client/models/config_watcher.rb +149 -0
  306. data/lib/opencode_client/models/event.rb +136 -0
  307. data/lib/opencode_client/models/event_command_executed.rb +214 -0
  308. data/lib/opencode_client/models/event_command_executed_properties.rb +264 -0
  309. data/lib/opencode_client/models/event_file_edited.rb +214 -0
  310. data/lib/opencode_client/models/event_file_edited_properties.rb +164 -0
  311. data/lib/opencode_client/models/event_file_watcher_updated.rb +214 -0
  312. data/lib/opencode_client/models/event_file_watcher_updated_properties.rb +214 -0
  313. data/lib/opencode_client/models/event_global_disposed.rb +214 -0
  314. data/lib/opencode_client/models/event_installation_update_available.rb +214 -0
  315. data/lib/opencode_client/models/event_installation_updated.rb +214 -0
  316. data/lib/opencode_client/models/event_installation_updated_properties.rb +164 -0
  317. data/lib/opencode_client/models/event_lsp_client_diagnostics.rb +214 -0
  318. data/lib/opencode_client/models/event_lsp_client_diagnostics_properties.rb +190 -0
  319. data/lib/opencode_client/models/event_lsp_updated.rb +214 -0
  320. data/lib/opencode_client/models/event_mcp_tools_changed.rb +214 -0
  321. data/lib/opencode_client/models/event_mcp_tools_changed_properties.rb +164 -0
  322. data/lib/opencode_client/models/event_message_part_removed.rb +214 -0
  323. data/lib/opencode_client/models/event_message_part_removed_properties.rb +216 -0
  324. data/lib/opencode_client/models/event_message_part_updated.rb +214 -0
  325. data/lib/opencode_client/models/event_message_part_updated_properties.rb +173 -0
  326. data/lib/opencode_client/models/event_message_removed.rb +214 -0
  327. data/lib/opencode_client/models/event_message_removed_properties.rb +190 -0
  328. data/lib/opencode_client/models/event_message_updated.rb +214 -0
  329. data/lib/opencode_client/models/event_message_updated_properties.rb +164 -0
  330. data/lib/opencode_client/models/event_permission_replied.rb +214 -0
  331. data/lib/opencode_client/models/event_permission_replied_properties.rb +216 -0
  332. data/lib/opencode_client/models/event_permission_updated.rb +214 -0
  333. data/lib/opencode_client/models/event_project_updated.rb +214 -0
  334. data/lib/opencode_client/models/event_pty_created.rb +214 -0
  335. data/lib/opencode_client/models/event_pty_created_properties.rb +164 -0
  336. data/lib/opencode_client/models/event_pty_deleted.rb +214 -0
  337. data/lib/opencode_client/models/event_pty_deleted_properties.rb +175 -0
  338. data/lib/opencode_client/models/event_pty_exited.rb +214 -0
  339. data/lib/opencode_client/models/event_pty_exited_properties.rb +201 -0
  340. data/lib/opencode_client/models/event_pty_updated.rb +214 -0
  341. data/lib/opencode_client/models/event_server_connected.rb +214 -0
  342. data/lib/opencode_client/models/event_server_instance_disposed.rb +214 -0
  343. data/lib/opencode_client/models/event_server_instance_disposed_properties.rb +164 -0
  344. data/lib/opencode_client/models/event_session_compacted.rb +214 -0
  345. data/lib/opencode_client/models/event_session_created.rb +214 -0
  346. data/lib/opencode_client/models/event_session_created_properties.rb +164 -0
  347. data/lib/opencode_client/models/event_session_deleted.rb +214 -0
  348. data/lib/opencode_client/models/event_session_diff.rb +214 -0
  349. data/lib/opencode_client/models/event_session_diff_properties.rb +192 -0
  350. data/lib/opencode_client/models/event_session_error.rb +214 -0
  351. data/lib/opencode_client/models/event_session_error_properties.rb +156 -0
  352. data/lib/opencode_client/models/event_session_idle.rb +214 -0
  353. data/lib/opencode_client/models/event_session_idle_properties.rb +164 -0
  354. data/lib/opencode_client/models/event_session_status.rb +214 -0
  355. data/lib/opencode_client/models/event_session_status_properties.rb +190 -0
  356. data/lib/opencode_client/models/event_session_updated.rb +214 -0
  357. data/lib/opencode_client/models/event_todo_updated.rb +214 -0
  358. data/lib/opencode_client/models/event_todo_updated_properties.rb +192 -0
  359. data/lib/opencode_client/models/event_tui_command_execute.rb +214 -0
  360. data/lib/opencode_client/models/event_tui_command_execute_properties.rb +164 -0
  361. data/lib/opencode_client/models/event_tui_command_execute_properties_command.rb +102 -0
  362. data/lib/opencode_client/models/event_tui_prompt_append.rb +214 -0
  363. data/lib/opencode_client/models/event_tui_toast_show.rb +214 -0
  364. data/lib/opencode_client/models/event_vcs_branch_updated.rb +214 -0
  365. data/lib/opencode_client/models/event_vcs_branch_updated_properties.rb +147 -0
  366. data/lib/opencode_client/models/file.rb +302 -0
  367. data/lib/opencode_client/models/file_content.rb +262 -0
  368. data/lib/opencode_client/models/file_content_patch.rb +245 -0
  369. data/lib/opencode_client/models/file_content_patch_hunks_inner.rb +270 -0
  370. data/lib/opencode_client/models/file_diff.rb +268 -0
  371. data/lib/opencode_client/models/file_node.rb +292 -0
  372. data/lib/opencode_client/models/file_part.rb +336 -0
  373. data/lib/opencode_client/models/file_part_input.rb +267 -0
  374. data/lib/opencode_client/models/file_part_source.rb +103 -0
  375. data/lib/opencode_client/models/file_part_source_text.rb +252 -0
  376. data/lib/opencode_client/models/file_source.rb +240 -0
  377. data/lib/opencode_client/models/find_text200_response_inner.rb +270 -0
  378. data/lib/opencode_client/models/find_text200_response_inner_path.rb +164 -0
  379. data/lib/opencode_client/models/find_text200_response_inner_submatches_inner.rb +216 -0
  380. data/lib/opencode_client/models/formatter_status.rb +218 -0
  381. data/lib/opencode_client/models/global_event.rb +190 -0
  382. data/lib/opencode_client/models/global_health200_response.rb +214 -0
  383. data/lib/opencode_client/models/keybinds_config.rb +1171 -0
  384. data/lib/opencode_client/models/layout_config.rb +40 -0
  385. data/lib/opencode_client/models/log_level.rb +42 -0
  386. data/lib/opencode_client/models/lsp_status.rb +266 -0
  387. data/lib/opencode_client/models/mcp_add_request.rb +190 -0
  388. data/lib/opencode_client/models/mcp_add_request_config.rb +103 -0
  389. data/lib/opencode_client/models/mcp_auth_callback_request.rb +165 -0
  390. data/lib/opencode_client/models/mcp_auth_remove200_response.rb +188 -0
  391. data/lib/opencode_client/models/mcp_auth_start200_response.rb +165 -0
  392. data/lib/opencode_client/models/mcp_local_config.rb +269 -0
  393. data/lib/opencode_client/models/mcp_o_auth_config.rb +168 -0
  394. data/lib/opencode_client/models/mcp_remote_config.rb +276 -0
  395. data/lib/opencode_client/models/mcp_remote_config_oauth.rb +104 -0
  396. data/lib/opencode_client/models/mcp_status.rb +106 -0
  397. data/lib/opencode_client/models/mcp_status_connected.rb +188 -0
  398. data/lib/opencode_client/models/mcp_status_disabled.rb +188 -0
  399. data/lib/opencode_client/models/mcp_status_failed.rb +214 -0
  400. data/lib/opencode_client/models/mcp_status_needs_auth.rb +188 -0
  401. data/lib/opencode_client/models/mcp_status_needs_client_registration.rb +214 -0
  402. data/lib/opencode_client/models/message.rb +103 -0
  403. data/lib/opencode_client/models/message_aborted_error.rb +214 -0
  404. data/lib/opencode_client/models/message_output_length_error.rb +214 -0
  405. data/lib/opencode_client/models/model.rb +461 -0
  406. data/lib/opencode_client/models/model_api.rb +216 -0
  407. data/lib/opencode_client/models/model_capabilities.rb +320 -0
  408. data/lib/opencode_client/models/model_capabilities_input.rb +268 -0
  409. data/lib/opencode_client/models/model_capabilities_interleaved.rb +103 -0
  410. data/lib/opencode_client/models/model_capabilities_interleaved_any_of.rb +188 -0
  411. data/lib/opencode_client/models/model_cost.rb +225 -0
  412. data/lib/opencode_client/models/model_cost_experimental_over200_k.rb +216 -0
  413. data/lib/opencode_client/models/not_found_error.rb +214 -0
  414. data/lib/opencode_client/models/o_auth.rb +275 -0
  415. data/lib/opencode_client/models/part.rb +113 -0
  416. data/lib/opencode_client/models/part_any_of.rb +353 -0
  417. data/lib/opencode_client/models/patch_part.rb +320 -0
  418. data/lib/opencode_client/models/path.rb +268 -0
  419. data/lib/opencode_client/models/permission.rb +340 -0
  420. data/lib/opencode_client/models/permission_pattern.rb +103 -0
  421. data/lib/opencode_client/models/permission_respond_request.rb +188 -0
  422. data/lib/opencode_client/models/project.rb +277 -0
  423. data/lib/opencode_client/models/project_time.rb +199 -0
  424. data/lib/opencode_client/models/project_update_request.rb +156 -0
  425. data/lib/opencode_client/models/project_update_request_icon.rb +156 -0
  426. data/lib/opencode_client/models/provider.rb +333 -0
  427. data/lib/opencode_client/models/provider_auth_authorization.rb +240 -0
  428. data/lib/opencode_client/models/provider_auth_error.rb +214 -0
  429. data/lib/opencode_client/models/provider_auth_error_data.rb +190 -0
  430. data/lib/opencode_client/models/provider_auth_method.rb +214 -0
  431. data/lib/opencode_client/models/provider_config.rb +227 -0
  432. data/lib/opencode_client/models/provider_config_models_value.rb +329 -0
  433. data/lib/opencode_client/models/provider_config_models_value_interleaved.rb +103 -0
  434. data/lib/opencode_client/models/provider_config_models_value_interleaved_any_of.rb +188 -0
  435. data/lib/opencode_client/models/provider_config_options.rb +185 -0
  436. data/lib/opencode_client/models/provider_config_options_timeout.rb +104 -0
  437. data/lib/opencode_client/models/provider_list200_response.rb +222 -0
  438. data/lib/opencode_client/models/provider_list200_response_all_inner.rb +264 -0
  439. data/lib/opencode_client/models/provider_list200_response_all_inner_models_value.rb +482 -0
  440. data/lib/opencode_client/models/provider_list200_response_all_inner_models_value_cost.rb +217 -0
  441. data/lib/opencode_client/models/provider_list200_response_all_inner_models_value_cost_context_over200k.rb +208 -0
  442. data/lib/opencode_client/models/provider_list200_response_all_inner_models_value_interleaved.rb +103 -0
  443. data/lib/opencode_client/models/provider_list200_response_all_inner_models_value_interleaved_any_of.rb +188 -0
  444. data/lib/opencode_client/models/provider_list200_response_all_inner_models_value_limit.rb +190 -0
  445. data/lib/opencode_client/models/provider_list200_response_all_inner_models_value_modalities.rb +196 -0
  446. data/lib/opencode_client/models/provider_list200_response_all_inner_models_value_provider.rb +164 -0
  447. data/lib/opencode_client/models/provider_oauth_authorize_request.rb +165 -0
  448. data/lib/opencode_client/models/provider_oauth_callback_request.rb +175 -0
  449. data/lib/opencode_client/models/pty.rb +357 -0
  450. data/lib/opencode_client/models/pty_create_request.rb +187 -0
  451. data/lib/opencode_client/models/pty_update_request.rb +156 -0
  452. data/lib/opencode_client/models/pty_update_request_size.rb +190 -0
  453. data/lib/opencode_client/models/range.rb +190 -0
  454. data/lib/opencode_client/models/range_start.rb +190 -0
  455. data/lib/opencode_client/models/reasoning_part.rb +329 -0
  456. data/lib/opencode_client/models/retry_part.rb +344 -0
  457. data/lib/opencode_client/models/server_config.rb +188 -0
  458. data/lib/opencode_client/models/session.rb +362 -0
  459. data/lib/opencode_client/models/session_command_request.rb +238 -0
  460. data/lib/opencode_client/models/session_create_request.rb +177 -0
  461. data/lib/opencode_client/models/session_fork_request.rb +168 -0
  462. data/lib/opencode_client/models/session_init_request.rb +227 -0
  463. data/lib/opencode_client/models/session_messages200_response_inner.rb +192 -0
  464. data/lib/opencode_client/models/session_prompt200_response.rb +192 -0
  465. data/lib/opencode_client/models/session_prompt_request.rb +243 -0
  466. data/lib/opencode_client/models/session_prompt_request_model.rb +190 -0
  467. data/lib/opencode_client/models/session_prompt_request_parts_inner.rb +105 -0
  468. data/lib/opencode_client/models/session_revert.rb +191 -0
  469. data/lib/opencode_client/models/session_revert_request.rb +205 -0
  470. data/lib/opencode_client/models/session_share.rb +164 -0
  471. data/lib/opencode_client/models/session_shell_request.rb +199 -0
  472. data/lib/opencode_client/models/session_status.rb +104 -0
  473. data/lib/opencode_client/models/session_status_any_of.rb +188 -0
  474. data/lib/opencode_client/models/session_status_any_of1.rb +266 -0
  475. data/lib/opencode_client/models/session_status_any_of2.rb +188 -0
  476. data/lib/opencode_client/models/session_summarize_request.rb +201 -0
  477. data/lib/opencode_client/models/session_summary.rb +227 -0
  478. data/lib/opencode_client/models/session_time.rb +208 -0
  479. data/lib/opencode_client/models/session_update_request.rb +156 -0
  480. data/lib/opencode_client/models/session_update_request_time.rb +147 -0
  481. data/lib/opencode_client/models/snapshot_part.rb +292 -0
  482. data/lib/opencode_client/models/step_finish_part.rb +353 -0
  483. data/lib/opencode_client/models/step_start_part.rb +275 -0
  484. data/lib/opencode_client/models/subtask_part_input.rb +284 -0
  485. data/lib/opencode_client/models/symbol.rb +216 -0
  486. data/lib/opencode_client/models/symbol_location.rb +190 -0
  487. data/lib/opencode_client/models/symbol_source.rb +336 -0
  488. data/lib/opencode_client/models/text_part.rb +330 -0
  489. data/lib/opencode_client/models/text_part_input.rb +261 -0
  490. data/lib/opencode_client/models/text_part_time.rb +173 -0
  491. data/lib/opencode_client/models/todo.rb +246 -0
  492. data/lib/opencode_client/models/tool_list_item.rb +202 -0
  493. data/lib/opencode_client/models/tool_part.rb +355 -0
  494. data/lib/opencode_client/models/tool_state.rb +105 -0
  495. data/lib/opencode_client/models/tool_state_completed.rb +333 -0
  496. data/lib/opencode_client/models/tool_state_completed_time.rb +199 -0
  497. data/lib/opencode_client/models/tool_state_error.rb +279 -0
  498. data/lib/opencode_client/models/tool_state_error_time.rb +190 -0
  499. data/lib/opencode_client/models/tool_state_pending.rb +242 -0
  500. data/lib/opencode_client/models/tool_state_running.rb +262 -0
  501. data/lib/opencode_client/models/tool_state_running_time.rb +164 -0
  502. data/lib/opencode_client/models/tui_control_next200_response.rb +176 -0
  503. data/lib/opencode_client/models/tui_execute_command_request.rb +164 -0
  504. data/lib/opencode_client/models/tui_publish_request.rb +104 -0
  505. data/lib/opencode_client/models/tui_show_toast_request.rb +235 -0
  506. data/lib/opencode_client/models/unknown_error.rb +214 -0
  507. data/lib/opencode_client/models/unknown_error_data.rb +164 -0
  508. data/lib/opencode_client/models/user_message.rb +347 -0
  509. data/lib/opencode_client/models/user_message_summary.rb +184 -0
  510. data/lib/opencode_client/models/user_message_time.rb +164 -0
  511. data/lib/opencode_client/models/vcs_info.rb +164 -0
  512. data/lib/opencode_client/models/well_known_auth.rb +240 -0
  513. data/lib/opencode_client/version.rb +15 -0
  514. data/lib/opencode_client.rb +291 -0
  515. data/opencode_client.gemspec +39 -0
  516. data/pkg/opencode_client-1.0.0.gem +0 -0
  517. data/spec/api/default_api_spec.rb +1090 -0
  518. data/spec/api/session_api_spec.rb +61 -0
  519. data/spec/models/agent_config_permission_bash_spec.rb +21 -0
  520. data/spec/models/agent_config_permission_spec.rb +82 -0
  521. data/spec/models/agent_config_spec.rb +100 -0
  522. data/spec/models/agent_part_input_spec.rb +58 -0
  523. data/spec/models/agent_part_source_spec.rb +48 -0
  524. data/spec/models/agent_part_spec.rb +70 -0
  525. data/spec/models/agent_permission_spec.rb +90 -0
  526. data/spec/models/agent_spec.rb +124 -0
  527. data/spec/models/api_auth_spec.rb +46 -0
  528. data/spec/models/api_error_data_spec.rb +66 -0
  529. data/spec/models/api_error_spec.rb +46 -0
  530. data/spec/models/app_log_request_spec.rb +58 -0
  531. data/spec/models/assistant_message_error_spec.rb +21 -0
  532. data/spec/models/assistant_message_path_spec.rb +42 -0
  533. data/spec/models/assistant_message_spec.rb +124 -0
  534. data/spec/models/assistant_message_time_spec.rb +42 -0
  535. data/spec/models/assistant_message_tokens_cache_spec.rb +42 -0
  536. data/spec/models/assistant_message_tokens_spec.rb +54 -0
  537. data/spec/models/auth_spec.rb +21 -0
  538. data/spec/models/bad_request_error_spec.rb +52 -0
  539. data/spec/models/command_spec.rb +66 -0
  540. data/spec/models/compaction_part_spec.rb +64 -0
  541. data/spec/models/config_agent_spec.rb +72 -0
  542. data/spec/models/config_autoupdate_spec.rb +21 -0
  543. data/spec/models/config_command_value_spec.rb +60 -0
  544. data/spec/models/config_compaction_spec.rb +42 -0
  545. data/spec/models/config_enterprise_spec.rb +36 -0
  546. data/spec/models/config_experimental_hook_file_edited_value_inner_spec.rb +42 -0
  547. data/spec/models/config_experimental_hook_spec.rb +42 -0
  548. data/spec/models/config_experimental_spec.rb +72 -0
  549. data/spec/models/config_formatter_any_of_value_spec.rb +54 -0
  550. data/spec/models/config_formatter_spec.rb +21 -0
  551. data/spec/models/config_lsp_any_of_value_any_of1_spec.rb +60 -0
  552. data/spec/models/config_lsp_any_of_value_any_of_spec.rb +40 -0
  553. data/spec/models/config_lsp_any_of_value_spec.rb +21 -0
  554. data/spec/models/config_lsp_spec.rb +21 -0
  555. data/spec/models/config_mode_spec.rb +42 -0
  556. data/spec/models/config_providers200_response_spec.rb +42 -0
  557. data/spec/models/config_spec.rb +232 -0
  558. data/spec/models/config_tui_scroll_acceleration_spec.rb +36 -0
  559. data/spec/models/config_tui_spec.rb +52 -0
  560. data/spec/models/config_watcher_spec.rb +36 -0
  561. data/spec/models/event_command_executed_properties_spec.rb +54 -0
  562. data/spec/models/event_command_executed_spec.rb +46 -0
  563. data/spec/models/event_file_edited_properties_spec.rb +36 -0
  564. data/spec/models/event_file_edited_spec.rb +46 -0
  565. data/spec/models/event_file_watcher_updated_properties_spec.rb +46 -0
  566. data/spec/models/event_file_watcher_updated_spec.rb +46 -0
  567. data/spec/models/event_global_disposed_spec.rb +46 -0
  568. data/spec/models/event_installation_update_available_spec.rb +46 -0
  569. data/spec/models/event_installation_updated_properties_spec.rb +36 -0
  570. data/spec/models/event_installation_updated_spec.rb +46 -0
  571. data/spec/models/event_lsp_client_diagnostics_properties_spec.rb +42 -0
  572. data/spec/models/event_lsp_client_diagnostics_spec.rb +46 -0
  573. data/spec/models/event_lsp_updated_spec.rb +46 -0
  574. data/spec/models/event_mcp_tools_changed_properties_spec.rb +36 -0
  575. data/spec/models/event_mcp_tools_changed_spec.rb +46 -0
  576. data/spec/models/event_message_part_removed_properties_spec.rb +48 -0
  577. data/spec/models/event_message_part_removed_spec.rb +46 -0
  578. data/spec/models/event_message_part_updated_properties_spec.rb +42 -0
  579. data/spec/models/event_message_part_updated_spec.rb +46 -0
  580. data/spec/models/event_message_removed_properties_spec.rb +42 -0
  581. data/spec/models/event_message_removed_spec.rb +46 -0
  582. data/spec/models/event_message_updated_properties_spec.rb +36 -0
  583. data/spec/models/event_message_updated_spec.rb +46 -0
  584. data/spec/models/event_permission_replied_properties_spec.rb +48 -0
  585. data/spec/models/event_permission_replied_spec.rb +46 -0
  586. data/spec/models/event_permission_updated_spec.rb +46 -0
  587. data/spec/models/event_project_updated_spec.rb +46 -0
  588. data/spec/models/event_pty_created_properties_spec.rb +36 -0
  589. data/spec/models/event_pty_created_spec.rb +46 -0
  590. data/spec/models/event_pty_deleted_properties_spec.rb +36 -0
  591. data/spec/models/event_pty_deleted_spec.rb +46 -0
  592. data/spec/models/event_pty_exited_properties_spec.rb +42 -0
  593. data/spec/models/event_pty_exited_spec.rb +46 -0
  594. data/spec/models/event_pty_updated_spec.rb +46 -0
  595. data/spec/models/event_server_connected_spec.rb +46 -0
  596. data/spec/models/event_server_instance_disposed_properties_spec.rb +36 -0
  597. data/spec/models/event_server_instance_disposed_spec.rb +46 -0
  598. data/spec/models/event_session_compacted_spec.rb +46 -0
  599. data/spec/models/event_session_created_properties_spec.rb +36 -0
  600. data/spec/models/event_session_created_spec.rb +46 -0
  601. data/spec/models/event_session_deleted_spec.rb +46 -0
  602. data/spec/models/event_session_diff_properties_spec.rb +42 -0
  603. data/spec/models/event_session_diff_spec.rb +46 -0
  604. data/spec/models/event_session_error_properties_spec.rb +42 -0
  605. data/spec/models/event_session_error_spec.rb +46 -0
  606. data/spec/models/event_session_idle_properties_spec.rb +36 -0
  607. data/spec/models/event_session_idle_spec.rb +46 -0
  608. data/spec/models/event_session_status_properties_spec.rb +42 -0
  609. data/spec/models/event_session_status_spec.rb +46 -0
  610. data/spec/models/event_session_updated_spec.rb +46 -0
  611. data/spec/models/event_spec.rb +21 -0
  612. data/spec/models/event_todo_updated_properties_spec.rb +42 -0
  613. data/spec/models/event_todo_updated_spec.rb +46 -0
  614. data/spec/models/event_tui_command_execute_properties_command_spec.rb +21 -0
  615. data/spec/models/event_tui_command_execute_properties_spec.rb +36 -0
  616. data/spec/models/event_tui_command_execute_spec.rb +46 -0
  617. data/spec/models/event_tui_prompt_append_spec.rb +46 -0
  618. data/spec/models/event_tui_toast_show_spec.rb +46 -0
  619. data/spec/models/event_vcs_branch_updated_properties_spec.rb +36 -0
  620. data/spec/models/event_vcs_branch_updated_spec.rb +46 -0
  621. data/spec/models/file_content_patch_hunks_inner_spec.rb +60 -0
  622. data/spec/models/file_content_patch_spec.rb +66 -0
  623. data/spec/models/file_content_spec.rb +74 -0
  624. data/spec/models/file_diff_spec.rb +60 -0
  625. data/spec/models/file_node_spec.rb +64 -0
  626. data/spec/models/file_part_input_spec.rb +70 -0
  627. data/spec/models/file_part_source_spec.rb +21 -0
  628. data/spec/models/file_part_source_text_spec.rb +48 -0
  629. data/spec/models/file_part_spec.rb +82 -0
  630. data/spec/models/file_source_spec.rb +52 -0
  631. data/spec/models/file_spec.rb +58 -0
  632. data/spec/models/find_text200_response_inner_path_spec.rb +36 -0
  633. data/spec/models/find_text200_response_inner_spec.rb +60 -0
  634. data/spec/models/find_text200_response_inner_submatches_inner_spec.rb +48 -0
  635. data/spec/models/formatter_status_spec.rb +48 -0
  636. data/spec/models/global_event_spec.rb +42 -0
  637. data/spec/models/global_health200_response_spec.rb +46 -0
  638. data/spec/models/keybinds_config_spec.rb +546 -0
  639. data/spec/models/layout_config_spec.rb +30 -0
  640. data/spec/models/log_level_spec.rb +30 -0
  641. data/spec/models/lsp_status_spec.rb +58 -0
  642. data/spec/models/mcp_add_request_config_spec.rb +21 -0
  643. data/spec/models/mcp_add_request_spec.rb +42 -0
  644. data/spec/models/mcp_auth_callback_request_spec.rb +36 -0
  645. data/spec/models/mcp_auth_remove200_response_spec.rb +40 -0
  646. data/spec/models/mcp_auth_start200_response_spec.rb +36 -0
  647. data/spec/models/mcp_local_config_spec.rb +64 -0
  648. data/spec/models/mcp_o_auth_config_spec.rb +48 -0
  649. data/spec/models/mcp_remote_config_oauth_spec.rb +21 -0
  650. data/spec/models/mcp_remote_config_spec.rb +70 -0
  651. data/spec/models/mcp_status_connected_spec.rb +40 -0
  652. data/spec/models/mcp_status_disabled_spec.rb +40 -0
  653. data/spec/models/mcp_status_failed_spec.rb +46 -0
  654. data/spec/models/mcp_status_needs_auth_spec.rb +40 -0
  655. data/spec/models/mcp_status_needs_client_registration_spec.rb +46 -0
  656. data/spec/models/mcp_status_spec.rb +21 -0
  657. data/spec/models/message_aborted_error_spec.rb +46 -0
  658. data/spec/models/message_output_length_error_spec.rb +46 -0
  659. data/spec/models/message_spec.rb +21 -0
  660. data/spec/models/model_api_spec.rb +48 -0
  661. data/spec/models/model_capabilities_input_spec.rb +60 -0
  662. data/spec/models/model_capabilities_interleaved_any_of_spec.rb +40 -0
  663. data/spec/models/model_capabilities_interleaved_spec.rb +21 -0
  664. data/spec/models/model_capabilities_spec.rb +72 -0
  665. data/spec/models/model_cost_experimental_over200_k_spec.rb +48 -0
  666. data/spec/models/model_cost_spec.rb +54 -0
  667. data/spec/models/model_spec.rb +106 -0
  668. data/spec/models/not_found_error_spec.rb +46 -0
  669. data/spec/models/o_auth_spec.rb +64 -0
  670. data/spec/models/part_any_of_spec.rb +82 -0
  671. data/spec/models/part_spec.rb +21 -0
  672. data/spec/models/patch_part_spec.rb +70 -0
  673. data/spec/models/path_spec.rb +60 -0
  674. data/spec/models/permission_pattern_spec.rb +21 -0
  675. data/spec/models/permission_respond_request_spec.rb +40 -0
  676. data/spec/models/permission_spec.rb +84 -0
  677. data/spec/models/project_spec.rb +70 -0
  678. data/spec/models/project_time_spec.rb +48 -0
  679. data/spec/models/project_update_request_icon_spec.rb +42 -0
  680. data/spec/models/project_update_request_spec.rb +42 -0
  681. data/spec/models/provider_auth_authorization_spec.rb +52 -0
  682. data/spec/models/provider_auth_error_data_spec.rb +42 -0
  683. data/spec/models/provider_auth_error_spec.rb +46 -0
  684. data/spec/models/provider_auth_method_spec.rb +46 -0
  685. data/spec/models/provider_config_models_value_interleaved_any_of_spec.rb +40 -0
  686. data/spec/models/provider_config_models_value_interleaved_spec.rb +21 -0
  687. data/spec/models/provider_config_models_value_spec.rb +136 -0
  688. data/spec/models/provider_config_options_spec.rb +60 -0
  689. data/spec/models/provider_config_options_timeout_spec.rb +21 -0
  690. data/spec/models/provider_config_spec.rb +84 -0
  691. data/spec/models/provider_list200_response_all_inner_models_value_cost_context_over200k_spec.rb +54 -0
  692. data/spec/models/provider_list200_response_all_inner_models_value_cost_spec.rb +60 -0
  693. data/spec/models/provider_list200_response_all_inner_models_value_interleaved_any_of_spec.rb +40 -0
  694. data/spec/models/provider_list200_response_all_inner_models_value_interleaved_spec.rb +21 -0
  695. data/spec/models/provider_list200_response_all_inner_models_value_limit_spec.rb +42 -0
  696. data/spec/models/provider_list200_response_all_inner_models_value_modalities_spec.rb +50 -0
  697. data/spec/models/provider_list200_response_all_inner_models_value_provider_spec.rb +36 -0
  698. data/spec/models/provider_list200_response_all_inner_models_value_spec.rb +136 -0
  699. data/spec/models/provider_list200_response_all_inner_spec.rb +66 -0
  700. data/spec/models/provider_list200_response_spec.rb +48 -0
  701. data/spec/models/provider_oauth_authorize_request_spec.rb +36 -0
  702. data/spec/models/provider_oauth_callback_request_spec.rb +42 -0
  703. data/spec/models/provider_spec.rb +76 -0
  704. data/spec/models/pty_create_request_spec.rb +60 -0
  705. data/spec/models/pty_spec.rb +76 -0
  706. data/spec/models/pty_update_request_size_spec.rb +42 -0
  707. data/spec/models/pty_update_request_spec.rb +42 -0
  708. data/spec/models/range_spec.rb +42 -0
  709. data/spec/models/range_start_spec.rb +42 -0
  710. data/spec/models/reasoning_part_spec.rb +76 -0
  711. data/spec/models/retry_part_spec.rb +76 -0
  712. data/spec/models/server_config_spec.rb +48 -0
  713. data/spec/models/session_command_request_spec.rb +60 -0
  714. data/spec/models/session_create_request_spec.rb +42 -0
  715. data/spec/models/session_fork_request_spec.rb +36 -0
  716. data/spec/models/session_init_request_spec.rb +48 -0
  717. data/spec/models/session_messages200_response_inner_spec.rb +42 -0
  718. data/spec/models/session_prompt200_response_spec.rb +42 -0
  719. data/spec/models/session_prompt_request_model_spec.rb +42 -0
  720. data/spec/models/session_prompt_request_parts_inner_spec.rb +21 -0
  721. data/spec/models/session_prompt_request_spec.rb +72 -0
  722. data/spec/models/session_revert_request_spec.rb +42 -0
  723. data/spec/models/session_revert_spec.rb +54 -0
  724. data/spec/models/session_share_spec.rb +36 -0
  725. data/spec/models/session_shell_request_spec.rb +48 -0
  726. data/spec/models/session_spec.rb +90 -0
  727. data/spec/models/session_status_any_of1_spec.rb +58 -0
  728. data/spec/models/session_status_any_of2_spec.rb +40 -0
  729. data/spec/models/session_status_any_of_spec.rb +40 -0
  730. data/spec/models/session_status_spec.rb +21 -0
  731. data/spec/models/session_summarize_request_spec.rb +48 -0
  732. data/spec/models/session_summary_spec.rb +54 -0
  733. data/spec/models/session_time_spec.rb +54 -0
  734. data/spec/models/session_update_request_spec.rb +42 -0
  735. data/spec/models/session_update_request_time_spec.rb +36 -0
  736. data/spec/models/snapshot_part_spec.rb +64 -0
  737. data/spec/models/step_finish_part_spec.rb +82 -0
  738. data/spec/models/step_start_part_spec.rb +64 -0
  739. data/spec/models/subtask_part_input_spec.rb +70 -0
  740. data/spec/models/symbol_location_spec.rb +42 -0
  741. data/spec/models/symbol_source_spec.rb +70 -0
  742. data/spec/models/symbol_spec.rb +48 -0
  743. data/spec/models/text_part_input_spec.rb +76 -0
  744. data/spec/models/text_part_spec.rb +88 -0
  745. data/spec/models/text_part_time_spec.rb +42 -0
  746. data/spec/models/todo_spec.rb +54 -0
  747. data/spec/models/tool_list_item_spec.rb +48 -0
  748. data/spec/models/tool_part_spec.rb +82 -0
  749. data/spec/models/tool_state_completed_spec.rb +76 -0
  750. data/spec/models/tool_state_completed_time_spec.rb +48 -0
  751. data/spec/models/tool_state_error_spec.rb +64 -0
  752. data/spec/models/tool_state_error_time_spec.rb +42 -0
  753. data/spec/models/tool_state_pending_spec.rb +52 -0
  754. data/spec/models/tool_state_running_spec.rb +64 -0
  755. data/spec/models/tool_state_running_time_spec.rb +36 -0
  756. data/spec/models/tool_state_spec.rb +21 -0
  757. data/spec/models/tui_control_next200_response_spec.rb +42 -0
  758. data/spec/models/tui_execute_command_request_spec.rb +36 -0
  759. data/spec/models/tui_publish_request_spec.rb +21 -0
  760. data/spec/models/tui_show_toast_request_spec.rb +58 -0
  761. data/spec/models/unknown_error_data_spec.rb +36 -0
  762. data/spec/models/unknown_error_spec.rb +46 -0
  763. data/spec/models/user_message_spec.rb +88 -0
  764. data/spec/models/user_message_summary_spec.rb +48 -0
  765. data/spec/models/user_message_time_spec.rb +36 -0
  766. data/spec/models/vcs_info_spec.rb +36 -0
  767. data/spec/models/well_known_auth_spec.rb +52 -0
  768. data/spec/spec_helper.rb +111 -0
  769. metadata +1099 -0
@@ -0,0 +1,482 @@
1
+ =begin
2
+ #opencode
3
+
4
+ #opencode api
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.18.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module OpencodeClient
17
+ class ProviderList200ResponseAllInnerModelsValue < ApiModelBase
18
+ attr_accessor :id
19
+
20
+ attr_accessor :name
21
+
22
+ attr_accessor :family
23
+
24
+ attr_accessor :release_date
25
+
26
+ attr_accessor :attachment
27
+
28
+ attr_accessor :reasoning
29
+
30
+ attr_accessor :temperature
31
+
32
+ attr_accessor :tool_call
33
+
34
+ attr_accessor :interleaved
35
+
36
+ attr_accessor :cost
37
+
38
+ attr_accessor :limit
39
+
40
+ attr_accessor :modalities
41
+
42
+ attr_accessor :experimental
43
+
44
+ attr_accessor :status
45
+
46
+ attr_accessor :options
47
+
48
+ attr_accessor :headers
49
+
50
+ attr_accessor :provider
51
+
52
+ class EnumAttributeValidator
53
+ attr_reader :datatype
54
+ attr_reader :allowable_values
55
+
56
+ def initialize(datatype, allowable_values)
57
+ @allowable_values = allowable_values.map do |value|
58
+ case datatype.to_s
59
+ when /Integer/i
60
+ value.to_i
61
+ when /Float/i
62
+ value.to_f
63
+ else
64
+ value
65
+ end
66
+ end
67
+ end
68
+
69
+ def valid?(value)
70
+ !value || allowable_values.include?(value)
71
+ end
72
+ end
73
+
74
+ # Attribute mapping from ruby-style variable name to JSON key.
75
+ def self.attribute_map
76
+ {
77
+ :'id' => :'id',
78
+ :'name' => :'name',
79
+ :'family' => :'family',
80
+ :'release_date' => :'release_date',
81
+ :'attachment' => :'attachment',
82
+ :'reasoning' => :'reasoning',
83
+ :'temperature' => :'temperature',
84
+ :'tool_call' => :'tool_call',
85
+ :'interleaved' => :'interleaved',
86
+ :'cost' => :'cost',
87
+ :'limit' => :'limit',
88
+ :'modalities' => :'modalities',
89
+ :'experimental' => :'experimental',
90
+ :'status' => :'status',
91
+ :'options' => :'options',
92
+ :'headers' => :'headers',
93
+ :'provider' => :'provider'
94
+ }
95
+ end
96
+
97
+ # Returns attribute mapping this model knows about
98
+ def self.acceptable_attribute_map
99
+ attribute_map
100
+ end
101
+
102
+ # Returns all the JSON keys this model knows about
103
+ def self.acceptable_attributes
104
+ acceptable_attribute_map.values
105
+ end
106
+
107
+ # Attribute type mapping.
108
+ def self.openapi_types
109
+ {
110
+ :'id' => :'String',
111
+ :'name' => :'String',
112
+ :'family' => :'String',
113
+ :'release_date' => :'String',
114
+ :'attachment' => :'Boolean',
115
+ :'reasoning' => :'Boolean',
116
+ :'temperature' => :'Boolean',
117
+ :'tool_call' => :'Boolean',
118
+ :'interleaved' => :'ProviderList200ResponseAllInnerModelsValueInterleaved',
119
+ :'cost' => :'ProviderList200ResponseAllInnerModelsValueCost',
120
+ :'limit' => :'ProviderList200ResponseAllInnerModelsValueLimit',
121
+ :'modalities' => :'ProviderList200ResponseAllInnerModelsValueModalities',
122
+ :'experimental' => :'Boolean',
123
+ :'status' => :'String',
124
+ :'options' => :'Hash<String, Object>',
125
+ :'headers' => :'Hash<String, String>',
126
+ :'provider' => :'ProviderList200ResponseAllInnerModelsValueProvider'
127
+ }
128
+ end
129
+
130
+ # List of attributes with nullable: true
131
+ def self.openapi_nullable
132
+ Set.new([
133
+ ])
134
+ end
135
+
136
+ # Initializes the object
137
+ # @param [Hash] attributes Model attributes in the form of hash
138
+ def initialize(attributes = {})
139
+ if (!attributes.is_a?(Hash))
140
+ fail ArgumentError, "The input argument (attributes) must be a hash in `OpencodeClient::ProviderList200ResponseAllInnerModelsValue` initialize method"
141
+ end
142
+
143
+ # check to see if the attribute exists and convert string to symbol for hash key
144
+ acceptable_attribute_map = self.class.acceptable_attribute_map
145
+ attributes = attributes.each_with_object({}) { |(k, v), h|
146
+ if (!acceptable_attribute_map.key?(k.to_sym))
147
+ fail ArgumentError, "`#{k}` is not a valid attribute in `OpencodeClient::ProviderList200ResponseAllInnerModelsValue`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
148
+ end
149
+ h[k.to_sym] = v
150
+ }
151
+
152
+ if attributes.key?(:'id')
153
+ self.id = attributes[:'id']
154
+ else
155
+ self.id = nil
156
+ end
157
+
158
+ if attributes.key?(:'name')
159
+ self.name = attributes[:'name']
160
+ else
161
+ self.name = nil
162
+ end
163
+
164
+ if attributes.key?(:'family')
165
+ self.family = attributes[:'family']
166
+ end
167
+
168
+ if attributes.key?(:'release_date')
169
+ self.release_date = attributes[:'release_date']
170
+ else
171
+ self.release_date = nil
172
+ end
173
+
174
+ if attributes.key?(:'attachment')
175
+ self.attachment = attributes[:'attachment']
176
+ else
177
+ self.attachment = nil
178
+ end
179
+
180
+ if attributes.key?(:'reasoning')
181
+ self.reasoning = attributes[:'reasoning']
182
+ else
183
+ self.reasoning = nil
184
+ end
185
+
186
+ if attributes.key?(:'temperature')
187
+ self.temperature = attributes[:'temperature']
188
+ else
189
+ self.temperature = nil
190
+ end
191
+
192
+ if attributes.key?(:'tool_call')
193
+ self.tool_call = attributes[:'tool_call']
194
+ else
195
+ self.tool_call = nil
196
+ end
197
+
198
+ if attributes.key?(:'interleaved')
199
+ self.interleaved = attributes[:'interleaved']
200
+ end
201
+
202
+ if attributes.key?(:'cost')
203
+ self.cost = attributes[:'cost']
204
+ end
205
+
206
+ if attributes.key?(:'limit')
207
+ self.limit = attributes[:'limit']
208
+ else
209
+ self.limit = nil
210
+ end
211
+
212
+ if attributes.key?(:'modalities')
213
+ self.modalities = attributes[:'modalities']
214
+ end
215
+
216
+ if attributes.key?(:'experimental')
217
+ self.experimental = attributes[:'experimental']
218
+ end
219
+
220
+ if attributes.key?(:'status')
221
+ self.status = attributes[:'status']
222
+ end
223
+
224
+ if attributes.key?(:'options')
225
+ if (value = attributes[:'options']).is_a?(Hash)
226
+ self.options = value
227
+ end
228
+ else
229
+ self.options = nil
230
+ end
231
+
232
+ if attributes.key?(:'headers')
233
+ if (value = attributes[:'headers']).is_a?(Hash)
234
+ self.headers = value
235
+ end
236
+ end
237
+
238
+ if attributes.key?(:'provider')
239
+ self.provider = attributes[:'provider']
240
+ end
241
+ end
242
+
243
+ # Show invalid properties with the reasons. Usually used together with valid?
244
+ # @return Array for valid properties with the reasons
245
+ def list_invalid_properties
246
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
247
+ invalid_properties = Array.new
248
+ if @id.nil?
249
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
250
+ end
251
+
252
+ if @name.nil?
253
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
254
+ end
255
+
256
+ if @release_date.nil?
257
+ invalid_properties.push('invalid value for "release_date", release_date cannot be nil.')
258
+ end
259
+
260
+ if @attachment.nil?
261
+ invalid_properties.push('invalid value for "attachment", attachment cannot be nil.')
262
+ end
263
+
264
+ if @reasoning.nil?
265
+ invalid_properties.push('invalid value for "reasoning", reasoning cannot be nil.')
266
+ end
267
+
268
+ if @temperature.nil?
269
+ invalid_properties.push('invalid value for "temperature", temperature cannot be nil.')
270
+ end
271
+
272
+ if @tool_call.nil?
273
+ invalid_properties.push('invalid value for "tool_call", tool_call cannot be nil.')
274
+ end
275
+
276
+ if @limit.nil?
277
+ invalid_properties.push('invalid value for "limit", limit cannot be nil.')
278
+ end
279
+
280
+ if @options.nil?
281
+ invalid_properties.push('invalid value for "options", options cannot be nil.')
282
+ end
283
+
284
+ invalid_properties
285
+ end
286
+
287
+ # Check to see if the all the properties in the model are valid
288
+ # @return true if the model is valid
289
+ def valid?
290
+ warn '[DEPRECATED] the `valid?` method is obsolete'
291
+ return false if @id.nil?
292
+ return false if @name.nil?
293
+ return false if @release_date.nil?
294
+ return false if @attachment.nil?
295
+ return false if @reasoning.nil?
296
+ return false if @temperature.nil?
297
+ return false if @tool_call.nil?
298
+ return false if @limit.nil?
299
+ status_validator = EnumAttributeValidator.new('String', ["alpha", "beta", "deprecated"])
300
+ return false unless status_validator.valid?(@status)
301
+ return false if @options.nil?
302
+ true
303
+ end
304
+
305
+ # Custom attribute writer method with validation
306
+ # @param [Object] id Value to be assigned
307
+ def id=(id)
308
+ if id.nil?
309
+ fail ArgumentError, 'id cannot be nil'
310
+ end
311
+
312
+ @id = id
313
+ end
314
+
315
+ # Custom attribute writer method with validation
316
+ # @param [Object] name Value to be assigned
317
+ def name=(name)
318
+ if name.nil?
319
+ fail ArgumentError, 'name cannot be nil'
320
+ end
321
+
322
+ @name = name
323
+ end
324
+
325
+ # Custom attribute writer method with validation
326
+ # @param [Object] release_date Value to be assigned
327
+ def release_date=(release_date)
328
+ if release_date.nil?
329
+ fail ArgumentError, 'release_date cannot be nil'
330
+ end
331
+
332
+ @release_date = release_date
333
+ end
334
+
335
+ # Custom attribute writer method with validation
336
+ # @param [Object] attachment Value to be assigned
337
+ def attachment=(attachment)
338
+ if attachment.nil?
339
+ fail ArgumentError, 'attachment cannot be nil'
340
+ end
341
+
342
+ @attachment = attachment
343
+ end
344
+
345
+ # Custom attribute writer method with validation
346
+ # @param [Object] reasoning Value to be assigned
347
+ def reasoning=(reasoning)
348
+ if reasoning.nil?
349
+ fail ArgumentError, 'reasoning cannot be nil'
350
+ end
351
+
352
+ @reasoning = reasoning
353
+ end
354
+
355
+ # Custom attribute writer method with validation
356
+ # @param [Object] temperature Value to be assigned
357
+ def temperature=(temperature)
358
+ if temperature.nil?
359
+ fail ArgumentError, 'temperature cannot be nil'
360
+ end
361
+
362
+ @temperature = temperature
363
+ end
364
+
365
+ # Custom attribute writer method with validation
366
+ # @param [Object] tool_call Value to be assigned
367
+ def tool_call=(tool_call)
368
+ if tool_call.nil?
369
+ fail ArgumentError, 'tool_call cannot be nil'
370
+ end
371
+
372
+ @tool_call = tool_call
373
+ end
374
+
375
+ # Custom attribute writer method with validation
376
+ # @param [Object] limit Value to be assigned
377
+ def limit=(limit)
378
+ if limit.nil?
379
+ fail ArgumentError, 'limit cannot be nil'
380
+ end
381
+
382
+ @limit = limit
383
+ end
384
+
385
+ # Custom attribute writer method checking allowed values (enum).
386
+ # @param [Object] status Object to be assigned
387
+ def status=(status)
388
+ validator = EnumAttributeValidator.new('String', ["alpha", "beta", "deprecated"])
389
+ unless validator.valid?(status)
390
+ fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
391
+ end
392
+ @status = status
393
+ end
394
+
395
+ # Custom attribute writer method with validation
396
+ # @param [Object] options Value to be assigned
397
+ def options=(options)
398
+ if options.nil?
399
+ fail ArgumentError, 'options cannot be nil'
400
+ end
401
+
402
+ @options = options
403
+ end
404
+
405
+ # Checks equality by comparing each attribute.
406
+ # @param [Object] Object to be compared
407
+ def ==(o)
408
+ return true if self.equal?(o)
409
+ self.class == o.class &&
410
+ id == o.id &&
411
+ name == o.name &&
412
+ family == o.family &&
413
+ release_date == o.release_date &&
414
+ attachment == o.attachment &&
415
+ reasoning == o.reasoning &&
416
+ temperature == o.temperature &&
417
+ tool_call == o.tool_call &&
418
+ interleaved == o.interleaved &&
419
+ cost == o.cost &&
420
+ limit == o.limit &&
421
+ modalities == o.modalities &&
422
+ experimental == o.experimental &&
423
+ status == o.status &&
424
+ options == o.options &&
425
+ headers == o.headers &&
426
+ provider == o.provider
427
+ end
428
+
429
+ # @see the `==` method
430
+ # @param [Object] Object to be compared
431
+ def eql?(o)
432
+ self == o
433
+ end
434
+
435
+ # Calculates hash code according to all attributes.
436
+ # @return [Integer] Hash code
437
+ def hash
438
+ [id, name, family, release_date, attachment, reasoning, temperature, tool_call, interleaved, cost, limit, modalities, experimental, status, options, headers, provider].hash
439
+ end
440
+
441
+ # Builds the object from hash
442
+ # @param [Hash] attributes Model attributes in the form of hash
443
+ # @return [Object] Returns the model itself
444
+ def self.build_from_hash(attributes)
445
+ return nil unless attributes.is_a?(Hash)
446
+ attributes = attributes.transform_keys(&:to_sym)
447
+ transformed_hash = {}
448
+ openapi_types.each_pair do |key, type|
449
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
450
+ transformed_hash["#{key}"] = nil
451
+ elsif type =~ /\AArray<(.*)>/i
452
+ # check to ensure the input is an array given that the attribute
453
+ # is documented as an array but the input is not
454
+ if attributes[attribute_map[key]].is_a?(Array)
455
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
456
+ end
457
+ elsif !attributes[attribute_map[key]].nil?
458
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
459
+ end
460
+ end
461
+ new(transformed_hash)
462
+ end
463
+
464
+ # Returns the object in the form of hash
465
+ # @return [Hash] Returns the object in the form of hash
466
+ def to_hash
467
+ hash = {}
468
+ self.class.attribute_map.each_pair do |attr, param|
469
+ value = self.send(attr)
470
+ if value.nil?
471
+ is_nullable = self.class.openapi_nullable.include?(attr)
472
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
473
+ end
474
+
475
+ hash[param] = _to_hash(value)
476
+ end
477
+ hash
478
+ end
479
+
480
+ end
481
+
482
+ end
@@ -0,0 +1,217 @@
1
+ =begin
2
+ #opencode
3
+
4
+ #opencode api
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.18.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module OpencodeClient
17
+ class ProviderList200ResponseAllInnerModelsValueCost < ApiModelBase
18
+ attr_accessor :input
19
+
20
+ attr_accessor :output
21
+
22
+ attr_accessor :cache_read
23
+
24
+ attr_accessor :cache_write
25
+
26
+ attr_accessor :context_over_200k
27
+
28
+ # Attribute mapping from ruby-style variable name to JSON key.
29
+ def self.attribute_map
30
+ {
31
+ :'input' => :'input',
32
+ :'output' => :'output',
33
+ :'cache_read' => :'cache_read',
34
+ :'cache_write' => :'cache_write',
35
+ :'context_over_200k' => :'context_over_200k'
36
+ }
37
+ end
38
+
39
+ # Returns attribute mapping this model knows about
40
+ def self.acceptable_attribute_map
41
+ attribute_map
42
+ end
43
+
44
+ # Returns all the JSON keys this model knows about
45
+ def self.acceptable_attributes
46
+ acceptable_attribute_map.values
47
+ end
48
+
49
+ # Attribute type mapping.
50
+ def self.openapi_types
51
+ {
52
+ :'input' => :'Float',
53
+ :'output' => :'Float',
54
+ :'cache_read' => :'Float',
55
+ :'cache_write' => :'Float',
56
+ :'context_over_200k' => :'ProviderList200ResponseAllInnerModelsValueCostContextOver200k'
57
+ }
58
+ end
59
+
60
+ # List of attributes with nullable: true
61
+ def self.openapi_nullable
62
+ Set.new([
63
+ ])
64
+ end
65
+
66
+ # Initializes the object
67
+ # @param [Hash] attributes Model attributes in the form of hash
68
+ def initialize(attributes = {})
69
+ if (!attributes.is_a?(Hash))
70
+ fail ArgumentError, "The input argument (attributes) must be a hash in `OpencodeClient::ProviderList200ResponseAllInnerModelsValueCost` initialize method"
71
+ end
72
+
73
+ # check to see if the attribute exists and convert string to symbol for hash key
74
+ acceptable_attribute_map = self.class.acceptable_attribute_map
75
+ attributes = attributes.each_with_object({}) { |(k, v), h|
76
+ if (!acceptable_attribute_map.key?(k.to_sym))
77
+ fail ArgumentError, "`#{k}` is not a valid attribute in `OpencodeClient::ProviderList200ResponseAllInnerModelsValueCost`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
78
+ end
79
+ h[k.to_sym] = v
80
+ }
81
+
82
+ if attributes.key?(:'input')
83
+ self.input = attributes[:'input']
84
+ else
85
+ self.input = nil
86
+ end
87
+
88
+ if attributes.key?(:'output')
89
+ self.output = attributes[:'output']
90
+ else
91
+ self.output = nil
92
+ end
93
+
94
+ if attributes.key?(:'cache_read')
95
+ self.cache_read = attributes[:'cache_read']
96
+ end
97
+
98
+ if attributes.key?(:'cache_write')
99
+ self.cache_write = attributes[:'cache_write']
100
+ end
101
+
102
+ if attributes.key?(:'context_over_200k')
103
+ self.context_over_200k = attributes[:'context_over_200k']
104
+ end
105
+ end
106
+
107
+ # Show invalid properties with the reasons. Usually used together with valid?
108
+ # @return Array for valid properties with the reasons
109
+ def list_invalid_properties
110
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
111
+ invalid_properties = Array.new
112
+ if @input.nil?
113
+ invalid_properties.push('invalid value for "input", input cannot be nil.')
114
+ end
115
+
116
+ if @output.nil?
117
+ invalid_properties.push('invalid value for "output", output cannot be nil.')
118
+ end
119
+
120
+ invalid_properties
121
+ end
122
+
123
+ # Check to see if the all the properties in the model are valid
124
+ # @return true if the model is valid
125
+ def valid?
126
+ warn '[DEPRECATED] the `valid?` method is obsolete'
127
+ return false if @input.nil?
128
+ return false if @output.nil?
129
+ true
130
+ end
131
+
132
+ # Custom attribute writer method with validation
133
+ # @param [Object] input Value to be assigned
134
+ def input=(input)
135
+ if input.nil?
136
+ fail ArgumentError, 'input cannot be nil'
137
+ end
138
+
139
+ @input = input
140
+ end
141
+
142
+ # Custom attribute writer method with validation
143
+ # @param [Object] output Value to be assigned
144
+ def output=(output)
145
+ if output.nil?
146
+ fail ArgumentError, 'output cannot be nil'
147
+ end
148
+
149
+ @output = output
150
+ end
151
+
152
+ # Checks equality by comparing each attribute.
153
+ # @param [Object] Object to be compared
154
+ def ==(o)
155
+ return true if self.equal?(o)
156
+ self.class == o.class &&
157
+ input == o.input &&
158
+ output == o.output &&
159
+ cache_read == o.cache_read &&
160
+ cache_write == o.cache_write &&
161
+ context_over_200k == o.context_over_200k
162
+ end
163
+
164
+ # @see the `==` method
165
+ # @param [Object] Object to be compared
166
+ def eql?(o)
167
+ self == o
168
+ end
169
+
170
+ # Calculates hash code according to all attributes.
171
+ # @return [Integer] Hash code
172
+ def hash
173
+ [input, output, cache_read, cache_write, context_over_200k].hash
174
+ end
175
+
176
+ # Builds the object from hash
177
+ # @param [Hash] attributes Model attributes in the form of hash
178
+ # @return [Object] Returns the model itself
179
+ def self.build_from_hash(attributes)
180
+ return nil unless attributes.is_a?(Hash)
181
+ attributes = attributes.transform_keys(&:to_sym)
182
+ transformed_hash = {}
183
+ openapi_types.each_pair do |key, type|
184
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
185
+ transformed_hash["#{key}"] = nil
186
+ elsif type =~ /\AArray<(.*)>/i
187
+ # check to ensure the input is an array given that the attribute
188
+ # is documented as an array but the input is not
189
+ if attributes[attribute_map[key]].is_a?(Array)
190
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
191
+ end
192
+ elsif !attributes[attribute_map[key]].nil?
193
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
194
+ end
195
+ end
196
+ new(transformed_hash)
197
+ end
198
+
199
+ # Returns the object in the form of hash
200
+ # @return [Hash] Returns the object in the form of hash
201
+ def to_hash
202
+ hash = {}
203
+ self.class.attribute_map.each_pair do |attr, param|
204
+ value = self.send(attr)
205
+ if value.nil?
206
+ is_nullable = self.class.openapi_nullable.include?(attr)
207
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
208
+ end
209
+
210
+ hash[param] = _to_hash(value)
211
+ end
212
+ hash
213
+ end
214
+
215
+ end
216
+
217
+ end