"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""

from __future__ import annotations
import dataclasses
from .addressvalidationresultsmessage import AddressValidationResultsMessage
from dataclasses_json import Undefined, dataclass_json
from shippo import utils
from typing import List, Optional


@dataclass_json(undefined=Undefined.EXCLUDE)
@dataclasses.dataclass
class AddressValidationResults:
    r"""Object that contains information regarding if an address had been validated or not. Also contains any messages
    generated during validation. Children keys are <code>is_valid</code>(boolean) and <code>messages</code>(array).
    """
    is_valid: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('is_valid'), 'exclude': lambda f: f is None }})
    messages: Optional[List[AddressValidationResultsMessage]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('messages'), 'exclude': lambda f: f is None }})
    

