Table of Contents

Class AgentApisSerializerContext

Namespace
GenerativeAI.Types
Assembly
GenerativeAI.dll

Source-generated JSON metadata for the agent-related API types (Voices, Agents, Environments, Triggers, Credentials and Decisions). The clients of these APIs put it first in their resolver chain (followed by InteractionsSerializerContext for the shared Interactions types), so they work with Native AOT and trimming.

[JsonSourceGenerationOptions(WriteIndented = true, DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull, UseStringEnumConverter = true)]
[JsonSerializable(typeof(Voice))]
[JsonSerializable(typeof(PromptedVoice))]
[JsonSerializable(typeof(ReplicatedVoice))]
[JsonSerializable(typeof(VoiceAudioData))]
[JsonSerializable(typeof(CreateVoiceRequest))]
[JsonSerializable(typeof(ListVoicesResponse))]
[JsonSerializable(typeof(DeleteVoiceResponse))]
[JsonSerializable(typeof(Agent))]
[JsonSerializable(typeof(ListAgentsResponse))]
[JsonSerializable(typeof(AgentEnvironment))]
[JsonSerializable(typeof(CreateEnvironmentRequest))]
[JsonSerializable(typeof(ListEnvironmentsResponse))]
[JsonSerializable(typeof(EnvironmentFile))]
[JsonSerializable(typeof(ListEnvironmentFilesResponse))]
[JsonSerializable(typeof(Trigger))]
[JsonSerializable(typeof(CreateTriggerRequest))]
[JsonSerializable(typeof(UpdateTriggerRequest))]
[JsonSerializable(typeof(TriggerExecution))]
[JsonSerializable(typeof(ListTriggersResponse))]
[JsonSerializable(typeof(ListTriggerExecutionsResponse))]
[JsonSerializable(typeof(Credential))]
[JsonSerializable(typeof(ListCredentialsResponse))]
[JsonSerializable(typeof(CredentialConfig))]
[JsonSerializable(typeof(EnvironmentVariableCredentialConfig))]
[JsonSerializable(typeof(BearerTokenCredentialConfig))]
[JsonSerializable(typeof(OAuth2CredentialConfig))]
[JsonSerializable(typeof(CreateDecisionRequest))]
[JsonSerializable(typeof(CreateDecisionResponse))]
[JsonSerializable(typeof(DecisionQuestion))]
[JsonSerializable(typeof(NoulDecisionQuestion))]
[JsonSerializable(typeof(NoulCriteria))]
[JsonSerializable(typeof(ChoiceDecisionQuestion))]
[JsonSerializable(typeof(ScoreDecisionQuestion))]
[JsonSerializable(typeof(DecisionAnswer))]
[JsonSerializable(typeof(NoulDecisionAnswer))]
[JsonSerializable(typeof(ChoiceDecisionAnswer))]
[JsonSerializable(typeof(ScoreDecisionAnswer))]
[JsonSerializable(typeof(DecisionPromptFeedback))]
[JsonSerializable(typeof(Dictionary<string, double>))]
[JsonSerializable(typeof(Dictionary<string, string>))]
[JsonSerializable(typeof(Dictionary<string, JsonElement>))]
[JsonSerializable(typeof(List<string>))]
[JsonSerializable(typeof(JsonNode))]
[JsonSerializable(typeof(JsonElement))]
public class AgentApisSerializerContext : JsonSerializerContext, IJsonTypeInfoResolver
Inheritance
AgentApisSerializerContext
Implements
Inherited Members
Extension Methods

Constructors

AgentApisSerializerContext()

public AgentApisSerializerContext()

AgentApisSerializerContext(JsonSerializerOptions)

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

public AgentApisSerializerContext(JsonSerializerOptions options)

Parameters

options JsonSerializerOptions

The run time provided options for the context instance.

Properties

Agent

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

public JsonTypeInfo<Agent> Agent { get; }

Property Value

JsonTypeInfo<Agent>

AgentEnvironment

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

public JsonTypeInfo<AgentEnvironment> AgentEnvironment { get; }

Property Value

JsonTypeInfo<AgentEnvironment>

BearerTokenCredentialConfig

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

public JsonTypeInfo<BearerTokenCredentialConfig> BearerTokenCredentialConfig { get; }

Property Value

JsonTypeInfo<BearerTokenCredentialConfig>

Boolean

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

public JsonTypeInfo<bool> Boolean { get; }

Property Value

JsonTypeInfo<bool>

ChoiceDecisionAnswer

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

public JsonTypeInfo<ChoiceDecisionAnswer> ChoiceDecisionAnswer { get; }

Property Value

JsonTypeInfo<ChoiceDecisionAnswer>

ChoiceDecisionQuestion

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

public JsonTypeInfo<ChoiceDecisionQuestion> ChoiceDecisionQuestion { get; }

Property Value

JsonTypeInfo<ChoiceDecisionQuestion>

CreateDecisionRequest

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

public JsonTypeInfo<CreateDecisionRequest> CreateDecisionRequest { get; }

Property Value

JsonTypeInfo<CreateDecisionRequest>

CreateDecisionResponse

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

public JsonTypeInfo<CreateDecisionResponse> CreateDecisionResponse { get; }

Property Value

JsonTypeInfo<CreateDecisionResponse>

CreateEnvironmentRequest

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

public JsonTypeInfo<CreateEnvironmentRequest> CreateEnvironmentRequest { get; }

Property Value

JsonTypeInfo<CreateEnvironmentRequest>

CreateInteractionRequest

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

public JsonTypeInfo<CreateInteractionRequest> CreateInteractionRequest { get; }

Property Value

JsonTypeInfo<CreateInteractionRequest>

CreateTriggerRequest

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

public JsonTypeInfo<CreateTriggerRequest> CreateTriggerRequest { get; }

Property Value

JsonTypeInfo<CreateTriggerRequest>

CreateVoiceRequest

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

public JsonTypeInfo<CreateVoiceRequest> CreateVoiceRequest { get; }

Property Value

JsonTypeInfo<CreateVoiceRequest>

Credential

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

public JsonTypeInfo<Credential> Credential { get; }

Property Value

JsonTypeInfo<Credential>

CredentialConfig

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

public JsonTypeInfo<CredentialConfig> CredentialConfig { get; }

Property Value

JsonTypeInfo<CredentialConfig>

DecisionAnswer

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

public JsonTypeInfo<DecisionAnswer> DecisionAnswer { get; }

Property Value

JsonTypeInfo<DecisionAnswer>

DecisionPromptFeedback

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

public JsonTypeInfo<DecisionPromptFeedback> DecisionPromptFeedback { get; }

Property Value

JsonTypeInfo<DecisionPromptFeedback>

DecisionQuestion

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

public JsonTypeInfo<DecisionQuestion> DecisionQuestion { get; }

Property Value

JsonTypeInfo<DecisionQuestion>

Default

The default JsonSerializerContext associated with a default JsonSerializerOptions instance.

public static AgentApisSerializerContext Default { get; }

Property Value

AgentApisSerializerContext

DeleteVoiceResponse

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

public JsonTypeInfo<DeleteVoiceResponse> DeleteVoiceResponse { get; }

Property Value

JsonTypeInfo<DeleteVoiceResponse>

DictionaryStringDecisionAnswer

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

public JsonTypeInfo<Dictionary<string, DecisionAnswer>> DictionaryStringDecisionAnswer { get; }

Property Value

JsonTypeInfo<Dictionary<string, DecisionAnswer>>

DictionaryStringDecisionQuestion

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

public JsonTypeInfo<Dictionary<string, DecisionQuestion>> DictionaryStringDecisionQuestion { get; }

Property Value

JsonTypeInfo<Dictionary<string, DecisionQuestion>>

DictionaryStringDouble

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

public JsonTypeInfo<Dictionary<string, double>> DictionaryStringDouble { get; }

Property Value

JsonTypeInfo<Dictionary<string, double>>

DictionaryStringJsonElement

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

public JsonTypeInfo<Dictionary<string, JsonElement>> DictionaryStringJsonElement { get; }

Property Value

JsonTypeInfo<Dictionary<string, JsonElement>>

DictionaryStringString

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

public JsonTypeInfo<Dictionary<string, string>> DictionaryStringString { get; }

Property Value

JsonTypeInfo<Dictionary<string, string>>

Double

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

public JsonTypeInfo<double> Double { get; }

Property Value

JsonTypeInfo<double>

EnvironmentFile

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

public JsonTypeInfo<EnvironmentFile> EnvironmentFile { get; }

Property Value

JsonTypeInfo<EnvironmentFile>

EnvironmentVariableCredentialConfig

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

public JsonTypeInfo<EnvironmentVariableCredentialConfig> EnvironmentVariableCredentialConfig { get; }

Property Value

JsonTypeInfo<EnvironmentVariableCredentialConfig>

GeneratedSerializerOptions

The source-generated options associated with this context.

protected override JsonSerializerOptions? GeneratedSerializerOptions { get; }

Property Value

JsonSerializerOptions

Int32

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

public JsonTypeInfo<int> Int32 { get; }

Property Value

JsonTypeInfo<int>

Int64

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

public JsonTypeInfo<long> Int64 { get; }

Property Value

JsonTypeInfo<long>

InteractionAgentConfig

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

public JsonTypeInfo<InteractionAgentConfig> InteractionAgentConfig { get; }

Property Value

JsonTypeInfo<InteractionAgentConfig>

InteractionEnvironmentReference

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

public JsonTypeInfo<InteractionEnvironmentReference> InteractionEnvironmentReference { get; }

Property Value

JsonTypeInfo<InteractionEnvironmentReference>

InteractionEnvironmentSource

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

public JsonTypeInfo<InteractionEnvironmentSource> InteractionEnvironmentSource { get; }

Property Value

JsonTypeInfo<InteractionEnvironmentSource>

InteractionGenerationConfig

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

public JsonTypeInfo<InteractionGenerationConfig> InteractionGenerationConfig { get; }

Property Value

JsonTypeInfo<InteractionGenerationConfig>

InteractionGroundingToolCount

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

public JsonTypeInfo<InteractionGroundingToolCount> InteractionGroundingToolCount { get; }

Property Value

JsonTypeInfo<InteractionGroundingToolCount>

InteractionImageConfig

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

public JsonTypeInfo<InteractionImageConfig> InteractionImageConfig { get; }

Property Value

JsonTypeInfo<InteractionImageConfig>

InteractionInput

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

public JsonTypeInfo<InteractionInput> InteractionInput { get; }

Property Value

JsonTypeInfo<InteractionInput>

InteractionModalityTokens

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

public JsonTypeInfo<InteractionModalityTokens> InteractionModalityTokens { get; }

Property Value

JsonTypeInfo<InteractionModalityTokens>

InteractionResponseFormat

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

public JsonTypeInfo<InteractionResponseFormat> InteractionResponseFormat { get; }

Property Value

JsonTypeInfo<InteractionResponseFormat>

InteractionSafetySetting

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

public JsonTypeInfo<InteractionSafetySetting> InteractionSafetySetting { get; }

Property Value

JsonTypeInfo<InteractionSafetySetting>

InteractionTool

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

public JsonTypeInfo<InteractionTool> InteractionTool { get; }

Property Value

JsonTypeInfo<InteractionTool>

InteractionToolChoice

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

public JsonTypeInfo<InteractionToolChoice> InteractionToolChoice { get; }

Property Value

JsonTypeInfo<InteractionToolChoice>

InteractionTranscriptionConfig

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

public JsonTypeInfo<InteractionTranscriptionConfig> InteractionTranscriptionConfig { get; }

Property Value

JsonTypeInfo<InteractionTranscriptionConfig>

InteractionUsage

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

public JsonTypeInfo<InteractionUsage> InteractionUsage { get; }

Property Value

JsonTypeInfo<InteractionUsage>

InteractionVideoConfig

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

public JsonTypeInfo<InteractionVideoConfig> InteractionVideoConfig { get; }

Property Value

JsonTypeInfo<InteractionVideoConfig>

InteractionWebhookConfig

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

public JsonTypeInfo<InteractionWebhookConfig> InteractionWebhookConfig { get; }

Property Value

JsonTypeInfo<InteractionWebhookConfig>

JsonElement

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

public JsonTypeInfo<JsonElement> JsonElement { get; }

Property Value

JsonTypeInfo<JsonElement>

JsonNode

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

public JsonTypeInfo<JsonNode> JsonNode { get; }

Property Value

JsonTypeInfo<JsonNode>

JsonObject

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

public JsonTypeInfo<JsonObject> JsonObject { get; }

Property Value

JsonTypeInfo<JsonObject>

ListAgent

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

public JsonTypeInfo<List<Agent>> ListAgent { get; }

Property Value

JsonTypeInfo<List<Agent>>

ListAgentEnvironment

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

public JsonTypeInfo<List<AgentEnvironment>> ListAgentEnvironment { get; }

Property Value

JsonTypeInfo<List<AgentEnvironment>>

ListAgentsResponse

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

public JsonTypeInfo<ListAgentsResponse> ListAgentsResponse { get; }

Property Value

JsonTypeInfo<ListAgentsResponse>

ListCredential

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

public JsonTypeInfo<List<Credential>> ListCredential { get; }

Property Value

JsonTypeInfo<List<Credential>>

ListCredentialsResponse

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

public JsonTypeInfo<ListCredentialsResponse> ListCredentialsResponse { get; }

Property Value

JsonTypeInfo<ListCredentialsResponse>

ListEnvironmentFile

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

public JsonTypeInfo<List<EnvironmentFile>> ListEnvironmentFile { get; }

Property Value

JsonTypeInfo<List<EnvironmentFile>>

ListEnvironmentFilesResponse

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

public JsonTypeInfo<ListEnvironmentFilesResponse> ListEnvironmentFilesResponse { get; }

Property Value

JsonTypeInfo<ListEnvironmentFilesResponse>

ListEnvironmentsResponse

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

public JsonTypeInfo<ListEnvironmentsResponse> ListEnvironmentsResponse { get; }

Property Value

JsonTypeInfo<ListEnvironmentsResponse>

ListInteractionEnvironmentSource

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

public JsonTypeInfo<List<InteractionEnvironmentSource>> ListInteractionEnvironmentSource { get; }

Property Value

JsonTypeInfo<List<InteractionEnvironmentSource>>

ListInteractionGroundingToolCount

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

public JsonTypeInfo<List<InteractionGroundingToolCount>> ListInteractionGroundingToolCount { get; }

Property Value

JsonTypeInfo<List<InteractionGroundingToolCount>>

ListInteractionModalityTokens

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

public JsonTypeInfo<List<InteractionModalityTokens>> ListInteractionModalityTokens { get; }

Property Value

JsonTypeInfo<List<InteractionModalityTokens>>

ListInteractionResponseFormat

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

public JsonTypeInfo<List<InteractionResponseFormat>> ListInteractionResponseFormat { get; }

Property Value

JsonTypeInfo<List<InteractionResponseFormat>>

ListInteractionSafetySetting

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

public JsonTypeInfo<List<InteractionSafetySetting>> ListInteractionSafetySetting { get; }

Property Value

JsonTypeInfo<List<InteractionSafetySetting>>

ListInteractionTool

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

public JsonTypeInfo<List<InteractionTool>> ListInteractionTool { get; }

Property Value

JsonTypeInfo<List<InteractionTool>>

ListString

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

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

Property Value

JsonTypeInfo<List<string>>

ListTrigger

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

public JsonTypeInfo<List<Trigger>> ListTrigger { get; }

Property Value

JsonTypeInfo<List<Trigger>>

ListTriggerExecution

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

public JsonTypeInfo<List<TriggerExecution>> ListTriggerExecution { get; }

Property Value

JsonTypeInfo<List<TriggerExecution>>

ListTriggerExecutionsResponse

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

public JsonTypeInfo<ListTriggerExecutionsResponse> ListTriggerExecutionsResponse { get; }

Property Value

JsonTypeInfo<ListTriggerExecutionsResponse>

ListTriggersResponse

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

public JsonTypeInfo<ListTriggersResponse> ListTriggersResponse { get; }

Property Value

JsonTypeInfo<ListTriggersResponse>

ListVoice

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

public JsonTypeInfo<List<Voice>> ListVoice { get; }

Property Value

JsonTypeInfo<List<Voice>>

ListVoicesResponse

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

public JsonTypeInfo<ListVoicesResponse> ListVoicesResponse { get; }

Property Value

JsonTypeInfo<ListVoicesResponse>

NoulCriteria

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

public JsonTypeInfo<NoulCriteria> NoulCriteria { get; }

Property Value

JsonTypeInfo<NoulCriteria>

NoulDecisionAnswer

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

public JsonTypeInfo<NoulDecisionAnswer> NoulDecisionAnswer { get; }

Property Value

JsonTypeInfo<NoulDecisionAnswer>

NoulDecisionQuestion

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

public JsonTypeInfo<NoulDecisionQuestion> NoulDecisionQuestion { get; }

Property Value

JsonTypeInfo<NoulDecisionQuestion>

NullableBoolean

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

public JsonTypeInfo<bool?> NullableBoolean { get; }

Property Value

JsonTypeInfo<bool?>

NullableDouble

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

public JsonTypeInfo<double?> NullableDouble { get; }

Property Value

JsonTypeInfo<double?>

NullableInt32

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

public JsonTypeInfo<int?> NullableInt32 { get; }

Property Value

JsonTypeInfo<int?>

NullableInt64

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

public JsonTypeInfo<long?> NullableInt64 { get; }

Property Value

JsonTypeInfo<long?>

OAuth2CredentialConfig

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

public JsonTypeInfo<OAuth2CredentialConfig> OAuth2CredentialConfig { get; }

Property Value

JsonTypeInfo<OAuth2CredentialConfig>

PromptedVoice

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

public JsonTypeInfo<PromptedVoice> PromptedVoice { get; }

Property Value

JsonTypeInfo<PromptedVoice>

ReplicatedVoice

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

public JsonTypeInfo<ReplicatedVoice> ReplicatedVoice { get; }

Property Value

JsonTypeInfo<ReplicatedVoice>

ScoreDecisionAnswer

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

public JsonTypeInfo<ScoreDecisionAnswer> ScoreDecisionAnswer { get; }

Property Value

JsonTypeInfo<ScoreDecisionAnswer>

ScoreDecisionQuestion

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

public JsonTypeInfo<ScoreDecisionQuestion> ScoreDecisionQuestion { get; }

Property Value

JsonTypeInfo<ScoreDecisionQuestion>

String

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

public JsonTypeInfo<string> String { get; }

Property Value

JsonTypeInfo<string>

Trigger

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

public JsonTypeInfo<Trigger> Trigger { get; }

Property Value

JsonTypeInfo<Trigger>

TriggerExecution

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

public JsonTypeInfo<TriggerExecution> TriggerExecution { get; }

Property Value

JsonTypeInfo<TriggerExecution>

UpdateTriggerRequest

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

public JsonTypeInfo<UpdateTriggerRequest> UpdateTriggerRequest { get; }

Property Value

JsonTypeInfo<UpdateTriggerRequest>

Voice

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

public JsonTypeInfo<Voice> Voice { get; }

Property Value

JsonTypeInfo<Voice>

VoiceAudioData

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

public JsonTypeInfo<VoiceAudioData> VoiceAudioData { get; }

Property Value

JsonTypeInfo<VoiceAudioData>

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.