# coding: utf-8

"""
    SCORM Cloud Rest API

    REST API used for SCORM Cloud integrations.  # noqa: E501

    OpenAPI spec version: 2.0
    Contact: systems@rusticisoftware.com
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six


class CreateDispatchSchema(object):
    """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 = {
        'destination_id': 'str',
        'course_id': 'str',
        'allow_new_registrations': 'bool',
        'instanced': 'bool',
        'registration_cap': 'int',
        'expiration_date': 'datetime',
        'enabled': 'bool',
        'tags': 'list[str]',
        'email': 'str',
        'notes': 'str',
        'post_back': 'PostBackSchema'
    }

    attribute_map = {
        'destination_id': 'destinationId',
        'course_id': 'courseId',
        'allow_new_registrations': 'allowNewRegistrations',
        'instanced': 'instanced',
        'registration_cap': 'registrationCap',
        'expiration_date': 'expirationDate',
        'enabled': 'enabled',
        'tags': 'tags',
        'email': 'email',
        'notes': 'notes',
        'post_back': 'postBack'
    }

    def __init__(self, destination_id=None, course_id=None, allow_new_registrations=True, instanced=True, registration_cap=0, expiration_date=None, enabled=True, tags=None, email=None, notes=None, post_back=None):  # noqa: E501
        """CreateDispatchSchema - a model defined in Swagger"""  # noqa: E501

        self._destination_id = None
        self._course_id = None
        self._allow_new_registrations = None
        self._instanced = None
        self._registration_cap = None
        self._expiration_date = None
        self._enabled = None
        self._tags = None
        self._email = None
        self._notes = None
        self._post_back = None
        self.discriminator = None

        self.destination_id = destination_id
        self.course_id = course_id
        if allow_new_registrations is not None:
            self.allow_new_registrations = allow_new_registrations
        if instanced is not None:
            self.instanced = instanced
        if registration_cap is not None:
            self.registration_cap = registration_cap
        if expiration_date is not None:
            self.expiration_date = expiration_date
        if enabled is not None:
            self.enabled = enabled
        if tags is not None:
            self.tags = tags
        if email is not None:
            self.email = email
        if notes is not None:
            self.notes = notes
        if post_back is not None:
            self.post_back = post_back

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

        Id of the destination this dispatch will belong to.  # noqa: E501

        :return: The destination_id of this CreateDispatchSchema.  # noqa: E501
        :rtype: str
        """
        return self._destination_id

    @destination_id.setter
    def destination_id(self, destination_id):
        """Sets the destination_id of this CreateDispatchSchema.

        Id of the destination this dispatch will belong to.  # noqa: E501

        :param destination_id: The destination_id of this CreateDispatchSchema.  # noqa: E501
        :type: str
        """
        if destination_id is None:
            raise ValueError("Invalid value for `destination_id`, must not be `None`")  # noqa: E501

        self._destination_id = destination_id

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

        Id of the course to be dispatched.  # noqa: E501

        :return: The course_id of this CreateDispatchSchema.  # noqa: E501
        :rtype: str
        """
        return self._course_id

    @course_id.setter
    def course_id(self, course_id):
        """Sets the course_id of this CreateDispatchSchema.

        Id of the course to be dispatched.  # noqa: E501

        :param course_id: The course_id of this CreateDispatchSchema.  # noqa: E501
        :type: str
        """
        if course_id is None:
            raise ValueError("Invalid value for `course_id`, must not be `None`")  # noqa: E501

        self._course_id = course_id

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

        If true, then new registrations can be created for this dispatch.  # noqa: E501

        :return: The allow_new_registrations of this CreateDispatchSchema.  # noqa: E501
        :rtype: bool
        """
        return self._allow_new_registrations

    @allow_new_registrations.setter
    def allow_new_registrations(self, allow_new_registrations):
        """Sets the allow_new_registrations of this CreateDispatchSchema.

        If true, then new registrations can be created for this dispatch.  # noqa: E501

        :param allow_new_registrations: The allow_new_registrations of this CreateDispatchSchema.  # noqa: E501
        :type: bool
        """

        self._allow_new_registrations = allow_new_registrations

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

        If true, then a new registration instance will be created if the client LMS doesn't provide launch data for an existing one. Otherwise, the same instance will always be used for the given cmi.learner_id.   # noqa: E501

        :return: The instanced of this CreateDispatchSchema.  # noqa: E501
        :rtype: bool
        """
        return self._instanced

    @instanced.setter
    def instanced(self, instanced):
        """Sets the instanced of this CreateDispatchSchema.

        If true, then a new registration instance will be created if the client LMS doesn't provide launch data for an existing one. Otherwise, the same instance will always be used for the given cmi.learner_id.   # noqa: E501

        :param instanced: The instanced of this CreateDispatchSchema.  # noqa: E501
        :type: bool
        """

        self._instanced = instanced

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

        The maximum number of registrations that can be created for this dispatch, where '0' means 'unlimited registrations'.   # noqa: E501

        :return: The registration_cap of this CreateDispatchSchema.  # noqa: E501
        :rtype: int
        """
        return self._registration_cap

    @registration_cap.setter
    def registration_cap(self, registration_cap):
        """Sets the registration_cap of this CreateDispatchSchema.

        The maximum number of registrations that can be created for this dispatch, where '0' means 'unlimited registrations'.   # noqa: E501

        :param registration_cap: The registration_cap of this CreateDispatchSchema.  # noqa: E501
        :type: int
        """

        self._registration_cap = registration_cap

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

        The ISO 8601 TimeStamp (defaults to UTC) after which this dispatch will be disabled. An empty value will represent no expiration date.   # noqa: E501

        :return: The expiration_date of this CreateDispatchSchema.  # noqa: E501
        :rtype: datetime
        """
        return self._expiration_date

    @expiration_date.setter
    def expiration_date(self, expiration_date):
        """Sets the expiration_date of this CreateDispatchSchema.

        The ISO 8601 TimeStamp (defaults to UTC) after which this dispatch will be disabled. An empty value will represent no expiration date.   # noqa: E501

        :param expiration_date: The expiration_date of this CreateDispatchSchema.  # noqa: E501
        :type: datetime
        """

        self._expiration_date = expiration_date

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

        If true, then this dispatch can be launched.  # noqa: E501

        :return: The enabled of this CreateDispatchSchema.  # noqa: E501
        :rtype: bool
        """
        return self._enabled

    @enabled.setter
    def enabled(self, enabled):
        """Sets the enabled of this CreateDispatchSchema.

        If true, then this dispatch can be launched.  # noqa: E501

        :param enabled: The enabled of this CreateDispatchSchema.  # noqa: E501
        :type: bool
        """

        self._enabled = enabled

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

        The tags to associate with this Dispatch.  # noqa: E501

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

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

        The tags to associate with this Dispatch.  # noqa: E501

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

        self._tags = tags

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

        SCORM Cloud user e-mail associated with this dispatch. If this is not provided, it will default to the owner of the Realm.   # noqa: E501

        :return: The email of this CreateDispatchSchema.  # noqa: E501
        :rtype: str
        """
        return self._email

    @email.setter
    def email(self, email):
        """Sets the email of this CreateDispatchSchema.

        SCORM Cloud user e-mail associated with this dispatch. If this is not provided, it will default to the owner of the Realm.   # noqa: E501

        :param email: The email of this CreateDispatchSchema.  # noqa: E501
        :type: str
        """

        self._email = email

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

        Any provided notes about this dispatch.  # noqa: E501

        :return: The notes of this CreateDispatchSchema.  # noqa: E501
        :rtype: str
        """
        return self._notes

    @notes.setter
    def notes(self, notes):
        """Sets the notes of this CreateDispatchSchema.

        Any provided notes about this dispatch.  # noqa: E501

        :param notes: The notes of this CreateDispatchSchema.  # noqa: E501
        :type: str
        """

        self._notes = notes

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

        The postback information for this Dispatch.  # noqa: E501

        :return: The post_back of this CreateDispatchSchema.  # noqa: E501
        :rtype: PostBackSchema
        """
        return self._post_back

    @post_back.setter
    def post_back(self, post_back):
        """Sets the post_back of this CreateDispatchSchema.

        The postback information for this Dispatch.  # noqa: E501

        :param post_back: The post_back of this CreateDispatchSchema.  # noqa: E501
        :type: PostBackSchema
        """

        self._post_back = post_back

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

        for attr, _ in six.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
        if issubclass(CreateDispatchSchema, 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, CreateDispatchSchema):
            return False

        return self.__dict__ == other.__dict__

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