com.cognite.sdk.scala.v1.dataModels.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cognite-sdk-scala_3 Show documentation
Show all versions of cognite-sdk-scala_3 Show documentation
Scala SDK for Cognite Data Fusion.
// Copyright 2020 Cognite AS
// SPDX-License-Identifier: Apache-2.0
package com.cognite.sdk.scala.v1
final case class SpacedItems[A](spaceExternalId: String, items: Seq[A])
final case class DataModelIdentifier(
space: Option[String],
model: String
)
final case class DirectRelationIdentifier(
spaceExternalId: Option[String],
externalId: String
)
final case class DataModelPropertyDefinition(
`type`: PropertyType[_],
nullable: Boolean = true,
targetModel: Option[DataModelIdentifier] = None
)
final case class UniquenessConstraint(
uniqueProperties: Seq[String]
)
final case class DataModelConstraints(
uniqueness: Option[Map[String, UniquenessConstraint]] = None
)
final case class BTreeIndex(
properties: Seq[String]
)
final case class DataModelIndexes(
btreeIndex: Option[Map[String, BTreeIndex]] = None
)
final case class DataModel(
externalId: String,
properties: Option[Map[String, DataModelPropertyDefinition]] = None,
`extends`: Option[Seq[DataModelIdentifier]] = None,
indexes: Option[DataModelIndexes] = None,
constraints: Option[DataModelConstraints] = None,
dataModelType: DataModelType = DataModelType.NodeType
)
sealed abstract class DataModelType
object DataModelType {
case object NodeType extends DataModelType
case object EdgeType extends DataModelType
}
final case class DataModelListInput(spaceExternalId: String)
© 2015 - 2025 Weber Informatics LLC | Privacy Policy