Partager via


ComputedProperty Class

  • java.lang.Object
    • com.azure.resourcemanager.cosmos.models.ComputedProperty

Implements

public final class ComputedProperty
implements JsonSerializable<ComputedProperty>

The definition of a computed property.

Constructor Summary

Constructor Description
ComputedProperty()

Creates an instance of ComputedProperty class.

Method Summary

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

Reads an instance of ComputedProperty from the JsonReader.

String name()

Get the name property: The name of a computed property, for example - "cp_lowerName".

String query()

Get the query property: The query that evaluates the value for computed property, for example - "SELECT VALUE LOWER(c.name) FROM c".

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

ComputedProperty withName(String name)

Set the name property: The name of a computed property, for example - "cp_lowerName".

ComputedProperty withQuery(String query)

Set the query property: The query that evaluates the value for computed property, for example - "SELECT VALUE LOWER(c.name) FROM c".

Methods inherited from java.lang.Object

Constructor Details

ComputedProperty

public ComputedProperty()

Creates an instance of ComputedProperty class.

Method Details

fromJson

public static ComputedProperty fromJson(JsonReader jsonReader)

Reads an instance of ComputedProperty from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

name

public String name()

Get the name property: The name of a computed property, for example - "cp_lowerName".

Returns:

the name value.

query

public String query()

Get the query property: The query that evaluates the value for computed property, for example - "SELECT VALUE LOWER(c.name) FROM c".

Returns:

the query value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withName

public ComputedProperty withName(String name)

Set the name property: The name of a computed property, for example - "cp_lowerName".

Parameters:

name - the name value to set.

Returns:

the ComputedProperty object itself.

withQuery

public ComputedProperty withQuery(String query)

Set the query property: The query that evaluates the value for computed property, for example - "SELECT VALUE LOWER(c.name) FROM c".

Parameters:

query - the query value to set.

Returns:

the ComputedProperty object itself.

Applies to