# coding: utf-8

"""
    Octopus Server API

    No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)  # noqa: E501

    OpenAPI spec version: 2019.6.7+Branch.tags-2019.6.7.Sha.aa18dc6809953218c66f57eff7d26481d9b23d6a
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six

from octopus_deploy_swagger_client.models.commit_details import CommitDetails  # noqa: F401,E501
from octopus_deploy_swagger_client.models.package_build_metadata import PackageBuildMetadata  # noqa: F401,E501
from octopus_deploy_swagger_client.models.work_item_link import WorkItemLink  # noqa: F401,E501


class ReleaseChanges(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 = {
        'version': 'str',
        'release_notes': 'str',
        'package_build_metadata': 'list[PackageBuildMetadata]',
        'work_items': 'list[WorkItemLink]',
        'commits': 'list[CommitDetails]'
    }

    attribute_map = {
        'version': 'Version',
        'release_notes': 'ReleaseNotes',
        'package_build_metadata': 'PackageBuildMetadata',
        'work_items': 'WorkItems',
        'commits': 'Commits'
    }

    def __init__(self, version=None, release_notes=None, package_build_metadata=None, work_items=None, commits=None):  # noqa: E501
        """ReleaseChanges - a model defined in Swagger"""  # noqa: E501

        self._version = None
        self._release_notes = None
        self._package_build_metadata = None
        self._work_items = None
        self._commits = None
        self.discriminator = None

        if version is not None:
            self.version = version
        if release_notes is not None:
            self.release_notes = release_notes
        if package_build_metadata is not None:
            self.package_build_metadata = package_build_metadata
        if work_items is not None:
            self.work_items = work_items
        if commits is not None:
            self.commits = commits

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


        :return: The version of this ReleaseChanges.  # noqa: E501
        :rtype: str
        """
        return self._version

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


        :param version: The version of this ReleaseChanges.  # noqa: E501
        :type: str
        """

        self._version = version

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


        :return: The release_notes of this ReleaseChanges.  # noqa: E501
        :rtype: str
        """
        return self._release_notes

    @release_notes.setter
    def release_notes(self, release_notes):
        """Sets the release_notes of this ReleaseChanges.


        :param release_notes: The release_notes of this ReleaseChanges.  # noqa: E501
        :type: str
        """

        self._release_notes = release_notes

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


        :return: The package_build_metadata of this ReleaseChanges.  # noqa: E501
        :rtype: list[PackageBuildMetadata]
        """
        return self._package_build_metadata

    @package_build_metadata.setter
    def package_build_metadata(self, package_build_metadata):
        """Sets the package_build_metadata of this ReleaseChanges.


        :param package_build_metadata: The package_build_metadata of this ReleaseChanges.  # noqa: E501
        :type: list[PackageBuildMetadata]
        """

        self._package_build_metadata = package_build_metadata

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


        :return: The work_items of this ReleaseChanges.  # noqa: E501
        :rtype: list[WorkItemLink]
        """
        return self._work_items

    @work_items.setter
    def work_items(self, work_items):
        """Sets the work_items of this ReleaseChanges.


        :param work_items: The work_items of this ReleaseChanges.  # noqa: E501
        :type: list[WorkItemLink]
        """

        self._work_items = work_items

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


        :return: The commits of this ReleaseChanges.  # noqa: E501
        :rtype: list[CommitDetails]
        """
        return self._commits

    @commits.setter
    def commits(self, commits):
        """Sets the commits of this ReleaseChanges.


        :param commits: The commits of this ReleaseChanges.  # noqa: E501
        :type: list[CommitDetails]
        """

        self._commits = commits

    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(ReleaseChanges, 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, ReleaseChanges):
            return False

        return self.__dict__ == other.__dict__

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