# coding: utf-8

"""
    AssistedInstall

    Assisted installation  # noqa: E501

    OpenAPI spec version: 1.0.0
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six


class DiskEncryption(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 = {
        'enable_on': 'str',
        'mode': 'str',
        'tang_servers': 'str'
    }

    attribute_map = {
        'enable_on': 'enable_on',
        'mode': 'mode',
        'tang_servers': 'tang_servers'
    }

    def __init__(self, enable_on='none', mode='tpmv2', tang_servers=None):  # noqa: E501
        """DiskEncryption - a model defined in Swagger"""  # noqa: E501

        self._enable_on = None
        self._mode = None
        self._tang_servers = None
        self.discriminator = None

        if enable_on is not None:
            self.enable_on = enable_on
        if mode is not None:
            self.mode = mode
        if tang_servers is not None:
            self.tang_servers = tang_servers

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

        Enable/disable disk encryption on master nodes, worker nodes, or all nodes.  # noqa: E501

        :return: The enable_on of this DiskEncryption.  # noqa: E501
        :rtype: str
        """
        return self._enable_on

    @enable_on.setter
    def enable_on(self, enable_on):
        """Sets the enable_on of this DiskEncryption.

        Enable/disable disk encryption on master nodes, worker nodes, or all nodes.  # noqa: E501

        :param enable_on: The enable_on of this DiskEncryption.  # noqa: E501
        :type: str
        """
        allowed_values = ["none", "all", "masters", "workers"]  # noqa: E501
        if enable_on not in allowed_values:
            raise ValueError(
                "Invalid value for `enable_on` ({0}), must be one of {1}"  # noqa: E501
                .format(enable_on, allowed_values)
            )

        self._enable_on = enable_on

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

        The disk encryption mode to use.  # noqa: E501

        :return: The mode of this DiskEncryption.  # noqa: E501
        :rtype: str
        """
        return self._mode

    @mode.setter
    def mode(self, mode):
        """Sets the mode of this DiskEncryption.

        The disk encryption mode to use.  # noqa: E501

        :param mode: The mode of this DiskEncryption.  # noqa: E501
        :type: str
        """
        allowed_values = ["tpmv2", "tang"]  # noqa: E501
        if mode not in allowed_values:
            raise ValueError(
                "Invalid value for `mode` ({0}), must be one of {1}"  # noqa: E501
                .format(mode, allowed_values)
            )

        self._mode = mode

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

        JSON-formatted string containing additional information regarding tang's configuration  # noqa: E501

        :return: The tang_servers of this DiskEncryption.  # noqa: E501
        :rtype: str
        """
        return self._tang_servers

    @tang_servers.setter
    def tang_servers(self, tang_servers):
        """Sets the tang_servers of this DiskEncryption.

        JSON-formatted string containing additional information regarding tang's configuration  # noqa: E501

        :param tang_servers: The tang_servers of this DiskEncryption.  # noqa: E501
        :type: str
        """

        self._tang_servers = tang_servers

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

        return self.__dict__ == other.__dict__

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