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
Expand Up @@ -65,7 +65,7 @@ partial void ProcessCreateConnectorResponseContent(

/// <summary>
/// Create agent connector<br/>
/// Create a new connector for an agent to receive events from external platforms like Slack.
/// Create a new connector for an agent to receive events from an external platform like Slack or Google Chat.
/// </summary>
/// <param name="requestTimeout"></param>
/// <param name="requestTimeoutMillis"></param>
Expand Down Expand Up @@ -100,7 +100,7 @@ partial void ProcessCreateConnectorResponseContent(
}
/// <summary>
/// Create agent connector<br/>
/// Create a new connector for an agent to receive events from external platforms like Slack.
/// Create a new connector for an agent to receive events from an external platform like Slack or Google Chat.
/// </summary>
/// <param name="requestTimeout"></param>
/// <param name="requestTimeoutMillis"></param>
Expand Down Expand Up @@ -608,7 +608,7 @@ partial void ProcessCreateConnectorResponseContent(
}
/// <summary>
/// Create agent connector<br/>
/// Create a new connector for an agent to receive events from external platforms like Slack.
/// Create a new connector for an agent to receive events from an external platform like Slack or Google Chat.
/// </summary>
/// <param name="requestTimeout"></param>
/// <param name="requestTimeoutMillis"></param>
Expand All @@ -624,10 +624,6 @@ partial void ProcessCreateConnectorResponseContent(
/// A detailed description of what this connector does.<br/>
/// Example: Receives customer support messages from the
/// </param>
/// <param name="type">
/// The type of connector.<br/>
/// Example: slack
/// </param>
/// <param name="metadata">
/// Arbitrary metadata associated with the connector.<br/>
/// Default Value: {}<br/>
Expand All @@ -639,19 +635,22 @@ partial void ProcessCreateConnectorResponseContent(
/// Example: true
/// </param>
/// <param name="configuration">
/// Configuration for different types of connectors.
/// Write view of a connector's configuration. Used when creating a connector<br/>
/// and reused when updating one. Carries the secrets and inputs the customer<br/>
/// must supply. Server-derived display fields are not accepted here and instead<br/>
/// appear in the read view: Slack returns `webhook_path`, and gchat returns<br/>
/// `audience_url` and `client_email`.
/// </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::System.InvalidOperationException"></exception>
public async global::System.Threading.Tasks.Task<global::Vectara.AgentConnector> CreateConnectorAsync(
string agentKey,
string name,
global::Vectara.SlackConnectorConfiguration configuration,
global::Vectara.CreateConnectorConfiguration configuration,
int? requestTimeout = default,
int? requestTimeoutMillis = default,
string? description = default,
global::Vectara.CreateAgentConnectorRequestType type = default,
object? metadata = default,
bool? enabled = default,
global::Vectara.AutoSDKRequestOptions? requestOptions = default,
Expand All @@ -661,7 +660,6 @@ partial void ProcessCreateConnectorResponseContent(
{
Name = name,
Description = description,
Type = type,
Metadata = metadata,
Enabled = enabled,
Configuration = configuration,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,11 @@ partial void ProcessUpdateConnectorResponseContent(
/// Example: false
/// </param>
/// <param name="configuration">
/// Configuration for different types of connectors.
/// Write view of a connector's configuration. Used when creating a connector<br/>
/// and reused when updating one. Carries the secrets and inputs the customer<br/>
/// must supply. Server-derived display fields are not accepted here and instead<br/>
/// appear in the read view: Slack returns `webhook_path`, and gchat returns<br/>
/// `audience_url` and `client_email`.
/// </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>
Expand All @@ -663,7 +667,7 @@ partial void ProcessUpdateConnectorResponseContent(
string? description = default,
object? metadata = default,
bool? enabled = default,
global::Vectara.SlackConnectorConfiguration? configuration = default,
global::Vectara.CreateConnectorConfiguration? configuration = default,
global::Vectara.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ public partial interface IAgentsClient
{
/// <summary>
/// Create agent connector<br/>
/// Create a new connector for an agent to receive events from external platforms like Slack.
/// Create a new connector for an agent to receive events from an external platform like Slack or Google Chat.
/// </summary>
/// <param name="requestTimeout"></param>
/// <param name="requestTimeoutMillis"></param>
Expand All @@ -28,7 +28,7 @@ public partial interface IAgentsClient
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// Create agent connector<br/>
/// Create a new connector for an agent to receive events from external platforms like Slack.
/// Create a new connector for an agent to receive events from an external platform like Slack or Google Chat.
/// </summary>
/// <param name="requestTimeout"></param>
/// <param name="requestTimeoutMillis"></param>
Expand All @@ -50,7 +50,7 @@ public partial interface IAgentsClient
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// Create agent connector<br/>
/// Create a new connector for an agent to receive events from external platforms like Slack.
/// Create a new connector for an agent to receive events from an external platform like Slack or Google Chat.
/// </summary>
/// <param name="requestTimeout"></param>
/// <param name="requestTimeoutMillis"></param>
Expand All @@ -66,10 +66,6 @@ public partial interface IAgentsClient
/// A detailed description of what this connector does.<br/>
/// Example: Receives customer support messages from the
/// </param>
/// <param name="type">
/// The type of connector.<br/>
/// Example: slack
/// </param>
/// <param name="metadata">
/// Arbitrary metadata associated with the connector.<br/>
/// Default Value: {}<br/>
Expand All @@ -81,19 +77,22 @@ public partial interface IAgentsClient
/// Example: true
/// </param>
/// <param name="configuration">
/// Configuration for different types of connectors.
/// Write view of a connector's configuration. Used when creating a connector<br/>
/// and reused when updating one. Carries the secrets and inputs the customer<br/>
/// must supply. Server-derived display fields are not accepted here and instead<br/>
/// appear in the read view: Slack returns `webhook_path`, and gchat returns<br/>
/// `audience_url` and `client_email`.
/// </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::System.InvalidOperationException"></exception>
global::System.Threading.Tasks.Task<global::Vectara.AgentConnector> CreateConnectorAsync(
string agentKey,
string name,
global::Vectara.SlackConnectorConfiguration configuration,
global::Vectara.CreateConnectorConfiguration configuration,
int? requestTimeout = default,
int? requestTimeoutMillis = default,
string? description = default,
global::Vectara.CreateAgentConnectorRequestType type = default,
object? metadata = default,
bool? enabled = default,
global::Vectara.AutoSDKRequestOptions? requestOptions = default,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,11 @@ public partial interface IAgentsClient
/// Example: false
/// </param>
/// <param name="configuration">
/// Configuration for different types of connectors.
/// Write view of a connector's configuration. Used when creating a connector<br/>
/// and reused when updating one. Carries the secrets and inputs the customer<br/>
/// must supply. Server-derived display fields are not accepted here and instead<br/>
/// appear in the read view: Slack returns `webhook_path`, and gchat returns<br/>
/// `audience_url` and `client_email`.
/// </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>
Expand All @@ -100,7 +104,7 @@ public partial interface IAgentsClient
string? description = default,
object? metadata = default,
bool? enabled = default,
global::Vectara.SlackConnectorConfiguration? configuration = default,
global::Vectara.CreateConnectorConfiguration? configuration = default,
global::Vectara.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
namespace Vectara.JsonConverters
{
/// <inheritdoc />
public sealed class CreateAgentConnectorRequestTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::Vectara.CreateAgentConnectorRequestType>
public sealed class AgentConnectorLastWebhookStatusJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::Vectara.AgentConnectorLastWebhookStatus>
{
/// <inheritdoc />
public override global::Vectara.CreateAgentConnectorRequestType Read(
public override global::Vectara.AgentConnectorLastWebhookStatus Read(
ref global::System.Text.Json.Utf8JsonReader reader,
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
Expand All @@ -18,19 +18,19 @@ public sealed class CreateAgentConnectorRequestTypeJsonConverter : global::Syste
var stringValue = reader.GetString();
if (stringValue != null)
{
return global::Vectara.CreateAgentConnectorRequestTypeExtensions.ToEnum(stringValue) ?? default;
return global::Vectara.AgentConnectorLastWebhookStatusExtensions.ToEnum(stringValue) ?? default;
}

break;
}
case global::System.Text.Json.JsonTokenType.Number:
{
var numValue = reader.GetInt32();
return (global::Vectara.CreateAgentConnectorRequestType)numValue;
return (global::Vectara.AgentConnectorLastWebhookStatus)numValue;
}
case global::System.Text.Json.JsonTokenType.Null:
{
return default(global::Vectara.CreateAgentConnectorRequestType);
return default(global::Vectara.AgentConnectorLastWebhookStatus);
}
default:
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
Expand All @@ -42,12 +42,12 @@ public sealed class CreateAgentConnectorRequestTypeJsonConverter : global::Syste
/// <inheritdoc />
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
global::Vectara.CreateAgentConnectorRequestType value,
global::Vectara.AgentConnectorLastWebhookStatus value,
global::System.Text.Json.JsonSerializerOptions options)
{
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));

writer.WriteStringValue(global::Vectara.CreateAgentConnectorRequestTypeExtensions.ToValueString(value));
writer.WriteStringValue(global::Vectara.AgentConnectorLastWebhookStatusExtensions.ToValueString(value));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
namespace Vectara.JsonConverters
{
/// <inheritdoc />
public sealed class CreateAgentConnectorRequestTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::Vectara.CreateAgentConnectorRequestType?>
public sealed class AgentConnectorLastWebhookStatusNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::Vectara.AgentConnectorLastWebhookStatus?>
{
/// <inheritdoc />
public override global::Vectara.CreateAgentConnectorRequestType? Read(
public override global::Vectara.AgentConnectorLastWebhookStatus? Read(
ref global::System.Text.Json.Utf8JsonReader reader,
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
Expand All @@ -18,19 +18,19 @@ public sealed class CreateAgentConnectorRequestTypeNullableJsonConverter : globa
var stringValue = reader.GetString();
if (stringValue != null)
{
return global::Vectara.CreateAgentConnectorRequestTypeExtensions.ToEnum(stringValue);
return global::Vectara.AgentConnectorLastWebhookStatusExtensions.ToEnum(stringValue);
}

break;
}
case global::System.Text.Json.JsonTokenType.Number:
{
var numValue = reader.GetInt32();
return (global::Vectara.CreateAgentConnectorRequestType)numValue;
return (global::Vectara.AgentConnectorLastWebhookStatus)numValue;
}
case global::System.Text.Json.JsonTokenType.Null:
{
return default(global::Vectara.CreateAgentConnectorRequestType?);
return default(global::Vectara.AgentConnectorLastWebhookStatus?);
}
default:
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
Expand All @@ -42,7 +42,7 @@ public sealed class CreateAgentConnectorRequestTypeNullableJsonConverter : globa
/// <inheritdoc />
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
global::Vectara.CreateAgentConnectorRequestType? value,
global::Vectara.AgentConnectorLastWebhookStatus? value,
global::System.Text.Json.JsonSerializerOptions options)
{
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
Expand All @@ -53,7 +53,7 @@ public override void Write(
}
else
{
writer.WriteStringValue(global::Vectara.CreateAgentConnectorRequestTypeExtensions.ToValueString(value.Value));
writer.WriteStringValue(global::Vectara.AgentConnectorLastWebhookStatusExtensions.ToValueString(value.Value));
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,19 @@ public class ConnectorConfigurationJsonConverter : global::System.Text.Json.Seri
throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Vectara.SlackConnectorConfiguration)}");
slack = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
}
global::Vectara.GchatConnectorConfiguration? gchat = default;
if (discriminator?.Type == global::Vectara.ConnectorConfigurationDiscriminatorType.Gchat)
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.GchatConnectorConfiguration), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Vectara.GchatConnectorConfiguration> ??
throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Vectara.GchatConnectorConfiguration)}");
gchat = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
}

var __value = new global::Vectara.ConnectorConfiguration(
discriminator?.Type,
slack
slack,

gchat
);

return __value;
Expand All @@ -52,6 +61,12 @@ public override void Write(
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.SlackConnectorConfiguration).Name}");
global::System.Text.Json.JsonSerializer.Serialize(writer, value.Slack!, typeInfo);
}
else if (value.IsGchat)
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.GchatConnectorConfiguration), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Vectara.GchatConnectorConfiguration?> ??
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.GchatConnectorConfiguration).Name}");
global::System.Text.Json.JsonSerializer.Serialize(writer, value.Gchat!, typeInfo);
}
}
}
}
Loading