pingram 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 (187) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +54 -0
  4. data/Rakefile +10 -0
  5. data/lib/pingram/api/account_api.rb +506 -0
  6. data/lib/pingram/api/addresses_api.rb +209 -0
  7. data/lib/pingram/api/components_api.rb +396 -0
  8. data/lib/pingram/api/default_api.rb +88 -0
  9. data/lib/pingram/api/domains_api.rb +204 -0
  10. data/lib/pingram/api/editor_api.rb +88 -0
  11. data/lib/pingram/api/environments_api.rb +215 -0
  12. data/lib/pingram/api/health_api.rb +77 -0
  13. data/lib/pingram/api/insights_api.rb +88 -0
  14. data/lib/pingram/api/keys_api.rb +204 -0
  15. data/lib/pingram/api/logs_api.rb +375 -0
  16. data/lib/pingram/api/members_api.rb +433 -0
  17. data/lib/pingram/api/sender_api.rb +221 -0
  18. data/lib/pingram/api/templates_api.rb +479 -0
  19. data/lib/pingram/api/types_api.rb +335 -0
  20. data/lib/pingram/api/user_api.rb +587 -0
  21. data/lib/pingram/api/users_api.rb +228 -0
  22. data/lib/pingram/api_client.rb +397 -0
  23. data/lib/pingram/api_error.rb +58 -0
  24. data/lib/pingram/api_model_base.rb +88 -0
  25. data/lib/pingram/client_wrapper.rb +212 -0
  26. data/lib/pingram/configuration.rb +330 -0
  27. data/lib/pingram/models/account_addresses_response.rb +166 -0
  28. data/lib/pingram/models/account_addresses_response_addresses_inner.rb +301 -0
  29. data/lib/pingram/models/account_get_response.rb +354 -0
  30. data/lib/pingram/models/account_get_response_pending_downgrade_usage_limit.rb +201 -0
  31. data/lib/pingram/models/address_response.rb +164 -0
  32. data/lib/pingram/models/auto_join_get_response.rb +192 -0
  33. data/lib/pingram/models/auto_join_post_response.rb +192 -0
  34. data/lib/pingram/models/auto_join_request_body.rb +166 -0
  35. data/lib/pingram/models/bee_token_v2.rb +190 -0
  36. data/lib/pingram/models/billing_post_request_body.rb +216 -0
  37. data/lib/pingram/models/billing_post_response_body.rb +367 -0
  38. data/lib/pingram/models/billing_post_response_body_pending_downgrade_usage_limit.rb +202 -0
  39. data/lib/pingram/models/channels_enum.rb +45 -0
  40. data/lib/pingram/models/create_account_request_body.rb +164 -0
  41. data/lib/pingram/models/create_account_response.rb +190 -0
  42. data/lib/pingram/models/create_address_request.rb +182 -0
  43. data/lib/pingram/models/create_key_request.rb +227 -0
  44. data/lib/pingram/models/create_key_response.rb +308 -0
  45. data/lib/pingram/models/delete_key_response.rb +165 -0
  46. data/lib/pingram/models/delete_user_response.rb +164 -0
  47. data/lib/pingram/models/email_auth_token_post_request.rb +147 -0
  48. data/lib/pingram/models/email_component_patch_request.rb +174 -0
  49. data/lib/pingram/models/email_component_post_request.rb +217 -0
  50. data/lib/pingram/models/email_component_response.rb +424 -0
  51. data/lib/pingram/models/email_component_response_referenced_by_inner.rb +238 -0
  52. data/lib/pingram/models/environment.rb +270 -0
  53. data/lib/pingram/models/environment_create_request.rb +164 -0
  54. data/lib/pingram/models/environment_patch_request.rb +176 -0
  55. data/lib/pingram/models/get_account_metadata_response.rb +164 -0
  56. data/lib/pingram/models/get_account_metadata_response_user_account_metadata.rb +216 -0
  57. data/lib/pingram/models/get_email_components_response_inner.rb +424 -0
  58. data/lib/pingram/models/get_environments_response_inner.rb +270 -0
  59. data/lib/pingram/models/get_inapp_notifications_response.rb +166 -0
  60. data/lib/pingram/models/get_inapp_notifications_response_notifications_inner.rb +389 -0
  61. data/lib/pingram/models/get_inapp_notifications_response_notifications_inner_delivery_options.rb +206 -0
  62. data/lib/pingram/models/get_inapp_notifications_response_notifications_inner_delivery_options_instant.rb +191 -0
  63. data/lib/pingram/models/get_inapp_notifications_response_notifications_inner_delivery_options_off.rb +164 -0
  64. data/lib/pingram/models/get_inapp_notifications_response_notifications_inner_replies_inner.rb +190 -0
  65. data/lib/pingram/models/get_inapp_notifications_response_notifications_inner_template.rb +103 -0
  66. data/lib/pingram/models/get_inapp_notifications_response_notifications_inner_template_any_of.rb +301 -0
  67. data/lib/pingram/models/get_keys_response.rb +168 -0
  68. data/lib/pingram/models/get_keys_response_keys_inner.rb +371 -0
  69. data/lib/pingram/models/get_logs_response.rb +175 -0
  70. data/lib/pingram/models/get_logs_response_messages_inner.rb +419 -0
  71. data/lib/pingram/models/get_logs_response_messages_inner_attachments_inner.rb +225 -0
  72. data/lib/pingram/models/get_members_response_inner.rb +236 -0
  73. data/lib/pingram/models/get_metrics_response_inner.rb +238 -0
  74. data/lib/pingram/models/get_metrics_response_inner_messages_inner.rb +159 -0
  75. data/lib/pingram/models/get_notifications_response_inner.rb +317 -0
  76. data/lib/pingram/models/get_notifications_response_inner_deduplication.rb +164 -0
  77. data/lib/pingram/models/get_notifications_response_inner_options.rb +201 -0
  78. data/lib/pingram/models/get_notifications_response_inner_options_email.rb +242 -0
  79. data/lib/pingram/models/get_notifications_response_inner_options_email_daily.rb +173 -0
  80. data/lib/pingram/models/get_notifications_response_inner_options_email_monthly.rb +216 -0
  81. data/lib/pingram/models/get_notifications_response_inner_options_email_weekly.rb +182 -0
  82. data/lib/pingram/models/get_notifications_response_inner_templates_inner.rb +214 -0
  83. data/lib/pingram/models/get_notifications_response_inner_throttling.rb +294 -0
  84. data/lib/pingram/models/get_senders_response_inner.rb +342 -0
  85. data/lib/pingram/models/get_templates_response.rb +103 -0
  86. data/lib/pingram/models/get_users_response.rb +201 -0
  87. data/lib/pingram/models/get_users_response_users_inner.rb +268 -0
  88. data/lib/pingram/models/get_users_response_users_inner_email_suppression_status.rb +214 -0
  89. data/lib/pingram/models/get_users_response_users_inner_push_tokens_inner.rb +252 -0
  90. data/lib/pingram/models/get_users_response_users_inner_push_tokens_inner_device.rb +209 -0
  91. data/lib/pingram/models/get_users_response_users_inner_slack_token.rb +317 -0
  92. data/lib/pingram/models/get_users_response_users_inner_slack_token_authed_user.rb +192 -0
  93. data/lib/pingram/models/get_users_response_users_inner_slack_token_enterprise.rb +156 -0
  94. data/lib/pingram/models/get_users_response_users_inner_slack_token_incoming_webhook.rb +174 -0
  95. data/lib/pingram/models/get_users_response_users_inner_slack_token_response_metadata.rb +200 -0
  96. data/lib/pingram/models/get_users_response_users_inner_web_push_tokens_inner.rb +164 -0
  97. data/lib/pingram/models/get_users_response_users_inner_web_push_tokens_inner_sub.rb +191 -0
  98. data/lib/pingram/models/get_users_response_users_inner_web_push_tokens_inner_sub_keys.rb +190 -0
  99. data/lib/pingram/models/in_app_notification_patch_request.rb +231 -0
  100. data/lib/pingram/models/in_app_notification_unread_clear_request.rb +156 -0
  101. data/lib/pingram/models/inapp_unread_count_response.rb +164 -0
  102. data/lib/pingram/models/inbound_request_body.rb +103 -0
  103. data/lib/pingram/models/inbound_response_body.rb +216 -0
  104. data/lib/pingram/models/inbound_response_body_results_inner.rb +216 -0
  105. data/lib/pingram/models/ingishts_post_request.rb +288 -0
  106. data/lib/pingram/models/ingishts_post_request_label_options.rb +147 -0
  107. data/lib/pingram/models/ingishts_post_request_metric_data_queries_inner.rb +208 -0
  108. data/lib/pingram/models/ingishts_post_request_metric_data_queries_inner_metric_stat.rb +211 -0
  109. data/lib/pingram/models/ingishts_post_request_metric_data_queries_inner_metric_stat_metric.rb +171 -0
  110. data/lib/pingram/models/ingishts_post_request_metric_data_queries_inner_metric_stat_metric_dimensions_inner.rb +159 -0
  111. data/lib/pingram/models/intercom_webhook.rb +293 -0
  112. data/lib/pingram/models/intercom_webhook_data.rb +164 -0
  113. data/lib/pingram/models/intercom_webhook_data_item.rb +103 -0
  114. data/lib/pingram/models/intercom_webhook_data_item_any_of.rb +453 -0
  115. data/lib/pingram/models/intercom_webhook_data_item_any_of_contacts.rb +216 -0
  116. data/lib/pingram/models/intercom_webhook_data_item_any_of_contacts_contacts_inner.rb +199 -0
  117. data/lib/pingram/models/intercom_webhook_data_item_any_of_source.rb +260 -0
  118. data/lib/pingram/models/intercom_webhook_data_item_any_of_source_author.rb +208 -0
  119. data/lib/pingram/models/invite_post_response.rb +156 -0
  120. data/lib/pingram/models/log_query_post_body.rb +251 -0
  121. data/lib/pingram/models/logs_bulk_request.rb +167 -0
  122. data/lib/pingram/models/logs_get_response.rb +167 -0
  123. data/lib/pingram/models/logs_get_response_logs_inner.rb +1808 -0
  124. data/lib/pingram/models/logs_query_response.rb +165 -0
  125. data/lib/pingram/models/logs_query_result_response.rb +194 -0
  126. data/lib/pingram/models/logs_retention_response.rb +165 -0
  127. data/lib/pingram/models/logs_tail_response.rb +167 -0
  128. data/lib/pingram/models/member_invite_request.rb +173 -0
  129. data/lib/pingram/models/member_update_request.rb +164 -0
  130. data/lib/pingram/models/message_response.rb +164 -0
  131. data/lib/pingram/models/notification.rb +317 -0
  132. data/lib/pingram/models/notification_create_request.rb +227 -0
  133. data/lib/pingram/models/notification_patch_request.rb +203 -0
  134. data/lib/pingram/models/post_email_test_request.rb +303 -0
  135. data/lib/pingram/models/post_email_test_response.rb +175 -0
  136. data/lib/pingram/models/post_senders_request_body.rb +164 -0
  137. data/lib/pingram/models/post_user_request.rb +215 -0
  138. data/lib/pingram/models/sender_post_body.rb +324 -0
  139. data/lib/pingram/models/sender_post_body_email.rb +217 -0
  140. data/lib/pingram/models/sender_post_body_inapp.rb +182 -0
  141. data/lib/pingram/models/sender_post_body_mobile_push.rb +190 -0
  142. data/lib/pingram/models/sender_post_body_options.rb +165 -0
  143. data/lib/pingram/models/sender_post_body_options_apn.rb +201 -0
  144. data/lib/pingram/models/sender_post_body_options_email.rb +209 -0
  145. data/lib/pingram/models/sender_post_body_options_email_attachments_inner.rb +103 -0
  146. data/lib/pingram/models/sender_post_body_options_email_attachments_inner_any_of.rb +190 -0
  147. data/lib/pingram/models/sender_post_body_options_email_attachments_inner_any_of1.rb +199 -0
  148. data/lib/pingram/models/sender_post_body_options_fcm.rb +147 -0
  149. data/lib/pingram/models/sender_post_body_options_fcm_android.rb +208 -0
  150. data/lib/pingram/models/sender_post_body_slack.rb +299 -0
  151. data/lib/pingram/models/sender_post_body_slack_metadata.rb +173 -0
  152. data/lib/pingram/models/sender_post_body_slack_metadata_entities_inner.rb +257 -0
  153. data/lib/pingram/models/sender_post_body_slack_metadata_entities_inner_external_ref.rb +174 -0
  154. data/lib/pingram/models/sender_post_body_sms.rb +156 -0
  155. data/lib/pingram/models/sender_post_body_sms_auto_reply.rb +164 -0
  156. data/lib/pingram/models/sender_post_body_to.rb +251 -0
  157. data/lib/pingram/models/sender_post_body_user.rb +268 -0
  158. data/lib/pingram/models/sender_post_body_web_push.rb +208 -0
  159. data/lib/pingram/models/sender_post_response.rb +192 -0
  160. data/lib/pingram/models/set_default_template_request.rb +204 -0
  161. data/lib/pingram/models/slack_interactivity_response.rb +165 -0
  162. data/lib/pingram/models/slack_oauth_request.rb +190 -0
  163. data/lib/pingram/models/success_response.rb +164 -0
  164. data/lib/pingram/models/supabase_configure_request.rb +242 -0
  165. data/lib/pingram/models/supabase_configure_response.rb +173 -0
  166. data/lib/pingram/models/supabase_o_auth_request.rb +216 -0
  167. data/lib/pingram/models/supabase_o_auth_response.rb +173 -0
  168. data/lib/pingram/models/supabase_projects_response.rb +166 -0
  169. data/lib/pingram/models/supabase_projects_response_projects_inner.rb +268 -0
  170. data/lib/pingram/models/supabase_status_response.rb +208 -0
  171. data/lib/pingram/models/template.rb +301 -0
  172. data/lib/pingram/models/template_patch_request.rb +104 -0
  173. data/lib/pingram/models/template_patch_request_any_of.rb +199 -0
  174. data/lib/pingram/models/template_patch_request_any_of1.rb +187 -0
  175. data/lib/pingram/models/template_patch_request_any_of1_batch.rb +217 -0
  176. data/lib/pingram/models/template_patch_request_any_of1_instant.rb +184 -0
  177. data/lib/pingram/models/template_post_request.rb +346 -0
  178. data/lib/pingram/models/template_post_request_batch.rb +217 -0
  179. data/lib/pingram/models/template_post_request_instant.rb +183 -0
  180. data/lib/pingram/models/update_address_request.rb +182 -0
  181. data/lib/pingram/models/user.rb +268 -0
  182. data/lib/pingram/models/user_suppression_delete_response.rb +164 -0
  183. data/lib/pingram/models/webhook_response.rb +182 -0
  184. data/lib/pingram/version.rb +15 -0
  185. data/lib/pingram.rb +215 -0
  186. data/pingram.gemspec +38 -0
  187. metadata +270 -0
@@ -0,0 +1,424 @@
1
+ =begin
2
+ #NotificationAPI
3
+
4
+ #Internal API for notification delivery and management
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Pingram
17
+ class GetEmailComponentsResponseInner < ApiModelBase
18
+ attr_accessor :env_id
19
+
20
+ attr_accessor :component_id
21
+
22
+ attr_accessor :name
23
+
24
+ attr_accessor :internal
25
+
26
+ attr_accessor :internal_page
27
+
28
+ attr_accessor :html
29
+
30
+ attr_accessor :created_at
31
+
32
+ attr_accessor :modified_at
33
+
34
+ attr_accessor :referenced_by
35
+
36
+ attr_accessor :channel
37
+
38
+ class EnumAttributeValidator
39
+ attr_reader :datatype
40
+ attr_reader :allowable_values
41
+
42
+ def initialize(datatype, allowable_values)
43
+ @allowable_values = allowable_values.map do |value|
44
+ case datatype.to_s
45
+ when /Integer/i
46
+ value.to_i
47
+ when /Float/i
48
+ value.to_f
49
+ else
50
+ value
51
+ end
52
+ end
53
+ end
54
+
55
+ def valid?(value)
56
+ !value || allowable_values.include?(value)
57
+ end
58
+ end
59
+
60
+ # Attribute mapping from ruby-style variable name to JSON key.
61
+ def self.attribute_map
62
+ {
63
+ :'env_id' => :'envId',
64
+ :'component_id' => :'componentId',
65
+ :'name' => :'name',
66
+ :'internal' => :'internal',
67
+ :'internal_page' => :'internalPage',
68
+ :'html' => :'html',
69
+ :'created_at' => :'createdAt',
70
+ :'modified_at' => :'modifiedAt',
71
+ :'referenced_by' => :'referencedBy',
72
+ :'channel' => :'channel'
73
+ }
74
+ end
75
+
76
+ # Returns attribute mapping this model knows about
77
+ def self.acceptable_attribute_map
78
+ attribute_map
79
+ end
80
+
81
+ # Returns all the JSON keys this model knows about
82
+ def self.acceptable_attributes
83
+ acceptable_attribute_map.values
84
+ end
85
+
86
+ # Attribute type mapping.
87
+ def self.openapi_types
88
+ {
89
+ :'env_id' => :'String',
90
+ :'component_id' => :'String',
91
+ :'name' => :'String',
92
+ :'internal' => :'String',
93
+ :'internal_page' => :'String',
94
+ :'html' => :'String',
95
+ :'created_at' => :'String',
96
+ :'modified_at' => :'String',
97
+ :'referenced_by' => :'Array<EmailComponentResponseReferencedByInner>',
98
+ :'channel' => :'String'
99
+ }
100
+ end
101
+
102
+ # List of attributes with nullable: true
103
+ def self.openapi_nullable
104
+ Set.new([
105
+ ])
106
+ end
107
+
108
+ # Initializes the object
109
+ # @param [Hash] attributes Model attributes in the form of hash
110
+ def initialize(attributes = {})
111
+ if (!attributes.is_a?(Hash))
112
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::GetEmailComponentsResponseInner` initialize method"
113
+ end
114
+
115
+ # check to see if the attribute exists and convert string to symbol for hash key
116
+ acceptable_attribute_map = self.class.acceptable_attribute_map
117
+ attributes = attributes.each_with_object({}) { |(k, v), h|
118
+ if (!acceptable_attribute_map.key?(k.to_sym))
119
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::GetEmailComponentsResponseInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
120
+ end
121
+ h[k.to_sym] = v
122
+ }
123
+
124
+ if attributes.key?(:'env_id')
125
+ self.env_id = attributes[:'env_id']
126
+ else
127
+ self.env_id = nil
128
+ end
129
+
130
+ if attributes.key?(:'component_id')
131
+ self.component_id = attributes[:'component_id']
132
+ else
133
+ self.component_id = nil
134
+ end
135
+
136
+ if attributes.key?(:'name')
137
+ self.name = attributes[:'name']
138
+ else
139
+ self.name = nil
140
+ end
141
+
142
+ if attributes.key?(:'internal')
143
+ self.internal = attributes[:'internal']
144
+ else
145
+ self.internal = nil
146
+ end
147
+
148
+ if attributes.key?(:'internal_page')
149
+ self.internal_page = attributes[:'internal_page']
150
+ else
151
+ self.internal_page = nil
152
+ end
153
+
154
+ if attributes.key?(:'html')
155
+ self.html = attributes[:'html']
156
+ else
157
+ self.html = nil
158
+ end
159
+
160
+ if attributes.key?(:'created_at')
161
+ self.created_at = attributes[:'created_at']
162
+ else
163
+ self.created_at = nil
164
+ end
165
+
166
+ if attributes.key?(:'modified_at')
167
+ self.modified_at = attributes[:'modified_at']
168
+ else
169
+ self.modified_at = nil
170
+ end
171
+
172
+ if attributes.key?(:'referenced_by')
173
+ if (value = attributes[:'referenced_by']).is_a?(Array)
174
+ self.referenced_by = value
175
+ end
176
+ else
177
+ self.referenced_by = nil
178
+ end
179
+
180
+ if attributes.key?(:'channel')
181
+ self.channel = attributes[:'channel']
182
+ else
183
+ self.channel = nil
184
+ end
185
+ end
186
+
187
+ # Show invalid properties with the reasons. Usually used together with valid?
188
+ # @return Array for valid properties with the reasons
189
+ def list_invalid_properties
190
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
191
+ invalid_properties = Array.new
192
+ if @env_id.nil?
193
+ invalid_properties.push('invalid value for "env_id", env_id cannot be nil.')
194
+ end
195
+
196
+ if @component_id.nil?
197
+ invalid_properties.push('invalid value for "component_id", component_id cannot be nil.')
198
+ end
199
+
200
+ if @name.nil?
201
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
202
+ end
203
+
204
+ if @internal.nil?
205
+ invalid_properties.push('invalid value for "internal", internal cannot be nil.')
206
+ end
207
+
208
+ if @internal_page.nil?
209
+ invalid_properties.push('invalid value for "internal_page", internal_page cannot be nil.')
210
+ end
211
+
212
+ if @html.nil?
213
+ invalid_properties.push('invalid value for "html", html cannot be nil.')
214
+ end
215
+
216
+ if @created_at.nil?
217
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
218
+ end
219
+
220
+ if @modified_at.nil?
221
+ invalid_properties.push('invalid value for "modified_at", modified_at cannot be nil.')
222
+ end
223
+
224
+ if @referenced_by.nil?
225
+ invalid_properties.push('invalid value for "referenced_by", referenced_by cannot be nil.')
226
+ end
227
+
228
+ if @channel.nil?
229
+ invalid_properties.push('invalid value for "channel", channel cannot be nil.')
230
+ end
231
+
232
+ invalid_properties
233
+ end
234
+
235
+ # Check to see if the all the properties in the model are valid
236
+ # @return true if the model is valid
237
+ def valid?
238
+ warn '[DEPRECATED] the `valid?` method is obsolete'
239
+ return false if @env_id.nil?
240
+ return false if @component_id.nil?
241
+ return false if @name.nil?
242
+ return false if @internal.nil?
243
+ return false if @internal_page.nil?
244
+ return false if @html.nil?
245
+ return false if @created_at.nil?
246
+ return false if @modified_at.nil?
247
+ return false if @referenced_by.nil?
248
+ return false if @channel.nil?
249
+ channel_validator = EnumAttributeValidator.new('String', ["EMAIL"])
250
+ return false unless channel_validator.valid?(@channel)
251
+ true
252
+ end
253
+
254
+ # Custom attribute writer method with validation
255
+ # @param [Object] env_id Value to be assigned
256
+ def env_id=(env_id)
257
+ if env_id.nil?
258
+ fail ArgumentError, 'env_id cannot be nil'
259
+ end
260
+
261
+ @env_id = env_id
262
+ end
263
+
264
+ # Custom attribute writer method with validation
265
+ # @param [Object] component_id Value to be assigned
266
+ def component_id=(component_id)
267
+ if component_id.nil?
268
+ fail ArgumentError, 'component_id cannot be nil'
269
+ end
270
+
271
+ @component_id = component_id
272
+ end
273
+
274
+ # Custom attribute writer method with validation
275
+ # @param [Object] name Value to be assigned
276
+ def name=(name)
277
+ if name.nil?
278
+ fail ArgumentError, 'name cannot be nil'
279
+ end
280
+
281
+ @name = name
282
+ end
283
+
284
+ # Custom attribute writer method with validation
285
+ # @param [Object] internal Value to be assigned
286
+ def internal=(internal)
287
+ if internal.nil?
288
+ fail ArgumentError, 'internal cannot be nil'
289
+ end
290
+
291
+ @internal = internal
292
+ end
293
+
294
+ # Custom attribute writer method with validation
295
+ # @param [Object] internal_page Value to be assigned
296
+ def internal_page=(internal_page)
297
+ if internal_page.nil?
298
+ fail ArgumentError, 'internal_page cannot be nil'
299
+ end
300
+
301
+ @internal_page = internal_page
302
+ end
303
+
304
+ # Custom attribute writer method with validation
305
+ # @param [Object] html Value to be assigned
306
+ def html=(html)
307
+ if html.nil?
308
+ fail ArgumentError, 'html cannot be nil'
309
+ end
310
+
311
+ @html = html
312
+ end
313
+
314
+ # Custom attribute writer method with validation
315
+ # @param [Object] created_at Value to be assigned
316
+ def created_at=(created_at)
317
+ if created_at.nil?
318
+ fail ArgumentError, 'created_at cannot be nil'
319
+ end
320
+
321
+ @created_at = created_at
322
+ end
323
+
324
+ # Custom attribute writer method with validation
325
+ # @param [Object] modified_at Value to be assigned
326
+ def modified_at=(modified_at)
327
+ if modified_at.nil?
328
+ fail ArgumentError, 'modified_at cannot be nil'
329
+ end
330
+
331
+ @modified_at = modified_at
332
+ end
333
+
334
+ # Custom attribute writer method with validation
335
+ # @param [Object] referenced_by Value to be assigned
336
+ def referenced_by=(referenced_by)
337
+ if referenced_by.nil?
338
+ fail ArgumentError, 'referenced_by cannot be nil'
339
+ end
340
+
341
+ @referenced_by = referenced_by
342
+ end
343
+
344
+ # Custom attribute writer method checking allowed values (enum).
345
+ # @param [Object] channel Object to be assigned
346
+ def channel=(channel)
347
+ validator = EnumAttributeValidator.new('String', ["EMAIL"])
348
+ unless validator.valid?(channel)
349
+ fail ArgumentError, "invalid value for \"channel\", must be one of #{validator.allowable_values}."
350
+ end
351
+ @channel = channel
352
+ end
353
+
354
+ # Checks equality by comparing each attribute.
355
+ # @param [Object] Object to be compared
356
+ def ==(o)
357
+ return true if self.equal?(o)
358
+ self.class == o.class &&
359
+ env_id == o.env_id &&
360
+ component_id == o.component_id &&
361
+ name == o.name &&
362
+ internal == o.internal &&
363
+ internal_page == o.internal_page &&
364
+ html == o.html &&
365
+ created_at == o.created_at &&
366
+ modified_at == o.modified_at &&
367
+ referenced_by == o.referenced_by &&
368
+ channel == o.channel
369
+ end
370
+
371
+ # @see the `==` method
372
+ # @param [Object] Object to be compared
373
+ def eql?(o)
374
+ self == o
375
+ end
376
+
377
+ # Calculates hash code according to all attributes.
378
+ # @return [Integer] Hash code
379
+ def hash
380
+ [env_id, component_id, name, internal, internal_page, html, created_at, modified_at, referenced_by, channel].hash
381
+ end
382
+
383
+ # Builds the object from hash
384
+ # @param [Hash] attributes Model attributes in the form of hash
385
+ # @return [Object] Returns the model itself
386
+ def self.build_from_hash(attributes)
387
+ return nil unless attributes.is_a?(Hash)
388
+ attributes = attributes.transform_keys(&:to_sym)
389
+ transformed_hash = {}
390
+ openapi_types.each_pair do |key, type|
391
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
392
+ transformed_hash["#{key}"] = nil
393
+ elsif type =~ /\AArray<(.*)>/i
394
+ # check to ensure the input is an array given that the attribute
395
+ # is documented as an array but the input is not
396
+ if attributes[attribute_map[key]].is_a?(Array)
397
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
398
+ end
399
+ elsif !attributes[attribute_map[key]].nil?
400
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
401
+ end
402
+ end
403
+ new(transformed_hash)
404
+ end
405
+
406
+ # Returns the object in the form of hash
407
+ # @return [Hash] Returns the object in the form of hash
408
+ def to_hash
409
+ hash = {}
410
+ self.class.attribute_map.each_pair do |attr, param|
411
+ value = self.send(attr)
412
+ if value.nil?
413
+ is_nullable = self.class.openapi_nullable.include?(attr)
414
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
415
+ end
416
+
417
+ hash[param] = _to_hash(value)
418
+ end
419
+ hash
420
+ end
421
+
422
+ end
423
+
424
+ end
@@ -0,0 +1,270 @@
1
+ =begin
2
+ #NotificationAPI
3
+
4
+ #Internal API for notification delivery and management
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Pingram
17
+ class GetEnvironmentsResponseInner < ApiModelBase
18
+ attr_accessor :client_id
19
+
20
+ attr_accessor :client_secret
21
+
22
+ attr_accessor :title
23
+
24
+ attr_accessor :disable_sending
25
+
26
+ attr_accessor :secure_mode
27
+
28
+ # Attribute mapping from ruby-style variable name to JSON key.
29
+ def self.attribute_map
30
+ {
31
+ :'client_id' => :'clientId',
32
+ :'client_secret' => :'clientSecret',
33
+ :'title' => :'title',
34
+ :'disable_sending' => :'disableSending',
35
+ :'secure_mode' => :'secureMode'
36
+ }
37
+ end
38
+
39
+ # Returns attribute mapping this model knows about
40
+ def self.acceptable_attribute_map
41
+ attribute_map
42
+ end
43
+
44
+ # Returns all the JSON keys this model knows about
45
+ def self.acceptable_attributes
46
+ acceptable_attribute_map.values
47
+ end
48
+
49
+ # Attribute type mapping.
50
+ def self.openapi_types
51
+ {
52
+ :'client_id' => :'String',
53
+ :'client_secret' => :'String',
54
+ :'title' => :'String',
55
+ :'disable_sending' => :'Array<ChannelsEnum>',
56
+ :'secure_mode' => :'Boolean'
57
+ }
58
+ end
59
+
60
+ # List of attributes with nullable: true
61
+ def self.openapi_nullable
62
+ Set.new([
63
+ ])
64
+ end
65
+
66
+ # Initializes the object
67
+ # @param [Hash] attributes Model attributes in the form of hash
68
+ def initialize(attributes = {})
69
+ if (!attributes.is_a?(Hash))
70
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::GetEnvironmentsResponseInner` initialize method"
71
+ end
72
+
73
+ # check to see if the attribute exists and convert string to symbol for hash key
74
+ acceptable_attribute_map = self.class.acceptable_attribute_map
75
+ attributes = attributes.each_with_object({}) { |(k, v), h|
76
+ if (!acceptable_attribute_map.key?(k.to_sym))
77
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::GetEnvironmentsResponseInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
78
+ end
79
+ h[k.to_sym] = v
80
+ }
81
+
82
+ if attributes.key?(:'client_id')
83
+ self.client_id = attributes[:'client_id']
84
+ else
85
+ self.client_id = nil
86
+ end
87
+
88
+ if attributes.key?(:'client_secret')
89
+ self.client_secret = attributes[:'client_secret']
90
+ else
91
+ self.client_secret = nil
92
+ end
93
+
94
+ if attributes.key?(:'title')
95
+ self.title = attributes[:'title']
96
+ else
97
+ self.title = nil
98
+ end
99
+
100
+ if attributes.key?(:'disable_sending')
101
+ if (value = attributes[:'disable_sending']).is_a?(Array)
102
+ self.disable_sending = value
103
+ end
104
+ else
105
+ self.disable_sending = nil
106
+ end
107
+
108
+ if attributes.key?(:'secure_mode')
109
+ self.secure_mode = attributes[:'secure_mode']
110
+ else
111
+ self.secure_mode = nil
112
+ end
113
+ end
114
+
115
+ # Show invalid properties with the reasons. Usually used together with valid?
116
+ # @return Array for valid properties with the reasons
117
+ def list_invalid_properties
118
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
119
+ invalid_properties = Array.new
120
+ if @client_id.nil?
121
+ invalid_properties.push('invalid value for "client_id", client_id cannot be nil.')
122
+ end
123
+
124
+ if @client_secret.nil?
125
+ invalid_properties.push('invalid value for "client_secret", client_secret cannot be nil.')
126
+ end
127
+
128
+ if @title.nil?
129
+ invalid_properties.push('invalid value for "title", title cannot be nil.')
130
+ end
131
+
132
+ if @disable_sending.nil?
133
+ invalid_properties.push('invalid value for "disable_sending", disable_sending cannot be nil.')
134
+ end
135
+
136
+ if @secure_mode.nil?
137
+ invalid_properties.push('invalid value for "secure_mode", secure_mode cannot be nil.')
138
+ end
139
+
140
+ invalid_properties
141
+ end
142
+
143
+ # Check to see if the all the properties in the model are valid
144
+ # @return true if the model is valid
145
+ def valid?
146
+ warn '[DEPRECATED] the `valid?` method is obsolete'
147
+ return false if @client_id.nil?
148
+ return false if @client_secret.nil?
149
+ return false if @title.nil?
150
+ return false if @disable_sending.nil?
151
+ return false if @secure_mode.nil?
152
+ true
153
+ end
154
+
155
+ # Custom attribute writer method with validation
156
+ # @param [Object] client_id Value to be assigned
157
+ def client_id=(client_id)
158
+ if client_id.nil?
159
+ fail ArgumentError, 'client_id cannot be nil'
160
+ end
161
+
162
+ @client_id = client_id
163
+ end
164
+
165
+ # Custom attribute writer method with validation
166
+ # @param [Object] client_secret Value to be assigned
167
+ def client_secret=(client_secret)
168
+ if client_secret.nil?
169
+ fail ArgumentError, 'client_secret cannot be nil'
170
+ end
171
+
172
+ @client_secret = client_secret
173
+ end
174
+
175
+ # Custom attribute writer method with validation
176
+ # @param [Object] title Value to be assigned
177
+ def title=(title)
178
+ if title.nil?
179
+ fail ArgumentError, 'title cannot be nil'
180
+ end
181
+
182
+ @title = title
183
+ end
184
+
185
+ # Custom attribute writer method with validation
186
+ # @param [Object] disable_sending Value to be assigned
187
+ def disable_sending=(disable_sending)
188
+ if disable_sending.nil?
189
+ fail ArgumentError, 'disable_sending cannot be nil'
190
+ end
191
+
192
+ @disable_sending = disable_sending
193
+ end
194
+
195
+ # Custom attribute writer method with validation
196
+ # @param [Object] secure_mode Value to be assigned
197
+ def secure_mode=(secure_mode)
198
+ if secure_mode.nil?
199
+ fail ArgumentError, 'secure_mode cannot be nil'
200
+ end
201
+
202
+ @secure_mode = secure_mode
203
+ end
204
+
205
+ # Checks equality by comparing each attribute.
206
+ # @param [Object] Object to be compared
207
+ def ==(o)
208
+ return true if self.equal?(o)
209
+ self.class == o.class &&
210
+ client_id == o.client_id &&
211
+ client_secret == o.client_secret &&
212
+ title == o.title &&
213
+ disable_sending == o.disable_sending &&
214
+ secure_mode == o.secure_mode
215
+ end
216
+
217
+ # @see the `==` method
218
+ # @param [Object] Object to be compared
219
+ def eql?(o)
220
+ self == o
221
+ end
222
+
223
+ # Calculates hash code according to all attributes.
224
+ # @return [Integer] Hash code
225
+ def hash
226
+ [client_id, client_secret, title, disable_sending, secure_mode].hash
227
+ end
228
+
229
+ # Builds the object from hash
230
+ # @param [Hash] attributes Model attributes in the form of hash
231
+ # @return [Object] Returns the model itself
232
+ def self.build_from_hash(attributes)
233
+ return nil unless attributes.is_a?(Hash)
234
+ attributes = attributes.transform_keys(&:to_sym)
235
+ transformed_hash = {}
236
+ openapi_types.each_pair do |key, type|
237
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
238
+ transformed_hash["#{key}"] = nil
239
+ elsif type =~ /\AArray<(.*)>/i
240
+ # check to ensure the input is an array given that the attribute
241
+ # is documented as an array but the input is not
242
+ if attributes[attribute_map[key]].is_a?(Array)
243
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
244
+ end
245
+ elsif !attributes[attribute_map[key]].nil?
246
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
247
+ end
248
+ end
249
+ new(transformed_hash)
250
+ end
251
+
252
+ # Returns the object in the form of hash
253
+ # @return [Hash] Returns the object in the form of hash
254
+ def to_hash
255
+ hash = {}
256
+ self.class.attribute_map.each_pair do |attr, param|
257
+ value = self.send(attr)
258
+ if value.nil?
259
+ is_nullable = self.class.openapi_nullable.include?(attr)
260
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
261
+ end
262
+
263
+ hash[param] = _to_hash(value)
264
+ end
265
+ hash
266
+ end
267
+
268
+ end
269
+
270
+ end