<gh_stars>0
# coding: utf-8

"""
    Cloudbreak API

    Cloudbreak is a powerful left surf that breaks over a coral reef, a mile off southwest the island of Tavarua, Fiji. Cloudbreak is a cloud agnostic Hadoop as a Service API. Abstracts the provisioning and ease management and monitoring of on-demand clusters. SequenceIQ's Cloudbreak is a RESTful application development platform with the goal of helping developers to build solutions for deploying Hadoop YARN clusters in different environments. Once it is deployed in your favourite servlet container it exposes a REST API allowing to span up Hadoop clusters of arbitary sizes and cloud providers. Provisioning Hadoop has never been easier. Cloudbreak is built on the foundation of cloud providers API (Amazon AWS, Microsoft Azure, Google Cloud Platform, Openstack), Apache Ambari, Docker lightweight containers, Swarm and Consul. For further product documentation follow the link: <a href=\"http://hortonworks.com/apache/cloudbreak/\">http://hortonworks.com/apache/cloudbreak/</a>

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


from pprint import pformat
from six import iteritems
import re


class UserNamePassword(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 = {
        'user_name': 'str',
        'old_password': '<PASSWORD>',
        'password': '<PASSWORD>'
    }

    attribute_map = {
        'user_name': 'userName',
        'old_password': '<PASSWORD>',
        'password': 'password'
    }

    def __init__(self, user_name=None, old_password=None, password=None):
        """
        UserNamePassword - a model defined in Swagger
        """

        self._user_name = None
        self._old_password = None
        self._password = None

        self.user_name = user_name
        self.old_password = <PASSWORD>
        self.password = password

    @property
    def user_name(self):
        """
        Gets the user_name of this UserNamePassword.
        new user name in ambari

        :return: The user_name of this UserNamePassword.
        :rtype: str
        """
        return self._user_name

    @user_name.setter
    def user_name(self, user_name):
        """
        Sets the user_name of this UserNamePassword.
        new user name in ambari

        :param user_name: The user_name of this UserNamePassword.
        :type: str
        """
        if user_name is None:
            raise ValueError("Invalid value for `user_name`, must not be `None`")
        if user_name is not None and len(user_name) > 2147483647:
            raise ValueError("Invalid value for `user_name`, length must be less than or equal to `2147483647`")
        if user_name is not None and len(user_name) < 1:
            raise ValueError("Invalid value for `user_name`, length must be greater than or equal to `1`")

        self._user_name = user_name

    @property
    def old_password(self):
        """
        Gets the old_password of this UserNamePassword.
        old password in ambari

        :return: The old_password of this UserNamePassword.
        :rtype: str
        """
        return self._old_password

    @old_password.setter
    def old_password(self, old_password):
        """
        Sets the old_password of this UserNamePassword.
        old password in ambari

        :param old_password: The old_password of this UserNamePassword.
        :type: str
        """
        if old_password is None:
            raise ValueError("Invalid value for `old_password`, must not be `None`")
        if old_password is not None and len(old_password) > <PASSWORD>:
            raise ValueError("Invalid value for `old_password`, length must be less than or equal to `2147483647`")
        if old_password is not None and len(old_password) < 1:
            raise ValueError("Invalid value for `old_password`, length must be greater than or equal to `1`")

        self._old_password = <PASSWORD>

    @property
    def password(self):
        """
        Gets the password of this UserNamePassword.
        new password in ambari

        :return: The password of this UserNamePassword.
        :rtype: str
        """
        return self._password

    @password.setter
    def password(self, password):
        """
        Sets the password of this UserNamePassword.
        new password in ambari

        :param password: The password of this UserNamePassword.
        :type: str
        """
        if password is None:
            raise ValueError("Invalid value for `password`, must not be `None`")
        if password is not None and len(password) > 2147483647:
            raise ValueError("Invalid value for `password`, length must be less than or equal to `2147483647`")
        if password is not None and len(password) < 1:
            raise ValueError("Invalid value for `password`, length must be greater than or equal to `1`")

        self._password = password

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

        for attr, _ in 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 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, UserNamePassword):
            return False

        return self.__dict__ == other.__dict__

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