# coding: utf-8

"""
    Karbon Platform Services API reference.

    OpenAPI documentation for public facing Karbon Platform Services API  This API documentation is generated from source code using go-swagger. Do not edit the generated kps_api.json directly!  # noqa: E501

    OpenAPI spec version: 1.0
    Contact: karbon-platform-services-api@nutanix.com
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six


class Certificates(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 = {
        'ca_certificate': 'str',
        'certificate': 'str',
        'private_key': 'str'
    }

    attribute_map = {
        'ca_certificate': 'CACertificate',
        'certificate': 'certificate',
        'private_key': 'privateKey'
    }

    def __init__(self, ca_certificate=None, certificate=None, private_key=None):  # noqa: E501
        """Certificates - a model defined in Swagger"""  # noqa: E501
        self._ca_certificate = None
        self._certificate = None
        self._private_key = None
        self.discriminator = None
        self.ca_certificate = ca_certificate
        self.certificate = certificate
        self.private_key = private_key

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

        Root CA certificate that signed the device certificate.  # noqa: E501

        :return: The ca_certificate of this Certificates.  # noqa: E501
        :rtype: str
        """
        return self._ca_certificate

    @ca_certificate.setter
    def ca_certificate(self, ca_certificate):
        """Sets the ca_certificate of this Certificates.

        Root CA certificate that signed the device certificate.  # noqa: E501

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

        self._ca_certificate = ca_certificate

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

        Certificate for a device.  # noqa: E501

        :return: The certificate of this Certificates.  # noqa: E501
        :rtype: str
        """
        return self._certificate

    @certificate.setter
    def certificate(self, certificate):
        """Sets the certificate of this Certificates.

        Certificate for a device.  # noqa: E501

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

        self._certificate = certificate

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

        Encrypted private key corresponding to the certificate.  # noqa: E501

        :return: The private_key of this Certificates.  # noqa: E501
        :rtype: str
        """
        return self._private_key

    @private_key.setter
    def private_key(self, private_key):
        """Sets the private_key of this Certificates.

        Encrypted private key corresponding to the certificate.  # noqa: E501

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

        self._private_key = private_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(Certificates, 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, Certificates):
            return False

        return self.__dict__ == other.__dict__

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