# coding: utf-8

"""
    Octopus Server API

    No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)  # noqa: E501

    OpenAPI spec version: 2019.6.7+Branch.tags-2019.6.7.Sha.aa18dc6809953218c66f57eff7d26481d9b23d6a
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six


class PackageSignatureResource(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 = {
        'signature': 'str',
        'base_version': 'str'
    }

    attribute_map = {
        'signature': 'Signature',
        'base_version': 'BaseVersion'
    }

    def __init__(self, signature=None, base_version=None):  # noqa: E501
        """PackageSignatureResource - a model defined in Swagger"""  # noqa: E501

        self._signature = None
        self._base_version = None
        self.discriminator = None

        if signature is not None:
            self.signature = signature
        if base_version is not None:
            self.base_version = base_version

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


        :return: The signature of this PackageSignatureResource.  # noqa: E501
        :rtype: str
        """
        return self._signature

    @signature.setter
    def signature(self, signature):
        """Sets the signature of this PackageSignatureResource.


        :param signature: The signature of this PackageSignatureResource.  # noqa: E501
        :type: str
        """
        if signature is not None and not re.search(r'^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$', signature):  # noqa: E501
            raise ValueError(r"Invalid value for `signature`, must be a follow pattern or equal to `/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/`")  # noqa: E501

        self._signature = signature

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


        :return: The base_version of this PackageSignatureResource.  # noqa: E501
        :rtype: str
        """
        return self._base_version

    @base_version.setter
    def base_version(self, base_version):
        """Sets the base_version of this PackageSignatureResource.


        :param base_version: The base_version of this PackageSignatureResource.  # noqa: E501
        :type: str
        """

        self._base_version = base_version

    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(PackageSignatureResource, 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, PackageSignatureResource):
            return False

        return self.__dict__ == other.__dict__

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