CassandraSchema Class

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

Implements

public final class CassandraSchema
implements JsonSerializable<CassandraSchema>

Cosmos DB Cassandra table schema.

Constructor Summary

Constructor Description
CassandraSchema()

Creates an instance of CassandraSchema class.

Method Summary

Modifier and Type Method and Description
List<ClusterKey> clusterKeys()

Get the clusterKeys property: List of cluster key.

List<Column> columns()

Get the columns property: List of Cassandra table columns.

static CassandraSchema fromJson(JsonReader jsonReader)

Reads an instance of CassandraSchema from the JsonReader.

List<CassandraPartitionKey> partitionKeys()

Get the partitionKeys property: List of partition key.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

CassandraSchema withClusterKeys(List<ClusterKey> clusterKeys)

Set the clusterKeys property: List of cluster key.

CassandraSchema withColumns(List<Column> columns)

Set the columns property: List of Cassandra table columns.

CassandraSchema withPartitionKeys(List<CassandraPartitionKey> partitionKeys)

Set the partitionKeys property: List of partition key.

Methods inherited from java.lang.Object

Constructor Details

CassandraSchema

public CassandraSchema()

Creates an instance of CassandraSchema class.

Method Details

clusterKeys

public List clusterKeys()

Get the clusterKeys property: List of cluster key.

Returns:

the clusterKeys value.

columns

public List columns()

Get the columns property: List of Cassandra table columns.

Returns:

the columns value.

fromJson

public static CassandraSchema fromJson(JsonReader jsonReader)

Reads an instance of CassandraSchema from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

partitionKeys

public List partitionKeys()

Get the partitionKeys property: List of partition key.

Returns:

the partitionKeys value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withClusterKeys

public CassandraSchema withClusterKeys(List clusterKeys)

Set the clusterKeys property: List of cluster key.

Parameters:

clusterKeys - the clusterKeys value to set.

Returns:

the CassandraSchema object itself.

withColumns

public CassandraSchema withColumns(List columns)

Set the columns property: List of Cassandra table columns.

Parameters:

columns - the columns value to set.

Returns:

the CassandraSchema object itself.

withPartitionKeys

public CassandraSchema withPartitionKeys(List partitionKeys)

Set the partitionKeys property: List of partition key.

Parameters:

partitionKeys - the partitionKeys value to set.

Returns:

the CassandraSchema object itself.

Applies to