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

"""
zypev1

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


class VideoSource(object):

    """Implementation of the 'VideoSource' model.

    TODO: type model description here.

    Attributes:
        name (string): TODO: type description here.
        guid (string): Globally unique identifier given by the video source
        affiliate_code (string): You can update this field for the following
            video source types: - Crunchyroll
        partner_name (string): You can update this field for the following
            video source types: - Hulu
        category_id (string): You can update this field for the following
            video source types: - MRSS
        auto_activate (bool): You can update this field for the following
            video source types: - MRSS
        auto_add (bool): You can update this field for the following video
            source types: - MRSS
        auto_deactivate (bool): You can update this field for the following
            video source types: - MRSS
        sync_interval (string): Options are: + daily + hourly
        sync_video_data_source (bool): TODO: type description here.
        url (string): URL of the MRSS feed. You can update this field for the
            following video source types: - MRSS
        import_from (string): Starting date of a date range to import from
        import_to (string): Ending date of a date range to import to
        editable (bool): TODO: type description here.
        video_count (string): How many videos are part of this video source

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "name": 'name',
        "guid": 'guid',
        "affiliate_code": 'affiliate_code',
        "partner_name": 'partner_name',
        "category_id": 'category_id',
        "auto_activate": 'auto_activate',
        "auto_add": 'auto_add',
        "auto_deactivate": 'auto_deactivate',
        "sync_interval": 'sync_interval',
        "sync_video_data_source": 'sync_video_data_source',
        "url": 'url',
        "import_from": 'import_from',
        "import_to": 'import_to',
        "editable": 'editable',
        "video_count": 'video_count'
    }

    def __init__(self,
                 name=None,
                 guid=None,
                 affiliate_code=None,
                 partner_name=None,
                 category_id=None,
                 auto_activate=None,
                 auto_add=None,
                 auto_deactivate=None,
                 sync_interval=None,
                 sync_video_data_source=None,
                 url=None,
                 import_from=None,
                 import_to=None,
                 editable=None,
                 video_count=None):
        """Constructor for the VideoSource class"""

        # Initialize members of the class
        self.name = name
        self.guid = guid
        self.affiliate_code = affiliate_code
        self.partner_name = partner_name
        self.category_id = category_id
        self.auto_activate = auto_activate
        self.auto_add = auto_add
        self.auto_deactivate = auto_deactivate
        self.sync_interval = sync_interval
        self.sync_video_data_source = sync_video_data_source
        self.url = url
        self.import_from = import_from
        self.import_to = import_to
        self.editable = editable
        self.video_count = video_count

    @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
        name = dictionary.get('name')
        guid = dictionary.get('guid')
        affiliate_code = dictionary.get('affiliate_code')
        partner_name = dictionary.get('partner_name')
        category_id = dictionary.get('category_id')
        auto_activate = dictionary.get('auto_activate')
        auto_add = dictionary.get('auto_add')
        auto_deactivate = dictionary.get('auto_deactivate')
        sync_interval = dictionary.get('sync_interval')
        sync_video_data_source = dictionary.get('sync_video_data_source')
        url = dictionary.get('url')
        import_from = dictionary.get('import_from')
        import_to = dictionary.get('import_to')
        editable = dictionary.get('editable')
        video_count = dictionary.get('video_count')

        # Return an object of this model
        return cls(name,
                   guid,
                   affiliate_code,
                   partner_name,
                   category_id,
                   auto_activate,
                   auto_add,
                   auto_deactivate,
                   sync_interval,
                   sync_video_data_source,
                   url,
                   import_from,
                   import_to,
                   editable,
                   video_count)
