"""
    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 CommonModelsASMModelsAppLicense:
    """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 = {
        "technology": "str",
        "display_mode": "str",
        "scan_execution_block_reason": "str",
        "can_be_deleted": "bool",
        "locked_to_subscription": "bool",
        "subscription": "CommonModelsSCXAccountSCXSubscription",
        "new_personal_scans_deletion_time": "datetime",
    }

    attribute_map = {
        "technology": "Technology",
        "display_mode": "DisplayMode",
        "scan_execution_block_reason": "ScanExecutionBlockReason",
        "can_be_deleted": "CanBeDeleted",
        "locked_to_subscription": "LockedToSubscription",
        "subscription": "Subscription",
        "new_personal_scans_deletion_time": "NewPersonalScansDeletionTime",
    }

    def __init__(
        self,
        technology=None,
        display_mode=None,
        scan_execution_block_reason=None,
        can_be_deleted=None,
        locked_to_subscription=None,
        subscription=None,
        new_personal_scans_deletion_time=None,
        _configuration=None,
    ):
        """CommonModelsASMModelsAppLicense - a model defined in Swagger"""
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._technology = None
        self._display_mode = None
        self._scan_execution_block_reason = None
        self._can_be_deleted = None
        self._locked_to_subscription = None
        self._subscription = None
        self._new_personal_scans_deletion_time = None
        self.discriminator = None

        if technology is not None:
            self.technology = technology
        if display_mode is not None:
            self.display_mode = display_mode
        if scan_execution_block_reason is not None:
            self.scan_execution_block_reason = scan_execution_block_reason
        if can_be_deleted is not None:
            self.can_be_deleted = can_be_deleted
        if locked_to_subscription is not None:
            self.locked_to_subscription = locked_to_subscription
        if subscription is not None:
            self.subscription = subscription
        if new_personal_scans_deletion_time is not None:
            self.new_personal_scans_deletion_time = new_personal_scans_deletion_time

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


        :return: The technology of this CommonModelsASMModelsAppLicense.
        :rtype: str
        """
        return self._technology

    @technology.setter
    def technology(self, technology):
        """Sets the technology of this CommonModelsASMModelsAppLicense.


        :param technology: The technology of this CommonModelsASMModelsAppLicense.
        :type: str
        """
        allowed_values = [
            "None",
            "Dast",
            "Sast",
            "AndroidEmulator",
            "AndroidDevice",
            "iOS",
            "Sca",
            "IFA",
            "IAST",
            "Android",
            "Mobile",
            "Static",
            "All",
        ]
        if self._configuration.client_side_validation and technology not in allowed_values:
            raise ValueError(
                "Invalid value for `technology` ({}), must be one of {}".format(
                    technology, allowed_values
                )
            )

        self._technology = technology

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


        :return: The display_mode of this CommonModelsASMModelsAppLicense.
        :rtype: str
        """
        return self._display_mode

    @display_mode.setter
    def display_mode(self, display_mode):
        """Sets the display_mode of this CommonModelsASMModelsAppLicense.


        :param display_mode: The display_mode of this CommonModelsASMModelsAppLicense.
        :type: str
        """
        allowed_values = ["Visible", "Disabled", "Hidden"]
        if self._configuration.client_side_validation and display_mode not in allowed_values:
            raise ValueError(
                "Invalid value for `display_mode` ({}), must be one of {}".format(
                    display_mode, allowed_values
                )
            )

        self._display_mode = display_mode

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


        :return: The scan_execution_block_reason of this CommonModelsASMModelsAppLicense.
        :rtype: str
        """
        return self._scan_execution_block_reason

    @scan_execution_block_reason.setter
    def scan_execution_block_reason(self, scan_execution_block_reason):
        """Sets the scan_execution_block_reason of this CommonModelsASMModelsAppLicense.


        :param scan_execution_block_reason: The scan_execution_block_reason of this CommonModelsASMModelsAppLicense.
        :type: str
        """
        allowed_values = [
            "NONE",
            "SUBSCRIPTION_EXPIRED_OR_DEACTIVATED",
            "SUBSCRIPTION_SCAN_LIMIT_REACHED",
            "MISSING_OFFERING_TYPE",
            "TRIAL_SCAN_LIMIT_REACHED",
            "INSUFFICIENT_SUBSCRIPTION_CREDIT",
            "APP_CONCURRENT_SCANS_AND_QUEUE_EXCEEDED",
            "SCAN_CONCURRENT_AND_QUEUED_EXCEEDED",
            "APP_REQUIRES_OFFERINGTYPE_SWITCH",
            "RESCAN_IAST_FORBIDDEN",
            "TECHNOLOGY_NOT_SUPPORTED",
        ]
        if (
            self._configuration.client_side_validation
            and scan_execution_block_reason not in allowed_values
        ):
            raise ValueError(
                "Invalid value for `scan_execution_block_reason` ({}), must be one of {}".format(
                    scan_execution_block_reason, allowed_values
                )
            )

        self._scan_execution_block_reason = scan_execution_block_reason

    @property
    def can_be_deleted(self):
        # type: () -> bool
        """Gets the can_be_deleted of this CommonModelsASMModelsAppLicense.


        :return: The can_be_deleted of this CommonModelsASMModelsAppLicense.
        :rtype: bool
        """
        return self._can_be_deleted

    @can_be_deleted.setter
    def can_be_deleted(self, can_be_deleted):
        """Sets the can_be_deleted of this CommonModelsASMModelsAppLicense.


        :param can_be_deleted: The can_be_deleted of this CommonModelsASMModelsAppLicense.
        :type: bool
        """

        self._can_be_deleted = can_be_deleted

    @property
    def locked_to_subscription(self):
        # type: () -> bool
        """Gets the locked_to_subscription of this CommonModelsASMModelsAppLicense.


        :return: The locked_to_subscription of this CommonModelsASMModelsAppLicense.
        :rtype: bool
        """
        return self._locked_to_subscription

    @locked_to_subscription.setter
    def locked_to_subscription(self, locked_to_subscription):
        """Sets the locked_to_subscription of this CommonModelsASMModelsAppLicense.


        :param locked_to_subscription: The locked_to_subscription of this CommonModelsASMModelsAppLicense.
        :type: bool
        """

        self._locked_to_subscription = locked_to_subscription

    @property
    def subscription(self):
        # type: () -> CommonModelsSCXAccountSCXSubscription
        """Gets the subscription of this CommonModelsASMModelsAppLicense.


        :return: The subscription of this CommonModelsASMModelsAppLicense.
        :rtype: CommonModelsSCXAccountSCXSubscription
        """
        return self._subscription

    @subscription.setter
    def subscription(self, subscription):
        """Sets the subscription of this CommonModelsASMModelsAppLicense.


        :param subscription: The subscription of this CommonModelsASMModelsAppLicense.
        :type: CommonModelsSCXAccountSCXSubscription
        """

        self._subscription = subscription

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


        :return: The new_personal_scans_deletion_time of this CommonModelsASMModelsAppLicense.
        :rtype: datetime
        """
        return self._new_personal_scans_deletion_time

    @new_personal_scans_deletion_time.setter
    def new_personal_scans_deletion_time(self, new_personal_scans_deletion_time):
        """Sets the new_personal_scans_deletion_time of this CommonModelsASMModelsAppLicense.


        :param new_personal_scans_deletion_time: The new_personal_scans_deletion_time of this CommonModelsASMModelsAppLicense.
        :type: datetime
        """

        self._new_personal_scans_deletion_time = new_personal_scans_deletion_time

    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(CommonModelsASMModelsAppLicense, 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, CommonModelsASMModelsAppLicense):
            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, CommonModelsASMModelsAppLicense):
            return True

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