Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
v1alpha1_workload_spec.py150 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 V1alpha1WorkloadSpec(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        'controller_ref': 'V1alpha1TypedLocalObjectReference',37        'pod_groups': 'list[V1alpha1PodGroup]'38    }39 40    attribute_map = {41        'controller_ref': 'controllerRef',42        'pod_groups': 'podGroups'43    }44 45    def __init__(self, controller_ref=None, pod_groups=None, local_vars_configuration=None):  # noqa: E50146        """V1alpha1WorkloadSpec - 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._controller_ref = None52        self._pod_groups = None53        self.discriminator = None54 55        if controller_ref is not None:56            self.controller_ref = controller_ref57        self.pod_groups = pod_groups58 59    @property60    def controller_ref(self):61        """Gets the controller_ref of this V1alpha1WorkloadSpec.  # noqa: E50162 63 64        :return: The controller_ref of this V1alpha1WorkloadSpec.  # noqa: E50165        :rtype: V1alpha1TypedLocalObjectReference66        """67        return self._controller_ref68 69    @controller_ref.setter70    def controller_ref(self, controller_ref):71        """Sets the controller_ref of this V1alpha1WorkloadSpec.72 73 74        :param controller_ref: The controller_ref of this V1alpha1WorkloadSpec.  # noqa: E50175        :type: V1alpha1TypedLocalObjectReference76        """77 78        self._controller_ref = controller_ref79 80    @property81    def pod_groups(self):82        """Gets the pod_groups of this V1alpha1WorkloadSpec.  # noqa: E50183 84        PodGroups is the list of pod groups that make up the Workload. The maximum number of pod groups is 8. This field is immutable.  # noqa: E50185 86        :return: The pod_groups of this V1alpha1WorkloadSpec.  # noqa: E50187        :rtype: list[V1alpha1PodGroup]88        """89        return self._pod_groups90 91    @pod_groups.setter92    def pod_groups(self, pod_groups):93        """Sets the pod_groups of this V1alpha1WorkloadSpec.94 95        PodGroups is the list of pod groups that make up the Workload. The maximum number of pod groups is 8. This field is immutable.  # noqa: E50196 97        :param pod_groups: The pod_groups of this V1alpha1WorkloadSpec.  # noqa: E50198        :type: list[V1alpha1PodGroup]99        """100        if self.local_vars_configuration.client_side_validation and pod_groups is None:  # noqa: E501101            raise ValueError("Invalid value for `pod_groups`, must not be `None`")  # noqa: E501102 103        self._pod_groups = pod_groups104 105    def to_dict(self):106        """Returns the model properties as a dict"""107        result = {}108 109        for attr, _ in six.iteritems(self.openapi_types):110            value = getattr(self, attr)111            if isinstance(value, list):112                result[attr] = list(map(113                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,114                    value115                ))116            elif hasattr(value, "to_dict"):117                result[attr] = value.to_dict()118            elif isinstance(value, dict):119                result[attr] = dict(map(120                    lambda item: (item[0], item[1].to_dict())121                    if hasattr(item[1], "to_dict") else item,122                    value.items()123                ))124            else:125                result[attr] = value126 127        return result128 129    def to_str(self):130        """Returns the string representation of the model"""131        return pprint.pformat(self.to_dict())132 133    def __repr__(self):134        """For `print` and `pprint`"""135        return self.to_str()136 137    def __eq__(self, other):138        """Returns true if both objects are equal"""139        if not isinstance(other, V1alpha1WorkloadSpec):140            return False141 142        return self.to_dict() == other.to_dict()143 144    def __ne__(self, other):145        """Returns true if both objects are not equal"""146        if not isinstance(other, V1alpha1WorkloadSpec):147            return True148 149        return self.to_dict() != other.to_dict()150 
codekingpro/portable-devtools · Team Ai