com.azure.resourcemanager.securityinsights.models.SecurityMLAnalyticsSettingsDataSource 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-2022-09.
The newest version!
// 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.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 java.io.IOException;
import java.util.List;
/**
* security ml analytics settings data sources.
*/
@Fluent
public final class SecurityMLAnalyticsSettingsDataSource
implements JsonSerializable {
/*
* The connector id that provides the following data types
*/
private String connectorId;
/*
* The data types used by the security ml analytics settings
*/
private List dataTypes;
/**
* Creates an instance of SecurityMLAnalyticsSettingsDataSource class.
*/
public SecurityMLAnalyticsSettingsDataSource() {
}
/**
* Get the connectorId property: The connector id that provides the following data types.
*
* @return the connectorId value.
*/
public String connectorId() {
return this.connectorId;
}
/**
* Set the connectorId property: The connector id that provides the following data types.
*
* @param connectorId the connectorId value to set.
* @return the SecurityMLAnalyticsSettingsDataSource object itself.
*/
public SecurityMLAnalyticsSettingsDataSource withConnectorId(String connectorId) {
this.connectorId = connectorId;
return this;
}
/**
* Get the dataTypes property: The data types used by the security ml analytics settings.
*
* @return the dataTypes value.
*/
public List dataTypes() {
return this.dataTypes;
}
/**
* Set the dataTypes property: The data types used by the security ml analytics settings.
*
* @param dataTypes the dataTypes value to set.
* @return the SecurityMLAnalyticsSettingsDataSource object itself.
*/
public SecurityMLAnalyticsSettingsDataSource withDataTypes(List dataTypes) {
this.dataTypes = dataTypes;
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.writeStringField("connectorId", this.connectorId);
jsonWriter.writeArrayField("dataTypes", this.dataTypes, (writer, element) -> writer.writeString(element));
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of SecurityMLAnalyticsSettingsDataSource from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of SecurityMLAnalyticsSettingsDataSource 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 SecurityMLAnalyticsSettingsDataSource.
*/
public static SecurityMLAnalyticsSettingsDataSource fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
SecurityMLAnalyticsSettingsDataSource deserializedSecurityMLAnalyticsSettingsDataSource
= new SecurityMLAnalyticsSettingsDataSource();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("connectorId".equals(fieldName)) {
deserializedSecurityMLAnalyticsSettingsDataSource.connectorId = reader.getString();
} else if ("dataTypes".equals(fieldName)) {
List dataTypes = reader.readArray(reader1 -> reader1.getString());
deserializedSecurityMLAnalyticsSettingsDataSource.dataTypes = dataTypes;
} else {
reader.skipChildren();
}
}
return deserializedSecurityMLAnalyticsSettingsDataSource;
});
}
}