Table of Contents

Class WebhooksSerializerContext

Namespace
GenerativeAI.Types
Assembly
GenerativeAI.dll

Source-generated JSON metadata for the Webhooks API types. WebhooksClient puts it first in its resolver chain, so the Webhooks types also work with Native AOT and trimming.

[JsonSourceGenerationOptions(WriteIndented = true, DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull, UseStringEnumConverter = true)]
[JsonSerializable(typeof(Webhook))]
[JsonSerializable(typeof(SigningSecret))]
[JsonSerializable(typeof(CreateWebhookRequest))]
[JsonSerializable(typeof(WebhookUpdate))]
[JsonSerializable(typeof(WebhookListResponse))]
[JsonSerializable(typeof(PingWebhookRequest))]
[JsonSerializable(typeof(WebhookPingResponse))]
[JsonSerializable(typeof(RotateSigningSecretRequest))]
[JsonSerializable(typeof(WebhookRotateSigningSecretResponse))]
[JsonSerializable(typeof(WebhookConfig))]
public class WebhooksSerializerContext : JsonSerializerContext, IJsonTypeInfoResolver
Inheritance
WebhooksSerializerContext
Implements
Inherited Members
Extension Methods

Constructors

WebhooksSerializerContext()

public WebhooksSerializerContext()

WebhooksSerializerContext(JsonSerializerOptions)

Creates an instance of JsonSerializerContext and binds it with the indicated JsonSerializerOptions.

public WebhooksSerializerContext(JsonSerializerOptions options)

Parameters

options JsonSerializerOptions

The run time provided options for the context instance.

Properties

CreateWebhookRequest

Defines the source generated JSON serialization contract metadata for a given type.

public JsonTypeInfo<CreateWebhookRequest> CreateWebhookRequest { get; }

Property Value

JsonTypeInfo<CreateWebhookRequest>

Default

The default JsonSerializerContext associated with a default JsonSerializerOptions instance.

public static WebhooksSerializerContext Default { get; }

Property Value

WebhooksSerializerContext

DictionaryStringJsonNode

Defines the source generated JSON serialization contract metadata for a given type.

public JsonTypeInfo<Dictionary<string, JsonNode>> DictionaryStringJsonNode { get; }

Property Value

JsonTypeInfo<Dictionary<string, JsonNode>>

GeneratedSerializerOptions

The source-generated options associated with this context.

protected override JsonSerializerOptions? GeneratedSerializerOptions { get; }

Property Value

JsonSerializerOptions

JsonNode

Defines the source generated JSON serialization contract metadata for a given type.

public JsonTypeInfo<JsonNode> JsonNode { get; }

Property Value

JsonTypeInfo<JsonNode>

ListSigningSecret

Defines the source generated JSON serialization contract metadata for a given type.

public JsonTypeInfo<List<SigningSecret>> ListSigningSecret { get; }

Property Value

JsonTypeInfo<List<SigningSecret>>

ListString

Defines the source generated JSON serialization contract metadata for a given type.

public JsonTypeInfo<List<string>> ListString { get; }

Property Value

JsonTypeInfo<List<string>>

ListWebhook

Defines the source generated JSON serialization contract metadata for a given type.

public JsonTypeInfo<List<Webhook>> ListWebhook { get; }

Property Value

JsonTypeInfo<List<Webhook>>

PingWebhookRequest

Defines the source generated JSON serialization contract metadata for a given type.

public JsonTypeInfo<PingWebhookRequest> PingWebhookRequest { get; }

Property Value

JsonTypeInfo<PingWebhookRequest>

RotateSigningSecretRequest

Defines the source generated JSON serialization contract metadata for a given type.

public JsonTypeInfo<RotateSigningSecretRequest> RotateSigningSecretRequest { get; }

Property Value

JsonTypeInfo<RotateSigningSecretRequest>

SigningSecret

Defines the source generated JSON serialization contract metadata for a given type.

public JsonTypeInfo<SigningSecret> SigningSecret { get; }

Property Value

JsonTypeInfo<SigningSecret>

String

Defines the source generated JSON serialization contract metadata for a given type.

public JsonTypeInfo<string> String { get; }

Property Value

JsonTypeInfo<string>

Webhook

Defines the source generated JSON serialization contract metadata for a given type.

public JsonTypeInfo<Webhook> Webhook { get; }

Property Value

JsonTypeInfo<Webhook>

WebhookConfig

Defines the source generated JSON serialization contract metadata for a given type.

public JsonTypeInfo<WebhookConfig> WebhookConfig { get; }

Property Value

JsonTypeInfo<WebhookConfig>

WebhookListResponse

Defines the source generated JSON serialization contract metadata for a given type.

public JsonTypeInfo<WebhookListResponse> WebhookListResponse { get; }

Property Value

JsonTypeInfo<WebhookListResponse>

WebhookPingResponse

Defines the source generated JSON serialization contract metadata for a given type.

public JsonTypeInfo<WebhookPingResponse> WebhookPingResponse { get; }

Property Value

JsonTypeInfo<WebhookPingResponse>

WebhookRotateSigningSecretResponse

Defines the source generated JSON serialization contract metadata for a given type.

public JsonTypeInfo<WebhookRotateSigningSecretResponse> WebhookRotateSigningSecretResponse { get; }

Property Value

JsonTypeInfo<WebhookRotateSigningSecretResponse>

WebhookUpdate

Defines the source generated JSON serialization contract metadata for a given type.

public JsonTypeInfo<WebhookUpdate> WebhookUpdate { get; }

Property Value

JsonTypeInfo<WebhookUpdate>

Methods

GetTypeInfo(Type)

Gets metadata for the specified type.

public override JsonTypeInfo? GetTypeInfo(Type type)

Parameters

type Type

The type to fetch metadata for.

Returns

JsonTypeInfo

The metadata for the specified type, or null if the context has no metadata for the type.