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
optionsJsonSerializerOptionsThe 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
AgentEnvironment
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<AgentEnvironment> AgentEnvironment { get; }
Property Value
BearerTokenCredentialConfig
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<BearerTokenCredentialConfig> BearerTokenCredentialConfig { get; }
Property Value
Boolean
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<bool> Boolean { get; }
Property Value
ChoiceDecisionAnswer
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<ChoiceDecisionAnswer> ChoiceDecisionAnswer { get; }
Property Value
ChoiceDecisionQuestion
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<ChoiceDecisionQuestion> ChoiceDecisionQuestion { get; }
Property Value
CreateDecisionRequest
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<CreateDecisionRequest> CreateDecisionRequest { get; }
Property Value
CreateDecisionResponse
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<CreateDecisionResponse> CreateDecisionResponse { get; }
Property Value
CreateEnvironmentRequest
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<CreateEnvironmentRequest> CreateEnvironmentRequest { get; }
Property Value
CreateInteractionRequest
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<CreateInteractionRequest> CreateInteractionRequest { get; }
Property Value
CreateTriggerRequest
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<CreateTriggerRequest> CreateTriggerRequest { get; }
Property Value
CreateVoiceRequest
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<CreateVoiceRequest> CreateVoiceRequest { get; }
Property Value
Credential
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<Credential> Credential { get; }
Property Value
CredentialConfig
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<CredentialConfig> CredentialConfig { get; }
Property Value
DecisionAnswer
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<DecisionAnswer> DecisionAnswer { get; }
Property Value
DecisionPromptFeedback
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<DecisionPromptFeedback> DecisionPromptFeedback { get; }
Property Value
DecisionQuestion
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<DecisionQuestion> DecisionQuestion { get; }
Property Value
Default
The default JsonSerializerContext associated with a default JsonSerializerOptions instance.
public static AgentApisSerializerContext Default { get; }
Property Value
DeleteVoiceResponse
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<DeleteVoiceResponse> DeleteVoiceResponse { get; }
Property Value
DictionaryStringDecisionAnswer
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<Dictionary<string, DecisionAnswer>> DictionaryStringDecisionAnswer { get; }
Property Value
DictionaryStringDecisionQuestion
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<Dictionary<string, DecisionQuestion>> DictionaryStringDecisionQuestion { get; }
Property Value
DictionaryStringDouble
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<Dictionary<string, double>> DictionaryStringDouble { get; }
Property Value
DictionaryStringJsonElement
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<Dictionary<string, JsonElement>> DictionaryStringJsonElement { get; }
Property Value
DictionaryStringString
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<Dictionary<string, string>> DictionaryStringString { get; }
Property Value
Double
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<double> Double { get; }
Property Value
EnvironmentFile
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<EnvironmentFile> EnvironmentFile { get; }
Property Value
EnvironmentVariableCredentialConfig
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<EnvironmentVariableCredentialConfig> EnvironmentVariableCredentialConfig { get; }
Property Value
GeneratedSerializerOptions
The source-generated options associated with this context.
protected override JsonSerializerOptions? GeneratedSerializerOptions { get; }
Property Value
Int32
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<int> Int32 { get; }
Property Value
Int64
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<long> Int64 { get; }
Property Value
InteractionAgentConfig
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<InteractionAgentConfig> InteractionAgentConfig { get; }
Property Value
InteractionEnvironmentReference
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<InteractionEnvironmentReference> InteractionEnvironmentReference { get; }
Property Value
InteractionEnvironmentSource
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<InteractionEnvironmentSource> InteractionEnvironmentSource { get; }
Property Value
InteractionGenerationConfig
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<InteractionGenerationConfig> InteractionGenerationConfig { get; }
Property Value
InteractionGroundingToolCount
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<InteractionGroundingToolCount> InteractionGroundingToolCount { get; }
Property Value
InteractionImageConfig
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<InteractionImageConfig> InteractionImageConfig { get; }
Property Value
InteractionInput
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<InteractionInput> InteractionInput { get; }
Property Value
InteractionModalityTokens
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<InteractionModalityTokens> InteractionModalityTokens { get; }
Property Value
InteractionResponseFormat
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<InteractionResponseFormat> InteractionResponseFormat { get; }
Property Value
InteractionSafetySetting
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<InteractionSafetySetting> InteractionSafetySetting { get; }
Property Value
InteractionTool
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<InteractionTool> InteractionTool { get; }
Property Value
InteractionToolChoice
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<InteractionToolChoice> InteractionToolChoice { get; }
Property Value
InteractionTranscriptionConfig
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<InteractionTranscriptionConfig> InteractionTranscriptionConfig { get; }
Property Value
InteractionUsage
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<InteractionUsage> InteractionUsage { get; }
Property Value
InteractionVideoConfig
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<InteractionVideoConfig> InteractionVideoConfig { get; }
Property Value
InteractionWebhookConfig
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<InteractionWebhookConfig> InteractionWebhookConfig { get; }
Property Value
JsonElement
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<JsonElement> JsonElement { get; }
Property Value
JsonNode
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<JsonNode> JsonNode { get; }
Property Value
JsonObject
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<JsonObject> JsonObject { get; }
Property Value
ListAgent
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<List<Agent>> ListAgent { get; }
Property Value
ListAgentEnvironment
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<List<AgentEnvironment>> ListAgentEnvironment { get; }
Property Value
ListAgentsResponse
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<ListAgentsResponse> ListAgentsResponse { get; }
Property Value
ListCredential
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<List<Credential>> ListCredential { get; }
Property Value
ListCredentialsResponse
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<ListCredentialsResponse> ListCredentialsResponse { get; }
Property Value
ListEnvironmentFile
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<List<EnvironmentFile>> ListEnvironmentFile { get; }
Property Value
ListEnvironmentFilesResponse
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<ListEnvironmentFilesResponse> ListEnvironmentFilesResponse { get; }
Property Value
ListEnvironmentsResponse
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<ListEnvironmentsResponse> ListEnvironmentsResponse { get; }
Property Value
ListInteractionEnvironmentSource
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<List<InteractionEnvironmentSource>> ListInteractionEnvironmentSource { get; }
Property Value
ListInteractionGroundingToolCount
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<List<InteractionGroundingToolCount>> ListInteractionGroundingToolCount { get; }
Property Value
ListInteractionModalityTokens
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<List<InteractionModalityTokens>> ListInteractionModalityTokens { get; }
Property Value
ListInteractionResponseFormat
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<List<InteractionResponseFormat>> ListInteractionResponseFormat { get; }
Property Value
ListInteractionSafetySetting
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<List<InteractionSafetySetting>> ListInteractionSafetySetting { get; }
Property Value
ListInteractionTool
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<List<InteractionTool>> ListInteractionTool { get; }
Property Value
ListString
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<List<string>> ListString { get; }
Property Value
ListTrigger
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<List<Trigger>> ListTrigger { get; }
Property Value
ListTriggerExecution
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<List<TriggerExecution>> ListTriggerExecution { get; }
Property Value
ListTriggerExecutionsResponse
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<ListTriggerExecutionsResponse> ListTriggerExecutionsResponse { get; }
Property Value
ListTriggersResponse
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<ListTriggersResponse> ListTriggersResponse { get; }
Property Value
ListVoice
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<List<Voice>> ListVoice { get; }
Property Value
ListVoicesResponse
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<ListVoicesResponse> ListVoicesResponse { get; }
Property Value
NoulCriteria
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<NoulCriteria> NoulCriteria { get; }
Property Value
NoulDecisionAnswer
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<NoulDecisionAnswer> NoulDecisionAnswer { get; }
Property Value
NoulDecisionQuestion
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<NoulDecisionQuestion> NoulDecisionQuestion { get; }
Property Value
NullableBoolean
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<bool?> NullableBoolean { get; }
Property Value
NullableDouble
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<double?> NullableDouble { get; }
Property Value
NullableInt32
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<int?> NullableInt32 { get; }
Property Value
NullableInt64
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<long?> NullableInt64 { get; }
Property Value
OAuth2CredentialConfig
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<OAuth2CredentialConfig> OAuth2CredentialConfig { get; }
Property Value
PromptedVoice
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<PromptedVoice> PromptedVoice { get; }
Property Value
ReplicatedVoice
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<ReplicatedVoice> ReplicatedVoice { get; }
Property Value
ScoreDecisionAnswer
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<ScoreDecisionAnswer> ScoreDecisionAnswer { get; }
Property Value
ScoreDecisionQuestion
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<ScoreDecisionQuestion> ScoreDecisionQuestion { get; }
Property Value
String
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<string> String { get; }
Property Value
Trigger
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<Trigger> Trigger { get; }
Property Value
TriggerExecution
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<TriggerExecution> TriggerExecution { get; }
Property Value
UpdateTriggerRequest
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<UpdateTriggerRequest> UpdateTriggerRequest { get; }
Property Value
Voice
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<Voice> Voice { get; }
Property Value
VoiceAudioData
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<VoiceAudioData> VoiceAudioData { 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.