public InputComponentConfiguration()

in aws-applicationinsights-application/src/main/java/software/amazon/applicationinsights/application/InputConfiguration/InputComponentConfiguration.java [74:137]


    public InputComponentConfiguration(final ComponentConfiguration componentConfiguration) {
        ConfigurationDetails configurationDetails =
                componentConfiguration.getConfigurationDetails() == null ?
                        new ConfigurationDetails() : componentConfiguration.getConfigurationDetails();

        List<AlarmMetric> alarmMetrics = configurationDetails.getAlarmMetrics();
        if (alarmMetrics != null && !alarmMetrics.isEmpty()) {
            List<InputAlarmMetric> inputAlarmMetrics = alarmMetrics.stream()
                    .map(alarmMetric -> new InputAlarmMetric(alarmMetric))
                    .collect(Collectors.toList());
            this.alarmMetrics = inputAlarmMetrics;
        }

        List<Log> logs = configurationDetails.getLogs();
        if (logs != null && !logs.isEmpty()) {
            List<InputLog> inputLogs = logs.stream()
                    .map(log -> new InputLog(log))
                    .collect(Collectors.toList());
            this.logs = inputLogs;
        }

        List<WindowsEvent> windowsEvents = configurationDetails.getWindowsEvents();
        if (windowsEvents != null && !windowsEvents.isEmpty()) {
            List<InputWindowsEvent> inputWindowsEvents = windowsEvents.stream()
                    .map(windowsEvent -> new InputWindowsEvent(windowsEvent))
                    .collect(Collectors.toList());
            this.windowsEvents = inputWindowsEvents;
        }

        List<Alarm> alarms = configurationDetails.getAlarms();
        if (alarms != null && !alarms.isEmpty()) {
            List<InputAlarm> inputAlarms = alarms.stream()
                    .map(alarm -> new InputAlarm(alarm))
                    .collect(Collectors.toList());
            this.alarms = inputAlarms;
        }

        List<SubComponentTypeConfiguration> subComponentTypeConfigurations =
                componentConfiguration.getSubComponentTypeConfigurations();

        if (subComponentTypeConfigurations != null && !subComponentTypeConfigurations.isEmpty()) {
            List<InputSubComponent> inputSubComponents = new ArrayList<>();
            for (SubComponentTypeConfiguration subComponentTypeConfiguration : subComponentTypeConfigurations) {
                InputSubComponent inputSubComponent = new InputSubComponent(subComponentTypeConfiguration);
                inputSubComponents.add(inputSubComponent);
            }
            this.subComponents = inputSubComponents;
        }

        JMXPrometheusExporter jmxPrometheusExporter = configurationDetails.getJMXPrometheusExporter();
        if (jmxPrometheusExporter != null) {
            this.jmxPrometheusExporter = new InputJMXPrometheusExporter(jmxPrometheusExporter);
        }

        HANAPrometheusExporter hanaPrometheusExporter = configurationDetails.getHANAPrometheusExporter();
        if (hanaPrometheusExporter != null) {
            this.hanaPrometheusExporter = new InputHANAPrometheusExporter(hanaPrometheusExporter);
        }

        HAClusterPrometheusExporter haClusterPrometheusExporter = configurationDetails.getHAClusterPrometheusExporter();
        if (haClusterPrometheusExporter != null) {
            this.haClusterPrometheusExporter = new InputHAClusterPrometheusExporter(haClusterPrometheusExporter);
        }
    }