turnkey_client 0.0.18 → 0.0.19

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 (158) hide show
  1. checksums.yaml +4 -4
  2. data/lib/turnkey_client/api/default_api.rb +46 -0
  3. data/lib/turnkey_client/api/ip_allowlist_api.rb +193 -0
  4. data/lib/turnkey_client/api/organizations_api.rb +290 -0
  5. data/lib/turnkey_client/api/signing_api.rb +232 -0
  6. data/lib/turnkey_client/api/tvc_api.rb +773 -0
  7. data/lib/turnkey_client/api/wallets_api.rb +4 -4
  8. data/lib/turnkey_client/configuration.rb +7 -0
  9. data/lib/turnkey_client/models/activate_billing_tier_intent.rb +14 -4
  10. data/lib/turnkey_client/models/activity_type.rb +21 -0
  11. data/lib/turnkey_client/models/address_format.rb +2 -0
  12. data/lib/turnkey_client/models/app_status.rb +243 -0
  13. data/lib/turnkey_client/models/boot_proof.rb +17 -6
  14. data/lib/turnkey_client/models/create_oauth_providers_intent_v2.rb +228 -0
  15. data/lib/turnkey_client/models/create_oauth_providers_request.rb +2 -2
  16. data/lib/turnkey_client/models/create_oauth_providers_result_v2.rb +213 -0
  17. data/lib/turnkey_client/models/create_read_write_session_intent_v2.rb +1 -1
  18. data/lib/turnkey_client/models/create_sub_organization_intent_v8.rb +316 -0
  19. data/lib/turnkey_client/models/create_sub_organization_request.rb +2 -2
  20. data/lib/turnkey_client/models/create_sub_organization_result_v8.rb +230 -0
  21. data/lib/turnkey_client/models/create_tvc_app_intent.rb +9 -9
  22. data/lib/turnkey_client/models/create_tvc_app_request.rb +288 -0
  23. data/lib/turnkey_client/models/create_tvc_deployment_intent.rb +45 -48
  24. data/lib/turnkey_client/models/create_tvc_deployment_request.rb +288 -0
  25. data/lib/turnkey_client/models/create_tvc_manifest_approvals_request.rb +288 -0
  26. data/lib/turnkey_client/models/create_users_intent_v4.rb +213 -0
  27. data/lib/turnkey_client/models/create_users_request.rb +2 -2
  28. data/lib/turnkey_client/models/create_webhook_endpoint_intent.rb +238 -0
  29. data/lib/turnkey_client/models/create_webhook_endpoint_request.rb +298 -0
  30. data/lib/turnkey_client/models/create_webhook_endpoint_result.rb +225 -0
  31. data/lib/turnkey_client/models/delete_tvc_app_and_deployments_intent.rb +211 -0
  32. data/lib/turnkey_client/models/delete_tvc_app_and_deployments_request.rb +298 -0
  33. data/lib/turnkey_client/models/delete_tvc_app_and_deployments_result.rb +211 -0
  34. data/lib/turnkey_client/models/delete_tvc_deployment_intent.rb +211 -0
  35. data/lib/turnkey_client/models/delete_tvc_deployment_request.rb +298 -0
  36. data/lib/turnkey_client/models/delete_tvc_deployment_result.rb +211 -0
  37. data/lib/turnkey_client/models/delete_webhook_endpoint_intent.rb +211 -0
  38. data/lib/turnkey_client/models/delete_webhook_endpoint_request.rb +298 -0
  39. data/lib/turnkey_client/models/delete_webhook_endpoint_result.rb +211 -0
  40. data/lib/turnkey_client/models/deployment_status.rb +255 -0
  41. data/lib/turnkey_client/models/eth_failure_details.rb +208 -0
  42. data/lib/turnkey_client/models/eth_send_transaction_intent.rb +12 -1
  43. data/lib/turnkey_client/models/feature_name.rb +1 -0
  44. data/lib/turnkey_client/models/get_app_status_request.rb +226 -0
  45. data/lib/turnkey_client/models/get_app_status_response.rb +210 -0
  46. data/lib/turnkey_client/models/get_ip_allowlist_request.rb +222 -0
  47. data/lib/turnkey_client/models/get_ip_allowlist_response.rb +210 -0
  48. data/lib/turnkey_client/models/get_send_transaction_status_response.rb +10 -1
  49. data/lib/turnkey_client/models/get_tvc_app_deployments_request.rb +226 -0
  50. data/lib/turnkey_client/models/get_tvc_app_deployments_response.rb +213 -0
  51. data/lib/turnkey_client/models/get_tvc_app_request.rb +226 -0
  52. data/lib/turnkey_client/models/get_tvc_app_response.rb +210 -0
  53. data/lib/turnkey_client/models/get_tvc_apps_request.rb +211 -0
  54. data/lib/turnkey_client/models/get_tvc_apps_response.rb +213 -0
  55. data/lib/turnkey_client/models/get_tvc_deployment_request.rb +226 -0
  56. data/lib/turnkey_client/models/get_tvc_deployment_response.rb +210 -0
  57. data/lib/turnkey_client/models/get_wallet_address_balances_request.rb +4 -4
  58. data/lib/turnkey_client/models/init_otp_auth_intent.rb +1 -1
  59. data/lib/turnkey_client/models/init_otp_auth_intent_v2.rb +1 -1
  60. data/lib/turnkey_client/models/init_otp_intent_v3.rb +336 -0
  61. data/lib/turnkey_client/models/init_otp_request.rb +2 -2
  62. data/lib/turnkey_client/models/init_otp_result_v2.rb +226 -0
  63. data/lib/turnkey_client/models/intent.rb +193 -4
  64. data/lib/turnkey_client/models/ip_allowlist.rb +261 -0
  65. data/lib/turnkey_client/models/ip_allowlist_intent_rule.rb +222 -0
  66. data/lib/turnkey_client/models/ip_allowlist_rule.rb +232 -0
  67. data/lib/turnkey_client/models/list_supported_assets_request.rb +3 -3
  68. data/lib/turnkey_client/models/list_webhook_endpoints_request.rb +211 -0
  69. data/lib/turnkey_client/models/list_webhook_endpoints_response.rb +212 -0
  70. data/lib/turnkey_client/models/login_usage.rb +211 -0
  71. data/lib/turnkey_client/models/noop_codegen_anchor_response.rb +219 -0
  72. data/lib/turnkey_client/models/oauth2_authenticate_intent.rb +6 -2
  73. data/lib/turnkey_client/models/oauth_provider_params_v2.rb +230 -0
  74. data/lib/turnkey_client/models/oidc_claims.rb +241 -0
  75. data/lib/turnkey_client/models/otp_login_intent_v2.rb +262 -0
  76. data/lib/turnkey_client/models/otp_login_request.rb +2 -2
  77. data/lib/turnkey_client/models/post_tvc_quorum_key_share_intent.rb +240 -0
  78. data/lib/turnkey_client/models/post_tvc_quorum_key_share_result.rb +211 -0
  79. data/lib/turnkey_client/models/quorum_key_share_approval_bundle.rb +241 -0
  80. data/lib/turnkey_client/models/remove_ip_allowlist_intent.rb +207 -0
  81. data/lib/turnkey_client/models/remove_ip_allowlist_request.rb +298 -0
  82. data/lib/turnkey_client/models/remove_ip_allowlist_result.rb +196 -0
  83. data/lib/turnkey_client/models/restore_tvc_deployment_intent.rb +211 -0
  84. data/lib/turnkey_client/models/restore_tvc_deployment_request.rb +298 -0
  85. data/lib/turnkey_client/models/restore_tvc_deployment_result.rb +211 -0
  86. data/lib/turnkey_client/models/result.rb +166 -4
  87. data/lib/turnkey_client/models/root_user_params_v5.rb +284 -0
  88. data/lib/turnkey_client/models/set_ip_allowlist_intent.rb +241 -0
  89. data/lib/turnkey_client/models/set_ip_allowlist_request.rb +298 -0
  90. data/lib/turnkey_client/models/set_ip_allowlist_result.rb +196 -0
  91. data/lib/turnkey_client/models/signup_usage.rb +249 -0
  92. data/lib/turnkey_client/models/signup_usage_v2.rb +249 -0
  93. data/lib/turnkey_client/models/sol_send_transaction_intent.rb +3 -3
  94. data/lib/turnkey_client/models/solana_config.rb +207 -0
  95. data/lib/turnkey_client/models/solana_failure_details.rb +273 -0
  96. data/lib/turnkey_client/models/solana_send_transaction_status.rb +207 -0
  97. data/lib/turnkey_client/models/spark_claim_leaf.rb +241 -0
  98. data/lib/turnkey_client/models/spark_claim_package.rb +275 -0
  99. data/lib/turnkey_client/models/spark_claim_transfer_intent.rb +225 -0
  100. data/lib/turnkey_client/models/spark_claim_transfer_request.rb +288 -0
  101. data/lib/turnkey_client/models/spark_claim_transfer_result.rb +230 -0
  102. data/lib/turnkey_client/models/spark_deposit_derivation.rb +196 -0
  103. data/lib/turnkey_client/models/spark_encrypted_operator_package.rb +226 -0
  104. data/lib/turnkey_client/models/spark_frost_commitment.rb +241 -0
  105. data/lib/turnkey_client/models/spark_htlc_preimage_derivation.rb +196 -0
  106. data/lib/turnkey_client/models/spark_identity_derivation.rb +196 -0
  107. data/lib/turnkey_client/models/spark_key_derivation.rb +241 -0
  108. data/lib/turnkey_client/models/spark_leaf_public_key.rb +226 -0
  109. data/lib/turnkey_client/models/spark_lightning_receive_package.rb +228 -0
  110. data/lib/turnkey_client/models/spark_operator_recipient.rb +226 -0
  111. data/lib/turnkey_client/models/spark_partial_signature.rb +241 -0
  112. data/lib/turnkey_client/models/spark_prepare_lightning_receive_intent.rb +225 -0
  113. data/lib/turnkey_client/models/spark_prepare_lightning_receive_request.rb +288 -0
  114. data/lib/turnkey_client/models/spark_prepare_lightning_receive_result.rb +228 -0
  115. data/lib/turnkey_client/models/spark_prepare_transfer_intent.rb +225 -0
  116. data/lib/turnkey_client/models/spark_prepare_transfer_request.rb +288 -0
  117. data/lib/turnkey_client/models/spark_prepare_transfer_result.rb +245 -0
  118. data/lib/turnkey_client/models/spark_sign_frost_intent.rb +228 -0
  119. data/lib/turnkey_client/models/spark_sign_frost_request.rb +288 -0
  120. data/lib/turnkey_client/models/spark_sign_frost_result.rb +213 -0
  121. data/lib/turnkey_client/models/spark_signature_request.rb +268 -0
  122. data/lib/turnkey_client/models/spark_signing_leaf_derivation.rb +211 -0
  123. data/lib/turnkey_client/models/spark_static_deposit_derivation.rb +211 -0
  124. data/lib/turnkey_client/models/spark_transfer_leaf.rb +272 -0
  125. data/lib/turnkey_client/models/spark_transfer_package.rb +275 -0
  126. data/lib/turnkey_client/models/token_usage.rb +252 -0
  127. data/lib/turnkey_client/models/tvc_app.rb +353 -0
  128. data/lib/turnkey_client/models/tvc_container_spec.rb +302 -0
  129. data/lib/turnkey_client/models/tvc_deployment.rb +372 -0
  130. data/lib/turnkey_client/models/tvc_health_check_type.rb +27 -0
  131. data/lib/turnkey_client/models/tvc_manifest.rb +254 -0
  132. data/lib/turnkey_client/models/tvc_operator.rb +269 -0
  133. data/lib/turnkey_client/models/tvc_operator_approval.rb +283 -0
  134. data/lib/turnkey_client/models/tvc_operator_set.rb +301 -0
  135. data/lib/turnkey_client/models/tx_error.rb +22 -4
  136. data/lib/turnkey_client/models/update_auth_proxy_config_intent.rb +17 -5
  137. data/lib/turnkey_client/models/update_organization_name_intent.rb +211 -0
  138. data/lib/turnkey_client/models/update_organization_name_request.rb +298 -0
  139. data/lib/turnkey_client/models/update_organization_name_result.rb +226 -0
  140. data/lib/turnkey_client/models/update_tvc_app_live_deployment_intent.rb +211 -0
  141. data/lib/turnkey_client/models/update_tvc_app_live_deployment_request.rb +298 -0
  142. data/lib/turnkey_client/models/update_tvc_app_live_deployment_result.rb +196 -0
  143. data/lib/turnkey_client/models/update_webhook_endpoint_intent.rb +244 -0
  144. data/lib/turnkey_client/models/update_webhook_endpoint_request.rb +298 -0
  145. data/lib/turnkey_client/models/update_webhook_endpoint_result.rb +225 -0
  146. data/lib/turnkey_client/models/upsert_gas_usage_config_intent.rb +15 -6
  147. data/lib/turnkey_client/models/usage_type.rb +27 -0
  148. data/lib/turnkey_client/models/user_params_v4.rb +301 -0
  149. data/lib/turnkey_client/models/validate_tvc_image_request.rb +237 -0
  150. data/lib/turnkey_client/models/validate_tvc_image_response.rb +205 -0
  151. data/lib/turnkey_client/models/verify_otp_intent_v2.rb +237 -0
  152. data/lib/turnkey_client/models/verify_otp_request.rb +2 -2
  153. data/lib/turnkey_client/models/web_authn_stamp.rb +256 -0
  154. data/lib/turnkey_client/models/webhook_endpoint_data.rb +283 -0
  155. data/lib/turnkey_client/models/webhook_subscription_params.rb +233 -0
  156. data/lib/turnkey_client/version.rb +1 -1
  157. data/lib/turnkey_client.rb +122 -0
  158. metadata +124 -2
@@ -0,0 +1,226 @@
1
+ =begin
2
+ #API Reference
3
+
4
+ #Review our [API Introduction](../api-introduction) to get started.
5
+
6
+ OpenAPI spec version: 1.0
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ =end
10
+
11
+ require 'date'
12
+
13
+ module TurnkeyClient
14
+ class GetAppStatusRequest
15
+ # Unique identifier for a given Organization.
16
+ attr_accessor :organization_id
17
+
18
+ # Unique identifier for a given TVC App.
19
+ attr_accessor :app_id
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'organization_id' => :'organizationId',
25
+ :'app_id' => :'appId'
26
+ }
27
+ end
28
+
29
+ # Attribute type mapping.
30
+ def self.openapi_types
31
+ {
32
+ :'organization_id' => :'Object',
33
+ :'app_id' => :'Object'
34
+ }
35
+ end
36
+
37
+ # List of attributes with nullable: true
38
+ def self.openapi_nullable
39
+ Set.new([
40
+ ])
41
+ end
42
+
43
+ # Initializes the object
44
+ # @param [Hash] attributes Model attributes in the form of hash
45
+ def initialize(attributes = {})
46
+ if (!attributes.is_a?(Hash))
47
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::GetAppStatusRequest` initialize method"
48
+ end
49
+
50
+ # check to see if the attribute exists and convert string to symbol for hash key
51
+ attributes = attributes.each_with_object({}) { |(k, v), h|
52
+ if (!self.class.attribute_map.key?(k.to_sym))
53
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::GetAppStatusRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
54
+ end
55
+ h[k.to_sym] = v
56
+ }
57
+
58
+ if attributes.key?(:'organization_id')
59
+ self.organization_id = attributes[:'organization_id']
60
+ end
61
+
62
+ if attributes.key?(:'app_id')
63
+ self.app_id = attributes[:'app_id']
64
+ end
65
+ end
66
+
67
+ # Show invalid properties with the reasons. Usually used together with valid?
68
+ # @return Array for valid properties with the reasons
69
+ def list_invalid_properties
70
+ invalid_properties = Array.new
71
+ if @organization_id.nil?
72
+ invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.')
73
+ end
74
+
75
+ if @app_id.nil?
76
+ invalid_properties.push('invalid value for "app_id", app_id cannot be nil.')
77
+ end
78
+
79
+ invalid_properties
80
+ end
81
+
82
+ # Check to see if the all the properties in the model are valid
83
+ # @return true if the model is valid
84
+ def valid?
85
+ return false if @organization_id.nil?
86
+ return false if @app_id.nil?
87
+ true
88
+ end
89
+
90
+ # Checks equality by comparing each attribute.
91
+ # @param [Object] Object to be compared
92
+ def ==(o)
93
+ return true if self.equal?(o)
94
+ self.class == o.class &&
95
+ organization_id == o.organization_id &&
96
+ app_id == o.app_id
97
+ end
98
+
99
+ # @see the `==` method
100
+ # @param [Object] Object to be compared
101
+ def eql?(o)
102
+ self == o
103
+ end
104
+
105
+ # Calculates hash code according to all attributes.
106
+ # @return [Integer] Hash code
107
+ def hash
108
+ [organization_id, app_id].hash
109
+ end
110
+
111
+ # Builds the object from hash
112
+ # @param [Hash] attributes Model attributes in the form of hash
113
+ # @return [Object] Returns the model itself
114
+ def self.build_from_hash(attributes)
115
+ new.build_from_hash(attributes)
116
+ end
117
+
118
+ # Builds the object from hash
119
+ # @param [Hash] attributes Model attributes in the form of hash
120
+ # @return [Object] Returns the model itself
121
+ def build_from_hash(attributes)
122
+ return nil unless attributes.is_a?(Hash)
123
+ self.class.openapi_types.each_pair do |key, type|
124
+ if type =~ /\AArray<(.*)>/i
125
+ # check to ensure the input is an array given that the attribute
126
+ # is documented as an array but the input is not
127
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
128
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
129
+ end
130
+ elsif !attributes[self.class.attribute_map[key]].nil?
131
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
132
+ elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
133
+ self.send("#{key}=", nil)
134
+ end
135
+ end
136
+
137
+ self
138
+ end
139
+
140
+ # Deserializes the data based on type
141
+ # @param string type Data type
142
+ # @param string value Value to be deserialized
143
+ # @return [Object] Deserialized data
144
+ def _deserialize(type, value)
145
+ case type.to_sym
146
+ when :DateTime
147
+ DateTime.parse(value)
148
+ when :Date
149
+ Date.parse(value)
150
+ when :String
151
+ value.to_s
152
+ when :Integer
153
+ value.to_i
154
+ when :Float
155
+ value.to_f
156
+ when :Boolean
157
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
158
+ true
159
+ else
160
+ false
161
+ end
162
+ when :Object
163
+ # generic object (usually a Hash), return directly
164
+ value
165
+ when /\AArray<(?<inner_type>.+)>\z/
166
+ inner_type = Regexp.last_match[:inner_type]
167
+ value.map { |v| _deserialize(inner_type, v) }
168
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
169
+ k_type = Regexp.last_match[:k_type]
170
+ v_type = Regexp.last_match[:v_type]
171
+ {}.tap do |hash|
172
+ value.each do |k, v|
173
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
174
+ end
175
+ end
176
+ else # model
177
+ TurnkeyClient.const_get(type).build_from_hash(value)
178
+ end
179
+ end
180
+
181
+ # Returns the string representation of the object
182
+ # @return [String] String presentation of the object
183
+ def to_s
184
+ to_hash.to_s
185
+ end
186
+
187
+ # to_body is an alias to to_hash (backward compatibility)
188
+ # @return [Hash] Returns the object in the form of hash
189
+ def to_body
190
+ to_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
+ # Outputs non-array value in the form of hash
210
+ # For object, use to_hash. Otherwise, just return the value
211
+ # @param [Object] value Any valid value
212
+ # @return [Hash] Returns the value in the form of hash
213
+ def _to_hash(value)
214
+ if value.is_a?(Array)
215
+ value.compact.map { |v| _to_hash(v) }
216
+ elsif value.is_a?(Hash)
217
+ {}.tap do |hash|
218
+ value.each { |k, v| hash[k] = _to_hash(v) }
219
+ end
220
+ elsif value.respond_to? :to_hash
221
+ value.to_hash
222
+ else
223
+ value
224
+ end
225
+ end end
226
+ end
@@ -0,0 +1,210 @@
1
+ =begin
2
+ #API Reference
3
+
4
+ #Review our [API Introduction](../api-introduction) to get started.
5
+
6
+ OpenAPI spec version: 1.0
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ =end
10
+
11
+ require 'date'
12
+
13
+ module TurnkeyClient
14
+ class GetAppStatusResponse
15
+ attr_accessor :app_status
16
+
17
+ # Attribute mapping from ruby-style variable name to JSON key.
18
+ def self.attribute_map
19
+ {
20
+ :'app_status' => :'appStatus'
21
+ }
22
+ end
23
+
24
+ # Attribute type mapping.
25
+ def self.openapi_types
26
+ {
27
+ :'app_status' => :'Object'
28
+ }
29
+ end
30
+
31
+ # List of attributes with nullable: true
32
+ def self.openapi_nullable
33
+ Set.new([
34
+ ])
35
+ end
36
+
37
+ # Initializes the object
38
+ # @param [Hash] attributes Model attributes in the form of hash
39
+ def initialize(attributes = {})
40
+ if (!attributes.is_a?(Hash))
41
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::GetAppStatusResponse` initialize method"
42
+ end
43
+
44
+ # check to see if the attribute exists and convert string to symbol for hash key
45
+ attributes = attributes.each_with_object({}) { |(k, v), h|
46
+ if (!self.class.attribute_map.key?(k.to_sym))
47
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::GetAppStatusResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
48
+ end
49
+ h[k.to_sym] = v
50
+ }
51
+
52
+ if attributes.key?(:'app_status')
53
+ self.app_status = attributes[:'app_status']
54
+ end
55
+ end
56
+
57
+ # Show invalid properties with the reasons. Usually used together with valid?
58
+ # @return Array for valid properties with the reasons
59
+ def list_invalid_properties
60
+ invalid_properties = Array.new
61
+ if @app_status.nil?
62
+ invalid_properties.push('invalid value for "app_status", app_status cannot be nil.')
63
+ end
64
+
65
+ invalid_properties
66
+ end
67
+
68
+ # Check to see if the all the properties in the model are valid
69
+ # @return true if the model is valid
70
+ def valid?
71
+ return false if @app_status.nil?
72
+ true
73
+ end
74
+
75
+ # Checks equality by comparing each attribute.
76
+ # @param [Object] Object to be compared
77
+ def ==(o)
78
+ return true if self.equal?(o)
79
+ self.class == o.class &&
80
+ app_status == o.app_status
81
+ end
82
+
83
+ # @see the `==` method
84
+ # @param [Object] Object to be compared
85
+ def eql?(o)
86
+ self == o
87
+ end
88
+
89
+ # Calculates hash code according to all attributes.
90
+ # @return [Integer] Hash code
91
+ def hash
92
+ [app_status].hash
93
+ end
94
+
95
+ # Builds the object from hash
96
+ # @param [Hash] attributes Model attributes in the form of hash
97
+ # @return [Object] Returns the model itself
98
+ def self.build_from_hash(attributes)
99
+ new.build_from_hash(attributes)
100
+ end
101
+
102
+ # Builds the object from hash
103
+ # @param [Hash] attributes Model attributes in the form of hash
104
+ # @return [Object] Returns the model itself
105
+ def build_from_hash(attributes)
106
+ return nil unless attributes.is_a?(Hash)
107
+ self.class.openapi_types.each_pair do |key, type|
108
+ if type =~ /\AArray<(.*)>/i
109
+ # check to ensure the input is an array given that the attribute
110
+ # is documented as an array but the input is not
111
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
112
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
113
+ end
114
+ elsif !attributes[self.class.attribute_map[key]].nil?
115
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
116
+ elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
117
+ self.send("#{key}=", nil)
118
+ end
119
+ end
120
+
121
+ self
122
+ end
123
+
124
+ # Deserializes the data based on type
125
+ # @param string type Data type
126
+ # @param string value Value to be deserialized
127
+ # @return [Object] Deserialized data
128
+ def _deserialize(type, value)
129
+ case type.to_sym
130
+ when :DateTime
131
+ DateTime.parse(value)
132
+ when :Date
133
+ Date.parse(value)
134
+ when :String
135
+ value.to_s
136
+ when :Integer
137
+ value.to_i
138
+ when :Float
139
+ value.to_f
140
+ when :Boolean
141
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
142
+ true
143
+ else
144
+ false
145
+ end
146
+ when :Object
147
+ # generic object (usually a Hash), return directly
148
+ value
149
+ when /\AArray<(?<inner_type>.+)>\z/
150
+ inner_type = Regexp.last_match[:inner_type]
151
+ value.map { |v| _deserialize(inner_type, v) }
152
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
153
+ k_type = Regexp.last_match[:k_type]
154
+ v_type = Regexp.last_match[:v_type]
155
+ {}.tap do |hash|
156
+ value.each do |k, v|
157
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
158
+ end
159
+ end
160
+ else # model
161
+ TurnkeyClient.const_get(type).build_from_hash(value)
162
+ end
163
+ end
164
+
165
+ # Returns the string representation of the object
166
+ # @return [String] String presentation of the object
167
+ def to_s
168
+ to_hash.to_s
169
+ end
170
+
171
+ # to_body is an alias to to_hash (backward compatibility)
172
+ # @return [Hash] Returns the object in the form of hash
173
+ def to_body
174
+ to_hash
175
+ end
176
+
177
+ # Returns the object in the form of hash
178
+ # @return [Hash] Returns the object in the form of hash
179
+ def to_hash
180
+ hash = {}
181
+ self.class.attribute_map.each_pair do |attr, param|
182
+ value = self.send(attr)
183
+ if value.nil?
184
+ is_nullable = self.class.openapi_nullable.include?(attr)
185
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
186
+ end
187
+
188
+ hash[param] = _to_hash(value)
189
+ end
190
+ hash
191
+ end
192
+
193
+ # Outputs non-array value in the form of hash
194
+ # For object, use to_hash. Otherwise, just return the value
195
+ # @param [Object] value Any valid value
196
+ # @return [Hash] Returns the value in the form of hash
197
+ def _to_hash(value)
198
+ if value.is_a?(Array)
199
+ value.compact.map { |v| _to_hash(v) }
200
+ elsif value.is_a?(Hash)
201
+ {}.tap do |hash|
202
+ value.each { |k, v| hash[k] = _to_hash(v) }
203
+ end
204
+ elsif value.respond_to? :to_hash
205
+ value.to_hash
206
+ else
207
+ value
208
+ end
209
+ end end
210
+ end
@@ -0,0 +1,222 @@
1
+ =begin
2
+ #API Reference
3
+
4
+ #Review our [API Introduction](../api-introduction) to get started.
5
+
6
+ OpenAPI spec version: 1.0
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ =end
10
+
11
+ require 'date'
12
+
13
+ module TurnkeyClient
14
+ class GetIpAllowlistRequest
15
+ # Unique identifier for a given organization.
16
+ attr_accessor :organization_id
17
+
18
+ # If provided, return only the allowlist for this specific API key.
19
+ attr_accessor :public_key
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'organization_id' => :'organizationId',
25
+ :'public_key' => :'publicKey'
26
+ }
27
+ end
28
+
29
+ # Attribute type mapping.
30
+ def self.openapi_types
31
+ {
32
+ :'organization_id' => :'Object',
33
+ :'public_key' => :'Object'
34
+ }
35
+ end
36
+
37
+ # List of attributes with nullable: true
38
+ def self.openapi_nullable
39
+ Set.new([
40
+ :'public_key'
41
+ ])
42
+ end
43
+
44
+ # Initializes the object
45
+ # @param [Hash] attributes Model attributes in the form of hash
46
+ def initialize(attributes = {})
47
+ if (!attributes.is_a?(Hash))
48
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::GetIpAllowlistRequest` initialize method"
49
+ end
50
+
51
+ # check to see if the attribute exists and convert string to symbol for hash key
52
+ attributes = attributes.each_with_object({}) { |(k, v), h|
53
+ if (!self.class.attribute_map.key?(k.to_sym))
54
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::GetIpAllowlistRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
55
+ end
56
+ h[k.to_sym] = v
57
+ }
58
+
59
+ if attributes.key?(:'organization_id')
60
+ self.organization_id = attributes[:'organization_id']
61
+ end
62
+
63
+ if attributes.key?(:'public_key')
64
+ self.public_key = attributes[:'public_key']
65
+ end
66
+ end
67
+
68
+ # Show invalid properties with the reasons. Usually used together with valid?
69
+ # @return Array for valid properties with the reasons
70
+ def list_invalid_properties
71
+ invalid_properties = Array.new
72
+ if @organization_id.nil?
73
+ invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.')
74
+ end
75
+
76
+ invalid_properties
77
+ end
78
+
79
+ # Check to see if the all the properties in the model are valid
80
+ # @return true if the model is valid
81
+ def valid?
82
+ return false if @organization_id.nil?
83
+ true
84
+ end
85
+
86
+ # Checks equality by comparing each attribute.
87
+ # @param [Object] Object to be compared
88
+ def ==(o)
89
+ return true if self.equal?(o)
90
+ self.class == o.class &&
91
+ organization_id == o.organization_id &&
92
+ public_key == o.public_key
93
+ end
94
+
95
+ # @see the `==` method
96
+ # @param [Object] Object to be compared
97
+ def eql?(o)
98
+ self == o
99
+ end
100
+
101
+ # Calculates hash code according to all attributes.
102
+ # @return [Integer] Hash code
103
+ def hash
104
+ [organization_id, public_key].hash
105
+ end
106
+
107
+ # Builds the object from hash
108
+ # @param [Hash] attributes Model attributes in the form of hash
109
+ # @return [Object] Returns the model itself
110
+ def self.build_from_hash(attributes)
111
+ new.build_from_hash(attributes)
112
+ end
113
+
114
+ # Builds the object from hash
115
+ # @param [Hash] attributes Model attributes in the form of hash
116
+ # @return [Object] Returns the model itself
117
+ def build_from_hash(attributes)
118
+ return nil unless attributes.is_a?(Hash)
119
+ self.class.openapi_types.each_pair do |key, type|
120
+ if type =~ /\AArray<(.*)>/i
121
+ # check to ensure the input is an array given that the attribute
122
+ # is documented as an array but the input is not
123
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
124
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
125
+ end
126
+ elsif !attributes[self.class.attribute_map[key]].nil?
127
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
128
+ elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
129
+ self.send("#{key}=", nil)
130
+ end
131
+ end
132
+
133
+ self
134
+ end
135
+
136
+ # Deserializes the data based on type
137
+ # @param string type Data type
138
+ # @param string value Value to be deserialized
139
+ # @return [Object] Deserialized data
140
+ def _deserialize(type, value)
141
+ case type.to_sym
142
+ when :DateTime
143
+ DateTime.parse(value)
144
+ when :Date
145
+ Date.parse(value)
146
+ when :String
147
+ value.to_s
148
+ when :Integer
149
+ value.to_i
150
+ when :Float
151
+ value.to_f
152
+ when :Boolean
153
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
154
+ true
155
+ else
156
+ false
157
+ end
158
+ when :Object
159
+ # generic object (usually a Hash), return directly
160
+ value
161
+ when /\AArray<(?<inner_type>.+)>\z/
162
+ inner_type = Regexp.last_match[:inner_type]
163
+ value.map { |v| _deserialize(inner_type, v) }
164
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
165
+ k_type = Regexp.last_match[:k_type]
166
+ v_type = Regexp.last_match[:v_type]
167
+ {}.tap do |hash|
168
+ value.each do |k, v|
169
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
170
+ end
171
+ end
172
+ else # model
173
+ TurnkeyClient.const_get(type).build_from_hash(value)
174
+ end
175
+ end
176
+
177
+ # Returns the string representation of the object
178
+ # @return [String] String presentation of the object
179
+ def to_s
180
+ to_hash.to_s
181
+ end
182
+
183
+ # to_body is an alias to to_hash (backward compatibility)
184
+ # @return [Hash] Returns the object in the form of hash
185
+ def to_body
186
+ to_hash
187
+ end
188
+
189
+ # Returns the object in the form of hash
190
+ # @return [Hash] Returns the object in the form of hash
191
+ def to_hash
192
+ hash = {}
193
+ self.class.attribute_map.each_pair do |attr, param|
194
+ value = self.send(attr)
195
+ if value.nil?
196
+ is_nullable = self.class.openapi_nullable.include?(attr)
197
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
198
+ end
199
+
200
+ hash[param] = _to_hash(value)
201
+ end
202
+ hash
203
+ end
204
+
205
+ # Outputs non-array value in the form of hash
206
+ # For object, use to_hash. Otherwise, just return the value
207
+ # @param [Object] value Any valid value
208
+ # @return [Hash] Returns the value in the form of hash
209
+ def _to_hash(value)
210
+ if value.is_a?(Array)
211
+ value.compact.map { |v| _to_hash(v) }
212
+ elsif value.is_a?(Hash)
213
+ {}.tap do |hash|
214
+ value.each { |k, v| hash[k] = _to_hash(v) }
215
+ end
216
+ elsif value.respond_to? :to_hash
217
+ value.to_hash
218
+ else
219
+ value
220
+ end
221
+ end end
222
+ end