VirtualMachinePlacementHint Class

  • java.lang.Object
    • com.azure.resourcemanager.networkcloud.models.VirtualMachinePlacementHint

Implements

public final class VirtualMachinePlacementHint
implements JsonSerializable<VirtualMachinePlacementHint>

VirtualMachinePlacementHint represents a single scheduling hint of the virtual machine.

Constructor Summary

Constructor Description
VirtualMachinePlacementHint()

Creates an instance of VirtualMachinePlacementHint class.

Method Summary

Modifier and Type Method and Description
static VirtualMachinePlacementHint fromJson(JsonReader jsonReader)

Reads an instance of VirtualMachinePlacementHint from the JsonReader.

VirtualMachinePlacementHintType hintType()

Get the hintType property: The specification of whether this hint supports affinity or anti-affinity with the referenced resources.

String resourceId()

Get the resourceId property: The resource ID of the target object that the placement hints will be checked against, e.g., the bare metal node to host the virtual machine.

VirtualMachineSchedulingExecution schedulingExecution()

Get the schedulingExecution property: The indicator of whether the hint is a hard or soft requirement during scheduling.

VirtualMachinePlacementHintPodAffinityScope scope()

Get the scope property: The scope for the virtual machine affinity or anti-affinity placement hint.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

VirtualMachinePlacementHint withHintType(VirtualMachinePlacementHintType hintType)

Set the hintType property: The specification of whether this hint supports affinity or anti-affinity with the referenced resources.

VirtualMachinePlacementHint withResourceId(String resourceId)

Set the resourceId property: The resource ID of the target object that the placement hints will be checked against, e.g., the bare metal node to host the virtual machine.

VirtualMachinePlacementHint withSchedulingExecution(VirtualMachineSchedulingExecution schedulingExecution)

Set the schedulingExecution property: The indicator of whether the hint is a hard or soft requirement during scheduling.

VirtualMachinePlacementHint withScope(VirtualMachinePlacementHintPodAffinityScope scope)

Set the scope property: The scope for the virtual machine affinity or anti-affinity placement hint.

Methods inherited from java.lang.Object

Constructor Details

VirtualMachinePlacementHint

public VirtualMachinePlacementHint()

Creates an instance of VirtualMachinePlacementHint class.

Method Details

fromJson

public static VirtualMachinePlacementHint fromJson(JsonReader jsonReader)

Reads an instance of VirtualMachinePlacementHint from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of VirtualMachinePlacementHint if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

hintType

public VirtualMachinePlacementHintType hintType()

Get the hintType property: The specification of whether this hint supports affinity or anti-affinity with the referenced resources.

Returns:

the hintType value.

resourceId

public String resourceId()

Get the resourceId property: The resource ID of the target object that the placement hints will be checked against, e.g., the bare metal node to host the virtual machine.

Returns:

the resourceId value.

schedulingExecution

public VirtualMachineSchedulingExecution schedulingExecution()

Get the schedulingExecution property: The indicator of whether the hint is a hard or soft requirement during scheduling.

Returns:

the schedulingExecution value.

scope

public VirtualMachinePlacementHintPodAffinityScope scope()

Get the scope property: The scope for the virtual machine affinity or anti-affinity placement hint. It should always be "Machine" in the case of node affinity.

Returns:

the scope value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withHintType

public VirtualMachinePlacementHint withHintType(VirtualMachinePlacementHintType hintType)

Set the hintType property: The specification of whether this hint supports affinity or anti-affinity with the referenced resources.

Parameters:

hintType - the hintType value to set.

Returns:

the VirtualMachinePlacementHint object itself.

withResourceId

public VirtualMachinePlacementHint withResourceId(String resourceId)

Set the resourceId property: The resource ID of the target object that the placement hints will be checked against, e.g., the bare metal node to host the virtual machine.

Parameters:

resourceId - the resourceId value to set.

Returns:

the VirtualMachinePlacementHint object itself.

withSchedulingExecution

public VirtualMachinePlacementHint withSchedulingExecution(VirtualMachineSchedulingExecution schedulingExecution)

Set the schedulingExecution property: The indicator of whether the hint is a hard or soft requirement during scheduling.

Parameters:

schedulingExecution - the schedulingExecution value to set.

Returns:

the VirtualMachinePlacementHint object itself.

withScope

public VirtualMachinePlacementHint withScope(VirtualMachinePlacementHintPodAffinityScope scope)

Set the scope property: The scope for the virtual machine affinity or anti-affinity placement hint. It should always be "Machine" in the case of node affinity.

Parameters:

scope - the scope value to set.

Returns:

the VirtualMachinePlacementHint object itself.

Applies to