SematextCloud 0.3.1 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- 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 +30 -28
- data/docs/AlertRule.md +2 -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 +55 -53
- 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 +85 -80
- data/docs/AppsResponse.md +2 -1
- data/docs/AppsResponseEntry.md +2 -1
- data/docs/AwsSettingsControllerApi.md +10 -8
- data/docs/BasicAuthMethodDto.md +2 -1
- data/docs/BasicOrganizationDto.md +2 -1
- data/docs/BillingApi.md +31 -29
- 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 +17 -15
- 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 +2 -1
- 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 +102 -99
- data/docs/SubscriptionsResponse.md +2 -1
- data/docs/SubscriptionsResponseEntry.md +2 -1
- data/docs/TagApiControllerApi.md +32 -30
- data/docs/TagNamesResponse.md +2 -1
- data/docs/TokenDto.md +2 -1
- data/docs/TokenResponse.md +2 -1
- data/docs/TokenResponseEntry.md +2 -1
- data/docs/TokensApiControllerApi.md +62 -60
- 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 +2 -1
- data/docs/UserRole.md +2 -1
- data/lib/SematextCloud/api/alert_notifications_api.rb +42 -37
- data/lib/SematextCloud/api/alerts_api.rb +81 -72
- data/lib/SematextCloud/api/apps_api.rb +125 -106
- data/lib/SematextCloud/api/aws_settings_controller_api.rb +26 -25
- data/lib/SematextCloud/api/billing_api.rb +51 -46
- 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 +23 -22
- data/lib/SematextCloud/api/reset_password_api.rb +21 -20
- data/lib/SematextCloud/api/subscriptions_api.rb +203 -172
- data/lib/SematextCloud/api/tag_api_controller_api.rb +53 -50
- data/lib/SematextCloud/api/tokens_api_controller_api.rb +84 -73
- 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 +175 -152
- 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/{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 +57 -7
- data/spec/api/alert_notifications_api_spec.rb +8 -8
- data/spec/api/alerts_api_spec.rb +8 -8
- data/spec/api/apps_api_spec.rb +10 -10
- data/spec/api/aws_settings_controller_api_spec.rb +4 -4
- 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 +6 -6
- data/spec/api/reset_password_api_spec.rb +4 -4
- data/spec/api/subscriptions_api_spec.rb +10 -10
- data/spec/api/tag_api_controller_api_spec.rb +6 -6
- data/spec/api/tokens_api_controller_api_spec.rb +12 -12
- 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 +4 -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/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 +55 -121
- 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_filter_spec.rb +0 -57
- data/spec/models/data_series_request_spec.rb +0 -81
- data/spec/models/saved_query_spec.rb +0 -113
@@ -1,249 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
#Sematext Cloud API
|
3
|
-
|
4
|
-
#API Explorer provides access and documentation for Sematext REST API. The REST API requires the API Key to be sent as part of `Authorization` header. E.g.: `Authorization : apiKey e5f18450-205a-48eb-8589-7d49edaea813`.
|
5
|
-
|
6
|
-
OpenAPI spec version: v3
|
7
|
-
|
8
|
-
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 3.0.25
|
10
|
-
=end
|
11
|
-
|
12
|
-
require 'date'
|
13
|
-
|
14
|
-
module stcloud
|
15
|
-
class BasicAuthMethodDto
|
16
|
-
attr_accessor :auth_type
|
17
|
-
|
18
|
-
attr_accessor :uuid
|
19
|
-
|
20
|
-
class EnumAttributeValidator
|
21
|
-
attr_reader :datatype
|
22
|
-
attr_reader :allowable_values
|
23
|
-
|
24
|
-
def initialize(datatype, allowable_values)
|
25
|
-
@allowable_values = allowable_values.map do |value|
|
26
|
-
case datatype.to_s
|
27
|
-
when /Integer/i
|
28
|
-
value.to_i
|
29
|
-
when /Float/i
|
30
|
-
value.to_f
|
31
|
-
else
|
32
|
-
value
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|
36
|
-
|
37
|
-
def valid?(value)
|
38
|
-
!value || allowable_values.include?(value)
|
39
|
-
end
|
40
|
-
end
|
41
|
-
|
42
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
43
|
-
def self.attribute_map
|
44
|
-
{
|
45
|
-
:'auth_type' => :'authType',
|
46
|
-
:'uuid' => :'uuid'
|
47
|
-
}
|
48
|
-
end
|
49
|
-
|
50
|
-
# Attribute type mapping.
|
51
|
-
def self.openapi_types
|
52
|
-
{
|
53
|
-
:'auth_type' => :'Object',
|
54
|
-
:'uuid' => :'Object'
|
55
|
-
}
|
56
|
-
end
|
57
|
-
|
58
|
-
# List of attributes with nullable: true
|
59
|
-
def self.openapi_nullable
|
60
|
-
Set.new([
|
61
|
-
])
|
62
|
-
end
|
63
|
-
|
64
|
-
# Initializes the object
|
65
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
66
|
-
def initialize(attributes = {})
|
67
|
-
if (!attributes.is_a?(Hash))
|
68
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `stcloud::BasicAuthMethodDto` initialize method"
|
69
|
-
end
|
70
|
-
|
71
|
-
# check to see if the attribute exists and convert string to symbol for hash key
|
72
|
-
attributes = attributes.each_with_object({}) { |(k, v), h|
|
73
|
-
if (!self.class.attribute_map.key?(k.to_sym))
|
74
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `stcloud::BasicAuthMethodDto`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
75
|
-
end
|
76
|
-
h[k.to_sym] = v
|
77
|
-
}
|
78
|
-
|
79
|
-
if attributes.key?(:'auth_type')
|
80
|
-
self.auth_type = attributes[:'auth_type']
|
81
|
-
end
|
82
|
-
|
83
|
-
if attributes.key?(:'uuid')
|
84
|
-
self.uuid = attributes[:'uuid']
|
85
|
-
end
|
86
|
-
end
|
87
|
-
|
88
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
89
|
-
# @return Array for valid properties with the reasons
|
90
|
-
def list_invalid_properties
|
91
|
-
invalid_properties = Array.new
|
92
|
-
invalid_properties
|
93
|
-
end
|
94
|
-
|
95
|
-
# Check to see if the all the properties in the model are valid
|
96
|
-
# @return true if the model is valid
|
97
|
-
def valid?
|
98
|
-
auth_type_validator = EnumAttributeValidator.new('Object', ['SEMATEXT_ACCOUNT', 'LDAP'])
|
99
|
-
return false unless auth_type_validator.valid?(@auth_type)
|
100
|
-
true
|
101
|
-
end
|
102
|
-
|
103
|
-
# Custom attribute writer method checking allowed values (enum).
|
104
|
-
# @param [Object] auth_type Object to be assigned
|
105
|
-
def auth_type=(auth_type)
|
106
|
-
validator = EnumAttributeValidator.new('Object', ['SEMATEXT_ACCOUNT', 'LDAP'])
|
107
|
-
unless validator.valid?(auth_type)
|
108
|
-
fail ArgumentError, "invalid value for \"auth_type\", must be one of #{validator.allowable_values}."
|
109
|
-
end
|
110
|
-
@auth_type = auth_type
|
111
|
-
end
|
112
|
-
|
113
|
-
# Checks equality by comparing each attribute.
|
114
|
-
# @param [Object] Object to be compared
|
115
|
-
def ==(o)
|
116
|
-
return true if self.equal?(o)
|
117
|
-
self.class == o.class &&
|
118
|
-
auth_type == o.auth_type &&
|
119
|
-
uuid == o.uuid
|
120
|
-
end
|
121
|
-
|
122
|
-
# @see the `==` method
|
123
|
-
# @param [Object] Object to be compared
|
124
|
-
def eql?(o)
|
125
|
-
self == o
|
126
|
-
end
|
127
|
-
|
128
|
-
# Calculates hash code according to all attributes.
|
129
|
-
# @return [Integer] Hash code
|
130
|
-
def hash
|
131
|
-
[auth_type, uuid].hash
|
132
|
-
end
|
133
|
-
|
134
|
-
# Builds the object from hash
|
135
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
136
|
-
# @return [Object] Returns the model itself
|
137
|
-
def self.build_from_hash(attributes)
|
138
|
-
new.build_from_hash(attributes)
|
139
|
-
end
|
140
|
-
|
141
|
-
# Builds the object from hash
|
142
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
143
|
-
# @return [Object] Returns the model itself
|
144
|
-
def build_from_hash(attributes)
|
145
|
-
return nil unless attributes.is_a?(Hash)
|
146
|
-
self.class.openapi_types.each_pair do |key, type|
|
147
|
-
if type =~ /\AArray<(.*)>/i
|
148
|
-
# check to ensure the input is an array given that the attribute
|
149
|
-
# is documented as an array but the input is not
|
150
|
-
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
151
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
152
|
-
end
|
153
|
-
elsif !attributes[self.class.attribute_map[key]].nil?
|
154
|
-
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
155
|
-
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
156
|
-
self.send("#{key}=", nil)
|
157
|
-
end
|
158
|
-
end
|
159
|
-
|
160
|
-
self
|
161
|
-
end
|
162
|
-
|
163
|
-
# Deserializes the data based on type
|
164
|
-
# @param string type Data type
|
165
|
-
# @param string value Value to be deserialized
|
166
|
-
# @return [Object] Deserialized data
|
167
|
-
def _deserialize(type, value)
|
168
|
-
case type.to_sym
|
169
|
-
when :DateTime
|
170
|
-
DateTime.parse(value)
|
171
|
-
when :Date
|
172
|
-
Date.parse(value)
|
173
|
-
when :String
|
174
|
-
value.to_s
|
175
|
-
when :Integer
|
176
|
-
value.to_i
|
177
|
-
when :Float
|
178
|
-
value.to_f
|
179
|
-
when :Boolean
|
180
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
181
|
-
true
|
182
|
-
else
|
183
|
-
false
|
184
|
-
end
|
185
|
-
when :Object
|
186
|
-
# generic object (usually a Hash), return directly
|
187
|
-
value
|
188
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
189
|
-
inner_type = Regexp.last_match[:inner_type]
|
190
|
-
value.map { |v| _deserialize(inner_type, v) }
|
191
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
192
|
-
k_type = Regexp.last_match[:k_type]
|
193
|
-
v_type = Regexp.last_match[:v_type]
|
194
|
-
{}.tap do |hash|
|
195
|
-
value.each do |k, v|
|
196
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
197
|
-
end
|
198
|
-
end
|
199
|
-
else # model
|
200
|
-
stcloud.const_get(type).build_from_hash(value)
|
201
|
-
end
|
202
|
-
end
|
203
|
-
|
204
|
-
# Returns the string representation of the object
|
205
|
-
# @return [String] String presentation of the object
|
206
|
-
def to_s
|
207
|
-
to_hash.to_s
|
208
|
-
end
|
209
|
-
|
210
|
-
# to_body is an alias to to_hash (backward compatibility)
|
211
|
-
# @return [Hash] Returns the object in the form of hash
|
212
|
-
def to_body
|
213
|
-
to_hash
|
214
|
-
end
|
215
|
-
|
216
|
-
# Returns the object in the form of hash
|
217
|
-
# @return [Hash] Returns the object in the form of hash
|
218
|
-
def to_hash
|
219
|
-
hash = {}
|
220
|
-
self.class.attribute_map.each_pair do |attr, param|
|
221
|
-
value = self.send(attr)
|
222
|
-
if value.nil?
|
223
|
-
is_nullable = self.class.openapi_nullable.include?(attr)
|
224
|
-
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
225
|
-
end
|
226
|
-
|
227
|
-
hash[param] = _to_hash(value)
|
228
|
-
end
|
229
|
-
hash
|
230
|
-
end
|
231
|
-
|
232
|
-
# Outputs non-array value in the form of hash
|
233
|
-
# For object, use to_hash. Otherwise, just return the value
|
234
|
-
# @param [Object] value Any valid value
|
235
|
-
# @return [Hash] Returns the value in the form of hash
|
236
|
-
def _to_hash(value)
|
237
|
-
if value.is_a?(Array)
|
238
|
-
value.compact.map { |v| _to_hash(v) }
|
239
|
-
elsif value.is_a?(Hash)
|
240
|
-
{}.tap do |hash|
|
241
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
242
|
-
end
|
243
|
-
elsif value.respond_to? :to_hash
|
244
|
-
value.to_hash
|
245
|
-
else
|
246
|
-
value
|
247
|
-
end
|
248
|
-
end end
|
249
|
-
end
|
@@ -1,269 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
#Sematext Cloud API
|
3
|
-
|
4
|
-
#API Explorer provides access and documentation for Sematext REST API. The REST API requires the API Key to be sent as part of `Authorization` header. E.g.: `Authorization : apiKey e5f18450-205a-48eb-8589-7d49edaea813`.
|
5
|
-
|
6
|
-
OpenAPI spec version: v3
|
7
|
-
|
8
|
-
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 3.0.25
|
10
|
-
=end
|
11
|
-
|
12
|
-
require 'date'
|
13
|
-
|
14
|
-
module stcloud
|
15
|
-
class BasicOrganizationDto
|
16
|
-
attr_accessor :auth_methods
|
17
|
-
|
18
|
-
attr_accessor :name
|
19
|
-
|
20
|
-
attr_accessor :status
|
21
|
-
|
22
|
-
attr_accessor :uuid
|
23
|
-
|
24
|
-
class EnumAttributeValidator
|
25
|
-
attr_reader :datatype
|
26
|
-
attr_reader :allowable_values
|
27
|
-
|
28
|
-
def initialize(datatype, allowable_values)
|
29
|
-
@allowable_values = allowable_values.map do |value|
|
30
|
-
case datatype.to_s
|
31
|
-
when /Integer/i
|
32
|
-
value.to_i
|
33
|
-
when /Float/i
|
34
|
-
value.to_f
|
35
|
-
else
|
36
|
-
value
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
40
|
-
|
41
|
-
def valid?(value)
|
42
|
-
!value || allowable_values.include?(value)
|
43
|
-
end
|
44
|
-
end
|
45
|
-
|
46
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
47
|
-
def self.attribute_map
|
48
|
-
{
|
49
|
-
:'auth_methods' => :'authMethods',
|
50
|
-
:'name' => :'name',
|
51
|
-
:'status' => :'status',
|
52
|
-
:'uuid' => :'uuid'
|
53
|
-
}
|
54
|
-
end
|
55
|
-
|
56
|
-
# Attribute type mapping.
|
57
|
-
def self.openapi_types
|
58
|
-
{
|
59
|
-
:'auth_methods' => :'Object',
|
60
|
-
:'name' => :'Object',
|
61
|
-
:'status' => :'Object',
|
62
|
-
:'uuid' => :'Object'
|
63
|
-
}
|
64
|
-
end
|
65
|
-
|
66
|
-
# List of attributes with nullable: true
|
67
|
-
def self.openapi_nullable
|
68
|
-
Set.new([
|
69
|
-
])
|
70
|
-
end
|
71
|
-
|
72
|
-
# Initializes the object
|
73
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
74
|
-
def initialize(attributes = {})
|
75
|
-
if (!attributes.is_a?(Hash))
|
76
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `stcloud::BasicOrganizationDto` initialize method"
|
77
|
-
end
|
78
|
-
|
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 `stcloud::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
|
-
}
|
86
|
-
|
87
|
-
if attributes.key?(:'auth_methods')
|
88
|
-
if (value = attributes[:'auth_methods']).is_a?(Array)
|
89
|
-
self.auth_methods = value
|
90
|
-
end
|
91
|
-
end
|
92
|
-
|
93
|
-
if attributes.key?(:'name')
|
94
|
-
self.name = attributes[:'name']
|
95
|
-
end
|
96
|
-
|
97
|
-
if attributes.key?(:'status')
|
98
|
-
self.status = attributes[:'status']
|
99
|
-
end
|
100
|
-
|
101
|
-
if attributes.key?(:'uuid')
|
102
|
-
self.uuid = attributes[:'uuid']
|
103
|
-
end
|
104
|
-
end
|
105
|
-
|
106
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
107
|
-
# @return Array for valid properties with the reasons
|
108
|
-
def list_invalid_properties
|
109
|
-
invalid_properties = Array.new
|
110
|
-
invalid_properties
|
111
|
-
end
|
112
|
-
|
113
|
-
# Check to see if the all the properties in the model are valid
|
114
|
-
# @return true if the model is valid
|
115
|
-
def valid?
|
116
|
-
status_validator = EnumAttributeValidator.new('Object', ['ACTIVE', 'IN_REGISTRATION', 'DISABLED', 'EXPIRED', 'INVITED', 'DEMO'])
|
117
|
-
return false unless status_validator.valid?(@status)
|
118
|
-
true
|
119
|
-
end
|
120
|
-
|
121
|
-
# Custom attribute writer method checking allowed values (enum).
|
122
|
-
# @param [Object] status Object to be assigned
|
123
|
-
def status=(status)
|
124
|
-
validator = EnumAttributeValidator.new('Object', ['ACTIVE', 'IN_REGISTRATION', 'DISABLED', 'EXPIRED', 'INVITED', 'DEMO'])
|
125
|
-
unless validator.valid?(status)
|
126
|
-
fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
|
127
|
-
end
|
128
|
-
@status = status
|
129
|
-
end
|
130
|
-
|
131
|
-
# Checks equality by comparing each attribute.
|
132
|
-
# @param [Object] Object to be compared
|
133
|
-
def ==(o)
|
134
|
-
return true if self.equal?(o)
|
135
|
-
self.class == o.class &&
|
136
|
-
auth_methods == o.auth_methods &&
|
137
|
-
name == o.name &&
|
138
|
-
status == o.status &&
|
139
|
-
uuid == o.uuid
|
140
|
-
end
|
141
|
-
|
142
|
-
# @see the `==` method
|
143
|
-
# @param [Object] Object to be compared
|
144
|
-
def eql?(o)
|
145
|
-
self == o
|
146
|
-
end
|
147
|
-
|
148
|
-
# Calculates hash code according to all attributes.
|
149
|
-
# @return [Integer] Hash code
|
150
|
-
def hash
|
151
|
-
[auth_methods, name, status, uuid].hash
|
152
|
-
end
|
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
|
-
|
161
|
-
# Builds the object from hash
|
162
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
163
|
-
# @return [Object] Returns the model itself
|
164
|
-
def build_from_hash(attributes)
|
165
|
-
return nil unless attributes.is_a?(Hash)
|
166
|
-
self.class.openapi_types.each_pair do |key, type|
|
167
|
-
if type =~ /\AArray<(.*)>/i
|
168
|
-
# check to ensure the input is an array given that the attribute
|
169
|
-
# is documented as an array but the input is not
|
170
|
-
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
171
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
172
|
-
end
|
173
|
-
elsif !attributes[self.class.attribute_map[key]].nil?
|
174
|
-
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
175
|
-
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
176
|
-
self.send("#{key}=", nil)
|
177
|
-
end
|
178
|
-
end
|
179
|
-
|
180
|
-
self
|
181
|
-
end
|
182
|
-
|
183
|
-
# Deserializes the data based on type
|
184
|
-
# @param string type Data type
|
185
|
-
# @param string value Value to be deserialized
|
186
|
-
# @return [Object] Deserialized data
|
187
|
-
def _deserialize(type, value)
|
188
|
-
case type.to_sym
|
189
|
-
when :DateTime
|
190
|
-
DateTime.parse(value)
|
191
|
-
when :Date
|
192
|
-
Date.parse(value)
|
193
|
-
when :String
|
194
|
-
value.to_s
|
195
|
-
when :Integer
|
196
|
-
value.to_i
|
197
|
-
when :Float
|
198
|
-
value.to_f
|
199
|
-
when :Boolean
|
200
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
201
|
-
true
|
202
|
-
else
|
203
|
-
false
|
204
|
-
end
|
205
|
-
when :Object
|
206
|
-
# generic object (usually a Hash), return directly
|
207
|
-
value
|
208
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
209
|
-
inner_type = Regexp.last_match[:inner_type]
|
210
|
-
value.map { |v| _deserialize(inner_type, v) }
|
211
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
212
|
-
k_type = Regexp.last_match[:k_type]
|
213
|
-
v_type = Regexp.last_match[:v_type]
|
214
|
-
{}.tap do |hash|
|
215
|
-
value.each do |k, v|
|
216
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
217
|
-
end
|
218
|
-
end
|
219
|
-
else # model
|
220
|
-
stcloud.const_get(type).build_from_hash(value)
|
221
|
-
end
|
222
|
-
end
|
223
|
-
|
224
|
-
# Returns the string representation of the object
|
225
|
-
# @return [String] String presentation of the object
|
226
|
-
def to_s
|
227
|
-
to_hash.to_s
|
228
|
-
end
|
229
|
-
|
230
|
-
# to_body is an alias to to_hash (backward compatibility)
|
231
|
-
# @return [Hash] Returns the object in the form of hash
|
232
|
-
def to_body
|
233
|
-
to_hash
|
234
|
-
end
|
235
|
-
|
236
|
-
# Returns the object in the form of hash
|
237
|
-
# @return [Hash] Returns the object in the form of hash
|
238
|
-
def to_hash
|
239
|
-
hash = {}
|
240
|
-
self.class.attribute_map.each_pair do |attr, param|
|
241
|
-
value = self.send(attr)
|
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
|
-
|
247
|
-
hash[param] = _to_hash(value)
|
248
|
-
end
|
249
|
-
hash
|
250
|
-
end
|
251
|
-
|
252
|
-
# Outputs non-array value in the form of hash
|
253
|
-
# For object, use to_hash. Otherwise, just return the value
|
254
|
-
# @param [Object] value Any valid value
|
255
|
-
# @return [Hash] Returns the value in the form of hash
|
256
|
-
def _to_hash(value)
|
257
|
-
if value.is_a?(Array)
|
258
|
-
value.compact.map { |v| _to_hash(v) }
|
259
|
-
elsif value.is_a?(Hash)
|
260
|
-
{}.tap do |hash|
|
261
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
262
|
-
end
|
263
|
-
elsif value.respond_to? :to_hash
|
264
|
-
value.to_hash
|
265
|
-
else
|
266
|
-
value
|
267
|
-
end
|
268
|
-
end end
|
269
|
-
end
|