text: # 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.9.0
      
      Generated by: https://github.com/swagger-api/swagger-codegen.git
  """
  
  
  from pprint import pformat
  from six import iteritems
  import re
  
  
  class AmbariV2Request(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 = {
          'blueprint_id': 'int',
          'blueprint_name': 'str',
          'gateway': 'GatewayJson',
          'enable_security': 'bool',
          'user_name': 'str',
          'password': 'str',
          'kerberos': 'KerberosRequest',
          'validate_blueprint': 'bool',
          'validate_repositories': 'bool',
          'ambari_stack_details': 'AmbariStackDetails',
          'ambari_repo_details_json': 'AmbariRepoDetails',
          'ambari_database_details': 'AmbariDatabaseDetails',
          'config_strategy': 'str',
          'connected_cluster': 'ConnectedClusterRequest',
          'ambari_security_master_key': 'str'
      }
  
      attribute_map = {
          'blueprint_id': 'blueprintId',
          'blueprint_name': 'blueprintName',
          'gateway': 'gateway',
          'enable_security': 'enableSecurity',
          'user_name': 'userName',
          'password': 'password',
          'kerberos': 'kerberos',
          'validate_blueprint': 'validateBlueprint',
          'validate_repositories': 'validateRepositories',
          'ambari_stack_details': 'ambariStackDetails',
          'ambari_repo_details_json': 'ambariRepoDetailsJson',
          'ambari_database_details': 'ambariDatabaseDetails',
          'config_strategy': 'configStrategy',
          'connected_cluster': 'connectedCluster',
          'ambari_security_master_key': 'ambariSecurityMasterKey'
      }
  
      def __init__(self, blueprint_id=None, blueprint_name=None, gateway=None, enable_security=False, user_name=None, password=None, kerberos=None, validate_blueprint=False, validate_repositories=False, ambari_stack_details=None, ambari_repo_details_json=None, ambari_database_details=None, config_strategy=None, connected_cluster=None, ambari_security_master_key=None):
          """
          AmbariV2Request - a model defined in Swagger
          """
  
          self._blueprint_id = None
          self._blueprint_name = None
          self._gateway = None
          self._enable_security = None
          self._user_name = None
          self._password = None
          self._kerberos = None
          self._validate_blueprint = None
          self._validate_repositories = None
          self._ambari_stack_details = None
          self._ambari_repo_details_json = None
          self._ambari_database_details = None
          self._config_strategy = None
          self._connected_cluster = None
          self._ambari_security_master_key = None
  
          if blueprint_id is not None:
            self.blueprint_id = blueprint_id
          if blueprint_name is not None:
            self.blueprint_name = blueprint_name
          if gateway is not None:
            self.gateway = gateway
          if enable_security is not None:
            self.enable_security = enable_security
          self.user_name = user_name
          self.password = password
          if kerberos is not None:
            self.kerberos = kerberos
          if validate_blueprint is not None:
            self.validate_blueprint = validate_blueprint
          if validate_repositories is not None:
            self.validate_repositories = validate_repositories
          if ambari_stack_details is not None:
            self.ambari_stack_details = ambari_stack_details
          if ambari_repo_details_json is not None:
            self.ambari_repo_details_json = ambari_repo_details_json
          if ambari_database_details is not None:
            self.ambari_database_details = ambari_database_details
          if config_strategy is not None:
            self.config_strategy = config_strategy
          if connected_cluster is not None:
            self.connected_cluster = connected_cluster
          if ambari_security_master_key is not None:
            self.ambari_security_master_key = ambari_security_master_key
  
      @property
      def blueprint_id(self):
          """
          Gets the blueprint_id of this AmbariV2Request.
          blueprint id for the cluster
  
          :return: The blueprint_id of this AmbariV2Request.
          :rtype: int
          """
          return self._blueprint_id
  
      @blueprint_id.setter
      def blueprint_id(self, blueprint_id):
          """
          Sets the blueprint_id of this AmbariV2Request.
          blueprint id for the cluster
  
          :param blueprint_id: The blueprint_id of this AmbariV2Request.
          :type: int
          """
  
          self._blueprint_id = blueprint_id
  
      @property
      def blueprint_name(self):
          """
          Gets the blueprint_name of this AmbariV2Request.
          blueprint name for the cluster
  
          :return: The blueprint_name of this AmbariV2Request.
          :rtype: str
          """
          return self._blueprint_name
  
      @blueprint_name.setter
      def blueprint_name(self, blueprint_name):
          """
          Sets the blueprint_name of this AmbariV2Request.
          blueprint name for the cluster
  
          :param blueprint_name: The blueprint_name of this AmbariV2Request.
          :type: str
          """
  
          self._blueprint_name = blueprint_name
  
      @property
      def gateway(self):
          """
          Gets the gateway of this AmbariV2Request.
  
          :return: The gateway of this AmbariV2Request.
          :rtype: GatewayJson
          """
          return self._gateway
  
      @gateway.setter
      def gateway(self, gateway):
          """
          Sets the gateway of this AmbariV2Request.
  
          :param gateway: The gateway of this AmbariV2Request.
          :type: GatewayJson
          """
  
          self._gateway = gateway
  
      @property
      def enable_security(self):
          """
          Gets the enable_security of this AmbariV2Request.
          enable Kerberos security
  
          :return: The enable_security of this AmbariV2Request.
          :rtype: bool
          """
          return self._enable_security
  
      @enable_security.setter
      def enable_security(self, enable_security):
          """
          Sets the enable_security of this AmbariV2Request.
          enable Kerberos security
  
          :param enable_security: The enable_security of this AmbariV2Request.
          :type: bool
          """
  
          self._enable_security = enable_security
  
      @property
      def user_name(self):
          """
          Gets the user_name of this AmbariV2Request.
          ambari username
  
          :return: The user_name of this AmbariV2Request.
          :rtype: str
          """
          return self._user_name
  
      @user_name.setter
      def user_name(self, user_name):
          """
          Sets the user_name of this AmbariV2Request.
          ambari username
  
          :param user_name: The user_name of this AmbariV2Request.
          :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) > 15:
              raise ValueError("Invalid value for `user_name`, length must be less than or equal to `15`")
          if user_name is not None and len(user_name) < 5:
              raise ValueError("Invalid value for `user_name`, length must be greater than or equal to `5`")
          if user_name is not None and not re.search('(^[a-z][-a-z0-9]*[a-z0-9]$)', user_name):
              raise ValueError("Invalid value for `user_name`, must be a follow pattern or equal to `/(^[a-z][-a-z0-9]*[a-z0-9]$)/`")
  
          self._user_name = user_name
  
      @property
      def password(self):
          """
          Gets the password of this AmbariV2Request.
          ambari password
  
          :return: The password of this AmbariV2Request.
          :rtype: str
          """
          return self._password
  
      @password.setter
      def password(self, password):
          """
          Sets the password of this AmbariV2Request.
          ambari password
  
          :param password: The password of this AmbariV2Request.
          :type: str
          """
          if password is None:
              raise ValueError("Invalid value for `password`, must not be `None`")
          if password is not None and len(password) > 100:
              raise ValueError("Invalid value for `password`, length must be less than or equal to `100`")
          if password is not None and len(password) < 5:
              raise ValueError("Invalid value for `password`, length must be greater than or equal to `5`")
  
          self._password = password
  
      @property
      def kerberos(self):
          """
          Gets the kerberos of this AmbariV2Request.
  
          :return: The kerberos of this AmbariV2Request.
          :rtype: KerberosRequest
          """
          return self._kerberos
  
      @kerberos.setter
      def kerberos(self, kerberos):
          """
          Sets the kerberos of this AmbariV2Request.
  
          :param kerberos: The kerberos of this AmbariV2Request.
          :type: KerberosRequest
          """
  
          self._kerberos = kerberos
  
      @property
      def validate_blueprint(self):
          """
          Gets the validate_blueprint of this AmbariV2Request.
          blueprint validation
  
          :return: The validate_blueprint of this AmbariV2Request.
          :rtype: bool
          """
          return self._validate_blueprint
  
      @validate_blueprint.setter
      def validate_blueprint(self, validate_blueprint):
          """
          Sets the validate_blueprint of this AmbariV2Request.
          blueprint validation
  
          :param validate_blueprint: The validate_blueprint of this AmbariV2Request.
          :type: bool
          """
  
          self._validate_blueprint = validate_blueprint
  
      @property
      def validate_repositories(self):
          """
          Gets the validate_repositories of this AmbariV2Request.
          ambari and stack repository validation
  
          :return: The validate_repositories of this AmbariV2Request.
          :rtype: bool
          """
          return self._validate_repositories
  
      @validate_repositories.setter
      def validate_repositories(self, validate_repositories):
          """
          Sets the validate_repositories of this AmbariV2Request.
          ambari and stack repository validation
  
          :param validate_repositories: The validate_repositories of this AmbariV2Request.
          :type: bool
          """
  
          self._validate_repositories = validate_repositories
  
      @property
      def ambari_stack_details(self):
          """
          Gets the ambari_stack_details of this AmbariV2Request.
          details of the Ambari stack
  
          :return: The ambari_stack_details of this AmbariV2Request.
          :rtype: AmbariStackDetails
          """
          return self._ambari_stack_details
  
      @ambari_stack_details.setter
      def ambari_stack_details(self, ambari_stack_details):
          """
          Sets the ambari_stack_details of this AmbariV2Request.
          details of the Ambari stack
  
          :param ambari_stack_details: The ambari_stack_details of this AmbariV2Request.
          :type: AmbariStackDetails
          """
  
          self._ambari_stack_details = ambari_stack_details
  
      @property
      def ambari_repo_details_json(self):
          """
          Gets the ambari_repo_details_json of this AmbariV2Request.
          details of the Ambari package repository
  
          :return: The ambari_repo_details_json of this AmbariV2Request.
          :rtype: AmbariRepoDetails
          """
          return self._ambari_repo_details_json
  
      @ambari_repo_details_json.setter
      def ambari_repo_details_json(self, ambari_repo_details_json):
          """
          Sets the ambari_repo_details_json of this AmbariV2Request.
          details of the Ambari package repository
  
          :param ambari_repo_details_json: The ambari_repo_details_json of this AmbariV2Request.
          :type: AmbariRepoDetails
          """
  
          self._ambari_repo_details_json = ambari_repo_details_json
  
      @property
      def ambari_database_details(self):
          """
          Gets the ambari_database_details of this AmbariV2Request.
          [DEPRECATED] use RdsConfig instead! details of the external Ambari database
  
          :return: The ambari_database_details of this AmbariV2Request.
          :rtype: AmbariDatabaseDetails
          """
          return self._ambari_database_details
  
      @ambari_database_details.setter
      def ambari_database_details(self, ambari_database_details):
          """
          Sets the ambari_database_details of this AmbariV2Request.
          [DEPRECATED] use RdsConfig instead! details of the external Ambari database
  
          :param ambari_database_details: The ambari_database_details of this AmbariV2Request.
          :type: AmbariDatabaseDetails
          """
  
          self._ambari_database_details = ambari_database_details
  
      @property
      def config_strategy(self):
          """
          Gets the config_strategy of this AmbariV2Request.
          config recommendation strategy
  
          :return: The config_strategy of this AmbariV2Request.
          :rtype: str
          """
          return self._config_strategy
  
      @config_strategy.setter
      def config_strategy(self, config_strategy):
          """
          Sets the config_strategy of this AmbariV2Request.
          config recommendation strategy
  
          :param config_strategy: The config_strategy of this AmbariV2Request.
          :type: str
          """
          allowed_values = ["NEVER_APPLY", "ONLY_STACK_DEFAULTS_APPLY", "ALWAYS_APPLY", "ALWAYS_APPLY_DONT_OVERRIDE_CUSTOM_VALUES"]
          if config_strategy not in allowed_values:
              raise ValueError(
                  "Invalid value for `config_strategy` ({0}), must be one of {1}"
                  .format(config_strategy, allowed_values)
              )
  
          self._config_strategy = config_strategy
  
      @property
      def connected_cluster(self):
          """
          Gets the connected_cluster of this AmbariV2Request.
          cluster can connect to a datalake you can define the parameters here
  
          :return: The connected_cluster of this AmbariV2Request.
          :rtype: ConnectedClusterRequest
          """
          return self._connected_cluster
  
      @connected_cluster.setter
      def connected_cluster(self, connected_cluster):
          """
          Sets the connected_cluster of this AmbariV2Request.
          cluster can connect to a datalake you can define the parameters here
  
          :param connected_cluster: The connected_cluster of this AmbariV2Request.
          :type: ConnectedClusterRequest
          """
  
          self._connected_cluster = connected_cluster
  
      @property
      def ambari_security_master_key(self):
          """
          Gets the ambari_security_master_key of this AmbariV2Request.
          a master key for encrypting the passwords in Ambari
  
          :return: The ambari_security_master_key of this AmbariV2Request.
          :rtype: str
          """
          return self._ambari_security_master_key
  
      @ambari_security_master_key.setter
      def ambari_security_master_key(self, ambari_security_master_key):
          """
          Sets the ambari_security_master_key of this AmbariV2Request.
          a master key for encrypting the passwords in Ambari
  
          :param ambari_security_master_key: The ambari_security_master_key of this AmbariV2Request.
          :type: str
          """
          if ambari_security_master_key is not None and len(ambari_security_master_key) > 100:
              raise ValueError("Invalid value for `ambari_security_master_key`, length must be less than or equal to `100`")
          if ambari_security_master_key is not None and len(ambari_security_master_key) < 5:
              raise ValueError("Invalid value for `ambari_security_master_key`, length must be greater than or equal to `5`")
  
          self._ambari_security_master_key = ambari_security_master_key
  
      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, AmbariV2Request):
              return False
  
          return self.__dict__ == other.__dict__
  
      def __ne__(self, other):
          """
          Returns true if both objects are not equal
          """
          return not self == other
  