SematextCloud 0.3.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +70 -0
- data/README.md +1 -1
- data/SematextCloud.gemspec +4 -5
- data/docs/AlertNotification.md +2 -1
- data/docs/AlertNotificationRequest.md +2 -1
- data/docs/AlertNotificationsApi.md +19 -17
- data/docs/AlertRule.md +3 -1
- data/docs/AlertRuleResponse.md +2 -1
- data/docs/AlertRuleResponseEntry.md +2 -1
- data/docs/AlertRuleScheduleTimeRangeDto.md +2 -1
- data/docs/AlertRuleScheduleWeekdayDto.md +2 -1
- data/docs/AlertRulesResponse.md +2 -1
- data/docs/AlertRulesResponseEntry.md +2 -1
- data/docs/AlertsApi.md +42 -40
- data/docs/App.md +2 -1
- data/docs/AppDescription.md +2 -1
- data/docs/AppMetadata.md +2 -1
- data/docs/AppResponse.md +2 -1
- data/docs/AppResponseEntry.md +2 -1
- data/docs/AppTypesResponse.md +2 -1
- data/docs/AppTypesResponseEntry.md +2 -1
- data/docs/AppsApi.md +93 -88
- data/docs/AppsResponse.md +2 -1
- data/docs/AppsResponseEntry.md +2 -1
- data/docs/AwsSettingsControllerApi.md +17 -15
- data/docs/BasicAuthMethodDto.md +2 -1
- data/docs/BasicOrganizationDto.md +2 -1
- data/docs/BillingApi.md +32 -30
- data/docs/BillingInfo.md +2 -1
- data/docs/ChargesDetailsResponseDto.md +2 -1
- data/docs/CloudWatchSettings.md +2 -1
- data/docs/CloudWatchSettingsResponse.md +2 -1
- data/docs/CloudWatchSettingsResponseEntry.md +2 -1
- data/docs/CreateAppInfo.md +2 -1
- data/docs/CreateTokenDto.md +2 -1
- data/docs/DailyDto.md +10 -7
- data/docs/DayUsageData.md +23 -23
- data/docs/Dimension.md +2 -1
- data/docs/Error.md +2 -1
- data/docs/EventDto.md +2 -1
- data/docs/FilterValue.md +2 -1
- data/docs/GenericApiResponse.md +2 -1
- data/docs/GenericMapBasedApiResponse.md +2 -1
- data/docs/Invitation.md +2 -1
- data/docs/Invoice.md +2 -1
- data/docs/InvoiceResponse.md +2 -1
- data/docs/InvoiceResponseEntry.md +2 -1
- data/docs/LimitChangeEventDTO.md +2 -1
- data/docs/LogsAppApi.md +10 -8
- data/docs/LogsUsageApiControllerApi.md +9 -7
- data/docs/MailReportResponse.md +2 -1
- data/docs/MailReportResponseResponseEntry.md +2 -1
- data/docs/MinPeriodFeePeriod.md +17 -14
- data/docs/MonitoringAppApi.md +10 -8
- data/docs/NotificationIntegration.md +2 -1
- data/docs/NotificationsResponse.md +2 -1
- data/docs/NotificationsResponseEntry.md +2 -1
- data/docs/Plan.md +2 -1
- data/docs/PlansResponse.md +2 -1
- data/docs/PlansResponseEntry.md +2 -1
- data/docs/ReportInfo.md +13 -11
- data/docs/ResetPasswordApi.md +10 -8
- data/docs/ServiceIntegration.md +16 -15
- data/docs/Subscription.md +20 -18
- data/docs/SubscriptionDashboardDto.md +2 -1
- data/docs/SubscriptionDto.md +17 -15
- data/docs/SubscriptionResponse.md +2 -1
- data/docs/SubscriptionResponseEntry.md +2 -1
- data/docs/SubscriptionsApi.md +121 -118
- data/docs/SubscriptionsResponse.md +2 -1
- data/docs/SubscriptionsResponseEntry.md +2 -1
- data/docs/TagApiControllerApi.md +102 -33
- data/docs/TagNamesResponse.md +2 -1
- data/docs/TagsGrouped.md +8 -0
- data/docs/TagsGroupedResponse.md +7 -0
- data/docs/TokenDto.md +2 -1
- data/docs/TokenResponse.md +2 -1
- data/docs/TokenResponseEntry.md +2 -1
- data/docs/TokensApiControllerApi.md +51 -49
- data/docs/TokensResponse.md +2 -1
- data/docs/TokensResponseEntry.md +2 -1
- data/docs/UpdateAppInfo.md +2 -1
- data/docs/UpdatePlanResponse.md +2 -1
- data/docs/UpdatePlanResponseDto.md +2 -1
- data/docs/UpdatePlanResponseEntry.md +2 -1
- data/docs/UpdateSubscriptionDto.md +2 -1
- data/docs/UpdateTokenDto.md +2 -1
- data/docs/UsageDto.md +6 -3
- data/docs/UsageMultiResponse.md +2 -1
- data/docs/UsageMultiResponseEntry.md +2 -1
- data/docs/UsageResponse.md +2 -1
- data/docs/UsageResponseEntry.md +2 -1
- data/docs/UserInfo.md +2 -1
- data/docs/UserPermissions.md +7 -6
- data/docs/UserRole.md +7 -6
- data/lib/SematextCloud/api/alert_notifications_api.rb +47 -42
- data/lib/SematextCloud/api/alerts_api.rb +69 -60
- data/lib/SematextCloud/api/apps_api.rb +138 -119
- data/lib/SematextCloud/api/aws_settings_controller_api.rb +23 -22
- data/lib/SematextCloud/api/billing_api.rb +62 -57
- data/lib/SematextCloud/api/logs_app_api.rb +21 -20
- data/lib/{stcloud → SematextCloud}/api/logs_usage_api_controller_api.rb +2 -2
- data/lib/SematextCloud/api/monitoring_app_api.rb +21 -20
- data/lib/SematextCloud/api/reset_password_api.rb +21 -20
- data/lib/SematextCloud/api/subscriptions_api.rb +194 -163
- data/lib/SematextCloud/api/tag_api_controller_api.rb +132 -50
- data/lib/SematextCloud/api/tokens_api_controller_api.rb +97 -86
- data/lib/SematextCloud/api_client.rb +41 -42
- data/lib/SematextCloud/api_error.rb +21 -2
- data/lib/SematextCloud/configuration.rb +5 -9
- data/lib/{stcloud → SematextCloud}/models/alert_notification.rb +5 -5
- data/lib/SematextCloud/models/alert_notification_request.rb +49 -26
- data/lib/SematextCloud/models/alert_rule.rb +197 -153
- data/lib/{stcloud/models/app_response.rb → SematextCloud/models/alert_rule_response.rb} +6 -6
- data/lib/{stcloud → SematextCloud}/models/alert_rule_response_entry.rb +5 -5
- data/lib/SematextCloud/models/alert_rule_schedule_time_range_dto.rb +44 -21
- data/lib/SematextCloud/models/alert_rule_schedule_weekday_dto.rb +49 -26
- data/lib/SematextCloud/models/alert_rules_response.rb +235 -0
- data/lib/{stcloud → SematextCloud}/models/alert_rules_response_entry.rb +5 -5
- data/lib/SematextCloud/models/app.rb +163 -93
- data/lib/SematextCloud/models/app_description.rb +41 -18
- data/lib/SematextCloud/models/app_metadata.rb +60 -37
- data/lib/{stcloud/models/alert_rule_response.rb → SematextCloud/models/app_response.rb} +6 -6
- data/lib/{stcloud → SematextCloud}/models/app_response_entry.rb +5 -5
- data/lib/{stcloud → SematextCloud}/models/app_types_response.rb +5 -5
- data/lib/{stcloud → SematextCloud}/models/app_types_response_entry.rb +5 -5
- data/lib/{stcloud/models/alert_rules_response.rb → SematextCloud/models/apps_response.rb} +6 -6
- data/lib/{stcloud → SematextCloud}/models/apps_response_entry.rb +5 -5
- data/lib/SematextCloud/models/basic_auth_method_dto.rb +47 -24
- data/lib/SematextCloud/models/basic_organization_dto.rb +51 -28
- data/lib/SematextCloud/models/billing_info.rb +48 -25
- data/lib/{stcloud → SematextCloud}/models/charges_details_response_dto.rb +5 -5
- data/lib/SematextCloud/models/cloud_watch_settings.rb +56 -33
- data/lib/SematextCloud/models/cloud_watch_settings_response.rb +235 -0
- data/lib/{stcloud → SematextCloud}/models/cloud_watch_settings_response_entry.rb +5 -5
- data/lib/SematextCloud/models/create_app_info.rb +53 -31
- data/lib/SematextCloud/models/create_token_dto.rb +46 -23
- data/lib/{stcloud → SematextCloud}/models/daily_dto.rb +36 -18
- data/lib/{stcloud → SematextCloud}/models/day_usage_data.rb +5 -5
- data/lib/{stcloud → SematextCloud}/models/dimension.rb +5 -5
- data/lib/SematextCloud/models/error.rb +43 -20
- data/lib/{stcloud → SematextCloud}/models/event_dto.rb +7 -7
- data/lib/SematextCloud/models/filter_value.rb +53 -30
- data/lib/SematextCloud/models/generic_api_response.rb +46 -24
- data/lib/{stcloud → SematextCloud}/models/generic_map_based_api_response.rb +5 -5
- data/lib/SematextCloud/models/invitation.rb +74 -52
- data/lib/{stcloud → SematextCloud}/models/invoice.rb +5 -5
- data/lib/{stcloud/models/notifications_response.rb → SematextCloud/models/invoice_response.rb} +6 -6
- data/lib/{stcloud → SematextCloud}/models/invoice_response_entry.rb +5 -5
- data/lib/{stcloud → SematextCloud}/models/limit_change_event_dto.rb +5 -5
- data/lib/{stcloud → SematextCloud}/models/mail_report_response.rb +5 -5
- data/lib/{stcloud/models/subscription_response_entry.rb → SematextCloud/models/mail_report_response_response_entry.rb} +6 -6
- data/lib/{stcloud → SematextCloud}/models/min_period_fee_period.rb +24 -6
- data/lib/SematextCloud/models/notification_integration.rb +73 -50
- data/lib/SematextCloud/models/notifications_response.rb +235 -0
- data/lib/{stcloud → SematextCloud}/models/notifications_response_entry.rb +5 -5
- data/lib/SematextCloud/models/plan.rb +80 -57
- data/lib/{stcloud → SematextCloud}/models/plans_response.rb +5 -5
- data/lib/{stcloud → SematextCloud}/models/plans_response_entry.rb +5 -5
- data/lib/SematextCloud/models/report_info.rb +69 -37
- data/lib/SematextCloud/models/service_integration.rb +71 -48
- data/lib/{stcloud → SematextCloud}/models/subscription.rb +15 -6
- data/lib/SematextCloud/models/subscription_dashboard_dto.rb +72 -49
- data/lib/SematextCloud/models/subscription_dto.rb +85 -53
- data/lib/{stcloud/models/cloud_watch_settings_response.rb → SematextCloud/models/subscription_response.rb} +6 -6
- data/lib/{stcloud/models/mail_report_response_response_entry.rb → SematextCloud/models/subscription_response_entry.rb} +6 -6
- data/lib/{stcloud → SematextCloud}/models/subscriptions_response.rb +5 -5
- data/lib/{stcloud → SematextCloud}/models/subscriptions_response_entry.rb +5 -5
- data/lib/{stcloud → SematextCloud}/models/tag_names_response.rb +5 -5
- data/lib/SematextCloud/models/tags_grouped.rb +227 -0
- data/lib/SematextCloud/models/tags_grouped_response.rb +213 -0
- data/lib/{stcloud → SematextCloud}/models/token_dto.rb +5 -5
- data/lib/{stcloud → SematextCloud}/models/token_response.rb +5 -5
- data/lib/{stcloud → SematextCloud}/models/token_response_entry.rb +5 -5
- data/lib/{stcloud/models/subscription_response.rb → SematextCloud/models/tokens_response.rb} +6 -6
- data/lib/{stcloud → SematextCloud}/models/tokens_response_entry.rb +5 -5
- data/lib/SematextCloud/models/update_app_info.rb +64 -41
- data/lib/{stcloud → SematextCloud}/models/update_plan_response.rb +5 -5
- data/lib/{stcloud → SematextCloud}/models/update_plan_response_dto.rb +5 -5
- data/lib/{stcloud → SematextCloud}/models/update_plan_response_entry.rb +5 -5
- data/lib/SematextCloud/models/update_subscription_dto.rb +42 -19
- data/lib/SematextCloud/models/update_token_dto.rb +44 -21
- data/lib/{stcloud → SematextCloud}/models/usage_dto.rb +39 -21
- data/lib/{stcloud → SematextCloud}/models/usage_multi_response.rb +5 -5
- data/lib/{stcloud → SematextCloud}/models/usage_multi_response_entry.rb +5 -5
- data/lib/{stcloud → SematextCloud}/models/usage_response.rb +5 -5
- data/lib/{stcloud → SematextCloud}/models/usage_response_entry.rb +5 -5
- data/lib/SematextCloud/models/user_info.rb +42 -19
- data/lib/SematextCloud/models/user_permissions.rb +48 -25
- data/lib/SematextCloud/models/user_role.rb +53 -30
- data/lib/SematextCloud/version.rb +2 -3
- data/lib/SematextCloud.rb +59 -7
- data/spec/api/alert_notifications_api_spec.rb +4 -4
- data/spec/api/alerts_api_spec.rb +4 -4
- data/spec/api/apps_api_spec.rb +14 -14
- data/spec/api/aws_settings_controller_api_spec.rb +6 -6
- data/spec/api/billing_api_spec.rb +6 -6
- data/spec/api/logs_app_api_spec.rb +4 -4
- data/spec/api/logs_usage_api_controller_api_spec.rb +4 -4
- data/spec/api/monitoring_app_api_spec.rb +4 -4
- data/spec/api/reset_password_api_spec.rb +4 -4
- data/spec/api/subscriptions_api_spec.rb +16 -16
- data/spec/api/tag_api_controller_api_spec.rb +24 -6
- data/spec/api/tokens_api_controller_api_spec.rb +8 -8
- data/spec/api_client_spec.rb +30 -30
- data/spec/configuration_spec.rb +4 -4
- data/spec/models/alert_notification_request_spec.rb +4 -4
- data/spec/models/alert_notification_spec.rb +4 -4
- data/spec/models/alert_rule_response_entry_spec.rb +4 -4
- data/spec/models/alert_rule_response_spec.rb +4 -4
- data/spec/models/alert_rule_schedule_time_range_dto_spec.rb +4 -4
- data/spec/models/alert_rule_schedule_weekday_dto_spec.rb +4 -4
- data/spec/models/alert_rule_spec.rb +14 -4
- data/spec/models/alert_rules_response_entry_spec.rb +4 -4
- data/spec/models/alert_rules_response_spec.rb +4 -4
- data/spec/models/app_description_spec.rb +4 -4
- data/spec/models/app_metadata_spec.rb +4 -4
- data/spec/models/app_response_entry_spec.rb +4 -4
- data/spec/models/app_response_spec.rb +4 -4
- data/spec/models/app_spec.rb +4 -4
- data/spec/models/app_types_response_entry_spec.rb +4 -4
- data/spec/models/app_types_response_spec.rb +4 -4
- data/spec/models/apps_response_entry_spec.rb +4 -4
- data/spec/models/apps_response_spec.rb +4 -4
- data/spec/models/basic_auth_method_dto_spec.rb +4 -4
- data/spec/models/basic_organization_dto_spec.rb +4 -4
- data/spec/models/billing_info_spec.rb +4 -4
- data/spec/models/charges_details_response_dto_spec.rb +4 -4
- data/spec/models/cloud_watch_settings_response_entry_spec.rb +4 -4
- data/spec/models/cloud_watch_settings_response_spec.rb +4 -4
- data/spec/models/cloud_watch_settings_spec.rb +4 -4
- data/spec/models/create_app_info_spec.rb +4 -4
- data/spec/models/create_token_dto_spec.rb +4 -4
- data/spec/models/daily_dto_spec.rb +18 -6
- data/spec/models/day_usage_data_spec.rb +4 -4
- data/spec/models/dimension_spec.rb +4 -4
- data/spec/models/error_spec.rb +4 -4
- data/spec/models/event_dto_spec.rb +5 -5
- data/spec/models/filter_value_spec.rb +4 -4
- data/spec/models/generic_api_response_spec.rb +4 -4
- data/spec/models/generic_map_based_api_response_spec.rb +4 -4
- data/spec/models/invitation_spec.rb +4 -4
- data/spec/models/invoice_response_entry_spec.rb +4 -4
- data/spec/models/invoice_response_spec.rb +4 -4
- data/spec/models/invoice_spec.rb +4 -4
- data/spec/models/limit_change_event_dto_spec.rb +4 -4
- data/spec/models/mail_report_response_response_entry_spec.rb +4 -4
- data/spec/models/mail_report_response_spec.rb +4 -4
- data/spec/models/min_period_fee_period_spec.rb +16 -4
- data/spec/models/notification_integration_spec.rb +4 -4
- data/spec/models/notifications_response_entry_spec.rb +4 -4
- data/spec/models/notifications_response_spec.rb +4 -4
- data/spec/models/plan_spec.rb +5 -5
- data/spec/models/plans_response_entry_spec.rb +4 -4
- data/spec/models/plans_response_spec.rb +4 -4
- data/spec/models/report_info_spec.rb +10 -4
- data/spec/models/service_integration_spec.rb +4 -4
- data/spec/models/subscription_dashboard_dto_spec.rb +4 -4
- data/spec/models/subscription_dto_spec.rb +10 -4
- data/spec/models/subscription_response_entry_spec.rb +4 -4
- data/spec/models/subscription_response_spec.rb +4 -4
- data/spec/models/subscription_spec.rb +10 -4
- data/spec/models/subscriptions_response_entry_spec.rb +4 -4
- data/spec/models/subscriptions_response_spec.rb +4 -4
- data/spec/models/tag_names_response_spec.rb +4 -4
- data/spec/models/tags_grouped_response_spec.rb +40 -0
- data/spec/models/{data_series_filter_spec.rb → tags_grouped_spec.rb} +9 -20
- data/spec/models/token_dto_spec.rb +4 -4
- data/spec/models/token_response_entry_spec.rb +4 -4
- data/spec/models/token_response_spec.rb +4 -4
- data/spec/models/tokens_response_entry_spec.rb +4 -4
- data/spec/models/tokens_response_spec.rb +4 -4
- data/spec/models/update_app_info_spec.rb +4 -4
- data/spec/models/update_plan_response_dto_spec.rb +4 -4
- data/spec/models/update_plan_response_entry_spec.rb +4 -4
- data/spec/models/update_plan_response_spec.rb +4 -4
- data/spec/models/update_subscription_dto_spec.rb +4 -4
- data/spec/models/update_token_dto_spec.rb +4 -4
- data/spec/models/usage_dto_spec.rb +22 -10
- data/spec/models/usage_multi_response_entry_spec.rb +4 -4
- data/spec/models/usage_multi_response_spec.rb +4 -4
- data/spec/models/usage_response_entry_spec.rb +4 -4
- data/spec/models/usage_response_spec.rb +4 -4
- data/spec/models/user_info_spec.rb +4 -4
- data/spec/models/user_permissions_spec.rb +4 -4
- data/spec/models/user_role_spec.rb +4 -4
- data/spec/spec_helper.rb +2 -2
- metadata +135 -192
- data/docs/DataSeriesFilter.md +0 -8
- data/docs/DataSeriesRequest.md +0 -12
- data/docs/MetricsApi.md +0 -227
- data/docs/SavedQueriesApi.md +0 -220
- data/docs/SavedQuery.md +0 -18
- data/lib/SematextCloud/api/metrics_api.rb +0 -247
- data/lib/SematextCloud/api/saved_queries_api.rb +0 -237
- data/lib/SematextCloud/models/data_series_filter.rb +0 -237
- data/lib/SematextCloud/models/data_series_request.rb +0 -283
- data/lib/SematextCloud/models/saved_query.rb +0 -291
- data/lib/stcloud/api/alert_notifications_api.rb +0 -142
- data/lib/stcloud/api/alerts_api.rb +0 -292
- data/lib/stcloud/api/apps_api.rb +0 -452
- data/lib/stcloud/api/aws_settings_controller_api.rb +0 -84
- data/lib/stcloud/api/billing_api.rb +0 -202
- data/lib/stcloud/api/logs_app_api.rb +0 -76
- data/lib/stcloud/api/monitoring_app_api.rb +0 -76
- data/lib/stcloud/api/reset_password_api.rb +0 -76
- data/lib/stcloud/api/subscriptions_api.rb +0 -610
- data/lib/stcloud/api/tag_api_controller_api.rb +0 -250
- data/lib/stcloud/api/tokens_api_controller_api.rb +0 -324
- data/lib/stcloud/api_client.rb +0 -388
- data/lib/stcloud/api_error.rb +0 -57
- data/lib/stcloud/configuration.rb +0 -205
- data/lib/stcloud/models/alert_notification_request.rb +0 -235
- data/lib/stcloud/models/alert_rule.rb +0 -675
- data/lib/stcloud/models/alert_rule_schedule_time_range_dto.rb +0 -215
- data/lib/stcloud/models/alert_rule_schedule_weekday_dto.rb +0 -244
- data/lib/stcloud/models/app.rb +0 -489
- data/lib/stcloud/models/app_description.rb +0 -206
- data/lib/stcloud/models/app_metadata.rb +0 -291
- data/lib/stcloud/models/apps_response.rb +0 -235
- data/lib/stcloud/models/basic_auth_method_dto.rb +0 -249
- data/lib/stcloud/models/basic_organization_dto.rb +0 -269
- data/lib/stcloud/models/billing_info.rb +0 -224
- data/lib/stcloud/models/cloud_watch_settings.rb +0 -279
- data/lib/stcloud/models/create_app_info.rb +0 -242
- data/lib/stcloud/models/create_token_dto.rb +0 -224
- data/lib/stcloud/models/error.rb +0 -215
- data/lib/stcloud/models/filter_value.rb +0 -253
- data/lib/stcloud/models/generic_api_response.rb +0 -236
- data/lib/stcloud/models/invitation.rb +0 -348
- data/lib/stcloud/models/invoice_response.rb +0 -235
- data/lib/stcloud/models/notification_integration.rb +0 -347
- data/lib/stcloud/models/plan.rb +0 -360
- data/lib/stcloud/models/report_info.rb +0 -270
- data/lib/stcloud/models/service_integration.rb +0 -305
- data/lib/stcloud/models/subscription_dashboard_dto.rb +0 -342
- data/lib/stcloud/models/subscription_dto.rb +0 -351
- data/lib/stcloud/models/tokens_response.rb +0 -235
- data/lib/stcloud/models/update_app_info.rb +0 -312
- data/lib/stcloud/models/update_subscription_dto.rb +0 -206
- data/lib/stcloud/models/update_token_dto.rb +0 -215
- data/lib/stcloud/models/user_info.rb +0 -206
- data/lib/stcloud/models/user_permissions.rb +0 -224
- data/lib/stcloud/models/user_role.rb +0 -270
- data/lib/stcloud/version.rb +0 -14
- data/lib/stcloud.rb +0 -128
- data/spec/api/metrics_api_spec.rb +0 -83
- data/spec/api/saved_queries_api_spec.rb +0 -80
- data/spec/models/data_series_request_spec.rb +0 -81
- 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.
|
9
|
+
Swagger Codegen version: 3.0.34
|
10
10
|
=end
|
11
11
|
|
12
12
|
require 'date'
|
13
13
|
|
14
|
-
module
|
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 `
|
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 `
|
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
|
-
|
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:
|
10
|
-
|
9
|
+
Swagger Codegen version: 3.0.34
|
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.
|
84
|
+
def self.openapi_types
|
86
85
|
{
|
87
|
-
:'app_type' => :'
|
88
|
-
:'custom' => :'
|
89
|
-
:'data_retention_hours' => :'
|
90
|
-
:'default_trial_plan' => :'
|
91
|
-
:'free' => :'
|
92
|
-
:'free_trial_days' => :'
|
93
|
-
:'id' => :'
|
94
|
-
:'max_alerts' => :'
|
95
|
-
:'max_daily_events' => :'
|
96
|
-
:'name' => :'
|
97
|
-
:'plan_scheme' => :'
|
98
|
-
:'sematext_service' => :'
|
99
|
-
:'trial_plan' => :'
|
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
|
-
|
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|
|
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.
|
112
|
-
self.app_type = attributes[:'
|
123
|
+
if attributes.key?(:'app_type')
|
124
|
+
self.app_type = attributes[:'app_type']
|
113
125
|
end
|
114
126
|
|
115
|
-
if attributes.
|
127
|
+
if attributes.key?(:'custom')
|
116
128
|
self.custom = attributes[:'custom']
|
117
129
|
end
|
118
130
|
|
119
|
-
if attributes.
|
120
|
-
self.data_retention_hours = attributes[:'
|
131
|
+
if attributes.key?(:'data_retention_hours')
|
132
|
+
self.data_retention_hours = attributes[:'data_retention_hours']
|
121
133
|
end
|
122
134
|
|
123
|
-
if attributes.
|
124
|
-
self.default_trial_plan = attributes[:'
|
135
|
+
if attributes.key?(:'default_trial_plan')
|
136
|
+
self.default_trial_plan = attributes[:'default_trial_plan']
|
125
137
|
end
|
126
138
|
|
127
|
-
if attributes.
|
139
|
+
if attributes.key?(:'free')
|
128
140
|
self.free = attributes[:'free']
|
129
141
|
end
|
130
142
|
|
131
|
-
if attributes.
|
132
|
-
self.free_trial_days = attributes[:'
|
143
|
+
if attributes.key?(:'free_trial_days')
|
144
|
+
self.free_trial_days = attributes[:'free_trial_days']
|
133
145
|
end
|
134
146
|
|
135
|
-
if attributes.
|
147
|
+
if attributes.key?(:'id')
|
136
148
|
self.id = attributes[:'id']
|
137
149
|
end
|
138
150
|
|
139
|
-
if attributes.
|
140
|
-
self.max_alerts = attributes[:'
|
151
|
+
if attributes.key?(:'max_alerts')
|
152
|
+
self.max_alerts = attributes[:'max_alerts']
|
141
153
|
end
|
142
154
|
|
143
|
-
if attributes.
|
144
|
-
self.max_daily_events = attributes[:'
|
155
|
+
if attributes.key?(:'max_daily_events')
|
156
|
+
self.max_daily_events = attributes[:'max_daily_events']
|
145
157
|
end
|
146
158
|
|
147
|
-
if attributes.
|
159
|
+
if attributes.key?(:'name')
|
148
160
|
self.name = attributes[:'name']
|
149
161
|
end
|
150
162
|
|
151
|
-
if attributes.
|
152
|
-
self.plan_scheme = attributes[:'
|
163
|
+
if attributes.key?(:'plan_scheme')
|
164
|
+
self.plan_scheme = attributes[:'plan_scheme']
|
153
165
|
end
|
154
166
|
|
155
|
-
if attributes.
|
156
|
-
self.sematext_service = attributes[:'
|
167
|
+
if attributes.key?(:'sematext_service')
|
168
|
+
self.sematext_service = attributes[:'sematext_service']
|
157
169
|
end
|
158
170
|
|
159
|
-
if attributes.
|
160
|
-
self.trial_plan = attributes[:'
|
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('
|
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('
|
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('
|
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,
|
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('
|
206
|
+
validator = EnumAttributeValidator.new('Object', ['LOGSENE', 'SPM', 'RUM', 'SYNTHETICS'])
|
195
207
|
unless validator.valid?(sematext_service)
|
196
|
-
fail ArgumentError,
|
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 [
|
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.
|
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
|
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
|
-
|
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 :
|
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
|
-
|
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
|
-
|
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.
|
9
|
+
Swagger Codegen version: 3.0.34
|
10
10
|
=end
|
11
11
|
|
12
12
|
require 'date'
|
13
13
|
|
14
|
-
module
|
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 `
|
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 `
|
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
|
-
|
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.
|
9
|
+
Swagger Codegen version: 3.0.34
|
10
10
|
=end
|
11
11
|
|
12
12
|
require 'date'
|
13
13
|
|
14
|
-
module
|
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 `
|
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 `
|
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
|
-
|
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:
|
10
|
-
|
9
|
+
Swagger Codegen version: 3.0.34
|
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.
|
51
|
+
def self.openapi_types
|
50
52
|
{
|
51
|
-
:'
|
52
|
-
:'
|
53
|
-
:'
|
54
|
-
:'
|
55
|
-
:'
|
56
|
-
:'
|
57
|
-
:'
|
58
|
-
:'
|
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
|
-
|
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|
|
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.
|
90
|
+
if attributes.key?(:'addresses')
|
71
91
|
self.addresses = attributes[:'addresses']
|
72
92
|
end
|
73
93
|
|
74
|
-
if attributes.
|
75
|
-
self.app_id = attributes[:'
|
94
|
+
if attributes.key?(:'app_id')
|
95
|
+
self.app_id = attributes[:'app_id']
|
76
96
|
end
|
77
97
|
|
78
|
-
if attributes.
|
79
|
-
self.end_date = attributes[:'
|
98
|
+
if attributes.key?(:'end_date')
|
99
|
+
self.end_date = attributes[:'end_date']
|
80
100
|
end
|
81
101
|
|
82
|
-
if attributes.
|
102
|
+
if attributes.key?(:'filters')
|
83
103
|
self.filters = attributes[:'filters']
|
84
104
|
end
|
85
105
|
|
86
|
-
if attributes.
|
87
|
-
self.report_name = attributes[:'
|
106
|
+
if attributes.key?(:'report_name')
|
107
|
+
self.report_name = attributes[:'report_name']
|
88
108
|
end
|
89
109
|
|
90
|
-
if attributes.
|
91
|
-
self.start_date = attributes[:'
|
110
|
+
if attributes.key?(:'start_date')
|
111
|
+
self.start_date = attributes[:'start_date']
|
92
112
|
end
|
93
113
|
|
94
|
-
if attributes.
|
114
|
+
if attributes.key?(:'subject')
|
95
115
|
self.subject = attributes[:'subject']
|
96
116
|
end
|
97
117
|
|
98
|
-
if attributes.
|
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 [
|
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.
|
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
|
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
|
-
|
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 :
|
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
|
-
|
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
|
-
|
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
|