# 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 ApiRangerReplicationTransformArgs(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 = {
        'ranger_service_names_mapping': 'dict(str, str)',
        'ranger_users_mapping': 'dict(str, str)',
        'ranger_resources_mapping': 'dict(str, str)',
        'hive_urls_mapping': 'dict(str, str)',
        'hdfs_to_adls_args': 'ApiRangerReplicationHdfsToAdlsArgs',
        'hdfs_to_s3_args': 'ApiRangerReplicationHdfsToS3Args',
        'hdfs_to_gcs_args': 'ApiRangerReplicationHdfsToGcsArgs'
    }

    attribute_map = {
        'ranger_service_names_mapping': 'rangerServiceNamesMapping',
        'ranger_users_mapping': 'rangerUsersMapping',
        'ranger_resources_mapping': 'rangerResourcesMapping',
        'hive_urls_mapping': 'hiveUrlsMapping',
        'hdfs_to_adls_args': 'hdfsToAdlsArgs',
        'hdfs_to_s3_args': 'hdfsToS3Args',
        'hdfs_to_gcs_args': 'hdfsToGcsArgs'
    }

    def __init__(self, ranger_service_names_mapping=None, ranger_users_mapping=None, ranger_resources_mapping=None, hive_urls_mapping=None, hdfs_to_adls_args=None, hdfs_to_s3_args=None, hdfs_to_gcs_args=None):  # noqa: E501
        """ApiRangerReplicationTransformArgs - a model defined in Swagger"""  # noqa: E501
        self._ranger_service_names_mapping = None
        self._ranger_users_mapping = None
        self._ranger_resources_mapping = None
        self._hive_urls_mapping = None
        self._hdfs_to_adls_args = None
        self._hdfs_to_s3_args = None
        self._hdfs_to_gcs_args = None
        self.discriminator = None
        if ranger_service_names_mapping is not None:
            self.ranger_service_names_mapping = ranger_service_names_mapping
        if ranger_users_mapping is not None:
            self.ranger_users_mapping = ranger_users_mapping
        if ranger_resources_mapping is not None:
            self.ranger_resources_mapping = ranger_resources_mapping
        if hive_urls_mapping is not None:
            self.hive_urls_mapping = hive_urls_mapping
        if hdfs_to_adls_args is not None:
            self.hdfs_to_adls_args = hdfs_to_adls_args
        if hdfs_to_s3_args is not None:
            self.hdfs_to_s3_args = hdfs_to_s3_args
        if hdfs_to_gcs_args is not None:
            self.hdfs_to_gcs_args = hdfs_to_gcs_args

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

        A mapping between source to destination ranger services. <p> Note that if a mapping is not given for a service then it will stay the same on the destination. <p> Example: {\"cm_hdfs\":\"dr_hdfs\", \"cm_hive\":\"dr_hive\"} <br> Default: empty or null, every service name will stay the same on the destination  # noqa: E501

        :return: The ranger_service_names_mapping of this ApiRangerReplicationTransformArgs.  # noqa: E501
        :rtype: dict(str, str)
        """
        return self._ranger_service_names_mapping

    @ranger_service_names_mapping.setter
    def ranger_service_names_mapping(self, ranger_service_names_mapping):
        """Sets the ranger_service_names_mapping of this ApiRangerReplicationTransformArgs.

        A mapping between source to destination ranger services. <p> Note that if a mapping is not given for a service then it will stay the same on the destination. <p> Example: {\"cm_hdfs\":\"dr_hdfs\", \"cm_hive\":\"dr_hive\"} <br> Default: empty or null, every service name will stay the same on the destination  # noqa: E501

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

        self._ranger_service_names_mapping = ranger_service_names_mapping

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

        A mapping between source to destination ranger usernames. <p> Note that if a mapping is not given for a username then it will stay the same on the destination. <p> Example: {\"testuser1\":\"testuser1@host.com\", \"testuser2\":\"testuser2@host.com\" }<br> Default: empty or null, every username will stay the same on the destination  # noqa: E501

        :return: The ranger_users_mapping of this ApiRangerReplicationTransformArgs.  # noqa: E501
        :rtype: dict(str, str)
        """
        return self._ranger_users_mapping

    @ranger_users_mapping.setter
    def ranger_users_mapping(self, ranger_users_mapping):
        """Sets the ranger_users_mapping of this ApiRangerReplicationTransformArgs.

        A mapping between source to destination ranger usernames. <p> Note that if a mapping is not given for a username then it will stay the same on the destination. <p> Example: {\"testuser1\":\"testuser1@host.com\", \"testuser2\":\"testuser2@host.com\" }<br> Default: empty or null, every username will stay the same on the destination  # noqa: E501

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

        self._ranger_users_mapping = ranger_users_mapping

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

        A mapping between source to destination ranger resources. <p> If a mapping is not given for a resource then it will stay the same on the destination. <p> <b>Example</b>: <br> {\"/srcdir1/srcfile1\": \"/destdir1/destfile1\", \"src_url.com\": \"dest_url.com\", \"source_db\": \"dest_db\", \"source_table\":\"dest_table\"} } <br> Default: empty or null, every resource will remain the same on destination <p> If replication contains <b>HDFS Ranger service type</b> and replication is done from on-prem to cloud, then for transforming HDFS Ranger service policies to Cloud policies <b>NO resource mapping is needed</b>. Instead, provide one of the following: #getHdfsToAdlsArgs(), #getHdfsToS3Args(), #getHdfsToGcsArgs() <p> <b>HIVE prefixed based resource URL replacement is supported</b>, but it should be provided in a <b>different mapping</b>, for more info see #getHiveUrlsMapping().  # noqa: E501

        :return: The ranger_resources_mapping of this ApiRangerReplicationTransformArgs.  # noqa: E501
        :rtype: dict(str, str)
        """
        return self._ranger_resources_mapping

    @ranger_resources_mapping.setter
    def ranger_resources_mapping(self, ranger_resources_mapping):
        """Sets the ranger_resources_mapping of this ApiRangerReplicationTransformArgs.

        A mapping between source to destination ranger resources. <p> If a mapping is not given for a resource then it will stay the same on the destination. <p> <b>Example</b>: <br> {\"/srcdir1/srcfile1\": \"/destdir1/destfile1\", \"src_url.com\": \"dest_url.com\", \"source_db\": \"dest_db\", \"source_table\":\"dest_table\"} } <br> Default: empty or null, every resource will remain the same on destination <p> If replication contains <b>HDFS Ranger service type</b> and replication is done from on-prem to cloud, then for transforming HDFS Ranger service policies to Cloud policies <b>NO resource mapping is needed</b>. Instead, provide one of the following: #getHdfsToAdlsArgs(), #getHdfsToS3Args(), #getHdfsToGcsArgs() <p> <b>HIVE prefixed based resource URL replacement is supported</b>, but it should be provided in a <b>different mapping</b>, for more info see #getHiveUrlsMapping().  # noqa: E501

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

        self._ranger_resources_mapping = ranger_resources_mapping

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

        Used for <b>HIVE prefixed based resource URL replacement</b>. <p> <b>For instance</b>, if Hive resource URLs on <b>source</b> are: <ul> <li>hdfs://namenodehost:8020/user/hive/warehouse/table1</li> <li>hdfs://namenodehost:8020/user/hive/warehouse/table2</li> </ul> and <b>destination is Amazon S3</b>, and the resource mapping contains the following entry: <br> \"hdfs://namenodehost:8020/user/hive/warehouse\": \"s3a://bucket\" <br> then after transformation hive urls will be: <ul> <li>s3a://bucket/table1</li> <li>s3a://bucket/table2</li> </ul> Default: empty or null, every HIVE URL will remain the same on destination.  # noqa: E501

        :return: The hive_urls_mapping of this ApiRangerReplicationTransformArgs.  # noqa: E501
        :rtype: dict(str, str)
        """
        return self._hive_urls_mapping

    @hive_urls_mapping.setter
    def hive_urls_mapping(self, hive_urls_mapping):
        """Sets the hive_urls_mapping of this ApiRangerReplicationTransformArgs.

        Used for <b>HIVE prefixed based resource URL replacement</b>. <p> <b>For instance</b>, if Hive resource URLs on <b>source</b> are: <ul> <li>hdfs://namenodehost:8020/user/hive/warehouse/table1</li> <li>hdfs://namenodehost:8020/user/hive/warehouse/table2</li> </ul> and <b>destination is Amazon S3</b>, and the resource mapping contains the following entry: <br> \"hdfs://namenodehost:8020/user/hive/warehouse\": \"s3a://bucket\" <br> then after transformation hive urls will be: <ul> <li>s3a://bucket/table1</li> <li>s3a://bucket/table2</li> </ul> Default: empty or null, every HIVE URL will remain the same on destination.  # noqa: E501

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

        self._hive_urls_mapping = hive_urls_mapping

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


        :return: The hdfs_to_adls_args of this ApiRangerReplicationTransformArgs.  # noqa: E501
        :rtype: ApiRangerReplicationHdfsToAdlsArgs
        """
        return self._hdfs_to_adls_args

    @hdfs_to_adls_args.setter
    def hdfs_to_adls_args(self, hdfs_to_adls_args):
        """Sets the hdfs_to_adls_args of this ApiRangerReplicationTransformArgs.


        :param hdfs_to_adls_args: The hdfs_to_adls_args of this ApiRangerReplicationTransformArgs.  # noqa: E501
        :type: ApiRangerReplicationHdfsToAdlsArgs
        """

        self._hdfs_to_adls_args = hdfs_to_adls_args

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


        :return: The hdfs_to_s3_args of this ApiRangerReplicationTransformArgs.  # noqa: E501
        :rtype: ApiRangerReplicationHdfsToS3Args
        """
        return self._hdfs_to_s3_args

    @hdfs_to_s3_args.setter
    def hdfs_to_s3_args(self, hdfs_to_s3_args):
        """Sets the hdfs_to_s3_args of this ApiRangerReplicationTransformArgs.


        :param hdfs_to_s3_args: The hdfs_to_s3_args of this ApiRangerReplicationTransformArgs.  # noqa: E501
        :type: ApiRangerReplicationHdfsToS3Args
        """

        self._hdfs_to_s3_args = hdfs_to_s3_args

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


        :return: The hdfs_to_gcs_args of this ApiRangerReplicationTransformArgs.  # noqa: E501
        :rtype: ApiRangerReplicationHdfsToGcsArgs
        """
        return self._hdfs_to_gcs_args

    @hdfs_to_gcs_args.setter
    def hdfs_to_gcs_args(self, hdfs_to_gcs_args):
        """Sets the hdfs_to_gcs_args of this ApiRangerReplicationTransformArgs.


        :param hdfs_to_gcs_args: The hdfs_to_gcs_args of this ApiRangerReplicationTransformArgs.  # noqa: E501
        :type: ApiRangerReplicationHdfsToGcsArgs
        """

        self._hdfs_to_gcs_args = hdfs_to_gcs_args

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

        return self.__dict__ == other.__dict__

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