Skip to content

Commit

Permalink
Add support for instanceIds when creating a subscription (#408)
Browse files Browse the repository at this point in the history
* Add support for instanceIds when creating a subscription
---------

Co-authored-by: Ozan Goktan <[email protected]>
  • Loading branch information
muradsater and ozangoktan authored Dec 9, 2024
1 parent 6985532 commit f1e17a7
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CogniteSdk.Types/Beta/Subscriptions/SubscriptionCreate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ public class SubscriptionCreate
/// </summary>
public IEnumerable<string> TimeSeriesIds { get; set; }
/// <summary>
/// List of instance ids of time series that this subscription will listen to.
/// Not compatible with filter.
/// </summary>
public IEnumerable<InstanceIdentifier> InstanceIds { get; set; }
/// <summary>
/// A filter DSL (Domain Specific Language) to define advanced filter queries.
///
/// Timeseries that match this filter will be included in the subscription.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// SPDX-License-Identifier: Apache-2.0

using System.Collections.Generic;
using CogniteSdk.DataModels;

namespace CogniteSdk.Beta
{
Expand All @@ -18,6 +19,10 @@ public class WrappedTimeSeriesId
/// Timeseries external ID.
/// </summary>
public string ExternalId { get; set; }
/// <summary>
/// Timeseries instance ID.
/// </summary>
public InstanceIdentifier InstanceId { get; set; }
}

/// <summary>
Expand Down
6 changes: 6 additions & 0 deletions CogniteSdk.Types/Beta/Subscriptions/SubscriptionUpdate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ public class SubscriptionUpdate
/// </summary>
public UpdateEnumerable<string> TimeSeriesIds { get; set; }
/// <summary>
/// Add or remove time series instance IDs for this subscription.
///
/// Not applicable to filter based subscriptions.
/// </summary>
public UpdateEnumerable<InstanceIdentifier> InstanceIds { get; set; }
/// <summary>
/// Update subscription name.
/// </summary>
public UpdateNullable<string> Name { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.10.0
4.11.0

0 comments on commit f1e17a7

Please sign in to comment.