# coding: utf-8

"""
    Aron API

    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)  # noqa: E501

    The version of the OpenAPI document: 1.0.0
    Generated by: https://openapi-generator.tech
"""


import inspect
import pprint
import re  # noqa: F401
import six

from openapi_client.configuration import Configuration


class ModelVolumeSourceProject(object):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    """
    Attributes:
      openapi_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.
    """
    openapi_types = {
        'branch': 'str',
        'commit_message': 'str',
        'git_diff_file': 'ModelFileMetadata',
        'git_ref': 'str',
        'project_id': 'int'
    }

    attribute_map = {
        'branch': 'branch',
        'commit_message': 'commit_message',
        'git_diff_file': 'git_diff_file',
        'git_ref': 'git_ref',
        'project_id': 'project_id'
    }

    def __init__(self, branch=None, commit_message=None, git_diff_file=None, git_ref=None, project_id=None, local_vars_configuration=None):  # noqa: E501
        """ModelVolumeSourceProject - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration.get_default_copy()
        self.local_vars_configuration = local_vars_configuration

        self._branch = None
        self._commit_message = None
        self._git_diff_file = None
        self._git_ref = None
        self._project_id = None
        self.discriminator = None

        if branch is not None:
            self.branch = branch
        if commit_message is not None:
            self.commit_message = commit_message
        if git_diff_file is not None:
            self.git_diff_file = git_diff_file
        if git_ref is not None:
            self.git_ref = git_ref
        if project_id is not None:
            self.project_id = project_id

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


        :return: The branch of this ModelVolumeSourceProject.  # noqa: E501
        :rtype: str
        """
        return self._branch

    @branch.setter
    def branch(self, branch):
        """Sets the branch of this ModelVolumeSourceProject.


        :param branch: The branch of this ModelVolumeSourceProject.  # noqa: E501
        :type branch: str
        """

        self._branch = branch

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


        :return: The commit_message of this ModelVolumeSourceProject.  # noqa: E501
        :rtype: str
        """
        return self._commit_message

    @commit_message.setter
    def commit_message(self, commit_message):
        """Sets the commit_message of this ModelVolumeSourceProject.


        :param commit_message: The commit_message of this ModelVolumeSourceProject.  # noqa: E501
        :type commit_message: str
        """

        self._commit_message = commit_message

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


        :return: The git_diff_file of this ModelVolumeSourceProject.  # noqa: E501
        :rtype: ModelFileMetadata
        """
        return self._git_diff_file

    @git_diff_file.setter
    def git_diff_file(self, git_diff_file):
        """Sets the git_diff_file of this ModelVolumeSourceProject.


        :param git_diff_file: The git_diff_file of this ModelVolumeSourceProject.  # noqa: E501
        :type git_diff_file: ModelFileMetadata
        """

        self._git_diff_file = git_diff_file

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


        :return: The git_ref of this ModelVolumeSourceProject.  # noqa: E501
        :rtype: str
        """
        return self._git_ref

    @git_ref.setter
    def git_ref(self, git_ref):
        """Sets the git_ref of this ModelVolumeSourceProject.


        :param git_ref: The git_ref of this ModelVolumeSourceProject.  # noqa: E501
        :type git_ref: str
        """

        self._git_ref = git_ref

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


        :return: The project_id of this ModelVolumeSourceProject.  # noqa: E501
        :rtype: int
        """
        return self._project_id

    @project_id.setter
    def project_id(self, project_id):
        """Sets the project_id of this ModelVolumeSourceProject.


        :param project_id: The project_id of this ModelVolumeSourceProject.  # noqa: E501
        :type project_id: int
        """

        self._project_id = project_id

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

        def convert(x):
            if hasattr(x, "to_dict"):
                args = inspect.getargspec(x.to_dict).args
                if len(args) == 1:
                    return x.to_dict()
                else:
                    return x.to_dict(serialize)
            else:
                return x

        for attr, _ in six.iteritems(self.openapi_types):
            value = getattr(self, attr)
            attr = self.attribute_map.get(attr, attr) if serialize else attr
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: convert(x),
                    value
                ))
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], convert(item[1])),
                    value.items()
                ))
            else:
                result[attr] = convert(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, ModelVolumeSourceProject):
            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, ModelVolumeSourceProject):
            return True

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