# coding: utf-8

"""
    kms

    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 CreateCustomKeyStoreRequest(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 = {
        'custom_key_store_name': 'str',
        'custom_key_store_type': 'str',
        'trust_anchor_certificate': 'str',
        'xks_access_key': 'str',
        'xks_proxy_connectivity': 'str',
        'xks_proxy_uri_endpoint': 'str',
        'xks_proxy_uri_path': 'str',
        'xks_proxy_vpc_endpoint_service_name': 'str',
        'xks_secret_access_key': 'str'
    }

    attribute_map = {
        'custom_key_store_name': 'CustomKeyStoreName',
        'custom_key_store_type': 'CustomKeyStoreType',
        'trust_anchor_certificate': 'TrustAnchorCertificate',
        'xks_access_key': 'XksAccessKey',
        'xks_proxy_connectivity': 'XksProxyConnectivity',
        'xks_proxy_uri_endpoint': 'XksProxyUriEndpoint',
        'xks_proxy_uri_path': 'XksProxyUriPath',
        'xks_proxy_vpc_endpoint_service_name': 'XksProxyVpcEndpointServiceName',
        'xks_secret_access_key': 'XksSecretAccessKey'
    }

    def __init__(self, custom_key_store_name=None, custom_key_store_type=None, trust_anchor_certificate=None, xks_access_key=None, xks_proxy_connectivity=None, xks_proxy_uri_endpoint=None, xks_proxy_uri_path=None, xks_proxy_vpc_endpoint_service_name=None, xks_secret_access_key=None, _configuration=None):  # noqa: E501
        """CreateCustomKeyStoreRequest - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._custom_key_store_name = None
        self._custom_key_store_type = None
        self._trust_anchor_certificate = None
        self._xks_access_key = None
        self._xks_proxy_connectivity = None
        self._xks_proxy_uri_endpoint = None
        self._xks_proxy_uri_path = None
        self._xks_proxy_vpc_endpoint_service_name = None
        self._xks_secret_access_key = None
        self.discriminator = None

        self.custom_key_store_name = custom_key_store_name
        self.custom_key_store_type = custom_key_store_type
        self.trust_anchor_certificate = trust_anchor_certificate
        if xks_access_key is not None:
            self.xks_access_key = xks_access_key
        if xks_proxy_connectivity is not None:
            self.xks_proxy_connectivity = xks_proxy_connectivity
        if xks_proxy_uri_endpoint is not None:
            self.xks_proxy_uri_endpoint = xks_proxy_uri_endpoint
        if xks_proxy_uri_path is not None:
            self.xks_proxy_uri_path = xks_proxy_uri_path
        if xks_proxy_vpc_endpoint_service_name is not None:
            self.xks_proxy_vpc_endpoint_service_name = xks_proxy_vpc_endpoint_service_name
        if xks_secret_access_key is not None:
            self.xks_secret_access_key = xks_secret_access_key

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


        :return: The custom_key_store_name of this CreateCustomKeyStoreRequest.  # noqa: E501
        :rtype: str
        """
        return self._custom_key_store_name

    @custom_key_store_name.setter
    def custom_key_store_name(self, custom_key_store_name):
        """Sets the custom_key_store_name of this CreateCustomKeyStoreRequest.


        :param custom_key_store_name: The custom_key_store_name of this CreateCustomKeyStoreRequest.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and custom_key_store_name is None:
            raise ValueError("Invalid value for `custom_key_store_name`, must not be `None`")  # noqa: E501
        if (self._configuration.client_side_validation and
                custom_key_store_name is not None and len(custom_key_store_name) > 31):
            raise ValueError("Invalid value for `custom_key_store_name`, length must be less than or equal to `31`")  # noqa: E501
        if (self._configuration.client_side_validation and
                custom_key_store_name is not None and len(custom_key_store_name) < 2):
            raise ValueError("Invalid value for `custom_key_store_name`, length must be greater than or equal to `2`")  # noqa: E501

        self._custom_key_store_name = custom_key_store_name

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


        :return: The custom_key_store_type of this CreateCustomKeyStoreRequest.  # noqa: E501
        :rtype: str
        """
        return self._custom_key_store_type

    @custom_key_store_type.setter
    def custom_key_store_type(self, custom_key_store_type):
        """Sets the custom_key_store_type of this CreateCustomKeyStoreRequest.


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

        self._custom_key_store_type = custom_key_store_type

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


        :return: The trust_anchor_certificate of this CreateCustomKeyStoreRequest.  # noqa: E501
        :rtype: str
        """
        return self._trust_anchor_certificate

    @trust_anchor_certificate.setter
    def trust_anchor_certificate(self, trust_anchor_certificate):
        """Sets the trust_anchor_certificate of this CreateCustomKeyStoreRequest.


        :param trust_anchor_certificate: The trust_anchor_certificate of this CreateCustomKeyStoreRequest.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and trust_anchor_certificate is None:
            raise ValueError("Invalid value for `trust_anchor_certificate`, must not be `None`")  # noqa: E501
        if (self._configuration.client_side_validation and
                trust_anchor_certificate is not None and len(trust_anchor_certificate) > 5000):
            raise ValueError("Invalid value for `trust_anchor_certificate`, length must be less than or equal to `5000`")  # noqa: E501
        if (self._configuration.client_side_validation and
                trust_anchor_certificate is not None and len(trust_anchor_certificate) < 1):
            raise ValueError("Invalid value for `trust_anchor_certificate`, length must be greater than or equal to `1`")  # noqa: E501

        self._trust_anchor_certificate = trust_anchor_certificate

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


        :return: The xks_access_key of this CreateCustomKeyStoreRequest.  # noqa: E501
        :rtype: str
        """
        return self._xks_access_key

    @xks_access_key.setter
    def xks_access_key(self, xks_access_key):
        """Sets the xks_access_key of this CreateCustomKeyStoreRequest.


        :param xks_access_key: The xks_access_key of this CreateCustomKeyStoreRequest.  # noqa: E501
        :type: str
        """
        if (self._configuration.client_side_validation and
                xks_access_key is not None and len(xks_access_key) > 30):
            raise ValueError("Invalid value for `xks_access_key`, length must be less than or equal to `30`")  # noqa: E501
        if (self._configuration.client_side_validation and
                xks_access_key is not None and len(xks_access_key) < 20):
            raise ValueError("Invalid value for `xks_access_key`, length must be greater than or equal to `20`")  # noqa: E501

        self._xks_access_key = xks_access_key

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


        :return: The xks_proxy_connectivity of this CreateCustomKeyStoreRequest.  # noqa: E501
        :rtype: str
        """
        return self._xks_proxy_connectivity

    @xks_proxy_connectivity.setter
    def xks_proxy_connectivity(self, xks_proxy_connectivity):
        """Sets the xks_proxy_connectivity of this CreateCustomKeyStoreRequest.


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

        self._xks_proxy_connectivity = xks_proxy_connectivity

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


        :return: The xks_proxy_uri_endpoint of this CreateCustomKeyStoreRequest.  # noqa: E501
        :rtype: str
        """
        return self._xks_proxy_uri_endpoint

    @xks_proxy_uri_endpoint.setter
    def xks_proxy_uri_endpoint(self, xks_proxy_uri_endpoint):
        """Sets the xks_proxy_uri_endpoint of this CreateCustomKeyStoreRequest.


        :param xks_proxy_uri_endpoint: The xks_proxy_uri_endpoint of this CreateCustomKeyStoreRequest.  # noqa: E501
        :type: str
        """
        if (self._configuration.client_side_validation and
                xks_proxy_uri_endpoint is not None and len(xks_proxy_uri_endpoint) > 128):
            raise ValueError("Invalid value for `xks_proxy_uri_endpoint`, length must be less than or equal to `128`")  # noqa: E501
        if (self._configuration.client_side_validation and
                xks_proxy_uri_endpoint is not None and len(xks_proxy_uri_endpoint) < 10):
            raise ValueError("Invalid value for `xks_proxy_uri_endpoint`, length must be greater than or equal to `10`")  # noqa: E501

        self._xks_proxy_uri_endpoint = xks_proxy_uri_endpoint

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


        :return: The xks_proxy_uri_path of this CreateCustomKeyStoreRequest.  # noqa: E501
        :rtype: str
        """
        return self._xks_proxy_uri_path

    @xks_proxy_uri_path.setter
    def xks_proxy_uri_path(self, xks_proxy_uri_path):
        """Sets the xks_proxy_uri_path of this CreateCustomKeyStoreRequest.


        :param xks_proxy_uri_path: The xks_proxy_uri_path of this CreateCustomKeyStoreRequest.  # noqa: E501
        :type: str
        """
        if (self._configuration.client_side_validation and
                xks_proxy_uri_path is not None and len(xks_proxy_uri_path) > 128):
            raise ValueError("Invalid value for `xks_proxy_uri_path`, length must be less than or equal to `128`")  # noqa: E501
        if (self._configuration.client_side_validation and
                xks_proxy_uri_path is not None and len(xks_proxy_uri_path) < 10):
            raise ValueError("Invalid value for `xks_proxy_uri_path`, length must be greater than or equal to `10`")  # noqa: E501

        self._xks_proxy_uri_path = xks_proxy_uri_path

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


        :return: The xks_proxy_vpc_endpoint_service_name of this CreateCustomKeyStoreRequest.  # noqa: E501
        :rtype: str
        """
        return self._xks_proxy_vpc_endpoint_service_name

    @xks_proxy_vpc_endpoint_service_name.setter
    def xks_proxy_vpc_endpoint_service_name(self, xks_proxy_vpc_endpoint_service_name):
        """Sets the xks_proxy_vpc_endpoint_service_name of this CreateCustomKeyStoreRequest.


        :param xks_proxy_vpc_endpoint_service_name: The xks_proxy_vpc_endpoint_service_name of this CreateCustomKeyStoreRequest.  # noqa: E501
        :type: str
        """
        if (self._configuration.client_side_validation and
                xks_proxy_vpc_endpoint_service_name is not None and len(xks_proxy_vpc_endpoint_service_name) > 128):
            raise ValueError("Invalid value for `xks_proxy_vpc_endpoint_service_name`, length must be less than or equal to `128`")  # noqa: E501
        if (self._configuration.client_side_validation and
                xks_proxy_vpc_endpoint_service_name is not None and len(xks_proxy_vpc_endpoint_service_name) < 20):
            raise ValueError("Invalid value for `xks_proxy_vpc_endpoint_service_name`, length must be greater than or equal to `20`")  # noqa: E501

        self._xks_proxy_vpc_endpoint_service_name = xks_proxy_vpc_endpoint_service_name

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


        :return: The xks_secret_access_key of this CreateCustomKeyStoreRequest.  # noqa: E501
        :rtype: str
        """
        return self._xks_secret_access_key

    @xks_secret_access_key.setter
    def xks_secret_access_key(self, xks_secret_access_key):
        """Sets the xks_secret_access_key of this CreateCustomKeyStoreRequest.


        :param xks_secret_access_key: The xks_secret_access_key of this CreateCustomKeyStoreRequest.  # noqa: E501
        :type: str
        """
        if (self._configuration.client_side_validation and
                xks_secret_access_key is not None and len(xks_secret_access_key) > 64):
            raise ValueError("Invalid value for `xks_secret_access_key`, length must be less than or equal to `64`")  # noqa: E501
        if (self._configuration.client_side_validation and
                xks_secret_access_key is not None and len(xks_secret_access_key) < 43):
            raise ValueError("Invalid value for `xks_secret_access_key`, length must be greater than or equal to `43`")  # noqa: E501

        self._xks_secret_access_key = xks_secret_access_key

    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(CreateCustomKeyStoreRequest, 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, CreateCustomKeyStoreRequest):
            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, CreateCustomKeyStoreRequest):
            return True

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