# coding: utf-8

"""
    Marqeta Core API

    Simplified management of your payment programs  # noqa: E501

    The version of the OpenAPI document: 3.0.0
    Contact: dev@swadesh.co
    Generated by OpenAPI Generator (https://openapi-generator.tech)

    Do not edit the class manually.
"""


from __future__ import annotations
from inspect import getfullargspec
import pprint
import re  # noqa: F401
import json



from pydantic import BaseModel, StrictStr, validator

class TranLogAttributeRequest(BaseModel):
    """
    TranLogAttributeRequest
    """
    transaction_token: StrictStr = ...
    attribute_name: StrictStr = ...
    attribute_value: StrictStr = ...
    __properties = ["transaction_token", "attribute_name", "attribute_value"]

    @validator('attribute_name')
    def attribute_name_validate_enum(cls, v):
        if v not in ('FUEL_TYPE', 'NUM_GALLONS', 'PRICE_PER_GALLON', 'EARN_CARDHOLDER_REWARD', 'TRAN_LIFE_CYCLE', 'MULTI_CLEARING_SEQ', 'MULTI_CLEARING_FINAL_COMPLETION_ID', 'POS_ENTRY_CODE', 'PROCESSING_CODE', 'INTERCHANGE_RATE_DESCRIPTOR', 'TERMINAL_TYPE', 'SETTLEMENT_INDICATOR', 'CARD_PRESENT', 'CARD_HOLDER_PRESENT', 'TRAN_ORIGIN', 'FIND_ORIGINAL_FINDER', 'MANUAL_NOTE', 'POST_DATE_MODIFICATION', 'CLEARING_RECORD_HASH', 'CLEARING_RAW_RECORD_HASH', 'CLEARING_RECORD_FILE_NAME', 'CLEARING_RECORD_SEQUENCE_NUMBER', 'TOKEN_ELAPSED_TIME_TO_LIVE_FOR_AN_LUK', 'TOKEN_COUNT_OF_TRANSACTION_FOR_AN_LUK', 'TOKEN_CUMULATIVE_TOTAL_TRANSACTION_AMOUNT_FOR_AN_LUK', 'INCREMENTAL_CUMULATIVE_AMOUNT', 'FINAL_INCREMENTAL_AUTH', 'NETWORK_FEES_MODEL', 'ECOMMERCE_SECURITY_LEVEL_INDICATOR', 'PAYMENT_CHANNEL', 'PAYMENT_INSTRUMENT', 'PAYMENT_ACCOUNT_REFERENCE', 'PIN_PRESENT', 'TERMINAL_PARTIAL_APPROVAL_CAPABLE', 'STIP_REASON_CODE', 'STIP_EXTENDED_REASON_CODE', 'IS_RECURRING', 'IS_INSTALLMENT', 'TRANSACTION_INTEGRITY_CLASS', 'DYNAMIC_CVV_ATC', 'STANDIN_APPROVED_BY', 'STANDIN_BY', 'ORIGINAL_CURRENCY_CODE', 'DYNAMIC_CURRENCY_CONVERSION', 'CARDHOLDER_BILLING_CONVERSION_RATE', 'CARDHOLDER_BILLING_CONVERSION_DATE', 'IS_IT_STIP_APPROVAL', 'ECOMMERCE_AUTHENTICATION_DATA', 'CAVV_RESULT_CODE', 'NETWORK_TRANSACTION_AMOUNT_DE_4', 'NETWORK_SETTLEMENT_AMOUNT_DE_5', 'NETWORK_CARDHOLDER_BILLING_AMOUNT_DE_6', 'NETWORK_FEE_AMOUNT_DE_28', 'NETWORK_CASHBACK_AMOUNT_OTHER_DE_54', 'NETWORK_REPLACEMENT_AMOUNT_OTHER_DE_61', 'NETWORK_REPLACEMENT_AMOUNT_DE_95', 'ADVICE_DETAIL_CODE', 'ASYNC_REQUEST_TOKEN', 'TXN_MCC', 'EXTRA_FIELDS', 'SURCHARGE_FREE_ATM_NETWORK', 'NETWORK_PRODUCT_ID', 'NETWORK_PROGRAM_ID', 'NETWORK_SPEND_QUALIFIER', 'THREE_DS_CAVV_VERSION', 'THREE_DS_MESSAGE_VERSION', 'THREE_DS_AUTHENTICATION_METHOD', 'THREE_DS_AUTHENTICATION_STATUS', 'THREE_DS_ACQUIRER_EXEMPTION', 'MOTO_INDICATOR', 'PREAUTH_TIME_LIMIT', 'AUTHORIZATION_SOURCE_CODE', 'OCT_UNIQUE_TRANSACTION_REFERENCE_NUMBER', 'IS_FUNDING_TRANSACTION', 'CARDHOLDER_SETTLEMENT_CONVERSION_RATE', 'SETTLEMENT_CURRENCY_CODE', 'ENHANCED_DATA_TOKEN', 'DD_EARLY_PAY_ELIGIBLE', 'DD_EARLY_PAY_SETTLEMENT_DATE', 'CURRENCY_CONVERSION_ASSESSMENT', 'THREE_DS_ISSUER_EXEMPTION', 'MERCHANT_TAX_ID', 'MERCHANT_ORIGIN_COUNTRY_CODE', 'NETWORK_ACCOUNT_INTELLIGENCE_SCORE', 'NETWORK_ASSIGNED_ID', 'REAL_TIME_FEE_TYPE', 'OCT_TYPE', 'ONE_LEG_OUT', 'ATC_VALUE', 'ATC_DISCREPANCY_VALUE', 'ATC_DISCREPANCY_INDICATOR', 'ISA_INDICATOR', 'ACCOUNT_IDENTIFICATION_1', 'INSTALLMENT_PAYMENT_FREQUENCY', 'INSTALLMENT_PAYMENT_FIRST_INSTALLMENT_DATE', 'INSTALLMENT_PAYMENT_TOTAL_AMOUNT_FUNDED', 'INSTALLMENT_PAYMENT_PAYMENT_TYPE'):
            raise ValueError("must be one of enum values ('FUEL_TYPE', 'NUM_GALLONS', 'PRICE_PER_GALLON', 'EARN_CARDHOLDER_REWARD', 'TRAN_LIFE_CYCLE', 'MULTI_CLEARING_SEQ', 'MULTI_CLEARING_FINAL_COMPLETION_ID', 'POS_ENTRY_CODE', 'PROCESSING_CODE', 'INTERCHANGE_RATE_DESCRIPTOR', 'TERMINAL_TYPE', 'SETTLEMENT_INDICATOR', 'CARD_PRESENT', 'CARD_HOLDER_PRESENT', 'TRAN_ORIGIN', 'FIND_ORIGINAL_FINDER', 'MANUAL_NOTE', 'POST_DATE_MODIFICATION', 'CLEARING_RECORD_HASH', 'CLEARING_RAW_RECORD_HASH', 'CLEARING_RECORD_FILE_NAME', 'CLEARING_RECORD_SEQUENCE_NUMBER', 'TOKEN_ELAPSED_TIME_TO_LIVE_FOR_AN_LUK', 'TOKEN_COUNT_OF_TRANSACTION_FOR_AN_LUK', 'TOKEN_CUMULATIVE_TOTAL_TRANSACTION_AMOUNT_FOR_AN_LUK', 'INCREMENTAL_CUMULATIVE_AMOUNT', 'FINAL_INCREMENTAL_AUTH', 'NETWORK_FEES_MODEL', 'ECOMMERCE_SECURITY_LEVEL_INDICATOR', 'PAYMENT_CHANNEL', 'PAYMENT_INSTRUMENT', 'PAYMENT_ACCOUNT_REFERENCE', 'PIN_PRESENT', 'TERMINAL_PARTIAL_APPROVAL_CAPABLE', 'STIP_REASON_CODE', 'STIP_EXTENDED_REASON_CODE', 'IS_RECURRING', 'IS_INSTALLMENT', 'TRANSACTION_INTEGRITY_CLASS', 'DYNAMIC_CVV_ATC', 'STANDIN_APPROVED_BY', 'STANDIN_BY', 'ORIGINAL_CURRENCY_CODE', 'DYNAMIC_CURRENCY_CONVERSION', 'CARDHOLDER_BILLING_CONVERSION_RATE', 'CARDHOLDER_BILLING_CONVERSION_DATE', 'IS_IT_STIP_APPROVAL', 'ECOMMERCE_AUTHENTICATION_DATA', 'CAVV_RESULT_CODE', 'NETWORK_TRANSACTION_AMOUNT_DE_4', 'NETWORK_SETTLEMENT_AMOUNT_DE_5', 'NETWORK_CARDHOLDER_BILLING_AMOUNT_DE_6', 'NETWORK_FEE_AMOUNT_DE_28', 'NETWORK_CASHBACK_AMOUNT_OTHER_DE_54', 'NETWORK_REPLACEMENT_AMOUNT_OTHER_DE_61', 'NETWORK_REPLACEMENT_AMOUNT_DE_95', 'ADVICE_DETAIL_CODE', 'ASYNC_REQUEST_TOKEN', 'TXN_MCC', 'EXTRA_FIELDS', 'SURCHARGE_FREE_ATM_NETWORK', 'NETWORK_PRODUCT_ID', 'NETWORK_PROGRAM_ID', 'NETWORK_SPEND_QUALIFIER', 'THREE_DS_CAVV_VERSION', 'THREE_DS_MESSAGE_VERSION', 'THREE_DS_AUTHENTICATION_METHOD', 'THREE_DS_AUTHENTICATION_STATUS', 'THREE_DS_ACQUIRER_EXEMPTION', 'MOTO_INDICATOR', 'PREAUTH_TIME_LIMIT', 'AUTHORIZATION_SOURCE_CODE', 'OCT_UNIQUE_TRANSACTION_REFERENCE_NUMBER', 'IS_FUNDING_TRANSACTION', 'CARDHOLDER_SETTLEMENT_CONVERSION_RATE', 'SETTLEMENT_CURRENCY_CODE', 'ENHANCED_DATA_TOKEN', 'DD_EARLY_PAY_ELIGIBLE', 'DD_EARLY_PAY_SETTLEMENT_DATE', 'CURRENCY_CONVERSION_ASSESSMENT', 'THREE_DS_ISSUER_EXEMPTION', 'MERCHANT_TAX_ID', 'MERCHANT_ORIGIN_COUNTRY_CODE', 'NETWORK_ACCOUNT_INTELLIGENCE_SCORE', 'NETWORK_ASSIGNED_ID', 'REAL_TIME_FEE_TYPE', 'OCT_TYPE', 'ONE_LEG_OUT', 'ATC_VALUE', 'ATC_DISCREPANCY_VALUE', 'ATC_DISCREPANCY_INDICATOR', 'ISA_INDICATOR', 'ACCOUNT_IDENTIFICATION_1', 'INSTALLMENT_PAYMENT_FREQUENCY', 'INSTALLMENT_PAYMENT_FIRST_INSTALLMENT_DATE', 'INSTALLMENT_PAYMENT_TOTAL_AMOUNT_FUNDED', 'INSTALLMENT_PAYMENT_PAYMENT_TYPE')")
        return v

    class Config:
        allow_population_by_field_name = True
        validate_assignment = True

    def to_str(self) -> str:
        """Returns the string representation of the model using alias"""
        return pprint.pformat(self.dict(by_alias=True))

    def to_json(self) -> str:
        """Returns the JSON representation of the model using alias"""
        return json.dumps(self.to_dict())

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

    def to_dict(self):
        """Returns the dictionary representation of the model using alias"""
        _dict = self.dict(by_alias=True,
                          exclude={
                          },
                          exclude_none=True)
        return _dict

    @classmethod
    def from_dict(cls, obj: dict) -> TranLogAttributeRequest:
        """Create an instance of TranLogAttributeRequest from a dict"""
        if obj is None:
            return None

        if type(obj) is not dict:
            return TranLogAttributeRequest.parse_obj(obj)

        _obj = TranLogAttributeRequest.parse_obj({
            "transaction_token": obj.get("transaction_token"),
            "attribute_name": obj.get("attribute_name"),
            "attribute_value": obj.get("attribute_value")
        })
        return _obj

