# Copyright (c) 2023 Contrast Security, Inc. See https://www.contrastsecurity.com/enduser-terms-0317a for more details. # frozen_string_literal: true require 'contrast/agent/reporting/reporting_events/reporting_event' require 'contrast/config' module Contrast module Agent module Reporting # AgentStartup Event which sends the agent data to TeamServer on the startup of a server or process, # used to create a new Server entity there. class AgentEffectiveConfig < Contrast::Agent::Reporting::ReportingEvent # @param diagnostics [Contrast::Agent::DiagnosticsConfig::Diagnostics] current diagnostics def initialize diagnostics @event_method = :PUT @event_endpoint = Contrast::Agent::Reporting::Endpoints.effective_config @event_type = :effective_config @diagnostics = diagnostics super() end def file_name 'agent-effective-config' end def to_controlled_hash @diagnostics.to_controlled_hash end end end end end