Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
v1_pod_template.py203 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 V1PodTemplate(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        'kind': 'str',38        'metadata': 'V1ObjectMeta',39        'template': 'V1PodTemplateSpec'40    }41 42    attribute_map = {43        'api_version': 'apiVersion',44        'kind': 'kind',45        'metadata': 'metadata',46        'template': 'template'47    }48 49    def __init__(self, api_version=None, kind=None, metadata=None, template=None, local_vars_configuration=None):  # noqa: E50150        """V1PodTemplate - 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._api_version = None56        self._kind = None57        self._metadata = None58        self._template = None59        self.discriminator = None60 61        if api_version is not None:62            self.api_version = api_version63        if kind is not None:64            self.kind = kind65        if metadata is not None:66            self.metadata = metadata67        if template is not None:68            self.template = template69 70    @property71    def api_version(self):72        """Gets the api_version of this V1PodTemplate.  # noqa: E50173 74        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: E50175 76        :return: The api_version of this V1PodTemplate.  # noqa: E50177        :rtype: str78        """79        return self._api_version80 81    @api_version.setter82    def api_version(self, api_version):83        """Sets the api_version of this V1PodTemplate.84 85        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: E50186 87        :param api_version: The api_version of this V1PodTemplate.  # noqa: E50188        :type: str89        """90 91        self._api_version = api_version92 93    @property94    def kind(self):95        """Gets the kind of this V1PodTemplate.  # noqa: E50196 97        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: E50198 99        :return: The kind of this V1PodTemplate.  # noqa: E501100        :rtype: str101        """102        return self._kind103 104    @kind.setter105    def kind(self, kind):106        """Sets the kind of this V1PodTemplate.107 108        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: E501109 110        :param kind: The kind of this V1PodTemplate.  # noqa: E501111        :type: str112        """113 114        self._kind = kind115 116    @property117    def metadata(self):118        """Gets the metadata of this V1PodTemplate.  # noqa: E501119 120 121        :return: The metadata of this V1PodTemplate.  # noqa: E501122        :rtype: V1ObjectMeta123        """124        return self._metadata125 126    @metadata.setter127    def metadata(self, metadata):128        """Sets the metadata of this V1PodTemplate.129 130 131        :param metadata: The metadata of this V1PodTemplate.  # noqa: E501132        :type: V1ObjectMeta133        """134 135        self._metadata = metadata136 137    @property138    def template(self):139        """Gets the template of this V1PodTemplate.  # noqa: E501140 141 142        :return: The template of this V1PodTemplate.  # noqa: E501143        :rtype: V1PodTemplateSpec144        """145        return self._template146 147    @template.setter148    def template(self, template):149        """Sets the template of this V1PodTemplate.150 151 152        :param template: The template of this V1PodTemplate.  # noqa: E501153        :type: V1PodTemplateSpec154        """155 156        self._template = template157 158    def to_dict(self):159        """Returns the model properties as a dict"""160        result = {}161 162        for attr, _ in six.iteritems(self.openapi_types):163            value = getattr(self, attr)164            if isinstance(value, list):165                result[attr] = list(map(166                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,167                    value168                ))169            elif hasattr(value, "to_dict"):170                result[attr] = value.to_dict()171            elif isinstance(value, dict):172                result[attr] = dict(map(173                    lambda item: (item[0], item[1].to_dict())174                    if hasattr(item[1], "to_dict") else item,175                    value.items()176                ))177            else:178                result[attr] = value179 180        return result181 182    def to_str(self):183        """Returns the string representation of the model"""184        return pprint.pformat(self.to_dict())185 186    def __repr__(self):187        """For `print` and `pprint`"""188        return self.to_str()189 190    def __eq__(self, other):191        """Returns true if both objects are equal"""192        if not isinstance(other, V1PodTemplate):193            return False194 195        return self.to_dict() == other.to_dict()196 197    def __ne__(self, other):198        """Returns true if both objects are not equal"""199        if not isinstance(other, V1PodTemplate):200            return True201 202        return self.to_dict() != other.to_dict()203 
codekingpro/portable-devtools · Team Ai