# coding: utf-8

"""
    Peacemakr

    This API describes the Peacemakr services, which enable seamless application layer encryption and verification.  # noqa: E501

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


import pprint
import re  # noqa: F401

import six


class PublicKey(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 = {
        'id': 'str',
        'creation_time': 'int',
        'key_type': 'str',
        'encoding': 'str',
        'key': 'str',
        'owning_client_id': 'str',
        'owning_org_id': 'str'
    }

    attribute_map = {
        'id': 'id',
        'creation_time': 'creationTime',
        'key_type': 'keyType',
        'encoding': 'encoding',
        'key': 'key',
        'owning_client_id': 'owningClientId',
        'owning_org_id': 'owningOrgId'
    }

    def __init__(self, id=None, creation_time=None, key_type=None, encoding=None, key=None, owning_client_id=None, owning_org_id=None):  # noqa: E501
        """PublicKey - a model defined in Swagger"""  # noqa: E501

        self._id = None
        self._creation_time = None
        self._key_type = None
        self._encoding = None
        self._key = None
        self._owning_client_id = None
        self._owning_org_id = None
        self.discriminator = None

        self.id = id
        self.creation_time = creation_time
        self.key_type = key_type
        self.encoding = encoding
        self.key = key
        if owning_client_id is not None:
            self.owning_client_id = owning_client_id
        if owning_org_id is not None:
            self.owning_org_id = owning_org_id

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


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

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


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

        self._id = id

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


        :return: The creation_time of this PublicKey.  # noqa: E501
        :rtype: int
        """
        return self._creation_time

    @creation_time.setter
    def creation_time(self, creation_time):
        """Sets the creation_time of this PublicKey.


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

        self._creation_time = creation_time

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


        :return: The key_type of this PublicKey.  # noqa: E501
        :rtype: str
        """
        return self._key_type

    @key_type.setter
    def key_type(self, key_type):
        """Sets the key_type of this PublicKey.


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

        self._key_type = key_type

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


        :return: The encoding of this PublicKey.  # noqa: E501
        :rtype: str
        """
        return self._encoding

    @encoding.setter
    def encoding(self, encoding):
        """Sets the encoding of this PublicKey.


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

        self._encoding = encoding

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


        :return: The key of this PublicKey.  # noqa: E501
        :rtype: str
        """
        return self._key

    @key.setter
    def key(self, key):
        """Sets the key of this PublicKey.


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

        self._key = key

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

        the id of the client that owns this specific public key  # noqa: E501

        :return: The owning_client_id of this PublicKey.  # noqa: E501
        :rtype: str
        """
        return self._owning_client_id

    @owning_client_id.setter
    def owning_client_id(self, owning_client_id):
        """Sets the owning_client_id of this PublicKey.

        the id of the client that owns this specific public key  # noqa: E501

        :param owning_client_id: The owning_client_id of this PublicKey.  # noqa: E501
        :type: str
        """

        self._owning_client_id = owning_client_id

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

        the id of the org that owns the client that owns this specific public key  # noqa: E501

        :return: The owning_org_id of this PublicKey.  # noqa: E501
        :rtype: str
        """
        return self._owning_org_id

    @owning_org_id.setter
    def owning_org_id(self, owning_org_id):
        """Sets the owning_org_id of this PublicKey.

        the id of the org that owns the client that owns this specific public key  # noqa: E501

        :param owning_org_id: The owning_org_id of this PublicKey.  # noqa: E501
        :type: str
        """

        self._owning_org_id = owning_org_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(PublicKey, 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, PublicKey):
            return False

        return self.__dict__ == other.__dict__

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