# coding: utf-8

"""
    Harbor API

    These APIs provide services for manipulating Harbor project.  # noqa: E501

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


import pprint
import re  # noqa: F401

import six

from harbor_client.configuration import Configuration


class RobotCreate(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',
        'description': 'str',
        'secret': 'str',
        'level': 'str',
        'disable': 'bool',
        'duration': 'int',
        'permissions': 'list[RobotPermission]'
    }

    attribute_map = {
        'name': 'name',
        'description': 'description',
        'secret': 'secret',
        'level': 'level',
        'disable': 'disable',
        'duration': 'duration',
        'permissions': 'permissions'
    }

    def __init__(self, name=None, description=None, secret=None, level=None, disable=None, duration=None, permissions=None, _configuration=None):  # noqa: E501
        """RobotCreate - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._name = None
        self._description = None
        self._secret = None
        self._level = None
        self._disable = None
        self._duration = None
        self._permissions = None
        self.discriminator = None

        if name is not None:
            self.name = name
        if description is not None:
            self.description = description
        if secret is not None:
            self.secret = secret
        if level is not None:
            self.level = level
        if disable is not None:
            self.disable = disable
        if duration is not None:
            self.duration = duration
        if permissions is not None:
            self.permissions = permissions

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

        The name of the tag  # noqa: E501

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

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

        The name of the tag  # noqa: E501

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

        self._name = name

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

        The description of the robot  # noqa: E501

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

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

        The description of the robot  # noqa: E501

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

        self._description = description

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

        The secret of the robot  # noqa: E501

        :return: The secret of this RobotCreate.  # noqa: E501
        :rtype: str
        """
        return self._secret

    @secret.setter
    def secret(self, secret):
        """Sets the secret of this RobotCreate.

        The secret of the robot  # noqa: E501

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

        self._secret = secret

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

        The level of the robot, project or system  # noqa: E501

        :return: The level of this RobotCreate.  # noqa: E501
        :rtype: str
        """
        return self._level

    @level.setter
    def level(self, level):
        """Sets the level of this RobotCreate.

        The level of the robot, project or system  # noqa: E501

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

        self._level = level

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

        The disable status of the robot  # noqa: E501

        :return: The disable of this RobotCreate.  # noqa: E501
        :rtype: bool
        """
        return self._disable

    @disable.setter
    def disable(self, disable):
        """Sets the disable of this RobotCreate.

        The disable status of the robot  # noqa: E501

        :param disable: The disable of this RobotCreate.  # noqa: E501
        :type: bool
        """

        self._disable = disable

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

        The duration of the robot in days  # noqa: E501

        :return: The duration of this RobotCreate.  # noqa: E501
        :rtype: int
        """
        return self._duration

    @duration.setter
    def duration(self, duration):
        """Sets the duration of this RobotCreate.

        The duration of the robot in days  # noqa: E501

        :param duration: The duration of this RobotCreate.  # noqa: E501
        :type: int
        """

        self._duration = duration

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


        :return: The permissions of this RobotCreate.  # noqa: E501
        :rtype: list[RobotPermission]
        """
        return self._permissions

    @permissions.setter
    def permissions(self, permissions):
        """Sets the permissions of this RobotCreate.


        :param permissions: The permissions of this RobotCreate.  # noqa: E501
        :type: list[RobotPermission]
        """

        self._permissions = permissions

    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(RobotCreate, 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, RobotCreate):
            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, RobotCreate):
            return True

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