Class: Zilla::IoK8sApiCoreV1PersistentVolumeSpec
- Inherits:
-
Object
- Object
- Zilla::IoK8sApiCoreV1PersistentVolumeSpec
- Defined in:
- lib/zilla/models/io_k8s_api_core_v1_persistent_volume_spec.rb
Overview
PersistentVolumeSpec is the specification of a persistent volume.
Instance Attribute Summary collapse
-
#access_modes ⇒ Object
accessModes contains all ways the volume can be mounted.
-
#aws_elastic_block_store ⇒ Object
Returns the value of attribute aws_elastic_block_store.
-
#azure_disk ⇒ Object
Returns the value of attribute azure_disk.
-
#azure_file ⇒ Object
Returns the value of attribute azure_file.
-
#capacity ⇒ Object
capacity is the description of the persistent volume’s resources and capacity.
-
#cephfs ⇒ Object
Returns the value of attribute cephfs.
-
#cinder ⇒ Object
Returns the value of attribute cinder.
-
#claim_ref ⇒ Object
Returns the value of attribute claim_ref.
-
#csi ⇒ Object
Returns the value of attribute csi.
-
#fc ⇒ Object
Returns the value of attribute fc.
-
#flex_volume ⇒ Object
Returns the value of attribute flex_volume.
-
#flocker ⇒ Object
Returns the value of attribute flocker.
-
#gce_persistent_disk ⇒ Object
Returns the value of attribute gce_persistent_disk.
-
#glusterfs ⇒ Object
Returns the value of attribute glusterfs.
-
#host_path ⇒ Object
Returns the value of attribute host_path.
-
#iscsi ⇒ Object
Returns the value of attribute iscsi.
-
#local ⇒ Object
Returns the value of attribute local.
-
#mount_options ⇒ Object
mountOptions is the list of mount options, e.g.
-
#nfs ⇒ Object
Returns the value of attribute nfs.
-
#node_affinity ⇒ Object
Returns the value of attribute node_affinity.
-
#persistent_volume_reclaim_policy ⇒ Object
persistentVolumeReclaimPolicy defines what happens to a persistent volume when released from its claim.
-
#photon_persistent_disk ⇒ Object
Returns the value of attribute photon_persistent_disk.
-
#portworx_volume ⇒ Object
Returns the value of attribute portworx_volume.
-
#quobyte ⇒ Object
Returns the value of attribute quobyte.
-
#rbd ⇒ Object
Returns the value of attribute rbd.
-
#scale_io ⇒ Object
Returns the value of attribute scale_io.
-
#storage_class_name ⇒ Object
storageClassName is the name of StorageClass to which this persistent volume belongs.
-
#storageos ⇒ Object
Returns the value of attribute storageos.
-
#volume_mode ⇒ Object
volumeMode defines if a volume is intended to be used with a formatted filesystem or to remain in raw block state.
-
#vsphere_volume ⇒ Object
Returns the value of attribute vsphere_volume.
Class Method Summary collapse
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ IoK8sApiCoreV1PersistentVolumeSpec
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ IoK8sApiCoreV1PersistentVolumeSpec
Initializes the object
124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 |
# File 'lib/zilla/models/io_k8s_api_core_v1_persistent_volume_spec.rb', line 124 def initialize(attributes = {}) unless attributes.is_a?(Hash) raise ArgumentError, 'The input argument (attributes) must be a hash in `Zilla::IoK8sApiCoreV1PersistentVolumeSpec` initialize method' end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) do |(k, v), h| unless self.class.attribute_map.key?(k.to_sym) raise ArgumentError, "`#{k}` is not a valid attribute in `Zilla::IoK8sApiCoreV1PersistentVolumeSpec`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v end if attributes.key?(:access_modes) && (value = attributes[:access_modes]).is_a?(Array) self.access_modes = value end self.aws_elastic_block_store = attributes[:aws_elastic_block_store] if attributes.key?(:aws_elastic_block_store) self.azure_disk = attributes[:azure_disk] if attributes.key?(:azure_disk) self.azure_file = attributes[:azure_file] if attributes.key?(:azure_file) if attributes.key?(:capacity) && (value = attributes[:capacity]).is_a?(Hash) self.capacity = value end self.cephfs = attributes[:cephfs] if attributes.key?(:cephfs) self.cinder = attributes[:cinder] if attributes.key?(:cinder) self.claim_ref = attributes[:claim_ref] if attributes.key?(:claim_ref) self.csi = attributes[:csi] if attributes.key?(:csi) self.fc = attributes[:fc] if attributes.key?(:fc) self.flex_volume = attributes[:flex_volume] if attributes.key?(:flex_volume) self.flocker = attributes[:flocker] if attributes.key?(:flocker) self.gce_persistent_disk = attributes[:gce_persistent_disk] if attributes.key?(:gce_persistent_disk) self.glusterfs = attributes[:glusterfs] if attributes.key?(:glusterfs) self.host_path = attributes[:host_path] if attributes.key?(:host_path) self.iscsi = attributes[:iscsi] if attributes.key?(:iscsi) self.local = attributes[:local] if attributes.key?(:local) if attributes.key?(:mount_options) && (value = attributes[:mount_options]).is_a?(Array) self. = value end self.nfs = attributes[:nfs] if attributes.key?(:nfs) self.node_affinity = attributes[:node_affinity] if attributes.key?(:node_affinity) if attributes.key?(:persistent_volume_reclaim_policy) self.persistent_volume_reclaim_policy = attributes[:persistent_volume_reclaim_policy] end self.photon_persistent_disk = attributes[:photon_persistent_disk] if attributes.key?(:photon_persistent_disk) self.portworx_volume = attributes[:portworx_volume] if attributes.key?(:portworx_volume) self.quobyte = attributes[:quobyte] if attributes.key?(:quobyte) self.rbd = attributes[:rbd] if attributes.key?(:rbd) self.scale_io = attributes[:scale_io] if attributes.key?(:scale_io) self.storage_class_name = attributes[:storage_class_name] if attributes.key?(:storage_class_name) self.storageos = attributes[:storageos] if attributes.key?(:storageos) self.volume_mode = attributes[:volume_mode] if attributes.key?(:volume_mode) return unless attributes.key?(:vsphere_volume) self.vsphere_volume = attributes[:vsphere_volume] end |
Instance Attribute Details
#access_modes ⇒ Object
accessModes contains all ways the volume can be mounted. More info: kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes
20 21 22 |
# File 'lib/zilla/models/io_k8s_api_core_v1_persistent_volume_spec.rb', line 20 def access_modes @access_modes end |
#aws_elastic_block_store ⇒ Object
Returns the value of attribute aws_elastic_block_store.
22 23 24 |
# File 'lib/zilla/models/io_k8s_api_core_v1_persistent_volume_spec.rb', line 22 def aws_elastic_block_store @aws_elastic_block_store end |
#azure_disk ⇒ Object
Returns the value of attribute azure_disk.
22 23 24 |
# File 'lib/zilla/models/io_k8s_api_core_v1_persistent_volume_spec.rb', line 22 def azure_disk @azure_disk end |
#azure_file ⇒ Object
Returns the value of attribute azure_file.
22 23 24 |
# File 'lib/zilla/models/io_k8s_api_core_v1_persistent_volume_spec.rb', line 22 def azure_file @azure_file end |
#capacity ⇒ Object
capacity is the description of the persistent volume’s resources and capacity. More info: kubernetes.io/docs/concepts/storage/persistent-volumes#capacity
26 27 28 |
# File 'lib/zilla/models/io_k8s_api_core_v1_persistent_volume_spec.rb', line 26 def capacity @capacity end |
#cephfs ⇒ Object
Returns the value of attribute cephfs.
22 23 24 |
# File 'lib/zilla/models/io_k8s_api_core_v1_persistent_volume_spec.rb', line 22 def cephfs @cephfs end |
#cinder ⇒ Object
Returns the value of attribute cinder.
22 23 24 |
# File 'lib/zilla/models/io_k8s_api_core_v1_persistent_volume_spec.rb', line 22 def cinder @cinder end |
#claim_ref ⇒ Object
Returns the value of attribute claim_ref.
22 23 24 |
# File 'lib/zilla/models/io_k8s_api_core_v1_persistent_volume_spec.rb', line 22 def claim_ref @claim_ref end |
#csi ⇒ Object
Returns the value of attribute csi.
22 23 24 |
# File 'lib/zilla/models/io_k8s_api_core_v1_persistent_volume_spec.rb', line 22 def csi @csi end |
#fc ⇒ Object
Returns the value of attribute fc.
22 23 24 |
# File 'lib/zilla/models/io_k8s_api_core_v1_persistent_volume_spec.rb', line 22 def fc @fc end |
#flex_volume ⇒ Object
Returns the value of attribute flex_volume.
22 23 24 |
# File 'lib/zilla/models/io_k8s_api_core_v1_persistent_volume_spec.rb', line 22 def flex_volume @flex_volume end |
#flocker ⇒ Object
Returns the value of attribute flocker.
22 23 24 |
# File 'lib/zilla/models/io_k8s_api_core_v1_persistent_volume_spec.rb', line 22 def flocker @flocker end |
#gce_persistent_disk ⇒ Object
Returns the value of attribute gce_persistent_disk.
22 23 24 |
# File 'lib/zilla/models/io_k8s_api_core_v1_persistent_volume_spec.rb', line 22 def gce_persistent_disk @gce_persistent_disk end |
#glusterfs ⇒ Object
Returns the value of attribute glusterfs.
22 23 24 |
# File 'lib/zilla/models/io_k8s_api_core_v1_persistent_volume_spec.rb', line 22 def glusterfs @glusterfs end |
#host_path ⇒ Object
Returns the value of attribute host_path.
22 23 24 |
# File 'lib/zilla/models/io_k8s_api_core_v1_persistent_volume_spec.rb', line 22 def host_path @host_path end |
#iscsi ⇒ Object
Returns the value of attribute iscsi.
22 23 24 |
# File 'lib/zilla/models/io_k8s_api_core_v1_persistent_volume_spec.rb', line 22 def iscsi @iscsi end |
#local ⇒ Object
Returns the value of attribute local.
22 23 24 |
# File 'lib/zilla/models/io_k8s_api_core_v1_persistent_volume_spec.rb', line 22 def local @local end |
#mount_options ⇒ Object
mountOptions is the list of mount options, e.g. ["ro", "soft"]. Not validated - mount will simply fail if one is invalid. More info: kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options
29 30 31 |
# File 'lib/zilla/models/io_k8s_api_core_v1_persistent_volume_spec.rb', line 29 def @mount_options end |
#nfs ⇒ Object
Returns the value of attribute nfs.
22 23 24 |
# File 'lib/zilla/models/io_k8s_api_core_v1_persistent_volume_spec.rb', line 22 def nfs @nfs end |
#node_affinity ⇒ Object
Returns the value of attribute node_affinity.
22 23 24 |
# File 'lib/zilla/models/io_k8s_api_core_v1_persistent_volume_spec.rb', line 22 def node_affinity @node_affinity end |
#persistent_volume_reclaim_policy ⇒ Object
persistentVolumeReclaimPolicy defines what happens to a persistent volume when released from its claim. Valid options are Retain (default for manually created PersistentVolumes), Delete (default for dynamically provisioned PersistentVolumes), and Recycle (deprecated). Recycle must be supported by the volume plugin underlying this PersistentVolume. More info: kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming
32 33 34 |
# File 'lib/zilla/models/io_k8s_api_core_v1_persistent_volume_spec.rb', line 32 def persistent_volume_reclaim_policy @persistent_volume_reclaim_policy end |
#photon_persistent_disk ⇒ Object
Returns the value of attribute photon_persistent_disk.
22 23 24 |
# File 'lib/zilla/models/io_k8s_api_core_v1_persistent_volume_spec.rb', line 22 def photon_persistent_disk @photon_persistent_disk end |
#portworx_volume ⇒ Object
Returns the value of attribute portworx_volume.
22 23 24 |
# File 'lib/zilla/models/io_k8s_api_core_v1_persistent_volume_spec.rb', line 22 def portworx_volume @portworx_volume end |
#quobyte ⇒ Object
Returns the value of attribute quobyte.
22 23 24 |
# File 'lib/zilla/models/io_k8s_api_core_v1_persistent_volume_spec.rb', line 22 def quobyte @quobyte end |
#rbd ⇒ Object
Returns the value of attribute rbd.
22 23 24 |
# File 'lib/zilla/models/io_k8s_api_core_v1_persistent_volume_spec.rb', line 22 def rbd @rbd end |
#scale_io ⇒ Object
Returns the value of attribute scale_io.
22 23 24 |
# File 'lib/zilla/models/io_k8s_api_core_v1_persistent_volume_spec.rb', line 22 def scale_io @scale_io end |
#storage_class_name ⇒ Object
storageClassName is the name of StorageClass to which this persistent volume belongs. Empty value means that this volume does not belong to any StorageClass.
35 36 37 |
# File 'lib/zilla/models/io_k8s_api_core_v1_persistent_volume_spec.rb', line 35 def storage_class_name @storage_class_name end |
#storageos ⇒ Object
Returns the value of attribute storageos.
22 23 24 |
# File 'lib/zilla/models/io_k8s_api_core_v1_persistent_volume_spec.rb', line 22 def storageos @storageos end |
#volume_mode ⇒ Object
volumeMode defines if a volume is intended to be used with a formatted filesystem or to remain in raw block state. Value of Filesystem is implied when not included in spec.
38 39 40 |
# File 'lib/zilla/models/io_k8s_api_core_v1_persistent_volume_spec.rb', line 38 def volume_mode @volume_mode end |
#vsphere_volume ⇒ Object
Returns the value of attribute vsphere_volume.
22 23 24 |
# File 'lib/zilla/models/io_k8s_api_core_v1_persistent_volume_spec.rb', line 22 def vsphere_volume @vsphere_volume end |
Class Method Details
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
77 78 79 |
# File 'lib/zilla/models/io_k8s_api_core_v1_persistent_volume_spec.rb', line 77 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
# File 'lib/zilla/models/io_k8s_api_core_v1_persistent_volume_spec.rb', line 41 def self.attribute_map { access_modes: :accessModes, aws_elastic_block_store: :awsElasticBlockStore, azure_disk: :azureDisk, azure_file: :azureFile, capacity: :capacity, cephfs: :cephfs, cinder: :cinder, claim_ref: :claimRef, csi: :csi, fc: :fc, flex_volume: :flexVolume, flocker: :flocker, gce_persistent_disk: :gcePersistentDisk, glusterfs: :glusterfs, host_path: :hostPath, iscsi: :iscsi, local: :local, mount_options: :mountOptions, nfs: :nfs, node_affinity: :nodeAffinity, persistent_volume_reclaim_policy: :persistentVolumeReclaimPolicy, photon_persistent_disk: :photonPersistentDisk, portworx_volume: :portworxVolume, quobyte: :quobyte, rbd: :rbd, scale_io: :scaleIO, storage_class_name: :storageClassName, storageos: :storageos, volume_mode: :volumeMode, vsphere_volume: :vsphereVolume } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
277 278 279 |
# File 'lib/zilla/models/io_k8s_api_core_v1_persistent_volume_spec.rb', line 277 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
118 119 120 |
# File 'lib/zilla/models/io_k8s_api_core_v1_persistent_volume_spec.rb', line 118 def self.openapi_nullable Set.new([]) end |
.openapi_types ⇒ Object
Attribute type mapping.
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
# File 'lib/zilla/models/io_k8s_api_core_v1_persistent_volume_spec.rb', line 82 def self.openapi_types { access_modes: :'Array<String>', aws_elastic_block_store: :IoK8sApiCoreV1AWSElasticBlockStoreVolumeSource, azure_disk: :IoK8sApiCoreV1AzureDiskVolumeSource, azure_file: :IoK8sApiCoreV1AzureFilePersistentVolumeSource, capacity: :'Hash<String, String>', cephfs: :IoK8sApiCoreV1CephFSPersistentVolumeSource, cinder: :IoK8sApiCoreV1CinderPersistentVolumeSource, claim_ref: :IoK8sApiCoreV1ObjectReference, csi: :IoK8sApiCoreV1CSIPersistentVolumeSource, fc: :IoK8sApiCoreV1FCVolumeSource, flex_volume: :IoK8sApiCoreV1FlexPersistentVolumeSource, flocker: :IoK8sApiCoreV1FlockerVolumeSource, gce_persistent_disk: :IoK8sApiCoreV1GCEPersistentDiskVolumeSource, glusterfs: :IoK8sApiCoreV1GlusterfsPersistentVolumeSource, host_path: :IoK8sApiCoreV1HostPathVolumeSource, iscsi: :IoK8sApiCoreV1ISCSIPersistentVolumeSource, local: :IoK8sApiCoreV1LocalVolumeSource, mount_options: :'Array<String>', nfs: :IoK8sApiCoreV1NFSVolumeSource, node_affinity: :IoK8sApiCoreV1VolumeNodeAffinity, persistent_volume_reclaim_policy: :String, photon_persistent_disk: :IoK8sApiCoreV1PhotonPersistentDiskVolumeSource, portworx_volume: :IoK8sApiCoreV1PortworxVolumeSource, quobyte: :IoK8sApiCoreV1QuobyteVolumeSource, rbd: :IoK8sApiCoreV1RBDPersistentVolumeSource, scale_io: :IoK8sApiCoreV1ScaleIOPersistentVolumeSource, storage_class_name: :String, storageos: :IoK8sApiCoreV1StorageOSPersistentVolumeSource, volume_mode: :String, vsphere_volume: :IoK8sApiCoreV1VsphereVirtualDiskVolumeSource } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 |
# File 'lib/zilla/models/io_k8s_api_core_v1_persistent_volume_spec.rb', line 225 def ==(other) return true if equal?(other) self.class == other.class && access_modes == other.access_modes && aws_elastic_block_store == other.aws_elastic_block_store && azure_disk == other.azure_disk && azure_file == other.azure_file && capacity == other.capacity && cephfs == other.cephfs && cinder == other.cinder && claim_ref == other.claim_ref && csi == other.csi && fc == other.fc && flex_volume == other.flex_volume && flocker == other.flocker && gce_persistent_disk == other.gce_persistent_disk && glusterfs == other.glusterfs && host_path == other.host_path && iscsi == other.iscsi && local == other.local && == other. && nfs == other.nfs && node_affinity == other.node_affinity && persistent_volume_reclaim_policy == other.persistent_volume_reclaim_policy && photon_persistent_disk == other.photon_persistent_disk && portworx_volume == other.portworx_volume && quobyte == other.quobyte && rbd == other.rbd && scale_io == other.scale_io && storage_class_name == other.storage_class_name && storageos == other.storageos && volume_mode == other.volume_mode && vsphere_volume == other.vsphere_volume end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 |
# File 'lib/zilla/models/io_k8s_api_core_v1_persistent_volume_spec.rb', line 311 def _deserialize(type, value) case type.to_sym when :Time Time.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model # models (e.g. Pet) or oneOf klass = Zilla.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
382 383 384 385 386 387 388 389 390 391 392 393 394 |
# File 'lib/zilla/models/io_k8s_api_core_v1_persistent_volume_spec.rb', line 382 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 |
# File 'lib/zilla/models/io_k8s_api_core_v1_persistent_volume_spec.rb', line 284 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) send("#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) send("#{key}=", attributes[self.class.attribute_map[key]].map do |v| _deserialize(::Regexp.last_match(1), v) end) end elsif !attributes[self.class.attribute_map[key]].nil? send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end self end |
#eql?(other) ⇒ Boolean
263 264 265 |
# File 'lib/zilla/models/io_k8s_api_core_v1_persistent_volume_spec.rb', line 263 def eql?(other) self == other end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
269 270 271 272 |
# File 'lib/zilla/models/io_k8s_api_core_v1_persistent_volume_spec.rb', line 269 def hash [access_modes, aws_elastic_block_store, azure_disk, azure_file, capacity, cephfs, cinder, claim_ref, csi, fc, flex_volume, flocker, gce_persistent_disk, glusterfs, host_path, iscsi, local, , nfs, node_affinity, persistent_volume_reclaim_policy, photon_persistent_disk, portworx_volume, quobyte, rbd, scale_io, storage_class_name, storageos, volume_mode, vsphere_volume].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
213 214 215 |
# File 'lib/zilla/models/io_k8s_api_core_v1_persistent_volume_spec.rb', line 213 def list_invalid_properties [] end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
358 359 360 |
# File 'lib/zilla/models/io_k8s_api_core_v1_persistent_volume_spec.rb', line 358 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
364 365 366 367 368 369 370 371 372 373 374 375 376 |
# File 'lib/zilla/models/io_k8s_api_core_v1_persistent_volume_spec.rb', line 364 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
352 353 354 |
# File 'lib/zilla/models/io_k8s_api_core_v1_persistent_volume_spec.rb', line 352 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
219 220 221 |
# File 'lib/zilla/models/io_k8s_api_core_v1_persistent_volume_spec.rb', line 219 def valid? true end |