com.azure.resourcemanager.costmanagement.models.ForecastComparisonExpression Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-resourcemanager-costmanagement Show documentation
Show all versions of azure-resourcemanager-costmanagement Show documentation
This package contains Microsoft Azure SDK for CostManagement Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. CostManagement management client provides access to CostManagement resources for Azure Enterprise Subscriptions. Package tag package-2022-10.
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.resourcemanager.costmanagement.models;
import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
/** The comparison expression to be used in the forecast. */
@Fluent
public final class ForecastComparisonExpression {
/*
* The name of the column to use in comparison.
*/
@JsonProperty(value = "name", required = true)
private String name;
/*
* The operator to use for comparison.
*/
@JsonProperty(value = "operator", required = true)
private ForecastOperatorType operator;
/*
* Array of values to use for comparison
*/
@JsonProperty(value = "values", required = true)
private List values;
/** Creates an instance of ForecastComparisonExpression class. */
public ForecastComparisonExpression() {
}
/**
* Get the name property: The name of the column to use in comparison.
*
* @return the name value.
*/
public String name() {
return this.name;
}
/**
* Set the name property: The name of the column to use in comparison.
*
* @param name the name value to set.
* @return the ForecastComparisonExpression object itself.
*/
public ForecastComparisonExpression withName(String name) {
this.name = name;
return this;
}
/**
* Get the operator property: The operator to use for comparison.
*
* @return the operator value.
*/
public ForecastOperatorType operator() {
return this.operator;
}
/**
* Set the operator property: The operator to use for comparison.
*
* @param operator the operator value to set.
* @return the ForecastComparisonExpression object itself.
*/
public ForecastComparisonExpression withOperator(ForecastOperatorType operator) {
this.operator = operator;
return this;
}
/**
* Get the values property: Array of values to use for comparison.
*
* @return the values value.
*/
public List values() {
return this.values;
}
/**
* Set the values property: Array of values to use for comparison.
*
* @param values the values value to set.
* @return the ForecastComparisonExpression object itself.
*/
public ForecastComparisonExpression withValues(List values) {
this.values = values;
return this;
}
/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
if (name() == null) {
throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
"Missing required property name in model ForecastComparisonExpression"));
}
if (operator() == null) {
throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
"Missing required property operator in model ForecastComparisonExpression"));
}
if (values() == null) {
throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
"Missing required property values in model ForecastComparisonExpression"));
}
}
private static final ClientLogger LOGGER = new ClientLogger(ForecastComparisonExpression.class);
}