# frozen_string_literal: false

# ----------------------------------------------------------------------------
#
#     ***     AUTO GENERATED CODE    ***    AUTO GENERATED CODE     ***
#
# ----------------------------------------------------------------------------
#
#     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/router_bgp_advertised_ip_ranges'
module GoogleInSpec
  module Compute
    module Property
      class RouterBgp
        attr_reader :asn

        attr_reader :advertise_mode

        attr_reader :advertised_groups

        attr_reader :advertised_ip_ranges

        def initialize(args = nil, parent_identifier = nil)
          return if args.nil?
          @parent_identifier = parent_identifier
          @asn = args['asn']
          @advertise_mode = args['advertiseMode']
          @advertised_groups = args['advertisedGroups']
          @advertised_ip_ranges = GoogleInSpec::Compute::Property::RouterBgpAdvertisedIpRangesArray.parse(args['advertisedIpRanges'], to_s)
        end

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