SematextCloud 0.1.5 → 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/Gemfile +3 -1
- data/Gemfile.lock +70 -0
- data/README.md +44 -55
- data/SematextCloud.gemspec +4 -11
- data/docs/AlertNotification.md +13 -0
- data/docs/AlertNotificationRequest.md +1 -0
- data/docs/AlertNotificationsApi.md +24 -26
- data/docs/AlertRule.md +1 -0
- data/docs/AlertRuleResponse.md +10 -0
- data/docs/AlertRuleResponseEntry.md +7 -0
- data/docs/AlertRuleScheduleTimeRangeDto.md +1 -0
- data/docs/AlertRuleScheduleWeekdayDto.md +1 -0
- data/docs/AlertRulesResponse.md +10 -0
- data/docs/AlertRulesResponseEntry.md +7 -0
- data/docs/AlertsApi.md +47 -51
- data/docs/App.md +2 -0
- data/docs/AppDescription.md +1 -0
- data/docs/AppMetadata.md +1 -0
- data/docs/AppResponse.md +10 -0
- data/docs/AppResponseEntry.md +7 -0
- data/docs/AppTypesResponse.md +10 -0
- data/docs/AppTypesResponseEntry.md +7 -0
- data/docs/AppsApi.md +120 -70
- data/docs/AppsResponse.md +10 -0
- data/docs/AppsResponseEntry.md +7 -0
- data/docs/AwsSettingsControllerApi.md +14 -15
- data/docs/BasicAuthMethodDto.md +1 -0
- data/docs/BasicOrganizationDto.md +1 -0
- data/docs/BillingApi.md +30 -35
- data/docs/BillingInfo.md +1 -0
- data/docs/ChargesDetailsResponseDto.md +13 -0
- data/docs/CloudWatchSettings.md +1 -0
- data/docs/CloudWatchSettingsResponse.md +10 -0
- data/docs/CloudWatchSettingsResponseEntry.md +7 -0
- data/docs/CreateAppInfo.md +8 -7
- data/docs/CreateTokenDto.md +3 -1
- data/docs/DailyDto.md +12 -0
- data/docs/DayUsageData.md +26 -0
- data/docs/Dimension.md +8 -0
- data/docs/Error.md +1 -0
- data/docs/EventDto.md +9 -0
- data/docs/FilterValue.md +1 -0
- data/docs/GenericApiResponse.md +7 -6
- data/docs/GenericMapBasedApiResponse.md +10 -0
- data/docs/Invitation.md +2 -1
- data/docs/Invoice.md +12 -0
- data/docs/InvoiceResponse.md +10 -0
- data/docs/InvoiceResponseEntry.md +7 -0
- data/docs/LimitChangeEventDTO.md +9 -0
- data/docs/LogsAppApi.md +12 -12
- data/docs/LogsUsageApiControllerApi.md +62 -0
- data/docs/MailReportResponse.md +10 -0
- data/docs/MailReportResponseResponseEntry.md +7 -0
- data/docs/MinPeriodFeePeriod.md +19 -0
- data/docs/MonitoringAppApi.md +16 -16
- data/docs/NotificationIntegration.md +1 -0
- data/docs/NotificationsResponse.md +10 -0
- data/docs/NotificationsResponseEntry.md +9 -0
- data/docs/Plan.md +16 -15
- data/docs/PlansResponse.md +10 -0
- data/docs/PlansResponseEntry.md +7 -0
- data/docs/ReportInfo.md +12 -10
- data/docs/ResetPasswordApi.md +12 -12
- data/docs/ServiceIntegration.md +1 -0
- data/docs/Subscription.md +22 -0
- data/docs/SubscriptionDashboardDto.md +2 -1
- data/docs/SubscriptionDto.md +17 -15
- data/docs/SubscriptionResponse.md +10 -0
- data/docs/SubscriptionResponseEntry.md +7 -0
- data/docs/SubscriptionsApi.md +160 -174
- data/docs/SubscriptionsResponse.md +10 -0
- data/docs/SubscriptionsResponseEntry.md +7 -0
- data/docs/TagApiControllerApi.md +28 -35
- data/docs/TagNamesResponse.md +7 -0
- data/docs/TokenDto.md +13 -0
- data/docs/TokenResponse.md +10 -0
- data/docs/TokenResponseEntry.md +7 -0
- data/docs/TokensApiControllerApi.md +72 -81
- data/docs/TokensResponse.md +10 -0
- data/docs/TokensResponseEntry.md +7 -0
- data/docs/UpdateAppInfo.md +2 -1
- data/docs/UpdatePlanResponse.md +10 -0
- data/docs/UpdatePlanResponseDto.md +8 -0
- data/docs/UpdatePlanResponseEntry.md +7 -0
- data/docs/UpdateSubscriptionDto.md +2 -1
- data/docs/UpdateTokenDto.md +3 -1
- data/docs/UsageDto.md +19 -0
- data/docs/UsageMultiResponse.md +10 -0
- data/docs/UsageMultiResponseEntry.md +7 -0
- data/docs/UsageResponse.md +10 -0
- data/docs/UsageResponseEntry.md +7 -0
- data/docs/UserInfo.md +1 -0
- data/docs/UserPermissions.md +1 -0
- data/docs/UserRole.md +1 -0
- 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/SematextCloud/api/logs_usage_api_controller_api.rb +86 -0
- 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 +98 -87
- 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/SematextCloud/models/alert_notification.rb +260 -0
- data/lib/SematextCloud/models/alert_notification_request.rb +49 -26
- data/lib/SematextCloud/models/alert_rule.rb +175 -152
- data/lib/SematextCloud/models/alert_rule_response.rb +235 -0
- data/lib/SematextCloud/models/alert_rule_response_entry.rb +206 -0
- 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/SematextCloud/models/alert_rules_response_entry.rb +208 -0
- 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/SematextCloud/models/app_response.rb +235 -0
- data/lib/SematextCloud/models/app_response_entry.rb +206 -0
- data/lib/SematextCloud/models/app_types_response.rb +235 -0
- data/lib/SematextCloud/models/app_types_response_entry.rb +208 -0
- data/lib/SematextCloud/models/apps_response.rb +235 -0
- data/lib/SematextCloud/models/apps_response_entry.rb +208 -0
- 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/SematextCloud/models/charges_details_response_dto.rb +298 -0
- data/lib/SematextCloud/models/cloud_watch_settings.rb +56 -33
- data/lib/SematextCloud/models/cloud_watch_settings_response.rb +235 -0
- data/lib/SematextCloud/models/cloud_watch_settings_response_entry.rb +206 -0
- data/lib/SematextCloud/models/create_app_info.rb +53 -31
- data/lib/SematextCloud/models/create_token_dto.rb +54 -22
- data/lib/SematextCloud/models/daily_dto.rb +251 -0
- data/lib/SematextCloud/models/day_usage_data.rb +411 -0
- data/lib/SematextCloud/models/{data_series_filter.rb → dimension.rb} +59 -69
- data/lib/SematextCloud/models/error.rb +43 -20
- data/lib/SematextCloud/models/{data_series_request.rb → event_dto.rb} +65 -90
- data/lib/SematextCloud/models/filter_value.rb +53 -30
- data/lib/SematextCloud/models/generic_api_response.rb +46 -24
- data/lib/SematextCloud/models/generic_map_based_api_response.rb +236 -0
- data/lib/SematextCloud/models/invitation.rb +74 -52
- data/lib/SematextCloud/models/invoice.rb +253 -0
- data/lib/SematextCloud/models/invoice_response.rb +235 -0
- data/lib/SematextCloud/models/invoice_response_entry.rb +206 -0
- data/lib/SematextCloud/models/limit_change_event_dto.rb +224 -0
- data/lib/SematextCloud/models/mail_report_response.rb +235 -0
- data/lib/SematextCloud/models/mail_report_response_response_entry.rb +206 -0
- data/lib/SematextCloud/models/min_period_fee_period.rb +314 -0
- data/lib/SematextCloud/models/notification_integration.rb +73 -50
- data/lib/SematextCloud/models/notifications_response.rb +235 -0
- data/lib/SematextCloud/models/notifications_response_entry.rb +226 -0
- data/lib/SematextCloud/models/plan.rb +80 -57
- data/lib/SematextCloud/models/plans_response.rb +235 -0
- data/lib/SematextCloud/models/plans_response_entry.rb +208 -0
- data/lib/SematextCloud/models/report_info.rb +69 -37
- data/lib/SematextCloud/models/service_integration.rb +71 -48
- data/lib/SematextCloud/models/subscription.rb +387 -0
- data/lib/SematextCloud/models/subscription_dashboard_dto.rb +72 -49
- data/lib/SematextCloud/models/subscription_dto.rb +85 -53
- data/lib/SematextCloud/models/subscription_response.rb +235 -0
- data/lib/SematextCloud/models/subscription_response_entry.rb +206 -0
- data/lib/SematextCloud/models/subscriptions_response.rb +235 -0
- data/lib/SematextCloud/models/subscriptions_response_entry.rb +208 -0
- data/lib/SematextCloud/models/tag_names_response.rb +213 -0
- data/lib/SematextCloud/models/{saved_query.rb → token_dto.rb} +78 -109
- data/lib/SematextCloud/models/token_response.rb +235 -0
- data/lib/SematextCloud/models/token_response_entry.rb +206 -0
- data/lib/SematextCloud/models/tokens_response.rb +235 -0
- data/lib/SematextCloud/models/tokens_response_entry.rb +208 -0
- data/lib/SematextCloud/models/update_app_info.rb +64 -41
- data/lib/SematextCloud/models/update_plan_response.rb +235 -0
- data/lib/SematextCloud/models/update_plan_response_dto.rb +217 -0
- data/lib/SematextCloud/models/update_plan_response_entry.rb +206 -0
- data/lib/SematextCloud/models/update_subscription_dto.rb +42 -19
- data/lib/SematextCloud/models/update_token_dto.rb +54 -22
- data/lib/SematextCloud/models/usage_dto.rb +320 -0
- data/lib/SematextCloud/models/usage_multi_response.rb +235 -0
- data/lib/SematextCloud/models/usage_multi_response_entry.rb +206 -0
- data/lib/SematextCloud/models/usage_response.rb +235 -0
- data/lib/SematextCloud/models/usage_response_entry.rb +206 -0
- 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 +5 -6
- data/spec/api/alerts_api_spec.rb +11 -12
- data/spec/api/apps_api_spec.rb +26 -16
- data/spec/api/aws_settings_controller_api_spec.rb +6 -7
- data/spec/api/billing_api_spec.rb +7 -8
- data/spec/api/logs_app_api_spec.rb +3 -4
- data/spec/api/logs_usage_api_controller_api_spec.rb +47 -0
- data/spec/api/monitoring_app_api_spec.rb +5 -6
- data/spec/api/reset_password_api_spec.rb +3 -4
- data/spec/api/subscriptions_api_spec.rb +103 -11
- data/spec/api/tag_api_controller_api_spec.rb +8 -9
- data/spec/api/tokens_api_controller_api_spec.rb +18 -19
- data/spec/api_client_spec.rb +1 -2
- data/spec/base_object_spec.rb +109 -0
- data/spec/configuration_spec.rb +4 -5
- data/spec/models/alert_notification_request_spec.rb +4 -5
- data/spec/models/alert_notification_spec.rb +76 -0
- data/spec/models/alert_rule_response_entry_spec.rb +40 -0
- data/spec/models/alert_rule_response_spec.rb +58 -0
- data/spec/models/alert_rule_schedule_time_range_dto_spec.rb +4 -5
- data/spec/models/alert_rule_schedule_weekday_dto_spec.rb +4 -5
- data/spec/models/alert_rule_spec.rb +4 -5
- data/spec/models/alert_rules_response_entry_spec.rb +40 -0
- data/spec/models/alert_rules_response_spec.rb +58 -0
- data/spec/models/app_description_spec.rb +4 -5
- data/spec/models/app_metadata_spec.rb +4 -5
- data/spec/models/app_response_entry_spec.rb +40 -0
- data/spec/models/app_response_spec.rb +58 -0
- data/spec/models/app_spec.rb +34 -5
- data/spec/models/app_types_response_entry_spec.rb +40 -0
- data/spec/models/app_types_response_spec.rb +58 -0
- data/spec/models/apps_response_entry_spec.rb +40 -0
- data/spec/models/apps_response_spec.rb +58 -0
- data/spec/models/basic_auth_method_dto_spec.rb +4 -5
- data/spec/models/basic_organization_dto_spec.rb +4 -5
- data/spec/models/billing_info_spec.rb +4 -5
- data/spec/models/{data_series_request_spec.rb → charges_details_response_dto_spec.rb} +18 -19
- data/spec/models/cloud_watch_settings_response_entry_spec.rb +40 -0
- data/spec/models/cloud_watch_settings_response_spec.rb +58 -0
- data/spec/models/cloud_watch_settings_spec.rb +4 -5
- data/spec/models/create_app_info_spec.rb +4 -5
- data/spec/models/create_token_dto_spec.rb +10 -5
- data/spec/models/daily_dto_spec.rb +70 -0
- data/spec/models/day_usage_data_spec.rb +158 -0
- data/spec/models/dimension_spec.rb +46 -0
- data/spec/models/error_spec.rb +4 -5
- data/spec/models/{data_series_filter_spec.rb → event_dto_spec.rb} +14 -15
- data/spec/models/filter_value_spec.rb +4 -5
- data/spec/models/generic_api_response_spec.rb +4 -5
- data/spec/models/generic_map_based_api_response_spec.rb +58 -0
- data/spec/models/invitation_spec.rb +4 -5
- data/spec/models/invoice_response_entry_spec.rb +40 -0
- data/spec/models/invoice_response_spec.rb +58 -0
- data/spec/models/invoice_spec.rb +70 -0
- data/spec/models/limit_change_event_dto_spec.rb +52 -0
- data/spec/models/mail_report_response_response_entry_spec.rb +40 -0
- data/spec/models/mail_report_response_spec.rb +58 -0
- data/spec/models/min_period_fee_period_spec.rb +112 -0
- data/spec/models/notification_integration_spec.rb +4 -5
- data/spec/models/notifications_response_entry_spec.rb +52 -0
- data/spec/models/notifications_response_spec.rb +58 -0
- data/spec/models/plan_spec.rb +5 -6
- data/spec/models/plans_response_entry_spec.rb +40 -0
- data/spec/models/plans_response_spec.rb +58 -0
- data/spec/models/report_info_spec.rb +10 -5
- data/spec/models/service_integration_spec.rb +4 -5
- data/spec/models/subscription_dashboard_dto_spec.rb +4 -5
- data/spec/models/subscription_dto_spec.rb +10 -5
- data/spec/models/subscription_response_entry_spec.rb +40 -0
- data/spec/models/subscription_response_spec.rb +58 -0
- data/spec/models/subscription_spec.rb +138 -0
- data/spec/models/subscriptions_response_entry_spec.rb +40 -0
- data/spec/models/subscriptions_response_spec.rb +58 -0
- data/spec/models/tag_names_response_spec.rb +40 -0
- data/spec/models/token_dto_spec.rb +76 -0
- data/spec/models/token_response_entry_spec.rb +40 -0
- data/spec/models/token_response_spec.rb +58 -0
- data/spec/models/tokens_response_entry_spec.rb +40 -0
- data/spec/models/tokens_response_spec.rb +58 -0
- data/spec/models/update_app_info_spec.rb +4 -5
- data/spec/models/update_plan_response_dto_spec.rb +46 -0
- data/spec/models/update_plan_response_entry_spec.rb +40 -0
- data/spec/models/update_plan_response_spec.rb +58 -0
- data/spec/models/update_subscription_dto_spec.rb +4 -5
- data/spec/models/update_token_dto_spec.rb +10 -5
- data/spec/models/{saved_query_spec.rb → usage_dto_spec.rb} +20 -21
- data/spec/models/usage_multi_response_entry_spec.rb +40 -0
- data/spec/models/usage_multi_response_spec.rb +58 -0
- data/spec/models/usage_response_entry_spec.rb +40 -0
- data/spec/models/usage_response_spec.rb +58 -0
- data/spec/models/user_info_spec.rb +4 -5
- data/spec/models/user_permissions_spec.rb +4 -5
- data/spec/models/user_role_spec.rb +4 -5
- data/spec/spec_helper.rb +1 -2
- metadata +235 -173
- 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/spec/api/metrics_api_spec.rb +0 -83
- data/spec/api/saved_queries_api_spec.rb +0 -80
@@ -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.30
|
11
10
|
=end
|
12
11
|
|
13
12
|
require 'date'
|
@@ -27,26 +26,39 @@ module SematextCloud
|
|
27
26
|
end
|
28
27
|
|
29
28
|
# Attribute type mapping.
|
30
|
-
def self.
|
29
|
+
def self.openapi_types
|
31
30
|
{
|
32
|
-
:'code' => :'
|
33
|
-
:'message' => :'
|
31
|
+
:'code' => :'Object',
|
32
|
+
:'message' => :'Object'
|
34
33
|
}
|
35
34
|
end
|
36
35
|
|
36
|
+
# List of attributes with nullable: true
|
37
|
+
def self.openapi_nullable
|
38
|
+
Set.new([
|
39
|
+
])
|
40
|
+
end
|
41
|
+
|
37
42
|
# Initializes the object
|
38
43
|
# @param [Hash] attributes Model attributes in the form of hash
|
39
44
|
def initialize(attributes = {})
|
40
|
-
|
45
|
+
if (!attributes.is_a?(Hash))
|
46
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `SematextCloud::Error` initialize method"
|
47
|
+
end
|
41
48
|
|
42
|
-
# convert string to symbol for hash key
|
43
|
-
attributes = attributes.each_with_object({}) { |(k, v), h|
|
49
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
50
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
51
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
52
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SematextCloud::Error`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
53
|
+
end
|
54
|
+
h[k.to_sym] = v
|
55
|
+
}
|
44
56
|
|
45
|
-
if attributes.
|
57
|
+
if attributes.key?(:'code')
|
46
58
|
self.code = attributes[:'code']
|
47
59
|
end
|
48
60
|
|
49
|
-
if attributes.
|
61
|
+
if attributes.key?(:'message')
|
50
62
|
self.message = attributes[:'message']
|
51
63
|
end
|
52
64
|
end
|
@@ -80,26 +92,35 @@ module SematextCloud
|
|
80
92
|
end
|
81
93
|
|
82
94
|
# Calculates hash code according to all attributes.
|
83
|
-
# @return [
|
95
|
+
# @return [Integer] Hash code
|
84
96
|
def hash
|
85
97
|
[code, message].hash
|
86
98
|
end
|
87
99
|
|
100
|
+
# Builds the object from hash
|
101
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
102
|
+
# @return [Object] Returns the model itself
|
103
|
+
def self.build_from_hash(attributes)
|
104
|
+
new.build_from_hash(attributes)
|
105
|
+
end
|
106
|
+
|
88
107
|
# Builds the object from hash
|
89
108
|
# @param [Hash] attributes Model attributes in the form of hash
|
90
109
|
# @return [Object] Returns the model itself
|
91
110
|
def build_from_hash(attributes)
|
92
111
|
return nil unless attributes.is_a?(Hash)
|
93
|
-
self.class.
|
112
|
+
self.class.openapi_types.each_pair do |key, type|
|
94
113
|
if type =~ /\AArray<(.*)>/i
|
95
|
-
# check to ensure the input is an array given that the
|
114
|
+
# check to ensure the input is an array given that the attribute
|
96
115
|
# is documented as an array but the input is not
|
97
116
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
98
117
|
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
99
118
|
end
|
100
119
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
101
120
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
102
|
-
|
121
|
+
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
122
|
+
self.send("#{key}=", nil)
|
123
|
+
end
|
103
124
|
end
|
104
125
|
|
105
126
|
self
|
@@ -121,7 +142,7 @@ module SematextCloud
|
|
121
142
|
value.to_i
|
122
143
|
when :Float
|
123
144
|
value.to_f
|
124
|
-
when :
|
145
|
+
when :Boolean
|
125
146
|
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
126
147
|
true
|
127
148
|
else
|
@@ -142,8 +163,7 @@ module SematextCloud
|
|
142
163
|
end
|
143
164
|
end
|
144
165
|
else # model
|
145
|
-
|
146
|
-
temp_model.build_from_hash(value)
|
166
|
+
SematextCloud.const_get(type).build_from_hash(value)
|
147
167
|
end
|
148
168
|
end
|
149
169
|
|
@@ -165,7 +185,11 @@ module SematextCloud
|
|
165
185
|
hash = {}
|
166
186
|
self.class.attribute_map.each_pair do |attr, param|
|
167
187
|
value = self.send(attr)
|
168
|
-
|
188
|
+
if value.nil?
|
189
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
190
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
191
|
+
end
|
192
|
+
|
169
193
|
hash[param] = _to_hash(value)
|
170
194
|
end
|
171
195
|
hash
|
@@ -187,6 +211,5 @@ module SematextCloud
|
|
187
211
|
else
|
188
212
|
value
|
189
213
|
end
|
190
|
-
end
|
191
|
-
end
|
214
|
+
end end
|
192
215
|
end
|
@@ -6,32 +6,18 @@
|
|
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.30
|
11
10
|
=end
|
12
11
|
|
13
12
|
require 'date'
|
14
13
|
|
15
14
|
module SematextCloud
|
16
|
-
class
|
17
|
-
attr_accessor :
|
18
|
-
|
19
|
-
# End time of interval. Can be expressed as timestamp in milliseconds or UTC date in yyyy-MM-dd HH:mm:ss format
|
20
|
-
attr_accessor :_end
|
21
|
-
|
22
|
-
# Map of allowed filter values and aggregation strategy. List of available filter values can be fetched using metric filters endpoint and default aggregation strategy depends on metric
|
23
|
-
attr_accessor :filters
|
24
|
-
|
25
|
-
# Data points interval granularity between two data points.Default value is \"AUTO\" - calculated based on selected time span. Not required while getting filters.
|
26
|
-
attr_accessor :granularity
|
15
|
+
class EventDto
|
16
|
+
attr_accessor :from
|
27
17
|
|
28
|
-
attr_accessor :
|
18
|
+
attr_accessor :to
|
29
19
|
|
30
|
-
|
31
|
-
attr_accessor :metric
|
32
|
-
|
33
|
-
# Start time of interval. Can be expressed as timestamp in milliseconds or UTC date in yyyy-MM-dd HH:mm:ss format
|
34
|
-
attr_accessor :start
|
20
|
+
attr_accessor :type
|
35
21
|
|
36
22
|
class EnumAttributeValidator
|
37
23
|
attr_reader :datatype
|
@@ -58,65 +44,52 @@ module SematextCloud
|
|
58
44
|
# Attribute mapping from ruby-style variable name to JSON key.
|
59
45
|
def self.attribute_map
|
60
46
|
{
|
61
|
-
:'
|
62
|
-
:'
|
63
|
-
:'
|
64
|
-
:'granularity' => :'granularity',
|
65
|
-
:'interval' => :'interval',
|
66
|
-
:'metric' => :'metric',
|
67
|
-
:'start' => :'start'
|
47
|
+
:'from' => :'from',
|
48
|
+
:'to' => :'to',
|
49
|
+
:'type' => :'type'
|
68
50
|
}
|
69
51
|
end
|
70
52
|
|
71
53
|
# Attribute type mapping.
|
72
|
-
def self.
|
54
|
+
def self.openapi_types
|
73
55
|
{
|
74
|
-
:'
|
75
|
-
:'
|
76
|
-
:'
|
77
|
-
:'granularity' => :'String',
|
78
|
-
:'interval' => :'String',
|
79
|
-
:'metric' => :'String',
|
80
|
-
:'start' => :'String'
|
56
|
+
:'from' => :'Object',
|
57
|
+
:'to' => :'Object',
|
58
|
+
:'type' => :'Object'
|
81
59
|
}
|
82
60
|
end
|
83
61
|
|
62
|
+
# List of attributes with nullable: true
|
63
|
+
def self.openapi_nullable
|
64
|
+
Set.new([
|
65
|
+
])
|
66
|
+
end
|
67
|
+
|
84
68
|
# Initializes the object
|
85
69
|
# @param [Hash] attributes Model attributes in the form of hash
|
86
70
|
def initialize(attributes = {})
|
87
|
-
|
88
|
-
|
89
|
-
# convert string to symbol for hash key
|
90
|
-
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
91
|
-
|
92
|
-
if attributes.has_key?(:'defaultInterval')
|
93
|
-
self.default_interval = attributes[:'defaultInterval']
|
94
|
-
end
|
95
|
-
|
96
|
-
if attributes.has_key?(:'end')
|
97
|
-
self._end = attributes[:'end']
|
71
|
+
if (!attributes.is_a?(Hash))
|
72
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `SematextCloud::EventDto` initialize method"
|
98
73
|
end
|
99
74
|
|
100
|
-
if
|
101
|
-
|
102
|
-
|
75
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
76
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
77
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
78
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SematextCloud::EventDto`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
103
79
|
end
|
104
|
-
|
105
|
-
|
106
|
-
if attributes.has_key?(:'granularity')
|
107
|
-
self.granularity = attributes[:'granularity']
|
108
|
-
end
|
80
|
+
h[k.to_sym] = v
|
81
|
+
}
|
109
82
|
|
110
|
-
if attributes.
|
111
|
-
self.
|
83
|
+
if attributes.key?(:'from')
|
84
|
+
self.from = attributes[:'from']
|
112
85
|
end
|
113
86
|
|
114
|
-
if attributes.
|
115
|
-
self.
|
87
|
+
if attributes.key?(:'to')
|
88
|
+
self.to = attributes[:'to']
|
116
89
|
end
|
117
90
|
|
118
|
-
if attributes.
|
119
|
-
self.
|
91
|
+
if attributes.key?(:'type')
|
92
|
+
self.type = attributes[:'type']
|
120
93
|
end
|
121
94
|
end
|
122
95
|
|
@@ -124,30 +97,25 @@ module SematextCloud
|
|
124
97
|
# @return Array for valid properties with the reasons
|
125
98
|
def list_invalid_properties
|
126
99
|
invalid_properties = Array.new
|
127
|
-
if @metric.nil?
|
128
|
-
invalid_properties.push('invalid value for "metric", metric cannot be nil.')
|
129
|
-
end
|
130
|
-
|
131
100
|
invalid_properties
|
132
101
|
end
|
133
102
|
|
134
103
|
# Check to see if the all the properties in the model are valid
|
135
104
|
# @return true if the model is valid
|
136
105
|
def valid?
|
137
|
-
|
138
|
-
return false unless
|
139
|
-
return false if @metric.nil?
|
106
|
+
type_validator = EnumAttributeValidator.new('Object', ['CREATED', 'DISABLED', 'DELETED', 'REACTIVATED', 'PLAN_UPDATE', 'PAYMENT_METHOD_UPDATE', 'SEND_EMAIL_CHANGE', 'AUTOMATIC_PLAN_UPGRADE_CHANGE', 'MAX_LIMIT_CHANGE', 'SAMPLING_CHANGE', 'OWNERSHIP_CHANGE', 'PIPELINE_CHANGE'])
|
107
|
+
return false unless type_validator.valid?(@type)
|
140
108
|
true
|
141
109
|
end
|
142
110
|
|
143
111
|
# Custom attribute writer method checking allowed values (enum).
|
144
|
-
# @param [Object]
|
145
|
-
def
|
146
|
-
validator = EnumAttributeValidator.new('
|
147
|
-
unless validator.valid?(
|
148
|
-
fail ArgumentError,
|
112
|
+
# @param [Object] type Object to be assigned
|
113
|
+
def type=(type)
|
114
|
+
validator = EnumAttributeValidator.new('Object', ['CREATED', 'DISABLED', 'DELETED', 'REACTIVATED', 'PLAN_UPDATE', 'PAYMENT_METHOD_UPDATE', 'SEND_EMAIL_CHANGE', 'AUTOMATIC_PLAN_UPGRADE_CHANGE', 'MAX_LIMIT_CHANGE', 'SAMPLING_CHANGE', 'OWNERSHIP_CHANGE', 'PIPELINE_CHANGE'])
|
115
|
+
unless validator.valid?(type)
|
116
|
+
fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
|
149
117
|
end
|
150
|
-
@
|
118
|
+
@type = type
|
151
119
|
end
|
152
120
|
|
153
121
|
# Checks equality by comparing each attribute.
|
@@ -155,13 +123,9 @@ module SematextCloud
|
|
155
123
|
def ==(o)
|
156
124
|
return true if self.equal?(o)
|
157
125
|
self.class == o.class &&
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
granularity == o.granularity &&
|
162
|
-
interval == o.interval &&
|
163
|
-
metric == o.metric &&
|
164
|
-
start == o.start
|
126
|
+
from == o.from &&
|
127
|
+
to == o.to &&
|
128
|
+
type == o.type
|
165
129
|
end
|
166
130
|
|
167
131
|
# @see the `==` method
|
@@ -171,9 +135,16 @@ module SematextCloud
|
|
171
135
|
end
|
172
136
|
|
173
137
|
# Calculates hash code according to all attributes.
|
174
|
-
# @return [
|
138
|
+
# @return [Integer] Hash code
|
175
139
|
def hash
|
176
|
-
[
|
140
|
+
[from, to, type].hash
|
141
|
+
end
|
142
|
+
|
143
|
+
# Builds the object from hash
|
144
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
145
|
+
# @return [Object] Returns the model itself
|
146
|
+
def self.build_from_hash(attributes)
|
147
|
+
new.build_from_hash(attributes)
|
177
148
|
end
|
178
149
|
|
179
150
|
# Builds the object from hash
|
@@ -181,16 +152,18 @@ module SematextCloud
|
|
181
152
|
# @return [Object] Returns the model itself
|
182
153
|
def build_from_hash(attributes)
|
183
154
|
return nil unless attributes.is_a?(Hash)
|
184
|
-
self.class.
|
155
|
+
self.class.openapi_types.each_pair do |key, type|
|
185
156
|
if type =~ /\AArray<(.*)>/i
|
186
|
-
# check to ensure the input is an array given that the
|
157
|
+
# check to ensure the input is an array given that the attribute
|
187
158
|
# is documented as an array but the input is not
|
188
159
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
189
160
|
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
190
161
|
end
|
191
162
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
192
163
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
193
|
-
|
164
|
+
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
165
|
+
self.send("#{key}=", nil)
|
166
|
+
end
|
194
167
|
end
|
195
168
|
|
196
169
|
self
|
@@ -212,7 +185,7 @@ module SematextCloud
|
|
212
185
|
value.to_i
|
213
186
|
when :Float
|
214
187
|
value.to_f
|
215
|
-
when :
|
188
|
+
when :Boolean
|
216
189
|
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
217
190
|
true
|
218
191
|
else
|
@@ -233,8 +206,7 @@ module SematextCloud
|
|
233
206
|
end
|
234
207
|
end
|
235
208
|
else # model
|
236
|
-
|
237
|
-
temp_model.build_from_hash(value)
|
209
|
+
SematextCloud.const_get(type).build_from_hash(value)
|
238
210
|
end
|
239
211
|
end
|
240
212
|
|
@@ -256,7 +228,11 @@ module SematextCloud
|
|
256
228
|
hash = {}
|
257
229
|
self.class.attribute_map.each_pair do |attr, param|
|
258
230
|
value = self.send(attr)
|
259
|
-
|
231
|
+
if value.nil?
|
232
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
233
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
234
|
+
end
|
235
|
+
|
260
236
|
hash[param] = _to_hash(value)
|
261
237
|
end
|
262
238
|
hash
|
@@ -278,6 +254,5 @@ module SematextCloud
|
|
278
254
|
else
|
279
255
|
value
|
280
256
|
end
|
281
|
-
end
|
282
|
-
end
|
257
|
+
end end
|
283
258
|
end
|
@@ -6,8 +6,7 @@
|
|
6
6
|
OpenAPI spec version: v3
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version:
|
10
|
-
|
9
|
+
Swagger Codegen version: 3.0.30
|
11
10
|
=end
|
12
11
|
|
13
12
|
require 'date'
|
@@ -39,46 +38,59 @@ module SematextCloud
|
|
39
38
|
end
|
40
39
|
|
41
40
|
# Attribute type mapping.
|
42
|
-
def self.
|
41
|
+
def self.openapi_types
|
43
42
|
{
|
44
|
-
:'agg_type' => :'
|
45
|
-
:'filter_name' => :'
|
46
|
-
:'key' => :'
|
47
|
-
:'label' => :'
|
48
|
-
:'name' => :'
|
49
|
-
:'values' => :'
|
43
|
+
:'agg_type' => :'Object',
|
44
|
+
:'filter_name' => :'Object',
|
45
|
+
:'key' => :'Object',
|
46
|
+
:'label' => :'Object',
|
47
|
+
:'name' => :'Object',
|
48
|
+
:'values' => :'Object'
|
50
49
|
}
|
51
50
|
end
|
52
51
|
|
52
|
+
# List of attributes with nullable: true
|
53
|
+
def self.openapi_nullable
|
54
|
+
Set.new([
|
55
|
+
])
|
56
|
+
end
|
57
|
+
|
53
58
|
# Initializes the object
|
54
59
|
# @param [Hash] attributes Model attributes in the form of hash
|
55
60
|
def initialize(attributes = {})
|
56
|
-
|
61
|
+
if (!attributes.is_a?(Hash))
|
62
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `SematextCloud::FilterValue` initialize method"
|
63
|
+
end
|
57
64
|
|
58
|
-
# convert string to symbol for hash key
|
59
|
-
attributes = attributes.each_with_object({}) { |(k, v), h|
|
65
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
66
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
67
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
68
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SematextCloud::FilterValue`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
69
|
+
end
|
70
|
+
h[k.to_sym] = v
|
71
|
+
}
|
60
72
|
|
61
|
-
if attributes.
|
62
|
-
self.agg_type = attributes[:'
|
73
|
+
if attributes.key?(:'agg_type')
|
74
|
+
self.agg_type = attributes[:'agg_type']
|
63
75
|
end
|
64
76
|
|
65
|
-
if attributes.
|
66
|
-
self.filter_name = attributes[:'
|
77
|
+
if attributes.key?(:'filter_name')
|
78
|
+
self.filter_name = attributes[:'filter_name']
|
67
79
|
end
|
68
80
|
|
69
|
-
if attributes.
|
81
|
+
if attributes.key?(:'key')
|
70
82
|
self.key = attributes[:'key']
|
71
83
|
end
|
72
84
|
|
73
|
-
if attributes.
|
85
|
+
if attributes.key?(:'label')
|
74
86
|
self.label = attributes[:'label']
|
75
87
|
end
|
76
88
|
|
77
|
-
if attributes.
|
89
|
+
if attributes.key?(:'name')
|
78
90
|
self.name = attributes[:'name']
|
79
91
|
end
|
80
92
|
|
81
|
-
if attributes.
|
93
|
+
if attributes.key?(:'values')
|
82
94
|
if (value = attributes[:'values']).is_a?(Array)
|
83
95
|
self.values = value
|
84
96
|
end
|
@@ -118,26 +130,35 @@ module SematextCloud
|
|
118
130
|
end
|
119
131
|
|
120
132
|
# Calculates hash code according to all attributes.
|
121
|
-
# @return [
|
133
|
+
# @return [Integer] Hash code
|
122
134
|
def hash
|
123
135
|
[agg_type, filter_name, key, label, name, values].hash
|
124
136
|
end
|
125
137
|
|
138
|
+
# Builds the object from hash
|
139
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
140
|
+
# @return [Object] Returns the model itself
|
141
|
+
def self.build_from_hash(attributes)
|
142
|
+
new.build_from_hash(attributes)
|
143
|
+
end
|
144
|
+
|
126
145
|
# Builds the object from hash
|
127
146
|
# @param [Hash] attributes Model attributes in the form of hash
|
128
147
|
# @return [Object] Returns the model itself
|
129
148
|
def build_from_hash(attributes)
|
130
149
|
return nil unless attributes.is_a?(Hash)
|
131
|
-
self.class.
|
150
|
+
self.class.openapi_types.each_pair do |key, type|
|
132
151
|
if type =~ /\AArray<(.*)>/i
|
133
|
-
# check to ensure the input is an array given that the
|
152
|
+
# check to ensure the input is an array given that the attribute
|
134
153
|
# is documented as an array but the input is not
|
135
154
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
136
155
|
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
137
156
|
end
|
138
157
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
139
158
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
140
|
-
|
159
|
+
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
160
|
+
self.send("#{key}=", nil)
|
161
|
+
end
|
141
162
|
end
|
142
163
|
|
143
164
|
self
|
@@ -159,7 +180,7 @@ module SematextCloud
|
|
159
180
|
value.to_i
|
160
181
|
when :Float
|
161
182
|
value.to_f
|
162
|
-
when :
|
183
|
+
when :Boolean
|
163
184
|
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
164
185
|
true
|
165
186
|
else
|
@@ -180,8 +201,7 @@ module SematextCloud
|
|
180
201
|
end
|
181
202
|
end
|
182
203
|
else # model
|
183
|
-
|
184
|
-
temp_model.build_from_hash(value)
|
204
|
+
SematextCloud.const_get(type).build_from_hash(value)
|
185
205
|
end
|
186
206
|
end
|
187
207
|
|
@@ -203,7 +223,11 @@ module SematextCloud
|
|
203
223
|
hash = {}
|
204
224
|
self.class.attribute_map.each_pair do |attr, param|
|
205
225
|
value = self.send(attr)
|
206
|
-
|
226
|
+
if value.nil?
|
227
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
228
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
229
|
+
end
|
230
|
+
|
207
231
|
hash[param] = _to_hash(value)
|
208
232
|
end
|
209
233
|
hash
|
@@ -225,6 +249,5 @@ module SematextCloud
|
|
225
249
|
else
|
226
250
|
value
|
227
251
|
end
|
228
|
-
end
|
229
|
-
end
|
252
|
+
end end
|
230
253
|
end
|