SematextCloud 0.3.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (351) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +70 -0
  3. data/README.md +1 -1
  4. data/SematextCloud.gemspec +4 -5
  5. data/docs/AlertNotification.md +2 -1
  6. data/docs/AlertNotificationRequest.md +2 -1
  7. data/docs/AlertNotificationsApi.md +19 -17
  8. data/docs/AlertRule.md +3 -1
  9. data/docs/AlertRuleResponse.md +2 -1
  10. data/docs/AlertRuleResponseEntry.md +2 -1
  11. data/docs/AlertRuleScheduleTimeRangeDto.md +2 -1
  12. data/docs/AlertRuleScheduleWeekdayDto.md +2 -1
  13. data/docs/AlertRulesResponse.md +2 -1
  14. data/docs/AlertRulesResponseEntry.md +2 -1
  15. data/docs/AlertsApi.md +42 -40
  16. data/docs/App.md +2 -1
  17. data/docs/AppDescription.md +2 -1
  18. data/docs/AppMetadata.md +2 -1
  19. data/docs/AppResponse.md +2 -1
  20. data/docs/AppResponseEntry.md +2 -1
  21. data/docs/AppTypesResponse.md +2 -1
  22. data/docs/AppTypesResponseEntry.md +2 -1
  23. data/docs/AppsApi.md +93 -88
  24. data/docs/AppsResponse.md +2 -1
  25. data/docs/AppsResponseEntry.md +2 -1
  26. data/docs/AwsSettingsControllerApi.md +17 -15
  27. data/docs/BasicAuthMethodDto.md +2 -1
  28. data/docs/BasicOrganizationDto.md +2 -1
  29. data/docs/BillingApi.md +32 -30
  30. data/docs/BillingInfo.md +2 -1
  31. data/docs/ChargesDetailsResponseDto.md +2 -1
  32. data/docs/CloudWatchSettings.md +2 -1
  33. data/docs/CloudWatchSettingsResponse.md +2 -1
  34. data/docs/CloudWatchSettingsResponseEntry.md +2 -1
  35. data/docs/CreateAppInfo.md +2 -1
  36. data/docs/CreateTokenDto.md +2 -1
  37. data/docs/DailyDto.md +10 -7
  38. data/docs/DayUsageData.md +23 -23
  39. data/docs/Dimension.md +2 -1
  40. data/docs/Error.md +2 -1
  41. data/docs/EventDto.md +2 -1
  42. data/docs/FilterValue.md +2 -1
  43. data/docs/GenericApiResponse.md +2 -1
  44. data/docs/GenericMapBasedApiResponse.md +2 -1
  45. data/docs/Invitation.md +2 -1
  46. data/docs/Invoice.md +2 -1
  47. data/docs/InvoiceResponse.md +2 -1
  48. data/docs/InvoiceResponseEntry.md +2 -1
  49. data/docs/LimitChangeEventDTO.md +2 -1
  50. data/docs/LogsAppApi.md +10 -8
  51. data/docs/LogsUsageApiControllerApi.md +9 -7
  52. data/docs/MailReportResponse.md +2 -1
  53. data/docs/MailReportResponseResponseEntry.md +2 -1
  54. data/docs/MinPeriodFeePeriod.md +17 -14
  55. data/docs/MonitoringAppApi.md +10 -8
  56. data/docs/NotificationIntegration.md +2 -1
  57. data/docs/NotificationsResponse.md +2 -1
  58. data/docs/NotificationsResponseEntry.md +2 -1
  59. data/docs/Plan.md +2 -1
  60. data/docs/PlansResponse.md +2 -1
  61. data/docs/PlansResponseEntry.md +2 -1
  62. data/docs/ReportInfo.md +13 -11
  63. data/docs/ResetPasswordApi.md +10 -8
  64. data/docs/ServiceIntegration.md +16 -15
  65. data/docs/Subscription.md +20 -18
  66. data/docs/SubscriptionDashboardDto.md +2 -1
  67. data/docs/SubscriptionDto.md +17 -15
  68. data/docs/SubscriptionResponse.md +2 -1
  69. data/docs/SubscriptionResponseEntry.md +2 -1
  70. data/docs/SubscriptionsApi.md +121 -118
  71. data/docs/SubscriptionsResponse.md +2 -1
  72. data/docs/SubscriptionsResponseEntry.md +2 -1
  73. data/docs/TagApiControllerApi.md +102 -33
  74. data/docs/TagNamesResponse.md +2 -1
  75. data/docs/TagsGrouped.md +8 -0
  76. data/docs/TagsGroupedResponse.md +7 -0
  77. data/docs/TokenDto.md +2 -1
  78. data/docs/TokenResponse.md +2 -1
  79. data/docs/TokenResponseEntry.md +2 -1
  80. data/docs/TokensApiControllerApi.md +51 -49
  81. data/docs/TokensResponse.md +2 -1
  82. data/docs/TokensResponseEntry.md +2 -1
  83. data/docs/UpdateAppInfo.md +2 -1
  84. data/docs/UpdatePlanResponse.md +2 -1
  85. data/docs/UpdatePlanResponseDto.md +2 -1
  86. data/docs/UpdatePlanResponseEntry.md +2 -1
  87. data/docs/UpdateSubscriptionDto.md +2 -1
  88. data/docs/UpdateTokenDto.md +2 -1
  89. data/docs/UsageDto.md +6 -3
  90. data/docs/UsageMultiResponse.md +2 -1
  91. data/docs/UsageMultiResponseEntry.md +2 -1
  92. data/docs/UsageResponse.md +2 -1
  93. data/docs/UsageResponseEntry.md +2 -1
  94. data/docs/UserInfo.md +2 -1
  95. data/docs/UserPermissions.md +7 -6
  96. data/docs/UserRole.md +7 -6
  97. data/lib/SematextCloud/api/alert_notifications_api.rb +47 -42
  98. data/lib/SematextCloud/api/alerts_api.rb +69 -60
  99. data/lib/SematextCloud/api/apps_api.rb +138 -119
  100. data/lib/SematextCloud/api/aws_settings_controller_api.rb +23 -22
  101. data/lib/SematextCloud/api/billing_api.rb +62 -57
  102. data/lib/SematextCloud/api/logs_app_api.rb +21 -20
  103. data/lib/{stcloud → SematextCloud}/api/logs_usage_api_controller_api.rb +2 -2
  104. data/lib/SematextCloud/api/monitoring_app_api.rb +21 -20
  105. data/lib/SematextCloud/api/reset_password_api.rb +21 -20
  106. data/lib/SematextCloud/api/subscriptions_api.rb +194 -163
  107. data/lib/SematextCloud/api/tag_api_controller_api.rb +132 -50
  108. data/lib/SematextCloud/api/tokens_api_controller_api.rb +97 -86
  109. data/lib/SematextCloud/api_client.rb +41 -42
  110. data/lib/SematextCloud/api_error.rb +21 -2
  111. data/lib/SematextCloud/configuration.rb +5 -9
  112. data/lib/{stcloud → SematextCloud}/models/alert_notification.rb +5 -5
  113. data/lib/SematextCloud/models/alert_notification_request.rb +49 -26
  114. data/lib/SematextCloud/models/alert_rule.rb +197 -153
  115. data/lib/{stcloud/models/app_response.rb → SematextCloud/models/alert_rule_response.rb} +6 -6
  116. data/lib/{stcloud → SematextCloud}/models/alert_rule_response_entry.rb +5 -5
  117. data/lib/SematextCloud/models/alert_rule_schedule_time_range_dto.rb +44 -21
  118. data/lib/SematextCloud/models/alert_rule_schedule_weekday_dto.rb +49 -26
  119. data/lib/SematextCloud/models/alert_rules_response.rb +235 -0
  120. data/lib/{stcloud → SematextCloud}/models/alert_rules_response_entry.rb +5 -5
  121. data/lib/SematextCloud/models/app.rb +163 -93
  122. data/lib/SematextCloud/models/app_description.rb +41 -18
  123. data/lib/SematextCloud/models/app_metadata.rb +60 -37
  124. data/lib/{stcloud/models/alert_rule_response.rb → SematextCloud/models/app_response.rb} +6 -6
  125. data/lib/{stcloud → SematextCloud}/models/app_response_entry.rb +5 -5
  126. data/lib/{stcloud → SematextCloud}/models/app_types_response.rb +5 -5
  127. data/lib/{stcloud → SematextCloud}/models/app_types_response_entry.rb +5 -5
  128. data/lib/{stcloud/models/alert_rules_response.rb → SematextCloud/models/apps_response.rb} +6 -6
  129. data/lib/{stcloud → SematextCloud}/models/apps_response_entry.rb +5 -5
  130. data/lib/SematextCloud/models/basic_auth_method_dto.rb +47 -24
  131. data/lib/SematextCloud/models/basic_organization_dto.rb +51 -28
  132. data/lib/SematextCloud/models/billing_info.rb +48 -25
  133. data/lib/{stcloud → SematextCloud}/models/charges_details_response_dto.rb +5 -5
  134. data/lib/SematextCloud/models/cloud_watch_settings.rb +56 -33
  135. data/lib/SematextCloud/models/cloud_watch_settings_response.rb +235 -0
  136. data/lib/{stcloud → SematextCloud}/models/cloud_watch_settings_response_entry.rb +5 -5
  137. data/lib/SematextCloud/models/create_app_info.rb +53 -31
  138. data/lib/SematextCloud/models/create_token_dto.rb +46 -23
  139. data/lib/{stcloud → SematextCloud}/models/daily_dto.rb +36 -18
  140. data/lib/{stcloud → SematextCloud}/models/day_usage_data.rb +5 -5
  141. data/lib/{stcloud → SematextCloud}/models/dimension.rb +5 -5
  142. data/lib/SematextCloud/models/error.rb +43 -20
  143. data/lib/{stcloud → SematextCloud}/models/event_dto.rb +7 -7
  144. data/lib/SematextCloud/models/filter_value.rb +53 -30
  145. data/lib/SematextCloud/models/generic_api_response.rb +46 -24
  146. data/lib/{stcloud → SematextCloud}/models/generic_map_based_api_response.rb +5 -5
  147. data/lib/SematextCloud/models/invitation.rb +74 -52
  148. data/lib/{stcloud → SematextCloud}/models/invoice.rb +5 -5
  149. data/lib/{stcloud/models/notifications_response.rb → SematextCloud/models/invoice_response.rb} +6 -6
  150. data/lib/{stcloud → SematextCloud}/models/invoice_response_entry.rb +5 -5
  151. data/lib/{stcloud → SematextCloud}/models/limit_change_event_dto.rb +5 -5
  152. data/lib/{stcloud → SematextCloud}/models/mail_report_response.rb +5 -5
  153. data/lib/{stcloud/models/subscription_response_entry.rb → SematextCloud/models/mail_report_response_response_entry.rb} +6 -6
  154. data/lib/{stcloud → SematextCloud}/models/min_period_fee_period.rb +24 -6
  155. data/lib/SematextCloud/models/notification_integration.rb +73 -50
  156. data/lib/SematextCloud/models/notifications_response.rb +235 -0
  157. data/lib/{stcloud → SematextCloud}/models/notifications_response_entry.rb +5 -5
  158. data/lib/SematextCloud/models/plan.rb +80 -57
  159. data/lib/{stcloud → SematextCloud}/models/plans_response.rb +5 -5
  160. data/lib/{stcloud → SematextCloud}/models/plans_response_entry.rb +5 -5
  161. data/lib/SematextCloud/models/report_info.rb +69 -37
  162. data/lib/SematextCloud/models/service_integration.rb +71 -48
  163. data/lib/{stcloud → SematextCloud}/models/subscription.rb +15 -6
  164. data/lib/SematextCloud/models/subscription_dashboard_dto.rb +72 -49
  165. data/lib/SematextCloud/models/subscription_dto.rb +85 -53
  166. data/lib/{stcloud/models/cloud_watch_settings_response.rb → SematextCloud/models/subscription_response.rb} +6 -6
  167. data/lib/{stcloud/models/mail_report_response_response_entry.rb → SematextCloud/models/subscription_response_entry.rb} +6 -6
  168. data/lib/{stcloud → SematextCloud}/models/subscriptions_response.rb +5 -5
  169. data/lib/{stcloud → SematextCloud}/models/subscriptions_response_entry.rb +5 -5
  170. data/lib/{stcloud → SematextCloud}/models/tag_names_response.rb +5 -5
  171. data/lib/SematextCloud/models/tags_grouped.rb +227 -0
  172. data/lib/SematextCloud/models/tags_grouped_response.rb +213 -0
  173. data/lib/{stcloud → SematextCloud}/models/token_dto.rb +5 -5
  174. data/lib/{stcloud → SematextCloud}/models/token_response.rb +5 -5
  175. data/lib/{stcloud → SematextCloud}/models/token_response_entry.rb +5 -5
  176. data/lib/{stcloud/models/subscription_response.rb → SematextCloud/models/tokens_response.rb} +6 -6
  177. data/lib/{stcloud → SematextCloud}/models/tokens_response_entry.rb +5 -5
  178. data/lib/SematextCloud/models/update_app_info.rb +64 -41
  179. data/lib/{stcloud → SematextCloud}/models/update_plan_response.rb +5 -5
  180. data/lib/{stcloud → SematextCloud}/models/update_plan_response_dto.rb +5 -5
  181. data/lib/{stcloud → SematextCloud}/models/update_plan_response_entry.rb +5 -5
  182. data/lib/SematextCloud/models/update_subscription_dto.rb +42 -19
  183. data/lib/SematextCloud/models/update_token_dto.rb +44 -21
  184. data/lib/{stcloud → SematextCloud}/models/usage_dto.rb +39 -21
  185. data/lib/{stcloud → SematextCloud}/models/usage_multi_response.rb +5 -5
  186. data/lib/{stcloud → SematextCloud}/models/usage_multi_response_entry.rb +5 -5
  187. data/lib/{stcloud → SematextCloud}/models/usage_response.rb +5 -5
  188. data/lib/{stcloud → SematextCloud}/models/usage_response_entry.rb +5 -5
  189. data/lib/SematextCloud/models/user_info.rb +42 -19
  190. data/lib/SematextCloud/models/user_permissions.rb +48 -25
  191. data/lib/SematextCloud/models/user_role.rb +53 -30
  192. data/lib/SematextCloud/version.rb +2 -3
  193. data/lib/SematextCloud.rb +59 -7
  194. data/spec/api/alert_notifications_api_spec.rb +4 -4
  195. data/spec/api/alerts_api_spec.rb +4 -4
  196. data/spec/api/apps_api_spec.rb +14 -14
  197. data/spec/api/aws_settings_controller_api_spec.rb +6 -6
  198. data/spec/api/billing_api_spec.rb +6 -6
  199. data/spec/api/logs_app_api_spec.rb +4 -4
  200. data/spec/api/logs_usage_api_controller_api_spec.rb +4 -4
  201. data/spec/api/monitoring_app_api_spec.rb +4 -4
  202. data/spec/api/reset_password_api_spec.rb +4 -4
  203. data/spec/api/subscriptions_api_spec.rb +16 -16
  204. data/spec/api/tag_api_controller_api_spec.rb +24 -6
  205. data/spec/api/tokens_api_controller_api_spec.rb +8 -8
  206. data/spec/api_client_spec.rb +30 -30
  207. data/spec/configuration_spec.rb +4 -4
  208. data/spec/models/alert_notification_request_spec.rb +4 -4
  209. data/spec/models/alert_notification_spec.rb +4 -4
  210. data/spec/models/alert_rule_response_entry_spec.rb +4 -4
  211. data/spec/models/alert_rule_response_spec.rb +4 -4
  212. data/spec/models/alert_rule_schedule_time_range_dto_spec.rb +4 -4
  213. data/spec/models/alert_rule_schedule_weekday_dto_spec.rb +4 -4
  214. data/spec/models/alert_rule_spec.rb +14 -4
  215. data/spec/models/alert_rules_response_entry_spec.rb +4 -4
  216. data/spec/models/alert_rules_response_spec.rb +4 -4
  217. data/spec/models/app_description_spec.rb +4 -4
  218. data/spec/models/app_metadata_spec.rb +4 -4
  219. data/spec/models/app_response_entry_spec.rb +4 -4
  220. data/spec/models/app_response_spec.rb +4 -4
  221. data/spec/models/app_spec.rb +4 -4
  222. data/spec/models/app_types_response_entry_spec.rb +4 -4
  223. data/spec/models/app_types_response_spec.rb +4 -4
  224. data/spec/models/apps_response_entry_spec.rb +4 -4
  225. data/spec/models/apps_response_spec.rb +4 -4
  226. data/spec/models/basic_auth_method_dto_spec.rb +4 -4
  227. data/spec/models/basic_organization_dto_spec.rb +4 -4
  228. data/spec/models/billing_info_spec.rb +4 -4
  229. data/spec/models/charges_details_response_dto_spec.rb +4 -4
  230. data/spec/models/cloud_watch_settings_response_entry_spec.rb +4 -4
  231. data/spec/models/cloud_watch_settings_response_spec.rb +4 -4
  232. data/spec/models/cloud_watch_settings_spec.rb +4 -4
  233. data/spec/models/create_app_info_spec.rb +4 -4
  234. data/spec/models/create_token_dto_spec.rb +4 -4
  235. data/spec/models/daily_dto_spec.rb +18 -6
  236. data/spec/models/day_usage_data_spec.rb +4 -4
  237. data/spec/models/dimension_spec.rb +4 -4
  238. data/spec/models/error_spec.rb +4 -4
  239. data/spec/models/event_dto_spec.rb +5 -5
  240. data/spec/models/filter_value_spec.rb +4 -4
  241. data/spec/models/generic_api_response_spec.rb +4 -4
  242. data/spec/models/generic_map_based_api_response_spec.rb +4 -4
  243. data/spec/models/invitation_spec.rb +4 -4
  244. data/spec/models/invoice_response_entry_spec.rb +4 -4
  245. data/spec/models/invoice_response_spec.rb +4 -4
  246. data/spec/models/invoice_spec.rb +4 -4
  247. data/spec/models/limit_change_event_dto_spec.rb +4 -4
  248. data/spec/models/mail_report_response_response_entry_spec.rb +4 -4
  249. data/spec/models/mail_report_response_spec.rb +4 -4
  250. data/spec/models/min_period_fee_period_spec.rb +16 -4
  251. data/spec/models/notification_integration_spec.rb +4 -4
  252. data/spec/models/notifications_response_entry_spec.rb +4 -4
  253. data/spec/models/notifications_response_spec.rb +4 -4
  254. data/spec/models/plan_spec.rb +5 -5
  255. data/spec/models/plans_response_entry_spec.rb +4 -4
  256. data/spec/models/plans_response_spec.rb +4 -4
  257. data/spec/models/report_info_spec.rb +10 -4
  258. data/spec/models/service_integration_spec.rb +4 -4
  259. data/spec/models/subscription_dashboard_dto_spec.rb +4 -4
  260. data/spec/models/subscription_dto_spec.rb +10 -4
  261. data/spec/models/subscription_response_entry_spec.rb +4 -4
  262. data/spec/models/subscription_response_spec.rb +4 -4
  263. data/spec/models/subscription_spec.rb +10 -4
  264. data/spec/models/subscriptions_response_entry_spec.rb +4 -4
  265. data/spec/models/subscriptions_response_spec.rb +4 -4
  266. data/spec/models/tag_names_response_spec.rb +4 -4
  267. data/spec/models/tags_grouped_response_spec.rb +40 -0
  268. data/spec/models/{data_series_filter_spec.rb → tags_grouped_spec.rb} +9 -20
  269. data/spec/models/token_dto_spec.rb +4 -4
  270. data/spec/models/token_response_entry_spec.rb +4 -4
  271. data/spec/models/token_response_spec.rb +4 -4
  272. data/spec/models/tokens_response_entry_spec.rb +4 -4
  273. data/spec/models/tokens_response_spec.rb +4 -4
  274. data/spec/models/update_app_info_spec.rb +4 -4
  275. data/spec/models/update_plan_response_dto_spec.rb +4 -4
  276. data/spec/models/update_plan_response_entry_spec.rb +4 -4
  277. data/spec/models/update_plan_response_spec.rb +4 -4
  278. data/spec/models/update_subscription_dto_spec.rb +4 -4
  279. data/spec/models/update_token_dto_spec.rb +4 -4
  280. data/spec/models/usage_dto_spec.rb +22 -10
  281. data/spec/models/usage_multi_response_entry_spec.rb +4 -4
  282. data/spec/models/usage_multi_response_spec.rb +4 -4
  283. data/spec/models/usage_response_entry_spec.rb +4 -4
  284. data/spec/models/usage_response_spec.rb +4 -4
  285. data/spec/models/user_info_spec.rb +4 -4
  286. data/spec/models/user_permissions_spec.rb +4 -4
  287. data/spec/models/user_role_spec.rb +4 -4
  288. data/spec/spec_helper.rb +2 -2
  289. metadata +135 -192
  290. data/docs/DataSeriesFilter.md +0 -8
  291. data/docs/DataSeriesRequest.md +0 -12
  292. data/docs/MetricsApi.md +0 -227
  293. data/docs/SavedQueriesApi.md +0 -220
  294. data/docs/SavedQuery.md +0 -18
  295. data/lib/SematextCloud/api/metrics_api.rb +0 -247
  296. data/lib/SematextCloud/api/saved_queries_api.rb +0 -237
  297. data/lib/SematextCloud/models/data_series_filter.rb +0 -237
  298. data/lib/SematextCloud/models/data_series_request.rb +0 -283
  299. data/lib/SematextCloud/models/saved_query.rb +0 -291
  300. data/lib/stcloud/api/alert_notifications_api.rb +0 -142
  301. data/lib/stcloud/api/alerts_api.rb +0 -292
  302. data/lib/stcloud/api/apps_api.rb +0 -452
  303. data/lib/stcloud/api/aws_settings_controller_api.rb +0 -84
  304. data/lib/stcloud/api/billing_api.rb +0 -202
  305. data/lib/stcloud/api/logs_app_api.rb +0 -76
  306. data/lib/stcloud/api/monitoring_app_api.rb +0 -76
  307. data/lib/stcloud/api/reset_password_api.rb +0 -76
  308. data/lib/stcloud/api/subscriptions_api.rb +0 -610
  309. data/lib/stcloud/api/tag_api_controller_api.rb +0 -250
  310. data/lib/stcloud/api/tokens_api_controller_api.rb +0 -324
  311. data/lib/stcloud/api_client.rb +0 -388
  312. data/lib/stcloud/api_error.rb +0 -57
  313. data/lib/stcloud/configuration.rb +0 -205
  314. data/lib/stcloud/models/alert_notification_request.rb +0 -235
  315. data/lib/stcloud/models/alert_rule.rb +0 -675
  316. data/lib/stcloud/models/alert_rule_schedule_time_range_dto.rb +0 -215
  317. data/lib/stcloud/models/alert_rule_schedule_weekday_dto.rb +0 -244
  318. data/lib/stcloud/models/app.rb +0 -489
  319. data/lib/stcloud/models/app_description.rb +0 -206
  320. data/lib/stcloud/models/app_metadata.rb +0 -291
  321. data/lib/stcloud/models/apps_response.rb +0 -235
  322. data/lib/stcloud/models/basic_auth_method_dto.rb +0 -249
  323. data/lib/stcloud/models/basic_organization_dto.rb +0 -269
  324. data/lib/stcloud/models/billing_info.rb +0 -224
  325. data/lib/stcloud/models/cloud_watch_settings.rb +0 -279
  326. data/lib/stcloud/models/create_app_info.rb +0 -242
  327. data/lib/stcloud/models/create_token_dto.rb +0 -224
  328. data/lib/stcloud/models/error.rb +0 -215
  329. data/lib/stcloud/models/filter_value.rb +0 -253
  330. data/lib/stcloud/models/generic_api_response.rb +0 -236
  331. data/lib/stcloud/models/invitation.rb +0 -348
  332. data/lib/stcloud/models/invoice_response.rb +0 -235
  333. data/lib/stcloud/models/notification_integration.rb +0 -347
  334. data/lib/stcloud/models/plan.rb +0 -360
  335. data/lib/stcloud/models/report_info.rb +0 -270
  336. data/lib/stcloud/models/service_integration.rb +0 -305
  337. data/lib/stcloud/models/subscription_dashboard_dto.rb +0 -342
  338. data/lib/stcloud/models/subscription_dto.rb +0 -351
  339. data/lib/stcloud/models/tokens_response.rb +0 -235
  340. data/lib/stcloud/models/update_app_info.rb +0 -312
  341. data/lib/stcloud/models/update_subscription_dto.rb +0 -206
  342. data/lib/stcloud/models/update_token_dto.rb +0 -215
  343. data/lib/stcloud/models/user_info.rb +0 -206
  344. data/lib/stcloud/models/user_permissions.rb +0 -224
  345. data/lib/stcloud/models/user_role.rb +0 -270
  346. data/lib/stcloud/version.rb +0 -14
  347. data/lib/stcloud.rb +0 -128
  348. data/spec/api/metrics_api_spec.rb +0 -83
  349. data/spec/api/saved_queries_api_spec.rb +0 -80
  350. data/spec/models/data_series_request_spec.rb +0 -81
  351. data/spec/models/saved_query_spec.rb +0 -113
@@ -6,8 +6,7 @@
6
6
  OpenAPI spec version: v3
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.4.12
10
-
9
+ Swagger Codegen version: 3.0.34
11
10
  =end
12
11
 
13
12
  require 'date'
@@ -55,38 +54,51 @@ module SematextCloud
55
54
  end
56
55
 
57
56
  # Attribute type mapping.
58
- def self.swagger_types
57
+ def self.openapi_types
59
58
  {
60
- :'auth_methods' => :'Array<BasicAuthMethodDto>',
61
- :'name' => :'String',
62
- :'status' => :'String',
63
- :'uuid' => :'String'
59
+ :'auth_methods' => :'Object',
60
+ :'name' => :'Object',
61
+ :'status' => :'Object',
62
+ :'uuid' => :'Object'
64
63
  }
65
64
  end
66
65
 
66
+ # List of attributes with nullable: true
67
+ def self.openapi_nullable
68
+ Set.new([
69
+ ])
70
+ end
71
+
67
72
  # Initializes the object
68
73
  # @param [Hash] attributes Model attributes in the form of hash
69
74
  def initialize(attributes = {})
70
- return unless attributes.is_a?(Hash)
75
+ if (!attributes.is_a?(Hash))
76
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SematextCloud::BasicOrganizationDto` initialize method"
77
+ end
71
78
 
72
- # convert string to symbol for hash key
73
- attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
79
+ # check to see if the attribute exists and convert string to symbol for hash key
80
+ attributes = attributes.each_with_object({}) { |(k, v), h|
81
+ if (!self.class.attribute_map.key?(k.to_sym))
82
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SematextCloud::BasicOrganizationDto`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
83
+ end
84
+ h[k.to_sym] = v
85
+ }
74
86
 
75
- if attributes.has_key?(:'authMethods')
76
- if (value = attributes[:'authMethods']).is_a?(Array)
87
+ if attributes.key?(:'auth_methods')
88
+ if (value = attributes[:'auth_methods']).is_a?(Array)
77
89
  self.auth_methods = value
78
90
  end
79
91
  end
80
92
 
81
- if attributes.has_key?(:'name')
93
+ if attributes.key?(:'name')
82
94
  self.name = attributes[:'name']
83
95
  end
84
96
 
85
- if attributes.has_key?(:'status')
97
+ if attributes.key?(:'status')
86
98
  self.status = attributes[:'status']
87
99
  end
88
100
 
89
- if attributes.has_key?(:'uuid')
101
+ if attributes.key?(:'uuid')
90
102
  self.uuid = attributes[:'uuid']
91
103
  end
92
104
  end
@@ -101,7 +113,7 @@ module SematextCloud
101
113
  # Check to see if the all the properties in the model are valid
102
114
  # @return true if the model is valid
103
115
  def valid?
104
- status_validator = EnumAttributeValidator.new('String', ['ACTIVE', 'IN_REGISTRATION', 'DISABLED', 'EXPIRED', 'INVITED', 'DEMO'])
116
+ status_validator = EnumAttributeValidator.new('Object', ['ACTIVE', 'IN_REGISTRATION', 'DISABLED', 'EXPIRED', 'INVITED', 'DEMO'])
105
117
  return false unless status_validator.valid?(@status)
106
118
  true
107
119
  end
@@ -109,9 +121,9 @@ module SematextCloud
109
121
  # Custom attribute writer method checking allowed values (enum).
110
122
  # @param [Object] status Object to be assigned
111
123
  def status=(status)
112
- validator = EnumAttributeValidator.new('String', ['ACTIVE', 'IN_REGISTRATION', 'DISABLED', 'EXPIRED', 'INVITED', 'DEMO'])
124
+ validator = EnumAttributeValidator.new('Object', ['ACTIVE', 'IN_REGISTRATION', 'DISABLED', 'EXPIRED', 'INVITED', 'DEMO'])
113
125
  unless validator.valid?(status)
114
- fail ArgumentError, 'invalid value for "status", must be one of #{validator.allowable_values}.'
126
+ fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
115
127
  end
116
128
  @status = status
117
129
  end
@@ -134,26 +146,35 @@ module SematextCloud
134
146
  end
135
147
 
136
148
  # Calculates hash code according to all attributes.
137
- # @return [Fixnum] Hash code
149
+ # @return [Integer] Hash code
138
150
  def hash
139
151
  [auth_methods, name, status, uuid].hash
140
152
  end
141
153
 
154
+ # Builds the object from hash
155
+ # @param [Hash] attributes Model attributes in the form of hash
156
+ # @return [Object] Returns the model itself
157
+ def self.build_from_hash(attributes)
158
+ new.build_from_hash(attributes)
159
+ end
160
+
142
161
  # Builds the object from hash
143
162
  # @param [Hash] attributes Model attributes in the form of hash
144
163
  # @return [Object] Returns the model itself
145
164
  def build_from_hash(attributes)
146
165
  return nil unless attributes.is_a?(Hash)
147
- self.class.swagger_types.each_pair do |key, type|
166
+ self.class.openapi_types.each_pair do |key, type|
148
167
  if type =~ /\AArray<(.*)>/i
149
- # check to ensure the input is an array given that the the attribute
168
+ # check to ensure the input is an array given that the attribute
150
169
  # is documented as an array but the input is not
151
170
  if attributes[self.class.attribute_map[key]].is_a?(Array)
152
171
  self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
153
172
  end
154
173
  elsif !attributes[self.class.attribute_map[key]].nil?
155
174
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
156
- end # or else data not found in attributes(hash), not an issue as the data can be optional
175
+ elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
176
+ self.send("#{key}=", nil)
177
+ end
157
178
  end
158
179
 
159
180
  self
@@ -175,7 +196,7 @@ module SematextCloud
175
196
  value.to_i
176
197
  when :Float
177
198
  value.to_f
178
- when :BOOLEAN
199
+ when :Boolean
179
200
  if value.to_s =~ /\A(true|t|yes|y|1)\z/i
180
201
  true
181
202
  else
@@ -196,8 +217,7 @@ module SematextCloud
196
217
  end
197
218
  end
198
219
  else # model
199
- temp_model = SematextCloud.const_get(type).new
200
- temp_model.build_from_hash(value)
220
+ SematextCloud.const_get(type).build_from_hash(value)
201
221
  end
202
222
  end
203
223
 
@@ -219,7 +239,11 @@ module SematextCloud
219
239
  hash = {}
220
240
  self.class.attribute_map.each_pair do |attr, param|
221
241
  value = self.send(attr)
222
- next if value.nil?
242
+ if value.nil?
243
+ is_nullable = self.class.openapi_nullable.include?(attr)
244
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
245
+ end
246
+
223
247
  hash[param] = _to_hash(value)
224
248
  end
225
249
  hash
@@ -241,6 +265,5 @@ module SematextCloud
241
265
  else
242
266
  value
243
267
  end
244
- end
245
- end
268
+ end end
246
269
  end
@@ -6,8 +6,7 @@
6
6
  OpenAPI spec version: v3
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.4.12
10
-
9
+ Swagger Codegen version: 3.0.34
11
10
  =end
12
11
 
13
12
  require 'date'
@@ -30,32 +29,45 @@ module SematextCloud
30
29
  end
31
30
 
32
31
  # Attribute type mapping.
33
- def self.swagger_types
32
+ def self.openapi_types
34
33
  {
35
- :'credit_card_id' => :'Integer',
36
- :'payment_method' => :'String',
37
- :'plan_id' => :'Integer'
34
+ :'credit_card_id' => :'Object',
35
+ :'payment_method' => :'Object',
36
+ :'plan_id' => :'Object'
38
37
  }
39
38
  end
40
39
 
40
+ # List of attributes with nullable: true
41
+ def self.openapi_nullable
42
+ Set.new([
43
+ ])
44
+ end
45
+
41
46
  # Initializes the object
42
47
  # @param [Hash] attributes Model attributes in the form of hash
43
48
  def initialize(attributes = {})
44
- return unless attributes.is_a?(Hash)
49
+ if (!attributes.is_a?(Hash))
50
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SematextCloud::BillingInfo` initialize method"
51
+ end
45
52
 
46
- # convert string to symbol for hash key
47
- attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
53
+ # check to see if the attribute exists and convert string to symbol for hash key
54
+ attributes = attributes.each_with_object({}) { |(k, v), h|
55
+ if (!self.class.attribute_map.key?(k.to_sym))
56
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SematextCloud::BillingInfo`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
57
+ end
58
+ h[k.to_sym] = v
59
+ }
48
60
 
49
- if attributes.has_key?(:'creditCardId')
50
- self.credit_card_id = attributes[:'creditCardId']
61
+ if attributes.key?(:'credit_card_id')
62
+ self.credit_card_id = attributes[:'credit_card_id']
51
63
  end
52
64
 
53
- if attributes.has_key?(:'paymentMethod')
54
- self.payment_method = attributes[:'paymentMethod']
65
+ if attributes.key?(:'payment_method')
66
+ self.payment_method = attributes[:'payment_method']
55
67
  end
56
68
 
57
- if attributes.has_key?(:'planId')
58
- self.plan_id = attributes[:'planId']
69
+ if attributes.key?(:'plan_id')
70
+ self.plan_id = attributes[:'plan_id']
59
71
  end
60
72
  end
61
73
 
@@ -89,26 +101,35 @@ module SematextCloud
89
101
  end
90
102
 
91
103
  # Calculates hash code according to all attributes.
92
- # @return [Fixnum] Hash code
104
+ # @return [Integer] Hash code
93
105
  def hash
94
106
  [credit_card_id, payment_method, plan_id].hash
95
107
  end
96
108
 
109
+ # Builds the object from hash
110
+ # @param [Hash] attributes Model attributes in the form of hash
111
+ # @return [Object] Returns the model itself
112
+ def self.build_from_hash(attributes)
113
+ new.build_from_hash(attributes)
114
+ end
115
+
97
116
  # Builds the object from hash
98
117
  # @param [Hash] attributes Model attributes in the form of hash
99
118
  # @return [Object] Returns the model itself
100
119
  def build_from_hash(attributes)
101
120
  return nil unless attributes.is_a?(Hash)
102
- self.class.swagger_types.each_pair do |key, type|
121
+ self.class.openapi_types.each_pair do |key, type|
103
122
  if type =~ /\AArray<(.*)>/i
104
- # check to ensure the input is an array given that the the attribute
123
+ # check to ensure the input is an array given that the attribute
105
124
  # is documented as an array but the input is not
106
125
  if attributes[self.class.attribute_map[key]].is_a?(Array)
107
126
  self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
108
127
  end
109
128
  elsif !attributes[self.class.attribute_map[key]].nil?
110
129
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
111
- end # or else data not found in attributes(hash), not an issue as the data can be optional
130
+ elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
131
+ self.send("#{key}=", nil)
132
+ end
112
133
  end
113
134
 
114
135
  self
@@ -130,7 +151,7 @@ module SematextCloud
130
151
  value.to_i
131
152
  when :Float
132
153
  value.to_f
133
- when :BOOLEAN
154
+ when :Boolean
134
155
  if value.to_s =~ /\A(true|t|yes|y|1)\z/i
135
156
  true
136
157
  else
@@ -151,8 +172,7 @@ module SematextCloud
151
172
  end
152
173
  end
153
174
  else # model
154
- temp_model = SematextCloud.const_get(type).new
155
- temp_model.build_from_hash(value)
175
+ SematextCloud.const_get(type).build_from_hash(value)
156
176
  end
157
177
  end
158
178
 
@@ -174,7 +194,11 @@ module SematextCloud
174
194
  hash = {}
175
195
  self.class.attribute_map.each_pair do |attr, param|
176
196
  value = self.send(attr)
177
- next if value.nil?
197
+ if value.nil?
198
+ is_nullable = self.class.openapi_nullable.include?(attr)
199
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
200
+ end
201
+
178
202
  hash[param] = _to_hash(value)
179
203
  end
180
204
  hash
@@ -196,6 +220,5 @@ module SematextCloud
196
220
  else
197
221
  value
198
222
  end
199
- end
200
- end
223
+ end end
201
224
  end
@@ -6,12 +6,12 @@
6
6
  OpenAPI spec version: v3
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 3.0.25
9
+ Swagger Codegen version: 3.0.34
10
10
  =end
11
11
 
12
12
  require 'date'
13
13
 
14
- module stcloud
14
+ module SematextCloud
15
15
  class ChargesDetailsResponseDto
16
16
  attr_accessor :app
17
17
 
@@ -85,13 +85,13 @@ module stcloud
85
85
  # @param [Hash] attributes Model attributes in the form of hash
86
86
  def initialize(attributes = {})
87
87
  if (!attributes.is_a?(Hash))
88
- fail ArgumentError, "The input argument (attributes) must be a hash in `stcloud::ChargesDetailsResponseDto` initialize method"
88
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SematextCloud::ChargesDetailsResponseDto` initialize method"
89
89
  end
90
90
 
91
91
  # check to see if the attribute exists and convert string to symbol for hash key
92
92
  attributes = attributes.each_with_object({}) { |(k, v), h|
93
93
  if (!self.class.attribute_map.key?(k.to_sym))
94
- fail ArgumentError, "`#{k}` is not a valid attribute in `stcloud::ChargesDetailsResponseDto`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
94
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SematextCloud::ChargesDetailsResponseDto`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
95
95
  end
96
96
  h[k.to_sym] = v
97
97
  }
@@ -246,7 +246,7 @@ module stcloud
246
246
  end
247
247
  end
248
248
  else # model
249
- stcloud.const_get(type).build_from_hash(value)
249
+ SematextCloud.const_get(type).build_from_hash(value)
250
250
  end
251
251
  end
252
252
 
@@ -6,8 +6,7 @@
6
6
  OpenAPI spec version: v3
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.4.12
10
-
9
+ Swagger Codegen version: 3.0.34
11
10
  =end
12
11
 
13
12
  require 'date'
@@ -55,37 +54,50 @@ module SematextCloud
55
54
  end
56
55
 
57
56
  # Attribute type mapping.
58
- def self.swagger_types
57
+ def self.openapi_types
59
58
  {
60
- :'access_key' => :'String',
61
- :'fetch_frequency' => :'String',
62
- :'region' => :'String',
63
- :'secret_key' => :'String'
59
+ :'access_key' => :'Object',
60
+ :'fetch_frequency' => :'Object',
61
+ :'region' => :'Object',
62
+ :'secret_key' => :'Object'
64
63
  }
65
64
  end
66
65
 
66
+ # List of attributes with nullable: true
67
+ def self.openapi_nullable
68
+ Set.new([
69
+ ])
70
+ end
71
+
67
72
  # Initializes the object
68
73
  # @param [Hash] attributes Model attributes in the form of hash
69
74
  def initialize(attributes = {})
70
- return unless attributes.is_a?(Hash)
75
+ if (!attributes.is_a?(Hash))
76
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SematextCloud::CloudWatchSettings` initialize method"
77
+ end
71
78
 
72
- # convert string to symbol for hash key
73
- attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
79
+ # check to see if the attribute exists and convert string to symbol for hash key
80
+ attributes = attributes.each_with_object({}) { |(k, v), h|
81
+ if (!self.class.attribute_map.key?(k.to_sym))
82
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SematextCloud::CloudWatchSettings`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
83
+ end
84
+ h[k.to_sym] = v
85
+ }
74
86
 
75
- if attributes.has_key?(:'accessKey')
76
- self.access_key = attributes[:'accessKey']
87
+ if attributes.key?(:'access_key')
88
+ self.access_key = attributes[:'access_key']
77
89
  end
78
90
 
79
- if attributes.has_key?(:'fetchFrequency')
80
- self.fetch_frequency = attributes[:'fetchFrequency']
91
+ if attributes.key?(:'fetch_frequency')
92
+ self.fetch_frequency = attributes[:'fetch_frequency']
81
93
  end
82
94
 
83
- if attributes.has_key?(:'region')
95
+ if attributes.key?(:'region')
84
96
  self.region = attributes[:'region']
85
97
  end
86
98
 
87
- if attributes.has_key?(:'secretKey')
88
- self.secret_key = attributes[:'secretKey']
99
+ if attributes.key?(:'secret_key')
100
+ self.secret_key = attributes[:'secret_key']
89
101
  end
90
102
  end
91
103
 
@@ -99,9 +111,9 @@ module SematextCloud
99
111
  # Check to see if the all the properties in the model are valid
100
112
  # @return true if the model is valid
101
113
  def valid?
102
- fetch_frequency_validator = EnumAttributeValidator.new('String', ['MINUTE', 'FIVE_MINUTES', 'FIFTEEN_MINUTES'])
114
+ fetch_frequency_validator = EnumAttributeValidator.new('Object', ['MINUTE', 'FIVE_MINUTES', 'FIFTEEN_MINUTES'])
103
115
  return false unless fetch_frequency_validator.valid?(@fetch_frequency)
104
- region_validator = EnumAttributeValidator.new('String', ['US_EAST_1', 'US_WEST_1', 'EU_WEST_1', 'US_WEST_2', 'AP_SOUTHEAST_1', 'AP_SOUTHEAST_2', 'AP_NORTHEAST_1', 'SA_EAST_1', 'GovCloud', 'CN_NORTH_1', 'US_EAST_2', 'AP_SOUTH_1', 'AP_NORTHEAST_2', 'CA_CENTRAL_1', 'EU_CENTRAL_1', 'EU_WEST_2'])
116
+ region_validator = EnumAttributeValidator.new('Object', ['US_EAST_1', 'US_WEST_1', 'EU_WEST_1', 'US_WEST_2', 'AP_SOUTHEAST_1', 'AP_SOUTHEAST_2', 'AP_NORTHEAST_1', 'SA_EAST_1', 'GovCloud', 'CN_NORTH_1', 'US_EAST_2', 'AP_SOUTH_1', 'AP_NORTHEAST_2', 'CA_CENTRAL_1', 'EU_CENTRAL_1', 'EU_WEST_2'])
105
117
  return false unless region_validator.valid?(@region)
106
118
  true
107
119
  end
@@ -109,9 +121,9 @@ module SematextCloud
109
121
  # Custom attribute writer method checking allowed values (enum).
110
122
  # @param [Object] fetch_frequency Object to be assigned
111
123
  def fetch_frequency=(fetch_frequency)
112
- validator = EnumAttributeValidator.new('String', ['MINUTE', 'FIVE_MINUTES', 'FIFTEEN_MINUTES'])
124
+ validator = EnumAttributeValidator.new('Object', ['MINUTE', 'FIVE_MINUTES', 'FIFTEEN_MINUTES'])
113
125
  unless validator.valid?(fetch_frequency)
114
- fail ArgumentError, 'invalid value for "fetch_frequency", must be one of #{validator.allowable_values}.'
126
+ fail ArgumentError, "invalid value for \"fetch_frequency\", must be one of #{validator.allowable_values}."
115
127
  end
116
128
  @fetch_frequency = fetch_frequency
117
129
  end
@@ -119,9 +131,9 @@ module SematextCloud
119
131
  # Custom attribute writer method checking allowed values (enum).
120
132
  # @param [Object] region Object to be assigned
121
133
  def region=(region)
122
- validator = EnumAttributeValidator.new('String', ['US_EAST_1', 'US_WEST_1', 'EU_WEST_1', 'US_WEST_2', 'AP_SOUTHEAST_1', 'AP_SOUTHEAST_2', 'AP_NORTHEAST_1', 'SA_EAST_1', 'GovCloud', 'CN_NORTH_1', 'US_EAST_2', 'AP_SOUTH_1', 'AP_NORTHEAST_2', 'CA_CENTRAL_1', 'EU_CENTRAL_1', 'EU_WEST_2'])
134
+ validator = EnumAttributeValidator.new('Object', ['US_EAST_1', 'US_WEST_1', 'EU_WEST_1', 'US_WEST_2', 'AP_SOUTHEAST_1', 'AP_SOUTHEAST_2', 'AP_NORTHEAST_1', 'SA_EAST_1', 'GovCloud', 'CN_NORTH_1', 'US_EAST_2', 'AP_SOUTH_1', 'AP_NORTHEAST_2', 'CA_CENTRAL_1', 'EU_CENTRAL_1', 'EU_WEST_2'])
123
135
  unless validator.valid?(region)
124
- fail ArgumentError, 'invalid value for "region", must be one of #{validator.allowable_values}.'
136
+ fail ArgumentError, "invalid value for \"region\", must be one of #{validator.allowable_values}."
125
137
  end
126
138
  @region = region
127
139
  end
@@ -144,26 +156,35 @@ module SematextCloud
144
156
  end
145
157
 
146
158
  # Calculates hash code according to all attributes.
147
- # @return [Fixnum] Hash code
159
+ # @return [Integer] Hash code
148
160
  def hash
149
161
  [access_key, fetch_frequency, region, secret_key].hash
150
162
  end
151
163
 
164
+ # Builds the object from hash
165
+ # @param [Hash] attributes Model attributes in the form of hash
166
+ # @return [Object] Returns the model itself
167
+ def self.build_from_hash(attributes)
168
+ new.build_from_hash(attributes)
169
+ end
170
+
152
171
  # Builds the object from hash
153
172
  # @param [Hash] attributes Model attributes in the form of hash
154
173
  # @return [Object] Returns the model itself
155
174
  def build_from_hash(attributes)
156
175
  return nil unless attributes.is_a?(Hash)
157
- self.class.swagger_types.each_pair do |key, type|
176
+ self.class.openapi_types.each_pair do |key, type|
158
177
  if type =~ /\AArray<(.*)>/i
159
- # check to ensure the input is an array given that the the attribute
178
+ # check to ensure the input is an array given that the attribute
160
179
  # is documented as an array but the input is not
161
180
  if attributes[self.class.attribute_map[key]].is_a?(Array)
162
181
  self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
163
182
  end
164
183
  elsif !attributes[self.class.attribute_map[key]].nil?
165
184
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
166
- end # or else data not found in attributes(hash), not an issue as the data can be optional
185
+ elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
186
+ self.send("#{key}=", nil)
187
+ end
167
188
  end
168
189
 
169
190
  self
@@ -185,7 +206,7 @@ module SematextCloud
185
206
  value.to_i
186
207
  when :Float
187
208
  value.to_f
188
- when :BOOLEAN
209
+ when :Boolean
189
210
  if value.to_s =~ /\A(true|t|yes|y|1)\z/i
190
211
  true
191
212
  else
@@ -206,8 +227,7 @@ module SematextCloud
206
227
  end
207
228
  end
208
229
  else # model
209
- temp_model = SematextCloud.const_get(type).new
210
- temp_model.build_from_hash(value)
230
+ SematextCloud.const_get(type).build_from_hash(value)
211
231
  end
212
232
  end
213
233
 
@@ -229,7 +249,11 @@ module SematextCloud
229
249
  hash = {}
230
250
  self.class.attribute_map.each_pair do |attr, param|
231
251
  value = self.send(attr)
232
- next if value.nil?
252
+ if value.nil?
253
+ is_nullable = self.class.openapi_nullable.include?(attr)
254
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
255
+ end
256
+
233
257
  hash[param] = _to_hash(value)
234
258
  end
235
259
  hash
@@ -251,6 +275,5 @@ module SematextCloud
251
275
  else
252
276
  value
253
277
  end
254
- end
255
- end
278
+ end end
256
279
  end