com.azure.resourcemanager.securityinsights.models.EntityCommonProperties 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;
import java.util.Map;
/**
* Entity common property bag.
*/
@Immutable
public class EntityCommonProperties implements JsonSerializable {
/*
* A bag of custom fields that should be part of the entity and will be presented to the user.
*/
private Map additionalData;
/*
* 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;
/**
* Creates an instance of EntityCommonProperties class.
*/
public EntityCommonProperties() {
}
/**
* 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.
*/
public Map additionalData() {
return this.additionalData;
}
/**
* Set the additionalData property: A bag of custom fields that should be part of the entity and will be presented
* to the user.
*
* @param additionalData the additionalData value to set.
* @return the EntityCommonProperties object itself.
*/
EntityCommonProperties withAdditionalData(Map additionalData) {
this.additionalData = additionalData;
return this;
}
/**
* 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.
*/
public String friendlyName() {
return this.friendlyName;
}
/**
* Set 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.
*
* @param friendlyName the friendlyName value to set.
* @return the EntityCommonProperties object itself.
*/
EntityCommonProperties withFriendlyName(String friendlyName) {
this.friendlyName = friendlyName;
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();
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of EntityCommonProperties from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of EntityCommonProperties 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 EntityCommonProperties.
*/
public static EntityCommonProperties fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
EntityCommonProperties deserializedEntityCommonProperties = new EntityCommonProperties();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("additionalData".equals(fieldName)) {
Map additionalData = reader.readMap(reader1 -> reader1.readUntyped());
deserializedEntityCommonProperties.additionalData = additionalData;
} else if ("friendlyName".equals(fieldName)) {
deserializedEntityCommonProperties.friendlyName = reader.getString();
} else {
reader.skipChildren();
}
}
return deserializedEntityCommonProperties;
});
}
}