Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
v1_controller_revision.py234 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 V1ControllerRevision(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        'api_version': 'str',37        'data': 'object',38        'kind': 'str',39        'metadata': 'V1ObjectMeta',40        'revision': 'int'41    }42 43    attribute_map = {44        'api_version': 'apiVersion',45        'data': 'data',46        'kind': 'kind',47        'metadata': 'metadata',48        'revision': 'revision'49    }50 51    def __init__(self, api_version=None, data=None, kind=None, metadata=None, revision=None, local_vars_configuration=None):  # noqa: E50152        """V1ControllerRevision - a model defined in OpenAPI"""  # noqa: E50153        if local_vars_configuration is None:54            local_vars_configuration = Configuration()55        self.local_vars_configuration = local_vars_configuration56 57        self._api_version = None58        self._data = None59        self._kind = None60        self._metadata = None61        self._revision = None62        self.discriminator = None63 64        if api_version is not None:65            self.api_version = api_version66        if data is not None:67            self.data = data68        if kind is not None:69            self.kind = kind70        if metadata is not None:71            self.metadata = metadata72        self.revision = revision73 74    @property75    def api_version(self):76        """Gets the api_version of this V1ControllerRevision.  # noqa: E50177 78        APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources  # noqa: E50179 80        :return: The api_version of this V1ControllerRevision.  # noqa: E50181        :rtype: str82        """83        return self._api_version84 85    @api_version.setter86    def api_version(self, api_version):87        """Sets the api_version of this V1ControllerRevision.88 89        APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources  # noqa: E50190 91        :param api_version: The api_version of this V1ControllerRevision.  # noqa: E50192        :type: str93        """94 95        self._api_version = api_version96 97    @property98    def data(self):99        """Gets the data of this V1ControllerRevision.  # noqa: E501100 101        Data is the serialized representation of the state.  # noqa: E501102 103        :return: The data of this V1ControllerRevision.  # noqa: E501104        :rtype: object105        """106        return self._data107 108    @data.setter109    def data(self, data):110        """Sets the data of this V1ControllerRevision.111 112        Data is the serialized representation of the state.  # noqa: E501113 114        :param data: The data of this V1ControllerRevision.  # noqa: E501115        :type: object116        """117 118        self._data = data119 120    @property121    def kind(self):122        """Gets the kind of this V1ControllerRevision.  # noqa: E501123 124        Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds  # noqa: E501125 126        :return: The kind of this V1ControllerRevision.  # noqa: E501127        :rtype: str128        """129        return self._kind130 131    @kind.setter132    def kind(self, kind):133        """Sets the kind of this V1ControllerRevision.134 135        Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds  # noqa: E501136 137        :param kind: The kind of this V1ControllerRevision.  # noqa: E501138        :type: str139        """140 141        self._kind = kind142 143    @property144    def metadata(self):145        """Gets the metadata of this V1ControllerRevision.  # noqa: E501146 147 148        :return: The metadata of this V1ControllerRevision.  # noqa: E501149        :rtype: V1ObjectMeta150        """151        return self._metadata152 153    @metadata.setter154    def metadata(self, metadata):155        """Sets the metadata of this V1ControllerRevision.156 157 158        :param metadata: The metadata of this V1ControllerRevision.  # noqa: E501159        :type: V1ObjectMeta160        """161 162        self._metadata = metadata163 164    @property165    def revision(self):166        """Gets the revision of this V1ControllerRevision.  # noqa: E501167 168        Revision indicates the revision of the state represented by Data.  # noqa: E501169 170        :return: The revision of this V1ControllerRevision.  # noqa: E501171        :rtype: int172        """173        return self._revision174 175    @revision.setter176    def revision(self, revision):177        """Sets the revision of this V1ControllerRevision.178 179        Revision indicates the revision of the state represented by Data.  # noqa: E501180 181        :param revision: The revision of this V1ControllerRevision.  # noqa: E501182        :type: int183        """184        if self.local_vars_configuration.client_side_validation and revision is None:  # noqa: E501185            raise ValueError("Invalid value for `revision`, must not be `None`")  # noqa: E501186 187        self._revision = revision188 189    def to_dict(self):190        """Returns the model properties as a dict"""191        result = {}192 193        for attr, _ in six.iteritems(self.openapi_types):194            value = getattr(self, attr)195            if isinstance(value, list):196                result[attr] = list(map(197                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,198                    value199                ))200            elif hasattr(value, "to_dict"):201                result[attr] = value.to_dict()202            elif isinstance(value, dict):203                result[attr] = dict(map(204                    lambda item: (item[0], item[1].to_dict())205                    if hasattr(item[1], "to_dict") else item,206                    value.items()207                ))208            else:209                result[attr] = value210 211        return result212 213    def to_str(self):214        """Returns the string representation of the model"""215        return pprint.pformat(self.to_dict())216 217    def __repr__(self):218        """For `print` and `pprint`"""219        return self.to_str()220 221    def __eq__(self, other):222        """Returns true if both objects are equal"""223        if not isinstance(other, V1ControllerRevision):224            return False225 226        return self.to_dict() == other.to_dict()227 228    def __ne__(self, other):229        """Returns true if both objects are not equal"""230        if not isinstance(other, V1ControllerRevision):231            return True232 233        return self.to_dict() != other.to_dict()234 
codekingpro/portable-devtools · Team Ai