lockally 0.2.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 (238) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +143 -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/ApiKeysApi.md +59 -59
  14. data/docs/ContactLookup.md +26 -0
  15. data/docs/ContactLookupContact.md +28 -0
  16. data/docs/ContactLookupHistory.md +22 -0
  17. data/docs/CreateAiUnitsCheckout200Response.md +22 -0
  18. data/docs/{V1AliasesPostRequest.md → CreateAliasRequest.md} +2 -2
  19. data/docs/{V1ApiKeysPost201Response.md → CreateApiKey201Response.md} +2 -2
  20. data/docs/{V1ApiKeysPostRequest.md → CreateApiKeyRequest.md} +2 -2
  21. data/docs/{V1DomainsPostRequest.md → CreateDomainRequest.md} +2 -2
  22. data/docs/{V1MailboxesPostRequest.md → CreateMailboxRequest.md} +2 -2
  23. data/docs/{V1SuppressionsPostRequest.md → CreateSuppressionRequest.md} +2 -2
  24. data/docs/{V1WebhooksPostRequest.md → CreateWebhookRequest.md} +2 -2
  25. data/docs/DomainsApi.md +141 -141
  26. data/docs/Draft.md +44 -0
  27. data/docs/DraftList.md +18 -0
  28. data/docs/DraftResult.md +26 -0
  29. data/docs/DraftsApi.md +115 -115
  30. data/docs/{V1MailboxesEmailExportPost201Response.md → ExportMailbox201Response.md} +2 -2
  31. data/docs/{V1AdminMeGet200Response.md → GetCurrentAdmin200Response.md} +2 -2
  32. data/docs/{V1UsageGet200Response.md → GetUsage200Response.md} +2 -2
  33. data/docs/HealthApi.md +11 -11
  34. data/docs/{HealthzGet200Response.md → HealthCheck200Response.md} +2 -2
  35. data/docs/Inbox.md +24 -0
  36. data/docs/InboxList.md +18 -0
  37. data/docs/{V1AdminsPostRequest.md → InviteAdminRequest.md} +2 -2
  38. data/docs/{V1AdminsGet200Response.md → ListAdmins200Response.md} +2 -2
  39. data/docs/{V1AliasesGet200Response.md → ListAliases200Response.md} +2 -2
  40. data/docs/{V1ApiKeysGet200Response.md → ListApiKeys200Response.md} +2 -2
  41. data/docs/{V1DomainsGet200Response.md → ListDomains200Response.md} +2 -2
  42. data/docs/{V1MailboxesGet200Response.md → ListMailboxes200Response.md} +2 -2
  43. data/docs/{V1MessagesGet200Response.md → ListMessages200Response.md} +2 -2
  44. data/docs/{V1SuppressionsGet200Response.md → ListSuppressions200Response.md} +2 -2
  45. data/docs/{V1TemplatesGet200Response.md → ListTemplates200Response.md} +2 -2
  46. data/docs/{V1VacationGet200Response.md → ListVacationResponders200Response.md} +2 -2
  47. data/docs/{V1WebhooksGet200Response.md → ListWebhooks200Response.md} +2 -2
  48. data/docs/MailboxGrant.md +20 -0
  49. data/docs/MailboxGrantList.md +18 -0
  50. data/docs/MailboxesApi.md +203 -203
  51. data/docs/MarkReadResult.md +18 -0
  52. data/docs/SendApi.md +121 -121
  53. data/docs/{V1SendPost200Response.md → SendEmail200Response.md} +2 -2
  54. data/docs/{V1SendPost202Response.md → SendEmail202Response.md} +2 -2
  55. data/docs/{V1SendBatchPost200Response.md → SendEmailBatch200Response.md} +2 -2
  56. data/docs/{V1SendBatchPostRequest.md → SendEmailBatchRequest.md} +2 -2
  57. data/docs/{V1SendPostRequest.md → SendEmailRequest.md} +3 -3
  58. data/docs/{V1SendPostRequestAttachmentsInner.md → SendEmailRequestAttachmentsInner.md} +2 -2
  59. data/docs/SendMessage.md +1 -1
  60. data/docs/{V1MailboxesEmailVacationPutRequest.md → SetVacationResponderRequest.md} +2 -2
  61. data/docs/SignupApi.md +4 -4
  62. data/docs/SimulatedInbound.md +22 -0
  63. data/docs/{V1InboxesMailboxMessagesPostRequest.md → StartConversationRequest.md} +2 -2
  64. data/docs/SuppressionsApi.md +75 -75
  65. data/docs/TemplatesApi.md +67 -67
  66. data/docs/TenantApi.md +20 -20
  67. data/docs/TestApi.md +11 -11
  68. data/docs/Thread.md +22 -0
  69. data/docs/ThreadClassification.md +22 -0
  70. data/docs/ThreadList.md +20 -0
  71. data/docs/ThreadMessage.md +40 -0
  72. data/docs/ThreadMessageBody.md +42 -0
  73. data/docs/ThreadMessageBodyAllOfBody.md +22 -0
  74. data/docs/ThreadSummary.md +28 -0
  75. data/docs/{V1AdminsIdPatchRequest.md → UpdateAdminRequest.md} +2 -2
  76. data/docs/{V1MailboxesEmailPatchRequest.md → UpdateMailboxRequest.md} +2 -2
  77. data/docs/{V1WebhooksIdPatchRequest.md → UpdateWebhookRequest.md} +2 -2
  78. data/docs/WebhooksApi.md +63 -63
  79. data/docs/Whoami.md +24 -0
  80. data/lib/lockally/api/admin_api.rb +30 -30
  81. data/lib/lockally/api/admins_api.rb +89 -89
  82. data/lib/lockally/api/agents_api.rb +309 -309
  83. data/lib/lockally/api/ai_api.rb +69 -69
  84. data/lib/lockally/api/aliases_api.rb +64 -64
  85. data/lib/lockally/api/api_keys_api.rb +66 -66
  86. data/lib/lockally/api/domains_api.rb +147 -147
  87. data/lib/lockally/api/drafts_api.rb +140 -140
  88. data/lib/lockally/api/health_api.rb +9 -9
  89. data/lib/lockally/api/mailboxes_api.rb +233 -233
  90. data/lib/lockally/api/send_api.rb +146 -146
  91. data/lib/lockally/api/signup_api.rb +3 -3
  92. data/lib/lockally/api/suppressions_api.rb +87 -87
  93. data/lib/lockally/api/templates_api.rb +69 -69
  94. data/lib/lockally/api/tenant_api.rb +15 -15
  95. data/lib/lockally/api/test_api.rb +9 -9
  96. data/lib/lockally/api/webhooks_api.rb +73 -73
  97. data/lib/lockally/models/{v1_admin_login_post200_response.rb → admin_login200_response.rb} +3 -3
  98. data/lib/lockally/models/{v1_admin_login_post_request.rb → admin_login_request.rb} +3 -3
  99. data/lib/lockally/models/agent_send_result.rb +184 -0
  100. data/lib/lockally/models/ai_config.rb +242 -0
  101. data/lib/lockally/models/ai_config_update.rb +214 -0
  102. data/lib/lockally/models/contact_lookup.rb +235 -0
  103. data/lib/lockally/models/contact_lookup_contact.rb +192 -0
  104. data/lib/lockally/models/contact_lookup_history.rb +166 -0
  105. data/lib/lockally/models/create_ai_units_checkout200_response.rb +199 -0
  106. data/lib/lockally/models/{v1_aliases_post_request.rb → create_alias_request.rb} +3 -3
  107. data/lib/lockally/models/{v1_api_keys_post201_response.rb → create_api_key201_response.rb} +3 -3
  108. data/lib/lockally/models/{v1_api_keys_post_request.rb → create_api_key_request.rb} +3 -3
  109. data/lib/lockally/models/{v1_domains_post_request.rb → create_domain_request.rb} +3 -3
  110. data/lib/lockally/models/{v1_mailboxes_post_request.rb → create_mailbox_request.rb} +3 -3
  111. data/lib/lockally/models/{v1_suppressions_post_request.rb → create_suppression_request.rb} +3 -3
  112. data/lib/lockally/models/{v1_webhooks_post_request.rb → create_webhook_request.rb} +3 -3
  113. data/lib/lockally/models/draft.rb +413 -0
  114. data/lib/lockally/models/draft_list.rb +166 -0
  115. data/lib/lockally/models/draft_result.rb +260 -0
  116. data/lib/lockally/models/{v1_mailboxes_email_export_post201_response.rb → export_mailbox201_response.rb} +3 -3
  117. data/lib/lockally/models/{v1_admin_me_get200_response.rb → get_current_admin200_response.rb} +3 -3
  118. data/lib/lockally/models/{v1_usage_get200_response.rb → get_usage200_response.rb} +3 -3
  119. data/lib/lockally/models/{healthz_get200_response.rb → health_check200_response.rb} +3 -3
  120. data/lib/lockally/models/inbox.rb +225 -0
  121. data/lib/lockally/models/inbox_list.rb +166 -0
  122. data/lib/lockally/models/{v1_admins_post_request.rb → invite_admin_request.rb} +3 -3
  123. data/lib/lockally/models/list_admins200_response.rb +166 -0
  124. data/lib/lockally/models/{v1_aliases_get200_response.rb → list_aliases200_response.rb} +3 -3
  125. data/lib/lockally/models/{v1_admins_get200_response.rb → list_api_keys200_response.rb} +4 -4
  126. data/lib/lockally/models/{v1_domains_get200_response.rb → list_domains200_response.rb} +3 -3
  127. data/lib/lockally/models/{v1_mailboxes_get200_response.rb → list_mailboxes200_response.rb} +3 -3
  128. data/lib/lockally/models/{v1_messages_get200_response.rb → list_messages200_response.rb} +3 -3
  129. data/lib/lockally/models/{v1_suppressions_get200_response.rb → list_suppressions200_response.rb} +3 -3
  130. data/lib/lockally/models/{v1_send_batch_post200_response.rb → list_templates200_response.rb} +4 -4
  131. data/lib/lockally/models/{v1_vacation_get200_response.rb → list_vacation_responders200_response.rb} +3 -3
  132. data/lib/lockally/models/{v1_api_keys_get200_response.rb → list_webhooks200_response.rb} +4 -4
  133. data/lib/lockally/models/mailbox_grant.rb +156 -0
  134. data/lib/lockally/models/mailbox_grant_list.rb +166 -0
  135. data/lib/lockally/models/mark_read_result.rb +147 -0
  136. data/lib/lockally/models/{v1_send_post200_response.rb → send_email200_response.rb} +3 -3
  137. data/lib/lockally/models/{v1_send_post202_response.rb → send_email202_response.rb} +3 -3
  138. data/lib/lockally/models/{v1_templates_get200_response.rb → send_email_batch200_response.rb} +4 -4
  139. data/lib/lockally/models/{v1_send_batch_post_request.rb → send_email_batch_request.rb} +3 -3
  140. data/lib/lockally/models/{v1_send_post_request.rb → send_email_request.rb} +4 -4
  141. data/lib/lockally/models/{v1_send_post_request_attachments_inner.rb → send_email_request_attachments_inner.rb} +3 -3
  142. data/lib/lockally/models/send_message.rb +1 -1
  143. data/lib/lockally/models/{v1_mailboxes_email_vacation_put_request.rb → set_vacation_responder_request.rb} +3 -3
  144. data/lib/lockally/models/simulated_inbound.rb +167 -0
  145. data/lib/lockally/models/{v1_inboxes_mailbox_messages_post_request.rb → start_conversation_request.rb} +3 -3
  146. data/lib/lockally/models/thread.rb +219 -0
  147. data/lib/lockally/models/thread_classification.rb +186 -0
  148. data/lib/lockally/models/thread_list.rb +192 -0
  149. data/lib/lockally/models/thread_message.rb +397 -0
  150. data/lib/lockally/models/thread_message_body.rb +413 -0
  151. data/lib/lockally/models/thread_message_body_all_of_body.rb +165 -0
  152. data/lib/lockally/models/thread_summary.rb +280 -0
  153. data/lib/lockally/models/{v1_admins_id_patch_request.rb → update_admin_request.rb} +3 -3
  154. data/lib/lockally/models/{v1_mailboxes_email_patch_request.rb → update_mailbox_request.rb} +3 -3
  155. data/lib/lockally/models/{v1_webhooks_id_patch_request.rb → update_webhook_request.rb} +3 -3
  156. data/lib/lockally/models/whoami.rb +177 -0
  157. data/lib/lockally/version.rb +1 -1
  158. data/lib/lockally.rb +59 -35
  159. data/spec/api/admin_api_spec.rb +9 -9
  160. data/spec/api/admins_api_spec.rb +22 -22
  161. data/spec/api/agents_api_spec.rb +78 -78
  162. data/spec/api/ai_api_spec.rb +22 -22
  163. data/spec/api/aliases_api_spec.rb +16 -16
  164. data/spec/api/api_keys_api_spec.rb +17 -17
  165. data/spec/api/domains_api_spec.rb +42 -42
  166. data/spec/api/drafts_api_spec.rb +38 -38
  167. data/spec/api/health_api_spec.rb +3 -3
  168. data/spec/api/mailboxes_api_spec.rb +61 -61
  169. data/spec/api/send_api_spec.rb +35 -35
  170. data/spec/api/signup_api_spec.rb +1 -1
  171. data/spec/api/suppressions_api_spec.rb +18 -18
  172. data/spec/api/templates_api_spec.rb +17 -17
  173. data/spec/api/tenant_api_spec.rb +5 -5
  174. data/spec/api/test_api_spec.rb +3 -3
  175. data/spec/api/webhooks_api_spec.rb +19 -19
  176. data/spec/models/{v1_admin_login_post200_response_spec.rb → admin_login200_response_spec.rb} +6 -6
  177. data/spec/models/{v1_admin_login_post_request_spec.rb → admin_login_request_spec.rb} +6 -6
  178. data/spec/models/agent_send_result_spec.rb +48 -0
  179. data/spec/models/ai_config_spec.rb +64 -0
  180. data/spec/models/ai_config_update_spec.rb +46 -0
  181. data/spec/models/contact_lookup_contact_spec.rb +66 -0
  182. data/spec/models/contact_lookup_history_spec.rb +48 -0
  183. data/spec/models/contact_lookup_spec.rb +60 -0
  184. data/spec/models/create_ai_units_checkout200_response_spec.rb +48 -0
  185. data/spec/models/{v1_aliases_post_request_spec.rb → create_alias_request_spec.rb} +6 -6
  186. data/spec/models/{v1_api_keys_post201_response_spec.rb → create_api_key201_response_spec.rb} +6 -6
  187. data/spec/models/{v1_api_keys_post_request_spec.rb → create_api_key_request_spec.rb} +6 -6
  188. data/spec/models/{v1_domains_post_request_spec.rb → create_domain_request_spec.rb} +6 -6
  189. data/spec/models/{v1_mailboxes_post_request_spec.rb → create_mailbox_request_spec.rb} +6 -6
  190. data/spec/models/{v1_suppressions_post_request_spec.rb → create_suppression_request_spec.rb} +6 -6
  191. data/spec/models/{v1_webhooks_post_request_spec.rb → create_webhook_request_spec.rb} +6 -6
  192. data/spec/models/draft_list_spec.rb +36 -0
  193. data/spec/models/draft_result_spec.rb +64 -0
  194. data/spec/models/draft_spec.rb +118 -0
  195. data/spec/models/{v1_mailboxes_email_export_post201_response_spec.rb → export_mailbox201_response_spec.rb} +6 -6
  196. data/spec/models/{v1_admin_me_get200_response_spec.rb → get_current_admin200_response_spec.rb} +6 -6
  197. data/spec/models/{v1_usage_get200_response_spec.rb → get_usage200_response_spec.rb} +6 -6
  198. data/spec/models/{healthz_get200_response_spec.rb → health_check200_response_spec.rb} +6 -6
  199. data/spec/models/inbox_list_spec.rb +36 -0
  200. data/spec/models/inbox_spec.rb +54 -0
  201. data/spec/models/{v1_admins_post_request_spec.rb → invite_admin_request_spec.rb} +6 -6
  202. data/spec/models/{v1_aliases_get200_response_spec.rb → list_admins200_response_spec.rb} +6 -6
  203. data/spec/models/{v1_admins_get200_response_spec.rb → list_aliases200_response_spec.rb} +6 -6
  204. data/spec/models/{v1_api_keys_get200_response_spec.rb → list_api_keys200_response_spec.rb} +6 -6
  205. data/spec/models/list_domains200_response_spec.rb +36 -0
  206. data/spec/models/{v1_mailboxes_get200_response_spec.rb → list_mailboxes200_response_spec.rb} +6 -6
  207. data/spec/models/{v1_messages_get200_response_spec.rb → list_messages200_response_spec.rb} +6 -6
  208. data/spec/models/{v1_suppressions_get200_response_spec.rb → list_suppressions200_response_spec.rb} +6 -6
  209. data/spec/models/{v1_vacation_get200_response_spec.rb → list_templates200_response_spec.rb} +6 -6
  210. data/spec/models/list_vacation_responders200_response_spec.rb +36 -0
  211. data/spec/models/{v1_domains_get200_response_spec.rb → list_webhooks200_response_spec.rb} +6 -6
  212. data/spec/models/mailbox_grant_list_spec.rb +36 -0
  213. data/spec/models/mailbox_grant_spec.rb +42 -0
  214. data/spec/models/mark_read_result_spec.rb +36 -0
  215. data/spec/models/{v1_send_post200_response_spec.rb → send_email200_response_spec.rb} +6 -6
  216. data/spec/models/{v1_send_post202_response_spec.rb → send_email202_response_spec.rb} +6 -6
  217. data/spec/models/{v1_templates_get200_response_spec.rb → send_email_batch200_response_spec.rb} +6 -6
  218. data/spec/models/{v1_send_batch_post_request_spec.rb → send_email_batch_request_spec.rb} +6 -6
  219. data/spec/models/{v1_send_post_request_attachments_inner_spec.rb → send_email_request_attachments_inner_spec.rb} +6 -6
  220. data/spec/models/{v1_send_post_request_spec.rb → send_email_request_spec.rb} +6 -6
  221. data/spec/models/{v1_mailboxes_email_vacation_put_request_spec.rb → set_vacation_responder_request_spec.rb} +6 -6
  222. data/spec/models/simulated_inbound_spec.rb +48 -0
  223. data/spec/models/{v1_inboxes_mailbox_messages_post_request_spec.rb → start_conversation_request_spec.rb} +6 -6
  224. data/spec/models/thread_classification_spec.rb +48 -0
  225. data/spec/models/thread_list_spec.rb +42 -0
  226. data/spec/models/thread_message_body_all_of_body_spec.rb +48 -0
  227. data/spec/models/thread_message_body_spec.rb +112 -0
  228. data/spec/models/thread_message_spec.rb +106 -0
  229. data/spec/models/thread_spec.rb +48 -0
  230. data/spec/models/thread_summary_spec.rb +70 -0
  231. data/spec/models/{v1_admins_id_patch_request_spec.rb → update_admin_request_spec.rb} +6 -6
  232. data/spec/models/{v1_mailboxes_email_patch_request_spec.rb → update_mailbox_request_spec.rb} +6 -6
  233. data/spec/models/{v1_webhooks_id_patch_request_spec.rb → update_webhook_request_spec.rb} +6 -6
  234. data/spec/models/whoami_spec.rb +54 -0
  235. metadata +238 -142
  236. data/lib/lockally/models/v1_webhooks_get200_response.rb +0 -166
  237. data/spec/models/v1_send_batch_post200_response_spec.rb +0 -36
  238. data/spec/models/v1_webhooks_get200_response_spec.rb +0 -36
@@ -0,0 +1,199 @@
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 CreateAiUnitsCheckout200Response < ApiModelBase
18
+ attr_accessor :authorization_url
19
+
20
+ attr_accessor :reference
21
+
22
+ attr_accessor :units
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'authorization_url' => :'authorization_url',
28
+ :'reference' => :'reference',
29
+ :'units' => :'units'
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
+ :'authorization_url' => :'String',
47
+ :'reference' => :'String',
48
+ :'units' => :'Integer'
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 `Lockally::CreateAiUnitsCheckout200Response` 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 `Lockally::CreateAiUnitsCheckout200Response`. 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?(:'authorization_url')
75
+ self.authorization_url = attributes[:'authorization_url']
76
+ else
77
+ self.authorization_url = nil
78
+ end
79
+
80
+ if attributes.key?(:'reference')
81
+ self.reference = attributes[:'reference']
82
+ else
83
+ self.reference = nil
84
+ end
85
+
86
+ if attributes.key?(:'units')
87
+ self.units = attributes[:'units']
88
+ end
89
+ end
90
+
91
+ # Show invalid properties with the reasons. Usually used together with valid?
92
+ # @return Array for valid properties with the reasons
93
+ def list_invalid_properties
94
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
95
+ invalid_properties = Array.new
96
+ if @authorization_url.nil?
97
+ invalid_properties.push('invalid value for "authorization_url", authorization_url cannot be nil.')
98
+ end
99
+
100
+ if @reference.nil?
101
+ invalid_properties.push('invalid value for "reference", reference cannot be nil.')
102
+ end
103
+
104
+ invalid_properties
105
+ end
106
+
107
+ # Check to see if the all the properties in the model are valid
108
+ # @return true if the model is valid
109
+ def valid?
110
+ warn '[DEPRECATED] the `valid?` method is obsolete'
111
+ return false if @authorization_url.nil?
112
+ return false if @reference.nil?
113
+ true
114
+ end
115
+
116
+ # Custom attribute writer method with validation
117
+ # @param [Object] authorization_url Value to be assigned
118
+ def authorization_url=(authorization_url)
119
+ if authorization_url.nil?
120
+ fail ArgumentError, 'authorization_url cannot be nil'
121
+ end
122
+
123
+ @authorization_url = authorization_url
124
+ end
125
+
126
+ # Custom attribute writer method with validation
127
+ # @param [Object] reference Value to be assigned
128
+ def reference=(reference)
129
+ if reference.nil?
130
+ fail ArgumentError, 'reference cannot be nil'
131
+ end
132
+
133
+ @reference = reference
134
+ end
135
+
136
+ # Checks equality by comparing each attribute.
137
+ # @param [Object] Object to be compared
138
+ def ==(o)
139
+ return true if self.equal?(o)
140
+ self.class == o.class &&
141
+ authorization_url == o.authorization_url &&
142
+ reference == o.reference &&
143
+ units == o.units
144
+ end
145
+
146
+ # @see the `==` method
147
+ # @param [Object] Object to be compared
148
+ def eql?(o)
149
+ self == o
150
+ end
151
+
152
+ # Calculates hash code according to all attributes.
153
+ # @return [Integer] Hash code
154
+ def hash
155
+ [authorization_url, reference, units].hash
156
+ end
157
+
158
+ # Builds the object from hash
159
+ # @param [Hash] attributes Model attributes in the form of hash
160
+ # @return [Object] Returns the model itself
161
+ def self.build_from_hash(attributes)
162
+ return nil unless attributes.is_a?(Hash)
163
+ attributes = attributes.transform_keys(&:to_sym)
164
+ transformed_hash = {}
165
+ openapi_types.each_pair do |key, type|
166
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
167
+ transformed_hash["#{key}"] = nil
168
+ elsif type =~ /\AArray<(.*)>/i
169
+ # check to ensure the input is an array given that the attribute
170
+ # is documented as an array but the input is not
171
+ if attributes[attribute_map[key]].is_a?(Array)
172
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
173
+ end
174
+ elsif !attributes[attribute_map[key]].nil?
175
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
176
+ end
177
+ end
178
+ new(transformed_hash)
179
+ end
180
+
181
+ # Returns the object in the form of hash
182
+ # @return [Hash] Returns the object in the form of hash
183
+ def to_hash
184
+ hash = {}
185
+ self.class.attribute_map.each_pair do |attr, param|
186
+ value = self.send(attr)
187
+ if value.nil?
188
+ is_nullable = self.class.openapi_nullable.include?(attr)
189
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
190
+ end
191
+
192
+ hash[param] = _to_hash(value)
193
+ end
194
+ hash
195
+ end
196
+
197
+ end
198
+
199
+ end
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Lockally
17
- class V1AliasesPostRequest < ApiModelBase
17
+ class CreateAliasRequest < ApiModelBase
18
18
  attr_accessor :alias_address
19
19
 
20
20
  attr_accessor :alias_target
@@ -55,14 +55,14 @@ module Lockally
55
55
  # @param [Hash] attributes Model attributes in the form of hash
56
56
  def initialize(attributes = {})
57
57
  if (!attributes.is_a?(Hash))
58
- fail ArgumentError, "The input argument (attributes) must be a hash in `Lockally::V1AliasesPostRequest` initialize method"
58
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Lockally::CreateAliasRequest` initialize method"
59
59
  end
60
60
 
61
61
  # check to see if the attribute exists and convert string to symbol for hash key
62
62
  acceptable_attribute_map = self.class.acceptable_attribute_map
63
63
  attributes = attributes.each_with_object({}) { |(k, v), h|
64
64
  if (!acceptable_attribute_map.key?(k.to_sym))
65
- fail ArgumentError, "`#{k}` is not a valid attribute in `Lockally::V1AliasesPostRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
65
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Lockally::CreateAliasRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
66
66
  end
67
67
  h[k.to_sym] = v
68
68
  }
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Lockally
17
- class V1ApiKeysPost201Response < ApiModelBase
17
+ class CreateApiKey201Response < ApiModelBase
18
18
  attr_accessor :id
19
19
 
20
20
  attr_accessor :tenant_id
@@ -92,14 +92,14 @@ module Lockally
92
92
  # @param [Hash] attributes Model attributes in the form of hash
93
93
  def initialize(attributes = {})
94
94
  if (!attributes.is_a?(Hash))
95
- fail ArgumentError, "The input argument (attributes) must be a hash in `Lockally::V1ApiKeysPost201Response` initialize method"
95
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Lockally::CreateApiKey201Response` initialize method"
96
96
  end
97
97
 
98
98
  # check to see if the attribute exists and convert string to symbol for hash key
99
99
  acceptable_attribute_map = self.class.acceptable_attribute_map
100
100
  attributes = attributes.each_with_object({}) { |(k, v), h|
101
101
  if (!acceptable_attribute_map.key?(k.to_sym))
102
- fail ArgumentError, "`#{k}` is not a valid attribute in `Lockally::V1ApiKeysPost201Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
102
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Lockally::CreateApiKey201Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
103
103
  end
104
104
  h[k.to_sym] = v
105
105
  }
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Lockally
17
- class V1ApiKeysPostRequest < ApiModelBase
17
+ class CreateApiKeyRequest < ApiModelBase
18
18
  # Free-text identifier shown in the dashboard.
19
19
  attr_accessor :label
20
20
 
@@ -84,14 +84,14 @@ module Lockally
84
84
  # @param [Hash] attributes Model attributes in the form of hash
85
85
  def initialize(attributes = {})
86
86
  if (!attributes.is_a?(Hash))
87
- fail ArgumentError, "The input argument (attributes) must be a hash in `Lockally::V1ApiKeysPostRequest` initialize method"
87
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Lockally::CreateApiKeyRequest` initialize method"
88
88
  end
89
89
 
90
90
  # check to see if the attribute exists and convert string to symbol for hash key
91
91
  acceptable_attribute_map = self.class.acceptable_attribute_map
92
92
  attributes = attributes.each_with_object({}) { |(k, v), h|
93
93
  if (!acceptable_attribute_map.key?(k.to_sym))
94
- fail ArgumentError, "`#{k}` is not a valid attribute in `Lockally::V1ApiKeysPostRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
94
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Lockally::CreateApiKeyRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
95
95
  end
96
96
  h[k.to_sym] = v
97
97
  }
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Lockally
17
- class V1DomainsPostRequest < ApiModelBase
17
+ class CreateDomainRequest < ApiModelBase
18
18
  attr_accessor :domain
19
19
 
20
20
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -51,14 +51,14 @@ module Lockally
51
51
  # @param [Hash] attributes Model attributes in the form of hash
52
52
  def initialize(attributes = {})
53
53
  if (!attributes.is_a?(Hash))
54
- fail ArgumentError, "The input argument (attributes) must be a hash in `Lockally::V1DomainsPostRequest` initialize method"
54
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Lockally::CreateDomainRequest` initialize method"
55
55
  end
56
56
 
57
57
  # check to see if the attribute exists and convert string to symbol for hash key
58
58
  acceptable_attribute_map = self.class.acceptable_attribute_map
59
59
  attributes = attributes.each_with_object({}) { |(k, v), h|
60
60
  if (!acceptable_attribute_map.key?(k.to_sym))
61
- fail ArgumentError, "`#{k}` is not a valid attribute in `Lockally::V1DomainsPostRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
61
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Lockally::CreateDomainRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
62
62
  end
63
63
  h[k.to_sym] = v
64
64
  }
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Lockally
17
- class V1MailboxesPostRequest < ApiModelBase
17
+ class CreateMailboxRequest < ApiModelBase
18
18
  attr_accessor :email
19
19
 
20
20
  # Optional; lockally generates if absent.
@@ -61,14 +61,14 @@ module Lockally
61
61
  # @param [Hash] attributes Model attributes in the form of hash
62
62
  def initialize(attributes = {})
63
63
  if (!attributes.is_a?(Hash))
64
- fail ArgumentError, "The input argument (attributes) must be a hash in `Lockally::V1MailboxesPostRequest` initialize method"
64
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Lockally::CreateMailboxRequest` initialize method"
65
65
  end
66
66
 
67
67
  # check to see if the attribute exists and convert string to symbol for hash key
68
68
  acceptable_attribute_map = self.class.acceptable_attribute_map
69
69
  attributes = attributes.each_with_object({}) { |(k, v), h|
70
70
  if (!acceptable_attribute_map.key?(k.to_sym))
71
- fail ArgumentError, "`#{k}` is not a valid attribute in `Lockally::V1MailboxesPostRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
71
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Lockally::CreateMailboxRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
72
72
  end
73
73
  h[k.to_sym] = v
74
74
  }
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Lockally
17
- class V1SuppressionsPostRequest < ApiModelBase
17
+ class CreateSuppressionRequest < ApiModelBase
18
18
  attr_accessor :email
19
19
 
20
20
  attr_accessor :reason
@@ -77,14 +77,14 @@ module Lockally
77
77
  # @param [Hash] attributes Model attributes in the form of hash
78
78
  def initialize(attributes = {})
79
79
  if (!attributes.is_a?(Hash))
80
- fail ArgumentError, "The input argument (attributes) must be a hash in `Lockally::V1SuppressionsPostRequest` initialize method"
80
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Lockally::CreateSuppressionRequest` initialize method"
81
81
  end
82
82
 
83
83
  # check to see if the attribute exists and convert string to symbol for hash key
84
84
  acceptable_attribute_map = self.class.acceptable_attribute_map
85
85
  attributes = attributes.each_with_object({}) { |(k, v), h|
86
86
  if (!acceptable_attribute_map.key?(k.to_sym))
87
- fail ArgumentError, "`#{k}` is not a valid attribute in `Lockally::V1SuppressionsPostRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
87
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Lockally::CreateSuppressionRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
88
88
  end
89
89
  h[k.to_sym] = v
90
90
  }
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Lockally
17
- class V1WebhooksPostRequest < ApiModelBase
17
+ class CreateWebhookRequest < ApiModelBase
18
18
  # HTTPS recommended (HTTP allowed for local development).
19
19
  attr_accessor :url
20
20
 
@@ -56,14 +56,14 @@ module Lockally
56
56
  # @param [Hash] attributes Model attributes in the form of hash
57
57
  def initialize(attributes = {})
58
58
  if (!attributes.is_a?(Hash))
59
- fail ArgumentError, "The input argument (attributes) must be a hash in `Lockally::V1WebhooksPostRequest` initialize method"
59
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Lockally::CreateWebhookRequest` initialize method"
60
60
  end
61
61
 
62
62
  # check to see if the attribute exists and convert string to symbol for hash key
63
63
  acceptable_attribute_map = self.class.acceptable_attribute_map
64
64
  attributes = attributes.each_with_object({}) { |(k, v), h|
65
65
  if (!acceptable_attribute_map.key?(k.to_sym))
66
- fail ArgumentError, "`#{k}` is not a valid attribute in `Lockally::V1WebhooksPostRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
66
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Lockally::CreateWebhookRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
67
67
  end
68
68
  h[k.to_sym] = v
69
69
  }