# -*- coding: utf-8 -*-

"""
spotifywebapiwithfixesandimprovementsfromsonallux

This file was automatically generated by APIMATIC v3.0 (
 https://www.apimatic.io ).
"""
from spotifywebapiwithfixesandimprovementsfromsonallux.api_helper import APIHelper


class MeTracksRequest1(object):

    """Implementation of the 'Me Tracks Request1' model.

    Attributes:
        ids (List[str]): A JSON array of the [Spotify
            IDs](/documentation/web-api/concepts/spotify-uris-ids). For
            example: `["4iV5W9uYEdYUVa79Axb7Rh",
            "1301WleyT98MSxVHPZCA6M"]`<br/>A maximum of 50 items can be
            specified in one request. _**Note**: if the `ids` parameter is
            present in the query string, any IDs listed here in the body will
            be ignored._

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "ids": 'ids'
    }

    _optionals = [
        'ids',
    ]

    def __init__(self,
                 ids=APIHelper.SKIP):
        """Constructor for the MeTracksRequest1 class"""

        # Initialize members of the class
        if ids is not APIHelper.SKIP:
            self.ids = ids 

    @classmethod
    def from_dictionary(cls,
                        dictionary):
        """Creates 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
        ids = dictionary.get("ids") if dictionary.get("ids") else APIHelper.SKIP
        # Return an object of this model
        return cls(ids)

    def __repr__(self):
        return (f'{self.__class__.__name__}('
                f'ids={(self.ids if hasattr(self, "ids") else None)!r})')

    def __str__(self):
        return (f'{self.__class__.__name__}('
                f'ids={(self.ids if hasattr(self, "ids") else None)!s})')
