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.
- checksums.yaml +4 -4
- data/lib/turnkey_client/api/default_api.rb +46 -0
- data/lib/turnkey_client/api/ip_allowlist_api.rb +193 -0
- data/lib/turnkey_client/api/organizations_api.rb +290 -0
- data/lib/turnkey_client/api/signing_api.rb +232 -0
- data/lib/turnkey_client/api/tvc_api.rb +773 -0
- data/lib/turnkey_client/api/wallets_api.rb +4 -4
- data/lib/turnkey_client/configuration.rb +7 -0
- data/lib/turnkey_client/models/activate_billing_tier_intent.rb +14 -4
- data/lib/turnkey_client/models/activity_type.rb +21 -0
- data/lib/turnkey_client/models/address_format.rb +2 -0
- data/lib/turnkey_client/models/app_status.rb +243 -0
- data/lib/turnkey_client/models/boot_proof.rb +17 -6
- data/lib/turnkey_client/models/create_oauth_providers_intent_v2.rb +228 -0
- data/lib/turnkey_client/models/create_oauth_providers_request.rb +2 -2
- data/lib/turnkey_client/models/create_oauth_providers_result_v2.rb +213 -0
- data/lib/turnkey_client/models/create_read_write_session_intent_v2.rb +1 -1
- data/lib/turnkey_client/models/create_sub_organization_intent_v8.rb +316 -0
- data/lib/turnkey_client/models/create_sub_organization_request.rb +2 -2
- data/lib/turnkey_client/models/create_sub_organization_result_v8.rb +230 -0
- data/lib/turnkey_client/models/create_tvc_app_intent.rb +9 -9
- data/lib/turnkey_client/models/create_tvc_app_request.rb +288 -0
- data/lib/turnkey_client/models/create_tvc_deployment_intent.rb +45 -48
- data/lib/turnkey_client/models/create_tvc_deployment_request.rb +288 -0
- data/lib/turnkey_client/models/create_tvc_manifest_approvals_request.rb +288 -0
- data/lib/turnkey_client/models/create_users_intent_v4.rb +213 -0
- data/lib/turnkey_client/models/create_users_request.rb +2 -2
- data/lib/turnkey_client/models/create_webhook_endpoint_intent.rb +238 -0
- data/lib/turnkey_client/models/create_webhook_endpoint_request.rb +298 -0
- data/lib/turnkey_client/models/create_webhook_endpoint_result.rb +225 -0
- data/lib/turnkey_client/models/delete_tvc_app_and_deployments_intent.rb +211 -0
- data/lib/turnkey_client/models/delete_tvc_app_and_deployments_request.rb +298 -0
- data/lib/turnkey_client/models/delete_tvc_app_and_deployments_result.rb +211 -0
- data/lib/turnkey_client/models/delete_tvc_deployment_intent.rb +211 -0
- data/lib/turnkey_client/models/delete_tvc_deployment_request.rb +298 -0
- data/lib/turnkey_client/models/delete_tvc_deployment_result.rb +211 -0
- data/lib/turnkey_client/models/delete_webhook_endpoint_intent.rb +211 -0
- data/lib/turnkey_client/models/delete_webhook_endpoint_request.rb +298 -0
- data/lib/turnkey_client/models/delete_webhook_endpoint_result.rb +211 -0
- data/lib/turnkey_client/models/deployment_status.rb +255 -0
- data/lib/turnkey_client/models/eth_failure_details.rb +208 -0
- data/lib/turnkey_client/models/eth_send_transaction_intent.rb +12 -1
- data/lib/turnkey_client/models/feature_name.rb +1 -0
- data/lib/turnkey_client/models/get_app_status_request.rb +226 -0
- data/lib/turnkey_client/models/get_app_status_response.rb +210 -0
- data/lib/turnkey_client/models/get_ip_allowlist_request.rb +222 -0
- data/lib/turnkey_client/models/get_ip_allowlist_response.rb +210 -0
- data/lib/turnkey_client/models/get_send_transaction_status_response.rb +10 -1
- data/lib/turnkey_client/models/get_tvc_app_deployments_request.rb +226 -0
- data/lib/turnkey_client/models/get_tvc_app_deployments_response.rb +213 -0
- data/lib/turnkey_client/models/get_tvc_app_request.rb +226 -0
- data/lib/turnkey_client/models/get_tvc_app_response.rb +210 -0
- data/lib/turnkey_client/models/get_tvc_apps_request.rb +211 -0
- data/lib/turnkey_client/models/get_tvc_apps_response.rb +213 -0
- data/lib/turnkey_client/models/get_tvc_deployment_request.rb +226 -0
- data/lib/turnkey_client/models/get_tvc_deployment_response.rb +210 -0
- data/lib/turnkey_client/models/get_wallet_address_balances_request.rb +4 -4
- data/lib/turnkey_client/models/init_otp_auth_intent.rb +1 -1
- data/lib/turnkey_client/models/init_otp_auth_intent_v2.rb +1 -1
- data/lib/turnkey_client/models/init_otp_intent_v3.rb +336 -0
- data/lib/turnkey_client/models/init_otp_request.rb +2 -2
- data/lib/turnkey_client/models/init_otp_result_v2.rb +226 -0
- data/lib/turnkey_client/models/intent.rb +193 -4
- data/lib/turnkey_client/models/ip_allowlist.rb +261 -0
- data/lib/turnkey_client/models/ip_allowlist_intent_rule.rb +222 -0
- data/lib/turnkey_client/models/ip_allowlist_rule.rb +232 -0
- data/lib/turnkey_client/models/list_supported_assets_request.rb +3 -3
- data/lib/turnkey_client/models/list_webhook_endpoints_request.rb +211 -0
- data/lib/turnkey_client/models/list_webhook_endpoints_response.rb +212 -0
- data/lib/turnkey_client/models/login_usage.rb +211 -0
- data/lib/turnkey_client/models/noop_codegen_anchor_response.rb +219 -0
- data/lib/turnkey_client/models/oauth2_authenticate_intent.rb +6 -2
- data/lib/turnkey_client/models/oauth_provider_params_v2.rb +230 -0
- data/lib/turnkey_client/models/oidc_claims.rb +241 -0
- data/lib/turnkey_client/models/otp_login_intent_v2.rb +262 -0
- data/lib/turnkey_client/models/otp_login_request.rb +2 -2
- data/lib/turnkey_client/models/post_tvc_quorum_key_share_intent.rb +240 -0
- data/lib/turnkey_client/models/post_tvc_quorum_key_share_result.rb +211 -0
- data/lib/turnkey_client/models/quorum_key_share_approval_bundle.rb +241 -0
- data/lib/turnkey_client/models/remove_ip_allowlist_intent.rb +207 -0
- data/lib/turnkey_client/models/remove_ip_allowlist_request.rb +298 -0
- data/lib/turnkey_client/models/remove_ip_allowlist_result.rb +196 -0
- data/lib/turnkey_client/models/restore_tvc_deployment_intent.rb +211 -0
- data/lib/turnkey_client/models/restore_tvc_deployment_request.rb +298 -0
- data/lib/turnkey_client/models/restore_tvc_deployment_result.rb +211 -0
- data/lib/turnkey_client/models/result.rb +166 -4
- data/lib/turnkey_client/models/root_user_params_v5.rb +284 -0
- data/lib/turnkey_client/models/set_ip_allowlist_intent.rb +241 -0
- data/lib/turnkey_client/models/set_ip_allowlist_request.rb +298 -0
- data/lib/turnkey_client/models/set_ip_allowlist_result.rb +196 -0
- data/lib/turnkey_client/models/signup_usage.rb +249 -0
- data/lib/turnkey_client/models/signup_usage_v2.rb +249 -0
- data/lib/turnkey_client/models/sol_send_transaction_intent.rb +3 -3
- data/lib/turnkey_client/models/solana_config.rb +207 -0
- data/lib/turnkey_client/models/solana_failure_details.rb +273 -0
- data/lib/turnkey_client/models/solana_send_transaction_status.rb +207 -0
- data/lib/turnkey_client/models/spark_claim_leaf.rb +241 -0
- data/lib/turnkey_client/models/spark_claim_package.rb +275 -0
- data/lib/turnkey_client/models/spark_claim_transfer_intent.rb +225 -0
- data/lib/turnkey_client/models/spark_claim_transfer_request.rb +288 -0
- data/lib/turnkey_client/models/spark_claim_transfer_result.rb +230 -0
- data/lib/turnkey_client/models/spark_deposit_derivation.rb +196 -0
- data/lib/turnkey_client/models/spark_encrypted_operator_package.rb +226 -0
- data/lib/turnkey_client/models/spark_frost_commitment.rb +241 -0
- data/lib/turnkey_client/models/spark_htlc_preimage_derivation.rb +196 -0
- data/lib/turnkey_client/models/spark_identity_derivation.rb +196 -0
- data/lib/turnkey_client/models/spark_key_derivation.rb +241 -0
- data/lib/turnkey_client/models/spark_leaf_public_key.rb +226 -0
- data/lib/turnkey_client/models/spark_lightning_receive_package.rb +228 -0
- data/lib/turnkey_client/models/spark_operator_recipient.rb +226 -0
- data/lib/turnkey_client/models/spark_partial_signature.rb +241 -0
- data/lib/turnkey_client/models/spark_prepare_lightning_receive_intent.rb +225 -0
- data/lib/turnkey_client/models/spark_prepare_lightning_receive_request.rb +288 -0
- data/lib/turnkey_client/models/spark_prepare_lightning_receive_result.rb +228 -0
- data/lib/turnkey_client/models/spark_prepare_transfer_intent.rb +225 -0
- data/lib/turnkey_client/models/spark_prepare_transfer_request.rb +288 -0
- data/lib/turnkey_client/models/spark_prepare_transfer_result.rb +245 -0
- data/lib/turnkey_client/models/spark_sign_frost_intent.rb +228 -0
- data/lib/turnkey_client/models/spark_sign_frost_request.rb +288 -0
- data/lib/turnkey_client/models/spark_sign_frost_result.rb +213 -0
- data/lib/turnkey_client/models/spark_signature_request.rb +268 -0
- data/lib/turnkey_client/models/spark_signing_leaf_derivation.rb +211 -0
- data/lib/turnkey_client/models/spark_static_deposit_derivation.rb +211 -0
- data/lib/turnkey_client/models/spark_transfer_leaf.rb +272 -0
- data/lib/turnkey_client/models/spark_transfer_package.rb +275 -0
- data/lib/turnkey_client/models/token_usage.rb +252 -0
- data/lib/turnkey_client/models/tvc_app.rb +353 -0
- data/lib/turnkey_client/models/tvc_container_spec.rb +302 -0
- data/lib/turnkey_client/models/tvc_deployment.rb +372 -0
- data/lib/turnkey_client/models/tvc_health_check_type.rb +27 -0
- data/lib/turnkey_client/models/tvc_manifest.rb +254 -0
- data/lib/turnkey_client/models/tvc_operator.rb +269 -0
- data/lib/turnkey_client/models/tvc_operator_approval.rb +283 -0
- data/lib/turnkey_client/models/tvc_operator_set.rb +301 -0
- data/lib/turnkey_client/models/tx_error.rb +22 -4
- data/lib/turnkey_client/models/update_auth_proxy_config_intent.rb +17 -5
- data/lib/turnkey_client/models/update_organization_name_intent.rb +211 -0
- data/lib/turnkey_client/models/update_organization_name_request.rb +298 -0
- data/lib/turnkey_client/models/update_organization_name_result.rb +226 -0
- data/lib/turnkey_client/models/update_tvc_app_live_deployment_intent.rb +211 -0
- data/lib/turnkey_client/models/update_tvc_app_live_deployment_request.rb +298 -0
- data/lib/turnkey_client/models/update_tvc_app_live_deployment_result.rb +196 -0
- data/lib/turnkey_client/models/update_webhook_endpoint_intent.rb +244 -0
- data/lib/turnkey_client/models/update_webhook_endpoint_request.rb +298 -0
- data/lib/turnkey_client/models/update_webhook_endpoint_result.rb +225 -0
- data/lib/turnkey_client/models/upsert_gas_usage_config_intent.rb +15 -6
- data/lib/turnkey_client/models/usage_type.rb +27 -0
- data/lib/turnkey_client/models/user_params_v4.rb +301 -0
- data/lib/turnkey_client/models/validate_tvc_image_request.rb +237 -0
- data/lib/turnkey_client/models/validate_tvc_image_response.rb +205 -0
- data/lib/turnkey_client/models/verify_otp_intent_v2.rb +237 -0
- data/lib/turnkey_client/models/verify_otp_request.rb +2 -2
- data/lib/turnkey_client/models/web_authn_stamp.rb +256 -0
- data/lib/turnkey_client/models/webhook_endpoint_data.rb +283 -0
- data/lib/turnkey_client/models/webhook_subscription_params.rb +233 -0
- data/lib/turnkey_client/version.rb +1 -1
- data/lib/turnkey_client.rb +122 -0
- metadata +124 -2
|
@@ -30,23 +30,22 @@ module TurnkeyClient
|
|
|
30
30
|
# Digest of the pivot binary in the pivot container. This value will be inserted in the QOS manifest to ensure application integrity.
|
|
31
31
|
attr_accessor :expected_pivot_digest
|
|
32
32
|
|
|
33
|
-
# URL of the container containing the host binary
|
|
34
|
-
attr_accessor :host_container_image_url
|
|
35
|
-
|
|
36
|
-
# Location of the binary inside the host container
|
|
37
|
-
attr_accessor :host_path
|
|
38
|
-
|
|
39
|
-
# Arguments to pass to the host binary at startup. Encoded as a list of strings, for example [\"--foo\", \"bar\"]
|
|
40
|
-
attr_accessor :host_args
|
|
41
|
-
|
|
42
33
|
# Optional nonce to ensure uniqueness of the deployment manifest. If not provided, it defaults to the current Unix timestamp in seconds.
|
|
43
34
|
attr_accessor :nonce
|
|
44
35
|
|
|
45
36
|
# Optional encrypted pull secret to authorize Turnkey to pull the pivot container image. If your image is public, leave this empty.
|
|
46
37
|
attr_accessor :pivot_container_encrypted_pull_secret
|
|
47
38
|
|
|
48
|
-
# Optional
|
|
49
|
-
attr_accessor :
|
|
39
|
+
# Optional flag to indicate whether to deploy the TVC app in debug mode, which includes additional logging and debugging tools. Default is false.
|
|
40
|
+
attr_accessor :debug_mode
|
|
41
|
+
|
|
42
|
+
attr_accessor :health_check_type
|
|
43
|
+
|
|
44
|
+
# Port to use for health checks.
|
|
45
|
+
attr_accessor :health_check_port
|
|
46
|
+
|
|
47
|
+
# Port to use for public ingress.
|
|
48
|
+
attr_accessor :public_ingress_port
|
|
50
49
|
|
|
51
50
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
52
51
|
def self.attribute_map
|
|
@@ -57,12 +56,12 @@ module TurnkeyClient
|
|
|
57
56
|
:'pivot_path' => :'pivotPath',
|
|
58
57
|
:'pivot_args' => :'pivotArgs',
|
|
59
58
|
:'expected_pivot_digest' => :'expectedPivotDigest',
|
|
60
|
-
:'host_container_image_url' => :'hostContainerImageUrl',
|
|
61
|
-
:'host_path' => :'hostPath',
|
|
62
|
-
:'host_args' => :'hostArgs',
|
|
63
59
|
:'nonce' => :'nonce',
|
|
64
60
|
:'pivot_container_encrypted_pull_secret' => :'pivotContainerEncryptedPullSecret',
|
|
65
|
-
:'
|
|
61
|
+
:'debug_mode' => :'debugMode',
|
|
62
|
+
:'health_check_type' => :'healthCheckType',
|
|
63
|
+
:'health_check_port' => :'healthCheckPort',
|
|
64
|
+
:'public_ingress_port' => :'publicIngressPort'
|
|
66
65
|
}
|
|
67
66
|
end
|
|
68
67
|
|
|
@@ -75,12 +74,12 @@ module TurnkeyClient
|
|
|
75
74
|
:'pivot_path' => :'Object',
|
|
76
75
|
:'pivot_args' => :'Object',
|
|
77
76
|
:'expected_pivot_digest' => :'Object',
|
|
78
|
-
:'host_container_image_url' => :'Object',
|
|
79
|
-
:'host_path' => :'Object',
|
|
80
|
-
:'host_args' => :'Object',
|
|
81
77
|
:'nonce' => :'Object',
|
|
82
78
|
:'pivot_container_encrypted_pull_secret' => :'Object',
|
|
83
|
-
:'
|
|
79
|
+
:'debug_mode' => :'Object',
|
|
80
|
+
:'health_check_type' => :'Object',
|
|
81
|
+
:'health_check_port' => :'Object',
|
|
82
|
+
:'public_ingress_port' => :'Object'
|
|
84
83
|
}
|
|
85
84
|
end
|
|
86
85
|
|
|
@@ -89,7 +88,7 @@ module TurnkeyClient
|
|
|
89
88
|
Set.new([
|
|
90
89
|
:'nonce',
|
|
91
90
|
:'pivot_container_encrypted_pull_secret',
|
|
92
|
-
:'
|
|
91
|
+
:'debug_mode',
|
|
93
92
|
])
|
|
94
93
|
end
|
|
95
94
|
|
|
@@ -134,30 +133,28 @@ module TurnkeyClient
|
|
|
134
133
|
self.expected_pivot_digest = attributes[:'expected_pivot_digest']
|
|
135
134
|
end
|
|
136
135
|
|
|
137
|
-
if attributes.key?(:'
|
|
138
|
-
self.
|
|
136
|
+
if attributes.key?(:'nonce')
|
|
137
|
+
self.nonce = attributes[:'nonce']
|
|
139
138
|
end
|
|
140
139
|
|
|
141
|
-
if attributes.key?(:'
|
|
142
|
-
self.
|
|
140
|
+
if attributes.key?(:'pivot_container_encrypted_pull_secret')
|
|
141
|
+
self.pivot_container_encrypted_pull_secret = attributes[:'pivot_container_encrypted_pull_secret']
|
|
143
142
|
end
|
|
144
143
|
|
|
145
|
-
if attributes.key?(:'
|
|
146
|
-
|
|
147
|
-
self.host_args = value
|
|
148
|
-
end
|
|
144
|
+
if attributes.key?(:'debug_mode')
|
|
145
|
+
self.debug_mode = attributes[:'debug_mode']
|
|
149
146
|
end
|
|
150
147
|
|
|
151
|
-
if attributes.key?(:'
|
|
152
|
-
self.
|
|
148
|
+
if attributes.key?(:'health_check_type')
|
|
149
|
+
self.health_check_type = attributes[:'health_check_type']
|
|
153
150
|
end
|
|
154
151
|
|
|
155
|
-
if attributes.key?(:'
|
|
156
|
-
self.
|
|
152
|
+
if attributes.key?(:'health_check_port')
|
|
153
|
+
self.health_check_port = attributes[:'health_check_port']
|
|
157
154
|
end
|
|
158
155
|
|
|
159
|
-
if attributes.key?(:'
|
|
160
|
-
self.
|
|
156
|
+
if attributes.key?(:'public_ingress_port')
|
|
157
|
+
self.public_ingress_port = attributes[:'public_ingress_port']
|
|
161
158
|
end
|
|
162
159
|
end
|
|
163
160
|
|
|
@@ -189,16 +186,16 @@ module TurnkeyClient
|
|
|
189
186
|
invalid_properties.push('invalid value for "expected_pivot_digest", expected_pivot_digest cannot be nil.')
|
|
190
187
|
end
|
|
191
188
|
|
|
192
|
-
if @
|
|
193
|
-
invalid_properties.push('invalid value for "
|
|
189
|
+
if @health_check_type.nil?
|
|
190
|
+
invalid_properties.push('invalid value for "health_check_type", health_check_type cannot be nil.')
|
|
194
191
|
end
|
|
195
192
|
|
|
196
|
-
if @
|
|
197
|
-
invalid_properties.push('invalid value for "
|
|
193
|
+
if @health_check_port.nil?
|
|
194
|
+
invalid_properties.push('invalid value for "health_check_port", health_check_port cannot be nil.')
|
|
198
195
|
end
|
|
199
196
|
|
|
200
|
-
if @
|
|
201
|
-
invalid_properties.push('invalid value for "
|
|
197
|
+
if @public_ingress_port.nil?
|
|
198
|
+
invalid_properties.push('invalid value for "public_ingress_port", public_ingress_port cannot be nil.')
|
|
202
199
|
end
|
|
203
200
|
|
|
204
201
|
invalid_properties
|
|
@@ -213,9 +210,9 @@ module TurnkeyClient
|
|
|
213
210
|
return false if @pivot_path.nil?
|
|
214
211
|
return false if @pivot_args.nil?
|
|
215
212
|
return false if @expected_pivot_digest.nil?
|
|
216
|
-
return false if @
|
|
217
|
-
return false if @
|
|
218
|
-
return false if @
|
|
213
|
+
return false if @health_check_type.nil?
|
|
214
|
+
return false if @health_check_port.nil?
|
|
215
|
+
return false if @public_ingress_port.nil?
|
|
219
216
|
true
|
|
220
217
|
end
|
|
221
218
|
|
|
@@ -230,12 +227,12 @@ module TurnkeyClient
|
|
|
230
227
|
pivot_path == o.pivot_path &&
|
|
231
228
|
pivot_args == o.pivot_args &&
|
|
232
229
|
expected_pivot_digest == o.expected_pivot_digest &&
|
|
233
|
-
host_container_image_url == o.host_container_image_url &&
|
|
234
|
-
host_path == o.host_path &&
|
|
235
|
-
host_args == o.host_args &&
|
|
236
230
|
nonce == o.nonce &&
|
|
237
231
|
pivot_container_encrypted_pull_secret == o.pivot_container_encrypted_pull_secret &&
|
|
238
|
-
|
|
232
|
+
debug_mode == o.debug_mode &&
|
|
233
|
+
health_check_type == o.health_check_type &&
|
|
234
|
+
health_check_port == o.health_check_port &&
|
|
235
|
+
public_ingress_port == o.public_ingress_port
|
|
239
236
|
end
|
|
240
237
|
|
|
241
238
|
# @see the `==` method
|
|
@@ -247,7 +244,7 @@ module TurnkeyClient
|
|
|
247
244
|
# Calculates hash code according to all attributes.
|
|
248
245
|
# @return [Integer] Hash code
|
|
249
246
|
def hash
|
|
250
|
-
[app_id, qos_version, pivot_container_image_url, pivot_path, pivot_args, expected_pivot_digest,
|
|
247
|
+
[app_id, qos_version, pivot_container_image_url, pivot_path, pivot_args, expected_pivot_digest, nonce, pivot_container_encrypted_pull_secret, debug_mode, health_check_type, health_check_port, public_ingress_port].hash
|
|
251
248
|
end
|
|
252
249
|
|
|
253
250
|
# Builds the object from hash
|
|
@@ -0,0 +1,288 @@
|
|
|
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 CreateTvcDeploymentRequest
|
|
15
|
+
attr_accessor :type
|
|
16
|
+
|
|
17
|
+
# Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
|
|
18
|
+
attr_accessor :timestamp_ms
|
|
19
|
+
|
|
20
|
+
# Unique identifier for a given Organization.
|
|
21
|
+
attr_accessor :organization_id
|
|
22
|
+
|
|
23
|
+
attr_accessor :parameters
|
|
24
|
+
|
|
25
|
+
class EnumAttributeValidator
|
|
26
|
+
attr_reader :datatype
|
|
27
|
+
attr_reader :allowable_values
|
|
28
|
+
|
|
29
|
+
def initialize(datatype, allowable_values)
|
|
30
|
+
@allowable_values = allowable_values.map do |value|
|
|
31
|
+
case datatype.to_s
|
|
32
|
+
when /Integer/i
|
|
33
|
+
value.to_i
|
|
34
|
+
when /Float/i
|
|
35
|
+
value.to_f
|
|
36
|
+
else
|
|
37
|
+
value
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
def valid?(value)
|
|
43
|
+
!value || allowable_values.include?(value)
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
48
|
+
def self.attribute_map
|
|
49
|
+
{
|
|
50
|
+
:'type' => :'type',
|
|
51
|
+
:'timestamp_ms' => :'timestampMs',
|
|
52
|
+
:'organization_id' => :'organizationId',
|
|
53
|
+
:'parameters' => :'parameters'
|
|
54
|
+
}
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Attribute type mapping.
|
|
58
|
+
def self.openapi_types
|
|
59
|
+
{
|
|
60
|
+
:'type' => :'Object',
|
|
61
|
+
:'timestamp_ms' => :'Object',
|
|
62
|
+
:'organization_id' => :'Object',
|
|
63
|
+
:'parameters' => :'Object'
|
|
64
|
+
}
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# List of attributes with nullable: true
|
|
68
|
+
def self.openapi_nullable
|
|
69
|
+
Set.new([
|
|
70
|
+
])
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# Initializes the object
|
|
74
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
75
|
+
def initialize(attributes = {})
|
|
76
|
+
if (!attributes.is_a?(Hash))
|
|
77
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::CreateTvcDeploymentRequest` initialize method"
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
81
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
82
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
83
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::CreateTvcDeploymentRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
84
|
+
end
|
|
85
|
+
h[k.to_sym] = v
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
if attributes.key?(:'type')
|
|
89
|
+
self.type = attributes[:'type']
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
if attributes.key?(:'timestamp_ms')
|
|
93
|
+
self.timestamp_ms = attributes[:'timestamp_ms']
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
if attributes.key?(:'organization_id')
|
|
97
|
+
self.organization_id = attributes[:'organization_id']
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
if attributes.key?(:'parameters')
|
|
101
|
+
self.parameters = attributes[:'parameters']
|
|
102
|
+
end
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
106
|
+
# @return Array for valid properties with the reasons
|
|
107
|
+
def list_invalid_properties
|
|
108
|
+
invalid_properties = Array.new
|
|
109
|
+
if @type.nil?
|
|
110
|
+
invalid_properties.push('invalid value for "type", type cannot be nil.')
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
if @timestamp_ms.nil?
|
|
114
|
+
invalid_properties.push('invalid value for "timestamp_ms", timestamp_ms cannot be nil.')
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
if @organization_id.nil?
|
|
118
|
+
invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.')
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
if @parameters.nil?
|
|
122
|
+
invalid_properties.push('invalid value for "parameters", parameters cannot be nil.')
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
invalid_properties
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
# Check to see if the all the properties in the model are valid
|
|
129
|
+
# @return true if the model is valid
|
|
130
|
+
def valid?
|
|
131
|
+
return false if @type.nil?
|
|
132
|
+
type_validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_CREATE_TVC_DEPLOYMENT'])
|
|
133
|
+
return false unless type_validator.valid?(@type)
|
|
134
|
+
return false if @timestamp_ms.nil?
|
|
135
|
+
return false if @organization_id.nil?
|
|
136
|
+
return false if @parameters.nil?
|
|
137
|
+
true
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
141
|
+
# @param [Object] type Object to be assigned
|
|
142
|
+
def type=(type)
|
|
143
|
+
validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_CREATE_TVC_DEPLOYMENT'])
|
|
144
|
+
unless validator.valid?(type)
|
|
145
|
+
fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
|
|
146
|
+
end
|
|
147
|
+
@type = type
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
# Checks equality by comparing each attribute.
|
|
151
|
+
# @param [Object] Object to be compared
|
|
152
|
+
def ==(o)
|
|
153
|
+
return true if self.equal?(o)
|
|
154
|
+
self.class == o.class &&
|
|
155
|
+
type == o.type &&
|
|
156
|
+
timestamp_ms == o.timestamp_ms &&
|
|
157
|
+
organization_id == o.organization_id &&
|
|
158
|
+
parameters == o.parameters
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
# @see the `==` method
|
|
162
|
+
# @param [Object] Object to be compared
|
|
163
|
+
def eql?(o)
|
|
164
|
+
self == o
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
# Calculates hash code according to all attributes.
|
|
168
|
+
# @return [Integer] Hash code
|
|
169
|
+
def hash
|
|
170
|
+
[type, timestamp_ms, organization_id, parameters].hash
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
# Builds the object from hash
|
|
174
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
175
|
+
# @return [Object] Returns the model itself
|
|
176
|
+
def self.build_from_hash(attributes)
|
|
177
|
+
new.build_from_hash(attributes)
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
# Builds the object from hash
|
|
181
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
182
|
+
# @return [Object] Returns the model itself
|
|
183
|
+
def build_from_hash(attributes)
|
|
184
|
+
return nil unless attributes.is_a?(Hash)
|
|
185
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
186
|
+
if type =~ /\AArray<(.*)>/i
|
|
187
|
+
# check to ensure the input is an array given that the attribute
|
|
188
|
+
# is documented as an array but the input is not
|
|
189
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
190
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
191
|
+
end
|
|
192
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
193
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
194
|
+
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
195
|
+
self.send("#{key}=", nil)
|
|
196
|
+
end
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
self
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
# Deserializes the data based on type
|
|
203
|
+
# @param string type Data type
|
|
204
|
+
# @param string value Value to be deserialized
|
|
205
|
+
# @return [Object] Deserialized data
|
|
206
|
+
def _deserialize(type, value)
|
|
207
|
+
case type.to_sym
|
|
208
|
+
when :DateTime
|
|
209
|
+
DateTime.parse(value)
|
|
210
|
+
when :Date
|
|
211
|
+
Date.parse(value)
|
|
212
|
+
when :String
|
|
213
|
+
value.to_s
|
|
214
|
+
when :Integer
|
|
215
|
+
value.to_i
|
|
216
|
+
when :Float
|
|
217
|
+
value.to_f
|
|
218
|
+
when :Boolean
|
|
219
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
220
|
+
true
|
|
221
|
+
else
|
|
222
|
+
false
|
|
223
|
+
end
|
|
224
|
+
when :Object
|
|
225
|
+
# generic object (usually a Hash), return directly
|
|
226
|
+
value
|
|
227
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
228
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
229
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
230
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
231
|
+
k_type = Regexp.last_match[:k_type]
|
|
232
|
+
v_type = Regexp.last_match[:v_type]
|
|
233
|
+
{}.tap do |hash|
|
|
234
|
+
value.each do |k, v|
|
|
235
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
236
|
+
end
|
|
237
|
+
end
|
|
238
|
+
else # model
|
|
239
|
+
TurnkeyClient.const_get(type).build_from_hash(value)
|
|
240
|
+
end
|
|
241
|
+
end
|
|
242
|
+
|
|
243
|
+
# Returns the string representation of the object
|
|
244
|
+
# @return [String] String presentation of the object
|
|
245
|
+
def to_s
|
|
246
|
+
to_hash.to_s
|
|
247
|
+
end
|
|
248
|
+
|
|
249
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
250
|
+
# @return [Hash] Returns the object in the form of hash
|
|
251
|
+
def to_body
|
|
252
|
+
to_hash
|
|
253
|
+
end
|
|
254
|
+
|
|
255
|
+
# Returns the object in the form of hash
|
|
256
|
+
# @return [Hash] Returns the object in the form of hash
|
|
257
|
+
def to_hash
|
|
258
|
+
hash = {}
|
|
259
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
260
|
+
value = self.send(attr)
|
|
261
|
+
if value.nil?
|
|
262
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
263
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
264
|
+
end
|
|
265
|
+
|
|
266
|
+
hash[param] = _to_hash(value)
|
|
267
|
+
end
|
|
268
|
+
hash
|
|
269
|
+
end
|
|
270
|
+
|
|
271
|
+
# Outputs non-array value in the form of hash
|
|
272
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
273
|
+
# @param [Object] value Any valid value
|
|
274
|
+
# @return [Hash] Returns the value in the form of hash
|
|
275
|
+
def _to_hash(value)
|
|
276
|
+
if value.is_a?(Array)
|
|
277
|
+
value.compact.map { |v| _to_hash(v) }
|
|
278
|
+
elsif value.is_a?(Hash)
|
|
279
|
+
{}.tap do |hash|
|
|
280
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
281
|
+
end
|
|
282
|
+
elsif value.respond_to? :to_hash
|
|
283
|
+
value.to_hash
|
|
284
|
+
else
|
|
285
|
+
value
|
|
286
|
+
end
|
|
287
|
+
end end
|
|
288
|
+
end
|