Skip to content

Commit

Permalink
Add more resources for CDM (#404)
Browse files Browse the repository at this point in the history
  • Loading branch information
ozangoktan authored Oct 30, 2024
1 parent 420e307 commit 95b82e0
Show file tree
Hide file tree
Showing 8 changed files with 93 additions and 2 deletions.
File renamed without changes.
File renamed without changes.
23 changes: 23 additions & 0 deletions CogniteSdk/src/Resources/DataModels/Activity.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using CogniteSdk.DataModels;
using CogniteSdk.DataModels.Core;

namespace CogniteSdk.Resources.DataModels
{
/// <summary>
/// Base resource for activity in core data models.
/// </summary>
/// <typeparam name="T"></typeparam>
public class CoreActivityResource<T> : BaseDataModelResource<T> where T : CogniteActivity
{
/// <inheritdoc />
public override ViewIdentifier View { get; }

/// <inheritdoc />
public CoreActivityResource(
DataModelsResource resource,
ViewIdentifier view) : base(resource)
{
View = view ?? new ViewIdentifier("cdf_cdm", "CogniteActivity", "v1");
}
}
}
23 changes: 23 additions & 0 deletions CogniteSdk/src/Resources/DataModels/Asset.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using CogniteSdk.DataModels;
using CogniteSdk.DataModels.Core;

namespace CogniteSdk.Resources.DataModels
{
/// <summary>
/// Base resource for asset in core data models.
/// </summary>
/// <typeparam name="T"></typeparam>
public class CoreAssetResource<T> : BaseDataModelResource<T> where T : CogniteAssetBase
{
/// <inheritdoc />
public override ViewIdentifier View { get; }

/// <inheritdoc />
public CoreAssetResource(
DataModelsResource resource,
ViewIdentifier view) : base(resource)
{
View = view ?? new ViewIdentifier("cdf_cdm", "CogniteAsset", "v1");
}
}
}
23 changes: 23 additions & 0 deletions CogniteSdk/src/Resources/DataModels/Equipment.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using CogniteSdk.DataModels;
using CogniteSdk.DataModels.Core;

namespace CogniteSdk.Resources.DataModels
{
/// <summary>
/// Base resource for equipment in core data models.
/// </summary>
/// <typeparam name="T"></typeparam>
public class CoreEquipmentResource<T> : BaseDataModelResource<T> where T : CogniteEquipment
{
/// <inheritdoc />
public override ViewIdentifier View { get; }

/// <inheritdoc />
public CoreEquipmentResource(
DataModelsResource resource,
ViewIdentifier view) : base(resource)
{
View = view ?? new ViewIdentifier("cdf_cdm", "CogniteEquipment", "v1");
}
}
}
23 changes: 23 additions & 0 deletions CogniteSdk/src/Resources/DataModels/File.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using CogniteSdk.DataModels;
using CogniteSdk.DataModels.Core;

namespace CogniteSdk.Resources.DataModels
{
/// <summary>
/// Base resource for file in core data models.
/// </summary>
/// <typeparam name="T"></typeparam>
public class CoreFileResource<T> : BaseDataModelResource<T> where T : CogniteFile
{
/// <inheritdoc />
public override ViewIdentifier View { get; }

/// <inheritdoc />
public CoreFileResource(
DataModelsResource resource,
ViewIdentifier view) : base(resource)
{
View = view ?? new ViewIdentifier("cdf_cdm", "CogniteFile", "v1");
}
}
}
1 change: 0 additions & 1 deletion CogniteSdk/src/Resources/DataModels/TimeSeries.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System.Collections.Generic;
using CogniteSdk.DataModels;
using CogniteSdk.DataModels.Core;

Expand Down
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.8.0
4.9.0

0 comments on commit 95b82e0

Please sign in to comment.