# coding: utf-8

"""
    CryptoAPIs

    Crypto APIs is a complex and innovative infrastructure layer that radically simplifies the development of any Blockchain and Crypto related applications. Organized around REST, Crypto APIs can assist both novice Bitcoin/Ethereum enthusiasts and crypto experts with the development of their blockchain applications. Crypto APIs provides unified endpoints and data, raw data, automatic tokens and coins forwardings, callback functionalities, and much more.  # noqa: E501

    The version of the OpenAPI document: 2021-03-20
    Contact: developers@cryptoapis.io
    Generated by OpenAPI Generator (https://openapi-generator.tech)

    Do not edit the class manually.
"""


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



from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr

class NewConfirmedTokensTransactionsRI(BaseModel):
    """
    NewConfirmedTokensTransactionsRI
    """
    address: StrictStr = Field(..., description="Represents the address of the transaction, per which the result is returned.")
    callback_secret_key: StrictStr = Field(..., alias="callbackSecretKey", description="Represents the Secret Key value provided by the customer. This field is used for security purposes during the callback notification, in order to prove the sender of the callback as Crypto APIs. For more information please see our [Documentation](https://developers.cryptoapis.io/technical-documentation/general-information/callbacks#callback-security).")
    callback_url: StrictStr = Field(..., alias="callbackUrl", description="Represents the URL that is set by the customer where the callback will be received at. The callback notification will be received only if and when the event occurs. `We support ONLY httpS type of protocol`.")
    created_timestamp: StrictInt = Field(..., alias="createdTimestamp", description="Defines the specific time/date when the subscription was created in Unix Timestamp.")
    event_type: StrictStr = Field(..., alias="eventType", description="Defines the type of the specific event available for the customer to subscribe to for callback notification.")
    is_active: StrictBool = Field(..., alias="isActive", description="Defines whether the subscription is active or not. Set as boolean.")
    receive_callback_on: StrictInt = Field(..., alias="receiveCallbackOn", description="Represents the exact confirmation, on which the user wants to receive callback.")
    reference_id: StrictStr = Field(..., alias="referenceId", description="Represents a unique ID used to reference the specific callback subscription.")
    __properties = ["address", "callbackSecretKey", "callbackUrl", "createdTimestamp", "eventType", "isActive", "receiveCallbackOn", "referenceId"]

    class Config:
        """Pydantic configuration"""
        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) -> NewConfirmedTokensTransactionsRI:
        """Create an instance of NewConfirmedTokensTransactionsRI 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) -> NewConfirmedTokensTransactionsRI:
        """Create an instance of NewConfirmedTokensTransactionsRI from a dict"""
        if obj is None:
            return None

        if not isinstance(obj, dict):
            return NewConfirmedTokensTransactionsRI.parse_obj(obj)

        _obj = NewConfirmedTokensTransactionsRI.parse_obj({
            "address": obj.get("address"),
            "callback_secret_key": obj.get("callbackSecretKey"),
            "callback_url": obj.get("callbackUrl"),
            "created_timestamp": obj.get("createdTimestamp"),
            "event_type": obj.get("eventType"),
            "is_active": obj.get("isActive"),
            "receive_callback_on": obj.get("receiveCallbackOn"),
            "reference_id": obj.get("referenceId")
        })
        return _obj

