Class: Kubernetes::V1PersistentVolumeSpec

Inherits:
Object
  • Object
show all
Defined in:
lib/kubernetes/models/v1_persistent_volume_spec.rb

Overview

PersistentVolumeSpec is the specification of a persistent volume.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ V1PersistentVolumeSpec

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash



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
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
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
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
# File 'lib/kubernetes/models/v1_persistent_volume_spec.rb', line 175

def initialize(attributes = {})
  if (!attributes.is_a?(Hash))
    fail ArgumentError, "The input argument (attributes) must be a hash in `Kubernetes::V1PersistentVolumeSpec` initialize method"
  end

  # check to see if the attribute exists and convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h|
    if (!self.class.attribute_map.key?(k.to_sym))
      fail ArgumentError, "`#{k}` is not a valid attribute in `Kubernetes::V1PersistentVolumeSpec`. 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
  }

  if attributes.key?(:'access_modes')
    if (value = attributes[:'access_modes']).is_a?(Array)
      self.access_modes = value
    end
  end

  if attributes.key?(:'aws_elastic_block_store')
    self.aws_elastic_block_store = attributes[:'aws_elastic_block_store']
  end

  if attributes.key?(:'azure_disk')
    self.azure_disk = attributes[:'azure_disk']
  end

  if attributes.key?(:'azure_file')
    self.azure_file = attributes[:'azure_file']
  end

  if attributes.key?(:'capacity')
    if (value = attributes[:'capacity']).is_a?(Hash)
      self.capacity = value
    end
  end

  if attributes.key?(:'cephfs')
    self.cephfs = attributes[:'cephfs']
  end

  if attributes.key?(:'cinder')
    self.cinder = attributes[:'cinder']
  end

  if attributes.key?(:'claim_ref')
    self.claim_ref = attributes[:'claim_ref']
  end

  if attributes.key?(:'csi')
    self.csi = attributes[:'csi']
  end

  if attributes.key?(:'fc')
    self.fc = attributes[:'fc']
  end

  if attributes.key?(:'flex_volume')
    self.flex_volume = attributes[:'flex_volume']
  end

  if attributes.key?(:'flocker')
    self.flocker = attributes[:'flocker']
  end

  if attributes.key?(:'gce_persistent_disk')
    self.gce_persistent_disk = attributes[:'gce_persistent_disk']
  end

  if attributes.key?(:'glusterfs')
    self.glusterfs = attributes[:'glusterfs']
  end

  if attributes.key?(:'host_path')
    self.host_path = attributes[:'host_path']
  end

  if attributes.key?(:'iscsi')
    self.iscsi = attributes[:'iscsi']
  end

  if attributes.key?(:'local')
    self.local = attributes[:'local']
  end

  if attributes.key?(:'mount_options')
    if (value = attributes[:'mount_options']).is_a?(Array)
      self.mount_options = value
    end
  end

  if attributes.key?(:'nfs')
    self.nfs = attributes[:'nfs']
  end

  if attributes.key?(:'node_affinity')
    self.node_affinity = attributes[:'node_affinity']
  end

  if attributes.key?(:'persistent_volume_reclaim_policy')
    self.persistent_volume_reclaim_policy = attributes[:'persistent_volume_reclaim_policy']
  end

  if attributes.key?(:'photon_persistent_disk')
    self.photon_persistent_disk = attributes[:'photon_persistent_disk']
  end

  if attributes.key?(:'portworx_volume')
    self.portworx_volume = attributes[:'portworx_volume']
  end

  if attributes.key?(:'quobyte')
    self.quobyte = attributes[:'quobyte']
  end

  if attributes.key?(:'rbd')
    self.rbd = attributes[:'rbd']
  end

  if attributes.key?(:'scale_io')
    self.scale_io = attributes[:'scale_io']
  end

  if attributes.key?(:'storage_class_name')
    self.storage_class_name = attributes[:'storage_class_name']
  end

  if attributes.key?(:'storageos')
    self.storageos = attributes[:'storageos']
  end

  if attributes.key?(:'volume_attributes_class_name')
    self.volume_attributes_class_name = attributes[:'volume_attributes_class_name']
  end

  if attributes.key?(:'volume_mode')
    self.volume_mode = attributes[:'volume_mode']
  end

  if attributes.key?(:'vsphere_volume')
    self.vsphere_volume = attributes[:'vsphere_volume']
  end
end

Instance Attribute Details

#access_modesObject

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/kubernetes/models/v1_persistent_volume_spec.rb', line 20

def access_modes
  @access_modes
end

#aws_elastic_block_storeObject

Returns the value of attribute aws_elastic_block_store.



22
23
24
# File 'lib/kubernetes/models/v1_persistent_volume_spec.rb', line 22

def aws_elastic_block_store
  @aws_elastic_block_store
end

#azure_diskObject

Returns the value of attribute azure_disk.



24
25
26
# File 'lib/kubernetes/models/v1_persistent_volume_spec.rb', line 24

def azure_disk
  @azure_disk
end

#azure_fileObject

Returns the value of attribute azure_file.



26
27
28
# File 'lib/kubernetes/models/v1_persistent_volume_spec.rb', line 26

def azure_file
  @azure_file
end

#capacityObject

capacity is the description of the persistent volume’s resources and capacity. More info: kubernetes.io/docs/concepts/storage/persistent-volumes#capacity



29
30
31
# File 'lib/kubernetes/models/v1_persistent_volume_spec.rb', line 29

def capacity
  @capacity
end

#cephfsObject

Returns the value of attribute cephfs.



31
32
33
# File 'lib/kubernetes/models/v1_persistent_volume_spec.rb', line 31

def cephfs
  @cephfs
end

#cinderObject

Returns the value of attribute cinder.



33
34
35
# File 'lib/kubernetes/models/v1_persistent_volume_spec.rb', line 33

def cinder
  @cinder
end

#claim_refObject

Returns the value of attribute claim_ref.



35
36
37
# File 'lib/kubernetes/models/v1_persistent_volume_spec.rb', line 35

def claim_ref
  @claim_ref
end

#csiObject

Returns the value of attribute csi.



37
38
39
# File 'lib/kubernetes/models/v1_persistent_volume_spec.rb', line 37

def csi
  @csi
end

#fcObject

Returns the value of attribute fc.



39
40
41
# File 'lib/kubernetes/models/v1_persistent_volume_spec.rb', line 39

def fc
  @fc
end

#flex_volumeObject

Returns the value of attribute flex_volume.



41
42
43
# File 'lib/kubernetes/models/v1_persistent_volume_spec.rb', line 41

def flex_volume
  @flex_volume
end

#flockerObject

Returns the value of attribute flocker.



43
44
45
# File 'lib/kubernetes/models/v1_persistent_volume_spec.rb', line 43

def flocker
  @flocker
end

#gce_persistent_diskObject

Returns the value of attribute gce_persistent_disk.



45
46
47
# File 'lib/kubernetes/models/v1_persistent_volume_spec.rb', line 45

def gce_persistent_disk
  @gce_persistent_disk
end

#glusterfsObject

Returns the value of attribute glusterfs.



47
48
49
# File 'lib/kubernetes/models/v1_persistent_volume_spec.rb', line 47

def glusterfs
  @glusterfs
end

#host_pathObject

Returns the value of attribute host_path.



49
50
51
# File 'lib/kubernetes/models/v1_persistent_volume_spec.rb', line 49

def host_path
  @host_path
end

#iscsiObject

Returns the value of attribute iscsi.



51
52
53
# File 'lib/kubernetes/models/v1_persistent_volume_spec.rb', line 51

def iscsi
  @iscsi
end

#localObject

Returns the value of attribute local.



53
54
55
# File 'lib/kubernetes/models/v1_persistent_volume_spec.rb', line 53

def local
  @local
end

#mount_optionsObject

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



56
57
58
# File 'lib/kubernetes/models/v1_persistent_volume_spec.rb', line 56

def mount_options
  @mount_options
end

#nfsObject

Returns the value of attribute nfs.



58
59
60
# File 'lib/kubernetes/models/v1_persistent_volume_spec.rb', line 58

def nfs
  @nfs
end

#node_affinityObject

Returns the value of attribute node_affinity.



60
61
62
# File 'lib/kubernetes/models/v1_persistent_volume_spec.rb', line 60

def node_affinity
  @node_affinity
end

#persistent_volume_reclaim_policyObject

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



63
64
65
# File 'lib/kubernetes/models/v1_persistent_volume_spec.rb', line 63

def persistent_volume_reclaim_policy
  @persistent_volume_reclaim_policy
end

#photon_persistent_diskObject

Returns the value of attribute photon_persistent_disk.



65
66
67
# File 'lib/kubernetes/models/v1_persistent_volume_spec.rb', line 65

def photon_persistent_disk
  @photon_persistent_disk
end

#portworx_volumeObject

Returns the value of attribute portworx_volume.



67
68
69
# File 'lib/kubernetes/models/v1_persistent_volume_spec.rb', line 67

def portworx_volume
  @portworx_volume
end

#quobyteObject

Returns the value of attribute quobyte.



69
70
71
# File 'lib/kubernetes/models/v1_persistent_volume_spec.rb', line 69

def quobyte
  @quobyte
end

#rbdObject

Returns the value of attribute rbd.



71
72
73
# File 'lib/kubernetes/models/v1_persistent_volume_spec.rb', line 71

def rbd
  @rbd
end

#scale_ioObject

Returns the value of attribute scale_io.



73
74
75
# File 'lib/kubernetes/models/v1_persistent_volume_spec.rb', line 73

def scale_io
  @scale_io
end

#storage_class_nameObject

storageClassName is the name of StorageClass to which this persistent volume belongs. Empty value means that this volume does not belong to any StorageClass.



76
77
78
# File 'lib/kubernetes/models/v1_persistent_volume_spec.rb', line 76

def storage_class_name
  @storage_class_name
end

#storageosObject

Returns the value of attribute storageos.



78
79
80
# File 'lib/kubernetes/models/v1_persistent_volume_spec.rb', line 78

def storageos
  @storageos
end

#volume_attributes_class_nameObject

Name of VolumeAttributesClass to which this persistent volume belongs. Empty value is not allowed. When this field is not set, it indicates that this volume does not belong to any VolumeAttributesClass. This field is mutable and can be changed by the CSI driver after a volume has been updated successfully to a new class. For an unbound PersistentVolume, the volumeAttributesClassName will be matched with unbound PersistentVolumeClaims during the binding process.



81
82
83
# File 'lib/kubernetes/models/v1_persistent_volume_spec.rb', line 81

def volume_attributes_class_name
  @volume_attributes_class_name
end

#volume_modeObject

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.



84
85
86
# File 'lib/kubernetes/models/v1_persistent_volume_spec.rb', line 84

def volume_mode
  @volume_mode
end

#vsphere_volumeObject

Returns the value of attribute vsphere_volume.



86
87
88
# File 'lib/kubernetes/models/v1_persistent_volume_spec.rb', line 86

def vsphere_volume
  @vsphere_volume
end

Class Method Details

.acceptable_attributesObject

Returns all the JSON keys this model knows about



126
127
128
# File 'lib/kubernetes/models/v1_persistent_volume_spec.rb', line 126

def self.acceptable_attributes
  attribute_map.values
end

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



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
116
117
118
119
120
121
122
123
# File 'lib/kubernetes/models/v1_persistent_volume_spec.rb', line 89

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_attributes_class_name' => :'volumeAttributesClassName',
    :'volume_mode' => :'volumeMode',
    :'vsphere_volume' => :'vsphereVolume'
  }
end

.build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



385
386
387
# File 'lib/kubernetes/models/v1_persistent_volume_spec.rb', line 385

def self.build_from_hash(attributes)
  new.build_from_hash(attributes)
end

.openapi_nullableObject

List of attributes with nullable: true



168
169
170
171
# File 'lib/kubernetes/models/v1_persistent_volume_spec.rb', line 168

def self.openapi_nullable
  Set.new([
  ])
end

.openapi_typesObject

Attribute type mapping.



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
# File 'lib/kubernetes/models/v1_persistent_volume_spec.rb', line 131

def self.openapi_types
  {
    :'access_modes' => :'Array<String>',
    :'aws_elastic_block_store' => :'V1AWSElasticBlockStoreVolumeSource',
    :'azure_disk' => :'V1AzureDiskVolumeSource',
    :'azure_file' => :'V1AzureFilePersistentVolumeSource',
    :'capacity' => :'Hash<String, String>',
    :'cephfs' => :'V1CephFSPersistentVolumeSource',
    :'cinder' => :'V1CinderPersistentVolumeSource',
    :'claim_ref' => :'V1ObjectReference',
    :'csi' => :'V1CSIPersistentVolumeSource',
    :'fc' => :'V1FCVolumeSource',
    :'flex_volume' => :'V1FlexPersistentVolumeSource',
    :'flocker' => :'V1FlockerVolumeSource',
    :'gce_persistent_disk' => :'V1GCEPersistentDiskVolumeSource',
    :'glusterfs' => :'V1GlusterfsPersistentVolumeSource',
    :'host_path' => :'V1HostPathVolumeSource',
    :'iscsi' => :'V1ISCSIPersistentVolumeSource',
    :'local' => :'V1LocalVolumeSource',
    :'mount_options' => :'Array<String>',
    :'nfs' => :'V1NFSVolumeSource',
    :'node_affinity' => :'V1VolumeNodeAffinity',
    :'persistent_volume_reclaim_policy' => :'String',
    :'photon_persistent_disk' => :'V1PhotonPersistentDiskVolumeSource',
    :'portworx_volume' => :'V1PortworxVolumeSource',
    :'quobyte' => :'V1QuobyteVolumeSource',
    :'rbd' => :'V1RBDPersistentVolumeSource',
    :'scale_io' => :'V1ScaleIOPersistentVolumeSource',
    :'storage_class_name' => :'String',
    :'storageos' => :'V1StorageOSPersistentVolumeSource',
    :'volume_attributes_class_name' => :'String',
    :'volume_mode' => :'String',
    :'vsphere_volume' => :'V1VsphereVirtualDiskVolumeSource'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
# File 'lib/kubernetes/models/v1_persistent_volume_spec.rb', line 334

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      access_modes == o.access_modes &&
      aws_elastic_block_store == o.aws_elastic_block_store &&
      azure_disk == o.azure_disk &&
      azure_file == o.azure_file &&
      capacity == o.capacity &&
      cephfs == o.cephfs &&
      cinder == o.cinder &&
      claim_ref == o.claim_ref &&
      csi == o.csi &&
      fc == o.fc &&
      flex_volume == o.flex_volume &&
      flocker == o.flocker &&
      gce_persistent_disk == o.gce_persistent_disk &&
      glusterfs == o.glusterfs &&
      host_path == o.host_path &&
      iscsi == o.iscsi &&
      local == o.local &&
      mount_options == o.mount_options &&
      nfs == o.nfs &&
      node_affinity == o.node_affinity &&
      persistent_volume_reclaim_policy == o.persistent_volume_reclaim_policy &&
      photon_persistent_disk == o.photon_persistent_disk &&
      portworx_volume == o.portworx_volume &&
      quobyte == o.quobyte &&
      rbd == o.rbd &&
      scale_io == o.scale_io &&
      storage_class_name == o.storage_class_name &&
      storageos == o.storageos &&
      volume_attributes_class_name == o.volume_attributes_class_name &&
      volume_mode == o.volume_mode &&
      vsphere_volume == o.vsphere_volume
end

#_deserialize(type, value) ⇒ Object

Deserializes the data based on type

Parameters:

  • string

    type Data type

  • string

    value Value to be deserialized

Returns:

  • (Object)

    Deserialized data



415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
# File 'lib/kubernetes/models/v1_persistent_volume_spec.rb', line 415

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 = Kubernetes.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

Parameters:

  • value (Object)

    Any valid value

Returns:

  • (Hash)

    Returns the value in the form of hash



486
487
488
489
490
491
492
493
494
495
496
497
498
# File 'lib/kubernetes/models/v1_persistent_volume_spec.rb', line 486

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

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
# File 'lib/kubernetes/models/v1_persistent_volume_spec.rb', line 392

def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)
  self.class.openapi_types.each_pair do |key, type|
    if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
      self.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)
        self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
      end
    elsif !attributes[self.class.attribute_map[key]].nil?
      self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
    end
  end

  self
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


372
373
374
# File 'lib/kubernetes/models/v1_persistent_volume_spec.rb', line 372

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



378
379
380
# File 'lib/kubernetes/models/v1_persistent_volume_spec.rb', line 378

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, mount_options, nfs, node_affinity, persistent_volume_reclaim_policy, photon_persistent_disk, portworx_volume, quobyte, rbd, scale_io, storage_class_name, storageos, volume_attributes_class_name, volume_mode, vsphere_volume].hash
end

#list_invalid_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



321
322
323
324
# File 'lib/kubernetes/models/v1_persistent_volume_spec.rb', line 321

def list_invalid_properties
  invalid_properties = Array.new
  invalid_properties
end

#to_bodyHash

to_body is an alias to to_hash (backward compatibility)

Returns:

  • (Hash)

    Returns the object in the form of hash



462
463
464
# File 'lib/kubernetes/models/v1_persistent_volume_spec.rb', line 462

def to_body
  to_hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



468
469
470
471
472
473
474
475
476
477
478
479
480
# File 'lib/kubernetes/models/v1_persistent_volume_spec.rb', line 468

def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = self.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_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



456
457
458
# File 'lib/kubernetes/models/v1_persistent_volume_spec.rb', line 456

def to_s
  to_hash.to_s
end

#valid?Boolean

Check to see if the all the properties in the model are valid

Returns:

  • (Boolean)

    true if the model is valid



328
329
330
# File 'lib/kubernetes/models/v1_persistent_volume_spec.rb', line 328

def valid?
  true
end