turnkey_client 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/README.md +7 -0
- data/Rakefile +8 -0
- data/git_push.sh +55 -0
- data/lib/turnkey_client/api/activities_api.rb +136 -0
- data/lib/turnkey_client/api/api_keys_api.rb +252 -0
- data/lib/turnkey_client/api/authenticators_api.rb +252 -0
- data/lib/turnkey_client/api/consensus_api.rb +136 -0
- data/lib/turnkey_client/api/features_api.rb +136 -0
- data/lib/turnkey_client/api/invitations_api.rb +136 -0
- data/lib/turnkey_client/api/organizations_api.rb +194 -0
- data/lib/turnkey_client/api/policies_api.rb +310 -0
- data/lib/turnkey_client/api/private_key_tags_api.rb +194 -0
- data/lib/turnkey_client/api/private_keys_api.rb +252 -0
- data/lib/turnkey_client/api/public_api_service_api.rb +66 -0
- data/lib/turnkey_client/api/sessions_api.rb +78 -0
- data/lib/turnkey_client/api/signing_api.rb +136 -0
- data/lib/turnkey_client/api/user_auth_api.rb +78 -0
- data/lib/turnkey_client/api/user_recovery_api.rb +136 -0
- data/lib/turnkey_client/api/user_tags_api.rb +194 -0
- data/lib/turnkey_client/api/users_api.rb +310 -0
- data/lib/turnkey_client/api/wallets_api.rb +426 -0
- data/lib/turnkey_client/api_client.rb +446 -0
- data/lib/turnkey_client/api_error.rb +57 -0
- data/lib/turnkey_client/configuration.rb +216 -0
- data/lib/turnkey_client/models/datav1_tag.rb +269 -0
- data/lib/turnkey_client/models/externaldatav1_address.rb +215 -0
- data/lib/turnkey_client/models/externaldatav1_credential.rb +226 -0
- data/lib/turnkey_client/models/externaldatav1_quorum.rb +229 -0
- data/lib/turnkey_client/models/externaldatav1_timestamp.rb +225 -0
- data/lib/turnkey_client/models/immutableactivityv1_address.rb +215 -0
- data/lib/turnkey_client/models/protobuf_any.rb +201 -0
- data/lib/turnkey_client/models/rpc_status.rb +226 -0
- data/lib/turnkey_client/models/v1_accept_invitation_intent.rb +241 -0
- data/lib/turnkey_client/models/v1_accept_invitation_intent_v2.rb +241 -0
- data/lib/turnkey_client/models/v1_accept_invitation_result.rb +227 -0
- data/lib/turnkey_client/models/v1_access_type.rb +29 -0
- data/lib/turnkey_client/models/v1_activate_billing_tier_intent.rb +212 -0
- data/lib/turnkey_client/models/v1_activate_billing_tier_result.rb +212 -0
- data/lib/turnkey_client/models/v1_activity.rb +371 -0
- data/lib/turnkey_client/models/v1_activity_response.rb +211 -0
- data/lib/turnkey_client/models/v1_activity_status.rb +32 -0
- data/lib/turnkey_client/models/v1_activity_type.rb +83 -0
- data/lib/turnkey_client/models/v1_address_format.rb +31 -0
- data/lib/turnkey_client/models/v1_api_key.rb +279 -0
- data/lib/turnkey_client/models/v1_api_key_params.rb +237 -0
- data/lib/turnkey_client/models/v1_api_only_user_params.rb +256 -0
- data/lib/turnkey_client/models/v1_approve_activity_intent.rb +212 -0
- data/lib/turnkey_client/models/v1_approve_activity_request.rb +289 -0
- data/lib/turnkey_client/models/v1_attestation.rb +259 -0
- data/lib/turnkey_client/models/v1_authenticator.rb +345 -0
- data/lib/turnkey_client/models/v1_authenticator_attestation_response.rb +280 -0
- data/lib/turnkey_client/models/v1_authenticator_params.rb +256 -0
- data/lib/turnkey_client/models/v1_authenticator_params_v2.rb +241 -0
- data/lib/turnkey_client/models/v1_authenticator_transport.rb +31 -0
- data/lib/turnkey_client/models/v1_create_api_keys_intent.rb +229 -0
- data/lib/turnkey_client/models/v1_create_api_keys_request.rb +289 -0
- data/lib/turnkey_client/models/v1_create_api_keys_result.rb +214 -0
- data/lib/turnkey_client/models/v1_create_api_only_users_intent.rb +214 -0
- data/lib/turnkey_client/models/v1_create_api_only_users_request.rb +289 -0
- data/lib/turnkey_client/models/v1_create_api_only_users_result.rb +214 -0
- data/lib/turnkey_client/models/v1_create_authenticators_intent.rb +229 -0
- data/lib/turnkey_client/models/v1_create_authenticators_intent_v2.rb +229 -0
- data/lib/turnkey_client/models/v1_create_authenticators_request.rb +289 -0
- data/lib/turnkey_client/models/v1_create_authenticators_result.rb +214 -0
- data/lib/turnkey_client/models/v1_create_invitations_intent.rb +214 -0
- data/lib/turnkey_client/models/v1_create_invitations_request.rb +289 -0
- data/lib/turnkey_client/models/v1_create_invitations_result.rb +214 -0
- data/lib/turnkey_client/models/v1_create_organization_intent.rb +251 -0
- data/lib/turnkey_client/models/v1_create_organization_intent_v2.rb +251 -0
- data/lib/turnkey_client/models/v1_create_organization_result.rb +212 -0
- data/lib/turnkey_client/models/v1_create_policy_intent.rb +252 -0
- data/lib/turnkey_client/models/v1_create_policy_intent_v2.rb +252 -0
- data/lib/turnkey_client/models/v1_create_policy_intent_v3.rb +255 -0
- data/lib/turnkey_client/models/v1_create_policy_request.rb +289 -0
- data/lib/turnkey_client/models/v1_create_policy_result.rb +212 -0
- data/lib/turnkey_client/models/v1_create_private_key_tag_intent.rb +229 -0
- data/lib/turnkey_client/models/v1_create_private_key_tag_request.rb +289 -0
- data/lib/turnkey_client/models/v1_create_private_key_tag_result.rb +229 -0
- data/lib/turnkey_client/models/v1_create_private_keys_intent.rb +214 -0
- data/lib/turnkey_client/models/v1_create_private_keys_intent_v2.rb +214 -0
- data/lib/turnkey_client/models/v1_create_private_keys_request.rb +289 -0
- data/lib/turnkey_client/models/v1_create_private_keys_result.rb +214 -0
- data/lib/turnkey_client/models/v1_create_private_keys_result_v2.rb +214 -0
- data/lib/turnkey_client/models/v1_create_sub_organization_intent.rb +226 -0
- data/lib/turnkey_client/models/v1_create_sub_organization_intent_v2.rb +244 -0
- data/lib/turnkey_client/models/v1_create_sub_organization_intent_v3.rb +261 -0
- data/lib/turnkey_client/models/v1_create_sub_organization_intent_v4.rb +273 -0
- data/lib/turnkey_client/models/v1_create_sub_organization_request.rb +289 -0
- data/lib/turnkey_client/models/v1_create_sub_organization_result.rb +211 -0
- data/lib/turnkey_client/models/v1_create_sub_organization_result_v3.rb +228 -0
- data/lib/turnkey_client/models/v1_create_sub_organization_result_v4.rb +220 -0
- data/lib/turnkey_client/models/v1_create_user_tag_intent.rb +229 -0
- data/lib/turnkey_client/models/v1_create_user_tag_request.rb +289 -0
- data/lib/turnkey_client/models/v1_create_user_tag_result.rb +229 -0
- data/lib/turnkey_client/models/v1_create_users_intent.rb +214 -0
- data/lib/turnkey_client/models/v1_create_users_intent_v2.rb +214 -0
- data/lib/turnkey_client/models/v1_create_users_request.rb +289 -0
- data/lib/turnkey_client/models/v1_create_users_result.rb +214 -0
- data/lib/turnkey_client/models/v1_create_wallet_accounts_intent.rb +229 -0
- data/lib/turnkey_client/models/v1_create_wallet_accounts_request.rb +289 -0
- data/lib/turnkey_client/models/v1_create_wallet_accounts_result.rb +214 -0
- data/lib/turnkey_client/models/v1_create_wallet_intent.rb +239 -0
- data/lib/turnkey_client/models/v1_create_wallet_request.rb +289 -0
- data/lib/turnkey_client/models/v1_create_wallet_result.rb +229 -0
- data/lib/turnkey_client/models/v1_cred_props_authentication_extensions_client_outputs.rb +211 -0
- data/lib/turnkey_client/models/v1_credential_type.rb +29 -0
- data/lib/turnkey_client/models/v1_curve.rb +28 -0
- data/lib/turnkey_client/models/v1_delete_api_keys_intent.rb +229 -0
- data/lib/turnkey_client/models/v1_delete_api_keys_request.rb +289 -0
- data/lib/turnkey_client/models/v1_delete_api_keys_result.rb +214 -0
- data/lib/turnkey_client/models/v1_delete_authenticators_intent.rb +229 -0
- data/lib/turnkey_client/models/v1_delete_authenticators_request.rb +289 -0
- data/lib/turnkey_client/models/v1_delete_authenticators_result.rb +214 -0
- data/lib/turnkey_client/models/v1_delete_invitation_intent.rb +212 -0
- data/lib/turnkey_client/models/v1_delete_invitation_request.rb +289 -0
- data/lib/turnkey_client/models/v1_delete_invitation_result.rb +212 -0
- data/lib/turnkey_client/models/v1_delete_organization_intent.rb +212 -0
- data/lib/turnkey_client/models/v1_delete_organization_result.rb +212 -0
- data/lib/turnkey_client/models/v1_delete_payment_method_intent.rb +212 -0
- data/lib/turnkey_client/models/v1_delete_payment_method_result.rb +212 -0
- data/lib/turnkey_client/models/v1_delete_policy_intent.rb +212 -0
- data/lib/turnkey_client/models/v1_delete_policy_request.rb +289 -0
- data/lib/turnkey_client/models/v1_delete_policy_result.rb +212 -0
- data/lib/turnkey_client/models/v1_delete_private_key_tags_intent.rb +214 -0
- data/lib/turnkey_client/models/v1_delete_private_key_tags_result.rb +231 -0
- data/lib/turnkey_client/models/v1_delete_user_tags_intent.rb +214 -0
- data/lib/turnkey_client/models/v1_delete_user_tags_result.rb +231 -0
- data/lib/turnkey_client/models/v1_delete_users_intent.rb +214 -0
- data/lib/turnkey_client/models/v1_delete_users_result.rb +214 -0
- data/lib/turnkey_client/models/v1_disable_private_key_intent.rb +212 -0
- data/lib/turnkey_client/models/v1_disable_private_key_result.rb +212 -0
- data/lib/turnkey_client/models/v1_effect.rb +28 -0
- data/lib/turnkey_client/models/v1_email_auth_intent.rb +256 -0
- data/lib/turnkey_client/models/v1_email_auth_request.rb +289 -0
- data/lib/turnkey_client/models/v1_email_auth_result.rb +227 -0
- data/lib/turnkey_client/models/v1_email_customization.rb +233 -0
- data/lib/turnkey_client/models/v1_export_private_key_intent.rb +227 -0
- data/lib/turnkey_client/models/v1_export_private_key_request.rb +289 -0
- data/lib/turnkey_client/models/v1_export_private_key_result.rb +227 -0
- data/lib/turnkey_client/models/v1_export_wallet_account_intent.rb +227 -0
- data/lib/turnkey_client/models/v1_export_wallet_account_request.rb +289 -0
- data/lib/turnkey_client/models/v1_export_wallet_account_result.rb +227 -0
- data/lib/turnkey_client/models/v1_export_wallet_intent.rb +236 -0
- data/lib/turnkey_client/models/v1_export_wallet_request.rb +289 -0
- data/lib/turnkey_client/models/v1_export_wallet_result.rb +227 -0
- data/lib/turnkey_client/models/v1_feature.rb +215 -0
- data/lib/turnkey_client/models/v1_feature_name.rb +30 -0
- data/lib/turnkey_client/models/v1_get_activities_request.rb +245 -0
- data/lib/turnkey_client/models/v1_get_activities_response.rb +214 -0
- data/lib/turnkey_client/models/v1_get_activity_request.rb +227 -0
- data/lib/turnkey_client/models/v1_get_api_key_request.rb +227 -0
- data/lib/turnkey_client/models/v1_get_api_key_response.rb +211 -0
- data/lib/turnkey_client/models/v1_get_api_keys_request.rb +222 -0
- data/lib/turnkey_client/models/v1_get_api_keys_response.rb +214 -0
- data/lib/turnkey_client/models/v1_get_authenticator_request.rb +227 -0
- data/lib/turnkey_client/models/v1_get_authenticator_response.rb +211 -0
- data/lib/turnkey_client/models/v1_get_authenticators_request.rb +227 -0
- data/lib/turnkey_client/models/v1_get_authenticators_response.rb +214 -0
- data/lib/turnkey_client/models/v1_get_organization_request.rb +212 -0
- data/lib/turnkey_client/models/v1_get_organization_response.rb +211 -0
- data/lib/turnkey_client/models/v1_get_policies_request.rb +212 -0
- data/lib/turnkey_client/models/v1_get_policies_response.rb +214 -0
- data/lib/turnkey_client/models/v1_get_policy_request.rb +227 -0
- data/lib/turnkey_client/models/v1_get_policy_response.rb +211 -0
- data/lib/turnkey_client/models/v1_get_private_key_request.rb +227 -0
- data/lib/turnkey_client/models/v1_get_private_key_response.rb +211 -0
- data/lib/turnkey_client/models/v1_get_private_keys_request.rb +212 -0
- data/lib/turnkey_client/models/v1_get_private_keys_response.rb +214 -0
- data/lib/turnkey_client/models/v1_get_user_request.rb +227 -0
- data/lib/turnkey_client/models/v1_get_user_response.rb +211 -0
- data/lib/turnkey_client/models/v1_get_users_request.rb +212 -0
- data/lib/turnkey_client/models/v1_get_users_response.rb +214 -0
- data/lib/turnkey_client/models/v1_get_wallet_accounts_request.rb +227 -0
- data/lib/turnkey_client/models/v1_get_wallet_accounts_response.rb +214 -0
- data/lib/turnkey_client/models/v1_get_wallet_request.rb +227 -0
- data/lib/turnkey_client/models/v1_get_wallet_response.rb +211 -0
- data/lib/turnkey_client/models/v1_get_wallets_request.rb +212 -0
- data/lib/turnkey_client/models/v1_get_wallets_response.rb +214 -0
- data/lib/turnkey_client/models/v1_get_whoami_request.rb +212 -0
- data/lib/turnkey_client/models/v1_get_whoami_response.rb +257 -0
- data/lib/turnkey_client/models/v1_hash_function.rb +30 -0
- data/lib/turnkey_client/models/v1_init_user_email_recovery_intent.rb +237 -0
- data/lib/turnkey_client/models/v1_init_user_email_recovery_request.rb +289 -0
- data/lib/turnkey_client/models/v1_init_user_email_recovery_result.rb +212 -0
- data/lib/turnkey_client/models/v1_intent.rb +715 -0
- data/lib/turnkey_client/models/v1_invitation.rb +330 -0
- data/lib/turnkey_client/models/v1_invitation_params.rb +273 -0
- data/lib/turnkey_client/models/v1_invitation_status.rb +29 -0
- data/lib/turnkey_client/models/v1_list_private_key_tags_request.rb +212 -0
- data/lib/turnkey_client/models/v1_list_private_key_tags_response.rb +214 -0
- data/lib/turnkey_client/models/v1_list_user_tags_request.rb +212 -0
- data/lib/turnkey_client/models/v1_list_user_tags_response.rb +214 -0
- data/lib/turnkey_client/models/v1_mnemonic_language.rb +35 -0
- data/lib/turnkey_client/models/v1_noop_codegen_anchor_response.rb +211 -0
- data/lib/turnkey_client/models/v1_operator.rb +37 -0
- data/lib/turnkey_client/models/v1_organization_data.rb +301 -0
- data/lib/turnkey_client/models/v1_pagination.rb +227 -0
- data/lib/turnkey_client/models/v1_path_format.rb +27 -0
- data/lib/turnkey_client/models/v1_payload_encoding.rb +28 -0
- data/lib/turnkey_client/models/v1_policy.rb +314 -0
- data/lib/turnkey_client/models/v1_private_key.rb +333 -0
- data/lib/turnkey_client/models/v1_private_key_params.rb +260 -0
- data/lib/turnkey_client/models/v1_private_key_result.rb +217 -0
- data/lib/turnkey_client/models/v1_public_key_credential_with_attestation.rb +323 -0
- data/lib/turnkey_client/models/v1_recover_user_intent.rb +226 -0
- data/lib/turnkey_client/models/v1_recover_user_request.rb +289 -0
- data/lib/turnkey_client/models/v1_recover_user_result.rb +214 -0
- data/lib/turnkey_client/models/v1_reject_activity_intent.rb +212 -0
- data/lib/turnkey_client/models/v1_reject_activity_request.rb +289 -0
- data/lib/turnkey_client/models/v1_remove_organization_feature_intent.rb +211 -0
- data/lib/turnkey_client/models/v1_remove_organization_feature_request.rb +289 -0
- data/lib/turnkey_client/models/v1_remove_organization_feature_result.rb +214 -0
- data/lib/turnkey_client/models/v1_result.rb +602 -0
- data/lib/turnkey_client/models/v1_root_user_params.rb +256 -0
- data/lib/turnkey_client/models/v1_selector.rb +224 -0
- data/lib/turnkey_client/models/v1_selector_v2.rb +226 -0
- data/lib/turnkey_client/models/v1_set_organization_feature_intent.rb +226 -0
- data/lib/turnkey_client/models/v1_set_organization_feature_request.rb +289 -0
- data/lib/turnkey_client/models/v1_set_organization_feature_result.rb +214 -0
- data/lib/turnkey_client/models/v1_set_payment_method_intent.rb +287 -0
- data/lib/turnkey_client/models/v1_set_payment_method_intent_v2.rb +242 -0
- data/lib/turnkey_client/models/v1_set_payment_method_result.rb +242 -0
- data/lib/turnkey_client/models/v1_sign_raw_payload_intent.rb +255 -0
- data/lib/turnkey_client/models/v1_sign_raw_payload_intent_v2.rb +255 -0
- data/lib/turnkey_client/models/v1_sign_raw_payload_request.rb +289 -0
- data/lib/turnkey_client/models/v1_sign_raw_payload_result.rb +242 -0
- data/lib/turnkey_client/models/v1_sign_transaction_intent.rb +241 -0
- data/lib/turnkey_client/models/v1_sign_transaction_intent_v2.rb +241 -0
- data/lib/turnkey_client/models/v1_sign_transaction_request.rb +289 -0
- data/lib/turnkey_client/models/v1_sign_transaction_result.rb +211 -0
- data/lib/turnkey_client/models/v1_simple_client_extension_results.rb +224 -0
- data/lib/turnkey_client/models/v1_tag_type.rb +28 -0
- data/lib/turnkey_client/models/v1_transaction_type.rb +27 -0
- data/lib/turnkey_client/models/v1_update_allowed_origins_intent.rb +214 -0
- data/lib/turnkey_client/models/v1_update_allowed_origins_result.rb +197 -0
- data/lib/turnkey_client/models/v1_update_policy_intent.rb +261 -0
- data/lib/turnkey_client/models/v1_update_policy_request.rb +289 -0
- data/lib/turnkey_client/models/v1_update_policy_result.rb +212 -0
- data/lib/turnkey_client/models/v1_update_private_key_tag_intent.rb +256 -0
- data/lib/turnkey_client/models/v1_update_private_key_tag_request.rb +289 -0
- data/lib/turnkey_client/models/v1_update_private_key_tag_result.rb +212 -0
- data/lib/turnkey_client/models/v1_update_root_quorum_intent.rb +229 -0
- data/lib/turnkey_client/models/v1_update_root_quorum_request.rb +289 -0
- data/lib/turnkey_client/models/v1_update_root_quorum_result.rb +197 -0
- data/lib/turnkey_client/models/v1_update_user_intent.rb +244 -0
- data/lib/turnkey_client/models/v1_update_user_request.rb +289 -0
- data/lib/turnkey_client/models/v1_update_user_result.rb +212 -0
- data/lib/turnkey_client/models/v1_update_user_tag_intent.rb +256 -0
- data/lib/turnkey_client/models/v1_update_user_tag_request.rb +289 -0
- data/lib/turnkey_client/models/v1_update_user_tag_result.rb +212 -0
- data/lib/turnkey_client/models/v1_user.rb +316 -0
- data/lib/turnkey_client/models/v1_user_params.rb +287 -0
- data/lib/turnkey_client/models/v1_user_params_v2.rb +273 -0
- data/lib/turnkey_client/models/v1_vote.rb +378 -0
- data/lib/turnkey_client/models/v1_wallet.rb +270 -0
- data/lib/turnkey_client/models/v1_wallet_account.rb +342 -0
- data/lib/turnkey_client/models/v1_wallet_account_params.rb +254 -0
- data/lib/turnkey_client/models/v1_wallet_params.rb +239 -0
- data/lib/turnkey_client/models/v1_wallet_result.rb +228 -0
- data/lib/turnkey_client/models/v1_web_authn_stamp.rb +257 -0
- data/lib/turnkey_client/version.rb +14 -0
- data/lib/turnkey_client.rb +289 -0
- data/turnkey_client.gemspec +38 -0
- metadata +387 -0
@@ -0,0 +1,31 @@
|
|
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
|
+
Swagger Codegen version: 3.0.53
|
10
|
+
=end
|
11
|
+
|
12
|
+
require 'date'
|
13
|
+
|
14
|
+
module TurnkeyClient
|
15
|
+
class V1AddressFormat
|
16
|
+
UNCOMPRESSED = 'ADDRESS_FORMAT_UNCOMPRESSED'.freeze
|
17
|
+
COMPRESSED = 'ADDRESS_FORMAT_COMPRESSED'.freeze
|
18
|
+
ETHEREUM = 'ADDRESS_FORMAT_ETHEREUM'.freeze
|
19
|
+
SOLANA = 'ADDRESS_FORMAT_SOLANA'.freeze
|
20
|
+
COSMOS = 'ADDRESS_FORMAT_COSMOS'.freeze
|
21
|
+
|
22
|
+
# Builds the enum from string
|
23
|
+
# @param [String] The enum value in the form of the string
|
24
|
+
# @return [String] The enum value
|
25
|
+
def build_from_hash(value)
|
26
|
+
constantValues = V1AddressFormat.constants.select { |c| V1AddressFormat::const_get(c) == value }
|
27
|
+
raise "Invalid ENUM value #{value} for class #V1AddressFormat" if constantValues.empty?
|
28
|
+
value
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,279 @@
|
|
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
|
+
Swagger Codegen version: 3.0.53
|
10
|
+
=end
|
11
|
+
|
12
|
+
require 'date'
|
13
|
+
|
14
|
+
module TurnkeyClient
|
15
|
+
class V1ApiKey
|
16
|
+
attr_accessor :credential
|
17
|
+
|
18
|
+
# Unique identifier for a given API Key.
|
19
|
+
attr_accessor :api_key_id
|
20
|
+
|
21
|
+
# Human-readable name for an API Key.
|
22
|
+
attr_accessor :api_key_name
|
23
|
+
|
24
|
+
attr_accessor :created_at
|
25
|
+
|
26
|
+
attr_accessor :updated_at
|
27
|
+
|
28
|
+
# Optional window (in seconds) indicating how long the API Key should last.
|
29
|
+
attr_accessor :expiration_seconds
|
30
|
+
|
31
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
32
|
+
def self.attribute_map
|
33
|
+
{
|
34
|
+
:'credential' => :'credential',
|
35
|
+
:'api_key_id' => :'apiKeyId',
|
36
|
+
:'api_key_name' => :'apiKeyName',
|
37
|
+
:'created_at' => :'createdAt',
|
38
|
+
:'updated_at' => :'updatedAt',
|
39
|
+
:'expiration_seconds' => :'expirationSeconds'
|
40
|
+
}
|
41
|
+
end
|
42
|
+
|
43
|
+
# Attribute type mapping.
|
44
|
+
def self.openapi_types
|
45
|
+
{
|
46
|
+
:'credential' => :'Object',
|
47
|
+
:'api_key_id' => :'Object',
|
48
|
+
:'api_key_name' => :'Object',
|
49
|
+
:'created_at' => :'Object',
|
50
|
+
:'updated_at' => :'Object',
|
51
|
+
:'expiration_seconds' => :'Object'
|
52
|
+
}
|
53
|
+
end
|
54
|
+
|
55
|
+
# List of attributes with nullable: true
|
56
|
+
def self.openapi_nullable
|
57
|
+
Set.new([
|
58
|
+
])
|
59
|
+
end
|
60
|
+
|
61
|
+
# Initializes the object
|
62
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
63
|
+
def initialize(attributes = {})
|
64
|
+
if (!attributes.is_a?(Hash))
|
65
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::V1ApiKey` initialize method"
|
66
|
+
end
|
67
|
+
|
68
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
69
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
70
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
71
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::V1ApiKey`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
72
|
+
end
|
73
|
+
h[k.to_sym] = v
|
74
|
+
}
|
75
|
+
|
76
|
+
if attributes.key?(:'credential')
|
77
|
+
self.credential = attributes[:'credential']
|
78
|
+
end
|
79
|
+
|
80
|
+
if attributes.key?(:'api_key_id')
|
81
|
+
self.api_key_id = attributes[:'api_key_id']
|
82
|
+
end
|
83
|
+
|
84
|
+
if attributes.key?(:'api_key_name')
|
85
|
+
self.api_key_name = attributes[:'api_key_name']
|
86
|
+
end
|
87
|
+
|
88
|
+
if attributes.key?(:'created_at')
|
89
|
+
self.created_at = attributes[:'created_at']
|
90
|
+
end
|
91
|
+
|
92
|
+
if attributes.key?(:'updated_at')
|
93
|
+
self.updated_at = attributes[:'updated_at']
|
94
|
+
end
|
95
|
+
|
96
|
+
if attributes.key?(:'expiration_seconds')
|
97
|
+
self.expiration_seconds = attributes[:'expiration_seconds']
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
101
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
102
|
+
# @return Array for valid properties with the reasons
|
103
|
+
def list_invalid_properties
|
104
|
+
invalid_properties = Array.new
|
105
|
+
if @credential.nil?
|
106
|
+
invalid_properties.push('invalid value for "credential", credential cannot be nil.')
|
107
|
+
end
|
108
|
+
|
109
|
+
if @api_key_id.nil?
|
110
|
+
invalid_properties.push('invalid value for "api_key_id", api_key_id cannot be nil.')
|
111
|
+
end
|
112
|
+
|
113
|
+
if @api_key_name.nil?
|
114
|
+
invalid_properties.push('invalid value for "api_key_name", api_key_name cannot be nil.')
|
115
|
+
end
|
116
|
+
|
117
|
+
if @created_at.nil?
|
118
|
+
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
119
|
+
end
|
120
|
+
|
121
|
+
if @updated_at.nil?
|
122
|
+
invalid_properties.push('invalid value for "updated_at", updated_at 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 @credential.nil?
|
132
|
+
return false if @api_key_id.nil?
|
133
|
+
return false if @api_key_name.nil?
|
134
|
+
return false if @created_at.nil?
|
135
|
+
return false if @updated_at.nil?
|
136
|
+
true
|
137
|
+
end
|
138
|
+
|
139
|
+
# Checks equality by comparing each attribute.
|
140
|
+
# @param [Object] Object to be compared
|
141
|
+
def ==(o)
|
142
|
+
return true if self.equal?(o)
|
143
|
+
self.class == o.class &&
|
144
|
+
credential == o.credential &&
|
145
|
+
api_key_id == o.api_key_id &&
|
146
|
+
api_key_name == o.api_key_name &&
|
147
|
+
created_at == o.created_at &&
|
148
|
+
updated_at == o.updated_at &&
|
149
|
+
expiration_seconds == o.expiration_seconds
|
150
|
+
end
|
151
|
+
|
152
|
+
# @see the `==` method
|
153
|
+
# @param [Object] Object to be compared
|
154
|
+
def eql?(o)
|
155
|
+
self == o
|
156
|
+
end
|
157
|
+
|
158
|
+
# Calculates hash code according to all attributes.
|
159
|
+
# @return [Integer] Hash code
|
160
|
+
def hash
|
161
|
+
[credential, api_key_id, api_key_name, created_at, updated_at, expiration_seconds].hash
|
162
|
+
end
|
163
|
+
|
164
|
+
# Builds the object from hash
|
165
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
166
|
+
# @return [Object] Returns the model itself
|
167
|
+
def self.build_from_hash(attributes)
|
168
|
+
new.build_from_hash(attributes)
|
169
|
+
end
|
170
|
+
|
171
|
+
# Builds the object from hash
|
172
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
173
|
+
# @return [Object] Returns the model itself
|
174
|
+
def build_from_hash(attributes)
|
175
|
+
return nil unless attributes.is_a?(Hash)
|
176
|
+
self.class.openapi_types.each_pair do |key, type|
|
177
|
+
if type =~ /\AArray<(.*)>/i
|
178
|
+
# check to ensure the input is an array given that the attribute
|
179
|
+
# is documented as an array but the input is not
|
180
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
181
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
182
|
+
end
|
183
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
184
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
185
|
+
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
186
|
+
self.send("#{key}=", nil)
|
187
|
+
end
|
188
|
+
end
|
189
|
+
|
190
|
+
self
|
191
|
+
end
|
192
|
+
|
193
|
+
# Deserializes the data based on type
|
194
|
+
# @param string type Data type
|
195
|
+
# @param string value Value to be deserialized
|
196
|
+
# @return [Object] Deserialized data
|
197
|
+
def _deserialize(type, value)
|
198
|
+
case type.to_sym
|
199
|
+
when :DateTime
|
200
|
+
DateTime.parse(value)
|
201
|
+
when :Date
|
202
|
+
Date.parse(value)
|
203
|
+
when :String
|
204
|
+
value.to_s
|
205
|
+
when :Integer
|
206
|
+
value.to_i
|
207
|
+
when :Float
|
208
|
+
value.to_f
|
209
|
+
when :Boolean
|
210
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
211
|
+
true
|
212
|
+
else
|
213
|
+
false
|
214
|
+
end
|
215
|
+
when :Object
|
216
|
+
# generic object (usually a Hash), return directly
|
217
|
+
value
|
218
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
219
|
+
inner_type = Regexp.last_match[:inner_type]
|
220
|
+
value.map { |v| _deserialize(inner_type, v) }
|
221
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
222
|
+
k_type = Regexp.last_match[:k_type]
|
223
|
+
v_type = Regexp.last_match[:v_type]
|
224
|
+
{}.tap do |hash|
|
225
|
+
value.each do |k, v|
|
226
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
227
|
+
end
|
228
|
+
end
|
229
|
+
else # model
|
230
|
+
TurnkeyClient.const_get(type).build_from_hash(value)
|
231
|
+
end
|
232
|
+
end
|
233
|
+
|
234
|
+
# Returns the string representation of the object
|
235
|
+
# @return [String] String presentation of the object
|
236
|
+
def to_s
|
237
|
+
to_hash.to_s
|
238
|
+
end
|
239
|
+
|
240
|
+
# to_body is an alias to to_hash (backward compatibility)
|
241
|
+
# @return [Hash] Returns the object in the form of hash
|
242
|
+
def to_body
|
243
|
+
to_hash
|
244
|
+
end
|
245
|
+
|
246
|
+
# Returns the object in the form of hash
|
247
|
+
# @return [Hash] Returns the object in the form of hash
|
248
|
+
def to_hash
|
249
|
+
hash = {}
|
250
|
+
self.class.attribute_map.each_pair do |attr, param|
|
251
|
+
value = self.send(attr)
|
252
|
+
if value.nil?
|
253
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
254
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
255
|
+
end
|
256
|
+
|
257
|
+
hash[param] = _to_hash(value)
|
258
|
+
end
|
259
|
+
hash
|
260
|
+
end
|
261
|
+
|
262
|
+
# Outputs non-array value in the form of hash
|
263
|
+
# For object, use to_hash. Otherwise, just return the value
|
264
|
+
# @param [Object] value Any valid value
|
265
|
+
# @return [Hash] Returns the value in the form of hash
|
266
|
+
def _to_hash(value)
|
267
|
+
if value.is_a?(Array)
|
268
|
+
value.compact.map { |v| _to_hash(v) }
|
269
|
+
elsif value.is_a?(Hash)
|
270
|
+
{}.tap do |hash|
|
271
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
272
|
+
end
|
273
|
+
elsif value.respond_to? :to_hash
|
274
|
+
value.to_hash
|
275
|
+
else
|
276
|
+
value
|
277
|
+
end
|
278
|
+
end end
|
279
|
+
end
|
@@ -0,0 +1,237 @@
|
|
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
|
+
Swagger Codegen version: 3.0.53
|
10
|
+
=end
|
11
|
+
|
12
|
+
require 'date'
|
13
|
+
|
14
|
+
module TurnkeyClient
|
15
|
+
class V1ApiKeyParams
|
16
|
+
# Human-readable name for an API Key.
|
17
|
+
attr_accessor :api_key_name
|
18
|
+
|
19
|
+
# The public component of a cryptographic key pair used to sign messages and transactions.
|
20
|
+
attr_accessor :public_key
|
21
|
+
|
22
|
+
# Optional window (in seconds) indicating how long the API Key should last.
|
23
|
+
attr_accessor :expiration_seconds
|
24
|
+
|
25
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
26
|
+
def self.attribute_map
|
27
|
+
{
|
28
|
+
:'api_key_name' => :'apiKeyName',
|
29
|
+
:'public_key' => :'publicKey',
|
30
|
+
:'expiration_seconds' => :'expirationSeconds'
|
31
|
+
}
|
32
|
+
end
|
33
|
+
|
34
|
+
# Attribute type mapping.
|
35
|
+
def self.openapi_types
|
36
|
+
{
|
37
|
+
:'api_key_name' => :'Object',
|
38
|
+
:'public_key' => :'Object',
|
39
|
+
:'expiration_seconds' => :'Object'
|
40
|
+
}
|
41
|
+
end
|
42
|
+
|
43
|
+
# List of attributes with nullable: true
|
44
|
+
def self.openapi_nullable
|
45
|
+
Set.new([
|
46
|
+
])
|
47
|
+
end
|
48
|
+
|
49
|
+
# Initializes the object
|
50
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
51
|
+
def initialize(attributes = {})
|
52
|
+
if (!attributes.is_a?(Hash))
|
53
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::V1ApiKeyParams` initialize method"
|
54
|
+
end
|
55
|
+
|
56
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
57
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
58
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
59
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::V1ApiKeyParams`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
60
|
+
end
|
61
|
+
h[k.to_sym] = v
|
62
|
+
}
|
63
|
+
|
64
|
+
if attributes.key?(:'api_key_name')
|
65
|
+
self.api_key_name = attributes[:'api_key_name']
|
66
|
+
end
|
67
|
+
|
68
|
+
if attributes.key?(:'public_key')
|
69
|
+
self.public_key = attributes[:'public_key']
|
70
|
+
end
|
71
|
+
|
72
|
+
if attributes.key?(:'expiration_seconds')
|
73
|
+
self.expiration_seconds = attributes[:'expiration_seconds']
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
78
|
+
# @return Array for valid properties with the reasons
|
79
|
+
def list_invalid_properties
|
80
|
+
invalid_properties = Array.new
|
81
|
+
if @api_key_name.nil?
|
82
|
+
invalid_properties.push('invalid value for "api_key_name", api_key_name cannot be nil.')
|
83
|
+
end
|
84
|
+
|
85
|
+
if @public_key.nil?
|
86
|
+
invalid_properties.push('invalid value for "public_key", public_key cannot be nil.')
|
87
|
+
end
|
88
|
+
|
89
|
+
invalid_properties
|
90
|
+
end
|
91
|
+
|
92
|
+
# Check to see if the all the properties in the model are valid
|
93
|
+
# @return true if the model is valid
|
94
|
+
def valid?
|
95
|
+
return false if @api_key_name.nil?
|
96
|
+
return false if @public_key.nil?
|
97
|
+
true
|
98
|
+
end
|
99
|
+
|
100
|
+
# Checks equality by comparing each attribute.
|
101
|
+
# @param [Object] Object to be compared
|
102
|
+
def ==(o)
|
103
|
+
return true if self.equal?(o)
|
104
|
+
self.class == o.class &&
|
105
|
+
api_key_name == o.api_key_name &&
|
106
|
+
public_key == o.public_key &&
|
107
|
+
expiration_seconds == o.expiration_seconds
|
108
|
+
end
|
109
|
+
|
110
|
+
# @see the `==` method
|
111
|
+
# @param [Object] Object to be compared
|
112
|
+
def eql?(o)
|
113
|
+
self == o
|
114
|
+
end
|
115
|
+
|
116
|
+
# Calculates hash code according to all attributes.
|
117
|
+
# @return [Integer] Hash code
|
118
|
+
def hash
|
119
|
+
[api_key_name, public_key, expiration_seconds].hash
|
120
|
+
end
|
121
|
+
|
122
|
+
# Builds the object from hash
|
123
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
124
|
+
# @return [Object] Returns the model itself
|
125
|
+
def self.build_from_hash(attributes)
|
126
|
+
new.build_from_hash(attributes)
|
127
|
+
end
|
128
|
+
|
129
|
+
# Builds the object from hash
|
130
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
131
|
+
# @return [Object] Returns the model itself
|
132
|
+
def build_from_hash(attributes)
|
133
|
+
return nil unless attributes.is_a?(Hash)
|
134
|
+
self.class.openapi_types.each_pair do |key, type|
|
135
|
+
if type =~ /\AArray<(.*)>/i
|
136
|
+
# check to ensure the input is an array given that the attribute
|
137
|
+
# is documented as an array but the input is not
|
138
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
139
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
140
|
+
end
|
141
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
142
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
143
|
+
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
144
|
+
self.send("#{key}=", nil)
|
145
|
+
end
|
146
|
+
end
|
147
|
+
|
148
|
+
self
|
149
|
+
end
|
150
|
+
|
151
|
+
# Deserializes the data based on type
|
152
|
+
# @param string type Data type
|
153
|
+
# @param string value Value to be deserialized
|
154
|
+
# @return [Object] Deserialized data
|
155
|
+
def _deserialize(type, value)
|
156
|
+
case type.to_sym
|
157
|
+
when :DateTime
|
158
|
+
DateTime.parse(value)
|
159
|
+
when :Date
|
160
|
+
Date.parse(value)
|
161
|
+
when :String
|
162
|
+
value.to_s
|
163
|
+
when :Integer
|
164
|
+
value.to_i
|
165
|
+
when :Float
|
166
|
+
value.to_f
|
167
|
+
when :Boolean
|
168
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
169
|
+
true
|
170
|
+
else
|
171
|
+
false
|
172
|
+
end
|
173
|
+
when :Object
|
174
|
+
# generic object (usually a Hash), return directly
|
175
|
+
value
|
176
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
177
|
+
inner_type = Regexp.last_match[:inner_type]
|
178
|
+
value.map { |v| _deserialize(inner_type, v) }
|
179
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
180
|
+
k_type = Regexp.last_match[:k_type]
|
181
|
+
v_type = Regexp.last_match[:v_type]
|
182
|
+
{}.tap do |hash|
|
183
|
+
value.each do |k, v|
|
184
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
185
|
+
end
|
186
|
+
end
|
187
|
+
else # model
|
188
|
+
TurnkeyClient.const_get(type).build_from_hash(value)
|
189
|
+
end
|
190
|
+
end
|
191
|
+
|
192
|
+
# Returns the string representation of the object
|
193
|
+
# @return [String] String presentation of the object
|
194
|
+
def to_s
|
195
|
+
to_hash.to_s
|
196
|
+
end
|
197
|
+
|
198
|
+
# to_body is an alias to to_hash (backward compatibility)
|
199
|
+
# @return [Hash] Returns the object in the form of hash
|
200
|
+
def to_body
|
201
|
+
to_hash
|
202
|
+
end
|
203
|
+
|
204
|
+
# Returns the object in the form of hash
|
205
|
+
# @return [Hash] Returns the object in the form of hash
|
206
|
+
def to_hash
|
207
|
+
hash = {}
|
208
|
+
self.class.attribute_map.each_pair do |attr, param|
|
209
|
+
value = self.send(attr)
|
210
|
+
if value.nil?
|
211
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
212
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
213
|
+
end
|
214
|
+
|
215
|
+
hash[param] = _to_hash(value)
|
216
|
+
end
|
217
|
+
hash
|
218
|
+
end
|
219
|
+
|
220
|
+
# Outputs non-array value in the form of hash
|
221
|
+
# For object, use to_hash. Otherwise, just return the value
|
222
|
+
# @param [Object] value Any valid value
|
223
|
+
# @return [Hash] Returns the value in the form of hash
|
224
|
+
def _to_hash(value)
|
225
|
+
if value.is_a?(Array)
|
226
|
+
value.compact.map { |v| _to_hash(v) }
|
227
|
+
elsif value.is_a?(Hash)
|
228
|
+
{}.tap do |hash|
|
229
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
230
|
+
end
|
231
|
+
elsif value.respond_to? :to_hash
|
232
|
+
value.to_hash
|
233
|
+
else
|
234
|
+
value
|
235
|
+
end
|
236
|
+
end end
|
237
|
+
end
|