turnkey_client 0.0.15 → 0.0.17
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/.gitignore +39 -0
- data/.rspec +2 -0
- data/.swagger-codegen/VERSION +1 -0
- data/.swagger-codegen-ignore +23 -0
- data/lib/turnkey_client/api/app_proof_api.rb +4 -4
- data/lib/turnkey_client/api/broadcasting_api.rb +251 -0
- data/lib/turnkey_client/api/on_ramp_api.rb +290 -0
- data/lib/turnkey_client/api/policies_api.rb +58 -0
- data/lib/turnkey_client/api/send_transactions_api.rb +77 -0
- data/lib/turnkey_client/api/wallets_api.rb +58 -0
- data/lib/turnkey_client/models/activity.rb +1 -1
- data/lib/turnkey_client/models/activity_type.rb +16 -0
- data/lib/turnkey_client/models/approve_activity_request.rb +14 -4
- data/lib/turnkey_client/models/client_signature.rb +255 -0
- data/lib/turnkey_client/models/client_signature_scheme.rb +26 -0
- data/lib/turnkey_client/models/create_api_keys_request.rb +14 -4
- data/lib/turnkey_client/models/create_authenticators_request.rb +14 -4
- data/lib/turnkey_client/models/create_fiat_on_ramp_credential_intent.rb +272 -0
- data/lib/turnkey_client/models/create_fiat_on_ramp_credential_request.rb +298 -0
- data/lib/turnkey_client/models/create_fiat_on_ramp_credential_result.rb +211 -0
- data/lib/turnkey_client/models/create_invitations_request.rb +14 -4
- data/lib/turnkey_client/models/create_oauth2_credential_request.rb +14 -4
- data/lib/turnkey_client/models/create_oauth_providers_request.rb +14 -4
- data/lib/turnkey_client/models/create_policies_request.rb +14 -4
- data/lib/turnkey_client/models/create_policy_intent_v3.rb +6 -0
- data/lib/turnkey_client/models/create_policy_request.rb +14 -4
- data/lib/turnkey_client/models/create_private_key_tag_request.rb +14 -4
- data/lib/turnkey_client/models/create_private_keys_request.rb +14 -4
- data/lib/turnkey_client/models/create_read_only_session_request.rb +14 -4
- data/lib/turnkey_client/models/create_read_write_session_request.rb +14 -4
- data/lib/turnkey_client/models/create_smart_contract_interface_intent.rb +1 -1
- data/lib/turnkey_client/models/create_smart_contract_interface_request.rb +14 -4
- data/lib/turnkey_client/models/create_sub_organization_intent_v7.rb +14 -5
- data/lib/turnkey_client/models/create_sub_organization_request.rb +14 -4
- data/lib/turnkey_client/models/create_tvc_app_intent.rb +277 -0
- data/lib/turnkey_client/models/create_tvc_app_result.rb +258 -0
- data/lib/turnkey_client/models/create_tvc_deployment_intent.rb +346 -0
- data/lib/turnkey_client/models/create_tvc_deployment_result.rb +226 -0
- data/lib/turnkey_client/models/create_tvc_manifest_approvals_intent.rb +228 -0
- data/lib/turnkey_client/models/create_tvc_manifest_approvals_result.rb +213 -0
- data/lib/turnkey_client/models/create_user_tag_request.rb +14 -4
- data/lib/turnkey_client/models/create_users_request.rb +14 -4
- data/lib/turnkey_client/models/create_wallet_accounts_intent.rb +15 -4
- data/lib/turnkey_client/models/create_wallet_accounts_request.rb +14 -4
- data/lib/turnkey_client/models/create_wallet_request.rb +14 -4
- data/lib/turnkey_client/models/curve.rb +1 -0
- data/lib/turnkey_client/models/custom_revert_error.rb +218 -0
- data/lib/turnkey_client/models/data_v1_signature_scheme.rb +26 -0
- data/lib/turnkey_client/models/delete_api_keys_request.rb +14 -4
- data/lib/turnkey_client/models/delete_authenticators_request.rb +14 -4
- data/lib/turnkey_client/models/delete_fiat_on_ramp_credential_intent.rb +211 -0
- data/lib/turnkey_client/models/delete_fiat_on_ramp_credential_request.rb +298 -0
- data/lib/turnkey_client/models/delete_fiat_on_ramp_credential_result.rb +211 -0
- data/lib/turnkey_client/models/delete_invitation_request.rb +14 -4
- data/lib/turnkey_client/models/delete_oauth2_credential_request.rb +14 -4
- data/lib/turnkey_client/models/delete_oauth_providers_request.rb +14 -4
- data/lib/turnkey_client/models/delete_policies_intent.rb +213 -0
- data/lib/turnkey_client/models/delete_policies_request.rb +298 -0
- data/lib/turnkey_client/models/delete_policies_result.rb +213 -0
- data/lib/turnkey_client/models/delete_policy_request.rb +14 -4
- data/lib/turnkey_client/models/delete_private_key_tags_request.rb +14 -4
- data/lib/turnkey_client/models/delete_private_keys_request.rb +14 -4
- data/lib/turnkey_client/models/delete_smart_contract_interface_request.rb +14 -4
- data/lib/turnkey_client/models/delete_sub_organization_request.rb +14 -4
- data/lib/turnkey_client/models/delete_user_tags_request.rb +14 -4
- data/lib/turnkey_client/models/delete_users_request.rb +14 -4
- data/lib/turnkey_client/models/delete_wallet_accounts_intent.rb +224 -0
- data/lib/turnkey_client/models/delete_wallet_accounts_request.rb +298 -0
- data/lib/turnkey_client/models/delete_wallet_accounts_result.rb +213 -0
- data/lib/turnkey_client/models/delete_wallets_request.rb +14 -4
- data/lib/turnkey_client/models/email_auth_customization_params.rb +255 -0
- data/lib/turnkey_client/models/email_auth_intent_v3.rb +306 -0
- data/lib/turnkey_client/models/email_auth_request.rb +16 -6
- data/lib/turnkey_client/models/email_customization_params_v2.rb +240 -0
- data/lib/turnkey_client/models/eth_send_raw_transaction_intent.rb +260 -0
- data/lib/turnkey_client/models/eth_send_raw_transaction_result.rb +211 -0
- data/lib/turnkey_client/models/eth_send_transaction_intent.rb +363 -0
- data/lib/turnkey_client/models/eth_send_transaction_request.rb +298 -0
- data/lib/turnkey_client/models/eth_send_transaction_result.rb +211 -0
- data/lib/turnkey_client/models/eth_send_transaction_status.rb +207 -0
- data/lib/turnkey_client/models/export_private_key_request.rb +14 -4
- data/lib/turnkey_client/models/export_wallet_account_request.rb +14 -4
- data/lib/turnkey_client/models/export_wallet_request.rb +14 -4
- data/lib/turnkey_client/models/fiat_on_ramp_credential.rb +330 -0
- data/lib/turnkey_client/models/get_gas_usage_request.rb +211 -0
- data/lib/turnkey_client/models/get_gas_usage_response.rb +241 -0
- data/lib/turnkey_client/models/get_nonces_request.rb +261 -0
- data/lib/turnkey_client/models/get_nonces_response.rb +218 -0
- data/lib/turnkey_client/models/get_on_ramp_transaction_status_request.rb +237 -0
- data/lib/turnkey_client/models/get_on_ramp_transaction_status_response.rb +211 -0
- data/lib/turnkey_client/models/get_send_transaction_status_request.rb +226 -0
- data/lib/turnkey_client/models/get_send_transaction_status_response.rb +240 -0
- data/lib/turnkey_client/models/import_private_key_request.rb +14 -4
- data/lib/turnkey_client/models/import_wallet_request.rb +14 -4
- data/lib/turnkey_client/models/init_fiat_on_ramp_request.rb +14 -4
- data/lib/turnkey_client/models/init_import_private_key_request.rb +14 -4
- data/lib/turnkey_client/models/init_import_wallet_request.rb +14 -4
- data/lib/turnkey_client/models/init_otp_auth_intent_v3.rb +336 -0
- data/lib/turnkey_client/models/init_otp_auth_request.rb +16 -6
- data/lib/turnkey_client/models/init_otp_intent_v2.rb +336 -0
- data/lib/turnkey_client/models/init_otp_request.rb +16 -6
- data/lib/turnkey_client/models/init_user_email_recovery_intent.rb +37 -4
- data/lib/turnkey_client/models/init_user_email_recovery_intent_v2.rb +284 -0
- data/lib/turnkey_client/models/init_user_email_recovery_request.rb +16 -6
- data/lib/turnkey_client/models/intent.rb +148 -4
- data/lib/turnkey_client/models/list_fiat_on_ramp_credentials_request.rb +211 -0
- data/lib/turnkey_client/models/list_fiat_on_ramp_credentials_response.rb +212 -0
- data/lib/turnkey_client/models/native_revert_error.rb +229 -0
- data/lib/turnkey_client/models/oauth2_authenticate_request.rb +14 -4
- data/lib/turnkey_client/models/oauth_login_request.rb +14 -4
- data/lib/turnkey_client/models/oauth_request.rb +14 -4
- data/lib/turnkey_client/models/otp_auth_request.rb +14 -4
- data/lib/turnkey_client/models/otp_login_intent.rb +0 -2
- data/lib/turnkey_client/models/otp_login_request.rb +14 -4
- data/lib/turnkey_client/models/recover_user_request.rb +14 -4
- data/lib/turnkey_client/models/reject_activity_request.rb +14 -4
- data/lib/turnkey_client/models/remove_organization_feature_request.rb +14 -4
- data/lib/turnkey_client/models/result.rb +112 -4
- data/lib/turnkey_client/models/revert_chain_entry.rb +253 -0
- data/lib/turnkey_client/models/set_organization_feature_request.rb +14 -4
- data/lib/turnkey_client/models/sign_raw_payload_request.rb +14 -4
- data/lib/turnkey_client/models/sign_raw_payloads_request.rb +14 -4
- data/lib/turnkey_client/models/sign_transaction_request.rb +14 -4
- data/lib/turnkey_client/models/sol_send_transaction_intent.rb +297 -0
- data/lib/turnkey_client/models/sol_send_transaction_request.rb +298 -0
- data/lib/turnkey_client/models/sol_send_transaction_result.rb +211 -0
- data/lib/turnkey_client/models/stamp_login_request.rb +14 -4
- data/lib/turnkey_client/models/transaction_type.rb +2 -0
- data/lib/turnkey_client/models/tvc_manifest_approval.rb +226 -0
- data/lib/turnkey_client/models/tvc_operator_params.rb +226 -0
- data/lib/turnkey_client/models/tvc_operator_set_params.rb +250 -0
- data/lib/turnkey_client/models/tx_error.rb +218 -0
- data/lib/turnkey_client/models/unknown_revert_error.rb +218 -0
- data/lib/turnkey_client/models/update_auth_proxy_config_intent.rb +27 -5
- data/lib/turnkey_client/models/update_fiat_on_ramp_credential_intent.rb +277 -0
- data/lib/turnkey_client/models/update_fiat_on_ramp_credential_request.rb +298 -0
- data/lib/turnkey_client/models/update_fiat_on_ramp_credential_result.rb +211 -0
- data/lib/turnkey_client/models/update_oauth2_credential_request.rb +14 -4
- data/lib/turnkey_client/models/update_policy_request.rb +14 -4
- data/lib/turnkey_client/models/update_private_key_tag_request.rb +14 -4
- data/lib/turnkey_client/models/update_root_quorum_request.rb +14 -4
- data/lib/turnkey_client/models/update_user_email_request.rb +14 -4
- data/lib/turnkey_client/models/update_user_name_request.rb +14 -4
- data/lib/turnkey_client/models/update_user_phone_number_request.rb +14 -4
- data/lib/turnkey_client/models/update_user_request.rb +14 -4
- data/lib/turnkey_client/models/update_user_tag_request.rb +14 -4
- data/lib/turnkey_client/models/update_wallet_request.rb +14 -4
- data/lib/turnkey_client/models/upsert_gas_usage_config_intent.rb +241 -0
- data/lib/turnkey_client/models/upsert_gas_usage_config_result.rb +211 -0
- data/lib/turnkey_client/models/verify_otp_request.rb +14 -4
- data/lib/turnkey_client/version.rb +1 -1
- data/lib/turnkey_client.rb +63 -2
- data/turnkey_client.gemspec +1 -1
- metadata +90 -33
- data/turnkey_client-0.0.12.gem +0 -0
- data/turnkey_client-0.0.13.gem +0 -0
- data/turnkey_client-0.0.14.gem +0 -0
- data/turnkey_client-0.0.2.gem +0 -0
- data/turnkey_client-0.0.3.gem +0 -0
- data/turnkey_client-0.0.4.gem +0 -0
- data/turnkey_client-0.0.7.gem +0 -0
- data/turnkey_client-0.0.8.gem +0 -0
- data/turnkey_client-0.0.9.gem +0 -0
|
@@ -0,0 +1,258 @@
|
|
|
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 CreateTvcAppResult
|
|
15
|
+
# The unique identifier for the TVC application
|
|
16
|
+
attr_accessor :app_id
|
|
17
|
+
|
|
18
|
+
# The unique identifier for the TVC manifest set
|
|
19
|
+
attr_accessor :manifest_set_id
|
|
20
|
+
|
|
21
|
+
# The unique identifier(s) of the manifest set operators
|
|
22
|
+
attr_accessor :manifest_set_operator_ids
|
|
23
|
+
|
|
24
|
+
# The required number of approvals for the manifest set
|
|
25
|
+
attr_accessor :manifest_set_threshold
|
|
26
|
+
|
|
27
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
28
|
+
def self.attribute_map
|
|
29
|
+
{
|
|
30
|
+
:'app_id' => :'appId',
|
|
31
|
+
:'manifest_set_id' => :'manifestSetId',
|
|
32
|
+
:'manifest_set_operator_ids' => :'manifestSetOperatorIds',
|
|
33
|
+
:'manifest_set_threshold' => :'manifestSetThreshold'
|
|
34
|
+
}
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Attribute type mapping.
|
|
38
|
+
def self.openapi_types
|
|
39
|
+
{
|
|
40
|
+
:'app_id' => :'Object',
|
|
41
|
+
:'manifest_set_id' => :'Object',
|
|
42
|
+
:'manifest_set_operator_ids' => :'Object',
|
|
43
|
+
:'manifest_set_threshold' => :'Object'
|
|
44
|
+
}
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# List of attributes with nullable: true
|
|
48
|
+
def self.openapi_nullable
|
|
49
|
+
Set.new([
|
|
50
|
+
])
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# Initializes the object
|
|
54
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
55
|
+
def initialize(attributes = {})
|
|
56
|
+
if (!attributes.is_a?(Hash))
|
|
57
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::CreateTvcAppResult` initialize method"
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
61
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
62
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
63
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::CreateTvcAppResult`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
64
|
+
end
|
|
65
|
+
h[k.to_sym] = v
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
if attributes.key?(:'app_id')
|
|
69
|
+
self.app_id = attributes[:'app_id']
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
if attributes.key?(:'manifest_set_id')
|
|
73
|
+
self.manifest_set_id = attributes[:'manifest_set_id']
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
if attributes.key?(:'manifest_set_operator_ids')
|
|
77
|
+
if (value = attributes[:'manifest_set_operator_ids']).is_a?(Array)
|
|
78
|
+
self.manifest_set_operator_ids = value
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
if attributes.key?(:'manifest_set_threshold')
|
|
83
|
+
self.manifest_set_threshold = attributes[:'manifest_set_threshold']
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
88
|
+
# @return Array for valid properties with the reasons
|
|
89
|
+
def list_invalid_properties
|
|
90
|
+
invalid_properties = Array.new
|
|
91
|
+
if @app_id.nil?
|
|
92
|
+
invalid_properties.push('invalid value for "app_id", app_id cannot be nil.')
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
if @manifest_set_id.nil?
|
|
96
|
+
invalid_properties.push('invalid value for "manifest_set_id", manifest_set_id cannot be nil.')
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
if @manifest_set_operator_ids.nil?
|
|
100
|
+
invalid_properties.push('invalid value for "manifest_set_operator_ids", manifest_set_operator_ids cannot be nil.')
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
if @manifest_set_threshold.nil?
|
|
104
|
+
invalid_properties.push('invalid value for "manifest_set_threshold", manifest_set_threshold cannot be nil.')
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
invalid_properties
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Check to see if the all the properties in the model are valid
|
|
111
|
+
# @return true if the model is valid
|
|
112
|
+
def valid?
|
|
113
|
+
return false if @app_id.nil?
|
|
114
|
+
return false if @manifest_set_id.nil?
|
|
115
|
+
return false if @manifest_set_operator_ids.nil?
|
|
116
|
+
return false if @manifest_set_threshold.nil?
|
|
117
|
+
true
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# Checks equality by comparing each attribute.
|
|
121
|
+
# @param [Object] Object to be compared
|
|
122
|
+
def ==(o)
|
|
123
|
+
return true if self.equal?(o)
|
|
124
|
+
self.class == o.class &&
|
|
125
|
+
app_id == o.app_id &&
|
|
126
|
+
manifest_set_id == o.manifest_set_id &&
|
|
127
|
+
manifest_set_operator_ids == o.manifest_set_operator_ids &&
|
|
128
|
+
manifest_set_threshold == o.manifest_set_threshold
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
# @see the `==` method
|
|
132
|
+
# @param [Object] Object to be compared
|
|
133
|
+
def eql?(o)
|
|
134
|
+
self == o
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
# Calculates hash code according to all attributes.
|
|
138
|
+
# @return [Integer] Hash code
|
|
139
|
+
def hash
|
|
140
|
+
[app_id, manifest_set_id, manifest_set_operator_ids, manifest_set_threshold].hash
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
# Builds the object from hash
|
|
144
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
145
|
+
# @return [Object] Returns the model itself
|
|
146
|
+
def self.build_from_hash(attributes)
|
|
147
|
+
new.build_from_hash(attributes)
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
# Builds the object from hash
|
|
151
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
152
|
+
# @return [Object] Returns the model itself
|
|
153
|
+
def build_from_hash(attributes)
|
|
154
|
+
return nil unless attributes.is_a?(Hash)
|
|
155
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
156
|
+
if type =~ /\AArray<(.*)>/i
|
|
157
|
+
# check to ensure the input is an array given that the attribute
|
|
158
|
+
# is documented as an array but the input is not
|
|
159
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
160
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
161
|
+
end
|
|
162
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
163
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
164
|
+
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
165
|
+
self.send("#{key}=", nil)
|
|
166
|
+
end
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
self
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
# Deserializes the data based on type
|
|
173
|
+
# @param string type Data type
|
|
174
|
+
# @param string value Value to be deserialized
|
|
175
|
+
# @return [Object] Deserialized data
|
|
176
|
+
def _deserialize(type, value)
|
|
177
|
+
case type.to_sym
|
|
178
|
+
when :DateTime
|
|
179
|
+
DateTime.parse(value)
|
|
180
|
+
when :Date
|
|
181
|
+
Date.parse(value)
|
|
182
|
+
when :String
|
|
183
|
+
value.to_s
|
|
184
|
+
when :Integer
|
|
185
|
+
value.to_i
|
|
186
|
+
when :Float
|
|
187
|
+
value.to_f
|
|
188
|
+
when :Boolean
|
|
189
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
190
|
+
true
|
|
191
|
+
else
|
|
192
|
+
false
|
|
193
|
+
end
|
|
194
|
+
when :Object
|
|
195
|
+
# generic object (usually a Hash), return directly
|
|
196
|
+
value
|
|
197
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
198
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
199
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
200
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
201
|
+
k_type = Regexp.last_match[:k_type]
|
|
202
|
+
v_type = Regexp.last_match[:v_type]
|
|
203
|
+
{}.tap do |hash|
|
|
204
|
+
value.each do |k, v|
|
|
205
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
206
|
+
end
|
|
207
|
+
end
|
|
208
|
+
else # model
|
|
209
|
+
TurnkeyClient.const_get(type).build_from_hash(value)
|
|
210
|
+
end
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
# Returns the string representation of the object
|
|
214
|
+
# @return [String] String presentation of the object
|
|
215
|
+
def to_s
|
|
216
|
+
to_hash.to_s
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
220
|
+
# @return [Hash] Returns the object in the form of hash
|
|
221
|
+
def to_body
|
|
222
|
+
to_hash
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
# Returns the object in the form of hash
|
|
226
|
+
# @return [Hash] Returns the object in the form of hash
|
|
227
|
+
def to_hash
|
|
228
|
+
hash = {}
|
|
229
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
230
|
+
value = self.send(attr)
|
|
231
|
+
if value.nil?
|
|
232
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
233
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
234
|
+
end
|
|
235
|
+
|
|
236
|
+
hash[param] = _to_hash(value)
|
|
237
|
+
end
|
|
238
|
+
hash
|
|
239
|
+
end
|
|
240
|
+
|
|
241
|
+
# Outputs non-array value in the form of hash
|
|
242
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
243
|
+
# @param [Object] value Any valid value
|
|
244
|
+
# @return [Hash] Returns the value in the form of hash
|
|
245
|
+
def _to_hash(value)
|
|
246
|
+
if value.is_a?(Array)
|
|
247
|
+
value.compact.map { |v| _to_hash(v) }
|
|
248
|
+
elsif value.is_a?(Hash)
|
|
249
|
+
{}.tap do |hash|
|
|
250
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
251
|
+
end
|
|
252
|
+
elsif value.respond_to? :to_hash
|
|
253
|
+
value.to_hash
|
|
254
|
+
else
|
|
255
|
+
value
|
|
256
|
+
end
|
|
257
|
+
end end
|
|
258
|
+
end
|
|
@@ -0,0 +1,346 @@
|
|
|
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 CreateTvcDeploymentIntent
|
|
15
|
+
# The unique identifier of the to-be-deployed TVC application
|
|
16
|
+
attr_accessor :app_id
|
|
17
|
+
|
|
18
|
+
# The QuorumOS version to use to deploy this application
|
|
19
|
+
attr_accessor :qos_version
|
|
20
|
+
|
|
21
|
+
# URL of the container containing the pivot binary
|
|
22
|
+
attr_accessor :pivot_container_image_url
|
|
23
|
+
|
|
24
|
+
# Location of the binary in the pivot container
|
|
25
|
+
attr_accessor :pivot_path
|
|
26
|
+
|
|
27
|
+
# Arguments to pass to the pivot binary at startup. Encoded as a list of strings, for example [\"--foo\", \"bar\"]
|
|
28
|
+
attr_accessor :pivot_args
|
|
29
|
+
|
|
30
|
+
# Digest of the pivot binary in the pivot container. This value will be inserted in the QOS manifest to ensure application integrity.
|
|
31
|
+
attr_accessor :expected_pivot_digest
|
|
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
|
+
# Optional nonce to ensure uniqueness of the deployment manifest. If not provided, it defaults to the current Unix timestamp in seconds.
|
|
43
|
+
attr_accessor :nonce
|
|
44
|
+
|
|
45
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
46
|
+
def self.attribute_map
|
|
47
|
+
{
|
|
48
|
+
:'app_id' => :'appId',
|
|
49
|
+
:'qos_version' => :'qosVersion',
|
|
50
|
+
:'pivot_container_image_url' => :'pivotContainerImageUrl',
|
|
51
|
+
:'pivot_path' => :'pivotPath',
|
|
52
|
+
:'pivot_args' => :'pivotArgs',
|
|
53
|
+
:'expected_pivot_digest' => :'expectedPivotDigest',
|
|
54
|
+
:'host_container_image_url' => :'hostContainerImageUrl',
|
|
55
|
+
:'host_path' => :'hostPath',
|
|
56
|
+
:'host_args' => :'hostArgs',
|
|
57
|
+
:'nonce' => :'nonce'
|
|
58
|
+
}
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# Attribute type mapping.
|
|
62
|
+
def self.openapi_types
|
|
63
|
+
{
|
|
64
|
+
:'app_id' => :'Object',
|
|
65
|
+
:'qos_version' => :'Object',
|
|
66
|
+
:'pivot_container_image_url' => :'Object',
|
|
67
|
+
:'pivot_path' => :'Object',
|
|
68
|
+
:'pivot_args' => :'Object',
|
|
69
|
+
:'expected_pivot_digest' => :'Object',
|
|
70
|
+
:'host_container_image_url' => :'Object',
|
|
71
|
+
:'host_path' => :'Object',
|
|
72
|
+
:'host_args' => :'Object',
|
|
73
|
+
:'nonce' => :'Object'
|
|
74
|
+
}
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# List of attributes with nullable: true
|
|
78
|
+
def self.openapi_nullable
|
|
79
|
+
Set.new([
|
|
80
|
+
:'nonce'
|
|
81
|
+
])
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# Initializes the object
|
|
85
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
86
|
+
def initialize(attributes = {})
|
|
87
|
+
if (!attributes.is_a?(Hash))
|
|
88
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::CreateTvcDeploymentIntent` initialize method"
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
92
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
93
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
94
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::CreateTvcDeploymentIntent`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
95
|
+
end
|
|
96
|
+
h[k.to_sym] = v
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
if attributes.key?(:'app_id')
|
|
100
|
+
self.app_id = attributes[:'app_id']
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
if attributes.key?(:'qos_version')
|
|
104
|
+
self.qos_version = attributes[:'qos_version']
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
if attributes.key?(:'pivot_container_image_url')
|
|
108
|
+
self.pivot_container_image_url = attributes[:'pivot_container_image_url']
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
if attributes.key?(:'pivot_path')
|
|
112
|
+
self.pivot_path = attributes[:'pivot_path']
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
if attributes.key?(:'pivot_args')
|
|
116
|
+
if (value = attributes[:'pivot_args']).is_a?(Array)
|
|
117
|
+
self.pivot_args = value
|
|
118
|
+
end
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
if attributes.key?(:'expected_pivot_digest')
|
|
122
|
+
self.expected_pivot_digest = attributes[:'expected_pivot_digest']
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
if attributes.key?(:'host_container_image_url')
|
|
126
|
+
self.host_container_image_url = attributes[:'host_container_image_url']
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
if attributes.key?(:'host_path')
|
|
130
|
+
self.host_path = attributes[:'host_path']
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
if attributes.key?(:'host_args')
|
|
134
|
+
if (value = attributes[:'host_args']).is_a?(Array)
|
|
135
|
+
self.host_args = value
|
|
136
|
+
end
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
if attributes.key?(:'nonce')
|
|
140
|
+
self.nonce = attributes[:'nonce']
|
|
141
|
+
end
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
145
|
+
# @return Array for valid properties with the reasons
|
|
146
|
+
def list_invalid_properties
|
|
147
|
+
invalid_properties = Array.new
|
|
148
|
+
if @app_id.nil?
|
|
149
|
+
invalid_properties.push('invalid value for "app_id", app_id cannot be nil.')
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
if @qos_version.nil?
|
|
153
|
+
invalid_properties.push('invalid value for "qos_version", qos_version cannot be nil.')
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
if @pivot_container_image_url.nil?
|
|
157
|
+
invalid_properties.push('invalid value for "pivot_container_image_url", pivot_container_image_url cannot be nil.')
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
if @pivot_path.nil?
|
|
161
|
+
invalid_properties.push('invalid value for "pivot_path", pivot_path cannot be nil.')
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
if @pivot_args.nil?
|
|
165
|
+
invalid_properties.push('invalid value for "pivot_args", pivot_args cannot be nil.')
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
if @expected_pivot_digest.nil?
|
|
169
|
+
invalid_properties.push('invalid value for "expected_pivot_digest", expected_pivot_digest cannot be nil.')
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
if @host_container_image_url.nil?
|
|
173
|
+
invalid_properties.push('invalid value for "host_container_image_url", host_container_image_url cannot be nil.')
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
if @host_path.nil?
|
|
177
|
+
invalid_properties.push('invalid value for "host_path", host_path cannot be nil.')
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
if @host_args.nil?
|
|
181
|
+
invalid_properties.push('invalid value for "host_args", host_args cannot be nil.')
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
invalid_properties
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
# Check to see if the all the properties in the model are valid
|
|
188
|
+
# @return true if the model is valid
|
|
189
|
+
def valid?
|
|
190
|
+
return false if @app_id.nil?
|
|
191
|
+
return false if @qos_version.nil?
|
|
192
|
+
return false if @pivot_container_image_url.nil?
|
|
193
|
+
return false if @pivot_path.nil?
|
|
194
|
+
return false if @pivot_args.nil?
|
|
195
|
+
return false if @expected_pivot_digest.nil?
|
|
196
|
+
return false if @host_container_image_url.nil?
|
|
197
|
+
return false if @host_path.nil?
|
|
198
|
+
return false if @host_args.nil?
|
|
199
|
+
true
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
# Checks equality by comparing each attribute.
|
|
203
|
+
# @param [Object] Object to be compared
|
|
204
|
+
def ==(o)
|
|
205
|
+
return true if self.equal?(o)
|
|
206
|
+
self.class == o.class &&
|
|
207
|
+
app_id == o.app_id &&
|
|
208
|
+
qos_version == o.qos_version &&
|
|
209
|
+
pivot_container_image_url == o.pivot_container_image_url &&
|
|
210
|
+
pivot_path == o.pivot_path &&
|
|
211
|
+
pivot_args == o.pivot_args &&
|
|
212
|
+
expected_pivot_digest == o.expected_pivot_digest &&
|
|
213
|
+
host_container_image_url == o.host_container_image_url &&
|
|
214
|
+
host_path == o.host_path &&
|
|
215
|
+
host_args == o.host_args &&
|
|
216
|
+
nonce == o.nonce
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
# @see the `==` method
|
|
220
|
+
# @param [Object] Object to be compared
|
|
221
|
+
def eql?(o)
|
|
222
|
+
self == o
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
# Calculates hash code according to all attributes.
|
|
226
|
+
# @return [Integer] Hash code
|
|
227
|
+
def hash
|
|
228
|
+
[app_id, qos_version, pivot_container_image_url, pivot_path, pivot_args, expected_pivot_digest, host_container_image_url, host_path, host_args, nonce].hash
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
# Builds the object from hash
|
|
232
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
233
|
+
# @return [Object] Returns the model itself
|
|
234
|
+
def self.build_from_hash(attributes)
|
|
235
|
+
new.build_from_hash(attributes)
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
# Builds the object from hash
|
|
239
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
240
|
+
# @return [Object] Returns the model itself
|
|
241
|
+
def build_from_hash(attributes)
|
|
242
|
+
return nil unless attributes.is_a?(Hash)
|
|
243
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
244
|
+
if type =~ /\AArray<(.*)>/i
|
|
245
|
+
# check to ensure the input is an array given that the attribute
|
|
246
|
+
# is documented as an array but the input is not
|
|
247
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
248
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
249
|
+
end
|
|
250
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
251
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
252
|
+
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
253
|
+
self.send("#{key}=", nil)
|
|
254
|
+
end
|
|
255
|
+
end
|
|
256
|
+
|
|
257
|
+
self
|
|
258
|
+
end
|
|
259
|
+
|
|
260
|
+
# Deserializes the data based on type
|
|
261
|
+
# @param string type Data type
|
|
262
|
+
# @param string value Value to be deserialized
|
|
263
|
+
# @return [Object] Deserialized data
|
|
264
|
+
def _deserialize(type, value)
|
|
265
|
+
case type.to_sym
|
|
266
|
+
when :DateTime
|
|
267
|
+
DateTime.parse(value)
|
|
268
|
+
when :Date
|
|
269
|
+
Date.parse(value)
|
|
270
|
+
when :String
|
|
271
|
+
value.to_s
|
|
272
|
+
when :Integer
|
|
273
|
+
value.to_i
|
|
274
|
+
when :Float
|
|
275
|
+
value.to_f
|
|
276
|
+
when :Boolean
|
|
277
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
278
|
+
true
|
|
279
|
+
else
|
|
280
|
+
false
|
|
281
|
+
end
|
|
282
|
+
when :Object
|
|
283
|
+
# generic object (usually a Hash), return directly
|
|
284
|
+
value
|
|
285
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
286
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
287
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
288
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
289
|
+
k_type = Regexp.last_match[:k_type]
|
|
290
|
+
v_type = Regexp.last_match[:v_type]
|
|
291
|
+
{}.tap do |hash|
|
|
292
|
+
value.each do |k, v|
|
|
293
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
294
|
+
end
|
|
295
|
+
end
|
|
296
|
+
else # model
|
|
297
|
+
TurnkeyClient.const_get(type).build_from_hash(value)
|
|
298
|
+
end
|
|
299
|
+
end
|
|
300
|
+
|
|
301
|
+
# Returns the string representation of the object
|
|
302
|
+
# @return [String] String presentation of the object
|
|
303
|
+
def to_s
|
|
304
|
+
to_hash.to_s
|
|
305
|
+
end
|
|
306
|
+
|
|
307
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
308
|
+
# @return [Hash] Returns the object in the form of hash
|
|
309
|
+
def to_body
|
|
310
|
+
to_hash
|
|
311
|
+
end
|
|
312
|
+
|
|
313
|
+
# Returns the object in the form of hash
|
|
314
|
+
# @return [Hash] Returns the object in the form of hash
|
|
315
|
+
def to_hash
|
|
316
|
+
hash = {}
|
|
317
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
318
|
+
value = self.send(attr)
|
|
319
|
+
if value.nil?
|
|
320
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
321
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
322
|
+
end
|
|
323
|
+
|
|
324
|
+
hash[param] = _to_hash(value)
|
|
325
|
+
end
|
|
326
|
+
hash
|
|
327
|
+
end
|
|
328
|
+
|
|
329
|
+
# Outputs non-array value in the form of hash
|
|
330
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
331
|
+
# @param [Object] value Any valid value
|
|
332
|
+
# @return [Hash] Returns the value in the form of hash
|
|
333
|
+
def _to_hash(value)
|
|
334
|
+
if value.is_a?(Array)
|
|
335
|
+
value.compact.map { |v| _to_hash(v) }
|
|
336
|
+
elsif value.is_a?(Hash)
|
|
337
|
+
{}.tap do |hash|
|
|
338
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
339
|
+
end
|
|
340
|
+
elsif value.respond_to? :to_hash
|
|
341
|
+
value.to_hash
|
|
342
|
+
else
|
|
343
|
+
value
|
|
344
|
+
end
|
|
345
|
+
end end
|
|
346
|
+
end
|