# coding: utf-8

"""
    Mail-in-a-Box

    Mail-in-a-Box API HTTP specification.  # Introduction This API is documented in [**OpenAPI format**](http://spec.openapis.org/oas/v3.0.3). ([View the full HTTP specification](https://raw.githubusercontent.com/mail-in-a-box/mailinabox/api-spec/api/mailinabox.yml).)  All endpoints are relative to `https://{host}/admin` and are secured with [`Basic Access` authentication](https://en.wikipedia.org/wiki/Basic_access_authentication). If you have multi-factor authentication enabled, authentication with a `user:password` combination will fail unless a valid OTP is supplied via the `x-auth-token` header. Authentication via a `user:user_key` pair is possible without the header being present.   # noqa: E501

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


import pprint
import re  # noqa: F401

import six

from mailinabox_api.configuration import Configuration


class SystemBackupConfigResponse(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 = {
        "enc_pw_file": "str",
        "file_target_directory": "str",
        "min_age_in_days": "int",
        "ssh_pub_key": "str",
        "target": "str",
        "target_user": "str",
        "target_pass": "str",
    }

    attribute_map = {
        "enc_pw_file": "enc_pw_file",
        "file_target_directory": "file_target_directory",
        "min_age_in_days": "min_age_in_days",
        "ssh_pub_key": "ssh_pub_key",
        "target": "target",
        "target_user": "target_user",
        "target_pass": "target_pass",
    }

    def __init__(
        self,
        enc_pw_file=None,
        file_target_directory=None,
        min_age_in_days=None,
        ssh_pub_key=None,
        target=None,
        target_user=None,
        target_pass=None,
        local_vars_configuration=None,
    ):  # noqa: E501
        """SystemBackupConfigResponse - 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._enc_pw_file = None
        self._file_target_directory = None
        self._min_age_in_days = None
        self._ssh_pub_key = None
        self._target = None
        self._target_user = None
        self._target_pass = None
        self.discriminator = None

        self.enc_pw_file = enc_pw_file
        self.file_target_directory = file_target_directory
        self.min_age_in_days = min_age_in_days
        self.ssh_pub_key = ssh_pub_key
        self.target = target
        if target_user is not None:
            self.target_user = target_user
        if target_pass is not None:
            self.target_pass = target_pass

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


        :return: The enc_pw_file of this SystemBackupConfigResponse.  # noqa: E501
        :rtype: str
        """
        return self._enc_pw_file

    @enc_pw_file.setter
    def enc_pw_file(self, enc_pw_file):
        """Sets the enc_pw_file of this SystemBackupConfigResponse.


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

        self._enc_pw_file = enc_pw_file

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


        :return: The file_target_directory of this SystemBackupConfigResponse.  # noqa: E501
        :rtype: str
        """
        return self._file_target_directory

    @file_target_directory.setter
    def file_target_directory(self, file_target_directory):
        """Sets the file_target_directory of this SystemBackupConfigResponse.


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

        self._file_target_directory = file_target_directory

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


        :return: The min_age_in_days of this SystemBackupConfigResponse.  # noqa: E501
        :rtype: int
        """
        return self._min_age_in_days

    @min_age_in_days.setter
    def min_age_in_days(self, min_age_in_days):
        """Sets the min_age_in_days of this SystemBackupConfigResponse.


        :param min_age_in_days: The min_age_in_days of this SystemBackupConfigResponse.  # noqa: E501
        :type: int
        """
        if (
            self.local_vars_configuration.client_side_validation
            and min_age_in_days is None
        ):  # noqa: E501
            raise ValueError(
                "Invalid value for `min_age_in_days`, must not be `None`"
            )  # noqa: E501
        if (
            self.local_vars_configuration.client_side_validation
            and min_age_in_days is not None
            and min_age_in_days < 1
        ):  # noqa: E501
            raise ValueError(
                "Invalid value for `min_age_in_days`, must be a value greater than or equal to `1`"
            )  # noqa: E501

        self._min_age_in_days = min_age_in_days

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


        :return: The ssh_pub_key of this SystemBackupConfigResponse.  # noqa: E501
        :rtype: str
        """
        return self._ssh_pub_key

    @ssh_pub_key.setter
    def ssh_pub_key(self, ssh_pub_key):
        """Sets the ssh_pub_key of this SystemBackupConfigResponse.


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

        self._ssh_pub_key = ssh_pub_key

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


        :return: The target of this SystemBackupConfigResponse.  # noqa: E501
        :rtype: str
        """
        return self._target

    @target.setter
    def target(self, target):
        """Sets the target of this SystemBackupConfigResponse.


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

        self._target = target

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


        :return: The target_user of this SystemBackupConfigResponse.  # noqa: E501
        :rtype: str
        """
        return self._target_user

    @target_user.setter
    def target_user(self, target_user):
        """Sets the target_user of this SystemBackupConfigResponse.


        :param target_user: The target_user of this SystemBackupConfigResponse.  # noqa: E501
        :type: str
        """

        self._target_user = target_user

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


        :return: The target_pass of this SystemBackupConfigResponse.  # noqa: E501
        :rtype: str
        """
        return self._target_pass

    @target_pass.setter
    def target_pass(self, target_pass):
        """Sets the target_pass of this SystemBackupConfigResponse.


        :param target_pass: The target_pass of this SystemBackupConfigResponse.  # noqa: E501
        :type: str
        """

        self._target_pass = target_pass

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

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