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

"""
spotifywebapiwithfixesandimprovementsfromsonallux

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


class ManyAudioFeatures(object):

    """Implementation of the 'ManyAudioFeatures' model.

    Attributes:
        audio_features (List[AudioFeaturesObject]): The model property of type
            List[AudioFeaturesObject].

    """

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

    def __init__(self,
                 audio_features=None):
        """Constructor for the ManyAudioFeatures class"""

        # Initialize members of the class
        self.audio_features = audio_features 

    @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
        audio_features = None
        if dictionary.get('audio_features') is not None:
            audio_features = [AudioFeaturesObject.from_dictionary(x) for x in dictionary.get('audio_features')]
        # Return an object of this model
        return cls(audio_features)

    def __repr__(self):
        return (f'{self.__class__.__name__}('
                f'audio_features={self.audio_features!r})')

    def __str__(self):
        return (f'{self.__class__.__name__}('
                f'audio_features={self.audio_features!s})')
