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
optionsJsonSerializerOptionsThe 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
Default
The default JsonSerializerContext associated with a default JsonSerializerOptions instance.
public static WebhooksSerializerContext Default { get; }
Property Value
DictionaryStringJsonNode
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<Dictionary<string, JsonNode>> DictionaryStringJsonNode { get; }
Property Value
GeneratedSerializerOptions
The source-generated options associated with this context.
protected override JsonSerializerOptions? GeneratedSerializerOptions { get; }
Property Value
JsonNode
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<JsonNode> JsonNode { get; }
Property Value
ListSigningSecret
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<List<SigningSecret>> ListSigningSecret { get; }
Property Value
ListString
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<List<string>> ListString { get; }
Property Value
ListWebhook
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<List<Webhook>> ListWebhook { get; }
Property Value
PingWebhookRequest
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<PingWebhookRequest> PingWebhookRequest { get; }
Property Value
RotateSigningSecretRequest
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<RotateSigningSecretRequest> RotateSigningSecretRequest { get; }
Property Value
SigningSecret
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<SigningSecret> SigningSecret { get; }
Property Value
String
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<string> String { get; }
Property Value
Webhook
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<Webhook> Webhook { get; }
Property Value
WebhookConfig
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<WebhookConfig> WebhookConfig { get; }
Property Value
WebhookListResponse
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<WebhookListResponse> WebhookListResponse { get; }
Property Value
WebhookPingResponse
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<WebhookPingResponse> WebhookPingResponse { get; }
Property Value
WebhookRotateSigningSecretResponse
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<WebhookRotateSigningSecretResponse> WebhookRotateSigningSecretResponse { get; }
Property Value
WebhookUpdate
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<WebhookUpdate> WebhookUpdate { get; }
Property Value
Methods
GetTypeInfo(Type)
Gets metadata for the specified type.
public override JsonTypeInfo? GetTypeInfo(Type type)
Parameters
typeTypeThe type to fetch metadata for.
Returns
- JsonTypeInfo
The metadata for the specified type, or null if the context has no metadata for the type.