codekingpro/portable-devtools
114k
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 V1beta2AllocationResult(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 'allocation_timestamp': 'datetime',37 'devices': 'V1beta2DeviceAllocationResult',38 'node_selector': 'V1NodeSelector'39 }40 41 attribute_map = {42 'allocation_timestamp': 'allocationTimestamp',43 'devices': 'devices',44 'node_selector': 'nodeSelector'45 }46 47 def __init__(self, allocation_timestamp=None, devices=None, node_selector=None, local_vars_configuration=None): # noqa: E50148 """V1beta2AllocationResult - a model defined in OpenAPI""" # noqa: E50149 if local_vars_configuration is None:50 local_vars_configuration = Configuration()51 self.local_vars_configuration = local_vars_configuration52 53 self._allocation_timestamp = None54 self._devices = None55 self._node_selector = None56 self.discriminator = None57 58 if allocation_timestamp is not None:59 self.allocation_timestamp = allocation_timestamp60 if devices is not None:61 self.devices = devices62 if node_selector is not None:63 self.node_selector = node_selector64 65 @property66 def allocation_timestamp(self):67 """Gets the allocation_timestamp of this V1beta2AllocationResult. # noqa: E50168 69 AllocationTimestamp stores the time when the resources were allocated. This field is not guaranteed to be set, in which case that time is unknown. This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus feature gate. # noqa: E50170 71 :return: The allocation_timestamp of this V1beta2AllocationResult. # noqa: E50172 :rtype: datetime73 """74 return self._allocation_timestamp75 76 @allocation_timestamp.setter77 def allocation_timestamp(self, allocation_timestamp):78 """Sets the allocation_timestamp of this V1beta2AllocationResult.79 80 AllocationTimestamp stores the time when the resources were allocated. This field is not guaranteed to be set, in which case that time is unknown. This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus feature gate. # noqa: E50181 82 :param allocation_timestamp: The allocation_timestamp of this V1beta2AllocationResult. # noqa: E50183 :type: datetime84 """85 86 self._allocation_timestamp = allocation_timestamp87 88 @property89 def devices(self):90 """Gets the devices of this V1beta2AllocationResult. # noqa: E50191 92 93 :return: The devices of this V1beta2AllocationResult. # noqa: E50194 :rtype: V1beta2DeviceAllocationResult95 """96 return self._devices97 98 @devices.setter99 def devices(self, devices):100 """Sets the devices of this V1beta2AllocationResult.101 102 103 :param devices: The devices of this V1beta2AllocationResult. # noqa: E501104 :type: V1beta2DeviceAllocationResult105 """106 107 self._devices = devices108 109 @property110 def node_selector(self):111 """Gets the node_selector of this V1beta2AllocationResult. # noqa: E501112 113 114 :return: The node_selector of this V1beta2AllocationResult. # noqa: E501115 :rtype: V1NodeSelector116 """117 return self._node_selector118 119 @node_selector.setter120 def node_selector(self, node_selector):121 """Sets the node_selector of this V1beta2AllocationResult.122 123 124 :param node_selector: The node_selector of this V1beta2AllocationResult. # noqa: E501125 :type: V1NodeSelector126 """127 128 self._node_selector = node_selector129 130 def to_dict(self):131 """Returns the model properties as a dict"""132 result = {}133 134 for attr, _ in six.iteritems(self.openapi_types):135 value = getattr(self, attr)136 if isinstance(value, list):137 result[attr] = list(map(138 lambda x: x.to_dict() if hasattr(x, "to_dict") else x,139 value140 ))141 elif hasattr(value, "to_dict"):142 result[attr] = value.to_dict()143 elif isinstance(value, dict):144 result[attr] = dict(map(145 lambda item: (item[0], item[1].to_dict())146 if hasattr(item[1], "to_dict") else item,147 value.items()148 ))149 else:150 result[attr] = value151 152 return result153 154 def to_str(self):155 """Returns the string representation of the model"""156 return pprint.pformat(self.to_dict())157 158 def __repr__(self):159 """For `print` and `pprint`"""160 return self.to_str()161 162 def __eq__(self, other):163 """Returns true if both objects are equal"""164 if not isinstance(other, V1beta2AllocationResult):165 return False166 167 return self.to_dict() == other.to_dict()168 169 def __ne__(self, other):170 """Returns true if both objects are not equal"""171 if not isinstance(other, V1beta2AllocationResult):172 return True173 174 return self.to_dict() != other.to_dict()175 