# 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
from cm_client.models.api_hive_replication_arguments import ApiHiveReplicationArguments  # noqa: F401,E501

class ApiHiveCloudReplicationArguments(ApiHiveReplicationArguments):
    """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 = {
        'export_files_prefix': 'str',
        'source_account': 'str',
        'destination_account': 'str',
        'cloud_root_path': 'str',
        'replication_option': 'ReplicationOption'
    }
    if hasattr(ApiHiveReplicationArguments, "swagger_types"):
        swagger_types.update(ApiHiveReplicationArguments.swagger_types)

    attribute_map = {
        'export_files_prefix': 'exportFilesPrefix',
        'source_account': 'sourceAccount',
        'destination_account': 'destinationAccount',
        'cloud_root_path': 'cloudRootPath',
        'replication_option': 'replicationOption'
    }
    if hasattr(ApiHiveReplicationArguments, "attribute_map"):
        attribute_map.update(ApiHiveReplicationArguments.attribute_map)

    def __init__(self, export_files_prefix=None, source_account=None, destination_account=None, cloud_root_path=None, replication_option=None, *args, **kwargs):  # noqa: E501
        """ApiHiveCloudReplicationArguments - a model defined in Swagger"""  # noqa: E501
        self._export_files_prefix = None
        self._source_account = None
        self._destination_account = None
        self._cloud_root_path = None
        self._replication_option = None
        self.discriminator = None
        if export_files_prefix is not None:
            self.export_files_prefix = export_files_prefix
        if source_account is not None:
            self.source_account = source_account
        if destination_account is not None:
            self.destination_account = destination_account
        if cloud_root_path is not None:
            self.cloud_root_path = cloud_root_path
        if replication_option is not None:
            self.replication_option = replication_option
        ApiHiveReplicationArguments.__init__(self, *args, **kwargs)

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

        When a Hive external cloud replication schedule was executed, then the exported files had the same name under the given cloud root path. Therefore, it was forbidden to concurrently execute multiple Hive external replications with the same cloud root path. <br>  This field is meant to lift this restriction: it contains a prefix name that will be prepended to every export file, by default it is set to a UUID for a replication schedule. <br>  <b>Note that this feature is available only if feature flag HIVE_ALLOW_CONCURRENT_REPLICATION_WITH_SAME_CLOUD_ROOT_PATH is enabled on both source and destination! It's NOT supported for cloud backup only and cloud restore only replications.</b> <br>  For instance if #cloudRootPath == s3a://bucket/warehouse/external/my_db and #exportFilesPrefix == ab58c108, then after a successful replication the following export files will be in the cloud: <ul> <li>s3a://bucket/warehouse/external/my_db/ab58c108export.json</li> <li>s3a://bucket/warehouse/external/my_db/ab58c108.export.json.meta</li> <li>s3a://bucket/warehouse/external/my_db/ab58c108sentry-export.json</li> </ul> In the next replication run the same UUID will be used for a certain schedule as before, so the same export files will be overwritten in the cloud. This way the cloud root path won't be polluted.  # noqa: E501

        :return: The export_files_prefix of this ApiHiveCloudReplicationArguments.  # noqa: E501
        :rtype: str
        """
        return self._export_files_prefix

    @export_files_prefix.setter
    def export_files_prefix(self, export_files_prefix):
        """Sets the export_files_prefix of this ApiHiveCloudReplicationArguments.

        When a Hive external cloud replication schedule was executed, then the exported files had the same name under the given cloud root path. Therefore, it was forbidden to concurrently execute multiple Hive external replications with the same cloud root path. <br>  This field is meant to lift this restriction: it contains a prefix name that will be prepended to every export file, by default it is set to a UUID for a replication schedule. <br>  <b>Note that this feature is available only if feature flag HIVE_ALLOW_CONCURRENT_REPLICATION_WITH_SAME_CLOUD_ROOT_PATH is enabled on both source and destination! It's NOT supported for cloud backup only and cloud restore only replications.</b> <br>  For instance if #cloudRootPath == s3a://bucket/warehouse/external/my_db and #exportFilesPrefix == ab58c108, then after a successful replication the following export files will be in the cloud: <ul> <li>s3a://bucket/warehouse/external/my_db/ab58c108export.json</li> <li>s3a://bucket/warehouse/external/my_db/ab58c108.export.json.meta</li> <li>s3a://bucket/warehouse/external/my_db/ab58c108sentry-export.json</li> </ul> In the next replication run the same UUID will be used for a certain schedule as before, so the same export files will be overwritten in the cloud. This way the cloud root path won't be polluted.  # noqa: E501

        :param export_files_prefix: The export_files_prefix of this ApiHiveCloudReplicationArguments.  # noqa: E501
        :type: str
        """

        self._export_files_prefix = export_files_prefix

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


        :return: The source_account of this ApiHiveCloudReplicationArguments.  # noqa: E501
        :rtype: str
        """
        return self._source_account

    @source_account.setter
    def source_account(self, source_account):
        """Sets the source_account of this ApiHiveCloudReplicationArguments.


        :param source_account: The source_account of this ApiHiveCloudReplicationArguments.  # noqa: E501
        :type: str
        """

        self._source_account = source_account

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


        :return: The destination_account of this ApiHiveCloudReplicationArguments.  # noqa: E501
        :rtype: str
        """
        return self._destination_account

    @destination_account.setter
    def destination_account(self, destination_account):
        """Sets the destination_account of this ApiHiveCloudReplicationArguments.


        :param destination_account: The destination_account of this ApiHiveCloudReplicationArguments.  # noqa: E501
        :type: str
        """

        self._destination_account = destination_account

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


        :return: The cloud_root_path of this ApiHiveCloudReplicationArguments.  # noqa: E501
        :rtype: str
        """
        return self._cloud_root_path

    @cloud_root_path.setter
    def cloud_root_path(self, cloud_root_path):
        """Sets the cloud_root_path of this ApiHiveCloudReplicationArguments.


        :param cloud_root_path: The cloud_root_path of this ApiHiveCloudReplicationArguments.  # noqa: E501
        :type: str
        """

        self._cloud_root_path = cloud_root_path

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


        :return: The replication_option of this ApiHiveCloudReplicationArguments.  # noqa: E501
        :rtype: ReplicationOption
        """
        return self._replication_option

    @replication_option.setter
    def replication_option(self, replication_option):
        """Sets the replication_option of this ApiHiveCloudReplicationArguments.


        :param replication_option: The replication_option of this ApiHiveCloudReplicationArguments.  # noqa: E501
        :type: ReplicationOption
        """

        self._replication_option = replication_option

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

        return self.__dict__ == other.__dict__

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