text: #
  # Copyright (c) 2019 by Delphix. All rights reserved.
  #
  from __future__ import absolute_import
  from datetime import date, datetime
  
  from generated.definitions.base_model_ import (
      Model, GeneratedClassesError, GeneratedClassesTypeError)
  from generated.definitions.linked_source_definition_custom_init_params import LinkedSourceDefinitionCustomInitParams
  import re
  from generated import util
  
  class LinkedSourceDefinition(Model):
      """NOTE: This class is auto generated by the swagger code generator program.
  
      Do not edit the class manually.
      """
  
      def __init__(self, username='', mount_path='', dbid='', custom_init_params_file='', custom_init_params=None, rman_channels=None, dbctrlbkppiece='', password='', instance_name='', dbrmanbkploc='', validate=True):
          """LinkedSourceDefinition - a model defined in Swagger. The type of some of these
          attributes can be defined as a List[ERRORUNKNOWN]. This just means they
          are a list of any type.
  
              :param username: The username of this LinkedSourceDefinition.
              :type username: str
              :param mount_path: The mount_path of this LinkedSourceDefinition.
              :type mount_path: str
              :param dbid: The dbid of this LinkedSourceDefinition.
              :type dbid: str
              :param custom_init_params_file: The custom_init_params_file of this LinkedSourceDefinition.
              :type custom_init_params_file: str
              :param custom_init_params: The custom_init_params of this LinkedSourceDefinition.
              :type custom_init_params: List[LinkedSourceDefinitionCustomInitParams]
              :param rman_channels: The rman_channels of this LinkedSourceDefinition.
              :type rman_channels: int
              :param dbctrlbkppiece: The dbctrlbkppiece of this LinkedSourceDefinition.
              :type dbctrlbkppiece: str
              :param password: The password of this LinkedSourceDefinition.
              :type password: str
              :param instance_name: The instance_name of this LinkedSourceDefinition.
              :type instance_name: str
              :param dbrmanbkploc: The dbrmanbkploc of this LinkedSourceDefinition.
              :type dbrmanbkploc: str
              :param validate: If the validation should be done during init. This
              should only be called internally when calling from_dict.
              :type validate: bool
          """
          self.swagger_types = {
              'username': str,
              'mount_path': str,
              'dbid': str,
              'custom_init_params_file': str,
              'custom_init_params': util.convert_type('List[LinkedSourceDefinitionCustomInitParams]'),
              'rman_channels': int,
              'dbctrlbkppiece': str,
              'password': str,
              'instance_name': str,
              'dbrmanbkploc': str
          }
  
          self.attribute_map = {
              'username': 'username',
              'mount_path': 'mountPath',
              'dbid': 'dbid',
              'custom_init_params_file': 'customInitParamsFile',
              'custom_init_params': 'customInitParams',
              'rman_channels': 'rmanChannels',
              'dbctrlbkppiece': 'dbctrlbkppiece',
              'password': 'password',
              'instance_name': 'instanceName',
              'dbrmanbkploc': 'dbrmanbkploc'
          }
          
          # Validating the attribute username and then saving it.
          if validate and username is None:
              raise GeneratedClassesError(
                  "The required parameter 'username' must not be 'None'.")
          type_error = GeneratedClassesTypeError.type_error(LinkedSourceDefinition,
                                                            'username',
                                                            username,
                                                            str,
                                                            True)
          if validate and type_error:
              raise type_error
          self._username = username
  
          # Validating the attribute mount_path and then saving it.
          if validate and mount_path is None:
              raise GeneratedClassesError(
                  "The required parameter 'mount_path' must not be 'None'.")
          type_error = GeneratedClassesTypeError.type_error(LinkedSourceDefinition,
                                                            'mount_path',
                                                            mount_path,
                                                            str,
                                                            True)
          if validate and type_error:
              raise type_error
          self._mount_path = mount_path
  
          # Validating the attribute dbid and then saving it.
          if validate and dbid is None:
              raise GeneratedClassesError(
                  "The required parameter 'dbid' must not be 'None'.")
          type_error = GeneratedClassesTypeError.type_error(LinkedSourceDefinition,
                                                            'dbid',
                                                            dbid,
                                                            str,
                                                            True)
          if validate and type_error:
              raise type_error
          if (dbid is not None
                  and not re.search('^$|^[0-9]*$', dbid)):
              raise GeneratedClassesError(
                  "Invalid value for 'dbid', was '{}' but must follow the"
                  " pattern '^$|^[0-9]*$'.".format(dbid))
          self._dbid = dbid
  
          # Validating the attribute custom_init_params_file and then saving it.
          type_error = GeneratedClassesTypeError.type_error(LinkedSourceDefinition,
                                                            'custom_init_params_file',
                                                            custom_init_params_file,
                                                            str,
                                                            False)
          if validate and type_error:
              raise type_error
          self._custom_init_params_file = custom_init_params_file
  
          # Validating the attribute custom_init_params and then saving it.
          expected_type = util.convert_type('List[LinkedSourceDefinitionCustomInitParams]')
          element_type = util.get_contained_type('List[LinkedSourceDefinitionCustomInitParams]')
          type_error = GeneratedClassesTypeError.type_error(LinkedSourceDefinition,
                                                            'custom_init_params',
                                                            custom_init_params,
                                                            expected_type,
                                                            False,
                                                            element_type)
          if validate and type_error:
              raise type_error
          self._custom_init_params = custom_init_params
  
          # Validating the attribute rman_channels and then saving it.
          type_error = GeneratedClassesTypeError.type_error(LinkedSourceDefinition,
                                                            'rman_channels',
                                                            rman_channels,
                                                            int,
                                                            False)
          if validate and type_error:
              raise type_error
          self._rman_channels = rman_channels
  
          # Validating the attribute dbctrlbkppiece and then saving it.
          if validate and dbctrlbkppiece is None:
              raise GeneratedClassesError(
                  "The required parameter 'dbctrlbkppiece' must not be 'None'.")
          type_error = GeneratedClassesTypeError.type_error(LinkedSourceDefinition,
                                                            'dbctrlbkppiece',
                                                            dbctrlbkppiece,
                                                            str,
                                                            True)
          if validate and type_error:
              raise type_error
          if (dbctrlbkppiece is not None
                  and not re.search('^$|^[^\\s]*$', dbctrlbkppiece)):
              raise GeneratedClassesError(
                  "Invalid value for 'dbctrlbkppiece', was '{}' but must follow the"
                  " pattern '^$|^[^\\s]*$'.".format(dbctrlbkppiece))
          self._dbctrlbkppiece = dbctrlbkppiece
  
          # Validating the attribute password and then saving it.
          if validate and password is None:
              raise GeneratedClassesError(
                  "The required parameter 'password' must not be 'None'.")
          type_error = GeneratedClassesTypeError.type_error(LinkedSourceDefinition,
                                                            'password',
                                                            password,
                                                            str,
                                                            True)
          if validate and type_error:
              raise type_error
          self._password = password
  
          # Validating the attribute instance_name and then saving it.
          if validate and instance_name is None:
              raise GeneratedClassesError(
                  "The required parameter 'instance_name' must not be 'None'.")
          type_error = GeneratedClassesTypeError.type_error(LinkedSourceDefinition,
                                                            'instance_name',
                                                            instance_name,
                                                            str,
                                                            True)
          if validate and type_error:
              raise type_error
          self._instance_name = instance_name
  
          # Validating the attribute dbrmanbkploc and then saving it.
          if validate and dbrmanbkploc is None:
              raise GeneratedClassesError(
                  "The required parameter 'dbrmanbkploc' must not be 'None'.")
          type_error = GeneratedClassesTypeError.type_error(LinkedSourceDefinition,
                                                            'dbrmanbkploc',
                                                            dbrmanbkploc,
                                                            str,
                                                            True)
          if validate and type_error:
              raise type_error
          if (dbrmanbkploc is not None
                  and not re.search('^$|^[^\\s]*$', dbrmanbkploc)):
              raise GeneratedClassesError(
                  "Invalid value for 'dbrmanbkploc', was '{}' but must follow the"
                  " pattern '^$|^[^\\s]*$'.".format(dbrmanbkploc))
          self._dbrmanbkploc = dbrmanbkploc
      @classmethod
      def from_dict(cls, dikt):
          """Returns the dict as a model
  
          :param dikt: A dict.
          :type: dict
          :return: The linkedSourceDefinition of this LinkedSourceDefinition.
          :rtype: LinkedSourceDefinition
          """
          return util.deserialize_model(dikt, cls)
  
      @property
      def username(self):
          """Gets the username of this LinkedSourceDefinition.
  
          Oracle User Name
  
          :return: The username of this LinkedSourceDefinition.
          :rtype: str
          """
          return self._username
  
      @username.setter
      def username(self, username):
          """Sets the username of this LinkedSourceDefinition.
  
          Oracle User Name
  
          :param username: The username of this LinkedSourceDefinition.
          :type username: str
          """
          # Validating the attribute username and then saving it.
          if username is None:
              raise GeneratedClassesError(
                  "The required parameter 'username' must not be 'None'.")
          type_error = GeneratedClassesTypeError.type_error(LinkedSourceDefinition,
                                                            'username',
                                                            username,
                                                            str,
                                                            True)
          if type_error:
              raise type_error
          self._username = username
  
      @property
      def mount_path(self):
          """Gets the mount_path of this LinkedSourceDefinition.
  
          Where to mount storage onto the staging host while syncing
  
          :return: The mount_path of this LinkedSourceDefinition.
          :rtype: str
          """
          return self._mount_path
  
      @mount_path.setter
      def mount_path(self, mount_path):
          """Sets the mount_path of this LinkedSourceDefinition.
  
          Where to mount storage onto the staging host while syncing
  
          :param mount_path: The mount_path of this LinkedSourceDefinition.
          :type mount_path: str
          """
          # Validating the attribute mount_path and then saving it.
          if mount_path is None:
              raise GeneratedClassesError(
                  "The required parameter 'mount_path' must not be 'None'.")
          type_error = GeneratedClassesTypeError.type_error(LinkedSourceDefinition,
                                                            'mount_path',
                                                            mount_path,
                                                            str,
                                                            True)
          if type_error:
              raise type_error
          self._mount_path = mount_path
  
      @property
      def dbid(self):
          """Gets the dbid of this LinkedSourceDefinition.
  
          
  
          :return: The dbid of this LinkedSourceDefinition.
          :rtype: str
          """
          return self._dbid
  
      @dbid.setter
      def dbid(self, dbid):
          """Sets the dbid of this LinkedSourceDefinition.
  
          
  
          :param dbid: The dbid of this LinkedSourceDefinition.
          :type dbid: str
          """
          # Validating the attribute dbid and then saving it.
          if dbid is None:
              raise GeneratedClassesError(
                  "The required parameter 'dbid' must not be 'None'.")
          type_error = GeneratedClassesTypeError.type_error(LinkedSourceDefinition,
                                                            'dbid',
                                                            dbid,
                                                            str,
                                                            True)
          if type_error:
              raise type_error
          if (dbid is not None
                  and not re.search('^$|^[0-9]*$', dbid)):
              raise GeneratedClassesError(
                  "Invalid value for 'dbid', was '{}' but must follow the"
                  " pattern '^$|^[0-9]*$'.".format(dbid))
          self._dbid = dbid
  
      @property
      def custom_init_params_file(self):
          """Gets the custom_init_params_file of this LinkedSourceDefinition.
  
          Each line in file, parameter=value
  
          :return: The custom_init_params_file of this LinkedSourceDefinition.
          :rtype: str
          """
          return self._custom_init_params_file
  
      @custom_init_params_file.setter
      def custom_init_params_file(self, custom_init_params_file):
          """Sets the custom_init_params_file of this LinkedSourceDefinition.
  
          Each line in file, parameter=value
  
          :param custom_init_params_file: The custom_init_params_file of this LinkedSourceDefinition.
          :type custom_init_params_file: str
          """
          # Validating the attribute custom_init_params_file and then saving it.
          type_error = GeneratedClassesTypeError.type_error(LinkedSourceDefinition,
                                                            'custom_init_params_file',
                                                            custom_init_params_file,
                                                            str,
                                                            False)
          if type_error:
              raise type_error
          self._custom_init_params_file = custom_init_params_file
  
      @property
      def custom_init_params(self):
          """Gets the custom_init_params of this LinkedSourceDefinition.
  
          
  
          :return: The custom_init_params of this LinkedSourceDefinition.
          :rtype: List[LinkedSourceDefinitionCustomInitParams]
          """
          return self._custom_init_params
  
      @custom_init_params.setter
      def custom_init_params(self, custom_init_params):
          """Sets the custom_init_params of this LinkedSourceDefinition.
  
          
  
          :param custom_init_params: The custom_init_params of this LinkedSourceDefinition.
          :type custom_init_params: List[LinkedSourceDefinitionCustomInitParams]
          """
          # Validating the attribute custom_init_params and then saving it.
          expected_type = util.convert_type('List[LinkedSourceDefinitionCustomInitParams]')
          element_type = util.get_contained_type('List[LinkedSourceDefinitionCustomInitParams]')
          type_error = GeneratedClassesTypeError.type_error(LinkedSourceDefinition,
                                                            'custom_init_params',
                                                            custom_init_params,
                                                            expected_type,
                                                            False,
                                                            element_type)
          if type_error:
              raise type_error
          self._custom_init_params = custom_init_params
  
      @property
      def rman_channels(self):
          """Gets the rman_channels of this LinkedSourceDefinition.
  
          RMAN channels for restore
  
          :return: The rman_channels of this LinkedSourceDefinition.
          :rtype: int
          """
          return self._rman_channels
  
      @rman_channels.setter
      def rman_channels(self, rman_channels):
          """Sets the rman_channels of this LinkedSourceDefinition.
  
          RMAN channels for restore
  
          :param rman_channels: The rman_channels of this LinkedSourceDefinition.
          :type rman_channels: int
          """
          # Validating the attribute rman_channels and then saving it.
          type_error = GeneratedClassesTypeError.type_error(LinkedSourceDefinition,
                                                            'rman_channels',
                                                            rman_channels,
                                                            int,
                                                            False)
          if type_error:
              raise type_error
          self._rman_channels = rman_channels
  
      @property
      def dbctrlbkppiece(self):
          """Gets the dbctrlbkppiece of this LinkedSourceDefinition.
  
          
  
          :return: The dbctrlbkppiece of this LinkedSourceDefinition.
          :rtype: str
          """
          return self._dbctrlbkppiece
  
      @dbctrlbkppiece.setter
      def dbctrlbkppiece(self, dbctrlbkppiece):
          """Sets the dbctrlbkppiece of this LinkedSourceDefinition.
  
          
  
          :param dbctrlbkppiece: The dbctrlbkppiece of this LinkedSourceDefinition.
          :type dbctrlbkppiece: str
          """
          # Validating the attribute dbctrlbkppiece and then saving it.
          if dbctrlbkppiece is None:
              raise GeneratedClassesError(
                  "The required parameter 'dbctrlbkppiece' must not be 'None'.")
          type_error = GeneratedClassesTypeError.type_error(LinkedSourceDefinition,
                                                            'dbctrlbkppiece',
                                                            dbctrlbkppiece,
                                                            str,
                                                            True)
          if type_error:
              raise type_error
          if (dbctrlbkppiece is not None
                  and not re.search('^$|^[^\\s]*$', dbctrlbkppiece)):
              raise GeneratedClassesError(
                  "Invalid value for 'dbctrlbkppiece', was '{}' but must follow the"
                  " pattern '^$|^[^\\s]*$'.".format(dbctrlbkppiece))
          self._dbctrlbkppiece = dbctrlbkppiece
  
      @property
      def password(self):
          """Gets the password of this LinkedSourceDefinition.
  
          Oracle User Password
  
          :return: The password of this LinkedSourceDefinition.
          :rtype: str
          """
          return self._password
  
      @password.setter
      def password(self, password):
          """Sets the password of this LinkedSourceDefinition.
  
          Oracle User Password
  
          :param password: The password of this LinkedSourceDefinition.
          :type password: str
          """
          # Validating the attribute password and then saving it.
          if password is None:
              raise GeneratedClassesError(
                  "The required parameter 'password' must not be 'None'.")
          type_error = GeneratedClassesTypeError.type_error(LinkedSourceDefinition,
                                                            'password',
                                                            password,
                                                            str,
                                                            True)
          if type_error:
              raise type_error
          self._password = password
  
      @property
      def instance_name(self):
          """Gets the instance_name of this LinkedSourceDefinition.
  
          Staging Instance Name
  
          :return: The instance_name of this LinkedSourceDefinition.
          :rtype: str
          """
          return self._instance_name
  
      @instance_name.setter
      def instance_name(self, instance_name):
          """Sets the instance_name of this LinkedSourceDefinition.
  
          Staging Instance Name
  
          :param instance_name: The instance_name of this LinkedSourceDefinition.
          :type instance_name: str
          """
          # Validating the attribute instance_name and then saving it.
          if instance_name is None:
              raise GeneratedClassesError(
                  "The required parameter 'instance_name' must not be 'None'.")
          type_error = GeneratedClassesTypeError.type_error(LinkedSourceDefinition,
                                                            'instance_name',
                                                            instance_name,
                                                            str,
                                                            True)
          if type_error:
              raise type_error
          self._instance_name = instance_name
  
      @property
      def dbrmanbkploc(self):
          """Gets the dbrmanbkploc of this LinkedSourceDefinition.
  
          Backup Location with no ending \\
  
          :return: The dbrmanbkploc of this LinkedSourceDefinition.
          :rtype: str
          """
          return self._dbrmanbkploc
  
      @dbrmanbkploc.setter
      def dbrmanbkploc(self, dbrmanbkploc):
          """Sets the dbrmanbkploc of this LinkedSourceDefinition.
  
          Backup Location with no ending \\
  
          :param dbrmanbkploc: The dbrmanbkploc of this LinkedSourceDefinition.
          :type dbrmanbkploc: str
          """
          # Validating the attribute dbrmanbkploc and then saving it.
          if dbrmanbkploc is None:
              raise GeneratedClassesError(
                  "The required parameter 'dbrmanbkploc' must not be 'None'.")
          type_error = GeneratedClassesTypeError.type_error(LinkedSourceDefinition,
                                                            'dbrmanbkploc',
                                                            dbrmanbkploc,
                                                            str,
                                                            True)
          if type_error:
              raise type_error
          if (dbrmanbkploc is not None
                  and not re.search('^$|^[^\\s]*$', dbrmanbkploc)):
              raise GeneratedClassesError(
                  "Invalid value for 'dbrmanbkploc', was '{}' but must follow the"
                  " pattern '^$|^[^\\s]*$'.".format(dbrmanbkploc))
          self._dbrmanbkploc = dbrmanbkploc
  