# coding: utf-8

"""
    Defect Dojo API

    To use the API you need be authorized.  # noqa: E501

    The version of the OpenAPI document: v2
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six


class Product(object):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    """
    Attributes:
      openapi_types (dict): The key is attribute name
                            and the value is attribute type.
      attribute_map (dict): The key is attribute name
                            and the value is json key in definition.
    """
    openapi_types = {
        'id': 'int',
        'findings_count': 'str',
        'findings_list': 'str',
        'tags': 'list[str]',
        'product_meta': 'list[ProductMeta]',
        'name': 'str',
        'description': 'str',
        'created': 'datetime',
        'prod_numeric_grade': 'int',
        'business_criticality': 'str',
        'platform': 'str',
        'lifecycle': 'str',
        'origin': 'str',
        'user_records': 'int',
        'revenue': 'str',
        'external_audience': 'bool',
        'internet_accessible': 'bool',
        'product_manager': 'int',
        'technical_contact': 'int',
        'team_manager': 'int',
        'prod_type': 'int',
        'authorized_users': 'list[int]',
        'regulations': 'list[int]'
    }

    attribute_map = {
        'id': 'id',
        'findings_count': 'findings_count',
        'findings_list': 'findings_list',
        'tags': 'tags',
        'product_meta': 'product_meta',
        'name': 'name',
        'description': 'description',
        'created': 'created',
        'prod_numeric_grade': 'prod_numeric_grade',
        'business_criticality': 'business_criticality',
        'platform': 'platform',
        'lifecycle': 'lifecycle',
        'origin': 'origin',
        'user_records': 'user_records',
        'revenue': 'revenue',
        'external_audience': 'external_audience',
        'internet_accessible': 'internet_accessible',
        'product_manager': 'product_manager',
        'technical_contact': 'technical_contact',
        'team_manager': 'team_manager',
        'prod_type': 'prod_type',
        'authorized_users': 'authorized_users',
        'regulations': 'regulations'
    }

    def __init__(self, id=None, findings_count=None, findings_list=None, tags=None, product_meta=None, name=None, description=None, created=None, prod_numeric_grade=None, business_criticality=None, platform=None, lifecycle=None, origin=None, user_records=None, revenue=None, external_audience=None, internet_accessible=None, product_manager=None, technical_contact=None, team_manager=None, prod_type=None, authorized_users=None, regulations=None):  # noqa: E501
        """Product - a model defined in OpenAPI"""  # noqa: E501

        self._id = None
        self._findings_count = None
        self._findings_list = None
        self._tags = None
        self._product_meta = None
        self._name = None
        self._description = None
        self._created = None
        self._prod_numeric_grade = None
        self._business_criticality = None
        self._platform = None
        self._lifecycle = None
        self._origin = None
        self._user_records = None
        self._revenue = None
        self._external_audience = None
        self._internet_accessible = None
        self._product_manager = None
        self._technical_contact = None
        self._team_manager = None
        self._prod_type = None
        self._authorized_users = None
        self._regulations = None
        self.discriminator = None

        if id is not None:
            self.id = id
        if findings_count is not None:
            self.findings_count = findings_count
        if findings_list is not None:
            self.findings_list = findings_list
        if tags is not None:
            self.tags = tags
        if product_meta is not None:
            self.product_meta = product_meta
        self.name = name
        self.description = description
        if created is not None:
            self.created = created
        self.prod_numeric_grade = prod_numeric_grade
        self.business_criticality = business_criticality
        self.platform = platform
        self.lifecycle = lifecycle
        self.origin = origin
        self.user_records = user_records
        self.revenue = revenue
        if external_audience is not None:
            self.external_audience = external_audience
        if internet_accessible is not None:
            self.internet_accessible = internet_accessible
        self.product_manager = product_manager
        self.technical_contact = technical_contact
        self.team_manager = team_manager
        self.prod_type = prod_type
        if authorized_users is not None:
            self.authorized_users = authorized_users
        if regulations is not None:
            self.regulations = regulations

    @property
    def id(self):
        """Gets the id of this Product.  # noqa: E501


        :return: The id of this Product.  # noqa: E501
        :rtype: int
        """
        return self._id

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


        :param id: The id of this Product.  # noqa: E501
        :type: int
        """

        self._id = id

    @property
    def findings_count(self):
        """Gets the findings_count of this Product.  # noqa: E501


        :return: The findings_count of this Product.  # noqa: E501
        :rtype: str
        """
        return self._findings_count

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


        :param findings_count: The findings_count of this Product.  # noqa: E501
        :type: str
        """

        self._findings_count = findings_count

    @property
    def findings_list(self):
        """Gets the findings_list of this Product.  # noqa: E501


        :return: The findings_list of this Product.  # noqa: E501
        :rtype: str
        """
        return self._findings_list

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


        :param findings_list: The findings_list of this Product.  # noqa: E501
        :type: str
        """

        self._findings_list = findings_list

    @property
    def tags(self):
        """Gets the tags of this Product.  # noqa: E501


        :return: The tags of this Product.  # noqa: E501
        :rtype: list[str]
        """
        return self._tags

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


        :param tags: The tags of this Product.  # noqa: E501
        :type: list[str]
        """

        self._tags = tags

    @property
    def product_meta(self):
        """Gets the product_meta of this Product.  # noqa: E501


        :return: The product_meta of this Product.  # noqa: E501
        :rtype: list[ProductMeta]
        """
        return self._product_meta

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


        :param product_meta: The product_meta of this Product.  # noqa: E501
        :type: list[ProductMeta]
        """

        self._product_meta = product_meta

    @property
    def name(self):
        """Gets the name of this Product.  # noqa: E501


        :return: The name of this Product.  # noqa: E501
        :rtype: str
        """
        return self._name

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


        :param name: The name of this Product.  # noqa: E501
        :type: str
        """
        if name is None:
            raise ValueError("Invalid value for `name`, must not be `None`")  # noqa: E501
        if name is not None and len(name) > 255:
            raise ValueError("Invalid value for `name`, length must be less than or equal to `255`")  # noqa: E501
        if name is not None and len(name) < 1:
            raise ValueError("Invalid value for `name`, length must be greater than or equal to `1`")  # noqa: E501

        self._name = name

    @property
    def description(self):
        """Gets the description of this Product.  # noqa: E501


        :return: The description of this Product.  # noqa: E501
        :rtype: str
        """
        return self._description

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


        :param description: The description of this Product.  # noqa: E501
        :type: str
        """
        if description is None:
            raise ValueError("Invalid value for `description`, must not be `None`")  # noqa: E501
        if description is not None and len(description) > 4000:
            raise ValueError("Invalid value for `description`, length must be less than or equal to `4000`")  # noqa: E501
        if description is not None and len(description) < 1:
            raise ValueError("Invalid value for `description`, length must be greater than or equal to `1`")  # noqa: E501

        self._description = description

    @property
    def created(self):
        """Gets the created of this Product.  # noqa: E501


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

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


        :param created: The created of this Product.  # noqa: E501
        :type: datetime
        """

        self._created = created

    @property
    def prod_numeric_grade(self):
        """Gets the prod_numeric_grade of this Product.  # noqa: E501


        :return: The prod_numeric_grade of this Product.  # noqa: E501
        :rtype: int
        """
        return self._prod_numeric_grade

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


        :param prod_numeric_grade: The prod_numeric_grade of this Product.  # noqa: E501
        :type: int
        """
        if prod_numeric_grade is not None and prod_numeric_grade > 2147483647:  # noqa: E501
            raise ValueError("Invalid value for `prod_numeric_grade`, must be a value less than or equal to `2147483647`")  # noqa: E501
        if prod_numeric_grade is not None and prod_numeric_grade < -2147483648:  # noqa: E501
            raise ValueError("Invalid value for `prod_numeric_grade`, must be a value greater than or equal to `-2147483648`")  # noqa: E501

        self._prod_numeric_grade = prod_numeric_grade

    @property
    def business_criticality(self):
        """Gets the business_criticality of this Product.  # noqa: E501


        :return: The business_criticality of this Product.  # noqa: E501
        :rtype: str
        """
        return self._business_criticality

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


        :param business_criticality: The business_criticality of this Product.  # noqa: E501
        :type: str
        """
        allowed_values = [None,"very high", "high", "medium", "low", "very low", "none"]  # noqa: E501
        if business_criticality not in allowed_values:
            raise ValueError(
                "Invalid value for `business_criticality` ({0}), must be one of {1}"  # noqa: E501
                .format(business_criticality, allowed_values)
            )

        self._business_criticality = business_criticality

    @property
    def platform(self):
        """Gets the platform of this Product.  # noqa: E501


        :return: The platform of this Product.  # noqa: E501
        :rtype: str
        """
        return self._platform

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


        :param platform: The platform of this Product.  # noqa: E501
        :type: str
        """
        allowed_values = [None,"web service", "desktop", "iot", "mobile", "web"]  # noqa: E501
        if platform not in allowed_values:
            raise ValueError(
                "Invalid value for `platform` ({0}), must be one of {1}"  # noqa: E501
                .format(platform, allowed_values)
            )

        self._platform = platform

    @property
    def lifecycle(self):
        """Gets the lifecycle of this Product.  # noqa: E501


        :return: The lifecycle of this Product.  # noqa: E501
        :rtype: str
        """
        return self._lifecycle

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


        :param lifecycle: The lifecycle of this Product.  # noqa: E501
        :type: str
        """
        allowed_values = [None,"construction", "production", "retirement"]  # noqa: E501
        if lifecycle not in allowed_values:
            raise ValueError(
                "Invalid value for `lifecycle` ({0}), must be one of {1}"  # noqa: E501
                .format(lifecycle, allowed_values)
            )

        self._lifecycle = lifecycle

    @property
    def origin(self):
        """Gets the origin of this Product.  # noqa: E501


        :return: The origin of this Product.  # noqa: E501
        :rtype: str
        """
        return self._origin

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


        :param origin: The origin of this Product.  # noqa: E501
        :type: str
        """
        allowed_values = [None,"third party library", "purchased", "contractor", "internal", "open source", "outsourced"]  # noqa: E501
        if origin not in allowed_values:
            raise ValueError(
                "Invalid value for `origin` ({0}), must be one of {1}"  # noqa: E501
                .format(origin, allowed_values)
            )

        self._origin = origin

    @property
    def user_records(self):
        """Gets the user_records of this Product.  # noqa: E501

        Estimate the number of user records within the application.  # noqa: E501

        :return: The user_records of this Product.  # noqa: E501
        :rtype: int
        """
        return self._user_records

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

        Estimate the number of user records within the application.  # noqa: E501

        :param user_records: The user_records of this Product.  # noqa: E501
        :type: int
        """
        if user_records is not None and user_records > 4294967295:  # noqa: E501
            raise ValueError("Invalid value for `user_records`, must be a value less than or equal to `4294967295`")  # noqa: E501
        if user_records is not None and user_records < 0:  # noqa: E501
            raise ValueError("Invalid value for `user_records`, must be a value greater than or equal to `0`")  # noqa: E501

        self._user_records = user_records

    @property
    def revenue(self):
        """Gets the revenue of this Product.  # noqa: E501

        Estimate the application's revenue.  # noqa: E501

        :return: The revenue of this Product.  # noqa: E501
        :rtype: str
        """
        return self._revenue

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

        Estimate the application's revenue.  # noqa: E501

        :param revenue: The revenue of this Product.  # noqa: E501
        :type: str
        """

        self._revenue = revenue

    @property
    def external_audience(self):
        """Gets the external_audience of this Product.  # noqa: E501

        Specify if the application is used by people outside the organization.  # noqa: E501

        :return: The external_audience of this Product.  # noqa: E501
        :rtype: bool
        """
        return self._external_audience

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

        Specify if the application is used by people outside the organization.  # noqa: E501

        :param external_audience: The external_audience of this Product.  # noqa: E501
        :type: bool
        """

        self._external_audience = external_audience

    @property
    def internet_accessible(self):
        """Gets the internet_accessible of this Product.  # noqa: E501

        Specify if the application is accessible from the public internet.  # noqa: E501

        :return: The internet_accessible of this Product.  # noqa: E501
        :rtype: bool
        """
        return self._internet_accessible

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

        Specify if the application is accessible from the public internet.  # noqa: E501

        :param internet_accessible: The internet_accessible of this Product.  # noqa: E501
        :type: bool
        """

        self._internet_accessible = internet_accessible

    @property
    def product_manager(self):
        """Gets the product_manager of this Product.  # noqa: E501


        :return: The product_manager of this Product.  # noqa: E501
        :rtype: int
        """
        return self._product_manager

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


        :param product_manager: The product_manager of this Product.  # noqa: E501
        :type: int
        """

        self._product_manager = product_manager

    @property
    def technical_contact(self):
        """Gets the technical_contact of this Product.  # noqa: E501


        :return: The technical_contact of this Product.  # noqa: E501
        :rtype: int
        """
        return self._technical_contact

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


        :param technical_contact: The technical_contact of this Product.  # noqa: E501
        :type: int
        """

        self._technical_contact = technical_contact

    @property
    def team_manager(self):
        """Gets the team_manager of this Product.  # noqa: E501


        :return: The team_manager of this Product.  # noqa: E501
        :rtype: int
        """
        return self._team_manager

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


        :param team_manager: The team_manager of this Product.  # noqa: E501
        :type: int
        """

        self._team_manager = team_manager

    @property
    def prod_type(self):
        """Gets the prod_type of this Product.  # noqa: E501


        :return: The prod_type of this Product.  # noqa: E501
        :rtype: int
        """
        return self._prod_type

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


        :param prod_type: The prod_type of this Product.  # noqa: E501
        :type: int
        """

        self._prod_type = prod_type

    @property
    def authorized_users(self):
        """Gets the authorized_users of this Product.  # noqa: E501


        :return: The authorized_users of this Product.  # noqa: E501
        :rtype: list[int]
        """
        return self._authorized_users

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


        :param authorized_users: The authorized_users of this Product.  # noqa: E501
        :type: list[int]
        """

        self._authorized_users = authorized_users

    @property
    def regulations(self):
        """Gets the regulations of this Product.  # noqa: E501


        :return: The regulations of this Product.  # noqa: E501
        :rtype: list[int]
        """
        return self._regulations

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


        :param regulations: The regulations of this Product.  # noqa: E501
        :type: list[int]
        """

        self._regulations = regulations

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

        for attr, _ in six.iteritems(self.openapi_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 pprint.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"""
        if not isinstance(other, Product):
            return False

        return self.__dict__ == other.__dict__

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