# coding: utf-8

"""
    Cloudera Manager API

    <h1>Cloudera Manager API v57</h1>       <p>Introduced in Cloudera Manager 7.13.1</p>       <p><a href=\"http://www.cloudera.com/documentation.html\">Cloudera Product Documentation</a></p>  # noqa: E501

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

import pprint
import re  # noqa: F401

import six

class ApiHiveReplicationArguments(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 = {
        'source_service': 'ApiServiceRef',
        'table_filters': 'list[ApiHiveTable]',
        'export_dir': 'str',
        'force': 'bool',
        'replicate_data': 'bool',
        'hdfs_arguments': 'ApiHdfsReplicationArguments',
        'replicate_impala_metadata': 'bool',
        'run_invalidate_metadata': 'bool',
        'dry_run': 'bool',
        'num_threads': 'int',
        'sentry_migration': 'bool',
        'skip_url_permissions': 'bool',
        'atlas_replication_needed': 'bool',
        'sentry_export_properties': 'dict(str, str)',
        'ranger_import_properties': 'dict(str, str)'
    }

    attribute_map = {
        'source_service': 'sourceService',
        'table_filters': 'tableFilters',
        'export_dir': 'exportDir',
        'force': 'force',
        'replicate_data': 'replicateData',
        'hdfs_arguments': 'hdfsArguments',
        'replicate_impala_metadata': 'replicateImpalaMetadata',
        'run_invalidate_metadata': 'runInvalidateMetadata',
        'dry_run': 'dryRun',
        'num_threads': 'numThreads',
        'sentry_migration': 'sentryMigration',
        'skip_url_permissions': 'skipUrlPermissions',
        'atlas_replication_needed': 'atlasReplicationNeeded',
        'sentry_export_properties': 'sentryExportProperties',
        'ranger_import_properties': 'rangerImportProperties'
    }

    def __init__(self, source_service=None, table_filters=None, export_dir=None, force=None, replicate_data=None, hdfs_arguments=None, replicate_impala_metadata=None, run_invalidate_metadata=None, dry_run=None, num_threads=None, sentry_migration=None, skip_url_permissions=None, atlas_replication_needed=None, sentry_export_properties=None, ranger_import_properties=None):  # noqa: E501
        """ApiHiveReplicationArguments - a model defined in Swagger"""  # noqa: E501
        self._source_service = None
        self._table_filters = None
        self._export_dir = None
        self._force = None
        self._replicate_data = None
        self._hdfs_arguments = None
        self._replicate_impala_metadata = None
        self._run_invalidate_metadata = None
        self._dry_run = None
        self._num_threads = None
        self._sentry_migration = None
        self._skip_url_permissions = None
        self._atlas_replication_needed = None
        self._sentry_export_properties = None
        self._ranger_import_properties = None
        self.discriminator = None
        if source_service is not None:
            self.source_service = source_service
        if table_filters is not None:
            self.table_filters = table_filters
        if export_dir is not None:
            self.export_dir = export_dir
        if force is not None:
            self.force = force
        if replicate_data is not None:
            self.replicate_data = replicate_data
        if hdfs_arguments is not None:
            self.hdfs_arguments = hdfs_arguments
        if replicate_impala_metadata is not None:
            self.replicate_impala_metadata = replicate_impala_metadata
        if run_invalidate_metadata is not None:
            self.run_invalidate_metadata = run_invalidate_metadata
        if dry_run is not None:
            self.dry_run = dry_run
        if num_threads is not None:
            self.num_threads = num_threads
        self.sentry_migration = sentry_migration
        self.skip_url_permissions = skip_url_permissions
        if atlas_replication_needed is not None:
            self.atlas_replication_needed = atlas_replication_needed
        if sentry_export_properties is not None:
            self.sentry_export_properties = sentry_export_properties
        if ranger_import_properties is not None:
            self.ranger_import_properties = ranger_import_properties

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


        :return: The source_service of this ApiHiveReplicationArguments.  # noqa: E501
        :rtype: ApiServiceRef
        """
        return self._source_service

    @source_service.setter
    def source_service(self, source_service):
        """Sets the source_service of this ApiHiveReplicationArguments.


        :param source_service: The source_service of this ApiHiveReplicationArguments.  # noqa: E501
        :type: ApiServiceRef
        """

        self._source_service = source_service

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

        Filters for tables to include in the replication. Optional. If not provided, include all tables in all databases.  # noqa: E501

        :return: The table_filters of this ApiHiveReplicationArguments.  # noqa: E501
        :rtype: list[ApiHiveTable]
        """
        return self._table_filters

    @table_filters.setter
    def table_filters(self, table_filters):
        """Sets the table_filters of this ApiHiveReplicationArguments.

        Filters for tables to include in the replication. Optional. If not provided, include all tables in all databases.  # noqa: E501

        :param table_filters: The table_filters of this ApiHiveReplicationArguments.  # noqa: E501
        :type: list[ApiHiveTable]
        """

        self._table_filters = table_filters

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

        Directory, in the HDFS service where the target Hive service's data is stored, where the export file will be saved. Optional. If not provided, Cloudera Manager will pick a directory for storing the data.  # noqa: E501

        :return: The export_dir of this ApiHiveReplicationArguments.  # noqa: E501
        :rtype: str
        """
        return self._export_dir

    @export_dir.setter
    def export_dir(self, export_dir):
        """Sets the export_dir of this ApiHiveReplicationArguments.

        Directory, in the HDFS service where the target Hive service's data is stored, where the export file will be saved. Optional. If not provided, Cloudera Manager will pick a directory for storing the data.  # noqa: E501

        :param export_dir: The export_dir of this ApiHiveReplicationArguments.  # noqa: E501
        :type: str
        """

        self._export_dir = export_dir

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

        Whether to force overwriting of mismatched tables. Defaults to false.  # noqa: E501

        :return: The force of this ApiHiveReplicationArguments.  # noqa: E501
        :rtype: bool
        """
        return self._force

    @force.setter
    def force(self, force):
        """Sets the force of this ApiHiveReplicationArguments.

        Whether to force overwriting of mismatched tables. Defaults to false.  # noqa: E501

        :param force: The force of this ApiHiveReplicationArguments.  # noqa: E501
        :type: bool
        """

        self._force = force

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

        Whether to replicate table data stored in HDFS. Defaults to false. <p/> If set, the \"hdfsArguments\" property must be set to configure the HDFS replication job.  # noqa: E501

        :return: The replicate_data of this ApiHiveReplicationArguments.  # noqa: E501
        :rtype: bool
        """
        return self._replicate_data

    @replicate_data.setter
    def replicate_data(self, replicate_data):
        """Sets the replicate_data of this ApiHiveReplicationArguments.

        Whether to replicate table data stored in HDFS. Defaults to false. <p/> If set, the \"hdfsArguments\" property must be set to configure the HDFS replication job.  # noqa: E501

        :param replicate_data: The replicate_data of this ApiHiveReplicationArguments.  # noqa: E501
        :type: bool
        """

        self._replicate_data = replicate_data

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


        :return: The hdfs_arguments of this ApiHiveReplicationArguments.  # noqa: E501
        :rtype: ApiHdfsReplicationArguments
        """
        return self._hdfs_arguments

    @hdfs_arguments.setter
    def hdfs_arguments(self, hdfs_arguments):
        """Sets the hdfs_arguments of this ApiHiveReplicationArguments.


        :param hdfs_arguments: The hdfs_arguments of this ApiHiveReplicationArguments.  # noqa: E501
        :type: ApiHdfsReplicationArguments
        """

        self._hdfs_arguments = hdfs_arguments

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

        Whether to replicate the impala metadata. (i.e. the metadata for impala UDFs and their corresponding binaries in HDFS).  # noqa: E501

        :return: The replicate_impala_metadata of this ApiHiveReplicationArguments.  # noqa: E501
        :rtype: bool
        """
        return self._replicate_impala_metadata

    @replicate_impala_metadata.setter
    def replicate_impala_metadata(self, replicate_impala_metadata):
        """Sets the replicate_impala_metadata of this ApiHiveReplicationArguments.

        Whether to replicate the impala metadata. (i.e. the metadata for impala UDFs and their corresponding binaries in HDFS).  # noqa: E501

        :param replicate_impala_metadata: The replicate_impala_metadata of this ApiHiveReplicationArguments.  # noqa: E501
        :type: bool
        """

        self._replicate_impala_metadata = replicate_impala_metadata

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

        Whether to run invalidate metadata query or not  # noqa: E501

        :return: The run_invalidate_metadata of this ApiHiveReplicationArguments.  # noqa: E501
        :rtype: bool
        """
        return self._run_invalidate_metadata

    @run_invalidate_metadata.setter
    def run_invalidate_metadata(self, run_invalidate_metadata):
        """Sets the run_invalidate_metadata of this ApiHiveReplicationArguments.

        Whether to run invalidate metadata query or not  # noqa: E501

        :param run_invalidate_metadata: The run_invalidate_metadata of this ApiHiveReplicationArguments.  # noqa: E501
        :type: bool
        """

        self._run_invalidate_metadata = run_invalidate_metadata

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

        Whether to perform a dry run. Defaults to false  # noqa: E501

        :return: The dry_run of this ApiHiveReplicationArguments.  # noqa: E501
        :rtype: bool
        """
        return self._dry_run

    @dry_run.setter
    def dry_run(self, dry_run):
        """Sets the dry_run of this ApiHiveReplicationArguments.

        Whether to perform a dry run. Defaults to false  # noqa: E501

        :param dry_run: The dry_run of this ApiHiveReplicationArguments.  # noqa: E501
        :type: bool
        """

        self._dry_run = dry_run

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

        Number of threads to use in multi-threaded export/import phase  # noqa: E501

        :return: The num_threads of this ApiHiveReplicationArguments.  # noqa: E501
        :rtype: int
        """
        return self._num_threads

    @num_threads.setter
    def num_threads(self, num_threads):
        """Sets the num_threads of this ApiHiveReplicationArguments.

        Number of threads to use in multi-threaded export/import phase  # noqa: E501

        :param num_threads: The num_threads of this ApiHiveReplicationArguments.  # noqa: E501
        :type: int
        """

        self._num_threads = num_threads

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


        :return: The sentry_migration of this ApiHiveReplicationArguments.  # noqa: E501
        :rtype: bool
        """
        return self._sentry_migration

    @sentry_migration.setter
    def sentry_migration(self, sentry_migration):
        """Sets the sentry_migration of this ApiHiveReplicationArguments.


        :param sentry_migration: The sentry_migration of this ApiHiveReplicationArguments.  # noqa: E501
        :type: bool
        """
        if sentry_migration is None:
            raise ValueError("Invalid value for `sentry_migration`, must not be `None`")  # noqa: E501

        self._sentry_migration = sentry_migration

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

        Is skipUrlPermissions on.  # noqa: E501

        :return: The skip_url_permissions of this ApiHiveReplicationArguments.  # noqa: E501
        :rtype: bool
        """
        return self._skip_url_permissions

    @skip_url_permissions.setter
    def skip_url_permissions(self, skip_url_permissions):
        """Sets the skip_url_permissions of this ApiHiveReplicationArguments.

        Is skipUrlPermissions on.  # noqa: E501

        :param skip_url_permissions: The skip_url_permissions of this ApiHiveReplicationArguments.  # noqa: E501
        :type: bool
        """
        if skip_url_permissions is None:
            raise ValueError("Invalid value for `skip_url_permissions`, must not be `None`")  # noqa: E501

        self._skip_url_permissions = skip_url_permissions

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


        :return: The atlas_replication_needed of this ApiHiveReplicationArguments.  # noqa: E501
        :rtype: bool
        """
        return self._atlas_replication_needed

    @atlas_replication_needed.setter
    def atlas_replication_needed(self, atlas_replication_needed):
        """Sets the atlas_replication_needed of this ApiHiveReplicationArguments.


        :param atlas_replication_needed: The atlas_replication_needed of this ApiHiveReplicationArguments.  # noqa: E501
        :type: bool
        """

        self._atlas_replication_needed = atlas_replication_needed

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

        Additional properties to add or override in authorization-migration-site.xml for Sentry export, on the source.  # noqa: E501

        :return: The sentry_export_properties of this ApiHiveReplicationArguments.  # noqa: E501
        :rtype: dict(str, str)
        """
        return self._sentry_export_properties

    @sentry_export_properties.setter
    def sentry_export_properties(self, sentry_export_properties):
        """Sets the sentry_export_properties of this ApiHiveReplicationArguments.

        Additional properties to add or override in authorization-migration-site.xml for Sentry export, on the source.  # noqa: E501

        :param sentry_export_properties: The sentry_export_properties of this ApiHiveReplicationArguments.  # noqa: E501
        :type: dict(str, str)
        """

        self._sentry_export_properties = sentry_export_properties

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

        Additional properties to add or override in authorization-migration-site.xml for Ranger import, on the destination.  # noqa: E501

        :return: The ranger_import_properties of this ApiHiveReplicationArguments.  # noqa: E501
        :rtype: dict(str, str)
        """
        return self._ranger_import_properties

    @ranger_import_properties.setter
    def ranger_import_properties(self, ranger_import_properties):
        """Sets the ranger_import_properties of this ApiHiveReplicationArguments.

        Additional properties to add or override in authorization-migration-site.xml for Ranger import, on the destination.  # noqa: E501

        :param ranger_import_properties: The ranger_import_properties of this ApiHiveReplicationArguments.  # noqa: E501
        :type: dict(str, str)
        """

        self._ranger_import_properties = ranger_import_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
        if issubclass(ApiHiveReplicationArguments, 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, ApiHiveReplicationArguments):
            return False

        return self.__dict__ == other.__dict__

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