hooksniff 0.1.0 → 0.3.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 (144) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +4 -1
  3. data/lib/openapi_client/api/admin_api.rb +452 -0
  4. data/lib/openapi_client/api/alerts_api.rb +322 -0
  5. data/lib/openapi_client/api/analytics_api.rb +208 -0
  6. data/lib/openapi_client/api/api_keys_api.rb +252 -0
  7. data/lib/openapi_client/api/audit_log_api.rb +140 -0
  8. data/lib/openapi_client/api/auth_api.rb +1080 -0
  9. data/lib/openapi_client/api/billing_api.rb +500 -0
  10. data/lib/openapi_client/api/contact_api.rb +88 -0
  11. data/lib/openapi_client/api/custom_domains_api.rb +253 -0
  12. data/lib/openapi_client/api/customer_portal_api.rb +700 -0
  13. data/lib/openapi_client/api/delivery_details_api.rb +146 -0
  14. data/lib/openapi_client/api/devices_api.rb +202 -0
  15. data/lib/openapi_client/api/embed_api.rb +128 -0
  16. data/lib/openapi_client/api/endpoints_api.rb +468 -0
  17. data/lib/openapi_client/api/events_api.rb +75 -0
  18. data/lib/openapi_client/api/health_api.rb +193 -0
  19. data/lib/openapi_client/api/inbound_api.rb +170 -0
  20. data/lib/openapi_client/api/notifications_api.rb +309 -0
  21. data/lib/openapi_client/api/o_auth_api.rb +181 -0
  22. data/lib/openapi_client/api/outbound_ips_api.rb +77 -0
  23. data/lib/openapi_client/api/playground_api.rb +143 -0
  24. data/lib/openapi_client/api/rate_limits_api.rb +252 -0
  25. data/lib/openapi_client/api/routing_api.rb +393 -0
  26. data/lib/openapi_client/api/schemas_api.rb +268 -0
  27. data/lib/openapi_client/api/search_api.rb +96 -0
  28. data/lib/openapi_client/api/simulator_api.rb +82 -0
  29. data/lib/openapi_client/api/sso_api.rb +241 -0
  30. data/lib/openapi_client/api/stats_api.rb +77 -0
  31. data/lib/openapi_client/api/stream_api.rb +88 -0
  32. data/lib/openapi_client/api/teams_api.rb +476 -0
  33. data/lib/openapi_client/api/templates_api.rb +213 -0
  34. data/lib/openapi_client/api/transforms_api.rb +368 -0
  35. data/lib/openapi_client/api/webhooks_api.rb +534 -0
  36. data/lib/openapi_client/api_client.rb +397 -0
  37. data/lib/openapi_client/api_error.rb +58 -0
  38. data/lib/openapi_client/api_model_base.rb +88 -0
  39. data/lib/openapi_client/configuration.rb +312 -0
  40. data/lib/openapi_client/models/admin_revenue_get200_response_inner.rb +165 -0
  41. data/lib/openapi_client/models/admin_sdk_update_post_request.rb +156 -0
  42. data/lib/openapi_client/models/admin_users_id_plan_put_request.rb +181 -0
  43. data/lib/openapi_client/models/admin_users_id_status_put_request.rb +147 -0
  44. data/lib/openapi_client/models/alert_rule.rb +237 -0
  45. data/lib/openapi_client/models/api_key_info.rb +185 -0
  46. data/lib/openapi_client/models/apply_template_request.rb +173 -0
  47. data/lib/openapi_client/models/apply_template_response.rb +156 -0
  48. data/lib/openapi_client/models/auth2fa_enable_post200_response.rb +156 -0
  49. data/lib/openapi_client/models/auth_login_post200_response.rb +104 -0
  50. data/lib/openapi_client/models/auth_response.rb +167 -0
  51. data/lib/openapi_client/models/batch_replay_request.rb +166 -0
  52. data/lib/openapi_client/models/batch_response.rb +160 -0
  53. data/lib/openapi_client/models/batch_response_errors_inner.rb +156 -0
  54. data/lib/openapi_client/models/batch_webhook_request.rb +166 -0
  55. data/lib/openapi_client/models/billing_portal_post200_response.rb +147 -0
  56. data/lib/openapi_client/models/change_password_request.rb +199 -0
  57. data/lib/openapi_client/models/change_role_request.rb +188 -0
  58. data/lib/openapi_client/models/confirm2fa_request.rb +182 -0
  59. data/lib/openapi_client/models/contact_request.rb +242 -0
  60. data/lib/openapi_client/models/contact_response.rb +156 -0
  61. data/lib/openapi_client/models/create_alert_request.rb +277 -0
  62. data/lib/openapi_client/models/create_api_key_response.rb +175 -0
  63. data/lib/openapi_client/models/create_endpoint_request.rb +288 -0
  64. data/lib/openapi_client/models/create_team_request.rb +164 -0
  65. data/lib/openapi_client/models/create_transform_rule_request.rb +216 -0
  66. data/lib/openapi_client/models/create_webhook_request.rb +201 -0
  67. data/lib/openapi_client/models/custom_domains_post_request.rb +147 -0
  68. data/lib/openapi_client/models/customer_response.rb +256 -0
  69. data/lib/openapi_client/models/delivery.rb +246 -0
  70. data/lib/openapi_client/models/delivery_attempt.rb +205 -0
  71. data/lib/openapi_client/models/delivery_list_response.rb +176 -0
  72. data/lib/openapi_client/models/delivery_trend_response.rb +158 -0
  73. data/lib/openapi_client/models/delivery_trend_response_buckets_inner.rb +174 -0
  74. data/lib/openapi_client/models/device_token_response.rb +174 -0
  75. data/lib/openapi_client/models/disable2fa_request.rb +164 -0
  76. data/lib/openapi_client/models/enable2fa_request.rb +164 -0
  77. data/lib/openapi_client/models/endpoint.rb +321 -0
  78. data/lib/openapi_client/models/endpoint_health.rb +183 -0
  79. data/lib/openapi_client/models/endpoints_endpoint_id_transforms_test_post_request.rb +156 -0
  80. data/lib/openapi_client/models/endpoints_id_rotate_secret_post200_response.rb +156 -0
  81. data/lib/openapi_client/models/error.rb +165 -0
  82. data/lib/openapi_client/models/forgot_password_request.rb +164 -0
  83. data/lib/openapi_client/models/invite_request.rb +207 -0
  84. data/lib/openapi_client/models/invoice_response.rb +183 -0
  85. data/lib/openapi_client/models/latency_trend_response.rb +167 -0
  86. data/lib/openapi_client/models/latency_trend_response_buckets_inner.rb +165 -0
  87. data/lib/openapi_client/models/login_request.rb +190 -0
  88. data/lib/openapi_client/models/notification.rb +193 -0
  89. data/lib/openapi_client/models/notification_list_response.rb +167 -0
  90. data/lib/openapi_client/models/notification_preferences.rb +201 -0
  91. data/lib/openapi_client/models/notifications_unread_count_get200_response.rb +147 -0
  92. data/lib/openapi_client/models/outbound_ips_response.rb +158 -0
  93. data/lib/openapi_client/models/paginated_users.rb +176 -0
  94. data/lib/openapi_client/models/playground_get200_response.rb +160 -0
  95. data/lib/openapi_client/models/portal_notifications_put200_response.rb +156 -0
  96. data/lib/openapi_client/models/portal_profile.rb +184 -0
  97. data/lib/openapi_client/models/refresh_token_request.rb +164 -0
  98. data/lib/openapi_client/models/register_device_request.rb +208 -0
  99. data/lib/openapi_client/models/register_request.rb +201 -0
  100. data/lib/openapi_client/models/register_schema_request.rb +191 -0
  101. data/lib/openapi_client/models/resend_verification_request.rb +164 -0
  102. data/lib/openapi_client/models/reset_password_request.rb +199 -0
  103. data/lib/openapi_client/models/retry_policy.rb +216 -0
  104. data/lib/openapi_client/models/routing_info.rb +193 -0
  105. data/lib/openapi_client/models/search_result.rb +158 -0
  106. data/lib/openapi_client/models/simulator_post_request.rb +165 -0
  107. data/lib/openapi_client/models/sso_config_post_request.rb +190 -0
  108. data/lib/openapi_client/models/stats_response.rb +210 -0
  109. data/lib/openapi_client/models/stream_params.rb +201 -0
  110. data/lib/openapi_client/models/subscription_response.rb +201 -0
  111. data/lib/openapi_client/models/success_rate_response.rb +183 -0
  112. data/lib/openapi_client/models/system_stats.rb +185 -0
  113. data/lib/openapi_client/models/system_stats_plan_breakdown_inner.rb +156 -0
  114. data/lib/openapi_client/models/system_status.rb +210 -0
  115. data/lib/openapi_client/models/system_status_components_inner.rb +184 -0
  116. data/lib/openapi_client/models/team.rb +165 -0
  117. data/lib/openapi_client/models/team_detail_response.rb +169 -0
  118. data/lib/openapi_client/models/team_invite.rb +174 -0
  119. data/lib/openapi_client/models/team_member.rb +193 -0
  120. data/lib/openapi_client/models/test_webhook_request.rb +199 -0
  121. data/lib/openapi_client/models/test_webhook_response.rb +174 -0
  122. data/lib/openapi_client/models/transform_rule.rb +201 -0
  123. data/lib/openapi_client/models/two_factor_required_response.rb +165 -0
  124. data/lib/openapi_client/models/update_endpoint_request.rb +278 -0
  125. data/lib/openapi_client/models/update_notification_preferences.rb +195 -0
  126. data/lib/openapi_client/models/update_profile_request.rb +190 -0
  127. data/lib/openapi_client/models/update_routing_request.rb +190 -0
  128. data/lib/openapi_client/models/upgrade_request.rb +209 -0
  129. data/lib/openapi_client/models/upgrade_response.rb +166 -0
  130. data/lib/openapi_client/models/usage_response.rb +201 -0
  131. data/lib/openapi_client/models/user_summary.rb +193 -0
  132. data/lib/openapi_client/models/validate_event_request.rb +164 -0
  133. data/lib/openapi_client/models/verify2fa_request.rb +208 -0
  134. data/lib/openapi_client/models/verify_email_request.rb +164 -0
  135. data/lib/openapi_client/models/webhook_template.rb +183 -0
  136. data/lib/openapi_client/version.rb +15 -0
  137. data/lib/openapi_client.rb +169 -0
  138. metadata +139 -10
  139. data/lib/hooksniff/client.rb +0 -213
  140. data/lib/hooksniff/errors.rb +0 -43
  141. data/lib/hooksniff/models.rb +0 -136
  142. data/lib/hooksniff/verification.rb +0 -134
  143. data/lib/hooksniff/version.rb +0 -5
  144. data/lib/hooksniff.rb +0 -19
@@ -0,0 +1,193 @@
1
+ =begin
2
+ #HookSniff API
3
+
4
+ #Webhook delivery, monitoring, and management API. All endpoints under `/v1` require authentication via `Authorization: Bearer <api_key>` header unless marked as **Public**.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ Contact: support@hooksniff.vercel.app
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.22.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module OpenapiClient
17
+ class RoutingInfo < ApiModelBase
18
+ attr_accessor :endpoint_id
19
+
20
+ attr_accessor :routing_strategy
21
+
22
+ attr_accessor :fallback_url
23
+
24
+ attr_accessor :avg_response_ms
25
+
26
+ attr_accessor :failure_streak
27
+
28
+ attr_accessor :is_healthy
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ def self.attribute_map
32
+ {
33
+ :'endpoint_id' => :'endpoint_id',
34
+ :'routing_strategy' => :'routing_strategy',
35
+ :'fallback_url' => :'fallback_url',
36
+ :'avg_response_ms' => :'avg_response_ms',
37
+ :'failure_streak' => :'failure_streak',
38
+ :'is_healthy' => :'is_healthy'
39
+ }
40
+ end
41
+
42
+ # Returns attribute mapping this model knows about
43
+ def self.acceptable_attribute_map
44
+ attribute_map
45
+ end
46
+
47
+ # Returns all the JSON keys this model knows about
48
+ def self.acceptable_attributes
49
+ acceptable_attribute_map.values
50
+ end
51
+
52
+ # Attribute type mapping.
53
+ def self.openapi_types
54
+ {
55
+ :'endpoint_id' => :'String',
56
+ :'routing_strategy' => :'String',
57
+ :'fallback_url' => :'String',
58
+ :'avg_response_ms' => :'Integer',
59
+ :'failure_streak' => :'Integer',
60
+ :'is_healthy' => :'Boolean'
61
+ }
62
+ end
63
+
64
+ # List of attributes with nullable: true
65
+ def self.openapi_nullable
66
+ Set.new([
67
+ :'fallback_url',
68
+ ])
69
+ end
70
+
71
+ # Initializes the object
72
+ # @param [Hash] attributes Model attributes in the form of hash
73
+ def initialize(attributes = {})
74
+ if (!attributes.is_a?(Hash))
75
+ fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::RoutingInfo` initialize method"
76
+ end
77
+
78
+ # check to see if the attribute exists and convert string to symbol for hash key
79
+ acceptable_attribute_map = self.class.acceptable_attribute_map
80
+ attributes = attributes.each_with_object({}) { |(k, v), h|
81
+ if (!acceptable_attribute_map.key?(k.to_sym))
82
+ fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::RoutingInfo`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
83
+ end
84
+ h[k.to_sym] = v
85
+ }
86
+
87
+ if attributes.key?(:'endpoint_id')
88
+ self.endpoint_id = attributes[:'endpoint_id']
89
+ end
90
+
91
+ if attributes.key?(:'routing_strategy')
92
+ self.routing_strategy = attributes[:'routing_strategy']
93
+ end
94
+
95
+ if attributes.key?(:'fallback_url')
96
+ self.fallback_url = attributes[:'fallback_url']
97
+ end
98
+
99
+ if attributes.key?(:'avg_response_ms')
100
+ self.avg_response_ms = attributes[:'avg_response_ms']
101
+ end
102
+
103
+ if attributes.key?(:'failure_streak')
104
+ self.failure_streak = attributes[:'failure_streak']
105
+ end
106
+
107
+ if attributes.key?(:'is_healthy')
108
+ self.is_healthy = attributes[:'is_healthy']
109
+ end
110
+ end
111
+
112
+ # Show invalid properties with the reasons. Usually used together with valid?
113
+ # @return Array for valid properties with the reasons
114
+ def list_invalid_properties
115
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
116
+ invalid_properties = Array.new
117
+ invalid_properties
118
+ end
119
+
120
+ # Check to see if the all the properties in the model are valid
121
+ # @return true if the model is valid
122
+ def valid?
123
+ warn '[DEPRECATED] the `valid?` method is obsolete'
124
+ true
125
+ end
126
+
127
+ # Checks equality by comparing each attribute.
128
+ # @param [Object] Object to be compared
129
+ def ==(o)
130
+ return true if self.equal?(o)
131
+ self.class == o.class &&
132
+ endpoint_id == o.endpoint_id &&
133
+ routing_strategy == o.routing_strategy &&
134
+ fallback_url == o.fallback_url &&
135
+ avg_response_ms == o.avg_response_ms &&
136
+ failure_streak == o.failure_streak &&
137
+ is_healthy == o.is_healthy
138
+ end
139
+
140
+ # @see the `==` method
141
+ # @param [Object] Object to be compared
142
+ def eql?(o)
143
+ self == o
144
+ end
145
+
146
+ # Calculates hash code according to all attributes.
147
+ # @return [Integer] Hash code
148
+ def hash
149
+ [endpoint_id, routing_strategy, fallback_url, avg_response_ms, failure_streak, is_healthy].hash
150
+ end
151
+
152
+ # Builds the object from hash
153
+ # @param [Hash] attributes Model attributes in the form of hash
154
+ # @return [Object] Returns the model itself
155
+ def self.build_from_hash(attributes)
156
+ return nil unless attributes.is_a?(Hash)
157
+ attributes = attributes.transform_keys(&:to_sym)
158
+ transformed_hash = {}
159
+ openapi_types.each_pair do |key, type|
160
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
161
+ transformed_hash["#{key}"] = nil
162
+ elsif type =~ /\AArray<(.*)>/i
163
+ # check to ensure the input is an array given that the attribute
164
+ # is documented as an array but the input is not
165
+ if attributes[attribute_map[key]].is_a?(Array)
166
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
167
+ end
168
+ elsif !attributes[attribute_map[key]].nil?
169
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
170
+ end
171
+ end
172
+ new(transformed_hash)
173
+ end
174
+
175
+ # Returns the object in the form of hash
176
+ # @return [Hash] Returns the object in the form of hash
177
+ def to_hash
178
+ hash = {}
179
+ self.class.attribute_map.each_pair do |attr, param|
180
+ value = self.send(attr)
181
+ if value.nil?
182
+ is_nullable = self.class.openapi_nullable.include?(attr)
183
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
184
+ end
185
+
186
+ hash[param] = _to_hash(value)
187
+ end
188
+ hash
189
+ end
190
+
191
+ end
192
+
193
+ end
@@ -0,0 +1,158 @@
1
+ =begin
2
+ #HookSniff API
3
+
4
+ #Webhook delivery, monitoring, and management API. All endpoints under `/v1` require authentication via `Authorization: Bearer <api_key>` header unless marked as **Public**.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ Contact: support@hooksniff.vercel.app
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.22.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module OpenapiClient
17
+ class SearchResult < ApiModelBase
18
+ attr_accessor :deliveries
19
+
20
+ attr_accessor :total
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'deliveries' => :'deliveries',
26
+ :'total' => :'total'
27
+ }
28
+ end
29
+
30
+ # Returns attribute mapping this model knows about
31
+ def self.acceptable_attribute_map
32
+ attribute_map
33
+ end
34
+
35
+ # Returns all the JSON keys this model knows about
36
+ def self.acceptable_attributes
37
+ acceptable_attribute_map.values
38
+ end
39
+
40
+ # Attribute type mapping.
41
+ def self.openapi_types
42
+ {
43
+ :'deliveries' => :'Array<Delivery>',
44
+ :'total' => :'Integer'
45
+ }
46
+ end
47
+
48
+ # List of attributes with nullable: true
49
+ def self.openapi_nullable
50
+ Set.new([
51
+ ])
52
+ end
53
+
54
+ # Initializes the object
55
+ # @param [Hash] attributes Model attributes in the form of hash
56
+ def initialize(attributes = {})
57
+ if (!attributes.is_a?(Hash))
58
+ fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::SearchResult` initialize method"
59
+ end
60
+
61
+ # check to see if the attribute exists and convert string to symbol for hash key
62
+ acceptable_attribute_map = self.class.acceptable_attribute_map
63
+ attributes = attributes.each_with_object({}) { |(k, v), h|
64
+ if (!acceptable_attribute_map.key?(k.to_sym))
65
+ fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::SearchResult`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
66
+ end
67
+ h[k.to_sym] = v
68
+ }
69
+
70
+ if attributes.key?(:'deliveries')
71
+ if (value = attributes[:'deliveries']).is_a?(Array)
72
+ self.deliveries = value
73
+ end
74
+ end
75
+
76
+ if attributes.key?(:'total')
77
+ self.total = attributes[:'total']
78
+ end
79
+ end
80
+
81
+ # Show invalid properties with the reasons. Usually used together with valid?
82
+ # @return Array for valid properties with the reasons
83
+ def list_invalid_properties
84
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
85
+ invalid_properties = Array.new
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
+ true
94
+ end
95
+
96
+ # Checks equality by comparing each attribute.
97
+ # @param [Object] Object to be compared
98
+ def ==(o)
99
+ return true if self.equal?(o)
100
+ self.class == o.class &&
101
+ deliveries == o.deliveries &&
102
+ total == o.total
103
+ end
104
+
105
+ # @see the `==` method
106
+ # @param [Object] Object to be compared
107
+ def eql?(o)
108
+ self == o
109
+ end
110
+
111
+ # Calculates hash code according to all attributes.
112
+ # @return [Integer] Hash code
113
+ def hash
114
+ [deliveries, total].hash
115
+ end
116
+
117
+ # Builds the object from hash
118
+ # @param [Hash] attributes Model attributes in the form of hash
119
+ # @return [Object] Returns the model itself
120
+ def self.build_from_hash(attributes)
121
+ return nil unless attributes.is_a?(Hash)
122
+ attributes = attributes.transform_keys(&:to_sym)
123
+ transformed_hash = {}
124
+ openapi_types.each_pair do |key, type|
125
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
126
+ transformed_hash["#{key}"] = nil
127
+ elsif type =~ /\AArray<(.*)>/i
128
+ # check to ensure the input is an array given that the attribute
129
+ # is documented as an array but the input is not
130
+ if attributes[attribute_map[key]].is_a?(Array)
131
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
132
+ end
133
+ elsif !attributes[attribute_map[key]].nil?
134
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
135
+ end
136
+ end
137
+ new(transformed_hash)
138
+ end
139
+
140
+ # Returns the object in the form of hash
141
+ # @return [Hash] Returns the object in the form of hash
142
+ def to_hash
143
+ hash = {}
144
+ self.class.attribute_map.each_pair do |attr, param|
145
+ value = self.send(attr)
146
+ if value.nil?
147
+ is_nullable = self.class.openapi_nullable.include?(attr)
148
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
149
+ end
150
+
151
+ hash[param] = _to_hash(value)
152
+ end
153
+ hash
154
+ end
155
+
156
+ end
157
+
158
+ end
@@ -0,0 +1,165 @@
1
+ =begin
2
+ #HookSniff API
3
+
4
+ #Webhook delivery, monitoring, and management API. All endpoints under `/v1` require authentication via `Authorization: Bearer <api_key>` header unless marked as **Public**.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ Contact: support@hooksniff.vercel.app
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.22.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module OpenapiClient
17
+ class SimulatorPostRequest < ApiModelBase
18
+ attr_accessor :endpoint_id
19
+
20
+ attr_accessor :event
21
+
22
+ attr_accessor :data
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'endpoint_id' => :'endpoint_id',
28
+ :'event' => :'event',
29
+ :'data' => :'data'
30
+ }
31
+ end
32
+
33
+ # Returns attribute mapping this model knows about
34
+ def self.acceptable_attribute_map
35
+ attribute_map
36
+ end
37
+
38
+ # Returns all the JSON keys this model knows about
39
+ def self.acceptable_attributes
40
+ acceptable_attribute_map.values
41
+ end
42
+
43
+ # Attribute type mapping.
44
+ def self.openapi_types
45
+ {
46
+ :'endpoint_id' => :'String',
47
+ :'event' => :'String',
48
+ :'data' => :'Object'
49
+ }
50
+ end
51
+
52
+ # List of attributes with nullable: true
53
+ def self.openapi_nullable
54
+ Set.new([
55
+ ])
56
+ end
57
+
58
+ # Initializes the object
59
+ # @param [Hash] attributes Model attributes in the form of hash
60
+ def initialize(attributes = {})
61
+ if (!attributes.is_a?(Hash))
62
+ fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::SimulatorPostRequest` initialize method"
63
+ end
64
+
65
+ # check to see if the attribute exists and convert string to symbol for hash key
66
+ acceptable_attribute_map = self.class.acceptable_attribute_map
67
+ attributes = attributes.each_with_object({}) { |(k, v), h|
68
+ if (!acceptable_attribute_map.key?(k.to_sym))
69
+ fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::SimulatorPostRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
70
+ end
71
+ h[k.to_sym] = v
72
+ }
73
+
74
+ if attributes.key?(:'endpoint_id')
75
+ self.endpoint_id = attributes[:'endpoint_id']
76
+ end
77
+
78
+ if attributes.key?(:'event')
79
+ self.event = attributes[:'event']
80
+ end
81
+
82
+ if attributes.key?(:'data')
83
+ self.data = attributes[:'data']
84
+ end
85
+ end
86
+
87
+ # Show invalid properties with the reasons. Usually used together with valid?
88
+ # @return Array for valid properties with the reasons
89
+ def list_invalid_properties
90
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
91
+ invalid_properties = Array.new
92
+ invalid_properties
93
+ end
94
+
95
+ # Check to see if the all the properties in the model are valid
96
+ # @return true if the model is valid
97
+ def valid?
98
+ warn '[DEPRECATED] the `valid?` method is obsolete'
99
+ true
100
+ end
101
+
102
+ # Checks equality by comparing each attribute.
103
+ # @param [Object] Object to be compared
104
+ def ==(o)
105
+ return true if self.equal?(o)
106
+ self.class == o.class &&
107
+ endpoint_id == o.endpoint_id &&
108
+ event == o.event &&
109
+ data == o.data
110
+ end
111
+
112
+ # @see the `==` method
113
+ # @param [Object] Object to be compared
114
+ def eql?(o)
115
+ self == o
116
+ end
117
+
118
+ # Calculates hash code according to all attributes.
119
+ # @return [Integer] Hash code
120
+ def hash
121
+ [endpoint_id, event, data].hash
122
+ end
123
+
124
+ # Builds the object from hash
125
+ # @param [Hash] attributes Model attributes in the form of hash
126
+ # @return [Object] Returns the model itself
127
+ def self.build_from_hash(attributes)
128
+ return nil unless attributes.is_a?(Hash)
129
+ attributes = attributes.transform_keys(&:to_sym)
130
+ transformed_hash = {}
131
+ openapi_types.each_pair do |key, type|
132
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
133
+ transformed_hash["#{key}"] = nil
134
+ elsif type =~ /\AArray<(.*)>/i
135
+ # check to ensure the input is an array given that the attribute
136
+ # is documented as an array but the input is not
137
+ if attributes[attribute_map[key]].is_a?(Array)
138
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
139
+ end
140
+ elsif !attributes[attribute_map[key]].nil?
141
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
142
+ end
143
+ end
144
+ new(transformed_hash)
145
+ end
146
+
147
+ # Returns the object in the form of hash
148
+ # @return [Hash] Returns the object in the form of hash
149
+ def to_hash
150
+ hash = {}
151
+ self.class.attribute_map.each_pair do |attr, param|
152
+ value = self.send(attr)
153
+ if value.nil?
154
+ is_nullable = self.class.openapi_nullable.include?(attr)
155
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
156
+ end
157
+
158
+ hash[param] = _to_hash(value)
159
+ end
160
+ hash
161
+ end
162
+
163
+ end
164
+
165
+ end
@@ -0,0 +1,190 @@
1
+ =begin
2
+ #HookSniff API
3
+
4
+ #Webhook delivery, monitoring, and management API. All endpoints under `/v1` require authentication via `Authorization: Bearer <api_key>` header unless marked as **Public**.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ Contact: support@hooksniff.vercel.app
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.22.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module OpenapiClient
17
+ class SsoConfigPostRequest < ApiModelBase
18
+ attr_accessor :provider
19
+
20
+ attr_accessor :enabled
21
+
22
+ class EnumAttributeValidator
23
+ attr_reader :datatype
24
+ attr_reader :allowable_values
25
+
26
+ def initialize(datatype, allowable_values)
27
+ @allowable_values = allowable_values.map do |value|
28
+ case datatype.to_s
29
+ when /Integer/i
30
+ value.to_i
31
+ when /Float/i
32
+ value.to_f
33
+ else
34
+ value
35
+ end
36
+ end
37
+ end
38
+
39
+ def valid?(value)
40
+ !value || allowable_values.include?(value)
41
+ end
42
+ end
43
+
44
+ # Attribute mapping from ruby-style variable name to JSON key.
45
+ def self.attribute_map
46
+ {
47
+ :'provider' => :'provider',
48
+ :'enabled' => :'enabled'
49
+ }
50
+ end
51
+
52
+ # Returns attribute mapping this model knows about
53
+ def self.acceptable_attribute_map
54
+ attribute_map
55
+ end
56
+
57
+ # Returns all the JSON keys this model knows about
58
+ def self.acceptable_attributes
59
+ acceptable_attribute_map.values
60
+ end
61
+
62
+ # Attribute type mapping.
63
+ def self.openapi_types
64
+ {
65
+ :'provider' => :'String',
66
+ :'enabled' => :'Boolean'
67
+ }
68
+ end
69
+
70
+ # List of attributes with nullable: true
71
+ def self.openapi_nullable
72
+ Set.new([
73
+ ])
74
+ end
75
+
76
+ # Initializes the object
77
+ # @param [Hash] attributes Model attributes in the form of hash
78
+ def initialize(attributes = {})
79
+ if (!attributes.is_a?(Hash))
80
+ fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::SsoConfigPostRequest` initialize method"
81
+ end
82
+
83
+ # check to see if the attribute exists and convert string to symbol for hash key
84
+ acceptable_attribute_map = self.class.acceptable_attribute_map
85
+ attributes = attributes.each_with_object({}) { |(k, v), h|
86
+ if (!acceptable_attribute_map.key?(k.to_sym))
87
+ fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::SsoConfigPostRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
88
+ end
89
+ h[k.to_sym] = v
90
+ }
91
+
92
+ if attributes.key?(:'provider')
93
+ self.provider = attributes[:'provider']
94
+ end
95
+
96
+ if attributes.key?(:'enabled')
97
+ self.enabled = attributes[:'enabled']
98
+ end
99
+ end
100
+
101
+ # Show invalid properties with the reasons. Usually used together with valid?
102
+ # @return Array for valid properties with the reasons
103
+ def list_invalid_properties
104
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
105
+ invalid_properties = Array.new
106
+ invalid_properties
107
+ end
108
+
109
+ # Check to see if the all the properties in the model are valid
110
+ # @return true if the model is valid
111
+ def valid?
112
+ warn '[DEPRECATED] the `valid?` method is obsolete'
113
+ provider_validator = EnumAttributeValidator.new('String', ["saml", "oidc"])
114
+ return false unless provider_validator.valid?(@provider)
115
+ true
116
+ end
117
+
118
+ # Custom attribute writer method checking allowed values (enum).
119
+ # @param [Object] provider Object to be assigned
120
+ def provider=(provider)
121
+ validator = EnumAttributeValidator.new('String', ["saml", "oidc"])
122
+ unless validator.valid?(provider)
123
+ fail ArgumentError, "invalid value for \"provider\", must be one of #{validator.allowable_values}."
124
+ end
125
+ @provider = provider
126
+ end
127
+
128
+ # Checks equality by comparing each attribute.
129
+ # @param [Object] Object to be compared
130
+ def ==(o)
131
+ return true if self.equal?(o)
132
+ self.class == o.class &&
133
+ provider == o.provider &&
134
+ enabled == o.enabled
135
+ end
136
+
137
+ # @see the `==` method
138
+ # @param [Object] Object to be compared
139
+ def eql?(o)
140
+ self == o
141
+ end
142
+
143
+ # Calculates hash code according to all attributes.
144
+ # @return [Integer] Hash code
145
+ def hash
146
+ [provider, enabled].hash
147
+ end
148
+
149
+ # Builds the object from hash
150
+ # @param [Hash] attributes Model attributes in the form of hash
151
+ # @return [Object] Returns the model itself
152
+ def self.build_from_hash(attributes)
153
+ return nil unless attributes.is_a?(Hash)
154
+ attributes = attributes.transform_keys(&:to_sym)
155
+ transformed_hash = {}
156
+ openapi_types.each_pair do |key, type|
157
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
158
+ transformed_hash["#{key}"] = nil
159
+ elsif type =~ /\AArray<(.*)>/i
160
+ # check to ensure the input is an array given that the attribute
161
+ # is documented as an array but the input is not
162
+ if attributes[attribute_map[key]].is_a?(Array)
163
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
164
+ end
165
+ elsif !attributes[attribute_map[key]].nil?
166
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
167
+ end
168
+ end
169
+ new(transformed_hash)
170
+ end
171
+
172
+ # Returns the object in the form of hash
173
+ # @return [Hash] Returns the object in the form of hash
174
+ def to_hash
175
+ hash = {}
176
+ self.class.attribute_map.each_pair do |attr, param|
177
+ value = self.send(attr)
178
+ if value.nil?
179
+ is_nullable = self.class.openapi_nullable.include?(attr)
180
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
181
+ end
182
+
183
+ hash[param] = _to_hash(value)
184
+ end
185
+ hash
186
+ end
187
+
188
+ end
189
+
190
+ end