From 57775de3b95d55f0f03964b5ef026602c910189a Mon Sep 17 00:00:00 2001 From: Andrew Min Date: Wed, 2 Oct 2024 17:49:55 -0400 Subject: [PATCH] release v2024.9.31 --- api/public_api.swagger.json | 107 +++++- .../client/activities/activities_client.go | 28 +- .../activities/get_activities_responses.go | 7 +- .../activities/get_activity_responses.go | 7 +- pkg/api/client/api_keys/api_keys_client.go | 28 +- .../api_keys/create_api_keys_responses.go | 7 +- .../api_keys/delete_api_keys_responses.go | 7 +- .../client/api_keys/get_api_key_responses.go | 7 +- .../client/api_keys/get_api_keys_responses.go | 7 +- .../authenticators/authenticators_client.go | 28 +- .../create_authenticators_responses.go | 7 +- .../delete_authenticators_responses.go | 7 +- .../get_authenticator_responses.go | 7 +- .../get_authenticators_responses.go | 7 +- .../consensus/approve_activity_responses.go | 7 +- pkg/api/client/consensus/consensus_client.go | 28 +- .../consensus/reject_activity_responses.go | 7 +- pkg/api/client/features/features_client.go | 28 +- .../remove_organization_feature_responses.go | 7 +- .../set_organization_feature_responses.go | 7 +- .../create_invitations_responses.go | 7 +- .../delete_invitation_responses.go | 7 +- .../client/invitations/invitations_client.go | 28 +- .../create_sub_organization_responses.go | 7 +- .../delete_sub_organization_parameters.go | 150 +++++++++ .../delete_sub_organization_responses.go | 106 ++++++ .../get_organization_configs_responses.go | 7 +- .../get_sub_org_ids_responses.go | 7 +- .../organizations/organizations_client.go | 71 +++- .../update_root_quorum_responses.go | 7 +- .../policies/create_policies_responses.go | 7 +- .../policies/create_policy_responses.go | 7 +- .../policies/delete_policy_responses.go | 7 +- .../client/policies/get_policies_responses.go | 7 +- .../client/policies/get_policy_responses.go | 7 +- pkg/api/client/policies/policies_client.go | 28 +- .../policies/update_policy_responses.go | 7 +- .../create_private_key_tag_responses.go | 7 +- .../delete_private_key_tags_responses.go | 7 +- .../list_private_key_tags_responses.go | 7 +- .../private_key_tags_client.go | 28 +- .../update_private_key_tag_responses.go | 7 +- .../create_private_keys_responses.go | 7 +- .../delete_private_keys_responses.go | 7 +- .../export_private_key_responses.go | 7 +- .../private_keys/get_private_key_responses.go | 7 +- .../get_private_keys_responses.go | 7 +- .../import_private_key_responses.go | 7 +- .../init_import_private_key_responses.go | 7 +- .../private_keys/private_keys_client.go | 30 +- .../create_read_only_session_responses.go | 7 +- .../create_read_write_session_responses.go | 7 +- .../client/sessions/get_whoami_responses.go | 7 +- pkg/api/client/sessions/sessions_client.go | 28 +- .../signing/sign_raw_payload_responses.go | 7 +- .../signing/sign_raw_payloads_responses.go | 7 +- .../signing/sign_transaction_responses.go | 7 +- pkg/api/client/signing/signing_client.go | 28 +- .../client/user_auth/email_auth_responses.go | 7 +- pkg/api/client/user_auth/user_auth_client.go | 28 +- .../init_user_email_recovery_responses.go | 7 +- .../user_recovery/recover_user_responses.go | 7 +- .../user_recovery/user_recovery_client.go | 28 +- .../user_tags/create_user_tag_responses.go | 7 +- .../user_tags/delete_user_tags_responses.go | 7 +- .../user_tags/list_user_tags_responses.go | 7 +- .../user_tags/update_user_tag_responses.go | 7 +- pkg/api/client/user_tags/user_tags_client.go | 28 +- .../users/create_oauth_providers_responses.go | 7 +- .../client/users/create_users_responses.go | 7 +- .../users/delete_oauth_providers_responses.go | 7 +- .../client/users/delete_users_responses.go | 7 +- .../users/get_oauth_providers_responses.go | 7 +- pkg/api/client/users/get_user_responses.go | 7 +- pkg/api/client/users/get_users_responses.go | 7 +- pkg/api/client/users/oauth_responses.go | 7 +- pkg/api/client/users/update_user_responses.go | 7 +- pkg/api/client/users/users_client.go | 28 +- .../create_wallet_accounts_responses.go | 7 +- .../client/wallets/create_wallet_responses.go | 7 +- .../wallets/delete_wallets_responses.go | 7 +- .../export_wallet_account_responses.go | 7 +- .../client/wallets/export_wallet_responses.go | 7 +- .../wallets/get_wallet_accounts_responses.go | 7 +- .../client/wallets/get_wallet_responses.go | 7 +- .../client/wallets/get_wallets_responses.go | 7 +- .../client/wallets/import_wallet_responses.go | 7 +- .../wallets/init_import_wallet_responses.go | 7 +- pkg/api/client/wallets/wallets_client.go | 30 +- pkg/api/models/access_type.go | 12 +- pkg/api/models/activity_status.go | 24 +- pkg/api/models/activity_type.go | 305 +++++++++--------- pkg/api/models/address_format.go | 92 +++++- pkg/api/models/any.go | 77 +++++ pkg/api/models/api_key_curve.go | 12 +- pkg/api/models/approve_activity_request.go | 2 +- .../authenticator_attestation_response.go | 2 +- pkg/api/models/authenticator_transport.go | 20 +- pkg/api/models/create_api_keys_request.go | 2 +- .../models/create_authenticators_request.go | 2 +- pkg/api/models/create_invitations_request.go | 2 +- .../models/create_oauth_providers_request.go | 2 +- pkg/api/models/create_policies_request.go | 2 +- pkg/api/models/create_policy_request.go | 2 +- .../models/create_private_key_tag_request.go | 2 +- pkg/api/models/create_private_keys_request.go | 2 +- .../create_read_only_session_request.go | 2 +- .../create_read_write_session_intent_v2.go | 16 +- .../create_read_write_session_request.go | 2 +- .../models/create_sub_organization_request.go | 2 +- pkg/api/models/create_user_tag_request.go | 2 +- pkg/api/models/create_users_request.go | 2 +- .../models/create_wallet_accounts_request.go | 2 +- pkg/api/models/create_wallet_request.go | 2 +- pkg/api/models/credential_type.go | 24 +- pkg/api/models/curve.go | 8 +- pkg/api/models/delete_api_keys_request.go | 2 +- .../models/delete_authenticators_request.go | 2 +- pkg/api/models/delete_invitation_request.go | 2 +- .../models/delete_oauth_providers_request.go | 2 +- pkg/api/models/delete_policy_request.go | 2 +- .../models/delete_private_key_tags_request.go | 2 +- pkg/api/models/delete_private_keys_request.go | 2 +- .../models/delete_sub_organization_intent.go | 50 +++ .../models/delete_sub_organization_request.go | 192 +++++++++++ .../models/delete_sub_organization_result.go | 71 ++++ pkg/api/models/delete_user_tags_request.go | 2 +- pkg/api/models/delete_users_request.go | 2 +- pkg/api/models/delete_wallets_request.go | 2 +- pkg/api/models/effect.go | 8 +- pkg/api/models/email_auth_request.go | 2 +- pkg/api/models/export_private_key_request.go | 2 +- .../models/export_wallet_account_request.go | 2 +- pkg/api/models/export_wallet_request.go | 2 +- pkg/api/models/feature_name.go | 20 +- pkg/api/models/hash_function.go | 16 +- pkg/api/models/import_private_key_request.go | 2 +- pkg/api/models/import_wallet_request.go | 2 +- .../models/init_import_private_key_request.go | 2 +- pkg/api/models/init_import_wallet_request.go | 2 +- .../init_user_email_recovery_request.go | 2 +- pkg/api/models/intent.go | 51 +++ pkg/api/models/mnemonic_language.go | 36 +-- pkg/api/models/oauth_request.go | 2 +- pkg/api/models/operator.go | 44 +-- pkg/api/models/path_format.go | 4 +- pkg/api/models/payload_encoding.go | 8 +- .../public_key_credential_with_attestation.go | 4 +- pkg/api/models/recover_user_request.go | 2 +- pkg/api/models/reject_activity_request.go | 2 +- .../remove_organization_feature_request.go | 2 +- pkg/api/models/result.go | 51 +++ .../set_organization_feature_request.go | 2 +- pkg/api/models/sign_raw_payload_request.go | 2 +- pkg/api/models/sign_raw_payloads_request.go | 2 +- pkg/api/models/sign_transaction_request.go | 2 +- pkg/api/models/tag_type.go | 8 +- pkg/api/models/transaction_type.go | 9 +- pkg/api/models/update_policy_request.go | 2 +- .../models/update_private_key_tag_request.go | 2 +- pkg/api/models/update_root_quorum_request.go | 2 +- pkg/api/models/update_user_request.go | 2 +- pkg/api/models/update_user_tag_request.go | 2 +- pkg/api/models/vote.go | 2 +- 164 files changed, 2112 insertions(+), 519 deletions(-) create mode 100644 pkg/api/client/organizations/delete_sub_organization_parameters.go create mode 100644 pkg/api/client/organizations/delete_sub_organization_responses.go create mode 100644 pkg/api/models/delete_sub_organization_intent.go create mode 100644 pkg/api/models/delete_sub_organization_request.go create mode 100644 pkg/api/models/delete_sub_organization_result.go diff --git a/api/public_api.swagger.json b/api/public_api.swagger.json index f9fae8f..019eb65 100644 --- a/api/public_api.swagger.json +++ b/api/public_api.swagger.json @@ -1185,7 +1185,7 @@ }, "/public/v1/submit/delete_private_keys": { "post": { - "summary": "Delete organization private keys", + "summary": "Delete Private Keys", "description": "Deletes private keys for an organization", "operationId": "DeletePrivateKeys", "responses": { @@ -1209,6 +1209,32 @@ "tags": ["Private Keys"] } }, + "/public/v1/submit/delete_sub_organization": { + "post": { + "summary": "Delete Sub Organization", + "description": "Deletes a sub organization", + "operationId": "DeleteSubOrganization", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/ActivityResponse" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/DeleteSubOrganizationRequest" + } + } + ], + "tags": ["Organizations"] + } + }, "/public/v1/submit/delete_user_tags": { "post": { "summary": "Delete User Tags", @@ -1263,7 +1289,7 @@ }, "/public/v1/submit/delete_wallets": { "post": { - "summary": "Delete organization wallets", + "summary": "Delete Wallets", "description": "Deletes wallets for an organization", "operationId": "DeleteWallets", "responses": { @@ -2104,7 +2130,8 @@ "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V6", "ACTIVITY_TYPE_DELETE_PRIVATE_KEYS", "ACTIVITY_TYPE_DELETE_WALLETS", - "ACTIVITY_TYPE_CREATE_READ_WRITE_SESSION_V2" + "ACTIVITY_TYPE_CREATE_READ_WRITE_SESSION_V2", + "ACTIVITY_TYPE_DELETE_SUB_ORGANIZATION" ] }, "AddressFormat": { @@ -2115,7 +2142,29 @@ "ADDRESS_FORMAT_ETHEREUM", "ADDRESS_FORMAT_SOLANA", "ADDRESS_FORMAT_COSMOS", - "ADDRESS_FORMAT_TRON" + "ADDRESS_FORMAT_TRON", + "ADDRESS_FORMAT_SUI", + "ADDRESS_FORMAT_APTOS", + "ADDRESS_FORMAT_BITCOIN_MAINNET_P2PKH", + "ADDRESS_FORMAT_BITCOIN_MAINNET_P2SH", + "ADDRESS_FORMAT_BITCOIN_MAINNET_P2WPKH", + "ADDRESS_FORMAT_BITCOIN_MAINNET_P2WSH", + "ADDRESS_FORMAT_BITCOIN_MAINNET_P2TR", + "ADDRESS_FORMAT_BITCOIN_TESTNET_P2PKH", + "ADDRESS_FORMAT_BITCOIN_TESTNET_P2SH", + "ADDRESS_FORMAT_BITCOIN_TESTNET_P2WPKH", + "ADDRESS_FORMAT_BITCOIN_TESTNET_P2WSH", + "ADDRESS_FORMAT_BITCOIN_TESTNET_P2TR", + "ADDRESS_FORMAT_BITCOIN_SIGNET_P2PKH", + "ADDRESS_FORMAT_BITCOIN_SIGNET_P2SH", + "ADDRESS_FORMAT_BITCOIN_SIGNET_P2WPKH", + "ADDRESS_FORMAT_BITCOIN_SIGNET_P2WSH", + "ADDRESS_FORMAT_BITCOIN_SIGNET_P2TR", + "ADDRESS_FORMAT_BITCOIN_REGTEST_P2PKH", + "ADDRESS_FORMAT_BITCOIN_REGTEST_P2SH", + "ADDRESS_FORMAT_BITCOIN_REGTEST_P2WPKH", + "ADDRESS_FORMAT_BITCOIN_REGTEST_P2WSH", + "ADDRESS_FORMAT_BITCOIN_REGTEST_P2TR" ] }, "Any": { @@ -3154,7 +3203,7 @@ "description": "Expiration window (in seconds) indicating how long the API key is valid. If not provided, a default of 15 minutes will be used." } }, - "required": ["targetPublicKey", "userId"] + "required": ["targetPublicKey"] }, "CreateReadWriteSessionRequest": { "type": "object", @@ -4176,6 +4225,46 @@ }, "required": ["privateKeyIds"] }, + "DeleteSubOrganizationIntent": { + "type": "object", + "properties": { + "deleteWithoutExport": { + "type": "boolean", + "description": "Sub-organization deletion, by default, requires associated wallets and private keys to be exported for security reasons. Set this boolean to true to force sub-organization deletion even if some wallets or private keys within it have not been exported yet. Default: false." + } + } + }, + "DeleteSubOrganizationRequest": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["ACTIVITY_TYPE_DELETE_SUB_ORGANIZATION"] + }, + "timestampMs": { + "type": "string", + "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." + }, + "organizationId": { + "type": "string", + "description": "Unique identifier for a given Organization." + }, + "parameters": { + "$ref": "#/definitions/DeleteSubOrganizationIntent" + } + }, + "required": ["type", "timestampMs", "organizationId", "parameters"] + }, + "DeleteSubOrganizationResult": { + "type": "object", + "properties": { + "subOrganizationUuid": { + "type": "string", + "description": "Unique identifier of the sub organization that was removed" + } + }, + "required": ["subOrganizationUuid"] + }, "DeleteUserTagsIntent": { "type": "object", "properties": { @@ -5652,6 +5741,9 @@ }, "createReadWriteSessionIntentV2": { "$ref": "#/definitions/CreateReadWriteSessionIntentV2" + }, + "deleteSubOrganizationIntent": { + "$ref": "#/definitions/DeleteSubOrganizationIntent" } } }, @@ -6399,6 +6491,9 @@ }, "createReadWriteSessionResultV2": { "$ref": "#/definitions/CreateReadWriteSessionResultV2" + }, + "deleteSubOrganizationResult": { + "$ref": "#/definitions/DeleteSubOrganizationResult" } } }, @@ -6905,7 +7000,7 @@ }, "TransactionType": { "type": "string", - "enum": ["TRANSACTION_TYPE_ETHEREUM"] + "enum": ["TRANSACTION_TYPE_ETHEREUM", "TRANSACTION_TYPE_SOLANA"] }, "UpdateAllowedOriginsIntent": { "type": "object", diff --git a/pkg/api/client/activities/activities_client.go b/pkg/api/client/activities/activities_client.go index 68c023a..cc30529 100644 --- a/pkg/api/client/activities/activities_client.go +++ b/pkg/api/client/activities/activities_client.go @@ -9,6 +9,7 @@ import ( "fmt" "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" ) @@ -17,6 +18,31 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientServi return &Client{transport: transport, formats: formats} } +// New creates a new activities API client with basic auth credentials. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - user: user for basic authentication header. +// - password: password for basic authentication header. +func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BasicAuth(user, password) + return &Client{transport: transport, formats: strfmt.Default} +} + +// New creates a new activities API client with a bearer token for authentication. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - bearerToken: bearer token for Bearer authentication header. +func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) + return &Client{transport: transport, formats: strfmt.Default} +} + /* Client for activities API */ @@ -25,7 +51,7 @@ type Client struct { formats strfmt.Registry } -// ClientOption is the option for Client methods +// ClientOption may be used to customize the behavior of Client methods. type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods diff --git a/pkg/api/client/activities/get_activities_responses.go b/pkg/api/client/activities/get_activities_responses.go index 181f26f..f3778cb 100644 --- a/pkg/api/client/activities/get_activities_responses.go +++ b/pkg/api/client/activities/get_activities_responses.go @@ -6,6 +6,7 @@ package activities // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -79,11 +80,13 @@ func (o *GetActivitiesOK) Code() int { } func (o *GetActivitiesOK) Error() string { - return fmt.Sprintf("[POST /public/v1/query/list_activities][%d] getActivitiesOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/query/list_activities][%d] getActivitiesOK %s", 200, payload) } func (o *GetActivitiesOK) String() string { - return fmt.Sprintf("[POST /public/v1/query/list_activities][%d] getActivitiesOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/query/list_activities][%d] getActivitiesOK %s", 200, payload) } func (o *GetActivitiesOK) GetPayload() *models.GetActivitiesResponse { diff --git a/pkg/api/client/activities/get_activity_responses.go b/pkg/api/client/activities/get_activity_responses.go index f5e7ac9..8f50443 100644 --- a/pkg/api/client/activities/get_activity_responses.go +++ b/pkg/api/client/activities/get_activity_responses.go @@ -6,6 +6,7 @@ package activities // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -79,11 +80,13 @@ func (o *GetActivityOK) Code() int { } func (o *GetActivityOK) Error() string { - return fmt.Sprintf("[POST /public/v1/query/get_activity][%d] getActivityOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/query/get_activity][%d] getActivityOK %s", 200, payload) } func (o *GetActivityOK) String() string { - return fmt.Sprintf("[POST /public/v1/query/get_activity][%d] getActivityOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/query/get_activity][%d] getActivityOK %s", 200, payload) } func (o *GetActivityOK) GetPayload() *models.ActivityResponse { diff --git a/pkg/api/client/api_keys/api_keys_client.go b/pkg/api/client/api_keys/api_keys_client.go index 543c8c0..b9ced6a 100644 --- a/pkg/api/client/api_keys/api_keys_client.go +++ b/pkg/api/client/api_keys/api_keys_client.go @@ -9,6 +9,7 @@ import ( "fmt" "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" ) @@ -17,6 +18,31 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientServi return &Client{transport: transport, formats: formats} } +// New creates a new api keys API client with basic auth credentials. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - user: user for basic authentication header. +// - password: password for basic authentication header. +func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BasicAuth(user, password) + return &Client{transport: transport, formats: strfmt.Default} +} + +// New creates a new api keys API client with a bearer token for authentication. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - bearerToken: bearer token for Bearer authentication header. +func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) + return &Client{transport: transport, formats: strfmt.Default} +} + /* Client for api keys API */ @@ -25,7 +51,7 @@ type Client struct { formats strfmt.Registry } -// ClientOption is the option for Client methods +// ClientOption may be used to customize the behavior of Client methods. type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods diff --git a/pkg/api/client/api_keys/create_api_keys_responses.go b/pkg/api/client/api_keys/create_api_keys_responses.go index 1568d72..5530480 100644 --- a/pkg/api/client/api_keys/create_api_keys_responses.go +++ b/pkg/api/client/api_keys/create_api_keys_responses.go @@ -6,6 +6,7 @@ package api_keys // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -79,11 +80,13 @@ func (o *CreateAPIKeysOK) Code() int { } func (o *CreateAPIKeysOK) Error() string { - return fmt.Sprintf("[POST /public/v1/submit/create_api_keys][%d] createApiKeysOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/create_api_keys][%d] createApiKeysOK %s", 200, payload) } func (o *CreateAPIKeysOK) String() string { - return fmt.Sprintf("[POST /public/v1/submit/create_api_keys][%d] createApiKeysOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/create_api_keys][%d] createApiKeysOK %s", 200, payload) } func (o *CreateAPIKeysOK) GetPayload() *models.ActivityResponse { diff --git a/pkg/api/client/api_keys/delete_api_keys_responses.go b/pkg/api/client/api_keys/delete_api_keys_responses.go index 532dcfc..c6f6c14 100644 --- a/pkg/api/client/api_keys/delete_api_keys_responses.go +++ b/pkg/api/client/api_keys/delete_api_keys_responses.go @@ -6,6 +6,7 @@ package api_keys // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -79,11 +80,13 @@ func (o *DeleteAPIKeysOK) Code() int { } func (o *DeleteAPIKeysOK) Error() string { - return fmt.Sprintf("[POST /public/v1/submit/delete_api_keys][%d] deleteApiKeysOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/delete_api_keys][%d] deleteApiKeysOK %s", 200, payload) } func (o *DeleteAPIKeysOK) String() string { - return fmt.Sprintf("[POST /public/v1/submit/delete_api_keys][%d] deleteApiKeysOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/delete_api_keys][%d] deleteApiKeysOK %s", 200, payload) } func (o *DeleteAPIKeysOK) GetPayload() *models.ActivityResponse { diff --git a/pkg/api/client/api_keys/get_api_key_responses.go b/pkg/api/client/api_keys/get_api_key_responses.go index cd3e5b1..051d058 100644 --- a/pkg/api/client/api_keys/get_api_key_responses.go +++ b/pkg/api/client/api_keys/get_api_key_responses.go @@ -6,6 +6,7 @@ package api_keys // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -79,11 +80,13 @@ func (o *GetAPIKeyOK) Code() int { } func (o *GetAPIKeyOK) Error() string { - return fmt.Sprintf("[POST /public/v1/query/get_api_key][%d] getApiKeyOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/query/get_api_key][%d] getApiKeyOK %s", 200, payload) } func (o *GetAPIKeyOK) String() string { - return fmt.Sprintf("[POST /public/v1/query/get_api_key][%d] getApiKeyOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/query/get_api_key][%d] getApiKeyOK %s", 200, payload) } func (o *GetAPIKeyOK) GetPayload() *models.GetAPIKeyResponse { diff --git a/pkg/api/client/api_keys/get_api_keys_responses.go b/pkg/api/client/api_keys/get_api_keys_responses.go index 5ae76c6..6bff502 100644 --- a/pkg/api/client/api_keys/get_api_keys_responses.go +++ b/pkg/api/client/api_keys/get_api_keys_responses.go @@ -6,6 +6,7 @@ package api_keys // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -79,11 +80,13 @@ func (o *GetAPIKeysOK) Code() int { } func (o *GetAPIKeysOK) Error() string { - return fmt.Sprintf("[POST /public/v1/query/get_api_keys][%d] getApiKeysOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/query/get_api_keys][%d] getApiKeysOK %s", 200, payload) } func (o *GetAPIKeysOK) String() string { - return fmt.Sprintf("[POST /public/v1/query/get_api_keys][%d] getApiKeysOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/query/get_api_keys][%d] getApiKeysOK %s", 200, payload) } func (o *GetAPIKeysOK) GetPayload() *models.GetAPIKeysResponse { diff --git a/pkg/api/client/authenticators/authenticators_client.go b/pkg/api/client/authenticators/authenticators_client.go index 4d9df79..5bbb8b2 100644 --- a/pkg/api/client/authenticators/authenticators_client.go +++ b/pkg/api/client/authenticators/authenticators_client.go @@ -9,6 +9,7 @@ import ( "fmt" "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" ) @@ -17,6 +18,31 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientServi return &Client{transport: transport, formats: formats} } +// New creates a new authenticators API client with basic auth credentials. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - user: user for basic authentication header. +// - password: password for basic authentication header. +func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BasicAuth(user, password) + return &Client{transport: transport, formats: strfmt.Default} +} + +// New creates a new authenticators API client with a bearer token for authentication. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - bearerToken: bearer token for Bearer authentication header. +func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) + return &Client{transport: transport, formats: strfmt.Default} +} + /* Client for authenticators API */ @@ -25,7 +51,7 @@ type Client struct { formats strfmt.Registry } -// ClientOption is the option for Client methods +// ClientOption may be used to customize the behavior of Client methods. type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods diff --git a/pkg/api/client/authenticators/create_authenticators_responses.go b/pkg/api/client/authenticators/create_authenticators_responses.go index 67e48e1..1e5d30c 100644 --- a/pkg/api/client/authenticators/create_authenticators_responses.go +++ b/pkg/api/client/authenticators/create_authenticators_responses.go @@ -6,6 +6,7 @@ package authenticators // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -79,11 +80,13 @@ func (o *CreateAuthenticatorsOK) Code() int { } func (o *CreateAuthenticatorsOK) Error() string { - return fmt.Sprintf("[POST /public/v1/submit/create_authenticators][%d] createAuthenticatorsOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/create_authenticators][%d] createAuthenticatorsOK %s", 200, payload) } func (o *CreateAuthenticatorsOK) String() string { - return fmt.Sprintf("[POST /public/v1/submit/create_authenticators][%d] createAuthenticatorsOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/create_authenticators][%d] createAuthenticatorsOK %s", 200, payload) } func (o *CreateAuthenticatorsOK) GetPayload() *models.ActivityResponse { diff --git a/pkg/api/client/authenticators/delete_authenticators_responses.go b/pkg/api/client/authenticators/delete_authenticators_responses.go index 8643496..db63f99 100644 --- a/pkg/api/client/authenticators/delete_authenticators_responses.go +++ b/pkg/api/client/authenticators/delete_authenticators_responses.go @@ -6,6 +6,7 @@ package authenticators // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -79,11 +80,13 @@ func (o *DeleteAuthenticatorsOK) Code() int { } func (o *DeleteAuthenticatorsOK) Error() string { - return fmt.Sprintf("[POST /public/v1/submit/delete_authenticators][%d] deleteAuthenticatorsOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/delete_authenticators][%d] deleteAuthenticatorsOK %s", 200, payload) } func (o *DeleteAuthenticatorsOK) String() string { - return fmt.Sprintf("[POST /public/v1/submit/delete_authenticators][%d] deleteAuthenticatorsOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/delete_authenticators][%d] deleteAuthenticatorsOK %s", 200, payload) } func (o *DeleteAuthenticatorsOK) GetPayload() *models.ActivityResponse { diff --git a/pkg/api/client/authenticators/get_authenticator_responses.go b/pkg/api/client/authenticators/get_authenticator_responses.go index 6f30ca4..d3dc20f 100644 --- a/pkg/api/client/authenticators/get_authenticator_responses.go +++ b/pkg/api/client/authenticators/get_authenticator_responses.go @@ -6,6 +6,7 @@ package authenticators // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -79,11 +80,13 @@ func (o *GetAuthenticatorOK) Code() int { } func (o *GetAuthenticatorOK) Error() string { - return fmt.Sprintf("[POST /public/v1/query/get_authenticator][%d] getAuthenticatorOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/query/get_authenticator][%d] getAuthenticatorOK %s", 200, payload) } func (o *GetAuthenticatorOK) String() string { - return fmt.Sprintf("[POST /public/v1/query/get_authenticator][%d] getAuthenticatorOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/query/get_authenticator][%d] getAuthenticatorOK %s", 200, payload) } func (o *GetAuthenticatorOK) GetPayload() *models.GetAuthenticatorResponse { diff --git a/pkg/api/client/authenticators/get_authenticators_responses.go b/pkg/api/client/authenticators/get_authenticators_responses.go index 11208b8..2edf892 100644 --- a/pkg/api/client/authenticators/get_authenticators_responses.go +++ b/pkg/api/client/authenticators/get_authenticators_responses.go @@ -6,6 +6,7 @@ package authenticators // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -79,11 +80,13 @@ func (o *GetAuthenticatorsOK) Code() int { } func (o *GetAuthenticatorsOK) Error() string { - return fmt.Sprintf("[POST /public/v1/query/get_authenticators][%d] getAuthenticatorsOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/query/get_authenticators][%d] getAuthenticatorsOK %s", 200, payload) } func (o *GetAuthenticatorsOK) String() string { - return fmt.Sprintf("[POST /public/v1/query/get_authenticators][%d] getAuthenticatorsOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/query/get_authenticators][%d] getAuthenticatorsOK %s", 200, payload) } func (o *GetAuthenticatorsOK) GetPayload() *models.GetAuthenticatorsResponse { diff --git a/pkg/api/client/consensus/approve_activity_responses.go b/pkg/api/client/consensus/approve_activity_responses.go index d99a799..e5566dd 100644 --- a/pkg/api/client/consensus/approve_activity_responses.go +++ b/pkg/api/client/consensus/approve_activity_responses.go @@ -6,6 +6,7 @@ package consensus // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -79,11 +80,13 @@ func (o *ApproveActivityOK) Code() int { } func (o *ApproveActivityOK) Error() string { - return fmt.Sprintf("[POST /public/v1/submit/approve_activity][%d] approveActivityOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/approve_activity][%d] approveActivityOK %s", 200, payload) } func (o *ApproveActivityOK) String() string { - return fmt.Sprintf("[POST /public/v1/submit/approve_activity][%d] approveActivityOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/approve_activity][%d] approveActivityOK %s", 200, payload) } func (o *ApproveActivityOK) GetPayload() *models.ActivityResponse { diff --git a/pkg/api/client/consensus/consensus_client.go b/pkg/api/client/consensus/consensus_client.go index 9fa35a6..6778b11 100644 --- a/pkg/api/client/consensus/consensus_client.go +++ b/pkg/api/client/consensus/consensus_client.go @@ -9,6 +9,7 @@ import ( "fmt" "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" ) @@ -17,6 +18,31 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientServi return &Client{transport: transport, formats: formats} } +// New creates a new consensus API client with basic auth credentials. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - user: user for basic authentication header. +// - password: password for basic authentication header. +func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BasicAuth(user, password) + return &Client{transport: transport, formats: strfmt.Default} +} + +// New creates a new consensus API client with a bearer token for authentication. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - bearerToken: bearer token for Bearer authentication header. +func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) + return &Client{transport: transport, formats: strfmt.Default} +} + /* Client for consensus API */ @@ -25,7 +51,7 @@ type Client struct { formats strfmt.Registry } -// ClientOption is the option for Client methods +// ClientOption may be used to customize the behavior of Client methods. type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods diff --git a/pkg/api/client/consensus/reject_activity_responses.go b/pkg/api/client/consensus/reject_activity_responses.go index 3302e44..ec198e9 100644 --- a/pkg/api/client/consensus/reject_activity_responses.go +++ b/pkg/api/client/consensus/reject_activity_responses.go @@ -6,6 +6,7 @@ package consensus // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -79,11 +80,13 @@ func (o *RejectActivityOK) Code() int { } func (o *RejectActivityOK) Error() string { - return fmt.Sprintf("[POST /public/v1/submit/reject_activity][%d] rejectActivityOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/reject_activity][%d] rejectActivityOK %s", 200, payload) } func (o *RejectActivityOK) String() string { - return fmt.Sprintf("[POST /public/v1/submit/reject_activity][%d] rejectActivityOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/reject_activity][%d] rejectActivityOK %s", 200, payload) } func (o *RejectActivityOK) GetPayload() *models.ActivityResponse { diff --git a/pkg/api/client/features/features_client.go b/pkg/api/client/features/features_client.go index c734cec..370d554 100644 --- a/pkg/api/client/features/features_client.go +++ b/pkg/api/client/features/features_client.go @@ -9,6 +9,7 @@ import ( "fmt" "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" ) @@ -17,6 +18,31 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientServi return &Client{transport: transport, formats: formats} } +// New creates a new features API client with basic auth credentials. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - user: user for basic authentication header. +// - password: password for basic authentication header. +func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BasicAuth(user, password) + return &Client{transport: transport, formats: strfmt.Default} +} + +// New creates a new features API client with a bearer token for authentication. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - bearerToken: bearer token for Bearer authentication header. +func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) + return &Client{transport: transport, formats: strfmt.Default} +} + /* Client for features API */ @@ -25,7 +51,7 @@ type Client struct { formats strfmt.Registry } -// ClientOption is the option for Client methods +// ClientOption may be used to customize the behavior of Client methods. type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods diff --git a/pkg/api/client/features/remove_organization_feature_responses.go b/pkg/api/client/features/remove_organization_feature_responses.go index bb176ae..08aa193 100644 --- a/pkg/api/client/features/remove_organization_feature_responses.go +++ b/pkg/api/client/features/remove_organization_feature_responses.go @@ -6,6 +6,7 @@ package features // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -79,11 +80,13 @@ func (o *RemoveOrganizationFeatureOK) Code() int { } func (o *RemoveOrganizationFeatureOK) Error() string { - return fmt.Sprintf("[POST /public/v1/submit/remove_organization_feature][%d] removeOrganizationFeatureOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/remove_organization_feature][%d] removeOrganizationFeatureOK %s", 200, payload) } func (o *RemoveOrganizationFeatureOK) String() string { - return fmt.Sprintf("[POST /public/v1/submit/remove_organization_feature][%d] removeOrganizationFeatureOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/remove_organization_feature][%d] removeOrganizationFeatureOK %s", 200, payload) } func (o *RemoveOrganizationFeatureOK) GetPayload() *models.ActivityResponse { diff --git a/pkg/api/client/features/set_organization_feature_responses.go b/pkg/api/client/features/set_organization_feature_responses.go index 59f16ff..ca9511e 100644 --- a/pkg/api/client/features/set_organization_feature_responses.go +++ b/pkg/api/client/features/set_organization_feature_responses.go @@ -6,6 +6,7 @@ package features // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -79,11 +80,13 @@ func (o *SetOrganizationFeatureOK) Code() int { } func (o *SetOrganizationFeatureOK) Error() string { - return fmt.Sprintf("[POST /public/v1/submit/set_organization_feature][%d] setOrganizationFeatureOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/set_organization_feature][%d] setOrganizationFeatureOK %s", 200, payload) } func (o *SetOrganizationFeatureOK) String() string { - return fmt.Sprintf("[POST /public/v1/submit/set_organization_feature][%d] setOrganizationFeatureOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/set_organization_feature][%d] setOrganizationFeatureOK %s", 200, payload) } func (o *SetOrganizationFeatureOK) GetPayload() *models.ActivityResponse { diff --git a/pkg/api/client/invitations/create_invitations_responses.go b/pkg/api/client/invitations/create_invitations_responses.go index f3eb4d3..7584325 100644 --- a/pkg/api/client/invitations/create_invitations_responses.go +++ b/pkg/api/client/invitations/create_invitations_responses.go @@ -6,6 +6,7 @@ package invitations // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -79,11 +80,13 @@ func (o *CreateInvitationsOK) Code() int { } func (o *CreateInvitationsOK) Error() string { - return fmt.Sprintf("[POST /public/v1/submit/create_invitations][%d] createInvitationsOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/create_invitations][%d] createInvitationsOK %s", 200, payload) } func (o *CreateInvitationsOK) String() string { - return fmt.Sprintf("[POST /public/v1/submit/create_invitations][%d] createInvitationsOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/create_invitations][%d] createInvitationsOK %s", 200, payload) } func (o *CreateInvitationsOK) GetPayload() *models.ActivityResponse { diff --git a/pkg/api/client/invitations/delete_invitation_responses.go b/pkg/api/client/invitations/delete_invitation_responses.go index 3568ca8..0a8fb47 100644 --- a/pkg/api/client/invitations/delete_invitation_responses.go +++ b/pkg/api/client/invitations/delete_invitation_responses.go @@ -6,6 +6,7 @@ package invitations // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -79,11 +80,13 @@ func (o *DeleteInvitationOK) Code() int { } func (o *DeleteInvitationOK) Error() string { - return fmt.Sprintf("[POST /public/v1/submit/delete_invitation][%d] deleteInvitationOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/delete_invitation][%d] deleteInvitationOK %s", 200, payload) } func (o *DeleteInvitationOK) String() string { - return fmt.Sprintf("[POST /public/v1/submit/delete_invitation][%d] deleteInvitationOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/delete_invitation][%d] deleteInvitationOK %s", 200, payload) } func (o *DeleteInvitationOK) GetPayload() *models.ActivityResponse { diff --git a/pkg/api/client/invitations/invitations_client.go b/pkg/api/client/invitations/invitations_client.go index 25c39b1..d13e277 100644 --- a/pkg/api/client/invitations/invitations_client.go +++ b/pkg/api/client/invitations/invitations_client.go @@ -9,6 +9,7 @@ import ( "fmt" "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" ) @@ -17,6 +18,31 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientServi return &Client{transport: transport, formats: formats} } +// New creates a new invitations API client with basic auth credentials. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - user: user for basic authentication header. +// - password: password for basic authentication header. +func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BasicAuth(user, password) + return &Client{transport: transport, formats: strfmt.Default} +} + +// New creates a new invitations API client with a bearer token for authentication. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - bearerToken: bearer token for Bearer authentication header. +func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) + return &Client{transport: transport, formats: strfmt.Default} +} + /* Client for invitations API */ @@ -25,7 +51,7 @@ type Client struct { formats strfmt.Registry } -// ClientOption is the option for Client methods +// ClientOption may be used to customize the behavior of Client methods. type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods diff --git a/pkg/api/client/organizations/create_sub_organization_responses.go b/pkg/api/client/organizations/create_sub_organization_responses.go index 3f9ac5c..eeb6649 100644 --- a/pkg/api/client/organizations/create_sub_organization_responses.go +++ b/pkg/api/client/organizations/create_sub_organization_responses.go @@ -6,6 +6,7 @@ package organizations // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -79,11 +80,13 @@ func (o *CreateSubOrganizationOK) Code() int { } func (o *CreateSubOrganizationOK) Error() string { - return fmt.Sprintf("[POST /public/v1/submit/create_sub_organization][%d] createSubOrganizationOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/create_sub_organization][%d] createSubOrganizationOK %s", 200, payload) } func (o *CreateSubOrganizationOK) String() string { - return fmt.Sprintf("[POST /public/v1/submit/create_sub_organization][%d] createSubOrganizationOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/create_sub_organization][%d] createSubOrganizationOK %s", 200, payload) } func (o *CreateSubOrganizationOK) GetPayload() *models.ActivityResponse { diff --git a/pkg/api/client/organizations/delete_sub_organization_parameters.go b/pkg/api/client/organizations/delete_sub_organization_parameters.go new file mode 100644 index 0000000..8a9c762 --- /dev/null +++ b/pkg/api/client/organizations/delete_sub_organization_parameters.go @@ -0,0 +1,150 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package organizations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/tkhq/go-sdk/pkg/api/models" +) + +// NewDeleteSubOrganizationParams creates a new DeleteSubOrganizationParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewDeleteSubOrganizationParams() *DeleteSubOrganizationParams { + return &DeleteSubOrganizationParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewDeleteSubOrganizationParamsWithTimeout creates a new DeleteSubOrganizationParams object +// with the ability to set a timeout on a request. +func NewDeleteSubOrganizationParamsWithTimeout(timeout time.Duration) *DeleteSubOrganizationParams { + return &DeleteSubOrganizationParams{ + timeout: timeout, + } +} + +// NewDeleteSubOrganizationParamsWithContext creates a new DeleteSubOrganizationParams object +// with the ability to set a context for a request. +func NewDeleteSubOrganizationParamsWithContext(ctx context.Context) *DeleteSubOrganizationParams { + return &DeleteSubOrganizationParams{ + Context: ctx, + } +} + +// NewDeleteSubOrganizationParamsWithHTTPClient creates a new DeleteSubOrganizationParams object +// with the ability to set a custom HTTPClient for a request. +func NewDeleteSubOrganizationParamsWithHTTPClient(client *http.Client) *DeleteSubOrganizationParams { + return &DeleteSubOrganizationParams{ + HTTPClient: client, + } +} + +/* +DeleteSubOrganizationParams contains all the parameters to send to the API endpoint + + for the delete sub organization operation. + + Typically these are written to a http.Request. +*/ +type DeleteSubOrganizationParams struct { + + // Body. + Body *models.DeleteSubOrganizationRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the delete sub organization params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DeleteSubOrganizationParams) WithDefaults() *DeleteSubOrganizationParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the delete sub organization params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DeleteSubOrganizationParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the delete sub organization params +func (o *DeleteSubOrganizationParams) WithTimeout(timeout time.Duration) *DeleteSubOrganizationParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the delete sub organization params +func (o *DeleteSubOrganizationParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the delete sub organization params +func (o *DeleteSubOrganizationParams) WithContext(ctx context.Context) *DeleteSubOrganizationParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the delete sub organization params +func (o *DeleteSubOrganizationParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the delete sub organization params +func (o *DeleteSubOrganizationParams) WithHTTPClient(client *http.Client) *DeleteSubOrganizationParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the delete sub organization params +func (o *DeleteSubOrganizationParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the delete sub organization params +func (o *DeleteSubOrganizationParams) WithBody(body *models.DeleteSubOrganizationRequest) *DeleteSubOrganizationParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the delete sub organization params +func (o *DeleteSubOrganizationParams) SetBody(body *models.DeleteSubOrganizationRequest) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *DeleteSubOrganizationParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/api/client/organizations/delete_sub_organization_responses.go b/pkg/api/client/organizations/delete_sub_organization_responses.go new file mode 100644 index 0000000..d7f915e --- /dev/null +++ b/pkg/api/client/organizations/delete_sub_organization_responses.go @@ -0,0 +1,106 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package organizations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/tkhq/go-sdk/pkg/api/models" +) + +// DeleteSubOrganizationReader is a Reader for the DeleteSubOrganization structure. +type DeleteSubOrganizationReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DeleteSubOrganizationReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewDeleteSubOrganizationOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("[POST /public/v1/submit/delete_sub_organization] DeleteSubOrganization", response, response.Code()) + } +} + +// NewDeleteSubOrganizationOK creates a DeleteSubOrganizationOK with default headers values +func NewDeleteSubOrganizationOK() *DeleteSubOrganizationOK { + return &DeleteSubOrganizationOK{} +} + +/* +DeleteSubOrganizationOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type DeleteSubOrganizationOK struct { + Payload *models.ActivityResponse +} + +// IsSuccess returns true when this delete sub organization o k response has a 2xx status code +func (o *DeleteSubOrganizationOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this delete sub organization o k response has a 3xx status code +func (o *DeleteSubOrganizationOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this delete sub organization o k response has a 4xx status code +func (o *DeleteSubOrganizationOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this delete sub organization o k response has a 5xx status code +func (o *DeleteSubOrganizationOK) IsServerError() bool { + return false +} + +// IsCode returns true when this delete sub organization o k response a status code equal to that given +func (o *DeleteSubOrganizationOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the delete sub organization o k response +func (o *DeleteSubOrganizationOK) Code() int { + return 200 +} + +func (o *DeleteSubOrganizationOK) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/delete_sub_organization][%d] deleteSubOrganizationOK %s", 200, payload) +} + +func (o *DeleteSubOrganizationOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/delete_sub_organization][%d] deleteSubOrganizationOK %s", 200, payload) +} + +func (o *DeleteSubOrganizationOK) GetPayload() *models.ActivityResponse { + return o.Payload +} + +func (o *DeleteSubOrganizationOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ActivityResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/pkg/api/client/organizations/get_organization_configs_responses.go b/pkg/api/client/organizations/get_organization_configs_responses.go index caa8bd6..80d6763 100644 --- a/pkg/api/client/organizations/get_organization_configs_responses.go +++ b/pkg/api/client/organizations/get_organization_configs_responses.go @@ -6,6 +6,7 @@ package organizations // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -79,11 +80,13 @@ func (o *GetOrganizationConfigsOK) Code() int { } func (o *GetOrganizationConfigsOK) Error() string { - return fmt.Sprintf("[POST /public/v1/query/get_organization_configs][%d] getOrganizationConfigsOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/query/get_organization_configs][%d] getOrganizationConfigsOK %s", 200, payload) } func (o *GetOrganizationConfigsOK) String() string { - return fmt.Sprintf("[POST /public/v1/query/get_organization_configs][%d] getOrganizationConfigsOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/query/get_organization_configs][%d] getOrganizationConfigsOK %s", 200, payload) } func (o *GetOrganizationConfigsOK) GetPayload() *models.GetOrganizationConfigsResponse { diff --git a/pkg/api/client/organizations/get_sub_org_ids_responses.go b/pkg/api/client/organizations/get_sub_org_ids_responses.go index 8398613..8c0294b 100644 --- a/pkg/api/client/organizations/get_sub_org_ids_responses.go +++ b/pkg/api/client/organizations/get_sub_org_ids_responses.go @@ -6,6 +6,7 @@ package organizations // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -79,11 +80,13 @@ func (o *GetSubOrgIdsOK) Code() int { } func (o *GetSubOrgIdsOK) Error() string { - return fmt.Sprintf("[POST /public/v1/query/list_suborgs][%d] getSubOrgIdsOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/query/list_suborgs][%d] getSubOrgIdsOK %s", 200, payload) } func (o *GetSubOrgIdsOK) String() string { - return fmt.Sprintf("[POST /public/v1/query/list_suborgs][%d] getSubOrgIdsOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/query/list_suborgs][%d] getSubOrgIdsOK %s", 200, payload) } func (o *GetSubOrgIdsOK) GetPayload() *models.GetSubOrgIdsResponse { diff --git a/pkg/api/client/organizations/organizations_client.go b/pkg/api/client/organizations/organizations_client.go index 4f8cec6..dc2d25d 100644 --- a/pkg/api/client/organizations/organizations_client.go +++ b/pkg/api/client/organizations/organizations_client.go @@ -9,6 +9,7 @@ import ( "fmt" "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" ) @@ -17,6 +18,31 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientServi return &Client{transport: transport, formats: formats} } +// New creates a new organizations API client with basic auth credentials. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - user: user for basic authentication header. +// - password: password for basic authentication header. +func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BasicAuth(user, password) + return &Client{transport: transport, formats: strfmt.Default} +} + +// New creates a new organizations API client with a bearer token for authentication. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - bearerToken: bearer token for Bearer authentication header. +func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) + return &Client{transport: transport, formats: strfmt.Default} +} + /* Client for organizations API */ @@ -25,13 +51,15 @@ type Client struct { formats strfmt.Registry } -// ClientOption is the option for Client methods +// ClientOption may be used to customize the behavior of Client methods. type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods type ClientService interface { CreateSubOrganization(params *CreateSubOrganizationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateSubOrganizationOK, error) + DeleteSubOrganization(params *DeleteSubOrganizationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteSubOrganizationOK, error) + GetOrganizationConfigs(params *GetOrganizationConfigsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetOrganizationConfigsOK, error) GetSubOrgIds(params *GetSubOrgIdsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetSubOrgIdsOK, error) @@ -82,6 +110,47 @@ func (a *Client) CreateSubOrganization(params *CreateSubOrganizationParams, auth panic(msg) } +/* +DeleteSubOrganization deletes sub organization + +Deletes a sub organization +*/ +func (a *Client) DeleteSubOrganization(params *DeleteSubOrganizationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteSubOrganizationOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDeleteSubOrganizationParams() + } + op := &runtime.ClientOperation{ + ID: "DeleteSubOrganization", + Method: "POST", + PathPattern: "/public/v1/submit/delete_sub_organization", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &DeleteSubOrganizationReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*DeleteSubOrganizationOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for DeleteSubOrganization: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + /* GetOrganizationConfigs gets configs diff --git a/pkg/api/client/organizations/update_root_quorum_responses.go b/pkg/api/client/organizations/update_root_quorum_responses.go index 696a738..6cf7051 100644 --- a/pkg/api/client/organizations/update_root_quorum_responses.go +++ b/pkg/api/client/organizations/update_root_quorum_responses.go @@ -6,6 +6,7 @@ package organizations // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -79,11 +80,13 @@ func (o *UpdateRootQuorumOK) Code() int { } func (o *UpdateRootQuorumOK) Error() string { - return fmt.Sprintf("[POST /public/v1/submit/update_root_quorum][%d] updateRootQuorumOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/update_root_quorum][%d] updateRootQuorumOK %s", 200, payload) } func (o *UpdateRootQuorumOK) String() string { - return fmt.Sprintf("[POST /public/v1/submit/update_root_quorum][%d] updateRootQuorumOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/update_root_quorum][%d] updateRootQuorumOK %s", 200, payload) } func (o *UpdateRootQuorumOK) GetPayload() *models.ActivityResponse { diff --git a/pkg/api/client/policies/create_policies_responses.go b/pkg/api/client/policies/create_policies_responses.go index e9f89dd..7dda377 100644 --- a/pkg/api/client/policies/create_policies_responses.go +++ b/pkg/api/client/policies/create_policies_responses.go @@ -6,6 +6,7 @@ package policies // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -79,11 +80,13 @@ func (o *CreatePoliciesOK) Code() int { } func (o *CreatePoliciesOK) Error() string { - return fmt.Sprintf("[POST /public/v1/submit/create_policies][%d] createPoliciesOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/create_policies][%d] createPoliciesOK %s", 200, payload) } func (o *CreatePoliciesOK) String() string { - return fmt.Sprintf("[POST /public/v1/submit/create_policies][%d] createPoliciesOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/create_policies][%d] createPoliciesOK %s", 200, payload) } func (o *CreatePoliciesOK) GetPayload() *models.ActivityResponse { diff --git a/pkg/api/client/policies/create_policy_responses.go b/pkg/api/client/policies/create_policy_responses.go index d52a4a3..08ebdcd 100644 --- a/pkg/api/client/policies/create_policy_responses.go +++ b/pkg/api/client/policies/create_policy_responses.go @@ -6,6 +6,7 @@ package policies // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -79,11 +80,13 @@ func (o *CreatePolicyOK) Code() int { } func (o *CreatePolicyOK) Error() string { - return fmt.Sprintf("[POST /public/v1/submit/create_policy][%d] createPolicyOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/create_policy][%d] createPolicyOK %s", 200, payload) } func (o *CreatePolicyOK) String() string { - return fmt.Sprintf("[POST /public/v1/submit/create_policy][%d] createPolicyOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/create_policy][%d] createPolicyOK %s", 200, payload) } func (o *CreatePolicyOK) GetPayload() *models.ActivityResponse { diff --git a/pkg/api/client/policies/delete_policy_responses.go b/pkg/api/client/policies/delete_policy_responses.go index c61de19..83c2c3c 100644 --- a/pkg/api/client/policies/delete_policy_responses.go +++ b/pkg/api/client/policies/delete_policy_responses.go @@ -6,6 +6,7 @@ package policies // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -79,11 +80,13 @@ func (o *DeletePolicyOK) Code() int { } func (o *DeletePolicyOK) Error() string { - return fmt.Sprintf("[POST /public/v1/submit/delete_policy][%d] deletePolicyOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/delete_policy][%d] deletePolicyOK %s", 200, payload) } func (o *DeletePolicyOK) String() string { - return fmt.Sprintf("[POST /public/v1/submit/delete_policy][%d] deletePolicyOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/delete_policy][%d] deletePolicyOK %s", 200, payload) } func (o *DeletePolicyOK) GetPayload() *models.ActivityResponse { diff --git a/pkg/api/client/policies/get_policies_responses.go b/pkg/api/client/policies/get_policies_responses.go index bfbcef9..8a0c7bb 100644 --- a/pkg/api/client/policies/get_policies_responses.go +++ b/pkg/api/client/policies/get_policies_responses.go @@ -6,6 +6,7 @@ package policies // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -79,11 +80,13 @@ func (o *GetPoliciesOK) Code() int { } func (o *GetPoliciesOK) Error() string { - return fmt.Sprintf("[POST /public/v1/query/list_policies][%d] getPoliciesOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/query/list_policies][%d] getPoliciesOK %s", 200, payload) } func (o *GetPoliciesOK) String() string { - return fmt.Sprintf("[POST /public/v1/query/list_policies][%d] getPoliciesOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/query/list_policies][%d] getPoliciesOK %s", 200, payload) } func (o *GetPoliciesOK) GetPayload() *models.GetPoliciesResponse { diff --git a/pkg/api/client/policies/get_policy_responses.go b/pkg/api/client/policies/get_policy_responses.go index aa1be99..a41cbc8 100644 --- a/pkg/api/client/policies/get_policy_responses.go +++ b/pkg/api/client/policies/get_policy_responses.go @@ -6,6 +6,7 @@ package policies // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -79,11 +80,13 @@ func (o *GetPolicyOK) Code() int { } func (o *GetPolicyOK) Error() string { - return fmt.Sprintf("[POST /public/v1/query/get_policy][%d] getPolicyOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/query/get_policy][%d] getPolicyOK %s", 200, payload) } func (o *GetPolicyOK) String() string { - return fmt.Sprintf("[POST /public/v1/query/get_policy][%d] getPolicyOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/query/get_policy][%d] getPolicyOK %s", 200, payload) } func (o *GetPolicyOK) GetPayload() *models.GetPolicyResponse { diff --git a/pkg/api/client/policies/policies_client.go b/pkg/api/client/policies/policies_client.go index be16156..26e4562 100644 --- a/pkg/api/client/policies/policies_client.go +++ b/pkg/api/client/policies/policies_client.go @@ -9,6 +9,7 @@ import ( "fmt" "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" ) @@ -17,6 +18,31 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientServi return &Client{transport: transport, formats: formats} } +// New creates a new policies API client with basic auth credentials. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - user: user for basic authentication header. +// - password: password for basic authentication header. +func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BasicAuth(user, password) + return &Client{transport: transport, formats: strfmt.Default} +} + +// New creates a new policies API client with a bearer token for authentication. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - bearerToken: bearer token for Bearer authentication header. +func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) + return &Client{transport: transport, formats: strfmt.Default} +} + /* Client for policies API */ @@ -25,7 +51,7 @@ type Client struct { formats strfmt.Registry } -// ClientOption is the option for Client methods +// ClientOption may be used to customize the behavior of Client methods. type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods diff --git a/pkg/api/client/policies/update_policy_responses.go b/pkg/api/client/policies/update_policy_responses.go index 448f76e..cbab8fa 100644 --- a/pkg/api/client/policies/update_policy_responses.go +++ b/pkg/api/client/policies/update_policy_responses.go @@ -6,6 +6,7 @@ package policies // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -79,11 +80,13 @@ func (o *UpdatePolicyOK) Code() int { } func (o *UpdatePolicyOK) Error() string { - return fmt.Sprintf("[POST /public/v1/submit/update_policy][%d] updatePolicyOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/update_policy][%d] updatePolicyOK %s", 200, payload) } func (o *UpdatePolicyOK) String() string { - return fmt.Sprintf("[POST /public/v1/submit/update_policy][%d] updatePolicyOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/update_policy][%d] updatePolicyOK %s", 200, payload) } func (o *UpdatePolicyOK) GetPayload() *models.ActivityResponse { diff --git a/pkg/api/client/private_key_tags/create_private_key_tag_responses.go b/pkg/api/client/private_key_tags/create_private_key_tag_responses.go index a286216..32c8e31 100644 --- a/pkg/api/client/private_key_tags/create_private_key_tag_responses.go +++ b/pkg/api/client/private_key_tags/create_private_key_tag_responses.go @@ -6,6 +6,7 @@ package private_key_tags // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -79,11 +80,13 @@ func (o *CreatePrivateKeyTagOK) Code() int { } func (o *CreatePrivateKeyTagOK) Error() string { - return fmt.Sprintf("[POST /public/v1/submit/create_private_key_tag][%d] createPrivateKeyTagOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/create_private_key_tag][%d] createPrivateKeyTagOK %s", 200, payload) } func (o *CreatePrivateKeyTagOK) String() string { - return fmt.Sprintf("[POST /public/v1/submit/create_private_key_tag][%d] createPrivateKeyTagOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/create_private_key_tag][%d] createPrivateKeyTagOK %s", 200, payload) } func (o *CreatePrivateKeyTagOK) GetPayload() *models.ActivityResponse { diff --git a/pkg/api/client/private_key_tags/delete_private_key_tags_responses.go b/pkg/api/client/private_key_tags/delete_private_key_tags_responses.go index a234de7..a32822d 100644 --- a/pkg/api/client/private_key_tags/delete_private_key_tags_responses.go +++ b/pkg/api/client/private_key_tags/delete_private_key_tags_responses.go @@ -6,6 +6,7 @@ package private_key_tags // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -79,11 +80,13 @@ func (o *DeletePrivateKeyTagsOK) Code() int { } func (o *DeletePrivateKeyTagsOK) Error() string { - return fmt.Sprintf("[POST /public/v1/submit/delete_private_key_tags][%d] deletePrivateKeyTagsOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/delete_private_key_tags][%d] deletePrivateKeyTagsOK %s", 200, payload) } func (o *DeletePrivateKeyTagsOK) String() string { - return fmt.Sprintf("[POST /public/v1/submit/delete_private_key_tags][%d] deletePrivateKeyTagsOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/delete_private_key_tags][%d] deletePrivateKeyTagsOK %s", 200, payload) } func (o *DeletePrivateKeyTagsOK) GetPayload() *models.ActivityResponse { diff --git a/pkg/api/client/private_key_tags/list_private_key_tags_responses.go b/pkg/api/client/private_key_tags/list_private_key_tags_responses.go index 631d690..715fd02 100644 --- a/pkg/api/client/private_key_tags/list_private_key_tags_responses.go +++ b/pkg/api/client/private_key_tags/list_private_key_tags_responses.go @@ -6,6 +6,7 @@ package private_key_tags // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -79,11 +80,13 @@ func (o *ListPrivateKeyTagsOK) Code() int { } func (o *ListPrivateKeyTagsOK) Error() string { - return fmt.Sprintf("[POST /public/v1/query/list_private_key_tags][%d] listPrivateKeyTagsOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/query/list_private_key_tags][%d] listPrivateKeyTagsOK %s", 200, payload) } func (o *ListPrivateKeyTagsOK) String() string { - return fmt.Sprintf("[POST /public/v1/query/list_private_key_tags][%d] listPrivateKeyTagsOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/query/list_private_key_tags][%d] listPrivateKeyTagsOK %s", 200, payload) } func (o *ListPrivateKeyTagsOK) GetPayload() *models.ListPrivateKeyTagsResponse { diff --git a/pkg/api/client/private_key_tags/private_key_tags_client.go b/pkg/api/client/private_key_tags/private_key_tags_client.go index bc38b4f..382c2a1 100644 --- a/pkg/api/client/private_key_tags/private_key_tags_client.go +++ b/pkg/api/client/private_key_tags/private_key_tags_client.go @@ -9,6 +9,7 @@ import ( "fmt" "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" ) @@ -17,6 +18,31 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientServi return &Client{transport: transport, formats: formats} } +// New creates a new private key tags API client with basic auth credentials. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - user: user for basic authentication header. +// - password: password for basic authentication header. +func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BasicAuth(user, password) + return &Client{transport: transport, formats: strfmt.Default} +} + +// New creates a new private key tags API client with a bearer token for authentication. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - bearerToken: bearer token for Bearer authentication header. +func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) + return &Client{transport: transport, formats: strfmt.Default} +} + /* Client for private key tags API */ @@ -25,7 +51,7 @@ type Client struct { formats strfmt.Registry } -// ClientOption is the option for Client methods +// ClientOption may be used to customize the behavior of Client methods. type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods diff --git a/pkg/api/client/private_key_tags/update_private_key_tag_responses.go b/pkg/api/client/private_key_tags/update_private_key_tag_responses.go index 037b117..4433ca1 100644 --- a/pkg/api/client/private_key_tags/update_private_key_tag_responses.go +++ b/pkg/api/client/private_key_tags/update_private_key_tag_responses.go @@ -6,6 +6,7 @@ package private_key_tags // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -79,11 +80,13 @@ func (o *UpdatePrivateKeyTagOK) Code() int { } func (o *UpdatePrivateKeyTagOK) Error() string { - return fmt.Sprintf("[POST /public/v1/submit/update_private_key_tag][%d] updatePrivateKeyTagOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/update_private_key_tag][%d] updatePrivateKeyTagOK %s", 200, payload) } func (o *UpdatePrivateKeyTagOK) String() string { - return fmt.Sprintf("[POST /public/v1/submit/update_private_key_tag][%d] updatePrivateKeyTagOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/update_private_key_tag][%d] updatePrivateKeyTagOK %s", 200, payload) } func (o *UpdatePrivateKeyTagOK) GetPayload() *models.ActivityResponse { diff --git a/pkg/api/client/private_keys/create_private_keys_responses.go b/pkg/api/client/private_keys/create_private_keys_responses.go index 6639837..1ee4703 100644 --- a/pkg/api/client/private_keys/create_private_keys_responses.go +++ b/pkg/api/client/private_keys/create_private_keys_responses.go @@ -6,6 +6,7 @@ package private_keys // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -79,11 +80,13 @@ func (o *CreatePrivateKeysOK) Code() int { } func (o *CreatePrivateKeysOK) Error() string { - return fmt.Sprintf("[POST /public/v1/submit/create_private_keys][%d] createPrivateKeysOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/create_private_keys][%d] createPrivateKeysOK %s", 200, payload) } func (o *CreatePrivateKeysOK) String() string { - return fmt.Sprintf("[POST /public/v1/submit/create_private_keys][%d] createPrivateKeysOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/create_private_keys][%d] createPrivateKeysOK %s", 200, payload) } func (o *CreatePrivateKeysOK) GetPayload() *models.ActivityResponse { diff --git a/pkg/api/client/private_keys/delete_private_keys_responses.go b/pkg/api/client/private_keys/delete_private_keys_responses.go index 687de94..4d6a6a2 100644 --- a/pkg/api/client/private_keys/delete_private_keys_responses.go +++ b/pkg/api/client/private_keys/delete_private_keys_responses.go @@ -6,6 +6,7 @@ package private_keys // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -79,11 +80,13 @@ func (o *DeletePrivateKeysOK) Code() int { } func (o *DeletePrivateKeysOK) Error() string { - return fmt.Sprintf("[POST /public/v1/submit/delete_private_keys][%d] deletePrivateKeysOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/delete_private_keys][%d] deletePrivateKeysOK %s", 200, payload) } func (o *DeletePrivateKeysOK) String() string { - return fmt.Sprintf("[POST /public/v1/submit/delete_private_keys][%d] deletePrivateKeysOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/delete_private_keys][%d] deletePrivateKeysOK %s", 200, payload) } func (o *DeletePrivateKeysOK) GetPayload() *models.ActivityResponse { diff --git a/pkg/api/client/private_keys/export_private_key_responses.go b/pkg/api/client/private_keys/export_private_key_responses.go index 345f8db..1ab4e44 100644 --- a/pkg/api/client/private_keys/export_private_key_responses.go +++ b/pkg/api/client/private_keys/export_private_key_responses.go @@ -6,6 +6,7 @@ package private_keys // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -79,11 +80,13 @@ func (o *ExportPrivateKeyOK) Code() int { } func (o *ExportPrivateKeyOK) Error() string { - return fmt.Sprintf("[POST /public/v1/submit/export_private_key][%d] exportPrivateKeyOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/export_private_key][%d] exportPrivateKeyOK %s", 200, payload) } func (o *ExportPrivateKeyOK) String() string { - return fmt.Sprintf("[POST /public/v1/submit/export_private_key][%d] exportPrivateKeyOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/export_private_key][%d] exportPrivateKeyOK %s", 200, payload) } func (o *ExportPrivateKeyOK) GetPayload() *models.ActivityResponse { diff --git a/pkg/api/client/private_keys/get_private_key_responses.go b/pkg/api/client/private_keys/get_private_key_responses.go index 296ed01..e00c3d7 100644 --- a/pkg/api/client/private_keys/get_private_key_responses.go +++ b/pkg/api/client/private_keys/get_private_key_responses.go @@ -6,6 +6,7 @@ package private_keys // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -79,11 +80,13 @@ func (o *GetPrivateKeyOK) Code() int { } func (o *GetPrivateKeyOK) Error() string { - return fmt.Sprintf("[POST /public/v1/query/get_private_key][%d] getPrivateKeyOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/query/get_private_key][%d] getPrivateKeyOK %s", 200, payload) } func (o *GetPrivateKeyOK) String() string { - return fmt.Sprintf("[POST /public/v1/query/get_private_key][%d] getPrivateKeyOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/query/get_private_key][%d] getPrivateKeyOK %s", 200, payload) } func (o *GetPrivateKeyOK) GetPayload() *models.GetPrivateKeyResponse { diff --git a/pkg/api/client/private_keys/get_private_keys_responses.go b/pkg/api/client/private_keys/get_private_keys_responses.go index 08abe53..dec8361 100644 --- a/pkg/api/client/private_keys/get_private_keys_responses.go +++ b/pkg/api/client/private_keys/get_private_keys_responses.go @@ -6,6 +6,7 @@ package private_keys // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -79,11 +80,13 @@ func (o *GetPrivateKeysOK) Code() int { } func (o *GetPrivateKeysOK) Error() string { - return fmt.Sprintf("[POST /public/v1/query/list_private_keys][%d] getPrivateKeysOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/query/list_private_keys][%d] getPrivateKeysOK %s", 200, payload) } func (o *GetPrivateKeysOK) String() string { - return fmt.Sprintf("[POST /public/v1/query/list_private_keys][%d] getPrivateKeysOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/query/list_private_keys][%d] getPrivateKeysOK %s", 200, payload) } func (o *GetPrivateKeysOK) GetPayload() *models.GetPrivateKeysResponse { diff --git a/pkg/api/client/private_keys/import_private_key_responses.go b/pkg/api/client/private_keys/import_private_key_responses.go index 4d545b6..af3a3c2 100644 --- a/pkg/api/client/private_keys/import_private_key_responses.go +++ b/pkg/api/client/private_keys/import_private_key_responses.go @@ -6,6 +6,7 @@ package private_keys // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -79,11 +80,13 @@ func (o *ImportPrivateKeyOK) Code() int { } func (o *ImportPrivateKeyOK) Error() string { - return fmt.Sprintf("[POST /public/v1/submit/import_private_key][%d] importPrivateKeyOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/import_private_key][%d] importPrivateKeyOK %s", 200, payload) } func (o *ImportPrivateKeyOK) String() string { - return fmt.Sprintf("[POST /public/v1/submit/import_private_key][%d] importPrivateKeyOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/import_private_key][%d] importPrivateKeyOK %s", 200, payload) } func (o *ImportPrivateKeyOK) GetPayload() *models.ActivityResponse { diff --git a/pkg/api/client/private_keys/init_import_private_key_responses.go b/pkg/api/client/private_keys/init_import_private_key_responses.go index 00c46ab..0bd84f5 100644 --- a/pkg/api/client/private_keys/init_import_private_key_responses.go +++ b/pkg/api/client/private_keys/init_import_private_key_responses.go @@ -6,6 +6,7 @@ package private_keys // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -79,11 +80,13 @@ func (o *InitImportPrivateKeyOK) Code() int { } func (o *InitImportPrivateKeyOK) Error() string { - return fmt.Sprintf("[POST /public/v1/submit/init_import_private_key][%d] initImportPrivateKeyOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/init_import_private_key][%d] initImportPrivateKeyOK %s", 200, payload) } func (o *InitImportPrivateKeyOK) String() string { - return fmt.Sprintf("[POST /public/v1/submit/init_import_private_key][%d] initImportPrivateKeyOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/init_import_private_key][%d] initImportPrivateKeyOK %s", 200, payload) } func (o *InitImportPrivateKeyOK) GetPayload() *models.ActivityResponse { diff --git a/pkg/api/client/private_keys/private_keys_client.go b/pkg/api/client/private_keys/private_keys_client.go index 6b9a121..b3d7eb2 100644 --- a/pkg/api/client/private_keys/private_keys_client.go +++ b/pkg/api/client/private_keys/private_keys_client.go @@ -9,6 +9,7 @@ import ( "fmt" "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" ) @@ -17,6 +18,31 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientServi return &Client{transport: transport, formats: formats} } +// New creates a new private keys API client with basic auth credentials. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - user: user for basic authentication header. +// - password: password for basic authentication header. +func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BasicAuth(user, password) + return &Client{transport: transport, formats: strfmt.Default} +} + +// New creates a new private keys API client with a bearer token for authentication. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - bearerToken: bearer token for Bearer authentication header. +func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) + return &Client{transport: transport, formats: strfmt.Default} +} + /* Client for private keys API */ @@ -25,7 +51,7 @@ type Client struct { formats strfmt.Registry } -// ClientOption is the option for Client methods +// ClientOption may be used to customize the behavior of Client methods. type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods @@ -89,7 +115,7 @@ func (a *Client) CreatePrivateKeys(params *CreatePrivateKeysParams, authInfo run } /* -DeletePrivateKeys deletes organization private keys +DeletePrivateKeys deletes private keys Deletes private keys for an organization */ diff --git a/pkg/api/client/sessions/create_read_only_session_responses.go b/pkg/api/client/sessions/create_read_only_session_responses.go index a5c86f2..171ae08 100644 --- a/pkg/api/client/sessions/create_read_only_session_responses.go +++ b/pkg/api/client/sessions/create_read_only_session_responses.go @@ -6,6 +6,7 @@ package sessions // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -79,11 +80,13 @@ func (o *CreateReadOnlySessionOK) Code() int { } func (o *CreateReadOnlySessionOK) Error() string { - return fmt.Sprintf("[POST /public/v1/submit/create_read_only_session][%d] createReadOnlySessionOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/create_read_only_session][%d] createReadOnlySessionOK %s", 200, payload) } func (o *CreateReadOnlySessionOK) String() string { - return fmt.Sprintf("[POST /public/v1/submit/create_read_only_session][%d] createReadOnlySessionOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/create_read_only_session][%d] createReadOnlySessionOK %s", 200, payload) } func (o *CreateReadOnlySessionOK) GetPayload() *models.ActivityResponse { diff --git a/pkg/api/client/sessions/create_read_write_session_responses.go b/pkg/api/client/sessions/create_read_write_session_responses.go index 756a0bb..ca243a2 100644 --- a/pkg/api/client/sessions/create_read_write_session_responses.go +++ b/pkg/api/client/sessions/create_read_write_session_responses.go @@ -6,6 +6,7 @@ package sessions // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -79,11 +80,13 @@ func (o *CreateReadWriteSessionOK) Code() int { } func (o *CreateReadWriteSessionOK) Error() string { - return fmt.Sprintf("[POST /public/v1/submit/create_read_write_session][%d] createReadWriteSessionOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/create_read_write_session][%d] createReadWriteSessionOK %s", 200, payload) } func (o *CreateReadWriteSessionOK) String() string { - return fmt.Sprintf("[POST /public/v1/submit/create_read_write_session][%d] createReadWriteSessionOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/create_read_write_session][%d] createReadWriteSessionOK %s", 200, payload) } func (o *CreateReadWriteSessionOK) GetPayload() *models.ActivityResponse { diff --git a/pkg/api/client/sessions/get_whoami_responses.go b/pkg/api/client/sessions/get_whoami_responses.go index 8a324b3..dee7eb7 100644 --- a/pkg/api/client/sessions/get_whoami_responses.go +++ b/pkg/api/client/sessions/get_whoami_responses.go @@ -6,6 +6,7 @@ package sessions // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -79,11 +80,13 @@ func (o *GetWhoamiOK) Code() int { } func (o *GetWhoamiOK) Error() string { - return fmt.Sprintf("[POST /public/v1/query/whoami][%d] getWhoamiOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/query/whoami][%d] getWhoamiOK %s", 200, payload) } func (o *GetWhoamiOK) String() string { - return fmt.Sprintf("[POST /public/v1/query/whoami][%d] getWhoamiOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/query/whoami][%d] getWhoamiOK %s", 200, payload) } func (o *GetWhoamiOK) GetPayload() *models.GetWhoamiResponse { diff --git a/pkg/api/client/sessions/sessions_client.go b/pkg/api/client/sessions/sessions_client.go index fcd5888..48825a2 100644 --- a/pkg/api/client/sessions/sessions_client.go +++ b/pkg/api/client/sessions/sessions_client.go @@ -9,6 +9,7 @@ import ( "fmt" "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" ) @@ -17,6 +18,31 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientServi return &Client{transport: transport, formats: formats} } +// New creates a new sessions API client with basic auth credentials. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - user: user for basic authentication header. +// - password: password for basic authentication header. +func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BasicAuth(user, password) + return &Client{transport: transport, formats: strfmt.Default} +} + +// New creates a new sessions API client with a bearer token for authentication. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - bearerToken: bearer token for Bearer authentication header. +func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) + return &Client{transport: transport, formats: strfmt.Default} +} + /* Client for sessions API */ @@ -25,7 +51,7 @@ type Client struct { formats strfmt.Registry } -// ClientOption is the option for Client methods +// ClientOption may be used to customize the behavior of Client methods. type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods diff --git a/pkg/api/client/signing/sign_raw_payload_responses.go b/pkg/api/client/signing/sign_raw_payload_responses.go index 2c13118..587df56 100644 --- a/pkg/api/client/signing/sign_raw_payload_responses.go +++ b/pkg/api/client/signing/sign_raw_payload_responses.go @@ -6,6 +6,7 @@ package signing // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -79,11 +80,13 @@ func (o *SignRawPayloadOK) Code() int { } func (o *SignRawPayloadOK) Error() string { - return fmt.Sprintf("[POST /public/v1/submit/sign_raw_payload][%d] signRawPayloadOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/sign_raw_payload][%d] signRawPayloadOK %s", 200, payload) } func (o *SignRawPayloadOK) String() string { - return fmt.Sprintf("[POST /public/v1/submit/sign_raw_payload][%d] signRawPayloadOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/sign_raw_payload][%d] signRawPayloadOK %s", 200, payload) } func (o *SignRawPayloadOK) GetPayload() *models.ActivityResponse { diff --git a/pkg/api/client/signing/sign_raw_payloads_responses.go b/pkg/api/client/signing/sign_raw_payloads_responses.go index 4b8b7af..14822da 100644 --- a/pkg/api/client/signing/sign_raw_payloads_responses.go +++ b/pkg/api/client/signing/sign_raw_payloads_responses.go @@ -6,6 +6,7 @@ package signing // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -79,11 +80,13 @@ func (o *SignRawPayloadsOK) Code() int { } func (o *SignRawPayloadsOK) Error() string { - return fmt.Sprintf("[POST /public/v1/submit/sign_raw_payloads][%d] signRawPayloadsOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/sign_raw_payloads][%d] signRawPayloadsOK %s", 200, payload) } func (o *SignRawPayloadsOK) String() string { - return fmt.Sprintf("[POST /public/v1/submit/sign_raw_payloads][%d] signRawPayloadsOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/sign_raw_payloads][%d] signRawPayloadsOK %s", 200, payload) } func (o *SignRawPayloadsOK) GetPayload() *models.ActivityResponse { diff --git a/pkg/api/client/signing/sign_transaction_responses.go b/pkg/api/client/signing/sign_transaction_responses.go index 210f545..f9d5ff0 100644 --- a/pkg/api/client/signing/sign_transaction_responses.go +++ b/pkg/api/client/signing/sign_transaction_responses.go @@ -6,6 +6,7 @@ package signing // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -79,11 +80,13 @@ func (o *SignTransactionOK) Code() int { } func (o *SignTransactionOK) Error() string { - return fmt.Sprintf("[POST /public/v1/submit/sign_transaction][%d] signTransactionOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/sign_transaction][%d] signTransactionOK %s", 200, payload) } func (o *SignTransactionOK) String() string { - return fmt.Sprintf("[POST /public/v1/submit/sign_transaction][%d] signTransactionOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/sign_transaction][%d] signTransactionOK %s", 200, payload) } func (o *SignTransactionOK) GetPayload() *models.ActivityResponse { diff --git a/pkg/api/client/signing/signing_client.go b/pkg/api/client/signing/signing_client.go index df2b642..bf7632a 100644 --- a/pkg/api/client/signing/signing_client.go +++ b/pkg/api/client/signing/signing_client.go @@ -9,6 +9,7 @@ import ( "fmt" "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" ) @@ -17,6 +18,31 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientServi return &Client{transport: transport, formats: formats} } +// New creates a new signing API client with basic auth credentials. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - user: user for basic authentication header. +// - password: password for basic authentication header. +func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BasicAuth(user, password) + return &Client{transport: transport, formats: strfmt.Default} +} + +// New creates a new signing API client with a bearer token for authentication. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - bearerToken: bearer token for Bearer authentication header. +func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) + return &Client{transport: transport, formats: strfmt.Default} +} + /* Client for signing API */ @@ -25,7 +51,7 @@ type Client struct { formats strfmt.Registry } -// ClientOption is the option for Client methods +// ClientOption may be used to customize the behavior of Client methods. type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods diff --git a/pkg/api/client/user_auth/email_auth_responses.go b/pkg/api/client/user_auth/email_auth_responses.go index b0124ad..0733103 100644 --- a/pkg/api/client/user_auth/email_auth_responses.go +++ b/pkg/api/client/user_auth/email_auth_responses.go @@ -6,6 +6,7 @@ package user_auth // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -79,11 +80,13 @@ func (o *EmailAuthOK) Code() int { } func (o *EmailAuthOK) Error() string { - return fmt.Sprintf("[POST /public/v1/submit/email_auth][%d] emailAuthOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/email_auth][%d] emailAuthOK %s", 200, payload) } func (o *EmailAuthOK) String() string { - return fmt.Sprintf("[POST /public/v1/submit/email_auth][%d] emailAuthOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/email_auth][%d] emailAuthOK %s", 200, payload) } func (o *EmailAuthOK) GetPayload() *models.ActivityResponse { diff --git a/pkg/api/client/user_auth/user_auth_client.go b/pkg/api/client/user_auth/user_auth_client.go index 02ada63..c53560e 100644 --- a/pkg/api/client/user_auth/user_auth_client.go +++ b/pkg/api/client/user_auth/user_auth_client.go @@ -9,6 +9,7 @@ import ( "fmt" "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" ) @@ -17,6 +18,31 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientServi return &Client{transport: transport, formats: formats} } +// New creates a new user auth API client with basic auth credentials. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - user: user for basic authentication header. +// - password: password for basic authentication header. +func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BasicAuth(user, password) + return &Client{transport: transport, formats: strfmt.Default} +} + +// New creates a new user auth API client with a bearer token for authentication. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - bearerToken: bearer token for Bearer authentication header. +func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) + return &Client{transport: transport, formats: strfmt.Default} +} + /* Client for user auth API */ @@ -25,7 +51,7 @@ type Client struct { formats strfmt.Registry } -// ClientOption is the option for Client methods +// ClientOption may be used to customize the behavior of Client methods. type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods diff --git a/pkg/api/client/user_recovery/init_user_email_recovery_responses.go b/pkg/api/client/user_recovery/init_user_email_recovery_responses.go index f12207d..7a6090a 100644 --- a/pkg/api/client/user_recovery/init_user_email_recovery_responses.go +++ b/pkg/api/client/user_recovery/init_user_email_recovery_responses.go @@ -6,6 +6,7 @@ package user_recovery // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -79,11 +80,13 @@ func (o *InitUserEmailRecoveryOK) Code() int { } func (o *InitUserEmailRecoveryOK) Error() string { - return fmt.Sprintf("[POST /public/v1/submit/init_user_email_recovery][%d] initUserEmailRecoveryOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/init_user_email_recovery][%d] initUserEmailRecoveryOK %s", 200, payload) } func (o *InitUserEmailRecoveryOK) String() string { - return fmt.Sprintf("[POST /public/v1/submit/init_user_email_recovery][%d] initUserEmailRecoveryOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/init_user_email_recovery][%d] initUserEmailRecoveryOK %s", 200, payload) } func (o *InitUserEmailRecoveryOK) GetPayload() *models.ActivityResponse { diff --git a/pkg/api/client/user_recovery/recover_user_responses.go b/pkg/api/client/user_recovery/recover_user_responses.go index be8cc69..0286dea 100644 --- a/pkg/api/client/user_recovery/recover_user_responses.go +++ b/pkg/api/client/user_recovery/recover_user_responses.go @@ -6,6 +6,7 @@ package user_recovery // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -79,11 +80,13 @@ func (o *RecoverUserOK) Code() int { } func (o *RecoverUserOK) Error() string { - return fmt.Sprintf("[POST /public/v1/submit/recover_user][%d] recoverUserOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/recover_user][%d] recoverUserOK %s", 200, payload) } func (o *RecoverUserOK) String() string { - return fmt.Sprintf("[POST /public/v1/submit/recover_user][%d] recoverUserOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/recover_user][%d] recoverUserOK %s", 200, payload) } func (o *RecoverUserOK) GetPayload() *models.ActivityResponse { diff --git a/pkg/api/client/user_recovery/user_recovery_client.go b/pkg/api/client/user_recovery/user_recovery_client.go index b7c0e28..63ab4c7 100644 --- a/pkg/api/client/user_recovery/user_recovery_client.go +++ b/pkg/api/client/user_recovery/user_recovery_client.go @@ -9,6 +9,7 @@ import ( "fmt" "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" ) @@ -17,6 +18,31 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientServi return &Client{transport: transport, formats: formats} } +// New creates a new user recovery API client with basic auth credentials. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - user: user for basic authentication header. +// - password: password for basic authentication header. +func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BasicAuth(user, password) + return &Client{transport: transport, formats: strfmt.Default} +} + +// New creates a new user recovery API client with a bearer token for authentication. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - bearerToken: bearer token for Bearer authentication header. +func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) + return &Client{transport: transport, formats: strfmt.Default} +} + /* Client for user recovery API */ @@ -25,7 +51,7 @@ type Client struct { formats strfmt.Registry } -// ClientOption is the option for Client methods +// ClientOption may be used to customize the behavior of Client methods. type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods diff --git a/pkg/api/client/user_tags/create_user_tag_responses.go b/pkg/api/client/user_tags/create_user_tag_responses.go index a2e9b50..97784f5 100644 --- a/pkg/api/client/user_tags/create_user_tag_responses.go +++ b/pkg/api/client/user_tags/create_user_tag_responses.go @@ -6,6 +6,7 @@ package user_tags // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -79,11 +80,13 @@ func (o *CreateUserTagOK) Code() int { } func (o *CreateUserTagOK) Error() string { - return fmt.Sprintf("[POST /public/v1/submit/create_user_tag][%d] createUserTagOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/create_user_tag][%d] createUserTagOK %s", 200, payload) } func (o *CreateUserTagOK) String() string { - return fmt.Sprintf("[POST /public/v1/submit/create_user_tag][%d] createUserTagOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/create_user_tag][%d] createUserTagOK %s", 200, payload) } func (o *CreateUserTagOK) GetPayload() *models.ActivityResponse { diff --git a/pkg/api/client/user_tags/delete_user_tags_responses.go b/pkg/api/client/user_tags/delete_user_tags_responses.go index f04408d..d9d589b 100644 --- a/pkg/api/client/user_tags/delete_user_tags_responses.go +++ b/pkg/api/client/user_tags/delete_user_tags_responses.go @@ -6,6 +6,7 @@ package user_tags // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -79,11 +80,13 @@ func (o *DeleteUserTagsOK) Code() int { } func (o *DeleteUserTagsOK) Error() string { - return fmt.Sprintf("[POST /public/v1/submit/delete_user_tags][%d] deleteUserTagsOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/delete_user_tags][%d] deleteUserTagsOK %s", 200, payload) } func (o *DeleteUserTagsOK) String() string { - return fmt.Sprintf("[POST /public/v1/submit/delete_user_tags][%d] deleteUserTagsOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/delete_user_tags][%d] deleteUserTagsOK %s", 200, payload) } func (o *DeleteUserTagsOK) GetPayload() *models.ActivityResponse { diff --git a/pkg/api/client/user_tags/list_user_tags_responses.go b/pkg/api/client/user_tags/list_user_tags_responses.go index 58d9135..70e04ce 100644 --- a/pkg/api/client/user_tags/list_user_tags_responses.go +++ b/pkg/api/client/user_tags/list_user_tags_responses.go @@ -6,6 +6,7 @@ package user_tags // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -79,11 +80,13 @@ func (o *ListUserTagsOK) Code() int { } func (o *ListUserTagsOK) Error() string { - return fmt.Sprintf("[POST /public/v1/query/list_user_tags][%d] listUserTagsOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/query/list_user_tags][%d] listUserTagsOK %s", 200, payload) } func (o *ListUserTagsOK) String() string { - return fmt.Sprintf("[POST /public/v1/query/list_user_tags][%d] listUserTagsOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/query/list_user_tags][%d] listUserTagsOK %s", 200, payload) } func (o *ListUserTagsOK) GetPayload() *models.ListUserTagsResponse { diff --git a/pkg/api/client/user_tags/update_user_tag_responses.go b/pkg/api/client/user_tags/update_user_tag_responses.go index bcd98f3..320f2be 100644 --- a/pkg/api/client/user_tags/update_user_tag_responses.go +++ b/pkg/api/client/user_tags/update_user_tag_responses.go @@ -6,6 +6,7 @@ package user_tags // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -79,11 +80,13 @@ func (o *UpdateUserTagOK) Code() int { } func (o *UpdateUserTagOK) Error() string { - return fmt.Sprintf("[POST /public/v1/submit/update_user_tag][%d] updateUserTagOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/update_user_tag][%d] updateUserTagOK %s", 200, payload) } func (o *UpdateUserTagOK) String() string { - return fmt.Sprintf("[POST /public/v1/submit/update_user_tag][%d] updateUserTagOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/update_user_tag][%d] updateUserTagOK %s", 200, payload) } func (o *UpdateUserTagOK) GetPayload() *models.ActivityResponse { diff --git a/pkg/api/client/user_tags/user_tags_client.go b/pkg/api/client/user_tags/user_tags_client.go index c2ba5ae..932180e 100644 --- a/pkg/api/client/user_tags/user_tags_client.go +++ b/pkg/api/client/user_tags/user_tags_client.go @@ -9,6 +9,7 @@ import ( "fmt" "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" ) @@ -17,6 +18,31 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientServi return &Client{transport: transport, formats: formats} } +// New creates a new user tags API client with basic auth credentials. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - user: user for basic authentication header. +// - password: password for basic authentication header. +func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BasicAuth(user, password) + return &Client{transport: transport, formats: strfmt.Default} +} + +// New creates a new user tags API client with a bearer token for authentication. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - bearerToken: bearer token for Bearer authentication header. +func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) + return &Client{transport: transport, formats: strfmt.Default} +} + /* Client for user tags API */ @@ -25,7 +51,7 @@ type Client struct { formats strfmt.Registry } -// ClientOption is the option for Client methods +// ClientOption may be used to customize the behavior of Client methods. type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods diff --git a/pkg/api/client/users/create_oauth_providers_responses.go b/pkg/api/client/users/create_oauth_providers_responses.go index a693214..c581a25 100644 --- a/pkg/api/client/users/create_oauth_providers_responses.go +++ b/pkg/api/client/users/create_oauth_providers_responses.go @@ -6,6 +6,7 @@ package users // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -79,11 +80,13 @@ func (o *CreateOauthProvidersOK) Code() int { } func (o *CreateOauthProvidersOK) Error() string { - return fmt.Sprintf("[POST /public/v1/submit/create_oauth_providers][%d] createOauthProvidersOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/create_oauth_providers][%d] createOauthProvidersOK %s", 200, payload) } func (o *CreateOauthProvidersOK) String() string { - return fmt.Sprintf("[POST /public/v1/submit/create_oauth_providers][%d] createOauthProvidersOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/create_oauth_providers][%d] createOauthProvidersOK %s", 200, payload) } func (o *CreateOauthProvidersOK) GetPayload() *models.ActivityResponse { diff --git a/pkg/api/client/users/create_users_responses.go b/pkg/api/client/users/create_users_responses.go index 6c90ef0..29dbfc9 100644 --- a/pkg/api/client/users/create_users_responses.go +++ b/pkg/api/client/users/create_users_responses.go @@ -6,6 +6,7 @@ package users // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -79,11 +80,13 @@ func (o *CreateUsersOK) Code() int { } func (o *CreateUsersOK) Error() string { - return fmt.Sprintf("[POST /public/v1/submit/create_users][%d] createUsersOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/create_users][%d] createUsersOK %s", 200, payload) } func (o *CreateUsersOK) String() string { - return fmt.Sprintf("[POST /public/v1/submit/create_users][%d] createUsersOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/create_users][%d] createUsersOK %s", 200, payload) } func (o *CreateUsersOK) GetPayload() *models.ActivityResponse { diff --git a/pkg/api/client/users/delete_oauth_providers_responses.go b/pkg/api/client/users/delete_oauth_providers_responses.go index d4aa309..353dfea 100644 --- a/pkg/api/client/users/delete_oauth_providers_responses.go +++ b/pkg/api/client/users/delete_oauth_providers_responses.go @@ -6,6 +6,7 @@ package users // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -79,11 +80,13 @@ func (o *DeleteOauthProvidersOK) Code() int { } func (o *DeleteOauthProvidersOK) Error() string { - return fmt.Sprintf("[POST /public/v1/submit/delete_oauth_providers][%d] deleteOauthProvidersOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/delete_oauth_providers][%d] deleteOauthProvidersOK %s", 200, payload) } func (o *DeleteOauthProvidersOK) String() string { - return fmt.Sprintf("[POST /public/v1/submit/delete_oauth_providers][%d] deleteOauthProvidersOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/delete_oauth_providers][%d] deleteOauthProvidersOK %s", 200, payload) } func (o *DeleteOauthProvidersOK) GetPayload() *models.ActivityResponse { diff --git a/pkg/api/client/users/delete_users_responses.go b/pkg/api/client/users/delete_users_responses.go index 3366d78..67b0a42 100644 --- a/pkg/api/client/users/delete_users_responses.go +++ b/pkg/api/client/users/delete_users_responses.go @@ -6,6 +6,7 @@ package users // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -79,11 +80,13 @@ func (o *DeleteUsersOK) Code() int { } func (o *DeleteUsersOK) Error() string { - return fmt.Sprintf("[POST /public/v1/submit/delete_users][%d] deleteUsersOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/delete_users][%d] deleteUsersOK %s", 200, payload) } func (o *DeleteUsersOK) String() string { - return fmt.Sprintf("[POST /public/v1/submit/delete_users][%d] deleteUsersOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/delete_users][%d] deleteUsersOK %s", 200, payload) } func (o *DeleteUsersOK) GetPayload() *models.ActivityResponse { diff --git a/pkg/api/client/users/get_oauth_providers_responses.go b/pkg/api/client/users/get_oauth_providers_responses.go index c5cef6e..71ebb88 100644 --- a/pkg/api/client/users/get_oauth_providers_responses.go +++ b/pkg/api/client/users/get_oauth_providers_responses.go @@ -6,6 +6,7 @@ package users // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -79,11 +80,13 @@ func (o *GetOauthProvidersOK) Code() int { } func (o *GetOauthProvidersOK) Error() string { - return fmt.Sprintf("[POST /public/v1/query/get_oauth_providers][%d] getOauthProvidersOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/query/get_oauth_providers][%d] getOauthProvidersOK %s", 200, payload) } func (o *GetOauthProvidersOK) String() string { - return fmt.Sprintf("[POST /public/v1/query/get_oauth_providers][%d] getOauthProvidersOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/query/get_oauth_providers][%d] getOauthProvidersOK %s", 200, payload) } func (o *GetOauthProvidersOK) GetPayload() *models.GetOauthProvidersResponse { diff --git a/pkg/api/client/users/get_user_responses.go b/pkg/api/client/users/get_user_responses.go index 3d392c6..5dc9ba3 100644 --- a/pkg/api/client/users/get_user_responses.go +++ b/pkg/api/client/users/get_user_responses.go @@ -6,6 +6,7 @@ package users // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -79,11 +80,13 @@ func (o *GetUserOK) Code() int { } func (o *GetUserOK) Error() string { - return fmt.Sprintf("[POST /public/v1/query/get_user][%d] getUserOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/query/get_user][%d] getUserOK %s", 200, payload) } func (o *GetUserOK) String() string { - return fmt.Sprintf("[POST /public/v1/query/get_user][%d] getUserOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/query/get_user][%d] getUserOK %s", 200, payload) } func (o *GetUserOK) GetPayload() *models.GetUserResponse { diff --git a/pkg/api/client/users/get_users_responses.go b/pkg/api/client/users/get_users_responses.go index e1abcb6..d3104a8 100644 --- a/pkg/api/client/users/get_users_responses.go +++ b/pkg/api/client/users/get_users_responses.go @@ -6,6 +6,7 @@ package users // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -79,11 +80,13 @@ func (o *GetUsersOK) Code() int { } func (o *GetUsersOK) Error() string { - return fmt.Sprintf("[POST /public/v1/query/list_users][%d] getUsersOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/query/list_users][%d] getUsersOK %s", 200, payload) } func (o *GetUsersOK) String() string { - return fmt.Sprintf("[POST /public/v1/query/list_users][%d] getUsersOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/query/list_users][%d] getUsersOK %s", 200, payload) } func (o *GetUsersOK) GetPayload() *models.GetUsersResponse { diff --git a/pkg/api/client/users/oauth_responses.go b/pkg/api/client/users/oauth_responses.go index b03dfd0..96cfab8 100644 --- a/pkg/api/client/users/oauth_responses.go +++ b/pkg/api/client/users/oauth_responses.go @@ -6,6 +6,7 @@ package users // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -79,11 +80,13 @@ func (o *OauthOK) Code() int { } func (o *OauthOK) Error() string { - return fmt.Sprintf("[POST /public/v1/submit/oauth][%d] oauthOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/oauth][%d] oauthOK %s", 200, payload) } func (o *OauthOK) String() string { - return fmt.Sprintf("[POST /public/v1/submit/oauth][%d] oauthOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/oauth][%d] oauthOK %s", 200, payload) } func (o *OauthOK) GetPayload() *models.ActivityResponse { diff --git a/pkg/api/client/users/update_user_responses.go b/pkg/api/client/users/update_user_responses.go index 1706ba6..00ac8d7 100644 --- a/pkg/api/client/users/update_user_responses.go +++ b/pkg/api/client/users/update_user_responses.go @@ -6,6 +6,7 @@ package users // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -79,11 +80,13 @@ func (o *UpdateUserOK) Code() int { } func (o *UpdateUserOK) Error() string { - return fmt.Sprintf("[POST /public/v1/submit/update_user][%d] updateUserOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/update_user][%d] updateUserOK %s", 200, payload) } func (o *UpdateUserOK) String() string { - return fmt.Sprintf("[POST /public/v1/submit/update_user][%d] updateUserOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/update_user][%d] updateUserOK %s", 200, payload) } func (o *UpdateUserOK) GetPayload() *models.ActivityResponse { diff --git a/pkg/api/client/users/users_client.go b/pkg/api/client/users/users_client.go index d2a50da..4310537 100644 --- a/pkg/api/client/users/users_client.go +++ b/pkg/api/client/users/users_client.go @@ -9,6 +9,7 @@ import ( "fmt" "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" ) @@ -17,6 +18,31 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientServi return &Client{transport: transport, formats: formats} } +// New creates a new users API client with basic auth credentials. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - user: user for basic authentication header. +// - password: password for basic authentication header. +func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BasicAuth(user, password) + return &Client{transport: transport, formats: strfmt.Default} +} + +// New creates a new users API client with a bearer token for authentication. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - bearerToken: bearer token for Bearer authentication header. +func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) + return &Client{transport: transport, formats: strfmt.Default} +} + /* Client for users API */ @@ -25,7 +51,7 @@ type Client struct { formats strfmt.Registry } -// ClientOption is the option for Client methods +// ClientOption may be used to customize the behavior of Client methods. type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods diff --git a/pkg/api/client/wallets/create_wallet_accounts_responses.go b/pkg/api/client/wallets/create_wallet_accounts_responses.go index 4a9afc5..32429f6 100644 --- a/pkg/api/client/wallets/create_wallet_accounts_responses.go +++ b/pkg/api/client/wallets/create_wallet_accounts_responses.go @@ -6,6 +6,7 @@ package wallets // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -79,11 +80,13 @@ func (o *CreateWalletAccountsOK) Code() int { } func (o *CreateWalletAccountsOK) Error() string { - return fmt.Sprintf("[POST /public/v1/submit/create_wallet_accounts][%d] createWalletAccountsOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/create_wallet_accounts][%d] createWalletAccountsOK %s", 200, payload) } func (o *CreateWalletAccountsOK) String() string { - return fmt.Sprintf("[POST /public/v1/submit/create_wallet_accounts][%d] createWalletAccountsOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/create_wallet_accounts][%d] createWalletAccountsOK %s", 200, payload) } func (o *CreateWalletAccountsOK) GetPayload() *models.ActivityResponse { diff --git a/pkg/api/client/wallets/create_wallet_responses.go b/pkg/api/client/wallets/create_wallet_responses.go index 1792f9c..cd3c4aa 100644 --- a/pkg/api/client/wallets/create_wallet_responses.go +++ b/pkg/api/client/wallets/create_wallet_responses.go @@ -6,6 +6,7 @@ package wallets // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -79,11 +80,13 @@ func (o *CreateWalletOK) Code() int { } func (o *CreateWalletOK) Error() string { - return fmt.Sprintf("[POST /public/v1/submit/create_wallet][%d] createWalletOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/create_wallet][%d] createWalletOK %s", 200, payload) } func (o *CreateWalletOK) String() string { - return fmt.Sprintf("[POST /public/v1/submit/create_wallet][%d] createWalletOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/create_wallet][%d] createWalletOK %s", 200, payload) } func (o *CreateWalletOK) GetPayload() *models.ActivityResponse { diff --git a/pkg/api/client/wallets/delete_wallets_responses.go b/pkg/api/client/wallets/delete_wallets_responses.go index 8c6d5e7..62da790 100644 --- a/pkg/api/client/wallets/delete_wallets_responses.go +++ b/pkg/api/client/wallets/delete_wallets_responses.go @@ -6,6 +6,7 @@ package wallets // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -79,11 +80,13 @@ func (o *DeleteWalletsOK) Code() int { } func (o *DeleteWalletsOK) Error() string { - return fmt.Sprintf("[POST /public/v1/submit/delete_wallets][%d] deleteWalletsOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/delete_wallets][%d] deleteWalletsOK %s", 200, payload) } func (o *DeleteWalletsOK) String() string { - return fmt.Sprintf("[POST /public/v1/submit/delete_wallets][%d] deleteWalletsOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/delete_wallets][%d] deleteWalletsOK %s", 200, payload) } func (o *DeleteWalletsOK) GetPayload() *models.ActivityResponse { diff --git a/pkg/api/client/wallets/export_wallet_account_responses.go b/pkg/api/client/wallets/export_wallet_account_responses.go index 05cc03f..6aa97f0 100644 --- a/pkg/api/client/wallets/export_wallet_account_responses.go +++ b/pkg/api/client/wallets/export_wallet_account_responses.go @@ -6,6 +6,7 @@ package wallets // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -79,11 +80,13 @@ func (o *ExportWalletAccountOK) Code() int { } func (o *ExportWalletAccountOK) Error() string { - return fmt.Sprintf("[POST /public/v1/submit/export_wallet_account][%d] exportWalletAccountOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/export_wallet_account][%d] exportWalletAccountOK %s", 200, payload) } func (o *ExportWalletAccountOK) String() string { - return fmt.Sprintf("[POST /public/v1/submit/export_wallet_account][%d] exportWalletAccountOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/export_wallet_account][%d] exportWalletAccountOK %s", 200, payload) } func (o *ExportWalletAccountOK) GetPayload() *models.ActivityResponse { diff --git a/pkg/api/client/wallets/export_wallet_responses.go b/pkg/api/client/wallets/export_wallet_responses.go index 8ae079f..cc3e5cc 100644 --- a/pkg/api/client/wallets/export_wallet_responses.go +++ b/pkg/api/client/wallets/export_wallet_responses.go @@ -6,6 +6,7 @@ package wallets // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -79,11 +80,13 @@ func (o *ExportWalletOK) Code() int { } func (o *ExportWalletOK) Error() string { - return fmt.Sprintf("[POST /public/v1/submit/export_wallet][%d] exportWalletOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/export_wallet][%d] exportWalletOK %s", 200, payload) } func (o *ExportWalletOK) String() string { - return fmt.Sprintf("[POST /public/v1/submit/export_wallet][%d] exportWalletOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/export_wallet][%d] exportWalletOK %s", 200, payload) } func (o *ExportWalletOK) GetPayload() *models.ActivityResponse { diff --git a/pkg/api/client/wallets/get_wallet_accounts_responses.go b/pkg/api/client/wallets/get_wallet_accounts_responses.go index 3bd9cf1..11c8fd6 100644 --- a/pkg/api/client/wallets/get_wallet_accounts_responses.go +++ b/pkg/api/client/wallets/get_wallet_accounts_responses.go @@ -6,6 +6,7 @@ package wallets // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -79,11 +80,13 @@ func (o *GetWalletAccountsOK) Code() int { } func (o *GetWalletAccountsOK) Error() string { - return fmt.Sprintf("[POST /public/v1/query/list_wallet_accounts][%d] getWalletAccountsOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/query/list_wallet_accounts][%d] getWalletAccountsOK %s", 200, payload) } func (o *GetWalletAccountsOK) String() string { - return fmt.Sprintf("[POST /public/v1/query/list_wallet_accounts][%d] getWalletAccountsOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/query/list_wallet_accounts][%d] getWalletAccountsOK %s", 200, payload) } func (o *GetWalletAccountsOK) GetPayload() *models.GetWalletAccountsResponse { diff --git a/pkg/api/client/wallets/get_wallet_responses.go b/pkg/api/client/wallets/get_wallet_responses.go index fb1140b..722e9e8 100644 --- a/pkg/api/client/wallets/get_wallet_responses.go +++ b/pkg/api/client/wallets/get_wallet_responses.go @@ -6,6 +6,7 @@ package wallets // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -79,11 +80,13 @@ func (o *GetWalletOK) Code() int { } func (o *GetWalletOK) Error() string { - return fmt.Sprintf("[POST /public/v1/query/get_wallet][%d] getWalletOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/query/get_wallet][%d] getWalletOK %s", 200, payload) } func (o *GetWalletOK) String() string { - return fmt.Sprintf("[POST /public/v1/query/get_wallet][%d] getWalletOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/query/get_wallet][%d] getWalletOK %s", 200, payload) } func (o *GetWalletOK) GetPayload() *models.GetWalletResponse { diff --git a/pkg/api/client/wallets/get_wallets_responses.go b/pkg/api/client/wallets/get_wallets_responses.go index 3a7b879..8c954de 100644 --- a/pkg/api/client/wallets/get_wallets_responses.go +++ b/pkg/api/client/wallets/get_wallets_responses.go @@ -6,6 +6,7 @@ package wallets // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -79,11 +80,13 @@ func (o *GetWalletsOK) Code() int { } func (o *GetWalletsOK) Error() string { - return fmt.Sprintf("[POST /public/v1/query/list_wallets][%d] getWalletsOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/query/list_wallets][%d] getWalletsOK %s", 200, payload) } func (o *GetWalletsOK) String() string { - return fmt.Sprintf("[POST /public/v1/query/list_wallets][%d] getWalletsOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/query/list_wallets][%d] getWalletsOK %s", 200, payload) } func (o *GetWalletsOK) GetPayload() *models.GetWalletsResponse { diff --git a/pkg/api/client/wallets/import_wallet_responses.go b/pkg/api/client/wallets/import_wallet_responses.go index f1173ca..c716e75 100644 --- a/pkg/api/client/wallets/import_wallet_responses.go +++ b/pkg/api/client/wallets/import_wallet_responses.go @@ -6,6 +6,7 @@ package wallets // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -79,11 +80,13 @@ func (o *ImportWalletOK) Code() int { } func (o *ImportWalletOK) Error() string { - return fmt.Sprintf("[POST /public/v1/submit/import_wallet][%d] importWalletOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/import_wallet][%d] importWalletOK %s", 200, payload) } func (o *ImportWalletOK) String() string { - return fmt.Sprintf("[POST /public/v1/submit/import_wallet][%d] importWalletOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/import_wallet][%d] importWalletOK %s", 200, payload) } func (o *ImportWalletOK) GetPayload() *models.ActivityResponse { diff --git a/pkg/api/client/wallets/init_import_wallet_responses.go b/pkg/api/client/wallets/init_import_wallet_responses.go index cd0a792..e39377b 100644 --- a/pkg/api/client/wallets/init_import_wallet_responses.go +++ b/pkg/api/client/wallets/init_import_wallet_responses.go @@ -6,6 +6,7 @@ package wallets // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -79,11 +80,13 @@ func (o *InitImportWalletOK) Code() int { } func (o *InitImportWalletOK) Error() string { - return fmt.Sprintf("[POST /public/v1/submit/init_import_wallet][%d] initImportWalletOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/init_import_wallet][%d] initImportWalletOK %s", 200, payload) } func (o *InitImportWalletOK) String() string { - return fmt.Sprintf("[POST /public/v1/submit/init_import_wallet][%d] initImportWalletOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /public/v1/submit/init_import_wallet][%d] initImportWalletOK %s", 200, payload) } func (o *InitImportWalletOK) GetPayload() *models.ActivityResponse { diff --git a/pkg/api/client/wallets/wallets_client.go b/pkg/api/client/wallets/wallets_client.go index 7d84622..4eaa62f 100644 --- a/pkg/api/client/wallets/wallets_client.go +++ b/pkg/api/client/wallets/wallets_client.go @@ -9,6 +9,7 @@ import ( "fmt" "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" ) @@ -17,6 +18,31 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientServi return &Client{transport: transport, formats: formats} } +// New creates a new wallets API client with basic auth credentials. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - user: user for basic authentication header. +// - password: password for basic authentication header. +func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BasicAuth(user, password) + return &Client{transport: transport, formats: strfmt.Default} +} + +// New creates a new wallets API client with a bearer token for authentication. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - bearerToken: bearer token for Bearer authentication header. +func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) + return &Client{transport: transport, formats: strfmt.Default} +} + /* Client for wallets API */ @@ -25,7 +51,7 @@ type Client struct { formats strfmt.Registry } -// ClientOption is the option for Client methods +// ClientOption may be used to customize the behavior of Client methods. type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods @@ -136,7 +162,7 @@ func (a *Client) CreateWalletAccounts(params *CreateWalletAccountsParams, authIn } /* -DeleteWallets deletes organization wallets +DeleteWallets deletes wallets Deletes wallets for an organization */ diff --git a/pkg/api/models/access_type.go b/pkg/api/models/access_type.go index 5583862..5520d38 100644 --- a/pkg/api/models/access_type.go +++ b/pkg/api/models/access_type.go @@ -30,14 +30,14 @@ func (m AccessType) Pointer() *AccessType { const ( - // AccessTypeWeb captures enum value "ACCESS_TYPE_WEB" - AccessTypeWeb AccessType = "ACCESS_TYPE_WEB" + // ACCESSTYPEWEB captures enum value "ACCESS_TYPE_WEB" + ACCESSTYPEWEB AccessType = "ACCESS_TYPE_WEB" - // AccessTypeAPI captures enum value "ACCESS_TYPE_API" - AccessTypeAPI AccessType = "ACCESS_TYPE_API" + // ACCESSTYPEAPI captures enum value "ACCESS_TYPE_API" + ACCESSTYPEAPI AccessType = "ACCESS_TYPE_API" - // AccessTypeAll captures enum value "ACCESS_TYPE_ALL" - AccessTypeAll AccessType = "ACCESS_TYPE_ALL" + // ACCESSTYPEALL captures enum value "ACCESS_TYPE_ALL" + ACCESSTYPEALL AccessType = "ACCESS_TYPE_ALL" ) // for schema diff --git a/pkg/api/models/activity_status.go b/pkg/api/models/activity_status.go index 6a2cd19..0f92a8f 100644 --- a/pkg/api/models/activity_status.go +++ b/pkg/api/models/activity_status.go @@ -30,23 +30,23 @@ func (m ActivityStatus) Pointer() *ActivityStatus { const ( - // ActivityStatusCreated captures enum value "ACTIVITY_STATUS_CREATED" - ActivityStatusCreated ActivityStatus = "ACTIVITY_STATUS_CREATED" + // ACTIVITYSTATUSCREATED captures enum value "ACTIVITY_STATUS_CREATED" + ACTIVITYSTATUSCREATED ActivityStatus = "ACTIVITY_STATUS_CREATED" - // ActivityStatusPending captures enum value "ACTIVITY_STATUS_PENDING" - ActivityStatusPending ActivityStatus = "ACTIVITY_STATUS_PENDING" + // ACTIVITYSTATUSPENDING captures enum value "ACTIVITY_STATUS_PENDING" + ACTIVITYSTATUSPENDING ActivityStatus = "ACTIVITY_STATUS_PENDING" - // ActivityStatusCompleted captures enum value "ACTIVITY_STATUS_COMPLETED" - ActivityStatusCompleted ActivityStatus = "ACTIVITY_STATUS_COMPLETED" + // ACTIVITYSTATUSCOMPLETED captures enum value "ACTIVITY_STATUS_COMPLETED" + ACTIVITYSTATUSCOMPLETED ActivityStatus = "ACTIVITY_STATUS_COMPLETED" - // ActivityStatusFailed captures enum value "ACTIVITY_STATUS_FAILED" - ActivityStatusFailed ActivityStatus = "ACTIVITY_STATUS_FAILED" + // ACTIVITYSTATUSFAILED captures enum value "ACTIVITY_STATUS_FAILED" + ACTIVITYSTATUSFAILED ActivityStatus = "ACTIVITY_STATUS_FAILED" - // ActivityStatusConsensusNeeded captures enum value "ACTIVITY_STATUS_CONSENSUS_NEEDED" - ActivityStatusConsensusNeeded ActivityStatus = "ACTIVITY_STATUS_CONSENSUS_NEEDED" + // ACTIVITYSTATUSCONSENSUSNEEDED captures enum value "ACTIVITY_STATUS_CONSENSUS_NEEDED" + ACTIVITYSTATUSCONSENSUSNEEDED ActivityStatus = "ACTIVITY_STATUS_CONSENSUS_NEEDED" - // ActivityStatusRejected captures enum value "ACTIVITY_STATUS_REJECTED" - ActivityStatusRejected ActivityStatus = "ACTIVITY_STATUS_REJECTED" + // ACTIVITYSTATUSREJECTED captures enum value "ACTIVITY_STATUS_REJECTED" + ACTIVITYSTATUSREJECTED ActivityStatus = "ACTIVITY_STATUS_REJECTED" ) // for schema diff --git a/pkg/api/models/activity_type.go b/pkg/api/models/activity_type.go index 2ba504b..51ae7ab 100644 --- a/pkg/api/models/activity_type.go +++ b/pkg/api/models/activity_type.go @@ -30,230 +30,233 @@ func (m ActivityType) Pointer() *ActivityType { const ( - // ActivityTypeCreateAPIKeys captures enum value "ACTIVITY_TYPE_CREATE_API_KEYS" - ActivityTypeCreateAPIKeys ActivityType = "ACTIVITY_TYPE_CREATE_API_KEYS" + // ACTIVITYTYPECREATEAPIKEYS captures enum value "ACTIVITY_TYPE_CREATE_API_KEYS" + ACTIVITYTYPECREATEAPIKEYS ActivityType = "ACTIVITY_TYPE_CREATE_API_KEYS" - // ActivityTypeCreateUsers captures enum value "ACTIVITY_TYPE_CREATE_USERS" - ActivityTypeCreateUsers ActivityType = "ACTIVITY_TYPE_CREATE_USERS" + // ACTIVITYTYPECREATEUSERS captures enum value "ACTIVITY_TYPE_CREATE_USERS" + ACTIVITYTYPECREATEUSERS ActivityType = "ACTIVITY_TYPE_CREATE_USERS" - // ActivityTypeCreatePrivateKeys captures enum value "ACTIVITY_TYPE_CREATE_PRIVATE_KEYS" - ActivityTypeCreatePrivateKeys ActivityType = "ACTIVITY_TYPE_CREATE_PRIVATE_KEYS" + // ACTIVITYTYPECREATEPRIVATEKEYS captures enum value "ACTIVITY_TYPE_CREATE_PRIVATE_KEYS" + ACTIVITYTYPECREATEPRIVATEKEYS ActivityType = "ACTIVITY_TYPE_CREATE_PRIVATE_KEYS" - // ActivityTypeSignRawPayload captures enum value "ACTIVITY_TYPE_SIGN_RAW_PAYLOAD" - ActivityTypeSignRawPayload ActivityType = "ACTIVITY_TYPE_SIGN_RAW_PAYLOAD" + // ACTIVITYTYPESIGNRAWPAYLOAD captures enum value "ACTIVITY_TYPE_SIGN_RAW_PAYLOAD" + ACTIVITYTYPESIGNRAWPAYLOAD ActivityType = "ACTIVITY_TYPE_SIGN_RAW_PAYLOAD" - // ActivityTypeCreateInvitations captures enum value "ACTIVITY_TYPE_CREATE_INVITATIONS" - ActivityTypeCreateInvitations ActivityType = "ACTIVITY_TYPE_CREATE_INVITATIONS" + // ACTIVITYTYPECREATEINVITATIONS captures enum value "ACTIVITY_TYPE_CREATE_INVITATIONS" + ACTIVITYTYPECREATEINVITATIONS ActivityType = "ACTIVITY_TYPE_CREATE_INVITATIONS" - // ActivityTypeAcceptInvitation captures enum value "ACTIVITY_TYPE_ACCEPT_INVITATION" - ActivityTypeAcceptInvitation ActivityType = "ACTIVITY_TYPE_ACCEPT_INVITATION" + // ACTIVITYTYPEACCEPTINVITATION captures enum value "ACTIVITY_TYPE_ACCEPT_INVITATION" + ACTIVITYTYPEACCEPTINVITATION ActivityType = "ACTIVITY_TYPE_ACCEPT_INVITATION" - // ActivityTypeCreatePolicy captures enum value "ACTIVITY_TYPE_CREATE_POLICY" - ActivityTypeCreatePolicy ActivityType = "ACTIVITY_TYPE_CREATE_POLICY" + // ACTIVITYTYPECREATEPOLICY captures enum value "ACTIVITY_TYPE_CREATE_POLICY" + ACTIVITYTYPECREATEPOLICY ActivityType = "ACTIVITY_TYPE_CREATE_POLICY" - // ActivityTypeDisablePrivateKey captures enum value "ACTIVITY_TYPE_DISABLE_PRIVATE_KEY" - ActivityTypeDisablePrivateKey ActivityType = "ACTIVITY_TYPE_DISABLE_PRIVATE_KEY" + // ACTIVITYTYPEDISABLEPRIVATEKEY captures enum value "ACTIVITY_TYPE_DISABLE_PRIVATE_KEY" + ACTIVITYTYPEDISABLEPRIVATEKEY ActivityType = "ACTIVITY_TYPE_DISABLE_PRIVATE_KEY" - // ActivityTypeDeleteUsers captures enum value "ACTIVITY_TYPE_DELETE_USERS" - ActivityTypeDeleteUsers ActivityType = "ACTIVITY_TYPE_DELETE_USERS" + // ACTIVITYTYPEDELETEUSERS captures enum value "ACTIVITY_TYPE_DELETE_USERS" + ACTIVITYTYPEDELETEUSERS ActivityType = "ACTIVITY_TYPE_DELETE_USERS" - // ActivityTypeDeleteAPIKeys captures enum value "ACTIVITY_TYPE_DELETE_API_KEYS" - ActivityTypeDeleteAPIKeys ActivityType = "ACTIVITY_TYPE_DELETE_API_KEYS" + // ACTIVITYTYPEDELETEAPIKEYS captures enum value "ACTIVITY_TYPE_DELETE_API_KEYS" + ACTIVITYTYPEDELETEAPIKEYS ActivityType = "ACTIVITY_TYPE_DELETE_API_KEYS" - // ActivityTypeDeleteInvitation captures enum value "ACTIVITY_TYPE_DELETE_INVITATION" - ActivityTypeDeleteInvitation ActivityType = "ACTIVITY_TYPE_DELETE_INVITATION" + // ACTIVITYTYPEDELETEINVITATION captures enum value "ACTIVITY_TYPE_DELETE_INVITATION" + ACTIVITYTYPEDELETEINVITATION ActivityType = "ACTIVITY_TYPE_DELETE_INVITATION" - // ActivityTypeDeleteOrganization captures enum value "ACTIVITY_TYPE_DELETE_ORGANIZATION" - ActivityTypeDeleteOrganization ActivityType = "ACTIVITY_TYPE_DELETE_ORGANIZATION" + // ACTIVITYTYPEDELETEORGANIZATION captures enum value "ACTIVITY_TYPE_DELETE_ORGANIZATION" + ACTIVITYTYPEDELETEORGANIZATION ActivityType = "ACTIVITY_TYPE_DELETE_ORGANIZATION" - // ActivityTypeDeletePolicy captures enum value "ACTIVITY_TYPE_DELETE_POLICY" - ActivityTypeDeletePolicy ActivityType = "ACTIVITY_TYPE_DELETE_POLICY" + // ACTIVITYTYPEDELETEPOLICY captures enum value "ACTIVITY_TYPE_DELETE_POLICY" + ACTIVITYTYPEDELETEPOLICY ActivityType = "ACTIVITY_TYPE_DELETE_POLICY" - // ActivityTypeCreateUserTag captures enum value "ACTIVITY_TYPE_CREATE_USER_TAG" - ActivityTypeCreateUserTag ActivityType = "ACTIVITY_TYPE_CREATE_USER_TAG" + // ACTIVITYTYPECREATEUSERTAG captures enum value "ACTIVITY_TYPE_CREATE_USER_TAG" + ACTIVITYTYPECREATEUSERTAG ActivityType = "ACTIVITY_TYPE_CREATE_USER_TAG" - // ActivityTypeDeleteUserTags captures enum value "ACTIVITY_TYPE_DELETE_USER_TAGS" - ActivityTypeDeleteUserTags ActivityType = "ACTIVITY_TYPE_DELETE_USER_TAGS" + // ACTIVITYTYPEDELETEUSERTAGS captures enum value "ACTIVITY_TYPE_DELETE_USER_TAGS" + ACTIVITYTYPEDELETEUSERTAGS ActivityType = "ACTIVITY_TYPE_DELETE_USER_TAGS" - // ActivityTypeCreateOrganization captures enum value "ACTIVITY_TYPE_CREATE_ORGANIZATION" - ActivityTypeCreateOrganization ActivityType = "ACTIVITY_TYPE_CREATE_ORGANIZATION" + // ACTIVITYTYPECREATEORGANIZATION captures enum value "ACTIVITY_TYPE_CREATE_ORGANIZATION" + ACTIVITYTYPECREATEORGANIZATION ActivityType = "ACTIVITY_TYPE_CREATE_ORGANIZATION" - // ActivityTypeSignTransaction captures enum value "ACTIVITY_TYPE_SIGN_TRANSACTION" - ActivityTypeSignTransaction ActivityType = "ACTIVITY_TYPE_SIGN_TRANSACTION" + // ACTIVITYTYPESIGNTRANSACTION captures enum value "ACTIVITY_TYPE_SIGN_TRANSACTION" + ACTIVITYTYPESIGNTRANSACTION ActivityType = "ACTIVITY_TYPE_SIGN_TRANSACTION" - // ActivityTypeApproveActivity captures enum value "ACTIVITY_TYPE_APPROVE_ACTIVITY" - ActivityTypeApproveActivity ActivityType = "ACTIVITY_TYPE_APPROVE_ACTIVITY" + // ACTIVITYTYPEAPPROVEACTIVITY captures enum value "ACTIVITY_TYPE_APPROVE_ACTIVITY" + ACTIVITYTYPEAPPROVEACTIVITY ActivityType = "ACTIVITY_TYPE_APPROVE_ACTIVITY" - // ActivityTypeRejectActivity captures enum value "ACTIVITY_TYPE_REJECT_ACTIVITY" - ActivityTypeRejectActivity ActivityType = "ACTIVITY_TYPE_REJECT_ACTIVITY" + // ACTIVITYTYPEREJECTACTIVITY captures enum value "ACTIVITY_TYPE_REJECT_ACTIVITY" + ACTIVITYTYPEREJECTACTIVITY ActivityType = "ACTIVITY_TYPE_REJECT_ACTIVITY" - // ActivityTypeDeleteAuthenticators captures enum value "ACTIVITY_TYPE_DELETE_AUTHENTICATORS" - ActivityTypeDeleteAuthenticators ActivityType = "ACTIVITY_TYPE_DELETE_AUTHENTICATORS" + // ACTIVITYTYPEDELETEAUTHENTICATORS captures enum value "ACTIVITY_TYPE_DELETE_AUTHENTICATORS" + ACTIVITYTYPEDELETEAUTHENTICATORS ActivityType = "ACTIVITY_TYPE_DELETE_AUTHENTICATORS" - // ActivityTypeCreateAuthenticators captures enum value "ACTIVITY_TYPE_CREATE_AUTHENTICATORS" - ActivityTypeCreateAuthenticators ActivityType = "ACTIVITY_TYPE_CREATE_AUTHENTICATORS" + // ACTIVITYTYPECREATEAUTHENTICATORS captures enum value "ACTIVITY_TYPE_CREATE_AUTHENTICATORS" + ACTIVITYTYPECREATEAUTHENTICATORS ActivityType = "ACTIVITY_TYPE_CREATE_AUTHENTICATORS" - // ActivityTypeCreatePrivateKeyTag captures enum value "ACTIVITY_TYPE_CREATE_PRIVATE_KEY_TAG" - ActivityTypeCreatePrivateKeyTag ActivityType = "ACTIVITY_TYPE_CREATE_PRIVATE_KEY_TAG" + // ACTIVITYTYPECREATEPRIVATEKEYTAG captures enum value "ACTIVITY_TYPE_CREATE_PRIVATE_KEY_TAG" + ACTIVITYTYPECREATEPRIVATEKEYTAG ActivityType = "ACTIVITY_TYPE_CREATE_PRIVATE_KEY_TAG" - // ActivityTypeDeletePrivateKeyTags captures enum value "ACTIVITY_TYPE_DELETE_PRIVATE_KEY_TAGS" - ActivityTypeDeletePrivateKeyTags ActivityType = "ACTIVITY_TYPE_DELETE_PRIVATE_KEY_TAGS" + // ACTIVITYTYPEDELETEPRIVATEKEYTAGS captures enum value "ACTIVITY_TYPE_DELETE_PRIVATE_KEY_TAGS" + ACTIVITYTYPEDELETEPRIVATEKEYTAGS ActivityType = "ACTIVITY_TYPE_DELETE_PRIVATE_KEY_TAGS" - // ActivityTypeSetPaymentMethod captures enum value "ACTIVITY_TYPE_SET_PAYMENT_METHOD" - ActivityTypeSetPaymentMethod ActivityType = "ACTIVITY_TYPE_SET_PAYMENT_METHOD" + // ACTIVITYTYPESETPAYMENTMETHOD captures enum value "ACTIVITY_TYPE_SET_PAYMENT_METHOD" + ACTIVITYTYPESETPAYMENTMETHOD ActivityType = "ACTIVITY_TYPE_SET_PAYMENT_METHOD" - // ActivityTypeActivateBillingTier captures enum value "ACTIVITY_TYPE_ACTIVATE_BILLING_TIER" - ActivityTypeActivateBillingTier ActivityType = "ACTIVITY_TYPE_ACTIVATE_BILLING_TIER" + // ACTIVITYTYPEACTIVATEBILLINGTIER captures enum value "ACTIVITY_TYPE_ACTIVATE_BILLING_TIER" + ACTIVITYTYPEACTIVATEBILLINGTIER ActivityType = "ACTIVITY_TYPE_ACTIVATE_BILLING_TIER" - // ActivityTypeDeletePaymentMethod captures enum value "ACTIVITY_TYPE_DELETE_PAYMENT_METHOD" - ActivityTypeDeletePaymentMethod ActivityType = "ACTIVITY_TYPE_DELETE_PAYMENT_METHOD" + // ACTIVITYTYPEDELETEPAYMENTMETHOD captures enum value "ACTIVITY_TYPE_DELETE_PAYMENT_METHOD" + ACTIVITYTYPEDELETEPAYMENTMETHOD ActivityType = "ACTIVITY_TYPE_DELETE_PAYMENT_METHOD" - // ActivityTypeCreatePolicyV2 captures enum value "ACTIVITY_TYPE_CREATE_POLICY_V2" - ActivityTypeCreatePolicyV2 ActivityType = "ACTIVITY_TYPE_CREATE_POLICY_V2" + // ACTIVITYTYPECREATEPOLICYV2 captures enum value "ACTIVITY_TYPE_CREATE_POLICY_V2" + ACTIVITYTYPECREATEPOLICYV2 ActivityType = "ACTIVITY_TYPE_CREATE_POLICY_V2" - // ActivityTypeCreatePolicyV3 captures enum value "ACTIVITY_TYPE_CREATE_POLICY_V3" - ActivityTypeCreatePolicyV3 ActivityType = "ACTIVITY_TYPE_CREATE_POLICY_V3" + // ACTIVITYTYPECREATEPOLICYV3 captures enum value "ACTIVITY_TYPE_CREATE_POLICY_V3" + ACTIVITYTYPECREATEPOLICYV3 ActivityType = "ACTIVITY_TYPE_CREATE_POLICY_V3" - // ActivityTypeCreateAPIOnlyUsers captures enum value "ACTIVITY_TYPE_CREATE_API_ONLY_USERS" - ActivityTypeCreateAPIOnlyUsers ActivityType = "ACTIVITY_TYPE_CREATE_API_ONLY_USERS" + // ACTIVITYTYPECREATEAPIONLYUSERS captures enum value "ACTIVITY_TYPE_CREATE_API_ONLY_USERS" + ACTIVITYTYPECREATEAPIONLYUSERS ActivityType = "ACTIVITY_TYPE_CREATE_API_ONLY_USERS" - // ActivityTypeUpdateRootQuorum captures enum value "ACTIVITY_TYPE_UPDATE_ROOT_QUORUM" - ActivityTypeUpdateRootQuorum ActivityType = "ACTIVITY_TYPE_UPDATE_ROOT_QUORUM" + // ACTIVITYTYPEUPDATEROOTQUORUM captures enum value "ACTIVITY_TYPE_UPDATE_ROOT_QUORUM" + ACTIVITYTYPEUPDATEROOTQUORUM ActivityType = "ACTIVITY_TYPE_UPDATE_ROOT_QUORUM" - // ActivityTypeUpdateUserTag captures enum value "ACTIVITY_TYPE_UPDATE_USER_TAG" - ActivityTypeUpdateUserTag ActivityType = "ACTIVITY_TYPE_UPDATE_USER_TAG" + // ACTIVITYTYPEUPDATEUSERTAG captures enum value "ACTIVITY_TYPE_UPDATE_USER_TAG" + ACTIVITYTYPEUPDATEUSERTAG ActivityType = "ACTIVITY_TYPE_UPDATE_USER_TAG" - // ActivityTypeUpdatePrivateKeyTag captures enum value "ACTIVITY_TYPE_UPDATE_PRIVATE_KEY_TAG" - ActivityTypeUpdatePrivateKeyTag ActivityType = "ACTIVITY_TYPE_UPDATE_PRIVATE_KEY_TAG" + // ACTIVITYTYPEUPDATEPRIVATEKEYTAG captures enum value "ACTIVITY_TYPE_UPDATE_PRIVATE_KEY_TAG" + ACTIVITYTYPEUPDATEPRIVATEKEYTAG ActivityType = "ACTIVITY_TYPE_UPDATE_PRIVATE_KEY_TAG" - // ActivityTypeCreateAuthenticatorsV2 captures enum value "ACTIVITY_TYPE_CREATE_AUTHENTICATORS_V2" - ActivityTypeCreateAuthenticatorsV2 ActivityType = "ACTIVITY_TYPE_CREATE_AUTHENTICATORS_V2" + // ACTIVITYTYPECREATEAUTHENTICATORSV2 captures enum value "ACTIVITY_TYPE_CREATE_AUTHENTICATORS_V2" + ACTIVITYTYPECREATEAUTHENTICATORSV2 ActivityType = "ACTIVITY_TYPE_CREATE_AUTHENTICATORS_V2" - // ActivityTypeCreateOrganizationV2 captures enum value "ACTIVITY_TYPE_CREATE_ORGANIZATION_V2" - ActivityTypeCreateOrganizationV2 ActivityType = "ACTIVITY_TYPE_CREATE_ORGANIZATION_V2" + // ACTIVITYTYPECREATEORGANIZATIONV2 captures enum value "ACTIVITY_TYPE_CREATE_ORGANIZATION_V2" + ACTIVITYTYPECREATEORGANIZATIONV2 ActivityType = "ACTIVITY_TYPE_CREATE_ORGANIZATION_V2" - // ActivityTypeCreateUsersV2 captures enum value "ACTIVITY_TYPE_CREATE_USERS_V2" - ActivityTypeCreateUsersV2 ActivityType = "ACTIVITY_TYPE_CREATE_USERS_V2" + // ACTIVITYTYPECREATEUSERSV2 captures enum value "ACTIVITY_TYPE_CREATE_USERS_V2" + ACTIVITYTYPECREATEUSERSV2 ActivityType = "ACTIVITY_TYPE_CREATE_USERS_V2" - // ActivityTypeAcceptInvitationV2 captures enum value "ACTIVITY_TYPE_ACCEPT_INVITATION_V2" - ActivityTypeAcceptInvitationV2 ActivityType = "ACTIVITY_TYPE_ACCEPT_INVITATION_V2" + // ACTIVITYTYPEACCEPTINVITATIONV2 captures enum value "ACTIVITY_TYPE_ACCEPT_INVITATION_V2" + ACTIVITYTYPEACCEPTINVITATIONV2 ActivityType = "ACTIVITY_TYPE_ACCEPT_INVITATION_V2" - // ActivityTypeCreateSubOrganization captures enum value "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION" - ActivityTypeCreateSubOrganization ActivityType = "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION" + // ACTIVITYTYPECREATESUBORGANIZATION captures enum value "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION" + ACTIVITYTYPECREATESUBORGANIZATION ActivityType = "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION" - // ActivityTypeCreateSubOrganizationV2 captures enum value "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V2" - ActivityTypeCreateSubOrganizationV2 ActivityType = "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V2" + // ACTIVITYTYPECREATESUBORGANIZATIONV2 captures enum value "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V2" + ACTIVITYTYPECREATESUBORGANIZATIONV2 ActivityType = "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V2" - // ActivityTypeUpdateAllowedOrigins captures enum value "ACTIVITY_TYPE_UPDATE_ALLOWED_ORIGINS" - ActivityTypeUpdateAllowedOrigins ActivityType = "ACTIVITY_TYPE_UPDATE_ALLOWED_ORIGINS" + // ACTIVITYTYPEUPDATEALLOWEDORIGINS captures enum value "ACTIVITY_TYPE_UPDATE_ALLOWED_ORIGINS" + ACTIVITYTYPEUPDATEALLOWEDORIGINS ActivityType = "ACTIVITY_TYPE_UPDATE_ALLOWED_ORIGINS" - // ActivityTypeCreatePrivateKeysV2 captures enum value "ACTIVITY_TYPE_CREATE_PRIVATE_KEYS_V2" - ActivityTypeCreatePrivateKeysV2 ActivityType = "ACTIVITY_TYPE_CREATE_PRIVATE_KEYS_V2" + // ACTIVITYTYPECREATEPRIVATEKEYSV2 captures enum value "ACTIVITY_TYPE_CREATE_PRIVATE_KEYS_V2" + ACTIVITYTYPECREATEPRIVATEKEYSV2 ActivityType = "ACTIVITY_TYPE_CREATE_PRIVATE_KEYS_V2" - // ActivityTypeUpdateUser captures enum value "ACTIVITY_TYPE_UPDATE_USER" - ActivityTypeUpdateUser ActivityType = "ACTIVITY_TYPE_UPDATE_USER" + // ACTIVITYTYPEUPDATEUSER captures enum value "ACTIVITY_TYPE_UPDATE_USER" + ACTIVITYTYPEUPDATEUSER ActivityType = "ACTIVITY_TYPE_UPDATE_USER" - // ActivityTypeUpdatePolicy captures enum value "ACTIVITY_TYPE_UPDATE_POLICY" - ActivityTypeUpdatePolicy ActivityType = "ACTIVITY_TYPE_UPDATE_POLICY" + // ACTIVITYTYPEUPDATEPOLICY captures enum value "ACTIVITY_TYPE_UPDATE_POLICY" + ACTIVITYTYPEUPDATEPOLICY ActivityType = "ACTIVITY_TYPE_UPDATE_POLICY" - // ActivityTypeSetPaymentMethodV2 captures enum value "ACTIVITY_TYPE_SET_PAYMENT_METHOD_V2" - ActivityTypeSetPaymentMethodV2 ActivityType = "ACTIVITY_TYPE_SET_PAYMENT_METHOD_V2" + // ACTIVITYTYPESETPAYMENTMETHODV2 captures enum value "ACTIVITY_TYPE_SET_PAYMENT_METHOD_V2" + ACTIVITYTYPESETPAYMENTMETHODV2 ActivityType = "ACTIVITY_TYPE_SET_PAYMENT_METHOD_V2" - // ActivityTypeCreateSubOrganizationV3 captures enum value "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V3" - ActivityTypeCreateSubOrganizationV3 ActivityType = "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V3" + // ACTIVITYTYPECREATESUBORGANIZATIONV3 captures enum value "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V3" + ACTIVITYTYPECREATESUBORGANIZATIONV3 ActivityType = "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V3" - // ActivityTypeCreateWallet captures enum value "ACTIVITY_TYPE_CREATE_WALLET" - ActivityTypeCreateWallet ActivityType = "ACTIVITY_TYPE_CREATE_WALLET" + // ACTIVITYTYPECREATEWALLET captures enum value "ACTIVITY_TYPE_CREATE_WALLET" + ACTIVITYTYPECREATEWALLET ActivityType = "ACTIVITY_TYPE_CREATE_WALLET" - // ActivityTypeCreateWalletAccounts captures enum value "ACTIVITY_TYPE_CREATE_WALLET_ACCOUNTS" - ActivityTypeCreateWalletAccounts ActivityType = "ACTIVITY_TYPE_CREATE_WALLET_ACCOUNTS" + // ACTIVITYTYPECREATEWALLETACCOUNTS captures enum value "ACTIVITY_TYPE_CREATE_WALLET_ACCOUNTS" + ACTIVITYTYPECREATEWALLETACCOUNTS ActivityType = "ACTIVITY_TYPE_CREATE_WALLET_ACCOUNTS" - // ActivityTypeInitUserEmailRecovery captures enum value "ACTIVITY_TYPE_INIT_USER_EMAIL_RECOVERY" - ActivityTypeInitUserEmailRecovery ActivityType = "ACTIVITY_TYPE_INIT_USER_EMAIL_RECOVERY" + // ACTIVITYTYPEINITUSEREMAILRECOVERY captures enum value "ACTIVITY_TYPE_INIT_USER_EMAIL_RECOVERY" + ACTIVITYTYPEINITUSEREMAILRECOVERY ActivityType = "ACTIVITY_TYPE_INIT_USER_EMAIL_RECOVERY" - // ActivityTypeRecoverUser captures enum value "ACTIVITY_TYPE_RECOVER_USER" - ActivityTypeRecoverUser ActivityType = "ACTIVITY_TYPE_RECOVER_USER" + // ACTIVITYTYPERECOVERUSER captures enum value "ACTIVITY_TYPE_RECOVER_USER" + ACTIVITYTYPERECOVERUSER ActivityType = "ACTIVITY_TYPE_RECOVER_USER" - // ActivityTypeSetOrganizationFeature captures enum value "ACTIVITY_TYPE_SET_ORGANIZATION_FEATURE" - ActivityTypeSetOrganizationFeature ActivityType = "ACTIVITY_TYPE_SET_ORGANIZATION_FEATURE" + // ACTIVITYTYPESETORGANIZATIONFEATURE captures enum value "ACTIVITY_TYPE_SET_ORGANIZATION_FEATURE" + ACTIVITYTYPESETORGANIZATIONFEATURE ActivityType = "ACTIVITY_TYPE_SET_ORGANIZATION_FEATURE" - // ActivityTypeRemoveOrganizationFeature captures enum value "ACTIVITY_TYPE_REMOVE_ORGANIZATION_FEATURE" - ActivityTypeRemoveOrganizationFeature ActivityType = "ACTIVITY_TYPE_REMOVE_ORGANIZATION_FEATURE" + // ACTIVITYTYPEREMOVEORGANIZATIONFEATURE captures enum value "ACTIVITY_TYPE_REMOVE_ORGANIZATION_FEATURE" + ACTIVITYTYPEREMOVEORGANIZATIONFEATURE ActivityType = "ACTIVITY_TYPE_REMOVE_ORGANIZATION_FEATURE" - // ActivityTypeSignRawPayloadV2 captures enum value "ACTIVITY_TYPE_SIGN_RAW_PAYLOAD_V2" - ActivityTypeSignRawPayloadV2 ActivityType = "ACTIVITY_TYPE_SIGN_RAW_PAYLOAD_V2" + // ACTIVITYTYPESIGNRAWPAYLOADV2 captures enum value "ACTIVITY_TYPE_SIGN_RAW_PAYLOAD_V2" + ACTIVITYTYPESIGNRAWPAYLOADV2 ActivityType = "ACTIVITY_TYPE_SIGN_RAW_PAYLOAD_V2" - // ActivityTypeSignTransactionV2 captures enum value "ACTIVITY_TYPE_SIGN_TRANSACTION_V2" - ActivityTypeSignTransactionV2 ActivityType = "ACTIVITY_TYPE_SIGN_TRANSACTION_V2" + // ACTIVITYTYPESIGNTRANSACTIONV2 captures enum value "ACTIVITY_TYPE_SIGN_TRANSACTION_V2" + ACTIVITYTYPESIGNTRANSACTIONV2 ActivityType = "ACTIVITY_TYPE_SIGN_TRANSACTION_V2" - // ActivityTypeExportPrivateKey captures enum value "ACTIVITY_TYPE_EXPORT_PRIVATE_KEY" - ActivityTypeExportPrivateKey ActivityType = "ACTIVITY_TYPE_EXPORT_PRIVATE_KEY" + // ACTIVITYTYPEEXPORTPRIVATEKEY captures enum value "ACTIVITY_TYPE_EXPORT_PRIVATE_KEY" + ACTIVITYTYPEEXPORTPRIVATEKEY ActivityType = "ACTIVITY_TYPE_EXPORT_PRIVATE_KEY" - // ActivityTypeExportWallet captures enum value "ACTIVITY_TYPE_EXPORT_WALLET" - ActivityTypeExportWallet ActivityType = "ACTIVITY_TYPE_EXPORT_WALLET" + // ACTIVITYTYPEEXPORTWALLET captures enum value "ACTIVITY_TYPE_EXPORT_WALLET" + ACTIVITYTYPEEXPORTWALLET ActivityType = "ACTIVITY_TYPE_EXPORT_WALLET" - // ActivityTypeCreateSubOrganizationV4 captures enum value "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V4" - ActivityTypeCreateSubOrganizationV4 ActivityType = "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V4" + // ACTIVITYTYPECREATESUBORGANIZATIONV4 captures enum value "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V4" + ACTIVITYTYPECREATESUBORGANIZATIONV4 ActivityType = "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V4" - // ActivityTypeEmailAuth captures enum value "ACTIVITY_TYPE_EMAIL_AUTH" - ActivityTypeEmailAuth ActivityType = "ACTIVITY_TYPE_EMAIL_AUTH" + // ACTIVITYTYPEEMAILAUTH captures enum value "ACTIVITY_TYPE_EMAIL_AUTH" + ACTIVITYTYPEEMAILAUTH ActivityType = "ACTIVITY_TYPE_EMAIL_AUTH" - // ActivityTypeExportWalletAccount captures enum value "ACTIVITY_TYPE_EXPORT_WALLET_ACCOUNT" - ActivityTypeExportWalletAccount ActivityType = "ACTIVITY_TYPE_EXPORT_WALLET_ACCOUNT" + // ACTIVITYTYPEEXPORTWALLETACCOUNT captures enum value "ACTIVITY_TYPE_EXPORT_WALLET_ACCOUNT" + ACTIVITYTYPEEXPORTWALLETACCOUNT ActivityType = "ACTIVITY_TYPE_EXPORT_WALLET_ACCOUNT" - // ActivityTypeInitImportWallet captures enum value "ACTIVITY_TYPE_INIT_IMPORT_WALLET" - ActivityTypeInitImportWallet ActivityType = "ACTIVITY_TYPE_INIT_IMPORT_WALLET" + // ACTIVITYTYPEINITIMPORTWALLET captures enum value "ACTIVITY_TYPE_INIT_IMPORT_WALLET" + ACTIVITYTYPEINITIMPORTWALLET ActivityType = "ACTIVITY_TYPE_INIT_IMPORT_WALLET" - // ActivityTypeImportWallet captures enum value "ACTIVITY_TYPE_IMPORT_WALLET" - ActivityTypeImportWallet ActivityType = "ACTIVITY_TYPE_IMPORT_WALLET" + // ACTIVITYTYPEIMPORTWALLET captures enum value "ACTIVITY_TYPE_IMPORT_WALLET" + ACTIVITYTYPEIMPORTWALLET ActivityType = "ACTIVITY_TYPE_IMPORT_WALLET" - // ActivityTypeInitImportPrivateKey captures enum value "ACTIVITY_TYPE_INIT_IMPORT_PRIVATE_KEY" - ActivityTypeInitImportPrivateKey ActivityType = "ACTIVITY_TYPE_INIT_IMPORT_PRIVATE_KEY" + // ACTIVITYTYPEINITIMPORTPRIVATEKEY captures enum value "ACTIVITY_TYPE_INIT_IMPORT_PRIVATE_KEY" + ACTIVITYTYPEINITIMPORTPRIVATEKEY ActivityType = "ACTIVITY_TYPE_INIT_IMPORT_PRIVATE_KEY" - // ActivityTypeImportPrivateKey captures enum value "ACTIVITY_TYPE_IMPORT_PRIVATE_KEY" - ActivityTypeImportPrivateKey ActivityType = "ACTIVITY_TYPE_IMPORT_PRIVATE_KEY" + // ACTIVITYTYPEIMPORTPRIVATEKEY captures enum value "ACTIVITY_TYPE_IMPORT_PRIVATE_KEY" + ACTIVITYTYPEIMPORTPRIVATEKEY ActivityType = "ACTIVITY_TYPE_IMPORT_PRIVATE_KEY" - // ActivityTypeCreatePolicies captures enum value "ACTIVITY_TYPE_CREATE_POLICIES" - ActivityTypeCreatePolicies ActivityType = "ACTIVITY_TYPE_CREATE_POLICIES" + // ACTIVITYTYPECREATEPOLICIES captures enum value "ACTIVITY_TYPE_CREATE_POLICIES" + ACTIVITYTYPECREATEPOLICIES ActivityType = "ACTIVITY_TYPE_CREATE_POLICIES" - // ActivityTypeSignRawPayloads captures enum value "ACTIVITY_TYPE_SIGN_RAW_PAYLOADS" - ActivityTypeSignRawPayloads ActivityType = "ACTIVITY_TYPE_SIGN_RAW_PAYLOADS" + // ACTIVITYTYPESIGNRAWPAYLOADS captures enum value "ACTIVITY_TYPE_SIGN_RAW_PAYLOADS" + ACTIVITYTYPESIGNRAWPAYLOADS ActivityType = "ACTIVITY_TYPE_SIGN_RAW_PAYLOADS" - // ActivityTypeCreateReadOnlySession captures enum value "ACTIVITY_TYPE_CREATE_READ_ONLY_SESSION" - ActivityTypeCreateReadOnlySession ActivityType = "ACTIVITY_TYPE_CREATE_READ_ONLY_SESSION" + // ACTIVITYTYPECREATEREADONLYSESSION captures enum value "ACTIVITY_TYPE_CREATE_READ_ONLY_SESSION" + ACTIVITYTYPECREATEREADONLYSESSION ActivityType = "ACTIVITY_TYPE_CREATE_READ_ONLY_SESSION" - // ActivityTypeCreateOauthProviders captures enum value "ACTIVITY_TYPE_CREATE_OAUTH_PROVIDERS" - ActivityTypeCreateOauthProviders ActivityType = "ACTIVITY_TYPE_CREATE_OAUTH_PROVIDERS" + // ACTIVITYTYPECREATEOAUTHPROVIDERS captures enum value "ACTIVITY_TYPE_CREATE_OAUTH_PROVIDERS" + ACTIVITYTYPECREATEOAUTHPROVIDERS ActivityType = "ACTIVITY_TYPE_CREATE_OAUTH_PROVIDERS" - // ActivityTypeDeleteOauthProviders captures enum value "ACTIVITY_TYPE_DELETE_OAUTH_PROVIDERS" - ActivityTypeDeleteOauthProviders ActivityType = "ACTIVITY_TYPE_DELETE_OAUTH_PROVIDERS" + // ACTIVITYTYPEDELETEOAUTHPROVIDERS captures enum value "ACTIVITY_TYPE_DELETE_OAUTH_PROVIDERS" + ACTIVITYTYPEDELETEOAUTHPROVIDERS ActivityType = "ACTIVITY_TYPE_DELETE_OAUTH_PROVIDERS" - // ActivityTypeCreateSubOrganizationV5 captures enum value "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V5" - ActivityTypeCreateSubOrganizationV5 ActivityType = "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V5" + // ACTIVITYTYPECREATESUBORGANIZATIONV5 captures enum value "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V5" + ACTIVITYTYPECREATESUBORGANIZATIONV5 ActivityType = "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V5" - // ActivityTypeOauth captures enum value "ACTIVITY_TYPE_OAUTH" - ActivityTypeOauth ActivityType = "ACTIVITY_TYPE_OAUTH" + // ACTIVITYTYPEOAUTH captures enum value "ACTIVITY_TYPE_OAUTH" + ACTIVITYTYPEOAUTH ActivityType = "ACTIVITY_TYPE_OAUTH" - // ActivityTypeCreateAPIKeysV2 captures enum value "ACTIVITY_TYPE_CREATE_API_KEYS_V2" - ActivityTypeCreateAPIKeysV2 ActivityType = "ACTIVITY_TYPE_CREATE_API_KEYS_V2" + // ACTIVITYTYPECREATEAPIKEYSV2 captures enum value "ACTIVITY_TYPE_CREATE_API_KEYS_V2" + ACTIVITYTYPECREATEAPIKEYSV2 ActivityType = "ACTIVITY_TYPE_CREATE_API_KEYS_V2" - // ActivityTypeCreateReadWriteSession captures enum value "ACTIVITY_TYPE_CREATE_READ_WRITE_SESSION" - ActivityTypeCreateReadWriteSession ActivityType = "ACTIVITY_TYPE_CREATE_READ_WRITE_SESSION" + // ACTIVITYTYPECREATEREADWRITESESSION captures enum value "ACTIVITY_TYPE_CREATE_READ_WRITE_SESSION" + ACTIVITYTYPECREATEREADWRITESESSION ActivityType = "ACTIVITY_TYPE_CREATE_READ_WRITE_SESSION" - // ActivityTypeEmailAuthV2 captures enum value "ACTIVITY_TYPE_EMAIL_AUTH_V2" - ActivityTypeEmailAuthV2 ActivityType = "ACTIVITY_TYPE_EMAIL_AUTH_V2" + // ACTIVITYTYPEEMAILAUTHV2 captures enum value "ACTIVITY_TYPE_EMAIL_AUTH_V2" + ACTIVITYTYPEEMAILAUTHV2 ActivityType = "ACTIVITY_TYPE_EMAIL_AUTH_V2" - // ActivityTypeCreateSubOrganizationV6 captures enum value "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V6" - ActivityTypeCreateSubOrganizationV6 ActivityType = "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V6" + // ACTIVITYTYPECREATESUBORGANIZATIONV6 captures enum value "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V6" + ACTIVITYTYPECREATESUBORGANIZATIONV6 ActivityType = "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V6" - // ActivityTypeDeletePrivateKeys captures enum value "ACTIVITY_TYPE_DELETE_PRIVATE_KEYS" - ActivityTypeDeletePrivateKeys ActivityType = "ACTIVITY_TYPE_DELETE_PRIVATE_KEYS" + // ACTIVITYTYPEDELETEPRIVATEKEYS captures enum value "ACTIVITY_TYPE_DELETE_PRIVATE_KEYS" + ACTIVITYTYPEDELETEPRIVATEKEYS ActivityType = "ACTIVITY_TYPE_DELETE_PRIVATE_KEYS" - // ActivityTypeDeleteWallets captures enum value "ACTIVITY_TYPE_DELETE_WALLETS" - ActivityTypeDeleteWallets ActivityType = "ACTIVITY_TYPE_DELETE_WALLETS" + // ACTIVITYTYPEDELETEWALLETS captures enum value "ACTIVITY_TYPE_DELETE_WALLETS" + ACTIVITYTYPEDELETEWALLETS ActivityType = "ACTIVITY_TYPE_DELETE_WALLETS" - // ActivityTypeCreateReadWriteSessionV2 captures enum value "ACTIVITY_TYPE_CREATE_READ_WRITE_SESSION_V2" - ActivityTypeCreateReadWriteSessionV2 ActivityType = "ACTIVITY_TYPE_CREATE_READ_WRITE_SESSION_V2" + // ACTIVITYTYPECREATEREADWRITESESSIONV2 captures enum value "ACTIVITY_TYPE_CREATE_READ_WRITE_SESSION_V2" + ACTIVITYTYPECREATEREADWRITESESSIONV2 ActivityType = "ACTIVITY_TYPE_CREATE_READ_WRITE_SESSION_V2" + + // ACTIVITYTYPEDELETESUBORGANIZATION captures enum value "ACTIVITY_TYPE_DELETE_SUB_ORGANIZATION" + ACTIVITYTYPEDELETESUBORGANIZATION ActivityType = "ACTIVITY_TYPE_DELETE_SUB_ORGANIZATION" ) // for schema @@ -261,7 +264,7 @@ var ActivityTypeEnum []ActivityType func init() { var res []ActivityType - if err := json.Unmarshal([]byte(`["ACTIVITY_TYPE_CREATE_API_KEYS","ACTIVITY_TYPE_CREATE_USERS","ACTIVITY_TYPE_CREATE_PRIVATE_KEYS","ACTIVITY_TYPE_SIGN_RAW_PAYLOAD","ACTIVITY_TYPE_CREATE_INVITATIONS","ACTIVITY_TYPE_ACCEPT_INVITATION","ACTIVITY_TYPE_CREATE_POLICY","ACTIVITY_TYPE_DISABLE_PRIVATE_KEY","ACTIVITY_TYPE_DELETE_USERS","ACTIVITY_TYPE_DELETE_API_KEYS","ACTIVITY_TYPE_DELETE_INVITATION","ACTIVITY_TYPE_DELETE_ORGANIZATION","ACTIVITY_TYPE_DELETE_POLICY","ACTIVITY_TYPE_CREATE_USER_TAG","ACTIVITY_TYPE_DELETE_USER_TAGS","ACTIVITY_TYPE_CREATE_ORGANIZATION","ACTIVITY_TYPE_SIGN_TRANSACTION","ACTIVITY_TYPE_APPROVE_ACTIVITY","ACTIVITY_TYPE_REJECT_ACTIVITY","ACTIVITY_TYPE_DELETE_AUTHENTICATORS","ACTIVITY_TYPE_CREATE_AUTHENTICATORS","ACTIVITY_TYPE_CREATE_PRIVATE_KEY_TAG","ACTIVITY_TYPE_DELETE_PRIVATE_KEY_TAGS","ACTIVITY_TYPE_SET_PAYMENT_METHOD","ACTIVITY_TYPE_ACTIVATE_BILLING_TIER","ACTIVITY_TYPE_DELETE_PAYMENT_METHOD","ACTIVITY_TYPE_CREATE_POLICY_V2","ACTIVITY_TYPE_CREATE_POLICY_V3","ACTIVITY_TYPE_CREATE_API_ONLY_USERS","ACTIVITY_TYPE_UPDATE_ROOT_QUORUM","ACTIVITY_TYPE_UPDATE_USER_TAG","ACTIVITY_TYPE_UPDATE_PRIVATE_KEY_TAG","ACTIVITY_TYPE_CREATE_AUTHENTICATORS_V2","ACTIVITY_TYPE_CREATE_ORGANIZATION_V2","ACTIVITY_TYPE_CREATE_USERS_V2","ACTIVITY_TYPE_ACCEPT_INVITATION_V2","ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION","ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V2","ACTIVITY_TYPE_UPDATE_ALLOWED_ORIGINS","ACTIVITY_TYPE_CREATE_PRIVATE_KEYS_V2","ACTIVITY_TYPE_UPDATE_USER","ACTIVITY_TYPE_UPDATE_POLICY","ACTIVITY_TYPE_SET_PAYMENT_METHOD_V2","ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V3","ACTIVITY_TYPE_CREATE_WALLET","ACTIVITY_TYPE_CREATE_WALLET_ACCOUNTS","ACTIVITY_TYPE_INIT_USER_EMAIL_RECOVERY","ACTIVITY_TYPE_RECOVER_USER","ACTIVITY_TYPE_SET_ORGANIZATION_FEATURE","ACTIVITY_TYPE_REMOVE_ORGANIZATION_FEATURE","ACTIVITY_TYPE_SIGN_RAW_PAYLOAD_V2","ACTIVITY_TYPE_SIGN_TRANSACTION_V2","ACTIVITY_TYPE_EXPORT_PRIVATE_KEY","ACTIVITY_TYPE_EXPORT_WALLET","ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V4","ACTIVITY_TYPE_EMAIL_AUTH","ACTIVITY_TYPE_EXPORT_WALLET_ACCOUNT","ACTIVITY_TYPE_INIT_IMPORT_WALLET","ACTIVITY_TYPE_IMPORT_WALLET","ACTIVITY_TYPE_INIT_IMPORT_PRIVATE_KEY","ACTIVITY_TYPE_IMPORT_PRIVATE_KEY","ACTIVITY_TYPE_CREATE_POLICIES","ACTIVITY_TYPE_SIGN_RAW_PAYLOADS","ACTIVITY_TYPE_CREATE_READ_ONLY_SESSION","ACTIVITY_TYPE_CREATE_OAUTH_PROVIDERS","ACTIVITY_TYPE_DELETE_OAUTH_PROVIDERS","ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V5","ACTIVITY_TYPE_OAUTH","ACTIVITY_TYPE_CREATE_API_KEYS_V2","ACTIVITY_TYPE_CREATE_READ_WRITE_SESSION","ACTIVITY_TYPE_EMAIL_AUTH_V2","ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V6","ACTIVITY_TYPE_DELETE_PRIVATE_KEYS","ACTIVITY_TYPE_DELETE_WALLETS","ACTIVITY_TYPE_CREATE_READ_WRITE_SESSION_V2"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["ACTIVITY_TYPE_CREATE_API_KEYS","ACTIVITY_TYPE_CREATE_USERS","ACTIVITY_TYPE_CREATE_PRIVATE_KEYS","ACTIVITY_TYPE_SIGN_RAW_PAYLOAD","ACTIVITY_TYPE_CREATE_INVITATIONS","ACTIVITY_TYPE_ACCEPT_INVITATION","ACTIVITY_TYPE_CREATE_POLICY","ACTIVITY_TYPE_DISABLE_PRIVATE_KEY","ACTIVITY_TYPE_DELETE_USERS","ACTIVITY_TYPE_DELETE_API_KEYS","ACTIVITY_TYPE_DELETE_INVITATION","ACTIVITY_TYPE_DELETE_ORGANIZATION","ACTIVITY_TYPE_DELETE_POLICY","ACTIVITY_TYPE_CREATE_USER_TAG","ACTIVITY_TYPE_DELETE_USER_TAGS","ACTIVITY_TYPE_CREATE_ORGANIZATION","ACTIVITY_TYPE_SIGN_TRANSACTION","ACTIVITY_TYPE_APPROVE_ACTIVITY","ACTIVITY_TYPE_REJECT_ACTIVITY","ACTIVITY_TYPE_DELETE_AUTHENTICATORS","ACTIVITY_TYPE_CREATE_AUTHENTICATORS","ACTIVITY_TYPE_CREATE_PRIVATE_KEY_TAG","ACTIVITY_TYPE_DELETE_PRIVATE_KEY_TAGS","ACTIVITY_TYPE_SET_PAYMENT_METHOD","ACTIVITY_TYPE_ACTIVATE_BILLING_TIER","ACTIVITY_TYPE_DELETE_PAYMENT_METHOD","ACTIVITY_TYPE_CREATE_POLICY_V2","ACTIVITY_TYPE_CREATE_POLICY_V3","ACTIVITY_TYPE_CREATE_API_ONLY_USERS","ACTIVITY_TYPE_UPDATE_ROOT_QUORUM","ACTIVITY_TYPE_UPDATE_USER_TAG","ACTIVITY_TYPE_UPDATE_PRIVATE_KEY_TAG","ACTIVITY_TYPE_CREATE_AUTHENTICATORS_V2","ACTIVITY_TYPE_CREATE_ORGANIZATION_V2","ACTIVITY_TYPE_CREATE_USERS_V2","ACTIVITY_TYPE_ACCEPT_INVITATION_V2","ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION","ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V2","ACTIVITY_TYPE_UPDATE_ALLOWED_ORIGINS","ACTIVITY_TYPE_CREATE_PRIVATE_KEYS_V2","ACTIVITY_TYPE_UPDATE_USER","ACTIVITY_TYPE_UPDATE_POLICY","ACTIVITY_TYPE_SET_PAYMENT_METHOD_V2","ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V3","ACTIVITY_TYPE_CREATE_WALLET","ACTIVITY_TYPE_CREATE_WALLET_ACCOUNTS","ACTIVITY_TYPE_INIT_USER_EMAIL_RECOVERY","ACTIVITY_TYPE_RECOVER_USER","ACTIVITY_TYPE_SET_ORGANIZATION_FEATURE","ACTIVITY_TYPE_REMOVE_ORGANIZATION_FEATURE","ACTIVITY_TYPE_SIGN_RAW_PAYLOAD_V2","ACTIVITY_TYPE_SIGN_TRANSACTION_V2","ACTIVITY_TYPE_EXPORT_PRIVATE_KEY","ACTIVITY_TYPE_EXPORT_WALLET","ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V4","ACTIVITY_TYPE_EMAIL_AUTH","ACTIVITY_TYPE_EXPORT_WALLET_ACCOUNT","ACTIVITY_TYPE_INIT_IMPORT_WALLET","ACTIVITY_TYPE_IMPORT_WALLET","ACTIVITY_TYPE_INIT_IMPORT_PRIVATE_KEY","ACTIVITY_TYPE_IMPORT_PRIVATE_KEY","ACTIVITY_TYPE_CREATE_POLICIES","ACTIVITY_TYPE_SIGN_RAW_PAYLOADS","ACTIVITY_TYPE_CREATE_READ_ONLY_SESSION","ACTIVITY_TYPE_CREATE_OAUTH_PROVIDERS","ACTIVITY_TYPE_DELETE_OAUTH_PROVIDERS","ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V5","ACTIVITY_TYPE_OAUTH","ACTIVITY_TYPE_CREATE_API_KEYS_V2","ACTIVITY_TYPE_CREATE_READ_WRITE_SESSION","ACTIVITY_TYPE_EMAIL_AUTH_V2","ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V6","ACTIVITY_TYPE_DELETE_PRIVATE_KEYS","ACTIVITY_TYPE_DELETE_WALLETS","ACTIVITY_TYPE_CREATE_READ_WRITE_SESSION_V2","ACTIVITY_TYPE_DELETE_SUB_ORGANIZATION"]`), &res); err != nil { panic(err) } for _, v := range res { diff --git a/pkg/api/models/address_format.go b/pkg/api/models/address_format.go index 5a6bafd..9709928 100644 --- a/pkg/api/models/address_format.go +++ b/pkg/api/models/address_format.go @@ -30,23 +30,89 @@ func (m AddressFormat) Pointer() *AddressFormat { const ( - // AddressFormatUncompressed captures enum value "ADDRESS_FORMAT_UNCOMPRESSED" - AddressFormatUncompressed AddressFormat = "ADDRESS_FORMAT_UNCOMPRESSED" + // ADDRESSFORMATUNCOMPRESSED captures enum value "ADDRESS_FORMAT_UNCOMPRESSED" + ADDRESSFORMATUNCOMPRESSED AddressFormat = "ADDRESS_FORMAT_UNCOMPRESSED" - // AddressFormatCompressed captures enum value "ADDRESS_FORMAT_COMPRESSED" - AddressFormatCompressed AddressFormat = "ADDRESS_FORMAT_COMPRESSED" + // ADDRESSFORMATCOMPRESSED captures enum value "ADDRESS_FORMAT_COMPRESSED" + ADDRESSFORMATCOMPRESSED AddressFormat = "ADDRESS_FORMAT_COMPRESSED" - // AddressFormatEthereum captures enum value "ADDRESS_FORMAT_ETHEREUM" - AddressFormatEthereum AddressFormat = "ADDRESS_FORMAT_ETHEREUM" + // ADDRESSFORMATETHEREUM captures enum value "ADDRESS_FORMAT_ETHEREUM" + ADDRESSFORMATETHEREUM AddressFormat = "ADDRESS_FORMAT_ETHEREUM" - // AddressFormatSolana captures enum value "ADDRESS_FORMAT_SOLANA" - AddressFormatSolana AddressFormat = "ADDRESS_FORMAT_SOLANA" + // ADDRESSFORMATSOLANA captures enum value "ADDRESS_FORMAT_SOLANA" + ADDRESSFORMATSOLANA AddressFormat = "ADDRESS_FORMAT_SOLANA" - // AddressFormatCosmos captures enum value "ADDRESS_FORMAT_COSMOS" - AddressFormatCosmos AddressFormat = "ADDRESS_FORMAT_COSMOS" + // ADDRESSFORMATCOSMOS captures enum value "ADDRESS_FORMAT_COSMOS" + ADDRESSFORMATCOSMOS AddressFormat = "ADDRESS_FORMAT_COSMOS" - // AddressFormatTron captures enum value "ADDRESS_FORMAT_TRON" - AddressFormatTron AddressFormat = "ADDRESS_FORMAT_TRON" + // ADDRESSFORMATTRON captures enum value "ADDRESS_FORMAT_TRON" + ADDRESSFORMATTRON AddressFormat = "ADDRESS_FORMAT_TRON" + + // ADDRESSFORMATSUI captures enum value "ADDRESS_FORMAT_SUI" + ADDRESSFORMATSUI AddressFormat = "ADDRESS_FORMAT_SUI" + + // ADDRESSFORMATAPTOS captures enum value "ADDRESS_FORMAT_APTOS" + ADDRESSFORMATAPTOS AddressFormat = "ADDRESS_FORMAT_APTOS" + + // ADDRESSFORMATBITCOINMAINNETP2PKH captures enum value "ADDRESS_FORMAT_BITCOIN_MAINNET_P2PKH" + ADDRESSFORMATBITCOINMAINNETP2PKH AddressFormat = "ADDRESS_FORMAT_BITCOIN_MAINNET_P2PKH" + + // ADDRESSFORMATBITCOINMAINNETP2SH captures enum value "ADDRESS_FORMAT_BITCOIN_MAINNET_P2SH" + ADDRESSFORMATBITCOINMAINNETP2SH AddressFormat = "ADDRESS_FORMAT_BITCOIN_MAINNET_P2SH" + + // ADDRESSFORMATBITCOINMAINNETP2WPKH captures enum value "ADDRESS_FORMAT_BITCOIN_MAINNET_P2WPKH" + ADDRESSFORMATBITCOINMAINNETP2WPKH AddressFormat = "ADDRESS_FORMAT_BITCOIN_MAINNET_P2WPKH" + + // ADDRESSFORMATBITCOINMAINNETP2WSH captures enum value "ADDRESS_FORMAT_BITCOIN_MAINNET_P2WSH" + ADDRESSFORMATBITCOINMAINNETP2WSH AddressFormat = "ADDRESS_FORMAT_BITCOIN_MAINNET_P2WSH" + + // ADDRESSFORMATBITCOINMAINNETP2TR captures enum value "ADDRESS_FORMAT_BITCOIN_MAINNET_P2TR" + ADDRESSFORMATBITCOINMAINNETP2TR AddressFormat = "ADDRESS_FORMAT_BITCOIN_MAINNET_P2TR" + + // ADDRESSFORMATBITCOINTESTNETP2PKH captures enum value "ADDRESS_FORMAT_BITCOIN_TESTNET_P2PKH" + ADDRESSFORMATBITCOINTESTNETP2PKH AddressFormat = "ADDRESS_FORMAT_BITCOIN_TESTNET_P2PKH" + + // ADDRESSFORMATBITCOINTESTNETP2SH captures enum value "ADDRESS_FORMAT_BITCOIN_TESTNET_P2SH" + ADDRESSFORMATBITCOINTESTNETP2SH AddressFormat = "ADDRESS_FORMAT_BITCOIN_TESTNET_P2SH" + + // ADDRESSFORMATBITCOINTESTNETP2WPKH captures enum value "ADDRESS_FORMAT_BITCOIN_TESTNET_P2WPKH" + ADDRESSFORMATBITCOINTESTNETP2WPKH AddressFormat = "ADDRESS_FORMAT_BITCOIN_TESTNET_P2WPKH" + + // ADDRESSFORMATBITCOINTESTNETP2WSH captures enum value "ADDRESS_FORMAT_BITCOIN_TESTNET_P2WSH" + ADDRESSFORMATBITCOINTESTNETP2WSH AddressFormat = "ADDRESS_FORMAT_BITCOIN_TESTNET_P2WSH" + + // ADDRESSFORMATBITCOINTESTNETP2TR captures enum value "ADDRESS_FORMAT_BITCOIN_TESTNET_P2TR" + ADDRESSFORMATBITCOINTESTNETP2TR AddressFormat = "ADDRESS_FORMAT_BITCOIN_TESTNET_P2TR" + + // ADDRESSFORMATBITCOINSIGNETP2PKH captures enum value "ADDRESS_FORMAT_BITCOIN_SIGNET_P2PKH" + ADDRESSFORMATBITCOINSIGNETP2PKH AddressFormat = "ADDRESS_FORMAT_BITCOIN_SIGNET_P2PKH" + + // ADDRESSFORMATBITCOINSIGNETP2SH captures enum value "ADDRESS_FORMAT_BITCOIN_SIGNET_P2SH" + ADDRESSFORMATBITCOINSIGNETP2SH AddressFormat = "ADDRESS_FORMAT_BITCOIN_SIGNET_P2SH" + + // ADDRESSFORMATBITCOINSIGNETP2WPKH captures enum value "ADDRESS_FORMAT_BITCOIN_SIGNET_P2WPKH" + ADDRESSFORMATBITCOINSIGNETP2WPKH AddressFormat = "ADDRESS_FORMAT_BITCOIN_SIGNET_P2WPKH" + + // ADDRESSFORMATBITCOINSIGNETP2WSH captures enum value "ADDRESS_FORMAT_BITCOIN_SIGNET_P2WSH" + ADDRESSFORMATBITCOINSIGNETP2WSH AddressFormat = "ADDRESS_FORMAT_BITCOIN_SIGNET_P2WSH" + + // ADDRESSFORMATBITCOINSIGNETP2TR captures enum value "ADDRESS_FORMAT_BITCOIN_SIGNET_P2TR" + ADDRESSFORMATBITCOINSIGNETP2TR AddressFormat = "ADDRESS_FORMAT_BITCOIN_SIGNET_P2TR" + + // ADDRESSFORMATBITCOINREGTESTP2PKH captures enum value "ADDRESS_FORMAT_BITCOIN_REGTEST_P2PKH" + ADDRESSFORMATBITCOINREGTESTP2PKH AddressFormat = "ADDRESS_FORMAT_BITCOIN_REGTEST_P2PKH" + + // ADDRESSFORMATBITCOINREGTESTP2SH captures enum value "ADDRESS_FORMAT_BITCOIN_REGTEST_P2SH" + ADDRESSFORMATBITCOINREGTESTP2SH AddressFormat = "ADDRESS_FORMAT_BITCOIN_REGTEST_P2SH" + + // ADDRESSFORMATBITCOINREGTESTP2WPKH captures enum value "ADDRESS_FORMAT_BITCOIN_REGTEST_P2WPKH" + ADDRESSFORMATBITCOINREGTESTP2WPKH AddressFormat = "ADDRESS_FORMAT_BITCOIN_REGTEST_P2WPKH" + + // ADDRESSFORMATBITCOINREGTESTP2WSH captures enum value "ADDRESS_FORMAT_BITCOIN_REGTEST_P2WSH" + ADDRESSFORMATBITCOINREGTESTP2WSH AddressFormat = "ADDRESS_FORMAT_BITCOIN_REGTEST_P2WSH" + + // ADDRESSFORMATBITCOINREGTESTP2TR captures enum value "ADDRESS_FORMAT_BITCOIN_REGTEST_P2TR" + ADDRESSFORMATBITCOINREGTESTP2TR AddressFormat = "ADDRESS_FORMAT_BITCOIN_REGTEST_P2TR" ) // for schema @@ -54,7 +120,7 @@ var AddressFormatEnum []AddressFormat func init() { var res []AddressFormat - if err := json.Unmarshal([]byte(`["ADDRESS_FORMAT_UNCOMPRESSED","ADDRESS_FORMAT_COMPRESSED","ADDRESS_FORMAT_ETHEREUM","ADDRESS_FORMAT_SOLANA","ADDRESS_FORMAT_COSMOS","ADDRESS_FORMAT_TRON"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["ADDRESS_FORMAT_UNCOMPRESSED","ADDRESS_FORMAT_COMPRESSED","ADDRESS_FORMAT_ETHEREUM","ADDRESS_FORMAT_SOLANA","ADDRESS_FORMAT_COSMOS","ADDRESS_FORMAT_TRON","ADDRESS_FORMAT_SUI","ADDRESS_FORMAT_APTOS","ADDRESS_FORMAT_BITCOIN_MAINNET_P2PKH","ADDRESS_FORMAT_BITCOIN_MAINNET_P2SH","ADDRESS_FORMAT_BITCOIN_MAINNET_P2WPKH","ADDRESS_FORMAT_BITCOIN_MAINNET_P2WSH","ADDRESS_FORMAT_BITCOIN_MAINNET_P2TR","ADDRESS_FORMAT_BITCOIN_TESTNET_P2PKH","ADDRESS_FORMAT_BITCOIN_TESTNET_P2SH","ADDRESS_FORMAT_BITCOIN_TESTNET_P2WPKH","ADDRESS_FORMAT_BITCOIN_TESTNET_P2WSH","ADDRESS_FORMAT_BITCOIN_TESTNET_P2TR","ADDRESS_FORMAT_BITCOIN_SIGNET_P2PKH","ADDRESS_FORMAT_BITCOIN_SIGNET_P2SH","ADDRESS_FORMAT_BITCOIN_SIGNET_P2WPKH","ADDRESS_FORMAT_BITCOIN_SIGNET_P2WSH","ADDRESS_FORMAT_BITCOIN_SIGNET_P2TR","ADDRESS_FORMAT_BITCOIN_REGTEST_P2PKH","ADDRESS_FORMAT_BITCOIN_REGTEST_P2SH","ADDRESS_FORMAT_BITCOIN_REGTEST_P2WPKH","ADDRESS_FORMAT_BITCOIN_REGTEST_P2WSH","ADDRESS_FORMAT_BITCOIN_REGTEST_P2TR"]`), &res); err != nil { panic(err) } for _, v := range res { diff --git a/pkg/api/models/any.go b/pkg/api/models/any.go index c0b479d..7f4cc7d 100644 --- a/pkg/api/models/any.go +++ b/pkg/api/models/any.go @@ -7,6 +7,7 @@ package models import ( "context" + "encoding/json" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" @@ -19,6 +20,82 @@ type Any struct { // at type AtType string `json:"@type,omitempty"` + + // any + Any map[string]interface{} `json:"-"` +} + +// UnmarshalJSON unmarshals this object with additional properties from JSON +func (m *Any) UnmarshalJSON(data []byte) error { + // stage 1, bind the properties + var stage1 struct { + + // at type + AtType string `json:"@type,omitempty"` + } + if err := json.Unmarshal(data, &stage1); err != nil { + return err + } + var rcv Any + + rcv.AtType = stage1.AtType + *m = rcv + + // stage 2, remove properties and add to map + stage2 := make(map[string]json.RawMessage) + if err := json.Unmarshal(data, &stage2); err != nil { + return err + } + + delete(stage2, "@type") + // stage 3, add additional properties values + if len(stage2) > 0 { + result := make(map[string]interface{}) + for k, v := range stage2 { + var toadd interface{} + if err := json.Unmarshal(v, &toadd); err != nil { + return err + } + result[k] = toadd + } + m.Any = result + } + + return nil +} + +// MarshalJSON marshals this object with additional properties into a JSON object +func (m Any) MarshalJSON() ([]byte, error) { + var stage1 struct { + + // at type + AtType string `json:"@type,omitempty"` + } + + stage1.AtType = m.AtType + + // make JSON object for known properties + props, err := json.Marshal(stage1) + if err != nil { + return nil, err + } + + if len(m.Any) == 0 { // no additional properties + return props, nil + } + + // make JSON object for the additional properties + additional, err := json.Marshal(m.Any) + if err != nil { + return nil, err + } + + if len(props) < 3 { // "{}": only additional properties + return additional, nil + } + + // concatenate the 2 objects + return swag.ConcatJSON(props, additional), nil } // Validate validates this any diff --git a/pkg/api/models/api_key_curve.go b/pkg/api/models/api_key_curve.go index 17ed099..663b475 100644 --- a/pkg/api/models/api_key_curve.go +++ b/pkg/api/models/api_key_curve.go @@ -30,14 +30,14 @@ func (m APIKeyCurve) Pointer() *APIKeyCurve { const ( - // APIKeyCurveP256 captures enum value "API_KEY_CURVE_P256" - APIKeyCurveP256 APIKeyCurve = "API_KEY_CURVE_P256" + // APIKEYCURVEP256 captures enum value "API_KEY_CURVE_P256" + APIKEYCURVEP256 APIKeyCurve = "API_KEY_CURVE_P256" - // APIKeyCurveSecp256k1 captures enum value "API_KEY_CURVE_SECP256K1" - APIKeyCurveSecp256k1 APIKeyCurve = "API_KEY_CURVE_SECP256K1" + // APIKEYCURVESECP256K1 captures enum value "API_KEY_CURVE_SECP256K1" + APIKEYCURVESECP256K1 APIKeyCurve = "API_KEY_CURVE_SECP256K1" - // APIKeyCurveEd25519 captures enum value "API_KEY_CURVE_ED25519" - APIKeyCurveEd25519 APIKeyCurve = "API_KEY_CURVE_ED25519" + // APIKEYCURVEED25519 captures enum value "API_KEY_CURVE_ED25519" + APIKEYCURVEED25519 APIKeyCurve = "API_KEY_CURVE_ED25519" ) // for schema diff --git a/pkg/api/models/approve_activity_request.go b/pkg/api/models/approve_activity_request.go index fb6539a..1ffb0b9 100644 --- a/pkg/api/models/approve_activity_request.go +++ b/pkg/api/models/approve_activity_request.go @@ -34,7 +34,7 @@ type ApproveActivityRequest struct { // type // Required: true - // Enum: [ACTIVITY_TYPE_APPROVE_ACTIVITY] + // Enum: ["ACTIVITY_TYPE_APPROVE_ACTIVITY"] Type *string `json:"type"` } diff --git a/pkg/api/models/authenticator_attestation_response.go b/pkg/api/models/authenticator_attestation_response.go index 56f09da..a4c82a6 100644 --- a/pkg/api/models/authenticator_attestation_response.go +++ b/pkg/api/models/authenticator_attestation_response.go @@ -26,7 +26,7 @@ type AuthenticatorAttestationResponse struct { AttestationObject *string `json:"attestationObject"` // authenticator attachment - // Enum: [cross-platform platform] + // Enum: ["cross-platform","platform"] AuthenticatorAttachment *string `json:"authenticatorAttachment,omitempty"` // client data Json diff --git a/pkg/api/models/authenticator_transport.go b/pkg/api/models/authenticator_transport.go index a181811..c3f9040 100644 --- a/pkg/api/models/authenticator_transport.go +++ b/pkg/api/models/authenticator_transport.go @@ -30,20 +30,20 @@ func (m AuthenticatorTransport) Pointer() *AuthenticatorTransport { const ( - // AuthenticatorTransportBle captures enum value "AUTHENTICATOR_TRANSPORT_BLE" - AuthenticatorTransportBle AuthenticatorTransport = "AUTHENTICATOR_TRANSPORT_BLE" + // AUTHENTICATORTRANSPORTBLE captures enum value "AUTHENTICATOR_TRANSPORT_BLE" + AUTHENTICATORTRANSPORTBLE AuthenticatorTransport = "AUTHENTICATOR_TRANSPORT_BLE" - // AuthenticatorTransportInternal captures enum value "AUTHENTICATOR_TRANSPORT_INTERNAL" - AuthenticatorTransportInternal AuthenticatorTransport = "AUTHENTICATOR_TRANSPORT_INTERNAL" + // AUTHENTICATORTRANSPORTINTERNAL captures enum value "AUTHENTICATOR_TRANSPORT_INTERNAL" + AUTHENTICATORTRANSPORTINTERNAL AuthenticatorTransport = "AUTHENTICATOR_TRANSPORT_INTERNAL" - // AuthenticatorTransportNfc captures enum value "AUTHENTICATOR_TRANSPORT_NFC" - AuthenticatorTransportNfc AuthenticatorTransport = "AUTHENTICATOR_TRANSPORT_NFC" + // AUTHENTICATORTRANSPORTNFC captures enum value "AUTHENTICATOR_TRANSPORT_NFC" + AUTHENTICATORTRANSPORTNFC AuthenticatorTransport = "AUTHENTICATOR_TRANSPORT_NFC" - // AuthenticatorTransportUsb captures enum value "AUTHENTICATOR_TRANSPORT_USB" - AuthenticatorTransportUsb AuthenticatorTransport = "AUTHENTICATOR_TRANSPORT_USB" + // AUTHENTICATORTRANSPORTUSB captures enum value "AUTHENTICATOR_TRANSPORT_USB" + AUTHENTICATORTRANSPORTUSB AuthenticatorTransport = "AUTHENTICATOR_TRANSPORT_USB" - // AuthenticatorTransportHybrid captures enum value "AUTHENTICATOR_TRANSPORT_HYBRID" - AuthenticatorTransportHybrid AuthenticatorTransport = "AUTHENTICATOR_TRANSPORT_HYBRID" + // AUTHENTICATORTRANSPORTHYBRID captures enum value "AUTHENTICATOR_TRANSPORT_HYBRID" + AUTHENTICATORTRANSPORTHYBRID AuthenticatorTransport = "AUTHENTICATOR_TRANSPORT_HYBRID" ) // for schema diff --git a/pkg/api/models/create_api_keys_request.go b/pkg/api/models/create_api_keys_request.go index 87db894..5c5484d 100644 --- a/pkg/api/models/create_api_keys_request.go +++ b/pkg/api/models/create_api_keys_request.go @@ -34,7 +34,7 @@ type CreateAPIKeysRequest struct { // type // Required: true - // Enum: [ACTIVITY_TYPE_CREATE_API_KEYS_V2] + // Enum: ["ACTIVITY_TYPE_CREATE_API_KEYS_V2"] Type *string `json:"type"` } diff --git a/pkg/api/models/create_authenticators_request.go b/pkg/api/models/create_authenticators_request.go index 7977b5d..5026399 100644 --- a/pkg/api/models/create_authenticators_request.go +++ b/pkg/api/models/create_authenticators_request.go @@ -34,7 +34,7 @@ type CreateAuthenticatorsRequest struct { // type // Required: true - // Enum: [ACTIVITY_TYPE_CREATE_AUTHENTICATORS_V2] + // Enum: ["ACTIVITY_TYPE_CREATE_AUTHENTICATORS_V2"] Type *string `json:"type"` } diff --git a/pkg/api/models/create_invitations_request.go b/pkg/api/models/create_invitations_request.go index 037548b..72dabda 100644 --- a/pkg/api/models/create_invitations_request.go +++ b/pkg/api/models/create_invitations_request.go @@ -34,7 +34,7 @@ type CreateInvitationsRequest struct { // type // Required: true - // Enum: [ACTIVITY_TYPE_CREATE_INVITATIONS] + // Enum: ["ACTIVITY_TYPE_CREATE_INVITATIONS"] Type *string `json:"type"` } diff --git a/pkg/api/models/create_oauth_providers_request.go b/pkg/api/models/create_oauth_providers_request.go index 6181e19..d986014 100644 --- a/pkg/api/models/create_oauth_providers_request.go +++ b/pkg/api/models/create_oauth_providers_request.go @@ -34,7 +34,7 @@ type CreateOauthProvidersRequest struct { // type // Required: true - // Enum: [ACTIVITY_TYPE_CREATE_OAUTH_PROVIDERS] + // Enum: ["ACTIVITY_TYPE_CREATE_OAUTH_PROVIDERS"] Type *string `json:"type"` } diff --git a/pkg/api/models/create_policies_request.go b/pkg/api/models/create_policies_request.go index 0f29ca2..3f971f0 100644 --- a/pkg/api/models/create_policies_request.go +++ b/pkg/api/models/create_policies_request.go @@ -34,7 +34,7 @@ type CreatePoliciesRequest struct { // type // Required: true - // Enum: [ACTIVITY_TYPE_CREATE_POLICIES] + // Enum: ["ACTIVITY_TYPE_CREATE_POLICIES"] Type *string `json:"type"` } diff --git a/pkg/api/models/create_policy_request.go b/pkg/api/models/create_policy_request.go index 596ae29..b7dc800 100644 --- a/pkg/api/models/create_policy_request.go +++ b/pkg/api/models/create_policy_request.go @@ -34,7 +34,7 @@ type CreatePolicyRequest struct { // type // Required: true - // Enum: [ACTIVITY_TYPE_CREATE_POLICY_V3] + // Enum: ["ACTIVITY_TYPE_CREATE_POLICY_V3"] Type *string `json:"type"` } diff --git a/pkg/api/models/create_private_key_tag_request.go b/pkg/api/models/create_private_key_tag_request.go index a642d1d..6590d6d 100644 --- a/pkg/api/models/create_private_key_tag_request.go +++ b/pkg/api/models/create_private_key_tag_request.go @@ -34,7 +34,7 @@ type CreatePrivateKeyTagRequest struct { // type // Required: true - // Enum: [ACTIVITY_TYPE_CREATE_PRIVATE_KEY_TAG] + // Enum: ["ACTIVITY_TYPE_CREATE_PRIVATE_KEY_TAG"] Type *string `json:"type"` } diff --git a/pkg/api/models/create_private_keys_request.go b/pkg/api/models/create_private_keys_request.go index 27d5fbc..b88292d 100644 --- a/pkg/api/models/create_private_keys_request.go +++ b/pkg/api/models/create_private_keys_request.go @@ -34,7 +34,7 @@ type CreatePrivateKeysRequest struct { // type // Required: true - // Enum: [ACTIVITY_TYPE_CREATE_PRIVATE_KEYS_V2] + // Enum: ["ACTIVITY_TYPE_CREATE_PRIVATE_KEYS_V2"] Type *string `json:"type"` } diff --git a/pkg/api/models/create_read_only_session_request.go b/pkg/api/models/create_read_only_session_request.go index 26b94bf..dec3826 100644 --- a/pkg/api/models/create_read_only_session_request.go +++ b/pkg/api/models/create_read_only_session_request.go @@ -34,7 +34,7 @@ type CreateReadOnlySessionRequest struct { // type // Required: true - // Enum: [ACTIVITY_TYPE_CREATE_READ_ONLY_SESSION] + // Enum: ["ACTIVITY_TYPE_CREATE_READ_ONLY_SESSION"] Type *string `json:"type"` } diff --git a/pkg/api/models/create_read_write_session_intent_v2.go b/pkg/api/models/create_read_write_session_intent_v2.go index 16598ca..b7ab168 100644 --- a/pkg/api/models/create_read_write_session_intent_v2.go +++ b/pkg/api/models/create_read_write_session_intent_v2.go @@ -30,8 +30,7 @@ type CreateReadWriteSessionIntentV2 struct { TargetPublicKey *string `json:"targetPublicKey"` // Unique identifier for a given User. - // Required: true - UserID *string `json:"userId"` + UserID string `json:"userId,omitempty"` } // Validate validates this create read write session intent v2 @@ -42,10 +41,6 @@ func (m *CreateReadWriteSessionIntentV2) Validate(formats strfmt.Registry) error res = append(res, err) } - if err := m.validateUserID(formats); err != nil { - res = append(res, err) - } - if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -61,15 +56,6 @@ func (m *CreateReadWriteSessionIntentV2) validateTargetPublicKey(formats strfmt. return nil } -func (m *CreateReadWriteSessionIntentV2) validateUserID(formats strfmt.Registry) error { - - if err := validate.Required("userId", "body", m.UserID); err != nil { - return err - } - - return nil -} - // ContextValidate validates this create read write session intent v2 based on context it is used func (m *CreateReadWriteSessionIntentV2) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil diff --git a/pkg/api/models/create_read_write_session_request.go b/pkg/api/models/create_read_write_session_request.go index 6a659e7..2c95f02 100644 --- a/pkg/api/models/create_read_write_session_request.go +++ b/pkg/api/models/create_read_write_session_request.go @@ -34,7 +34,7 @@ type CreateReadWriteSessionRequest struct { // type // Required: true - // Enum: [ACTIVITY_TYPE_CREATE_READ_WRITE_SESSION_V2] + // Enum: ["ACTIVITY_TYPE_CREATE_READ_WRITE_SESSION_V2"] Type *string `json:"type"` } diff --git a/pkg/api/models/create_sub_organization_request.go b/pkg/api/models/create_sub_organization_request.go index b61c6c5..a81f5a8 100644 --- a/pkg/api/models/create_sub_organization_request.go +++ b/pkg/api/models/create_sub_organization_request.go @@ -34,7 +34,7 @@ type CreateSubOrganizationRequest struct { // type // Required: true - // Enum: [ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V6] + // Enum: ["ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V6"] Type *string `json:"type"` } diff --git a/pkg/api/models/create_user_tag_request.go b/pkg/api/models/create_user_tag_request.go index f78e867..1275b8b 100644 --- a/pkg/api/models/create_user_tag_request.go +++ b/pkg/api/models/create_user_tag_request.go @@ -34,7 +34,7 @@ type CreateUserTagRequest struct { // type // Required: true - // Enum: [ACTIVITY_TYPE_CREATE_USER_TAG] + // Enum: ["ACTIVITY_TYPE_CREATE_USER_TAG"] Type *string `json:"type"` } diff --git a/pkg/api/models/create_users_request.go b/pkg/api/models/create_users_request.go index f7db762..ae08f01 100644 --- a/pkg/api/models/create_users_request.go +++ b/pkg/api/models/create_users_request.go @@ -34,7 +34,7 @@ type CreateUsersRequest struct { // type // Required: true - // Enum: [ACTIVITY_TYPE_CREATE_USERS_V2] + // Enum: ["ACTIVITY_TYPE_CREATE_USERS_V2"] Type *string `json:"type"` } diff --git a/pkg/api/models/create_wallet_accounts_request.go b/pkg/api/models/create_wallet_accounts_request.go index e7cd259..b87b9a4 100644 --- a/pkg/api/models/create_wallet_accounts_request.go +++ b/pkg/api/models/create_wallet_accounts_request.go @@ -34,7 +34,7 @@ type CreateWalletAccountsRequest struct { // type // Required: true - // Enum: [ACTIVITY_TYPE_CREATE_WALLET_ACCOUNTS] + // Enum: ["ACTIVITY_TYPE_CREATE_WALLET_ACCOUNTS"] Type *string `json:"type"` } diff --git a/pkg/api/models/create_wallet_request.go b/pkg/api/models/create_wallet_request.go index b114408..f3bf9cd 100644 --- a/pkg/api/models/create_wallet_request.go +++ b/pkg/api/models/create_wallet_request.go @@ -34,7 +34,7 @@ type CreateWalletRequest struct { // type // Required: true - // Enum: [ACTIVITY_TYPE_CREATE_WALLET] + // Enum: ["ACTIVITY_TYPE_CREATE_WALLET"] Type *string `json:"type"` } diff --git a/pkg/api/models/credential_type.go b/pkg/api/models/credential_type.go index a82c948..9adb14f 100644 --- a/pkg/api/models/credential_type.go +++ b/pkg/api/models/credential_type.go @@ -30,23 +30,23 @@ func (m CredentialType) Pointer() *CredentialType { const ( - // CredentialTypeWebauthnAuthenticator captures enum value "CREDENTIAL_TYPE_WEBAUTHN_AUTHENTICATOR" - CredentialTypeWebauthnAuthenticator CredentialType = "CREDENTIAL_TYPE_WEBAUTHN_AUTHENTICATOR" + // CREDENTIALTYPEWEBAUTHNAUTHENTICATOR captures enum value "CREDENTIAL_TYPE_WEBAUTHN_AUTHENTICATOR" + CREDENTIALTYPEWEBAUTHNAUTHENTICATOR CredentialType = "CREDENTIAL_TYPE_WEBAUTHN_AUTHENTICATOR" - // CredentialTypeAPIKeyP256 captures enum value "CREDENTIAL_TYPE_API_KEY_P256" - CredentialTypeAPIKeyP256 CredentialType = "CREDENTIAL_TYPE_API_KEY_P256" + // CREDENTIALTYPEAPIKEYP256 captures enum value "CREDENTIAL_TYPE_API_KEY_P256" + CREDENTIALTYPEAPIKEYP256 CredentialType = "CREDENTIAL_TYPE_API_KEY_P256" - // CredentialTypeRecoverUserKeyP256 captures enum value "CREDENTIAL_TYPE_RECOVER_USER_KEY_P256" - CredentialTypeRecoverUserKeyP256 CredentialType = "CREDENTIAL_TYPE_RECOVER_USER_KEY_P256" + // CREDENTIALTYPERECOVERUSERKEYP256 captures enum value "CREDENTIAL_TYPE_RECOVER_USER_KEY_P256" + CREDENTIALTYPERECOVERUSERKEYP256 CredentialType = "CREDENTIAL_TYPE_RECOVER_USER_KEY_P256" - // CredentialTypeAPIKeySecp256k1 captures enum value "CREDENTIAL_TYPE_API_KEY_SECP256K1" - CredentialTypeAPIKeySecp256k1 CredentialType = "CREDENTIAL_TYPE_API_KEY_SECP256K1" + // CREDENTIALTYPEAPIKEYSECP256K1 captures enum value "CREDENTIAL_TYPE_API_KEY_SECP256K1" + CREDENTIALTYPEAPIKEYSECP256K1 CredentialType = "CREDENTIAL_TYPE_API_KEY_SECP256K1" - // CredentialTypeEmailAuthKeyP256 captures enum value "CREDENTIAL_TYPE_EMAIL_AUTH_KEY_P256" - CredentialTypeEmailAuthKeyP256 CredentialType = "CREDENTIAL_TYPE_EMAIL_AUTH_KEY_P256" + // CREDENTIALTYPEEMAILAUTHKEYP256 captures enum value "CREDENTIAL_TYPE_EMAIL_AUTH_KEY_P256" + CREDENTIALTYPEEMAILAUTHKEYP256 CredentialType = "CREDENTIAL_TYPE_EMAIL_AUTH_KEY_P256" - // CredentialTypeAPIKeyEd25519 captures enum value "CREDENTIAL_TYPE_API_KEY_ED25519" - CredentialTypeAPIKeyEd25519 CredentialType = "CREDENTIAL_TYPE_API_KEY_ED25519" + // CREDENTIALTYPEAPIKEYED25519 captures enum value "CREDENTIAL_TYPE_API_KEY_ED25519" + CREDENTIALTYPEAPIKEYED25519 CredentialType = "CREDENTIAL_TYPE_API_KEY_ED25519" ) // for schema diff --git a/pkg/api/models/curve.go b/pkg/api/models/curve.go index 9bb0cc7..fb9ae48 100644 --- a/pkg/api/models/curve.go +++ b/pkg/api/models/curve.go @@ -30,11 +30,11 @@ func (m Curve) Pointer() *Curve { const ( - // CurveSecp256k1 captures enum value "CURVE_SECP256K1" - CurveSecp256k1 Curve = "CURVE_SECP256K1" + // CURVESECP256K1 captures enum value "CURVE_SECP256K1" + CURVESECP256K1 Curve = "CURVE_SECP256K1" - // CurveEd25519 captures enum value "CURVE_ED25519" - CurveEd25519 Curve = "CURVE_ED25519" + // CURVEED25519 captures enum value "CURVE_ED25519" + CURVEED25519 Curve = "CURVE_ED25519" ) // for schema diff --git a/pkg/api/models/delete_api_keys_request.go b/pkg/api/models/delete_api_keys_request.go index b0b05a2..e9b249b 100644 --- a/pkg/api/models/delete_api_keys_request.go +++ b/pkg/api/models/delete_api_keys_request.go @@ -34,7 +34,7 @@ type DeleteAPIKeysRequest struct { // type // Required: true - // Enum: [ACTIVITY_TYPE_DELETE_API_KEYS] + // Enum: ["ACTIVITY_TYPE_DELETE_API_KEYS"] Type *string `json:"type"` } diff --git a/pkg/api/models/delete_authenticators_request.go b/pkg/api/models/delete_authenticators_request.go index df00d96..7495d32 100644 --- a/pkg/api/models/delete_authenticators_request.go +++ b/pkg/api/models/delete_authenticators_request.go @@ -34,7 +34,7 @@ type DeleteAuthenticatorsRequest struct { // type // Required: true - // Enum: [ACTIVITY_TYPE_DELETE_AUTHENTICATORS] + // Enum: ["ACTIVITY_TYPE_DELETE_AUTHENTICATORS"] Type *string `json:"type"` } diff --git a/pkg/api/models/delete_invitation_request.go b/pkg/api/models/delete_invitation_request.go index 566605e..58b774d 100644 --- a/pkg/api/models/delete_invitation_request.go +++ b/pkg/api/models/delete_invitation_request.go @@ -34,7 +34,7 @@ type DeleteInvitationRequest struct { // type // Required: true - // Enum: [ACTIVITY_TYPE_DELETE_INVITATION] + // Enum: ["ACTIVITY_TYPE_DELETE_INVITATION"] Type *string `json:"type"` } diff --git a/pkg/api/models/delete_oauth_providers_request.go b/pkg/api/models/delete_oauth_providers_request.go index c5660af..710245b 100644 --- a/pkg/api/models/delete_oauth_providers_request.go +++ b/pkg/api/models/delete_oauth_providers_request.go @@ -34,7 +34,7 @@ type DeleteOauthProvidersRequest struct { // type // Required: true - // Enum: [ACTIVITY_TYPE_DELETE_OAUTH_PROVIDERS] + // Enum: ["ACTIVITY_TYPE_DELETE_OAUTH_PROVIDERS"] Type *string `json:"type"` } diff --git a/pkg/api/models/delete_policy_request.go b/pkg/api/models/delete_policy_request.go index 0f6f367..77ea7fc 100644 --- a/pkg/api/models/delete_policy_request.go +++ b/pkg/api/models/delete_policy_request.go @@ -34,7 +34,7 @@ type DeletePolicyRequest struct { // type // Required: true - // Enum: [ACTIVITY_TYPE_DELETE_POLICY] + // Enum: ["ACTIVITY_TYPE_DELETE_POLICY"] Type *string `json:"type"` } diff --git a/pkg/api/models/delete_private_key_tags_request.go b/pkg/api/models/delete_private_key_tags_request.go index 03a4003..637e3b4 100644 --- a/pkg/api/models/delete_private_key_tags_request.go +++ b/pkg/api/models/delete_private_key_tags_request.go @@ -34,7 +34,7 @@ type DeletePrivateKeyTagsRequest struct { // type // Required: true - // Enum: [ACTIVITY_TYPE_DELETE_PRIVATE_KEY_TAGS] + // Enum: ["ACTIVITY_TYPE_DELETE_PRIVATE_KEY_TAGS"] Type *string `json:"type"` } diff --git a/pkg/api/models/delete_private_keys_request.go b/pkg/api/models/delete_private_keys_request.go index 8df53b0..66b7733 100644 --- a/pkg/api/models/delete_private_keys_request.go +++ b/pkg/api/models/delete_private_keys_request.go @@ -34,7 +34,7 @@ type DeletePrivateKeysRequest struct { // type // Required: true - // Enum: [ACTIVITY_TYPE_DELETE_PRIVATE_KEYS] + // Enum: ["ACTIVITY_TYPE_DELETE_PRIVATE_KEYS"] Type *string `json:"type"` } diff --git a/pkg/api/models/delete_sub_organization_intent.go b/pkg/api/models/delete_sub_organization_intent.go new file mode 100644 index 0000000..5d2dc6d --- /dev/null +++ b/pkg/api/models/delete_sub_organization_intent.go @@ -0,0 +1,50 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// DeleteSubOrganizationIntent delete sub organization intent +// +// swagger:model DeleteSubOrganizationIntent +type DeleteSubOrganizationIntent struct { + + // Sub-organization deletion, by default, requires associated wallets and private keys to be exported for security reasons. Set this boolean to true to force sub-organization deletion even if some wallets or private keys within it have not been exported yet. Default: false. + DeleteWithoutExport bool `json:"deleteWithoutExport,omitempty"` +} + +// Validate validates this delete sub organization intent +func (m *DeleteSubOrganizationIntent) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this delete sub organization intent based on context it is used +func (m *DeleteSubOrganizationIntent) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *DeleteSubOrganizationIntent) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *DeleteSubOrganizationIntent) UnmarshalBinary(b []byte) error { + var res DeleteSubOrganizationIntent + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/pkg/api/models/delete_sub_organization_request.go b/pkg/api/models/delete_sub_organization_request.go new file mode 100644 index 0000000..bbf4ae7 --- /dev/null +++ b/pkg/api/models/delete_sub_organization_request.go @@ -0,0 +1,192 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// DeleteSubOrganizationRequest delete sub organization request +// +// swagger:model DeleteSubOrganizationRequest +type DeleteSubOrganizationRequest struct { + + // Unique identifier for a given Organization. + // Required: true + OrganizationID *string `json:"organizationId"` + + // parameters + // Required: true + Parameters *DeleteSubOrganizationIntent `json:"parameters"` + + // Timestamp (in milliseconds) of the request, used to verify liveness of user requests. + // Required: true + TimestampMs *string `json:"timestampMs"` + + // type + // Required: true + // Enum: ["ACTIVITY_TYPE_DELETE_SUB_ORGANIZATION"] + Type *string `json:"type"` +} + +// Validate validates this delete sub organization request +func (m *DeleteSubOrganizationRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateOrganizationID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateParameters(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTimestampMs(formats); err != nil { + res = append(res, err) + } + + if err := m.validateType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *DeleteSubOrganizationRequest) validateOrganizationID(formats strfmt.Registry) error { + + if err := validate.Required("organizationId", "body", m.OrganizationID); err != nil { + return err + } + + return nil +} + +func (m *DeleteSubOrganizationRequest) validateParameters(formats strfmt.Registry) error { + + if err := validate.Required("parameters", "body", m.Parameters); err != nil { + return err + } + + if m.Parameters != nil { + if err := m.Parameters.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("parameters") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("parameters") + } + return err + } + } + + return nil +} + +func (m *DeleteSubOrganizationRequest) validateTimestampMs(formats strfmt.Registry) error { + + if err := validate.Required("timestampMs", "body", m.TimestampMs); err != nil { + return err + } + + return nil +} + +var deleteSubOrganizationRequestTypeTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["ACTIVITY_TYPE_DELETE_SUB_ORGANIZATION"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + deleteSubOrganizationRequestTypeTypePropEnum = append(deleteSubOrganizationRequestTypeTypePropEnum, v) + } +} + +const ( + + // DeleteSubOrganizationRequestTypeACTIVITYTYPEDELETESUBORGANIZATION captures enum value "ACTIVITY_TYPE_DELETE_SUB_ORGANIZATION" + DeleteSubOrganizationRequestTypeACTIVITYTYPEDELETESUBORGANIZATION string = "ACTIVITY_TYPE_DELETE_SUB_ORGANIZATION" +) + +// prop value enum +func (m *DeleteSubOrganizationRequest) validateTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, deleteSubOrganizationRequestTypeTypePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *DeleteSubOrganizationRequest) validateType(formats strfmt.Registry) error { + + if err := validate.Required("type", "body", m.Type); err != nil { + return err + } + + // value enum + if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this delete sub organization request based on the context it is used +func (m *DeleteSubOrganizationRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateParameters(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *DeleteSubOrganizationRequest) contextValidateParameters(ctx context.Context, formats strfmt.Registry) error { + + if m.Parameters != nil { + + if err := m.Parameters.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("parameters") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("parameters") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *DeleteSubOrganizationRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *DeleteSubOrganizationRequest) UnmarshalBinary(b []byte) error { + var res DeleteSubOrganizationRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/pkg/api/models/delete_sub_organization_result.go b/pkg/api/models/delete_sub_organization_result.go new file mode 100644 index 0000000..e05d24b --- /dev/null +++ b/pkg/api/models/delete_sub_organization_result.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// DeleteSubOrganizationResult delete sub organization result +// +// swagger:model DeleteSubOrganizationResult +type DeleteSubOrganizationResult struct { + + // Unique identifier of the sub organization that was removed + // Required: true + SubOrganizationUUID *string `json:"subOrganizationUuid"` +} + +// Validate validates this delete sub organization result +func (m *DeleteSubOrganizationResult) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateSubOrganizationUUID(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *DeleteSubOrganizationResult) validateSubOrganizationUUID(formats strfmt.Registry) error { + + if err := validate.Required("subOrganizationUuid", "body", m.SubOrganizationUUID); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this delete sub organization result based on context it is used +func (m *DeleteSubOrganizationResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *DeleteSubOrganizationResult) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *DeleteSubOrganizationResult) UnmarshalBinary(b []byte) error { + var res DeleteSubOrganizationResult + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/pkg/api/models/delete_user_tags_request.go b/pkg/api/models/delete_user_tags_request.go index a20fa61..55e97b5 100644 --- a/pkg/api/models/delete_user_tags_request.go +++ b/pkg/api/models/delete_user_tags_request.go @@ -34,7 +34,7 @@ type DeleteUserTagsRequest struct { // type // Required: true - // Enum: [ACTIVITY_TYPE_DELETE_USER_TAGS] + // Enum: ["ACTIVITY_TYPE_DELETE_USER_TAGS"] Type *string `json:"type"` } diff --git a/pkg/api/models/delete_users_request.go b/pkg/api/models/delete_users_request.go index 3a3e356..09a500d 100644 --- a/pkg/api/models/delete_users_request.go +++ b/pkg/api/models/delete_users_request.go @@ -34,7 +34,7 @@ type DeleteUsersRequest struct { // type // Required: true - // Enum: [ACTIVITY_TYPE_DELETE_USERS] + // Enum: ["ACTIVITY_TYPE_DELETE_USERS"] Type *string `json:"type"` } diff --git a/pkg/api/models/delete_wallets_request.go b/pkg/api/models/delete_wallets_request.go index 6d2e42f..ac7d765 100644 --- a/pkg/api/models/delete_wallets_request.go +++ b/pkg/api/models/delete_wallets_request.go @@ -34,7 +34,7 @@ type DeleteWalletsRequest struct { // type // Required: true - // Enum: [ACTIVITY_TYPE_DELETE_WALLETS] + // Enum: ["ACTIVITY_TYPE_DELETE_WALLETS"] Type *string `json:"type"` } diff --git a/pkg/api/models/effect.go b/pkg/api/models/effect.go index 090a297..f04a5df 100644 --- a/pkg/api/models/effect.go +++ b/pkg/api/models/effect.go @@ -30,11 +30,11 @@ func (m Effect) Pointer() *Effect { const ( - // EffectAllow captures enum value "EFFECT_ALLOW" - EffectAllow Effect = "EFFECT_ALLOW" + // EFFECTALLOW captures enum value "EFFECT_ALLOW" + EFFECTALLOW Effect = "EFFECT_ALLOW" - // EffectDeny captures enum value "EFFECT_DENY" - EffectDeny Effect = "EFFECT_DENY" + // EFFECTDENY captures enum value "EFFECT_DENY" + EFFECTDENY Effect = "EFFECT_DENY" ) // for schema diff --git a/pkg/api/models/email_auth_request.go b/pkg/api/models/email_auth_request.go index 5e9ef7d..72ad4ad 100644 --- a/pkg/api/models/email_auth_request.go +++ b/pkg/api/models/email_auth_request.go @@ -34,7 +34,7 @@ type EmailAuthRequest struct { // type // Required: true - // Enum: [ACTIVITY_TYPE_EMAIL_AUTH_V2] + // Enum: ["ACTIVITY_TYPE_EMAIL_AUTH_V2"] Type *string `json:"type"` } diff --git a/pkg/api/models/export_private_key_request.go b/pkg/api/models/export_private_key_request.go index 0f3de41..93b5011 100644 --- a/pkg/api/models/export_private_key_request.go +++ b/pkg/api/models/export_private_key_request.go @@ -34,7 +34,7 @@ type ExportPrivateKeyRequest struct { // type // Required: true - // Enum: [ACTIVITY_TYPE_EXPORT_PRIVATE_KEY] + // Enum: ["ACTIVITY_TYPE_EXPORT_PRIVATE_KEY"] Type *string `json:"type"` } diff --git a/pkg/api/models/export_wallet_account_request.go b/pkg/api/models/export_wallet_account_request.go index 27e15d3..b489f84 100644 --- a/pkg/api/models/export_wallet_account_request.go +++ b/pkg/api/models/export_wallet_account_request.go @@ -34,7 +34,7 @@ type ExportWalletAccountRequest struct { // type // Required: true - // Enum: [ACTIVITY_TYPE_EXPORT_WALLET_ACCOUNT] + // Enum: ["ACTIVITY_TYPE_EXPORT_WALLET_ACCOUNT"] Type *string `json:"type"` } diff --git a/pkg/api/models/export_wallet_request.go b/pkg/api/models/export_wallet_request.go index 7fbb598..7bfd129 100644 --- a/pkg/api/models/export_wallet_request.go +++ b/pkg/api/models/export_wallet_request.go @@ -34,7 +34,7 @@ type ExportWalletRequest struct { // type // Required: true - // Enum: [ACTIVITY_TYPE_EXPORT_WALLET] + // Enum: ["ACTIVITY_TYPE_EXPORT_WALLET"] Type *string `json:"type"` } diff --git a/pkg/api/models/feature_name.go b/pkg/api/models/feature_name.go index 0104a5a..7102ffe 100644 --- a/pkg/api/models/feature_name.go +++ b/pkg/api/models/feature_name.go @@ -30,20 +30,20 @@ func (m FeatureName) Pointer() *FeatureName { const ( - // FeatureNameRootUserEmailRecovery captures enum value "FEATURE_NAME_ROOT_USER_EMAIL_RECOVERY" - FeatureNameRootUserEmailRecovery FeatureName = "FEATURE_NAME_ROOT_USER_EMAIL_RECOVERY" + // FEATURENAMEROOTUSEREMAILRECOVERY captures enum value "FEATURE_NAME_ROOT_USER_EMAIL_RECOVERY" + FEATURENAMEROOTUSEREMAILRECOVERY FeatureName = "FEATURE_NAME_ROOT_USER_EMAIL_RECOVERY" - // FeatureNameWebauthnOrigins captures enum value "FEATURE_NAME_WEBAUTHN_ORIGINS" - FeatureNameWebauthnOrigins FeatureName = "FEATURE_NAME_WEBAUTHN_ORIGINS" + // FEATURENAMEWEBAUTHNORIGINS captures enum value "FEATURE_NAME_WEBAUTHN_ORIGINS" + FEATURENAMEWEBAUTHNORIGINS FeatureName = "FEATURE_NAME_WEBAUTHN_ORIGINS" - // FeatureNameEmailAuth captures enum value "FEATURE_NAME_EMAIL_AUTH" - FeatureNameEmailAuth FeatureName = "FEATURE_NAME_EMAIL_AUTH" + // FEATURENAMEEMAILAUTH captures enum value "FEATURE_NAME_EMAIL_AUTH" + FEATURENAMEEMAILAUTH FeatureName = "FEATURE_NAME_EMAIL_AUTH" - // FeatureNameEmailRecovery captures enum value "FEATURE_NAME_EMAIL_RECOVERY" - FeatureNameEmailRecovery FeatureName = "FEATURE_NAME_EMAIL_RECOVERY" + // FEATURENAMEEMAILRECOVERY captures enum value "FEATURE_NAME_EMAIL_RECOVERY" + FEATURENAMEEMAILRECOVERY FeatureName = "FEATURE_NAME_EMAIL_RECOVERY" - // FeatureNameWebhook captures enum value "FEATURE_NAME_WEBHOOK" - FeatureNameWebhook FeatureName = "FEATURE_NAME_WEBHOOK" + // FEATURENAMEWEBHOOK captures enum value "FEATURE_NAME_WEBHOOK" + FEATURENAMEWEBHOOK FeatureName = "FEATURE_NAME_WEBHOOK" ) // for schema diff --git a/pkg/api/models/hash_function.go b/pkg/api/models/hash_function.go index 18d3cec..efd9d7e 100644 --- a/pkg/api/models/hash_function.go +++ b/pkg/api/models/hash_function.go @@ -30,17 +30,17 @@ func (m HashFunction) Pointer() *HashFunction { const ( - // HashFunctionNoOp captures enum value "HASH_FUNCTION_NO_OP" - HashFunctionNoOp HashFunction = "HASH_FUNCTION_NO_OP" + // HASHFUNCTIONNOOP captures enum value "HASH_FUNCTION_NO_OP" + HASHFUNCTIONNOOP HashFunction = "HASH_FUNCTION_NO_OP" - // HashFunctionSha256 captures enum value "HASH_FUNCTION_SHA256" - HashFunctionSha256 HashFunction = "HASH_FUNCTION_SHA256" + // HASHFUNCTIONSHA256 captures enum value "HASH_FUNCTION_SHA256" + HASHFUNCTIONSHA256 HashFunction = "HASH_FUNCTION_SHA256" - // HashFunctionKeccak256 captures enum value "HASH_FUNCTION_KECCAK256" - HashFunctionKeccak256 HashFunction = "HASH_FUNCTION_KECCAK256" + // HASHFUNCTIONKECCAK256 captures enum value "HASH_FUNCTION_KECCAK256" + HASHFUNCTIONKECCAK256 HashFunction = "HASH_FUNCTION_KECCAK256" - // HashFunctionNotApplicable captures enum value "HASH_FUNCTION_NOT_APPLICABLE" - HashFunctionNotApplicable HashFunction = "HASH_FUNCTION_NOT_APPLICABLE" + // HASHFUNCTIONNOTAPPLICABLE captures enum value "HASH_FUNCTION_NOT_APPLICABLE" + HASHFUNCTIONNOTAPPLICABLE HashFunction = "HASH_FUNCTION_NOT_APPLICABLE" ) // for schema diff --git a/pkg/api/models/import_private_key_request.go b/pkg/api/models/import_private_key_request.go index f877cab..07d522b 100644 --- a/pkg/api/models/import_private_key_request.go +++ b/pkg/api/models/import_private_key_request.go @@ -34,7 +34,7 @@ type ImportPrivateKeyRequest struct { // type // Required: true - // Enum: [ACTIVITY_TYPE_IMPORT_PRIVATE_KEY] + // Enum: ["ACTIVITY_TYPE_IMPORT_PRIVATE_KEY"] Type *string `json:"type"` } diff --git a/pkg/api/models/import_wallet_request.go b/pkg/api/models/import_wallet_request.go index 4ddc6af..2a9cb9a 100644 --- a/pkg/api/models/import_wallet_request.go +++ b/pkg/api/models/import_wallet_request.go @@ -34,7 +34,7 @@ type ImportWalletRequest struct { // type // Required: true - // Enum: [ACTIVITY_TYPE_IMPORT_WALLET] + // Enum: ["ACTIVITY_TYPE_IMPORT_WALLET"] Type *string `json:"type"` } diff --git a/pkg/api/models/init_import_private_key_request.go b/pkg/api/models/init_import_private_key_request.go index d6eaede..561780e 100644 --- a/pkg/api/models/init_import_private_key_request.go +++ b/pkg/api/models/init_import_private_key_request.go @@ -34,7 +34,7 @@ type InitImportPrivateKeyRequest struct { // type // Required: true - // Enum: [ACTIVITY_TYPE_INIT_IMPORT_PRIVATE_KEY] + // Enum: ["ACTIVITY_TYPE_INIT_IMPORT_PRIVATE_KEY"] Type *string `json:"type"` } diff --git a/pkg/api/models/init_import_wallet_request.go b/pkg/api/models/init_import_wallet_request.go index 6c517ce..a192569 100644 --- a/pkg/api/models/init_import_wallet_request.go +++ b/pkg/api/models/init_import_wallet_request.go @@ -34,7 +34,7 @@ type InitImportWalletRequest struct { // type // Required: true - // Enum: [ACTIVITY_TYPE_INIT_IMPORT_WALLET] + // Enum: ["ACTIVITY_TYPE_INIT_IMPORT_WALLET"] Type *string `json:"type"` } diff --git a/pkg/api/models/init_user_email_recovery_request.go b/pkg/api/models/init_user_email_recovery_request.go index 0cc99bc..6010e4f 100644 --- a/pkg/api/models/init_user_email_recovery_request.go +++ b/pkg/api/models/init_user_email_recovery_request.go @@ -34,7 +34,7 @@ type InitUserEmailRecoveryRequest struct { // type // Required: true - // Enum: [ACTIVITY_TYPE_INIT_USER_EMAIL_RECOVERY] + // Enum: ["ACTIVITY_TYPE_INIT_USER_EMAIL_RECOVERY"] Type *string `json:"type"` } diff --git a/pkg/api/models/intent.go b/pkg/api/models/intent.go index 1c3e651..42baa8f 100644 --- a/pkg/api/models/intent.go +++ b/pkg/api/models/intent.go @@ -147,6 +147,9 @@ type Intent struct { // delete private keys intent DeletePrivateKeysIntent *DeletePrivateKeysIntent `json:"deletePrivateKeysIntent,omitempty"` + // delete sub organization intent + DeleteSubOrganizationIntent *DeleteSubOrganizationIntent `json:"deleteSubOrganizationIntent,omitempty"` + // delete user tags intent DeleteUserTagsIntent *DeleteUserTagsIntent `json:"deleteUserTagsIntent,omitempty"` @@ -416,6 +419,10 @@ func (m *Intent) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateDeleteSubOrganizationIntent(formats); err != nil { + res = append(res, err) + } + if err := m.validateDeleteUserTagsIntent(formats); err != nil { res = append(res, err) } @@ -1348,6 +1355,25 @@ func (m *Intent) validateDeletePrivateKeysIntent(formats strfmt.Registry) error return nil } +func (m *Intent) validateDeleteSubOrganizationIntent(formats strfmt.Registry) error { + if swag.IsZero(m.DeleteSubOrganizationIntent) { // not required + return nil + } + + if m.DeleteSubOrganizationIntent != nil { + if err := m.DeleteSubOrganizationIntent.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("deleteSubOrganizationIntent") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("deleteSubOrganizationIntent") + } + return err + } + } + + return nil +} + func (m *Intent) validateDeleteUserTagsIntent(formats strfmt.Registry) error { if swag.IsZero(m.DeleteUserTagsIntent) { // not required return nil @@ -2128,6 +2154,10 @@ func (m *Intent) ContextValidate(ctx context.Context, formats strfmt.Registry) e res = append(res, err) } + if err := m.contextValidateDeleteSubOrganizationIntent(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateDeleteUserTagsIntent(ctx, formats); err != nil { res = append(res, err) } @@ -3144,6 +3174,27 @@ func (m *Intent) contextValidateDeletePrivateKeysIntent(ctx context.Context, for return nil } +func (m *Intent) contextValidateDeleteSubOrganizationIntent(ctx context.Context, formats strfmt.Registry) error { + + if m.DeleteSubOrganizationIntent != nil { + + if swag.IsZero(m.DeleteSubOrganizationIntent) { // not required + return nil + } + + if err := m.DeleteSubOrganizationIntent.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("deleteSubOrganizationIntent") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("deleteSubOrganizationIntent") + } + return err + } + } + + return nil +} + func (m *Intent) contextValidateDeleteUserTagsIntent(ctx context.Context, formats strfmt.Registry) error { if m.DeleteUserTagsIntent != nil { diff --git a/pkg/api/models/mnemonic_language.go b/pkg/api/models/mnemonic_language.go index 30b4532..5704961 100644 --- a/pkg/api/models/mnemonic_language.go +++ b/pkg/api/models/mnemonic_language.go @@ -30,32 +30,32 @@ func (m MnemonicLanguage) Pointer() *MnemonicLanguage { const ( - // MnemonicLanguageEnglish captures enum value "MNEMONIC_LANGUAGE_ENGLISH" - MnemonicLanguageEnglish MnemonicLanguage = "MNEMONIC_LANGUAGE_ENGLISH" + // MNEMONICLANGUAGEENGLISH captures enum value "MNEMONIC_LANGUAGE_ENGLISH" + MNEMONICLANGUAGEENGLISH MnemonicLanguage = "MNEMONIC_LANGUAGE_ENGLISH" - // MnemonicLanguageSimplifiedChinese captures enum value "MNEMONIC_LANGUAGE_SIMPLIFIED_CHINESE" - MnemonicLanguageSimplifiedChinese MnemonicLanguage = "MNEMONIC_LANGUAGE_SIMPLIFIED_CHINESE" + // MNEMONICLANGUAGESIMPLIFIEDCHINESE captures enum value "MNEMONIC_LANGUAGE_SIMPLIFIED_CHINESE" + MNEMONICLANGUAGESIMPLIFIEDCHINESE MnemonicLanguage = "MNEMONIC_LANGUAGE_SIMPLIFIED_CHINESE" - // MnemonicLanguageTraditionalChinese captures enum value "MNEMONIC_LANGUAGE_TRADITIONAL_CHINESE" - MnemonicLanguageTraditionalChinese MnemonicLanguage = "MNEMONIC_LANGUAGE_TRADITIONAL_CHINESE" + // MNEMONICLANGUAGETRADITIONALCHINESE captures enum value "MNEMONIC_LANGUAGE_TRADITIONAL_CHINESE" + MNEMONICLANGUAGETRADITIONALCHINESE MnemonicLanguage = "MNEMONIC_LANGUAGE_TRADITIONAL_CHINESE" - // MnemonicLanguageCzech captures enum value "MNEMONIC_LANGUAGE_CZECH" - MnemonicLanguageCzech MnemonicLanguage = "MNEMONIC_LANGUAGE_CZECH" + // MNEMONICLANGUAGECZECH captures enum value "MNEMONIC_LANGUAGE_CZECH" + MNEMONICLANGUAGECZECH MnemonicLanguage = "MNEMONIC_LANGUAGE_CZECH" - // MnemonicLanguageFrench captures enum value "MNEMONIC_LANGUAGE_FRENCH" - MnemonicLanguageFrench MnemonicLanguage = "MNEMONIC_LANGUAGE_FRENCH" + // MNEMONICLANGUAGEFRENCH captures enum value "MNEMONIC_LANGUAGE_FRENCH" + MNEMONICLANGUAGEFRENCH MnemonicLanguage = "MNEMONIC_LANGUAGE_FRENCH" - // MnemonicLanguageItalian captures enum value "MNEMONIC_LANGUAGE_ITALIAN" - MnemonicLanguageItalian MnemonicLanguage = "MNEMONIC_LANGUAGE_ITALIAN" + // MNEMONICLANGUAGEITALIAN captures enum value "MNEMONIC_LANGUAGE_ITALIAN" + MNEMONICLANGUAGEITALIAN MnemonicLanguage = "MNEMONIC_LANGUAGE_ITALIAN" - // MnemonicLanguageJapanese captures enum value "MNEMONIC_LANGUAGE_JAPANESE" - MnemonicLanguageJapanese MnemonicLanguage = "MNEMONIC_LANGUAGE_JAPANESE" + // MNEMONICLANGUAGEJAPANESE captures enum value "MNEMONIC_LANGUAGE_JAPANESE" + MNEMONICLANGUAGEJAPANESE MnemonicLanguage = "MNEMONIC_LANGUAGE_JAPANESE" - // MnemonicLanguageKorean captures enum value "MNEMONIC_LANGUAGE_KOREAN" - MnemonicLanguageKorean MnemonicLanguage = "MNEMONIC_LANGUAGE_KOREAN" + // MNEMONICLANGUAGEKOREAN captures enum value "MNEMONIC_LANGUAGE_KOREAN" + MNEMONICLANGUAGEKOREAN MnemonicLanguage = "MNEMONIC_LANGUAGE_KOREAN" - // MnemonicLanguageSpanish captures enum value "MNEMONIC_LANGUAGE_SPANISH" - MnemonicLanguageSpanish MnemonicLanguage = "MNEMONIC_LANGUAGE_SPANISH" + // MNEMONICLANGUAGESPANISH captures enum value "MNEMONIC_LANGUAGE_SPANISH" + MNEMONICLANGUAGESPANISH MnemonicLanguage = "MNEMONIC_LANGUAGE_SPANISH" ) // for schema diff --git a/pkg/api/models/oauth_request.go b/pkg/api/models/oauth_request.go index db4f026..2343121 100644 --- a/pkg/api/models/oauth_request.go +++ b/pkg/api/models/oauth_request.go @@ -34,7 +34,7 @@ type OauthRequest struct { // type // Required: true - // Enum: [ACTIVITY_TYPE_OAUTH] + // Enum: ["ACTIVITY_TYPE_OAUTH"] Type *string `json:"type"` } diff --git a/pkg/api/models/operator.go b/pkg/api/models/operator.go index 07b0609..3dd2ba2 100644 --- a/pkg/api/models/operator.go +++ b/pkg/api/models/operator.go @@ -30,38 +30,38 @@ func (m Operator) Pointer() *Operator { const ( - // OperatorEqual captures enum value "OPERATOR_EQUAL" - OperatorEqual Operator = "OPERATOR_EQUAL" + // OPERATOREQUAL captures enum value "OPERATOR_EQUAL" + OPERATOREQUAL Operator = "OPERATOR_EQUAL" - // OperatorMoreThan captures enum value "OPERATOR_MORE_THAN" - OperatorMoreThan Operator = "OPERATOR_MORE_THAN" + // OPERATORMORETHAN captures enum value "OPERATOR_MORE_THAN" + OPERATORMORETHAN Operator = "OPERATOR_MORE_THAN" - // OperatorMoreThanOrEqual captures enum value "OPERATOR_MORE_THAN_OR_EQUAL" - OperatorMoreThanOrEqual Operator = "OPERATOR_MORE_THAN_OR_EQUAL" + // OPERATORMORETHANOREQUAL captures enum value "OPERATOR_MORE_THAN_OR_EQUAL" + OPERATORMORETHANOREQUAL Operator = "OPERATOR_MORE_THAN_OR_EQUAL" - // OperatorLessThan captures enum value "OPERATOR_LESS_THAN" - OperatorLessThan Operator = "OPERATOR_LESS_THAN" + // OPERATORLESSTHAN captures enum value "OPERATOR_LESS_THAN" + OPERATORLESSTHAN Operator = "OPERATOR_LESS_THAN" - // OperatorLessThanOrEqual captures enum value "OPERATOR_LESS_THAN_OR_EQUAL" - OperatorLessThanOrEqual Operator = "OPERATOR_LESS_THAN_OR_EQUAL" + // OPERATORLESSTHANOREQUAL captures enum value "OPERATOR_LESS_THAN_OR_EQUAL" + OPERATORLESSTHANOREQUAL Operator = "OPERATOR_LESS_THAN_OR_EQUAL" - // OperatorContains captures enum value "OPERATOR_CONTAINS" - OperatorContains Operator = "OPERATOR_CONTAINS" + // OPERATORCONTAINS captures enum value "OPERATOR_CONTAINS" + OPERATORCONTAINS Operator = "OPERATOR_CONTAINS" - // OperatorNotEqual captures enum value "OPERATOR_NOT_EQUAL" - OperatorNotEqual Operator = "OPERATOR_NOT_EQUAL" + // OPERATORNOTEQUAL captures enum value "OPERATOR_NOT_EQUAL" + OPERATORNOTEQUAL Operator = "OPERATOR_NOT_EQUAL" - // OperatorIn captures enum value "OPERATOR_IN" - OperatorIn Operator = "OPERATOR_IN" + // OPERATORIN captures enum value "OPERATOR_IN" + OPERATORIN Operator = "OPERATOR_IN" - // OperatorNotIn captures enum value "OPERATOR_NOT_IN" - OperatorNotIn Operator = "OPERATOR_NOT_IN" + // OPERATORNOTIN captures enum value "OPERATOR_NOT_IN" + OPERATORNOTIN Operator = "OPERATOR_NOT_IN" - // OperatorContainsOne captures enum value "OPERATOR_CONTAINS_ONE" - OperatorContainsOne Operator = "OPERATOR_CONTAINS_ONE" + // OPERATORCONTAINSONE captures enum value "OPERATOR_CONTAINS_ONE" + OPERATORCONTAINSONE Operator = "OPERATOR_CONTAINS_ONE" - // OperatorContainsAll captures enum value "OPERATOR_CONTAINS_ALL" - OperatorContainsAll Operator = "OPERATOR_CONTAINS_ALL" + // OPERATORCONTAINSALL captures enum value "OPERATOR_CONTAINS_ALL" + OPERATORCONTAINSALL Operator = "OPERATOR_CONTAINS_ALL" ) // for schema diff --git a/pkg/api/models/path_format.go b/pkg/api/models/path_format.go index 890effe..32a33a9 100644 --- a/pkg/api/models/path_format.go +++ b/pkg/api/models/path_format.go @@ -30,8 +30,8 @@ func (m PathFormat) Pointer() *PathFormat { const ( - // PathFormatBip32 captures enum value "PATH_FORMAT_BIP32" - PathFormatBip32 PathFormat = "PATH_FORMAT_BIP32" + // PATHFORMATBIP32 captures enum value "PATH_FORMAT_BIP32" + PATHFORMATBIP32 PathFormat = "PATH_FORMAT_BIP32" ) // for schema diff --git a/pkg/api/models/payload_encoding.go b/pkg/api/models/payload_encoding.go index 23a4e6f..cc6df63 100644 --- a/pkg/api/models/payload_encoding.go +++ b/pkg/api/models/payload_encoding.go @@ -30,11 +30,11 @@ func (m PayloadEncoding) Pointer() *PayloadEncoding { const ( - // PayloadEncodingHexadecimal captures enum value "PAYLOAD_ENCODING_HEXADECIMAL" - PayloadEncodingHexadecimal PayloadEncoding = "PAYLOAD_ENCODING_HEXADECIMAL" + // PAYLOADENCODINGHEXADECIMAL captures enum value "PAYLOAD_ENCODING_HEXADECIMAL" + PAYLOADENCODINGHEXADECIMAL PayloadEncoding = "PAYLOAD_ENCODING_HEXADECIMAL" - // PayloadEncodingTextUTF8 captures enum value "PAYLOAD_ENCODING_TEXT_UTF8" - PayloadEncodingTextUTF8 PayloadEncoding = "PAYLOAD_ENCODING_TEXT_UTF8" + // PAYLOADENCODINGTEXTUTF8 captures enum value "PAYLOAD_ENCODING_TEXT_UTF8" + PAYLOADENCODINGTEXTUTF8 PayloadEncoding = "PAYLOAD_ENCODING_TEXT_UTF8" ) // for schema diff --git a/pkg/api/models/public_key_credential_with_attestation.go b/pkg/api/models/public_key_credential_with_attestation.go index c79a227..617c15e 100644 --- a/pkg/api/models/public_key_credential_with_attestation.go +++ b/pkg/api/models/public_key_credential_with_attestation.go @@ -21,7 +21,7 @@ import ( type PublicKeyCredentialWithAttestation struct { // authenticator attachment - // Enum: [cross-platform platform] + // Enum: ["cross-platform","platform"] AuthenticatorAttachment *string `json:"authenticatorAttachment,omitempty"` // client extension results @@ -42,7 +42,7 @@ type PublicKeyCredentialWithAttestation struct { // type // Required: true - // Enum: [public-key] + // Enum: ["public-key"] Type *string `json:"type"` } diff --git a/pkg/api/models/recover_user_request.go b/pkg/api/models/recover_user_request.go index 491479a..fde26f8 100644 --- a/pkg/api/models/recover_user_request.go +++ b/pkg/api/models/recover_user_request.go @@ -34,7 +34,7 @@ type RecoverUserRequest struct { // type // Required: true - // Enum: [ACTIVITY_TYPE_RECOVER_USER] + // Enum: ["ACTIVITY_TYPE_RECOVER_USER"] Type *string `json:"type"` } diff --git a/pkg/api/models/reject_activity_request.go b/pkg/api/models/reject_activity_request.go index 631269f..7dc994e 100644 --- a/pkg/api/models/reject_activity_request.go +++ b/pkg/api/models/reject_activity_request.go @@ -34,7 +34,7 @@ type RejectActivityRequest struct { // type // Required: true - // Enum: [ACTIVITY_TYPE_REJECT_ACTIVITY] + // Enum: ["ACTIVITY_TYPE_REJECT_ACTIVITY"] Type *string `json:"type"` } diff --git a/pkg/api/models/remove_organization_feature_request.go b/pkg/api/models/remove_organization_feature_request.go index 854dbf0..0bc543a 100644 --- a/pkg/api/models/remove_organization_feature_request.go +++ b/pkg/api/models/remove_organization_feature_request.go @@ -34,7 +34,7 @@ type RemoveOrganizationFeatureRequest struct { // type // Required: true - // Enum: [ACTIVITY_TYPE_REMOVE_ORGANIZATION_FEATURE] + // Enum: ["ACTIVITY_TYPE_REMOVE_ORGANIZATION_FEATURE"] Type *string `json:"type"` } diff --git a/pkg/api/models/result.go b/pkg/api/models/result.go index 22a0972..712dbb9 100644 --- a/pkg/api/models/result.go +++ b/pkg/api/models/result.go @@ -120,6 +120,9 @@ type Result struct { // delete private keys result DeletePrivateKeysResult *DeletePrivateKeysResult `json:"deletePrivateKeysResult,omitempty"` + // delete sub organization result + DeleteSubOrganizationResult *DeleteSubOrganizationResult `json:"deleteSubOrganizationResult,omitempty"` + // delete user tags result DeleteUserTagsResult *DeleteUserTagsResult `json:"deleteUserTagsResult,omitempty"` @@ -342,6 +345,10 @@ func (m *Result) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateDeleteSubOrganizationResult(formats); err != nil { + res = append(res, err) + } + if err := m.validateDeleteUserTagsResult(formats); err != nil { res = append(res, err) } @@ -1094,6 +1101,25 @@ func (m *Result) validateDeletePrivateKeysResult(formats strfmt.Registry) error return nil } +func (m *Result) validateDeleteSubOrganizationResult(formats strfmt.Registry) error { + if swag.IsZero(m.DeleteSubOrganizationResult) { // not required + return nil + } + + if m.DeleteSubOrganizationResult != nil { + if err := m.DeleteSubOrganizationResult.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("deleteSubOrganizationResult") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("deleteSubOrganizationResult") + } + return err + } + } + + return nil +} + func (m *Result) validateDeleteUserTagsResult(formats strfmt.Registry) error { if swag.IsZero(m.DeleteUserTagsResult) { // not required return nil @@ -1709,6 +1735,10 @@ func (m *Result) ContextValidate(ctx context.Context, formats strfmt.Registry) e res = append(res, err) } + if err := m.contextValidateDeleteSubOrganizationResult(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateDeleteUserTagsResult(ctx, formats); err != nil { res = append(res, err) } @@ -2529,6 +2559,27 @@ func (m *Result) contextValidateDeletePrivateKeysResult(ctx context.Context, for return nil } +func (m *Result) contextValidateDeleteSubOrganizationResult(ctx context.Context, formats strfmt.Registry) error { + + if m.DeleteSubOrganizationResult != nil { + + if swag.IsZero(m.DeleteSubOrganizationResult) { // not required + return nil + } + + if err := m.DeleteSubOrganizationResult.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("deleteSubOrganizationResult") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("deleteSubOrganizationResult") + } + return err + } + } + + return nil +} + func (m *Result) contextValidateDeleteUserTagsResult(ctx context.Context, formats strfmt.Registry) error { if m.DeleteUserTagsResult != nil { diff --git a/pkg/api/models/set_organization_feature_request.go b/pkg/api/models/set_organization_feature_request.go index e32db89..0df8697 100644 --- a/pkg/api/models/set_organization_feature_request.go +++ b/pkg/api/models/set_organization_feature_request.go @@ -34,7 +34,7 @@ type SetOrganizationFeatureRequest struct { // type // Required: true - // Enum: [ACTIVITY_TYPE_SET_ORGANIZATION_FEATURE] + // Enum: ["ACTIVITY_TYPE_SET_ORGANIZATION_FEATURE"] Type *string `json:"type"` } diff --git a/pkg/api/models/sign_raw_payload_request.go b/pkg/api/models/sign_raw_payload_request.go index 80bdee5..724ddff 100644 --- a/pkg/api/models/sign_raw_payload_request.go +++ b/pkg/api/models/sign_raw_payload_request.go @@ -34,7 +34,7 @@ type SignRawPayloadRequest struct { // type // Required: true - // Enum: [ACTIVITY_TYPE_SIGN_RAW_PAYLOAD_V2] + // Enum: ["ACTIVITY_TYPE_SIGN_RAW_PAYLOAD_V2"] Type *string `json:"type"` } diff --git a/pkg/api/models/sign_raw_payloads_request.go b/pkg/api/models/sign_raw_payloads_request.go index 21dd13d..0836506 100644 --- a/pkg/api/models/sign_raw_payloads_request.go +++ b/pkg/api/models/sign_raw_payloads_request.go @@ -34,7 +34,7 @@ type SignRawPayloadsRequest struct { // type // Required: true - // Enum: [ACTIVITY_TYPE_SIGN_RAW_PAYLOADS] + // Enum: ["ACTIVITY_TYPE_SIGN_RAW_PAYLOADS"] Type *string `json:"type"` } diff --git a/pkg/api/models/sign_transaction_request.go b/pkg/api/models/sign_transaction_request.go index 7024ecb..23c5837 100644 --- a/pkg/api/models/sign_transaction_request.go +++ b/pkg/api/models/sign_transaction_request.go @@ -34,7 +34,7 @@ type SignTransactionRequest struct { // type // Required: true - // Enum: [ACTIVITY_TYPE_SIGN_TRANSACTION_V2] + // Enum: ["ACTIVITY_TYPE_SIGN_TRANSACTION_V2"] Type *string `json:"type"` } diff --git a/pkg/api/models/tag_type.go b/pkg/api/models/tag_type.go index d3ebd25..5594420 100644 --- a/pkg/api/models/tag_type.go +++ b/pkg/api/models/tag_type.go @@ -30,11 +30,11 @@ func (m TagType) Pointer() *TagType { const ( - // TagTypeUser captures enum value "TAG_TYPE_USER" - TagTypeUser TagType = "TAG_TYPE_USER" + // TAGTYPEUSER captures enum value "TAG_TYPE_USER" + TAGTYPEUSER TagType = "TAG_TYPE_USER" - // TagTypePrivateKey captures enum value "TAG_TYPE_PRIVATE_KEY" - TagTypePrivateKey TagType = "TAG_TYPE_PRIVATE_KEY" + // TAGTYPEPRIVATEKEY captures enum value "TAG_TYPE_PRIVATE_KEY" + TAGTYPEPRIVATEKEY TagType = "TAG_TYPE_PRIVATE_KEY" ) // for schema diff --git a/pkg/api/models/transaction_type.go b/pkg/api/models/transaction_type.go index 8a04292..d971f85 100644 --- a/pkg/api/models/transaction_type.go +++ b/pkg/api/models/transaction_type.go @@ -30,8 +30,11 @@ func (m TransactionType) Pointer() *TransactionType { const ( - // TransactionTypeEthereum captures enum value "TRANSACTION_TYPE_ETHEREUM" - TransactionTypeEthereum TransactionType = "TRANSACTION_TYPE_ETHEREUM" + // TRANSACTIONTYPEETHEREUM captures enum value "TRANSACTION_TYPE_ETHEREUM" + TRANSACTIONTYPEETHEREUM TransactionType = "TRANSACTION_TYPE_ETHEREUM" + + // TRANSACTIONTYPESOLANA captures enum value "TRANSACTION_TYPE_SOLANA" + TRANSACTIONTYPESOLANA TransactionType = "TRANSACTION_TYPE_SOLANA" ) // for schema @@ -39,7 +42,7 @@ var TransactionTypeEnum []TransactionType func init() { var res []TransactionType - if err := json.Unmarshal([]byte(`["TRANSACTION_TYPE_ETHEREUM"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["TRANSACTION_TYPE_ETHEREUM","TRANSACTION_TYPE_SOLANA"]`), &res); err != nil { panic(err) } for _, v := range res { diff --git a/pkg/api/models/update_policy_request.go b/pkg/api/models/update_policy_request.go index 5698830..767ad4a 100644 --- a/pkg/api/models/update_policy_request.go +++ b/pkg/api/models/update_policy_request.go @@ -34,7 +34,7 @@ type UpdatePolicyRequest struct { // type // Required: true - // Enum: [ACTIVITY_TYPE_UPDATE_POLICY] + // Enum: ["ACTIVITY_TYPE_UPDATE_POLICY"] Type *string `json:"type"` } diff --git a/pkg/api/models/update_private_key_tag_request.go b/pkg/api/models/update_private_key_tag_request.go index d9c81af..c7ab309 100644 --- a/pkg/api/models/update_private_key_tag_request.go +++ b/pkg/api/models/update_private_key_tag_request.go @@ -34,7 +34,7 @@ type UpdatePrivateKeyTagRequest struct { // type // Required: true - // Enum: [ACTIVITY_TYPE_UPDATE_PRIVATE_KEY_TAG] + // Enum: ["ACTIVITY_TYPE_UPDATE_PRIVATE_KEY_TAG"] Type *string `json:"type"` } diff --git a/pkg/api/models/update_root_quorum_request.go b/pkg/api/models/update_root_quorum_request.go index 4347b86..8c98ba1 100644 --- a/pkg/api/models/update_root_quorum_request.go +++ b/pkg/api/models/update_root_quorum_request.go @@ -34,7 +34,7 @@ type UpdateRootQuorumRequest struct { // type // Required: true - // Enum: [ACTIVITY_TYPE_UPDATE_ROOT_QUORUM] + // Enum: ["ACTIVITY_TYPE_UPDATE_ROOT_QUORUM"] Type *string `json:"type"` } diff --git a/pkg/api/models/update_user_request.go b/pkg/api/models/update_user_request.go index c66e7fd..3c94db7 100644 --- a/pkg/api/models/update_user_request.go +++ b/pkg/api/models/update_user_request.go @@ -34,7 +34,7 @@ type UpdateUserRequest struct { // type // Required: true - // Enum: [ACTIVITY_TYPE_UPDATE_USER] + // Enum: ["ACTIVITY_TYPE_UPDATE_USER"] Type *string `json:"type"` } diff --git a/pkg/api/models/update_user_tag_request.go b/pkg/api/models/update_user_tag_request.go index f4f90e7..614edfc 100644 --- a/pkg/api/models/update_user_tag_request.go +++ b/pkg/api/models/update_user_tag_request.go @@ -34,7 +34,7 @@ type UpdateUserTagRequest struct { // type // Required: true - // Enum: [ACTIVITY_TYPE_UPDATE_USER_TAG] + // Enum: ["ACTIVITY_TYPE_UPDATE_USER_TAG"] Type *string `json:"type"` } diff --git a/pkg/api/models/vote.go b/pkg/api/models/vote.go index a54257b..0fd75fc 100644 --- a/pkg/api/models/vote.go +++ b/pkg/api/models/vote.go @@ -46,7 +46,7 @@ type Vote struct { // selection // Required: true - // Enum: [VOTE_SELECTION_APPROVED VOTE_SELECTION_REJECTED] + // Enum: ["VOTE_SELECTION_APPROVED","VOTE_SELECTION_REJECTED"] Selection *string `json:"selection"` // The signature applied to a particular vote.