Partager via


SpatialSpec Class

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

Implements

public final class SpatialSpec
implements JsonSerializable<SpatialSpec>

The SpatialSpec model.

Constructor Summary

Constructor Description
SpatialSpec()

Creates an instance of SpatialSpec class.

Method Summary

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

Reads an instance of SpatialSpec from the JsonReader.

String path()

Get the path property: The path for which the indexing behavior applies to.

JsonWriter toJson(JsonWriter jsonWriter)
List<SpatialType> types()

Get the types property: List of path's spatial type.

void validate()

Validates the instance.

SpatialSpec withPath(String path)

Set the path property: The path for which the indexing behavior applies to.

SpatialSpec withTypes(List<SpatialType> types)

Set the types property: List of path's spatial type.

Methods inherited from java.lang.Object

Constructor Details

SpatialSpec

public SpatialSpec()

Creates an instance of SpatialSpec class.

Method Details

fromJson

public static SpatialSpec fromJson(JsonReader jsonReader)

Reads an instance of SpatialSpec from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

path

public String path()

Get the path property: The path for which the indexing behavior applies to. Index paths typically start with root and end with wildcard (/path/*).

Returns:

the path value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

types

public List types()

Get the types property: List of path's spatial type.

Returns:

the types value.

validate

public void validate()

Validates the instance.

withPath

public SpatialSpec withPath(String path)

Set the path property: The path for which the indexing behavior applies to. Index paths typically start with root and end with wildcard (/path/*).

Parameters:

path - the path value to set.

Returns:

the SpatialSpec object itself.

withTypes

public SpatialSpec withTypes(List types)

Set the types property: List of path's spatial type.

Parameters:

types - the types value to set.

Returns:

the SpatialSpec object itself.

Applies to