# coding: utf-8

"""
    Phrase Strings API Reference

    The version of the OpenAPI document: 2.0.0
    Contact: support@phrase.com
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from phrase_api.configuration import Configuration


class BitbucketSync(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 = {
        'id': 'str',
        'repository_name': 'str',
        'last_export_to_bitbucket_at': 'datetime',
        'last_import_from_bitbucket_at': 'datetime',
        'valid_phraseapp_yaml': 'bool',
        'phraseapp_projects': 'list[ProjectShort]'
    }

    attribute_map = {
        'id': 'id',
        'repository_name': 'repository_name',
        'last_export_to_bitbucket_at': 'last_export_to_bitbucket_at',
        'last_import_from_bitbucket_at': 'last_import_from_bitbucket_at',
        'valid_phraseapp_yaml': 'valid_phraseapp_yaml',
        'phraseapp_projects': 'phraseapp_projects'
    }

    def __init__(self, id=None, repository_name=None, last_export_to_bitbucket_at=None, last_import_from_bitbucket_at=None, valid_phraseapp_yaml=None, phraseapp_projects=None, local_vars_configuration=None):  # noqa: E501
        """BitbucketSync - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._id = None
        self._repository_name = None
        self._last_export_to_bitbucket_at = None
        self._last_import_from_bitbucket_at = None
        self._valid_phraseapp_yaml = None
        self._phraseapp_projects = None
        self.discriminator = None

        if id is not None:
            self.id = id
        if repository_name is not None:
            self.repository_name = repository_name
        if last_export_to_bitbucket_at is not None:
            self.last_export_to_bitbucket_at = last_export_to_bitbucket_at
        if last_import_from_bitbucket_at is not None:
            self.last_import_from_bitbucket_at = last_import_from_bitbucket_at
        if valid_phraseapp_yaml is not None:
            self.valid_phraseapp_yaml = valid_phraseapp_yaml
        if phraseapp_projects is not None:
            self.phraseapp_projects = phraseapp_projects

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


        :return: The id of this BitbucketSync.  # noqa: E501
        :rtype: str
        """
        return self._id

    @id.setter
    def id(self, id):
        """Sets the id of this BitbucketSync.


        :param id: The id of this BitbucketSync.  # noqa: E501
        :type: str
        """

        self._id = id

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


        :return: The repository_name of this BitbucketSync.  # noqa: E501
        :rtype: str
        """
        return self._repository_name

    @repository_name.setter
    def repository_name(self, repository_name):
        """Sets the repository_name of this BitbucketSync.


        :param repository_name: The repository_name of this BitbucketSync.  # noqa: E501
        :type: str
        """

        self._repository_name = repository_name

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


        :return: The last_export_to_bitbucket_at of this BitbucketSync.  # noqa: E501
        :rtype: datetime
        """
        return self._last_export_to_bitbucket_at

    @last_export_to_bitbucket_at.setter
    def last_export_to_bitbucket_at(self, last_export_to_bitbucket_at):
        """Sets the last_export_to_bitbucket_at of this BitbucketSync.


        :param last_export_to_bitbucket_at: The last_export_to_bitbucket_at of this BitbucketSync.  # noqa: E501
        :type: datetime
        """

        self._last_export_to_bitbucket_at = last_export_to_bitbucket_at

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


        :return: The last_import_from_bitbucket_at of this BitbucketSync.  # noqa: E501
        :rtype: datetime
        """
        return self._last_import_from_bitbucket_at

    @last_import_from_bitbucket_at.setter
    def last_import_from_bitbucket_at(self, last_import_from_bitbucket_at):
        """Sets the last_import_from_bitbucket_at of this BitbucketSync.


        :param last_import_from_bitbucket_at: The last_import_from_bitbucket_at of this BitbucketSync.  # noqa: E501
        :type: datetime
        """

        self._last_import_from_bitbucket_at = last_import_from_bitbucket_at

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


        :return: The valid_phraseapp_yaml of this BitbucketSync.  # noqa: E501
        :rtype: bool
        """
        return self._valid_phraseapp_yaml

    @valid_phraseapp_yaml.setter
    def valid_phraseapp_yaml(self, valid_phraseapp_yaml):
        """Sets the valid_phraseapp_yaml of this BitbucketSync.


        :param valid_phraseapp_yaml: The valid_phraseapp_yaml of this BitbucketSync.  # noqa: E501
        :type: bool
        """

        self._valid_phraseapp_yaml = valid_phraseapp_yaml

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


        :return: The phraseapp_projects of this BitbucketSync.  # noqa: E501
        :rtype: list[ProjectShort]
        """
        return self._phraseapp_projects

    @phraseapp_projects.setter
    def phraseapp_projects(self, phraseapp_projects):
        """Sets the phraseapp_projects of this BitbucketSync.


        :param phraseapp_projects: The phraseapp_projects of this BitbucketSync.  # noqa: E501
        :type: list[ProjectShort]
        """

        self._phraseapp_projects = phraseapp_projects

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

        for attr, _ in six.iteritems(self.openapi_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_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, BitbucketSync):
            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, BitbucketSync):
            return True

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