"""mindbodypublicapi.

This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
"""

# ruff: noqa: E501
from mindbodypublicapi.api_helper import APIHelper


class GetCrossRegionalClientAssociationsRequest(object):
    """Implementation of the 'GetCrossRegionalClientAssociationsRequest' model.

    Attributes:
        unique_client_id (int): Looks up the cross regional associations by the
            unique client’s ID.  Note: you need to provide the 'UniqueClientId' OR
            the 'ClientId' OR the 'Email'.   'UniqueClientId' takes precedence when
            provided. If not, but both 'ClientId' and 'Email' are provided,
            'ClientId' is used by default.
        client_id (str): Looks up the cross regional associations by the client’s ID.
        email (str): Looks up the cross regional associations by the client’s email
            address.
        first_name (str): First name (used for email queries)
        last_name (str): Last name (used for email queries)
        v_2 (bool): Use newer method
        exclude_inactive_sites (bool): Used to exclude inactive and deleted sites
            from the results.  When this flag is set to `true`, client profiles
            associated with inactive and deleted sites are not getting returned.
            When this flag is set to `false`,client profiles associated with inactive
            and deleted sites are getting returned.  Default: **true**
        limit (int): Number of results to include, defaults to 100
        offset (int): Page offset, defaults to 0.

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "unique_client_id": "UniqueClientId",
        "client_id": "ClientId",
        "email": "Email",
        "first_name": "FirstName",
        "last_name": "LastName",
        "v_2": "V2",
        "exclude_inactive_sites": "ExcludeInactiveSites",
        "limit": "Limit",
        "offset": "Offset",
    }

    _optionals = [
        "unique_client_id",
        "client_id",
        "email",
        "first_name",
        "last_name",
        "v_2",
        "exclude_inactive_sites",
        "limit",
        "offset",
    ]

    def __init__(
        self,
        unique_client_id=APIHelper.SKIP,
        client_id=APIHelper.SKIP,
        email=APIHelper.SKIP,
        first_name=APIHelper.SKIP,
        last_name=APIHelper.SKIP,
        v_2=APIHelper.SKIP,
        exclude_inactive_sites=APIHelper.SKIP,
        limit=APIHelper.SKIP,
        offset=APIHelper.SKIP):
        """Initialize a GetCrossRegionalClientAssociationsRequest instance."""
        # Initialize members of the class
        if unique_client_id is not APIHelper.SKIP:
            self.unique_client_id = unique_client_id
        if client_id is not APIHelper.SKIP:
            self.client_id = client_id
        if email is not APIHelper.SKIP:
            self.email = email
        if first_name is not APIHelper.SKIP:
            self.first_name = first_name
        if last_name is not APIHelper.SKIP:
            self.last_name = last_name
        if v_2 is not APIHelper.SKIP:
            self.v_2 = v_2
        if exclude_inactive_sites is not APIHelper.SKIP:
            self.exclude_inactive_sites = exclude_inactive_sites
        if limit is not APIHelper.SKIP:
            self.limit = limit
        if offset is not APIHelper.SKIP:
            self.offset = offset

    @classmethod
    def from_dictionary(cls,
                        dictionary):
        """Create an instance of this model from a dictionary

        Args:
            dictionary (dictionary): A dictionary representation of the object
            as obtained from the deserialization of the server's response. The
            keys MUST match property names in the API description.

        Returns:
            object: An instance of this structure class.

        """
        if not isinstance(dictionary, dict) or dictionary is None:
            return None

        # Extract variables from the dictionary
        unique_client_id =\
            dictionary.get("UniqueClientId")\
            if dictionary.get("UniqueClientId")\
                else APIHelper.SKIP
        client_id =\
            dictionary.get("ClientId")\
            if dictionary.get("ClientId")\
                else APIHelper.SKIP
        email =\
            dictionary.get("Email")\
            if dictionary.get("Email")\
                else APIHelper.SKIP
        first_name =\
            dictionary.get("FirstName")\
            if dictionary.get("FirstName")\
                else APIHelper.SKIP
        last_name =\
            dictionary.get("LastName")\
            if dictionary.get("LastName")\
                else APIHelper.SKIP
        v_2 =\
            dictionary.get("V2")\
            if "V2" in dictionary.keys()\
                else APIHelper.SKIP
        exclude_inactive_sites =\
            dictionary.get("ExcludeInactiveSites")\
            if "ExcludeInactiveSites" in dictionary.keys()\
                else APIHelper.SKIP
        limit =\
            dictionary.get("Limit")\
            if dictionary.get("Limit")\
                else APIHelper.SKIP
        offset =\
            dictionary.get("Offset")\
            if dictionary.get("Offset")\
                else APIHelper.SKIP

        # Return an object of this model
        return cls(unique_client_id,
                   client_id,
                   email,
                   first_name,
                   last_name,
                   v_2,
                   exclude_inactive_sites,
                   limit,
                   offset)

    def __repr__(self):
        """Return a unambiguous string representation."""
        _unique_client_id=(
            self.unique_client_id
            if hasattr(self, "unique_client_id")
            else None
        )
        _client_id=(
            self.client_id
            if hasattr(self, "client_id")
            else None
        )
        _email=(
            self.email
            if hasattr(self, "email")
            else None
        )
        _first_name=(
            self.first_name
            if hasattr(self, "first_name")
            else None
        )
        _last_name=(
            self.last_name
            if hasattr(self, "last_name")
            else None
        )
        _v_2=(
            self.v_2
            if hasattr(self, "v_2")
            else None
        )
        _exclude_inactive_sites=(
            self.exclude_inactive_sites
            if hasattr(self, "exclude_inactive_sites")
            else None
        )
        _limit=(
            self.limit
            if hasattr(self, "limit")
            else None
        )
        _offset=(
            self.offset
            if hasattr(self, "offset")
            else None
        )
        return (
            f"{self.__class__.__name__}("
            f"unique_client_id={_unique_client_id!r}, "
            f"client_id={_client_id!r}, "
            f"email={_email!r}, "
            f"first_name={_first_name!r}, "
            f"last_name={_last_name!r}, "
            f"v_2={_v_2!r}, "
            f"exclude_inactive_sites={_exclude_inactive_sites!r}, "
            f"limit={_limit!r}, "
            f"offset={_offset!r}, "
            f")"
        )

    def __str__(self):
        """Return a human-readable string representation."""
        _unique_client_id=(
            self.unique_client_id
            if hasattr(self, "unique_client_id")
            else None
        )
        _client_id=(
            self.client_id
            if hasattr(self, "client_id")
            else None
        )
        _email=(
            self.email
            if hasattr(self, "email")
            else None
        )
        _first_name=(
            self.first_name
            if hasattr(self, "first_name")
            else None
        )
        _last_name=(
            self.last_name
            if hasattr(self, "last_name")
            else None
        )
        _v_2=(
            self.v_2
            if hasattr(self, "v_2")
            else None
        )
        _exclude_inactive_sites=(
            self.exclude_inactive_sites
            if hasattr(self, "exclude_inactive_sites")
            else None
        )
        _limit=(
            self.limit
            if hasattr(self, "limit")
            else None
        )
        _offset=(
            self.offset
            if hasattr(self, "offset")
            else None
        )
        return (
            f"{self.__class__.__name__}("
            f"unique_client_id={_unique_client_id!s}, "
            f"client_id={_client_id!s}, "
            f"email={_email!s}, "
            f"first_name={_first_name!s}, "
            f"last_name={_last_name!s}, "
            f"v_2={_v_2!s}, "
            f"exclude_inactive_sites={_exclude_inactive_sites!s}, "
            f"limit={_limit!s}, "
            f"offset={_offset!s}, "
            f")"
        )
