# coding: utf-8

"""
    Python client for GIG based clouds (pc4g)

    RESTful api client to a GIG based cloud.  # noqa: E501

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


import pprint
import re  # noqa: F401

import six

from pc4g.configuration import Configuration


class Certificate(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 = {
        'created_at': 'float',
        'created_by': 'str',
        'crt': 'list[CertificateChain]',
        'customer_id': 'str',
        'domain': 'str',
        'expires_at': 'float',
        'id': 'str'
    }

    attribute_map = {
        'created_at': 'created_at',
        'created_by': 'created_by',
        'crt': 'crt',
        'customer_id': 'customer_id',
        'domain': 'domain',
        'expires_at': 'expires_at',
        'id': 'id'
    }

    def __init__(self, created_at=None, created_by=None, crt=None, customer_id=None, domain=None, expires_at=None, id=None, _configuration=None):  # noqa: E501
        """Certificate - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._created_at = None
        self._created_by = None
        self._crt = None
        self._customer_id = None
        self._domain = None
        self._expires_at = None
        self._id = None
        self.discriminator = None

        if created_at is not None:
            self.created_at = created_at
        if created_by is not None:
            self.created_by = created_by
        if crt is not None:
            self.crt = crt
        if customer_id is not None:
            self.customer_id = customer_id
        if domain is not None:
            self.domain = domain
        if expires_at is not None:
            self.expires_at = expires_at
        if id is not None:
            self.id = id

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


        :return: The created_at of this Certificate.  # noqa: E501
        :rtype: float
        """
        return self._created_at

    @created_at.setter
    def created_at(self, created_at):
        """Sets the created_at of this Certificate.


        :param created_at: The created_at of this Certificate.  # noqa: E501
        :type: float
        """

        self._created_at = created_at

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


        :return: The created_by of this Certificate.  # noqa: E501
        :rtype: str
        """
        return self._created_by

    @created_by.setter
    def created_by(self, created_by):
        """Sets the created_by of this Certificate.


        :param created_by: The created_by of this Certificate.  # noqa: E501
        :type: str
        """

        self._created_by = created_by

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


        :return: The crt of this Certificate.  # noqa: E501
        :rtype: list[CertificateChain]
        """
        return self._crt

    @crt.setter
    def crt(self, crt):
        """Sets the crt of this Certificate.


        :param crt: The crt of this Certificate.  # noqa: E501
        :type: list[CertificateChain]
        """

        self._crt = crt

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


        :return: The customer_id of this Certificate.  # noqa: E501
        :rtype: str
        """
        return self._customer_id

    @customer_id.setter
    def customer_id(self, customer_id):
        """Sets the customer_id of this Certificate.


        :param customer_id: The customer_id of this Certificate.  # noqa: E501
        :type: str
        """

        self._customer_id = customer_id

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


        :return: The domain of this Certificate.  # noqa: E501
        :rtype: str
        """
        return self._domain

    @domain.setter
    def domain(self, domain):
        """Sets the domain of this Certificate.


        :param domain: The domain of this Certificate.  # noqa: E501
        :type: str
        """

        self._domain = domain

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


        :return: The expires_at of this Certificate.  # noqa: E501
        :rtype: float
        """
        return self._expires_at

    @expires_at.setter
    def expires_at(self, expires_at):
        """Sets the expires_at of this Certificate.


        :param expires_at: The expires_at of this Certificate.  # noqa: E501
        :type: float
        """

        self._expires_at = expires_at

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

        CustomerSSLCertificate identifier  # noqa: E501

        :return: The id of this Certificate.  # noqa: E501
        :rtype: str
        """
        return self._id

    @id.setter
    def id(self, id):
        """Sets the id of this Certificate.

        CustomerSSLCertificate identifier  # noqa: E501

        :param id: The id of this Certificate.  # noqa: E501
        :type: str
        """

        self._id = 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(Certificate, 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, Certificate):
            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, Certificate):
            return True

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