ServiceResourcePropertiesBase Class

  • java.lang.Object
    • com.azure.resourcemanager.servicefabric.models.ServiceResourcePropertiesBase

Implements

public class ServiceResourcePropertiesBase
implements JsonSerializable<ServiceResourcePropertiesBase>

The common service resource properties.

Constructor Summary

Constructor Description
ServiceResourcePropertiesBase()

Creates an instance of ServiceResourcePropertiesBase class.

Method Summary

Modifier and Type Method and Description
List<ServiceCorrelationDescription> correlationScheme()

Get the correlationScheme property: A list that describes the correlation of the service with other services.

MoveCost defaultMoveCost()

Get the defaultMoveCost property: Specifies the move cost for the service.

static ServiceResourcePropertiesBase fromJson(JsonReader jsonReader)

Reads an instance of ServiceResourcePropertiesBase from the JsonReader.

String placementConstraints()

Get the placementConstraints property: The placement constraints as a string.

List<ServiceLoadMetricDescription> serviceLoadMetrics()

Get the serviceLoadMetrics property: The service load metrics is given as an array of ServiceLoadMetricDescription objects.

List<ServicePlacementPolicyDescription> servicePlacementPolicies()

Get the servicePlacementPolicies property: A list that describes the correlation of the service with other services.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

ServiceResourcePropertiesBase withCorrelationScheme(List<ServiceCorrelationDescription> correlationScheme)

Set the correlationScheme property: A list that describes the correlation of the service with other services.

ServiceResourcePropertiesBase withDefaultMoveCost(MoveCost defaultMoveCost)

Set the defaultMoveCost property: Specifies the move cost for the service.

ServiceResourcePropertiesBase withPlacementConstraints(String placementConstraints)

Set the placementConstraints property: The placement constraints as a string.

ServiceResourcePropertiesBase withServiceLoadMetrics(List<ServiceLoadMetricDescription> serviceLoadMetrics)

Set the serviceLoadMetrics property: The service load metrics is given as an array of ServiceLoadMetricDescription objects.

ServiceResourcePropertiesBase withServicePlacementPolicies(List<ServicePlacementPolicyDescription> servicePlacementPolicies)

Set the servicePlacementPolicies property: A list that describes the correlation of the service with other services.

Methods inherited from java.lang.Object

Constructor Details

ServiceResourcePropertiesBase

public ServiceResourcePropertiesBase()

Creates an instance of ServiceResourcePropertiesBase class.

Method Details

correlationScheme

public List<ServiceCorrelationDescription> correlationScheme()

Get the correlationScheme property: A list that describes the correlation of the service with other services.

Returns:

the correlationScheme value.

defaultMoveCost

public MoveCost defaultMoveCost()

Get the defaultMoveCost property: Specifies the move cost for the service.

Returns:

the defaultMoveCost value.

fromJson

public static ServiceResourcePropertiesBase fromJson(JsonReader jsonReader)

Reads an instance of ServiceResourcePropertiesBase from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of ServiceResourcePropertiesBase 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 ServiceResourcePropertiesBase.

placementConstraints

public String placementConstraints()

Get the placementConstraints property: The placement constraints as a string. Placement constraints are boolean expressions on node properties and allow for restricting a service to particular nodes based on the service requirements. For example, to place a service on nodes where NodeType is blue specify the following: "NodeColor == blue)".

Returns:

the placementConstraints value.

serviceLoadMetrics

public List<ServiceLoadMetricDescription> serviceLoadMetrics()

Get the serviceLoadMetrics property: The service load metrics is given as an array of ServiceLoadMetricDescription objects.

Returns:

the serviceLoadMetrics value.

servicePlacementPolicies

public List<ServicePlacementPolicyDescription> servicePlacementPolicies()

Get the servicePlacementPolicies property: A list that describes the correlation of the service with other services.

Returns:

the servicePlacementPolicies value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withCorrelationScheme

public ServiceResourcePropertiesBase withCorrelationScheme(List<ServiceCorrelationDescription> correlationScheme)

Set the correlationScheme property: A list that describes the correlation of the service with other services.

Parameters:

correlationScheme - the correlationScheme value to set.

Returns:

the ServiceResourcePropertiesBase object itself.

withDefaultMoveCost

public ServiceResourcePropertiesBase withDefaultMoveCost(MoveCost defaultMoveCost)

Set the defaultMoveCost property: Specifies the move cost for the service.

Parameters:

defaultMoveCost - the defaultMoveCost value to set.

Returns:

the ServiceResourcePropertiesBase object itself.

withPlacementConstraints

public ServiceResourcePropertiesBase withPlacementConstraints(String placementConstraints)

Set the placementConstraints property: The placement constraints as a string. Placement constraints are boolean expressions on node properties and allow for restricting a service to particular nodes based on the service requirements. For example, to place a service on nodes where NodeType is blue specify the following: "NodeColor == blue)".

Parameters:

placementConstraints - the placementConstraints value to set.

Returns:

the ServiceResourcePropertiesBase object itself.

withServiceLoadMetrics

public ServiceResourcePropertiesBase withServiceLoadMetrics(List<ServiceLoadMetricDescription> serviceLoadMetrics)

Set the serviceLoadMetrics property: The service load metrics is given as an array of ServiceLoadMetricDescription objects.

Parameters:

serviceLoadMetrics - the serviceLoadMetrics value to set.

Returns:

the ServiceResourcePropertiesBase object itself.

withServicePlacementPolicies

public ServiceResourcePropertiesBase withServicePlacementPolicies(List<ServicePlacementPolicyDescription> servicePlacementPolicies)

Set the servicePlacementPolicies property: A list that describes the correlation of the service with other services.

Parameters:

servicePlacementPolicies - the servicePlacementPolicies value to set.

Returns:

the ServiceResourcePropertiesBase object itself.

Applies to