Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
v1beta1_variable.py153 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 V1beta1Variable(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        'expression': 'str',37        'name': 'str'38    }39 40    attribute_map = {41        'expression': 'expression',42        'name': 'name'43    }44 45    def __init__(self, expression=None, name=None, local_vars_configuration=None):  # noqa: E50146        """V1beta1Variable - a model defined in OpenAPI"""  # noqa: E50147        if local_vars_configuration is None:48            local_vars_configuration = Configuration()49        self.local_vars_configuration = local_vars_configuration50 51        self._expression = None52        self._name = None53        self.discriminator = None54 55        self.expression = expression56        self.name = name57 58    @property59    def expression(self):60        """Gets the expression of this V1beta1Variable.  # noqa: E50161 62        Expression is the expression that will be evaluated as the value of the variable. The CEL expression has access to the same identifiers as the CEL expressions in Validation.  # noqa: E50163 64        :return: The expression of this V1beta1Variable.  # noqa: E50165        :rtype: str66        """67        return self._expression68 69    @expression.setter70    def expression(self, expression):71        """Sets the expression of this V1beta1Variable.72 73        Expression is the expression that will be evaluated as the value of the variable. The CEL expression has access to the same identifiers as the CEL expressions in Validation.  # noqa: E50174 75        :param expression: The expression of this V1beta1Variable.  # noqa: E50176        :type: str77        """78        if self.local_vars_configuration.client_side_validation and expression is None:  # noqa: E50179            raise ValueError("Invalid value for `expression`, must not be `None`")  # noqa: E50180 81        self._expression = expression82 83    @property84    def name(self):85        """Gets the name of this V1beta1Variable.  # noqa: E50186 87        Name is the name of the variable. The name must be a valid CEL identifier and unique among all variables. The variable can be accessed in other expressions through `variables` For example, if name is \"foo\", the variable will be available as `variables.foo`  # noqa: E50188 89        :return: The name of this V1beta1Variable.  # noqa: E50190        :rtype: str91        """92        return self._name93 94    @name.setter95    def name(self, name):96        """Sets the name of this V1beta1Variable.97 98        Name is the name of the variable. The name must be a valid CEL identifier and unique among all variables. The variable can be accessed in other expressions through `variables` For example, if name is \"foo\", the variable will be available as `variables.foo`  # noqa: E50199 100        :param name: The name of this V1beta1Variable.  # noqa: E501101        :type: str102        """103        if self.local_vars_configuration.client_side_validation and name is None:  # noqa: E501104            raise ValueError("Invalid value for `name`, must not be `None`")  # noqa: E501105 106        self._name = name107 108    def to_dict(self):109        """Returns the model properties as a dict"""110        result = {}111 112        for attr, _ in six.iteritems(self.openapi_types):113            value = getattr(self, attr)114            if isinstance(value, list):115                result[attr] = list(map(116                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,117                    value118                ))119            elif hasattr(value, "to_dict"):120                result[attr] = value.to_dict()121            elif isinstance(value, dict):122                result[attr] = dict(map(123                    lambda item: (item[0], item[1].to_dict())124                    if hasattr(item[1], "to_dict") else item,125                    value.items()126                ))127            else:128                result[attr] = value129 130        return result131 132    def to_str(self):133        """Returns the string representation of the model"""134        return pprint.pformat(self.to_dict())135 136    def __repr__(self):137        """For `print` and `pprint`"""138        return self.to_str()139 140    def __eq__(self, other):141        """Returns true if both objects are equal"""142        if not isinstance(other, V1beta1Variable):143            return False144 145        return self.to_dict() == other.to_dict()146 147    def __ne__(self, other):148        """Returns true if both objects are not equal"""149        if not isinstance(other, V1beta1Variable):150            return True151 152        return self.to_dict() != other.to_dict()153 
codekingpro/portable-devtools · Team Ai