com.azure.ai.metricsadvisor.implementation.models.ChangePointFeedbackValue Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-ai-metricsadvisor Show documentation
Show all versions of azure-ai-metricsadvisor Show documentation
This package contains the Microsoft Azure Cognitive Services Metrics Advisor SDK.
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.ai.metricsadvisor.implementation.models;
import com.azure.ai.metricsadvisor.models.ChangePointValue;
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;
/**
* The ChangePointFeedbackValue model.
*/
@Fluent
public final class ChangePointFeedbackValue implements JsonSerializable {
/*
* The changePointValue property.
*/
private ChangePointValue changePointValue;
/**
* Creates an instance of ChangePointFeedbackValue class.
*/
public ChangePointFeedbackValue() {
}
/**
* Get the changePointValue property: The changePointValue property.
*
* @return the changePointValue value.
*/
public ChangePointValue getChangePointValue() {
return this.changePointValue;
}
/**
* Set the changePointValue property: The changePointValue property.
*
* @param changePointValue the changePointValue value to set.
* @return the ChangePointFeedbackValue object itself.
*/
public ChangePointFeedbackValue setChangePointValue(ChangePointValue changePointValue) {
this.changePointValue = changePointValue;
return this;
}
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
jsonWriter.writeStringField("changePointValue",
this.changePointValue == null ? null : this.changePointValue.toString());
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of ChangePointFeedbackValue from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of ChangePointFeedbackValue if the JsonReader was pointing to an instance of it, or null if
* it was pointing to JSON null.
* @throws IllegalStateException If the deserialized JSON object was missing any required properties.
* @throws IOException If an error occurs while reading the ChangePointFeedbackValue.
*/
public static ChangePointFeedbackValue fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
ChangePointFeedbackValue deserializedChangePointFeedbackValue = new ChangePointFeedbackValue();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("changePointValue".equals(fieldName)) {
deserializedChangePointFeedbackValue.changePointValue
= ChangePointValue.fromString(reader.getString());
} else {
reader.skipChildren();
}
}
return deserializedChangePointFeedbackValue;
});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy