Class WorkloadGroupProperties
java.lang.Object
com.azure.resourcemanager.sql.fluent.models.WorkloadGroupProperties
- All Implemented Interfaces:
com.azure.json.JsonSerializable<WorkloadGroupProperties>
public final class WorkloadGroupProperties
extends Object
implements com.azure.json.JsonSerializable<WorkloadGroupProperties>
Workload group definition. For more information look at sys.workload_management_workload_groups (DMV).
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of WorkloadGroupProperties class. -
Method Summary
Modifier and TypeMethodDescriptionstatic WorkloadGroupPropertiesfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of WorkloadGroupProperties from the JsonReader.Get the importance property: The workload group importance level.intGet the maxResourcePercent property: The workload group cap percentage resource.Get the maxResourcePercentPerRequest property: The workload group request maximum grant percentage.intGet the minResourcePercent property: The workload group minimum percentage resource.doubleGet the minResourcePercentPerRequest property: The workload group request minimum grant percentage.Get the queryExecutionTimeout property: The workload group query execution timeout.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withImportance(String importance) Set the importance property: The workload group importance level.withMaxResourcePercent(int maxResourcePercent) Set the maxResourcePercent property: The workload group cap percentage resource.withMaxResourcePercentPerRequest(Double maxResourcePercentPerRequest) Set the maxResourcePercentPerRequest property: The workload group request maximum grant percentage.withMinResourcePercent(int minResourcePercent) Set the minResourcePercent property: The workload group minimum percentage resource.withMinResourcePercentPerRequest(double minResourcePercentPerRequest) Set the minResourcePercentPerRequest property: The workload group request minimum grant percentage.withQueryExecutionTimeout(Integer queryExecutionTimeout) Set the queryExecutionTimeout property: The workload group query execution timeout.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
WorkloadGroupProperties
public WorkloadGroupProperties()Creates an instance of WorkloadGroupProperties class.
-
-
Method Details
-
minResourcePercent
public int minResourcePercent()Get the minResourcePercent property: The workload group minimum percentage resource.- Returns:
- the minResourcePercent value.
-
withMinResourcePercent
Set the minResourcePercent property: The workload group minimum percentage resource.- Parameters:
minResourcePercent- the minResourcePercent value to set.- Returns:
- the WorkloadGroupProperties object itself.
-
maxResourcePercent
public int maxResourcePercent()Get the maxResourcePercent property: The workload group cap percentage resource.- Returns:
- the maxResourcePercent value.
-
withMaxResourcePercent
Set the maxResourcePercent property: The workload group cap percentage resource.- Parameters:
maxResourcePercent- the maxResourcePercent value to set.- Returns:
- the WorkloadGroupProperties object itself.
-
minResourcePercentPerRequest
public double minResourcePercentPerRequest()Get the minResourcePercentPerRequest property: The workload group request minimum grant percentage.- Returns:
- the minResourcePercentPerRequest value.
-
withMinResourcePercentPerRequest
public WorkloadGroupProperties withMinResourcePercentPerRequest(double minResourcePercentPerRequest) Set the minResourcePercentPerRequest property: The workload group request minimum grant percentage.- Parameters:
minResourcePercentPerRequest- the minResourcePercentPerRequest value to set.- Returns:
- the WorkloadGroupProperties object itself.
-
maxResourcePercentPerRequest
Get the maxResourcePercentPerRequest property: The workload group request maximum grant percentage.- Returns:
- the maxResourcePercentPerRequest value.
-
withMaxResourcePercentPerRequest
public WorkloadGroupProperties withMaxResourcePercentPerRequest(Double maxResourcePercentPerRequest) Set the maxResourcePercentPerRequest property: The workload group request maximum grant percentage.- Parameters:
maxResourcePercentPerRequest- the maxResourcePercentPerRequest value to set.- Returns:
- the WorkloadGroupProperties object itself.
-
importance
Get the importance property: The workload group importance level.- Returns:
- the importance value.
-
withImportance
Set the importance property: The workload group importance level.- Parameters:
importance- the importance value to set.- Returns:
- the WorkloadGroupProperties object itself.
-
queryExecutionTimeout
Get the queryExecutionTimeout property: The workload group query execution timeout.- Returns:
- the queryExecutionTimeout value.
-
withQueryExecutionTimeout
Set the queryExecutionTimeout property: The workload group query execution timeout.- Parameters:
queryExecutionTimeout- the queryExecutionTimeout value to set.- Returns:
- the WorkloadGroupProperties object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<WorkloadGroupProperties>- Throws:
IOException
-
fromJson
public static WorkloadGroupProperties fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of WorkloadGroupProperties from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of WorkloadGroupProperties 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.IOException- If an error occurs while reading the WorkloadGroupProperties.
-