![JAR search and dependency download from the Maven repository](/logo.png)
com.azure.resourcemanager.securityinsights.fluent.models.DataConnectorRequirementsStateInner 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-2021-09.
// 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.Fluent;
import com.azure.json.JsonReader;
import com.azure.json.JsonSerializable;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
import com.azure.resourcemanager.securityinsights.models.DataConnectorAuthorizationState;
import com.azure.resourcemanager.securityinsights.models.DataConnectorLicenseState;
import java.io.IOException;
/**
* Data connector requirements status.
*/
@Fluent
public final class DataConnectorRequirementsStateInner
implements JsonSerializable {
/*
* Authorization state for this connector
*/
private DataConnectorAuthorizationState authorizationState;
/*
* License state for this connector
*/
private DataConnectorLicenseState licenseState;
/**
* Creates an instance of DataConnectorRequirementsStateInner class.
*/
public DataConnectorRequirementsStateInner() {
}
/**
* Get the authorizationState property: Authorization state for this connector.
*
* @return the authorizationState value.
*/
public DataConnectorAuthorizationState authorizationState() {
return this.authorizationState;
}
/**
* Set the authorizationState property: Authorization state for this connector.
*
* @param authorizationState the authorizationState value to set.
* @return the DataConnectorRequirementsStateInner object itself.
*/
public DataConnectorRequirementsStateInner
withAuthorizationState(DataConnectorAuthorizationState authorizationState) {
this.authorizationState = authorizationState;
return this;
}
/**
* Get the licenseState property: License state for this connector.
*
* @return the licenseState value.
*/
public DataConnectorLicenseState licenseState() {
return this.licenseState;
}
/**
* Set the licenseState property: License state for this connector.
*
* @param licenseState the licenseState value to set.
* @return the DataConnectorRequirementsStateInner object itself.
*/
public DataConnectorRequirementsStateInner withLicenseState(DataConnectorLicenseState licenseState) {
this.licenseState = licenseState;
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();
jsonWriter.writeStringField("authorizationState",
this.authorizationState == null ? null : this.authorizationState.toString());
jsonWriter.writeStringField("licenseState", this.licenseState == null ? null : this.licenseState.toString());
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of DataConnectorRequirementsStateInner from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of DataConnectorRequirementsStateInner 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 DataConnectorRequirementsStateInner.
*/
public static DataConnectorRequirementsStateInner fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
DataConnectorRequirementsStateInner deserializedDataConnectorRequirementsStateInner
= new DataConnectorRequirementsStateInner();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("authorizationState".equals(fieldName)) {
deserializedDataConnectorRequirementsStateInner.authorizationState
= DataConnectorAuthorizationState.fromString(reader.getString());
} else if ("licenseState".equals(fieldName)) {
deserializedDataConnectorRequirementsStateInner.licenseState
= DataConnectorLicenseState.fromString(reader.getString());
} else {
reader.skipChildren();
}
}
return deserializedDataConnectorRequirementsStateInner;
});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy