# coding: utf-8

"""
    TrueLayer Resource API

    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)  # noqa: E501

    The version of the OpenAPI document: v1.0
    Contact: rienafairefr@gmail.com
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

import marshmallow
from marshmallow import Schema, validates, ValidationError, post_load, missing

from truelayer import fields
from truelayer.configuration import Configuration



class InfoSchema(Schema):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """
    addresses = marshmallow.fields.List(fields.Nested('AddressInfo')('AddressInfoSchema', )
,)

    date_of_birth = fields.DateTime()

    emails = marshmallow.fields.List(marshmallow.fields.String()
,)

    full_name = marshmallow.fields.String()

    phones = marshmallow.fields.List(marshmallow.fields.String()
,)

    update_timestamp = fields.DateTime()

    @validates("addresses")
    def validates_addresses(self, addresses):
        pass

    @validates("date_of_birth")
    def validates_date_of_birth(self, date_of_birth):
        pass

    @validates("emails")
    def validates_emails(self, emails):
        pass

    @validates("full_name")
    def validates_full_name(self, full_name):
        pass

    @validates("phones")
    def validates_phones(self, phones):
        pass

    @validates("update_timestamp")
    def validates_update_timestamp(self, update_timestamp):
        pass

    @post_load
    def post_load(self, data, **kwargs):
        config = Configuration()
        config.client_side_validation = False
        return Info(local_vars_configuration=config, **data)


class Info(object):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    """
    Attributes:
      openapi_types (dict): The key is attribute name
                            and the value is attribute type.
      attribute_map (dict): The key is attribute name
                            and the value is json key in definition.
    """
    openapi_types = {
        'addresses': 'list[AddressInfo]',
        'date_of_birth': 'datetime',
        'emails': 'list[str]',
        'full_name': 'str',
        'phones': 'list[str]',
        'update_timestamp': 'datetime'
    }

    attribute_map = {
        'addresses': 'addresses',
        'date_of_birth': 'date_of_birth',
        'emails': 'emails',
        'full_name': 'full_name',
        'phones': 'phones',
        'update_timestamp': 'update_timestamp'
    }

    def __init__(self, addresses=missing, date_of_birth=missing, emails=missing, full_name=missing, phones=missing, update_timestamp=missing, local_vars_configuration=None):  # noqa: E501
        """Info - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self.discriminator = None
        if self.local_vars_configuration.client_side_validation:
            validated = InfoSchema().load({
                'addresses': addresses,
                'date_of_birth': date_of_birth,
                'emails': emails,
                'full_name': full_name,
                'phones': phones,
                'update_timestamp': update_timestamp
            })
            self.addresses = validated.addresses
            self.date_of_birth = validated.date_of_birth
            self.emails = validated.emails
            self.full_name = validated.full_name
            self.phones = validated.phones
            self.update_timestamp = validated.update_timestamp
        else:
            self.addresses = addresses
            self.date_of_birth = date_of_birth
            self.emails = emails
            self.full_name = full_name
            self.phones = phones
            self.update_timestamp = update_timestamp

    def to_dict(self):
        """Returns the model properties as a dict"""
        return InfoSchema().dump(self)

    def to_str(self):
        """Returns the string representation of the model"""
        return pprint.pformat(self.to_dict())

    def __repr__(self):
        """For `print` and `pprint`"""
        return self.to_str()

    def __eq__(self, other):
        """Returns true if both objects are equal"""
        if not isinstance(other, Info):
            return False

        return self.to_dict() == other.to_dict()

    def __ne__(self, other):
        """Returns true if both objects are not equal"""
        if not isinstance(other, Info):
            return True

        return self.to_dict() != other.to_dict()
