"""This file was generated by xsdata, v25.4, on 2025-04-15 20:53:12

Generator: DataclassGenerator
See: https://xsdata.readthedocs.io/
"""

from dataclasses import dataclass, field
from typing import Optional

__NAMESPACE__ = "http://www.portalfiscal.inf.br/mdfe/wsdl/MDFeConsulta"


@dataclass
class MdfeCabecMsg:
    class Meta:
        name = "mdfeCabecMsg"
        namespace = "http://www.portalfiscal.inf.br/mdfe/wsdl/MDFeConsulta"

    cUF: Optional[str] = field(
        default=None,
        metadata={
            "type": "Element",
        },
    )
    versaoDados: Optional[str] = field(
        default=None,
        metadata={
            "type": "Element",
        },
    )
    any_attributes: dict[str, str] = field(
        default_factory=dict,
        metadata={
            "type": "Attributes",
            "namespace": "##any",
        },
    )


@dataclass
class MdfeConsultaMdfresult:
    class Meta:
        name = "mdfeConsultaMDFResult"
        namespace = "http://www.portalfiscal.inf.br/mdfe/wsdl/MDFeConsulta"

    content: list[object] = field(
        default_factory=list,
        metadata={
            "type": "Wildcard",
            "namespace": "##any",
            "mixed": True,
        },
    )


@dataclass
class MdfeDadosMsg:
    class Meta:
        name = "mdfeDadosMsg"
        namespace = "http://www.portalfiscal.inf.br/mdfe/wsdl/MDFeConsulta"

    content: list[object] = field(
        default_factory=list,
        metadata={
            "type": "Wildcard",
            "namespace": "##any",
            "mixed": True,
        },
    )


@dataclass
class MdfeConsultaSoap12MdfeConsultaMdfInput:
    class Meta:
        name = "Envelope"
        namespace = "http://schemas.xmlsoap.org/soap/envelope/"

    body: Optional["MdfeConsultaSoap12MdfeConsultaMdfInput.Body"] = field(
        default=None,
        metadata={
            "name": "Body",
            "type": "Element",
        },
    )
    header: Optional["MdfeConsultaSoap12MdfeConsultaMdfInput.Header"] = field(
        default=None,
        metadata={
            "name": "Header",
            "type": "Element",
        },
    )

    @dataclass
    class Body:
        mdfeDadosMsg: Optional[MdfeDadosMsg] = field(
            default=None,
            metadata={
                "type": "Element",
                "namespace": "http://www.portalfiscal.inf.br/mdfe/wsdl/MDFeConsulta",
            },
        )

    @dataclass
    class Header:
        mdfeCabecMsg: Optional[MdfeCabecMsg] = field(
            default=None,
            metadata={
                "type": "Element",
                "namespace": "http://www.portalfiscal.inf.br/mdfe/wsdl/MDFeConsulta",
            },
        )


@dataclass
class MdfeConsultaSoap12MdfeConsultaMdfOutput:
    class Meta:
        name = "Envelope"
        namespace = "http://schemas.xmlsoap.org/soap/envelope/"

    body: Optional["MdfeConsultaSoap12MdfeConsultaMdfOutput.Body"] = field(
        default=None,
        metadata={
            "name": "Body",
            "type": "Element",
        },
    )
    header: Optional["MdfeConsultaSoap12MdfeConsultaMdfOutput.Header"] = field(
        default=None,
        metadata={
            "name": "Header",
            "type": "Element",
        },
    )

    @dataclass
    class Body:
        mdfeConsultaMDFResult: Optional[MdfeConsultaMdfresult] = field(
            default=None,
            metadata={
                "type": "Element",
                "namespace": "http://www.portalfiscal.inf.br/mdfe/wsdl/MDFeConsulta",
            },
        )
        fault: Optional[
            "MdfeConsultaSoap12MdfeConsultaMdfOutput.Body.Fault"
        ] = field(
            default=None,
            metadata={
                "name": "Fault",
                "type": "Element",
            },
        )

        @dataclass
        class Fault:
            faultcode: Optional[str] = field(
                default=None,
                metadata={
                    "type": "Element",
                    "namespace": "",
                },
            )
            faultstring: Optional[str] = field(
                default=None,
                metadata={
                    "type": "Element",
                    "namespace": "",
                },
            )
            faultactor: Optional[str] = field(
                default=None,
                metadata={
                    "type": "Element",
                    "namespace": "",
                },
            )
            detail: Optional[str] = field(
                default=None,
                metadata={
                    "type": "Element",
                    "namespace": "",
                },
            )

    @dataclass
    class Header:
        mdfeCabecMsg: Optional[MdfeCabecMsg] = field(
            default=None,
            metadata={
                "type": "Element",
                "namespace": "http://www.portalfiscal.inf.br/mdfe/wsdl/MDFeConsulta",
            },
        )


class MdfeConsultaSoap12MdfeConsultaMdf:
    style = "document"
    location = "https://mdfe.svrs.rs.gov.br/ws/MDFeConsulta/MDFeConsulta.asmx"
    transport = "http://schemas.xmlsoap.org/soap/http"
    soapAction = (
        "http://www.portalfiscal.inf.br/mdfe/wsdl/MDFeConsulta/mdfeConsultaMDF"
    )
    input = MdfeConsultaSoap12MdfeConsultaMdfInput
    output = MdfeConsultaSoap12MdfeConsultaMdfOutput
