com.azure.resourcemanager.securityinsights.fluent.models.FileEntityProperties 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.fluent.models;
import com.azure.core.annotation.Immutable;
import com.azure.json.JsonReader;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
import com.azure.resourcemanager.securityinsights.models.EntityCommonProperties;
import java.io.IOException;
import java.util.List;
import java.util.Map;
/**
* File entity property bag.
*/
@Immutable
public final class FileEntityProperties extends EntityCommonProperties {
/*
* The full path to the file.
*/
private String directory;
/*
* The file hash entity identifiers associated with this file
*/
private List fileHashEntityIds;
/*
* The file name without path (some alerts might not include path).
*/
private String fileName;
/*
* The Host entity id which the file belongs to
*/
private String hostEntityId;
/*
* The graph item display name which is a short humanly readable description of the graph item instance. This
* property is optional and might be system generated.
*/
private String friendlyName;
/*
* A bag of custom fields that should be part of the entity and will be presented to the user.
*/
private Map additionalData;
/**
* Creates an instance of FileEntityProperties class.
*/
public FileEntityProperties() {
}
/**
* Get the directory property: The full path to the file.
*
* @return the directory value.
*/
public String directory() {
return this.directory;
}
/**
* Get the fileHashEntityIds property: The file hash entity identifiers associated with this file.
*
* @return the fileHashEntityIds value.
*/
public List fileHashEntityIds() {
return this.fileHashEntityIds;
}
/**
* Get the fileName property: The file name without path (some alerts might not include path).
*
* @return the fileName value.
*/
public String fileName() {
return this.fileName;
}
/**
* Get the hostEntityId property: The Host entity id which the file belongs to.
*
* @return the hostEntityId value.
*/
public String hostEntityId() {
return this.hostEntityId;
}
/**
* Get the friendlyName property: The graph item display name which is a short humanly readable description of the
* graph item instance. This property is optional and might be system generated.
*
* @return the friendlyName value.
*/
@Override
public String friendlyName() {
return this.friendlyName;
}
/**
* Get the additionalData property: A bag of custom fields that should be part of the entity and will be presented
* to the user.
*
* @return the additionalData value.
*/
@Override
public Map additionalData() {
return this.additionalData;
}
/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
@Override
public void validate() {
}
/**
* {@inheritDoc}
*/
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of FileEntityProperties from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of FileEntityProperties 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 FileEntityProperties.
*/
public static FileEntityProperties fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
FileEntityProperties deserializedFileEntityProperties = new FileEntityProperties();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("additionalData".equals(fieldName)) {
Map additionalData = reader.readMap(reader1 -> reader1.readUntyped());
deserializedFileEntityProperties.additionalData = additionalData;
} else if ("friendlyName".equals(fieldName)) {
deserializedFileEntityProperties.friendlyName = reader.getString();
} else if ("directory".equals(fieldName)) {
deserializedFileEntityProperties.directory = reader.getString();
} else if ("fileHashEntityIds".equals(fieldName)) {
List fileHashEntityIds = reader.readArray(reader1 -> reader1.getString());
deserializedFileEntityProperties.fileHashEntityIds = fileHashEntityIds;
} else if ("fileName".equals(fieldName)) {
deserializedFileEntityProperties.fileName = reader.getString();
} else if ("hostEntityId".equals(fieldName)) {
deserializedFileEntityProperties.hostEntityId = reader.getString();
} else {
reader.skipChildren();
}
}
return deserializedFileEntityProperties;
});
}
}