# 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 datetime import datetime
from datetime import date
from pprint import pformat
from six import iteritems
import re
import json

from ..utils import sanitize_for_serialization

# type hinting support
from typing import TYPE_CHECKING
from typing import List
from typing import Dict

if TYPE_CHECKING:
    from . import WorkitemsUserEventsNotificationCustomAttribute
    from . import WorkitemsUserEventsNotificationDelta
    from . import WorkitemsUserEventsNotificationWrapup

class WorkitemsUserEventsNotificationWorkitem(object):
    """
    NOTE: This class is auto generated by the swagger code generator program.
    Do not edit the class manually.
    """
    def __init__(self) -> None:
        """
        WorkitemsUserEventsNotificationWorkitem - 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 = {
            'id': 'str',
            'name': 'str',
            'type_id': 'str',
            'description': 'str',
            'language_id': 'str',
            'priority': 'int',
            'date_created': 'str',
            'date_modified': 'str',
            'date_due': 'str',
            'date_expires': 'str',
            'duration_seconds': 'int',
            'ttl': 'int',
            'status_id': 'str',
            'status_category': 'str',
            'date_closed': 'str',
            'workbin_id': 'str',
            'reporter_id': 'str',
            'assignee_id': 'str',
            'external_contact_id': 'str',
            'external_tag': 'str',
            'wrapup_id': 'str',
            'modified_by': 'str',
            'operation': 'str',
            'changes': 'list[WorkitemsUserEventsNotificationDelta]',
            'assignment_state': 'str',
            'assignment_id': 'str',
            'alert_timeout_seconds': 'int',
            'queue_id': 'str',
            'custom_fields': 'dict(str, WorkitemsUserEventsNotificationCustomAttribute)',
            'wrapup': 'WorkitemsUserEventsNotificationWrapup'
        }

        self.attribute_map = {
            'id': 'id',
            'name': 'name',
            'type_id': 'typeId',
            'description': 'description',
            'language_id': 'languageId',
            'priority': 'priority',
            'date_created': 'dateCreated',
            'date_modified': 'dateModified',
            'date_due': 'dateDue',
            'date_expires': 'dateExpires',
            'duration_seconds': 'durationSeconds',
            'ttl': 'ttl',
            'status_id': 'statusId',
            'status_category': 'statusCategory',
            'date_closed': 'dateClosed',
            'workbin_id': 'workbinId',
            'reporter_id': 'reporterId',
            'assignee_id': 'assigneeId',
            'external_contact_id': 'externalContactId',
            'external_tag': 'externalTag',
            'wrapup_id': 'wrapupId',
            'modified_by': 'modifiedBy',
            'operation': 'operation',
            'changes': 'changes',
            'assignment_state': 'assignmentState',
            'assignment_id': 'assignmentId',
            'alert_timeout_seconds': 'alertTimeoutSeconds',
            'queue_id': 'queueId',
            'custom_fields': 'customFields',
            'wrapup': 'wrapup'
        }

        self._id = None
        self._name = None
        self._type_id = None
        self._description = None
        self._language_id = None
        self._priority = None
        self._date_created = None
        self._date_modified = None
        self._date_due = None
        self._date_expires = None
        self._duration_seconds = None
        self._ttl = None
        self._status_id = None
        self._status_category = None
        self._date_closed = None
        self._workbin_id = None
        self._reporter_id = None
        self._assignee_id = None
        self._external_contact_id = None
        self._external_tag = None
        self._wrapup_id = None
        self._modified_by = None
        self._operation = None
        self._changes = None
        self._assignment_state = None
        self._assignment_id = None
        self._alert_timeout_seconds = None
        self._queue_id = None
        self._custom_fields = None
        self._wrapup = None

    @property
    def id(self) -> str:
        """
        Gets the id of this WorkitemsUserEventsNotificationWorkitem.


        :return: The id of this WorkitemsUserEventsNotificationWorkitem.
        :rtype: str
        """
        return self._id

    @id.setter
    def id(self, id: str) -> None:
        """
        Sets the id of this WorkitemsUserEventsNotificationWorkitem.


        :param id: The id of this WorkitemsUserEventsNotificationWorkitem.
        :type: str
        """
        

        self._id = id

    @property
    def name(self) -> str:
        """
        Gets the name of this WorkitemsUserEventsNotificationWorkitem.


        :return: The name of this WorkitemsUserEventsNotificationWorkitem.
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name: str) -> None:
        """
        Sets the name of this WorkitemsUserEventsNotificationWorkitem.


        :param name: The name of this WorkitemsUserEventsNotificationWorkitem.
        :type: str
        """
        

        self._name = name

    @property
    def type_id(self) -> str:
        """
        Gets the type_id of this WorkitemsUserEventsNotificationWorkitem.


        :return: The type_id of this WorkitemsUserEventsNotificationWorkitem.
        :rtype: str
        """
        return self._type_id

    @type_id.setter
    def type_id(self, type_id: str) -> None:
        """
        Sets the type_id of this WorkitemsUserEventsNotificationWorkitem.


        :param type_id: The type_id of this WorkitemsUserEventsNotificationWorkitem.
        :type: str
        """
        

        self._type_id = type_id

    @property
    def description(self) -> str:
        """
        Gets the description of this WorkitemsUserEventsNotificationWorkitem.


        :return: The description of this WorkitemsUserEventsNotificationWorkitem.
        :rtype: str
        """
        return self._description

    @description.setter
    def description(self, description: str) -> None:
        """
        Sets the description of this WorkitemsUserEventsNotificationWorkitem.


        :param description: The description of this WorkitemsUserEventsNotificationWorkitem.
        :type: str
        """
        

        self._description = description

    @property
    def language_id(self) -> str:
        """
        Gets the language_id of this WorkitemsUserEventsNotificationWorkitem.


        :return: The language_id of this WorkitemsUserEventsNotificationWorkitem.
        :rtype: str
        """
        return self._language_id

    @language_id.setter
    def language_id(self, language_id: str) -> None:
        """
        Sets the language_id of this WorkitemsUserEventsNotificationWorkitem.


        :param language_id: The language_id of this WorkitemsUserEventsNotificationWorkitem.
        :type: str
        """
        

        self._language_id = language_id

    @property
    def priority(self) -> int:
        """
        Gets the priority of this WorkitemsUserEventsNotificationWorkitem.


        :return: The priority of this WorkitemsUserEventsNotificationWorkitem.
        :rtype: int
        """
        return self._priority

    @priority.setter
    def priority(self, priority: int) -> None:
        """
        Sets the priority of this WorkitemsUserEventsNotificationWorkitem.


        :param priority: The priority of this WorkitemsUserEventsNotificationWorkitem.
        :type: int
        """
        

        self._priority = priority

    @property
    def date_created(self) -> str:
        """
        Gets the date_created of this WorkitemsUserEventsNotificationWorkitem.


        :return: The date_created of this WorkitemsUserEventsNotificationWorkitem.
        :rtype: str
        """
        return self._date_created

    @date_created.setter
    def date_created(self, date_created: str) -> None:
        """
        Sets the date_created of this WorkitemsUserEventsNotificationWorkitem.


        :param date_created: The date_created of this WorkitemsUserEventsNotificationWorkitem.
        :type: str
        """
        

        self._date_created = date_created

    @property
    def date_modified(self) -> str:
        """
        Gets the date_modified of this WorkitemsUserEventsNotificationWorkitem.


        :return: The date_modified of this WorkitemsUserEventsNotificationWorkitem.
        :rtype: str
        """
        return self._date_modified

    @date_modified.setter
    def date_modified(self, date_modified: str) -> None:
        """
        Sets the date_modified of this WorkitemsUserEventsNotificationWorkitem.


        :param date_modified: The date_modified of this WorkitemsUserEventsNotificationWorkitem.
        :type: str
        """
        

        self._date_modified = date_modified

    @property
    def date_due(self) -> str:
        """
        Gets the date_due of this WorkitemsUserEventsNotificationWorkitem.


        :return: The date_due of this WorkitemsUserEventsNotificationWorkitem.
        :rtype: str
        """
        return self._date_due

    @date_due.setter
    def date_due(self, date_due: str) -> None:
        """
        Sets the date_due of this WorkitemsUserEventsNotificationWorkitem.


        :param date_due: The date_due of this WorkitemsUserEventsNotificationWorkitem.
        :type: str
        """
        

        self._date_due = date_due

    @property
    def date_expires(self) -> str:
        """
        Gets the date_expires of this WorkitemsUserEventsNotificationWorkitem.


        :return: The date_expires of this WorkitemsUserEventsNotificationWorkitem.
        :rtype: str
        """
        return self._date_expires

    @date_expires.setter
    def date_expires(self, date_expires: str) -> None:
        """
        Sets the date_expires of this WorkitemsUserEventsNotificationWorkitem.


        :param date_expires: The date_expires of this WorkitemsUserEventsNotificationWorkitem.
        :type: str
        """
        

        self._date_expires = date_expires

    @property
    def duration_seconds(self) -> int:
        """
        Gets the duration_seconds of this WorkitemsUserEventsNotificationWorkitem.


        :return: The duration_seconds of this WorkitemsUserEventsNotificationWorkitem.
        :rtype: int
        """
        return self._duration_seconds

    @duration_seconds.setter
    def duration_seconds(self, duration_seconds: int) -> None:
        """
        Sets the duration_seconds of this WorkitemsUserEventsNotificationWorkitem.


        :param duration_seconds: The duration_seconds of this WorkitemsUserEventsNotificationWorkitem.
        :type: int
        """
        

        self._duration_seconds = duration_seconds

    @property
    def ttl(self) -> int:
        """
        Gets the ttl of this WorkitemsUserEventsNotificationWorkitem.


        :return: The ttl of this WorkitemsUserEventsNotificationWorkitem.
        :rtype: int
        """
        return self._ttl

    @ttl.setter
    def ttl(self, ttl: int) -> None:
        """
        Sets the ttl of this WorkitemsUserEventsNotificationWorkitem.


        :param ttl: The ttl of this WorkitemsUserEventsNotificationWorkitem.
        :type: int
        """
        

        self._ttl = ttl

    @property
    def status_id(self) -> str:
        """
        Gets the status_id of this WorkitemsUserEventsNotificationWorkitem.


        :return: The status_id of this WorkitemsUserEventsNotificationWorkitem.
        :rtype: str
        """
        return self._status_id

    @status_id.setter
    def status_id(self, status_id: str) -> None:
        """
        Sets the status_id of this WorkitemsUserEventsNotificationWorkitem.


        :param status_id: The status_id of this WorkitemsUserEventsNotificationWorkitem.
        :type: str
        """
        

        self._status_id = status_id

    @property
    def status_category(self) -> str:
        """
        Gets the status_category of this WorkitemsUserEventsNotificationWorkitem.


        :return: The status_category of this WorkitemsUserEventsNotificationWorkitem.
        :rtype: str
        """
        return self._status_category

    @status_category.setter
    def status_category(self, status_category: str) -> None:
        """
        Sets the status_category of this WorkitemsUserEventsNotificationWorkitem.


        :param status_category: The status_category of this WorkitemsUserEventsNotificationWorkitem.
        :type: str
        """
        allowed_values = ["Unknown", "Open", "InProgress", "Waiting", "Closed"]
        if status_category.lower() not in map(str.lower, allowed_values):
            # print("Invalid value for status_category -> " + status_category)
            self._status_category = "outdated_sdk_version"
        else:
            self._status_category = status_category

    @property
    def date_closed(self) -> str:
        """
        Gets the date_closed of this WorkitemsUserEventsNotificationWorkitem.


        :return: The date_closed of this WorkitemsUserEventsNotificationWorkitem.
        :rtype: str
        """
        return self._date_closed

    @date_closed.setter
    def date_closed(self, date_closed: str) -> None:
        """
        Sets the date_closed of this WorkitemsUserEventsNotificationWorkitem.


        :param date_closed: The date_closed of this WorkitemsUserEventsNotificationWorkitem.
        :type: str
        """
        

        self._date_closed = date_closed

    @property
    def workbin_id(self) -> str:
        """
        Gets the workbin_id of this WorkitemsUserEventsNotificationWorkitem.


        :return: The workbin_id of this WorkitemsUserEventsNotificationWorkitem.
        :rtype: str
        """
        return self._workbin_id

    @workbin_id.setter
    def workbin_id(self, workbin_id: str) -> None:
        """
        Sets the workbin_id of this WorkitemsUserEventsNotificationWorkitem.


        :param workbin_id: The workbin_id of this WorkitemsUserEventsNotificationWorkitem.
        :type: str
        """
        

        self._workbin_id = workbin_id

    @property
    def reporter_id(self) -> str:
        """
        Gets the reporter_id of this WorkitemsUserEventsNotificationWorkitem.


        :return: The reporter_id of this WorkitemsUserEventsNotificationWorkitem.
        :rtype: str
        """
        return self._reporter_id

    @reporter_id.setter
    def reporter_id(self, reporter_id: str) -> None:
        """
        Sets the reporter_id of this WorkitemsUserEventsNotificationWorkitem.


        :param reporter_id: The reporter_id of this WorkitemsUserEventsNotificationWorkitem.
        :type: str
        """
        

        self._reporter_id = reporter_id

    @property
    def assignee_id(self) -> str:
        """
        Gets the assignee_id of this WorkitemsUserEventsNotificationWorkitem.


        :return: The assignee_id of this WorkitemsUserEventsNotificationWorkitem.
        :rtype: str
        """
        return self._assignee_id

    @assignee_id.setter
    def assignee_id(self, assignee_id: str) -> None:
        """
        Sets the assignee_id of this WorkitemsUserEventsNotificationWorkitem.


        :param assignee_id: The assignee_id of this WorkitemsUserEventsNotificationWorkitem.
        :type: str
        """
        

        self._assignee_id = assignee_id

    @property
    def external_contact_id(self) -> str:
        """
        Gets the external_contact_id of this WorkitemsUserEventsNotificationWorkitem.


        :return: The external_contact_id of this WorkitemsUserEventsNotificationWorkitem.
        :rtype: str
        """
        return self._external_contact_id

    @external_contact_id.setter
    def external_contact_id(self, external_contact_id: str) -> None:
        """
        Sets the external_contact_id of this WorkitemsUserEventsNotificationWorkitem.


        :param external_contact_id: The external_contact_id of this WorkitemsUserEventsNotificationWorkitem.
        :type: str
        """
        

        self._external_contact_id = external_contact_id

    @property
    def external_tag(self) -> str:
        """
        Gets the external_tag of this WorkitemsUserEventsNotificationWorkitem.


        :return: The external_tag of this WorkitemsUserEventsNotificationWorkitem.
        :rtype: str
        """
        return self._external_tag

    @external_tag.setter
    def external_tag(self, external_tag: str) -> None:
        """
        Sets the external_tag of this WorkitemsUserEventsNotificationWorkitem.


        :param external_tag: The external_tag of this WorkitemsUserEventsNotificationWorkitem.
        :type: str
        """
        

        self._external_tag = external_tag

    @property
    def wrapup_id(self) -> str:
        """
        Gets the wrapup_id of this WorkitemsUserEventsNotificationWorkitem.


        :return: The wrapup_id of this WorkitemsUserEventsNotificationWorkitem.
        :rtype: str
        """
        return self._wrapup_id

    @wrapup_id.setter
    def wrapup_id(self, wrapup_id: str) -> None:
        """
        Sets the wrapup_id of this WorkitemsUserEventsNotificationWorkitem.


        :param wrapup_id: The wrapup_id of this WorkitemsUserEventsNotificationWorkitem.
        :type: str
        """
        

        self._wrapup_id = wrapup_id

    @property
    def modified_by(self) -> str:
        """
        Gets the modified_by of this WorkitemsUserEventsNotificationWorkitem.


        :return: The modified_by of this WorkitemsUserEventsNotificationWorkitem.
        :rtype: str
        """
        return self._modified_by

    @modified_by.setter
    def modified_by(self, modified_by: str) -> None:
        """
        Sets the modified_by of this WorkitemsUserEventsNotificationWorkitem.


        :param modified_by: The modified_by of this WorkitemsUserEventsNotificationWorkitem.
        :type: str
        """
        

        self._modified_by = modified_by

    @property
    def operation(self) -> str:
        """
        Gets the operation of this WorkitemsUserEventsNotificationWorkitem.


        :return: The operation of this WorkitemsUserEventsNotificationWorkitem.
        :rtype: str
        """
        return self._operation

    @operation.setter
    def operation(self, operation: str) -> None:
        """
        Sets the operation of this WorkitemsUserEventsNotificationWorkitem.


        :param operation: The operation of this WorkitemsUserEventsNotificationWorkitem.
        :type: str
        """
        allowed_values = ["unknown", "add", "edit", "delete", "view", "upload", "download", "activate", "deactivate", "purge", "processed", "published", "assigned", "unassigned", "reset", "reassigned", "reassign", "archive", "unarchive", "reschedule"]
        if operation.lower() not in map(str.lower, allowed_values):
            # print("Invalid value for operation -> " + operation)
            self._operation = "outdated_sdk_version"
        else:
            self._operation = operation

    @property
    def changes(self) -> List['WorkitemsUserEventsNotificationDelta']:
        """
        Gets the changes of this WorkitemsUserEventsNotificationWorkitem.


        :return: The changes of this WorkitemsUserEventsNotificationWorkitem.
        :rtype: list[WorkitemsUserEventsNotificationDelta]
        """
        return self._changes

    @changes.setter
    def changes(self, changes: List['WorkitemsUserEventsNotificationDelta']) -> None:
        """
        Sets the changes of this WorkitemsUserEventsNotificationWorkitem.


        :param changes: The changes of this WorkitemsUserEventsNotificationWorkitem.
        :type: list[WorkitemsUserEventsNotificationDelta]
        """
        

        self._changes = changes

    @property
    def assignment_state(self) -> str:
        """
        Gets the assignment_state of this WorkitemsUserEventsNotificationWorkitem.


        :return: The assignment_state of this WorkitemsUserEventsNotificationWorkitem.
        :rtype: str
        """
        return self._assignment_state

    @assignment_state.setter
    def assignment_state(self, assignment_state: str) -> None:
        """
        Sets the assignment_state of this WorkitemsUserEventsNotificationWorkitem.


        :param assignment_state: The assignment_state of this WorkitemsUserEventsNotificationWorkitem.
        :type: str
        """
        allowed_values = ["Unknown", "Idle", "AcdStarted", "Alerting", "AlertTimeout", "Declined", "Connected", "Disconnected", "Parked", "Held", "AcdCancelled", "Terminated", "AcdExpired"]
        if assignment_state.lower() not in map(str.lower, allowed_values):
            # print("Invalid value for assignment_state -> " + assignment_state)
            self._assignment_state = "outdated_sdk_version"
        else:
            self._assignment_state = assignment_state

    @property
    def assignment_id(self) -> str:
        """
        Gets the assignment_id of this WorkitemsUserEventsNotificationWorkitem.


        :return: The assignment_id of this WorkitemsUserEventsNotificationWorkitem.
        :rtype: str
        """
        return self._assignment_id

    @assignment_id.setter
    def assignment_id(self, assignment_id: str) -> None:
        """
        Sets the assignment_id of this WorkitemsUserEventsNotificationWorkitem.


        :param assignment_id: The assignment_id of this WorkitemsUserEventsNotificationWorkitem.
        :type: str
        """
        

        self._assignment_id = assignment_id

    @property
    def alert_timeout_seconds(self) -> int:
        """
        Gets the alert_timeout_seconds of this WorkitemsUserEventsNotificationWorkitem.


        :return: The alert_timeout_seconds of this WorkitemsUserEventsNotificationWorkitem.
        :rtype: int
        """
        return self._alert_timeout_seconds

    @alert_timeout_seconds.setter
    def alert_timeout_seconds(self, alert_timeout_seconds: int) -> None:
        """
        Sets the alert_timeout_seconds of this WorkitemsUserEventsNotificationWorkitem.


        :param alert_timeout_seconds: The alert_timeout_seconds of this WorkitemsUserEventsNotificationWorkitem.
        :type: int
        """
        

        self._alert_timeout_seconds = alert_timeout_seconds

    @property
    def queue_id(self) -> str:
        """
        Gets the queue_id of this WorkitemsUserEventsNotificationWorkitem.


        :return: The queue_id of this WorkitemsUserEventsNotificationWorkitem.
        :rtype: str
        """
        return self._queue_id

    @queue_id.setter
    def queue_id(self, queue_id: str) -> None:
        """
        Sets the queue_id of this WorkitemsUserEventsNotificationWorkitem.


        :param queue_id: The queue_id of this WorkitemsUserEventsNotificationWorkitem.
        :type: str
        """
        

        self._queue_id = queue_id

    @property
    def custom_fields(self) -> Dict[str, 'WorkitemsUserEventsNotificationCustomAttribute']:
        """
        Gets the custom_fields of this WorkitemsUserEventsNotificationWorkitem.


        :return: The custom_fields of this WorkitemsUserEventsNotificationWorkitem.
        :rtype: dict(str, WorkitemsUserEventsNotificationCustomAttribute)
        """
        return self._custom_fields

    @custom_fields.setter
    def custom_fields(self, custom_fields: Dict[str, 'WorkitemsUserEventsNotificationCustomAttribute']) -> None:
        """
        Sets the custom_fields of this WorkitemsUserEventsNotificationWorkitem.


        :param custom_fields: The custom_fields of this WorkitemsUserEventsNotificationWorkitem.
        :type: dict(str, WorkitemsUserEventsNotificationCustomAttribute)
        """
        

        self._custom_fields = custom_fields

    @property
    def wrapup(self) -> 'WorkitemsUserEventsNotificationWrapup':
        """
        Gets the wrapup of this WorkitemsUserEventsNotificationWorkitem.


        :return: The wrapup of this WorkitemsUserEventsNotificationWorkitem.
        :rtype: WorkitemsUserEventsNotificationWrapup
        """
        return self._wrapup

    @wrapup.setter
    def wrapup(self, wrapup: 'WorkitemsUserEventsNotificationWrapup') -> None:
        """
        Sets the wrapup of this WorkitemsUserEventsNotificationWorkitem.


        :param wrapup: The wrapup of this WorkitemsUserEventsNotificationWorkitem.
        :type: WorkitemsUserEventsNotificationWrapup
        """
        

        self._wrapup = wrapup

    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_json(self):
        """
        Returns the model as raw JSON
        """
        return json.dumps(sanitize_for_serialization(self.to_dict()))

    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

