com.azure.ai.metricsadvisor.implementation.models.SuppressConditionPatch 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.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 SuppressConditionPatch model.
*/
@Fluent
public final class SuppressConditionPatch implements JsonSerializable {
/*
* min point number, value range : [1, +∞)
*/
private Integer minNumber;
/*
* min point ratio, value range : (0, 100]
*/
private Double minRatio;
/**
* Creates an instance of SuppressConditionPatch class.
*/
public SuppressConditionPatch() {
}
/**
* Get the minNumber property: min point number, value range : [1, +∞).
*
* @return the minNumber value.
*/
public Integer getMinNumber() {
return this.minNumber;
}
/**
* Set the minNumber property: min point number, value range : [1, +∞).
*
* @param minNumber the minNumber value to set.
* @return the SuppressConditionPatch object itself.
*/
public SuppressConditionPatch setMinNumber(Integer minNumber) {
this.minNumber = minNumber;
return this;
}
/**
* Get the minRatio property: min point ratio, value range : (0, 100].
*
* @return the minRatio value.
*/
public Double getMinRatio() {
return this.minRatio;
}
/**
* Set the minRatio property: min point ratio, value range : (0, 100].
*
* @param minRatio the minRatio value to set.
* @return the SuppressConditionPatch object itself.
*/
public SuppressConditionPatch setMinRatio(Double minRatio) {
this.minRatio = minRatio;
return this;
}
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
jsonWriter.writeNumberField("minNumber", this.minNumber);
jsonWriter.writeNumberField("minRatio", this.minRatio);
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of SuppressConditionPatch from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of SuppressConditionPatch 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 SuppressConditionPatch.
*/
public static SuppressConditionPatch fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
SuppressConditionPatch deserializedSuppressConditionPatch = new SuppressConditionPatch();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("minNumber".equals(fieldName)) {
deserializedSuppressConditionPatch.minNumber = reader.getNullable(JsonReader::getInt);
} else if ("minRatio".equals(fieldName)) {
deserializedSuppressConditionPatch.minRatio = reader.getNullable(JsonReader::getDouble);
} else {
reader.skipChildren();
}
}
return deserializedSuppressConditionPatch;
});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy