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 V1ImageVolumeSource(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 'pull_policy': 'str',37 'reference': 'str'38 }39 40 attribute_map = {41 'pull_policy': 'pullPolicy',42 'reference': 'reference'43 }44 45 def __init__(self, pull_policy=None, reference=None, local_vars_configuration=None): # noqa: E50146 """V1ImageVolumeSource - 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._pull_policy = None52 self._reference = None53 self.discriminator = None54 55 if pull_policy is not None:56 self.pull_policy = pull_policy57 if reference is not None:58 self.reference = reference59 60 @property61 def pull_policy(self):62 """Gets the pull_policy of this V1ImageVolumeSource. # noqa: E50163 64 Policy for pulling OCI objects. Possible values are: Always: the kubelet always attempts to pull the reference. Container creation will fail If the pull fails. Never: the kubelet never pulls the reference and only uses a local image or artifact. Container creation will fail if the reference isn't present. IfNotPresent: the kubelet pulls if the reference isn't already present on disk. Container creation will fail if the reference isn't present and the pull fails. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. # noqa: E50165 66 :return: The pull_policy of this V1ImageVolumeSource. # noqa: E50167 :rtype: str68 """69 return self._pull_policy70 71 @pull_policy.setter72 def pull_policy(self, pull_policy):73 """Sets the pull_policy of this V1ImageVolumeSource.74 75 Policy for pulling OCI objects. Possible values are: Always: the kubelet always attempts to pull the reference. Container creation will fail If the pull fails. Never: the kubelet never pulls the reference and only uses a local image or artifact. Container creation will fail if the reference isn't present. IfNotPresent: the kubelet pulls if the reference isn't already present on disk. Container creation will fail if the reference isn't present and the pull fails. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. # noqa: E50176 77 :param pull_policy: The pull_policy of this V1ImageVolumeSource. # noqa: E50178 :type: str79 """80 81 self._pull_policy = pull_policy82 83 @property84 def reference(self):85 """Gets the reference of this V1ImageVolumeSource. # noqa: E50186 87 Required: Image or artifact reference to be used. Behaves in the same way as pod.spec.containers[*].image. Pull secrets will be assembled in the same way as for the container image by looking up node credentials, SA image pull secrets, and pod spec image pull secrets. More info: https://kubernetes.io/docs/concepts/containers/images This field is optional to allow higher level config management to default or override container images in workload controllers like Deployments and StatefulSets. # noqa: E50188 89 :return: The reference of this V1ImageVolumeSource. # noqa: E50190 :rtype: str91 """92 return self._reference93 94 @reference.setter95 def reference(self, reference):96 """Sets the reference of this V1ImageVolumeSource.97 98 Required: Image or artifact reference to be used. Behaves in the same way as pod.spec.containers[*].image. Pull secrets will be assembled in the same way as for the container image by looking up node credentials, SA image pull secrets, and pod spec image pull secrets. More info: https://kubernetes.io/docs/concepts/containers/images This field is optional to allow higher level config management to default or override container images in workload controllers like Deployments and StatefulSets. # noqa: E50199 100 :param reference: The reference of this V1ImageVolumeSource. # noqa: E501101 :type: str102 """103 104 self._reference = reference105 106 def to_dict(self):107 """Returns the model properties as a dict"""108 result = {}109 110 for attr, _ in six.iteritems(self.openapi_types):111 value = getattr(self, attr)112 if isinstance(value, list):113 result[attr] = list(map(114 lambda x: x.to_dict() if hasattr(x, "to_dict") else x,115 value116 ))117 elif hasattr(value, "to_dict"):118 result[attr] = value.to_dict()119 elif isinstance(value, dict):120 result[attr] = dict(map(121 lambda item: (item[0], item[1].to_dict())122 if hasattr(item[1], "to_dict") else item,123 value.items()124 ))125 else:126 result[attr] = value127 128 return result129 130 def to_str(self):131 """Returns the string representation of the model"""132 return pprint.pformat(self.to_dict())133 134 def __repr__(self):135 """For `print` and `pprint`"""136 return self.to_str()137 138 def __eq__(self, other):139 """Returns true if both objects are equal"""140 if not isinstance(other, V1ImageVolumeSource):141 return False142 143 return self.to_dict() == other.to_dict()144 145 def __ne__(self, other):146 """Returns true if both objects are not equal"""147 if not isinstance(other, V1ImageVolumeSource):148 return True149 150 return self.to_dict() != other.to_dict()151 