lockally 0.2.0 → 0.3.1

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 (253) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +148 -119
  3. data/docs/AdminApi.md +33 -33
  4. data/docs/{V1AdminLoginPost200Response.md → AdminLogin200Response.md} +2 -2
  5. data/docs/{V1AdminLoginPostRequest.md → AdminLoginRequest.md} +2 -2
  6. data/docs/AdminsApi.md +76 -76
  7. data/docs/AgentSendResult.md +22 -0
  8. data/docs/AgentsApi.md +247 -247
  9. data/docs/AiApi.md +69 -69
  10. data/docs/AiConfig.md +26 -0
  11. data/docs/AiConfigUpdate.md +20 -0
  12. data/docs/AliasesApi.md +59 -59
  13. data/docs/Annotations.md +22 -0
  14. data/docs/ApiKeysApi.md +59 -59
  15. data/docs/Attachment.md +26 -0
  16. data/docs/Classification.md +24 -0
  17. data/docs/ContactLookup.md +26 -0
  18. data/docs/ContactLookupContact.md +28 -0
  19. data/docs/ContactLookupHistory.md +22 -0
  20. data/docs/CreateAiUnitsCheckout200Response.md +22 -0
  21. data/docs/{V1AliasesPostRequest.md → CreateAliasRequest.md} +2 -2
  22. data/docs/{V1ApiKeysPost201Response.md → CreateApiKey201Response.md} +2 -2
  23. data/docs/{V1ApiKeysPostRequest.md → CreateApiKeyRequest.md} +2 -2
  24. data/docs/{V1DomainsPostRequest.md → CreateDomainRequest.md} +2 -2
  25. data/docs/{V1MailboxesPostRequest.md → CreateMailboxRequest.md} +2 -2
  26. data/docs/{V1SuppressionsPostRequest.md → CreateSuppressionRequest.md} +2 -2
  27. data/docs/{V1WebhooksPostRequest.md → CreateWebhookRequest.md} +2 -2
  28. data/docs/DomainsApi.md +141 -141
  29. data/docs/Draft.md +44 -0
  30. data/docs/DraftList.md +18 -0
  31. data/docs/DraftResult.md +26 -0
  32. data/docs/DraftsApi.md +115 -115
  33. data/docs/{V1MailboxesEmailExportPost201Response.md → ExportMailbox201Response.md} +2 -2
  34. data/docs/{V1AdminMeGet200Response.md → GetCurrentAdmin200Response.md} +2 -2
  35. data/docs/{V1UsageGet200Response.md → GetUsage200Response.md} +2 -2
  36. data/docs/HealthApi.md +11 -11
  37. data/docs/{HealthzGet200Response.md → HealthCheck200Response.md} +2 -2
  38. data/docs/Inbox.md +24 -0
  39. data/docs/InboxList.md +18 -0
  40. data/docs/InjectionRisk.md +20 -0
  41. data/docs/{V1AdminsPostRequest.md → InviteAdminRequest.md} +2 -2
  42. data/docs/{V1AdminsGet200Response.md → ListAdmins200Response.md} +2 -2
  43. data/docs/{V1AliasesGet200Response.md → ListAliases200Response.md} +2 -2
  44. data/docs/{V1ApiKeysGet200Response.md → ListApiKeys200Response.md} +2 -2
  45. data/docs/{V1DomainsGet200Response.md → ListDomains200Response.md} +2 -2
  46. data/docs/{V1MailboxesGet200Response.md → ListMailboxes200Response.md} +2 -2
  47. data/docs/{V1MessagesGet200Response.md → ListMessages200Response.md} +2 -2
  48. data/docs/{V1SuppressionsGet200Response.md → ListSuppressions200Response.md} +2 -2
  49. data/docs/{V1TemplatesGet200Response.md → ListTemplates200Response.md} +2 -2
  50. data/docs/{V1VacationGet200Response.md → ListVacationResponders200Response.md} +2 -2
  51. data/docs/{V1WebhooksGet200Response.md → ListWebhooks200Response.md} +2 -2
  52. data/docs/MailboxGrant.md +20 -0
  53. data/docs/MailboxGrantList.md +18 -0
  54. data/docs/MailboxesApi.md +203 -203
  55. data/docs/MarkReadResult.md +18 -0
  56. data/docs/PolicyFlags.md +28 -0
  57. data/docs/SendApi.md +121 -121
  58. data/docs/{V1SendPost200Response.md → SendEmail200Response.md} +2 -2
  59. data/docs/{V1SendPost202Response.md → SendEmail202Response.md} +2 -2
  60. data/docs/{V1SendBatchPost200Response.md → SendEmailBatch200Response.md} +2 -2
  61. data/docs/{V1SendBatchPostRequest.md → SendEmailBatchRequest.md} +2 -2
  62. data/docs/{V1SendPostRequest.md → SendEmailRequest.md} +3 -3
  63. data/docs/{V1SendPostRequestAttachmentsInner.md → SendEmailRequestAttachmentsInner.md} +2 -2
  64. data/docs/SendMessage.md +1 -1
  65. data/docs/{V1MailboxesEmailVacationPutRequest.md → SetVacationResponderRequest.md} +2 -2
  66. data/docs/SignupApi.md +4 -4
  67. data/docs/SimulatedInbound.md +22 -0
  68. data/docs/{V1InboxesMailboxMessagesPostRequest.md → StartConversationRequest.md} +2 -2
  69. data/docs/SuppressionsApi.md +75 -75
  70. data/docs/TemplatesApi.md +67 -67
  71. data/docs/TenantApi.md +20 -20
  72. data/docs/TestApi.md +11 -11
  73. data/docs/Thread.md +22 -0
  74. data/docs/ThreadClassification.md +22 -0
  75. data/docs/ThreadList.md +20 -0
  76. data/docs/ThreadMessage.md +40 -0
  77. data/docs/ThreadMessageBody.md +42 -0
  78. data/docs/ThreadMessageBodyAllOfBody.md +22 -0
  79. data/docs/ThreadSummary.md +28 -0
  80. data/docs/{V1AdminsIdPatchRequest.md → UpdateAdminRequest.md} +2 -2
  81. data/docs/{V1MailboxesEmailPatchRequest.md → UpdateMailboxRequest.md} +2 -2
  82. data/docs/{V1WebhooksIdPatchRequest.md → UpdateWebhookRequest.md} +2 -2
  83. data/docs/WebhooksApi.md +63 -63
  84. data/docs/Whoami.md +24 -0
  85. data/lib/lockally/api/admin_api.rb +30 -30
  86. data/lib/lockally/api/admins_api.rb +89 -89
  87. data/lib/lockally/api/agents_api.rb +309 -309
  88. data/lib/lockally/api/ai_api.rb +69 -69
  89. data/lib/lockally/api/aliases_api.rb +64 -64
  90. data/lib/lockally/api/api_keys_api.rb +66 -66
  91. data/lib/lockally/api/domains_api.rb +147 -147
  92. data/lib/lockally/api/drafts_api.rb +140 -140
  93. data/lib/lockally/api/health_api.rb +9 -9
  94. data/lib/lockally/api/mailboxes_api.rb +233 -233
  95. data/lib/lockally/api/send_api.rb +146 -146
  96. data/lib/lockally/api/signup_api.rb +3 -3
  97. data/lib/lockally/api/suppressions_api.rb +87 -87
  98. data/lib/lockally/api/templates_api.rb +69 -69
  99. data/lib/lockally/api/tenant_api.rb +15 -15
  100. data/lib/lockally/api/test_api.rb +9 -9
  101. data/lib/lockally/api/webhooks_api.rb +73 -73
  102. data/lib/lockally/models/{v1_admin_login_post200_response.rb → admin_login200_response.rb} +3 -3
  103. data/lib/lockally/models/{v1_admin_login_post_request.rb → admin_login_request.rb} +3 -3
  104. data/lib/lockally/models/agent_send_result.rb +184 -0
  105. data/lib/lockally/models/ai_config.rb +242 -0
  106. data/lib/lockally/models/ai_config_update.rb +214 -0
  107. data/lib/lockally/models/annotations.rb +168 -0
  108. data/lib/lockally/models/attachment.rb +185 -0
  109. data/lib/lockally/models/classification.rb +211 -0
  110. data/lib/lockally/models/contact_lookup.rb +235 -0
  111. data/lib/lockally/models/contact_lookup_contact.rb +192 -0
  112. data/lib/lockally/models/contact_lookup_history.rb +166 -0
  113. data/lib/lockally/models/create_ai_units_checkout200_response.rb +199 -0
  114. data/lib/lockally/models/{v1_aliases_post_request.rb → create_alias_request.rb} +3 -3
  115. data/lib/lockally/models/{v1_api_keys_post201_response.rb → create_api_key201_response.rb} +3 -3
  116. data/lib/lockally/models/{v1_api_keys_post_request.rb → create_api_key_request.rb} +3 -3
  117. data/lib/lockally/models/{v1_domains_post_request.rb → create_domain_request.rb} +3 -3
  118. data/lib/lockally/models/{v1_mailboxes_post_request.rb → create_mailbox_request.rb} +3 -3
  119. data/lib/lockally/models/{v1_suppressions_post_request.rb → create_suppression_request.rb} +3 -3
  120. data/lib/lockally/models/{v1_webhooks_post_request.rb → create_webhook_request.rb} +3 -3
  121. data/lib/lockally/models/draft.rb +411 -0
  122. data/lib/lockally/models/draft_list.rb +166 -0
  123. data/lib/lockally/models/draft_result.rb +258 -0
  124. data/lib/lockally/models/{v1_mailboxes_email_export_post201_response.rb → export_mailbox201_response.rb} +3 -3
  125. data/lib/lockally/models/{v1_admin_me_get200_response.rb → get_current_admin200_response.rb} +3 -3
  126. data/lib/lockally/models/{v1_usage_get200_response.rb → get_usage200_response.rb} +3 -3
  127. data/lib/lockally/models/{healthz_get200_response.rb → health_check200_response.rb} +3 -3
  128. data/lib/lockally/models/inbox.rb +225 -0
  129. data/lib/lockally/models/inbox_list.rb +166 -0
  130. data/lib/lockally/models/injection_risk.rb +159 -0
  131. data/lib/lockally/models/{v1_admins_post_request.rb → invite_admin_request.rb} +3 -3
  132. data/lib/lockally/models/list_admins200_response.rb +166 -0
  133. data/lib/lockally/models/{v1_aliases_get200_response.rb → list_aliases200_response.rb} +3 -3
  134. data/lib/lockally/models/{v1_admins_get200_response.rb → list_api_keys200_response.rb} +4 -4
  135. data/lib/lockally/models/{v1_domains_get200_response.rb → list_domains200_response.rb} +3 -3
  136. data/lib/lockally/models/{v1_mailboxes_get200_response.rb → list_mailboxes200_response.rb} +3 -3
  137. data/lib/lockally/models/{v1_messages_get200_response.rb → list_messages200_response.rb} +3 -3
  138. data/lib/lockally/models/{v1_suppressions_get200_response.rb → list_suppressions200_response.rb} +3 -3
  139. data/lib/lockally/models/{v1_send_batch_post200_response.rb → list_templates200_response.rb} +4 -4
  140. data/lib/lockally/models/{v1_vacation_get200_response.rb → list_vacation_responders200_response.rb} +3 -3
  141. data/lib/lockally/models/{v1_api_keys_get200_response.rb → list_webhooks200_response.rb} +4 -4
  142. data/lib/lockally/models/mailbox_grant.rb +156 -0
  143. data/lib/lockally/models/mailbox_grant_list.rb +166 -0
  144. data/lib/lockally/models/mark_read_result.rb +147 -0
  145. data/lib/lockally/models/policy_flags.rb +197 -0
  146. data/lib/lockally/models/{v1_send_post200_response.rb → send_email200_response.rb} +3 -3
  147. data/lib/lockally/models/{v1_send_post202_response.rb → send_email202_response.rb} +3 -3
  148. data/lib/lockally/models/{v1_templates_get200_response.rb → send_email_batch200_response.rb} +4 -4
  149. data/lib/lockally/models/{v1_send_batch_post_request.rb → send_email_batch_request.rb} +3 -3
  150. data/lib/lockally/models/{v1_send_post_request.rb → send_email_request.rb} +4 -4
  151. data/lib/lockally/models/{v1_send_post_request_attachments_inner.rb → send_email_request_attachments_inner.rb} +3 -3
  152. data/lib/lockally/models/send_message.rb +1 -1
  153. data/lib/lockally/models/{v1_mailboxes_email_vacation_put_request.rb → set_vacation_responder_request.rb} +3 -3
  154. data/lib/lockally/models/simulated_inbound.rb +165 -0
  155. data/lib/lockally/models/{v1_inboxes_mailbox_messages_post_request.rb → start_conversation_request.rb} +3 -3
  156. data/lib/lockally/models/thread.rb +219 -0
  157. data/lib/lockally/models/thread_classification.rb +183 -0
  158. data/lib/lockally/models/thread_list.rb +192 -0
  159. data/lib/lockally/models/thread_message.rb +394 -0
  160. data/lib/lockally/models/thread_message_body.rb +410 -0
  161. data/lib/lockally/models/thread_message_body_all_of_body.rb +165 -0
  162. data/lib/lockally/models/thread_summary.rb +280 -0
  163. data/lib/lockally/models/{v1_admins_id_patch_request.rb → update_admin_request.rb} +3 -3
  164. data/lib/lockally/models/{v1_mailboxes_email_patch_request.rb → update_mailbox_request.rb} +3 -3
  165. data/lib/lockally/models/{v1_webhooks_id_patch_request.rb → update_webhook_request.rb} +3 -3
  166. data/lib/lockally/models/whoami.rb +177 -0
  167. data/lib/lockally/version.rb +1 -1
  168. data/lib/lockally.rb +64 -35
  169. data/spec/api/admin_api_spec.rb +9 -9
  170. data/spec/api/admins_api_spec.rb +22 -22
  171. data/spec/api/agents_api_spec.rb +78 -78
  172. data/spec/api/ai_api_spec.rb +22 -22
  173. data/spec/api/aliases_api_spec.rb +16 -16
  174. data/spec/api/api_keys_api_spec.rb +17 -17
  175. data/spec/api/domains_api_spec.rb +42 -42
  176. data/spec/api/drafts_api_spec.rb +38 -38
  177. data/spec/api/health_api_spec.rb +3 -3
  178. data/spec/api/mailboxes_api_spec.rb +61 -61
  179. data/spec/api/send_api_spec.rb +35 -35
  180. data/spec/api/signup_api_spec.rb +1 -1
  181. data/spec/api/suppressions_api_spec.rb +18 -18
  182. data/spec/api/templates_api_spec.rb +17 -17
  183. data/spec/api/tenant_api_spec.rb +5 -5
  184. data/spec/api/test_api_spec.rb +3 -3
  185. data/spec/api/webhooks_api_spec.rb +19 -19
  186. data/spec/models/{v1_admin_login_post200_response_spec.rb → admin_login200_response_spec.rb} +6 -6
  187. data/spec/models/{v1_admin_login_post_request_spec.rb → admin_login_request_spec.rb} +6 -6
  188. data/spec/models/agent_send_result_spec.rb +48 -0
  189. data/spec/models/ai_config_spec.rb +64 -0
  190. data/spec/models/ai_config_update_spec.rb +46 -0
  191. data/spec/models/annotations_spec.rb +48 -0
  192. data/spec/models/attachment_spec.rb +60 -0
  193. data/spec/models/classification_spec.rb +58 -0
  194. data/spec/models/contact_lookup_contact_spec.rb +66 -0
  195. data/spec/models/contact_lookup_history_spec.rb +48 -0
  196. data/spec/models/contact_lookup_spec.rb +60 -0
  197. data/spec/models/create_ai_units_checkout200_response_spec.rb +48 -0
  198. data/spec/models/{v1_aliases_post_request_spec.rb → create_alias_request_spec.rb} +6 -6
  199. data/spec/models/{v1_api_keys_post201_response_spec.rb → create_api_key201_response_spec.rb} +6 -6
  200. data/spec/models/{v1_api_keys_post_request_spec.rb → create_api_key_request_spec.rb} +6 -6
  201. data/spec/models/{v1_domains_post_request_spec.rb → create_domain_request_spec.rb} +6 -6
  202. data/spec/models/{v1_mailboxes_post_request_spec.rb → create_mailbox_request_spec.rb} +6 -6
  203. data/spec/models/{v1_suppressions_post_request_spec.rb → create_suppression_request_spec.rb} +6 -6
  204. data/spec/models/{v1_webhooks_post_request_spec.rb → create_webhook_request_spec.rb} +6 -6
  205. data/spec/models/draft_list_spec.rb +36 -0
  206. data/spec/models/draft_result_spec.rb +64 -0
  207. data/spec/models/draft_spec.rb +118 -0
  208. data/spec/models/{v1_mailboxes_email_export_post201_response_spec.rb → export_mailbox201_response_spec.rb} +6 -6
  209. data/spec/models/{v1_admin_me_get200_response_spec.rb → get_current_admin200_response_spec.rb} +6 -6
  210. data/spec/models/{v1_usage_get200_response_spec.rb → get_usage200_response_spec.rb} +6 -6
  211. data/spec/models/{healthz_get200_response_spec.rb → health_check200_response_spec.rb} +6 -6
  212. data/spec/models/inbox_list_spec.rb +36 -0
  213. data/spec/models/inbox_spec.rb +54 -0
  214. data/spec/models/injection_risk_spec.rb +42 -0
  215. data/spec/models/{v1_admins_post_request_spec.rb → invite_admin_request_spec.rb} +6 -6
  216. data/spec/models/{v1_aliases_get200_response_spec.rb → list_admins200_response_spec.rb} +6 -6
  217. data/spec/models/{v1_admins_get200_response_spec.rb → list_aliases200_response_spec.rb} +6 -6
  218. data/spec/models/{v1_api_keys_get200_response_spec.rb → list_api_keys200_response_spec.rb} +6 -6
  219. data/spec/models/list_domains200_response_spec.rb +36 -0
  220. data/spec/models/{v1_mailboxes_get200_response_spec.rb → list_mailboxes200_response_spec.rb} +6 -6
  221. data/spec/models/{v1_messages_get200_response_spec.rb → list_messages200_response_spec.rb} +6 -6
  222. data/spec/models/{v1_suppressions_get200_response_spec.rb → list_suppressions200_response_spec.rb} +6 -6
  223. data/spec/models/{v1_vacation_get200_response_spec.rb → list_templates200_response_spec.rb} +6 -6
  224. data/spec/models/list_vacation_responders200_response_spec.rb +36 -0
  225. data/spec/models/{v1_domains_get200_response_spec.rb → list_webhooks200_response_spec.rb} +6 -6
  226. data/spec/models/mailbox_grant_list_spec.rb +36 -0
  227. data/spec/models/mailbox_grant_spec.rb +42 -0
  228. data/spec/models/mark_read_result_spec.rb +36 -0
  229. data/spec/models/policy_flags_spec.rb +66 -0
  230. data/spec/models/{v1_send_post200_response_spec.rb → send_email200_response_spec.rb} +6 -6
  231. data/spec/models/{v1_send_post202_response_spec.rb → send_email202_response_spec.rb} +6 -6
  232. data/spec/models/{v1_templates_get200_response_spec.rb → send_email_batch200_response_spec.rb} +6 -6
  233. data/spec/models/{v1_send_batch_post_request_spec.rb → send_email_batch_request_spec.rb} +6 -6
  234. data/spec/models/{v1_send_post_request_attachments_inner_spec.rb → send_email_request_attachments_inner_spec.rb} +6 -6
  235. data/spec/models/{v1_send_post_request_spec.rb → send_email_request_spec.rb} +6 -6
  236. data/spec/models/{v1_mailboxes_email_vacation_put_request_spec.rb → set_vacation_responder_request_spec.rb} +6 -6
  237. data/spec/models/simulated_inbound_spec.rb +48 -0
  238. data/spec/models/{v1_inboxes_mailbox_messages_post_request_spec.rb → start_conversation_request_spec.rb} +6 -6
  239. data/spec/models/thread_classification_spec.rb +48 -0
  240. data/spec/models/thread_list_spec.rb +42 -0
  241. data/spec/models/thread_message_body_all_of_body_spec.rb +48 -0
  242. data/spec/models/thread_message_body_spec.rb +112 -0
  243. data/spec/models/thread_message_spec.rb +106 -0
  244. data/spec/models/thread_spec.rb +48 -0
  245. data/spec/models/thread_summary_spec.rb +70 -0
  246. data/spec/models/{v1_admins_id_patch_request_spec.rb → update_admin_request_spec.rb} +6 -6
  247. data/spec/models/{v1_mailboxes_email_patch_request_spec.rb → update_mailbox_request_spec.rb} +6 -6
  248. data/spec/models/{v1_webhooks_id_patch_request_spec.rb → update_webhook_request_spec.rb} +6 -6
  249. data/spec/models/whoami_spec.rb +54 -0
  250. metadata +258 -142
  251. data/lib/lockally/models/v1_webhooks_get200_response.rb +0 -166
  252. data/spec/models/v1_send_batch_post200_response_spec.rb +0 -36
  253. data/spec/models/v1_webhooks_get200_response_spec.rb +0 -36
@@ -0,0 +1,168 @@
1
+ =begin
2
+ #lockally control plane
3
+
4
+ #The lockally control plane lets integrators and direct customers manage everything except actual mail data flow (which uses standard JMAP / IMAP / SMTP-submission against the data plane endpoints). **Authentication.** All `/v1/*` endpoints require a Bearer API key in the `Authorization` header. Keys are formatted `lk_live_<8-char-prefix>_<32-char-secret>`, or `lk_test_<...>` for a test key. Create keys in the dashboard, or with `POST /v1/api-keys` using a key that holds `tenant:admin`. The key's plan is checked on every request, so a key stops working if the account moves to a plan without API access, and works again if it moves back. **Errors.** Failures return [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457) `application/problem+json` documents. **Scopes.** Each endpoint requires a specific scope on the presented key. Insufficient scope returns `403` with the required scope name in `detail`.
5
+
6
+ The version of the OpenAPI document: 0.1.0
7
+ Contact: support@lockally.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.23.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Lockally
17
+ # Signals computed at ingest, before an agent sees the message. A key is absent when its check did not fire.
18
+ class Annotations < ApiModelBase
19
+ attr_accessor :attachment_types
20
+
21
+ attr_accessor :meeting_request
22
+
23
+ attr_accessor :injection_risk
24
+
25
+ # Attribute mapping from ruby-style variable name to JSON key.
26
+ def self.attribute_map
27
+ {
28
+ :'attachment_types' => :'attachment_types',
29
+ :'meeting_request' => :'meeting_request',
30
+ :'injection_risk' => :'injection_risk'
31
+ }
32
+ end
33
+
34
+ # Returns attribute mapping this model knows about
35
+ def self.acceptable_attribute_map
36
+ attribute_map
37
+ end
38
+
39
+ # Returns all the JSON keys this model knows about
40
+ def self.acceptable_attributes
41
+ acceptable_attribute_map.values
42
+ end
43
+
44
+ # Attribute type mapping.
45
+ def self.openapi_types
46
+ {
47
+ :'attachment_types' => :'Array<String>',
48
+ :'meeting_request' => :'Boolean',
49
+ :'injection_risk' => :'InjectionRisk'
50
+ }
51
+ end
52
+
53
+ # List of attributes with nullable: true
54
+ def self.openapi_nullable
55
+ Set.new([
56
+ ])
57
+ end
58
+
59
+ # Initializes the object
60
+ # @param [Hash] attributes Model attributes in the form of hash
61
+ def initialize(attributes = {})
62
+ if (!attributes.is_a?(Hash))
63
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Lockally::Annotations` initialize method"
64
+ end
65
+
66
+ # check to see if the attribute exists and convert string to symbol for hash key
67
+ acceptable_attribute_map = self.class.acceptable_attribute_map
68
+ attributes = attributes.each_with_object({}) { |(k, v), h|
69
+ if (!acceptable_attribute_map.key?(k.to_sym))
70
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Lockally::Annotations`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
71
+ end
72
+ h[k.to_sym] = v
73
+ }
74
+
75
+ if attributes.key?(:'attachment_types')
76
+ if (value = attributes[:'attachment_types']).is_a?(Array)
77
+ self.attachment_types = value
78
+ end
79
+ end
80
+
81
+ if attributes.key?(:'meeting_request')
82
+ self.meeting_request = attributes[:'meeting_request']
83
+ end
84
+
85
+ if attributes.key?(:'injection_risk')
86
+ self.injection_risk = attributes[:'injection_risk']
87
+ end
88
+ end
89
+
90
+ # Show invalid properties with the reasons. Usually used together with valid?
91
+ # @return Array for valid properties with the reasons
92
+ def list_invalid_properties
93
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
94
+ invalid_properties = Array.new
95
+ invalid_properties
96
+ end
97
+
98
+ # Check to see if the all the properties in the model are valid
99
+ # @return true if the model is valid
100
+ def valid?
101
+ warn '[DEPRECATED] the `valid?` method is obsolete'
102
+ true
103
+ end
104
+
105
+ # Checks equality by comparing each attribute.
106
+ # @param [Object] Object to be compared
107
+ def ==(o)
108
+ return true if self.equal?(o)
109
+ self.class == o.class &&
110
+ attachment_types == o.attachment_types &&
111
+ meeting_request == o.meeting_request &&
112
+ injection_risk == o.injection_risk
113
+ end
114
+
115
+ # @see the `==` method
116
+ # @param [Object] Object to be compared
117
+ def eql?(o)
118
+ self == o
119
+ end
120
+
121
+ # Calculates hash code according to all attributes.
122
+ # @return [Integer] Hash code
123
+ def hash
124
+ [attachment_types, meeting_request, injection_risk].hash
125
+ end
126
+
127
+ # Builds the object from hash
128
+ # @param [Hash] attributes Model attributes in the form of hash
129
+ # @return [Object] Returns the model itself
130
+ def self.build_from_hash(attributes)
131
+ return nil unless attributes.is_a?(Hash)
132
+ attributes = attributes.transform_keys(&:to_sym)
133
+ transformed_hash = {}
134
+ openapi_types.each_pair do |key, type|
135
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
136
+ transformed_hash["#{key}"] = nil
137
+ elsif type =~ /\AArray<(.*)>/i
138
+ # check to ensure the input is an array given that the attribute
139
+ # is documented as an array but the input is not
140
+ if attributes[attribute_map[key]].is_a?(Array)
141
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
142
+ end
143
+ elsif !attributes[attribute_map[key]].nil?
144
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
145
+ end
146
+ end
147
+ new(transformed_hash)
148
+ end
149
+
150
+ # Returns the object in the form of hash
151
+ # @return [Hash] Returns the object in the form of hash
152
+ def to_hash
153
+ hash = {}
154
+ self.class.attribute_map.each_pair do |attr, param|
155
+ value = self.send(attr)
156
+ if value.nil?
157
+ is_nullable = self.class.openapi_nullable.include?(attr)
158
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
159
+ end
160
+
161
+ hash[param] = _to_hash(value)
162
+ end
163
+ hash
164
+ end
165
+
166
+ end
167
+
168
+ end
@@ -0,0 +1,185 @@
1
+ =begin
2
+ #lockally control plane
3
+
4
+ #The lockally control plane lets integrators and direct customers manage everything except actual mail data flow (which uses standard JMAP / IMAP / SMTP-submission against the data plane endpoints). **Authentication.** All `/v1/*` endpoints require a Bearer API key in the `Authorization` header. Keys are formatted `lk_live_<8-char-prefix>_<32-char-secret>`, or `lk_test_<...>` for a test key. Create keys in the dashboard, or with `POST /v1/api-keys` using a key that holds `tenant:admin`. The key's plan is checked on every request, so a key stops working if the account moves to a plan without API access, and works again if it moves back. **Errors.** Failures return [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457) `application/problem+json` documents. **Scopes.** Each endpoint requires a specific scope on the presented key. Insufficient scope returns `403` with the required scope name in `detail`.
5
+
6
+ The version of the OpenAPI document: 0.1.0
7
+ Contact: support@lockally.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.23.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Lockally
17
+ class Attachment < ApiModelBase
18
+ attr_accessor :name
19
+
20
+ # MIME type.
21
+ attr_accessor :type
22
+
23
+ # Bytes.
24
+ attr_accessor :size
25
+
26
+ attr_accessor :blob_id
27
+
28
+ attr_accessor :part_id
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ def self.attribute_map
32
+ {
33
+ :'name' => :'name',
34
+ :'type' => :'type',
35
+ :'size' => :'size',
36
+ :'blob_id' => :'blobId',
37
+ :'part_id' => :'partId'
38
+ }
39
+ end
40
+
41
+ # Returns attribute mapping this model knows about
42
+ def self.acceptable_attribute_map
43
+ attribute_map
44
+ end
45
+
46
+ # Returns all the JSON keys this model knows about
47
+ def self.acceptable_attributes
48
+ acceptable_attribute_map.values
49
+ end
50
+
51
+ # Attribute type mapping.
52
+ def self.openapi_types
53
+ {
54
+ :'name' => :'String',
55
+ :'type' => :'String',
56
+ :'size' => :'Integer',
57
+ :'blob_id' => :'String',
58
+ :'part_id' => :'String'
59
+ }
60
+ end
61
+
62
+ # List of attributes with nullable: true
63
+ def self.openapi_nullable
64
+ Set.new([
65
+ ])
66
+ end
67
+
68
+ # Initializes the object
69
+ # @param [Hash] attributes Model attributes in the form of hash
70
+ def initialize(attributes = {})
71
+ if (!attributes.is_a?(Hash))
72
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Lockally::Attachment` initialize method"
73
+ end
74
+
75
+ # check to see if the attribute exists and convert string to symbol for hash key
76
+ acceptable_attribute_map = self.class.acceptable_attribute_map
77
+ attributes = attributes.each_with_object({}) { |(k, v), h|
78
+ if (!acceptable_attribute_map.key?(k.to_sym))
79
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Lockally::Attachment`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
80
+ end
81
+ h[k.to_sym] = v
82
+ }
83
+
84
+ if attributes.key?(:'name')
85
+ self.name = attributes[:'name']
86
+ end
87
+
88
+ if attributes.key?(:'type')
89
+ self.type = attributes[:'type']
90
+ end
91
+
92
+ if attributes.key?(:'size')
93
+ self.size = attributes[:'size']
94
+ end
95
+
96
+ if attributes.key?(:'blob_id')
97
+ self.blob_id = attributes[:'blob_id']
98
+ end
99
+
100
+ if attributes.key?(:'part_id')
101
+ self.part_id = attributes[:'part_id']
102
+ end
103
+ end
104
+
105
+ # Show invalid properties with the reasons. Usually used together with valid?
106
+ # @return Array for valid properties with the reasons
107
+ def list_invalid_properties
108
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
109
+ invalid_properties = Array.new
110
+ invalid_properties
111
+ end
112
+
113
+ # Check to see if the all the properties in the model are valid
114
+ # @return true if the model is valid
115
+ def valid?
116
+ warn '[DEPRECATED] the `valid?` method is obsolete'
117
+ true
118
+ end
119
+
120
+ # Checks equality by comparing each attribute.
121
+ # @param [Object] Object to be compared
122
+ def ==(o)
123
+ return true if self.equal?(o)
124
+ self.class == o.class &&
125
+ name == o.name &&
126
+ type == o.type &&
127
+ size == o.size &&
128
+ blob_id == o.blob_id &&
129
+ part_id == o.part_id
130
+ end
131
+
132
+ # @see the `==` method
133
+ # @param [Object] Object to be compared
134
+ def eql?(o)
135
+ self == o
136
+ end
137
+
138
+ # Calculates hash code according to all attributes.
139
+ # @return [Integer] Hash code
140
+ def hash
141
+ [name, type, size, blob_id, part_id].hash
142
+ end
143
+
144
+ # Builds the object from hash
145
+ # @param [Hash] attributes Model attributes in the form of hash
146
+ # @return [Object] Returns the model itself
147
+ def self.build_from_hash(attributes)
148
+ return nil unless attributes.is_a?(Hash)
149
+ attributes = attributes.transform_keys(&:to_sym)
150
+ transformed_hash = {}
151
+ openapi_types.each_pair do |key, type|
152
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
153
+ transformed_hash["#{key}"] = nil
154
+ elsif type =~ /\AArray<(.*)>/i
155
+ # check to ensure the input is an array given that the attribute
156
+ # is documented as an array but the input is not
157
+ if attributes[attribute_map[key]].is_a?(Array)
158
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
159
+ end
160
+ elsif !attributes[attribute_map[key]].nil?
161
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
162
+ end
163
+ end
164
+ new(transformed_hash)
165
+ end
166
+
167
+ # Returns the object in the form of hash
168
+ # @return [Hash] Returns the object in the form of hash
169
+ def to_hash
170
+ hash = {}
171
+ self.class.attribute_map.each_pair do |attr, param|
172
+ value = self.send(attr)
173
+ if value.nil?
174
+ is_nullable = self.class.openapi_nullable.include?(attr)
175
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
176
+ end
177
+
178
+ hash[param] = _to_hash(value)
179
+ end
180
+ hash
181
+ end
182
+
183
+ end
184
+
185
+ end
@@ -0,0 +1,211 @@
1
+ =begin
2
+ #lockally control plane
3
+
4
+ #The lockally control plane lets integrators and direct customers manage everything except actual mail data flow (which uses standard JMAP / IMAP / SMTP-submission against the data plane endpoints). **Authentication.** All `/v1/*` endpoints require a Bearer API key in the `Authorization` header. Keys are formatted `lk_live_<8-char-prefix>_<32-char-secret>`, or `lk_test_<...>` for a test key. Create keys in the dashboard, or with `POST /v1/api-keys` using a key that holds `tenant:admin`. The key's plan is checked on every request, so a key stops working if the account moves to a plan without API access, and works again if it moves back. **Errors.** Failures return [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457) `application/problem+json` documents. **Scopes.** Each endpoint requires a specific scope on the presented key. Insufficient scope returns `403` with the required scope name in `detail`.
5
+
6
+ The version of the OpenAPI document: 0.1.0
7
+ Contact: support@lockally.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.23.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Lockally
17
+ class Classification < ApiModelBase
18
+ # For example support_request, sales_lead, billing, spam.
19
+ attr_accessor :intent
20
+
21
+ attr_accessor :urgency
22
+
23
+ # One line.
24
+ attr_accessor :summary
25
+
26
+ # One line.
27
+ attr_accessor :suggested_action
28
+
29
+ class EnumAttributeValidator
30
+ attr_reader :datatype
31
+ attr_reader :allowable_values
32
+
33
+ def initialize(datatype, allowable_values)
34
+ @allowable_values = allowable_values.map do |value|
35
+ case datatype.to_s
36
+ when /Integer/i
37
+ value.to_i
38
+ when /Float/i
39
+ value.to_f
40
+ else
41
+ value
42
+ end
43
+ end
44
+ end
45
+
46
+ def valid?(value)
47
+ !value || allowable_values.include?(value)
48
+ end
49
+ end
50
+
51
+ # Attribute mapping from ruby-style variable name to JSON key.
52
+ def self.attribute_map
53
+ {
54
+ :'intent' => :'intent',
55
+ :'urgency' => :'urgency',
56
+ :'summary' => :'summary',
57
+ :'suggested_action' => :'suggested_action'
58
+ }
59
+ end
60
+
61
+ # Returns attribute mapping this model knows about
62
+ def self.acceptable_attribute_map
63
+ attribute_map
64
+ end
65
+
66
+ # Returns all the JSON keys this model knows about
67
+ def self.acceptable_attributes
68
+ acceptable_attribute_map.values
69
+ end
70
+
71
+ # Attribute type mapping.
72
+ def self.openapi_types
73
+ {
74
+ :'intent' => :'String',
75
+ :'urgency' => :'String',
76
+ :'summary' => :'String',
77
+ :'suggested_action' => :'String'
78
+ }
79
+ end
80
+
81
+ # List of attributes with nullable: true
82
+ def self.openapi_nullable
83
+ Set.new([
84
+ ])
85
+ end
86
+
87
+ # Initializes the object
88
+ # @param [Hash] attributes Model attributes in the form of hash
89
+ def initialize(attributes = {})
90
+ if (!attributes.is_a?(Hash))
91
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Lockally::Classification` initialize method"
92
+ end
93
+
94
+ # check to see if the attribute exists and convert string to symbol for hash key
95
+ acceptable_attribute_map = self.class.acceptable_attribute_map
96
+ attributes = attributes.each_with_object({}) { |(k, v), h|
97
+ if (!acceptable_attribute_map.key?(k.to_sym))
98
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Lockally::Classification`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
99
+ end
100
+ h[k.to_sym] = v
101
+ }
102
+
103
+ if attributes.key?(:'intent')
104
+ self.intent = attributes[:'intent']
105
+ end
106
+
107
+ if attributes.key?(:'urgency')
108
+ self.urgency = attributes[:'urgency']
109
+ end
110
+
111
+ if attributes.key?(:'summary')
112
+ self.summary = attributes[:'summary']
113
+ end
114
+
115
+ if attributes.key?(:'suggested_action')
116
+ self.suggested_action = attributes[:'suggested_action']
117
+ end
118
+ end
119
+
120
+ # Show invalid properties with the reasons. Usually used together with valid?
121
+ # @return Array for valid properties with the reasons
122
+ def list_invalid_properties
123
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
124
+ invalid_properties = Array.new
125
+ invalid_properties
126
+ end
127
+
128
+ # Check to see if the all the properties in the model are valid
129
+ # @return true if the model is valid
130
+ def valid?
131
+ warn '[DEPRECATED] the `valid?` method is obsolete'
132
+ urgency_validator = EnumAttributeValidator.new('String', ["low", "normal", "high"])
133
+ return false unless urgency_validator.valid?(@urgency)
134
+ true
135
+ end
136
+
137
+ # Custom attribute writer method checking allowed values (enum).
138
+ # @param [Object] urgency Object to be assigned
139
+ def urgency=(urgency)
140
+ validator = EnumAttributeValidator.new('String', ["low", "normal", "high"])
141
+ unless validator.valid?(urgency)
142
+ fail ArgumentError, "invalid value for \"urgency\", must be one of #{validator.allowable_values}."
143
+ end
144
+ @urgency = urgency
145
+ end
146
+
147
+ # Checks equality by comparing each attribute.
148
+ # @param [Object] Object to be compared
149
+ def ==(o)
150
+ return true if self.equal?(o)
151
+ self.class == o.class &&
152
+ intent == o.intent &&
153
+ urgency == o.urgency &&
154
+ summary == o.summary &&
155
+ suggested_action == o.suggested_action
156
+ end
157
+
158
+ # @see the `==` method
159
+ # @param [Object] Object to be compared
160
+ def eql?(o)
161
+ self == o
162
+ end
163
+
164
+ # Calculates hash code according to all attributes.
165
+ # @return [Integer] Hash code
166
+ def hash
167
+ [intent, urgency, summary, suggested_action].hash
168
+ end
169
+
170
+ # Builds the object from hash
171
+ # @param [Hash] attributes Model attributes in the form of hash
172
+ # @return [Object] Returns the model itself
173
+ def self.build_from_hash(attributes)
174
+ return nil unless attributes.is_a?(Hash)
175
+ attributes = attributes.transform_keys(&:to_sym)
176
+ transformed_hash = {}
177
+ openapi_types.each_pair do |key, type|
178
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
179
+ transformed_hash["#{key}"] = nil
180
+ elsif type =~ /\AArray<(.*)>/i
181
+ # check to ensure the input is an array given that the attribute
182
+ # is documented as an array but the input is not
183
+ if attributes[attribute_map[key]].is_a?(Array)
184
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
185
+ end
186
+ elsif !attributes[attribute_map[key]].nil?
187
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
188
+ end
189
+ end
190
+ new(transformed_hash)
191
+ end
192
+
193
+ # Returns the object in the form of hash
194
+ # @return [Hash] Returns the object in the form of hash
195
+ def to_hash
196
+ hash = {}
197
+ self.class.attribute_map.each_pair do |attr, param|
198
+ value = self.send(attr)
199
+ if value.nil?
200
+ is_nullable = self.class.openapi_nullable.include?(attr)
201
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
202
+ end
203
+
204
+ hash[param] = _to_hash(value)
205
+ end
206
+ hash
207
+ end
208
+
209
+ end
210
+
211
+ end