"""
    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 AppScanSaaSModelsV2IssueChangeSet:
    """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 = {
        "scan_execution": "AppScanSaaSModelsV2ScanExecutionInfo",
        "changes": "list[AppScanSaaSModelsV2Change]",
        "changed_at": "datetime",
        "changed_by": "UserSiteCommonModelsBasicUserInfo",
    }

    attribute_map = {
        "scan_execution": "ScanExecution",
        "changes": "Changes",
        "changed_at": "ChangedAt",
        "changed_by": "ChangedBy",
    }

    def __init__(
        self,
        scan_execution=None,
        changes=None,
        changed_at=None,
        changed_by=None,
        _configuration=None,
    ):
        """AppScanSaaSModelsV2IssueChangeSet - a model defined in Swagger"""
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._scan_execution = None
        self._changes = None
        self._changed_at = None
        self._changed_by = None
        self.discriminator = None

        if scan_execution is not None:
            self.scan_execution = scan_execution
        if changes is not None:
            self.changes = changes
        if changed_at is not None:
            self.changed_at = changed_at
        if changed_by is not None:
            self.changed_by = changed_by

    @property
    def scan_execution(self):
        # type: () -> AppScanSaaSModelsV2ScanExecutionInfo
        """Gets the scan_execution of this AppScanSaaSModelsV2IssueChangeSet.


        :return: The scan_execution of this AppScanSaaSModelsV2IssueChangeSet.
        :rtype: AppScanSaaSModelsV2ScanExecutionInfo
        """
        return self._scan_execution

    @scan_execution.setter
    def scan_execution(self, scan_execution):
        """Sets the scan_execution of this AppScanSaaSModelsV2IssueChangeSet.


        :param scan_execution: The scan_execution of this AppScanSaaSModelsV2IssueChangeSet.
        :type: AppScanSaaSModelsV2ScanExecutionInfo
        """

        self._scan_execution = scan_execution

    @property
    def changes(self):
        # type: () -> list[AppScanSaaSModelsV2Change]
        """Gets the changes of this AppScanSaaSModelsV2IssueChangeSet.


        :return: The changes of this AppScanSaaSModelsV2IssueChangeSet.
        :rtype: list[AppScanSaaSModelsV2Change]
        """
        return self._changes

    @changes.setter
    def changes(self, changes):
        """Sets the changes of this AppScanSaaSModelsV2IssueChangeSet.


        :param changes: The changes of this AppScanSaaSModelsV2IssueChangeSet.
        :type: list[AppScanSaaSModelsV2Change]
        """

        self._changes = changes

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


        :return: The changed_at of this AppScanSaaSModelsV2IssueChangeSet.
        :rtype: datetime
        """
        return self._changed_at

    @changed_at.setter
    def changed_at(self, changed_at):
        """Sets the changed_at of this AppScanSaaSModelsV2IssueChangeSet.


        :param changed_at: The changed_at of this AppScanSaaSModelsV2IssueChangeSet.
        :type: datetime
        """

        self._changed_at = changed_at

    @property
    def changed_by(self):
        # type: () -> UserSiteCommonModelsBasicUserInfo
        """Gets the changed_by of this AppScanSaaSModelsV2IssueChangeSet.


        :return: The changed_by of this AppScanSaaSModelsV2IssueChangeSet.
        :rtype: UserSiteCommonModelsBasicUserInfo
        """
        return self._changed_by

    @changed_by.setter
    def changed_by(self, changed_by):
        """Sets the changed_by of this AppScanSaaSModelsV2IssueChangeSet.


        :param changed_by: The changed_by of this AppScanSaaSModelsV2IssueChangeSet.
        :type: UserSiteCommonModelsBasicUserInfo
        """

        self._changed_by = changed_by

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

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