com.azure.resourcemanager.securityinsights.models.OfficeIrmCheckRequirements 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.JsonToken;
import com.azure.json.JsonWriter;
import com.azure.resourcemanager.securityinsights.fluent.models.OfficeIrmCheckRequirementsProperties;
import java.io.IOException;
/**
* Represents OfficeIRM (Microsoft Insider Risk Management) requirements check request.
*/
@Fluent
public final class OfficeIrmCheckRequirements extends DataConnectorsCheckRequirements {
/*
* Describes the kind of connector to be checked.
*/
private DataConnectorKind kind = DataConnectorKind.OFFICE_IRM;
/*
* OfficeIRM (Microsoft Insider Risk Management) requirements check properties.
*/
private OfficeIrmCheckRequirementsProperties innerProperties;
/**
* Creates an instance of OfficeIrmCheckRequirements class.
*/
public OfficeIrmCheckRequirements() {
}
/**
* Get the kind property: Describes the kind of connector to be checked.
*
* @return the kind value.
*/
@Override
public DataConnectorKind kind() {
return this.kind;
}
/**
* Get the innerProperties property: OfficeIRM (Microsoft Insider Risk Management) requirements check properties.
*
* @return the innerProperties value.
*/
private OfficeIrmCheckRequirementsProperties innerProperties() {
return this.innerProperties;
}
/**
* Get the tenantId property: The tenant id to connect to, and get the data from.
*
* @return the tenantId value.
*/
public String tenantId() {
return this.innerProperties() == null ? null : this.innerProperties().tenantId();
}
/**
* Set the tenantId property: The tenant id to connect to, and get the data from.
*
* @param tenantId the tenantId value to set.
* @return the OfficeIrmCheckRequirements object itself.
*/
public OfficeIrmCheckRequirements withTenantId(String tenantId) {
if (this.innerProperties() == null) {
this.innerProperties = new OfficeIrmCheckRequirementsProperties();
}
this.innerProperties().withTenantId(tenantId);
return this;
}
/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
@Override
public void validate() {
if (innerProperties() != null) {
innerProperties().validate();
}
}
/**
* {@inheritDoc}
*/
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString());
jsonWriter.writeJsonField("properties", this.innerProperties);
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of OfficeIrmCheckRequirements from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of OfficeIrmCheckRequirements 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 OfficeIrmCheckRequirements.
*/
public static OfficeIrmCheckRequirements fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
OfficeIrmCheckRequirements deserializedOfficeIrmCheckRequirements = new OfficeIrmCheckRequirements();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("kind".equals(fieldName)) {
deserializedOfficeIrmCheckRequirements.kind = DataConnectorKind.fromString(reader.getString());
} else if ("properties".equals(fieldName)) {
deserializedOfficeIrmCheckRequirements.innerProperties
= OfficeIrmCheckRequirementsProperties.fromJson(reader);
} else {
reader.skipChildren();
}
}
return deserializedOfficeIrmCheckRequirements;
});
}
}