# coding: utf-8

"""
    DigitalRebar Provision Server

    # An RestFUL API-driven Provisioner and DHCP server  # noqa: E501

    OpenAPI spec version: 4.14.0
    Contact: support@rackn.com
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six

from drppy_client.configuration import Configuration


class CatalogItem(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 = {
        'actual_version': 'str',
        'available': 'bool',
        'content_type': 'str',
        'created_at': 'datetime',
        'created_by': 'str',
        'endpoint': 'str',
        'errors': 'list[str]',
        'hot_fix': 'bool',
        'id': 'str',
        'last_modified_at': 'datetime',
        'last_modified_by': 'str',
        'meta': 'Meta',
        'nojq_source': 'str',
        'name': 'str',
        'read_only': 'bool',
        'shasum256': 'dict(str, str)',
        'source': 'str',
        'tip': 'bool',
        'type': 'str',
        'validated': 'bool',
        'version': 'str'
    }

    attribute_map = {
        'actual_version': 'ActualVersion',
        'available': 'Available',
        'content_type': 'ContentType',
        'created_at': 'CreatedAt',
        'created_by': 'CreatedBy',
        'endpoint': 'Endpoint',
        'errors': 'Errors',
        'hot_fix': 'HotFix',
        'id': 'Id',
        'last_modified_at': 'LastModifiedAt',
        'last_modified_by': 'LastModifiedBy',
        'meta': 'Meta',
        'nojq_source': 'NOJQSource',
        'name': 'Name',
        'read_only': 'ReadOnly',
        'shasum256': 'Shasum256',
        'source': 'Source',
        'tip': 'Tip',
        'type': 'Type',
        'validated': 'Validated',
        'version': 'Version'
    }

    def __init__(self, actual_version=None, available=None, content_type=None, created_at=None, created_by=None, endpoint=None, errors=None, hot_fix=None, id=None, last_modified_at=None, last_modified_by=None, meta=None, nojq_source=None, name=None, read_only=None, shasum256=None, source=None, tip=None, type=None, validated=None, version=None, _configuration=None):  # noqa: E501
        """CatalogItem - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._actual_version = None
        self._available = None
        self._content_type = None
        self._created_at = None
        self._created_by = None
        self._endpoint = None
        self._errors = None
        self._hot_fix = None
        self._id = None
        self._last_modified_at = None
        self._last_modified_by = None
        self._meta = None
        self._nojq_source = None
        self._name = None
        self._read_only = None
        self._shasum256 = None
        self._source = None
        self._tip = None
        self._type = None
        self._validated = None
        self._version = None
        self.discriminator = None

        if actual_version is not None:
            self.actual_version = actual_version
        if available is not None:
            self.available = available
        if content_type is not None:
            self.content_type = content_type
        if created_at is not None:
            self.created_at = created_at
        if created_by is not None:
            self.created_by = created_by
        if endpoint is not None:
            self.endpoint = endpoint
        if errors is not None:
            self.errors = errors
        if hot_fix is not None:
            self.hot_fix = hot_fix
        if id is not None:
            self.id = id
        if last_modified_at is not None:
            self.last_modified_at = last_modified_at
        if last_modified_by is not None:
            self.last_modified_by = last_modified_by
        if meta is not None:
            self.meta = meta
        if nojq_source is not None:
            self.nojq_source = nojq_source
        if name is not None:
            self.name = name
        if read_only is not None:
            self.read_only = read_only
        if shasum256 is not None:
            self.shasum256 = shasum256
        if source is not None:
            self.source = source
        if tip is not None:
            self.tip = tip
        if type is not None:
            self.type = type
        if validated is not None:
            self.validated = validated
        if version is not None:
            self.version = version

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

        ActualVersion is the fully expanded version for this item.  # noqa: E501

        :return: The actual_version of this CatalogItem.  # noqa: E501
        :rtype: str
        """
        return self._actual_version

    @actual_version.setter
    def actual_version(self, actual_version):
        """Sets the actual_version of this CatalogItem.

        ActualVersion is the fully expanded version for this item.  # noqa: E501

        :param actual_version: The actual_version of this CatalogItem.  # noqa: E501
        :type: str
        """

        self._actual_version = actual_version

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

        Available tracks whether or not the model passed validation.  # noqa: E501

        :return: The available of this CatalogItem.  # noqa: E501
        :rtype: bool
        """
        return self._available

    @available.setter
    def available(self, available):
        """Sets the available of this CatalogItem.

        Available tracks whether or not the model passed validation.  # noqa: E501

        :param available: The available of this CatalogItem.  # noqa: E501
        :type: bool
        """

        self._available = available

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

        ContentType defines the type catalog item Possible options are:  DRP DRPUX DRPCLI ContentPackage PluginProvider  # noqa: E501

        :return: The content_type of this CatalogItem.  # noqa: E501
        :rtype: str
        """
        return self._content_type

    @content_type.setter
    def content_type(self, content_type):
        """Sets the content_type of this CatalogItem.

        ContentType defines the type catalog item Possible options are:  DRP DRPUX DRPCLI ContentPackage PluginProvider  # noqa: E501

        :param content_type: The content_type of this CatalogItem.  # noqa: E501
        :type: str
        """

        self._content_type = content_type

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

        CreatedAt is the time that this object was created.  # noqa: E501

        :return: The created_at of this CatalogItem.  # noqa: E501
        :rtype: datetime
        """
        return self._created_at

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

        CreatedAt is the time that this object was created.  # noqa: E501

        :param created_at: The created_at of this CatalogItem.  # noqa: E501
        :type: datetime
        """

        self._created_at = created_at

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

        CreatedBy stores the value of the user that created this object. Note: This value is stored ONLY if the object was created by a user which means that `currentUserName` needs to be populated in the authBlob  # noqa: E501

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

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

        CreatedBy stores the value of the user that created this object. Note: This value is stored ONLY if the object was created by a user which means that `currentUserName` needs to be populated in the authBlob  # noqa: E501

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

        self._created_by = created_by

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

        Endpoint tracks the owner of the object among DRP endpoints  # noqa: E501

        :return: The endpoint of this CatalogItem.  # noqa: E501
        :rtype: str
        """
        return self._endpoint

    @endpoint.setter
    def endpoint(self, endpoint):
        """Sets the endpoint of this CatalogItem.

        Endpoint tracks the owner of the object among DRP endpoints  # noqa: E501

        :param endpoint: The endpoint of this CatalogItem.  # noqa: E501
        :type: str
        """

        self._endpoint = endpoint

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

        If there are any errors in the validation process, they will be available here.  # noqa: E501

        :return: The errors of this CatalogItem.  # noqa: E501
        :rtype: list[str]
        """
        return self._errors

    @errors.setter
    def errors(self, errors):
        """Sets the errors of this CatalogItem.

        If there are any errors in the validation process, they will be available here.  # noqa: E501

        :param errors: The errors of this CatalogItem.  # noqa: E501
        :type: list[str]
        """

        self._errors = errors

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

        HotFix is true if this a hotfix entry.  # noqa: E501

        :return: The hot_fix of this CatalogItem.  # noqa: E501
        :rtype: bool
        """
        return self._hot_fix

    @hot_fix.setter
    def hot_fix(self, hot_fix):
        """Sets the hot_fix of this CatalogItem.

        HotFix is true if this a hotfix entry.  # noqa: E501

        :param hot_fix: The hot_fix of this CatalogItem.  # noqa: E501
        :type: bool
        """

        self._hot_fix = hot_fix

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

        Id is the unique ID for this catalog item.  # noqa: E501

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

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

        Id is the unique ID for this catalog item.  # noqa: E501

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

        self._id = id

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

        LastModifiedAt is the time that this object was last modified.  # noqa: E501

        :return: The last_modified_at of this CatalogItem.  # noqa: E501
        :rtype: datetime
        """
        return self._last_modified_at

    @last_modified_at.setter
    def last_modified_at(self, last_modified_at):
        """Sets the last_modified_at of this CatalogItem.

        LastModifiedAt is the time that this object was last modified.  # noqa: E501

        :param last_modified_at: The last_modified_at of this CatalogItem.  # noqa: E501
        :type: datetime
        """

        self._last_modified_at = last_modified_at

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

        LastModifiedBy stores the value of the user that last modified this object. NOTE: This value is populated ONLY if the object was modified by a user which means any actions done using machine tokens will not get tracked  # noqa: E501

        :return: The last_modified_by of this CatalogItem.  # noqa: E501
        :rtype: str
        """
        return self._last_modified_by

    @last_modified_by.setter
    def last_modified_by(self, last_modified_by):
        """Sets the last_modified_by of this CatalogItem.

        LastModifiedBy stores the value of the user that last modified this object. NOTE: This value is populated ONLY if the object was modified by a user which means any actions done using machine tokens will not get tracked  # noqa: E501

        :param last_modified_by: The last_modified_by of this CatalogItem.  # noqa: E501
        :type: str
        """

        self._last_modified_by = last_modified_by

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


        :return: The meta of this CatalogItem.  # noqa: E501
        :rtype: Meta
        """
        return self._meta

    @meta.setter
    def meta(self, meta):
        """Sets the meta of this CatalogItem.


        :param meta: The meta of this CatalogItem.  # noqa: E501
        :type: Meta
        """

        self._meta = meta

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

        NOJQSource is a greppable string to find an entry.  # noqa: E501

        :return: The nojq_source of this CatalogItem.  # noqa: E501
        :rtype: str
        """
        return self._nojq_source

    @nojq_source.setter
    def nojq_source(self, nojq_source):
        """Sets the nojq_source of this CatalogItem.

        NOJQSource is a greppable string to find an entry.  # noqa: E501

        :param nojq_source: The nojq_source of this CatalogItem.  # noqa: E501
        :type: str
        """

        self._nojq_source = nojq_source

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

        Name is the element in the catalog  # noqa: E501

        :return: The name of this CatalogItem.  # noqa: E501
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """Sets the name of this CatalogItem.

        Name is the element in the catalog  # noqa: E501

        :param name: The name of this CatalogItem.  # noqa: E501
        :type: str
        """

        self._name = name

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

        ReadOnly tracks if the store for this object is read-only. This flag is informational, and cannot be changed via the API.  # noqa: E501

        :return: The read_only of this CatalogItem.  # noqa: E501
        :rtype: bool
        """
        return self._read_only

    @read_only.setter
    def read_only(self, read_only):
        """Sets the read_only of this CatalogItem.

        ReadOnly tracks if the store for this object is read-only. This flag is informational, and cannot be changed via the API.  # noqa: E501

        :param read_only: The read_only of this CatalogItem.  # noqa: E501
        :type: bool
        """

        self._read_only = read_only

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

        Shasum256 is a map of checksums. The key of the map is any/any for the UX and ContentPackage elements. Otherwise the key is the arch/os.  e.g. amd64/linux  # noqa: E501

        :return: The shasum256 of this CatalogItem.  # noqa: E501
        :rtype: dict(str, str)
        """
        return self._shasum256

    @shasum256.setter
    def shasum256(self, shasum256):
        """Sets the shasum256 of this CatalogItem.

        Shasum256 is a map of checksums. The key of the map is any/any for the UX and ContentPackage elements. Otherwise the key is the arch/os.  e.g. amd64/linux  # noqa: E501

        :param shasum256: The shasum256 of this CatalogItem.  # noqa: E501
        :type: dict(str, str)
        """

        self._shasum256 = shasum256

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

        Source is a URL or path to the item  If the source is a URL, the base element is pulled from there. If the source has {{.ProvisionerURL}}, it will use the DRP Endpoint If the source is a path, the system will use the catalog source as the base.  # noqa: E501

        :return: The source of this CatalogItem.  # noqa: E501
        :rtype: str
        """
        return self._source

    @source.setter
    def source(self, source):
        """Sets the source of this CatalogItem.

        Source is a URL or path to the item  If the source is a URL, the base element is pulled from there. If the source has {{.ProvisionerURL}}, it will use the DRP Endpoint If the source is a path, the system will use the catalog source as the base.  # noqa: E501

        :param source: The source of this CatalogItem.  # noqa: E501
        :type: str
        """

        self._source = source

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

        Tip is true if this is a tip entry.  # noqa: E501

        :return: The tip of this CatalogItem.  # noqa: E501
        :rtype: bool
        """
        return self._tip

    @tip.setter
    def tip(self, tip):
        """Sets the tip of this CatalogItem.

        Tip is true if this is a tip entry.  # noqa: E501

        :param tip: The tip of this CatalogItem.  # noqa: E501
        :type: bool
        """

        self._tip = tip

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

        Type is the type of catalog item this is.  # noqa: E501

        :return: The type of this CatalogItem.  # noqa: E501
        :rtype: str
        """
        return self._type

    @type.setter
    def type(self, type):
        """Sets the type of this CatalogItem.

        Type is the type of catalog item this is.  # noqa: E501

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

        self._type = type

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

        Validated tracks whether or not the model has been validated.  # noqa: E501

        :return: The validated of this CatalogItem.  # noqa: E501
        :rtype: bool
        """
        return self._validated

    @validated.setter
    def validated(self, validated):
        """Sets the validated of this CatalogItem.

        Validated tracks whether or not the model has been validated.  # noqa: E501

        :param validated: The validated of this CatalogItem.  # noqa: E501
        :type: bool
        """

        self._validated = validated

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

        Version is the processed/matched version.  It is either tip, stable, or the full version.  # noqa: E501

        :return: The version of this CatalogItem.  # noqa: E501
        :rtype: str
        """
        return self._version

    @version.setter
    def version(self, version):
        """Sets the version of this CatalogItem.

        Version is the processed/matched version.  It is either tip, stable, or the full version.  # noqa: E501

        :param version: The version of this CatalogItem.  # noqa: E501
        :type: str
        """

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

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