rocket_stack_sdk 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (296) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +226 -0
  4. data/Rakefile +10 -0
  5. data/docs/CreateCronJob201Response.md +22 -0
  6. data/docs/CreateCronJob201ResponseData.md +20 -0
  7. data/docs/CreateCronJobRequest.md +26 -0
  8. data/docs/CreateCronJobRequestDeliveryTarget.md +32 -0
  9. data/docs/CreateCronJobRequestSchedule.md +22 -0
  10. data/docs/CreateDownloadUrl200Response.md +22 -0
  11. data/docs/CreateDownloadUrl200ResponseData.md +24 -0
  12. data/docs/CreateDownloadUrlRequest.md +22 -0
  13. data/docs/CreateFunction202Response.md +22 -0
  14. data/docs/CreateFunction202ResponseData.md +20 -0
  15. data/docs/CreateQueue201Response.md +22 -0
  16. data/docs/CreateQueue201ResponseData.md +20 -0
  17. data/docs/CreateQueueRequest.md +26 -0
  18. data/docs/CreateQueueRequestDeliveryTarget.md +32 -0
  19. data/docs/CreateSchedule201Response.md +22 -0
  20. data/docs/CreateSchedule201ResponseData.md +20 -0
  21. data/docs/CreateScheduleRequest.md +26 -0
  22. data/docs/CronApi.md +365 -0
  23. data/docs/DeleteKvItem200Response.md +22 -0
  24. data/docs/DeleteKvItem200ResponseData.md +18 -0
  25. data/docs/EnqueueMessage201Response.md +22 -0
  26. data/docs/EnqueueMessage201ResponseData.md +20 -0
  27. data/docs/EnqueueMessageRequest.md +22 -0
  28. data/docs/FinalizeUpload200Response.md +22 -0
  29. data/docs/FinalizeUpload200ResponseData.md +24 -0
  30. data/docs/FinalizeUploadRequest.md +18 -0
  31. data/docs/FunctionsApi.md +463 -0
  32. data/docs/GetCronJob200Response.md +22 -0
  33. data/docs/GetFunction200Response.md +22 -0
  34. data/docs/GetKvItem200Response.md +22 -0
  35. data/docs/GetKvItem200ResponseData.md +24 -0
  36. data/docs/GetMessageStatus200Response.md +22 -0
  37. data/docs/GetMessageStatus200ResponseData.md +30 -0
  38. data/docs/GetQueue200Response.md +22 -0
  39. data/docs/GetSchedule200Response.md +22 -0
  40. data/docs/GetScheduleStatus200Response.md +22 -0
  41. data/docs/GetScheduleStatus200ResponseData.md +26 -0
  42. data/docs/GetTemplate200Response.md +22 -0
  43. data/docs/InvokeFunction200Response.md +22 -0
  44. data/docs/InvokeFunction200ResponseData.md +26 -0
  45. data/docs/InvokeFunctionRequest.md +22 -0
  46. data/docs/KvApi.md +297 -0
  47. data/docs/ListCapabilities200Response.md +22 -0
  48. data/docs/ListCapabilities200ResponseDataInner.md +22 -0
  49. data/docs/ListCronJobs200Response.md +22 -0
  50. data/docs/ListCronJobs200ResponseData.md +20 -0
  51. data/docs/ListCronJobs200ResponseDataItemsInner.md +36 -0
  52. data/docs/ListCronJobs200ResponseDataItemsInnerSchedule.md +24 -0
  53. data/docs/ListFunctions200Response.md +22 -0
  54. data/docs/ListFunctions200ResponseData.md +20 -0
  55. data/docs/ListFunctions200ResponseDataItemsInner.md +38 -0
  56. data/docs/ListFunctions200ResponseDataItemsInnerActualSpec.md +18 -0
  57. data/docs/ListFunctions200ResponseDataItemsInnerDesiredSpec.md +36 -0
  58. data/docs/ListFunctions200ResponseDataItemsInnerDesiredSpecCode.md +20 -0
  59. data/docs/ListFunctions200ResponseError.md +22 -0
  60. data/docs/ListFunctions401Response.md +20 -0
  61. data/docs/ListKvItems200Response.md +22 -0
  62. data/docs/ListKvItems200ResponseData.md +20 -0
  63. data/docs/ListKvItems200ResponseDataItemsInner.md +24 -0
  64. data/docs/ListQueues200Response.md +22 -0
  65. data/docs/ListQueues200ResponseData.md +20 -0
  66. data/docs/ListQueues200ResponseDataItemsInner.md +36 -0
  67. data/docs/ListQueues200ResponseDataItemsInnerDeliveryTarget.md +28 -0
  68. data/docs/ListSchedules200Response.md +22 -0
  69. data/docs/ListSchedules200ResponseData.md +20 -0
  70. data/docs/ListSchedules200ResponseDataItemsInner.md +36 -0
  71. data/docs/ListSnippets200Response.md +22 -0
  72. data/docs/ListSnippets200ResponseDataInner.md +28 -0
  73. data/docs/ListStorageObjects200Response.md +22 -0
  74. data/docs/ListStorageObjects200ResponseData.md +20 -0
  75. data/docs/ListStorageObjects200ResponseDataItemsInner.md +28 -0
  76. data/docs/ListTemplates200Response.md +22 -0
  77. data/docs/ListTemplates200ResponseDataInner.md +28 -0
  78. data/docs/PutKvItem200Response.md +22 -0
  79. data/docs/PutKvItem200ResponseData.md +22 -0
  80. data/docs/PutKvItemRequest.md +24 -0
  81. data/docs/PutKvItemRequestIfVersion.md +15 -0
  82. data/docs/QueuesApi.md +511 -0
  83. data/docs/ResourcesApi.md +290 -0
  84. data/docs/SchedulerApi.md +505 -0
  85. data/docs/StorageApi.md +447 -0
  86. data/docs/UpdateCronJob200Response.md +22 -0
  87. data/docs/UpdateCronJob200ResponseData.md +22 -0
  88. data/docs/UpdateCronJobRequest.md +24 -0
  89. data/docs/UpdateCronJobRequestSchedule.md +22 -0
  90. data/docs/UpdateFunctionRequest.md +30 -0
  91. data/docs/UpdateQueue200Response.md +22 -0
  92. data/docs/UpdateQueue200ResponseData.md +22 -0
  93. data/docs/UpdateQueueRequest.md +24 -0
  94. data/docs/UpdateSchedule200Response.md +22 -0
  95. data/docs/UpdateSchedule200ResponseData.md +22 -0
  96. data/docs/UpdateScheduleRequest.md +24 -0
  97. data/docs/UploadObject201Response.md +22 -0
  98. data/docs/UploadObject201ResponseData.md +26 -0
  99. data/git_push.sh +57 -0
  100. data/lib/rocket_stack_sdk/api/cron_api.rb +357 -0
  101. data/lib/rocket_stack_sdk/api/functions_api.rb +536 -0
  102. data/lib/rocket_stack_sdk/api/kv_api.rb +308 -0
  103. data/lib/rocket_stack_sdk/api/queues_api.rb +496 -0
  104. data/lib/rocket_stack_sdk/api/resources_api.rb +277 -0
  105. data/lib/rocket_stack_sdk/api/scheduler_api.rb +483 -0
  106. data/lib/rocket_stack_sdk/api/storage_api.rb +474 -0
  107. data/lib/rocket_stack_sdk/api_client.rb +397 -0
  108. data/lib/rocket_stack_sdk/api_error.rb +58 -0
  109. data/lib/rocket_stack_sdk/api_model_base.rb +88 -0
  110. data/lib/rocket_stack_sdk/configuration.rb +309 -0
  111. data/lib/rocket_stack_sdk/models/create_cron_job201_response.rb +182 -0
  112. data/lib/rocket_stack_sdk/models/create_cron_job201_response_data.rb +190 -0
  113. data/lib/rocket_stack_sdk/models/create_cron_job_request.rb +265 -0
  114. data/lib/rocket_stack_sdk/models/create_cron_job_request_delivery_target.rb +343 -0
  115. data/lib/rocket_stack_sdk/models/create_cron_job_request_schedule.rb +227 -0
  116. data/lib/rocket_stack_sdk/models/create_download_url200_response.rb +182 -0
  117. data/lib/rocket_stack_sdk/models/create_download_url200_response_data.rb +211 -0
  118. data/lib/rocket_stack_sdk/models/create_download_url_request.rb +228 -0
  119. data/lib/rocket_stack_sdk/models/create_function202_response.rb +182 -0
  120. data/lib/rocket_stack_sdk/models/create_function202_response_data.rb +190 -0
  121. data/lib/rocket_stack_sdk/models/create_queue201_response.rb +182 -0
  122. data/lib/rocket_stack_sdk/models/create_queue201_response_data.rb +190 -0
  123. data/lib/rocket_stack_sdk/models/create_queue_request.rb +313 -0
  124. data/lib/rocket_stack_sdk/models/create_queue_request_delivery_target.rb +343 -0
  125. data/lib/rocket_stack_sdk/models/create_schedule201_response.rb +182 -0
  126. data/lib/rocket_stack_sdk/models/create_schedule201_response_data.rb +190 -0
  127. data/lib/rocket_stack_sdk/models/create_schedule_request.rb +265 -0
  128. data/lib/rocket_stack_sdk/models/delete_kv_item200_response.rb +182 -0
  129. data/lib/rocket_stack_sdk/models/delete_kv_item200_response_data.rb +164 -0
  130. data/lib/rocket_stack_sdk/models/enqueue_message201_response.rb +182 -0
  131. data/lib/rocket_stack_sdk/models/enqueue_message201_response_data.rb +190 -0
  132. data/lib/rocket_stack_sdk/models/enqueue_message_request.rb +213 -0
  133. data/lib/rocket_stack_sdk/models/finalize_upload200_response.rb +182 -0
  134. data/lib/rocket_stack_sdk/models/finalize_upload200_response_data.rb +242 -0
  135. data/lib/rocket_stack_sdk/models/finalize_upload_request.rb +182 -0
  136. data/lib/rocket_stack_sdk/models/get_cron_job200_response.rb +182 -0
  137. data/lib/rocket_stack_sdk/models/get_function200_response.rb +182 -0
  138. data/lib/rocket_stack_sdk/models/get_kv_item200_response.rb +182 -0
  139. data/lib/rocket_stack_sdk/models/get_kv_item200_response_data.rb +212 -0
  140. data/lib/rocket_stack_sdk/models/get_message_status200_response.rb +182 -0
  141. data/lib/rocket_stack_sdk/models/get_message_status200_response_data.rb +303 -0
  142. data/lib/rocket_stack_sdk/models/get_queue200_response.rb +182 -0
  143. data/lib/rocket_stack_sdk/models/get_schedule200_response.rb +182 -0
  144. data/lib/rocket_stack_sdk/models/get_schedule_status200_response.rb +182 -0
  145. data/lib/rocket_stack_sdk/models/get_schedule_status200_response_data.rb +240 -0
  146. data/lib/rocket_stack_sdk/models/get_template200_response.rb +182 -0
  147. data/lib/rocket_stack_sdk/models/invoke_function200_response.rb +182 -0
  148. data/lib/rocket_stack_sdk/models/invoke_function200_response_data.rb +201 -0
  149. data/lib/rocket_stack_sdk/models/invoke_function_request.rb +204 -0
  150. data/lib/rocket_stack_sdk/models/list_capabilities200_response.rb +184 -0
  151. data/lib/rocket_stack_sdk/models/list_capabilities200_response_data_inner.rb +216 -0
  152. data/lib/rocket_stack_sdk/models/list_cron_jobs200_response.rb +182 -0
  153. data/lib/rocket_stack_sdk/models/list_cron_jobs200_response_data.rb +176 -0
  154. data/lib/rocket_stack_sdk/models/list_cron_jobs200_response_data_items_inner.rb +384 -0
  155. data/lib/rocket_stack_sdk/models/list_cron_jobs200_response_data_items_inner_schedule.rb +249 -0
  156. data/lib/rocket_stack_sdk/models/list_functions200_response.rb +182 -0
  157. data/lib/rocket_stack_sdk/models/list_functions200_response_data.rb +176 -0
  158. data/lib/rocket_stack_sdk/models/list_functions200_response_data_items_inner.rb +393 -0
  159. data/lib/rocket_stack_sdk/models/list_functions200_response_data_items_inner_actual_spec.rb +164 -0
  160. data/lib/rocket_stack_sdk/models/list_functions200_response_data_items_inner_desired_spec.rb +352 -0
  161. data/lib/rocket_stack_sdk/models/list_functions200_response_data_items_inner_desired_spec_code.rb +174 -0
  162. data/lib/rocket_stack_sdk/models/list_functions200_response_error.rb +201 -0
  163. data/lib/rocket_stack_sdk/models/list_functions401_response.rb +190 -0
  164. data/lib/rocket_stack_sdk/models/list_kv_items200_response.rb +182 -0
  165. data/lib/rocket_stack_sdk/models/list_kv_items200_response_data.rb +178 -0
  166. data/lib/rocket_stack_sdk/models/list_kv_items200_response_data_items_inner.rb +228 -0
  167. data/lib/rocket_stack_sdk/models/list_queues200_response.rb +182 -0
  168. data/lib/rocket_stack_sdk/models/list_queues200_response_data.rb +176 -0
  169. data/lib/rocket_stack_sdk/models/list_queues200_response_data_items_inner.rb +381 -0
  170. data/lib/rocket_stack_sdk/models/list_queues200_response_data_items_inner_delivery_target.rb +267 -0
  171. data/lib/rocket_stack_sdk/models/list_schedules200_response.rb +182 -0
  172. data/lib/rocket_stack_sdk/models/list_schedules200_response_data.rb +176 -0
  173. data/lib/rocket_stack_sdk/models/list_schedules200_response_data_items_inner.rb +384 -0
  174. data/lib/rocket_stack_sdk/models/list_snippets200_response.rb +184 -0
  175. data/lib/rocket_stack_sdk/models/list_snippets200_response_data_inner.rb +294 -0
  176. data/lib/rocket_stack_sdk/models/list_storage_objects200_response.rb +182 -0
  177. data/lib/rocket_stack_sdk/models/list_storage_objects200_response_data.rb +178 -0
  178. data/lib/rocket_stack_sdk/models/list_storage_objects200_response_data_items_inner.rb +260 -0
  179. data/lib/rocket_stack_sdk/models/list_templates200_response.rb +184 -0
  180. data/lib/rocket_stack_sdk/models/list_templates200_response_data_inner.rb +262 -0
  181. data/lib/rocket_stack_sdk/models/put_kv_item200_response.rb +182 -0
  182. data/lib/rocket_stack_sdk/models/put_kv_item200_response_data.rb +202 -0
  183. data/lib/rocket_stack_sdk/models/put_kv_item_request.rb +203 -0
  184. data/lib/rocket_stack_sdk/models/put_kv_item_request_if_version.rb +103 -0
  185. data/lib/rocket_stack_sdk/models/update_cron_job200_response.rb +182 -0
  186. data/lib/rocket_stack_sdk/models/update_cron_job200_response_data.rb +216 -0
  187. data/lib/rocket_stack_sdk/models/update_cron_job_request.rb +177 -0
  188. data/lib/rocket_stack_sdk/models/update_cron_job_request_schedule.rb +220 -0
  189. data/lib/rocket_stack_sdk/models/update_function_request.rb +337 -0
  190. data/lib/rocket_stack_sdk/models/update_queue200_response.rb +182 -0
  191. data/lib/rocket_stack_sdk/models/update_queue200_response_data.rb +216 -0
  192. data/lib/rocket_stack_sdk/models/update_queue_request.rb +258 -0
  193. data/lib/rocket_stack_sdk/models/update_schedule200_response.rb +182 -0
  194. data/lib/rocket_stack_sdk/models/update_schedule200_response_data.rb +216 -0
  195. data/lib/rocket_stack_sdk/models/update_schedule_request.rb +177 -0
  196. data/lib/rocket_stack_sdk/models/upload_object201_response.rb +182 -0
  197. data/lib/rocket_stack_sdk/models/upload_object201_response_data.rb +251 -0
  198. data/lib/rocket_stack_sdk/version.rb +15 -0
  199. data/lib/rocket_stack_sdk.rb +134 -0
  200. data/rocket_stack_sdk.gemspec +39 -0
  201. data/spec/api/cron_api_spec.rb +97 -0
  202. data/spec/api/functions_api_spec.rb +121 -0
  203. data/spec/api/kv_api_spec.rb +86 -0
  204. data/spec/api/queues_api_spec.rb +123 -0
  205. data/spec/api/resources_api_spec.rb +83 -0
  206. data/spec/api/scheduler_api_spec.rb +121 -0
  207. data/spec/api/storage_api_spec.rb +114 -0
  208. data/spec/models/create_cron_job201_response_data_spec.rb +42 -0
  209. data/spec/models/create_cron_job201_response_spec.rb +48 -0
  210. data/spec/models/create_cron_job_request_delivery_target_spec.rb +82 -0
  211. data/spec/models/create_cron_job_request_schedule_spec.rb +52 -0
  212. data/spec/models/create_cron_job_request_spec.rb +60 -0
  213. data/spec/models/create_download_url200_response_data_spec.rb +54 -0
  214. data/spec/models/create_download_url200_response_spec.rb +48 -0
  215. data/spec/models/create_download_url_request_spec.rb +48 -0
  216. data/spec/models/create_function202_response_data_spec.rb +42 -0
  217. data/spec/models/create_function202_response_spec.rb +48 -0
  218. data/spec/models/create_queue201_response_data_spec.rb +42 -0
  219. data/spec/models/create_queue201_response_spec.rb +48 -0
  220. data/spec/models/create_queue_request_delivery_target_spec.rb +82 -0
  221. data/spec/models/create_queue_request_spec.rb +60 -0
  222. data/spec/models/create_schedule201_response_data_spec.rb +42 -0
  223. data/spec/models/create_schedule201_response_spec.rb +48 -0
  224. data/spec/models/create_schedule_request_spec.rb +60 -0
  225. data/spec/models/delete_kv_item200_response_data_spec.rb +36 -0
  226. data/spec/models/delete_kv_item200_response_spec.rb +48 -0
  227. data/spec/models/enqueue_message201_response_data_spec.rb +42 -0
  228. data/spec/models/enqueue_message201_response_spec.rb +48 -0
  229. data/spec/models/enqueue_message_request_spec.rb +48 -0
  230. data/spec/models/finalize_upload200_response_data_spec.rb +54 -0
  231. data/spec/models/finalize_upload200_response_spec.rb +48 -0
  232. data/spec/models/finalize_upload_request_spec.rb +36 -0
  233. data/spec/models/get_cron_job200_response_spec.rb +48 -0
  234. data/spec/models/get_function200_response_spec.rb +48 -0
  235. data/spec/models/get_kv_item200_response_data_spec.rb +54 -0
  236. data/spec/models/get_kv_item200_response_spec.rb +48 -0
  237. data/spec/models/get_message_status200_response_data_spec.rb +72 -0
  238. data/spec/models/get_message_status200_response_spec.rb +48 -0
  239. data/spec/models/get_queue200_response_spec.rb +48 -0
  240. data/spec/models/get_schedule200_response_spec.rb +48 -0
  241. data/spec/models/get_schedule_status200_response_data_spec.rb +60 -0
  242. data/spec/models/get_schedule_status200_response_spec.rb +48 -0
  243. data/spec/models/get_template200_response_spec.rb +48 -0
  244. data/spec/models/invoke_function200_response_data_spec.rb +60 -0
  245. data/spec/models/invoke_function200_response_spec.rb +48 -0
  246. data/spec/models/invoke_function_request_spec.rb +52 -0
  247. data/spec/models/list_capabilities200_response_data_inner_spec.rb +48 -0
  248. data/spec/models/list_capabilities200_response_spec.rb +48 -0
  249. data/spec/models/list_cron_jobs200_response_data_items_inner_schedule_spec.rb +58 -0
  250. data/spec/models/list_cron_jobs200_response_data_items_inner_spec.rb +90 -0
  251. data/spec/models/list_cron_jobs200_response_data_spec.rb +42 -0
  252. data/spec/models/list_cron_jobs200_response_spec.rb +48 -0
  253. data/spec/models/list_functions200_response_data_items_inner_actual_spec_spec.rb +36 -0
  254. data/spec/models/list_functions200_response_data_items_inner_desired_spec_code_spec.rb +42 -0
  255. data/spec/models/list_functions200_response_data_items_inner_desired_spec_spec.rb +98 -0
  256. data/spec/models/list_functions200_response_data_items_inner_spec.rb +96 -0
  257. data/spec/models/list_functions200_response_data_spec.rb +42 -0
  258. data/spec/models/list_functions200_response_error_spec.rb +48 -0
  259. data/spec/models/list_functions200_response_spec.rb +48 -0
  260. data/spec/models/list_functions401_response_spec.rb +42 -0
  261. data/spec/models/list_kv_items200_response_data_items_inner_spec.rb +54 -0
  262. data/spec/models/list_kv_items200_response_data_spec.rb +42 -0
  263. data/spec/models/list_kv_items200_response_spec.rb +48 -0
  264. data/spec/models/list_queues200_response_data_items_inner_delivery_target_spec.rb +70 -0
  265. data/spec/models/list_queues200_response_data_items_inner_spec.rb +90 -0
  266. data/spec/models/list_queues200_response_data_spec.rb +42 -0
  267. data/spec/models/list_queues200_response_spec.rb +48 -0
  268. data/spec/models/list_schedules200_response_data_items_inner_spec.rb +90 -0
  269. data/spec/models/list_schedules200_response_data_spec.rb +42 -0
  270. data/spec/models/list_schedules200_response_spec.rb +48 -0
  271. data/spec/models/list_snippets200_response_data_inner_spec.rb +66 -0
  272. data/spec/models/list_snippets200_response_spec.rb +48 -0
  273. data/spec/models/list_storage_objects200_response_data_items_inner_spec.rb +66 -0
  274. data/spec/models/list_storage_objects200_response_data_spec.rb +42 -0
  275. data/spec/models/list_storage_objects200_response_spec.rb +48 -0
  276. data/spec/models/list_templates200_response_data_inner_spec.rb +66 -0
  277. data/spec/models/list_templates200_response_spec.rb +48 -0
  278. data/spec/models/put_kv_item200_response_data_spec.rb +48 -0
  279. data/spec/models/put_kv_item200_response_spec.rb +48 -0
  280. data/spec/models/put_kv_item_request_if_version_spec.rb +21 -0
  281. data/spec/models/put_kv_item_request_spec.rb +54 -0
  282. data/spec/models/update_cron_job200_response_data_spec.rb +48 -0
  283. data/spec/models/update_cron_job200_response_spec.rb +48 -0
  284. data/spec/models/update_cron_job_request_schedule_spec.rb +52 -0
  285. data/spec/models/update_cron_job_request_spec.rb +54 -0
  286. data/spec/models/update_function_request_spec.rb +76 -0
  287. data/spec/models/update_queue200_response_data_spec.rb +48 -0
  288. data/spec/models/update_queue200_response_spec.rb +48 -0
  289. data/spec/models/update_queue_request_spec.rb +54 -0
  290. data/spec/models/update_schedule200_response_data_spec.rb +48 -0
  291. data/spec/models/update_schedule200_response_spec.rb +48 -0
  292. data/spec/models/update_schedule_request_spec.rb +54 -0
  293. data/spec/models/upload_object201_response_data_spec.rb +60 -0
  294. data/spec/models/upload_object201_response_spec.rb +48 -0
  295. data/spec/spec_helper.rb +111 -0
  296. metadata +472 -0
@@ -0,0 +1,182 @@
1
+ =begin
2
+ #Rocketstack API
3
+
4
+ #API for Functions, Queues, KV, Storage, Cron, and Scheduler.
5
+
6
+ The version of the OpenAPI document: 1.0.1
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module RocketStackSdk
17
+ class PutKvItem200Response < ApiModelBase
18
+ attr_accessor :request_id
19
+
20
+ attr_accessor :data
21
+
22
+ attr_accessor :error
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'request_id' => :'requestId',
28
+ :'data' => :'data',
29
+ :'error' => :'error'
30
+ }
31
+ end
32
+
33
+ # Returns attribute mapping this model knows about
34
+ def self.acceptable_attribute_map
35
+ attribute_map
36
+ end
37
+
38
+ # Returns all the JSON keys this model knows about
39
+ def self.acceptable_attributes
40
+ acceptable_attribute_map.values
41
+ end
42
+
43
+ # Attribute type mapping.
44
+ def self.openapi_types
45
+ {
46
+ :'request_id' => :'String',
47
+ :'data' => :'PutKvItem200ResponseData',
48
+ :'error' => :'ListFunctions200ResponseError'
49
+ }
50
+ end
51
+
52
+ # List of attributes with nullable: true
53
+ def self.openapi_nullable
54
+ Set.new([
55
+ ])
56
+ end
57
+
58
+ # Initializes the object
59
+ # @param [Hash] attributes Model attributes in the form of hash
60
+ def initialize(attributes = {})
61
+ if (!attributes.is_a?(Hash))
62
+ fail ArgumentError, "The input argument (attributes) must be a hash in `RocketStackSdk::PutKvItem200Response` initialize method"
63
+ end
64
+
65
+ # check to see if the attribute exists and convert string to symbol for hash key
66
+ acceptable_attribute_map = self.class.acceptable_attribute_map
67
+ attributes = attributes.each_with_object({}) { |(k, v), h|
68
+ if (!acceptable_attribute_map.key?(k.to_sym))
69
+ fail ArgumentError, "`#{k}` is not a valid attribute in `RocketStackSdk::PutKvItem200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
70
+ end
71
+ h[k.to_sym] = v
72
+ }
73
+
74
+ if attributes.key?(:'request_id')
75
+ self.request_id = attributes[:'request_id']
76
+ else
77
+ self.request_id = nil
78
+ end
79
+
80
+ if attributes.key?(:'data')
81
+ self.data = attributes[:'data']
82
+ end
83
+
84
+ if attributes.key?(:'error')
85
+ self.error = attributes[:'error']
86
+ end
87
+ end
88
+
89
+ # Show invalid properties with the reasons. Usually used together with valid?
90
+ # @return Array for valid properties with the reasons
91
+ def list_invalid_properties
92
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
93
+ invalid_properties = Array.new
94
+ if @request_id.nil?
95
+ invalid_properties.push('invalid value for "request_id", request_id cannot be nil.')
96
+ end
97
+
98
+ invalid_properties
99
+ end
100
+
101
+ # Check to see if the all the properties in the model are valid
102
+ # @return true if the model is valid
103
+ def valid?
104
+ warn '[DEPRECATED] the `valid?` method is obsolete'
105
+ return false if @request_id.nil?
106
+ true
107
+ end
108
+
109
+ # Custom attribute writer method with validation
110
+ # @param [Object] request_id Value to be assigned
111
+ def request_id=(request_id)
112
+ if request_id.nil?
113
+ fail ArgumentError, 'request_id cannot be nil'
114
+ end
115
+
116
+ @request_id = request_id
117
+ end
118
+
119
+ # Checks equality by comparing each attribute.
120
+ # @param [Object] Object to be compared
121
+ def ==(o)
122
+ return true if self.equal?(o)
123
+ self.class == o.class &&
124
+ request_id == o.request_id &&
125
+ data == o.data &&
126
+ error == o.error
127
+ end
128
+
129
+ # @see the `==` method
130
+ # @param [Object] Object to be compared
131
+ def eql?(o)
132
+ self == o
133
+ end
134
+
135
+ # Calculates hash code according to all attributes.
136
+ # @return [Integer] Hash code
137
+ def hash
138
+ [request_id, data, error].hash
139
+ end
140
+
141
+ # Builds the object from hash
142
+ # @param [Hash] attributes Model attributes in the form of hash
143
+ # @return [Object] Returns the model itself
144
+ def self.build_from_hash(attributes)
145
+ return nil unless attributes.is_a?(Hash)
146
+ attributes = attributes.transform_keys(&:to_sym)
147
+ transformed_hash = {}
148
+ openapi_types.each_pair do |key, type|
149
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
150
+ transformed_hash["#{key}"] = nil
151
+ elsif type =~ /\AArray<(.*)>/i
152
+ # check to ensure the input is an array given that the attribute
153
+ # is documented as an array but the input is not
154
+ if attributes[attribute_map[key]].is_a?(Array)
155
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
156
+ end
157
+ elsif !attributes[attribute_map[key]].nil?
158
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
159
+ end
160
+ end
161
+ new(transformed_hash)
162
+ end
163
+
164
+ # Returns the object in the form of hash
165
+ # @return [Hash] Returns the object in the form of hash
166
+ def to_hash
167
+ hash = {}
168
+ self.class.attribute_map.each_pair do |attr, param|
169
+ value = self.send(attr)
170
+ if value.nil?
171
+ is_nullable = self.class.openapi_nullable.include?(attr)
172
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
173
+ end
174
+
175
+ hash[param] = _to_hash(value)
176
+ end
177
+ hash
178
+ end
179
+
180
+ end
181
+
182
+ end
@@ -0,0 +1,202 @@
1
+ =begin
2
+ #Rocketstack API
3
+
4
+ #API for Functions, Queues, KV, Storage, Cron, and Scheduler.
5
+
6
+ The version of the OpenAPI document: 1.0.1
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module RocketStackSdk
17
+ class PutKvItem200ResponseData < ApiModelBase
18
+ attr_accessor :key
19
+
20
+ attr_accessor :version
21
+
22
+ attr_accessor :expires_at
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'key' => :'key',
28
+ :'version' => :'version',
29
+ :'expires_at' => :'expiresAt'
30
+ }
31
+ end
32
+
33
+ # Returns attribute mapping this model knows about
34
+ def self.acceptable_attribute_map
35
+ attribute_map
36
+ end
37
+
38
+ # Returns all the JSON keys this model knows about
39
+ def self.acceptable_attributes
40
+ acceptable_attribute_map.values
41
+ end
42
+
43
+ # Attribute type mapping.
44
+ def self.openapi_types
45
+ {
46
+ :'key' => :'String',
47
+ :'version' => :'String',
48
+ :'expires_at' => :'String'
49
+ }
50
+ end
51
+
52
+ # List of attributes with nullable: true
53
+ def self.openapi_nullable
54
+ Set.new([
55
+ :'expires_at'
56
+ ])
57
+ end
58
+
59
+ # Initializes the object
60
+ # @param [Hash] attributes Model attributes in the form of hash
61
+ def initialize(attributes = {})
62
+ if (!attributes.is_a?(Hash))
63
+ fail ArgumentError, "The input argument (attributes) must be a hash in `RocketStackSdk::PutKvItem200ResponseData` initialize method"
64
+ end
65
+
66
+ # check to see if the attribute exists and convert string to symbol for hash key
67
+ acceptable_attribute_map = self.class.acceptable_attribute_map
68
+ attributes = attributes.each_with_object({}) { |(k, v), h|
69
+ if (!acceptable_attribute_map.key?(k.to_sym))
70
+ fail ArgumentError, "`#{k}` is not a valid attribute in `RocketStackSdk::PutKvItem200ResponseData`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
71
+ end
72
+ h[k.to_sym] = v
73
+ }
74
+
75
+ if attributes.key?(:'key')
76
+ self.key = attributes[:'key']
77
+ else
78
+ self.key = nil
79
+ end
80
+
81
+ if attributes.key?(:'version')
82
+ self.version = attributes[:'version']
83
+ else
84
+ self.version = nil
85
+ end
86
+
87
+ if attributes.key?(:'expires_at')
88
+ self.expires_at = attributes[:'expires_at']
89
+ else
90
+ self.expires_at = nil
91
+ end
92
+ end
93
+
94
+ # Show invalid properties with the reasons. Usually used together with valid?
95
+ # @return Array for valid properties with the reasons
96
+ def list_invalid_properties
97
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
98
+ invalid_properties = Array.new
99
+ if @key.nil?
100
+ invalid_properties.push('invalid value for "key", key cannot be nil.')
101
+ end
102
+
103
+ if @version.nil?
104
+ invalid_properties.push('invalid value for "version", version cannot be nil.')
105
+ end
106
+
107
+ invalid_properties
108
+ end
109
+
110
+ # Check to see if the all the properties in the model are valid
111
+ # @return true if the model is valid
112
+ def valid?
113
+ warn '[DEPRECATED] the `valid?` method is obsolete'
114
+ return false if @key.nil?
115
+ return false if @version.nil?
116
+ true
117
+ end
118
+
119
+ # Custom attribute writer method with validation
120
+ # @param [Object] key Value to be assigned
121
+ def key=(key)
122
+ if key.nil?
123
+ fail ArgumentError, 'key cannot be nil'
124
+ end
125
+
126
+ @key = key
127
+ end
128
+
129
+ # Custom attribute writer method with validation
130
+ # @param [Object] version Value to be assigned
131
+ def version=(version)
132
+ if version.nil?
133
+ fail ArgumentError, 'version cannot be nil'
134
+ end
135
+
136
+ @version = version
137
+ end
138
+
139
+ # Checks equality by comparing each attribute.
140
+ # @param [Object] Object to be compared
141
+ def ==(o)
142
+ return true if self.equal?(o)
143
+ self.class == o.class &&
144
+ key == o.key &&
145
+ version == o.version &&
146
+ expires_at == o.expires_at
147
+ end
148
+
149
+ # @see the `==` method
150
+ # @param [Object] Object to be compared
151
+ def eql?(o)
152
+ self == o
153
+ end
154
+
155
+ # Calculates hash code according to all attributes.
156
+ # @return [Integer] Hash code
157
+ def hash
158
+ [key, version, expires_at].hash
159
+ end
160
+
161
+ # Builds the object from hash
162
+ # @param [Hash] attributes Model attributes in the form of hash
163
+ # @return [Object] Returns the model itself
164
+ def self.build_from_hash(attributes)
165
+ return nil unless attributes.is_a?(Hash)
166
+ attributes = attributes.transform_keys(&:to_sym)
167
+ transformed_hash = {}
168
+ openapi_types.each_pair do |key, type|
169
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
170
+ transformed_hash["#{key}"] = nil
171
+ elsif type =~ /\AArray<(.*)>/i
172
+ # check to ensure the input is an array given that the attribute
173
+ # is documented as an array but the input is not
174
+ if attributes[attribute_map[key]].is_a?(Array)
175
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
176
+ end
177
+ elsif !attributes[attribute_map[key]].nil?
178
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
179
+ end
180
+ end
181
+ new(transformed_hash)
182
+ end
183
+
184
+ # Returns the object in the form of hash
185
+ # @return [Hash] Returns the object in the form of hash
186
+ def to_hash
187
+ hash = {}
188
+ self.class.attribute_map.each_pair do |attr, param|
189
+ value = self.send(attr)
190
+ if value.nil?
191
+ is_nullable = self.class.openapi_nullable.include?(attr)
192
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
193
+ end
194
+
195
+ hash[param] = _to_hash(value)
196
+ end
197
+ hash
198
+ end
199
+
200
+ end
201
+
202
+ end
@@ -0,0 +1,203 @@
1
+ =begin
2
+ #Rocketstack API
3
+
4
+ #API for Functions, Queues, KV, Storage, Cron, and Scheduler.
5
+
6
+ The version of the OpenAPI document: 1.0.1
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module RocketStackSdk
17
+ class PutKvItemRequest < ApiModelBase
18
+ attr_accessor :value
19
+
20
+ attr_accessor :ttl_seconds
21
+
22
+ attr_accessor :expires_at
23
+
24
+ attr_accessor :if_version
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'value' => :'value',
30
+ :'ttl_seconds' => :'ttlSeconds',
31
+ :'expires_at' => :'expiresAt',
32
+ :'if_version' => :'ifVersion'
33
+ }
34
+ end
35
+
36
+ # Returns attribute mapping this model knows about
37
+ def self.acceptable_attribute_map
38
+ attribute_map
39
+ end
40
+
41
+ # Returns all the JSON keys this model knows about
42
+ def self.acceptable_attributes
43
+ acceptable_attribute_map.values
44
+ end
45
+
46
+ # Attribute type mapping.
47
+ def self.openapi_types
48
+ {
49
+ :'value' => :'Object',
50
+ :'ttl_seconds' => :'Integer',
51
+ :'expires_at' => :'String',
52
+ :'if_version' => :'PutKvItemRequestIfVersion'
53
+ }
54
+ end
55
+
56
+ # List of attributes with nullable: true
57
+ def self.openapi_nullable
58
+ Set.new([
59
+ :'value',
60
+ ])
61
+ end
62
+
63
+ # Initializes the object
64
+ # @param [Hash] attributes Model attributes in the form of hash
65
+ def initialize(attributes = {})
66
+ if (!attributes.is_a?(Hash))
67
+ fail ArgumentError, "The input argument (attributes) must be a hash in `RocketStackSdk::PutKvItemRequest` initialize method"
68
+ end
69
+
70
+ # check to see if the attribute exists and convert string to symbol for hash key
71
+ acceptable_attribute_map = self.class.acceptable_attribute_map
72
+ attributes = attributes.each_with_object({}) { |(k, v), h|
73
+ if (!acceptable_attribute_map.key?(k.to_sym))
74
+ fail ArgumentError, "`#{k}` is not a valid attribute in `RocketStackSdk::PutKvItemRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
75
+ end
76
+ h[k.to_sym] = v
77
+ }
78
+
79
+ if attributes.key?(:'value')
80
+ self.value = attributes[:'value']
81
+ end
82
+
83
+ if attributes.key?(:'ttl_seconds')
84
+ self.ttl_seconds = attributes[:'ttl_seconds']
85
+ end
86
+
87
+ if attributes.key?(:'expires_at')
88
+ self.expires_at = attributes[:'expires_at']
89
+ end
90
+
91
+ if attributes.key?(:'if_version')
92
+ self.if_version = attributes[:'if_version']
93
+ end
94
+ end
95
+
96
+ # Show invalid properties with the reasons. Usually used together with valid?
97
+ # @return Array for valid properties with the reasons
98
+ def list_invalid_properties
99
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
100
+ invalid_properties = Array.new
101
+ if !@ttl_seconds.nil? && @ttl_seconds > 2592000
102
+ invalid_properties.push('invalid value for "ttl_seconds", must be smaller than or equal to 2592000.')
103
+ end
104
+
105
+ if !@ttl_seconds.nil? && @ttl_seconds < 1
106
+ invalid_properties.push('invalid value for "ttl_seconds", must be greater than or equal to 1.')
107
+ end
108
+
109
+ invalid_properties
110
+ end
111
+
112
+ # Check to see if the all the properties in the model are valid
113
+ # @return true if the model is valid
114
+ def valid?
115
+ warn '[DEPRECATED] the `valid?` method is obsolete'
116
+ return false if !@ttl_seconds.nil? && @ttl_seconds > 2592000
117
+ return false if !@ttl_seconds.nil? && @ttl_seconds < 1
118
+ true
119
+ end
120
+
121
+ # Custom attribute writer method with validation
122
+ # @param [Object] ttl_seconds Value to be assigned
123
+ def ttl_seconds=(ttl_seconds)
124
+ if ttl_seconds.nil?
125
+ fail ArgumentError, 'ttl_seconds cannot be nil'
126
+ end
127
+
128
+ if ttl_seconds > 2592000
129
+ fail ArgumentError, 'invalid value for "ttl_seconds", must be smaller than or equal to 2592000.'
130
+ end
131
+
132
+ if ttl_seconds < 1
133
+ fail ArgumentError, 'invalid value for "ttl_seconds", must be greater than or equal to 1.'
134
+ end
135
+
136
+ @ttl_seconds = ttl_seconds
137
+ end
138
+
139
+ # Checks equality by comparing each attribute.
140
+ # @param [Object] Object to be compared
141
+ def ==(o)
142
+ return true if self.equal?(o)
143
+ self.class == o.class &&
144
+ value == o.value &&
145
+ ttl_seconds == o.ttl_seconds &&
146
+ expires_at == o.expires_at &&
147
+ if_version == o.if_version
148
+ end
149
+
150
+ # @see the `==` method
151
+ # @param [Object] Object to be compared
152
+ def eql?(o)
153
+ self == o
154
+ end
155
+
156
+ # Calculates hash code according to all attributes.
157
+ # @return [Integer] Hash code
158
+ def hash
159
+ [value, ttl_seconds, expires_at, if_version].hash
160
+ end
161
+
162
+ # Builds the object from hash
163
+ # @param [Hash] attributes Model attributes in the form of hash
164
+ # @return [Object] Returns the model itself
165
+ def self.build_from_hash(attributes)
166
+ return nil unless attributes.is_a?(Hash)
167
+ attributes = attributes.transform_keys(&:to_sym)
168
+ transformed_hash = {}
169
+ openapi_types.each_pair do |key, type|
170
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
171
+ transformed_hash["#{key}"] = nil
172
+ elsif type =~ /\AArray<(.*)>/i
173
+ # check to ensure the input is an array given that the attribute
174
+ # is documented as an array but the input is not
175
+ if attributes[attribute_map[key]].is_a?(Array)
176
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
177
+ end
178
+ elsif !attributes[attribute_map[key]].nil?
179
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
180
+ end
181
+ end
182
+ new(transformed_hash)
183
+ end
184
+
185
+ # Returns the object in the form of hash
186
+ # @return [Hash] Returns the object in the form of hash
187
+ def to_hash
188
+ hash = {}
189
+ self.class.attribute_map.each_pair do |attr, param|
190
+ value = self.send(attr)
191
+ if value.nil?
192
+ is_nullable = self.class.openapi_nullable.include?(attr)
193
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
194
+ end
195
+
196
+ hash[param] = _to_hash(value)
197
+ end
198
+ hash
199
+ end
200
+
201
+ end
202
+
203
+ end
@@ -0,0 +1,103 @@
1
+ =begin
2
+ #Rocketstack API
3
+
4
+ #API for Functions, Queues, KV, Storage, Cron, and Scheduler.
5
+
6
+ The version of the OpenAPI document: 1.0.1
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module RocketStackSdk
17
+ module PutKvItemRequestIfVersion
18
+ class << self
19
+ # List of class defined in anyOf (OpenAPI v3)
20
+ def openapi_any_of
21
+ [
22
+ :'Integer',
23
+ :'String'
24
+ ]
25
+ end
26
+
27
+ # Builds the object
28
+ # @param [Mixed] Data to be matched against the list of anyOf items
29
+ # @return [Object] Returns the model or the data itself
30
+ def build(data)
31
+ # Go through the list of anyOf items and attempt to identify the appropriate one.
32
+ # Note:
33
+ # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 })
34
+ # due to the way the deserialization is made in the base_object template (it just casts without verifying).
35
+ # - TODO: scalar values are de facto behaving as if they were nullable.
36
+ # - TODO: logging when debugging is set.
37
+ openapi_any_of.each do |klass|
38
+ begin
39
+ next if klass == :AnyType # "nullable: true"
40
+ return find_and_cast_into_type(klass, data)
41
+ rescue # rescue all errors so we keep iterating even if the current item lookup raises
42
+ end
43
+ end
44
+
45
+ openapi_any_of.include?(:AnyType) ? data : nil
46
+ end
47
+
48
+ private
49
+
50
+ SchemaMismatchError = Class.new(StandardError)
51
+
52
+ # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse.
53
+ def find_and_cast_into_type(klass, data)
54
+ return if data.nil?
55
+
56
+ case klass.to_s
57
+ when 'Boolean'
58
+ return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass)
59
+ when 'Float'
60
+ return data if data.instance_of?(Float)
61
+ when 'Integer'
62
+ return data if data.instance_of?(Integer)
63
+ when 'Time'
64
+ return Time.parse(data)
65
+ when 'Date'
66
+ return Date.iso8601(data)
67
+ when 'String'
68
+ return data if data.instance_of?(String)
69
+ when 'Object' # "type: object"
70
+ return data if data.instance_of?(Hash)
71
+ when /\AArray<(?<sub_type>.+)>\z/ # "type: array"
72
+ if data.instance_of?(Array)
73
+ sub_type = Regexp.last_match[:sub_type]
74
+ return data.map { |item| find_and_cast_into_type(sub_type, item) }
75
+ end
76
+ when /\AHash<String, (?<sub_type>.+)>\z/ # "type: object" with "additionalProperties: { ... }"
77
+ if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) }
78
+ sub_type = Regexp.last_match[:sub_type]
79
+ return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) }
80
+ end
81
+ else # model
82
+ const = RocketStackSdk.const_get(klass)
83
+ if const
84
+ if const.respond_to?(:openapi_any_of) # nested anyOf model
85
+ model = const.build(data)
86
+ return model if model
87
+ else
88
+ # raise if data contains keys that are not known to the model
89
+ raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty?
90
+ model = const.build_from_hash(data)
91
+ return model if model
92
+ end
93
+ end
94
+ end
95
+
96
+ raise # if no match by now, raise
97
+ rescue
98
+ raise SchemaMismatchError, "#{data} doesn't match the #{klass} type"
99
+ end
100
+ end
101
+ end
102
+
103
+ end