
com.azure.resourcemanager.datafactory.models.PurviewConfiguration Maven / Gradle / Ivy
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.resourcemanager.datafactory.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 java.io.IOException;
/**
* Purview configuration.
*/
@Fluent
public final class PurviewConfiguration implements JsonSerializable {
/*
* Purview resource id.
*/
private String purviewResourceId;
/**
* Creates an instance of PurviewConfiguration class.
*/
public PurviewConfiguration() {
}
/**
* Get the purviewResourceId property: Purview resource id.
*
* @return the purviewResourceId value.
*/
public String purviewResourceId() {
return this.purviewResourceId;
}
/**
* Set the purviewResourceId property: Purview resource id.
*
* @param purviewResourceId the purviewResourceId value to set.
* @return the PurviewConfiguration object itself.
*/
public PurviewConfiguration withPurviewResourceId(String purviewResourceId) {
this.purviewResourceId = purviewResourceId;
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("purviewResourceId", this.purviewResourceId);
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of PurviewConfiguration from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of PurviewConfiguration 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 PurviewConfiguration.
*/
public static PurviewConfiguration fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
PurviewConfiguration deserializedPurviewConfiguration = new PurviewConfiguration();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("purviewResourceId".equals(fieldName)) {
deserializedPurviewConfiguration.purviewResourceId = reader.getString();
} else {
reader.skipChildren();
}
}
return deserializedPurviewConfiguration;
});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy