GraphResource Class

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

Implements

public class GraphResource
implements JsonSerializable<GraphResource>

Cosmos DB Graph resource object.

Constructor Summary

Constructor Description
GraphResource()

Creates an instance of GraphResource class.

Method Summary

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

Reads an instance of GraphResource from the JsonReader.

String id()

Get the id property: Name of the Cosmos DB Graph.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

GraphResource withId(String id)

Set the id property: Name of the Cosmos DB Graph.

Methods inherited from java.lang.Object

Constructor Details

GraphResource

public GraphResource()

Creates an instance of GraphResource class.

Method Details

fromJson

public static GraphResource fromJson(JsonReader jsonReader)

Reads an instance of GraphResource from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of GraphResource 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: Name of the Cosmos DB Graph.

Returns:

the id value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withId

public GraphResource withId(String id)

Set the id property: Name of the Cosmos DB Graph.

Parameters:

id - the id value to set.

Returns:

the GraphResource object itself.

Applies to