# frozen_string_literal: false

# ----------------------------------------------------------------------------
#
#     ***     AUTO GENERATED CODE    ***    Type: MMv1     ***
#
# ----------------------------------------------------------------------------
#
#     This file is automatically generated by Magic Modules and manual
#     changes will be clobbered when the file is regenerated.
#
#     Please read more about how to change this file in README.md and
#     CONTRIBUTING.md located at the root of this package.
#
# ----------------------------------------------------------------------------
module GoogleInSpec
  module Compute
    module Property
      class MachineImageSavedDisks
        attr_reader :kind

        attr_reader :source_disk

        attr_reader :storage_bytes

        attr_reader :storage_bytes_status

        attr_reader :architecture

        def initialize(args = nil, parent_identifier = nil)
          return if args.nil?
          @parent_identifier = parent_identifier
          @kind = args['kind']
          @source_disk = args['sourceDisk']
          @storage_bytes = args['storageBytes']
          @storage_bytes_status = args['storageBytesStatus']
          @architecture = args['architecture']
        end

        def to_s
          "#{@parent_identifier} MachineImageSavedDisks"
        end
      end

      class MachineImageSavedDisksArray
        def self.parse(value, parent_identifier)
          return if value.nil?
          return MachineImageSavedDisks.new(value, parent_identifier) unless value.is_a?(::Array)
          value.map { |v| MachineImageSavedDisks.new(v, parent_identifier) }
        end
      end
    end
  end
end
