# coding: utf-8

"""
Licensed to Cloudera, Inc. under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  Cloudera, Inc. licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License.  You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""


import pprint
import re  # noqa: F401

import six


class WarningInfo(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 = {
        'warning_code': 'str',
        'warning_type': 'str',
        'properties': 'dict(str, str)'
    }

    attribute_map = {
        'warning_code': 'warningCode',
        'warning_type': 'warningType',
        'properties': 'properties'
    }

    def __init__(self, warning_code=None, warning_type=None, properties=None):  # noqa: E501
        """WarningInfo - a model defined in Swagger"""  # noqa: E501

        self._warning_code = None
        self._warning_type = None
        self._properties = None
        self.discriminator = None

        self.warning_code = warning_code
        self.warning_type = warning_type
        self.properties = properties

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

        Warning code  # noqa: E501

        :return: The warning_code of this WarningInfo.  # noqa: E501
        :rtype: str
        """
        return self._warning_code

    @warning_code.setter
    def warning_code(self, warning_code):
        """Sets the warning_code of this WarningInfo.

        Warning code  # noqa: E501

        :param warning_code: The warning_code of this WarningInfo.  # noqa: E501
        :type: str
        """
        if warning_code is None:
            raise ValueError("Invalid value for `warning_code`, must not be `None`")  # noqa: E501
        allowed_values = ["UNKNOWN_SERVICE_TYPE", "UNKNOWN_ROLE_TYPE_FOR_SERVICE_TYPE", "ROLE_ASSIGNMENT_DIFFERENCE", "ROLE_CONFIGURATION_DIFFERENCE", "ROLE_CONFIGURATION_VALUE_DIFFERENCE", "INSTANCE_CONFIGURATION_DIFFERENCE", "INSTANCE_CONFIGURATION_VALUE_DIFFERENCE", "UNDEFINED"]  # noqa: E501
        if warning_code not in allowed_values:
            raise ValueError(
                "Invalid value for `warning_code` ({0}), must be one of {1}"  # noqa: E501
                .format(warning_code, allowed_values)
            )

        self._warning_code = warning_code

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

        Warning type  # noqa: E501

        :return: The warning_type of this WarningInfo.  # noqa: E501
        :rtype: str
        """
        return self._warning_type

    @warning_type.setter
    def warning_type(self, warning_type):
        """Sets the warning_type of this WarningInfo.

        Warning type  # noqa: E501

        :param warning_type: The warning_type of this WarningInfo.  # noqa: E501
        :type: str
        """
        if warning_type is None:
            raise ValueError("Invalid value for `warning_type`, must not be `None`")  # noqa: E501
        allowed_values = ["CLIENT", "SERVICE", "UNKNOWN"]  # noqa: E501
        if warning_type not in allowed_values:
            raise ValueError(
                "Invalid value for `warning_type` ({0}), must be one of {1}"  # noqa: E501
                .format(warning_type, allowed_values)
            )

        self._warning_type = warning_type

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

        Properties associated with the error  # noqa: E501

        :return: The properties of this WarningInfo.  # noqa: E501
        :rtype: dict(str, str)
        """
        return self._properties

    @properties.setter
    def properties(self, properties):
        """Sets the properties of this WarningInfo.

        Properties associated with the error  # noqa: E501

        :param properties: The properties of this WarningInfo.  # noqa: E501
        :type: dict(str, str)
        """
        if properties is None:
            raise ValueError("Invalid value for `properties`, must not be `None`")  # noqa: E501

        self._properties = properties

    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

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

        return self.__dict__ == other.__dict__

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

# coding: utf-8

"""
Licensed to Cloudera, Inc. under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  Cloudera, Inc. licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License.  You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""


import pprint
import re  # noqa: F401

import six


class WarningInfo(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 = {
        'warning_code': 'str',
        'warning_type': 'str',
        'properties': 'dict(str, str)'
    }

    attribute_map = {
        'warning_code': 'warningCode',
        'warning_type': 'warningType',
        'properties': 'properties'
    }

    def __init__(self, warning_code=None, warning_type=None, properties=None):  # noqa: E501
        """WarningInfo - a model defined in Swagger"""  # noqa: E501

        self._warning_code = None
        self._warning_type = None
        self._properties = None
        self.discriminator = None

        self.warning_code = warning_code
        self.warning_type = warning_type
        self.properties = properties

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

        Warning code  # noqa: E501

        :return: The warning_code of this WarningInfo.  # noqa: E501
        :rtype: str
        """
        return self._warning_code

    @warning_code.setter
    def warning_code(self, warning_code):
        """Sets the warning_code of this WarningInfo.

        Warning code  # noqa: E501

        :param warning_code: The warning_code of this WarningInfo.  # noqa: E501
        :type: str
        """
        if warning_code is None:
            raise ValueError("Invalid value for `warning_code`, must not be `None`")  # noqa: E501
        allowed_values = ["UNKNOWN_SERVICE_TYPE", "UNKNOWN_ROLE_TYPE_FOR_SERVICE_TYPE", "ROLE_ASSIGNMENT_DIFFERENCE", "ROLE_CONFIGURATION_DIFFERENCE", "ROLE_CONFIGURATION_VALUE_DIFFERENCE", "INSTANCE_CONFIGURATION_DIFFERENCE", "INSTANCE_CONFIGURATION_VALUE_DIFFERENCE", "UNDEFINED"]  # noqa: E501
        if warning_code not in allowed_values:
            raise ValueError(
                "Invalid value for `warning_code` ({0}), must be one of {1}"  # noqa: E501
                .format(warning_code, allowed_values)
            )

        self._warning_code = warning_code

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

        Warning type  # noqa: E501

        :return: The warning_type of this WarningInfo.  # noqa: E501
        :rtype: str
        """
        return self._warning_type

    @warning_type.setter
    def warning_type(self, warning_type):
        """Sets the warning_type of this WarningInfo.

        Warning type  # noqa: E501

        :param warning_type: The warning_type of this WarningInfo.  # noqa: E501
        :type: str
        """
        if warning_type is None:
            raise ValueError("Invalid value for `warning_type`, must not be `None`")  # noqa: E501
        allowed_values = ["CLIENT", "SERVICE", "UNKNOWN"]  # noqa: E501
        if warning_type not in allowed_values:
            raise ValueError(
                "Invalid value for `warning_type` ({0}), must be one of {1}"  # noqa: E501
                .format(warning_type, allowed_values)
            )

        self._warning_type = warning_type

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

        Properties associated with the error  # noqa: E501

        :return: The properties of this WarningInfo.  # noqa: E501
        :rtype: dict(str, str)
        """
        return self._properties

    @properties.setter
    def properties(self, properties):
        """Sets the properties of this WarningInfo.

        Properties associated with the error  # noqa: E501

        :param properties: The properties of this WarningInfo.  # noqa: E501
        :type: dict(str, str)
        """
        if properties is None:
            raise ValueError("Invalid value for `properties`, must not be `None`")  # noqa: E501

        self._properties = properties

    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

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

        return self.__dict__ == other.__dict__

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

# coding: utf-8 Licensed to Cloudera, Inc. under one or more contributor license agreements.  See the NOTICE file distributed with this work for additional information regarding copyright ownership.  Cloudera, Inc. licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.  You may obtain a copy of the License at      http://www.apache.org/licenses/LICENSE-2.0  Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. # noqa: F401 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. # noqa: E501 WarningInfo - a model defined in Swagger # noqa: E501 Gets the warning_code of this WarningInfo.  # noqa: E501          Warning code  # noqa: E501          :return: The warning_code of this WarningInfo.  # noqa: E501         :rtype: str Sets the warning_code of this WarningInfo.          Warning code  # noqa: E501          :param warning_code: The warning_code of this WarningInfo.  # noqa: E501         :type: str # noqa: E501 # noqa: E501 # noqa: E501 Gets the warning_type of this WarningInfo.  # noqa: E501          Warning type  # noqa: E501          :return: The warning_type of this WarningInfo.  # noqa: E501         :rtype: str Sets the warning_type of this WarningInfo.          Warning type  # noqa: E501          :param warning_type: The warning_type of this WarningInfo.  # noqa: E501         :type: str # noqa: E501 # noqa: E501 # noqa: E501 Gets the properties of this WarningInfo.  # noqa: E501          Properties associated with the error  # noqa: E501          :return: The properties of this WarningInfo.  # noqa: E501         :rtype: dict(str, str) Sets the properties of this WarningInfo.          Properties associated with the error  # noqa: E501          :param properties: The properties of this WarningInfo.  # noqa: E501         :type: dict(str, str) # noqa: E501 Returns the model properties as a dict Returns the string representation of the model For `print` and `pprint` Returns true if both objects are equal Returns true if both objects are not equal