Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
v1_se_linux_options.py207 linesDownload Raw Back to models
1# coding: utf-82 3"""4    Kubernetes5 6    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)  # noqa: E5017 8    The version of the OpenAPI document: release-1.359    Generated by: https://openapi-generator.tech10"""11 12 13import pprint14import re  # noqa: F40115 16import six17 18from kubernetes.client.configuration import Configuration19 20 21class V1SELinuxOptions(object):22    """NOTE: This class is auto generated by OpenAPI Generator.23    Ref: https://openapi-generator.tech24 25    Do not edit the class manually.26    """27 28    """29    Attributes:30      openapi_types (dict): The key is attribute name31                            and the value is attribute type.32      attribute_map (dict): The key is attribute name33                            and the value is json key in definition.34    """35    openapi_types = {36        'level': 'str',37        'role': 'str',38        'type': 'str',39        'user': 'str'40    }41 42    attribute_map = {43        'level': 'level',44        'role': 'role',45        'type': 'type',46        'user': 'user'47    }48 49    def __init__(self, level=None, role=None, type=None, user=None, local_vars_configuration=None):  # noqa: E50150        """V1SELinuxOptions - a model defined in OpenAPI"""  # noqa: E50151        if local_vars_configuration is None:52            local_vars_configuration = Configuration()53        self.local_vars_configuration = local_vars_configuration54 55        self._level = None56        self._role = None57        self._type = None58        self._user = None59        self.discriminator = None60 61        if level is not None:62            self.level = level63        if role is not None:64            self.role = role65        if type is not None:66            self.type = type67        if user is not None:68            self.user = user69 70    @property71    def level(self):72        """Gets the level of this V1SELinuxOptions.  # noqa: E50173 74        Level is SELinux level label that applies to the container.  # noqa: E50175 76        :return: The level of this V1SELinuxOptions.  # noqa: E50177        :rtype: str78        """79        return self._level80 81    @level.setter82    def level(self, level):83        """Sets the level of this V1SELinuxOptions.84 85        Level is SELinux level label that applies to the container.  # noqa: E50186 87        :param level: The level of this V1SELinuxOptions.  # noqa: E50188        :type: str89        """90 91        self._level = level92 93    @property94    def role(self):95        """Gets the role of this V1SELinuxOptions.  # noqa: E50196 97        Role is a SELinux role label that applies to the container.  # noqa: E50198 99        :return: The role of this V1SELinuxOptions.  # noqa: E501100        :rtype: str101        """102        return self._role103 104    @role.setter105    def role(self, role):106        """Sets the role of this V1SELinuxOptions.107 108        Role is a SELinux role label that applies to the container.  # noqa: E501109 110        :param role: The role of this V1SELinuxOptions.  # noqa: E501111        :type: str112        """113 114        self._role = role115 116    @property117    def type(self):118        """Gets the type of this V1SELinuxOptions.  # noqa: E501119 120        Type is a SELinux type label that applies to the container.  # noqa: E501121 122        :return: The type of this V1SELinuxOptions.  # noqa: E501123        :rtype: str124        """125        return self._type126 127    @type.setter128    def type(self, type):129        """Sets the type of this V1SELinuxOptions.130 131        Type is a SELinux type label that applies to the container.  # noqa: E501132 133        :param type: The type of this V1SELinuxOptions.  # noqa: E501134        :type: str135        """136 137        self._type = type138 139    @property140    def user(self):141        """Gets the user of this V1SELinuxOptions.  # noqa: E501142 143        User is a SELinux user label that applies to the container.  # noqa: E501144 145        :return: The user of this V1SELinuxOptions.  # noqa: E501146        :rtype: str147        """148        return self._user149 150    @user.setter151    def user(self, user):152        """Sets the user of this V1SELinuxOptions.153 154        User is a SELinux user label that applies to the container.  # noqa: E501155 156        :param user: The user of this V1SELinuxOptions.  # noqa: E501157        :type: str158        """159 160        self._user = user161 162    def to_dict(self):163        """Returns the model properties as a dict"""164        result = {}165 166        for attr, _ in six.iteritems(self.openapi_types):167            value = getattr(self, attr)168            if isinstance(value, list):169                result[attr] = list(map(170                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,171                    value172                ))173            elif hasattr(value, "to_dict"):174                result[attr] = value.to_dict()175            elif isinstance(value, dict):176                result[attr] = dict(map(177                    lambda item: (item[0], item[1].to_dict())178                    if hasattr(item[1], "to_dict") else item,179                    value.items()180                ))181            else:182                result[attr] = value183 184        return result185 186    def to_str(self):187        """Returns the string representation of the model"""188        return pprint.pformat(self.to_dict())189 190    def __repr__(self):191        """For `print` and `pprint`"""192        return self.to_str()193 194    def __eq__(self, other):195        """Returns true if both objects are equal"""196        if not isinstance(other, V1SELinuxOptions):197            return False198 199        return self.to_dict() == other.to_dict()200 201    def __ne__(self, other):202        """Returns true if both objects are not equal"""203        if not isinstance(other, V1SELinuxOptions):204            return True205 206        return self.to_dict() != other.to_dict()207 
codekingpro/portable-devtools · Team Ai