![JAR search and dependency download from the Maven repository](/logo.png)
com.azure.resourcemanager.securityinsights.fluent.models.EntityAnalyticsProperties Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-resourcemanager-securityinsights Show documentation
Show all versions of azure-resourcemanager-securityinsights Show documentation
This package contains Microsoft Azure SDK for SecurityInsights Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. API spec for Microsoft.SecurityInsights (Azure Security Insights) resource provider. Package tag package-preview-2021-09.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.resourcemanager.securityinsights.fluent.models;
import com.azure.core.annotation.Fluent;
import com.azure.json.JsonReader;
import com.azure.json.JsonSerializable;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
import com.azure.resourcemanager.securityinsights.models.EntityProviders;
import java.io.IOException;
import java.util.List;
/**
* EntityAnalytics property bag.
*/
@Fluent
public final class EntityAnalyticsProperties implements JsonSerializable {
/*
* The relevant entity providers that are synced
*/
private List entityProviders;
/**
* Creates an instance of EntityAnalyticsProperties class.
*/
public EntityAnalyticsProperties() {
}
/**
* Get the entityProviders property: The relevant entity providers that are synced.
*
* @return the entityProviders value.
*/
public List entityProviders() {
return this.entityProviders;
}
/**
* Set the entityProviders property: The relevant entity providers that are synced.
*
* @param entityProviders the entityProviders value to set.
* @return the EntityAnalyticsProperties object itself.
*/
public EntityAnalyticsProperties withEntityProviders(List entityProviders) {
this.entityProviders = entityProviders;
return this;
}
/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
}
/**
* {@inheritDoc}
*/
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
jsonWriter.writeArrayField("entityProviders", this.entityProviders,
(writer, element) -> writer.writeString(element == null ? null : element.toString()));
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of EntityAnalyticsProperties from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of EntityAnalyticsProperties if the JsonReader was pointing to an instance of it, or null if
* it was pointing to JSON null.
* @throws IOException If an error occurs while reading the EntityAnalyticsProperties.
*/
public static EntityAnalyticsProperties fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
EntityAnalyticsProperties deserializedEntityAnalyticsProperties = new EntityAnalyticsProperties();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("entityProviders".equals(fieldName)) {
List entityProviders
= reader.readArray(reader1 -> EntityProviders.fromString(reader1.getString()));
deserializedEntityAnalyticsProperties.entityProviders = entityProviders;
} else {
reader.skipChildren();
}
}
return deserializedEntityAnalyticsProperties;
});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy