# coding: utf-8

"""
Copyright 2016 SmartBear Software

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

    Ref: https://github.com/swagger-api/swagger-codegen
"""

from pprint import pformat
from six import iteritems


class Product(object):
    """
    NOTE: This class is auto generated by the swagger code generator program.
    Do not edit the class manually.
    """
    def __init__(self):
        """
        Product - a model defined in Swagger

        :param dict swaggerTypes: The key is attribute name
                                  and the value is attribute type.
        :param dict attributeMap: The key is attribute name
                                  and the value is json key in definition.
        """
        self.swagger_types = {
            'uid': 'str',
            'plugin': 'str',
            'product_type': 'str',
            'product_data': 'object',
            'created': 'datetime',
            'title': 'str',
            'configuration_tag': 'str',
            'configuration_rule': 'str',
            'topics': 'list[TopicMapping]',
            'files': 'list[ProductFile]'
        }

        self.attribute_map = {
            'uid': 'uid',
            'plugin': 'plugin',
            'product_type': 'product_type',
            'product_data': 'product_data',
            'created': 'created',
            'title': 'title',
            'configuration_tag': 'configuration_tag',
            'configuration_rule': 'configuration_rule',
            'topics': 'topics',
            'files': 'files'
        }

        self._uid = None
        self._plugin = None
        self._product_type = None
        self._product_data = None
        self._created = None
        self._title = None
        self._configuration_tag = None
        self._configuration_rule = None
        self._topics = None
        self._files = None

    @property
    def uid(self):
        """
        Gets the uid of this Product.


        :return: The uid of this Product.
        :rtype: str
        """
        return self._uid

    @uid.setter
    def uid(self, uid):
        """
        Sets the uid of this Product.


        :param uid: The uid of this Product.
        :type: str
        """
        self._uid = uid

    @property
    def plugin(self):
        """
        Gets the plugin of this Product.
        Plugin that created this product

        :return: The plugin of this Product.
        :rtype: str
        """
        return self._plugin

    @plugin.setter
    def plugin(self, plugin):
        """
        Sets the plugin of this Product.
        Plugin that created this product

        :param plugin: The plugin of this Product.
        :type: str
        """
        self._plugin = plugin

    @property
    def product_type(self):
        """
        Gets the product_type of this Product.
        Type of product

        :return: The product_type of this Product.
        :rtype: str
        """
        return self._product_type

    @product_type.setter
    def product_type(self, product_type):
        """
        Sets the product_type of this Product.
        Type of product

        :param product_type: The product_type of this Product.
        :type: str
        """
        self._product_type = product_type

    @property
    def product_data(self):
        """
        Gets the product_data of this Product.
        Product data

        :return: The product_data of this Product.
        :rtype: object
        """
        return self._product_data

    @product_data.setter
    def product_data(self, product_data):
        """
        Sets the product_data of this Product.
        Product data

        :param product_data: The product_data of this Product.
        :type: object
        """
        self._product_data = product_data

    @property
    def created(self):
        """
        Gets the created of this Product.
        Date and time this product was created.

        :return: The created of this Product.
        :rtype: datetime
        """
        return self._created

    @created.setter
    def created(self, created):
        """
        Sets the created of this Product.
        Date and time this product was created.

        :param created: The created of this Product.
        :type: datetime
        """
        self._created = created

    @property
    def title(self):
        """
        Gets the title of this Product.
        Some descriptive title

        :return: The title of this Product.
        :rtype: str
        """
        return self._title

    @title.setter
    def title(self, title):
        """
        Sets the title of this Product.
        Some descriptive title

        :param title: The title of this Product.
        :type: str
        """
        self._title = title

    @property
    def configuration_tag(self):
        """
        Gets the configuration_tag of this Product.
        Tag of the configuration file that generated this product

        :return: The configuration_tag of this Product.
        :rtype: str
        """
        return self._configuration_tag

    @configuration_tag.setter
    def configuration_tag(self, configuration_tag):
        """
        Sets the configuration_tag of this Product.
        Tag of the configuration file that generated this product

        :param configuration_tag: The configuration_tag of this Product.
        :type: str
        """
        self._configuration_tag = configuration_tag

    @property
    def configuration_rule(self):
        """
        Gets the configuration_rule of this Product.
        Name of the rule that generated this product

        :return: The configuration_rule of this Product.
        :rtype: str
        """
        return self._configuration_rule

    @configuration_rule.setter
    def configuration_rule(self, configuration_rule):
        """
        Sets the configuration_rule of this Product.
        Name of the rule that generated this product

        :param configuration_rule: The configuration_rule of this Product.
        :type: str
        """
        self._configuration_rule = configuration_rule

    @property
    def topics(self):
        """
        Gets the topics of this Product.


        :return: The topics of this Product.
        :rtype: list[TopicMapping]
        """
        return self._topics

    @topics.setter
    def topics(self, topics):
        """
        Sets the topics of this Product.


        :param topics: The topics of this Product.
        :type: list[TopicMapping]
        """
        self._topics = topics

    @property
    def files(self):
        """
        Gets the files of this Product.


        :return: The files of this Product.
        :rtype: list[ProductFile]
        """
        return self._files

    @files.setter
    def files(self, files):
        """
        Sets the files of this Product.


        :param files: The files of this Product.
        :type: list[ProductFile]
        """
        self._files = files

    def to_dict(self):
        """
        Returns the model properties as a dict
        """
        result = {}

        for attr, _ in iteritems(self.swagger_types):
            value = getattr(self, attr)
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
                    value
                ))
            elif hasattr(value, "to_dict"):
                result[attr] = value.to_dict()
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], item[1].to_dict())
                    if hasattr(item[1], "to_dict") else item,
                    value.items()
                ))
            else:
                result[attr] = value

        return result

    def to_str(self):
        """
        Returns the string representation of the model
        """
        return pformat(self.to_dict())

    def __repr__(self):
        """
        For `print` and `pprint`
        """
        return self.to_str()

    def __eq__(self, other):
        """
        Returns true if both objects are equal
        """
        return self.__dict__ == other.__dict__

    def __ne__(self, other):
        """
        Returns true if both objects are not equal
        """
        return not self == other

