com.cognite.sdk.scala.v1.fdm.views.ViewReference.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_2.13 Show documentation
Show all versions of cognite-sdk-scala_2.13 Show documentation
Scala SDK for Cognite Data Fusion.
The newest version!
// Copyright 2020 Cognite AS
// SPDX-License-Identifier: Apache-2.0
package com.cognite.sdk.scala.v1.fdm.views
import com.cognite.sdk.scala.v1.fdm.common.sources.{SourceReference, SourceType}
import com.cognite.sdk.scala.v1.fdm.datamodels.{
DataModelCreateViewReference,
DataModelViewReference
}
import io.circe.generic.semiauto.deriveDecoder
import io.circe.{Decoder, Encoder}
final case class ViewReference(
space: String,
externalId: String,
version: String
) extends SourceReference
with DataModelCreateViewReference
with DataModelViewReference {
override val `type`: SourceType = SourceType.View
}
object ViewReference {
implicit val viewReferenceEncoder: Encoder[ViewReference] =
Encoder.forProduct4("type", "space", "externalId", "version")((c: ViewReference) =>
(c.`type`, c.space, c.externalId, c.version)
)
implicit val viewReferenceDecoder: Decoder[ViewReference] = deriveDecoder[ViewReference]
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy