"""
    HCL AppScan on Cloud (v2)

    This API allows you to interact with the service. The API allows you to perform many of the operations available in the UI and more.</br>For authentication, use the relevant APIs in the Account section. A successful authentication response includes a bearer token for use in subsequent API calls. Pasting this token in the 'Access token' field above will automatically add the authorization header to any API call that requires a valid session.

    OpenAPI spec version: v2

    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

from pyasoc.configuration import Configuration


class AppScanSaaSModelsV2LicenseLibraryModel:
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    """

    """
    Attributes:
      swagger_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.
    """
    swagger_types = {
        "package_id": "str",
        "sha1": "str",
        "library_name": "str",
        "reference_type": "str",
        "reference": "str",
        "version": "str",
        "number_of_licenses": "int",
        "licence_id": "int",
        "risk_level": "str",
        "copyright_risk_score": "str",
        "patent_risk_score": "str",
        "linking": "str",
        "copy_left": "str",
        "royalty_free": "str",
        "url": "str",
        "license_name": "str",
        "first_found": "datetime",
        "last_found": "datetime",
        "package_location": "str",
    }

    attribute_map = {
        "package_id": "PackageId",
        "sha1": "Sha1",
        "library_name": "LibraryName",
        "reference_type": "ReferenceType",
        "reference": "Reference",
        "version": "Version",
        "number_of_licenses": "NumberOfLicenses",
        "licence_id": "LicenceId",
        "risk_level": "RiskLevel",
        "copyright_risk_score": "CopyrightRiskScore",
        "patent_risk_score": "PatentRiskScore",
        "linking": "Linking",
        "copy_left": "CopyLeft",
        "royalty_free": "RoyaltyFree",
        "url": "Url",
        "license_name": "LicenseName",
        "first_found": "FirstFound",
        "last_found": "LastFound",
        "package_location": "PackageLocation",
    }

    def __init__(
        self,
        package_id=None,
        sha1=None,
        library_name=None,
        reference_type=None,
        reference=None,
        version=None,
        number_of_licenses=None,
        licence_id=None,
        risk_level=None,
        copyright_risk_score=None,
        patent_risk_score=None,
        linking=None,
        copy_left=None,
        royalty_free=None,
        url=None,
        license_name=None,
        first_found=None,
        last_found=None,
        package_location=None,
        _configuration=None,
    ):
        """AppScanSaaSModelsV2LicenseLibraryModel - a model defined in Swagger"""
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._package_id = None
        self._sha1 = None
        self._library_name = None
        self._reference_type = None
        self._reference = None
        self._version = None
        self._number_of_licenses = None
        self._licence_id = None
        self._risk_level = None
        self._copyright_risk_score = None
        self._patent_risk_score = None
        self._linking = None
        self._copy_left = None
        self._royalty_free = None
        self._url = None
        self._license_name = None
        self._first_found = None
        self._last_found = None
        self._package_location = None
        self.discriminator = None

        if package_id is not None:
            self.package_id = package_id
        if sha1 is not None:
            self.sha1 = sha1
        if library_name is not None:
            self.library_name = library_name
        if reference_type is not None:
            self.reference_type = reference_type
        if reference is not None:
            self.reference = reference
        if version is not None:
            self.version = version
        if number_of_licenses is not None:
            self.number_of_licenses = number_of_licenses
        if licence_id is not None:
            self.licence_id = licence_id
        if risk_level is not None:
            self.risk_level = risk_level
        if copyright_risk_score is not None:
            self.copyright_risk_score = copyright_risk_score
        if patent_risk_score is not None:
            self.patent_risk_score = patent_risk_score
        if linking is not None:
            self.linking = linking
        if copy_left is not None:
            self.copy_left = copy_left
        if royalty_free is not None:
            self.royalty_free = royalty_free
        if url is not None:
            self.url = url
        if license_name is not None:
            self.license_name = license_name
        if first_found is not None:
            self.first_found = first_found
        if last_found is not None:
            self.last_found = last_found
        if package_location is not None:
            self.package_location = package_location

    @property
    def package_id(self):
        # type: () -> str
        """Gets the package_id of this AppScanSaaSModelsV2LicenseLibraryModel.


        :return: The package_id of this AppScanSaaSModelsV2LicenseLibraryModel.
        :rtype: str
        """
        return self._package_id

    @package_id.setter
    def package_id(self, package_id):
        """Sets the package_id of this AppScanSaaSModelsV2LicenseLibraryModel.


        :param package_id: The package_id of this AppScanSaaSModelsV2LicenseLibraryModel.
        :type: str
        """

        self._package_id = package_id

    @property
    def sha1(self):
        # type: () -> str
        """Gets the sha1 of this AppScanSaaSModelsV2LicenseLibraryModel.


        :return: The sha1 of this AppScanSaaSModelsV2LicenseLibraryModel.
        :rtype: str
        """
        return self._sha1

    @sha1.setter
    def sha1(self, sha1):
        """Sets the sha1 of this AppScanSaaSModelsV2LicenseLibraryModel.


        :param sha1: The sha1 of this AppScanSaaSModelsV2LicenseLibraryModel.
        :type: str
        """

        self._sha1 = sha1

    @property
    def library_name(self):
        # type: () -> str
        """Gets the library_name of this AppScanSaaSModelsV2LicenseLibraryModel.


        :return: The library_name of this AppScanSaaSModelsV2LicenseLibraryModel.
        :rtype: str
        """
        return self._library_name

    @library_name.setter
    def library_name(self, library_name):
        """Sets the library_name of this AppScanSaaSModelsV2LicenseLibraryModel.


        :param library_name: The library_name of this AppScanSaaSModelsV2LicenseLibraryModel.
        :type: str
        """

        self._library_name = library_name

    @property
    def reference_type(self):
        # type: () -> str
        """Gets the reference_type of this AppScanSaaSModelsV2LicenseLibraryModel.


        :return: The reference_type of this AppScanSaaSModelsV2LicenseLibraryModel.
        :rtype: str
        """
        return self._reference_type

    @reference_type.setter
    def reference_type(self, reference_type):
        """Sets the reference_type of this AppScanSaaSModelsV2LicenseLibraryModel.


        :param reference_type: The reference_type of this AppScanSaaSModelsV2LicenseLibraryModel.
        :type: str
        """
        allowed_values = [
            "Undefined",
            "ProjectHome",
            "POM",
            "NugetPkg",
            "PyPI",
            "NPM",
            "Bower",
            "RubyGems",
            "RPM",
            "Debian",
            "ArchLinux",
            "Alpine",
            "EclipseOSGIBundle",
            "GitHubRepository",
            "CDNJS",
            "DotNet",
            "HostFile",
            "LicenseFile",
            "ReadmeFile",
            "BuildConfigFile",
            "MsnByUser",
            "Other",
        ]
        if self._configuration.client_side_validation and reference_type not in allowed_values:
            raise ValueError(
                "Invalid value for `reference_type` ({}), must be one of {}".format(
                    reference_type, allowed_values
                )
            )

        self._reference_type = reference_type

    @property
    def reference(self):
        # type: () -> str
        """Gets the reference of this AppScanSaaSModelsV2LicenseLibraryModel.


        :return: The reference of this AppScanSaaSModelsV2LicenseLibraryModel.
        :rtype: str
        """
        return self._reference

    @reference.setter
    def reference(self, reference):
        """Sets the reference of this AppScanSaaSModelsV2LicenseLibraryModel.


        :param reference: The reference of this AppScanSaaSModelsV2LicenseLibraryModel.
        :type: str
        """

        self._reference = reference

    @property
    def version(self):
        # type: () -> str
        """Gets the version of this AppScanSaaSModelsV2LicenseLibraryModel.


        :return: The version of this AppScanSaaSModelsV2LicenseLibraryModel.
        :rtype: str
        """
        return self._version

    @version.setter
    def version(self, version):
        """Sets the version of this AppScanSaaSModelsV2LicenseLibraryModel.


        :param version: The version of this AppScanSaaSModelsV2LicenseLibraryModel.
        :type: str
        """

        self._version = version

    @property
    def number_of_licenses(self):
        # type: () -> int
        """Gets the number_of_licenses of this AppScanSaaSModelsV2LicenseLibraryModel.


        :return: The number_of_licenses of this AppScanSaaSModelsV2LicenseLibraryModel.
        :rtype: int
        """
        return self._number_of_licenses

    @number_of_licenses.setter
    def number_of_licenses(self, number_of_licenses):
        """Sets the number_of_licenses of this AppScanSaaSModelsV2LicenseLibraryModel.


        :param number_of_licenses: The number_of_licenses of this AppScanSaaSModelsV2LicenseLibraryModel.
        :type: int
        """

        self._number_of_licenses = number_of_licenses

    @property
    def licence_id(self):
        # type: () -> int
        """Gets the licence_id of this AppScanSaaSModelsV2LicenseLibraryModel.


        :return: The licence_id of this AppScanSaaSModelsV2LicenseLibraryModel.
        :rtype: int
        """
        return self._licence_id

    @licence_id.setter
    def licence_id(self, licence_id):
        """Sets the licence_id of this AppScanSaaSModelsV2LicenseLibraryModel.


        :param licence_id: The licence_id of this AppScanSaaSModelsV2LicenseLibraryModel.
        :type: int
        """

        self._licence_id = licence_id

    @property
    def risk_level(self):
        # type: () -> str
        """Gets the risk_level of this AppScanSaaSModelsV2LicenseLibraryModel.


        :return: The risk_level of this AppScanSaaSModelsV2LicenseLibraryModel.
        :rtype: str
        """
        return self._risk_level

    @risk_level.setter
    def risk_level(self, risk_level):
        """Sets the risk_level of this AppScanSaaSModelsV2LicenseLibraryModel.


        :param risk_level: The risk_level of this AppScanSaaSModelsV2LicenseLibraryModel.
        :type: str
        """
        allowed_values = ["Undefined", "Unknown", "Low", "Medium", "High"]
        if self._configuration.client_side_validation and risk_level not in allowed_values:
            raise ValueError(
                "Invalid value for `risk_level` ({}), must be one of {}".format(
                    risk_level, allowed_values
                )
            )

        self._risk_level = risk_level

    @property
    def copyright_risk_score(self):
        # type: () -> str
        """Gets the copyright_risk_score of this AppScanSaaSModelsV2LicenseLibraryModel.


        :return: The copyright_risk_score of this AppScanSaaSModelsV2LicenseLibraryModel.
        :rtype: str
        """
        return self._copyright_risk_score

    @copyright_risk_score.setter
    def copyright_risk_score(self, copyright_risk_score):
        """Sets the copyright_risk_score of this AppScanSaaSModelsV2LicenseLibraryModel.


        :param copyright_risk_score: The copyright_risk_score of this AppScanSaaSModelsV2LicenseLibraryModel.
        :type: str
        """
        allowed_values = [
            "Undefined",
            "One",
            "Two",
            "Three",
            "Four",
            "Five",
            "Six",
            "Seven",
        ]
        if (
            self._configuration.client_side_validation
            and copyright_risk_score not in allowed_values
        ):
            raise ValueError(
                "Invalid value for `copyright_risk_score` ({}), must be one of {}".format(
                    copyright_risk_score, allowed_values
                )
            )

        self._copyright_risk_score = copyright_risk_score

    @property
    def patent_risk_score(self):
        # type: () -> str
        """Gets the patent_risk_score of this AppScanSaaSModelsV2LicenseLibraryModel.


        :return: The patent_risk_score of this AppScanSaaSModelsV2LicenseLibraryModel.
        :rtype: str
        """
        return self._patent_risk_score

    @patent_risk_score.setter
    def patent_risk_score(self, patent_risk_score):
        """Sets the patent_risk_score of this AppScanSaaSModelsV2LicenseLibraryModel.


        :param patent_risk_score: The patent_risk_score of this AppScanSaaSModelsV2LicenseLibraryModel.
        :type: str
        """
        allowed_values = ["Undefined", "One", "Two", "Three", "Four"]
        if self._configuration.client_side_validation and patent_risk_score not in allowed_values:
            raise ValueError(
                "Invalid value for `patent_risk_score` ({}), must be one of {}".format(
                    patent_risk_score, allowed_values
                )
            )

        self._patent_risk_score = patent_risk_score

    @property
    def linking(self):
        # type: () -> str
        """Gets the linking of this AppScanSaaSModelsV2LicenseLibraryModel.


        :return: The linking of this AppScanSaaSModelsV2LicenseLibraryModel.
        :rtype: str
        """
        return self._linking

    @linking.setter
    def linking(self, linking):
        """Sets the linking of this AppScanSaaSModelsV2LicenseLibraryModel.


        :param linking: The linking of this AppScanSaaSModelsV2LicenseLibraryModel.
        :type: str
        """
        allowed_values = ["Undefined", "Viral", "Non_Viral", "Dynamic"]
        if self._configuration.client_side_validation and linking not in allowed_values:
            raise ValueError(
                "Invalid value for `linking` ({}), must be one of {}".format(
                    linking, allowed_values
                )
            )

        self._linking = linking

    @property
    def copy_left(self):
        # type: () -> str
        """Gets the copy_left of this AppScanSaaSModelsV2LicenseLibraryModel.


        :return: The copy_left of this AppScanSaaSModelsV2LicenseLibraryModel.
        :rtype: str
        """
        return self._copy_left

    @copy_left.setter
    def copy_left(self, copy_left):
        """Sets the copy_left of this AppScanSaaSModelsV2LicenseLibraryModel.


        :param copy_left: The copy_left of this AppScanSaaSModelsV2LicenseLibraryModel.
        :type: str
        """
        allowed_values = ["Undefined", "No", "Partial", "Full"]
        if self._configuration.client_side_validation and copy_left not in allowed_values:
            raise ValueError(
                "Invalid value for `copy_left` ({}), must be one of {}".format(
                    copy_left, allowed_values
                )
            )

        self._copy_left = copy_left

    @property
    def royalty_free(self):
        # type: () -> str
        """Gets the royalty_free of this AppScanSaaSModelsV2LicenseLibraryModel.


        :return: The royalty_free of this AppScanSaaSModelsV2LicenseLibraryModel.
        :rtype: str
        """
        return self._royalty_free

    @royalty_free.setter
    def royalty_free(self, royalty_free):
        """Sets the royalty_free of this AppScanSaaSModelsV2LicenseLibraryModel.


        :param royalty_free: The royalty_free of this AppScanSaaSModelsV2LicenseLibraryModel.
        :type: str
        """
        allowed_values = ["Yes", "Conditional", "No"]
        if self._configuration.client_side_validation and royalty_free not in allowed_values:
            raise ValueError(
                "Invalid value for `royalty_free` ({}), must be one of {}".format(
                    royalty_free, allowed_values
                )
            )

        self._royalty_free = royalty_free

    @property
    def url(self):
        # type: () -> str
        """Gets the url of this AppScanSaaSModelsV2LicenseLibraryModel.


        :return: The url of this AppScanSaaSModelsV2LicenseLibraryModel.
        :rtype: str
        """
        return self._url

    @url.setter
    def url(self, url):
        """Sets the url of this AppScanSaaSModelsV2LicenseLibraryModel.


        :param url: The url of this AppScanSaaSModelsV2LicenseLibraryModel.
        :type: str
        """

        self._url = url

    @property
    def license_name(self):
        # type: () -> str
        """Gets the license_name of this AppScanSaaSModelsV2LicenseLibraryModel.


        :return: The license_name of this AppScanSaaSModelsV2LicenseLibraryModel.
        :rtype: str
        """
        return self._license_name

    @license_name.setter
    def license_name(self, license_name):
        """Sets the license_name of this AppScanSaaSModelsV2LicenseLibraryModel.


        :param license_name: The license_name of this AppScanSaaSModelsV2LicenseLibraryModel.
        :type: str
        """

        self._license_name = license_name

    @property
    def first_found(self):
        # type: () -> datetime
        """Gets the first_found of this AppScanSaaSModelsV2LicenseLibraryModel.


        :return: The first_found of this AppScanSaaSModelsV2LicenseLibraryModel.
        :rtype: datetime
        """
        return self._first_found

    @first_found.setter
    def first_found(self, first_found):
        """Sets the first_found of this AppScanSaaSModelsV2LicenseLibraryModel.


        :param first_found: The first_found of this AppScanSaaSModelsV2LicenseLibraryModel.
        :type: datetime
        """

        self._first_found = first_found

    @property
    def last_found(self):
        # type: () -> datetime
        """Gets the last_found of this AppScanSaaSModelsV2LicenseLibraryModel.


        :return: The last_found of this AppScanSaaSModelsV2LicenseLibraryModel.
        :rtype: datetime
        """
        return self._last_found

    @last_found.setter
    def last_found(self, last_found):
        """Sets the last_found of this AppScanSaaSModelsV2LicenseLibraryModel.


        :param last_found: The last_found of this AppScanSaaSModelsV2LicenseLibraryModel.
        :type: datetime
        """

        self._last_found = last_found

    @property
    def package_location(self):
        # type: () -> str
        """Gets the package_location of this AppScanSaaSModelsV2LicenseLibraryModel.


        :return: The package_location of this AppScanSaaSModelsV2LicenseLibraryModel.
        :rtype: str
        """
        return self._package_location

    @package_location.setter
    def package_location(self, package_location):
        """Sets the package_location of this AppScanSaaSModelsV2LicenseLibraryModel.


        :param package_location: The package_location of this AppScanSaaSModelsV2LicenseLibraryModel.
        :type: str
        """

        self._package_location = package_location

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

        for attr, _ in self.swagger_types.items():
            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
        if issubclass(AppScanSaaSModelsV2LicenseLibraryModel, dict):
            for key, value in self.items():
                result[key] = 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, AppScanSaaSModelsV2LicenseLibraryModel):
            return False

        return self.to_dict() == other.to_dict()

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

        return self.to_dict() != other.to_dict()
