Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
#nullable enable

namespace Vectara
{
public partial interface IPipelineRunsClient
{
/// <summary>
/// List pipeline run events<br/>
/// List the timeline of events for a pipeline run. Events surface what the run did from a customer-observability perspective (records discovered, records processed, agent sessions created, dead letters, watermark advances, lifecycle transitions) rather than every internal Temporal step. A pipeline run may span multiple underlying Temporal executions; this endpoint stitches them into a single timeline keyed by `run_id`.
/// </summary>
/// <param name="requestTimeout"></param>
/// <param name="requestTimeoutMillis"></param>
/// <param name="pipelineKey">
/// The unique key for the pipeline. Can be user-provided or auto-generated.<br/>
/// Example: sharepoint-legal-ingest
/// </param>
/// <param name="runId">
/// The unique identifier for a pipeline run.<br/>
/// Example: run_pip_abc_manual_550e8400
/// </param>
/// <param name="type"></param>
/// <param name="sourceRecordId"></param>
/// <param name="order">
/// Sort direction for paginated list endpoints.
/// </param>
/// <param name="limit">
/// Default Value: 50
/// </param>
/// <param name="pageKey"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Vectara.ApiException"></exception>
global::System.Threading.Tasks.Task<global::Vectara.ListPipelineRunEventsResponse> ListEventsAsync(
string pipelineKey,
string runId,
int? requestTimeout = default,
int? requestTimeoutMillis = default,
global::System.Collections.Generic.IList<global::Vectara.PipelineRunEventType>? type = default,
string? sourceRecordId = default,
global::Vectara.SortOrder? order = default,
int? limit = default,
string? pageKey = default,
global::Vectara.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// List pipeline run events<br/>
/// List the timeline of events for a pipeline run. Events surface what the run did from a customer-observability perspective (records discovered, records processed, agent sessions created, dead letters, watermark advances, lifecycle transitions) rather than every internal Temporal step. A pipeline run may span multiple underlying Temporal executions; this endpoint stitches them into a single timeline keyed by `run_id`.
/// </summary>
/// <param name="requestTimeout"></param>
/// <param name="requestTimeoutMillis"></param>
/// <param name="pipelineKey">
/// The unique key for the pipeline. Can be user-provided or auto-generated.<br/>
/// Example: sharepoint-legal-ingest
/// </param>
/// <param name="runId">
/// The unique identifier for a pipeline run.<br/>
/// Example: run_pip_abc_manual_550e8400
/// </param>
/// <param name="type"></param>
/// <param name="sourceRecordId"></param>
/// <param name="order">
/// Sort direction for paginated list endpoints.
/// </param>
/// <param name="limit">
/// Default Value: 50
/// </param>
/// <param name="pageKey"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Vectara.ApiException"></exception>
global::System.Threading.Tasks.Task<global::Vectara.AutoSDKHttpResponse<global::Vectara.ListPipelineRunEventsResponse>> ListEventsAsResponseAsync(
string pipelineKey,
string runId,
int? requestTimeout = default,
int? requestTimeoutMillis = default,
global::System.Collections.Generic.IList<global::Vectara.PipelineRunEventType>? type = default,
string? sourceRecordId = default,
global::Vectara.SortOrder? order = default,
int? limit = default,
string? pageKey = default,
global::Vectara.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
#nullable enable
#pragma warning disable CS0618 // Type or member is obsolete

namespace Vectara.JsonConverters
{
/// <inheritdoc />
public class PipelineRunEventJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::Vectara.PipelineRunEvent>
{
/// <inheritdoc />
public override global::Vectara.PipelineRunEvent Read(
ref global::System.Text.Json.Utf8JsonReader reader,
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
options = options ?? throw new global::System.ArgumentNullException(nameof(options));
var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");


var readerCopy = reader;
var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.PipelineRunEventDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Vectara.PipelineRunEventDiscriminator> ??
throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Vectara.PipelineRunEventDiscriminator)}");
var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo);

global::Vectara.RunStartedEvent? runStarted = default;
if (discriminator?.Type == global::Vectara.PipelineRunEventDiscriminatorType.RunStarted)
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.RunStartedEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Vectara.RunStartedEvent> ??
throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Vectara.RunStartedEvent)}");
runStarted = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
}
global::Vectara.RunCompletedEvent? runCompleted = default;
if (discriminator?.Type == global::Vectara.PipelineRunEventDiscriminatorType.RunCompleted)
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.RunCompletedEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Vectara.RunCompletedEvent> ??
throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Vectara.RunCompletedEvent)}");
runCompleted = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
}
global::Vectara.RecordProcessingEvent? recordProcessing = default;
if (discriminator?.Type == global::Vectara.PipelineRunEventDiscriminatorType.RecordProcessing)
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.RecordProcessingEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Vectara.RecordProcessingEvent> ??
throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Vectara.RecordProcessingEvent)}");
recordProcessing = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
}
global::Vectara.WatermarkAdvancedEvent? watermarkAdvanced = default;
if (discriminator?.Type == global::Vectara.PipelineRunEventDiscriminatorType.WatermarkAdvanced)
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.WatermarkAdvancedEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Vectara.WatermarkAdvancedEvent> ??
throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Vectara.WatermarkAdvancedEvent)}");
watermarkAdvanced = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
}

var __value = new global::Vectara.PipelineRunEvent(
discriminator?.Type,
runStarted,

runCompleted,

recordProcessing,

watermarkAdvanced
);

return __value;
}

/// <inheritdoc />
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
global::Vectara.PipelineRunEvent value,
global::System.Text.Json.JsonSerializerOptions options)
{
options = options ?? throw new global::System.ArgumentNullException(nameof(options));
var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");

if (value.IsRunStarted)
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.RunStartedEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Vectara.RunStartedEvent> ??
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.RunStartedEvent).Name}");
global::System.Text.Json.JsonSerializer.Serialize(writer, value.RunStarted!.Value, typeInfo);
}
else if (value.IsRunCompleted)
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.RunCompletedEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Vectara.RunCompletedEvent> ??
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.RunCompletedEvent).Name}");
global::System.Text.Json.JsonSerializer.Serialize(writer, value.RunCompleted!.Value, typeInfo);
}
else if (value.IsRecordProcessing)
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.RecordProcessingEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Vectara.RecordProcessingEvent> ??
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.RecordProcessingEvent).Name}");
global::System.Text.Json.JsonSerializer.Serialize(writer, value.RecordProcessing!.Value, typeInfo);
}
else if (value.IsWatermarkAdvanced)
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.WatermarkAdvancedEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Vectara.WatermarkAdvancedEvent> ??
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.WatermarkAdvancedEvent).Name}");
global::System.Text.Json.JsonSerializer.Serialize(writer, value.WatermarkAdvanced!.Value, typeInfo);
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#nullable enable

namespace Vectara.JsonConverters
{
/// <inheritdoc />
public sealed class PipelineRunEventDiscriminatorTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::Vectara.PipelineRunEventDiscriminatorType>
{
/// <inheritdoc />
public override global::Vectara.PipelineRunEventDiscriminatorType Read(
ref global::System.Text.Json.Utf8JsonReader reader,
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
switch (reader.TokenType)
{
case global::System.Text.Json.JsonTokenType.String:
{
var stringValue = reader.GetString();
if (stringValue != null)
{
return global::Vectara.PipelineRunEventDiscriminatorTypeExtensions.ToEnum(stringValue) ?? default;
}

break;
}
case global::System.Text.Json.JsonTokenType.Number:
{
var numValue = reader.GetInt32();
return (global::Vectara.PipelineRunEventDiscriminatorType)numValue;
}
case global::System.Text.Json.JsonTokenType.Null:
{
return default(global::Vectara.PipelineRunEventDiscriminatorType);
}
default:
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
}

return default;
}

/// <inheritdoc />
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
global::Vectara.PipelineRunEventDiscriminatorType value,
global::System.Text.Json.JsonSerializerOptions options)
{
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));

writer.WriteStringValue(global::Vectara.PipelineRunEventDiscriminatorTypeExtensions.ToValueString(value));
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#nullable enable

namespace Vectara.JsonConverters
{
/// <inheritdoc />
public sealed class PipelineRunEventDiscriminatorTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::Vectara.PipelineRunEventDiscriminatorType?>
{
/// <inheritdoc />
public override global::Vectara.PipelineRunEventDiscriminatorType? Read(
ref global::System.Text.Json.Utf8JsonReader reader,
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
switch (reader.TokenType)
{
case global::System.Text.Json.JsonTokenType.String:
{
var stringValue = reader.GetString();
if (stringValue != null)
{
return global::Vectara.PipelineRunEventDiscriminatorTypeExtensions.ToEnum(stringValue);
}

break;
}
case global::System.Text.Json.JsonTokenType.Number:
{
var numValue = reader.GetInt32();
return (global::Vectara.PipelineRunEventDiscriminatorType)numValue;
}
case global::System.Text.Json.JsonTokenType.Null:
{
return default(global::Vectara.PipelineRunEventDiscriminatorType?);
}
default:
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
}

return default;
}

/// <inheritdoc />
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
global::Vectara.PipelineRunEventDiscriminatorType? value,
global::System.Text.Json.JsonSerializerOptions options)
{
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));

if (value == null)
{
writer.WriteNullValue();
}
else
{
writer.WriteStringValue(global::Vectara.PipelineRunEventDiscriminatorTypeExtensions.ToValueString(value.Value));
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#nullable enable

namespace Vectara.JsonConverters
{
/// <inheritdoc />
public sealed class PipelineRunEventTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::Vectara.PipelineRunEventType>
{
/// <inheritdoc />
public override global::Vectara.PipelineRunEventType Read(
ref global::System.Text.Json.Utf8JsonReader reader,
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
switch (reader.TokenType)
{
case global::System.Text.Json.JsonTokenType.String:
{
var stringValue = reader.GetString();
if (stringValue != null)
{
return global::Vectara.PipelineRunEventTypeExtensions.ToEnum(stringValue) ?? default;
}

break;
}
case global::System.Text.Json.JsonTokenType.Number:
{
var numValue = reader.GetInt32();
return (global::Vectara.PipelineRunEventType)numValue;
}
case global::System.Text.Json.JsonTokenType.Null:
{
return default(global::Vectara.PipelineRunEventType);
}
default:
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
}

return default;
}

/// <inheritdoc />
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
global::Vectara.PipelineRunEventType value,
global::System.Text.Json.JsonSerializerOptions options)
{
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));

writer.WriteStringValue(global::Vectara.PipelineRunEventTypeExtensions.ToValueString(value));
}
}
}
Loading