Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
v1_lifecycle_handler.py199 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 V1LifecycleHandler(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        '_exec': 'V1ExecAction',37        'http_get': 'V1HTTPGetAction',38        'sleep': 'V1SleepAction',39        'tcp_socket': 'V1TCPSocketAction'40    }41 42    attribute_map = {43        '_exec': 'exec',44        'http_get': 'httpGet',45        'sleep': 'sleep',46        'tcp_socket': 'tcpSocket'47    }48 49    def __init__(self, _exec=None, http_get=None, sleep=None, tcp_socket=None, local_vars_configuration=None):  # noqa: E50150        """V1LifecycleHandler - 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.__exec = None56        self._http_get = None57        self._sleep = None58        self._tcp_socket = None59        self.discriminator = None60 61        if _exec is not None:62            self._exec = _exec63        if http_get is not None:64            self.http_get = http_get65        if sleep is not None:66            self.sleep = sleep67        if tcp_socket is not None:68            self.tcp_socket = tcp_socket69 70    @property71    def _exec(self):72        """Gets the _exec of this V1LifecycleHandler.  # noqa: E50173 74 75        :return: The _exec of this V1LifecycleHandler.  # noqa: E50176        :rtype: V1ExecAction77        """78        return self.__exec79 80    @_exec.setter81    def _exec(self, _exec):82        """Sets the _exec of this V1LifecycleHandler.83 84 85        :param _exec: The _exec of this V1LifecycleHandler.  # noqa: E50186        :type: V1ExecAction87        """88 89        self.__exec = _exec90 91    @property92    def http_get(self):93        """Gets the http_get of this V1LifecycleHandler.  # noqa: E50194 95 96        :return: The http_get of this V1LifecycleHandler.  # noqa: E50197        :rtype: V1HTTPGetAction98        """99        return self._http_get100 101    @http_get.setter102    def http_get(self, http_get):103        """Sets the http_get of this V1LifecycleHandler.104 105 106        :param http_get: The http_get of this V1LifecycleHandler.  # noqa: E501107        :type: V1HTTPGetAction108        """109 110        self._http_get = http_get111 112    @property113    def sleep(self):114        """Gets the sleep of this V1LifecycleHandler.  # noqa: E501115 116 117        :return: The sleep of this V1LifecycleHandler.  # noqa: E501118        :rtype: V1SleepAction119        """120        return self._sleep121 122    @sleep.setter123    def sleep(self, sleep):124        """Sets the sleep of this V1LifecycleHandler.125 126 127        :param sleep: The sleep of this V1LifecycleHandler.  # noqa: E501128        :type: V1SleepAction129        """130 131        self._sleep = sleep132 133    @property134    def tcp_socket(self):135        """Gets the tcp_socket of this V1LifecycleHandler.  # noqa: E501136 137 138        :return: The tcp_socket of this V1LifecycleHandler.  # noqa: E501139        :rtype: V1TCPSocketAction140        """141        return self._tcp_socket142 143    @tcp_socket.setter144    def tcp_socket(self, tcp_socket):145        """Sets the tcp_socket of this V1LifecycleHandler.146 147 148        :param tcp_socket: The tcp_socket of this V1LifecycleHandler.  # noqa: E501149        :type: V1TCPSocketAction150        """151 152        self._tcp_socket = tcp_socket153 154    def to_dict(self):155        """Returns the model properties as a dict"""156        result = {}157 158        for attr, _ in six.iteritems(self.openapi_types):159            value = getattr(self, attr)160            if isinstance(value, list):161                result[attr] = list(map(162                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,163                    value164                ))165            elif hasattr(value, "to_dict"):166                result[attr] = value.to_dict()167            elif isinstance(value, dict):168                result[attr] = dict(map(169                    lambda item: (item[0], item[1].to_dict())170                    if hasattr(item[1], "to_dict") else item,171                    value.items()172                ))173            else:174                result[attr] = value175 176        return result177 178    def to_str(self):179        """Returns the string representation of the model"""180        return pprint.pformat(self.to_dict())181 182    def __repr__(self):183        """For `print` and `pprint`"""184        return self.to_str()185 186    def __eq__(self, other):187        """Returns true if both objects are equal"""188        if not isinstance(other, V1LifecycleHandler):189            return False190 191        return self.to_dict() == other.to_dict()192 193    def __ne__(self, other):194        """Returns true if both objects are not equal"""195        if not isinstance(other, V1LifecycleHandler):196            return True197 198        return self.to_dict() != other.to_dict()199 
codekingpro/portable-devtools · Team Ai