# coding: utf-8

"""
    shado-python-client

    No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)  # 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

from shado_client.models.object_id import ObjectID  # noqa: F401,E501


class Plugin(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 = {
        'name': 'str',
        'type': 'str',
        'description': 'str',
        'created_at': 'datetime',
        'updated_at': 'datetime',
        'resource_created_at': 'datetime',
        'uri': 'str',
        'status': 'str',
        'gui': 'object',
        'id': 'ObjectID',
        'owner_id': 'ObjectID'
    }

    attribute_map = {
        'name': 'name',
        'type': 'type',
        'description': 'description',
        'created_at': 'createdAt',
        'updated_at': 'updatedAt',
        'resource_created_at': 'resourceCreatedAt',
        'uri': 'uri',
        'status': 'status',
        'gui': 'gui',
        'id': 'id',
        'owner_id': 'ownerId'
    }

    def __init__(self, name=None, type=None, description=None, created_at=None, updated_at=None, resource_created_at=None, uri=None, status='uploaded', gui=None, id=None, owner_id=None):  # noqa: E501
        """Plugin - a model defined in Swagger"""  # noqa: E501

        self._name = None
        self._type = None
        self._description = None
        self._created_at = None
        self._updated_at = None
        self._resource_created_at = None
        self._uri = None
        self._status = None
        self._gui = None
        self._id = None
        self._owner_id = None
        self.discriminator = None

        if name is not None:
            self.name = name
        if type is not None:
            self.type = type
        if description is not None:
            self.description = description
        if created_at is not None:
            self.created_at = created_at
        if updated_at is not None:
            self.updated_at = updated_at
        if resource_created_at is not None:
            self.resource_created_at = resource_created_at
        if uri is not None:
            self.uri = uri
        if status is not None:
            self.status = status
        if gui is not None:
            self.gui = gui
        if id is not None:
            self.id = id
        if owner_id is not None:
            self.owner_id = owner_id

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


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

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


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

        self._name = name

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


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

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


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

        self._type = type

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


        :return: The description of this Plugin.  # noqa: E501
        :rtype: str
        """
        return self._description

    @description.setter
    def description(self, description):
        """Sets the description of this Plugin.


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

        self._description = description

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


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

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


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

        self._created_at = created_at

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


        :return: The updated_at of this Plugin.  # noqa: E501
        :rtype: datetime
        """
        return self._updated_at

    @updated_at.setter
    def updated_at(self, updated_at):
        """Sets the updated_at of this Plugin.


        :param updated_at: The updated_at of this Plugin.  # noqa: E501
        :type: datetime
        """

        self._updated_at = updated_at

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


        :return: The resource_created_at of this Plugin.  # noqa: E501
        :rtype: datetime
        """
        return self._resource_created_at

    @resource_created_at.setter
    def resource_created_at(self, resource_created_at):
        """Sets the resource_created_at of this Plugin.


        :param resource_created_at: The resource_created_at of this Plugin.  # noqa: E501
        :type: datetime
        """

        self._resource_created_at = resource_created_at

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


        :return: The uri of this Plugin.  # noqa: E501
        :rtype: str
        """
        return self._uri

    @uri.setter
    def uri(self, uri):
        """Sets the uri of this Plugin.


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

        self._uri = uri

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


        :return: The status of this Plugin.  # noqa: E501
        :rtype: str
        """
        return self._status

    @status.setter
    def status(self, status):
        """Sets the status of this Plugin.


        :param status: The status of this Plugin.  # noqa: E501
        :type: str
        """
        allowed_values = ["uploaded", "installing", "ready"]  # noqa: E501
        if status not in allowed_values:
            raise ValueError(
                "Invalid value for `status` ({0}), must be one of {1}"  # noqa: E501
                .format(status, allowed_values)
            )

        self._status = status

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


        :return: The gui of this Plugin.  # noqa: E501
        :rtype: object
        """
        return self._gui

    @gui.setter
    def gui(self, gui):
        """Sets the gui of this Plugin.


        :param gui: The gui of this Plugin.  # noqa: E501
        :type: object
        """

        self._gui = gui

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


        :return: The id of this Plugin.  # noqa: E501
        :rtype: ObjectID
        """
        return self._id

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


        :param id: The id of this Plugin.  # noqa: E501
        :type: ObjectID
        """

        self._id = id

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


        :return: The owner_id of this Plugin.  # noqa: E501
        :rtype: ObjectID
        """
        return self._owner_id

    @owner_id.setter
    def owner_id(self, owner_id):
        """Sets the owner_id of this Plugin.


        :param owner_id: The owner_id of this Plugin.  # noqa: E501
        :type: ObjectID
        """

        self._owner_id = owner_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

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

        return self.__dict__ == other.__dict__

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