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

"""
spotifywebapiwithfixesandimprovementsfromsonallux

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


class PlaylistSnapshotId(object):

    """Implementation of the 'PlaylistSnapshotId' model.

    Attributes:
        snapshot_id (str): The model property of type str.

    """

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

    _optionals = [
        'snapshot_id',
    ]

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

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

    @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
        snapshot_id = dictionary.get("snapshot_id") if dictionary.get("snapshot_id") else APIHelper.SKIP
        # Return an object of this model
        return cls(snapshot_id)

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

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