# coding: utf-8

"""
    cloudidentity

    No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)  # noqa: E501

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


import pprint
import re  # noqa: F401

import six

from volcenginesdkcore.configuration import Configuration


class CreateUserProvisioningRequest(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 = {
        'deletion_strategy': 'str',
        'description': 'str',
        'duplication_strategy': 'str',
        'duplication_suffix': 'str',
        'identity_source_strategy': 'str',
        'principal_id': 'str',
        'principal_type': 'str',
        'target_id': 'str'
    }

    attribute_map = {
        'deletion_strategy': 'DeletionStrategy',
        'description': 'Description',
        'duplication_strategy': 'DuplicationStrategy',
        'duplication_suffix': 'DuplicationSuffix',
        'identity_source_strategy': 'IdentitySourceStrategy',
        'principal_id': 'PrincipalId',
        'principal_type': 'PrincipalType',
        'target_id': 'TargetId'
    }

    def __init__(self, deletion_strategy=None, description=None, duplication_strategy=None, duplication_suffix=None, identity_source_strategy=None, principal_id=None, principal_type=None, target_id=None, _configuration=None):  # noqa: E501
        """CreateUserProvisioningRequest - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._deletion_strategy = None
        self._description = None
        self._duplication_strategy = None
        self._duplication_suffix = None
        self._identity_source_strategy = None
        self._principal_id = None
        self._principal_type = None
        self._target_id = None
        self.discriminator = None

        self.deletion_strategy = deletion_strategy
        if description is not None:
            self.description = description
        self.duplication_strategy = duplication_strategy
        if duplication_suffix is not None:
            self.duplication_suffix = duplication_suffix
        self.identity_source_strategy = identity_source_strategy
        self.principal_id = principal_id
        self.principal_type = principal_type
        self.target_id = target_id

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


        :return: The deletion_strategy of this CreateUserProvisioningRequest.  # noqa: E501
        :rtype: str
        """
        return self._deletion_strategy

    @deletion_strategy.setter
    def deletion_strategy(self, deletion_strategy):
        """Sets the deletion_strategy of this CreateUserProvisioningRequest.


        :param deletion_strategy: The deletion_strategy of this CreateUserProvisioningRequest.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and deletion_strategy is None:
            raise ValueError("Invalid value for `deletion_strategy`, must not be `None`")  # noqa: E501
        allowed_values = ["Keep", "Delete"]  # noqa: E501
        if (self._configuration.client_side_validation and
                deletion_strategy not in allowed_values):
            raise ValueError(
                "Invalid value for `deletion_strategy` ({0}), must be one of {1}"  # noqa: E501
                .format(deletion_strategy, allowed_values)
            )

        self._deletion_strategy = deletion_strategy

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


        :return: The description of this CreateUserProvisioningRequest.  # noqa: E501
        :rtype: str
        """
        return self._description

    @description.setter
    def description(self, description):
        """Sets the description of this CreateUserProvisioningRequest.


        :param description: The description of this CreateUserProvisioningRequest.  # noqa: E501
        :type: str
        """

        self._description = description

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


        :return: The duplication_strategy of this CreateUserProvisioningRequest.  # noqa: E501
        :rtype: str
        """
        return self._duplication_strategy

    @duplication_strategy.setter
    def duplication_strategy(self, duplication_strategy):
        """Sets the duplication_strategy of this CreateUserProvisioningRequest.


        :param duplication_strategy: The duplication_strategy of this CreateUserProvisioningRequest.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and duplication_strategy is None:
            raise ValueError("Invalid value for `duplication_strategy`, must not be `None`")  # noqa: E501
        allowed_values = ["KeepBoth", "Takeover"]  # noqa: E501
        if (self._configuration.client_side_validation and
                duplication_strategy not in allowed_values):
            raise ValueError(
                "Invalid value for `duplication_strategy` ({0}), must be one of {1}"  # noqa: E501
                .format(duplication_strategy, allowed_values)
            )

        self._duplication_strategy = duplication_strategy

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


        :return: The duplication_suffix of this CreateUserProvisioningRequest.  # noqa: E501
        :rtype: str
        """
        return self._duplication_suffix

    @duplication_suffix.setter
    def duplication_suffix(self, duplication_suffix):
        """Sets the duplication_suffix of this CreateUserProvisioningRequest.


        :param duplication_suffix: The duplication_suffix of this CreateUserProvisioningRequest.  # noqa: E501
        :type: str
        """

        self._duplication_suffix = duplication_suffix

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


        :return: The identity_source_strategy of this CreateUserProvisioningRequest.  # noqa: E501
        :rtype: str
        """
        return self._identity_source_strategy

    @identity_source_strategy.setter
    def identity_source_strategy(self, identity_source_strategy):
        """Sets the identity_source_strategy of this CreateUserProvisioningRequest.


        :param identity_source_strategy: The identity_source_strategy of this CreateUserProvisioningRequest.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and identity_source_strategy is None:
            raise ValueError("Invalid value for `identity_source_strategy`, must not be `None`")  # noqa: E501
        allowed_values = ["Create", "Ignore"]  # noqa: E501
        if (self._configuration.client_side_validation and
                identity_source_strategy not in allowed_values):
            raise ValueError(
                "Invalid value for `identity_source_strategy` ({0}), must be one of {1}"  # noqa: E501
                .format(identity_source_strategy, allowed_values)
            )

        self._identity_source_strategy = identity_source_strategy

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


        :return: The principal_id of this CreateUserProvisioningRequest.  # noqa: E501
        :rtype: str
        """
        return self._principal_id

    @principal_id.setter
    def principal_id(self, principal_id):
        """Sets the principal_id of this CreateUserProvisioningRequest.


        :param principal_id: The principal_id of this CreateUserProvisioningRequest.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and principal_id is None:
            raise ValueError("Invalid value for `principal_id`, must not be `None`")  # noqa: E501

        self._principal_id = principal_id

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


        :return: The principal_type of this CreateUserProvisioningRequest.  # noqa: E501
        :rtype: str
        """
        return self._principal_type

    @principal_type.setter
    def principal_type(self, principal_type):
        """Sets the principal_type of this CreateUserProvisioningRequest.


        :param principal_type: The principal_type of this CreateUserProvisioningRequest.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and principal_type is None:
            raise ValueError("Invalid value for `principal_type`, must not be `None`")  # noqa: E501
        allowed_values = ["User", "Group"]  # noqa: E501
        if (self._configuration.client_side_validation and
                principal_type not in allowed_values):
            raise ValueError(
                "Invalid value for `principal_type` ({0}), must be one of {1}"  # noqa: E501
                .format(principal_type, allowed_values)
            )

        self._principal_type = principal_type

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


        :return: The target_id of this CreateUserProvisioningRequest.  # noqa: E501
        :rtype: str
        """
        return self._target_id

    @target_id.setter
    def target_id(self, target_id):
        """Sets the target_id of this CreateUserProvisioningRequest.


        :param target_id: The target_id of this CreateUserProvisioningRequest.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and target_id is None:
            raise ValueError("Invalid value for `target_id`, must not be `None`")  # noqa: E501

        self._target_id = target_id

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

        return self.to_dict() == other.to_dict()

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

        return self.to_dict() != other.to_dict()
