# generated by datamodel-codegen:
#   filename:  openapi.json
#   timestamp: 2022-10-16T17:59:39+00:00

from __future__ import annotations

from typing import List, Optional

from pydantic import BaseModel, Field

from .model import AbiItem, AdvancedOptions, VBaseModel


class StreamsModelUpdate(VBaseModel):
    webhookUrl: Optional[str] = Field(
        None,
        description="Webhook URL where moralis will send the POST request.",
    )
    description: Optional[str] = Field(
        None, description="A description for this stream"
    )
    tag: Optional[str] = Field(
        None,
        description="A user-provided tag that will be send along the webhook, the user can use this tag to identify the specific stream if multiple streams are present",
    )
    topic0: Optional[List[str]] = Field(
        None,
        description="An Array of topic0's in hex, required if the type : log",
    )
    allAddresses: Optional[bool] = Field(
        None,
        description="Include events for all addresses (only applied when abi and topic0 is provided)",
    )
    includeNativeTxs: Optional[bool] = Field(
        None,
        description="Include or not native transactions defaults to false (only applied when type:contract)",
    )
    includeContractLogs: Optional[bool] = Field(
        None,
        description="Include or not logs of contract interactions defaults to false",
    )
    includeInternalTxs: Optional[bool] = Field(
        None,
        description="Include or not include internal transactions defaults to false",
    )
    abi: Optional[List[AbiItem]] = None
    advancedOptions: Optional[List[AdvancedOptions]] = None
    chainIds: Optional[List[str]] = Field(
        None,
        description='The ids of the chains for this stream in hex Ex: ["0x1","0x38"]',
    )
