SematextCloud 0.4.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (210) hide show
  1. checksums.yaml +4 -4
  2. data/docs/AlertNotificationsApi.md +12 -12
  3. data/docs/AlertRule.md +1 -0
  4. data/docs/AlertsApi.md +15 -15
  5. data/docs/AppsApi.md +20 -20
  6. data/docs/AwsSettingsControllerApi.md +7 -7
  7. data/docs/BillingApi.md +10 -10
  8. data/docs/MonitoringAppApi.md +7 -7
  9. data/docs/PlansResponseEntry.md +1 -1
  10. data/docs/ServiceIntegration.md +14 -14
  11. data/docs/SubscriptionsApi.md +40 -40
  12. data/docs/TagApiControllerApi.md +72 -5
  13. data/docs/TagsGrouped.md +8 -0
  14. data/docs/TagsGroupedResponse.md +7 -0
  15. data/docs/TokensApiControllerApi.md +15 -15
  16. data/docs/UserPermissions.md +5 -5
  17. data/docs/UserRole.md +5 -5
  18. data/lib/SematextCloud/api/alert_notifications_api.rb +14 -14
  19. data/lib/SematextCloud/api/alerts_api.rb +13 -13
  20. data/lib/SematextCloud/api/apps_api.rb +25 -25
  21. data/lib/SematextCloud/api/aws_settings_controller_api.rb +8 -8
  22. data/lib/SematextCloud/api/billing_api.rb +16 -16
  23. data/lib/SematextCloud/api/logs_app_api.rb +1 -1
  24. data/lib/SematextCloud/api/logs_usage_api_controller_api.rb +1 -1
  25. data/lib/SematextCloud/api/monitoring_app_api.rb +7 -7
  26. data/lib/SematextCloud/api/reset_password_api.rb +1 -1
  27. data/lib/SematextCloud/api/subscriptions_api.rb +48 -48
  28. data/lib/SematextCloud/api/tag_api_controller_api.rb +80 -1
  29. data/lib/SematextCloud/api/tokens_api_controller_api.rb +14 -14
  30. data/lib/SematextCloud/api_client.rb +1 -1
  31. data/lib/SematextCloud/api_error.rb +1 -1
  32. data/lib/SematextCloud/configuration.rb +1 -1
  33. data/lib/SematextCloud/models/alert_notification.rb +1 -1
  34. data/lib/SematextCloud/models/alert_notification_request.rb +1 -1
  35. data/lib/SematextCloud/models/alert_rule.rb +23 -2
  36. data/lib/SematextCloud/models/alert_rule_response.rb +1 -1
  37. data/lib/SematextCloud/models/alert_rule_response_entry.rb +1 -1
  38. data/lib/SematextCloud/models/alert_rule_schedule_time_range_dto.rb +1 -1
  39. data/lib/SematextCloud/models/alert_rule_schedule_weekday_dto.rb +1 -1
  40. data/lib/SematextCloud/models/alert_rules_response.rb +1 -1
  41. data/lib/SematextCloud/models/alert_rules_response_entry.rb +1 -1
  42. data/lib/SematextCloud/models/app.rb +1 -1
  43. data/lib/SematextCloud/models/app_description.rb +1 -1
  44. data/lib/SematextCloud/models/app_metadata.rb +1 -1
  45. data/lib/SematextCloud/models/app_response.rb +1 -1
  46. data/lib/SematextCloud/models/app_response_entry.rb +1 -1
  47. data/lib/SematextCloud/models/app_types_response.rb +1 -1
  48. data/lib/SematextCloud/models/app_types_response_entry.rb +1 -1
  49. data/lib/SematextCloud/models/apps_response.rb +1 -1
  50. data/lib/SematextCloud/models/apps_response_entry.rb +1 -1
  51. data/lib/SematextCloud/models/basic_auth_method_dto.rb +1 -1
  52. data/lib/SematextCloud/models/basic_organization_dto.rb +1 -1
  53. data/lib/SematextCloud/models/billing_info.rb +1 -1
  54. data/lib/SematextCloud/models/charges_details_response_dto.rb +1 -1
  55. data/lib/SematextCloud/models/cloud_watch_settings.rb +1 -1
  56. data/lib/SematextCloud/models/cloud_watch_settings_response.rb +1 -1
  57. data/lib/SematextCloud/models/cloud_watch_settings_response_entry.rb +1 -1
  58. data/lib/SematextCloud/models/create_app_info.rb +1 -1
  59. data/lib/SematextCloud/models/create_token_dto.rb +1 -1
  60. data/lib/SematextCloud/models/daily_dto.rb +1 -1
  61. data/lib/SematextCloud/models/day_usage_data.rb +1 -1
  62. data/lib/SematextCloud/models/dimension.rb +1 -1
  63. data/lib/SematextCloud/models/error.rb +1 -1
  64. data/lib/SematextCloud/models/event_dto.rb +1 -1
  65. data/lib/SematextCloud/models/filter_value.rb +1 -1
  66. data/lib/SematextCloud/models/generic_api_response.rb +1 -1
  67. data/lib/SematextCloud/models/generic_map_based_api_response.rb +1 -1
  68. data/lib/SematextCloud/models/invitation.rb +1 -1
  69. data/lib/SematextCloud/models/invoice.rb +1 -1
  70. data/lib/SematextCloud/models/invoice_response.rb +1 -1
  71. data/lib/SematextCloud/models/invoice_response_entry.rb +1 -1
  72. data/lib/SematextCloud/models/limit_change_event_dto.rb +1 -1
  73. data/lib/SematextCloud/models/mail_report_response.rb +1 -1
  74. data/lib/SematextCloud/models/mail_report_response_response_entry.rb +1 -1
  75. data/lib/SematextCloud/models/min_period_fee_period.rb +1 -1
  76. data/lib/SematextCloud/models/notification_integration.rb +1 -1
  77. data/lib/SematextCloud/models/notifications_response.rb +1 -1
  78. data/lib/SematextCloud/models/notifications_response_entry.rb +1 -1
  79. data/lib/SematextCloud/models/plan.rb +1 -1
  80. data/lib/SematextCloud/models/plans_response.rb +1 -1
  81. data/lib/SematextCloud/models/plans_response_entry.rb +1 -1
  82. data/lib/SematextCloud/models/report_info.rb +1 -1
  83. data/lib/SematextCloud/models/service_integration.rb +1 -1
  84. data/lib/SematextCloud/models/subscription.rb +1 -1
  85. data/lib/SematextCloud/models/subscription_dashboard_dto.rb +1 -1
  86. data/lib/SematextCloud/models/subscription_dto.rb +1 -1
  87. data/lib/SematextCloud/models/subscription_response.rb +1 -1
  88. data/lib/SematextCloud/models/subscription_response_entry.rb +1 -1
  89. data/lib/SematextCloud/models/subscriptions_response.rb +1 -1
  90. data/lib/SematextCloud/models/subscriptions_response_entry.rb +1 -1
  91. data/lib/SematextCloud/models/tag_names_response.rb +1 -1
  92. data/lib/SematextCloud/models/tags_grouped.rb +227 -0
  93. data/lib/SematextCloud/models/tags_grouped_response.rb +213 -0
  94. data/lib/SematextCloud/models/token_dto.rb +1 -1
  95. data/lib/SematextCloud/models/token_response.rb +1 -1
  96. data/lib/SematextCloud/models/token_response_entry.rb +1 -1
  97. data/lib/SematextCloud/models/tokens_response.rb +1 -1
  98. data/lib/SematextCloud/models/tokens_response_entry.rb +1 -1
  99. data/lib/SematextCloud/models/update_app_info.rb +1 -1
  100. data/lib/SematextCloud/models/update_plan_response.rb +1 -1
  101. data/lib/SematextCloud/models/update_plan_response_dto.rb +1 -1
  102. data/lib/SematextCloud/models/update_plan_response_entry.rb +1 -1
  103. data/lib/SematextCloud/models/update_subscription_dto.rb +1 -1
  104. data/lib/SematextCloud/models/update_token_dto.rb +1 -1
  105. data/lib/SematextCloud/models/usage_dto.rb +1 -1
  106. data/lib/SematextCloud/models/usage_multi_response.rb +1 -1
  107. data/lib/SematextCloud/models/usage_multi_response_entry.rb +1 -1
  108. data/lib/SematextCloud/models/usage_response.rb +1 -1
  109. data/lib/SematextCloud/models/usage_response_entry.rb +1 -1
  110. data/lib/SematextCloud/models/user_info.rb +1 -1
  111. data/lib/SematextCloud/models/user_permissions.rb +1 -1
  112. data/lib/SematextCloud/models/user_role.rb +1 -1
  113. data/lib/SematextCloud/version.rb +2 -2
  114. data/lib/SematextCloud.rb +3 -1
  115. data/spec/api/alert_notifications_api_spec.rb +5 -5
  116. data/spec/api/alerts_api_spec.rb +5 -5
  117. data/spec/api/apps_api_spec.rb +9 -9
  118. data/spec/api/aws_settings_controller_api_spec.rb +3 -3
  119. data/spec/api/billing_api_spec.rb +5 -5
  120. data/spec/api/logs_app_api_spec.rb +1 -1
  121. data/spec/api/logs_usage_api_controller_api_spec.rb +1 -1
  122. data/spec/api/monitoring_app_api_spec.rb +3 -3
  123. data/spec/api/reset_password_api_spec.rb +1 -1
  124. data/spec/api/subscriptions_api_spec.rb +15 -15
  125. data/spec/api/tag_api_controller_api_spec.rb +19 -1
  126. data/spec/api/tokens_api_controller_api_spec.rb +5 -5
  127. data/spec/api_client_spec.rb +1 -1
  128. data/spec/configuration_spec.rb +1 -1
  129. data/spec/models/alert_notification_request_spec.rb +1 -1
  130. data/spec/models/alert_notification_spec.rb +1 -1
  131. data/spec/models/alert_rule_response_entry_spec.rb +1 -1
  132. data/spec/models/alert_rule_response_spec.rb +1 -1
  133. data/spec/models/alert_rule_schedule_time_range_dto_spec.rb +1 -1
  134. data/spec/models/alert_rule_schedule_weekday_dto_spec.rb +1 -1
  135. data/spec/models/alert_rule_spec.rb +11 -1
  136. data/spec/models/alert_rules_response_entry_spec.rb +1 -1
  137. data/spec/models/alert_rules_response_spec.rb +1 -1
  138. data/spec/models/app_description_spec.rb +1 -1
  139. data/spec/models/app_metadata_spec.rb +1 -1
  140. data/spec/models/app_response_entry_spec.rb +1 -1
  141. data/spec/models/app_response_spec.rb +1 -1
  142. data/spec/models/app_spec.rb +1 -1
  143. data/spec/models/app_types_response_entry_spec.rb +1 -1
  144. data/spec/models/app_types_response_spec.rb +1 -1
  145. data/spec/models/apps_response_entry_spec.rb +1 -1
  146. data/spec/models/apps_response_spec.rb +1 -1
  147. data/spec/models/basic_auth_method_dto_spec.rb +1 -1
  148. data/spec/models/basic_organization_dto_spec.rb +1 -1
  149. data/spec/models/billing_info_spec.rb +1 -1
  150. data/spec/models/charges_details_response_dto_spec.rb +1 -1
  151. data/spec/models/cloud_watch_settings_response_entry_spec.rb +1 -1
  152. data/spec/models/cloud_watch_settings_response_spec.rb +1 -1
  153. data/spec/models/cloud_watch_settings_spec.rb +1 -1
  154. data/spec/models/create_app_info_spec.rb +1 -1
  155. data/spec/models/create_token_dto_spec.rb +1 -1
  156. data/spec/models/daily_dto_spec.rb +1 -1
  157. data/spec/models/day_usage_data_spec.rb +1 -1
  158. data/spec/models/dimension_spec.rb +1 -1
  159. data/spec/models/error_spec.rb +1 -1
  160. data/spec/models/event_dto_spec.rb +1 -1
  161. data/spec/models/filter_value_spec.rb +1 -1
  162. data/spec/models/generic_api_response_spec.rb +1 -1
  163. data/spec/models/generic_map_based_api_response_spec.rb +1 -1
  164. data/spec/models/invitation_spec.rb +1 -1
  165. data/spec/models/invoice_response_entry_spec.rb +1 -1
  166. data/spec/models/invoice_response_spec.rb +1 -1
  167. data/spec/models/invoice_spec.rb +1 -1
  168. data/spec/models/limit_change_event_dto_spec.rb +1 -1
  169. data/spec/models/mail_report_response_response_entry_spec.rb +1 -1
  170. data/spec/models/mail_report_response_spec.rb +1 -1
  171. data/spec/models/min_period_fee_period_spec.rb +1 -1
  172. data/spec/models/notification_integration_spec.rb +1 -1
  173. data/spec/models/notifications_response_entry_spec.rb +1 -1
  174. data/spec/models/notifications_response_spec.rb +1 -1
  175. data/spec/models/plan_spec.rb +1 -1
  176. data/spec/models/plans_response_entry_spec.rb +1 -1
  177. data/spec/models/plans_response_spec.rb +1 -1
  178. data/spec/models/report_info_spec.rb +1 -1
  179. data/spec/models/service_integration_spec.rb +1 -1
  180. data/spec/models/subscription_dashboard_dto_spec.rb +1 -1
  181. data/spec/models/subscription_dto_spec.rb +1 -1
  182. data/spec/models/subscription_response_entry_spec.rb +1 -1
  183. data/spec/models/subscription_response_spec.rb +1 -1
  184. data/spec/models/subscription_spec.rb +1 -1
  185. data/spec/models/subscriptions_response_entry_spec.rb +1 -1
  186. data/spec/models/subscriptions_response_spec.rb +1 -1
  187. data/spec/models/tag_names_response_spec.rb +1 -1
  188. data/spec/models/tags_grouped_response_spec.rb +40 -0
  189. data/spec/models/tags_grouped_spec.rb +46 -0
  190. data/spec/models/token_dto_spec.rb +1 -1
  191. data/spec/models/token_response_entry_spec.rb +1 -1
  192. data/spec/models/token_response_spec.rb +1 -1
  193. data/spec/models/tokens_response_entry_spec.rb +1 -1
  194. data/spec/models/tokens_response_spec.rb +1 -1
  195. data/spec/models/update_app_info_spec.rb +1 -1
  196. data/spec/models/update_plan_response_dto_spec.rb +1 -1
  197. data/spec/models/update_plan_response_entry_spec.rb +1 -1
  198. data/spec/models/update_plan_response_spec.rb +1 -1
  199. data/spec/models/update_subscription_dto_spec.rb +1 -1
  200. data/spec/models/update_token_dto_spec.rb +1 -1
  201. data/spec/models/usage_dto_spec.rb +1 -1
  202. data/spec/models/usage_multi_response_entry_spec.rb +1 -1
  203. data/spec/models/usage_multi_response_spec.rb +1 -1
  204. data/spec/models/usage_response_entry_spec.rb +1 -1
  205. data/spec/models/usage_response_spec.rb +1 -1
  206. data/spec/models/user_info_spec.rb +1 -1
  207. data/spec/models/user_permissions_spec.rb +1 -1
  208. data/spec/models/user_role_spec.rb +1 -1
  209. data/spec/spec_helper.rb +1 -1
  210. metadata +83 -75
@@ -6,7 +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: 3.0.30
9
+ Swagger Codegen version: 3.0.34
10
10
  =end
11
11
 
12
12
  require 'date'
@@ -6,7 +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: 3.0.30
9
+ Swagger Codegen version: 3.0.34
10
10
  =end
11
11
 
12
12
  require 'date'
@@ -6,7 +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: 3.0.30
9
+ Swagger Codegen version: 3.0.34
10
10
  =end
11
11
 
12
12
  require 'date'
@@ -6,7 +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: 3.0.30
9
+ Swagger Codegen version: 3.0.34
10
10
  =end
11
11
 
12
12
  require 'date'
@@ -6,7 +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: 3.0.30
9
+ Swagger Codegen version: 3.0.34
10
10
  =end
11
11
 
12
12
  require 'date'
@@ -6,7 +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: 3.0.30
9
+ Swagger Codegen version: 3.0.34
10
10
  =end
11
11
 
12
12
  require 'date'
@@ -0,0 +1,227 @@
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.34
10
+ =end
11
+
12
+ require 'date'
13
+
14
+ module SematextCloud
15
+ class TagsGrouped
16
+ attr_accessor :app_id
17
+
18
+ attr_accessor :tags
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'app_id' => :'appId',
24
+ :'tags' => :'tags'
25
+ }
26
+ end
27
+
28
+ # Attribute type mapping.
29
+ def self.openapi_types
30
+ {
31
+ :'app_id' => :'Object',
32
+ :'tags' => :'Object'
33
+ }
34
+ end
35
+
36
+ # List of attributes with nullable: true
37
+ def self.openapi_nullable
38
+ Set.new([
39
+ ])
40
+ end
41
+
42
+ # Initializes the object
43
+ # @param [Hash] attributes Model attributes in the form of hash
44
+ def initialize(attributes = {})
45
+ if (!attributes.is_a?(Hash))
46
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SematextCloud::TagsGrouped` initialize method"
47
+ end
48
+
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::TagsGrouped`. 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
+ }
56
+
57
+ if attributes.key?(:'app_id')
58
+ self.app_id = attributes[:'app_id']
59
+ end
60
+
61
+ if attributes.key?(:'tags')
62
+ if (value = attributes[:'tags']).is_a?(Hash)
63
+ self.tags = value
64
+ end
65
+ end
66
+ end
67
+
68
+ # Show invalid properties with the reasons. Usually used together with valid?
69
+ # @return Array for valid properties with the reasons
70
+ def list_invalid_properties
71
+ invalid_properties = Array.new
72
+ if @app_id.nil?
73
+ invalid_properties.push('invalid value for "app_id", app_id cannot be nil.')
74
+ end
75
+
76
+ if @tags.nil?
77
+ invalid_properties.push('invalid value for "tags", tags cannot be nil.')
78
+ end
79
+
80
+ invalid_properties
81
+ end
82
+
83
+ # Check to see if the all the properties in the model are valid
84
+ # @return true if the model is valid
85
+ def valid?
86
+ return false if @app_id.nil?
87
+ return false if @tags.nil?
88
+ true
89
+ end
90
+
91
+ # Checks equality by comparing each attribute.
92
+ # @param [Object] Object to be compared
93
+ def ==(o)
94
+ return true if self.equal?(o)
95
+ self.class == o.class &&
96
+ app_id == o.app_id &&
97
+ tags == o.tags
98
+ end
99
+
100
+ # @see the `==` method
101
+ # @param [Object] Object to be compared
102
+ def eql?(o)
103
+ self == o
104
+ end
105
+
106
+ # Calculates hash code according to all attributes.
107
+ # @return [Integer] Hash code
108
+ def hash
109
+ [app_id, tags].hash
110
+ end
111
+
112
+ # Builds the object from hash
113
+ # @param [Hash] attributes Model attributes in the form of hash
114
+ # @return [Object] Returns the model itself
115
+ def self.build_from_hash(attributes)
116
+ new.build_from_hash(attributes)
117
+ end
118
+
119
+ # Builds the object from hash
120
+ # @param [Hash] attributes Model attributes in the form of hash
121
+ # @return [Object] Returns the model itself
122
+ def build_from_hash(attributes)
123
+ return nil unless attributes.is_a?(Hash)
124
+ self.class.openapi_types.each_pair do |key, type|
125
+ if type =~ /\AArray<(.*)>/i
126
+ # check to ensure the input is an array given that the attribute
127
+ # is documented as an array but the input is not
128
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
129
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
130
+ end
131
+ elsif !attributes[self.class.attribute_map[key]].nil?
132
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
133
+ elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
134
+ self.send("#{key}=", nil)
135
+ end
136
+ end
137
+
138
+ self
139
+ end
140
+
141
+ # Deserializes the data based on type
142
+ # @param string type Data type
143
+ # @param string value Value to be deserialized
144
+ # @return [Object] Deserialized data
145
+ def _deserialize(type, value)
146
+ case type.to_sym
147
+ when :DateTime
148
+ DateTime.parse(value)
149
+ when :Date
150
+ Date.parse(value)
151
+ when :String
152
+ value.to_s
153
+ when :Integer
154
+ value.to_i
155
+ when :Float
156
+ value.to_f
157
+ when :Boolean
158
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
159
+ true
160
+ else
161
+ false
162
+ end
163
+ when :Object
164
+ # generic object (usually a Hash), return directly
165
+ value
166
+ when /\AArray<(?<inner_type>.+)>\z/
167
+ inner_type = Regexp.last_match[:inner_type]
168
+ value.map { |v| _deserialize(inner_type, v) }
169
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
170
+ k_type = Regexp.last_match[:k_type]
171
+ v_type = Regexp.last_match[:v_type]
172
+ {}.tap do |hash|
173
+ value.each do |k, v|
174
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
175
+ end
176
+ end
177
+ else # model
178
+ SematextCloud.const_get(type).build_from_hash(value)
179
+ end
180
+ end
181
+
182
+ # Returns the string representation of the object
183
+ # @return [String] String presentation of the object
184
+ def to_s
185
+ to_hash.to_s
186
+ end
187
+
188
+ # to_body is an alias to to_hash (backward compatibility)
189
+ # @return [Hash] Returns the object in the form of hash
190
+ def to_body
191
+ to_hash
192
+ end
193
+
194
+ # Returns the object in the form of hash
195
+ # @return [Hash] Returns the object in the form of hash
196
+ def to_hash
197
+ hash = {}
198
+ self.class.attribute_map.each_pair do |attr, param|
199
+ value = self.send(attr)
200
+ if value.nil?
201
+ is_nullable = self.class.openapi_nullable.include?(attr)
202
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
203
+ end
204
+
205
+ hash[param] = _to_hash(value)
206
+ end
207
+ hash
208
+ end
209
+
210
+ # Outputs non-array value in the form of hash
211
+ # For object, use to_hash. Otherwise, just return the value
212
+ # @param [Object] value Any valid value
213
+ # @return [Hash] Returns the value in the form of hash
214
+ def _to_hash(value)
215
+ if value.is_a?(Array)
216
+ value.compact.map { |v| _to_hash(v) }
217
+ elsif value.is_a?(Hash)
218
+ {}.tap do |hash|
219
+ value.each { |k, v| hash[k] = _to_hash(v) }
220
+ end
221
+ elsif value.respond_to? :to_hash
222
+ value.to_hash
223
+ else
224
+ value
225
+ end
226
+ end end
227
+ end
@@ -0,0 +1,213 @@
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.34
10
+ =end
11
+
12
+ require 'date'
13
+
14
+ module SematextCloud
15
+ class TagsGroupedResponse
16
+ attr_accessor :v
17
+
18
+ # Attribute mapping from ruby-style variable name to JSON key.
19
+ def self.attribute_map
20
+ {
21
+ :'v' => :'v'
22
+ }
23
+ end
24
+
25
+ # Attribute type mapping.
26
+ def self.openapi_types
27
+ {
28
+ :'v' => :'Object'
29
+ }
30
+ end
31
+
32
+ # List of attributes with nullable: true
33
+ def self.openapi_nullable
34
+ Set.new([
35
+ ])
36
+ end
37
+
38
+ # Initializes the object
39
+ # @param [Hash] attributes Model attributes in the form of hash
40
+ def initialize(attributes = {})
41
+ if (!attributes.is_a?(Hash))
42
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SematextCloud::TagsGroupedResponse` initialize method"
43
+ end
44
+
45
+ # check to see if the attribute exists and convert string to symbol for hash key
46
+ attributes = attributes.each_with_object({}) { |(k, v), h|
47
+ if (!self.class.attribute_map.key?(k.to_sym))
48
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SematextCloud::TagsGroupedResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
49
+ end
50
+ h[k.to_sym] = v
51
+ }
52
+
53
+ if attributes.key?(:'v')
54
+ if (value = attributes[:'v']).is_a?(Array)
55
+ self.v = value
56
+ end
57
+ end
58
+ end
59
+
60
+ # Show invalid properties with the reasons. Usually used together with valid?
61
+ # @return Array for valid properties with the reasons
62
+ def list_invalid_properties
63
+ invalid_properties = Array.new
64
+ if @v.nil?
65
+ invalid_properties.push('invalid value for "v", v cannot be nil.')
66
+ end
67
+
68
+ invalid_properties
69
+ end
70
+
71
+ # Check to see if the all the properties in the model are valid
72
+ # @return true if the model is valid
73
+ def valid?
74
+ return false if @v.nil?
75
+ true
76
+ end
77
+
78
+ # Checks equality by comparing each attribute.
79
+ # @param [Object] Object to be compared
80
+ def ==(o)
81
+ return true if self.equal?(o)
82
+ self.class == o.class &&
83
+ v == o.v
84
+ end
85
+
86
+ # @see the `==` method
87
+ # @param [Object] Object to be compared
88
+ def eql?(o)
89
+ self == o
90
+ end
91
+
92
+ # Calculates hash code according to all attributes.
93
+ # @return [Integer] Hash code
94
+ def hash
95
+ [v].hash
96
+ end
97
+
98
+ # Builds the object from hash
99
+ # @param [Hash] attributes Model attributes in the form of hash
100
+ # @return [Object] Returns the model itself
101
+ def self.build_from_hash(attributes)
102
+ new.build_from_hash(attributes)
103
+ end
104
+
105
+ # Builds the object from hash
106
+ # @param [Hash] attributes Model attributes in the form of hash
107
+ # @return [Object] Returns the model itself
108
+ def build_from_hash(attributes)
109
+ return nil unless attributes.is_a?(Hash)
110
+ self.class.openapi_types.each_pair do |key, type|
111
+ if type =~ /\AArray<(.*)>/i
112
+ # check to ensure the input is an array given that the attribute
113
+ # is documented as an array but the input is not
114
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
115
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
116
+ end
117
+ elsif !attributes[self.class.attribute_map[key]].nil?
118
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
119
+ elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
120
+ self.send("#{key}=", nil)
121
+ end
122
+ end
123
+
124
+ self
125
+ end
126
+
127
+ # Deserializes the data based on type
128
+ # @param string type Data type
129
+ # @param string value Value to be deserialized
130
+ # @return [Object] Deserialized data
131
+ def _deserialize(type, value)
132
+ case type.to_sym
133
+ when :DateTime
134
+ DateTime.parse(value)
135
+ when :Date
136
+ Date.parse(value)
137
+ when :String
138
+ value.to_s
139
+ when :Integer
140
+ value.to_i
141
+ when :Float
142
+ value.to_f
143
+ when :Boolean
144
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
145
+ true
146
+ else
147
+ false
148
+ end
149
+ when :Object
150
+ # generic object (usually a Hash), return directly
151
+ value
152
+ when /\AArray<(?<inner_type>.+)>\z/
153
+ inner_type = Regexp.last_match[:inner_type]
154
+ value.map { |v| _deserialize(inner_type, v) }
155
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
156
+ k_type = Regexp.last_match[:k_type]
157
+ v_type = Regexp.last_match[:v_type]
158
+ {}.tap do |hash|
159
+ value.each do |k, v|
160
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
161
+ end
162
+ end
163
+ else # model
164
+ SematextCloud.const_get(type).build_from_hash(value)
165
+ end
166
+ end
167
+
168
+ # Returns the string representation of the object
169
+ # @return [String] String presentation of the object
170
+ def to_s
171
+ to_hash.to_s
172
+ end
173
+
174
+ # to_body is an alias to to_hash (backward compatibility)
175
+ # @return [Hash] Returns the object in the form of hash
176
+ def to_body
177
+ to_hash
178
+ end
179
+
180
+ # Returns the object in the form of hash
181
+ # @return [Hash] Returns the object in the form of hash
182
+ def to_hash
183
+ hash = {}
184
+ self.class.attribute_map.each_pair do |attr, param|
185
+ value = self.send(attr)
186
+ if value.nil?
187
+ is_nullable = self.class.openapi_nullable.include?(attr)
188
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
189
+ end
190
+
191
+ hash[param] = _to_hash(value)
192
+ end
193
+ hash
194
+ end
195
+
196
+ # Outputs non-array value in the form of hash
197
+ # For object, use to_hash. Otherwise, just return the value
198
+ # @param [Object] value Any valid value
199
+ # @return [Hash] Returns the value in the form of hash
200
+ def _to_hash(value)
201
+ if value.is_a?(Array)
202
+ value.compact.map { |v| _to_hash(v) }
203
+ elsif value.is_a?(Hash)
204
+ {}.tap do |hash|
205
+ value.each { |k, v| hash[k] = _to_hash(v) }
206
+ end
207
+ elsif value.respond_to? :to_hash
208
+ value.to_hash
209
+ else
210
+ value
211
+ end
212
+ end end
213
+ end
@@ -6,7 +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: 3.0.30
9
+ Swagger Codegen version: 3.0.34
10
10
  =end
11
11
 
12
12
  require 'date'
@@ -6,7 +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: 3.0.30
9
+ Swagger Codegen version: 3.0.34
10
10
  =end
11
11
 
12
12
  require 'date'
@@ -6,7 +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: 3.0.30
9
+ Swagger Codegen version: 3.0.34
10
10
  =end
11
11
 
12
12
  require 'date'
@@ -6,7 +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: 3.0.30
9
+ Swagger Codegen version: 3.0.34
10
10
  =end
11
11
 
12
12
  require 'date'
@@ -6,7 +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: 3.0.30
9
+ Swagger Codegen version: 3.0.34
10
10
  =end
11
11
 
12
12
  require 'date'
@@ -6,7 +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: 3.0.30
9
+ Swagger Codegen version: 3.0.34
10
10
  =end
11
11
 
12
12
  require 'date'
@@ -6,7 +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: 3.0.30
9
+ Swagger Codegen version: 3.0.34
10
10
  =end
11
11
 
12
12
  require 'date'
@@ -6,7 +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: 3.0.30
9
+ Swagger Codegen version: 3.0.34
10
10
  =end
11
11
 
12
12
  require 'date'
@@ -6,7 +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: 3.0.30
9
+ Swagger Codegen version: 3.0.34
10
10
  =end
11
11
 
12
12
  require 'date'
@@ -6,7 +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: 3.0.30
9
+ Swagger Codegen version: 3.0.34
10
10
  =end
11
11
 
12
12
  require 'date'
@@ -6,7 +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: 3.0.30
9
+ Swagger Codegen version: 3.0.34
10
10
  =end
11
11
 
12
12
  require 'date'
@@ -6,7 +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: 3.0.30
9
+ Swagger Codegen version: 3.0.34
10
10
  =end
11
11
 
12
12
  require 'date'
@@ -6,7 +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: 3.0.30
9
+ Swagger Codegen version: 3.0.34
10
10
  =end
11
11
 
12
12
  require 'date'
@@ -6,7 +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: 3.0.30
9
+ Swagger Codegen version: 3.0.34
10
10
  =end
11
11
 
12
12
  require 'date'
@@ -6,7 +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: 3.0.30
9
+ Swagger Codegen version: 3.0.34
10
10
  =end
11
11
 
12
12
  require 'date'
@@ -6,7 +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: 3.0.30
9
+ Swagger Codegen version: 3.0.34
10
10
  =end
11
11
 
12
12
  require 'date'
@@ -6,7 +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: 3.0.30
9
+ Swagger Codegen version: 3.0.34
10
10
  =end
11
11
 
12
12
  require 'date'
@@ -6,7 +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: 3.0.30
9
+ Swagger Codegen version: 3.0.34
10
10
  =end
11
11
 
12
12
  require 'date'