# 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 UserPermissionRestriction(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 = {
        'restricted_to_project_ids': 'list[str]',
        'restricted_to_environment_ids': 'list[str]',
        'restricted_to_tenant_ids': 'list[str]',
        'restricted_to_project_group_ids': 'list[str]',
        'space_id': 'str'
    }

    attribute_map = {
        'restricted_to_project_ids': 'RestrictedToProjectIds',
        'restricted_to_environment_ids': 'RestrictedToEnvironmentIds',
        'restricted_to_tenant_ids': 'RestrictedToTenantIds',
        'restricted_to_project_group_ids': 'RestrictedToProjectGroupIds',
        'space_id': 'SpaceId'
    }

    def __init__(self, restricted_to_project_ids=None, restricted_to_environment_ids=None, restricted_to_tenant_ids=None, restricted_to_project_group_ids=None, space_id=None):  # noqa: E501
        """UserPermissionRestriction - a model defined in Swagger"""  # noqa: E501

        self._restricted_to_project_ids = None
        self._restricted_to_environment_ids = None
        self._restricted_to_tenant_ids = None
        self._restricted_to_project_group_ids = None
        self._space_id = None
        self.discriminator = None

        if restricted_to_project_ids is not None:
            self.restricted_to_project_ids = restricted_to_project_ids
        if restricted_to_environment_ids is not None:
            self.restricted_to_environment_ids = restricted_to_environment_ids
        if restricted_to_tenant_ids is not None:
            self.restricted_to_tenant_ids = restricted_to_tenant_ids
        if restricted_to_project_group_ids is not None:
            self.restricted_to_project_group_ids = restricted_to_project_group_ids
        if space_id is not None:
            self.space_id = space_id

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


        :return: The restricted_to_project_ids of this UserPermissionRestriction.  # noqa: E501
        :rtype: list[str]
        """
        return self._restricted_to_project_ids

    @restricted_to_project_ids.setter
    def restricted_to_project_ids(self, restricted_to_project_ids):
        """Sets the restricted_to_project_ids of this UserPermissionRestriction.


        :param restricted_to_project_ids: The restricted_to_project_ids of this UserPermissionRestriction.  # noqa: E501
        :type: list[str]
        """

        self._restricted_to_project_ids = restricted_to_project_ids

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


        :return: The restricted_to_environment_ids of this UserPermissionRestriction.  # noqa: E501
        :rtype: list[str]
        """
        return self._restricted_to_environment_ids

    @restricted_to_environment_ids.setter
    def restricted_to_environment_ids(self, restricted_to_environment_ids):
        """Sets the restricted_to_environment_ids of this UserPermissionRestriction.


        :param restricted_to_environment_ids: The restricted_to_environment_ids of this UserPermissionRestriction.  # noqa: E501
        :type: list[str]
        """

        self._restricted_to_environment_ids = restricted_to_environment_ids

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


        :return: The restricted_to_tenant_ids of this UserPermissionRestriction.  # noqa: E501
        :rtype: list[str]
        """
        return self._restricted_to_tenant_ids

    @restricted_to_tenant_ids.setter
    def restricted_to_tenant_ids(self, restricted_to_tenant_ids):
        """Sets the restricted_to_tenant_ids of this UserPermissionRestriction.


        :param restricted_to_tenant_ids: The restricted_to_tenant_ids of this UserPermissionRestriction.  # noqa: E501
        :type: list[str]
        """

        self._restricted_to_tenant_ids = restricted_to_tenant_ids

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


        :return: The restricted_to_project_group_ids of this UserPermissionRestriction.  # noqa: E501
        :rtype: list[str]
        """
        return self._restricted_to_project_group_ids

    @restricted_to_project_group_ids.setter
    def restricted_to_project_group_ids(self, restricted_to_project_group_ids):
        """Sets the restricted_to_project_group_ids of this UserPermissionRestriction.


        :param restricted_to_project_group_ids: The restricted_to_project_group_ids of this UserPermissionRestriction.  # noqa: E501
        :type: list[str]
        """

        self._restricted_to_project_group_ids = restricted_to_project_group_ids

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


        :return: The space_id of this UserPermissionRestriction.  # noqa: E501
        :rtype: str
        """
        return self._space_id

    @space_id.setter
    def space_id(self, space_id):
        """Sets the space_id of this UserPermissionRestriction.


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

        self._space_id = space_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(UserPermissionRestriction, 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, UserPermissionRestriction):
            return False

        return self.__dict__ == other.__dict__

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