
com.azure.resourcemanager.appcontainers.models.DaprConfiguration 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.appcontainers.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;
/**
* Configuration properties Dapr component.
*/
@Immutable
public final class DaprConfiguration implements JsonSerializable {
/*
* The version of Dapr
*/
private String version;
/**
* Creates an instance of DaprConfiguration class.
*/
public DaprConfiguration() {
}
/**
* Get the version property: The version of Dapr.
*
* @return the version value.
*/
public String version() {
return this.version;
}
/**
* 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 DaprConfiguration from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of DaprConfiguration 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 DaprConfiguration.
*/
public static DaprConfiguration fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
DaprConfiguration deserializedDaprConfiguration = new DaprConfiguration();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("version".equals(fieldName)) {
deserializedDaprConfiguration.version = reader.getString();
} else {
reader.skipChildren();
}
}
return deserializedDaprConfiguration;
});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy