# coding: utf-8

"""
    マネーフォワードクラウド会計Plus API

    マネーフォワードクラウド会計PlusのAPI  # noqa: E501

    The version of the OpenAPI document: 1.0.0
    Contact: yasuhiroota26@gmail.com
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from moneyforward_acplus.configuration import Configuration


class CreateJournalFileRequest(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 = {
        'from_date': 'date',
        'to_date': 'date',
        'approval_status': 'str',
        'character_set': 'str'
    }

    attribute_map = {
        'from_date': 'fromDate',
        'to_date': 'toDate',
        'approval_status': 'approvalStatus',
        'character_set': 'characterSet'
    }

    def __init__(self, from_date=None, to_date=None, approval_status='approved', character_set='utf8', local_vars_configuration=None):  # noqa: E501
        """CreateJournalFileRequest - 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._from_date = None
        self._to_date = None
        self._approval_status = None
        self._character_set = None
        self.discriminator = None

        self.from_date = from_date
        self.to_date = to_date
        if approval_status is not None:
            self.approval_status = approval_status
        if character_set is not None:
            self.character_set = character_set

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

        開始日付  # noqa: E501

        :return: The from_date of this CreateJournalFileRequest.  # noqa: E501
        :rtype: date
        """
        return self._from_date

    @from_date.setter
    def from_date(self, from_date):
        """Sets the from_date of this CreateJournalFileRequest.

        開始日付  # noqa: E501

        :param from_date: The from_date of this CreateJournalFileRequest.  # noqa: E501
        :type: date
        """
        if self.local_vars_configuration.client_side_validation and from_date is None:  # noqa: E501
            raise ValueError("Invalid value for `from_date`, must not be `None`")  # noqa: E501

        self._from_date = from_date

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

        終了日付  # noqa: E501

        :return: The to_date of this CreateJournalFileRequest.  # noqa: E501
        :rtype: date
        """
        return self._to_date

    @to_date.setter
    def to_date(self, to_date):
        """Sets the to_date of this CreateJournalFileRequest.

        終了日付  # noqa: E501

        :param to_date: The to_date of this CreateJournalFileRequest.  # noqa: E501
        :type: date
        """
        if self.local_vars_configuration.client_side_validation and to_date is None:  # noqa: E501
            raise ValueError("Invalid value for `to_date`, must not be `None`")  # noqa: E501

        self._to_date = to_date

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

        承認ステータス  # noqa: E501

        :return: The approval_status of this CreateJournalFileRequest.  # noqa: E501
        :rtype: str
        """
        return self._approval_status

    @approval_status.setter
    def approval_status(self, approval_status):
        """Sets the approval_status of this CreateJournalFileRequest.

        承認ステータス  # noqa: E501

        :param approval_status: The approval_status of this CreateJournalFileRequest.  # noqa: E501
        :type: str
        """
        allowed_values = ["approved", "unapproved", "both"]  # noqa: E501
        if self.local_vars_configuration.client_side_validation and approval_status not in allowed_values:  # noqa: E501
            raise ValueError(
                "Invalid value for `approval_status` ({0}), must be one of {1}"  # noqa: E501
                .format(approval_status, allowed_values)
            )

        self._approval_status = approval_status

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

        文字コード  # noqa: E501

        :return: The character_set of this CreateJournalFileRequest.  # noqa: E501
        :rtype: str
        """
        return self._character_set

    @character_set.setter
    def character_set(self, character_set):
        """Sets the character_set of this CreateJournalFileRequest.

        文字コード  # noqa: E501

        :param character_set: The character_set of this CreateJournalFileRequest.  # noqa: E501
        :type: str
        """
        allowed_values = ["utf8", "sjis"]  # noqa: E501
        if self.local_vars_configuration.client_side_validation and character_set not in allowed_values:  # noqa: E501
            raise ValueError(
                "Invalid value for `character_set` ({0}), must be one of {1}"  # noqa: E501
                .format(character_set, allowed_values)
            )

        self._character_set = character_set

    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, CreateJournalFileRequest):
            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, CreateJournalFileRequest):
            return True

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