"""mindbodypublicapi.

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

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


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

    Attributes:
        site_ids (List[int]): List of the requested site IDs. When omitted, returns
            all sites that the source has access to.
        include_lead_channels (bool): This is an optional parameter to get lead
            channels for a Site.
        include_per_staff_pricing (bool): Include whether or not studios have per
            staff pricing enabled.
        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 = {
        "site_ids": "SiteIds",
        "include_lead_channels": "IncludeLeadChannels",
        "include_per_staff_pricing": "IncludePerStaffPricing",
        "limit": "Limit",
        "offset": "Offset",
    }

    _optionals = [
        "site_ids",
        "include_lead_channels",
        "include_per_staff_pricing",
        "limit",
        "offset",
    ]

    def __init__(
        self,
        site_ids=APIHelper.SKIP,
        include_lead_channels=APIHelper.SKIP,
        include_per_staff_pricing=APIHelper.SKIP,
        limit=APIHelper.SKIP,
        offset=APIHelper.SKIP):
        """Initialize a GetSitesRequest instance."""
        # Initialize members of the class
        if site_ids is not APIHelper.SKIP:
            self.site_ids = site_ids
        if include_lead_channels is not APIHelper.SKIP:
            self.include_lead_channels = include_lead_channels
        if include_per_staff_pricing is not APIHelper.SKIP:
            self.include_per_staff_pricing = include_per_staff_pricing
        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
        site_ids =\
            dictionary.get("SiteIds")\
            if dictionary.get("SiteIds")\
                else APIHelper.SKIP
        include_lead_channels =\
            dictionary.get("IncludeLeadChannels")\
            if "IncludeLeadChannels" in dictionary.keys()\
                else APIHelper.SKIP
        include_per_staff_pricing =\
            dictionary.get("IncludePerStaffPricing")\
            if "IncludePerStaffPricing" 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(site_ids,
                   include_lead_channels,
                   include_per_staff_pricing,
                   limit,
                   offset)

    def __repr__(self):
        """Return a unambiguous string representation."""
        _site_ids=(
            self.site_ids
            if hasattr(self, "site_ids")
            else None
        )
        _include_lead_channels=(
            self.include_lead_channels
            if hasattr(self, "include_lead_channels")
            else None
        )
        _include_per_staff_pricing=(
            self.include_per_staff_pricing
            if hasattr(self, "include_per_staff_pricing")
            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"site_ids={_site_ids!r}, "
            f"include_lead_channels={_include_lead_channels!r}, "
            f"include_per_staff_pricing={_include_per_staff_pricing!r}, "
            f"limit={_limit!r}, "
            f"offset={_offset!r}, "
            f")"
        )

    def __str__(self):
        """Return a human-readable string representation."""
        _site_ids=(
            self.site_ids
            if hasattr(self, "site_ids")
            else None
        )
        _include_lead_channels=(
            self.include_lead_channels
            if hasattr(self, "include_lead_channels")
            else None
        )
        _include_per_staff_pricing=(
            self.include_per_staff_pricing
            if hasattr(self, "include_per_staff_pricing")
            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"site_ids={_site_ids!s}, "
            f"include_lead_channels={_include_lead_channels!s}, "
            f"include_per_staff_pricing={_include_per_staff_pricing!s}, "
            f"limit={_limit!s}, "
            f"offset={_offset!s}, "
            f")"
        )
