Class CassandraSchema
java.lang.Object
com.azure.resourcemanager.cosmos.models.CassandraSchema
- All Implemented Interfaces:
com.azure.json.JsonSerializable<CassandraSchema>
public final class CassandraSchema
extends Object
implements com.azure.json.JsonSerializable<CassandraSchema>
Cosmos DB Cassandra table schema.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the clusterKeys property: List of cluster key.columns()
Get the columns property: List of Cassandra table columns.static CassandraSchema
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of CassandraSchema from the JsonReader.Get the partitionKeys property: List of partition key.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) void
validate()
Validates the instance.withClusterKeys
(List<ClusterKey> clusterKeys) Set the clusterKeys property: List of cluster key.withColumns
(List<Column> columns) Set the columns property: List of Cassandra table columns.withPartitionKeys
(List<CassandraPartitionKey> partitionKeys) Set the partitionKeys property: List of partition key.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
CassandraSchema
public CassandraSchema()Creates an instance of CassandraSchema class.
-
-
Method Details
-
columns
Get the columns property: List of Cassandra table columns.- Returns:
- the columns value.
-
withColumns
Set the columns property: List of Cassandra table columns.- Parameters:
columns
- the columns value to set.- Returns:
- the CassandraSchema object itself.
-
partitionKeys
Get the partitionKeys property: List of partition key.- Returns:
- the partitionKeys value.
-
withPartitionKeys
Set the partitionKeys property: List of partition key.- Parameters:
partitionKeys
- the partitionKeys value to set.- Returns:
- the CassandraSchema object itself.
-
clusterKeys
Get the clusterKeys property: List of cluster key.- Returns:
- the clusterKeys value.
-
withClusterKeys
Set the clusterKeys property: List of cluster key.- Parameters:
clusterKeys
- the clusterKeys value to set.- Returns:
- the CassandraSchema object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-
toJson
- Specified by:
toJson
in interfacecom.azure.json.JsonSerializable<CassandraSchema>
- Throws:
IOException
-
fromJson
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.
-