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