Partager via


WhatIfChange Class

  • java.lang.Object
    • com.azure.resourcemanager.resources.models.WhatIfChange

Implements

public final class WhatIfChange
implements JsonSerializable<WhatIfChange>

Information about a single resource change predicted by What-If operation.

Constructor Summary

Constructor Description
WhatIfChange()

Creates an instance of WhatIfChange class.

Method Summary

Modifier and Type Method and Description
Object after()

Get the after property: The predicted snapshot of the resource after the deployment is executed.

Object before()

Get the before property: The snapshot of the resource before the deployment is executed.

ChangeType changeType()

Get the changeType property: Type of change that will be made to the resource when the deployment is executed.

List<WhatIfPropertyChange> delta()

Get the delta property: The predicted changes to resource properties.

static WhatIfChange fromJson(JsonReader jsonReader)

Reads an instance of WhatIfChange from the JsonReader.

String resourceId()

Get the resourceId property: Resource ID.

JsonWriter toJson(JsonWriter jsonWriter)
String unsupportedReason()

Get the unsupportedReason property: The explanation about why the resource is unsupported by What-If.

void validate()

Validates the instance.

WhatIfChange withAfter(Object after)

Set the after property: The predicted snapshot of the resource after the deployment is executed.

WhatIfChange withBefore(Object before)

Set the before property: The snapshot of the resource before the deployment is executed.

WhatIfChange withChangeType(ChangeType changeType)

Set the changeType property: Type of change that will be made to the resource when the deployment is executed.

WhatIfChange withDelta(List<WhatIfPropertyChange> delta)

Set the delta property: The predicted changes to resource properties.

WhatIfChange withResourceId(String resourceId)

Set the resourceId property: Resource ID.

WhatIfChange withUnsupportedReason(String unsupportedReason)

Set the unsupportedReason property: The explanation about why the resource is unsupported by What-If.

Methods inherited from java.lang.Object

Constructor Details

WhatIfChange

public WhatIfChange()

Creates an instance of WhatIfChange class.

Method Details

after

public Object after()

Get the after property: The predicted snapshot of the resource after the deployment is executed.

Returns:

the after value.

before

public Object before()

Get the before property: The snapshot of the resource before the deployment is executed.

Returns:

the before value.

changeType

public ChangeType changeType()

Get the changeType property: Type of change that will be made to the resource when the deployment is executed.

Returns:

the changeType value.

delta

public List delta()

Get the delta property: The predicted changes to resource properties.

Returns:

the delta value.

fromJson

public static WhatIfChange fromJson(JsonReader jsonReader)

Reads an instance of WhatIfChange from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

resourceId

public String resourceId()

Get the resourceId property: Resource ID.

Returns:

the resourceId value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

unsupportedReason

public String unsupportedReason()

Get the unsupportedReason property: The explanation about why the resource is unsupported by What-If.

Returns:

the unsupportedReason value.

validate

public void validate()

Validates the instance.

withAfter

public WhatIfChange withAfter(Object after)

Set the after property: The predicted snapshot of the resource after the deployment is executed.

Parameters:

after - the after value to set.

Returns:

the WhatIfChange object itself.

withBefore

public WhatIfChange withBefore(Object before)

Set the before property: The snapshot of the resource before the deployment is executed.

Parameters:

before - the before value to set.

Returns:

the WhatIfChange object itself.

withChangeType

public WhatIfChange withChangeType(ChangeType changeType)

Set the changeType property: Type of change that will be made to the resource when the deployment is executed.

Parameters:

changeType - the changeType value to set.

Returns:

the WhatIfChange object itself.

withDelta

public WhatIfChange withDelta(List delta)

Set the delta property: The predicted changes to resource properties.

Parameters:

delta - the delta value to set.

Returns:

the WhatIfChange object itself.

withResourceId

public WhatIfChange withResourceId(String resourceId)

Set the resourceId property: Resource ID.

Parameters:

resourceId - the resourceId value to set.

Returns:

the WhatIfChange object itself.

withUnsupportedReason

public WhatIfChange withUnsupportedReason(String unsupportedReason)

Set the unsupportedReason property: The explanation about why the resource is unsupported by What-If.

Parameters:

unsupportedReason - the unsupportedReason value to set.

Returns:

the WhatIfChange object itself.

Applies to