com.azure.resourcemanager.securityinsights.fluent.models.AccountEntityProperties 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.Map;
import java.util.UUID;
/**
* Account entity property bag.
*/
@Immutable
public final class AccountEntityProperties extends EntityCommonProperties {
/*
* The Azure Active Directory tenant id.
*/
private String aadTenantId;
/*
* The Azure Active Directory user id.
*/
private String aadUserId;
/*
* The name of the account. This field should hold only the name without any domain added to it, i.e. administrator.
*/
private String accountName;
/*
* The display name of the account.
*/
private String displayName;
/*
* The Host entity id that contains the account in case it is a local account (not domain joined)
*/
private String hostEntityId;
/*
* Determines whether this is a domain account.
*/
private Boolean isDomainJoined;
/*
* The NetBIOS domain name as it appears in the alert format domain/username. Examples: NT AUTHORITY.
*/
private String ntDomain;
/*
* The objectGUID attribute is a single-value attribute that is the unique identifier for the object, assigned by
* active directory.
*/
private UUID objectGuid;
/*
* The Azure Active Directory Passport User ID.
*/
private String puid;
/*
* The account security identifier, e.g. S-1-5-18.
*/
private String sid;
/*
* The user principal name suffix for the account, in some cases it is also the domain name. Examples: contoso.com.
*/
private String upnSuffix;
/*
* The fully qualified domain DNS name.
*/
private String dnsDomain;
/*
* 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 AccountEntityProperties class.
*/
public AccountEntityProperties() {
}
/**
* Get the aadTenantId property: The Azure Active Directory tenant id.
*
* @return the aadTenantId value.
*/
public String aadTenantId() {
return this.aadTenantId;
}
/**
* Get the aadUserId property: The Azure Active Directory user id.
*
* @return the aadUserId value.
*/
public String aadUserId() {
return this.aadUserId;
}
/**
* Get the accountName property: The name of the account. This field should hold only the name without any domain
* added to it, i.e. administrator.
*
* @return the accountName value.
*/
public String accountName() {
return this.accountName;
}
/**
* Get the displayName property: The display name of the account.
*
* @return the displayName value.
*/
public String displayName() {
return this.displayName;
}
/**
* Get the hostEntityId property: The Host entity id that contains the account in case it is a local account (not
* domain joined).
*
* @return the hostEntityId value.
*/
public String hostEntityId() {
return this.hostEntityId;
}
/**
* Get the isDomainJoined property: Determines whether this is a domain account.
*
* @return the isDomainJoined value.
*/
public Boolean isDomainJoined() {
return this.isDomainJoined;
}
/**
* Get the ntDomain property: The NetBIOS domain name as it appears in the alert format domain/username. Examples:
* NT AUTHORITY.
*
* @return the ntDomain value.
*/
public String ntDomain() {
return this.ntDomain;
}
/**
* Get the objectGuid property: The objectGUID attribute is a single-value attribute that is the unique identifier
* for the object, assigned by active directory.
*
* @return the objectGuid value.
*/
public UUID objectGuid() {
return this.objectGuid;
}
/**
* Get the puid property: The Azure Active Directory Passport User ID.
*
* @return the puid value.
*/
public String puid() {
return this.puid;
}
/**
* Get the sid property: The account security identifier, e.g. S-1-5-18.
*
* @return the sid value.
*/
public String sid() {
return this.sid;
}
/**
* Get the upnSuffix property: The user principal name suffix for the account, in some cases it is also the domain
* name. Examples: contoso.com.
*
* @return the upnSuffix value.
*/
public String upnSuffix() {
return this.upnSuffix;
}
/**
* Get the dnsDomain property: The fully qualified domain DNS name.
*
* @return the dnsDomain value.
*/
public String dnsDomain() {
return this.dnsDomain;
}
/**
* 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 AccountEntityProperties from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of AccountEntityProperties 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 AccountEntityProperties.
*/
public static AccountEntityProperties fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
AccountEntityProperties deserializedAccountEntityProperties = new AccountEntityProperties();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("additionalData".equals(fieldName)) {
Map additionalData = reader.readMap(reader1 -> reader1.readUntyped());
deserializedAccountEntityProperties.additionalData = additionalData;
} else if ("friendlyName".equals(fieldName)) {
deserializedAccountEntityProperties.friendlyName = reader.getString();
} else if ("aadTenantId".equals(fieldName)) {
deserializedAccountEntityProperties.aadTenantId = reader.getString();
} else if ("aadUserId".equals(fieldName)) {
deserializedAccountEntityProperties.aadUserId = reader.getString();
} else if ("accountName".equals(fieldName)) {
deserializedAccountEntityProperties.accountName = reader.getString();
} else if ("displayName".equals(fieldName)) {
deserializedAccountEntityProperties.displayName = reader.getString();
} else if ("hostEntityId".equals(fieldName)) {
deserializedAccountEntityProperties.hostEntityId = reader.getString();
} else if ("isDomainJoined".equals(fieldName)) {
deserializedAccountEntityProperties.isDomainJoined = reader.getNullable(JsonReader::getBoolean);
} else if ("ntDomain".equals(fieldName)) {
deserializedAccountEntityProperties.ntDomain = reader.getString();
} else if ("objectGuid".equals(fieldName)) {
deserializedAccountEntityProperties.objectGuid
= reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString()));
} else if ("puid".equals(fieldName)) {
deserializedAccountEntityProperties.puid = reader.getString();
} else if ("sid".equals(fieldName)) {
deserializedAccountEntityProperties.sid = reader.getString();
} else if ("upnSuffix".equals(fieldName)) {
deserializedAccountEntityProperties.upnSuffix = reader.getString();
} else if ("dnsDomain".equals(fieldName)) {
deserializedAccountEntityProperties.dnsDomain = reader.getString();
} else {
reader.skipChildren();
}
}
return deserializedAccountEntityProperties;
});
}
}