All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.azure.resourcemanager.security.fluent.models.IoTSecuritySolutionAnalyticsModelInner Maven / Gradle / Ivy

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.security.fluent.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
import com.azure.json.JsonReader;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
import com.azure.resourcemanager.security.models.IoTSecurityAlertedDevice;
import com.azure.resourcemanager.security.models.IoTSecurityDeviceAlert;
import com.azure.resourcemanager.security.models.IoTSecurityDeviceRecommendation;
import com.azure.resourcemanager.security.models.IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem;
import com.azure.resourcemanager.security.models.IoTSeverityMetrics;
import java.io.IOException;
import java.util.List;

/**
 * Security analytics of your IoT Security solution.
 */
@Fluent
public final class IoTSecuritySolutionAnalyticsModelInner extends ProxyResource {
    /*
     * Security Solution Aggregated Alert data
     */
    private IoTSecuritySolutionAnalyticsModelProperties innerProperties;

    /*
     * The type of the resource.
     */
    private String type;

    /*
     * The name of the resource.
     */
    private String name;

    /*
     * Fully qualified resource Id for the resource.
     */
    private String id;

    /**
     * Creates an instance of IoTSecuritySolutionAnalyticsModelInner class.
     */
    public IoTSecuritySolutionAnalyticsModelInner() {
    }

    /**
     * Get the innerProperties property: Security Solution Aggregated Alert data.
     * 
     * @return the innerProperties value.
     */
    private IoTSecuritySolutionAnalyticsModelProperties innerProperties() {
        return this.innerProperties;
    }

    /**
     * Get the type property: The type of the resource.
     * 
     * @return the type value.
     */
    @Override
    public String type() {
        return this.type;
    }

    /**
     * Get the name property: The name of the resource.
     * 
     * @return the name value.
     */
    @Override
    public String name() {
        return this.name;
    }

    /**
     * Get the id property: Fully qualified resource Id for the resource.
     * 
     * @return the id value.
     */
    @Override
    public String id() {
        return this.id;
    }

    /**
     * Get the metrics property: Security analytics of your IoT Security solution.
     * 
     * @return the metrics value.
     */
    public IoTSeverityMetrics metrics() {
        return this.innerProperties() == null ? null : this.innerProperties().metrics();
    }

    /**
     * Get the unhealthyDeviceCount property: Number of unhealthy devices within your IoT Security solution.
     * 
     * @return the unhealthyDeviceCount value.
     */
    public Long unhealthyDeviceCount() {
        return this.innerProperties() == null ? null : this.innerProperties().unhealthyDeviceCount();
    }

    /**
     * Get the devicesMetrics property: List of device metrics by the aggregation date.
     * 
     * @return the devicesMetrics value.
     */
    public List devicesMetrics() {
        return this.innerProperties() == null ? null : this.innerProperties().devicesMetrics();
    }

    /**
     * Get the topAlertedDevices property: List of the 3 devices with the most alerts.
     * 
     * @return the topAlertedDevices value.
     */
    public List topAlertedDevices() {
        return this.innerProperties() == null ? null : this.innerProperties().topAlertedDevices();
    }

    /**
     * Set the topAlertedDevices property: List of the 3 devices with the most alerts.
     * 
     * @param topAlertedDevices the topAlertedDevices value to set.
     * @return the IoTSecuritySolutionAnalyticsModelInner object itself.
     */
    public IoTSecuritySolutionAnalyticsModelInner
        withTopAlertedDevices(List topAlertedDevices) {
        if (this.innerProperties() == null) {
            this.innerProperties = new IoTSecuritySolutionAnalyticsModelProperties();
        }
        this.innerProperties().withTopAlertedDevices(topAlertedDevices);
        return this;
    }

    /**
     * Get the mostPrevalentDeviceAlerts property: List of the 3 most prevalent device alerts.
     * 
     * @return the mostPrevalentDeviceAlerts value.
     */
    public List mostPrevalentDeviceAlerts() {
        return this.innerProperties() == null ? null : this.innerProperties().mostPrevalentDeviceAlerts();
    }

    /**
     * Set the mostPrevalentDeviceAlerts property: List of the 3 most prevalent device alerts.
     * 
     * @param mostPrevalentDeviceAlerts the mostPrevalentDeviceAlerts value to set.
     * @return the IoTSecuritySolutionAnalyticsModelInner object itself.
     */
    public IoTSecuritySolutionAnalyticsModelInner
        withMostPrevalentDeviceAlerts(List mostPrevalentDeviceAlerts) {
        if (this.innerProperties() == null) {
            this.innerProperties = new IoTSecuritySolutionAnalyticsModelProperties();
        }
        this.innerProperties().withMostPrevalentDeviceAlerts(mostPrevalentDeviceAlerts);
        return this;
    }

    /**
     * Get the mostPrevalentDeviceRecommendations property: List of the 3 most prevalent device recommendations.
     * 
     * @return the mostPrevalentDeviceRecommendations value.
     */
    public List mostPrevalentDeviceRecommendations() {
        return this.innerProperties() == null ? null : this.innerProperties().mostPrevalentDeviceRecommendations();
    }

    /**
     * Set the mostPrevalentDeviceRecommendations property: List of the 3 most prevalent device recommendations.
     * 
     * @param mostPrevalentDeviceRecommendations the mostPrevalentDeviceRecommendations value to set.
     * @return the IoTSecuritySolutionAnalyticsModelInner object itself.
     */
    public IoTSecuritySolutionAnalyticsModelInner withMostPrevalentDeviceRecommendations(
        List mostPrevalentDeviceRecommendations) {
        if (this.innerProperties() == null) {
            this.innerProperties = new IoTSecuritySolutionAnalyticsModelProperties();
        }
        this.innerProperties().withMostPrevalentDeviceRecommendations(mostPrevalentDeviceRecommendations);
        return this;
    }

    /**
     * Validates the instance.
     * 
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (innerProperties() != null) {
            innerProperties().validate();
        }
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
        jsonWriter.writeStartObject();
        jsonWriter.writeJsonField("properties", this.innerProperties);
        return jsonWriter.writeEndObject();
    }

    /**
     * Reads an instance of IoTSecuritySolutionAnalyticsModelInner from the JsonReader.
     * 
     * @param jsonReader The JsonReader being read.
     * @return An instance of IoTSecuritySolutionAnalyticsModelInner if the JsonReader was pointing to an instance of
     * it, or null if it was pointing to JSON null.
     * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
     * @throws IOException If an error occurs while reading the IoTSecuritySolutionAnalyticsModelInner.
     */
    public static IoTSecuritySolutionAnalyticsModelInner fromJson(JsonReader jsonReader) throws IOException {
        return jsonReader.readObject(reader -> {
            IoTSecuritySolutionAnalyticsModelInner deserializedIoTSecuritySolutionAnalyticsModelInner
                = new IoTSecuritySolutionAnalyticsModelInner();
            while (reader.nextToken() != JsonToken.END_OBJECT) {
                String fieldName = reader.getFieldName();
                reader.nextToken();

                if ("id".equals(fieldName)) {
                    deserializedIoTSecuritySolutionAnalyticsModelInner.id = reader.getString();
                } else if ("name".equals(fieldName)) {
                    deserializedIoTSecuritySolutionAnalyticsModelInner.name = reader.getString();
                } else if ("type".equals(fieldName)) {
                    deserializedIoTSecuritySolutionAnalyticsModelInner.type = reader.getString();
                } else if ("properties".equals(fieldName)) {
                    deserializedIoTSecuritySolutionAnalyticsModelInner.innerProperties
                        = IoTSecuritySolutionAnalyticsModelProperties.fromJson(reader);
                } else {
                    reader.skipChildren();
                }
            }

            return deserializedIoTSecuritySolutionAnalyticsModelInner;
        });
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy