# 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 X402SettleErrorReason(str, Enum):
    """
    The reason the payment settlement errored 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_ADDRESS = 'invalid_exact_evm_payload_signature_address'
    SETTLE_EXACT_SVM_BLOCK_HEIGHT_EXCEEDED = 'settle_exact_svm_block_height_exceeded'
    SETTLE_EXACT_SVM_TRANSACTION_CONFIRMATION_TIMED_OUT = 'settle_exact_svm_transaction_confirmation_timed_out'

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


