1# coding: utf-8 2""" 3 Kubernetes 4 5 No description provided (generated by Swagger Codegen 6 https://github.com/swagger-api/swagger-codegen) 7 8 OpenAPI spec version: v1.14.4 9 10 Generated by: https://github.com/swagger-api/swagger-codegen.git 11""" 12 13from pprint import pformat 14from six import iteritems 15import re 16 17 18class V1ProjectedVolumeSource(object): 19 """ 20 NOTE: This class is auto generated by the swagger code generator program. 21 Do not edit the class manually. 22 """ 23 """ 24 Attributes: 25 swagger_types (dict): The key is attribute name and the value is attribute 26 type. 27 attribute_map (dict): The key is attribute name and the value is json key 28 in definition. 29 """ 30 swagger_types = {'default_mode': 'int', 'sources': 'list[V1VolumeProjection]'} 31 32 attribute_map = {'default_mode': 'defaultMode', 'sources': 'sources'} 33 34 def __init__(self, default_mode=None, sources=None): 35 """ 36 V1ProjectedVolumeSource - a model defined in Swagger 37 """ 38 39 self._default_mode = None 40 self._sources = None 41 self.discriminator = None 42 43 if default_mode is not None: 44 self.default_mode = default_mode 45 self.sources = sources 46 47 @property 48 def default_mode(self): 49 """ 50 Gets the default_mode of this V1ProjectedVolumeSource. 51 Mode bits to use on created files by default. Must be a value between 0 52 and 0777. Directories within the path are not affected by this setting. 53 This might be in conflict with other options that affect the file mode, 54 like fsGroup, and the result can be other mode bits set. 55 56 :return: The default_mode of this V1ProjectedVolumeSource. 57 :rtype: int 58 """ 59 return self._default_mode 60 61 @default_mode.setter 62 def default_mode(self, default_mode): 63 """ 64 Sets the default_mode of this V1ProjectedVolumeSource. 65 Mode bits to use on created files by default. Must be a value between 0 66 and 0777. Directories within the path are not affected by this setting. 67 This might be in conflict with other options that affect the file mode, 68 like fsGroup, and the result can be other mode bits set. 69 70 :param default_mode: The default_mode of this V1ProjectedVolumeSource. 71 :type: int 72 """ 73 74 self._default_mode = default_mode 75 76 @property 77 def sources(self): 78 """ 79 Gets the sources of this V1ProjectedVolumeSource. 80 list of volume projections 81 82 :return: The sources of this V1ProjectedVolumeSource. 83 :rtype: list[V1VolumeProjection] 84 """ 85 return self._sources 86 87 @sources.setter 88 def sources(self, sources): 89 """ 90 Sets the sources of this V1ProjectedVolumeSource. 91 list of volume projections 92 93 :param sources: The sources of this V1ProjectedVolumeSource. 94 :type: list[V1VolumeProjection] 95 """ 96 if sources is None: 97 raise ValueError('Invalid value for `sources`, must not be `None`') 98 99 self._sources = sources 100 101 def to_dict(self): 102 """ 103 Returns the model properties as a dict 104 """ 105 result = {} 106 107 for attr, _ in iteritems(self.swagger_types): 108 value = getattr(self, attr) 109 if isinstance(value, list): 110 result[attr] = list( 111 map(lambda x: x.to_dict() if hasattr(x, 'to_dict') else x, value)) 112 elif hasattr(value, 'to_dict'): 113 result[attr] = value.to_dict() 114 elif isinstance(value, dict): 115 result[attr] = dict( 116 map( 117 lambda item: (item[0], item[1].to_dict()) 118 if hasattr(item[1], 'to_dict') else item, value.items())) 119 else: 120 result[attr] = value 121 122 return result 123 124 def to_str(self): 125 """ 126 Returns the string representation of the model 127 """ 128 return pformat(self.to_dict()) 129 130 def __repr__(self): 131 """ 132 For `print` and `pprint` 133 """ 134 return self.to_str() 135 136 def __eq__(self, other): 137 """ 138 Returns true if both objects are equal 139 """ 140 if not isinstance(other, V1ProjectedVolumeSource): 141 return False 142 143 return self.__dict__ == other.__dict__ 144 145 def __ne__(self, other): 146 """ 147 Returns true if both objects are not equal 148 """ 149 return not self == other 150