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

"""
zypev1

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


class App(object):

    """Implementation of the 'App' model.

    TODO: type model description here.

    Attributes:
        id (string): ID of the record
        active (bool): true
        app_type_id (string): ID of the AppType this app belongs to (AppleTV,
            Android, iOS, etc)
        device_ids (string): Devices the app can play on
        site_id (string): Site the app belongs to
        title (string): Descriptive title of the app
        version (string): TODO: type description here.
        store_icon_url (string): icon.com

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "id": '_id',
        "active": 'active',
        "app_type_id": 'app_type_id',
        "device_ids": 'device_ids',
        "site_id": 'site_id',
        "title": 'title',
        "version": 'version',
        "store_icon_url": 'store_icon_url'
    }

    def __init__(self,
                 id=None,
                 active=None,
                 app_type_id=None,
                 device_ids=None,
                 site_id=None,
                 title=None,
                 version=None,
                 store_icon_url=None):
        """Constructor for the App class"""

        # Initialize members of the class
        self.id = id
        self.active = active
        self.app_type_id = app_type_id
        self.device_ids = device_ids
        self.site_id = site_id
        self.title = title
        self.version = version
        self.store_icon_url = store_icon_url

    @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 dictionary is None:
            return None

        # Extract variables from the dictionary
        id = dictionary.get('_id')
        active = dictionary.get('active')
        app_type_id = dictionary.get('app_type_id')
        device_ids = dictionary.get('device_ids')
        site_id = dictionary.get('site_id')
        title = dictionary.get('title')
        version = dictionary.get('version')
        store_icon_url = dictionary.get('store_icon_url')

        # Return an object of this model
        return cls(id,
                   active,
                   app_type_id,
                   device_ids,
                   site_id,
                   title,
                   version,
                   store_icon_url)
