com.azure.resourcemanager.securityinsights.models.ThreatIntelligence 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.Immutable;
import com.azure.json.JsonReader;
import com.azure.json.JsonSerializable;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
import java.io.IOException;
/**
* ThreatIntelligence property bag.
*/
@Immutable
public final class ThreatIntelligence implements JsonSerializable {
/*
* Confidence (must be between 0 and 1)
*/
private Double confidence;
/*
* Name of the provider from whom this Threat Intelligence information was received
*/
private String providerName;
/*
* Report link
*/
private String reportLink;
/*
* Threat description (free text)
*/
private String threatDescription;
/*
* Threat name (e.g. "Jedobot malware")
*/
private String threatName;
/*
* Threat type (e.g. "Botnet")
*/
private String threatType;
/**
* Creates an instance of ThreatIntelligence class.
*/
public ThreatIntelligence() {
}
/**
* Get the confidence property: Confidence (must be between 0 and 1).
*
* @return the confidence value.
*/
public Double confidence() {
return this.confidence;
}
/**
* Get the providerName property: Name of the provider from whom this Threat Intelligence information was received.
*
* @return the providerName value.
*/
public String providerName() {
return this.providerName;
}
/**
* Get the reportLink property: Report link.
*
* @return the reportLink value.
*/
public String reportLink() {
return this.reportLink;
}
/**
* Get the threatDescription property: Threat description (free text).
*
* @return the threatDescription value.
*/
public String threatDescription() {
return this.threatDescription;
}
/**
* Get the threatName property: Threat name (e.g. "Jedobot malware").
*
* @return the threatName value.
*/
public String threatName() {
return this.threatName;
}
/**
* Get the threatType property: Threat type (e.g. "Botnet").
*
* @return the threatType value.
*/
public String threatType() {
return this.threatType;
}
/**
* 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();
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of ThreatIntelligence from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of ThreatIntelligence 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 ThreatIntelligence.
*/
public static ThreatIntelligence fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
ThreatIntelligence deserializedThreatIntelligence = new ThreatIntelligence();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("confidence".equals(fieldName)) {
deserializedThreatIntelligence.confidence = reader.getNullable(JsonReader::getDouble);
} else if ("providerName".equals(fieldName)) {
deserializedThreatIntelligence.providerName = reader.getString();
} else if ("reportLink".equals(fieldName)) {
deserializedThreatIntelligence.reportLink = reader.getString();
} else if ("threatDescription".equals(fieldName)) {
deserializedThreatIntelligence.threatDescription = reader.getString();
} else if ("threatName".equals(fieldName)) {
deserializedThreatIntelligence.threatName = reader.getString();
} else if ("threatType".equals(fieldName)) {
deserializedThreatIntelligence.threatType = reader.getString();
} else {
reader.skipChildren();
}
}
return deserializedThreatIntelligence;
});
}
}