sendmux-mailbox 2.0.2 → 3.0.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 (149) hide show
  1. checksums.yaml +4 -4
  2. metadata +13 -226
  3. data/CHANGELOG.md +0 -101
  4. data/LICENSE +0 -21
  5. data/README.md +0 -181
  6. data/lib/sendmux/mailbox/client.rb +0 -41
  7. data/lib/sendmux/mailbox/version.rb +0 -7
  8. data/lib/sendmux/mailbox.rb +0 -12
  9. data/lib/sendmux_mailbox_generated/api/mailbox_api_api.rb +0 -3547
  10. data/lib/sendmux_mailbox_generated/api_client.rb +0 -447
  11. data/lib/sendmux_mailbox_generated/api_error.rb +0 -58
  12. data/lib/sendmux_mailbox_generated/api_model_base.rb +0 -88
  13. data/lib/sendmux_mailbox_generated/configuration.rb +0 -400
  14. data/lib/sendmux_mailbox_generated/models/api_error_detail.rb +0 -219
  15. data/lib/sendmux_mailbox_generated/models/api_error_error.rb +0 -275
  16. data/lib/sendmux_mailbox_generated/models/api_error_meta.rb +0 -164
  17. data/lib/sendmux_mailbox_generated/models/api_error_response.rb +0 -216
  18. data/lib/sendmux_mailbox_generated/models/batch_delete_mailbox_messages_body.rb +0 -205
  19. data/lib/sendmux_mailbox_generated/models/batch_update_mailbox_messages_body.rb +0 -227
  20. data/lib/sendmux_mailbox_generated/models/connection.rb +0 -273
  21. data/lib/sendmux_mailbox_generated/models/connection_credential.rb +0 -226
  22. data/lib/sendmux_mailbox_generated/models/connection_mailboxes_inner.rb +0 -190
  23. data/lib/sendmux_mailbox_generated/models/connection_response.rb +0 -223
  24. data/lib/sendmux_mailbox_generated/models/connection_team.rb +0 -190
  25. data/lib/sendmux_mailbox_generated/models/create_mailbox_folder_body.rb +0 -183
  26. data/lib/sendmux_mailbox_generated/models/cursor_pagination.rb +0 -173
  27. data/lib/sendmux_mailbox_generated/models/granted_mailbox.rb +0 -192
  28. data/lib/sendmux_mailbox_generated/models/granted_mailbox_list_response.rb +0 -251
  29. data/lib/sendmux_mailbox_generated/models/mailbox_address.rb +0 -176
  30. data/lib/sendmux_mailbox_generated/models/mailbox_attachment.rb +0 -250
  31. data/lib/sendmux_mailbox_generated/models/mailbox_attachment_upload_intent_body.rb +0 -228
  32. data/lib/sendmux_mailbox_generated/models/mailbox_attachment_upload_intent_result.rb +0 -323
  33. data/lib/sendmux_mailbox_generated/models/mailbox_attachment_upload_intent_result_headers.rb +0 -191
  34. data/lib/sendmux_mailbox_generated/models/mailbox_attachment_upload_intent_result_response.rb +0 -223
  35. data/lib/sendmux_mailbox_generated/models/mailbox_attachment_upload_result.rb +0 -243
  36. data/lib/sendmux_mailbox_generated/models/mailbox_attachment_upload_result_response.rb +0 -223
  37. data/lib/sendmux_mailbox_generated/models/mailbox_batch_delete_messages_result.rb +0 -248
  38. data/lib/sendmux_mailbox_generated/models/mailbox_batch_delete_messages_result_response.rb +0 -223
  39. data/lib/sendmux_mailbox_generated/models/mailbox_batch_get_body.rb +0 -373
  40. data/lib/sendmux_mailbox_generated/models/mailbox_batch_get_item.rb +0 -188
  41. data/lib/sendmux_mailbox_generated/models/mailbox_batch_get_result.rb +0 -220
  42. data/lib/sendmux_mailbox_generated/models/mailbox_batch_get_result_response.rb +0 -223
  43. data/lib/sendmux_mailbox_generated/models/mailbox_batch_get_result_states.rb +0 -150
  44. data/lib/sendmux_mailbox_generated/models/mailbox_batch_message_failure.rb +0 -216
  45. data/lib/sendmux_mailbox_generated/models/mailbox_batch_message_states.rb +0 -162
  46. data/lib/sendmux_mailbox_generated/models/mailbox_batch_update_messages_result.rb +0 -248
  47. data/lib/sendmux_mailbox_generated/models/mailbox_batch_update_messages_result_response.rb +0 -223
  48. data/lib/sendmux_mailbox_generated/models/mailbox_changes.rb +0 -307
  49. data/lib/sendmux_mailbox_generated/models/mailbox_changes_response.rb +0 -223
  50. data/lib/sendmux_mailbox_generated/models/mailbox_content_headers.rb +0 -214
  51. data/lib/sendmux_mailbox_generated/models/mailbox_content_headers_full_inner.rb +0 -190
  52. data/lib/sendmux_mailbox_generated/models/mailbox_content_headers_selected.rb +0 -234
  53. data/lib/sendmux_mailbox_generated/models/mailbox_folder.rb +0 -307
  54. data/lib/sendmux_mailbox_generated/models/mailbox_folder_cursor_list_response.rb +0 -251
  55. data/lib/sendmux_mailbox_generated/models/mailbox_folder_deleted_response.rb +0 -223
  56. data/lib/sendmux_mailbox_generated/models/mailbox_folder_deleted_response_all_of_data.rb +0 -190
  57. data/lib/sendmux_mailbox_generated/models/mailbox_folder_query_changes.rb +0 -270
  58. data/lib/sendmux_mailbox_generated/models/mailbox_folder_query_changes_added_inner.rb +0 -190
  59. data/lib/sendmux_mailbox_generated/models/mailbox_folder_query_changes_response.rb +0 -223
  60. data/lib/sendmux_mailbox_generated/models/mailbox_folder_response.rb +0 -223
  61. data/lib/sendmux_mailbox_generated/models/mailbox_get_changes200_response.rb +0 -103
  62. data/lib/sendmux_mailbox_generated/models/mailbox_identity.rb +0 -352
  63. data/lib/sendmux_mailbox_generated/models/mailbox_identity_cursor_list_response.rb +0 -251
  64. data/lib/sendmux_mailbox_generated/models/mailbox_identity_list_meta.rb +0 -173
  65. data/lib/sendmux_mailbox_generated/models/mailbox_identity_response.rb +0 -223
  66. data/lib/sendmux_mailbox_generated/models/mailbox_me.rb +0 -294
  67. data/lib/sendmux_mailbox_generated/models/mailbox_me_item_response.rb +0 -223
  68. data/lib/sendmux_mailbox_generated/models/mailbox_message.rb +0 -594
  69. data/lib/sendmux_mailbox_generated/models/mailbox_message_content.rb +0 -348
  70. data/lib/sendmux_mailbox_generated/models/mailbox_message_content_body.rb +0 -327
  71. data/lib/sendmux_mailbox_generated/models/mailbox_message_content_dates.rb +0 -162
  72. data/lib/sendmux_mailbox_generated/models/mailbox_message_content_participants.rb +0 -262
  73. data/lib/sendmux_mailbox_generated/models/mailbox_message_content_response.rb +0 -223
  74. data/lib/sendmux_mailbox_generated/models/mailbox_message_content_states.rb +0 -176
  75. data/lib/sendmux_mailbox_generated/models/mailbox_message_count.rb +0 -176
  76. data/lib/sendmux_mailbox_generated/models/mailbox_message_count_response.rb +0 -223
  77. data/lib/sendmux_mailbox_generated/models/mailbox_message_deleted_response.rb +0 -223
  78. data/lib/sendmux_mailbox_generated/models/mailbox_message_detail_response.rb +0 -223
  79. data/lib/sendmux_mailbox_generated/models/mailbox_message_flags.rb +0 -242
  80. data/lib/sendmux_mailbox_generated/models/mailbox_message_query_changes.rb +0 -270
  81. data/lib/sendmux_mailbox_generated/models/mailbox_message_query_changes_response.rb +0 -223
  82. data/lib/sendmux_mailbox_generated/models/mailbox_message_summary.rb +0 -454
  83. data/lib/sendmux_mailbox_generated/models/mailbox_message_summary_cursor_list_response.rb +0 -251
  84. data/lib/sendmux_mailbox_generated/models/mailbox_query_meta.rb +0 -173
  85. data/lib/sendmux_mailbox_generated/models/mailbox_quota.rb +0 -359
  86. data/lib/sendmux_mailbox_generated/models/mailbox_quota_cursor_list_response.rb +0 -251
  87. data/lib/sendmux_mailbox_generated/models/mailbox_raw_body.rb +0 -279
  88. data/lib/sendmux_mailbox_generated/models/mailbox_raw_body_body.rb +0 -200
  89. data/lib/sendmux_mailbox_generated/models/mailbox_raw_body_response.rb +0 -223
  90. data/lib/sendmux_mailbox_generated/models/mailbox_realtime_event.rb +0 -366
  91. data/lib/sendmux_mailbox_generated/models/mailbox_realtime_message.rb +0 -492
  92. data/lib/sendmux_mailbox_generated/models/mailbox_realtime_message_body.rb +0 -214
  93. data/lib/sendmux_mailbox_generated/models/mailbox_search_snippet.rb +0 -190
  94. data/lib/sendmux_mailbox_generated/models/mailbox_search_snippets_result.rb +0 -206
  95. data/lib/sendmux_mailbox_generated/models/mailbox_search_snippets_result_response.rb +0 -223
  96. data/lib/sendmux_mailbox_generated/models/mailbox_send_result_response.rb +0 -223
  97. data/lib/sendmux_mailbox_generated/models/mailbox_send_scope.rb +0 -213
  98. data/lib/sendmux_mailbox_generated/models/mailbox_session.rb +0 -294
  99. data/lib/sendmux_mailbox_generated/models/mailbox_session_capabilities.rb +0 -346
  100. data/lib/sendmux_mailbox_generated/models/mailbox_session_capabilities_attachments.rb +0 -294
  101. data/lib/sendmux_mailbox_generated/models/mailbox_session_capabilities_folders.rb +0 -320
  102. data/lib/sendmux_mailbox_generated/models/mailbox_session_capabilities_identities.rb +0 -268
  103. data/lib/sendmux_mailbox_generated/models/mailbox_session_capabilities_messages.rb +0 -516
  104. data/lib/sendmux_mailbox_generated/models/mailbox_session_capabilities_quotas.rb +0 -242
  105. data/lib/sendmux_mailbox_generated/models/mailbox_session_capabilities_submissions.rb +0 -242
  106. data/lib/sendmux_mailbox_generated/models/mailbox_session_capabilities_sync.rb +0 -222
  107. data/lib/sendmux_mailbox_generated/models/mailbox_session_capabilities_threads.rb +0 -268
  108. data/lib/sendmux_mailbox_generated/models/mailbox_session_endpoints.rb +0 -334
  109. data/lib/sendmux_mailbox_generated/models/mailbox_session_gated.rb +0 -451
  110. data/lib/sendmux_mailbox_generated/models/mailbox_session_limits.rb +0 -398
  111. data/lib/sendmux_mailbox_generated/models/mailbox_session_mailbox.rb +0 -203
  112. data/lib/sendmux_mailbox_generated/models/mailbox_session_response.rb +0 -223
  113. data/lib/sendmux_mailbox_generated/models/mailbox_session_states.rb +0 -294
  114. data/lib/sendmux_mailbox_generated/models/mailbox_submission.rb +0 -321
  115. data/lib/sendmux_mailbox_generated/models/mailbox_submission_cursor_list_response.rb +0 -251
  116. data/lib/sendmux_mailbox_generated/models/mailbox_submission_delivery_status.rb +0 -200
  117. data/lib/sendmux_mailbox_generated/models/mailbox_submission_envelope.rb +0 -178
  118. data/lib/sendmux_mailbox_generated/models/mailbox_submission_envelope_address.rb +0 -178
  119. data/lib/sendmux_mailbox_generated/models/mailbox_submission_response.rb +0 -223
  120. data/lib/sendmux_mailbox_generated/models/mailbox_sync_meta.rb +0 -173
  121. data/lib/sendmux_mailbox_generated/models/mailbox_thread.rb +0 -377
  122. data/lib/sendmux_mailbox_generated/models/mailbox_thread_content_meta.rb +0 -244
  123. data/lib/sendmux_mailbox_generated/models/mailbox_thread_content_meta_states.rb +0 -188
  124. data/lib/sendmux_mailbox_generated/models/mailbox_thread_content_response.rb +0 -251
  125. data/lib/sendmux_mailbox_generated/models/mailbox_thread_detail_response.rb +0 -223
  126. data/lib/sendmux_mailbox_generated/models/mailbox_thread_message_summary_cursor_list_response.rb +0 -251
  127. data/lib/sendmux_mailbox_generated/models/mailbox_thread_messages_meta.rb +0 -199
  128. data/lib/sendmux_mailbox_generated/models/mailbox_thread_summary.rb +0 -349
  129. data/lib/sendmux_mailbox_generated/models/mailbox_thread_summary_cursor_list_response.rb +0 -251
  130. data/lib/sendmux_mailbox_generated/models/mailbox_thread_summary_states.rb +0 -162
  131. data/lib/sendmux_mailbox_generated/models/mailbox_typed_changes.rb +0 -164
  132. data/lib/sendmux_mailbox_generated/models/mailbox_typed_changes_response.rb +0 -223
  133. data/lib/sendmux_mailbox_generated/models/mailbox_typed_changes_types.rb +0 -192
  134. data/lib/sendmux_mailbox_generated/models/mailbox_usage.rb +0 -192
  135. data/lib/sendmux_mailbox_generated/models/mailbox_usage_resource.rb +0 -408
  136. data/lib/sendmux_mailbox_generated/models/mailbox_usage_response.rb +0 -223
  137. data/lib/sendmux_mailbox_generated/models/mailbox_usage_states.rb +0 -150
  138. data/lib/sendmux_mailbox_generated/models/patch_mailbox_folder_body.rb +0 -166
  139. data/lib/sendmux_mailbox_generated/models/patch_mailbox_message_body.rb +0 -168
  140. data/lib/sendmux_mailbox_generated/models/response_meta.rb +0 -164
  141. data/lib/sendmux_mailbox_generated/models/send_mailbox_message_body.rb +0 -293
  142. data/lib/sendmux_mailbox_generated/models/send_mailbox_message_body_attachments_inner.rb +0 -103
  143. data/lib/sendmux_mailbox_generated/models/send_mailbox_message_body_attachments_inner_any_of.rb +0 -217
  144. data/lib/sendmux_mailbox_generated/models/send_mailbox_message_body_attachments_inner_any_of1.rb +0 -217
  145. data/lib/sendmux_mailbox_generated/models/send_mailbox_message_result.rb +0 -214
  146. data/lib/sendmux_mailbox_generated/models/success_envelope.rb +0 -192
  147. data/lib/sendmux_mailbox_generated/models/update_mailbox_identity_body.rb +0 -216
  148. data/lib/sendmux_mailbox_generated/version.rb +0 -15
  149. data/lib/sendmux_mailbox_generated.rb +0 -189
@@ -1,173 +0,0 @@
1
- =begin
2
- #Sendmux API
3
-
4
- #Programmatic access to your Sendmux email infrastructure.
5
-
6
- The version of the OpenAPI document: 1.0.0
7
-
8
- Generated by: https://openapi-generator.tech
9
- Generator version: 7.22.0
10
-
11
- =end
12
-
13
- require 'date'
14
- require 'time'
15
-
16
- module Sendmux::Mailbox::Generated
17
- class MailboxQueryMeta < ApiModelBase
18
- attr_accessor :query_state
19
-
20
- attr_accessor :request_id
21
-
22
- # Attribute mapping from ruby-style variable name to JSON key.
23
- def self.attribute_map
24
- {
25
- :'query_state' => :'query_state',
26
- :'request_id' => :'request_id'
27
- }
28
- end
29
-
30
- # Returns attribute mapping this model knows about
31
- def self.acceptable_attribute_map
32
- attribute_map
33
- end
34
-
35
- # Returns all the JSON keys this model knows about
36
- def self.acceptable_attributes
37
- acceptable_attribute_map.values
38
- end
39
-
40
- # Attribute type mapping.
41
- def self.openapi_types
42
- {
43
- :'query_state' => :'String',
44
- :'request_id' => :'String'
45
- }
46
- end
47
-
48
- # List of attributes with nullable: true
49
- def self.openapi_nullable
50
- Set.new([
51
- ])
52
- end
53
-
54
- # Initializes the object
55
- # @param [Hash] attributes Model attributes in the form of hash
56
- def initialize(attributes = {})
57
- if (!attributes.is_a?(Hash))
58
- fail ArgumentError, "The input argument (attributes) must be a hash in `Sendmux::Mailbox::Generated::MailboxQueryMeta` initialize method"
59
- end
60
-
61
- # check to see if the attribute exists and convert string to symbol for hash key
62
- acceptable_attribute_map = self.class.acceptable_attribute_map
63
- attributes = attributes.each_with_object({}) { |(k, v), h|
64
- if (!acceptable_attribute_map.key?(k.to_sym))
65
- fail ArgumentError, "`#{k}` is not a valid attribute in `Sendmux::Mailbox::Generated::MailboxQueryMeta`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
66
- end
67
- h[k.to_sym] = v
68
- }
69
-
70
- if attributes.key?(:'query_state')
71
- self.query_state = attributes[:'query_state']
72
- end
73
-
74
- if attributes.key?(:'request_id')
75
- self.request_id = attributes[:'request_id']
76
- else
77
- self.request_id = nil
78
- end
79
- end
80
-
81
- # Show invalid properties with the reasons. Usually used together with valid?
82
- # @return Array for valid properties with the reasons
83
- def list_invalid_properties
84
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
85
- invalid_properties = Array.new
86
- if @request_id.nil?
87
- invalid_properties.push('invalid value for "request_id", request_id cannot be nil.')
88
- end
89
-
90
- invalid_properties
91
- end
92
-
93
- # Check to see if the all the properties in the model are valid
94
- # @return true if the model is valid
95
- def valid?
96
- warn '[DEPRECATED] the `valid?` method is obsolete'
97
- return false if @request_id.nil?
98
- true
99
- end
100
-
101
- # Custom attribute writer method with validation
102
- # @param [Object] request_id Value to be assigned
103
- def request_id=(request_id)
104
- if request_id.nil?
105
- fail ArgumentError, 'request_id cannot be nil'
106
- end
107
-
108
- @request_id = request_id
109
- end
110
-
111
- # Checks equality by comparing each attribute.
112
- # @param [Object] Object to be compared
113
- def ==(o)
114
- return true if self.equal?(o)
115
- self.class == o.class &&
116
- query_state == o.query_state &&
117
- request_id == o.request_id
118
- end
119
-
120
- # @see the `==` method
121
- # @param [Object] Object to be compared
122
- def eql?(o)
123
- self == o
124
- end
125
-
126
- # Calculates hash code according to all attributes.
127
- # @return [Integer] Hash code
128
- def hash
129
- [query_state, request_id].hash
130
- end
131
-
132
- # Builds the object from hash
133
- # @param [Hash] attributes Model attributes in the form of hash
134
- # @return [Object] Returns the model itself
135
- def self.build_from_hash(attributes)
136
- return nil unless attributes.is_a?(Hash)
137
- attributes = attributes.transform_keys(&:to_sym)
138
- transformed_hash = {}
139
- openapi_types.each_pair do |key, type|
140
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
141
- transformed_hash["#{key}"] = nil
142
- elsif type =~ /\AArray<(.*)>/i
143
- # check to ensure the input is an array given that the attribute
144
- # is documented as an array but the input is not
145
- if attributes[attribute_map[key]].is_a?(Array)
146
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
147
- end
148
- elsif !attributes[attribute_map[key]].nil?
149
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
150
- end
151
- end
152
- new(transformed_hash)
153
- end
154
-
155
- # Returns the object in the form of hash
156
- # @return [Hash] Returns the object in the form of hash
157
- def to_hash
158
- hash = {}
159
- self.class.attribute_map.each_pair do |attr, param|
160
- value = self.send(attr)
161
- if value.nil?
162
- is_nullable = self.class.openapi_nullable.include?(attr)
163
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
164
- end
165
-
166
- hash[param] = _to_hash(value)
167
- end
168
- hash
169
- end
170
-
171
- end
172
-
173
- end
@@ -1,359 +0,0 @@
1
- =begin
2
- #Sendmux API
3
-
4
- #Programmatic access to your Sendmux email infrastructure.
5
-
6
- The version of the OpenAPI document: 1.0.0
7
-
8
- Generated by: https://openapi-generator.tech
9
- Generator version: 7.22.0
10
-
11
- =end
12
-
13
- require 'date'
14
- require 'time'
15
-
16
- module Sendmux::Mailbox::Generated
17
- class MailboxQuota < ApiModelBase
18
- attr_accessor :description
19
-
20
- attr_accessor :hard_limit
21
-
22
- # Quota ID
23
- attr_accessor :id
24
-
25
- attr_accessor :name
26
-
27
- attr_accessor :resource_type
28
-
29
- attr_accessor :scope
30
-
31
- attr_accessor :soft_limit
32
-
33
- attr_accessor :types
34
-
35
- attr_accessor :used
36
-
37
- attr_accessor :warn_limit
38
-
39
- # Attribute mapping from ruby-style variable name to JSON key.
40
- def self.attribute_map
41
- {
42
- :'description' => :'description',
43
- :'hard_limit' => :'hard_limit',
44
- :'id' => :'id',
45
- :'name' => :'name',
46
- :'resource_type' => :'resource_type',
47
- :'scope' => :'scope',
48
- :'soft_limit' => :'soft_limit',
49
- :'types' => :'types',
50
- :'used' => :'used',
51
- :'warn_limit' => :'warn_limit'
52
- }
53
- end
54
-
55
- # Returns attribute mapping this model knows about
56
- def self.acceptable_attribute_map
57
- attribute_map
58
- end
59
-
60
- # Returns all the JSON keys this model knows about
61
- def self.acceptable_attributes
62
- acceptable_attribute_map.values
63
- end
64
-
65
- # Attribute type mapping.
66
- def self.openapi_types
67
- {
68
- :'description' => :'String',
69
- :'hard_limit' => :'Integer',
70
- :'id' => :'String',
71
- :'name' => :'String',
72
- :'resource_type' => :'String',
73
- :'scope' => :'String',
74
- :'soft_limit' => :'Integer',
75
- :'types' => :'Array<String>',
76
- :'used' => :'Integer',
77
- :'warn_limit' => :'Integer'
78
- }
79
- end
80
-
81
- # List of attributes with nullable: true
82
- def self.openapi_nullable
83
- Set.new([
84
- :'description',
85
- :'soft_limit',
86
- :'warn_limit'
87
- ])
88
- end
89
-
90
- # Initializes the object
91
- # @param [Hash] attributes Model attributes in the form of hash
92
- def initialize(attributes = {})
93
- if (!attributes.is_a?(Hash))
94
- fail ArgumentError, "The input argument (attributes) must be a hash in `Sendmux::Mailbox::Generated::MailboxQuota` initialize method"
95
- end
96
-
97
- # check to see if the attribute exists and convert string to symbol for hash key
98
- acceptable_attribute_map = self.class.acceptable_attribute_map
99
- attributes = attributes.each_with_object({}) { |(k, v), h|
100
- if (!acceptable_attribute_map.key?(k.to_sym))
101
- fail ArgumentError, "`#{k}` is not a valid attribute in `Sendmux::Mailbox::Generated::MailboxQuota`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
102
- end
103
- h[k.to_sym] = v
104
- }
105
-
106
- if attributes.key?(:'description')
107
- self.description = attributes[:'description']
108
- else
109
- self.description = nil
110
- end
111
-
112
- if attributes.key?(:'hard_limit')
113
- self.hard_limit = attributes[:'hard_limit']
114
- else
115
- self.hard_limit = nil
116
- end
117
-
118
- if attributes.key?(:'id')
119
- self.id = attributes[:'id']
120
- else
121
- self.id = nil
122
- end
123
-
124
- if attributes.key?(:'name')
125
- self.name = attributes[:'name']
126
- else
127
- self.name = nil
128
- end
129
-
130
- if attributes.key?(:'resource_type')
131
- self.resource_type = attributes[:'resource_type']
132
- else
133
- self.resource_type = nil
134
- end
135
-
136
- if attributes.key?(:'scope')
137
- self.scope = attributes[:'scope']
138
- else
139
- self.scope = nil
140
- end
141
-
142
- if attributes.key?(:'soft_limit')
143
- self.soft_limit = attributes[:'soft_limit']
144
- else
145
- self.soft_limit = nil
146
- end
147
-
148
- if attributes.key?(:'types')
149
- if (value = attributes[:'types']).is_a?(Array)
150
- self.types = value
151
- end
152
- else
153
- self.types = nil
154
- end
155
-
156
- if attributes.key?(:'used')
157
- self.used = attributes[:'used']
158
- else
159
- self.used = nil
160
- end
161
-
162
- if attributes.key?(:'warn_limit')
163
- self.warn_limit = attributes[:'warn_limit']
164
- else
165
- self.warn_limit = nil
166
- end
167
- end
168
-
169
- # Show invalid properties with the reasons. Usually used together with valid?
170
- # @return Array for valid properties with the reasons
171
- def list_invalid_properties
172
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
173
- invalid_properties = Array.new
174
- if @hard_limit.nil?
175
- invalid_properties.push('invalid value for "hard_limit", hard_limit cannot be nil.')
176
- end
177
-
178
- if @id.nil?
179
- invalid_properties.push('invalid value for "id", id cannot be nil.')
180
- end
181
-
182
- if @name.nil?
183
- invalid_properties.push('invalid value for "name", name cannot be nil.')
184
- end
185
-
186
- if @resource_type.nil?
187
- invalid_properties.push('invalid value for "resource_type", resource_type cannot be nil.')
188
- end
189
-
190
- if @scope.nil?
191
- invalid_properties.push('invalid value for "scope", scope cannot be nil.')
192
- end
193
-
194
- if @types.nil?
195
- invalid_properties.push('invalid value for "types", types cannot be nil.')
196
- end
197
-
198
- if @used.nil?
199
- invalid_properties.push('invalid value for "used", used cannot be nil.')
200
- end
201
-
202
- invalid_properties
203
- end
204
-
205
- # Check to see if the all the properties in the model are valid
206
- # @return true if the model is valid
207
- def valid?
208
- warn '[DEPRECATED] the `valid?` method is obsolete'
209
- return false if @hard_limit.nil?
210
- return false if @id.nil?
211
- return false if @name.nil?
212
- return false if @resource_type.nil?
213
- return false if @scope.nil?
214
- return false if @types.nil?
215
- return false if @used.nil?
216
- true
217
- end
218
-
219
- # Custom attribute writer method with validation
220
- # @param [Object] hard_limit Value to be assigned
221
- def hard_limit=(hard_limit)
222
- if hard_limit.nil?
223
- fail ArgumentError, 'hard_limit cannot be nil'
224
- end
225
-
226
- @hard_limit = hard_limit
227
- end
228
-
229
- # Custom attribute writer method with validation
230
- # @param [Object] id Value to be assigned
231
- def id=(id)
232
- if id.nil?
233
- fail ArgumentError, 'id cannot be nil'
234
- end
235
-
236
- @id = id
237
- end
238
-
239
- # Custom attribute writer method with validation
240
- # @param [Object] name Value to be assigned
241
- def name=(name)
242
- if name.nil?
243
- fail ArgumentError, 'name cannot be nil'
244
- end
245
-
246
- @name = name
247
- end
248
-
249
- # Custom attribute writer method with validation
250
- # @param [Object] resource_type Value to be assigned
251
- def resource_type=(resource_type)
252
- if resource_type.nil?
253
- fail ArgumentError, 'resource_type cannot be nil'
254
- end
255
-
256
- @resource_type = resource_type
257
- end
258
-
259
- # Custom attribute writer method with validation
260
- # @param [Object] scope Value to be assigned
261
- def scope=(scope)
262
- if scope.nil?
263
- fail ArgumentError, 'scope cannot be nil'
264
- end
265
-
266
- @scope = scope
267
- end
268
-
269
- # Custom attribute writer method with validation
270
- # @param [Object] types Value to be assigned
271
- def types=(types)
272
- if types.nil?
273
- fail ArgumentError, 'types cannot be nil'
274
- end
275
-
276
- @types = types
277
- end
278
-
279
- # Custom attribute writer method with validation
280
- # @param [Object] used Value to be assigned
281
- def used=(used)
282
- if used.nil?
283
- fail ArgumentError, 'used cannot be nil'
284
- end
285
-
286
- @used = used
287
- end
288
-
289
- # Checks equality by comparing each attribute.
290
- # @param [Object] Object to be compared
291
- def ==(o)
292
- return true if self.equal?(o)
293
- self.class == o.class &&
294
- description == o.description &&
295
- hard_limit == o.hard_limit &&
296
- id == o.id &&
297
- name == o.name &&
298
- resource_type == o.resource_type &&
299
- scope == o.scope &&
300
- soft_limit == o.soft_limit &&
301
- types == o.types &&
302
- used == o.used &&
303
- warn_limit == o.warn_limit
304
- end
305
-
306
- # @see the `==` method
307
- # @param [Object] Object to be compared
308
- def eql?(o)
309
- self == o
310
- end
311
-
312
- # Calculates hash code according to all attributes.
313
- # @return [Integer] Hash code
314
- def hash
315
- [description, hard_limit, id, name, resource_type, scope, soft_limit, types, used, warn_limit].hash
316
- end
317
-
318
- # Builds the object from hash
319
- # @param [Hash] attributes Model attributes in the form of hash
320
- # @return [Object] Returns the model itself
321
- def self.build_from_hash(attributes)
322
- return nil unless attributes.is_a?(Hash)
323
- attributes = attributes.transform_keys(&:to_sym)
324
- transformed_hash = {}
325
- openapi_types.each_pair do |key, type|
326
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
327
- transformed_hash["#{key}"] = nil
328
- elsif type =~ /\AArray<(.*)>/i
329
- # check to ensure the input is an array given that the attribute
330
- # is documented as an array but the input is not
331
- if attributes[attribute_map[key]].is_a?(Array)
332
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
333
- end
334
- elsif !attributes[attribute_map[key]].nil?
335
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
336
- end
337
- end
338
- new(transformed_hash)
339
- end
340
-
341
- # Returns the object in the form of hash
342
- # @return [Hash] Returns the object in the form of hash
343
- def to_hash
344
- hash = {}
345
- self.class.attribute_map.each_pair do |attr, param|
346
- value = self.send(attr)
347
- if value.nil?
348
- is_nullable = self.class.openapi_nullable.include?(attr)
349
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
350
- end
351
-
352
- hash[param] = _to_hash(value)
353
- end
354
- hash
355
- end
356
-
357
- end
358
-
359
- end