agent_push_kit 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (199) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/Gemfile.lock +145 -0
  4. data/LICENSE +21 -0
  5. data/README.md +195 -0
  6. data/Rakefile +10 -0
  7. data/agent_push_kit.gemspec +39 -0
  8. data/docs/AcceptedResponse.md +18 -0
  9. data/docs/AccountApi.md +137 -0
  10. data/docs/AddMemberInput.md +18 -0
  11. data/docs/AgentToken.md +30 -0
  12. data/docs/AgentTokenCreated.md +32 -0
  13. data/docs/AgentTokensApi.md +279 -0
  14. data/docs/ApiKeySummary.md +22 -0
  15. data/docs/AuthResponse.md +24 -0
  16. data/docs/AuthenticationApi.md +385 -0
  17. data/docs/CreateAgentTokenInput.md +18 -0
  18. data/docs/CreateOrganizationInput.md +18 -0
  19. data/docs/CurrentAccount.md +20 -0
  20. data/docs/CustomerAccountsApi.md +348 -0
  21. data/docs/DeletedResponse.md +18 -0
  22. data/docs/DeliverySummary.md +24 -0
  23. data/docs/Device.md +28 -0
  24. data/docs/DevicesApi.md +344 -0
  25. data/docs/DisabledResponse.md +18 -0
  26. data/docs/ErrorResponse.md +22 -0
  27. data/docs/EventDetail.md +36 -0
  28. data/docs/EventFilter.md +53 -0
  29. data/docs/EventPage.md +20 -0
  30. data/docs/EventSummary.md +32 -0
  31. data/docs/EventsApi.md +505 -0
  32. data/docs/FilterGroup.md +20 -0
  33. data/docs/FilterNot.md +20 -0
  34. data/docs/HealthApi.md +67 -0
  35. data/docs/HealthResponse.md +20 -0
  36. data/docs/IngestionResult.md +22 -0
  37. data/docs/InheritedResponse.md +18 -0
  38. data/docs/Membership.md +24 -0
  39. data/docs/MembershipUser.md +22 -0
  40. data/docs/Organization.md +32 -0
  41. data/docs/OrganizationApiKeyCreated.md +24 -0
  42. data/docs/OrganizationCount.md +20 -0
  43. data/docs/OrganizationCreated.md +20 -0
  44. data/docs/OrganizationRecord.md +24 -0
  45. data/docs/PasswordLoginInput.md +20 -0
  46. data/docs/PasswordResetCompleteInput.md +20 -0
  47. data/docs/PasswordResetRequestInput.md +18 -0
  48. data/docs/PreferenceRecord.md +24 -0
  49. data/docs/PreferencesApi.md +287 -0
  50. data/docs/ProviderLoginInput.md +20 -0
  51. data/docs/RegisterDeviceInput.md +24 -0
  52. data/docs/RegisterInput.md +22 -0
  53. data/docs/RegisterWebPushSubscriptionInput.md +20 -0
  54. data/docs/RegisterWebPushSubscriptionInputKeys.md +20 -0
  55. data/docs/RevokedResponse.md +18 -0
  56. data/docs/SearchEventsInput.md +22 -0
  57. data/docs/SendEventInput.md +32 -0
  58. data/docs/Service.md +26 -0
  59. data/docs/ServiceAllOfCount.md +18 -0
  60. data/docs/ServicePreference.md +26 -0
  61. data/docs/ServiceSummary.md +22 -0
  62. data/docs/SetEnabledInput.md +18 -0
  63. data/docs/TextFilterCondition.md +22 -0
  64. data/docs/TimeFilterCondition.md +22 -0
  65. data/docs/TypeOverride.md +22 -0
  66. data/docs/User.md +28 -0
  67. data/docs/WebPushConfiguration.md +20 -0
  68. data/docs/WebPushSubscription.md +22 -0
  69. data/git_push.sh +57 -0
  70. data/lib/agent_push_kit/api/account_api.rb +132 -0
  71. data/lib/agent_push_kit/api/agent_tokens_api.rb +274 -0
  72. data/lib/agent_push_kit/api/authentication_api.rb +418 -0
  73. data/lib/agent_push_kit/api/customer_accounts_api.rb +339 -0
  74. data/lib/agent_push_kit/api/devices_api.rb +339 -0
  75. data/lib/agent_push_kit/api/events_api.rb +520 -0
  76. data/lib/agent_push_kit/api/health_api.rb +77 -0
  77. data/lib/agent_push_kit/api/preferences_api.rb +308 -0
  78. data/lib/agent_push_kit/api_client.rb +397 -0
  79. data/lib/agent_push_kit/api_error.rb +58 -0
  80. data/lib/agent_push_kit/api_model_base.rb +88 -0
  81. data/lib/agent_push_kit/configuration.rb +325 -0
  82. data/lib/agent_push_kit/models/accepted_response.rb +164 -0
  83. data/lib/agent_push_kit/models/add_member_input.rb +173 -0
  84. data/lib/agent_push_kit/models/agent_token.rb +292 -0
  85. data/lib/agent_push_kit/models/agent_token_created.rb +364 -0
  86. data/lib/agent_push_kit/models/api_key_summary.rb +165 -0
  87. data/lib/agent_push_kit/models/auth_response.rb +228 -0
  88. data/lib/agent_push_kit/models/create_agent_token_input.rb +182 -0
  89. data/lib/agent_push_kit/models/create_organization_input.rb +182 -0
  90. data/lib/agent_push_kit/models/current_account.rb +192 -0
  91. data/lib/agent_push_kit/models/deleted_response.rb +164 -0
  92. data/lib/agent_push_kit/models/delivery_summary.rb +242 -0
  93. data/lib/agent_push_kit/models/device.rb +304 -0
  94. data/lib/agent_push_kit/models/disabled_response.rb +164 -0
  95. data/lib/agent_push_kit/models/error_response.rb +199 -0
  96. data/lib/agent_push_kit/models/event_detail.rb +393 -0
  97. data/lib/agent_push_kit/models/event_filter.rb +106 -0
  98. data/lib/agent_push_kit/models/event_page.rb +178 -0
  99. data/lib/agent_push_kit/models/event_summary.rb +318 -0
  100. data/lib/agent_push_kit/models/filter_group.rb +234 -0
  101. data/lib/agent_push_kit/models/filter_not.rb +214 -0
  102. data/lib/agent_push_kit/models/health_response.rb +216 -0
  103. data/lib/agent_push_kit/models/ingestion_result.rb +216 -0
  104. data/lib/agent_push_kit/models/inherited_response.rb +164 -0
  105. data/lib/agent_push_kit/models/membership.rb +266 -0
  106. data/lib/agent_push_kit/models/membership_user.rb +202 -0
  107. data/lib/agent_push_kit/models/organization.rb +337 -0
  108. data/lib/agent_push_kit/models/organization_api_key_created.rb +253 -0
  109. data/lib/agent_push_kit/models/organization_count.rb +156 -0
  110. data/lib/agent_push_kit/models/organization_created.rb +201 -0
  111. data/lib/agent_push_kit/models/organization_record.rb +242 -0
  112. data/lib/agent_push_kit/models/password_login_input.rb +217 -0
  113. data/lib/agent_push_kit/models/password_reset_complete_input.rb +217 -0
  114. data/lib/agent_push_kit/models/password_reset_request_input.rb +173 -0
  115. data/lib/agent_push_kit/models/preference_record.rb +242 -0
  116. data/lib/agent_push_kit/models/provider_login_input.rb +201 -0
  117. data/lib/agent_push_kit/models/register_device_input.rb +304 -0
  118. data/lib/agent_push_kit/models/register_input.rb +245 -0
  119. data/lib/agent_push_kit/models/register_web_push_subscription_input.rb +199 -0
  120. data/lib/agent_push_kit/models/register_web_push_subscription_input_keys.rb +226 -0
  121. data/lib/agent_push_kit/models/revoked_response.rb +164 -0
  122. data/lib/agent_push_kit/models/search_events_input.rb +212 -0
  123. data/lib/agent_push_kit/models/send_event_input.rb +427 -0
  124. data/lib/agent_push_kit/models/service.rb +275 -0
  125. data/lib/agent_push_kit/models/service_all_of_count.rb +164 -0
  126. data/lib/agent_push_kit/models/service_preference.rb +270 -0
  127. data/lib/agent_push_kit/models/service_summary.rb +216 -0
  128. data/lib/agent_push_kit/models/set_enabled_input.rb +164 -0
  129. data/lib/agent_push_kit/models/text_filter_condition.rb +260 -0
  130. data/lib/agent_push_kit/models/time_filter_condition.rb +242 -0
  131. data/lib/agent_push_kit/models/type_override.rb +216 -0
  132. data/lib/agent_push_kit/models/user.rb +280 -0
  133. data/lib/agent_push_kit/models/web_push_configuration.rb +176 -0
  134. data/lib/agent_push_kit/models/web_push_subscription.rb +216 -0
  135. data/lib/agent_push_kit/version.rb +15 -0
  136. data/lib/agent_push_kit.rb +101 -0
  137. data/spec/api/account_api_spec.rb +55 -0
  138. data/spec/api/agent_tokens_api_spec.rb +80 -0
  139. data/spec/api/authentication_api_spec.rb +101 -0
  140. data/spec/api/customer_accounts_api_spec.rb +91 -0
  141. data/spec/api/devices_api_spec.rb +89 -0
  142. data/spec/api/events_api_spec.rb +121 -0
  143. data/spec/api/health_api_spec.rb +45 -0
  144. data/spec/api/preferences_api_spec.rb +83 -0
  145. data/spec/models/accepted_response_spec.rb +36 -0
  146. data/spec/models/add_member_input_spec.rb +36 -0
  147. data/spec/models/agent_token_created_spec.rb +78 -0
  148. data/spec/models/agent_token_spec.rb +72 -0
  149. data/spec/models/api_key_summary_spec.rb +48 -0
  150. data/spec/models/auth_response_spec.rb +54 -0
  151. data/spec/models/create_agent_token_input_spec.rb +36 -0
  152. data/spec/models/create_organization_input_spec.rb +36 -0
  153. data/spec/models/current_account_spec.rb +42 -0
  154. data/spec/models/deleted_response_spec.rb +36 -0
  155. data/spec/models/delivery_summary_spec.rb +54 -0
  156. data/spec/models/device_spec.rb +70 -0
  157. data/spec/models/disabled_response_spec.rb +36 -0
  158. data/spec/models/error_response_spec.rb +48 -0
  159. data/spec/models/event_detail_spec.rb +90 -0
  160. data/spec/models/event_filter_spec.rb +32 -0
  161. data/spec/models/event_page_spec.rb +42 -0
  162. data/spec/models/event_summary_spec.rb +78 -0
  163. data/spec/models/filter_group_spec.rb +46 -0
  164. data/spec/models/filter_not_spec.rb +46 -0
  165. data/spec/models/health_response_spec.rb +50 -0
  166. data/spec/models/ingestion_result_spec.rb +48 -0
  167. data/spec/models/inherited_response_spec.rb +36 -0
  168. data/spec/models/membership_spec.rb +58 -0
  169. data/spec/models/membership_user_spec.rb +48 -0
  170. data/spec/models/organization_api_key_created_spec.rb +54 -0
  171. data/spec/models/organization_count_spec.rb +42 -0
  172. data/spec/models/organization_created_spec.rb +42 -0
  173. data/spec/models/organization_record_spec.rb +54 -0
  174. data/spec/models/organization_spec.rb +82 -0
  175. data/spec/models/password_login_input_spec.rb +42 -0
  176. data/spec/models/password_reset_complete_input_spec.rb +42 -0
  177. data/spec/models/password_reset_request_input_spec.rb +36 -0
  178. data/spec/models/preference_record_spec.rb +54 -0
  179. data/spec/models/provider_login_input_spec.rb +42 -0
  180. data/spec/models/register_device_input_spec.rb +58 -0
  181. data/spec/models/register_input_spec.rb +48 -0
  182. data/spec/models/register_web_push_subscription_input_keys_spec.rb +42 -0
  183. data/spec/models/register_web_push_subscription_input_spec.rb +42 -0
  184. data/spec/models/revoked_response_spec.rb +36 -0
  185. data/spec/models/search_events_input_spec.rb +48 -0
  186. data/spec/models/send_event_input_spec.rb +78 -0
  187. data/spec/models/service_all_of_count_spec.rb +36 -0
  188. data/spec/models/service_preference_spec.rb +60 -0
  189. data/spec/models/service_spec.rb +60 -0
  190. data/spec/models/service_summary_spec.rb +48 -0
  191. data/spec/models/set_enabled_input_spec.rb +36 -0
  192. data/spec/models/text_filter_condition_spec.rb +56 -0
  193. data/spec/models/time_filter_condition_spec.rb +56 -0
  194. data/spec/models/type_override_spec.rb +48 -0
  195. data/spec/models/user_spec.rb +66 -0
  196. data/spec/models/web_push_configuration_spec.rb +42 -0
  197. data/spec/models/web_push_subscription_spec.rb +48 -0
  198. data/spec/spec_helper.rb +111 -0
  199. metadata +344 -0
@@ -0,0 +1,325 @@
1
+ =begin
2
+ #Agent Push Kit API
3
+
4
+ #The complete Agent Push Kit REST API. Application event ingestion uses an organization key beginning with `apk_`. Authenticated user operations accept either an Agent Push Kit login JWT or an agent access token beginning with `apt_`.
5
+
6
+ The version of the OpenAPI document: 0.1.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.24.0
10
+
11
+ =end
12
+
13
+ module AgentPushKit
14
+ class Configuration
15
+ # Defines url scheme
16
+ attr_accessor :scheme
17
+
18
+ # Defines url host
19
+ attr_accessor :host
20
+
21
+ # Defines url base path
22
+ attr_accessor :base_path
23
+
24
+ # Define server configuration index
25
+ attr_accessor :server_index
26
+
27
+ # Define server operation configuration index
28
+ attr_accessor :server_operation_index
29
+
30
+ # Default server variables
31
+ attr_accessor :server_variables
32
+
33
+ # Default server operation variables
34
+ attr_accessor :server_operation_variables
35
+
36
+ # Defines API keys used with API Key authentications.
37
+ #
38
+ # @return [Hash] key: parameter name, value: parameter value (API key)
39
+ #
40
+ # @example parameter name is "api_key", API key is "xxx" (e.g. "api_key=xxx" in query string)
41
+ # config.api_key['api_key'] = 'xxx'
42
+ attr_accessor :api_key
43
+
44
+ # Defines API key prefixes used with API Key authentications.
45
+ #
46
+ # @return [Hash] key: parameter name, value: API key prefix
47
+ #
48
+ # @example parameter name is "Authorization", API key prefix is "Token" (e.g. "Authorization: Token xxx" in headers)
49
+ # config.api_key_prefix['api_key'] = 'Token'
50
+ attr_accessor :api_key_prefix
51
+
52
+ # Defines the username used with HTTP basic authentication.
53
+ #
54
+ # @return [String]
55
+ attr_accessor :username
56
+
57
+ # Defines the password used with HTTP basic authentication.
58
+ #
59
+ # @return [String]
60
+ attr_accessor :password
61
+
62
+ # Defines the access token (Bearer) used with OAuth2.
63
+ attr_accessor :access_token
64
+
65
+ # Defines a Proc used to fetch or refresh access tokens (Bearer) used with OAuth2.
66
+ # Overrides the access_token if set
67
+ # @return [Proc]
68
+ attr_accessor :access_token_getter
69
+
70
+ # Set this to return data as binary instead of downloading a temp file. When enabled (set to true)
71
+ # HTTP responses with return type `File` will be returned as a stream of binary data.
72
+ # Default to false.
73
+ attr_accessor :return_binary_data
74
+
75
+ # Set this to enable/disable debugging. When enabled (set to true), HTTP request/response
76
+ # details will be logged with `logger.debug` (see the `logger` attribute).
77
+ # Default to false.
78
+ #
79
+ # @return [true, false]
80
+ attr_accessor :debugging
81
+
82
+ # Set this to ignore operation servers for the API client. This is useful when you need to
83
+ # send requests to a different server than the one specified in the OpenAPI document.
84
+ # Will default to the base url defined in the spec but can be overridden by setting
85
+ # `scheme`, `host`, `base_path` directly.
86
+ # Default to false.
87
+ # @return [true, false]
88
+ attr_accessor :ignore_operation_servers
89
+
90
+ # Defines the logger used for debugging.
91
+ # Default to `Rails.logger` (when in Rails) or logging to STDOUT.
92
+ #
93
+ # @return [#debug]
94
+ attr_accessor :logger
95
+
96
+ # Defines the temporary folder to store downloaded files
97
+ # (for API endpoints that have file response).
98
+ # Default to use `Tempfile`.
99
+ #
100
+ # @return [String]
101
+ attr_accessor :temp_folder_path
102
+
103
+ # The time limit for HTTP request in seconds.
104
+ # Default to 0 (never times out).
105
+ attr_accessor :timeout
106
+
107
+ # Set this to false to skip client side validation in the operation.
108
+ # Default to true.
109
+ # @return [true, false]
110
+ attr_accessor :client_side_validation
111
+
112
+ ### TLS/SSL setting
113
+ # Set this to false to skip verifying SSL certificate when calling API from https server.
114
+ # Default to true.
115
+ #
116
+ # @note Do NOT set it to false in production code, otherwise you would face multiple types of cryptographic attacks.
117
+ #
118
+ # @return [true, false]
119
+ attr_accessor :verify_ssl
120
+
121
+ ### TLS/SSL setting
122
+ # Set this to false to skip verifying SSL host name
123
+ # Default to true.
124
+ #
125
+ # @note Do NOT set it to false in production code, otherwise you would face multiple types of cryptographic attacks.
126
+ #
127
+ # @return [true, false]
128
+ attr_accessor :verify_ssl_host
129
+
130
+ ### TLS/SSL setting
131
+ # Set this to customize the certificate file to verify the peer.
132
+ #
133
+ # @return [String] the path to the certificate file
134
+ #
135
+ # @see The `cainfo` option of Typhoeus, `--cert` option of libcurl. Related source code:
136
+ # https://github.com/typhoeus/typhoeus/blob/master/lib/typhoeus/easy_factory.rb#L145
137
+ attr_accessor :ssl_ca_cert
138
+
139
+ ### TLS/SSL setting
140
+ # Client certificate file (for client certificate)
141
+ attr_accessor :cert_file
142
+
143
+ ### TLS/SSL setting
144
+ # Client private key file (for client certificate)
145
+ attr_accessor :key_file
146
+
147
+ # Set this to customize parameters encoding of array parameter with multi collectionFormat.
148
+ # Default to nil.
149
+ #
150
+ # @see The params_encoding option of Ethon. Related source code:
151
+ # https://github.com/typhoeus/ethon/blob/master/lib/ethon/easy/queryable.rb#L96
152
+ attr_accessor :params_encoding
153
+
154
+
155
+ attr_accessor :inject_format
156
+
157
+ attr_accessor :force_ending_format
158
+
159
+ def initialize
160
+ @scheme = 'https'
161
+ @host = 'api.chatdna.co'
162
+ @base_path = '/agent-push-kit/v1'
163
+ @server_index = nil
164
+ @server_operation_index = {}
165
+ @server_variables = {}
166
+ @server_operation_variables = {}
167
+ @api_key = {}
168
+ @api_key_prefix = {}
169
+ @client_side_validation = true
170
+ @verify_ssl = true
171
+ @verify_ssl_host = true
172
+ @cert_file = nil
173
+ @key_file = nil
174
+ @timeout = 0
175
+ @params_encoding = nil
176
+ @debugging = false
177
+ @ignore_operation_servers = false
178
+ @inject_format = false
179
+ @force_ending_format = false
180
+ @logger = defined?(Rails) ? Rails.logger : Logger.new(STDOUT)
181
+
182
+ yield(self) if block_given?
183
+ end
184
+
185
+ # The default Configuration object.
186
+ def self.default
187
+ @@default ||= Configuration.new
188
+ end
189
+
190
+ def configure
191
+ yield(self) if block_given?
192
+ end
193
+
194
+ def scheme=(scheme)
195
+ # remove :// from scheme
196
+ @scheme = scheme.sub(/:\/\//, '')
197
+ end
198
+
199
+ def host=(host)
200
+ # remove http(s):// and anything after a slash
201
+ @host = host.sub(/https?:\/\//, '').split('/').first
202
+ end
203
+
204
+ def base_path=(base_path)
205
+ # Add leading and trailing slashes to base_path
206
+ @base_path = "/#{base_path}".gsub(/\/+/, '/')
207
+ @base_path = '' if @base_path == '/'
208
+ end
209
+
210
+ # Returns base URL for specified operation based on server settings
211
+ def base_url(operation = nil)
212
+ return "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '') if ignore_operation_servers
213
+ if operation_server_settings.key?(operation) then
214
+ index = server_operation_index.fetch(operation, server_index)
215
+ server_url(index.nil? ? 0 : index, server_operation_variables.fetch(operation, server_variables), operation_server_settings[operation])
216
+ else
217
+ server_index.nil? ? "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '') : server_url(server_index, server_variables, nil)
218
+ end
219
+ end
220
+
221
+ # Gets API key (with prefix if set).
222
+ # @param [String] param_name the parameter name of API key auth
223
+ def api_key_with_prefix(param_name, param_alias = nil)
224
+ key = @api_key[param_name]
225
+ key = @api_key.fetch(param_alias, key) unless param_alias.nil?
226
+ if @api_key_prefix[param_name]
227
+ "#{@api_key_prefix[param_name]} #{key}"
228
+ else
229
+ key
230
+ end
231
+ end
232
+
233
+ # Gets access_token using access_token_getter or uses the static access_token
234
+ def access_token_with_refresh
235
+ return access_token if access_token_getter.nil?
236
+ access_token_getter.call
237
+ end
238
+
239
+ # Gets Basic Auth token string
240
+ def basic_auth_token
241
+ 'Basic ' + ["#{username}:#{password}"].pack('m').delete("\r\n")
242
+ end
243
+
244
+ # Returns Auth Settings hash for api client.
245
+ def auth_settings
246
+ {
247
+ 'UserOrAgent' =>
248
+ {
249
+ type: 'bearer',
250
+ in: 'header',
251
+ format: 'Agent Push Kit JWT or apt_ token',
252
+ key: 'Authorization',
253
+ value: "Bearer #{access_token_with_refresh}"
254
+ },
255
+ 'AgentToken' =>
256
+ {
257
+ type: 'bearer',
258
+ in: 'header',
259
+ format: 'apt_',
260
+ key: 'Authorization',
261
+ value: "Bearer #{access_token_with_refresh}"
262
+ },
263
+ 'OrganizationApiKey' =>
264
+ {
265
+ type: 'bearer',
266
+ in: 'header',
267
+ format: 'apk_',
268
+ key: 'Authorization',
269
+ value: "Bearer #{access_token_with_refresh}"
270
+ },
271
+ }
272
+ end
273
+
274
+ # Returns an array of Server setting
275
+ def server_settings
276
+ [
277
+ {
278
+ url: "https://api.chatdna.co/agent-push-kit/v1",
279
+ description: "Production",
280
+ }
281
+ ]
282
+ end
283
+
284
+ def operation_server_settings
285
+ {
286
+ }
287
+ end
288
+
289
+ # Returns URL based on server settings
290
+ #
291
+ # @param index array index of the server settings
292
+ # @param variables hash of variable and the corresponding value
293
+ def server_url(index, variables = {}, servers = nil)
294
+ servers = server_settings if servers == nil
295
+
296
+ # check array index out of bound
297
+ if (index.nil? || index < 0 || index >= servers.size)
298
+ fail ArgumentError, "Invalid index #{index} when selecting the server. Must not be nil and must be less than #{servers.size}"
299
+ end
300
+
301
+ server = servers[index]
302
+ url = server[:url]
303
+
304
+ return url unless server.key? :variables
305
+
306
+ # go through variable and assign a value
307
+ server[:variables].each do |name, variable|
308
+ if variables.key?(name)
309
+ if (!server[:variables][name].key?(:enum_values) || server[:variables][name][:enum_values].include?(variables[name]))
310
+ url.gsub! "{" + name.to_s + "}", variables[name]
311
+ else
312
+ fail ArgumentError, "The variable `#{name}` in the server URL has invalid value #{variables[name]}. Must be #{server[:variables][name][:enum_values]}."
313
+ end
314
+ else
315
+ # use default value
316
+ url.gsub! "{" + name.to_s + "}", server[:variables][name][:default_value]
317
+ end
318
+ end
319
+
320
+ url
321
+ end
322
+
323
+
324
+ end
325
+ end
@@ -0,0 +1,164 @@
1
+ =begin
2
+ #Agent Push Kit API
3
+
4
+ #The complete Agent Push Kit REST API. Application event ingestion uses an organization key beginning with `apk_`. Authenticated user operations accept either an Agent Push Kit login JWT or an agent access token beginning with `apt_`.
5
+
6
+ The version of the OpenAPI document: 0.1.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.24.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module AgentPushKit
17
+ class AcceptedResponse < ApiModelBase
18
+ attr_accessor :accepted
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'accepted' => :'accepted'
24
+ }
25
+ end
26
+
27
+ # Returns attribute mapping this model knows about
28
+ def self.acceptable_attribute_map
29
+ attribute_map
30
+ end
31
+
32
+ # Returns all the JSON keys this model knows about
33
+ def self.acceptable_attributes
34
+ acceptable_attribute_map.values
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ def self.openapi_types
39
+ {
40
+ :'accepted' => :'Boolean'
41
+ }
42
+ end
43
+
44
+ # List of attributes with nullable: true
45
+ def self.openapi_nullable
46
+ Set.new([
47
+ ])
48
+ end
49
+
50
+ # Initializes the object
51
+ # @param [Hash] attributes Model attributes in the form of hash
52
+ def initialize(attributes = {})
53
+ if (!attributes.is_a?(Hash))
54
+ fail ArgumentError, "The input argument (attributes) must be a hash in `AgentPushKit::AcceptedResponse` initialize method"
55
+ end
56
+
57
+ # check to see if the attribute exists and convert string to symbol for hash key
58
+ acceptable_attribute_map = self.class.acceptable_attribute_map
59
+ attributes = attributes.each_with_object({}) { |(k, v), h|
60
+ if (!acceptable_attribute_map.key?(k.to_sym))
61
+ fail ArgumentError, "`#{k}` is not a valid attribute in `AgentPushKit::AcceptedResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
62
+ end
63
+ h[k.to_sym] = v
64
+ }
65
+
66
+ if attributes.key?(:'accepted')
67
+ self.accepted = attributes[:'accepted']
68
+ else
69
+ self.accepted = nil
70
+ end
71
+ end
72
+
73
+ # Show invalid properties with the reasons. Usually used together with valid?
74
+ # @return Array for valid properties with the reasons
75
+ def list_invalid_properties
76
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
77
+ invalid_properties = Array.new
78
+ if @accepted.nil?
79
+ invalid_properties.push('invalid value for "accepted", accepted cannot be nil.')
80
+ end
81
+
82
+ invalid_properties
83
+ end
84
+
85
+ # Check to see if the all the properties in the model are valid
86
+ # @return true if the model is valid
87
+ def valid?
88
+ warn '[DEPRECATED] the `valid?` method is obsolete'
89
+ return false if @accepted.nil?
90
+ true
91
+ end
92
+
93
+ # Custom attribute writer method with validation
94
+ # @param [Object] accepted Value to be assigned
95
+ def accepted=(accepted)
96
+ if accepted.nil?
97
+ fail ArgumentError, 'accepted cannot be nil'
98
+ end
99
+
100
+ @accepted = accepted
101
+ end
102
+
103
+ # Checks equality by comparing each attribute.
104
+ # @param [Object] Object to be compared
105
+ def ==(o)
106
+ return true if self.equal?(o)
107
+ self.class == o.class &&
108
+ accepted == o.accepted
109
+ end
110
+
111
+ # @see the `==` method
112
+ # @param [Object] Object to be compared
113
+ def eql?(o)
114
+ self == o
115
+ end
116
+
117
+ # Calculates hash code according to all attributes.
118
+ # @return [Integer] Hash code
119
+ def hash
120
+ [accepted].hash
121
+ end
122
+
123
+ # Builds the object from hash
124
+ # @param [Hash] attributes Model attributes in the form of hash
125
+ # @return [Object] Returns the model itself
126
+ def self.build_from_hash(attributes)
127
+ return nil unless attributes.is_a?(Hash)
128
+ attributes = attributes.transform_keys(&:to_sym)
129
+ transformed_hash = {}
130
+ openapi_types.each_pair do |key, type|
131
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
132
+ transformed_hash["#{key}"] = nil
133
+ elsif type =~ /\AArray<(.*)>/i
134
+ # check to ensure the input is an array given that the attribute
135
+ # is documented as an array but the input is not
136
+ if attributes[attribute_map[key]].is_a?(Array)
137
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
138
+ end
139
+ elsif !attributes[attribute_map[key]].nil?
140
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
141
+ end
142
+ end
143
+ new(transformed_hash)
144
+ end
145
+
146
+ # Returns the object in the form of hash
147
+ # @return [Hash] Returns the object in the form of hash
148
+ def to_hash
149
+ hash = {}
150
+ self.class.attribute_map.each_pair do |attr, param|
151
+ value = self.send(attr)
152
+ if value.nil?
153
+ is_nullable = self.class.openapi_nullable.include?(attr)
154
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
155
+ end
156
+
157
+ hash[param] = _to_hash(value)
158
+ end
159
+ hash
160
+ end
161
+
162
+ end
163
+
164
+ end
@@ -0,0 +1,173 @@
1
+ =begin
2
+ #Agent Push Kit API
3
+
4
+ #The complete Agent Push Kit REST API. Application event ingestion uses an organization key beginning with `apk_`. Authenticated user operations accept either an Agent Push Kit login JWT or an agent access token beginning with `apt_`.
5
+
6
+ The version of the OpenAPI document: 0.1.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.24.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module AgentPushKit
17
+ class AddMemberInput < ApiModelBase
18
+ attr_accessor :email
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'email' => :'email'
24
+ }
25
+ end
26
+
27
+ # Returns attribute mapping this model knows about
28
+ def self.acceptable_attribute_map
29
+ attribute_map
30
+ end
31
+
32
+ # Returns all the JSON keys this model knows about
33
+ def self.acceptable_attributes
34
+ acceptable_attribute_map.values
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ def self.openapi_types
39
+ {
40
+ :'email' => :'String'
41
+ }
42
+ end
43
+
44
+ # List of attributes with nullable: true
45
+ def self.openapi_nullable
46
+ Set.new([
47
+ ])
48
+ end
49
+
50
+ # Initializes the object
51
+ # @param [Hash] attributes Model attributes in the form of hash
52
+ def initialize(attributes = {})
53
+ if (!attributes.is_a?(Hash))
54
+ fail ArgumentError, "The input argument (attributes) must be a hash in `AgentPushKit::AddMemberInput` initialize method"
55
+ end
56
+
57
+ # check to see if the attribute exists and convert string to symbol for hash key
58
+ acceptable_attribute_map = self.class.acceptable_attribute_map
59
+ attributes = attributes.each_with_object({}) { |(k, v), h|
60
+ if (!acceptable_attribute_map.key?(k.to_sym))
61
+ fail ArgumentError, "`#{k}` is not a valid attribute in `AgentPushKit::AddMemberInput`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
62
+ end
63
+ h[k.to_sym] = v
64
+ }
65
+
66
+ if attributes.key?(:'email')
67
+ self.email = attributes[:'email']
68
+ else
69
+ self.email = nil
70
+ end
71
+ end
72
+
73
+ # Show invalid properties with the reasons. Usually used together with valid?
74
+ # @return Array for valid properties with the reasons
75
+ def list_invalid_properties
76
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
77
+ invalid_properties = Array.new
78
+ if @email.nil?
79
+ invalid_properties.push('invalid value for "email", email cannot be nil.')
80
+ end
81
+
82
+ if @email.to_s.length > 320
83
+ invalid_properties.push('invalid value for "email", the character length must be smaller than or equal to 320.')
84
+ end
85
+
86
+ invalid_properties
87
+ end
88
+
89
+ # Check to see if the all the properties in the model are valid
90
+ # @return true if the model is valid
91
+ def valid?
92
+ warn '[DEPRECATED] the `valid?` method is obsolete'
93
+ return false if @email.nil?
94
+ return false if @email.to_s.length > 320
95
+ true
96
+ end
97
+
98
+ # Custom attribute writer method with validation
99
+ # @param [Object] email Value to be assigned
100
+ def email=(email)
101
+ if email.nil?
102
+ fail ArgumentError, 'email cannot be nil'
103
+ end
104
+
105
+ if email.to_s.length > 320
106
+ fail ArgumentError, 'invalid value for "email", the character length must be smaller than or equal to 320.'
107
+ end
108
+
109
+ @email = email
110
+ end
111
+
112
+ # Checks equality by comparing each attribute.
113
+ # @param [Object] Object to be compared
114
+ def ==(o)
115
+ return true if self.equal?(o)
116
+ self.class == o.class &&
117
+ email == o.email
118
+ end
119
+
120
+ # @see the `==` method
121
+ # @param [Object] Object to be compared
122
+ def eql?(o)
123
+ self == o
124
+ end
125
+
126
+ # Calculates hash code according to all attributes.
127
+ # @return [Integer] Hash code
128
+ def hash
129
+ [email].hash
130
+ end
131
+
132
+ # Builds the object from hash
133
+ # @param [Hash] attributes Model attributes in the form of hash
134
+ # @return [Object] Returns the model itself
135
+ def self.build_from_hash(attributes)
136
+ return nil unless attributes.is_a?(Hash)
137
+ attributes = attributes.transform_keys(&:to_sym)
138
+ transformed_hash = {}
139
+ openapi_types.each_pair do |key, type|
140
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
141
+ transformed_hash["#{key}"] = nil
142
+ elsif type =~ /\AArray<(.*)>/i
143
+ # check to ensure the input is an array given that the attribute
144
+ # is documented as an array but the input is not
145
+ if attributes[attribute_map[key]].is_a?(Array)
146
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
147
+ end
148
+ elsif !attributes[attribute_map[key]].nil?
149
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
150
+ end
151
+ end
152
+ new(transformed_hash)
153
+ end
154
+
155
+ # Returns the object in the form of hash
156
+ # @return [Hash] Returns the object in the form of hash
157
+ def to_hash
158
+ hash = {}
159
+ self.class.attribute_map.each_pair do |attr, param|
160
+ value = self.send(attr)
161
+ if value.nil?
162
+ is_nullable = self.class.openapi_nullable.include?(attr)
163
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
164
+ end
165
+
166
+ hash[param] = _to_hash(value)
167
+ end
168
+ hash
169
+ end
170
+
171
+ end
172
+
173
+ end