Class: Google::Compute::Data::InstancTemplatDisks
- Inherits:
-
Object
- Object
- Google::Compute::Data::InstancTemplatDisks
- Includes:
- Comparable
- Defined in:
- lib/google/compute/property/instancetemplate_disks.rb
Overview
A class to manage data for disks for instance_template.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#auto_delete ⇒ Object
readonly
Returns the value of attribute auto_delete.
-
#boot ⇒ Object
readonly
Returns the value of attribute boot.
-
#device_name ⇒ Object
readonly
Returns the value of attribute device_name.
-
#disk_encryption_key ⇒ Object
readonly
Returns the value of attribute disk_encryption_key.
-
#index ⇒ Object
readonly
Returns the value of attribute index.
-
#initialize_params ⇒ Object
readonly
Returns the value of attribute initialize_params.
-
#interface ⇒ Object
readonly
Returns the value of attribute interface.
-
#mode ⇒ Object
readonly
Returns the value of attribute mode.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
Instance Attribute Details
#auto_delete ⇒ Object (readonly)
Returns the value of attribute auto_delete.
38 39 40 |
# File 'lib/google/compute/property/instancetemplate_disks.rb', line 38 def auto_delete @auto_delete end |
#boot ⇒ Object (readonly)
Returns the value of attribute boot.
39 40 41 |
# File 'lib/google/compute/property/instancetemplate_disks.rb', line 39 def boot @boot end |
#device_name ⇒ Object (readonly)
Returns the value of attribute device_name.
40 41 42 |
# File 'lib/google/compute/property/instancetemplate_disks.rb', line 40 def device_name @device_name end |
#disk_encryption_key ⇒ Object (readonly)
Returns the value of attribute disk_encryption_key.
41 42 43 |
# File 'lib/google/compute/property/instancetemplate_disks.rb', line 41 def disk_encryption_key @disk_encryption_key end |
#index ⇒ Object (readonly)
Returns the value of attribute index.
42 43 44 |
# File 'lib/google/compute/property/instancetemplate_disks.rb', line 42 def index @index end |
#initialize_params ⇒ Object (readonly)
Returns the value of attribute initialize_params.
43 44 45 |
# File 'lib/google/compute/property/instancetemplate_disks.rb', line 43 def initialize_params @initialize_params end |
#interface ⇒ Object (readonly)
Returns the value of attribute interface.
44 45 46 |
# File 'lib/google/compute/property/instancetemplate_disks.rb', line 44 def interface @interface end |
#mode ⇒ Object (readonly)
Returns the value of attribute mode.
45 46 47 |
# File 'lib/google/compute/property/instancetemplate_disks.rb', line 45 def mode @mode end |
#source ⇒ Object (readonly)
Returns the value of attribute source.
46 47 48 |
# File 'lib/google/compute/property/instancetemplate_disks.rb', line 46 def source @source end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
47 48 49 |
# File 'lib/google/compute/property/instancetemplate_disks.rb', line 47 def type @type end |
Instance Method Details
#<=>(other) ⇒ Object
88 89 90 91 92 93 94 95 96 |
# File 'lib/google/compute/property/instancetemplate_disks.rb', line 88 def <=>(other) return false unless other.is_a? InstancTemplatDisks compare_fields(other).each do |compare| next if compare[:self].nil? || compare[:other].nil? result = compare[:self] <=> compare[:other] return result unless result.zero? end 0 end |
#==(other) ⇒ Object
79 80 81 82 83 84 85 86 |
# File 'lib/google/compute/property/instancetemplate_disks.rb', line 79 def ==(other) return false unless other.is_a? InstancTemplatDisks compare_fields(other).each do |compare| next if compare[:self].nil? || compare[:other].nil? return false if compare[:self] != compare[:other] end true end |
#to_json(_arg = nil) ⇒ Object
49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/google/compute/property/instancetemplate_disks.rb', line 49 def to_json(_arg = nil) { 'autoDelete' => auto_delete, 'boot' => boot, 'deviceName' => device_name, 'diskEncryptionKey' => disk_encryption_key, 'index' => index, 'initializeParams' => initialize_params, 'interface' => interface, 'mode' => mode, 'source' => source, 'type' => type }.reject { |_k, v| v.nil? }.to_json end |
#to_s ⇒ Object
64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/google/compute/property/instancetemplate_disks.rb', line 64 def to_s { auto_delete: auto_delete, boot: boot, device_name: device_name, disk_encryption_key: disk_encryption_key, index: index, initialize_params: initialize_params, interface: interface, mode: mode, source: source, type: type }.reject { |_k, v| v.nil? }.map { |k, v| "#{k}: #{v}" }.join(', ') end |