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

"""
zypev1

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


class AdTagMetadata(object):

    """Implementation of the 'AdTagMetadata' model.

    TODO: type model description here.

    Attributes:
        id (string): TODO: type description here.
        created_at (string): TODO: type description here.
        site_id (string): TODO: type description here.
        name (string): TODO: type description here.
        active (string): TODO: type description here.
        network_key (string): TODO: type description here.
        device_category_id (string): TODO: type description here.
        device_id (string): ID of device to display ad on
        disabled (bool): TODO: type description here.
        interval_count (string): How many times a video or videos in a
            collection will play before a single user gets an ad
        interval_seconds (string): TODO: type description here.
        revenue_partner_id (string): TODO: type description here.
        scope (string): Optional. Whether interval_count applies to single
            video (‘video’) or a collection of videos (‘library’).
        tag (string): URL of the ad
        vmap (string): TODO: type description here.
        mtype (string): One of “AdTag::Vast” or “AdTag::Googima”

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "id": '_id',
        "created_at": 'created_at',
        "site_id": 'site_id',
        "name": 'name',
        "active": 'active',
        "network_key": 'network_key',
        "device_category_id": 'device_category_id',
        "device_id": 'device_id',
        "disabled": 'disabled',
        "interval_count": 'interval_count',
        "interval_seconds": 'interval_seconds',
        "revenue_partner_id": 'revenue_partner_id',
        "scope": 'scope',
        "tag": 'tag',
        "vmap": 'vmap',
        "mtype": '_type'
    }

    def __init__(self,
                 id=None,
                 created_at=None,
                 site_id=None,
                 name=None,
                 active=None,
                 network_key=None,
                 device_category_id=None,
                 device_id=None,
                 disabled=None,
                 interval_count=None,
                 interval_seconds=None,
                 revenue_partner_id=None,
                 scope=None,
                 tag=None,
                 vmap=None,
                 mtype=None):
        """Constructor for the AdTagMetadata class"""

        # Initialize members of the class
        self.id = id
        self.created_at = created_at
        self.site_id = site_id
        self.name = name
        self.active = active
        self.network_key = network_key
        self.device_category_id = device_category_id
        self.device_id = device_id
        self.disabled = disabled
        self.interval_count = interval_count
        self.interval_seconds = interval_seconds
        self.revenue_partner_id = revenue_partner_id
        self.scope = scope
        self.tag = tag
        self.vmap = vmap
        self.mtype = mtype

    @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')
        created_at = dictionary.get('created_at')
        site_id = dictionary.get('site_id')
        name = dictionary.get('name')
        active = dictionary.get('active')
        network_key = dictionary.get('network_key')
        device_category_id = dictionary.get('device_category_id')
        device_id = dictionary.get('device_id')
        disabled = dictionary.get('disabled')
        interval_count = dictionary.get('interval_count')
        interval_seconds = dictionary.get('interval_seconds')
        revenue_partner_id = dictionary.get('revenue_partner_id')
        scope = dictionary.get('scope')
        tag = dictionary.get('tag')
        vmap = dictionary.get('vmap')
        mtype = dictionary.get('_type')

        # Return an object of this model
        return cls(id,
                   created_at,
                   site_id,
                   name,
                   active,
                   network_key,
                   device_category_id,
                   device_id,
                   disabled,
                   interval_count,
                   interval_seconds,
                   revenue_partner_id,
                   scope,
                   tag,
                   vmap,
                   mtype)
