# coding: utf-8

"""
    VPlex REST API

    A defnition for the next-gen VPlex API  # noqa: E501

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


import pprint
import re  # noqa: F401

import six


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 = {
        'ip_address': 'str',
        'issued_to': 'str',
        'issued_by': 'str',
        'issued_on': 'datetime',
        'expires_on': 'datetime',
        'sha1': 'str',
        'md5': 'str',
        'encoded_certificate': 'str'
    }

    attribute_map = {
        'ip_address': 'ip_address',
        'issued_to': 'issued_to',
        'issued_by': 'issued_by',
        'issued_on': 'issued_on',
        'expires_on': 'expires_on',
        'sha1': 'SHA1',
        'md5': 'MD5',
        'encoded_certificate': 'encoded_certificate'
    }

    def __init__(self, ip_address=None, issued_to=None, issued_by=None, issued_on=None, expires_on=None, sha1=None, md5=None, encoded_certificate=None):  # noqa: E501
        """Certificate - a model defined in Swagger"""  # noqa: E501

        self._ip_address = None
        self._issued_to = None
        self._issued_by = None
        self._issued_on = None
        self._expires_on = None
        self._sha1 = None
        self._md5 = None
        self._encoded_certificate = None
        self.discriminator = None

        if ip_address is not None:
            self.ip_address = ip_address
        if issued_to is not None:
            self.issued_to = issued_to
        if issued_by is not None:
            self.issued_by = issued_by
        if issued_on is not None:
            self.issued_on = issued_on
        if expires_on is not None:
            self.expires_on = expires_on
        if sha1 is not None:
            self.sha1 = sha1
        if md5 is not None:
            self.md5 = md5
        if encoded_certificate is not None:
            self.encoded_certificate = encoded_certificate

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


        :return: The ip_address of this Certificate.  # noqa: E501
        :rtype: str
        """
        return self._ip_address

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


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

        self._ip_address = ip_address

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


        :return: The issued_to of this Certificate.  # noqa: E501
        :rtype: str
        """
        return self._issued_to

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


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

        self._issued_to = issued_to

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


        :return: The issued_by of this Certificate.  # noqa: E501
        :rtype: str
        """
        return self._issued_by

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


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

        self._issued_by = issued_by

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


        :return: The issued_on of this Certificate.  # noqa: E501
        :rtype: datetime
        """
        return self._issued_on

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


        :param issued_on: The issued_on of this Certificate.  # noqa: E501
        :type: datetime
        """

        self._issued_on = issued_on

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


        :return: The expires_on of this Certificate.  # noqa: E501
        :rtype: datetime
        """
        return self._expires_on

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


        :param expires_on: The expires_on of this Certificate.  # noqa: E501
        :type: datetime
        """

        self._expires_on = expires_on

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


        :return: The sha1 of this Certificate.  # noqa: E501
        :rtype: str
        """
        return self._sha1

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


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

        self._sha1 = sha1

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


        :return: The md5 of this Certificate.  # noqa: E501
        :rtype: str
        """
        return self._md5

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


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

        self._md5 = md5

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


        :return: The encoded_certificate of this Certificate.  # noqa: E501
        :rtype: str
        """
        return self._encoded_certificate

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


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

        self._encoded_certificate = encoded_certificate

    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

        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.__dict__ == other.__dict__

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