# 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.
#
# ----------------------------------------------------------------------------
require 'google/compute/property/machineimage_source_instance_properties_network_interfaces_access_configs'
require 'google/compute/property/machineimage_source_instance_properties_network_interfaces_alias_ip_ranges'
require 'google/compute/property/machineimage_source_instance_properties_network_interfaces_ipv6_access_configs'
module GoogleInSpec
  module Compute
    module Property
      class MachineImageSourceInstancePropertiesNetworkInterfaces
        attr_reader :kind

        attr_reader :network

        attr_reader :subnetwork

        attr_reader :network_ip

        attr_reader :ipv6_address

        attr_reader :internal_ipv6_prefix_length

        attr_reader :name

        attr_reader :access_configs

        attr_reader :ipv6_access_configs

        attr_reader :alias_ip_ranges

        attr_reader :fingerprint

        attr_reader :stack_type

        attr_reader :ipv6_access_type

        attr_reader :queue_count

        attr_reader :nic_type

        attr_reader :network_attachment

        def initialize(args = nil, parent_identifier = nil)
          return if args.nil?
          @parent_identifier = parent_identifier
          @kind = args['kind']
          @network = args['network']
          @subnetwork = args['subnetwork']
          @network_ip = args['networkIP']
          @ipv6_address = args['ipv6Address']
          @internal_ipv6_prefix_length = args['internalIpv6PrefixLength']
          @name = args['name']
          @access_configs = GoogleInSpec::Compute::Property::MachineImageSourceInstancePropertiesNetworkInterfacesAccessConfigsArray.parse(args['accessConfigs'], to_s)
          @ipv6_access_configs = GoogleInSpec::Compute::Property::MachineImageSourceInstancePropertiesNetworkInterfacesIpv6AccessConfigsArray.parse(args['ipv6AccessConfigs'], to_s)
          @alias_ip_ranges = GoogleInSpec::Compute::Property::MachineImageSourceInstancePropertiesNetworkInterfacesAliasIpRangesArray.parse(args['aliasIpRanges'], to_s)
          @fingerprint = args['fingerprint']
          @stack_type = args['stackType']
          @ipv6_access_type = args['ipv6AccessType']
          @queue_count = args['queueCount']
          @nic_type = args['nicType']
          @network_attachment = args['networkAttachment']
        end

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

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