# coding: utf-8

"""
    Coinbase Developer Platform APIs

    The Coinbase Developer Platform APIs - leading the world's transition onchain.

    The version of the OpenAPI document: 2.0.0
    Contact: cdp@coinbase.com
    Generated by OpenAPI Generator (https://openapi-generator.tech)

    Do not edit the class manually.
"""  # noqa: E501


from __future__ import annotations
import json
from enum import Enum
from typing_extensions import Self


class X402VerifyInvalidReason(str, Enum):
    """
    The reason the payment is invalid on the x402 protocol.
    """

    """
    allowed enum values
    """
    INSUFFICIENT_FUNDS = 'insufficient_funds'
    INVALID_SCHEME = 'invalid_scheme'
    INVALID_NETWORK = 'invalid_network'
    INVALID_X402_VERSION = 'invalid_x402_version'
    INVALID_PAYMENT_REQUIREMENTS = 'invalid_payment_requirements'
    INVALID_PAYLOAD = 'invalid_payload'
    INVALID_EXACT_EVM_PAYLOAD_AUTHORIZATION_VALUE = 'invalid_exact_evm_payload_authorization_value'
    INVALID_EXACT_EVM_PAYLOAD_AUTHORIZATION_VALID_AFTER = 'invalid_exact_evm_payload_authorization_valid_after'
    INVALID_EXACT_EVM_PAYLOAD_AUTHORIZATION_VALID_BEFORE = 'invalid_exact_evm_payload_authorization_valid_before'
    INVALID_EXACT_EVM_PAYLOAD_AUTHORIZATION_TYPED_DATA_MESSAGE = 'invalid_exact_evm_payload_authorization_typed_data_message'
    INVALID_EXACT_EVM_PAYLOAD_AUTHORIZATION_FROM_ADDRESS_KYT = 'invalid_exact_evm_payload_authorization_from_address_kyt'
    INVALID_EXACT_EVM_PAYLOAD_AUTHORIZATION_TO_ADDRESS_KYT = 'invalid_exact_evm_payload_authorization_to_address_kyt'
    INVALID_EXACT_EVM_PAYLOAD_SIGNATURE = 'invalid_exact_evm_payload_signature'
    INVALID_EXACT_EVM_PAYLOAD_SIGNATURE_ADDRESS = 'invalid_exact_evm_payload_signature_address'
    INVALID_EXACT_SVM_PAYLOAD_TRANSACTION = 'invalid_exact_svm_payload_transaction'
    INVALID_EXACT_SVM_PAYLOAD_TRANSACTION_AMOUNT_MISMATCH = 'invalid_exact_svm_payload_transaction_amount_mismatch'
    INVALID_EXACT_SVM_PAYLOAD_TRANSACTION_CREATE_ATA_INSTRUCTION = 'invalid_exact_svm_payload_transaction_create_ata_instruction'
    INVALID_EXACT_SVM_PAYLOAD_TRANSACTION_CREATE_ATA_INSTRUCTION_INCORRECT_PAYEE = 'invalid_exact_svm_payload_transaction_create_ata_instruction_incorrect_payee'
    INVALID_EXACT_SVM_PAYLOAD_TRANSACTION_CREATE_ATA_INSTRUCTION_INCORRECT_ASSET = 'invalid_exact_svm_payload_transaction_create_ata_instruction_incorrect_asset'
    INVALID_EXACT_SVM_PAYLOAD_TRANSACTION_INSTRUCTIONS = 'invalid_exact_svm_payload_transaction_instructions'
    INVALID_EXACT_SVM_PAYLOAD_TRANSACTION_INSTRUCTIONS_LENGTH = 'invalid_exact_svm_payload_transaction_instructions_length'
    INVALID_EXACT_SVM_PAYLOAD_TRANSACTION_INSTRUCTIONS_COMPUTE_LIMIT_INSTRUCTION = 'invalid_exact_svm_payload_transaction_instructions_compute_limit_instruction'
    INVALID_EXACT_SVM_PAYLOAD_TRANSACTION_INSTRUCTIONS_COMPUTE_PRICE_INSTRUCTION = 'invalid_exact_svm_payload_transaction_instructions_compute_price_instruction'
    INVALID_EXACT_SVM_PAYLOAD_TRANSACTION_INSTRUCTIONS_COMPUTE_PRICE_INSTRUCTION_TOO_HIGH = 'invalid_exact_svm_payload_transaction_instructions_compute_price_instruction_too_high'
    INVALID_EXACT_SVM_PAYLOAD_TRANSACTION_INSTRUCTION_NOT_SPL_TOKEN_TRANSFER_CHECKED = 'invalid_exact_svm_payload_transaction_instruction_not_spl_token_transfer_checked'
    INVALID_EXACT_SVM_PAYLOAD_TRANSACTION_INSTRUCTION_NOT_TOKEN_2022_TRANSFER_CHECKED = 'invalid_exact_svm_payload_transaction_instruction_not_token_2022_transfer_checked'
    INVALID_EXACT_SVM_PAYLOAD_TRANSACTION_NOT_A_TRANSFER_INSTRUCTION = 'invalid_exact_svm_payload_transaction_not_a_transfer_instruction'
    INVALID_EXACT_SVM_PAYLOAD_TRANSACTION_CANNOT_DERIVE_RECEIVER_ATA = 'invalid_exact_svm_payload_transaction_cannot_derive_receiver_ata'
    INVALID_EXACT_SVM_PAYLOAD_TRANSACTION_RECEIVER_ATA_NOT_FOUND = 'invalid_exact_svm_payload_transaction_receiver_ata_not_found'
    INVALID_EXACT_SVM_PAYLOAD_TRANSACTION_SENDER_ATA_NOT_FOUND = 'invalid_exact_svm_payload_transaction_sender_ata_not_found'
    INVALID_EXACT_SVM_PAYLOAD_TRANSACTION_SIMULATION_FAILED = 'invalid_exact_svm_payload_transaction_simulation_failed'
    INVALID_EXACT_SVM_PAYLOAD_TRANSACTION_TRANSFER_TO_INCORRECT_ATA = 'invalid_exact_svm_payload_transaction_transfer_to_incorrect_ata'

    @classmethod
    def from_json(cls, json_str: str) -> Self:
        """Create an instance of X402VerifyInvalidReason from a JSON string"""
        return cls(json.loads(json_str))


