Compartir a través de


PolicyInner Class

public final class PolicyInner
extends Resource

A Policy.

Constructor Summary

Constructor Description
PolicyInner()

Creates an instance of PolicyInner class.

Method Summary

Modifier and Type Method and Description
OffsetDateTime createdDate()

Get the createdDate property: The creation date of the policy.

String description()

Get the description property: The description of the policy.

PolicyEvaluatorType evaluatorType()

Get the evaluatorType property: The evaluator type of the policy (i.e.

String factData()

Get the factData property: The fact data of the policy.

PolicyFactName factName()

Get the factName property: The fact name of the policy (e.g.

static PolicyInner fromJson(JsonReader jsonReader)

Reads an instance of PolicyInner from the JsonReader.

String id()

Get the id property: Fully qualified resource Id for the resource.

String name()

Get the name property: The name of the resource.

String provisioningState()

Get the provisioningState property: The provisioning status of the resource.

PolicyStatus status()

Get the status property: The status of the policy.

String threshold()

Get the threshold property: The threshold of the policy (i.e.

JsonWriter toJson(JsonWriter jsonWriter)
String type()

Get the type property: The type of the resource.

String uniqueIdentifier()

Get the uniqueIdentifier property: The unique immutable identifier of a resource (Guid).

void validate()

Validates the instance.

PolicyInner withDescription(String description)

Set the description property: The description of the policy.

PolicyInner withEvaluatorType(PolicyEvaluatorType evaluatorType)

Set the evaluatorType property: The evaluator type of the policy (i.e.

PolicyInner withFactData(String factData)

Set the factData property: The fact data of the policy.

PolicyInner withFactName(PolicyFactName factName)

Set the factName property: The fact name of the policy (e.g.

PolicyInner withLocation(String location)
PolicyInner withStatus(PolicyStatus status)

Set the status property: The status of the policy.

PolicyInner withTags(Map<String,String> tags)
PolicyInner withThreshold(String threshold)

Set the threshold property: The threshold of the policy (i.e.

Methods inherited from ProxyResource

Methods inherited from Resource

Methods inherited from java.lang.Object

Constructor Details

PolicyInner

public PolicyInner()

Creates an instance of PolicyInner class.

Method Details

createdDate

public OffsetDateTime createdDate()

Get the createdDate property: The creation date of the policy.

Returns:

the createdDate value.

description

public String description()

Get the description property: The description of the policy.

Returns:

the description value.

evaluatorType

public PolicyEvaluatorType evaluatorType()

Get the evaluatorType property: The evaluator type of the policy (i.e. AllowedValuesPolicy, MaxValuePolicy).

Returns:

the evaluatorType value.

factData

public String factData()

Get the factData property: The fact data of the policy.

Returns:

the factData value.

factName

public PolicyFactName factName()

Get the factName property: The fact name of the policy (e.g. LabVmCount, LabVmSize, MaxVmsAllowedPerLab, etc.

Returns:

the factName value.

fromJson

public static PolicyInner fromJson(JsonReader jsonReader)

Reads an instance of PolicyInner from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

id

public String id()

Get the id property: Fully qualified resource Id for the resource.

Overrides:

PolicyInner.id()

Returns:

the id value.

name

public String name()

Get the name property: The name of the resource.

Overrides:

PolicyInner.name()

Returns:

the name value.

provisioningState

public String provisioningState()

Get the provisioningState property: The provisioning status of the resource.

Returns:

the provisioningState value.

status

public PolicyStatus status()

Get the status property: The status of the policy.

Returns:

the status value.

threshold

public String threshold()

Get the threshold property: The threshold of the policy (i.e. a number for MaxValuePolicy, and a JSON array of values for AllowedValuesPolicy).

Returns:

the threshold value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Overrides:

PolicyInner.toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

type

public String type()

Get the type property: The type of the resource.

Overrides:

PolicyInner.type()

Returns:

the type value.

uniqueIdentifier

public String uniqueIdentifier()

Get the uniqueIdentifier property: The unique immutable identifier of a resource (Guid).

Returns:

the uniqueIdentifier value.

validate

public void validate()

Validates the instance.

withDescription

public PolicyInner withDescription(String description)

Set the description property: The description of the policy.

Parameters:

description - the description value to set.

Returns:

the PolicyInner object itself.

withEvaluatorType

public PolicyInner withEvaluatorType(PolicyEvaluatorType evaluatorType)

Set the evaluatorType property: The evaluator type of the policy (i.e. AllowedValuesPolicy, MaxValuePolicy).

Parameters:

evaluatorType - the evaluatorType value to set.

Returns:

the PolicyInner object itself.

withFactData

public PolicyInner withFactData(String factData)

Set the factData property: The fact data of the policy.

Parameters:

factData - the factData value to set.

Returns:

the PolicyInner object itself.

withFactName

public PolicyInner withFactName(PolicyFactName factName)

Set the factName property: The fact name of the policy (e.g. LabVmCount, LabVmSize, MaxVmsAllowedPerLab, etc.

Parameters:

factName - the factName value to set.

Returns:

the PolicyInner object itself.

withLocation

public PolicyInner withLocation(String location)

Overrides:

PolicyInner.withLocation(String location)

Parameters:

location

withStatus

public PolicyInner withStatus(PolicyStatus status)

Set the status property: The status of the policy.

Parameters:

status - the status value to set.

Returns:

the PolicyInner object itself.

withTags

public PolicyInner withTags(Map<String,String> tags)

Overrides:

PolicyInner.withTags(Map<String,String> tags)

Parameters:

tags

withThreshold

public PolicyInner withThreshold(String threshold)

Set the threshold property: The threshold of the policy (i.e. a number for MaxValuePolicy, and a JSON array of values for AllowedValuesPolicy).

Parameters:

threshold - the threshold value to set.

Returns:

the PolicyInner object itself.

Applies to